@mediapipe/tasks-audio 0.10.12-rc.20240321 → 0.10.12-rc.20240322

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/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)}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();if(2048&(r=Wt(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(te(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 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,n){return 0===t&&(t=un(t,e,n)),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=un(o,u,!0)),t=0;t<n.length;t++)n[t]=we(n[t]);r&&(n=Vt(n),i=0,o=un(o,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),mo)===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,r))))&&(f=zt(f,2,!0));let t=!l,o=!0,s=0,a=0;for(;s<h.length;s++){const e=Se(h[s],n,f);if(e instanceof n){if(!l){const n=!!(2&Wt(e.l));t&&=!n,o&&=n}h[a++]=e}}a<s&&(h.length=a),u=zt(u,4,!0),u=zt(u,16,o),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,r),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?u=zt(u,!i.length||16&u&&(!c||32&u)?2:2048,!0):r||(u=zt(u,32,!1)),u!==o&&Ht(i,u),a&&Object.freeze(i)),s&&qe(u)&&(i=Vt(i),u=un(u,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=Zr;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,n){return t=zt(t,2,!!(2&e)),t=zt(t,32,!!(32&e)&&n),zt(t,2048,!1)}function cn(t,e){var n=Dr;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 ln(t){return null==(t=Me(t,2))?t:pe(t)?"number"==typeof t?ve(t):be(t):void 0}function hn(t,e){return t??e}function fn(t,e,n){Ye(t.l,e,we,n)}function dn(t,e,n){e.g?e.j(t,e.g,e.i,n,!0):e.j(t,e.i,n,!0)}var gn=class{constructor(t,e){this.l=xe(t,e)}toJSON(){return pn(this,Le(this.l,Be,void 0,void 0,!1),!0)}v(){return!!(2&Wt(this.l))}};function pn(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 mn(t){return Array.isArray(t)?t[0]instanceof kt?t:[dr,t]:[t,void 0]}function yn(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}}gn.prototype.B=Xt,gn.prototype.toString=function(){return pn(this,this.l,!1).toString()};const vn=Symbol();function bn(t){let e=t[vn];if(!e){const n=Pn(t),r=Dn(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]=wn(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===An||n===Sn||n.s||(t[se||=Symbol()]=n)},t[vn]=e}return e}function wn(t){const e=(t=mn(t))[0].g;if(t=t[1]){const n=bn(t),r=Dn(t).A;return(t,o,i)=>e(t,o,i,r,n)}return e}class _n{}let An,Sn;const En=Symbol();function Tn(t,e,n){const r=n[1];let o;if(r){const n=r[En];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 In(t,e){return[t.j,!e||0<e[0]?void 0:e]}function Pn(t){var e=t[En];if(e)return e;if(!(e=On(t,t[En]=new _n,In,In,Tn)).D&&!e.i&&!e.g){let n=!0;for(let t in e)isNaN(t)||(n=!1);n?(Pe(t[0])===Te?Sn?e=Sn:((e=new _n).A=Pe(!0),e=Sn=e):e=An||=new _n,e=t[En]=e):e.s=!0}return e}function xn(t,e,n){t[e]=n}function On(t,e,n,r,o=xn){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=gr,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 Ln=Symbol();function Bn(t){let e=t[Ln];if(!e){const n=kn(t);e=(t,e)=>$n(t,e,n),t[Ln]=e}return e}const Fn=Symbol();function jn(t){return t.i}function Un(t,e){let n,r;const o=t.i;return(t,i,s)=>o(t,i,s,r||=kn(e).A,n||=Bn(e))}function kn(t){let e=t[Fn];return e||(e=On(t,t[Fn]={},jn,Un),Cn(t),e)}const Vn=Symbol();function Nn(t,e){const n=t.g;return e?(t,r,o)=>n(t,r,o,e):n}function Mn(t,e,n){const r=t.g;let o,i;return(t,s,a)=>r(t,s,a,i||=Dn(e).A,o||=bn(e),n)}function Dn(t){let e=t[Vn];return e||(Pn(t),e=On(t,t[Vn]={},Nn,Mn),Cn(t),e)}function Cn(t){Vn in t&&En in t&&Fn in t&&(t.length=0)}function Gn(t,e){var n=t[e];if(n)return n;if((n=t.D)&&(n=n[e])){var r=(n=mn(n))[0].i;if(n=n[1]){const e=Bn(n),o=kn(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 $n(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=Gn(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=Gn(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 zn(t,e){return new kt(t,e,!1,!1)}function Wn(t,e){return new kt(t,e,!0,!1)}function Rn(t,e,n){$e(t,Rt(t),e,n)}function Hn(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 qn(t,e,n){null!=(e=me(e))&&null!=e&&(Bt(t,n,0),xt(t.g,e))}function Jn(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 Kn(t,e,n){null!=(e=Ae(e))&&Ut(t,n,c(e))}function Yn(t,e,n,r,o){null!=(e=e instanceof gn?e.l:Array.isArray(e)?xe(e,r[0],r[1]):void 0)&&(n=Ft(t,n),o(e,t),jt(t,n))}function Xn(t,e,n){null!=(e=null==e||"string"==typeof e||L(e)||e instanceof M?e:void 0)&&Ut(t,n,$(e).buffer)}var Qn,Zn=zn((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,Rn(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))})),tr=zn((function(t,e,n){return 5===t.i&&(Rn(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))})),er=Wn((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=yn(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)}})),nr=zn((function(t,e,n){return 0===t.i&&(Rn(e,n,nt(t.g,X)),!0)}),Hn),rr=zn((function(t,e,n){return 0===t.i&&(Rn(e,n,0===(t=nt(t.g,X))?void 0:t),!0)}),Hn),or=zn((function(t,e,n){return 0===t.i&&(Rn(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))))})),ir=zn((function(t,e,n){return 0===t.i&&(Rn(e,n,ot(t.g)),!0)}),qn),sr=Wn((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=yn(me,e))&&e.length){n=Ft(t,n);for(let n=0;n<e.length;n++)xt(t.g,e[n]);jt(t,n)}})),ar=zn((function(t,e,n){return 0===t.i&&(Rn(e,n,0===(t=ot(t.g))?void 0:t),!0)}),qn),ur=zn((function(t,e,n){return 0===t.i&&(Rn(e,n,rt(t.g)),!0)}),Jn),cr=zn((function(t,e,n){return 0===t.i&&(Rn(e,n,!1===(t=rt(t.g))?void 0:t),!0)}),Jn),lr=Wn((function(t,e,n){return 2===t.i&&(Ye(e,n,Xe,t=mt(t)),!0)}),(function(t,e,n){if(null!=(e=yn(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))}})),hr=zn((function(t,e,n){return 2===t.i&&(Rn(e,n,""===(t=mt(t))?void 0:t),!0)}),Kn),fr=zn((function(t,e,n){return 2===t.i&&(Rn(e,n,mt(t)),!0)}),Kn),dr=new kt((function(t,e,n,r,o){return 2===t.i&&(pt(t,tn(e,r,n,!0),o),!0)}),Yn,!1,!0),gr=new kt((function(t,e,n,r,o){return 2===t.i&&(pt(t,tn(e,r,n),o),!0)}),Yn,!1,!0);Qn=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++)Yn(t,e[i],n,r,o)}),!0,!0);var pr=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}),Yn,!1,!0),mr=zn((function(t,e,n){return 2===t.i&&(Rn(e,n,yt(t)),!0)}),Xn),yr=zn((function(t,e,n){return 0===t.i&&(Rn(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))})),vr=Wn((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=yn(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 br{constructor(t,e){this.i=t,this.g=e,this.j=sn,this.defaultValue=void 0}}function wr(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;bn(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 _r=[0,hr,zn((function(t,e,n){return 2===t.i&&(Rn(e,n,(t=yt(t))===V()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof gn){const r=e.P;return void(r&&(e=r(e),null!=e&&Ut(t,n,$(e).buffer)))}if(Array.isArray(e))return}Xn(t,e,n)}))],Ar=[0,fr],Sr=[0,ir,yr,ur,-1,sr,yr,-1],Er=[0,ur,-1],Tr=class extends gn{constructor(){super()}};Tr.u=[6];var Ir=[0,ur,fr,ur,yr,-1,vr,fr,-1,Er,yr],Pr=[0,fr,-2],xr=class extends gn{constructor(){super()}},Or=[0],Lr=[0,ir,ur,-3],Br=class extends gn{constructor(t){super(t,2)}},Fr={},jr=[-2,Fr,ur];Fr[336783863]=[0,fr,ur,-1,ir,[0,[1,2,3,4,5,6],pr,Or,pr,Ir,pr,Pr,pr,Lr,pr,Sr,pr,[0,fr]],Ar,ur];var Ur=[0,hr,cr],kr=[0,rr,-1,cr,-3,rr,sr,hr,ar,rr,-1,cr,ar,cr,-2,hr],Vr=[-1,{}],Nr=[0,fr,1,Vr],Mr=[0,fr,lr,Vr],Dr=class extends gn{constructor(t){super(t,500)}o(t){return sn(this,0,7,t)}};Dr.u=[3,4,5,6,8,13,17,1005];var Cr,Gr=[-500,hr,-1,lr,-3,jr,Qn,_r,ar,-1,Nr,Mr,Qn,Ur,hr,kr,ar,lr,987,lr],$r=[0,hr,-1,Vr],zr=[-500,fr,-1,[-1,{}],998,fr],Wr=[-500,fr,lr,-1,[-2,{},ur],997,lr,-1],Rr=[-500,fr,lr,Vr,998,lr],Hr=class extends gn{constructor(){super(void 0,500)}o(t){return sn(this,0,1001,t)}};Hr.u=[1,6,7,9,10,15,16,17,14,1002],Hr.prototype.g=(Cr=[-500,Qn,Gr,4,Qn,zr,Qn,Wr,ar,Qn,Rr,lr,ar,Nr,Mr,Qn,$r,lr,-2,kr,hr,-1,cr,979,Vr,Qn,_r],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}}}};$n(this.l,t,kn(Cr)),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 qr=class extends gn{constructor(t){super(t)}},Jr=[0,ir,tr,fr,-1],Kr=class extends gn{constructor(t){super(t)}g(){return on(this,qr)}};Kr.u=[1];var Yr=[0,Qn,Jr],Xr=class extends gn{constructor(t){super(t)}};Xr.u=[4,5];var Qr=class extends gn{constructor(t){super(t)}},Zr=[1,2,3,4,5],to=class extends gn{constructor(t){super(t)}g(){return null!=We(this)}i(){return null!=Ae(Me(this,2))}},eo=class extends gn{constructor(t){super(t)}},no=[0,[0,mr,fr,[0,ir,nr,-1],[0,or,nr]],ur,[0,Zr,pr,Lr,pr,Ir,pr,Sr,pr,Or,pr,Pr],yr],ro=class extends gn{constructor(t){super(t)}},oo=new br(451755788,ro);Fr[451755788]=[0,no,[0,fr,ir,tr,lr,-1],Zn];var io=class extends gn{constructor(t){super(t)}},so=class extends gn{constructor(t){super(t)}},ao=new br(487277289,so);Fr[487277289]=[0,no,[0,ur,-1]];var uo=class extends gn{constructor(t){super(t)}},co=[0,1,ir,fr,Yr],lo=class extends gn{constructor(t){super(t)}};lo.u=[1];var ho=wr(lo,[0,Qn,co,nr]),fo=class extends gn{constructor(t){super(t)}};fo.u=[1];var go=class extends gn{constructor(t){super(t)}K(){const t=We(this);return null==t?V():t}},po=class extends gn{constructor(t){super(t)}},mo=[1,2],yo=[0,mo,pr,[0,er],pr,[0,mr],ir,fr],vo=class extends gn{constructor(t){super(t)}};vo.u=[1];var bo=wr(vo,[0,Qn,yo,nr]);async function wo(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 _o(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 Ao(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 So(t,e,n){t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=n}function Eo(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 To=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?'),_o(this,r||"input_audio",(r=>{_o(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),_o(this,r,(t=>{this.h._addAudioToInputStream(this.g,e,n,t,o)}))}addGpuBufferToStream(t,e,n){_o(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){_o(this,e,(e=>{this.h._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){_o(this,e,(e=>{this.h._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){_o(this,e,(e=>{this.h._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){_o(this,e,(e=>{this.h._addIntToInputStream(t,e,n)}))}addStringToStream(t,e,n){_o(this,e,(e=>{_o(this,t,(t=>{this.h._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){_o(this,e,(e=>{Ao(this,Object.keys(t),(r=>{Ao(this,Object.values(t),(o=>{this.h._addFlatHashMapToInputStream(r,o,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){_o(this,n,(n=>{_o(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){_o(this,t,(t=>{this.h._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){_o(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){_o(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){_o(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){_o(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){_o(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)_o(this,e,(t=>{this.h._addStringVectorEntry(r,t)}));this.h._addStringVectorToInputStream(r,e,n)}))}addBoolToInputSidePacket(t,e){_o(this,e,(e=>{this.h._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){_o(this,e,(e=>{this.h._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){_o(this,e,(e=>{this.h._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){_o(this,e,(e=>{this.h._addIntToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){_o(this,e,(e=>{_o(this,t,(t=>{this.h._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){_o(this,n,(n=>{_o(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){_o(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){_o(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){_o(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){_o(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){_o(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)_o(this,e,(t=>{this.h._addStringVectorEntry(n,t)}));this.h._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){So(this,t,e),_o(this,t,(t=>{this.h._attachBoolListener(t)}))}attachBoolVectorListener(t,e){Eo(this,t,e),_o(this,t,(t=>{this.h._attachBoolVectorListener(t)}))}attachIntListener(t,e){So(this,t,e),_o(this,t,(t=>{this.h._attachIntListener(t)}))}attachIntVectorListener(t,e){Eo(this,t,e),_o(this,t,(t=>{this.h._attachIntVectorListener(t)}))}attachDoubleListener(t,e){So(this,t,e),_o(this,t,(t=>{this.h._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){Eo(this,t,e),_o(this,t,(t=>{this.h._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){So(this,t,e),_o(this,t,(t=>{this.h._attachFloatListener(t)}))}attachFloatVectorListener(t,e){Eo(this,t,e),_o(this,t,(t=>{this.h._attachFloatVectorListener(t)}))}attachStringListener(t,e){So(this,t,e),_o(this,t,(t=>{this.h._attachStringListener(t)}))}attachStringVectorListener(t,e){Eo(this,t,e),_o(this,t,(t=>{this.h._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){So(this,t,e),_o(this,t,(t=>{this.h._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){Eo(this,t,e),_o(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?'),So(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),_o(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 Io=class extends To{};async function Po(t,e,n){return t=await(async(t,e,n,r)=>{if(e&&await wo(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await wo(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 xo(t,e,n){return Po(t,e,n)}function Oo(t,e){const n=nn(t.baseOptions,to,1)||new to;"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 Lo(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,to,1)?.g()||nn(t.baseOptions,to,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,Qr,3);if(!n){var r=n=new Qr;an(r,4,new xr)}"delegate"in e&&("GPU"===e.delegate?an(e=n,2,r=new Tr):an(e=n,4,r=new xr)),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),Oo(t,"/model.dat"),t.H()})):(Oo(t,n.modelAssetBuffer),t.H(),Promise.resolve())}function Bo(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 Fo(t,e){t.s=Math.max(t.s,e)}var jo=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),Bo(this)}finishProcessing(){this.g.finishProcessing(),Bo(this)}close(){this.g.closeGraph()}};async function Uo(t,e,n){return xo(t,e,n)}jo.prototype.close=jo.prototype.close;var ko=class extends jo{constructor(){super(...arguments),this.G=48e3}O(t){this.G=t}};function Vo(t){const e={classifications:on(t,uo).map((t=>function(t,e=-1,n=""){return{categories:t.map((t=>{var e=hn(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:hn(Ae(Me(t,3)),"")??"",displayName:hn(Ae(Me(t,4)),"")??""}})),headIndex:e,headName:n}}(nn(t,Kr,4)?.g()??[],hn(me(Me(t,2)),0),hn(Ae(Me(t,3)),""))))};return null!=ln(t)&&(e.timestampMs=hn(ln(t),0)),e}ko.prototype.setDefaultSampleRate=ko.prototype.O;var No=class extends ko{constructor(t,e){super(new Io(t,e)),this.m=[],sn(t=this.i=new ro,0,1,e=new eo)}get baseOptions(){return nn(this.i,eo,1)}set baseOptions(t){sn(this.i,0,1,t)}o(t){var e=this.i,n=nn(this.i,Xr,2);if(n=n?je(n):new Xr,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),Lo(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 Hr;fn(t,10,"audio_in"),fn(t,10,"sample_rate"),fn(t,15,"timestamped_classifications");const e=new Br;dn(e,oo,this.i);const n=new Dr;Ke(n,_e("mediapipe.tasks.audio.audio_classifier.AudioClassifierGraph")),fn(n,3,"AUDIO:audio_in"),fn(n,3,"SAMPLE_RATE:sample_rate"),fn(n,4,"TIMESTAMPED_CLASSIFICATIONS:timestamped_classifications"),n.o(e),cn(t,n),this.g.attachProtoVectorListener("timestamped_classifications",((t,e)=>{!function(t,e){e.forEach((e=>{e=ho(e),t.m.push(Vo(e))}))}(this,t),Fo(this,e)})),this.g.attachEmptyPacketListener("timestamped_classifications",(t=>{Fo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Mo(t){return{embeddings:on(t,po).map((t=>{const e={headIndex:hn(me(Me(t,3)),0)??-1,headName:hn(Ae(Me(t,4)),"")??""};if(void 0!==en(t,fo,Qe(t,1))){var n=nn(t,fo,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,!1),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,!1),20,!0),o=zt(o,4096,!1),o=zt(o,8192,!1),Ht(a,o),2&o&&Object.freeze(a)}qe(o)||(n=o,(o=(i=1===s)?zt(o,2,!0):zt(o,32,!1))!==n&&Ht(a,o),i&&Object.freeze(a)),2===s&&qe(o)&&(a=Vt(a),o=un(o,r,!1),Ht(a,o),$e(t,r,1,a)),e.floatEmbedding=a.slice()}else r=new Uint8Array(0),e.quantizedEmbedding=nn(t,go,Qe(t,2))?.K()?.i()??r;return e})),timestampMs:hn(ln(t),0)}}No.prototype.classify=No.prototype.L,No.prototype.setOptions=No.prototype.o,No.createFromModelPath=function(t,e){return xo(No,t,{baseOptions:{modelAssetPath:e}})},No.createFromModelBuffer=function(t,e){return Uo(No,t,{baseOptions:{modelAssetBuffer:e}})},No.createFromOptions=function(t,e){return Uo(No,t,e)};var Do=class extends ko{constructor(t,e){super(new Io(t,e)),this.m=[],sn(t=this.i=new so,0,1,e=new eo)}get baseOptions(){return nn(this.i,eo,1)}set baseOptions(t){sn(this.i,0,1,t)}o(t){var e=this.i,n=nn(this.i,io,2);return n=n?je(n):new io,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),Lo(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 Hr;fn(t,10,"audio_in"),fn(t,10,"sample_rate"),fn(t,15,"embeddings_out"),fn(t,15,"timestamped_embeddings_out");const e=new Br;dn(e,ao,this.i);const n=new Dr;Ke(n,_e("mediapipe.tasks.audio.audio_embedder.AudioEmbedderGraph")),fn(n,3,"AUDIO:audio_in"),fn(n,3,"SAMPLE_RATE:sample_rate"),fn(n,4,"EMBEDDINGS:embeddings_out"),fn(n,4,"TIMESTAMPED_EMBEDDINGS:timestamped_embeddings_out"),n.o(e),cn(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=bo(t),this.m.push(Mo(t)),Fo(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{Fo(this,t)})),this.g.attachProtoVectorListener("timestamped_embeddings_out",((t,e)=>{for(const e of t)t=bo(e),this.m.push(Mo(t));Fo(this,e)})),this.g.attachEmptyPacketListener("timestamped_embeddings_out",(t=>{Fo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};let Co;Do.prototype.embed=Do.prototype.M,Do.prototype.setOptions=Do.prototype.o,Do.createFromModelPath=function(t,e){return Uo(Do,t,{baseOptions:{modelAssetPath:e}})},Do.createFromModelBuffer=function(t,e){return Uo(Do,t,{baseOptions:{modelAssetBuffer:e}})},Do.createFromOptions=function(t,e){return Uo(Do,t,e)};const Go=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 $o(){if(void 0===Co)try{await WebAssembly.instantiate(Go),Co=!0}catch{Co=!1}return Co}async function zo(t,e=""){const n=await $o()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var Wo=class{};Wo.forVisionTasks=function(t){return zo("vision",t)},Wo.forTextTasks=function(t){return zo("text",t)},Wo.forGenAiTasks=function(t){return zo("genai",t)},Wo.forAudioTasks=function(t){return zo("audio",t)},Wo.isSimdSupported=function(){return $o()},exports.AudioClassifier=No,exports.AudioEmbedder=Do,exports.AudioTaskRunner=ko,exports.FilesetResolver=Wo,exports.TaskRunner=jo;
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,n){return 0===t&&(t=un(t,e,n)),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=un(o,u,!0)),t=0;t<n.length;t++)n[t]=we(n[t]);r&&(n=Vt(n),i=0,o=un(o,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),mo)===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,r))))&&(f=zt(f,2,!0));let t=!l,o=!0,s=0,a=0;for(;s<h.length;s++){const e=Se(h[s],n,f);if(e instanceof n){if(!l){const n=!!(2&Wt(e.l));t&&=!n,o&&=n}h[a++]=e}}a<s&&(h.length=a),u=zt(u,4,!0),u=zt(u,16,o),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,r),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?u=zt(u,!i.length||16&u&&(!c||32&u)?2:2048,!0):r||(u=zt(u,32,!1)),u!==o&&Ht(i,u),a&&Object.freeze(i)),s&&qe(u)&&(i=Vt(i),u=un(u,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=Zr;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,n){return t=zt(t,2,!!(2&e)),t=zt(t,32,!!(32&e)&&n),zt(t,2048,!1)}function cn(t,e){var n=Dr;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 ln(t){return null==(t=Me(t,2))?t:pe(t)?"number"==typeof t?ve(t):be(t):void 0}function hn(t,e){return t??e}function fn(t,e,n){Ye(t.l,e,we,n)}function dn(t,e,n){e.g?e.j(t,e.g,e.i,n,!0):e.j(t,e.i,n,!0)}var gn=class{constructor(t,e){this.l=xe(t,e)}toJSON(){return pn(this,Le(this.l,Be,void 0,void 0,!1),!0)}v(){return!!(2&Wt(this.l))}};function pn(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 mn(t){return Array.isArray(t)?t[0]instanceof kt?t:[dr,t]:[t,void 0]}function yn(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}}gn.prototype.B=Xt,gn.prototype.toString=function(){return pn(this,this.l,!1).toString()};const vn=Symbol();function bn(t){let e=t[vn];if(!e){const n=Pn(t),r=Dn(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]=wn(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===An||n===Sn||n.s||(t[se||=Symbol()]=n)},t[vn]=e}return e}function wn(t){const e=(t=mn(t))[0].g;if(t=t[1]){const n=bn(t),r=Dn(t).A;return(t,o,i)=>e(t,o,i,r,n)}return e}class _n{}let An,Sn;const En=Symbol();function Tn(t,e,n){const r=n[1];let o;if(r){const n=r[En];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 In(t,e){return[t.j,!e||0<e[0]?void 0:e]}function Pn(t){var e=t[En];if(e)return e;if(!(e=On(t,t[En]=new _n,In,In,Tn)).D&&!e.i&&!e.g){let n=!0;for(let t in e)isNaN(t)||(n=!1);n?(Pe(t[0])===Te?Sn?e=Sn:((e=new _n).A=Pe(!0),e=Sn=e):e=An||=new _n,e=t[En]=e):e.s=!0}return e}function xn(t,e,n){t[e]=n}function On(t,e,n,r,o=xn){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=gr,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 Ln=Symbol();function Bn(t){let e=t[Ln];if(!e){const n=kn(t);e=(t,e)=>$n(t,e,n),t[Ln]=e}return e}const Fn=Symbol();function jn(t){return t.i}function Un(t,e){let n,r;const o=t.i;return(t,i,s)=>o(t,i,s,r||=kn(e).A,n||=Bn(e))}function kn(t){let e=t[Fn];return e||(e=On(t,t[Fn]={},jn,Un),Cn(t),e)}const Vn=Symbol();function Nn(t,e){const n=t.g;return e?(t,r,o)=>n(t,r,o,e):n}function Mn(t,e,n){const r=t.g;let o,i;return(t,s,a)=>r(t,s,a,i||=Dn(e).A,o||=bn(e),n)}function Dn(t){let e=t[Vn];return e||(Pn(t),e=On(t,t[Vn]={},Nn,Mn),Cn(t),e)}function Cn(t){Vn in t&&En in t&&Fn in t&&(t.length=0)}function Gn(t,e){var n=t[e];if(n)return n;if((n=t.D)&&(n=n[e])){var r=(n=mn(n))[0].i;if(n=n[1]){const e=Bn(n),o=kn(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 $n(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=Gn(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=Gn(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 zn(t,e){return new kt(t,e,!1,!1)}function Wn(t,e){return new kt(t,e,!0,!1)}function Rn(t,e,n){$e(t,Rt(t),e,n)}function Hn(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 qn(t,e,n){null!=(e=me(e))&&null!=e&&(Bt(t,n,0),xt(t.g,e))}function Jn(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 Kn(t,e,n){null!=(e=Ae(e))&&Ut(t,n,c(e))}function Yn(t,e,n,r,o){null!=(e=e instanceof gn?e.l:Array.isArray(e)?xe(e,r[0],r[1]):void 0)&&(n=Ft(t,n),o(e,t),jt(t,n))}function Xn(t,e,n){null!=(e=null==e||"string"==typeof e||L(e)||e instanceof M?e:void 0)&&Ut(t,n,$(e).buffer)}var Qn,Zn=zn((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,Rn(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))})),tr=zn((function(t,e,n){return 5===t.i&&(Rn(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))})),er=Wn((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=yn(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)}})),nr=zn((function(t,e,n){return 0===t.i&&(Rn(e,n,nt(t.g,X)),!0)}),Hn),rr=zn((function(t,e,n){return 0===t.i&&(Rn(e,n,0===(t=nt(t.g,X))?void 0:t),!0)}),Hn),or=zn((function(t,e,n){return 0===t.i&&(Rn(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))))})),ir=zn((function(t,e,n){return 0===t.i&&(Rn(e,n,ot(t.g)),!0)}),qn),sr=Wn((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=yn(me,e))&&e.length){n=Ft(t,n);for(let n=0;n<e.length;n++)xt(t.g,e[n]);jt(t,n)}})),ar=zn((function(t,e,n){return 0===t.i&&(Rn(e,n,0===(t=ot(t.g))?void 0:t),!0)}),qn),ur=zn((function(t,e,n){return 0===t.i&&(Rn(e,n,rt(t.g)),!0)}),Jn),cr=zn((function(t,e,n){return 0===t.i&&(Rn(e,n,!1===(t=rt(t.g))?void 0:t),!0)}),Jn),lr=Wn((function(t,e,n){return 2===t.i&&(Ye(e,n,Xe,t=mt(t)),!0)}),(function(t,e,n){if(null!=(e=yn(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))}})),hr=zn((function(t,e,n){return 2===t.i&&(Rn(e,n,""===(t=mt(t))?void 0:t),!0)}),Kn),fr=zn((function(t,e,n){return 2===t.i&&(Rn(e,n,mt(t)),!0)}),Kn),dr=new kt((function(t,e,n,r,o){return 2===t.i&&(pt(t,tn(e,r,n,!0),o),!0)}),Yn,!1,!0),gr=new kt((function(t,e,n,r,o){return 2===t.i&&(pt(t,tn(e,r,n),o),!0)}),Yn,!1,!0);Qn=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++)Yn(t,e[i],n,r,o)}),!0,!0);var pr=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}),Yn,!1,!0),mr=zn((function(t,e,n){return 2===t.i&&(Rn(e,n,yt(t)),!0)}),Xn),yr=zn((function(t,e,n){return 0===t.i&&(Rn(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))})),vr=Wn((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=yn(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 br{constructor(t,e){this.i=t,this.g=e,this.j=sn,this.defaultValue=void 0}}function wr(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;bn(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 _r=[0,hr,zn((function(t,e,n){return 2===t.i&&(Rn(e,n,(t=yt(t))===V()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof gn){const r=e.P;return void(r&&(e=r(e),null!=e&&Ut(t,n,$(e).buffer)))}if(Array.isArray(e))return}Xn(t,e,n)}))],Ar=[0,fr],Sr=[0,ir,yr,ur,-1,sr,yr,-1],Er=[0,ur,-1],Tr=class extends gn{constructor(){super()}};Tr.u=[6];var Ir=[0,ur,fr,ur,yr,-1,vr,fr,-1,Er,yr],Pr=[0,fr,-2],xr=class extends gn{constructor(){super()}},Or=[0],Lr=[0,ir,ur,-3],Br=class extends gn{constructor(t){super(t,2)}},Fr={},jr=[-2,Fr,ur];Fr[336783863]=[0,fr,ur,-1,ir,[0,[1,2,3,4,5,6],pr,Or,pr,Ir,pr,Pr,pr,Lr,pr,Sr,pr,[0,fr]],Ar,ur];var Ur=[0,hr,cr],kr=[0,rr,-1,cr,-3,rr,sr,hr,ar,rr,-1,cr,ar,cr,-2,hr],Vr=[-1,{}],Nr=[0,fr,1,Vr],Mr=[0,fr,lr,Vr],Dr=class extends gn{constructor(t){super(t,500)}o(t){return sn(this,0,7,t)}};Dr.u=[3,4,5,6,8,13,17,1005];var Cr,Gr=[-500,hr,-1,lr,-3,jr,Qn,_r,ar,-1,Nr,Mr,Qn,Ur,hr,kr,ar,lr,987,lr],$r=[0,hr,-1,Vr],zr=[-500,fr,-1,[-1,{}],998,fr],Wr=[-500,fr,lr,-1,[-2,{},ur],997,lr,-1],Rr=[-500,fr,lr,Vr,998,lr],Hr=class extends gn{constructor(){super(void 0,500)}o(t){return sn(this,0,1001,t)}};Hr.u=[1,6,7,9,10,15,16,17,14,1002],Hr.prototype.g=(Cr=[-500,Qn,Gr,4,Qn,zr,Qn,Wr,ar,Qn,Rr,lr,ar,Nr,Mr,Qn,$r,lr,-2,kr,hr,-1,cr,979,Vr,Qn,_r],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}}}};$n(this.l,t,kn(Cr)),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 qr=class extends gn{constructor(t){super(t)}},Jr=[0,ir,tr,fr,-1],Kr=class extends gn{constructor(t){super(t)}g(){return on(this,qr)}};Kr.u=[1];var Yr=[0,Qn,Jr],Xr=class extends gn{constructor(t){super(t)}};Xr.u=[4,5];var Qr=class extends gn{constructor(t){super(t)}},Zr=[1,2,3,4,5],to=class extends gn{constructor(t){super(t)}g(){return null!=We(this)}i(){return null!=Ae(Me(this,2))}},eo=class extends gn{constructor(t){super(t)}},no=[0,[0,mr,fr,[0,ir,nr,-1],[0,or,nr]],ur,[0,Zr,pr,Lr,pr,Ir,pr,Sr,pr,Or,pr,Pr],yr],ro=class extends gn{constructor(t){super(t)}},oo=new br(451755788,ro);Fr[451755788]=[0,no,[0,fr,ir,tr,lr,-1],Zn];var io=class extends gn{constructor(t){super(t)}},so=class extends gn{constructor(t){super(t)}},ao=new br(487277289,so);Fr[487277289]=[0,no,[0,ur,-1]];var uo=class extends gn{constructor(t){super(t)}},co=[0,1,ir,fr,Yr],lo=class extends gn{constructor(t){super(t)}};lo.u=[1];var ho=wr(lo,[0,Qn,co,nr]),fo=class extends gn{constructor(t){super(t)}};fo.u=[1];var go=class extends gn{constructor(t){super(t)}K(){const t=We(this);return null==t?V():t}},po=class extends gn{constructor(t){super(t)}},mo=[1,2],yo=[0,mo,pr,[0,er],pr,[0,mr],ir,fr],vo=class extends gn{constructor(t){super(t)}};vo.u=[1];var bo=wr(vo,[0,Qn,yo,nr]);async function wo(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 _o(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 Ao(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 So(t,e,n){t.h.simpleListeners=t.h.simpleListeners||{},t.h.simpleListeners[e]=n}function Eo(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 To=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?'),_o(this,r||"input_audio",(r=>{_o(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),_o(this,r,(t=>{this.h._addAudioToInputStream(this.g,e,n,t,o)}))}addGpuBufferToStream(t,e,n){_o(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){_o(this,e,(e=>{this.h._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){_o(this,e,(e=>{this.h._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){_o(this,e,(e=>{this.h._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){_o(this,e,(e=>{this.h._addIntToInputStream(t,e,n)}))}addStringToStream(t,e,n){_o(this,e,(e=>{_o(this,t,(t=>{this.h._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){_o(this,e,(e=>{Ao(this,Object.keys(t),(r=>{Ao(this,Object.values(t),(o=>{this.h._addFlatHashMapToInputStream(r,o,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){_o(this,n,(n=>{_o(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){_o(this,t,(t=>{this.h._addEmptyPacketToInputStream(t,e)}))}addBoolVectorToStream(t,e,n){_o(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){_o(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){_o(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){_o(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){_o(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)_o(this,e,(t=>{this.h._addStringVectorEntry(r,t)}));this.h._addStringVectorToInputStream(r,e,n)}))}addBoolToInputSidePacket(t,e){_o(this,e,(e=>{this.h._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){_o(this,e,(e=>{this.h._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){_o(this,e,(e=>{this.h._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){_o(this,e,(e=>{this.h._addIntToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){_o(this,e,(e=>{_o(this,t,(t=>{this.h._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){_o(this,n,(n=>{_o(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){_o(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){_o(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){_o(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){_o(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){_o(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)_o(this,e,(t=>{this.h._addStringVectorEntry(n,t)}));this.h._addStringVectorToInputSidePacket(n,e)}))}attachBoolListener(t,e){So(this,t,e),_o(this,t,(t=>{this.h._attachBoolListener(t)}))}attachBoolVectorListener(t,e){Eo(this,t,e),_o(this,t,(t=>{this.h._attachBoolVectorListener(t)}))}attachIntListener(t,e){So(this,t,e),_o(this,t,(t=>{this.h._attachIntListener(t)}))}attachIntVectorListener(t,e){Eo(this,t,e),_o(this,t,(t=>{this.h._attachIntVectorListener(t)}))}attachDoubleListener(t,e){So(this,t,e),_o(this,t,(t=>{this.h._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){Eo(this,t,e),_o(this,t,(t=>{this.h._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){So(this,t,e),_o(this,t,(t=>{this.h._attachFloatListener(t)}))}attachFloatVectorListener(t,e){Eo(this,t,e),_o(this,t,(t=>{this.h._attachFloatVectorListener(t)}))}attachStringListener(t,e){So(this,t,e),_o(this,t,(t=>{this.h._attachStringListener(t)}))}attachStringVectorListener(t,e){Eo(this,t,e),_o(this,t,(t=>{this.h._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){So(this,t,e),_o(this,t,(t=>{this.h._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){Eo(this,t,e),_o(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?'),So(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),_o(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 Io=class extends To{};async function Po(t,e,n){return t=await(async(t,e,n,r)=>{if(e&&await wo(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await wo(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 xo(t,e,n){return Po(t,e,n)}function Oo(t,e){const n=nn(t.baseOptions,to,1)||new to;"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 Lo(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,to,1)?.g()||nn(t.baseOptions,to,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,Qr,3);if(!n){var r=n=new Qr;an(r,4,new xr)}"delegate"in e&&("GPU"===e.delegate?an(e=n,2,r=new Tr):an(e=n,4,r=new xr)),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),Oo(t,"/model.dat"),t.H()})):(Oo(t,n.modelAssetBuffer),t.H(),Promise.resolve())}function Bo(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 Fo(t,e){t.s=Math.max(t.s,e)}var jo=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),Bo(this)}finishProcessing(){this.g.finishProcessing(),Bo(this)}close(){this.g.closeGraph()}};async function Uo(t,e,n){return xo(t,e,n)}jo.prototype.close=jo.prototype.close;var ko=class extends jo{constructor(){super(...arguments),this.G=48e3}O(t){this.G=t}};function Vo(t){const e={classifications:on(t,uo).map((t=>function(t,e=-1,n=""){return{categories:t.map((t=>{var e=hn(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:hn(Ae(Me(t,3)),"")??"",displayName:hn(Ae(Me(t,4)),"")??""}})),headIndex:e,headName:n}}(nn(t,Kr,4)?.g()??[],hn(me(Me(t,2)),0),hn(Ae(Me(t,3)),""))))};return null!=ln(t)&&(e.timestampMs=hn(ln(t),0)),e}ko.prototype.setDefaultSampleRate=ko.prototype.O;var No=class extends ko{constructor(t,e){super(new Io(t,e)),this.m=[],sn(t=this.i=new ro,0,1,e=new eo)}get baseOptions(){return nn(this.i,eo,1)}set baseOptions(t){sn(this.i,0,1,t)}o(t){var e=this.i,n=nn(this.i,Xr,2);if(n=n?je(n):new Xr,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),Lo(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 Hr;fn(t,10,"audio_in"),fn(t,10,"sample_rate"),fn(t,15,"timestamped_classifications");const e=new Br;dn(e,oo,this.i);const n=new Dr;Ke(n,_e("mediapipe.tasks.audio.audio_classifier.AudioClassifierGraph")),fn(n,3,"AUDIO:audio_in"),fn(n,3,"SAMPLE_RATE:sample_rate"),fn(n,4,"TIMESTAMPED_CLASSIFICATIONS:timestamped_classifications"),n.o(e),cn(t,n),this.g.attachProtoVectorListener("timestamped_classifications",((t,e)=>{!function(t,e){e.forEach((e=>{e=ho(e),t.m.push(Vo(e))}))}(this,t),Fo(this,e)})),this.g.attachEmptyPacketListener("timestamped_classifications",(t=>{Fo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Mo(t){return{embeddings:on(t,po).map((t=>{const e={headIndex:hn(me(Me(t,3)),0)??-1,headName:hn(Ae(Me(t,4)),"")??""};if(void 0!==en(t,fo,Qe(t,1))){var n=nn(t,fo,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,!1),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,!1),20,!0),o=zt(o,4096,!1),o=zt(o,8192,!1),Ht(a,o),2&o&&Object.freeze(a)}qe(o)||(n=o,(o=(i=1===s)?zt(o,2,!0):zt(o,32,!1))!==n&&Ht(a,o),i&&Object.freeze(a)),2===s&&qe(o)&&(a=Vt(a),o=un(o,r,!1),Ht(a,o),$e(t,r,1,a)),e.floatEmbedding=a.slice()}else r=new Uint8Array(0),e.quantizedEmbedding=nn(t,go,Qe(t,2))?.K()?.i()??r;return e})),timestampMs:hn(ln(t),0)}}No.prototype.classify=No.prototype.L,No.prototype.setOptions=No.prototype.o,No.createFromModelPath=function(t,e){return xo(No,t,{baseOptions:{modelAssetPath:e}})},No.createFromModelBuffer=function(t,e){return Uo(No,t,{baseOptions:{modelAssetBuffer:e}})},No.createFromOptions=function(t,e){return Uo(No,t,e)};var Do=class extends ko{constructor(t,e){super(new Io(t,e)),this.m=[],sn(t=this.i=new so,0,1,e=new eo)}get baseOptions(){return nn(this.i,eo,1)}set baseOptions(t){sn(this.i,0,1,t)}o(t){var e=this.i,n=nn(this.i,io,2);return n=n?je(n):new io,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),Lo(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 Hr;fn(t,10,"audio_in"),fn(t,10,"sample_rate"),fn(t,15,"embeddings_out"),fn(t,15,"timestamped_embeddings_out");const e=new Br;dn(e,ao,this.i);const n=new Dr;Ke(n,_e("mediapipe.tasks.audio.audio_embedder.AudioEmbedderGraph")),fn(n,3,"AUDIO:audio_in"),fn(n,3,"SAMPLE_RATE:sample_rate"),fn(n,4,"EMBEDDINGS:embeddings_out"),fn(n,4,"TIMESTAMPED_EMBEDDINGS:timestamped_embeddings_out"),n.o(e),cn(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=bo(t),this.m.push(Mo(t)),Fo(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{Fo(this,t)})),this.g.attachProtoVectorListener("timestamped_embeddings_out",((t,e)=>{for(const e of t)t=bo(e),this.m.push(Mo(t));Fo(this,e)})),this.g.attachEmptyPacketListener("timestamped_embeddings_out",(t=>{Fo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};let Co;Do.prototype.embed=Do.prototype.M,Do.prototype.setOptions=Do.prototype.o,Do.createFromModelPath=function(t,e){return Uo(Do,t,{baseOptions:{modelAssetPath:e}})},Do.createFromModelBuffer=function(t,e){return Uo(Do,t,{baseOptions:{modelAssetBuffer:e}})},Do.createFromOptions=function(t,e){return Uo(Do,t,e)};const Go=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 $o(){if(void 0===Co)try{await WebAssembly.instantiate(Go),Co=!0}catch{Co=!1}return Co}async function zo(t,e=""){const n=await $o()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}}var Wo=class{};Wo.forVisionTasks=function(t){return zo("vision",t)},Wo.forTextTasks=function(t){return zo("text",t)},Wo.forGenAiTasks=function(t){return zo("genai",t)},Wo.forAudioTasks=function(t){return zo("audio",t)},Wo.isSimdSupported=function(){return $o()},exports.AudioClassifier=No,exports.AudioEmbedder=Do,exports.AudioTaskRunner=ko,exports.FilesetResolver=Wo,exports.TaskRunner=jo;
2
2
  //# sourceMappingURL=audio_bundle_cjs.js.map