@mediapipe/tasks-text 0.10.11-rc.20240304 → 0.10.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/package.json +1 -1
- package/text.d.ts +11 -0
- package/text_bundle.cjs +1 -1
- package/text_bundle.cjs.map +1 -1
- package/text_bundle.mjs +1 -1
- package/text_bundle.mjs.map +1 -1
- package/wasm/text_wasm_internal.js +2 -2
- package/wasm/text_wasm_internal.wasm +0 -0
- package/wasm/text_wasm_nosimd_internal.js +2 -2
- package/wasm/text_wasm_nosimd_internal.wasm +0 -0
package/README.md
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/text.d.ts
CHANGED
|
@@ -236,6 +236,17 @@ export declare class FilesetResolver {
|
|
|
236
236
|
* tasks.
|
|
237
237
|
*/
|
|
238
238
|
static forAudioTasks(basePath?: string): Promise<WasmFileset>;
|
|
239
|
+
/**
|
|
240
|
+
* Creates a fileset for the MediaPipe GenAI tasks.
|
|
241
|
+
*
|
|
242
|
+
* @export
|
|
243
|
+
* @param basePath An optional base path to specify the directory the Wasm
|
|
244
|
+
* files should be loaded from. If not specified, the Wasm files are
|
|
245
|
+
* loaded from the host's root directory.
|
|
246
|
+
* @return A `WasmFileset` that can be used to initialize MediaPipe GenAI
|
|
247
|
+
* tasks.
|
|
248
|
+
*/
|
|
249
|
+
static forGenAiTasks(basePath?: string): Promise<WasmFileset>;
|
|
239
250
|
/**
|
|
240
251
|
* Creates a fileset for the MediaPipe Text tasks.
|
|
241
252
|
*
|
package/text_bundle.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t="undefined"!=typeof self?self:{};function e(e){t:{for(var n=["CLOSURE_FLAGS"],r=t,i=0;i<n.length;i++)if(null==(r=r[n[i]])){n=null;break t}n=r}return null!=(e=n&&n[e])&&e}function n(){throw Error("Invalid UTF8")}function r(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let i,o;const s="undefined"!=typeof TextDecoder;let a;const u="undefined"!=typeof TextEncoder;function c(t){if(u)t=(a||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(128>e)r[n++]=e;else{if(2048>e)r[n++]=e>>6|192;else{if(55296<=e&&57343>=e){if(56319>=e&&i<t.length){const o=t.charCodeAt(++i);if(56320<=o&&57343>=o){e=1024*(e-55296)+o-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}i--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}var l,h=e(610401301),f=e(188588736);const d=t.navigator;function g(t){return!!h&&(!!l&&l.brands.some((({brand:e})=>e&&-1!=e.indexOf(t))))}function p(e){var n;return(n=t.navigator)&&(n=n.userAgent)||(n=""),-1!=n.indexOf(e)}function m(){return!!h&&(!!l&&0<l.brands.length)}function y(){return m()?g("Chromium"):(p("Chrome")||p("CriOS"))&&!(!m()&&p("Edge"))||p("Silk")}l=d&&d.userAgentData||null;var v=!m()&&(p("Trident")||p("MSIE"));!p("Android")||y(),y(),p("Safari")&&(y()||!m()&&p("Coast")||!m()&&p("Opera")||!m()&&p("Edge")||(m()?g("Microsoft Edge"):p("Edg/"))||m()&&g("Opera"));var b={},w=null;function _(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);var r=new Uint8Array(n),i=0;return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=w[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}A();for(var r=0;;){var i=n(-1),o=n(0),s=n(64),a=n(64);if(64===a&&-1===i)break;e(i<<2|o>>4),64!=s&&(e(o<<4&240|s>>2),64!=a&&e(s<<6&192|a))}}(t,(function(t){r[i++]=t})),i!==n?r.subarray(0,i):r}function A(){if(!w){w={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=t.concat(e[n].split(""));b[n]=r;for(var i=0;i<r.length;i++){var o=r[i];void 0===w[o]&&(w[o]=i)}}}}var S="undefined"!=typeof Uint8Array,E=!v&&"function"==typeof btoa;function T(t){if(!E){var e;void 0===e&&(e=0),A(),e=b[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let u=0,c=0;for(;u<t.length-2;u+=3){var i=t[u],o=t[u+1],s=t[u+2],a=e[i>>2];i=e[(3&i)<<4|o>>4],o=e[(15&o)<<2|s>>6],s=e[63&s],n[c++]=a+i+o+s}switch(a=0,s=r,t.length-u){case 2:s=e[(15&(a=t[u+1]))<<2]||r;case 1:t=t[u],n[c]=e[t>>2]+e[(3&t)<<4|a>>4]+s+r}return n.join("")}for(e="",n=0,r=t.length-10240;n<r;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const I=/[-_.]/g,x={"-":"+",_:"/",".":"="};function P(t){return x[t]||""}function O(t){if(!E)return _(t);I.test(t)&&(t=t.replace(I,P)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function L(t){return S&&null!=t&&t instanceof Uint8Array}let B;function F(){return B||=new Uint8Array(0)}var j={};let k;function U(t){if(t!==j)throw Error("illegal external caller")}function V(){return k||=new C(null,j)}function N(t){U(j);var e=t.g;return null==(e=null==e||L(e)?e:"string"==typeof e?O(e):null)?e:t.g=e}var C=class{constructor(t,e){if(U(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}i(){const t=N(this);return t?new Uint8Array(t):F()}};function M(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function G(){return Error("Failed to read varint, encoding is invalid.")}function D(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function z(t){if("string"==typeof t)return{buffer:O(t),A:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),A:!1};if(t.constructor===Uint8Array)return{buffer:t,A:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),A:!1};if(t.constructor===C)return{buffer:N(t)||F(),A:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),A:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function $(){return"function"==typeof BigInt}const W="function"==typeof Uint8Array.prototype.slice;let R,H=0,q=0;function J(t){const e=0>t;let n=(t=Math.abs(t))>>>0;if(t=Math.floor((t-n)/4294967296),e){const[e,r]=et(n,t);t=r,n=e}H=n>>>0,q=t>>>0}function K(t){const e=R||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),q=0,H=e.getUint32(0,!0)}function Y(t,e){return 4294967296*e+(t>>>0)}function X(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),t=Y(t,e),n?-t:t}function Q(t,e){if(t>>>=0,2097151>=(e>>>=0))var n=""+(4294967296*e+t);else $()?n=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(n=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),n+=8147497*e,e*=2,1e7<=t&&(n+=Math.floor(t/1e7),t%=1e7),1e7<=n&&(e+=Math.floor(n/1e7),n%=1e7),n=e+Z(n)+Z(t));return n}function Z(t){return t=String(t),"0000000".slice(t.length)+t}function tt(t){if(16>t.length)J(Number(t));else if($())t=BigInt(t),H=Number(t&BigInt(4294967295))>>>0,q=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);q=H=0;const n=t.length;for(let r=e,i=(n-e)%6+e;i<=n;r=i,i+=6){const e=Number(t.slice(r,i));q*=1e6,H=1e6*H+e,4294967296<=H&&(q+=Math.trunc(H/4294967296),q>>>=0,H>>>=0)}if(e){const[t,e]=et(H,q);H=t,q=e}}}function et(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function nt(t,e){let n,r=0,i=0,o=0;const s=t.i;let a=t.g;do{n=s[a++],r|=(127&n)<<o,o+=7}while(32>o&&128&n);for(32<o&&(i|=(127&n)>>4),o=3;32>o&&128&n;o+=7)n=s[a++],i|=(127&n)<<o;if(ut(t,a),128>n)return e(r>>>0,i>>>0);throw G()}function rt(t){let e=0,n=t.g;const r=n+10,i=t.i;for(;n<r;){const r=i[n++];if(e|=r,0==(128&r))return ut(t,n),!!(127&e)}throw G()}function it(t){const e=t.i;let n=t.g,r=e[n++],i=127&r;if(128&r&&(r=e[n++],i|=(127&r)<<7,128&r&&(r=e[n++],i|=(127&r)<<14,128&r&&(r=e[n++],i|=(127&r)<<21,128&r&&(r=e[n++],i|=r<<28,128&r&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw G();return ut(t,n),i}function ot(t){var e=t.i;const n=t.g;var r=e[n],i=e[n+1];const o=e[n+2];return e=e[n+3],ut(t,t.g+4),t=2*((i=(r<<0|i<<8|o<<16|e<<24)>>>0)>>31)+1,r=i>>>23&255,i&=8388607,255==r?i?NaN:1/0*t:0==r?t*Math.pow(2,-149)*i:t*Math.pow(2,r-150)*(i+Math.pow(2,23))}function st(t){return it(t)}function at(t,e,{D:n=!1}={}){t.D=n,e&&(e=z(e),t.i=e.buffer,t.m=e.A,t.s=0,t.j=t.i.length,t.g=t.s)}function ut(t,e){if(t.g=e,e>t.j)throw D(t.j,e)}function ct(t,e){if(0>e)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,r=n+e;if(r>t.j)throw D(e,t.j-n);return t.g=r,n}function lt(t,e){if(0==e)return V();var n=ct(t,e);return t.D&&t.m?n=t.i.subarray(n,n+e):(t=t.i,n=n===(e=n+e)?F():W?t.slice(n,e):new Uint8Array(t.subarray(n,e))),0==n.length?V():new C(n,j)}var ht=[];function ft(t){var e=t.g;if(e.g==e.j)return!1;t.j=t.g.g;var n=it(t.g)>>>0;if(e=n>>>3,!(0<=(n&=7)&&5>=n))throw M(n,t.j);if(1>e)throw Error(`Invalid field number: ${e} (at position ${t.j})`);return t.m=e,t.i=n,!0}function dt(t){switch(t.i){case 0:0!=t.i?dt(t):rt(t.g);break;case 1:ut(t=t.g,t.g+8);break;case 2:if(2!=t.i)dt(t);else{var e=it(t.g)>>>0;ut(t=t.g,t.g+e)}break;case 5:ut(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!ft(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.i){if(t.m!=e)throw Error("Unmatched end-group tag");break}dt(t)}break;default:throw M(t.i,t.j)}}function gt(t,e,n){const r=t.g.j,i=it(t.g)>>>0,o=t.g.g+i;let s=o-r;if(0>=s&&(t.g.j=o,n(e,t,void 0,void 0,void 0),s=o-t.g.g),s)throw Error(`Message parsing ended unexpectedly. Expected to read ${i} bytes, instead read ${i-s} bytes, either the data ended unexpectedly or the message misreported its own length`);t.g.g=o,t.g.j=r}function pt(t){var e=it(t.g)>>>0,a=ct(t=t.g,e);if(t=t.i,s){var u,c=t;(u=o)||(u=o=new TextDecoder("utf-8",{fatal:!0})),e=a+e,c=0===a&&e===c.length?c:c.subarray(a,e);try{var l=u.decode(c)}catch(t){if(void 0===i){try{u.decode(new Uint8Array([128]))}catch(t){}try{u.decode(new Uint8Array([97])),i=!0}catch(t){i=!1}}throw!i&&(o=void 0),t}}else{e=(l=a)+e,a=[];let i,o=null;for(;l<e;){var h=t[l++];128>h?a.push(h):224>h?l>=e?n():(i=t[l++],194>h||128!=(192&i)?(l--,n()):a.push((31&h)<<6|63&i)):240>h?l>=e-1?n():(i=t[l++],128!=(192&i)||224===h&&160>i||237===h&&160<=i||128!=(192&(u=t[l++]))?(l--,n()):a.push((15&h)<<12|(63&i)<<6|63&u)):244>=h?l>=e-2?n():(i=t[l++],128!=(192&i)||0!=i-144+(h<<28)>>30||128!=(192&(u=t[l++]))||128!=(192&(c=t[l++]))?(l--,n()):(h=(7&h)<<18|(63&i)<<12|(63&u)<<6|63&c,h-=65536,a.push(55296+(h>>10&1023),56320+(1023&h)))):n(),8192<=a.length&&(o=r(o,a),a.length=0)}l=r(o,a)}return l}function mt(t){const e=it(t.g)>>>0;return lt(t.g,e)}function yt(t,e,n){var r=it(t.g)>>>0;for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var vt=[];function bt(t){return t?/^\d+$/.test(t)?(tt(t),new wt(H,q)):null:_t||=new wt(0,0)}var wt=class{constructor(t,e){this.i=t>>>0,this.g=e>>>0}};let _t;function At(t){return t?/^-?\d+$/.test(t)?(tt(t),new St(H,q)):null:Et||=new St(0,0)}var St=class{constructor(t,e){this.i=t>>>0,this.g=e>>>0}};let Et;function Tt(t,e,n){for(;0<n||127<e;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function It(t,e){for(;127<e;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function xt(t,e){if(0<=e)It(t,e);else{for(let n=0;9>n;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Pt(t){var e=H;t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function Ot(t,e){0!==e.length&&(t.j.push(e),t.i+=e.length)}function Lt(t,e,n){It(t.g,8*e+n)}function Bt(t,e){return Lt(t,e,2),e=t.g.end(),Ot(t,e),e.push(t.i),e}function Ft(t,e){var n=e.pop();for(n=t.i+t.g.length()-n;127<n;)e.push(127&n|128),n>>>=7,t.i++;e.push(n),t.i++}function jt(t,e,n){Lt(t,e,2),It(t.g,n.length),Ot(t,t.g.end()),Ot(t,n)}var kt;class Ut{constructor(t,e,n,r){this.g=t,this.i=e,this.j=n,this.H=r}}function Vt(t){return Array.prototype.slice.call(t)}var Nt=(kt="function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():void 0)?(t,e)=>{t[kt]|=e}:(t,e)=>{void 0!==t.g?t.g|=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}})},Ct=kt?(t,e)=>{t[kt]&=~e}:(t,e)=>{void 0!==t.g&&(t.g&=~e)};function Mt(t,e,n){return n?t|e:t&~e}var Gt=kt?t=>0|t[kt]:t=>0|t.g,Dt=kt?t=>t[kt]:t=>t.g,zt=kt?(t,e)=>(t[kt]=e,t):(t,e)=>(void 0!==t.g?t.g=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}}),t);function $t(t,e){zt(e,-14591&(0|t))}function Wt(t,e){zt(e,-14557&(34|t))}function Rt(t){return 0===(t=t>>14&1023)?536870912:t}var Ht,qt={},Jt={};function Kt(t){return!(!t||"object"!=typeof t||t.g!==Jt)}function Yt(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function Xt(t,e,n){if(null!=t)if("string"==typeof t)t=t?new C(t,j):V();else if(t.constructor!==C)if(L(t))t=t.length?new C(n?t:new Uint8Array(t),j):V();else{if(!e)throw Error();t=void 0}return t}function Qt(t,e,n){if(!Array.isArray(t)||t.length)return!1;const r=Gt(t);return!!(1&r)||!(!e||!(Array.isArray(e)?e.includes(n):e.has(n)))&&(zt(t,1|r),!0)}const Zt=[];function te(t){if(2&t)throw Error()}let ee,ne;function re(t,e){(e=ee?e[ee]:void 0)&&(t[ee]=Vt(e))}zt(Zt,55),Ht=Object.freeze(Zt);function ie(){const t=Error("int32");return t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity="warning",t}function oe(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function se(t){if(null!=t&&"boolean"!=typeof t){var e=typeof t;throw Error(`Expected boolean but got ${"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}: ${t}`)}return t}Object.freeze(new class{}),Object.freeze(new class{});const ae=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function ue(t){const e=typeof t;return"number"===e?Number.isFinite(t):"string"===e&&ae.test(t)}function ce(t){if(null==t)return t;if("string"==typeof t){if(!t)return;t=+t}return"number"==typeof t&&Number.isFinite(t)?0|t:void 0}function le(t){return"-"!==t[0]&&(20>t.length||20===t.length&&184467>Number(t.substring(0,6)))}function he(t){return t=Math.trunc(t),Number.isSafeInteger(t)||(J(t),t=X(H,q)),t}function fe(t){var e=Math.trunc(Number(t));if(Number.isSafeInteger(e))return String(e);if(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),!("-"===t[0]?20>t.length||20===t.length&&-922337<Number(t.substring(0,7)):19>t.length||19===t.length&&922337>Number(t.substring(0,6))))if(tt(t),t=H,2147483648&(e=q))if($())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,r]=et(t,e);t="-"+Q(n,r)}else t=Q(t,e);return t}function de(t){if("string"!=typeof t)throw Error();return t}function ge(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function pe(t){return null==t||"string"==typeof t?t:void 0}function me(t,e,n){if(null!=t&&"object"==typeof t&&t.C===qt)return t;if(Array.isArray(t)){var r=Gt(t),i=r;return 0===i&&(i|=32&n),(i|=2&n)!==r&&zt(t,i),new e(t)}}let ye,ve,be;function we(t){switch(typeof t){case"boolean":return ve||=[0,void 0,!0];case"number":return 0<t?void 0:0===t?be||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}function _e(t,e,n){if(null==t&&(t=ye),ye=void 0,null==t){var r=96;n?(t=[n],r|=512):t=[],e&&(r=-16760833&r|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error();if(64&(r=Gt(t)))return t;if(r|=64,n&&(r|=512,n!==t[0]))throw Error();t:{const i=(n=t).length;if(i){const t=i-1;if(Yt(n[t])){if(1024<=(e=t-(+!!(512&(r|=256))-1)))throw Error();r=-16760833&r|(1023&e)<<14;break t}}if(e){if(1024<(e=Math.max(e,i-(+!!(512&r)-1))))throw Error();r=-16760833&r|(1023&e)<<14}}}return zt(t,r),t}function Ae(t,e,n,r,i){if(null!=t){if(Array.isArray(t))t=Qt(t,void 0,0)?void 0:i&&2&Gt(t)?t:Se(t,e,n,void 0!==r,i);else if(Yt(t)){const o={};for(let s in t)o[s]=Ae(t[s],e,n,r,i);t=o}else t=e(t,r);return t}}function Se(t,e,n,r,i){const o=r||n?Gt(t):0;r=r?!!(32&o):void 0;const s=Vt(t);for(let t=0;t<s.length;t++)s[t]=Ae(s[t],e,n,r,i);return n&&(re(s,t),n(o,s)),s}function Ee(t){return t.C===qt?t.toJSON():function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"boolean":return t?1:0;case"object":if(t)if(Array.isArray(t)){if(Qt(t,void 0,0))return}else{if(L(t))return T(t);if(t instanceof C){const e=t.g;return null==e?"":"string"==typeof e?e:t.g=T(e)}}}return t}(t)}function Te(t,e,n=Wt){if(null!=t){if(S&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){var r=Gt(t);return 2&r?t:(e&&=0===r||!!(32&r)&&!(64&r||!(16&r)),e?zt(t,-12293&(34|r)):Se(t,Te,4&r?Wt:n,!0,!0))}return t.C===qt&&(n=t.l,t=2&(r=Dt(n))?t:xe(t,n,r,!0)),t}}function Ie(t){const e=t.l;return xe(t,e,Dt(e),!1)}function xe(t,e,n,r){return t=t.constructor,ye=e=Pe(e,n,r),e=new t(e),ye=void 0,e}function Pe(t,e,n){const r=n||2&e?Wt:$t,i=!!(32&e);return t=function(t,e,n){const r=Vt(t);var i=r.length;const o=256&e?r[i-1]:void 0;for(i+=o?-1:0,e=512&e?1:0;e<i;e++)r[e]=n(r[e]);if(o){e=r[e]={};for(const t in o)e[t]=n(o[t])}return re(r,t),r}(t,e,(t=>Te(t,i,r))),Nt(t,32|(n?2:0)),t}function Oe(t){const e=t.l,n=Dt(e);return 2&n?xe(t,e,n,!1):t}function Le(t,e){return Be(t=t.l,Dt(t),e)}function Be(t,e,n,r){if(-1===n)return null;if(n>=Rt(e)){if(256&e)return t[t.length-1][n]}else{var i=t.length;if(r&&256&e&&null!=(r=t[i-1][n]))return r;if((e=n+(+!!(512&e)-1))<i)return t[e]}}function Fe(t,e,n,r){const i=t.l;let o=Dt(i);return te(o),je(i,o,e,n,r),t}function je(t,e,n,r,i){const o=Rt(e);if(n>=o||i){let s=e;if(256&e)i=t[t.length-1];else{if(null==r)return s;i=t[o+(+!!(512&e)-1)]={},s|=256}return i[n]=r,n<o&&(t[n+(+!!(512&e)-1)]=void 0),s!==e&&zt(t,s),s}return t[n+(+!!(512&e)-1)]=r,256&e&&(n in(t=t[t.length-1])&&delete t[n]),e}function ke(t,e,n,r,i){var o=2&e;let s=Be(t,e,n,i);Array.isArray(s)||(s=Ht);const a=!(2&r);r=!(1&r);const u=!!(32&e);let c=Gt(s);return 0!==c||!u||o||a?1&c||(c|=1,zt(s,c)):(c|=33,zt(s,c)),o?(t=!1,2&c||(Nt(s,34),t=!!(4&c)),(r||t)&&Object.freeze(s)):(o=!!(2&c)||!!(2048&c),r&&o?(s=Vt(s),r=1,u&&!a&&(r|=32),zt(s,r),je(t,e,n,s,i)):a&&32&c&&!o&&Ct(s,32)),s}function Ue(t){t=t.l;let e=Dt(t);const n=Be(t,e,1),r=Xt(n,!0,!!(34&e));return null!=r&&r!==n&&je(t,e,1,r),r}function Ve(t,e){return t=Be(t,e,1),Array.isArray(t)?t:Ht}function Ne(t,e,n){return 0===t&&(t=Qe(t,e,n)),Mt(t,1,!0)}function Ce(t){return!!(2&t)&&!!(4&t)||!!(2048&t)}function Me(t,e,n){{const s=t.l;let a=Dt(s);if(te(a),null==n)je(s,a,e);else{var r,i=t=Gt(n),o=!!(2&t)||Object.isFrozen(n);if((r=!o)&&(r=!1),!(4&t))for(t=21,o&&(n=Vt(n),i=0,t=Qe(t,a,!0)),o=0;o<n.length;o++)n[o]=de(n[o]);r&&(n=Vt(n),i=0,t=Qe(t,a,!0)),t!==i&&zt(n,t),je(s,a,e,n)}}}function Ge(t,e){t=t.l;let n=Dt(t);te(n),je(t,n,2,""===e?void 0:e)}function De(t,e,n,r){const i=Dt(t);te(i),t=ke(t,i,e,2),r=n(r,!!(4&(e=Gt(t)))&&!!(4096&e)),t.push(r)}function ze(t){return t}function $e(t,e){return We(t=t.l,Dt(t),Kr)===e?e:-1}function We(t,e,n){let r=0;for(let i=0;i<n.length;i++){const o=n[i];null!=Be(t,e,o)&&(0!==r&&(e=je(t,e,r)),r=o)}return r}function Re(t,e,n,r){let i=Dt(t);te(i);const o=Be(t,i,n,r);let s;if(null!=o&&o.C===qt)return(e=Oe(o))!==o&&je(t,i,n,e,r),e.l;if(Array.isArray(o)){const t=Gt(o);s=2&t?Pe(o,t,!1):o,s=_e(s,e[0],e[1])}else s=_e(void 0,e[0],e[1]);return s!==o&&je(t,i,n,s,r),s}function He(t,e,n,r){t=t.l;let i=Dt(t);const o=Be(t,i,n,r);return(e=me(o,e,i))!==o&&null!=e&&je(t,i,n,e,r),e}function qe(t,e,n){if(null==(e=He(t,e,n,!1)))return e;t=t.l;let r=Dt(t);if(!(2&r)){const i=Oe(e);i!==e&&je(t,r,n,e=i,!1)}return e}function Je(t,e,n,r,i){var o=!!(2&e),s=o?1:2;const a=1===s;s=2===s,r=!!r,i&&=!o,o=Ve(t,e);var u=Gt(o);const c=!!(4&u);if(!c){var l,h=o,f=e;(l=!!(2&(u=Ne(u,e,r))))&&(f=Mt(f,2,!0));let t=!l,i=!0,s=0,a=0;for(;s<h.length;s++){const e=me(h[s],n,f);if(e instanceof n){if(!l){const n=!!(2&Gt(e.l));t&&=!n,i&&=n}h[a++]=e}}a<s&&(h.length=a),u=Mt(u,4,!0),u=Mt(u,16,i),u=Mt(u,8,t),zt(h,u),l&&Object.freeze(h)}if(n=!!(8&u)||a&&!o.length,i&&!n){for(Ce(u)&&(o=Vt(o),u=Qe(u,e,r),e=je(t,e,1,o)),i=o,n=u,h=0;h<i.length;h++)(u=i[h])!==(f=Oe(u))&&(i[h]=f);n=Mt(n,8,!0),n=Mt(n,16,!i.length),zt(i,n),u=n}return Ce(u)||(i=u,a?u=Mt(u,!o.length||16&u&&(!c||32&u)?2:2048,!0):r||(u=Mt(u,32,!1)),u!==i&&zt(o,u),a&&Object.freeze(o)),s&&Ce(u)&&(o=Vt(o),u=Qe(u,e,r),zt(o,u),je(t,e,1,o)),o}function Ke(t,e){t=t.l;const n=Dt(t);return Je(t,n,e,!1,!(2&n))}function Ye(t,e,n,r,i){return null==r&&(r=void 0),Fe(t,n,r,i)}function Xe(t,e,n){var r=ri;null==n&&(n=void 0),t=t.l;let i=Dt(t);te(i),(r=We(t,i,r))&&r!==e&&null!=n&&(i=je(t,i,r)),je(t,i,e,n)}function Qe(t,e,n){return t=Mt(t,2,!!(2&e)),t=Mt(t,32,!!(32&e)&&n),Mt(t,2048,!1)}function Ze(t,e){var n=Lr;t=t.l;const r=Dt(t);te(r),t=Je(t,r,n,!0),e=null!=e?e:new n,t.push(e),2&Gt(e.l)?Ct(t,8):Ct(t,16)}function tn(t){return null==(t=Le(t,2))?t:ue(t)?"number"==typeof t?he(t):fe(t):void 0}function en(t){return t??0}function nn(t,e,n){De(t.l,e,de,n)}function rn(t,e,n){e.g?e.j(t,e.g,e.i,n,!0):e.j(t,e.i,n,!0)}var on=class{constructor(t,e){this.l=_e(t,e)}toJSON(){return sn(this,Se(this.l,Ee,void 0,void 0,!1),!0)}A(){return!!(2&Gt(this.l))}};function sn(t,e,n){var r=f?void 0:t.constructor.v;const i=Dt(n?t.l:e);if(!(t=e.length))return e;let o,s;if(Yt(n=e[t-1])){t:{var a=n;let t={},e=!1;for(var u in a){let n=a[u];if(Array.isArray(n)){let t=n;(Qt(n,r,+u)||Kt(n)&&0===n.size)&&(n=null),n!=t&&(e=!0)}null!=n?t[u]=n:e=!0}if(e){for(var c in t){a=t;break t}a=null}}a!=n&&(o=!0),t--}for(u=+!!(512&i)-1;0<t&&(n=e[c=t-1],c-=u,null==n||Qt(n,r,c)||Kt(n)&&0===n.size);t--)s=!0;return o||s?(e=Array.prototype.slice.call(e,0,t),a&&e.push(a),e):e}function an(t){return Array.isArray(t)?t[0]instanceof Ut?t:[rr,t]:[t,void 0]}function un(t,e){if(Array.isArray(e)){var n=Gt(e);if(4&n)return e;for(var r=0,i=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[i++]=n)}return i<r&&(e.length=i),zt(e,-12289&(5|n)),2&n&&Object.freeze(e),e}}on.prototype.C=qt,on.prototype.toString=function(){return sn(this,this.l,!1).toString()};const cn=Symbol();function ln(t){let e=t[cn];if(!e){const n=vn(t),r=Ln(t),i=r.j;e=i?(t,e)=>i(t,e,r):(t,e)=>{for(;ft(e)&&4!=e.i;){var i=e.m,o=r[i];if(!o){var s=r.F;s&&(s=s[i])&&(o=r[i]=hn(s))}o&&o(e,t,i)||(i=(o=e).j,dt(o),o.G?o=void 0:(s=o.g.g-i,o.g.g=i,o=lt(o.g,s)),i=t,o&&(ee||=Symbol(),(s=i[ee])?s.push(o):i[ee]=[o]))}n===dn||n===gn||n.s||(t[ne||=Symbol()]=n)},t[cn]=e}return e}function hn(t){const e=(t=an(t))[0].g;if(t=t[1]){const n=ln(t),r=Ln(t).B;return(t,i,o)=>e(t,i,o,r,n)}return e}class fn{}let dn,gn;const pn=Symbol();function mn(t,e,n){const r=n[1];let i;if(r){const n=r[pn];i=n?n.B:we(r[0]),t[e]=n??r}i&&i===ve?(t.g||(t.g=new Set)).add(e):n[0]&&(t.i||(t.i=new Set)).add(e)}function yn(t,e){return[t.j,!e||0<e[0]?void 0:e]}function vn(t){var e=t[pn];if(e)return e;if(!(e=wn(t,t[pn]=new fn,yn,yn,mn)).F&&!e.i&&!e.g){let n=!0;for(let t in e)isNaN(t)||(n=!1);n?(we(t[0])===ve?gn?e=gn:((e=new fn).B=we(!0),e=gn=e):e=dn||=new fn,e=t[pn]=e):e.s=!0}return e}function bn(t,e,n){t[e]=n}function wn(t,e,n,r,i=bn){e.B=we(t[0]);let o=0;var s=t[++o];s&&s.constructor===Object&&(e.F=s,"function"==typeof(s=t[++o])&&(e.j=s,e.m=t[++o],s=t[++o]));const a={};for(;Array.isArray(s)&&"number"==typeof s[0]&&0<s[0];){for(var u=0;u<s.length;u++)a[s[u]]=s;s=t[++o]}for(u=1;void 0!==s;){let h;"number"==typeof s&&(u+=s,s=t[++o]);var c=void 0;if(s instanceof Ut?h=s:(h=ir,o--),h.H){s=t[++o],c=t;var l=o;"function"==typeof s&&(s=s(),c[l]=s),c=s}for(l=u+1,"number"==typeof(s=t[++o])&&0>s&&(l-=s,s=t[++o]);u<l;u++){const t=a[u];i(e,u,c?r(h,c,t):n(h,t))}}return e}const _n=Symbol();function An(t){let e=t[_n];if(!e){const n=In(t);e=(t,e)=>jn(t,e,n),t[_n]=e}return e}const Sn=Symbol();function En(t){return t.i}function Tn(t,e){let n,r;const i=t.i;return(t,o,s)=>i(t,o,s,r||=In(e).B,n||=An(e))}function In(t){let e=t[Sn];return e||(e=wn(t,t[Sn]={},En,Tn),Bn(t),e)}const xn=Symbol();function Pn(t,e){const n=t.g;return e?(t,r,i)=>n(t,r,i,e):n}function On(t,e,n){const r=t.g;let i,o;return(t,s,a)=>r(t,s,a,o||=Ln(e).B,i||=ln(e),n)}function Ln(t){let e=t[xn];return e||(vn(t),e=wn(t,t[xn]={},Pn,On),Bn(t),e)}function Bn(t){xn in t&&pn in t&&Sn in t&&(t.length=0)}function Fn(t,e){var n=t[e];if(n)return n;if((n=t.F)&&(n=n[e])){var r=(n=an(n))[0].i;if(n=n[1]){const e=An(n),i=In(n).B;n=(n=t.m)?n(i,e):(t,n,o)=>r(t,n,o,i,e)}else n=r;return t[e]=n}}function jn(t,e,n){for(var r=Dt(t),i=+!!(512&r)-1,o=t.length,s=512&r?1:0,a=o+(256&r?-1:0);s<a;s++){const r=t[s];if(null==r)continue;const o=s-i,a=Fn(n,o);a&&a(e,r,o)}if(256&r){r=t[o-1];for(let t in r)i=+t,Number.isNaN(i)||null!=(o=r[t])&&(a=Fn(n,i))&&a(e,o,i)}if(t=ee?t[ee]:void 0)for(Ot(e,e.g.end()),n=0;n<t.length;n++)Ot(e,N(t[n])||F())}function kn(t,e){return new Ut(t,e,!1,!1)}function Un(t,e){return new Ut(t,e,!0,!1)}function Vn(t,e,n){je(t,Dt(t),e,n)}function Nn(t,e,n){t:if(null!=e){if(ue(e)){if("string"==typeof e){e=fe(e);break t}if("number"==typeof e){e=he(e);break t}}e=void 0}null!=e&&("string"==typeof e&&At(e),null!=e&&(Lt(t,n,0),"number"==typeof e?(t=t.g,J(e),Tt(t,H,q)):(n=At(e),Tt(t.g,n.i,n.g))))}function Cn(t,e,n){null!=(e=ce(e))&&null!=e&&(Lt(t,n,0),xt(t.g,e))}function Mn(t,e,n){null!=(e=null==e||"boolean"==typeof e?e:"number"==typeof e?!!e:void 0)&&(Lt(t,n,0),t.g.g.push(e?1:0))}function Gn(t,e,n){null!=(e=pe(e))&&jt(t,n,c(e))}function Dn(t,e,n,r,i){null!=(e=e instanceof on?e.l:Array.isArray(e)?_e(e,r[0],r[1]):void 0)&&(n=Bt(t,n),i(e,t),Ft(t,n))}function zn(t,e,n){null!=(e=null==e||"string"==typeof e||L(e)||e instanceof C?e:void 0)&&jt(t,n,z(e).buffer)}var $n,Wn=kn((function(t,e,n){return 5===t.i&&(Vn(e,n,ot(t.g)),!0)}),(function(t,e,n){null!=(e=oe(e))&&(Lt(t,n,5),t=t.g,K(e),Pt(t))})),Rn=Un((function(t,e,n){return(5===t.i||2===t.i)&&(e=ke(e,Dt(e),n,2,!1),2==t.i?yt(t,ot,e):e.push(ot(t.g)),!0)}),(function(t,e,n){if(null!=(e=un(oe,e))&&e.length){Lt(t,n,2),It(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,K(e[r]),Pt(n)}})),Hn=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,nt(t.g,X)),!0)}),Nn),qn=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,0===(t=nt(t.g,X))?void 0:t),!0)}),Nn),Jn=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,nt(t.g,Y)),!0)}),(function(t,e,n){t:if(null!=e){if(ue(e)){if("string"==typeof e){var r=Math.trunc(Number(e));Number.isSafeInteger(r)&&0<=r?e=String(r):(-1!==(r=e.indexOf("."))&&(e=e.substring(0,r)),le(e)||(tt(e),e=Q(H,q)));break t}if("number"==typeof e){e=0<=(e=Math.trunc(e))&&Number.isSafeInteger(e)?e:function(t){if(0>t){J(t);const e=Q(H,q);return t=Number(e),Number.isSafeInteger(t)?t:e}return le(String(t))?t:(J(t),Y(H,q))}(e);break t}}e=void 0}null!=e&&("string"==typeof e&&bt(e),null!=e&&(Lt(t,n,0),"number"==typeof e?(t=t.g,J(e),Tt(t,H,q)):(n=bt(e),Tt(t.g,n.i,n.g))))})),Kn=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,it(t.g)),!0)}),Cn),Yn=Un((function(t,e,n){return(0===t.i||2===t.i)&&(e=ke(e,Dt(e),n,2,!1),2==t.i?yt(t,it,e):e.push(it(t.g)),!0)}),(function(t,e,n){if(null!=(e=un(ce,e))&&e.length){n=Bt(t,n);for(let n=0;n<e.length;n++)xt(t.g,e[n]);Ft(t,n)}})),Xn=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,0===(t=it(t.g))?void 0:t),!0)}),Cn),Qn=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,rt(t.g)),!0)}),Mn),Zn=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,!1===(t=rt(t.g))?void 0:t),!0)}),Mn),tr=Un((function(t,e,n){return 2===t.i&&(De(e,n,ze,t=pt(t)),!0)}),(function(t,e,n){if(null!=(e=un(pe,e)))for(let s=0;s<e.length;s++){var r=t,i=n,o=e[s];null!=o&&jt(r,i,c(o))}})),er=kn((function(t,e,n){return 2===t.i&&(Vn(e,n,""===(t=pt(t))?void 0:t),!0)}),Gn),nr=kn((function(t,e,n){return 2===t.i&&(Vn(e,n,pt(t)),!0)}),Gn),rr=new Ut((function(t,e,n,r,i){return 2===t.i&&(gt(t,Re(e,r,n,!0),i),!0)}),Dn,!1,!0),ir=new Ut((function(t,e,n,r,i){return 2===t.i&&(gt(t,Re(e,r,n),i),!0)}),Dn,!1,!0);$n=new Ut((function(t,e,n,r,i){if(2!==t.i)return!1;r=_e(void 0,r[0],r[1]);let o=Dt(e);te(o);let s=ke(e,o,n,3);return o=Dt(e),4&Gt(s)&&(s=Vt(s),zt(s,-2079&(1|Gt(s))),je(e,o,n,s)),s.push(r),gt(t,r,i),!0}),(function(t,e,n,r,i){if(Array.isArray(e))for(let o=0;o<e.length;o++)Dn(t,e[o],n,r,i)}),!0,!0);var or=new Ut((function(t,e,n,r,i,o){if(2!==t.i)return!1;let s=Dt(e);return te(s),(o=We(e,s,o))&&n!==o&&je(e,s,o),gt(t,e=Re(e,r,n),i),!0}),Dn,!1,!0),sr=kn((function(t,e,n){return 2===t.i&&(Vn(e,n,mt(t)),!0)}),zn),ar=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,it(t.g)),!0)}),(function(t,e,n){null!=(e=ce(e))&&(e=parseInt(e,10),Lt(t,n,0),xt(t.g,e))})),ur=Un((function(t,e,n){return(0===t.i||2===t.i)&&(e=ke(e,Dt(e),n,2,!1),2==t.i?yt(t,st,e):e.push(it(t.g)),!0)}),(function(t,e,n){if(null!=(e=un(ce,e))&&e.length){n=Bt(t,n);for(let n=0;n<e.length;n++)xt(t.g,e[n]);Ft(t,n)}}));class cr{constructor(t,e){this.i=t,this.g=e,this.j=Ye,this.defaultValue=void 0}}function lr(t,e){return(n,r)=>{t:{if(vt.length){const t=vt.pop();t.o(r),at(t.g,n,r),n=t}else n=new class{constructor(t,e){if(ht.length){const n=ht.pop();at(n,t,e),t=n}else t=new class{constructor(t,e){this.i=null,this.m=!1,this.g=this.j=this.s=0,at(this,t,e)}clear(){this.i=null,this.m=!1,this.g=this.j=this.s=0,this.D=!1}}(t,e);this.g=t,this.j=this.g.g,this.i=this.m=-1,this.o(e)}o({G:t=!1}={}){this.G=t}}(n,r);try{const r=new t,o=r.l;ln(e)(o,n);var i=r;break t}finally{n.g.clear(),n.m=-1,n.i=-1,100>vt.length&&vt.push(n)}i=void 0}return i}}var hr=[0,er,kn((function(t,e,n){return 2===t.i&&(Vn(e,n,(t=mt(t))===V()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof on){const r=e.N;return void(r&&(e=r(e),null!=e&&jt(t,n,z(e).buffer)))}if(Array.isArray(e))return}zn(t,e,n)}))],fr=[0,nr],dr=[0,Kn,ar,Qn,-1,Yn,ar,-1],gr=[0,Qn,-1],pr=class extends on{constructor(){super()}};pr.v=[6];var mr=[0,Qn,nr,Qn,ar,-1,ur,nr,-1,gr,ar],yr=[0,nr,-2],vr=class extends on{constructor(){super()}},br=[0],wr=[0,Kn,Qn,-3],_r=class extends on{constructor(t){super(t,2)}},Ar={},Sr=[-2,Ar,Qn];Ar[336783863]=[0,nr,Qn,-1,Kn,[0,[1,2,3,4,5],or,br,or,mr,or,yr,or,wr,or,dr],fr];var Er=[0,er,Zn],Tr=[0,qn,-1,Zn,-3,qn,Yn,er,Xn,qn,-1,Zn,Xn,Zn,-2,er],Ir=[-1,{}],xr=[0,nr,1,Ir],Pr=[0,nr,tr,Ir];function Or(t){nn(t,3,"TEXT:text_in")}var Lr=class extends on{constructor(t){super(t,500)}o(t){return Ye(this,0,7,t)}};Lr.v=[3,4,5,6,8,13,17,1005];var Br=[-500,er,-1,tr,-3,Sr,$n,hr,Xn,-1,xr,Pr,$n,Er,er,Tr,Xn,tr,987,tr],Fr=[0,er,-1,Ir],jr=[-500,nr,-1,[-1,{}],998,nr],kr=[-500,nr,tr,-1,[-2,{},Qn],997,tr,-1],Ur=[-500,nr,tr,Ir,998,tr];function Vr(t){nn(t,10,"text_in")}var Nr,Cr=class extends on{constructor(){super(void 0,500)}o(t){return Ye(this,0,1001,t)}};Cr.v=[1,6,7,9,10,15,16,17,14,1002],Cr.prototype.g=(Nr=[-500,$n,Br,4,$n,jr,$n,kr,Xn,$n,Ur,tr,Xn,xr,Pr,$n,Fr,tr,-2,Tr,er,-1,Zn,979,Ir,$n,hr],function(){const t=new class{constructor(){this.j=[],this.i=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};jn(this.l,t,In(Nr)),Ot(t,t.g.end());const e=new Uint8Array(t.i),n=t.j,r=n.length;let i=0;for(let t=0;t<r;t++){const r=n[t];e.set(r,i),i+=r.length}return t.j=[e],e});var Mr=class extends on{constructor(t){super(t)}},Gr=[0,Kn,Wn,nr,-1],Dr=class extends on{constructor(t){super(t)}g(){return Ke(this,Mr)}};Dr.v=[1];var zr=class extends on{constructor(t){super(t)}},$r=[0,1,Kn,nr,[0,$n,Gr]],Wr=class extends on{constructor(t){super(t)}};Wr.v=[1];var Rr=lr(Wr,[0,$n,$r,Hn]),Hr=class extends on{constructor(t){super(t)}};Hr.v=[1];var qr=class extends on{constructor(t){super(t)}I(){const t=Ue(this);return null==t?V():t}},Jr=class extends on{constructor(t){super(t)}},Kr=[1,2],Yr=[0,Kr,or,[0,Rn],or,[0,sr],Kn,nr],Xr=class extends on{constructor(t){super(t)}};Xr.v=[1];var Qr=lr(Xr,[0,$n,Yr,Hn]),Zr=class extends on{constructor(t){super(t)}};Zr.v=[4,5];var ti=class extends on{constructor(t){super(t)}},ei=[0,Qn,-1],ni=class extends on{constructor(t){super(t)}},ri=[1,2,3,4,5],ii=class extends on{constructor(t){super(t)}g(){return null!=Ue(this)}i(){return null!=pe(Le(this,2))}},oi=class extends on{constructor(t){super(t)}},si=[0,[0,sr,nr,[0,Kn,Hn,-1],[0,Jn,Hn]],Qn,[0,ri,or,wr,or,mr,or,dr,or,br,or,yr],ar],ai=class extends on{constructor(t){super(t)}},ui=new cr(462704549,ai);Ar[462704549]=[0,si,[0,nr,Kn,Wn,tr,-1]];var ci=class extends on{constructor(t){super(t)}},li=new cr(477589892,ci);function hi(t,e){if(e=e?Ie(e):new Zr,void 0!==t.displayNamesLocale?Fe(e,1,ge(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Fe(e,1),void 0!==t.maxResults){var n=t.maxResults;if(null!=n){if("number"!=typeof n)throw ie();if(!Number.isFinite(n))throw ie();n|=0}Fe(e,2,n)}else"maxResults"in t&&Fe(e,2);if(void 0!==t.scoreThreshold){if(null!=(n=t.scoreThreshold)&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);Fe(e,3,n)}else"scoreThreshold"in t&&Fe(e,3);return void 0!==t.categoryAllowlist?Me(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&Fe(e,4),void 0!==t.categoryDenylist?Me(e,5,t.categoryDenylist):"categoryDenylist"in t&&Fe(e,5),e}function fi(t){const e={classifications:Ke(t,zr).map((t=>function(t,e=-1,n=""){return{categories:t.map((t=>{var e=en(ce(Le(t,1)))??-1;const n=t.l;let r=Dt(n);const i=Be(n,r,2),o=oe(i);return null!=o&&o!==i&&je(n,r,2,o),{index:e,score:o??0??0,categoryName:pe(Le(t,3))??""??"",displayName:pe(Le(t,4))??""??""}})),headIndex:e,headName:n}}(qe(t,Dr,4)?.g()??[],en(ce(Le(t,2))),pe(Le(t,3))??"")))};return null!=tn(t)&&(e.timestampMs=en(tn(t))),e}function di(t){return Array.from(t,(t=>127<t?t-256:t))}function gi(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,r=0,i=0;for(let o=0;o<t.length;o++)n+=t[o]*e[o],r+=t[o]*t[o],i+=e[o]*e[o];if(0>=r||0>=i)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*i)}let pi;Ar[477589892]=[0,si,ei];const mi=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function yi(){if(void 0===pi)try{await WebAssembly.instantiate(mi),pi=!0}catch{pi=!1}return pi}async function vi(t,e=""){const n=await yi()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var bi=class{};async function wi(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),!1),e.addEventListener("error",(t=>{n(t)}),!1),document.body.appendChild(e)}))}importScripts(t.toString())}bi.forVisionTasks=function(t){return vi("vision",t)},bi.forTextTasks=function(t){return vi("text",t)},bi.forAudioTasks=function(t){return vi("audio",t)},bi.isSimdSupported=function(){return yi()};function _i(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.h.stringToNewUTF8(e)),t.h._free(e)}function Ai(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.h.stringToNewUTF8(e[n]);e=t.h._malloc(4*r.length),t.h.HEAPU32.set(r,e>>2),n(e);for(const e of r)t.h._free(e);t.h._free(e)}function Si(t,e,n){t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=n}function Ei(t,e,n){let r=[];t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=(t,e,i)=>{e?(n(r,i),r=[]):r.push(t)}}const Ti=function(t){return class extends t{M(){this.h._registerModelResourcesGraphService()}}}(class{constructor(t,e){this.j=!0,this.h=t,this.g=null,this.i=0,this.m="function"==typeof this.h._addIntToInputStream,void 0!==e?this.h.canvas=e:((t="undefined"==typeof OffscreenCanvas)||(t=(t=navigator.userAgent).includes("Safari")&&!t.includes("Chrome")),t?(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.h.canvas=document.createElement("canvas")):this.h.canvas=new OffscreenCanvas(1,1))}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,e){const n=t.length,r=this.h._malloc(n);this.h.HEAPU8.set(t,r),e?this.h._changeBinaryGraph(n,r):this.h._changeTextGraph(n,r),this.h._free(r)}configureAudio(t,e,n,r,i){this.h._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),_i(this,r||"input_audio",(r=>{_i(this,i=i||"audio_header",(i=>{this.h._configureAudio(r,i,t,e,n)}))}))}setAutoResizeCanvas(t){this.j=t}setAutoRenderToScreen(t){this.h._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.h.gpuOriginForWebTexturesIsBottomLeft=t}attachErrorListener(t){this.h.errorListener=t}attachEmptyPacketListener(t,e){this.h.emptyPacketListeners=this.h.emptyPacketListeners||{},this.h.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,r,i){const o=4*t.length;this.i!==o&&(this.g&&this.h._free(this.g),this.g=this.h._malloc(o),this.i=o),this.h.HEAPF32.set(t,this.g/4),_i(this,r,(t=>{this.h._addAudioToInputStream(this.g,e,n,t,i)}))}addGpuBufferToStream(t,e,n){_i(this,e,(e=>{if(!this.h.canvas)throw Error("No OpenGL canvas configured.");e?this.h._bindTextureToStream(e):this.h._bindTextureToCanvas();const r=this.h.canvas.getContext("webgl2")||this.h.canvas.getContext("webgl");if(!r)throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");this.h.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),this.h.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);const[i,o]=void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height];!this.j||i===this.h.canvas.width&&o===this.h.canvas.height||(this.h.canvas.width=i,this.h.canvas.height=o);const[s,a]=[i,o];this.h._addBoundTextureToStream(e,s,a,n)}))}addBoolToStream(t,e,n){_i(this,e,(e=>{this.h._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){_i(this,e,(e=>{this.h._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){_i(this,e,(e=>{this.h._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){_i(this,e,(e=>{this.h._addIntToInputStream(t,e,n)}))}addStringToStream(t,e,n){_i(this,e,(e=>{_i(this,t,(t=>{this.h._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){_i(this,e,(e=>{Ai(this,Object.keys(t),(r=>{Ai(this,Object.values(t),(i=>{this.h._addFlatHashMapToInputStream(r,i,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){_i(this,n,(n=>{_i(this,e,(e=>{const i=this.h._malloc(t.length);this.h.HEAPU8.set(t,i),this.h._addProtoToInputStream(i,t.length,e,n,r),this.h._free(i)}))}))}addEmptyPacketToStream(t,e){_i(this,t,(t=>{this.h._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){_i(this,e,(e=>{const r=this.h._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.h._addBoolVectorEntry(r,e);this.h._addBoolVectorToInputStream(r,e,n)}))}addDoubleVectorToStream(t,e,n){_i(this,e,(e=>{const r=this.h._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.h._addDoubleVectorEntry(r,e);this.h._addDoubleVectorToInputStream(r,e,n)}))}addFloatVectorToStream(t,e,n){_i(this,e,(e=>{const r=this.h._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.h._addFloatVectorEntry(r,e);this.h._addFloatVectorToInputStream(r,e,n)}))}addIntVectorToStream(t,e,n){_i(this,e,(e=>{const r=this.h._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.h._addIntVectorEntry(r,e);this.h._addIntVectorToInputStream(r,e,n)}))}addStringVectorToStream(t,e,n){_i(this,e,(e=>{const r=this.h._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(const e of t)_i(this,e,(t=>{this.h._addStringVectorEntry(r,t)}));this.h._addStringVectorToInputStream(r,e,n)}))}addBoolToInputSidePacket(t,e){_i(this,e,(e=>{this.h._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){_i(this,e,(e=>{this.h._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){_i(this,e,(e=>{this.h._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){_i(this,e,(e=>{this.h._addIntToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){_i(this,e,(e=>{_i(this,t,(t=>{this.h._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){_i(this,n,(n=>{_i(this,e,(e=>{const r=this.h._malloc(t.length);this.h.HEAPU8.set(t,r),this.h._addProtoToInputSidePacket(r,t.length,e,n),this.h._free(r)}))}))}addBoolVectorToInputSidePacket(t,e){_i(this,e,(e=>{const n=this.h._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.h._addBoolVectorEntry(n,e);this.h._addBoolVectorToInputSidePacket(n,e)}))}addDoubleVectorToInputSidePacket(t,e){_i(this,e,(e=>{const n=this.h._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.h._addDoubleVectorEntry(n,e);this.h._addDoubleVectorToInputSidePacket(n,e)}))}addFloatVectorToInputSidePacket(t,e){_i(this,e,(e=>{const n=this.h._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.h._addFloatVectorEntry(n,e);this.h._addFloatVectorToInputSidePacket(n,e)}))}addIntVectorToInputSidePacket(t,e){_i(this,e,(e=>{const n=this.h._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.h._addIntVectorEntry(n,e);this.h._addIntVectorToInputSidePacket(n,e)}))}addStringVectorToInputSidePacket(t,e){_i(this,e,(e=>{const n=this.h._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(const e of t)_i(this,e,(t=>{this.h._addStringVectorEntry(n,t)}));this.h._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){Si(this,t,e),_i(this,t,(t=>{this.h._attachBoolListener(t)}))}attachBoolVectorListener(t,e){Ei(this,t,e),_i(this,t,(t=>{this.h._attachBoolVectorListener(t)}))}attachIntListener(t,e){Si(this,t,e),_i(this,t,(t=>{this.h._attachIntListener(t)}))}attachIntVectorListener(t,e){Ei(this,t,e),_i(this,t,(t=>{this.h._attachIntVectorListener(t)}))}attachDoubleListener(t,e){Si(this,t,e),_i(this,t,(t=>{this.h._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){Ei(this,t,e),_i(this,t,(t=>{this.h._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){Si(this,t,e),_i(this,t,(t=>{this.h._attachFloatListener(t)}))}attachFloatVectorListener(t,e){Ei(this,t,e),_i(this,t,(t=>{this.h._attachFloatVectorListener(t)}))}attachStringListener(t,e){Si(this,t,e),_i(this,t,(t=>{this.h._attachStringListener(t)}))}attachStringVectorListener(t,e){Ei(this,t,e),_i(this,t,(t=>{this.h._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){Si(this,t,e),_i(this,t,(t=>{this.h._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){Ei(this,t,e),_i(this,t,(t=>{this.h._attachProtoVectorListener(t,n||!1)}))}attachAudioListener(t,e,n){this.h._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Si(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),_i(this,t,(t=>{this.h._attachAudioListener(t,n||!1)}))}finishProcessing(){this.h._waitUntilIdle()}closeGraph(){this.h._closeGraph(),this.h.simpleListeners=void 0,this.h.emptyPacketListeners=void 0}});var Ii=class extends Ti{};async function xi(t,e,n){return t=await(async(t,e,n,r)=>{if(e&&await wi(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await wi(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&r&&((e=self.Module).locateFile=r.locateFile,r.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=r.mainScriptUrlOrBlob)),r=await self.ModuleFactory(self.Module||r),self.ModuleFactory=self.Module=void 0,new t(r,null)})(t,e.wasmLoaderPath,e.assetLoaderPath,{locateFile:t=>t.endsWith(".wasm")?e.wasmBinaryPath.toString():e.assetBinaryPath&&t.endsWith(".data")?e.assetBinaryPath.toString():t}),await t.o(n),t}async function Pi(t,e,n){return xi(t,e,n)}function Oi(t,e){const n=qe(t.baseOptions,ii,1)||new ii;"string"==typeof e?(Fe(n,2,ge(e)),Fe(n,1)):e instanceof Uint8Array&&(Fe(n,1,Xt(e,!1,!1)),Fe(n,2)),Ye(t.baseOptions,0,1,n)}function Li(t,e){const n=e.baseOptions||{};if(e.baseOptions?.modelAssetBuffer&&e.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(qe(t.baseOptions,ii,1)?.g()||qe(t.baseOptions,ii,1)?.i()||e.baseOptions?.modelAssetBuffer||e.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");return function(t,e){let n=qe(t.baseOptions,ni,3);if(!n){var r=n=new ni;Xe(r,4,new vr)}"delegate"in e&&("GPU"===e.delegate?Xe(e=n,2,r=new pr):Xe(e=n,4,r=new vr)),Ye(t.baseOptions,0,3,n)}(t,n),n.modelAssetPath?fetch(n.modelAssetPath.toString()).then((t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${n.modelAssetPath} (${t.status})`)})).then((e=>{try{t.g.h.FS_unlink("/model.dat")}catch{}t.g.h.FS_createDataFile("/","model.dat",new Uint8Array(e),!0,!1,!1),Oi(t,"/model.dat"),t.s()})):(Oi(t,n.modelAssetBuffer),t.s(),Promise.resolve())}function Bi(t){try{const e=t.m.length;if(1===e)throw Error(t.m[0].message);if(1<e)throw Error("Encountered multiple errors: "+t.m.map((t=>t.message)).join(", "))}finally{t.m=[]}}function Fi(t,e){t.j=Math.max(t.j,e)}var ji=class{constructor(t){this.g=t,this.m=[],this.j=0,this.g.setAutoRenderToScreen(!1)}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.m.push(Error(e))})),this.g.M(),this.g.setGraph(t,e),Bi(this)}finishProcessing(){this.g.finishProcessing(),Bi(this)}close(){this.g.closeGraph()}};ji.prototype.close=ji.prototype.close;var ki=class extends ji{constructor(t,e){super(new Ii(t,e)),this.u={languages:[]},Ye(t=this.i=new ai,0,1,e=new oi)}o(t){return Ye(this.i,0,2,hi(t,qe(this.i,Zr,2))),Li(this,t)}get baseOptions(){return qe(this.i,oi,1)}set baseOptions(t){Ye(this.i,0,1,t)}K(t){return this.u={languages:[]},this.g.addStringToStream(t,"text_in",this.j+1),this.finishProcessing(),this.u}s(){var t=new Cr;Vr(t),nn(t,15,"classifications_out");const e=new _r;rn(e,ui,this.i);const n=new Lr;Ge(n,ge("mediapipe.tasks.text.text_classifier.TextClassifierGraph")),Or(n),nn(n,4,"CLASSIFICATIONS:classifications_out"),n.o(e),Ze(t,n),this.g.attachProtoListener("classifications_out",((t,e)=>{if(({classifications:t}=fi(Rr(t))),1!==t.length)throw Error(`Expected 1 classification head, got ${t.length}`);this.u.languages=t[0].categories.map((t=>({languageCode:t.categoryName,probability:t.score}))),Fi(this,e)})),this.g.attachEmptyPacketListener("classifications_out",(t=>{Fi(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ki.prototype.detect=ki.prototype.K,ki.prototype.setOptions=ki.prototype.o,ki.createFromModelPath=function(t,e){return Pi(ki,t,{baseOptions:{modelAssetPath:e}})},ki.createFromModelBuffer=function(t,e){return Pi(ki,t,{baseOptions:{modelAssetBuffer:e}})},ki.createFromOptions=function(t,e){return Pi(ki,t,e)};var Ui=class extends ji{constructor(t,e){super(new Ii(t,e)),this.u={classifications:[]},Ye(t=this.i=new ai,0,1,e=new oi)}o(t){return Ye(this.i,0,2,hi(t,qe(this.i,Zr,2))),Li(this,t)}get baseOptions(){return qe(this.i,oi,1)}set baseOptions(t){Ye(this.i,0,1,t)}J(t){return this.u={classifications:[]},this.g.addStringToStream(t,"text_in",this.j+1),this.finishProcessing(),this.u}s(){var t=new Cr;Vr(t),nn(t,15,"classifications_out");const e=new _r;rn(e,ui,this.i);const n=new Lr;Ge(n,ge("mediapipe.tasks.text.text_classifier.TextClassifierGraph")),Or(n),nn(n,4,"CLASSIFICATIONS:classifications_out"),n.o(e),Ze(t,n),this.g.attachProtoListener("classifications_out",((t,e)=>{this.u=fi(Rr(t)),Fi(this,e)})),this.g.attachEmptyPacketListener("classifications_out",(t=>{Fi(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ui.prototype.classify=Ui.prototype.J,Ui.prototype.setOptions=Ui.prototype.o,Ui.createFromModelPath=function(t,e){return Pi(Ui,t,{baseOptions:{modelAssetPath:e}})},Ui.createFromModelBuffer=function(t,e){return Pi(Ui,t,{baseOptions:{modelAssetBuffer:e}})},Ui.createFromOptions=function(t,e){return Pi(Ui,t,e)};var Vi=class extends ji{constructor(t,e){super(new Ii(t,e)),this.u={embeddings:[]},Ye(t=this.i=new ci,0,1,e=new oi)}o(t){var e=this.i,n=qe(this.i,ti,2);return n=n?Ie(n):new ti,void 0!==t.l2Normalize?Fe(n,1,se(t.l2Normalize)):"l2Normalize"in t&&Fe(n,1),void 0!==t.quantize?Fe(n,2,se(t.quantize)):"quantize"in t&&Fe(n,2),Ye(e,0,2,n),Li(this,t)}get baseOptions(){return qe(this.i,oi,1)}set baseOptions(t){Ye(this.i,0,1,t)}L(t){return this.g.addStringToStream(t,"text_in",this.j+1),this.finishProcessing(),this.u}s(){var t=new Cr;Vr(t),nn(t,15,"embeddings_out");const e=new _r;rn(e,li,this.i);const n=new Lr;Ge(n,ge("mediapipe.tasks.text.text_embedder.TextEmbedderGraph")),Or(n),nn(n,4,"EMBEDDINGS:embeddings_out"),n.o(e),Ze(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=Qr(t),this.u=function(t){return{embeddings:Ke(t,Jr).map((t=>{const e={headIndex:en(ce(Le(t,3)))??-1,headName:pe(Le(t,4))??""??""};if(void 0!==He(t,Hr,$e(t,1))){var n=void 0;t=qe(t,Hr,$e(t,1)).l;let s=Dt(t);const a=2&s?1:2;n=!!n;let u=Ve(t,s);var r=Gt(u);if(!(4&r)){(4&r||Object.isFrozen(u))&&(u=Vt(u),r=Qe(r,s,n),s=je(t,s,1,u));for(var i=0,o=0;i<u.length;i++){const t=oe(u[i]);null!=t&&(u[o++]=t)}o<i&&(u.length=o),r=Mt(r=Ne(r,s,n),20,!0),r=Mt(r,4096,!1),r=Mt(r,8192,!1),zt(u,r),2&r&&Object.freeze(u)}Ce(r)||(i=r,(o=1===a)?r=Mt(r,2,!0):n||(r=Mt(r,32,!1)),r!==i&&zt(u,r),o&&Object.freeze(u)),2===a&&Ce(r)&&(u=Vt(u),r=Qe(r,s,n),zt(u,r),je(t,s,1,u)),e.floatEmbedding=u.slice()}else n=new Uint8Array(0),e.quantizedEmbedding=qe(t,qr,$e(t,2))?.I()?.i()??n;return e})),timestampMs:en(tn(t))}}(t),Fi(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{Fi(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Vi.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=gi(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=gi(di(t.quantizedEmbedding),di(e.quantizedEmbedding))}return t},Vi.prototype.embed=Vi.prototype.L,Vi.prototype.setOptions=Vi.prototype.o,Vi.createFromModelPath=function(t,e){return Pi(Vi,t,{baseOptions:{modelAssetPath:e}})},Vi.createFromModelBuffer=function(t,e){return Pi(Vi,t,{baseOptions:{modelAssetBuffer:e}})},Vi.createFromOptions=function(t,e){return Pi(Vi,t,e)},exports.FilesetResolver=bi,exports.LanguageDetector=ki,exports.TaskRunner=ji,exports.TextClassifier=Ui,exports.TextEmbedder=Vi;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t="undefined"!=typeof self?self:{};function e(e){t:{for(var n=["CLOSURE_FLAGS"],r=t,i=0;i<n.length;i++)if(null==(r=r[n[i]])){n=null;break t}n=r}return null!=(e=n&&n[e])&&e}function n(){throw Error("Invalid UTF8")}function r(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let i,o;const s="undefined"!=typeof TextDecoder;let a;const u="undefined"!=typeof TextEncoder;function c(t){if(u)t=(a||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(128>e)r[n++]=e;else{if(2048>e)r[n++]=e>>6|192;else{if(55296<=e&&57343>=e){if(56319>=e&&i<t.length){const o=t.charCodeAt(++i);if(56320<=o&&57343>=o){e=1024*(e-55296)+o-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}i--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}var l,h=e(610401301),f=e(188588736);const d=t.navigator;function g(t){return!!h&&(!!l&&l.brands.some((({brand:e})=>e&&-1!=e.indexOf(t))))}function p(e){var n;return(n=t.navigator)&&(n=n.userAgent)||(n=""),-1!=n.indexOf(e)}function m(){return!!h&&(!!l&&0<l.brands.length)}function y(){return m()?g("Chromium"):(p("Chrome")||p("CriOS"))&&!(!m()&&p("Edge"))||p("Silk")}l=d&&d.userAgentData||null;var v=!m()&&(p("Trident")||p("MSIE"));!p("Android")||y(),y(),p("Safari")&&(y()||!m()&&p("Coast")||!m()&&p("Opera")||!m()&&p("Edge")||(m()?g("Microsoft Edge"):p("Edg/"))||m()&&g("Opera"));var b={},w=null;function _(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);var r=new Uint8Array(n),i=0;return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=w[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}A();for(var r=0;;){var i=n(-1),o=n(0),s=n(64),a=n(64);if(64===a&&-1===i)break;e(i<<2|o>>4),64!=s&&(e(o<<4&240|s>>2),64!=a&&e(s<<6&192|a))}}(t,(function(t){r[i++]=t})),i!==n?r.subarray(0,i):r}function A(){if(!w){w={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=t.concat(e[n].split(""));b[n]=r;for(var i=0;i<r.length;i++){var o=r[i];void 0===w[o]&&(w[o]=i)}}}}var S="undefined"!=typeof Uint8Array,E=!v&&"function"==typeof btoa;function T(t){if(!E){var e;void 0===e&&(e=0),A(),e=b[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let u=0,c=0;for(;u<t.length-2;u+=3){var i=t[u],o=t[u+1],s=t[u+2],a=e[i>>2];i=e[(3&i)<<4|o>>4],o=e[(15&o)<<2|s>>6],s=e[63&s],n[c++]=a+i+o+s}switch(a=0,s=r,t.length-u){case 2:s=e[(15&(a=t[u+1]))<<2]||r;case 1:t=t[u],n[c]=e[t>>2]+e[(3&t)<<4|a>>4]+s+r}return n.join("")}for(e="",n=0,r=t.length-10240;n<r;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const I=/[-_.]/g,x={"-":"+",_:"/",".":"="};function P(t){return x[t]||""}function O(t){if(!E)return _(t);I.test(t)&&(t=t.replace(I,P)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function L(t){return S&&null!=t&&t instanceof Uint8Array}let B;function F(){return B||=new Uint8Array(0)}var j={};let k;function U(t){if(t!==j)throw Error("illegal external caller")}function V(){return k||=new C(null,j)}function N(t){U(j);var e=t.g;return null==(e=null==e||L(e)?e:"string"==typeof e?O(e):null)?e:t.g=e}var C=class{constructor(t,e){if(U(e),this.g=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}i(){const t=N(this);return t?new Uint8Array(t):F()}};function M(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function G(){return Error("Failed to read varint, encoding is invalid.")}function D(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function z(t){if("string"==typeof t)return{buffer:O(t),A:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),A:!1};if(t.constructor===Uint8Array)return{buffer:t,A:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),A:!1};if(t.constructor===C)return{buffer:N(t)||F(),A:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),A:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}function $(){return"function"==typeof BigInt}const W="function"==typeof Uint8Array.prototype.slice;let R,H=0,q=0;function J(t){const e=0>t;let n=(t=Math.abs(t))>>>0;if(t=Math.floor((t-n)/4294967296),e){const[e,r]=et(n,t);t=r,n=e}H=n>>>0,q=t>>>0}function K(t){const e=R||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),q=0,H=e.getUint32(0,!0)}function Y(t,e){return 4294967296*e+(t>>>0)}function X(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),t=Y(t,e),n?-t:t}function Q(t,e){if(t>>>=0,2097151>=(e>>>=0))var n=""+(4294967296*e+t);else $()?n=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(n=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),n+=8147497*e,e*=2,1e7<=t&&(n+=Math.floor(t/1e7),t%=1e7),1e7<=n&&(e+=Math.floor(n/1e7),n%=1e7),n=e+Z(n)+Z(t));return n}function Z(t){return t=String(t),"0000000".slice(t.length)+t}function tt(t){if(16>t.length)J(Number(t));else if($())t=BigInt(t),H=Number(t&BigInt(4294967295))>>>0,q=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);q=H=0;const n=t.length;for(let r=e,i=(n-e)%6+e;i<=n;r=i,i+=6){const e=Number(t.slice(r,i));q*=1e6,H=1e6*H+e,4294967296<=H&&(q+=Math.trunc(H/4294967296),q>>>=0,H>>>=0)}if(e){const[t,e]=et(H,q);H=t,q=e}}}function et(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function nt(t,e){let n,r=0,i=0,o=0;const s=t.i;let a=t.g;do{n=s[a++],r|=(127&n)<<o,o+=7}while(32>o&&128&n);for(32<o&&(i|=(127&n)>>4),o=3;32>o&&128&n;o+=7)n=s[a++],i|=(127&n)<<o;if(ut(t,a),128>n)return e(r>>>0,i>>>0);throw G()}function rt(t){let e=0,n=t.g;const r=n+10,i=t.i;for(;n<r;){const r=i[n++];if(e|=r,0==(128&r))return ut(t,n),!!(127&e)}throw G()}function it(t){const e=t.i;let n=t.g,r=e[n++],i=127&r;if(128&r&&(r=e[n++],i|=(127&r)<<7,128&r&&(r=e[n++],i|=(127&r)<<14,128&r&&(r=e[n++],i|=(127&r)<<21,128&r&&(r=e[n++],i|=r<<28,128&r&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw G();return ut(t,n),i}function ot(t){var e=t.i;const n=t.g;var r=e[n],i=e[n+1];const o=e[n+2];return e=e[n+3],ut(t,t.g+4),t=2*((i=(r<<0|i<<8|o<<16|e<<24)>>>0)>>31)+1,r=i>>>23&255,i&=8388607,255==r?i?NaN:1/0*t:0==r?t*Math.pow(2,-149)*i:t*Math.pow(2,r-150)*(i+Math.pow(2,23))}function st(t){return it(t)}function at(t,e,{D:n=!1}={}){t.D=n,e&&(e=z(e),t.i=e.buffer,t.m=e.A,t.s=0,t.j=t.i.length,t.g=t.s)}function ut(t,e){if(t.g=e,e>t.j)throw D(t.j,e)}function ct(t,e){if(0>e)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,r=n+e;if(r>t.j)throw D(e,t.j-n);return t.g=r,n}function lt(t,e){if(0==e)return V();var n=ct(t,e);return t.D&&t.m?n=t.i.subarray(n,n+e):(t=t.i,n=n===(e=n+e)?F():W?t.slice(n,e):new Uint8Array(t.subarray(n,e))),0==n.length?V():new C(n,j)}var ht=[];function ft(t){var e=t.g;if(e.g==e.j)return!1;t.j=t.g.g;var n=it(t.g)>>>0;if(e=n>>>3,!(0<=(n&=7)&&5>=n))throw M(n,t.j);if(1>e)throw Error(`Invalid field number: ${e} (at position ${t.j})`);return t.m=e,t.i=n,!0}function dt(t){switch(t.i){case 0:0!=t.i?dt(t):rt(t.g);break;case 1:ut(t=t.g,t.g+8);break;case 2:if(2!=t.i)dt(t);else{var e=it(t.g)>>>0;ut(t=t.g,t.g+e)}break;case 5:ut(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!ft(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.i){if(t.m!=e)throw Error("Unmatched end-group tag");break}dt(t)}break;default:throw M(t.i,t.j)}}function gt(t,e,n){const r=t.g.j,i=it(t.g)>>>0,o=t.g.g+i;let s=o-r;if(0>=s&&(t.g.j=o,n(e,t,void 0,void 0,void 0),s=o-t.g.g),s)throw Error(`Message parsing ended unexpectedly. Expected to read ${i} bytes, instead read ${i-s} bytes, either the data ended unexpectedly or the message misreported its own length`);t.g.g=o,t.g.j=r}function pt(t){var e=it(t.g)>>>0,a=ct(t=t.g,e);if(t=t.i,s){var u,c=t;(u=o)||(u=o=new TextDecoder("utf-8",{fatal:!0})),e=a+e,c=0===a&&e===c.length?c:c.subarray(a,e);try{var l=u.decode(c)}catch(t){if(void 0===i){try{u.decode(new Uint8Array([128]))}catch(t){}try{u.decode(new Uint8Array([97])),i=!0}catch(t){i=!1}}throw!i&&(o=void 0),t}}else{e=(l=a)+e,a=[];let i,o=null;for(;l<e;){var h=t[l++];128>h?a.push(h):224>h?l>=e?n():(i=t[l++],194>h||128!=(192&i)?(l--,n()):a.push((31&h)<<6|63&i)):240>h?l>=e-1?n():(i=t[l++],128!=(192&i)||224===h&&160>i||237===h&&160<=i||128!=(192&(u=t[l++]))?(l--,n()):a.push((15&h)<<12|(63&i)<<6|63&u)):244>=h?l>=e-2?n():(i=t[l++],128!=(192&i)||0!=i-144+(h<<28)>>30||128!=(192&(u=t[l++]))||128!=(192&(c=t[l++]))?(l--,n()):(h=(7&h)<<18|(63&i)<<12|(63&u)<<6|63&c,h-=65536,a.push(55296+(h>>10&1023),56320+(1023&h)))):n(),8192<=a.length&&(o=r(o,a),a.length=0)}l=r(o,a)}return l}function mt(t){const e=it(t.g)>>>0;return lt(t.g,e)}function yt(t,e,n){var r=it(t.g)>>>0;for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var vt=[];function bt(t){return t?/^\d+$/.test(t)?(tt(t),new wt(H,q)):null:_t||=new wt(0,0)}var wt=class{constructor(t,e){this.i=t>>>0,this.g=e>>>0}};let _t;function At(t){return t?/^-?\d+$/.test(t)?(tt(t),new St(H,q)):null:Et||=new St(0,0)}var St=class{constructor(t,e){this.i=t>>>0,this.g=e>>>0}};let Et;function Tt(t,e,n){for(;0<n||127<e;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function It(t,e){for(;127<e;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function xt(t,e){if(0<=e)It(t,e);else{for(let n=0;9>n;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Pt(t){var e=H;t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function Ot(t,e){0!==e.length&&(t.j.push(e),t.i+=e.length)}function Lt(t,e,n){It(t.g,8*e+n)}function Bt(t,e){return Lt(t,e,2),e=t.g.end(),Ot(t,e),e.push(t.i),e}function Ft(t,e){var n=e.pop();for(n=t.i+t.g.length()-n;127<n;)e.push(127&n|128),n>>>=7,t.i++;e.push(n),t.i++}function jt(t,e,n){Lt(t,e,2),It(t.g,n.length),Ot(t,t.g.end()),Ot(t,n)}var kt;class Ut{constructor(t,e,n,r){this.g=t,this.i=e,this.j=n,this.H=r}}function Vt(t){return Array.prototype.slice.call(t)}var Nt=(kt="function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():void 0)?(t,e)=>{t[kt]|=e}:(t,e)=>{void 0!==t.g?t.g|=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}})},Ct=kt?(t,e)=>{t[kt]&=~e}:(t,e)=>{void 0!==t.g&&(t.g&=~e)};function Mt(t,e,n){return n?t|e:t&~e}var Gt=kt?t=>0|t[kt]:t=>0|t.g,Dt=kt?t=>t[kt]:t=>t.g,zt=kt?(t,e)=>(t[kt]=e,t):(t,e)=>(void 0!==t.g?t.g=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}}),t);function $t(t,e){zt(e,-14591&(0|t))}function Wt(t,e){zt(e,-14557&(34|t))}function Rt(t){return 0===(t=t>>14&1023)?536870912:t}var Ht,qt={},Jt={};function Kt(t){return!(!t||"object"!=typeof t||t.g!==Jt)}function Yt(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function Xt(t,e,n){if(null!=t)if("string"==typeof t)t=t?new C(t,j):V();else if(t.constructor!==C)if(L(t))t=t.length?new C(n?t:new Uint8Array(t),j):V();else{if(!e)throw Error();t=void 0}return t}function Qt(t,e,n){if(!Array.isArray(t)||t.length)return!1;const r=Gt(t);return!!(1&r)||!(!e||!(Array.isArray(e)?e.includes(n):e.has(n)))&&(zt(t,1|r),!0)}const Zt=[];function te(t){if(2&t)throw Error()}let ee,ne;function re(t,e){(e=ee?e[ee]:void 0)&&(t[ee]=Vt(e))}zt(Zt,55),Ht=Object.freeze(Zt);function ie(){const t=Error("int32");return t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity="warning",t}function oe(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function se(t){if(null!=t&&"boolean"!=typeof t){var e=typeof t;throw Error(`Expected boolean but got ${"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}: ${t}`)}return t}Object.freeze(new class{}),Object.freeze(new class{});const ae=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function ue(t){const e=typeof t;return"number"===e?Number.isFinite(t):"string"===e&&ae.test(t)}function ce(t){if(null==t)return t;if("string"==typeof t){if(!t)return;t=+t}return"number"==typeof t&&Number.isFinite(t)?0|t:void 0}function le(t){return"-"!==t[0]&&(20>t.length||20===t.length&&184467>Number(t.substring(0,6)))}function he(t){return t=Math.trunc(t),Number.isSafeInteger(t)||(J(t),t=X(H,q)),t}function fe(t){var e=Math.trunc(Number(t));if(Number.isSafeInteger(e))return String(e);if(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),!("-"===t[0]?20>t.length||20===t.length&&-922337<Number(t.substring(0,7)):19>t.length||19===t.length&&922337>Number(t.substring(0,6))))if(tt(t),t=H,2147483648&(e=q))if($())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{const[n,r]=et(t,e);t="-"+Q(n,r)}else t=Q(t,e);return t}function de(t){if("string"!=typeof t)throw Error();return t}function ge(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function pe(t){return null==t||"string"==typeof t?t:void 0}function me(t,e,n){if(null!=t&&"object"==typeof t&&t.C===qt)return t;if(Array.isArray(t)){var r=Gt(t),i=r;return 0===i&&(i|=32&n),(i|=2&n)!==r&&zt(t,i),new e(t)}}let ye,ve,be;function we(t){switch(typeof t){case"boolean":return ve||=[0,void 0,!0];case"number":return 0<t?void 0:0===t?be||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}function _e(t,e,n){if(null==t&&(t=ye),ye=void 0,null==t){var r=96;n?(t=[n],r|=512):t=[],e&&(r=-16760833&r|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error();if(2048&(r=Gt(t)))throw Error();if(64&r)return t;if(r|=64,n&&(r|=512,n!==t[0]))throw Error();t:{const i=(n=t).length;if(i){const t=i-1;if(Yt(n[t])){if(1024<=(e=t-(+!!(512&(r|=256))-1)))throw Error();r=-16760833&r|(1023&e)<<14;break t}}if(e){if(1024<(e=Math.max(e,i-(+!!(512&r)-1))))throw Error();r=-16760833&r|(1023&e)<<14}}}return zt(t,r),t}function Ae(t,e,n,r,i){if(null!=t){if(Array.isArray(t))t=Qt(t,void 0,0)?void 0:i&&2&Gt(t)?t:Se(t,e,n,void 0!==r,i);else if(Yt(t)){const o={};for(let s in t)o[s]=Ae(t[s],e,n,r,i);t=o}else t=e(t,r);return t}}function Se(t,e,n,r,i){const o=r||n?Gt(t):0;r=r?!!(32&o):void 0;const s=Vt(t);for(let t=0;t<s.length;t++)s[t]=Ae(s[t],e,n,r,i);return n&&(re(s,t),n(o,s)),s}function Ee(t){return t.C===qt?t.toJSON():function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"boolean":return t?1:0;case"object":if(t)if(Array.isArray(t)){if(Qt(t,void 0,0))return}else{if(L(t))return T(t);if(t instanceof C){const e=t.g;return null==e?"":"string"==typeof e?e:t.g=T(e)}}}return t}(t)}function Te(t,e,n=Wt){if(null!=t){if(S&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){var r=Gt(t);return 2&r?t:(e&&=0===r||!!(32&r)&&!(64&r||!(16&r)),e?zt(t,-12293&(34|r)):Se(t,Te,4&r?Wt:n,!0,!0))}return t.C===qt&&(n=t.l,t=2&(r=Dt(n))?t:xe(t,n,r,!0)),t}}function Ie(t){const e=t.l;return xe(t,e,Dt(e),!1)}function xe(t,e,n,r){return t=t.constructor,ye=e=Pe(e,n,r),e=new t(e),ye=void 0,e}function Pe(t,e,n){const r=n||2&e?Wt:$t,i=!!(32&e);return t=function(t,e,n){const r=Vt(t);var i=r.length;const o=256&e?r[i-1]:void 0;for(i+=o?-1:0,e=512&e?1:0;e<i;e++)r[e]=n(r[e]);if(o){e=r[e]={};for(const t in o)e[t]=n(o[t])}return re(r,t),r}(t,e,(t=>Te(t,i,r))),Nt(t,32|(n?2:0)),t}function Oe(t){const e=t.l,n=Dt(e);return 2&n?xe(t,e,n,!1):t}function Le(t,e){return Be(t=t.l,Dt(t),e)}function Be(t,e,n,r){if(-1===n)return null;if(n>=Rt(e)){if(256&e)return t[t.length-1][n]}else{var i=t.length;if(r&&256&e&&null!=(r=t[i-1][n]))return r;if((e=n+(+!!(512&e)-1))<i)return t[e]}}function Fe(t,e,n,r){const i=t.l;let o=Dt(i);return te(o),je(i,o,e,n,r),t}function je(t,e,n,r,i){const o=Rt(e);if(n>=o||i){let s=e;if(256&e)i=t[t.length-1];else{if(null==r)return s;i=t[o+(+!!(512&e)-1)]={},s|=256}return i[n]=r,n<o&&(t[n+(+!!(512&e)-1)]=void 0),s!==e&&zt(t,s),s}return t[n+(+!!(512&e)-1)]=r,256&e&&(n in(t=t[t.length-1])&&delete t[n]),e}function ke(t,e,n,r,i){var o=2&e;let s=Be(t,e,n,i);Array.isArray(s)||(s=Ht);const a=!(2&r);r=!(1&r);const u=!!(32&e);let c=Gt(s);return 0!==c||!u||o||a?1&c||(c|=1,zt(s,c)):(c|=33,zt(s,c)),o?(t=!1,2&c||(Nt(s,34),t=!!(4&c)),(r||t)&&Object.freeze(s)):(o=!!(2&c)||!!(2048&c),r&&o?(s=Vt(s),r=1,u&&!a&&(r|=32),zt(s,r),je(t,e,n,s,i)):a&&32&c&&!o&&Ct(s,32)),s}function Ue(t){t=t.l;let e=Dt(t);const n=Be(t,e,1),r=Xt(n,!0,!!(34&e));return null!=r&&r!==n&&je(t,e,1,r),r}function Ve(t,e){return t=Be(t,e,1),Array.isArray(t)?t:Ht}function Ne(t,e,n){return 0===t&&(t=Qe(t,e,n)),Mt(t,1,!0)}function Ce(t){return!!(2&t)&&!!(4&t)||!!(2048&t)}function Me(t,e,n){{const s=t.l;let a=Dt(s);if(te(a),null==n)je(s,a,e);else{var r,i=t=Gt(n),o=!!(2&t)||Object.isFrozen(n);if((r=!o)&&(r=!1),!(4&t))for(t=21,o&&(n=Vt(n),i=0,t=Qe(t,a,!0)),o=0;o<n.length;o++)n[o]=de(n[o]);r&&(n=Vt(n),i=0,t=Qe(t,a,!0)),t!==i&&zt(n,t),je(s,a,e,n)}}}function Ge(t,e){t=t.l;let n=Dt(t);te(n),je(t,n,2,""===e?void 0:e)}function De(t,e,n,r){const i=Dt(t);te(i),t=ke(t,i,e,2),r=n(r,!!(4&(e=Gt(t)))&&!!(4096&e)),t.push(r)}function ze(t){return t}function $e(t,e){return We(t=t.l,Dt(t),Kr)===e?e:-1}function We(t,e,n){let r=0;for(let i=0;i<n.length;i++){const o=n[i];null!=Be(t,e,o)&&(0!==r&&(e=je(t,e,r)),r=o)}return r}function Re(t,e,n,r){let i=Dt(t);te(i);const o=Be(t,i,n,r);let s;if(null!=o&&o.C===qt)return(e=Oe(o))!==o&&je(t,i,n,e,r),e.l;if(Array.isArray(o)){const t=Gt(o);s=2&t?Pe(o,t,!1):o,s=_e(s,e[0],e[1])}else s=_e(void 0,e[0],e[1]);return s!==o&&je(t,i,n,s,r),s}function He(t,e,n,r){t=t.l;let i=Dt(t);const o=Be(t,i,n,r);return(e=me(o,e,i))!==o&&null!=e&&je(t,i,n,e,r),e}function qe(t,e,n){if(null==(e=He(t,e,n,!1)))return e;t=t.l;let r=Dt(t);if(!(2&r)){const i=Oe(e);i!==e&&je(t,r,n,e=i,!1)}return e}function Je(t,e,n,r,i){var o=!!(2&e),s=o?1:2;const a=1===s;s=2===s,r=!!r,i&&=!o,o=Ve(t,e);var u=Gt(o);const c=!!(4&u);if(!c){var l,h=o,f=e;(l=!!(2&(u=Ne(u,e,r))))&&(f=Mt(f,2,!0));let t=!l,i=!0,s=0,a=0;for(;s<h.length;s++){const e=me(h[s],n,f);if(e instanceof n){if(!l){const n=!!(2&Gt(e.l));t&&=!n,i&&=n}h[a++]=e}}a<s&&(h.length=a),u=Mt(u,4,!0),u=Mt(u,16,i),u=Mt(u,8,t),zt(h,u),l&&Object.freeze(h)}if(n=!!(8&u)||a&&!o.length,i&&!n){for(Ce(u)&&(o=Vt(o),u=Qe(u,e,r),e=je(t,e,1,o)),i=o,n=u,h=0;h<i.length;h++)(u=i[h])!==(f=Oe(u))&&(i[h]=f);n=Mt(n,8,!0),n=Mt(n,16,!i.length),zt(i,n),u=n}return Ce(u)||(i=u,a?u=Mt(u,!o.length||16&u&&(!c||32&u)?2:2048,!0):r||(u=Mt(u,32,!1)),u!==i&&zt(o,u),a&&Object.freeze(o)),s&&Ce(u)&&(o=Vt(o),u=Qe(u,e,r),zt(o,u),je(t,e,1,o)),o}function Ke(t,e){t=t.l;const n=Dt(t);return Je(t,n,e,!1,!(2&n))}function Ye(t,e,n,r,i){return null==r&&(r=void 0),Fe(t,n,r,i)}function Xe(t,e,n){var r=ri;null==n&&(n=void 0),t=t.l;let i=Dt(t);te(i),(r=We(t,i,r))&&r!==e&&null!=n&&(i=je(t,i,r)),je(t,i,e,n)}function Qe(t,e,n){return t=Mt(t,2,!!(2&e)),t=Mt(t,32,!!(32&e)&&n),Mt(t,2048,!1)}function Ze(t,e){var n=Lr;t=t.l;const r=Dt(t);te(r),t=Je(t,r,n,!0),e=null!=e?e:new n,t.push(e),2&Gt(e.l)?Ct(t,8):Ct(t,16)}function tn(t){return null==(t=Le(t,2))?t:ue(t)?"number"==typeof t?he(t):fe(t):void 0}function en(t){return t??0}function nn(t,e,n){De(t.l,e,de,n)}function rn(t,e,n){e.g?e.j(t,e.g,e.i,n,!0):e.j(t,e.i,n,!0)}var on=class{constructor(t,e){this.l=_e(t,e)}toJSON(){return sn(this,Se(this.l,Ee,void 0,void 0,!1),!0)}A(){return!!(2&Gt(this.l))}};function sn(t,e,n){var r=f?void 0:t.constructor.v;const i=Dt(n?t.l:e);if(!(t=e.length))return e;let o,s;if(Yt(n=e[t-1])){t:{var a=n;let t={},e=!1;for(var u in a){let n=a[u];if(Array.isArray(n)){let t=n;(Qt(n,r,+u)||Kt(n)&&0===n.size)&&(n=null),n!=t&&(e=!0)}null!=n?t[u]=n:e=!0}if(e){for(var c in t){a=t;break t}a=null}}a!=n&&(o=!0),t--}for(u=+!!(512&i)-1;0<t&&(n=e[c=t-1],c-=u,null==n||Qt(n,r,c)||Kt(n)&&0===n.size);t--)s=!0;return o||s?(e=Array.prototype.slice.call(e,0,t),a&&e.push(a),e):e}function an(t){return Array.isArray(t)?t[0]instanceof Ut?t:[rr,t]:[t,void 0]}function un(t,e){if(Array.isArray(e)){var n=Gt(e);if(4&n)return e;for(var r=0,i=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[i++]=n)}return i<r&&(e.length=i),zt(e,-12289&(5|n)),2&n&&Object.freeze(e),e}}on.prototype.C=qt,on.prototype.toString=function(){return sn(this,this.l,!1).toString()};const cn=Symbol();function ln(t){let e=t[cn];if(!e){const n=vn(t),r=Ln(t),i=r.j;e=i?(t,e)=>i(t,e,r):(t,e)=>{for(;ft(e)&&4!=e.i;){var i=e.m,o=r[i];if(!o){var s=r.F;s&&(s=s[i])&&(o=r[i]=hn(s))}o&&o(e,t,i)||(i=(o=e).j,dt(o),o.G?o=void 0:(s=o.g.g-i,o.g.g=i,o=lt(o.g,s)),i=t,o&&(ee||=Symbol(),(s=i[ee])?s.push(o):i[ee]=[o]))}n===dn||n===gn||n.s||(t[ne||=Symbol()]=n)},t[cn]=e}return e}function hn(t){const e=(t=an(t))[0].g;if(t=t[1]){const n=ln(t),r=Ln(t).B;return(t,i,o)=>e(t,i,o,r,n)}return e}class fn{}let dn,gn;const pn=Symbol();function mn(t,e,n){const r=n[1];let i;if(r){const n=r[pn];i=n?n.B:we(r[0]),t[e]=n??r}i&&i===ve?(t.g||(t.g=new Set)).add(e):n[0]&&(t.i||(t.i=new Set)).add(e)}function yn(t,e){return[t.j,!e||0<e[0]?void 0:e]}function vn(t){var e=t[pn];if(e)return e;if(!(e=wn(t,t[pn]=new fn,yn,yn,mn)).F&&!e.i&&!e.g){let n=!0;for(let t in e)isNaN(t)||(n=!1);n?(we(t[0])===ve?gn?e=gn:((e=new fn).B=we(!0),e=gn=e):e=dn||=new fn,e=t[pn]=e):e.s=!0}return e}function bn(t,e,n){t[e]=n}function wn(t,e,n,r,i=bn){e.B=we(t[0]);let o=0;var s=t[++o];s&&s.constructor===Object&&(e.F=s,"function"==typeof(s=t[++o])&&(e.j=s,e.m=t[++o],s=t[++o]));const a={};for(;Array.isArray(s)&&"number"==typeof s[0]&&0<s[0];){for(var u=0;u<s.length;u++)a[s[u]]=s;s=t[++o]}for(u=1;void 0!==s;){let h;"number"==typeof s&&(u+=s,s=t[++o]);var c=void 0;if(s instanceof Ut?h=s:(h=ir,o--),h.H){s=t[++o],c=t;var l=o;"function"==typeof s&&(s=s(),c[l]=s),c=s}for(l=u+1,"number"==typeof(s=t[++o])&&0>s&&(l-=s,s=t[++o]);u<l;u++){const t=a[u];i(e,u,c?r(h,c,t):n(h,t))}}return e}const _n=Symbol();function An(t){let e=t[_n];if(!e){const n=In(t);e=(t,e)=>jn(t,e,n),t[_n]=e}return e}const Sn=Symbol();function En(t){return t.i}function Tn(t,e){let n,r;const i=t.i;return(t,o,s)=>i(t,o,s,r||=In(e).B,n||=An(e))}function In(t){let e=t[Sn];return e||(e=wn(t,t[Sn]={},En,Tn),Bn(t),e)}const xn=Symbol();function Pn(t,e){const n=t.g;return e?(t,r,i)=>n(t,r,i,e):n}function On(t,e,n){const r=t.g;let i,o;return(t,s,a)=>r(t,s,a,o||=Ln(e).B,i||=ln(e),n)}function Ln(t){let e=t[xn];return e||(vn(t),e=wn(t,t[xn]={},Pn,On),Bn(t),e)}function Bn(t){xn in t&&pn in t&&Sn in t&&(t.length=0)}function Fn(t,e){var n=t[e];if(n)return n;if((n=t.F)&&(n=n[e])){var r=(n=an(n))[0].i;if(n=n[1]){const e=An(n),i=In(n).B;n=(n=t.m)?n(i,e):(t,n,o)=>r(t,n,o,i,e)}else n=r;return t[e]=n}}function jn(t,e,n){for(var r=Dt(t),i=+!!(512&r)-1,o=t.length,s=512&r?1:0,a=o+(256&r?-1:0);s<a;s++){const r=t[s];if(null==r)continue;const o=s-i,a=Fn(n,o);a&&a(e,r,o)}if(256&r){r=t[o-1];for(let t in r)i=+t,Number.isNaN(i)||null!=(o=r[t])&&(a=Fn(n,i))&&a(e,o,i)}if(t=ee?t[ee]:void 0)for(Ot(e,e.g.end()),n=0;n<t.length;n++)Ot(e,N(t[n])||F())}function kn(t,e){return new Ut(t,e,!1,!1)}function Un(t,e){return new Ut(t,e,!0,!1)}function Vn(t,e,n){je(t,Dt(t),e,n)}function Nn(t,e,n){t:if(null!=e){if(ue(e)){if("string"==typeof e){e=fe(e);break t}if("number"==typeof e){e=he(e);break t}}e=void 0}null!=e&&("string"==typeof e&&At(e),null!=e&&(Lt(t,n,0),"number"==typeof e?(t=t.g,J(e),Tt(t,H,q)):(n=At(e),Tt(t.g,n.i,n.g))))}function Cn(t,e,n){null!=(e=ce(e))&&null!=e&&(Lt(t,n,0),xt(t.g,e))}function Mn(t,e,n){null!=(e=null==e||"boolean"==typeof e?e:"number"==typeof e?!!e:void 0)&&(Lt(t,n,0),t.g.g.push(e?1:0))}function Gn(t,e,n){null!=(e=pe(e))&&jt(t,n,c(e))}function Dn(t,e,n,r,i){null!=(e=e instanceof on?e.l:Array.isArray(e)?_e(e,r[0],r[1]):void 0)&&(n=Bt(t,n),i(e,t),Ft(t,n))}function zn(t,e,n){null!=(e=null==e||"string"==typeof e||L(e)||e instanceof C?e:void 0)&&jt(t,n,z(e).buffer)}var $n,Wn=kn((function(t,e,n){return 5===t.i&&(Vn(e,n,ot(t.g)),!0)}),(function(t,e,n){null!=(e=oe(e))&&(Lt(t,n,5),t=t.g,K(e),Pt(t))})),Rn=Un((function(t,e,n){return(5===t.i||2===t.i)&&(e=ke(e,Dt(e),n,2,!1),2==t.i?yt(t,ot,e):e.push(ot(t.g)),!0)}),(function(t,e,n){if(null!=(e=un(oe,e))&&e.length){Lt(t,n,2),It(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,K(e[r]),Pt(n)}})),Hn=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,nt(t.g,X)),!0)}),Nn),qn=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,0===(t=nt(t.g,X))?void 0:t),!0)}),Nn),Jn=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,nt(t.g,Y)),!0)}),(function(t,e,n){t:if(null!=e){if(ue(e)){if("string"==typeof e){var r=Math.trunc(Number(e));Number.isSafeInteger(r)&&0<=r?e=String(r):(-1!==(r=e.indexOf("."))&&(e=e.substring(0,r)),le(e)||(tt(e),e=Q(H,q)));break t}if("number"==typeof e){e=0<=(e=Math.trunc(e))&&Number.isSafeInteger(e)?e:function(t){if(0>t){J(t);const e=Q(H,q);return t=Number(e),Number.isSafeInteger(t)?t:e}return le(String(t))?t:(J(t),Y(H,q))}(e);break t}}e=void 0}null!=e&&("string"==typeof e&&bt(e),null!=e&&(Lt(t,n,0),"number"==typeof e?(t=t.g,J(e),Tt(t,H,q)):(n=bt(e),Tt(t.g,n.i,n.g))))})),Kn=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,it(t.g)),!0)}),Cn),Yn=Un((function(t,e,n){return(0===t.i||2===t.i)&&(e=ke(e,Dt(e),n,2,!1),2==t.i?yt(t,it,e):e.push(it(t.g)),!0)}),(function(t,e,n){if(null!=(e=un(ce,e))&&e.length){n=Bt(t,n);for(let n=0;n<e.length;n++)xt(t.g,e[n]);Ft(t,n)}})),Xn=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,0===(t=it(t.g))?void 0:t),!0)}),Cn),Qn=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,rt(t.g)),!0)}),Mn),Zn=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,!1===(t=rt(t.g))?void 0:t),!0)}),Mn),tr=Un((function(t,e,n){return 2===t.i&&(De(e,n,ze,t=pt(t)),!0)}),(function(t,e,n){if(null!=(e=un(pe,e)))for(let s=0;s<e.length;s++){var r=t,i=n,o=e[s];null!=o&&jt(r,i,c(o))}})),er=kn((function(t,e,n){return 2===t.i&&(Vn(e,n,""===(t=pt(t))?void 0:t),!0)}),Gn),nr=kn((function(t,e,n){return 2===t.i&&(Vn(e,n,pt(t)),!0)}),Gn),rr=new Ut((function(t,e,n,r,i){return 2===t.i&&(gt(t,Re(e,r,n,!0),i),!0)}),Dn,!1,!0),ir=new Ut((function(t,e,n,r,i){return 2===t.i&&(gt(t,Re(e,r,n),i),!0)}),Dn,!1,!0);$n=new Ut((function(t,e,n,r,i){if(2!==t.i)return!1;r=_e(void 0,r[0],r[1]);let o=Dt(e);te(o);let s=ke(e,o,n,3);return o=Dt(e),4&Gt(s)&&(s=Vt(s),zt(s,-2079&(1|Gt(s))),je(e,o,n,s)),s.push(r),gt(t,r,i),!0}),(function(t,e,n,r,i){if(Array.isArray(e))for(let o=0;o<e.length;o++)Dn(t,e[o],n,r,i)}),!0,!0);var or=new Ut((function(t,e,n,r,i,o){if(2!==t.i)return!1;let s=Dt(e);return te(s),(o=We(e,s,o))&&n!==o&&je(e,s,o),gt(t,e=Re(e,r,n),i),!0}),Dn,!1,!0),sr=kn((function(t,e,n){return 2===t.i&&(Vn(e,n,mt(t)),!0)}),zn),ar=kn((function(t,e,n){return 0===t.i&&(Vn(e,n,it(t.g)),!0)}),(function(t,e,n){null!=(e=ce(e))&&(e=parseInt(e,10),Lt(t,n,0),xt(t.g,e))})),ur=Un((function(t,e,n){return(0===t.i||2===t.i)&&(e=ke(e,Dt(e),n,2,!1),2==t.i?yt(t,st,e):e.push(it(t.g)),!0)}),(function(t,e,n){if(null!=(e=un(ce,e))&&e.length){n=Bt(t,n);for(let n=0;n<e.length;n++)xt(t.g,e[n]);Ft(t,n)}}));class cr{constructor(t,e){this.i=t,this.g=e,this.j=Ye,this.defaultValue=void 0}}function lr(t,e){return(n,r)=>{t:{if(vt.length){const t=vt.pop();t.o(r),at(t.g,n,r),n=t}else n=new class{constructor(t,e){if(ht.length){const n=ht.pop();at(n,t,e),t=n}else t=new class{constructor(t,e){this.i=null,this.m=!1,this.g=this.j=this.s=0,at(this,t,e)}clear(){this.i=null,this.m=!1,this.g=this.j=this.s=0,this.D=!1}}(t,e);this.g=t,this.j=this.g.g,this.i=this.m=-1,this.o(e)}o({G:t=!1}={}){this.G=t}}(n,r);try{const r=new t,o=r.l;ln(e)(o,n);var i=r;break t}finally{n.g.clear(),n.m=-1,n.i=-1,100>vt.length&&vt.push(n)}i=void 0}return i}}var hr=[0,er,kn((function(t,e,n){return 2===t.i&&(Vn(e,n,(t=mt(t))===V()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof on){const r=e.N;return void(r&&(e=r(e),null!=e&&jt(t,n,z(e).buffer)))}if(Array.isArray(e))return}zn(t,e,n)}))],fr=[0,nr],dr=[0,Kn,ar,Qn,-1,Yn,ar,-1],gr=[0,Qn,-1],pr=class extends on{constructor(){super()}};pr.v=[6];var mr=[0,Qn,nr,Qn,ar,-1,ur,nr,-1,gr,ar],yr=[0,nr,-2],vr=class extends on{constructor(){super()}},br=[0],wr=[0,Kn,Qn,-3],_r=class extends on{constructor(t){super(t,2)}},Ar={},Sr=[-2,Ar,Qn];Ar[336783863]=[0,nr,Qn,-1,Kn,[0,[1,2,3,4,5],or,br,or,mr,or,yr,or,wr,or,dr],fr];var Er=[0,er,Zn],Tr=[0,qn,-1,Zn,-3,qn,Yn,er,Xn,qn,-1,Zn,Xn,Zn,-2,er],Ir=[-1,{}],xr=[0,nr,1,Ir],Pr=[0,nr,tr,Ir];function Or(t){nn(t,3,"TEXT:text_in")}var Lr=class extends on{constructor(t){super(t,500)}o(t){return Ye(this,0,7,t)}};Lr.v=[3,4,5,6,8,13,17,1005];var Br=[-500,er,-1,tr,-3,Sr,$n,hr,Xn,-1,xr,Pr,$n,Er,er,Tr,Xn,tr,987,tr],Fr=[0,er,-1,Ir],jr=[-500,nr,-1,[-1,{}],998,nr],kr=[-500,nr,tr,-1,[-2,{},Qn],997,tr,-1],Ur=[-500,nr,tr,Ir,998,tr];function Vr(t){nn(t,10,"text_in")}var Nr,Cr=class extends on{constructor(){super(void 0,500)}o(t){return Ye(this,0,1001,t)}};Cr.v=[1,6,7,9,10,15,16,17,14,1002],Cr.prototype.g=(Nr=[-500,$n,Br,4,$n,jr,$n,kr,Xn,$n,Ur,tr,Xn,xr,Pr,$n,Fr,tr,-2,Tr,er,-1,Zn,979,Ir,$n,hr],function(){const t=new class{constructor(){this.j=[],this.i=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};jn(this.l,t,In(Nr)),Ot(t,t.g.end());const e=new Uint8Array(t.i),n=t.j,r=n.length;let i=0;for(let t=0;t<r;t++){const r=n[t];e.set(r,i),i+=r.length}return t.j=[e],e});var Mr=class extends on{constructor(t){super(t)}},Gr=[0,Kn,Wn,nr,-1],Dr=class extends on{constructor(t){super(t)}g(){return Ke(this,Mr)}};Dr.v=[1];var zr=class extends on{constructor(t){super(t)}},$r=[0,1,Kn,nr,[0,$n,Gr]],Wr=class extends on{constructor(t){super(t)}};Wr.v=[1];var Rr=lr(Wr,[0,$n,$r,Hn]),Hr=class extends on{constructor(t){super(t)}};Hr.v=[1];var qr=class extends on{constructor(t){super(t)}I(){const t=Ue(this);return null==t?V():t}},Jr=class extends on{constructor(t){super(t)}},Kr=[1,2],Yr=[0,Kr,or,[0,Rn],or,[0,sr],Kn,nr],Xr=class extends on{constructor(t){super(t)}};Xr.v=[1];var Qr=lr(Xr,[0,$n,Yr,Hn]),Zr=class extends on{constructor(t){super(t)}};Zr.v=[4,5];var ti=class extends on{constructor(t){super(t)}},ei=[0,Qn,-1],ni=class extends on{constructor(t){super(t)}},ri=[1,2,3,4,5],ii=class extends on{constructor(t){super(t)}g(){return null!=Ue(this)}i(){return null!=pe(Le(this,2))}},oi=class extends on{constructor(t){super(t)}},si=[0,[0,sr,nr,[0,Kn,Hn,-1],[0,Jn,Hn]],Qn,[0,ri,or,wr,or,mr,or,dr,or,br,or,yr],ar],ai=class extends on{constructor(t){super(t)}},ui=new cr(462704549,ai);Ar[462704549]=[0,si,[0,nr,Kn,Wn,tr,-1]];var ci=class extends on{constructor(t){super(t)}},li=new cr(477589892,ci);function hi(t,e){if(e=e?Ie(e):new Zr,void 0!==t.displayNamesLocale?Fe(e,1,ge(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Fe(e,1),void 0!==t.maxResults){var n=t.maxResults;if(null!=n){if("number"!=typeof n)throw ie();if(!Number.isFinite(n))throw ie();n|=0}Fe(e,2,n)}else"maxResults"in t&&Fe(e,2);if(void 0!==t.scoreThreshold){if(null!=(n=t.scoreThreshold)&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);Fe(e,3,n)}else"scoreThreshold"in t&&Fe(e,3);return void 0!==t.categoryAllowlist?Me(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&Fe(e,4),void 0!==t.categoryDenylist?Me(e,5,t.categoryDenylist):"categoryDenylist"in t&&Fe(e,5),e}function fi(t){const e={classifications:Ke(t,zr).map((t=>function(t,e=-1,n=""){return{categories:t.map((t=>{var e=en(ce(Le(t,1)))??-1;const n=t.l;let r=Dt(n);const i=Be(n,r,2),o=oe(i);return null!=o&&o!==i&&je(n,r,2,o),{index:e,score:o??0??0,categoryName:pe(Le(t,3))??""??"",displayName:pe(Le(t,4))??""??""}})),headIndex:e,headName:n}}(qe(t,Dr,4)?.g()??[],en(ce(Le(t,2))),pe(Le(t,3))??"")))};return null!=tn(t)&&(e.timestampMs=en(tn(t))),e}function di(t){return Array.from(t,(t=>127<t?t-256:t))}function gi(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,r=0,i=0;for(let o=0;o<t.length;o++)n+=t[o]*e[o],r+=t[o]*t[o],i+=e[o]*e[o];if(0>=r||0>=i)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*i)}let pi;Ar[477589892]=[0,si,ei];const mi=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function yi(){if(void 0===pi)try{await WebAssembly.instantiate(mi),pi=!0}catch{pi=!1}return pi}async function vi(t,e=""){const n=await yi()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var bi=class{};async function wi(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),!1),e.addEventListener("error",(t=>{n(t)}),!1),document.body.appendChild(e)}))}importScripts(t.toString())}bi.forVisionTasks=function(t){return vi("vision",t)},bi.forTextTasks=function(t){return vi("text",t)},bi.forGenAiTasks=function(t){return vi("genai",t)},bi.forAudioTasks=function(t){return vi("audio",t)},bi.isSimdSupported=function(){return yi()};function _i(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.h.stringToNewUTF8(e)),t.h._free(e)}function Ai(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.h.stringToNewUTF8(e[n]);e=t.h._malloc(4*r.length),t.h.HEAPU32.set(r,e>>2),n(e);for(const e of r)t.h._free(e);t.h._free(e)}function Si(t,e,n){t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=n}function Ei(t,e,n){let r=[];t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=(t,e,i)=>{e?(n(r,i),r=[]):r.push(t)}}const Ti=function(t){return class extends t{M(){this.h._registerModelResourcesGraphService()}}}(class{constructor(t,e){this.j=!0,this.h=t,this.g=null,this.i=0,this.m="function"==typeof this.h._addIntToInputStream,void 0!==e?this.h.canvas=e:((t="undefined"==typeof OffscreenCanvas)||(t=(t=navigator.userAgent).includes("Safari")&&!t.includes("Chrome")),t?(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.h.canvas=document.createElement("canvas")):this.h.canvas=new OffscreenCanvas(1,1))}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,e){const n=t.length,r=this.h._malloc(n);this.h.HEAPU8.set(t,r),e?this.h._changeBinaryGraph(n,r):this.h._changeTextGraph(n,r),this.h._free(r)}configureAudio(t,e,n,r,i){this.h._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),_i(this,r||"input_audio",(r=>{_i(this,i=i||"audio_header",(i=>{this.h._configureAudio(r,i,t,e,n)}))}))}setAutoResizeCanvas(t){this.j=t}setAutoRenderToScreen(t){this.h._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.h.gpuOriginForWebTexturesIsBottomLeft=t}attachErrorListener(t){this.h.errorListener=t}attachEmptyPacketListener(t,e){this.h.emptyPacketListeners=this.h.emptyPacketListeners||{},this.h.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,r,i){const o=4*t.length;this.i!==o&&(this.g&&this.h._free(this.g),this.g=this.h._malloc(o),this.i=o),this.h.HEAPF32.set(t,this.g/4),_i(this,r,(t=>{this.h._addAudioToInputStream(this.g,e,n,t,i)}))}addGpuBufferToStream(t,e,n){_i(this,e,(e=>{if(!this.h.canvas)throw Error("No OpenGL canvas configured.");e?this.h._bindTextureToStream(e):this.h._bindTextureToCanvas();const r=this.h.canvas.getContext("webgl2")||this.h.canvas.getContext("webgl");if(!r)throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");this.h.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),this.h.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);const[i,o]=void 0!==t.videoWidth?[t.videoWidth,t.videoHeight]:void 0!==t.naturalWidth?[t.naturalWidth,t.naturalHeight]:void 0!==t.displayWidth?[t.displayWidth,t.displayHeight]:[t.width,t.height];!this.j||i===this.h.canvas.width&&o===this.h.canvas.height||(this.h.canvas.width=i,this.h.canvas.height=o);const[s,a]=[i,o];this.h._addBoundTextureToStream(e,s,a,n)}))}addBoolToStream(t,e,n){_i(this,e,(e=>{this.h._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){_i(this,e,(e=>{this.h._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){_i(this,e,(e=>{this.h._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){_i(this,e,(e=>{this.h._addIntToInputStream(t,e,n)}))}addStringToStream(t,e,n){_i(this,e,(e=>{_i(this,t,(t=>{this.h._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){_i(this,e,(e=>{Ai(this,Object.keys(t),(r=>{Ai(this,Object.values(t),(i=>{this.h._addFlatHashMapToInputStream(r,i,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){_i(this,n,(n=>{_i(this,e,(e=>{const i=this.h._malloc(t.length);this.h.HEAPU8.set(t,i),this.h._addProtoToInputStream(i,t.length,e,n,r),this.h._free(i)}))}))}addEmptyPacketToStream(t,e){_i(this,t,(t=>{this.h._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){_i(this,e,(e=>{const r=this.h._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.h._addBoolVectorEntry(r,e);this.h._addBoolVectorToInputStream(r,e,n)}))}addDoubleVectorToStream(t,e,n){_i(this,e,(e=>{const r=this.h._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.h._addDoubleVectorEntry(r,e);this.h._addDoubleVectorToInputStream(r,e,n)}))}addFloatVectorToStream(t,e,n){_i(this,e,(e=>{const r=this.h._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.h._addFloatVectorEntry(r,e);this.h._addFloatVectorToInputStream(r,e,n)}))}addIntVectorToStream(t,e,n){_i(this,e,(e=>{const r=this.h._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.h._addIntVectorEntry(r,e);this.h._addIntVectorToInputStream(r,e,n)}))}addStringVectorToStream(t,e,n){_i(this,e,(e=>{const r=this.h._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(const e of t)_i(this,e,(t=>{this.h._addStringVectorEntry(r,t)}));this.h._addStringVectorToInputStream(r,e,n)}))}addBoolToInputSidePacket(t,e){_i(this,e,(e=>{this.h._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){_i(this,e,(e=>{this.h._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){_i(this,e,(e=>{this.h._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){_i(this,e,(e=>{this.h._addIntToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){_i(this,e,(e=>{_i(this,t,(t=>{this.h._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){_i(this,n,(n=>{_i(this,e,(e=>{const r=this.h._malloc(t.length);this.h.HEAPU8.set(t,r),this.h._addProtoToInputSidePacket(r,t.length,e,n),this.h._free(r)}))}))}addBoolVectorToInputSidePacket(t,e){_i(this,e,(e=>{const n=this.h._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(const e of t)this.h._addBoolVectorEntry(n,e);this.h._addBoolVectorToInputSidePacket(n,e)}))}addDoubleVectorToInputSidePacket(t,e){_i(this,e,(e=>{const n=this.h._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(const e of t)this.h._addDoubleVectorEntry(n,e);this.h._addDoubleVectorToInputSidePacket(n,e)}))}addFloatVectorToInputSidePacket(t,e){_i(this,e,(e=>{const n=this.h._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(const e of t)this.h._addFloatVectorEntry(n,e);this.h._addFloatVectorToInputSidePacket(n,e)}))}addIntVectorToInputSidePacket(t,e){_i(this,e,(e=>{const n=this.h._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(const e of t)this.h._addIntVectorEntry(n,e);this.h._addIntVectorToInputSidePacket(n,e)}))}addStringVectorToInputSidePacket(t,e){_i(this,e,(e=>{const n=this.h._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(const e of t)_i(this,e,(t=>{this.h._addStringVectorEntry(n,t)}));this.h._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){Si(this,t,e),_i(this,t,(t=>{this.h._attachBoolListener(t)}))}attachBoolVectorListener(t,e){Ei(this,t,e),_i(this,t,(t=>{this.h._attachBoolVectorListener(t)}))}attachIntListener(t,e){Si(this,t,e),_i(this,t,(t=>{this.h._attachIntListener(t)}))}attachIntVectorListener(t,e){Ei(this,t,e),_i(this,t,(t=>{this.h._attachIntVectorListener(t)}))}attachDoubleListener(t,e){Si(this,t,e),_i(this,t,(t=>{this.h._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){Ei(this,t,e),_i(this,t,(t=>{this.h._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){Si(this,t,e),_i(this,t,(t=>{this.h._attachFloatListener(t)}))}attachFloatVectorListener(t,e){Ei(this,t,e),_i(this,t,(t=>{this.h._attachFloatVectorListener(t)}))}attachStringListener(t,e){Si(this,t,e),_i(this,t,(t=>{this.h._attachStringListener(t)}))}attachStringVectorListener(t,e){Ei(this,t,e),_i(this,t,(t=>{this.h._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){Si(this,t,e),_i(this,t,(t=>{this.h._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){Ei(this,t,e),_i(this,t,(t=>{this.h._attachProtoVectorListener(t,n||!1)}))}attachAudioListener(t,e,n){this.h._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Si(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),_i(this,t,(t=>{this.h._attachAudioListener(t,n||!1)}))}finishProcessing(){this.h._waitUntilIdle()}closeGraph(){this.h._closeGraph(),this.h.simpleListeners=void 0,this.h.emptyPacketListeners=void 0}});var Ii=class extends Ti{};async function xi(t,e,n){return t=await(async(t,e,n,r)=>{if(e&&await wi(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await wi(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&r&&((e=self.Module).locateFile=r.locateFile,r.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=r.mainScriptUrlOrBlob)),r=await self.ModuleFactory(self.Module||r),self.ModuleFactory=self.Module=void 0,new t(r,null)})(t,e.wasmLoaderPath,e.assetLoaderPath,{locateFile:t=>t.endsWith(".wasm")?e.wasmBinaryPath.toString():e.assetBinaryPath&&t.endsWith(".data")?e.assetBinaryPath.toString():t}),await t.o(n),t}async function Pi(t,e,n){return xi(t,e,n)}function Oi(t,e){const n=qe(t.baseOptions,ii,1)||new ii;"string"==typeof e?(Fe(n,2,ge(e)),Fe(n,1)):e instanceof Uint8Array&&(Fe(n,1,Xt(e,!1,!1)),Fe(n,2)),Ye(t.baseOptions,0,1,n)}function Li(t,e){const n=e.baseOptions||{};if(e.baseOptions?.modelAssetBuffer&&e.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(qe(t.baseOptions,ii,1)?.g()||qe(t.baseOptions,ii,1)?.i()||e.baseOptions?.modelAssetBuffer||e.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");return function(t,e){let n=qe(t.baseOptions,ni,3);if(!n){var r=n=new ni;Xe(r,4,new vr)}"delegate"in e&&("GPU"===e.delegate?Xe(e=n,2,r=new pr):Xe(e=n,4,r=new vr)),Ye(t.baseOptions,0,3,n)}(t,n),n.modelAssetPath?fetch(n.modelAssetPath.toString()).then((t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${n.modelAssetPath} (${t.status})`)})).then((e=>{try{t.g.h.FS_unlink("/model.dat")}catch{}t.g.h.FS_createDataFile("/","model.dat",new Uint8Array(e),!0,!1,!1),Oi(t,"/model.dat"),t.s()})):(Oi(t,n.modelAssetBuffer),t.s(),Promise.resolve())}function Bi(t){try{const e=t.m.length;if(1===e)throw Error(t.m[0].message);if(1<e)throw Error("Encountered multiple errors: "+t.m.map((t=>t.message)).join(", "))}finally{t.m=[]}}function Fi(t,e){t.j=Math.max(t.j,e)}var ji=class{constructor(t){this.g=t,this.m=[],this.j=0,this.g.setAutoRenderToScreen(!1)}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.m.push(Error(e))})),this.g.M(),this.g.setGraph(t,e),Bi(this)}finishProcessing(){this.g.finishProcessing(),Bi(this)}close(){this.g.closeGraph()}};ji.prototype.close=ji.prototype.close;var ki=class extends ji{constructor(t,e){super(new Ii(t,e)),this.u={languages:[]},Ye(t=this.i=new ai,0,1,e=new oi)}o(t){return Ye(this.i,0,2,hi(t,qe(this.i,Zr,2))),Li(this,t)}get baseOptions(){return qe(this.i,oi,1)}set baseOptions(t){Ye(this.i,0,1,t)}K(t){return this.u={languages:[]},this.g.addStringToStream(t,"text_in",this.j+1),this.finishProcessing(),this.u}s(){var t=new Cr;Vr(t),nn(t,15,"classifications_out");const e=new _r;rn(e,ui,this.i);const n=new Lr;Ge(n,ge("mediapipe.tasks.text.text_classifier.TextClassifierGraph")),Or(n),nn(n,4,"CLASSIFICATIONS:classifications_out"),n.o(e),Ze(t,n),this.g.attachProtoListener("classifications_out",((t,e)=>{if(({classifications:t}=fi(Rr(t))),1!==t.length)throw Error(`Expected 1 classification head, got ${t.length}`);this.u.languages=t[0].categories.map((t=>({languageCode:t.categoryName,probability:t.score}))),Fi(this,e)})),this.g.attachEmptyPacketListener("classifications_out",(t=>{Fi(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ki.prototype.detect=ki.prototype.K,ki.prototype.setOptions=ki.prototype.o,ki.createFromModelPath=function(t,e){return Pi(ki,t,{baseOptions:{modelAssetPath:e}})},ki.createFromModelBuffer=function(t,e){return Pi(ki,t,{baseOptions:{modelAssetBuffer:e}})},ki.createFromOptions=function(t,e){return Pi(ki,t,e)};var Ui=class extends ji{constructor(t,e){super(new Ii(t,e)),this.u={classifications:[]},Ye(t=this.i=new ai,0,1,e=new oi)}o(t){return Ye(this.i,0,2,hi(t,qe(this.i,Zr,2))),Li(this,t)}get baseOptions(){return qe(this.i,oi,1)}set baseOptions(t){Ye(this.i,0,1,t)}J(t){return this.u={classifications:[]},this.g.addStringToStream(t,"text_in",this.j+1),this.finishProcessing(),this.u}s(){var t=new Cr;Vr(t),nn(t,15,"classifications_out");const e=new _r;rn(e,ui,this.i);const n=new Lr;Ge(n,ge("mediapipe.tasks.text.text_classifier.TextClassifierGraph")),Or(n),nn(n,4,"CLASSIFICATIONS:classifications_out"),n.o(e),Ze(t,n),this.g.attachProtoListener("classifications_out",((t,e)=>{this.u=fi(Rr(t)),Fi(this,e)})),this.g.attachEmptyPacketListener("classifications_out",(t=>{Fi(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ui.prototype.classify=Ui.prototype.J,Ui.prototype.setOptions=Ui.prototype.o,Ui.createFromModelPath=function(t,e){return Pi(Ui,t,{baseOptions:{modelAssetPath:e}})},Ui.createFromModelBuffer=function(t,e){return Pi(Ui,t,{baseOptions:{modelAssetBuffer:e}})},Ui.createFromOptions=function(t,e){return Pi(Ui,t,e)};var Vi=class extends ji{constructor(t,e){super(new Ii(t,e)),this.u={embeddings:[]},Ye(t=this.i=new ci,0,1,e=new oi)}o(t){var e=this.i,n=qe(this.i,ti,2);return n=n?Ie(n):new ti,void 0!==t.l2Normalize?Fe(n,1,se(t.l2Normalize)):"l2Normalize"in t&&Fe(n,1),void 0!==t.quantize?Fe(n,2,se(t.quantize)):"quantize"in t&&Fe(n,2),Ye(e,0,2,n),Li(this,t)}get baseOptions(){return qe(this.i,oi,1)}set baseOptions(t){Ye(this.i,0,1,t)}L(t){return this.g.addStringToStream(t,"text_in",this.j+1),this.finishProcessing(),this.u}s(){var t=new Cr;Vr(t),nn(t,15,"embeddings_out");const e=new _r;rn(e,li,this.i);const n=new Lr;Ge(n,ge("mediapipe.tasks.text.text_embedder.TextEmbedderGraph")),Or(n),nn(n,4,"EMBEDDINGS:embeddings_out"),n.o(e),Ze(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=Qr(t),this.u=function(t){return{embeddings:Ke(t,Jr).map((t=>{const e={headIndex:en(ce(Le(t,3)))??-1,headName:pe(Le(t,4))??""??""};if(void 0!==He(t,Hr,$e(t,1))){var n=void 0;t=qe(t,Hr,$e(t,1)).l;let s=Dt(t);const a=2&s?1:2;n=!!n;let u=Ve(t,s);var r=Gt(u);if(!(4&r)){(4&r||Object.isFrozen(u))&&(u=Vt(u),r=Qe(r,s,n),s=je(t,s,1,u));for(var i=0,o=0;i<u.length;i++){const t=oe(u[i]);null!=t&&(u[o++]=t)}o<i&&(u.length=o),r=Mt(r=Ne(r,s,n),20,!0),r=Mt(r,4096,!1),r=Mt(r,8192,!1),zt(u,r),2&r&&Object.freeze(u)}Ce(r)||(i=r,(o=1===a)?r=Mt(r,2,!0):n||(r=Mt(r,32,!1)),r!==i&&zt(u,r),o&&Object.freeze(u)),2===a&&Ce(r)&&(u=Vt(u),r=Qe(r,s,n),zt(u,r),je(t,s,1,u)),e.floatEmbedding=u.slice()}else n=new Uint8Array(0),e.quantizedEmbedding=qe(t,qr,$e(t,2))?.I()?.i()??n;return e})),timestampMs:en(tn(t))}}(t),Fi(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{Fi(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Vi.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=gi(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=gi(di(t.quantizedEmbedding),di(e.quantizedEmbedding))}return t},Vi.prototype.embed=Vi.prototype.L,Vi.prototype.setOptions=Vi.prototype.o,Vi.createFromModelPath=function(t,e){return Pi(Vi,t,{baseOptions:{modelAssetPath:e}})},Vi.createFromModelBuffer=function(t,e){return Pi(Vi,t,{baseOptions:{modelAssetBuffer:e}})},Vi.createFromOptions=function(t,e){return Pi(Vi,t,e)},exports.FilesetResolver=bi,exports.LanguageDetector=ki,exports.TaskRunner=ji,exports.TextClassifier=Ui,exports.TextEmbedder=Vi;
|
|
2
2
|
//# sourceMappingURL=text_bundle_cjs.js.map
|