diff --git a/THIRD_PARTY.txt b/THIRD_PARTY.txt
index 74730a4f..503bbf57 100644
--- a/THIRD_PARTY.txt
+++ b/THIRD_PARTY.txt
@@ -1719,6 +1719,7 @@ https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.1/css/swiper.min.css
https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.1/js/swiper.min.js
https://cdnjs.cloudflare.com/ajax/libs/Swiper/5.4.5/css/swiper.min.css
https://cdnjs.cloudflare.com/ajax/libs/Swiper/5.4.5/js/swiper.min.js
+https://cdnjs.cloudflare.com/ajax/libs/tensorflow/4.1.0/tf.min.js
https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.7/js/tether.min.js
https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.10.5/icons/default/icons.min.js
https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.10.5/jquery.tinymce.min.js
diff --git a/core/mappings.js b/core/mappings.js
index d6ea89c8..9e032599 100644
--- a/core/mappings.js
+++ b/core/mappings.js
@@ -504,6 +504,8 @@ mappings.cdn = {
'Swiper/{version}/swiper-bundle.js': resources.swiperJS,
'Swiper/{version}/swiper-bundle.min.css': resources.swiperCSS,
'Swiper/{version}/swiper-bundle.css': resources.swiperCSS,
+ 'tensorflow/{version}/tf.min.js': resources.tensorflow,
+ 'tensorflow/{version}/tf.js': resources.tensorflow,
'tether/{version}/js/tether.': resources.tetherJS,
'tinymce/{version}/': resources.tinymce,
'tooltipster/{version}/js/jquery.tooltipster.': resources.jQueryTooltipster,
@@ -711,6 +713,8 @@ mappings.cdn = {
'slick-carousel@{version}/slick/slick.css': resources.slickCarouselCSS,
'slick-carousel@{version}/slick/slick.min.js': resources.slickCarouselJS,
'slick-carousel@{version}/slick/slick.js': resources.slickCarouselJS,
+ '@tensorflow/tfjs@{version}/dist/tf.min.js': resources.tensorflow,
+ '@tensorflow/tfjs@{version}/dist/tf.js': resources.tensorflow,
'underscore@{version}/underscore.': resources.underscore,
'underscore@{version}/underscore-min.': resources.underscore,
'urlize.js/urlize.js': resources.urlize,
diff --git a/core/resources.js b/core/resources.js
index 9224205f..81bd61fd 100644
--- a/core/resources.js
+++ b/core/resources.js
@@ -1065,6 +1065,10 @@ var resources = {
'swiperCSS': {
'path': 'resources/Swiper/{version}/css/swiper.min.css'
},
+ // tensorflow
+ 'tensorflow': {
+ 'path': 'resources/tensorflow/{version}/tf.min.jsm'
+ },
// Tether JS [Deprecated]
'tetherJS': {
'path': 'resources/tether/{version}/js/tether.min.jsm'
diff --git a/modules/internal/targets.js b/modules/internal/targets.js
index 5d42b094..cff5bd8d 100644
--- a/modules/internal/targets.js
+++ b/modules/internal/targets.js
@@ -449,6 +449,9 @@ targets.setLastVersion = function (type, version) {
if (type.startsWith('/Swiper/6.')) return '6.8.4';
if (type.startsWith('/Swiper/7.')) return '7.4.1';
if (type.startsWith('/Swiper/8.') || type.startsWith('/Swiper/')) return '8.4.5';
+ if (type.startsWith('/tensorflow/2.')) return '4.1.0';
+ if (type.startsWith('/tensorflow/3.')) return '4.1.0';
+ if (type.startsWith('/tensorflow/4.')) return '4.1.0';
if (type.startsWith('/tether/1.')) return '1.4.7';
if (type.startsWith('/tinymce/5.')) return '5.10.5';
if (type.startsWith('/tinymce/6.')) return '6.3.1';
@@ -506,6 +509,7 @@ targets.determineResourceName = function (filename) {
};
const ListOfFiles = {
+ 'tf.min.jsm': 'tensorflow',
'nprogress.min.jsm': 'nprogress (JS)',
'nprogress.min.css': 'nprogress (CSS)',
'swagger-ui-bundle.min.jsm': 'Swagger-UI (JS)',
diff --git a/pages/updates/updates.html b/pages/updates/updates.html
index ad76002a..fb8c4dfc 100644
--- a/pages/updates/updates.html
+++ b/pages/updates/updates.html
@@ -41,6 +41,7 @@
Added
- nprogress v0.2.0 (#1254)
+ - tensorflow v4.1.0 (#1264)
Improved
diff --git a/resources/tensorflow/4.1.0/tf.min.jsm b/resources/tensorflow/4.1.0/tf.min.jsm
new file mode 100644
index 00000000..c634f00e
--- /dev/null
+++ b/resources/tensorflow/4.1.0/tf.min.jsm
@@ -0,0 +1,18 @@
+/**
+ * @license
+ * Copyright 2022 Google LLC. All Rights Reserved.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =============================================================================
+ */
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).tf=e.tf||{})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r=function(e){return e&&e.Math==Math&&e},a=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||function(){return this}()||Function("return this")(),i=function(e){try{return!!e()}catch(e){return!0}},o=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),s={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,l=u&&!s.call({1:2},1)?function(e){var t=u(this,e);return!!t&&t.enumerable}:s,c={f:l},p=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},h={}.toString,f=function(e){return h.call(e).slice(8,-1)},d="".split,m=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==f(e)?d.call(e,""):Object(e)}:Object,v=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},g=function(e){return m(v(e))},y=function(e){return"object"==typeof e?null!==e:"function"==typeof e},b=function(e,t){if(!y(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!y(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!y(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!y(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},x={}.hasOwnProperty,w=function(e,t){return x.call(e,t)},k=a.document,N=y(k)&&y(k.createElement),I=function(e){return N?k.createElement(e):{}},S=!o&&!i((function(){return 7!=Object.defineProperty(I("div"),"a",{get:function(){return 7}}).a})),T=Object.getOwnPropertyDescriptor,C={f:o?T:function(e,t){if(e=g(e),t=b(t,!0),S)try{return T(e,t)}catch(e){}if(w(e,t))return p(!c.f.call(e,t),e[t])}},E=function(e){if(!y(e))throw TypeError(String(e)+" is not an object");return e},A=Object.defineProperty,R={f:o?A:function(e,t,n){if(E(e),t=b(t,!0),E(n),S)try{return A(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},_=o?function(e,t,n){return R.f(e,t,p(1,n))}:function(e,t,n){return e[t]=n,e},O=function(e,t){try{_(a,e,t)}catch(n){a[e]=t}return t},F="__core-js_shared__",D=a[F]||O(F,{}),M=Function.toString;"function"!=typeof D.inspectSource&&(D.inspectSource=function(e){return M.call(e)});var L,z,P,B=D.inspectSource,W=a.WeakMap,V="function"==typeof W&&/native code/.test(B(W)),U=n((function(e){(e.exports=function(e,t){return D[e]||(D[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),G=0,j=Math.random(),H=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++G+j).toString(36)},q=U("keys"),K=function(e){return q[e]||(q[e]=H(e))},X={},Y=a.WeakMap;if(V){var J=D.state||(D.state=new Y),Z=J.get,Q=J.has,$=J.set;L=function(e,t){return t.facade=e,$.call(J,e,t),t},z=function(e){return Z.call(J,e)||{}},P=function(e){return Q.call(J,e)}}else{var ee=K("state");X[ee]=!0,L=function(e,t){return t.facade=e,_(e,ee,t),t},z=function(e){return w(e,ee)?e[ee]:{}},P=function(e){return w(e,ee)}}var te,ne,re={set:L,get:z,has:P,enforce:function(e){return P(e)?z(e):L(e,{})},getterFor:function(e){return function(t){var n;if(!y(t)||(n=z(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},ae=n((function(e){var t=re.get,n=re.enforce,r=String(String).split("String");(e.exports=function(e,t,i,o){var s,u=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof t||w(i,"name")||_(i,"name",t),(s=n(i)).source||(s.source=r.join("string"==typeof t?t:""))),e!==a?(u?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=i:_(e,t,i)):l?e[t]=i:O(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||B(this)}))})),ie=a,oe=function(e){return"function"==typeof e?e:void 0},se=function(e,t){return arguments.length<2?oe(ie[e])||oe(a[e]):ie[e]&&ie[e][t]||a[e]&&a[e][t]},ue=Math.ceil,le=Math.floor,ce=function(e){return isNaN(e=+e)?0:(e>0?le:ue)(e)},pe=Math.min,he=function(e){return e>0?pe(ce(e),9007199254740991):0},fe=Math.max,de=Math.min,me=function(e,t){var n=ce(e);return n<0?fe(n+t,0):de(n,t)},ve=function(e){return function(t,n,r){var a,i=g(t),o=he(i.length),s=me(r,o);if(e&&n!=n){for(;o>s;)if((a=i[s++])!=a)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===n)return e||s||0;return!e&&-1}},ge={includes:ve(!0),indexOf:ve(!1)},ye=ge.indexOf,be=function(e,t){var n,r=g(e),a=0,i=[];for(n in r)!w(X,n)&&w(r,n)&&i.push(n);for(;t.length>a;)w(r,n=t[a++])&&(~ye(i,n)||i.push(n));return i},xe=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],we=xe.concat("length","prototype"),ke={f:Object.getOwnPropertyNames||function(e){return be(e,we)}},Ne={f:Object.getOwnPropertySymbols},Ie=se("Reflect","ownKeys")||function(e){var t=ke.f(E(e)),n=Ne.f;return n?t.concat(n(e)):t},Se=function(e,t){for(var n=Ie(t),r=R.f,a=C.f,i=0;i=74)&&(te=Le.match(/Chrome\/(\d+)/))&&(ne=te[1]);var We,Ve=ne&&+ne,Ue=!!Object.getOwnPropertySymbols&&!i((function(){return!Symbol.sham&&(Me?38===Ve:Ve>37&&Ve<41)})),Ge=Ue&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,je=Array.isArray||function(e){return"Array"==f(e)},He=function(e){return Object(v(e))},qe=Object.keys||function(e){return be(e,xe)},Ke=o?Object.defineProperties:function(e,t){E(e);for(var n,r=qe(t),a=r.length,i=0;a>i;)R.f(e,n=r[i++],t[n]);return e},Xe=se("document","documentElement"),Ye=K("IE_PROTO"),Je=function(){},Ze=function(e){return"