@mediapipe/tasks-audio 0.10.12 → 0.10.13-rc.20240412
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/audio_bundle.cjs +1 -1
- package/audio_bundle.cjs.map +1 -1
- package/audio_bundle.mjs +1 -1
- package/audio_bundle.mjs.map +1 -1
- package/package.json +1 -1
- package/wasm/audio_wasm_internal.js +2 -2
- package/wasm/audio_wasm_internal.wasm +0 -0
- package/wasm/audio_wasm_nosimd_internal.js +2 -2
- package/wasm/audio_wasm_nosimd_internal.wasm +0 -0
package/README.md
CHANGED
|
File without changes
|
package/audio_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,o=0;o<n.length;o++)if(null==(r=r[n[o]])){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 o,i;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 o=0;o<t.length;o++){var e=t.charCodeAt(o);if(128>e)r[n++]=e;else{if(2048>e)r[n++]=e>>6|192;else{if(55296<=e&&57343>=e){if(56319>=e&&o<t.length){const i=t.charCodeAt(++o);if(56320<=i&&57343>=i){e=1024*(e-55296)+i-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}o--}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),o=0;return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),o=w[n];if(null!=o)return o;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}A();for(var r=0;;){var o=n(-1),i=n(0),s=n(64),a=n(64);if(64===a&&-1===o)break;e(o<<2|i>>4),64!=s&&(e(i<<4&240|s>>2),64!=a&&e(s<<6&192|a))}}(t,(function(t){r[o++]=t})),o!==n?r.subarray(0,o):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 o=0;o<r.length;o++){var i=r[o];void 0===w[i]&&(w[i]=o)}}}}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 o=t[u],i=t[u+1],s=t[u+2],a=e[o>>2];o=e[(3&o)<<4|i>>4],i=e[(15&i)<<2|s>>6],s=e[63&s],n[c++]=a+o+i+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,P={"-":"+",_:"/",".":"="};function x(t){return P[t]||""}function O(t){if(!E)return _(t);I.test(t)&&(t=t.replace(I,x)),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 U;function k(t){if(t!==j)throw Error("illegal external caller")}function V(){return U||=new M(null,j)}function N(t){k(j);var e=t.g;return null==(e=null==e||L(e)?e:"string"==typeof e?O(e):null)?e:t.g=e}var M=class{constructor(t,e){if(k(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 D(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function C(){return Error("Failed to read varint, encoding is invalid.")}function G(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function $(t){if("string"==typeof t)return{buffer:O(t),v:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),v:!1};if(t.constructor===Uint8Array)return{buffer:t,v:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),v:!1};if(t.constructor===M)return{buffer:N(t)||F(),v:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),v:!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 z(){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 z()?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(z())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,o=(n-e)%6+e;o<=n;r=o,o+=6){const e=Number(t.slice(r,o));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,o=0,i=0;const s=t.i;let a=t.g;do{n=s[a++],r|=(127&n)<<i,i+=7}while(32>i&&128&n);for(32<i&&(o|=(127&n)>>4),i=3;32>i&&128&n;i+=7)n=s[a++],o|=(127&n)<<i;if(ct(t,a),128>n)return e(r>>>0,o>>>0);throw C()}function rt(t){let e=0,n=t.g;const r=n+10,o=t.i;for(;n<r;){const r=o[n++];if(e|=r,0==(128&r))return ct(t,n),!!(127&e)}throw C()}function ot(t){const e=t.i;let n=t.g,r=e[n++],o=127&r;if(128&r&&(r=e[n++],o|=(127&r)<<7,128&r&&(r=e[n++],o|=(127&r)<<14,128&r&&(r=e[n++],o|=(127&r)<<21,128&r&&(r=e[n++],o|=r<<28,128&r&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw C();return ct(t,n),o}function it(t){var e=t.i;const n=t.g,r=e[n],o=e[n+1],i=e[n+2];return e=e[n+3],ct(t,t.g+4),(r<<0|o<<8|i<<16|e<<24)>>>0}function st(t){var e=it(t);t=2*(e>>31)+1;const n=e>>>23&255;return e&=8388607,255==n?e?NaN:1/0*t:0==n?t*Math.pow(2,-149)*e:t*Math.pow(2,n-150)*(e+Math.pow(2,23))}function at(t){return ot(t)}function ut(t,e,{C:n=!1}={}){t.C=n,e&&(e=$(e),t.i=e.buffer,t.m=e.v,t.s=0,t.j=t.i.length,t.g=t.s)}function ct(t,e){if(t.g=e,e>t.j)throw G(t.j,e)}function lt(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 G(e,t.j-n);return t.g=r,n}function ht(t,e){if(0==e)return V();var n=lt(t,e);return t.C&&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 M(n,j)}var ft=[];function dt(t){var e=t.g;if(e.g==e.j)return!1;t.j=t.g.g;var n=ot(t.g)>>>0;if(e=n>>>3,!(0<=(n&=7)&&5>=n))throw D(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 gt(t){switch(t.i){case 0:0!=t.i?gt(t):rt(t.g);break;case 1:ct(t=t.g,t.g+8);break;case 2:if(2!=t.i)gt(t);else{var e=ot(t.g)>>>0;ct(t=t.g,t.g+e)}break;case 5:ct(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!dt(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.i){if(t.m!=e)throw Error("Unmatched end-group tag");break}gt(t)}break;default:throw D(t.i,t.j)}}function pt(t,e,n){const r=t.g.j,o=ot(t.g)>>>0,i=t.g.g+o;let s=i-r;if(0>=s&&(t.g.j=i,n(e,t,void 0,void 0,void 0),s=i-t.g.g),s)throw Error(`Message parsing ended unexpectedly. Expected to read ${o} bytes, instead read ${o-s} bytes, either the data ended unexpectedly or the message misreported its own length`);t.g.g=i,t.g.j=r}function mt(t){var e=ot(t.g)>>>0,a=lt(t=t.g,e);if(t=t.i,s){var u,c=t;(u=i)||(u=i=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===o){try{u.decode(new Uint8Array([128]))}catch(t){}try{u.decode(new Uint8Array([97])),o=!0}catch(t){o=!1}}throw!o&&(i=void 0),t}}else{e=(l=a)+e,a=[];let o,i=null;for(;l<e;){var h=t[l++];128>h?a.push(h):224>h?l>=e?n():(o=t[l++],194>h||128!=(192&o)?(l--,n()):a.push((31&h)<<6|63&o)):240>h?l>=e-1?n():(o=t[l++],128!=(192&o)||224===h&&160>o||237===h&&160<=o||128!=(192&(u=t[l++]))?(l--,n()):a.push((15&h)<<12|(63&o)<<6|63&u)):244>=h?l>=e-2?n():(o=t[l++],128!=(192&o)||0!=o-144+(h<<28)>>30||128!=(192&(u=t[l++]))||128!=(192&(c=t[l++]))?(l--,n()):(h=(7&h)<<18|(63&o)<<12|(63&u)<<6|63&c,h-=65536,a.push(55296+(h>>10&1023),56320+(1023&h)))):n(),8192<=a.length&&(i=r(i,a),a.length=0)}l=r(i,a)}return l}function yt(t){const e=ot(t.g)>>>0;return ht(t.g,e)}function vt(t,e,n){var r=ot(t.g)>>>0;for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var bt=[];function wt(t){return t?/^\d+$/.test(t)?(tt(t),new _t(H,q)):null:At||=new _t(0,0)}var _t=class{constructor(t,e){this.i=t>>>0,this.g=e>>>0}};let At;function St(t){return t?/^-?\d+$/.test(t)?(tt(t),new Et(H,q)):null:Tt||=new Et(0,0)}var Et=class{constructor(t,e){this.i=t>>>0,this.g=e>>>0}};let Tt;function It(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 Pt(t,e){for(;127<e;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function xt(t,e){if(0<=e)Pt(t,e);else{for(let n=0;9>n;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Ot(t,e){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 Lt(t,e){0!==e.length&&(t.j.push(e),t.i+=e.length)}function Bt(t,e,n){Pt(t.g,8*e+n)}function Ft(t,e){return Bt(t,e,2),e=t.g.end(),Lt(t,e),e.push(t.i),e}function jt(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 Ut(t,e,n){Bt(t,e,2),Pt(t.g,n.length),Lt(t,t.g.end()),Lt(t,n)}var kt;class Vt{constructor(t,e,n,r){this.g=t,this.i=e,this.j=n,this.J=r}}function Nt(t){return Array.prototype.slice.call(t)}var Mt=(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}})},Dt=kt?(t,e)=>{t[kt]&=~e}:(t,e)=>{void 0!==t.g&&(t.g&=~e)};function Ct(t,e,n){return n?t|e:t&~e}var Gt=kt?t=>0|t[kt]:t=>0|t.g,$t=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 Wt(t,e){zt(e,-14591&(0|t))}function Rt(t,e){zt(e,-14557&(34|t))}function Ht(t){return 0===(t=t>>14&1023)?536870912:t}var qt,Jt={},Kt={};function Yt(t){return!(!t||"object"!=typeof t||t.g!==Kt)}function Xt(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function Qt(t,e,n){if(null!=t)if("string"==typeof t)t=t?new M(t,j):V();else if(t.constructor!==M)if(L(t))t=t.length?new M(n?t:new Uint8Array(t),j):V();else{if(!e)throw Error();t=void 0}return t}function Zt(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 te=[];function ee(t){if(2&t)throw Error()}let ne,re;function oe(t,e){(e=ne?e[ne]:void 0)&&(t[ne]=Nt(e))}zt(te,55),qt=Object.freeze(te);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 se(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function ae(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 ue=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function ce(t){const e=typeof t;return"number"===e?Number.isFinite(t):"string"===e&&ue.test(t)}function le(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 he(t){return"-"!==t[0]&&(20>t.length||20===t.length&&184467>Number(t.substring(0,6)))}function fe(t){return t=Math.trunc(t),Number.isSafeInteger(t)||(J(t),t=X(H,q)),t}function de(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(z())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 ge(t){if("string"!=typeof t)throw Error();return t}function pe(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function me(t){return null==t||"string"==typeof t?t:void 0}function ye(t,e,n){if(null!=t&&"object"==typeof t&&t.B===Jt)return t;if(Array.isArray(t)){var r=Gt(t),o=r;return 0===o&&(o|=32&n),(o|=2&n)!==r&&zt(t,o),new e(t)}}let ve,be,we;function _e(t){switch(typeof t){case"boolean":return be||=[0,void 0,!0];case"number":return 0<t?void 0:0===t?we||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}function Ae(t,e,n){if(null==t&&(t=ve),ve=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 o=(n=t).length;if(o){const t=o-1;if(Xt(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,o-(+!!(512&r)-1))))throw Error();r=-16760833&r|(1023&e)<<14}}}return zt(t,r),t}function Se(t,e,n,r,o){if(null!=t){if(Array.isArray(t))t=Zt(t,void 0,0)?void 0:o&&2&Gt(t)?t:Ee(t,e,n,void 0!==r,o);else if(Xt(t)){const i={};for(let s in t)i[s]=Se(t[s],e,n,r,o);t=i}else t=e(t,r);return t}}function Ee(t,e,n,r,o){const i=r||n?Gt(t):0;r=r?!!(32&i):void 0;const s=Nt(t);for(let t=0;t<s.length;t++)s[t]=Se(s[t],e,n,r,o);return n&&(oe(s,t),n(i,s)),s}function Te(t){return t.B===Jt?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(Zt(t,void 0,0))return}else{if(L(t))return T(t);if(t instanceof M){const e=t.g;return null==e?"":"string"==typeof e?e:t.g=T(e)}}}return t}(t)}function Ie(t,e,n=Rt){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)):Ee(t,Ie,4&r?Rt:n,!0,!0))}return t.B===Jt&&(n=t.l,t=2&(r=$t(n))?t:xe(t,n,r,!0)),t}}function Pe(t){const e=t.l;return xe(t,e,$t(e),!1)}function xe(t,e,n,r){return t=t.constructor,ve=e=Oe(e,n,r),e=new t(e),ve=void 0,e}function Oe(t,e,n){const r=n||2&e?Rt:Wt,o=!!(32&e);return t=function(t,e,n){const r=Nt(t);var o=r.length;const i=256&e?r[o-1]:void 0;for(o+=i?-1:0,e=512&e?1:0;e<o;e++)r[e]=n(r[e]);if(i){e=r[e]={};for(const t in i)e[t]=n(i[t])}return oe(r,t),r}(t,e,(t=>Ie(t,o,r))),Mt(t,32|(n?2:0)),t}function Le(t){const e=t.l,n=$t(e);return 2&n?xe(t,e,n,!1):t}function Be(t,e){return Fe(t=t.l,$t(t),e)}function Fe(t,e,n,r){if(-1===n)return null;if(n>=Ht(e)){if(256&e)return t[t.length-1][n]}else{var o=t.length;if(r&&256&e&&null!=(r=t[o-1][n]))return r;if((e=n+(+!!(512&e)-1))<o)return t[e]}}function je(t,e,n,r){const o=t.l;let i=$t(o);return ee(i),Ue(o,i,e,n,r),t}function Ue(t,e,n,r,o){const i=Ht(e);if(n>=i||o){let s=e;if(256&e)o=t[t.length-1];else{if(null==r)return s;o=t[i+(+!!(512&e)-1)]={},s|=256}return o[n]=r,n<i&&(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,o){var i=2&e;let s=Fe(t,e,n,o);Array.isArray(s)||(s=qt);const a=!(2&r);r=!(1&r);const u=!!(32&e);let c=Gt(s);return 0!==c||!u||i||a?1&c||(c|=1,zt(s,c)):(c|=33,zt(s,c)),i?(t=!1,2&c||(Mt(s,34),t=!!(4&c)),(r||t)&&Object.freeze(s)):(i=!!(2&c)||!!(2048&c),r&&i?(s=Nt(s),r=1,u&&!a&&(r|=32),zt(s,r),Ue(t,e,n,s,o)):a&&32&c&&!i&&Dt(s,32)),s}function Ve(t){t=t.l;let e=$t(t);const n=Fe(t,e,1),r=Qt(n,!0,!!(34&e));return null!=r&&r!==n&&Ue(t,e,1,r),r}function Ne(t,e){return t=Fe(t,e,1),Array.isArray(t)?t:qt}function Me(t,e,n){return 0===t&&(t=Ze(t,e,n)),Ct(t,1,!0)}function De(t){return!!(2&t)&&!!(4&t)||!!(2048&t)}function Ce(t,e,n){{const s=t.l;let a=$t(s);if(ee(a),null==n)Ue(s,a,e);else{var r,o=t=Gt(n),i=!!(2&t)||Object.isFrozen(n);if((r=!i)&&(r=!1),!(4&t))for(t=21,i&&(n=Nt(n),o=0,t=Ze(t,a,!0)),i=0;i<n.length;i++)n[i]=ge(n[i]);r&&(n=Nt(n),o=0,t=Ze(t,a,!0)),t!==o&&zt(n,t),Ue(s,a,e,n)}}}function Ge(t,e){t=t.l;let n=$t(t);ee(n),Ue(t,n,2,""===e?void 0:e)}function $e(t,e,n,r){const o=$t(t);ee(o),t=ke(t,o,e,2),r=n(r,!!(4&(e=Gt(t)))&&!!(4096&e)),t.push(r)}function ze(t){return t}function We(t,e){return Re(t=t.l,$t(t),ao)===e?e:-1}function Re(t,e,n){let r=0;for(let o=0;o<n.length;o++){const i=n[o];null!=Fe(t,e,i)&&(0!==r&&(e=Ue(t,e,r)),r=i)}return r}function He(t,e,n,r){let o=$t(t);ee(o);const i=Fe(t,o,n,r);let s;if(null!=i&&i.B===Jt)return(e=Le(i))!==i&&Ue(t,o,n,e,r),e.l;if(Array.isArray(i)){const t=Gt(i);s=2&t?Oe(i,t,!1):i,s=Ae(s,e[0],e[1])}else s=Ae(void 0,e[0],e[1]);return s!==i&&Ue(t,o,n,s,r),s}function qe(t,e,n,r){t=t.l;let o=$t(t);const i=Fe(t,o,n,r);return(e=ye(i,e,o))!==i&&null!=e&&Ue(t,o,n,e,r),e}function Je(t,e,n){if(null==(e=qe(t,e,n,!1)))return e;t=t.l;let r=$t(t);if(!(2&r)){const o=Le(e);o!==e&&Ue(t,r,n,e=o,!1)}return e}function Ke(t,e,n,r,o){var i=!!(2&e),s=i?1:2;const a=1===s;s=2===s,r=!!r,o&&=!i,i=Ne(t,e);var u=Gt(i);const c=!!(4&u);if(!c){var l,h=i,f=e;(l=!!(2&(u=Me(u,e,r))))&&(f=Ct(f,2,!0));let t=!l,o=!0,s=0,a=0;for(;s<h.length;s++){const e=ye(h[s],n,f);if(e instanceof n){if(!l){const n=!!(2&Gt(e.l));t&&=!n,o&&=n}h[a++]=e}}a<s&&(h.length=a),u=Ct(u,4,!0),u=Ct(u,16,o),u=Ct(u,8,t),zt(h,u),l&&Object.freeze(h)}if(n=!!(8&u)||a&&!i.length,o&&!n){for(De(u)&&(i=Nt(i),u=Ze(u,e,r),e=Ue(t,e,1,i)),o=i,n=u,h=0;h<o.length;h++)(u=o[h])!==(f=Le(u))&&(o[h]=f);n=Ct(n,8,!0),n=Ct(n,16,!o.length),zt(o,n),u=n}return De(u)||(o=u,a?u=Ct(u,!i.length||16&u&&(!c||32&u)?2:2048,!0):r||(u=Ct(u,32,!1)),u!==o&&zt(i,u),a&&Object.freeze(i)),s&&De(u)&&(i=Nt(i),u=Ze(u,e,r),zt(i,u),Ue(t,e,1,i)),i}function Ye(t,e){t=t.l;const n=$t(t);return Ke(t,n,e,!1,!(2&n))}function Xe(t,e,n,r,o){return null==r&&(r=void 0),je(t,n,r,o)}function Qe(t,e,n){var r=Rr;null==n&&(n=void 0),t=t.l;let o=$t(t);ee(o),(r=Re(t,o,r))&&r!==e&&null!=n&&(o=Ue(t,o,r)),Ue(t,o,e,n)}function Ze(t,e,n){return t=Ct(t,2,!!(2&e)),t=Ct(t,32,!!(32&e)&&n),Ct(t,2048,!1)}function tn(t,e){var n=Br;t=t.l;const r=$t(t);ee(r),t=Ke(t,r,n,!0),e=null!=e?e:new n,t.push(e),2&Gt(e.l)?Dt(t,8):Dt(t,16)}function en(t){return null==(t=Be(t,2))?t:ce(t)?"number"==typeof t?fe(t):de(t):void 0}function nn(t){return t??0}function rn(t,e,n){$e(t.l,e,ge,n)}function on(t,e,n){e.g?e.j(t,e.g,e.i,n,!0):e.j(t,e.i,n,!0)}var sn=class{constructor(t,e){this.l=Ae(t,e)}toJSON(){return an(this,Ee(this.l,Te,void 0,void 0,!1),!0)}v(){return!!(2&Gt(this.l))}};function an(t,e,n){var r=f?void 0:t.constructor.u;const o=$t(n?t.l:e);if(!(t=e.length))return e;let i,s;if(Xt(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;(Zt(n,r,+u)||Yt(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&&(i=!0),t--}for(u=+!!(512&o)-1;0<t&&(n=e[c=t-1],c-=u,null==n||Zt(n,r,c)||Yt(n)&&0===n.size);t--)s=!0;return i||s?(e=Array.prototype.slice.call(e,0,t),a&&e.push(a),e):e}function un(t){return Array.isArray(t)?t[0]instanceof Vt?t:[ir,t]:[t,void 0]}function cn(t,e){if(Array.isArray(e)){var n=Gt(e);if(4&n)return e;for(var r=0,o=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[o++]=n)}return o<r&&(e.length=o),zt(e,-12289&(5|n)),2&n&&Object.freeze(e),e}}sn.prototype.B=Jt,sn.prototype.toString=function(){return an(this,this.l,!1).toString()};const ln=Symbol();function hn(t){let e=t[ln];if(!e){const n=bn(t),r=Bn(t),o=r.j;e=o?(t,e)=>o(t,e,r):(t,e)=>{for(;dt(e)&&4!=e.i;){var o=e.m,i=r[o];if(!i){var s=r.D;s&&(s=s[o])&&(i=r[o]=fn(s))}i&&i(e,t,o)||(o=(i=e).j,gt(i),i.I?i=void 0:(s=i.g.g-o,i.g.g=o,i=ht(i.g,s)),o=t,i&&(ne||=Symbol(),(s=o[ne])?s.push(i):o[ne]=[i]))}n===gn||n===pn||n.s||(t[re||=Symbol()]=n)},t[ln]=e}return e}function fn(t){const e=(t=un(t))[0].g;if(t=t[1]){const n=hn(t),r=Bn(t).A;return(t,o,i)=>e(t,o,i,r,n)}return e}class dn{}let gn,pn;const mn=Symbol();function yn(t,e,n){const r=n[1];let o;if(r){const n=r[mn];o=n?n.A:_e(r[0]),t[e]=n??r}o&&o===be?(t.g||(t.g=new Set)).add(e):n[0]&&(t.i||(t.i=new Set)).add(e)}function vn(t,e){return[t.j,!e||0<e[0]?void 0:e]}function bn(t){var e=t[mn];if(e)return e;if(!(e=_n(t,t[mn]=new dn,vn,vn,yn)).D&&!e.i&&!e.g){let n=!0;for(let t in e)isNaN(t)||(n=!1);n?(_e(t[0])===be?pn?e=pn:((e=new dn).A=_e(!0),e=pn=e):e=gn||=new dn,e=t[mn]=e):e.s=!0}return e}function wn(t,e,n){t[e]=n}function _n(t,e,n,r,o=wn){e.A=_e(t[0]);let i=0;var s=t[++i];s&&s.constructor===Object&&(e.D=s,"function"==typeof(s=t[++i])&&(e.j=s,e.m=t[++i],s=t[++i]));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[++i]}for(u=1;void 0!==s;){let h;"number"==typeof s&&(u+=s,s=t[++i]);var c=void 0;if(s instanceof Vt?h=s:(h=sr,i--),h.J){s=t[++i],c=t;var l=i;"function"==typeof s&&(s=s(),c[l]=s),c=s}for(l=u+1,"number"==typeof(s=t[++i])&&0>s&&(l-=s,s=t[++i]);u<l;u++){const t=a[u];o(e,u,c?r(h,c,t):n(h,t))}}return e}const An=Symbol();function Sn(t){let e=t[An];if(!e){const n=Pn(t);e=(t,e)=>Un(t,e,n),t[An]=e}return e}const En=Symbol();function Tn(t){return t.i}function In(t,e){let n,r;const o=t.i;return(t,i,s)=>o(t,i,s,r||=Pn(e).A,n||=Sn(e))}function Pn(t){let e=t[En];return e||(e=_n(t,t[En]={},Tn,In),Fn(t),e)}const xn=Symbol();function On(t,e){const n=t.g;return e?(t,r,o)=>n(t,r,o,e):n}function Ln(t,e,n){const r=t.g;let o,i;return(t,s,a)=>r(t,s,a,i||=Bn(e).A,o||=hn(e),n)}function Bn(t){let e=t[xn];return e||(bn(t),e=_n(t,t[xn]={},On,Ln),Fn(t),e)}function Fn(t){xn in t&&mn in t&&En in t&&(t.length=0)}function jn(t,e){var n=t[e];if(n)return n;if((n=t.D)&&(n=n[e])){var r=(n=un(n))[0].i;if(n=n[1]){const e=Sn(n),o=Pn(n).A;n=(n=t.m)?n(o,e):(t,n,i)=>r(t,n,i,o,e)}else n=r;return t[e]=n}}function Un(t,e,n){for(var r=$t(t),o=+!!(512&r)-1,i=t.length,s=512&r?1:0,a=i+(256&r?-1:0);s<a;s++){const r=t[s];if(null==r)continue;const i=s-o,a=jn(n,i);a&&a(e,r,i)}if(256&r){r=t[i-1];for(let t in r)o=+t,Number.isNaN(o)||null!=(i=r[t])&&(a=jn(n,o))&&a(e,i,o)}if(t=ne?t[ne]:void 0)for(Lt(e,e.g.end()),n=0;n<t.length;n++)Lt(e,N(t[n])||F())}function kn(t,e){return new Vt(t,e,!1,!1)}function Vn(t,e){return new Vt(t,e,!0,!1)}function Nn(t,e,n){Ue(t,$t(t),e,n)}function Mn(t,e,n){t:if(null!=e){if(ce(e)){if("string"==typeof e){e=de(e);break t}if("number"==typeof e){e=fe(e);break t}}e=void 0}null!=e&&("string"==typeof e&&St(e),null!=e&&(Bt(t,n,0),"number"==typeof e?(t=t.g,J(e),It(t,H,q)):(n=St(e),It(t.g,n.i,n.g))))}function Dn(t,e,n){null!=(e=le(e))&&null!=e&&(Bt(t,n,0),xt(t.g,e))}function Cn(t,e,n){null!=(e=null==e||"boolean"==typeof e?e:"number"==typeof e?!!e:void 0)&&(Bt(t,n,0),t.g.g.push(e?1:0))}function Gn(t,e,n){null!=(e=me(e))&&Ut(t,n,c(e))}function $n(t,e,n,r,o){null!=(e=e instanceof sn?e.l:Array.isArray(e)?Ae(e,r[0],r[1]):void 0)&&(n=Ft(t,n),o(e,t),jt(t,n))}function zn(t,e,n){null!=(e=null==e||"string"==typeof e||L(e)||e instanceof M?e:void 0)&&Ut(t,n,$(e).buffer)}var Wn,Rn=kn((function(t,e,n){if(1!==t.i)return!1;var r=t.g;t=it(r);const o=it(r);r=2*(o>>31)+1;const i=o>>>20&2047;return t=4294967296*(1048575&o)+t,Nn(e,n,2047==i?t?NaN:1/0*r:0==i?r*Math.pow(2,-1074)*t:r*Math.pow(2,i-1075)*(t+4503599627370496)),!0}),(function(t,e,n){null!=(e=se(e))&&(Bt(t,n,1),t=t.g,(n=R||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),H=n.getUint32(0,!0),q=n.getUint32(4,!0),Ot(t,H),Ot(t,q))})),Hn=kn((function(t,e,n){return 5===t.i&&(Nn(e,n,st(t.g)),!0)}),(function(t,e,n){null!=(e=se(e))&&(Bt(t,n,5),t=t.g,K(e),Ot(t,H))})),qn=Vn((function(t,e,n){return(5===t.i||2===t.i)&&(e=ke(e,$t(e),n,2,!1),2==t.i?vt(t,st,e):e.push(st(t.g)),!0)}),(function(t,e,n){if(null!=(e=cn(se,e))&&e.length){Bt(t,n,2),Pt(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,K(e[r]),Ot(n,H)}})),Jn=kn((function(t,e,n){return 0===t.i&&(Nn(e,n,nt(t.g,X)),!0)}),Mn),Kn=kn((function(t,e,n){return 0===t.i&&(Nn(e,n,0===(t=nt(t.g,X))?void 0:t),!0)}),Mn),Yn=kn((function(t,e,n){return 0===t.i&&(Nn(e,n,nt(t.g,Y)),!0)}),(function(t,e,n){t:if(null!=e){if(ce(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)),he(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 he(String(t))?t:(J(t),Y(H,q))}(e);break t}}e=void 0}null!=e&&("string"==typeof e&&wt(e),null!=e&&(Bt(t,n,0),"number"==typeof e?(t=t.g,J(e),It(t,H,q)):(n=wt(e),It(t.g,n.i,n.g))))})),Xn=kn((function(t,e,n){return 0===t.i&&(Nn(e,n,ot(t.g)),!0)}),Dn),Qn=Vn((function(t,e,n){return(0===t.i||2===t.i)&&(e=ke(e,$t(e),n,2,!1),2==t.i?vt(t,ot,e):e.push(ot(t.g)),!0)}),(function(t,e,n){if(null!=(e=cn(le,e))&&e.length){n=Ft(t,n);for(let n=0;n<e.length;n++)xt(t.g,e[n]);jt(t,n)}})),Zn=kn((function(t,e,n){return 0===t.i&&(Nn(e,n,0===(t=ot(t.g))?void 0:t),!0)}),Dn),tr=kn((function(t,e,n){return 0===t.i&&(Nn(e,n,rt(t.g)),!0)}),Cn),er=kn((function(t,e,n){return 0===t.i&&(Nn(e,n,!1===(t=rt(t.g))?void 0:t),!0)}),Cn),nr=Vn((function(t,e,n){return 2===t.i&&($e(e,n,ze,t=mt(t)),!0)}),(function(t,e,n){if(null!=(e=cn(me,e)))for(let s=0;s<e.length;s++){var r=t,o=n,i=e[s];null!=i&&Ut(r,o,c(i))}})),rr=kn((function(t,e,n){return 2===t.i&&(Nn(e,n,""===(t=mt(t))?void 0:t),!0)}),Gn),or=kn((function(t,e,n){return 2===t.i&&(Nn(e,n,mt(t)),!0)}),Gn),ir=new Vt((function(t,e,n,r,o){return 2===t.i&&(pt(t,He(e,r,n,!0),o),!0)}),$n,!1,!0),sr=new Vt((function(t,e,n,r,o){return 2===t.i&&(pt(t,He(e,r,n),o),!0)}),$n,!1,!0);Wn=new Vt((function(t,e,n,r,o){if(2!==t.i)return!1;r=Ae(void 0,r[0],r[1]);let i=$t(e);ee(i);let s=ke(e,i,n,3);return i=$t(e),4&Gt(s)&&(s=Nt(s),zt(s,-2079&(1|Gt(s))),Ue(e,i,n,s)),s.push(r),pt(t,r,o),!0}),(function(t,e,n,r,o){if(Array.isArray(e))for(let i=0;i<e.length;i++)$n(t,e[i],n,r,o)}),!0,!0);var ar=new Vt((function(t,e,n,r,o,i){if(2!==t.i)return!1;let s=$t(e);return ee(s),(i=Re(e,s,i))&&n!==i&&Ue(e,s,i),pt(t,e=He(e,r,n),o),!0}),$n,!1,!0),ur=kn((function(t,e,n){return 2===t.i&&(Nn(e,n,yt(t)),!0)}),zn),cr=kn((function(t,e,n){return 0===t.i&&(Nn(e,n,ot(t.g)),!0)}),(function(t,e,n){null!=(e=le(e))&&(e=parseInt(e,10),Bt(t,n,0),xt(t.g,e))})),lr=Vn((function(t,e,n){return(0===t.i||2===t.i)&&(e=ke(e,$t(e),n,2,!1),2==t.i?vt(t,at,e):e.push(ot(t.g)),!0)}),(function(t,e,n){if(null!=(e=cn(le,e))&&e.length){n=Ft(t,n);for(let n=0;n<e.length;n++)xt(t.g,e[n]);jt(t,n)}}));class hr{constructor(t,e){this.i=t,this.g=e,this.j=Xe,this.defaultValue=void 0}}function fr(t,e){return(n,r)=>{t:{if(bt.length){const t=bt.pop();t.o(r),ut(t.g,n,r),n=t}else n=new class{constructor(t,e){if(ft.length){const n=ft.pop();ut(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,ut(this,t,e)}clear(){this.i=null,this.m=!1,this.g=this.j=this.s=0,this.C=!1}}(t,e);this.g=t,this.j=this.g.g,this.i=this.m=-1,this.o(e)}o({I:t=!1}={}){this.I=t}}(n,r);try{const r=new t,i=r.l;hn(e)(i,n);var o=r;break t}finally{n.g.clear(),n.m=-1,n.i=-1,100>bt.length&&bt.push(n)}o=void 0}return o}}var dr=[0,rr,kn((function(t,e,n){return 2===t.i&&(Nn(e,n,(t=yt(t))===V()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof sn){const r=e.P;return void(r&&(e=r(e),null!=e&&Ut(t,n,$(e).buffer)))}if(Array.isArray(e))return}zn(t,e,n)}))],gr=[0,or],pr=[0,Xn,cr,tr,-1,Qn,cr,-1],mr=[0,tr,-1],yr=class extends sn{constructor(){super()}};yr.u=[6];var vr=[0,tr,or,tr,cr,-1,lr,or,-1,mr,cr],br=[0,or,-2],wr=class extends sn{constructor(){super()}},_r=[0],Ar=[0,Xn,tr,-3],Sr=class extends sn{constructor(t){super(t,2)}},Er={},Tr=[-2,Er,tr];Er[336783863]=[0,or,tr,-1,Xn,[0,[1,2,3,4,5],ar,_r,ar,vr,ar,br,ar,Ar,ar,pr],gr];var Ir=[0,rr,er],Pr=[0,Kn,-1,er,-3,Kn,Qn,rr,Zn,Kn,-1,er,Zn,er,-2,rr],xr=[-1,{}],Or=[0,or,1,xr],Lr=[0,or,nr,xr],Br=class extends sn{constructor(t){super(t,500)}o(t){return Xe(this,0,7,t)}};Br.u=[3,4,5,6,8,13,17,1005];var Fr,jr=[-500,rr,-1,nr,-3,Tr,Wn,dr,Zn,-1,Or,Lr,Wn,Ir,rr,Pr,Zn,nr,987,nr],Ur=[0,rr,-1,xr],kr=[-500,or,-1,[-1,{}],998,or],Vr=[-500,or,nr,-1,[-2,{},tr],997,nr,-1],Nr=[-500,or,nr,xr,998,nr],Mr=class extends sn{constructor(){super(void 0,500)}o(t){return Xe(this,0,1001,t)}};Mr.u=[1,6,7,9,10,15,16,17,14,1002],Mr.prototype.g=(Fr=[-500,Wn,jr,4,Wn,kr,Wn,Vr,Zn,Wn,Nr,nr,Zn,Or,Lr,Wn,Ur,nr,-2,Pr,rr,-1,er,979,xr,Wn,dr],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}}}};Un(this.l,t,Pn(Fr)),Lt(t,t.g.end());const e=new Uint8Array(t.i),n=t.j,r=n.length;let o=0;for(let t=0;t<r;t++){const r=n[t];e.set(r,o),o+=r.length}return t.j=[e],e});var Dr=class extends sn{constructor(t){super(t)}},Cr=[0,Xn,Hn,or,-1],Gr=class extends sn{constructor(t){super(t)}g(){return Ye(this,Dr)}};Gr.u=[1];var $r=[0,Wn,Cr],zr=class extends sn{constructor(t){super(t)}};zr.u=[4,5];var Wr=class extends sn{constructor(t){super(t)}},Rr=[1,2,3,4,5],Hr=class extends sn{constructor(t){super(t)}g(){return null!=Ve(this)}i(){return null!=me(Be(this,2))}},qr=class extends sn{constructor(t){super(t)}},Jr=[0,[0,ur,or,[0,Xn,Jn,-1],[0,Yn,Jn]],tr,[0,Rr,ar,Ar,ar,vr,ar,pr,ar,_r,ar,br],cr],Kr=class extends sn{constructor(t){super(t)}},Yr=new hr(451755788,Kr);Er[451755788]=[0,Jr,[0,or,Xn,Hn,nr,-1],Rn];var Xr=class extends sn{constructor(t){super(t)}},Qr=class extends sn{constructor(t){super(t)}},Zr=new hr(487277289,Qr);Er[487277289]=[0,Jr,[0,tr,-1]];var to=class extends sn{constructor(t){super(t)}},eo=[0,1,Xn,or,$r],no=class extends sn{constructor(t){super(t)}};no.u=[1];var ro=fr(no,[0,Wn,eo,Jn]),oo=class extends sn{constructor(t){super(t)}};oo.u=[1];var io=class extends sn{constructor(t){super(t)}K(){const t=Ve(this);return null==t?V():t}},so=class extends sn{constructor(t){super(t)}},ao=[1,2],uo=[0,ao,ar,[0,qn],ar,[0,ur],Xn,or],co=class extends sn{constructor(t){super(t)}};co.u=[1];var lo=fr(co,[0,Wn,uo,Jn]);async function ho(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())}function fo(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 go(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 po(t,e,n){t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=n}function mo(t,e,n){let r=[];t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=(t,e,o)=>{e?(n(r,o),r=[]):r.push(t)}}const yo=function(t){return class extends t{N(){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,o){this.h._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),fo(this,r||"input_audio",(r=>{fo(this,o=o||"audio_header",(o=>{this.h._configureAudio(r,o,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,o){const i=4*t.length;this.i!==i&&(this.g&&this.h._free(this.g),this.g=this.h._malloc(i),this.i=i),this.h.HEAPF32.set(t,this.g/4),fo(this,r,(t=>{this.h._addAudioToInputStream(this.g,e,n,t,o)}))}addGpuBufferToStream(t,e,n){fo(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[o,i]=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||o===this.h.canvas.width&&i===this.h.canvas.height||(this.h.canvas.width=o,this.h.canvas.height=i);const[s,a]=[o,i];this.h._addBoundTextureToStream(e,s,a,n)}))}addBoolToStream(t,e,n){fo(this,e,(e=>{this.h._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){fo(this,e,(e=>{this.h._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){fo(this,e,(e=>{this.h._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){fo(this,e,(e=>{this.h._addIntToInputStream(t,e,n)}))}addStringToStream(t,e,n){fo(this,e,(e=>{fo(this,t,(t=>{this.h._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){fo(this,e,(e=>{go(this,Object.keys(t),(r=>{go(this,Object.values(t),(o=>{this.h._addFlatHashMapToInputStream(r,o,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){fo(this,n,(n=>{fo(this,e,(e=>{const o=this.h._malloc(t.length);this.h.HEAPU8.set(t,o),this.h._addProtoToInputStream(o,t.length,e,n,r),this.h._free(o)}))}))}addEmptyPacketToStream(t,e){fo(this,t,(t=>{this.h._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){fo(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){fo(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){fo(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){fo(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){fo(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)fo(this,e,(t=>{this.h._addStringVectorEntry(r,t)}));this.h._addStringVectorToInputStream(r,e,n)}))}addBoolToInputSidePacket(t,e){fo(this,e,(e=>{this.h._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){fo(this,e,(e=>{this.h._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){fo(this,e,(e=>{this.h._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){fo(this,e,(e=>{this.h._addIntToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){fo(this,e,(e=>{fo(this,t,(t=>{this.h._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){fo(this,n,(n=>{fo(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){fo(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){fo(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){fo(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){fo(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){fo(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)fo(this,e,(t=>{this.h._addStringVectorEntry(n,t)}));this.h._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){po(this,t,e),fo(this,t,(t=>{this.h._attachBoolListener(t)}))}attachBoolVectorListener(t,e){mo(this,t,e),fo(this,t,(t=>{this.h._attachBoolVectorListener(t)}))}attachIntListener(t,e){po(this,t,e),fo(this,t,(t=>{this.h._attachIntListener(t)}))}attachIntVectorListener(t,e){mo(this,t,e),fo(this,t,(t=>{this.h._attachIntVectorListener(t)}))}attachDoubleListener(t,e){po(this,t,e),fo(this,t,(t=>{this.h._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){mo(this,t,e),fo(this,t,(t=>{this.h._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){po(this,t,e),fo(this,t,(t=>{this.h._attachFloatListener(t)}))}attachFloatVectorListener(t,e){mo(this,t,e),fo(this,t,(t=>{this.h._attachFloatVectorListener(t)}))}attachStringListener(t,e){po(this,t,e),fo(this,t,(t=>{this.h._attachStringListener(t)}))}attachStringVectorListener(t,e){mo(this,t,e),fo(this,t,(t=>{this.h._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){po(this,t,e),fo(this,t,(t=>{this.h._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){mo(this,t,e),fo(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?'),po(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),fo(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 vo=class extends yo{};async function bo(t,e,n){return t=await(async(t,e,n,r)=>{if(e&&await ho(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await ho(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 wo(t,e,n){return bo(t,e,n)}function _o(t,e){const n=Je(t.baseOptions,Hr,1)||new Hr;"string"==typeof e?(je(n,2,pe(e)),je(n,1)):e instanceof Uint8Array&&(je(n,1,Qt(e,!1,!1)),je(n,2)),Xe(t.baseOptions,0,1,n)}function Ao(t,e){const n=e.baseOptions||{};if(e.baseOptions?.modelAssetBuffer&&e.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(Je(t.baseOptions,Hr,1)?.g()||Je(t.baseOptions,Hr,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=Je(t.baseOptions,Wr,3);if(!n){var r=n=new Wr;Qe(r,4,new wr)}"delegate"in e&&("GPU"===e.delegate?Qe(e=n,2,r=new yr):Qe(e=n,4,r=new wr)),Xe(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),_o(t,"/model.dat"),t.H()})):(_o(t,n.modelAssetBuffer),t.H(),Promise.resolve())}function So(t){try{const e=t.j.length;if(1===e)throw Error(t.j[0].message);if(1<e)throw Error("Encountered multiple errors: "+t.j.map((t=>t.message)).join(", "))}finally{t.j=[]}}function Eo(t,e){t.s=Math.max(t.s,e)}var To=class{constructor(t){this.g=t,this.j=[],this.s=0,this.g.setAutoRenderToScreen(!1)}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.j.push(Error(e))})),this.g.N(),this.g.setGraph(t,e),So(this)}finishProcessing(){this.g.finishProcessing(),So(this)}close(){this.g.closeGraph()}};async function Io(t,e,n){return wo(t,e,n)}To.prototype.close=To.prototype.close;var Po=class extends To{constructor(){super(...arguments),this.G=48e3}O(t){this.G=t}};function xo(t){const e={classifications:Ye(t,to).map((t=>function(t,e=-1,n=""){return{categories:t.map((t=>{var e=nn(le(Be(t,1)))??-1;const n=t.l;let r=$t(n);const o=Fe(n,r,2),i=se(o);return null!=i&&i!==o&&Ue(n,r,2,i),{index:e,score:i??0??0,categoryName:me(Be(t,3))??""??"",displayName:me(Be(t,4))??""??""}})),headIndex:e,headName:n}}(Je(t,Gr,4)?.g()??[],nn(le(Be(t,2))),me(Be(t,3))??"")))};return null!=en(t)&&(e.timestampMs=nn(en(t))),e}Po.prototype.setDefaultSampleRate=Po.prototype.O;var Oo=class extends Po{constructor(t,e){super(new vo(t,e)),this.m=[],Xe(t=this.i=new Kr,0,1,e=new qr)}get baseOptions(){return Je(this.i,qr,1)}set baseOptions(t){Xe(this.i,0,1,t)}o(t){var e=this.i,n=Je(this.i,zr,2);if(n=n?Pe(n):new zr,void 0!==t.displayNamesLocale?je(n,1,pe(t.displayNamesLocale)):void 0===t.displayNamesLocale&&je(n,1),void 0!==t.maxResults){var r=t.maxResults;if(null!=r){if("number"!=typeof r)throw ie();if(!Number.isFinite(r))throw ie();r|=0}je(n,2,r)}else"maxResults"in t&&je(n,2);if(void 0!==t.scoreThreshold){if(null!=(r=t.scoreThreshold)&&"number"!=typeof r)throw Error(`Value of float/double field must be a number, found ${typeof r}: ${r}`);je(n,3,r)}else"scoreThreshold"in t&&je(n,3);return void 0!==t.categoryAllowlist?Ce(n,4,t.categoryAllowlist):"categoryAllowlist"in t&&je(n,4),void 0!==t.categoryDenylist?Ce(n,5,t.categoryDenylist):"categoryDenylist"in t&&je(n,5),Xe(e,0,2,n),Ao(this,t)}L(t,e){return this.F(t,e??this.G,this.s+1)}F(t,e,n){return this.g.addDoubleToStream(e,"sample_rate",n),this.g.addAudioToStreamWithShape(t,1,t.length,"audio_in",n),this.m=[],this.finishProcessing(),[...this.m]}H(){var t=new Mr;rn(t,10,"audio_in"),rn(t,10,"sample_rate"),rn(t,15,"timestamped_classifications");const e=new Sr;on(e,Yr,this.i);const n=new Br;Ge(n,pe("mediapipe.tasks.audio.audio_classifier.AudioClassifierGraph")),rn(n,3,"AUDIO:audio_in"),rn(n,3,"SAMPLE_RATE:sample_rate"),rn(n,4,"TIMESTAMPED_CLASSIFICATIONS:timestamped_classifications"),n.o(e),tn(t,n),this.g.attachProtoVectorListener("timestamped_classifications",((t,e)=>{!function(t,e){e.forEach((e=>{e=ro(e),t.m.push(xo(e))}))}(this,t),Eo(this,e)})),this.g.attachEmptyPacketListener("timestamped_classifications",(t=>{Eo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Lo(t){return{embeddings:Ye(t,so).map((t=>{const e={headIndex:nn(le(Be(t,3)))??-1,headName:me(Be(t,4))??""??""};if(void 0!==qe(t,oo,We(t,1))){var n=void 0;t=Je(t,oo,We(t,1)).l;let s=$t(t);const a=2&s?1:2;n=!!n;let u=Ne(t,s);var r=Gt(u);if(!(4&r)){(4&r||Object.isFrozen(u))&&(u=Nt(u),r=Ze(r,s,n),s=Ue(t,s,1,u));for(var o=0,i=0;o<u.length;o++){const t=se(u[o]);null!=t&&(u[i++]=t)}i<o&&(u.length=i),r=Ct(r=Me(r,s,n),20,!0),r=Ct(r,4096,!1),r=Ct(r,8192,!1),zt(u,r),2&r&&Object.freeze(u)}De(r)||(o=r,(i=1===a)?r=Ct(r,2,!0):n||(r=Ct(r,32,!1)),r!==o&&zt(u,r),i&&Object.freeze(u)),2===a&&De(r)&&(u=Nt(u),r=Ze(r,s,n),zt(u,r),Ue(t,s,1,u)),e.floatEmbedding=u.slice()}else n=new Uint8Array(0),e.quantizedEmbedding=Je(t,io,We(t,2))?.K()?.i()??n;return e})),timestampMs:nn(en(t))}}Oo.prototype.classify=Oo.prototype.L,Oo.prototype.setOptions=Oo.prototype.o,Oo.createFromModelPath=function(t,e){return wo(Oo,t,{baseOptions:{modelAssetPath:e}})},Oo.createFromModelBuffer=function(t,e){return Io(Oo,t,{baseOptions:{modelAssetBuffer:e}})},Oo.createFromOptions=function(t,e){return Io(Oo,t,e)};var Bo=class extends Po{constructor(t,e){super(new vo(t,e)),this.m=[],Xe(t=this.i=new Qr,0,1,e=new qr)}get baseOptions(){return Je(this.i,qr,1)}set baseOptions(t){Xe(this.i,0,1,t)}o(t){var e=this.i,n=Je(this.i,Xr,2);return n=n?Pe(n):new Xr,void 0!==t.l2Normalize?je(n,1,ae(t.l2Normalize)):"l2Normalize"in t&&je(n,1),void 0!==t.quantize?je(n,2,ae(t.quantize)):"quantize"in t&&je(n,2),Xe(e,0,2,n),Ao(this,t)}M(t,e){return this.F(t,e??this.G,this.s+1)}F(t,e,n){return this.g.addDoubleToStream(e,"sample_rate",n),this.g.addAudioToStreamWithShape(t,1,t.length,"audio_in",n),this.m=[],this.finishProcessing(),this.m}H(){var t=new Mr;rn(t,10,"audio_in"),rn(t,10,"sample_rate"),rn(t,15,"embeddings_out"),rn(t,15,"timestamped_embeddings_out");const e=new Sr;on(e,Zr,this.i);const n=new Br;Ge(n,pe("mediapipe.tasks.audio.audio_embedder.AudioEmbedderGraph")),rn(n,3,"AUDIO:audio_in"),rn(n,3,"SAMPLE_RATE:sample_rate"),rn(n,4,"EMBEDDINGS:embeddings_out"),rn(n,4,"TIMESTAMPED_EMBEDDINGS:timestamped_embeddings_out"),n.o(e),tn(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=lo(t),this.m.push(Lo(t)),Eo(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{Eo(this,t)})),this.g.attachProtoVectorListener("timestamped_embeddings_out",((t,e)=>{for(const e of t)t=lo(e),this.m.push(Lo(t));Eo(this,e)})),this.g.attachEmptyPacketListener("timestamped_embeddings_out",(t=>{Eo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};let Fo;Bo.prototype.embed=Bo.prototype.M,Bo.prototype.setOptions=Bo.prototype.o,Bo.createFromModelPath=function(t,e){return Io(Bo,t,{baseOptions:{modelAssetPath:e}})},Bo.createFromModelBuffer=function(t,e){return Io(Bo,t,{baseOptions:{modelAssetBuffer:e}})},Bo.createFromOptions=function(t,e){return Io(Bo,t,e)};const jo=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 Uo(){if(void 0===Fo)try{await WebAssembly.instantiate(jo),Fo=!0}catch{Fo=!1}return Fo}async function ko(t,e=""){const n=await Uo()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var Vo=class{};Vo.forVisionTasks=function(t){return ko("vision",t)},Vo.forTextTasks=function(t){return ko("text",t)},Vo.forGenAiTasks=function(t){return ko("genai",t)},Vo.forAudioTasks=function(t){return ko("audio",t)},Vo.isSimdSupported=function(){return Uo()},exports.AudioClassifier=Oo,exports.AudioEmbedder=Bo,exports.AudioTaskRunner=Po,exports.FilesetResolver=Vo,exports.TaskRunner=To;
|
|
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,o=0;o<n.length;o++)if(null==(r=r[n[o]])){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 o,i;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 o=0;o<t.length;o++){var e=t.charCodeAt(o);if(128>e)r[n++]=e;else{if(2048>e)r[n++]=e>>6|192;else{if(55296<=e&&57343>=e){if(56319>=e&&o<t.length){const i=t.charCodeAt(++o);if(56320<=i&&57343>=i){e=1024*(e-55296)+i-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}o--}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),o=0;return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),o=w[n];if(null!=o)return o;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}A();for(var r=0;;){var o=n(-1),i=n(0),s=n(64),a=n(64);if(64===a&&-1===o)break;e(o<<2|i>>4),64!=s&&(e(i<<4&240|s>>2),64!=a&&e(s<<6&192|a))}}(t,(function(t){r[o++]=t})),o!==n?r.subarray(0,o):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 o=0;o<r.length;o++){var i=r[o];void 0===w[i]&&(w[i]=o)}}}}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 o=t[u],i=t[u+1],s=t[u+2],a=e[o>>2];o=e[(3&o)<<4|i>>4],i=e[(15&i)<<2|s>>6],s=e[63&s],n[c++]=a+o+i+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,P={"-":"+",_:"/",".":"="};function x(t){return P[t]||""}function O(t){if(!E)return _(t);I.test(t)&&(t=t.replace(I,x)),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 U;function k(t){if(t!==j)throw Error("illegal external caller")}function V(){return U||=new M(null,j)}function N(t){k(j);var e=t.g;return null==(e=null==e||L(e)?e:"string"==typeof e?O(e):null)?e:t.g=e}var M=class{constructor(t,e){if(k(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 D(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function C(){return Error("Failed to read varint, encoding is invalid.")}function G(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function $(t){if("string"==typeof t)return{buffer:O(t),v:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),v:!1};if(t.constructor===Uint8Array)return{buffer:t,v:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),v:!1};if(t.constructor===M)return{buffer:N(t)||F(),v:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),v:!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 z(){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 z()?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(z())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,o=(n-e)%6+e;o<=n;r=o,o+=6){const e=Number(t.slice(r,o));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,o=0,i=0;const s=t.i;let a=t.g;do{n=s[a++],r|=(127&n)<<i,i+=7}while(32>i&&128&n);for(32<i&&(o|=(127&n)>>4),i=3;32>i&&128&n;i+=7)n=s[a++],o|=(127&n)<<i;if(ct(t,a),128>n)return e(r>>>0,o>>>0);throw C()}function rt(t){let e=0,n=t.g;const r=n+10,o=t.i;for(;n<r;){const r=o[n++];if(e|=r,0==(128&r))return ct(t,n),!!(127&e)}throw C()}function ot(t){const e=t.i;let n=t.g,r=e[n++],o=127&r;if(128&r&&(r=e[n++],o|=(127&r)<<7,128&r&&(r=e[n++],o|=(127&r)<<14,128&r&&(r=e[n++],o|=(127&r)<<21,128&r&&(r=e[n++],o|=r<<28,128&r&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++]&&128&e[n++])))))throw C();return ct(t,n),o}function it(t){var e=t.i;const n=t.g,r=e[n],o=e[n+1],i=e[n+2];return e=e[n+3],ct(t,t.g+4),(r<<0|o<<8|i<<16|e<<24)>>>0}function st(t){var e=it(t);t=2*(e>>31)+1;const n=e>>>23&255;return e&=8388607,255==n?e?NaN:1/0*t:0==n?t*Math.pow(2,-149)*e:t*Math.pow(2,n-150)*(e+Math.pow(2,23))}function at(t){return ot(t)}function ut(t,e,{C:n=!1}={}){t.C=n,e&&(e=$(e),t.i=e.buffer,t.m=e.v,t.s=0,t.j=t.i.length,t.g=t.s)}function ct(t,e){if(t.g=e,e>t.j)throw G(t.j,e)}function lt(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 G(e,t.j-n);return t.g=r,n}function ht(t,e){if(0==e)return V();var n=lt(t,e);return t.C&&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 M(n,j)}var ft=[];function dt(t){var e=t.g;if(e.g==e.j)return!1;t.j=t.g.g;var n=ot(t.g)>>>0;if(e=n>>>3,!(0<=(n&=7)&&5>=n))throw D(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 gt(t){switch(t.i){case 0:0!=t.i?gt(t):rt(t.g);break;case 1:ct(t=t.g,t.g+8);break;case 2:if(2!=t.i)gt(t);else{var e=ot(t.g)>>>0;ct(t=t.g,t.g+e)}break;case 5:ct(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!dt(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.i){if(t.m!=e)throw Error("Unmatched end-group tag");break}gt(t)}break;default:throw D(t.i,t.j)}}function pt(t,e,n){const r=t.g.j,o=ot(t.g)>>>0,i=t.g.g+o;let s=i-r;if(0>=s&&(t.g.j=i,n(e,t,void 0,void 0,void 0),s=i-t.g.g),s)throw Error(`Message parsing ended unexpectedly. Expected to read ${o} bytes, instead read ${o-s} bytes, either the data ended unexpectedly or the message misreported its own length`);t.g.g=i,t.g.j=r}function mt(t){var e=ot(t.g)>>>0,a=lt(t=t.g,e);if(t=t.i,s){var u,c=t;(u=i)||(u=i=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===o){try{u.decode(new Uint8Array([128]))}catch(t){}try{u.decode(new Uint8Array([97])),o=!0}catch(t){o=!1}}throw!o&&(i=void 0),t}}else{e=(l=a)+e,a=[];let o,i=null;for(;l<e;){var h=t[l++];128>h?a.push(h):224>h?l>=e?n():(o=t[l++],194>h||128!=(192&o)?(l--,n()):a.push((31&h)<<6|63&o)):240>h?l>=e-1?n():(o=t[l++],128!=(192&o)||224===h&&160>o||237===h&&160<=o||128!=(192&(u=t[l++]))?(l--,n()):a.push((15&h)<<12|(63&o)<<6|63&u)):244>=h?l>=e-2?n():(o=t[l++],128!=(192&o)||0!=o-144+(h<<28)>>30||128!=(192&(u=t[l++]))||128!=(192&(c=t[l++]))?(l--,n()):(h=(7&h)<<18|(63&o)<<12|(63&u)<<6|63&c,h-=65536,a.push(55296+(h>>10&1023),56320+(1023&h)))):n(),8192<=a.length&&(i=r(i,a),a.length=0)}l=r(i,a)}return l}function yt(t){const e=ot(t.g)>>>0;return ht(t.g,e)}function vt(t,e,n){var r=ot(t.g)>>>0;for(r=t.g.g+r;t.g.g<r;)n.push(e(t.g))}var bt=[];function wt(t){return t?/^\d+$/.test(t)?(tt(t),new _t(H,q)):null:At||=new _t(0,0)}var _t=class{constructor(t,e){this.i=t>>>0,this.g=e>>>0}};let At;function St(t){return t?/^-?\d+$/.test(t)?(tt(t),new Et(H,q)):null:Tt||=new Et(0,0)}var Et=class{constructor(t,e){this.i=t>>>0,this.g=e>>>0}};let Tt;function It(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 Pt(t,e){for(;127<e;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function xt(t,e){if(0<=e)Pt(t,e);else{for(let n=0;9>n;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Ot(t,e){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 Lt(t,e){0!==e.length&&(t.j.push(e),t.i+=e.length)}function Bt(t,e,n){Pt(t.g,8*e+n)}function Ft(t,e){return Bt(t,e,2),e=t.g.end(),Lt(t,e),e.push(t.i),e}function jt(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 Ut(t,e,n){Bt(t,e,2),Pt(t.g,n.length),Lt(t,t.g.end()),Lt(t,n)}class kt{constructor(t,e,n,r){this.g=t,this.i=e,this.j=n,this.J=r}}function Vt(t){return Array.prototype.slice.call(t)}function Nt(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():t}var Mt=Nt(),Dt=Nt("2ex"),Ct=Nt("0dg"),Gt=Mt?(t,e)=>{t[Mt]|=e}:(t,e)=>{void 0!==t.g?t.g|=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}})},$t=Mt?(t,e)=>{t[Mt]&=~e}:(t,e)=>{void 0!==t.g&&(t.g&=~e)};function zt(t,e,n){return n?t|e:t&~e}var Wt=Mt?t=>0|t[Mt]:t=>0|t.g,Rt=Mt?t=>t[Mt]:t=>t.g,Ht=Mt?(t,e)=>(t[Mt]=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 qt(t,e){Ht(e,-14591&(0|t))}function Jt(t,e){Ht(e,-14557&(34|t))}function Kt(t){return 0===(t=t>>14&1023)?536870912:t}var Yt,Xt={},Qt={};function Zt(t){return!(!t||"object"!=typeof t||t.g!==Qt)}function te(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function ee(t,e,n){if(null!=t)if("string"==typeof t)t=t?new M(t,j):V();else if(t.constructor!==M)if(L(t))t=t.length?new M(n?t:new Uint8Array(t),j):V();else{if(!e)throw Error();t=void 0}return t}function ne(t,e,n){if(!Array.isArray(t)||t.length)return!1;const r=Wt(t);return!!(1&r)||!(!e||!(Array.isArray(e)?e.includes(n):e.has(n)))&&(Ht(t,1|r),!0)}const re=[];function oe(t){if(2&t)throw Error()}let ie,se,ae;function ue(t,e){(e=ie?e[ie]:void 0)&&(t[ie]=Vt(e))}Ht(re,55),Yt=Object.freeze(re);function ce(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function le(){const e=Error();ce(e,"incident"),function(e){t.setTimeout((()=>{throw e}),0)}(e)}function he(){const t=Error("int32");return ce(t,"warning"),t}function fe(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function de(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 ge=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function pe(t){const e=typeof t;return"number"===e?Number.isFinite(t):"string"===e&&ge.test(t)}function me(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 ye(t){return"-"!==t[0]&&(20>t.length||20===t.length&&184467>Number(t.substring(0,6)))}function ve(t){return t=Math.trunc(t),Number.isSafeInteger(t)||(J(t),t=X(H,q)),t}function be(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(z())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 we(t){if("string"!=typeof t)throw Error();return t}function _e(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function Ae(t){return null==t||"string"==typeof t?t:void 0}function Se(t,e,n){if(null!=t&&"object"==typeof t&&t.B===Xt)return t;if(Array.isArray(t)){var r=Wt(t),o=r;return 0===o&&(o|=32&n),(o|=2&n)!==r&&Ht(t,o),new e(t)}}let Ee,Te,Ie;function Pe(t){switch(typeof t){case"boolean":return Te||=[0,void 0,!0];case"number":return 0<t?void 0:0===t?Ie||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}function xe(t,e,n){if(null==t&&(t=Ee),Ee=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("narr");if(2048&(r=Wt(t)))throw Error("farr");if(64&r)return t;if(r|=64,n&&(r|=512,n!==t[0]))throw Error("mid");t:{const o=(n=t).length;if(o){const t=o-1;if(te(n[t])){if(1024<=(e=t-(+!!(512&(r|=256))-1)))throw Error("pvtlmt");r=-16760833&r|(1023&e)<<14;break t}}if(e){if(1024<(e=Math.max(e,o-(+!!(512&r)-1))))throw Error("spvt");r=-16760833&r|(1023&e)<<14}}}return Ht(t,r),t}function Oe(t,e,n,r,o){if(null!=t){if(Array.isArray(t))t=ne(t,void 0,0)?void 0:o&&2&Wt(t)?t:Le(t,e,n,void 0!==r,o);else if(te(t)){const i={};for(let s in t)i[s]=Oe(t[s],e,n,r,o);t=i}else t=e(t,r);return t}}function Le(t,e,n,r,o){const i=r||n?Wt(t):0;r=r?!!(32&i):void 0;const s=Vt(t);for(let t=0;t<s.length;t++)s[t]=Oe(s[t],e,n,r,o);return n&&(ue(s,t),n(i,s)),s}function Be(t){return t.B===Xt?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(ne(t,void 0,0))return}else{if(L(t))return T(t);if(t instanceof M){const e=t.g;return null==e?"":"string"==typeof e?e:t.g=T(e)}}}return t}(t)}function Fe(t,e,n=Jt){if(null!=t){if(S&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){var r=Wt(t);return 2&r?t:(e&&=0===r||!!(32&r)&&!(64&r||!(16&r)),e?Ht(t,-12293&(34|r)):Le(t,Fe,4&r?Jt:n,!0,!0))}return t.B===Xt&&(n=t.l,t=2&(r=Rt(n))?t:Ue(t,n,r,!0)),t}}function je(t){const e=t.l;return Ue(t,e,Rt(e),!1)}function Ue(t,e,n,r){return t=t.constructor,Ee=e=ke(e,n,r),e=new t(e),Ee=void 0,e}function ke(t,e,n){const r=n||2&e?Jt:qt,o=!!(32&e);return t=function(t,e,n){const r=Vt(t);var o=r.length;const i=256&e?r[o-1]:void 0;for(o+=i?-1:0,e=512&e?1:0;e<o;e++)r[e]=n(r[e]);if(i){e=r[e]={};for(const t in i)e[t]=n(i[t])}return ue(r,t),r}(t,e,(t=>Fe(t,o,r))),Gt(t,32|(n?2:0)),t}function Ve(t){const e=t.l,n=Rt(e);return 2&n?Ue(t,e,n,!1):t}function Ne(t,e,n,r){return!(4&e)||null!=n&&(!r&&0===n&&(4096&e||8192&e)&&5>(t.constructor[Ct]=1+(0|t.constructor[Ct]))&&le(),0!==n&&!(n&e))}function Me(t,e){return Ce(t=t.l,Rt(t),e)}function De(t,e,n,r){if(!(0>(e=r+(+!!(512&e)-1))||e>=t.length||e>=n))return t[e]}function Ce(t,e,n,r){if(-1===n)return null;const o=Kt(e);if(!(n>=o)){var i=t.length;return r&&256&e&&null!=(r=t[i-1][n])?(De(t,e,o,n)&&null!=Dt&&(4<=(e=(t=ae??={})[Dt]||0)||(t[Dt]=e+1,le())),r):De(t,e,o,n)}return 256&e?t[t.length-1][n]:void 0}function Ge(t,e,n,r){const o=t.l;let i=Rt(o);return oe(i),$e(o,i,e,n,r),t}function $e(t,e,n,r,o){const i=Kt(e);if(n>=i||o){let s=e;if(256&e)o=t[t.length-1];else{if(null==r)return s;o=t[i+(+!!(512&e)-1)]={},s|=256}return o[n]=r,n<i&&(t[n+(+!!(512&e)-1)]=void 0),s!==e&&Ht(t,s),s}return t[n+(+!!(512&e)-1)]=r,256&e&&(n in(t=t[t.length-1])&&delete t[n]),e}function ze(t,e,n,r,o){var i=2&e;let s=Ce(t,e,n,o);Array.isArray(s)||(s=Yt);const a=!(2&r);r=!(1&r);const u=!!(32&e);let c=Wt(s);return 0!==c||!u||i||a?1&c||(c|=1,Ht(s,c)):(c|=33,Ht(s,c)),i?(t=!1,2&c||(Gt(s,34),t=!!(4&c)),(r||t)&&Object.freeze(s)):(i=!!(2&c)||!!(2048&c),r&&i?(s=Vt(s),r=1,u&&!a&&(r|=32),Ht(s,r),$e(t,e,n,s,o)):a&&32&c&&!i&&$t(s,32)),s}function We(t){t=t.l;let e=Rt(t);const n=Ce(t,e,1),r=ee(n,!0,!!(34&e));return null!=r&&r!==n&&$e(t,e,1,r),r}function Re(t,e){return t=Ce(t,e,1),Array.isArray(t)?t:Yt}function He(t,e){return 0===t&&(t=un(t,e)),zt(t,1,!0)}function qe(t){return!!(2&t)&&!!(4&t)||!!(2048&t)}function Je(t,e,n){{const a=t.l;let u=Rt(a);if(oe(u),null==n)$e(a,u,e);else{var r,o=Wt(n),i=o,s=!!(2&o)||Object.isFrozen(n);if((r=!s)&&(r=!1),Ne(t,o))for(o=21,s&&(n=Vt(n),i=0,o=cn(o=un(o,u),u,!0)),t=0;t<n.length;t++)n[t]=we(n[t]);r&&(n=Vt(n),i=0,o=cn(o=un(o,u),u,!0)),o!==i&&Ht(n,o),$e(a,u,e,n)}}}function Ke(t,e){t=t.l;let n=Rt(t);oe(n),$e(t,n,2,""===e?void 0:e)}function Ye(t,e,n,r){const o=Rt(t);oe(o),t=ze(t,o,e,2),r=n(r,!!(4&(e=Wt(t)))&&!!(4096&e)),t.push(r)}function Xe(t){return t}function Qe(t,e){return Ze(t=t.l,Rt(t),yo)===e?e:-1}function Ze(t,e,n){let r=0;for(let o=0;o<n.length;o++){const i=n[o];null!=Ce(t,e,i)&&(0!==r&&(e=$e(t,e,r)),r=i)}return r}function tn(t,e,n,r){let o=Rt(t);oe(o);const i=Ce(t,o,n,r);let s;if(null!=i&&i.B===Xt)return(e=Ve(i))!==i&&$e(t,o,n,e,r),e.l;if(Array.isArray(i)){const t=Wt(i);s=2&t?ke(i,t,!1):i,s=xe(s,e[0],e[1])}else s=xe(void 0,e[0],e[1]);return s!==i&&$e(t,o,n,s,r),s}function en(t,e,n,r){t=t.l;let o=Rt(t);const i=Ce(t,o,n,r);return(e=Se(i,e,o))!==i&&null!=e&&$e(t,o,n,e,r),e}function nn(t,e,n){if(null==(e=en(t,e,n,!1)))return e;t=t.l;let r=Rt(t);if(!(2&r)){const o=Ve(e);o!==e&&$e(t,r,n,e=o,!1)}return e}function rn(t,e,n,r,o){var i=!!(2&e),s=i?1:2;const a=1===s;s=2===s,r=!!r,o&&=!i,i=Re(t,e);var u=Wt(i);const c=!!(4&u);if(!c){var l,h=i,f=e;(l=!!(2&(u=He(u,e))))&&(f=zt(f,2,!0));let t=!l,r=!0,o=0,s=0;for(;o<h.length;o++){const e=Se(h[o],n,f);if(e instanceof n){if(!l){const n=!!(2&Wt(e.l));t&&=!n,r&&=n}h[s++]=e}}s<o&&(h.length=s),u=zt(u,4,!0),u=zt(u,16,r),u=zt(u,8,t),Ht(h,u),l&&Object.freeze(h)}if(n=!!(8&u)||a&&!i.length,o&&!n){for(qe(u)&&(i=Vt(i),u=un(u,e),e=$e(t,e,1,i)),o=i,n=u,h=0;h<o.length;h++)(u=o[h])!==(f=Ve(u))&&(o[h]=f);n=zt(n,8,!0),n=zt(n,16,!o.length),Ht(o,n),u=n}return qe(u)||(o=u,a?((n=!!(32&u))||(o=0,e=$e(t,e,1,i=Vt(i))),u=zt(u,!i.length||16&u&&(!c||n)?2:2048,!0)):u=cn(u,e,r),u!==o&&Ht(i,u),a&&Object.freeze(i)),s&&qe(u)&&(i=Vt(i),u=cn(u=un(u,e),e,r),Ht(i,u),$e(t,e,1,i)),i}function on(t,e){t=t.l;const n=Rt(t);return rn(t,n,e,!1,!(2&n))}function sn(t,e,n,r,o){return null==r&&(r=void 0),Ge(t,n,r,o)}function an(t,e,n){var r=to;null==n&&(n=void 0),t=t.l;let o=Rt(t);oe(o),(r=Ze(t,o,r))&&r!==e&&null!=n&&(o=$e(t,o,r)),$e(t,o,e,n)}function un(t,e){return t=zt(t,2,!!(2&e)),t=zt(t,32,!0),zt(t,2048,!1)}function cn(t,e,n){return 32&e&&n||(t=zt(t,32,!1)),t}function ln(t,e){var n=Cr;t=t.l;const r=Rt(t);oe(r),t=rn(t,r,n,!0),e=null!=e?e:new n,t.push(e),2&Wt(e.l)?$t(t,8):$t(t,16)}function hn(t){return null==(t=Me(t,2))?t:pe(t)?"number"==typeof t?ve(t):be(t):void 0}function fn(t,e){return t??e}function dn(t,e,n){Ye(t.l,e,we,n)}function gn(t,e,n){e.g?e.j(t,e.g,e.i,n,!0):e.j(t,e.i,n,!0)}var pn=class{constructor(t,e){this.l=xe(t,e)}toJSON(){return mn(this,Le(this.l,Be,void 0,void 0,!1),!0)}v(){return!!(2&Wt(this.l))}};function mn(t,e,n){var r=f?void 0:t.constructor.u;const o=Rt(n?t.l:e);if(!(t=e.length))return e;let i,s;if(te(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;(ne(n,r,+u)||Zt(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&&(i=!0),t--}for(u=+!!(512&o)-1;0<t&&(n=e[c=t-1],c-=u,null==n||ne(n,r,c)||Zt(n)&&0===n.size);t--)s=!0;return i||s?(e=Array.prototype.slice.call(e,0,t),a&&e.push(a),e):e}function yn(t){return Array.isArray(t)?t[0]instanceof kt?t:[gr,t]:[t,void 0]}function vn(t,e){if(Array.isArray(e)){var n=Wt(e);if(4&n)return e;for(var r=0,o=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[o++]=n)}return o<r&&(e.length=o),Ht(e,-12289&(5|n)),2&n&&Object.freeze(e),e}}pn.prototype.B=Xt,pn.prototype.toString=function(){return mn(this,this.l,!1).toString()};const bn=Symbol();function wn(t){let e=t[bn];if(!e){const n=xn(t),r=Cn(t),o=r.j;e=o?(t,e)=>o(t,e,r):(t,e)=>{for(;dt(e)&&4!=e.i;){var o=e.m,i=r[o];if(!i){var s=r.D;s&&(s=s[o])&&(i=r[o]=_n(s))}i&&i(e,t,o)||(o=(i=e).j,gt(i),i.I?i=void 0:(s=i.g.g-o,i.g.g=o,i=ht(i.g,s)),o=t,i&&(ie||=Symbol(),(s=o[ie])?s.push(i):o[ie]=[i]))}n===Sn||n===En||n.s||(t[se||=Symbol()]=n)},t[bn]=e}return e}function _n(t){const e=(t=yn(t))[0].g;if(t=t[1]){const n=wn(t),r=Cn(t).A;return(t,o,i)=>e(t,o,i,r,n)}return e}class An{}let Sn,En;const Tn=Symbol();function In(t,e,n){const r=n[1];let o;if(r){const n=r[Tn];o=n?n.A:Pe(r[0]),t[e]=n??r}o&&o===Te?(t.g||(t.g=new Set)).add(e):n[0]&&(t.i||(t.i=new Set)).add(e)}function Pn(t,e){return[t.j,!e||0<e[0]?void 0:e]}function xn(t){var e=t[Tn];if(e)return e;if(!(e=Ln(t,t[Tn]=new An,Pn,Pn,In)).D&&!e.i&&!e.g){let n=!0;for(let t in e)isNaN(t)||(n=!1);n?(Pe(t[0])===Te?En?e=En:((e=new An).A=Pe(!0),e=En=e):e=Sn||=new An,e=t[Tn]=e):e.s=!0}return e}function On(t,e,n){t[e]=n}function Ln(t,e,n,r,o=On){e.A=Pe(t[0]);let i=0;var s=t[++i];s&&s.constructor===Object&&(e.D=s,"function"==typeof(s=t[++i])&&(e.j=s,e.m=t[++i],s=t[++i]));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[++i]}for(u=1;void 0!==s;){let h;"number"==typeof s&&(u+=s,s=t[++i]);var c=void 0;if(s instanceof kt?h=s:(h=pr,i--),h.J){s=t[++i],c=t;var l=i;"function"==typeof s&&(s=s(),c[l]=s),c=s}for(l=u+1,"number"==typeof(s=t[++i])&&0>s&&(l-=s,s=t[++i]);u<l;u++){const t=a[u];o(e,u,c?r(h,c,t):n(h,t))}}return e}const Bn=Symbol();function Fn(t){let e=t[Bn];if(!e){const n=Vn(t);e=(t,e)=>zn(t,e,n),t[Bn]=e}return e}const jn=Symbol();function Un(t){return t.i}function kn(t,e){let n,r;const o=t.i;return(t,i,s)=>o(t,i,s,r||=Vn(e).A,n||=Fn(e))}function Vn(t){let e=t[jn];return e||(e=Ln(t,t[jn]={},Un,kn),Gn(t),e)}const Nn=Symbol();function Mn(t,e){const n=t.g;return e?(t,r,o)=>n(t,r,o,e):n}function Dn(t,e,n){const r=t.g;let o,i;return(t,s,a)=>r(t,s,a,i||=Cn(e).A,o||=wn(e),n)}function Cn(t){let e=t[Nn];return e||(xn(t),e=Ln(t,t[Nn]={},Mn,Dn),Gn(t),e)}function Gn(t){Nn in t&&Tn in t&&jn in t&&(t.length=0)}function $n(t,e){var n=t[e];if(n)return n;if((n=t.D)&&(n=n[e])){var r=(n=yn(n))[0].i;if(n=n[1]){const e=Fn(n),o=Vn(n).A;n=(n=t.m)?n(o,e):(t,n,i)=>r(t,n,i,o,e)}else n=r;return t[e]=n}}function zn(t,e,n){for(var r=Rt(t),o=+!!(512&r)-1,i=t.length,s=512&r?1:0,a=i+(256&r?-1:0);s<a;s++){const r=t[s];if(null==r)continue;const i=s-o,a=$n(n,i);a&&a(e,r,i)}if(256&r){r=t[i-1];for(let t in r)o=+t,Number.isNaN(o)||null!=(i=r[t])&&(a=$n(n,o))&&a(e,i,o)}if(t=ie?t[ie]:void 0)for(Lt(e,e.g.end()),n=0;n<t.length;n++)Lt(e,N(t[n])||F())}function Wn(t,e){return new kt(t,e,!1,!1)}function Rn(t,e){return new kt(t,e,!0,!1)}function Hn(t,e,n){$e(t,Rt(t),e,n)}function qn(t,e,n){t:if(null!=e){if(pe(e)){if("string"==typeof e){e=be(e);break t}if("number"==typeof e){e=ve(e);break t}}e=void 0}null!=e&&("string"==typeof e&&St(e),null!=e&&(Bt(t,n,0),"number"==typeof e?(t=t.g,J(e),It(t,H,q)):(n=St(e),It(t.g,n.i,n.g))))}function Jn(t,e,n){null!=(e=me(e))&&null!=e&&(Bt(t,n,0),xt(t.g,e))}function Kn(t,e,n){null!=(e=null==e||"boolean"==typeof e?e:"number"==typeof e?!!e:void 0)&&(Bt(t,n,0),t.g.g.push(e?1:0))}function Yn(t,e,n){null!=(e=Ae(e))&&Ut(t,n,c(e))}function Xn(t,e,n,r,o){null!=(e=e instanceof pn?e.l:Array.isArray(e)?xe(e,r[0],r[1]):void 0)&&(n=Ft(t,n),o(e,t),jt(t,n))}function Qn(t,e,n){null!=(e=null==e||"string"==typeof e||L(e)||e instanceof M?e:void 0)&&Ut(t,n,$(e).buffer)}var Zn,tr=Wn((function(t,e,n){if(1!==t.i)return!1;var r=t.g;t=it(r);const o=it(r);r=2*(o>>31)+1;const i=o>>>20&2047;return t=4294967296*(1048575&o)+t,Hn(e,n,2047==i?t?NaN:1/0*r:0==i?r*Math.pow(2,-1074)*t:r*Math.pow(2,i-1075)*(t+4503599627370496)),!0}),(function(t,e,n){null!=(e=fe(e))&&(Bt(t,n,1),t=t.g,(n=R||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),H=n.getUint32(0,!0),q=n.getUint32(4,!0),Ot(t,H),Ot(t,q))})),er=Wn((function(t,e,n){return 5===t.i&&(Hn(e,n,st(t.g)),!0)}),(function(t,e,n){null!=(e=fe(e))&&(Bt(t,n,5),t=t.g,K(e),Ot(t,H))})),nr=Rn((function(t,e,n){return(5===t.i||2===t.i)&&(e=ze(e,Rt(e),n,2,!1),2==t.i?vt(t,st,e):e.push(st(t.g)),!0)}),(function(t,e,n){if(null!=(e=vn(fe,e))&&e.length){Bt(t,n,2),Pt(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,K(e[r]),Ot(n,H)}})),rr=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,nt(t.g,X)),!0)}),qn),or=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,0===(t=nt(t.g,X))?void 0:t),!0)}),qn),ir=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,nt(t.g,Y)),!0)}),(function(t,e,n){t:if(null!=e){if(pe(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)),ye(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 ye(String(t))?t:(J(t),Y(H,q))}(e);break t}}e=void 0}null!=e&&("string"==typeof e&&wt(e),null!=e&&(Bt(t,n,0),"number"==typeof e?(t=t.g,J(e),It(t,H,q)):(n=wt(e),It(t.g,n.i,n.g))))})),sr=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,ot(t.g)),!0)}),Jn),ar=Rn((function(t,e,n){return(0===t.i||2===t.i)&&(e=ze(e,Rt(e),n,2,!1),2==t.i?vt(t,ot,e):e.push(ot(t.g)),!0)}),(function(t,e,n){if(null!=(e=vn(me,e))&&e.length){n=Ft(t,n);for(let n=0;n<e.length;n++)xt(t.g,e[n]);jt(t,n)}})),ur=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,0===(t=ot(t.g))?void 0:t),!0)}),Jn),cr=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,rt(t.g)),!0)}),Kn),lr=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,!1===(t=rt(t.g))?void 0:t),!0)}),Kn),hr=Rn((function(t,e,n){return 2===t.i&&(Ye(e,n,Xe,t=mt(t)),!0)}),(function(t,e,n){if(null!=(e=vn(Ae,e)))for(let s=0;s<e.length;s++){var r=t,o=n,i=e[s];null!=i&&Ut(r,o,c(i))}})),fr=Wn((function(t,e,n){return 2===t.i&&(Hn(e,n,""===(t=mt(t))?void 0:t),!0)}),Yn),dr=Wn((function(t,e,n){return 2===t.i&&(Hn(e,n,mt(t)),!0)}),Yn),gr=new kt((function(t,e,n,r,o){return 2===t.i&&(pt(t,tn(e,r,n,!0),o),!0)}),Xn,!1,!0),pr=new kt((function(t,e,n,r,o){return 2===t.i&&(pt(t,tn(e,r,n),o),!0)}),Xn,!1,!0);Zn=new kt((function(t,e,n,r,o){if(2!==t.i)return!1;r=xe(void 0,r[0],r[1]);let i=Rt(e);oe(i);let s=ze(e,i,n,3);return i=Rt(e),4&Wt(s)&&(s=Vt(s),Ht(s,-2079&(1|Wt(s))),$e(e,i,n,s)),s.push(r),pt(t,r,o),!0}),(function(t,e,n,r,o){if(Array.isArray(e))for(let i=0;i<e.length;i++)Xn(t,e[i],n,r,o)}),!0,!0);var mr=new kt((function(t,e,n,r,o,i){if(2!==t.i)return!1;let s=Rt(e);return oe(s),(i=Ze(e,s,i))&&n!==i&&$e(e,s,i),pt(t,e=tn(e,r,n),o),!0}),Xn,!1,!0),yr=Wn((function(t,e,n){return 2===t.i&&(Hn(e,n,yt(t)),!0)}),Qn),vr=Wn((function(t,e,n){return 0===t.i&&(Hn(e,n,ot(t.g)),!0)}),(function(t,e,n){null!=(e=me(e))&&(e=parseInt(e,10),Bt(t,n,0),xt(t.g,e))})),br=Rn((function(t,e,n){return(0===t.i||2===t.i)&&(e=ze(e,Rt(e),n,2,!1),2==t.i?vt(t,at,e):e.push(ot(t.g)),!0)}),(function(t,e,n){if(null!=(e=vn(me,e))&&e.length){n=Ft(t,n);for(let n=0;n<e.length;n++)xt(t.g,e[n]);jt(t,n)}}));class wr{constructor(t,e){this.i=t,this.g=e,this.j=sn,this.defaultValue=void 0}}function _r(t,e){return(n,r)=>{t:{if(bt.length){const t=bt.pop();t.o(r),ut(t.g,n,r),n=t}else n=new class{constructor(t,e){if(ft.length){const n=ft.pop();ut(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,ut(this,t,e)}clear(){this.i=null,this.m=!1,this.g=this.j=this.s=0,this.C=!1}}(t,e);this.g=t,this.j=this.g.g,this.i=this.m=-1,this.o(e)}o({I:t=!1}={}){this.I=t}}(n,r);try{const r=new t,i=r.l;wn(e)(i,n);var o=r;break t}finally{n.g.clear(),n.m=-1,n.i=-1,100>bt.length&&bt.push(n)}o=void 0}return o}}var Ar=[0,fr,Wn((function(t,e,n){return 2===t.i&&(Hn(e,n,(t=yt(t))===V()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof pn){const r=e.P;return void(r&&(e=r(e),null!=e&&Ut(t,n,$(e).buffer)))}if(Array.isArray(e))return}Qn(t,e,n)}))],Sr=[0,dr],Er=[0,sr,vr,cr,-1,ar,vr,-1],Tr=[0,cr,-1],Ir=class extends pn{constructor(){super()}};Ir.u=[6];var Pr=[0,cr,dr,cr,vr,-1,br,dr,-1,Tr,vr],xr=[0,dr,-2],Or=class extends pn{constructor(){super()}},Lr=[0],Br=[0,sr,cr,-4],Fr=class extends pn{constructor(t){super(t,2)}},jr={},Ur=[-2,jr,cr];jr[336783863]=[0,dr,cr,-1,sr,[0,[1,2,3,4,5,6],mr,Lr,mr,Pr,mr,xr,mr,Br,mr,Er,mr,[0,dr]],Sr,cr,[0,[0,ar],-1],dr];var kr=[0,fr,lr],Vr=[0,or,-1,lr,-3,or,ar,fr,ur,or,-1,lr,ur,lr,-2,fr],Nr=[-1,{}],Mr=[0,dr,1,Nr],Dr=[0,dr,hr,Nr],Cr=class extends pn{constructor(t){super(t,500)}o(t){return sn(this,0,7,t)}};Cr.u=[3,4,5,6,8,13,17,1005];var Gr,$r=[-500,fr,-1,hr,-3,Ur,Zn,Ar,ur,-1,Mr,Dr,Zn,kr,fr,Vr,ur,hr,987,hr],zr=[0,fr,-1,Nr],Wr=[-500,dr,-1,[-1,{}],998,dr],Rr=[-500,dr,hr,-1,[-2,{},cr],997,hr,-1],Hr=[-500,dr,hr,Nr,998,hr],qr=class extends pn{constructor(){super(void 0,500)}o(t){return sn(this,0,1001,t)}};qr.u=[1,6,7,9,10,15,16,17,14,1002],qr.prototype.g=(Gr=[-500,Zn,$r,4,Zn,Wr,Zn,Rr,ur,Zn,Hr,hr,ur,Mr,Dr,Zn,zr,hr,-2,Vr,fr,-1,lr,979,Nr,Zn,Ar],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}}}};zn(this.l,t,Vn(Gr)),Lt(t,t.g.end());const e=new Uint8Array(t.i),n=t.j,r=n.length;let o=0;for(let t=0;t<r;t++){const r=n[t];e.set(r,o),o+=r.length}return t.j=[e],e});var Jr=class extends pn{constructor(t){super(t)}},Kr=[0,sr,er,dr,-1],Yr=class extends pn{constructor(t){super(t)}g(){return on(this,Jr)}};Yr.u=[1];var Xr=[0,Zn,Kr],Qr=class extends pn{constructor(t){super(t)}};Qr.u=[4,5];var Zr=class extends pn{constructor(t){super(t)}},to=[1,2,3,4,5],eo=class extends pn{constructor(t){super(t)}g(){return null!=We(this)}i(){return null!=Ae(Me(this,2))}},no=class extends pn{constructor(t){super(t)}},ro=[0,[0,yr,dr,[0,sr,rr,-1],[0,ir,rr]],cr,[0,to,mr,Br,mr,Pr,mr,Er,mr,Lr,mr,xr],vr],oo=class extends pn{constructor(t){super(t)}},io=new wr(451755788,oo);jr[451755788]=[0,ro,[0,dr,sr,er,hr,-1],tr];var so=class extends pn{constructor(t){super(t)}},ao=class extends pn{constructor(t){super(t)}},uo=new wr(487277289,ao);jr[487277289]=[0,ro,[0,cr,-1]];var co=class extends pn{constructor(t){super(t)}},lo=[0,1,sr,dr,Xr],ho=class extends pn{constructor(t){super(t)}};ho.u=[1];var fo=_r(ho,[0,Zn,lo,rr]),go=class extends pn{constructor(t){super(t)}};go.u=[1];var po=class extends pn{constructor(t){super(t)}K(){const t=We(this);return null==t?V():t}},mo=class extends pn{constructor(t){super(t)}},yo=[1,2],vo=[0,yo,mr,[0,nr],mr,[0,yr],sr,dr],bo=class extends pn{constructor(t){super(t)}};bo.u=[1];var wo=_r(bo,[0,Zn,vo,rr]);async function _o(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())}function Ao(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 So(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 Eo(t,e,n){t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=n}function To(t,e,n){let r=[];t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=(t,e,o)=>{e?(n(r,o),r=[]):r.push(t)}}const Io=function(t){return class extends t{N(){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,o){this.h._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),Ao(this,r||"input_audio",(r=>{Ao(this,o=o||"audio_header",(o=>{this.h._configureAudio(r,o,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,o){const i=4*t.length;this.i!==i&&(this.g&&this.h._free(this.g),this.g=this.h._malloc(i),this.i=i),this.h.HEAPF32.set(t,this.g/4),Ao(this,r,(t=>{this.h._addAudioToInputStream(this.g,e,n,t,o)}))}addGpuBufferToStream(t,e,n){Ao(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[o,i]=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||o===this.h.canvas.width&&i===this.h.canvas.height||(this.h.canvas.width=o,this.h.canvas.height=i);const[s,a]=[o,i];this.h._addBoundTextureToStream(e,s,a,n)}))}addBoolToStream(t,e,n){Ao(this,e,(e=>{this.h._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){Ao(this,e,(e=>{this.h._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){Ao(this,e,(e=>{this.h._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){Ao(this,e,(e=>{this.h._addIntToInputStream(t,e,n)}))}addStringToStream(t,e,n){Ao(this,e,(e=>{Ao(this,t,(t=>{this.h._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){Ao(this,e,(e=>{So(this,Object.keys(t),(r=>{So(this,Object.values(t),(o=>{this.h._addFlatHashMapToInputStream(r,o,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){Ao(this,n,(n=>{Ao(this,e,(e=>{const o=this.h._malloc(t.length);this.h.HEAPU8.set(t,o),this.h._addProtoToInputStream(o,t.length,e,n,r),this.h._free(o)}))}))}addEmptyPacketToStream(t,e){Ao(this,t,(t=>{this.h._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){Ao(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){Ao(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){Ao(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){Ao(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){Ao(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)Ao(this,e,(t=>{this.h._addStringVectorEntry(r,t)}));this.h._addStringVectorToInputStream(r,e,n)}))}addBoolToInputSidePacket(t,e){Ao(this,e,(e=>{this.h._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){Ao(this,e,(e=>{this.h._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){Ao(this,e,(e=>{this.h._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){Ao(this,e,(e=>{this.h._addIntToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){Ao(this,e,(e=>{Ao(this,t,(t=>{this.h._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){Ao(this,n,(n=>{Ao(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){Ao(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){Ao(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){Ao(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){Ao(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){Ao(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)Ao(this,e,(t=>{this.h._addStringVectorEntry(n,t)}));this.h._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){Eo(this,t,e),Ao(this,t,(t=>{this.h._attachBoolListener(t)}))}attachBoolVectorListener(t,e){To(this,t,e),Ao(this,t,(t=>{this.h._attachBoolVectorListener(t)}))}attachIntListener(t,e){Eo(this,t,e),Ao(this,t,(t=>{this.h._attachIntListener(t)}))}attachIntVectorListener(t,e){To(this,t,e),Ao(this,t,(t=>{this.h._attachIntVectorListener(t)}))}attachDoubleListener(t,e){Eo(this,t,e),Ao(this,t,(t=>{this.h._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){To(this,t,e),Ao(this,t,(t=>{this.h._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){Eo(this,t,e),Ao(this,t,(t=>{this.h._attachFloatListener(t)}))}attachFloatVectorListener(t,e){To(this,t,e),Ao(this,t,(t=>{this.h._attachFloatVectorListener(t)}))}attachStringListener(t,e){Eo(this,t,e),Ao(this,t,(t=>{this.h._attachStringListener(t)}))}attachStringVectorListener(t,e){To(this,t,e),Ao(this,t,(t=>{this.h._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){Eo(this,t,e),Ao(this,t,(t=>{this.h._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){To(this,t,e),Ao(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?'),Eo(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),Ao(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 Po=class extends Io{};async function xo(t,e,n){return t=await(async(t,e,n,r)=>{if(e&&await _o(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await _o(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 Oo(t,e,n){return xo(t,e,n)}function Lo(t,e){const n=nn(t.baseOptions,eo,1)||new eo;"string"==typeof e?(Ge(n,2,_e(e)),Ge(n,1)):e instanceof Uint8Array&&(Ge(n,1,ee(e,!1,!1)),Ge(n,2)),sn(t.baseOptions,0,1,n)}function Bo(t,e){const n=e.baseOptions||{};if(e.baseOptions?.modelAssetBuffer&&e.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(nn(t.baseOptions,eo,1)?.g()||nn(t.baseOptions,eo,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=nn(t.baseOptions,Zr,3);if(!n){var r=n=new Zr;an(r,4,new Or)}"delegate"in e&&("GPU"===e.delegate?an(e=n,2,r=new Ir):an(e=n,4,r=new Or)),sn(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),Lo(t,"/model.dat"),t.H()})):(Lo(t,n.modelAssetBuffer),t.H(),Promise.resolve())}function Fo(t){try{const e=t.j.length;if(1===e)throw Error(t.j[0].message);if(1<e)throw Error("Encountered multiple errors: "+t.j.map((t=>t.message)).join(", "))}finally{t.j=[]}}function jo(t,e){t.s=Math.max(t.s,e)}var Uo=class{constructor(t){this.g=t,this.j=[],this.s=0,this.g.setAutoRenderToScreen(!1)}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.j.push(Error(e))})),this.g.N(),this.g.setGraph(t,e),Fo(this)}finishProcessing(){this.g.finishProcessing(),Fo(this)}close(){this.g.closeGraph()}};async function ko(t,e,n){return Oo(t,e,n)}Uo.prototype.close=Uo.prototype.close;var Vo=class extends Uo{constructor(){super(...arguments),this.G=48e3}O(t){this.G=t}};function No(t){const e={classifications:on(t,co).map((t=>function(t,e=-1,n=""){return{categories:t.map((t=>{var e=fn(me(Me(t,1)),0)??-1;const n=t.l;let r=Rt(n);const o=Ce(n,r,2),i=fe(o);return null!=i&&i!==o&&$e(n,r,2,i),{index:e,score:i??0??0,categoryName:fn(Ae(Me(t,3)),"")??"",displayName:fn(Ae(Me(t,4)),"")??""}})),headIndex:e,headName:n}}(nn(t,Yr,4)?.g()??[],fn(me(Me(t,2)),0),fn(Ae(Me(t,3)),""))))};return null!=hn(t)&&(e.timestampMs=fn(hn(t),0)),e}Vo.prototype.setDefaultSampleRate=Vo.prototype.O;var Mo=class extends Vo{constructor(t,e){super(new Po(t,e)),this.m=[],sn(t=this.i=new oo,0,1,e=new no)}get baseOptions(){return nn(this.i,no,1)}set baseOptions(t){sn(this.i,0,1,t)}o(t){var e=this.i,n=nn(this.i,Qr,2);if(n=n?je(n):new Qr,void 0!==t.displayNamesLocale?Ge(n,1,_e(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Ge(n,1),void 0!==t.maxResults){var r=t.maxResults;if(null!=r){if("number"!=typeof r)throw he();if(!Number.isFinite(r))throw he();r|=0}Ge(n,2,r)}else"maxResults"in t&&Ge(n,2);if(void 0!==t.scoreThreshold){if(null!=(r=t.scoreThreshold)&&"number"!=typeof r)throw Error(`Value of float/double field must be a number, found ${typeof r}: ${r}`);Ge(n,3,r)}else"scoreThreshold"in t&&Ge(n,3);return void 0!==t.categoryAllowlist?Je(n,4,t.categoryAllowlist):"categoryAllowlist"in t&&Ge(n,4),void 0!==t.categoryDenylist?Je(n,5,t.categoryDenylist):"categoryDenylist"in t&&Ge(n,5),sn(e,0,2,n),Bo(this,t)}L(t,e){return this.F(t,e??this.G,this.s+1)}F(t,e,n){return this.g.addDoubleToStream(e,"sample_rate",n),this.g.addAudioToStreamWithShape(t,1,t.length,"audio_in",n),this.m=[],this.finishProcessing(),[...this.m]}H(){var t=new qr;dn(t,10,"audio_in"),dn(t,10,"sample_rate"),dn(t,15,"timestamped_classifications");const e=new Fr;gn(e,io,this.i);const n=new Cr;Ke(n,_e("mediapipe.tasks.audio.audio_classifier.AudioClassifierGraph")),dn(n,3,"AUDIO:audio_in"),dn(n,3,"SAMPLE_RATE:sample_rate"),dn(n,4,"TIMESTAMPED_CLASSIFICATIONS:timestamped_classifications"),n.o(e),ln(t,n),this.g.attachProtoVectorListener("timestamped_classifications",((t,e)=>{!function(t,e){e.forEach((e=>{e=fo(e),t.m.push(No(e))}))}(this,t),jo(this,e)})),this.g.attachEmptyPacketListener("timestamped_classifications",(t=>{jo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Do(t){return{embeddings:on(t,mo).map((t=>{const e={headIndex:fn(me(Me(t,3)),0)??-1,headName:fn(Ae(Me(t,4)),"")??""};if(void 0!==en(t,go,Qe(t,1))){var n=nn(t,go,Qe(t,1));t=n.l;var r=Rt(t);const s=2&r?1:2;let a=Re(t,r);var o=Wt(a);if(Ne(n,o,void 0,!1)){(4&o||Object.isFrozen(a))&&(a=Vt(a),o=un(o,r),r=$e(t,r,1,a));for(var i=n=0;n<a.length;n++){const t=fe(a[n]);null!=t&&(a[i++]=t)}i<n&&(a.length=i),o=zt(o=He(o,r),20,!0),o=zt(o,4096,!1),o=zt(o,8192,!1),Ht(a,o),2&o&&Object.freeze(a)}qe(o)||(n=o,(i=1===s)?(32&o||(a=Vt(a),n=0,r=$e(t,r,1,a)),o=zt(o,2,!0)):o=cn(o,r,!1),o!==n&&Ht(a,o),i&&Object.freeze(a)),2===s&&qe(o)&&(a=Vt(a),o=cn(o=un(o,r),r,!1),Ht(a,o),$e(t,r,1,a)),e.floatEmbedding=a.slice()}else r=new Uint8Array(0),e.quantizedEmbedding=nn(t,po,Qe(t,2))?.K()?.i()??r;return e})),timestampMs:fn(hn(t),0)}}Mo.prototype.classify=Mo.prototype.L,Mo.prototype.setOptions=Mo.prototype.o,Mo.createFromModelPath=function(t,e){return Oo(Mo,t,{baseOptions:{modelAssetPath:e}})},Mo.createFromModelBuffer=function(t,e){return ko(Mo,t,{baseOptions:{modelAssetBuffer:e}})},Mo.createFromOptions=function(t,e){return ko(Mo,t,e)};var Co=class extends Vo{constructor(t,e){super(new Po(t,e)),this.m=[],sn(t=this.i=new ao,0,1,e=new no)}get baseOptions(){return nn(this.i,no,1)}set baseOptions(t){sn(this.i,0,1,t)}o(t){var e=this.i,n=nn(this.i,so,2);return n=n?je(n):new so,void 0!==t.l2Normalize?Ge(n,1,de(t.l2Normalize)):"l2Normalize"in t&&Ge(n,1),void 0!==t.quantize?Ge(n,2,de(t.quantize)):"quantize"in t&&Ge(n,2),sn(e,0,2,n),Bo(this,t)}M(t,e){return this.F(t,e??this.G,this.s+1)}F(t,e,n){return this.g.addDoubleToStream(e,"sample_rate",n),this.g.addAudioToStreamWithShape(t,1,t.length,"audio_in",n),this.m=[],this.finishProcessing(),this.m}H(){var t=new qr;dn(t,10,"audio_in"),dn(t,10,"sample_rate"),dn(t,15,"embeddings_out"),dn(t,15,"timestamped_embeddings_out");const e=new Fr;gn(e,uo,this.i);const n=new Cr;Ke(n,_e("mediapipe.tasks.audio.audio_embedder.AudioEmbedderGraph")),dn(n,3,"AUDIO:audio_in"),dn(n,3,"SAMPLE_RATE:sample_rate"),dn(n,4,"EMBEDDINGS:embeddings_out"),dn(n,4,"TIMESTAMPED_EMBEDDINGS:timestamped_embeddings_out"),n.o(e),ln(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=wo(t),this.m.push(Do(t)),jo(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{jo(this,t)})),this.g.attachProtoVectorListener("timestamped_embeddings_out",((t,e)=>{for(const e of t)t=wo(e),this.m.push(Do(t));jo(this,e)})),this.g.attachEmptyPacketListener("timestamped_embeddings_out",(t=>{jo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};let Go;Co.prototype.embed=Co.prototype.M,Co.prototype.setOptions=Co.prototype.o,Co.createFromModelPath=function(t,e){return ko(Co,t,{baseOptions:{modelAssetPath:e}})},Co.createFromModelBuffer=function(t,e){return ko(Co,t,{baseOptions:{modelAssetBuffer:e}})},Co.createFromOptions=function(t,e){return ko(Co,t,e)};const $o=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 zo(){if(void 0===Go)try{await WebAssembly.instantiate($o),Go=!0}catch{Go=!1}return Go}async function Wo(t,e=""){const n=await zo()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var Ro=class{};Ro.forVisionTasks=function(t){return Wo("vision",t)},Ro.forTextTasks=function(t){return Wo("text",t)},Ro.forGenAiTasks=function(t){return Wo("genai",t)},Ro.forAudioTasks=function(t){return Wo("audio",t)},Ro.isSimdSupported=function(){return zo()},exports.AudioClassifier=Mo,exports.AudioEmbedder=Co,exports.AudioTaskRunner=Vo,exports.FilesetResolver=Ro,exports.TaskRunner=Uo;
|
|
2
2
|
//# sourceMappingURL=audio_bundle_cjs.js.map
|