@mediapipe/tasks-vision 1.2.0 → 1.2.1-rc.20261031

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/vision_bundle.mjs CHANGED
@@ -1,2 +1,2 @@
1
- var t="undefined"!=typeof self?self:{};function e(e,r){t:{for(var n=["CLOSURE_FLAGS"],i=t,s=0;s<n.length;s++)if(null==(i=i[n[s]])){n=null;break t}n=i}return null!=(e=n&&n[e])?e:r}function r(e,r){e=e.split(".");for(var n,i=t;e.length&&(n=e.shift());)e.length||void 0===r?i=i[n]&&i[n]!==Object.prototype[n]?i[n]:i[n]={}:i[n]=r}function n(){throw Error("Invalid UTF8")}function i(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}var s,o,a=void 0,h="undefined"!=typeof TextDecoder,u="undefined"!=typeof TextEncoder;function c(t){if(u)t=(o||=new TextEncoder).encode(t);else{let r=0,n=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(e<128)n[r++]=e;else{if(e<2048)n[r++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&i<t.length){let s=t.charCodeAt(++i);if(s>=56320&&s<=57343){e=1024*(e-55296)+s-56320+65536,n[r++]=e>>18|240,n[r++]=e>>12&63|128,n[r++]=e>>6&63|128,n[r++]=63&e|128;continue}i--}e=65533}n[r++]=e>>12|224,n[r++]=e>>6&63|128}n[r++]=63&e|128}}t=r===n.length?n:n.subarray(0,r)}return t}function l(e){t.setTimeout(()=>{throw e},0)}var d=e(610401301,!1),f=e(748402147,!0);function p(){var e=t.navigator;return e&&(e=e.userAgent)?e:""}var m,g=t.navigator;function v(t){return v[" "](t),t}m=g&&g.userAgentData||null,v[" "]=function(){};var _={},y=null;function E(t){var e=t.length,r=3*e/4;r%3?r=Math.floor(r):-1!="=.".indexOf(t[e-1])&&(r=-1!="=.".indexOf(t[e-2])?r-2:r-1);var n=new Uint8Array(r),i=0;return function(t,e){function r(e){for(;n<t.length;){let e=t.charAt(n++),r=y[e];if(null!=r)return r;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}A();for(var n=0;;){let t=r(-1),n=r(0),i=r(64),s=r(64);if(64===s&&-1===t)break;e(t<<2|n>>4),64!=i&&(e(n<<4&240|i>>2),64!=s&&e(i<<6&192|s))}}(t,function(t){n[i++]=t}),i!==r?n.subarray(0,i):n}function A(){if(!y){y={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let r=0;r<5;r++){let n=t.concat(e[r].split(""));_[r]=n;for(let t=0;t<n.length;t++){let e=n[t];void 0===y[e]&&(y[e]=t)}}}}var w="undefined"!=typeof Uint8Array,T=!(!(!!d&&(!!m&&m.brands.length>0))&&(-1!=p().indexOf("Trident")||-1!=p().indexOf("MSIE")))&&"function"==typeof btoa,b=/[-_.]/g,k={"-":"+",_:"/",".":"="};function S(t){return k[t]||""}function L(t){if(!T)return E(t);t=b.test(t)?t.replace(b,S):t,t=atob(t);var e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}function x(t){return w&&null!=t&&t instanceof Uint8Array}var R={};function I(){return C||=new N(null,R)}function F(t){O(R);var e=t.h;return null==(e=null==e||x(e)?e:"string"==typeof e?L(e):null)?e:t.h=e}var C,N=class{i(){return new Uint8Array(F(this)||0)}constructor(t,e){if(O(e),this.h=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};function O(t){if(t!==R)throw Error("illegal external caller")}function M(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}var D=void 0;function P(t){return M(t=Error(t),"warning"),t}function $(t,e){if(null!=t){var r=D??={},n=r[t]||0;n>=e||(r[t]=n+1,M(t=Error(),"incident"),l(t))}}function U(){return"function"==typeof BigInt}var B="function"==typeof Symbol&&"symbol"==typeof Symbol();function j(t,e,r=!1){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?r&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():e}var G,V=j("jas",void 0,!0),H=j(void 0,"0di"),K=j(void 0,"1oa"),X=j(void 0,Symbol()),W=j(void 0,"0ub"),Y=j(void 0,"0ubs"),z=j(void 0,"0ubsb"),q=j(void 0,"0actk"),J=j("m_m","lb",!0),Z=j(),Q={Wa:{value:0,configurable:!0,writable:!0,enumerable:!1}},tt=Object.defineProperties,et=B?V:"Wa",rt=[];function nt(t,e){B||et in t||tt(t,Q),t[et]|=e}function it(t,e){B||et in t||tt(t,Q),t[et]=e}function st(t){return nt(t,34),t}function ot(t){return nt(t,8192),t}it(rt,7),G=Object.freeze(rt);var at={};function ht(t){return null!=t&&t[J]===at}function ut(t,e){return void 0===e?t.i!==ct&&!!(2&t.B[et]):!!(2&e)&&t.i!==ct}var ct={};function lt(t,e){if(null!=t)if("string"==typeof t)t=t?new N(t,R):I();else if(t.constructor!==N)if(x(t))t=t.length?new N(new Uint8Array(t),R):I();else{if(!e)throw Error();t=void 0}return t}class dt{constructor(t,e,r){this.h=t,this.i=e,this.l=r}next(){var t=this.h.next();return t.done||(t.value=this.i.call(this.l,t.value)),t}[Symbol.iterator](){return this}}function ft(t,e,r){var n,i=128&e?0:-1,s=t.length;(n=!!s)&&(n=null!=(n=t[s-1])&&"object"==typeof n&&n.constructor===Object);var o=s+(n?-1:0);for(e=128&e?1:0;e<o;e++)r(e-i,t[e]);if(n){t=t[s-1];for(let e in t)!isNaN(e)&&r(+e,t[e])}}Object.freeze({});var pt={};function mt(t){return 128&t?pt:void 0}function gt(t){return t.jb=!0,t}var vt=gt(t=>"number"==typeof t),_t=gt(t=>"string"==typeof t),yt=gt(t=>"boolean"==typeof t),Et="function"==typeof t.BigInt&&"bigint"==typeof t.BigInt(0);function At(t){var e=t;if(_t(e)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e))throw Error(String(e))}else if(vt(e)&&!Number.isSafeInteger(e))throw Error(String(e));return Et?BigInt(t):t=yt(t)?t?"1":"0":_t(t)?t.trim()||"0":String(t)}var wt=gt(t=>Et?t>=bt&&t<=St:"-"===t[0]?Lt(t,Tt):Lt(t,kt)),Tt=Number.MIN_SAFE_INTEGER.toString(),bt=Et?BigInt(Number.MIN_SAFE_INTEGER):void 0,kt=Number.MAX_SAFE_INTEGER.toString(),St=Et?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Lt(t,e){if(t.length>e.length)return!1;if(t.length<e.length||t===e)return!0;for(let r=0;r<t.length;r++){let n=t[r],i=e[r];if(n>i)return!1;if(n<i)return!0}}var xt,Rt="function"==typeof Uint8Array.prototype.slice,It=0,Ft=0;function Ct(t){var e=t>>>0;It=e,Ft=(t-e)/4294967296>>>0}function Nt(t){if(t<0){Ct(-t);let[e,r]=Gt(It,Ft);It=e>>>0,Ft=r>>>0}else Ct(t)}function Ot(t){var e=xt||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),Ft=0,It=e.getUint32(0,!0)}function Mt(t,e){var r=4294967296*e+(t>>>0);return Number.isSafeInteger(r)?r:$t(t,e)}function Dt(t,e){return At(U()?BigInt.asUintN(64,(BigInt(e>>>0)<<BigInt(32))+BigInt(t>>>0)):$t(t,e))}function Pt(t,e){return U()?At(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(e))<<BigInt(32))+BigInt.asUintN(32,BigInt(t)))):At(Bt(t,e))}function $t(t,e){if(t>>>=0,(e>>>=0)<=2097151)var r=""+(4294967296*e+t);else U()?r=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(r=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),r+=8147497*e,e*=2,t>=1e7&&(r+=t/1e7>>>0,t%=1e7),r>=1e7&&(e+=r/1e7>>>0,r%=1e7),r=e+Ut(r)+Ut(t));return r}function Ut(t){return t=String(t),"0000000".slice(t.length)+t}function Bt(t,e){if(2147483648&e)if(U())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{let[r,n]=Gt(t,e);t="-"+$t(r,n)}else t=$t(t,e);return t}function jt(t){if(t.length<16)Nt(Number(t));else if(U())t=BigInt(t),It=Number(t&BigInt(4294967295))>>>0,Ft=Number(t>>BigInt(32)&BigInt(4294967295));else{let e=+("-"===t[0]);Ft=It=0;let r=t.length;for(let n=e,i=(r-e)%6+e;i<=r;n=i,i+=6){let e=Number(t.slice(n,i));Ft*=1e6,(It=1e6*It+e)>=4294967296&&(Ft+=Math.trunc(It/4294967296),Ft>>>=0,It>>>=0)}if(e){let[t,e]=Gt(It,Ft);It=t,Ft=e}}}function Gt(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function Vt(t){return Array.prototype.slice.call(t)}var Ht="function"==typeof BigInt?BigInt.asIntN:void 0,Kt="function"==typeof BigInt?BigInt.asUintN:void 0,Xt=Number.isSafeInteger,Wt=Number.isFinite,Yt=Math.trunc,zt=At(0);function qt(t){if("number"!=typeof t)throw Error(`Value of float/double field must be a number, found ${typeof t}: ${t}`);return t}function Jt(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function Zt(t){if("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}var Qt=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function te(t){switch(typeof t){case"bigint":return!0;case"number":return Wt(t);case"string":return Qt.test(t);default:return!1}}function ee(t){if(null!=t){if(!Wt(t))throw P("enum");t|=0}return t}function re(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Wt(t)?0|t:void 0}function ne(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return Wt(t)?t>>>0:void 0}function ie(t,e){if(e??=1024,!te(t))throw P("int64");var r=typeof t;switch(e){case 512:switch(r){case"string":return ue(t);case"bigint":return String(Ht(64,t));default:return he(t)}case 1024:switch(r){case"string":return ce(t);case"bigint":return At(Ht(64,t));default:return At(Xt(t)?t:he(t))}case 0:switch(r){case"string":return ue(t);case"bigint":return At(Ht(64,t));default:return ae(t)}default:return function(t,e=`unexpected value ${t}!`){throw Error(e)}(e,"Unknown format requested type for int64")}}function se(t){var e=t.length;return("-"===t[0]?e<20||20===e&&t<="-9223372036854775808":e<19||19===e&&t<="9223372036854775807")?t:(jt(t),Bt(It,Ft))}function oe(t){if("-"===t[0])var e=!1;else e=(e=t.length)<20||20===e&&t<="18446744073709551615";return e?t:(jt(t),$t(It,Ft))}function ae(t){if(t=Yt(t),!Xt(t)){Nt(t);var e=It,r=Ft;(t=2147483648&r)&&(r=~r>>>0,0==(e=1+~e>>>0)&&(r=r+1>>>0)),t="number"==typeof(e=Mt(e,r))?t?-e:e:t?"-"+e:e}return t}function he(t){return t=Yt(t),Xt(t)?t=String(t):(Nt(t),t=Bt(It,Ft)),t}function ue(t){var e=Yt(Number(t));return Xt(e)?String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),se(t))}function ce(t){var e=Yt(Number(t));return Xt(e)?At(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),U()?At(Ht(64,BigInt(t))):At(se(t)))}function le(t){var e=typeof t;return null==t?t:"bigint"===e?At(Ht(64,t)):te(t)?"string"===e?ce(t):At(Xt(t)?t:he(t)):void 0}function de(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Ht(64,t));if(te(t)){if("string"===e)return ue(t);if("number"===e)return ae(t)}}function fe(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Kt(64,t));if(te(t)){if("string"===e)return e=Yt(Number(t)),Xt(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),t=oe(t)),t;if("number"===e)return function(t){return(t=Yt(t))>=0&&Xt(t)||(Nt(t),t=Mt(It,Ft)),t}(t)}}function pe(t){if(null==t||"string"==typeof t||t instanceof N)return t}function me(t){if("string"!=typeof t)throw Error();return t}function ge(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function ve(t){return null==t||"string"==typeof t?t:void 0}function _e(t,e,r,n){return ht(t)?t:Array.isArray(t)?((n=(r=0|t[et])|32&n|2&n)!==r&&it(t,n),new e(t)):(r?2&n?((t=e[H])||(st((t=new e).B),t=e[H]=t),e=t):e=new e:e=void 0,e)}function ye(t,e,r){return e?ie(t,1024):le(t)??(r?zt:void 0)}function Ee(t){return t}var Ae={},we=function(){try{return v(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class Te{constructor(){this.h=new Map}get(t){return this.h.get(t)}set(t,e){return this.h.set(t,e),this.size=this.h.size,this}delete(t){return t=this.h.delete(t),this.size=this.h.size,t}clear(){this.h.clear(),this.size=this.h.size}has(t){return this.h.has(t)}entries(){return this.h.entries()}keys(){return this.h.keys()}values(){return this.h.values()}forEach(t,e){return this.h.forEach(t,e)}[Symbol.iterator](){return this.entries()}}var be=we?(Object.setPrototypeOf(Te.prototype,Map.prototype),Object.defineProperties(Te.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),Te):class extends Map{constructor(){super()}};function ke(t){return t}function Se(t){if(2&t.N)throw Error("Cannot mutate an immutable Map")}var Le,xe=class extends be{constructor(t,e,r=ke,n=ke){super(),this.N=0|t[et],this.O=e,this.ca=r,this.oa=this.O?Re:n;for(let i=0;i<t.length;i++){let s=t[i],o=r(s[0],!1,!0),a=s[1];e?void 0===a&&(a=null):a=n(s[1],!1,!0,void 0,void 0,this.N),super.set(o,a)}}fa(t){return ot(Array.from(super.entries(),t))}clear(){Se(this),super.clear()}delete(t){return Se(this),super.delete(this.ca(t,!0,!1))}entries(){if(this.O){var t=super.keys();t=new dt(t,Ie,this)}else t=super.entries();return t}values(){if(this.O){var t=super.keys();t=new dt(t,xe.prototype.get,this)}else t=super.values();return t}forEach(t,e){this.O?super.forEach((r,n,i)=>{t.call(e,i.get(n),n,i)}):super.forEach(t,e)}set(t,e){return Se(this),null==(t=this.ca(t,!0,!1))?this:null==e?(super.delete(t),this):super.set(t,this.oa(e,!0,!0,this.O,!1,this.N))}hb(t){var e=this.ca(t[0],!1,!0);t=t[1],t=this.O?void 0===t?null:t:this.oa(t,!1,!0,void 0,!1,this.N),super.set(e,t)}has(t){return super.has(this.ca(t,!1,!1))}get(t){t=this.ca(t,!1,!1);var e=super.get(t);if(void 0!==e){var r=this.O;return r?((r=this.oa(e,!1,!0,r,this.Ga,this.N))!==e&&super.set(t,r),r):e}}[Symbol.iterator](){return this.entries()}};function Re(t,e,r,n,i,s){return t=_e(t,n,r,s),i&&(t=Je(t)),t}function Ie(t){return[t,this.get(t)]}function Fe(){return Le||=new xe(st([]),void 0,void 0,void 0,Ae)}function Ce(t){return X?t[X]:void 0}function Ne(t,e){for(let r in t)!isNaN(r)&&e(t,+r,t[r])}xe.prototype.toJSON=void 0;var Oe,Me,De,Pe=class{},$e={eb:!0};function Ue(t,e){e<100||$(Y,1)}function Be(t,e,r,n){var i=void 0!==n;n=!!n;var s,o=X;!i&&B&&o&&(s=t[o])&&Ne(s,Ue),o=[];var a=t.length;s=4294967295;var h=!1,u=!!(64&e),c=u?128&e?0:-1:void 0;if(!(1&e)){var l=a&&t[a-1];null!=l&&"object"==typeof l&&l.constructor===Object?s=--a:l=void 0,!u||128&e||i||(h=!0,s=(Oe??Ee)(s-c,c,t,l,void 0)+c)}e=void 0;for(var d=0;d<a;d++){let i=t[d];if(null!=i&&null!=(i=r(i,n)))if(u&&d>=s){let t=d-c;(e??={})[t]=i}else o[d]=i}if(l)for(let t in l){if(null==(a=l[t])||null==(a=r(a,n)))continue;let i;d=+t,u&&!Number.isNaN(d)&&(i=d+c)<s?o[i]=a:(e??={})[t]=a}return e&&(h?o.push(e):o[s]=e),i&&X&&(t=Ce(t))&&t instanceof Pe&&(o[X]=function(t){var e=new Pe;return Ne(t,(t,r,n)=>{e[r]=Vt(n)}),e.la=t.la,e}(t)),o}function je(t){return t[0]=Ge(t[0]),t[1]=Ge(t[1]),t}function Ge(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return wt(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Array.isArray(t)){var e=0|t[et];return 0===t.length&&1&e?void 0:Be(t,e,Ge)}if(ht(t))return Ve(t);if(t instanceof N){if(null==(e=t.h))t="";else if("string"==typeof e)t=e;else{if(T){for(var r="",n=0,i=e.length-10240;n<i;)r+=String.fromCharCode.apply(null,e.subarray(n,n+=10240));r+=String.fromCharCode.apply(null,n?e.subarray(n):e),e=btoa(r)}else{void 0===r&&(r=0),A(),r=_[r],n=Array(Math.floor(e.length/3)),i=r[64]||"";let t=0,u=0;for(;t<e.length-2;t+=3){var s=e[t],o=e[t+1],a=e[t+2],h=r[s>>2];s=r[(3&s)<<4|o>>4],o=r[(15&o)<<2|a>>6],a=r[63&a],n[u++]=h+s+o+a}switch(h=0,a=i,e.length-t){case 2:a=r[(15&(h=e[t+1]))<<2]||i;case 1:e=e[t],n[u]=r[e>>2]+r[(3&e)<<4|h>>4]+a+i}e=n.join("")}t=t.h=e}return t}return t instanceof xe?t=0!==t.size?t.fa(je):void 0:void 0}return t}function Ve(t){return Be(t=t.B,0|t[et],Ge)}function He(t,e){return Ke(t,e[0],e[1])}function Ke(t,e,r,n=0){if(null==t){var i=32;r?(t=[r],i|=128):t=[],e&&(i=-16760833&i|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(i=0|t[et],f&&1&i)throw Error("rfarr");if(2048&i&&!(2&i)&&function(){if(f)throw Error("carr");$(q,5)}(),256&i)throw Error("farr");if(64&i)return(i|n)!==i&&it(t,i|n),t;if(r&&(i|=128,r!==t[0]))throw Error("mid");t:{i|=64;var s=(r=t).length;if(s){var o=s-1;let t=r[o];if(null!=t&&"object"==typeof t&&t.constructor===Object){if((o-=e=128&i?0:-1)>=1024)throw Error("pvtlmt");for(var a in t)(s=+a)<o&&(r[s+e]=t[a],delete t[a]);i=-16760833&i|(1023&o)<<14;break t}}if(e){if((a=Math.max(e,s-(128&i?0:-1)))>1024)throw Error("spvt");i=-16760833&i|(1023&a)<<14}}}return it(t,64|i|n),t}function Xe(t,e){if("object"!=typeof t)return t;if(Array.isArray(t)){var r=0|t[et];return 0===t.length&&1&r?void 0:We(t,r,e)}if(ht(t))return ze(t);if(t instanceof xe){if(2&(e=t.N))return t;if(!t.size)return;if(r=st(t.fa()),t.O)for(t=0;t<r.length;t++){let n=r[t],i=n[1];i=null==i||"object"!=typeof i?void 0:ht(i)?ze(i):Array.isArray(i)?We(i,0|i[et],!!(32&e)):void 0,n[1]=i}return r}return t instanceof N?t:void 0}function We(t,e,r){return 2&e||(!r||4096&e||16&e?t=qe(t,e,!1,r&&!(16&e)):(nt(t,34),4&e&&Object.freeze(t))),t}function Ye(t,e,r){return t=new t.constructor(e),r&&(t.i=ct),t.o=ct,t}function ze(t){var e=t.B,r=0|e[et];return ut(t,r)?t:er(t,e,r)?Ye(t,e):qe(e,r)}function qe(t,e,r,n){return n??=!!(34&e),t=Be(t,e,Xe,n),n=32,r&&(n|=2),it(t,e=16769217&e|n),t}function Je(t){var e=t.B,r=0|e[et];return ut(t,r)?er(t,e,r)?Ye(t,e,!0):new t.constructor(qe(e,r,!1)):t}function Ze(t){if(t.i!==ct)return!1;var e=t.B;return nt(e=qe(e,0|e[et]),2048),t.B=e,t.i=void 0,t.o=void 0,!0}function Qe(t){if(!Ze(t)&&ut(t,0|t.B[et]))throw Error()}function tr(t,e){void 0===e&&(e=0|t[et]),32&e&&!(4096&e)&&it(t,4096|e)}function er(t,e,r){return!!(2&r)||!(!(32&r)||4096&r)&&(it(e,2|r),t.i=ct,!0)}var rr=At(0),nr={};function ir(t,e,r,n){if(null!==(e=sr(t.B,e,void 0,n))||r&&t.o!==ct)return e}function sr(t,e,r,n){if(-1===e)return null;var i=e+(r?0:-1),s=t.length-1;if(!(s<1+(r?0:-1))){if(i>=s){var o=t[s];if(null!=o&&"object"==typeof o&&o.constructor===Object){r=o[e];var a=!0}else{if(i!==s)return;r=o}}else r=t[i];if(n&&null!=r){if(null==(n=n(r)))return n;if(!Object.is(n,r))return a?o[e]=n:t[i]=n,n}return r}}function or(t,e,r,n){Qe(t);var i=t.B;return ar(i,0|i[et],e,r,n),t}function ar(t,e,r,n,i){var s=r+(i?0:-1),o=t.length-1;if(o>=1+(i?0:-1)&&s>=o){let i=t[o];if(null!=i&&"object"==typeof i&&i.constructor===Object)return i[r]=n,e}return s<=o?(t[s]=n,e):(void 0!==n&&(r>=(o=(e??=0|t[et])>>14&1023||536870912)?null!=n&&(t[o+(i?0:-1)]={[r]:n}):t[s]=n),e)}function hr(t,e){return ht(t=sr(t.B,e))||Array.isArray(t)}function ur(t,e,r){return hr(t,e=yr(t,r)===e?e:-1)}function cr(t,e,r,n,i){var s=t.B,o=0|s[et];n=n&&4!==n?1!==n&&ut(t,o)?1:n:4,i=!!i||3===n,2===n&&Ze(t)&&(o=0|(s=t.B)[et]);var a=(t=dr(s,e))===G?7:0|t[et],h=fr(a,o),u=!(4&h);if(u){let e=0,n=0;for(;e<t.length;e++){let i=r(t[e]);null!=i&&(t[n++]=i)}n<e&&(t.length=n),r=-513&h|4,h=r&=-1025,h&=-4097}return h!==a&&(it(t,h),2&h&&Object.freeze(t)),lr(t,h,s,o,e,n,u,i)}function lr(t,e,r,n,i,s,o,a){var h=e,u=pr(e);return u&&2===s&&(t=Vt(t),h=0,e=Fr(e,n),n=ar(r,n,i,t),u=!1),u||(1===s||4===s&&(2&e||!(16&e)&&32&n)?((e|=!t.length||o&&!(4096&e)||32&n&&!(4096&e||16&e)?2:256)!==h&&it(t,e),Object.freeze(t)):(a||(e|=16),e!==h&&it(t,e))),2&e||!(4096&e||16&e)||tr(r,n),t}function dr(t,e,r){return t=sr(t,e,r),Array.isArray(t)?t:G}function fr(t,e){return 2&e&&(t|=2),1|t}function pr(t){return!!(2&t)&&!!(4&t)||!!(256&t)}function mr(t){return lt(t,!0)}function gr(t){t=Vt(t);for(let e=0;e<t.length;e++){let r=t[e]=Vt(t[e]);Array.isArray(r[1])&&(r[1]=st(r[1]))}return ot(t)}function vr(t,e,r,n){Qe(t),ar(t=t.B,0|t[et],e,("0"===n?0===Number(r):r===n)?void 0:r)}function _r(t,e,r){if(2&e)throw Error();var n=mt(e),i=dr(t,r,n),s=i===G?7:0|i[et],o=fr(s,e);return(2&o||pr(o)||16&o)&&(o===s||pr(o)||it(i,o),i=Vt(i),s=0,o=Fr(o,e),ar(t,e,r,i,n)),(o&=-13)!==s&&it(i,o),i}function yr(t,e){return wr(Er(t=t.B),t,void 0,e)}function Er(t){if(B)return t[K]??(t[K]=new Map);if(K in t)return t[K];var e=new Map;return Object.defineProperty(t,K,{value:e}),e}function Ar(t,e,r,n,i){var s=Er(t),o=wr(s,t,e,r,i);return o!==n&&(o&&(e=ar(t,e,o,void 0,i)),s.set(r,n)),e}function wr(t,e,r,n,i){var s=t.get(n);if(null!=s)return s;s=0;for(let t=0;t<n.length;t++){let o=n[t];null!=sr(e,o,i)&&(0!==s&&(r=ar(e,r,s,void 0,i)),s=o)}return t.set(n,s),s}function Tr(t,e,r){var n=0|t[et],i=mt(n),s=sr(t,r,i);if(ht(s)){if(!ut(s))return Ze(s),s.B;var o=s.B}else Array.isArray(s)&&(o=s);if(o){let t=0|o[et];2&t&&(o=qe(o,t))}return(o=He(o,e))!==s&&ar(t,n,r,o,i),o}function br(t,e,r,n){var i=t.B,s=0|i[et];if(e=function(t,e,r,n,i){var s=!1;if(null!=(n=sr(t,n,i,t=>{var n=_e(t,r,!1,e);return s=n!==t&&null!=n,n})))return s&&!ut(n)&&tr(t,e),n}(i,s,e,r,n),null==e)return e;if(!ut(t,s=0|i[et])){let o=Je(e);o!==e&&(Ze(t)&&(s=0|(i=t.B)[et]),tr(i,s=ar(i,s,r,e=o,n)))}return e}function kr(t,e,r,n,i,s,o,a){s=s&&4!==s?1!==s&&ut(t,r)?1:s:4,o=!!o||3===s;var h=!!a&&!ut(t,r);(2===s||h)&&Ze(t)&&(r=0|(e=t.B)[et]);var u=(t=dr(e,i))===G?7:0|t[et],c=fr(u,r);if(a=!(4&c)){var l=t,d=r;let e=!!(2&c);e&&(d|=2);let i=!e,s=!0,o=0,a=0;for(;o<l.length;o++){let t=_e(l[o],n,!1,d);if(t instanceof n){if(!e){let e=ut(t);i&&=!e,s&&=e}l[a++]=t}}a<o&&(l.length=a),c|=4,c=s?-4097&c:4096|c,c=i?8|c:-9&c}if(c!==u&&(it(t,c),2&c&&Object.freeze(t)),h&&!(8&c||!t.length&&(1===s||4===s&&(2&c||!(16&c)&&32&r)))){for(pr(c)&&(t=Vt(t),c=Fr(c,r),r=ar(e,r,i,t)),n=t,h=c,u=0;u<n.length;u++)(l=n[u])!==(c=Je(l))&&(n[u]=c);h|=8,it(t,c=h=n.length?4096|h:-4097&h)}return lr(t,c,e,r,i,s,a,o)}function Sr(t,e,r){var n=t.B;return kr(t,n,0|n[et],e,r,void 0,!1,!0)}function Lr(t){return null==t&&(t=void 0),t}function xr(t,e,r,n,i){return or(t,r,n=Lr(n),i),n&&!ut(n)&&tr(t.B),t}function Rr(t,e,r,n){t:{var i=n=Lr(n);Qe(t);let s=t.B,o=0|s[et];if(null==i){let t=Er(s);if(wr(t,s,o,r)!==e)break t;t.set(r,0)}else o=Ar(s,o,r,e);ar(s,o,e,i)}return n&&!ut(n)&&tr(t.B),t}function Ir(t,e,r){Qe(t);var n=t.B,i=0|n[et];if(null==r)return ar(n,i,e),t;var s=r===G?7:0|r[et],o=s,a=pr(s),h=a||Object.isFrozen(r),u=!0,c=!0;for(let t=0;t<r.length;t++){var l=r[t];a||(l=ut(l),u&&=!l,c&&=l)}return a||(s=u?13:5,s=c?-4097&s:4096|s),h&&s===o||(r=Vt(r),o=0,s=Fr(s,i)),s!==o&&it(r,s),i=ar(n,i,e,r),2&s||!(4096&s||16&s)||tr(n,i),t}function Fr(t,e){return-273&(2&e?2|t:-3&t)}function Cr(t,e,r,n){var i=n;Qe(t),t=kr(t,n=t.B,0|n[et],r,e,2,!0),i=null!=i?i:new r,t.push(i),e=r=t===G?7:0|t[et],(i=ut(i))?(r&=-9,1===t.length&&(r&=-4097)):r|=4096,r!==e&&it(t,r),i||tr(n)}function Nr(t,e,r){return re(ir(t,e,r))}function Or(t,e){return ir(t,e,void 0,Jt)??0}function Mr(t,e,r,n){return br(t,e,r=yr(t,n)===r?r:-1,void 0)}function Dr(t,e){vr(t,3,null==e?e:Zt(e),!1)}function Pr(t,e,r){if(null!=r){if("number"!=typeof r)throw P("int32");if(!Wt(r))throw P("int32");r|=0}or(t,e,r)}function $r(t,e,r){return or(t,e,null==r?r:ie(r))}function Ur(t,e,r){return or(t,e,null==r?r:function(t){if(!te(t))throw P("uint64");switch(typeof t){case"string":var e=Yt(Number(t));return Xt(e)&&e>=0?t=At(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),t=U()?At(Kt(64,BigInt(t))):At(oe(t))),t;case"bigint":return At(Kt(64,t));default:return t>=0&&Xt(t)||((t=Yt(t))>=0&&Xt(t)?t=String(t):(Nt(t),t=$t(It,Ft))),At(t)}}(r))}function Br(t,e,r){or(t,e,null==r?r:qt(r))}function jr(t,e,r){vr(t,e,null==r?r:qt(r),0)}function Gr(t,e,r){vr(t,e,ge(r),"")}function Vr(t,e,r){{Qe(t);let o=t.B,a=0|o[et];if(null==r)ar(o,a,e);else{var n=t=r===G?7:0|r[et],i=pr(t),s=i||Object.isFrozen(r);for(i||(t=0),s||(r=Vt(r),n=0,t=Fr(t,a),s=!1),t|=5,t|=(4&t?512&t?512:1024&t?1024:0:void 0)??1024,i=0;i<r.length;i++){let e=r[i],o=me(e);Object.is(e,o)||(s&&(r=Vt(r),n=0,t=Fr(t,a),s=!1),r[i]=o)}t!==n&&(s&&(r=Vt(r),t=Fr(t,a)),it(r,t)),ar(o,a,e,r)}}}function Hr(t,e,r){Qe(t),cr(t,e,ve,2,!0).push(me(r))}var Kr=class{constructor(t,e,r){if(this.buffer=t,r&&!e)throw Error();this.h=e}};function Xr(t,e){if("string"==typeof t)return new Kr(L(t),e);if(Array.isArray(t))return new Kr(new Uint8Array(t),e);if(t.constructor===Uint8Array)return new Kr(t,!1);if(t.constructor===ArrayBuffer)return t=new Uint8Array(t),new Kr(t,!1);if(t.constructor===N)return e=F(t)||new Uint8Array(0),new Kr(e,!0,t);if(t instanceof Uint8Array)return t=t.constructor===Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Kr(t,!1);throw Error()}function Wr(t,e){var r=0,n=0,i=0,s=t.i,o=t.h;do{var a=s[o++];r|=(127&a)<<i,i+=7}while(i<32&&128&a);if(i>32)for(n|=(127&a)>>4,i=3;i<32&&128&a;i+=7)n|=(127&(a=s[o++]))<<i;if(en(t,o),!(128&a))return e(r>>>0,n>>>0);throw Error()}function Yr(t){for(var e=0,r=t.h,n=r+10,i=t.i;r<n;){let n=i[r++];if(e|=n,!(128&n))return en(t,r),!!(127&e)}throw Error()}function zr(t){var e=t.i,r=t.h,n=e[r++],i=127&n;if(128&n&&(i|=(127&(n=e[r++]))<<7,128&n&&(i|=(127&(n=e[r++]))<<14,128&n&&(i|=(127&(n=e[r++]))<<21,128&n&&(i|=(n=e[r++])<<28,128&n&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++])))))throw Error();return en(t,r),i}function qr(t){return zr(t)>>>0}function Jr(t){return Wr(t,Pt)}function Zr(t){var e=t.i,r=t.h,n=e[r],i=e[r+1],s=e[r+2];return e=e[r+3],en(t,t.h+4),(n|i<<8|s<<16|e<<24)>>>0}function Qr(t){var e=Zr(t);t=2*(e>>31)+1;var r=e>>>23&255;return e&=8388607,255==r?e?NaN:t*(1/0):0==r?1401298464324817e-60*t*e:t*Math.pow(2,r-150)*(e+8388608)}function tn(t){return zr(t)}function en(t,e){if(t.h=e,e>t.l)throw Error()}function rn(t,e){if(e<0)throw Error();var r=t.h;if((e=r+e)>t.l)throw Error();return t.h=e,r}function nn(t,e){if(0==e)return I();var r=rn(t,e);return t.ga&&t.u?r=t.i.subarray(r,r+e):(t=t.i,r=r===(e=r+e)?new Uint8Array(0):Rt?t.slice(r,e):new Uint8Array(t.subarray(r,e))),0==r.length?I():new N(r,R)}var sn=class{constructor(t,e,r,n){this.i=null,this.u=!1,this.h=this.l=this.o=0,this.init(t,e,r,n)}init(t,e,r,{ga:n=!1,na:i=!1}={}){this.ga=n,this.na=i,t&&(t=Xr(t,this.na),this.i=t.buffer,this.u=t.h,this.o=e||0,this.l=void 0!==r?this.o+r:this.i.length,this.h=this.o)}clear(){this.i=null,this.u=!1,this.h=this.l=this.o=0,this.ga=!1}},on=[],an=0;function hn(t,e,r,n){if(_n.length){let i=_n.pop();return i.A(n),i.h.init(t,e,r,n),i}return new vn(t,e,r,n)}function un(t){t.h.clear(),t.l=-1,t.i=-1,_n.length<100&&_n.push(t)}function cn(t){var e=t.h;if(e.h==e.l)return!1;t.o=t.h.h;var r=qr(t.h);if(e=r>>>3,!((r&=7)>=0&&r<=5))throw Error();if(e<1)throw Error();return t.l=e,t.i=r,!0}function ln(t){try{switch(t.i){case 0:0!=t.i?ln(t):Yr(t.h);break;case 1:var e=t.h;en(e,e.h+8);break;case 2:if(2!=t.i)ln(t);else{var r=qr(t.h),n=t.h;en(n,n.h+r)}break;case 5:var i=t.h;en(i,i.h+4);break;case 3:dn();let s=t.l;try{for(;;){if(!cn(t))throw Error();if(4==t.i){if(t.l!=s)throw Error();break}ln(t)}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{an>0&&an--}break;default:throw Error()}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}}function dn(){if(an>=100)throw new SyntaxError;an++}function fn(t,e,r){var n=t.h.l,i=qr(t.h),s=(i=t.h.h+i)-n;if(s<=0&&(t.h.l=i,r(e,t,void 0,void 0,void 0),s=i-t.h.h),s)throw Error();return t.h.h=i,t.h.l=n,e}function pn(t){var e=qr(t.h),r=rn(t=t.h,e);if(t=t.i,h){var o,u=t;(o=s)||(o=s=new TextDecoder("utf-8",{fatal:!0})),e=r+e,u=0===r&&e===u.length?u:u.subarray(r,e);try{var c=o.decode(u)}catch(t){if(void 0===a){try{o.decode(new Uint8Array([128]))}catch(t){}try{o.decode(new Uint8Array([97])),a=!0}catch(t){a=!1}}throw!a&&(s=void 0),t}}else{e=(c=r)+e,r=[];let s,a=null;for(;c<e;){var l=t[c++];l<128?r.push(l):l<224?c>=e?n():(s=t[c++],l<194||128!=(192&s)?(c--,n()):r.push((31&l)<<6|63&s)):l<240?c>=e-1?n():(s=t[c++],128!=(192&s)||224===l&&s<160||237===l&&s>=160||128!=(192&(o=t[c++]))?(c--,n()):r.push((15&l)<<12|(63&s)<<6|63&o)):l<=244?c>=e-2?n():(s=t[c++],128!=(192&s)||s-144+(l<<28)>>30||128!=(192&(o=t[c++]))||128!=(192&(u=t[c++]))?(c--,n()):(l=(7&l)<<18|(63&s)<<12|(63&o)<<6|63&u,l-=65536,r.push(55296+(l>>10&1023),56320+(1023&l)))):n(),r.length>=8192&&(a=i(a,r),r.length=0)}c=i(a,r)}return c}function mn(t){var e=qr(t.h);return nn(t.h,e)}function gn(t,e,r){var n=qr(t.h);for(n=t.h.h+n;t.h.h<n;)r.push(e(t.h))}var vn=class{constructor(t,e,r,n){if(on.length){let i=on.pop();i.init(t,e,r,n),t=i}else t=new sn(t,e,r,n);this.h=t,this.o=this.h.h,this.i=this.l=-1,this.A(n)}A({sa:t=!1}={}){this.sa=t}},_n=[];function yn(t){return new wn(4294967295&t,Math.floor(t/4294967296))}function En(t){return t?/^\d+$/.test(t)?(jt(t),new wn(It,Ft)):null:An||=new wn(0,0)}var An,wn=class{constructor(t,e){this.i=t>>>0,this.h=e>>>0}};function Tn(t){return new Nn(4294967295&t,Math.floor(t/4294967296))}function bn(t){return t?/^-?\d+$/.test(t)?(jt(t),new Nn(It,Ft)):null:kn||=new Nn(0,0)}var kn,Sn,Ln,xn,Rn,In,Fn,Cn,Nn=class{constructor(t,e){this.i=t>>>0,this.h=e>>>0}};function On(t,e,r){return"undefined"!=typeof BigInt64Array?(Fn||(Fn=new BigInt64Array(1),Cn=new Uint32Array(Fn.buffer),Fn[0]=BigInt(1),In=1===Cn[0]),Fn[0]=t,new e(Cn[t=In?0:1],Cn[1-t])):(Rn||(Sn=BigInt(Number.MIN_SAFE_INTEGER),Ln=BigInt(Number.MAX_SAFE_INTEGER),xn=BigInt(4294967295),Rn=BigInt(32)),t>=Sn&&t<=Ln?r(Number(t)):(t=BigInt.asUintN(64,t),new e(Number(t&xn),Number(t>>Rn))))}function Mn(t,e,r){for(;r>0||e>127;)t.h.push(127&e|128),e=(e>>>7|r<<25)>>>0,r>>>=7;t.h.push(e)}function Dn(t,e){for(;e>127;)t.h.push(127&e|128),e>>>=7;t.h.push(e)}function Pn(t,e){if(e>=0)Dn(t,e);else{for(let r=0;r<9;r++)t.h.push(127&e|128),e>>=7;t.h.push(1)}}function $n(t,e){jt(e),function(t){var e=Ft>>31;t(It<<1^e,(Ft<<1|It>>>31)^e)}((e,r)=>{Mn(t,e>>>0,r>>>0)})}function Un(t,e){t.h.push(e>>>0&255),t.h.push(e>>>8&255),t.h.push(e>>>16&255),t.h.push(e>>>24&255)}var Bn=class{constructor(){this.h=[]}length(){return this.h.length}end(){var t=this.h;return this.h=[],t}};function jn(t,e){0!==e.length&&(t.l.push(e),t.i+=e.length)}function Gn(t,e,r){Dn(t.h,8*e+r)}function Vn(t,e){return Gn(t,e,2),e=t.h.end(),jn(t,e),e.push(t.i),e}function Hn(t,e){var r=e.pop();for(r=t.i+t.h.length()-r;r>127;)e.push(127&r|128),r>>>=7,t.i++;e.push(r),t.i++}function Kn(t,e,r){if(null!=r)switch(Gn(t,e,0),typeof r){case"number":t=t.h,Nt(r),Mn(t,It,Ft);break;case"bigint":r=On(r,Nn,Tn),Mn(t.h,r.i,r.h);break;default:r=bn(r),Mn(t.h,r.i,r.h)}}function Xn(t,e,r){Gn(t,e,2),Dn(t.h,r.length),jn(t,t.h.end()),jn(t,r)}function Wn(t,e,r,n){null!=r&&(e=Vn(t,e),n(r,t),Hn(t,e))}var Yn=class{constructor(){this.l=[],this.i=0,this.h=new Bn}};function zn(t){if("string"==typeof t)bn(t)}function qn(){var t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var Jn=qn(),Zn=qn(),Qn=qn(),ti=qn(),ei=qn(),ri=qn(),ni=qn(),ii=qn(),si=qn(),oi=qn(),ai=qn(),hi=qn();function ui(t,e,r){var n=t.B;X&&X in n&&(n=n[X])&&delete n[e.h],e.i?e.u(t,e.i,e.h,r,e.l):e.u(t,e.h,r,e.l)}var ci=class{constructor(t,e){this.B=Ke(t,e,void 0,2048)}toJSON(){return Ve(this)}u(){var t=Na,e=this.B,r=t.h,n=X;if(B&&n&&null!=e[n]?.[r]&&$(W,3),e=t.h,Z&&X&&void 0===Z&&(n=(r=this.B)[X])&&(n=n.la))try{n(r,e,$e)}catch(t){l(t)}return t.i?t.o(this,t.i,t.h,t.l):t.o(this,t.h,t.defaultValue,t.l)}clone(){var t=this.B,e=0|t[et];return er(this,t,e)?Ye(this,t,!0):new this.constructor(qe(t,e,!1))}};ci.prototype[J]=at,ci.prototype.toString=function(){return this.B.toString()};var li=class{constructor(t,e,r){this.h=t,this.i=e,t=Jn,this.l=!!t&&r===t||!1}};function di(t,e){return new li(t,e,Jn)}function fi(t,e,r,n,i){Wn(t,r,ki(e,n),i)}var pi,mi,gi=di(function(t,e,r,n,i){return 2===t.i&&(fn(t,Tr(e,n,r),i),!0)},fi),vi=di(function(t,e,r,n,i){return 2===t.i&&(fn(t,Tr(e,n,r),i),!0)},fi),_i=Symbol(),yi=Symbol(),Ei=Symbol(),Ai=Symbol(),wi=Symbol();function Ti(t,e,r,n){var i=n[t];if(i)return i;(i={}).Fa=n,i.da=function(t){switch(typeof t){case"boolean":return Me||=[0,void 0,!0];case"number":return t>0?void 0:0===t?De||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(n[0]);var s=n[1],o=1;s&&s.constructor===Object&&(i.ja=s,"function"==typeof(s=n[++o])&&(i.xa=!0,pi??=s,mi??=n[o+1],s=n[o+=2]));for(var a={};s&&Array.isArray(s)&&s.length&&"number"==typeof s[0]&&s[0]>0;){for(var h=0;h<s.length;h++)a[s[h]]=s;s=n[++o]}for(h=1;void 0!==s;){let t;"number"==typeof s&&(h+=s,s=n[++o]);var u=void 0;if(s instanceof li?t=s:(t=gi,o--),t?.l){s=n[++o],u=n;var c=o;"function"==typeof s&&(s=s(),u[c]=s),u=s}for(c=h+1,"number"==typeof(s=n[++o])&&s<0&&(c-=s,s=n[++o]);h<c;h++){let n=a[h];u?r(i,h,t,u,n):e(i,h,t,n)}}return n[t]=i}function bi(t){return Array.isArray(t)?t[0]instanceof li?t:[vi,t]:[t,void 0]}function ki(t,e){return t instanceof ci?t.B:Array.isArray(t)?He(t,e):void 0}function Si(t,e,r,n){var i=r.h;t[e]=n?(t,e,r)=>i(t,e,r,n):i}function Li(t,e,r,n,i){var s,o,a=r.h;t[e]=(t,e,r)=>a(t,e,r,o||=Ti(yi,Si,Li,n).da,s||=xi(n),i)}function xi(t){var e=t[Ei];if(null!=e)return e;var r=Ti(yi,Si,Li,t);return e=r.xa?(t,e)=>pi(t,e,r):(t,e)=>{t:{dn();try{for(;cn(e)&&4!=e.i;){let h=e.l,u=r[h];if(null==u){let t=r.ja;if(t){let e=t[h];if(e){let t=Ii(e);null!=t&&(u=r[h]=t)}}}if(null==u||!u(e,t,h)){var n=e;let r=n.o;if(ln(n),n.sa)var i=void 0;else{let t=n.h.h-r;n.h.h=r,i=nn(n.h,t)}n=void 0;var s=t,o=h,a=i;a&&((n=s[X]??(s[X]=new Pe))[o]??(n[o]=[])).push(a)}}let u=Ce(t);u&&(u.la=r.Fa[wi]);var h=!0;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{an>0&&an--}h=void 0}return h},t[Ei]=e,t[wi]=Ri.bind(t),e}function Ri(t,e,r,n){var i=this[yi],s=this[Ei],o=He(void 0,i.da),a=Ce(t);if(a){var h=!1,u=i.ja;if(u){if(i=(e,r,i)=>{if(0!==i.length)if(u[r])for(let t of i){e=hn(t);try{h=!0,s(o,e)}finally{un(e)}}else n?.(t,r,i)},null==e)Ne(a,i);else if(null!=a){let t=a[e];t&&i(a,e,t)}if(h){let n=0|t[et];if(2&n&&2048&n&&!r?.eb)throw Error();let i=mt(n),s=(e,s)=>{if(null!=sr(t,e,i)){if(1===r?.mb)return;throw Error()}null!=s&&(n=ar(t,n,e,s,i)),delete a[e]};null==e?ft(o,0|o[et],(t,e)=>{s(t,e)}):s(e,sr(o,e,i))}}}}function Ii(t){var e=(t=bi(t))[0].h;if(t=t[1]){let r=xi(t),n=Ti(yi,Si,Li,t).da;return(t,i,s)=>e(t,i,s,n,r)}return e}function Fi(t,e,r){t[e]=r.i}function Ci(t,e,r,n){var i,s,o=r.i;t[e]=(t,e,r)=>o(t,e,r,s||=Ti(_i,Fi,Ci,n).da,i||=Ni(n))}function Ni(t){var e=t[Ai];if(!e){let r=Ti(_i,Fi,Ci,t);e=(t,e)=>Oi(t,e,r),t[Ai]=e}return e}function Oi(t,e,r){ft(t,0|t[et],(t,n)=>{if(null!=n){var i=function(t,e){var r=t[e];if(r)return r;if((r=t.ja)&&(r=r[e])){var n=(r=bi(r))[0].i;if(r=r[1]){let e=Ni(r),i=Ti(_i,Fi,Ci,r).da;r=t.xa?mi(i,e):(t,r,s)=>n(t,r,s,i,e)}else r=n;return t[e]=r}}(r,t);i?i(e,n,t):t<500||$(z,3)}}),(t=Ce(t))&&Ne(t,(t,r,n)=>{for(jn(e,e.h.end()),t=0;t<n.length;t++)jn(e,F(n[t])||new Uint8Array(0))})}var Mi=At(0);function Di(t,e,r){if(Array.isArray(e)){var n=0|e[et];if(4&n)return e;for(var i=0,s=0;i<e.length;i++){let r=t(e[i]);null!=r&&(e[s++]=r)}return s<i&&(e.length=s),t=1|n,r&&(t=-1537&t|4),t!==n&&it(e,t),r&&2&t&&Object.freeze(e),e}}var Pi=(t,e)=>{var r=new Yn;Oi(t.B,r,Ti(_i,Fi,Ci,e)),jn(r,r.h.end()),t=new Uint8Array(r.i);var n=(e=r.l).length,i=0;for(let r=0;r<n;r++){let n=e[r];t.set(n,i),i+=n.length}return r.l=[t],t};function $i(t,e,r){return new li(t,e,r)}function Ui(t,e,r){return new li(t,e,r)}function Bi(t,e,r){ar(t,0|t[et],e,r,mt(0|t[et]))}var ji=di(function(t,e,r,n,i){if(2!==t.i)return!1;if(t=Vt(t=fn(t,He([void 0,void 0],n),i)),i=mt(n=0|e[et]),2&n)throw Error();var s=sr(e,r,i);if(s instanceof xe)2&s.N?((s=s.fa()).push(t),ar(e,n,r,s,i)):s.hb(t);else if(Array.isArray(s)){var o=0|s[et];8192&o||it(s,o|=8192),2&o&&ar(e,n,r,s=gr(s),i),s.push(t)}else ar(e,n,r,ot([t]),i);return!0},function(t,e,r,n,i){if(e instanceof xe)e.forEach((e,s)=>{Wn(t,r,He([s,e],n),i)});else if(Array.isArray(e)){for(let s=0;s<e.length;s++){let o=e[s];Array.isArray(o)&&Wn(t,r,He(o,n),i)}ot(e)}});function Gi(t,e,r){null!=(e=Jt(e))&&(Gn(t,r,5),t=t.h,Ot(e),Un(t,It))}function Vi(t,e,r){null!=(e=de(e))&&(zn(e),Kn(t,r,e))}function Hi(t,e,r){null!=(e=re(e))&&null!=e&&(Gn(t,r,0),Pn(t.h,e))}function Ki(t,e,r){null!=(e=null==e||"boolean"==typeof e?e:"number"==typeof e?!!e:void 0)&&(Gn(t,r,0),t.h.h.push(e?1:0))}function Xi(t,e,r){null!=(e=ve(e))&&Xn(t,r,c(e))}function Wi(t,e,r,n,i){Wn(t,r,ki(e,n),i)}function Yi(t,e,r){null!=(e=pe(e))&&Xn(t,r,Xr(e,!0).buffer)}function zi(t,e,r){null!=(e=ne(e))&&null!=e&&(Gn(t,r,0),Dn(t.h,e))}function qi(t,e,r){null!=(e=re(e))&&(e=parseInt(e,10),Gn(t,r,0),Pn(t.h,e))}function Ji(t,e,r){return(5===t.i||2===t.i)&&(e=_r(e,0|e[et],r),2==t.i?gn(t,Qr,e):e.push(Qr(t.h)),!0)}function Zi(t,e,r){return 0===t.i&&(Bi(e,r,Jr(t.h)),!0)}function Qi(t,e,r){return(0===t.i||2===t.i)&&(e=_r(e,0|e[et],r),2==t.i?gn(t,zr,e):e.push(zr(t.h)),!0)}function ts(t,e,r){return 2===t.i&&(Bi(e,r,(t=mn(t))===I()?void 0:t),!0)}var es=$i(function(t,e,r){if(1!==t.i)return!1;var n=t.h;t=Zr(n);var i=Zr(n);n=2*(i>>31)+1;var s=i>>>20&2047;return t=4294967296*(1048575&i)+t,Bi(e,r,2047==s?t?NaN:n*(1/0):0==s?5e-324*n*t:n*Math.pow(2,s-1075)*(t+4503599627370496)),!0},function(t,e,r){null!=(e=Jt(e))&&(Gn(t,r,1),t=t.h,(r=xt||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),It=r.getUint32(0,!0),Ft=r.getUint32(4,!0),Un(t,It),Un(t,Ft))},oi),rs=$i(function(t,e,r){return 5===t.i&&(Bi(e,r,Qr(t.h)),!0)},Gi,si),ns=Ui(Ji,function(t,e,r){if(null!=(e=Di(Jt,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&(Gn(n,i,5),n=n.h,Ot(s),Un(n,It))}},si),is=Ui(Ji,function(t,e,r){if(null!=(e=Di(Jt,e,!0))&&e.length){Gn(t,r,2),Dn(t.h,4*e.length);for(let n=0;n<e.length;n++)r=t.h,Ot(e[n]),Un(r,It)}},si),ss=$i(function(t,e,r){return 5===t.i&&(Bi(e,r,0===(t=Qr(t.h))?void 0:t),!0)},Gi,si),os=$i(function(t,e,r){return Zi(t,e,r)},Vi,ri),as=$i(function(t,e,r){return Zi(t,e,r)},Vi,ri),hs=Ui(function(t,e,r){return 0!==t.i&&2!==t.i?t=!1:(e=_r(e,0|e[et],r),2==t.i?gn(t,Jr,e):e.push(Jr(t.h)),t=!0),t},function(t,e,r){if(null!=(e=Di(de,e,!1)))for(let n=0;n<e.length;n++)Kn(t,r,e[n])},ri),us=$i(function(t,e,r){return 0!==t.i?e=!1:(Bi(e,r,(t=Jr(t.h))===Mi?void 0:t),e=!0),e},Vi,ri),cs=$i(function(t,e,r){return 0!==t.i?t=!1:(Bi(e,r,Wr(t.h,Dt)),t=!0),t},function(t,e,r){if(null!=(e=fe(e))){if("string"==typeof e)En(e);if(null!=e)switch(Gn(t,r,0),typeof e){case"number":t=t.h,Nt(e),Mn(t,It,Ft);break;case"bigint":r=On(e,wn,yn),Mn(t.h,r.i,r.h);break;default:r=En(e),Mn(t.h,r.i,r.h)}}},ni),ls=$i(function(t,e,r){return 0===t.i&&(Bi(e,r,zr(t.h)),!0)},Hi,ti),ds=Ui(Qi,function(t,e,r){if(null!=(e=Di(re,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&(Gn(n,i,0),Pn(n.h,s))}},ti),fs=Ui(Qi,function(t,e,r){if(null!=(e=Di(re,e,!0))&&e.length){r=Vn(t,r);for(let r=0;r<e.length;r++)Pn(t.h,e[r]);Hn(t,r)}},ti),ps=$i(function(t,e,r){return 0===t.i&&(Bi(e,r,0===(t=zr(t.h))?void 0:t),!0)},Hi,ti),ms=$i(function(t,e,r){return 0===t.i&&(Bi(e,r,Yr(t.h)),!0)},Ki,Zn),gs=$i(function(t,e,r){return 0===t.i&&(Bi(e,r,!1===(t=Yr(t.h))?void 0:t),!0)},Ki,Zn),vs=Ui(function(t,e,r){return 2===t.i&&(t=pn(t),_r(e,0|e[et],r).push(t),!0)},function(t,e,r){if(null!=(e=Di(ve,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&Xn(n,i,c(s))}},Qn),_s=$i(function(t,e,r){return 2===t.i&&(Bi(e,r,""===(t=pn(t))?void 0:t),!0)},Xi,Qn),ys=$i(function(t,e,r){return 2===t.i&&(Bi(e,r,pn(t)),!0)},Xi,Qn),Es=function(t,e,r=Jn){return new li(t,e,r)}(function(t,e,r,n,i){return 2===t.i&&(n=He(void 0,n),_r(e,0|e[et],r).push(n),fn(t,n,i),!0)},function(t,e,r,n,i){if(Array.isArray(e)){for(let s=0;s<e.length;s++)Wi(t,e[s],r,n,i);1&(t=0|e[et])||it(e,1|t)}}),As=di(function(t,e,r,n,i,s){if(2!==t.i)return!1;var o=0|e[et];return Ar(e,o,s,r,mt(o)),fn(t,e=Tr(e,n,r),i),!0},Wi),ws=$i(function(t,e,r){return 2===t.i&&(Bi(e,r,mn(t)),!0)},Yi,ai),Ts=Ui(function(t,e,r){return 2===t.i&&(t=mn(t),_r(e,0|e[et],r).push(t),!0)},function(t,e,r){if(null!=(e=Di(pe,e,!1)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&Xn(n,i,Xr(s,!0).buffer)}},ai),bs=$i(function(t,e,r){return 0===t.i&&(Bi(e,r,qr(t.h)),!0)},zi,ei),ks=Ui(function(t,e,r){return(0===t.i||2===t.i)&&(e=_r(e,0|e[et],r),2==t.i?gn(t,qr,e):e.push(qr(t.h)),!0)},function(t,e,r){if(null!=(e=Di(ne,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&(Gn(n,i,0),Dn(n.h,s))}},ei),Ss=$i(function(t,e,r){return 0===t.i&&(Bi(e,r,0===(t=qr(t.h))?void 0:t),!0)},zi,ei),Ls=$i(function(t,e,r){return 0===t.i&&(Bi(e,r,zr(t.h)),!0)},qi,hi),xs=$i(function(t,e,r){return 0===t.i&&(Bi(e,r,0===(t=zr(t.h))?void 0:t),!0)},qi,hi),Rs=$i(function(t,e,r){return 0!==t.i?t=!1:(Bi(e,r,function(t){return Wr(t,(t,e)=>{var r=-(1&t);return Pt(t=(t>>>1|e<<31)^r,e>>>1^r)})}(t.h)),t=!0),t},function(t,e,r){if(null!=(e=de(e))&&(zn(e),null!=e))switch(Gn(t,r,0),typeof e){case"number":t=t.h,e=(r=e)<0,Ct(r=2*Math.abs(r)),r=It;let n=Ft;e&&(0==r?0==n?n=r=4294967295:(n--,r=4294967295):r--),Mn(t,It=r,Ft=n);break;case"bigint":t=t.h,e=e<<BigInt(1)^e>>BigInt(63),It=Number(BigInt.asUintN(32,e)),Ft=Number(BigInt.asUintN(32,e>>BigInt(32))),Mn(t,It,Ft);break;default:$n(t.h,e)}},ii);class Is{constructor(t,e){var r=io;this.h=t,this.i=e,this.o=br,this.u=xr,this.defaultValue=void 0,this.l=null!=r.kb?pt:void 0}register(){v(this)}}function Fs(t,e){return new Is(t,e)}function Cs(t,e){return(r,n)=>{t:{let s={na:!0};n&&Object.assign(s,n),r=hn(r,void 0,void 0,s);try{let n=new t,s=n.B;xi(e)(s,r);var i=n;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{un(r)}i=void 0}return i}}function Ns(t){return e=>Pi(e,t)}function Os(t){return function(){return Pi(this,t)}}var Ms=[0,ws,Ts,ms,ys],Ds=[0,_s,[0,xs,[0,us,ps],xs,-1,[0,Ls],xs,-1],$i(ts,Yi,ai)];var Ps,$s=class extends ci{constructor(t){super(t)}},Us=[0,_s,$i(ts,function(t,e,r){if(null!=e){if(e instanceof ci){let n=e.nb;return void(n?(e=n(e),null!=e&&Xn(t,r,Xr(e,!0).buffer)):$(z,3))}if(Array.isArray(e))return void $(z,3)}Yi(t,e,r)},ai)],Bs=[0,1,[0,12,ls,10,ms],[0,7,[0,ls,-1]]],js=globalThis.trustedTypes;var Gs=class{constructor(t){this.h=t}toString(){return this.h+""}};function Vs(t){var e;return void 0===Ps&&(Ps=function(){var t=null;if(!js)return t;try{let e=t=>t;t=js.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(t){}return t}()),t=(e=Ps)?e.createScriptURL(t):t,new Gs(t)}function Hs(t,...e){if(0===e.length)return Vs(t[0]);var r=t[0];for(let n=0;n<e.length;n++)r+=encodeURIComponent(e[n])+t[n+1];return Vs(r)}var Ks=[0,ls,Ls,ms,-1,fs,Ls,-1,ms,-1],Xs=[0,Ls,-1,ms],Ws=class extends ci{constructor(t){super(t)}},Ys=[0,ms,ys,ms,Ls,-1,Ui(function(t,e,r){return(0===t.i||2===t.i)&&(e=_r(e,0|e[et],r),2==t.i?gn(t,tn,e):e.push(zr(t.h)),!0)},function(t,e,r){if(null!=(e=Di(re,e,!0))&&e.length){r=Vn(t,r);for(let r=0;r<e.length;r++)Pn(t.h,e[r]);Hn(t,r)}},hi),ys,-1,[0,ms,-1],Ls,ms,-1,Xs],zs=class extends ci{constructor(t){super(t)}},qs=class extends ci{constructor(t){super(t)}},Js=class extends ci{constructor(t){super(t)}h(){return hr(this,9)}},Zs=[0,3,ms,-1,2,[0,[2],ls,As,[0,bs]],[0,Ls,ms,Ls,ms,Ls,4,[0,ms,ys,-1,ms]],[0,[3,4],ys,-1,As,[0,ls],As,[0,Ls,-1]],[0],ys],Qs=[0,ys,-2],to=class extends ci{constructor(t){super(t)}},eo=[0],ro=class extends ci{constructor(t){super(t)}},no=[0,ls,ms,1,ms,-4],io=class extends ci{constructor(t){super(t,2)}},so={};so[336783863]=[0,ys,ms,-1,ls,[0,[1,2,3,4,5,6,7,8,9],As,eo,As,Ys,As,Qs,As,no,As,Ks,As,[0,ys,-2],As,[0,ys,Ls],As,Zs,As,Xs],[0,ys],ms,[0,[1,3],[2,4],As,[0,fs],-1,As,[0,vs],-1,Es,[0,ys,-1]],ys];var oo=[0,us,-1,gs,-3,us,fs,_s,ps,us,-1,gs,ps,gs,-2,_s];function ao(t,e){Hr(t,3,e)}function ho(t,e){Hr(t,4,e)}var uo=class extends ci{constructor(t){super(t,500)}A(t){return xr(this,0,7,t)}},co=[-1,{}],lo=[0,ys,1,co],fo=[0,ys,vs,co];function po(t,e){Cr(t,1,uo,e)}function mo(t,e){Hr(t,10,e)}function go(t,e){Hr(t,15,e)}var vo=class extends ci{constructor(t){super(t,500)}A(t){return xr(this,0,1001,t)}},_o=[-500,Es,[-500,_s,-1,vs,-3,[-2,so,ms],Es,Us,ps,-1,lo,fo,Es,[0,_s,gs],_s,oo,ps,vs,987,vs],4,Es,[-500,ys,-1,[-1,{}],998,ys],Es,[-500,ys,vs,-1,[-2,{},ms],997,vs,-1],ps,Es,[-500,ys,vs,co,998,vs],vs,ps,lo,fo,Es,[0,_s,-1,co],vs,-2,oo,_s,-1,gs,[0,gs,Ss],978,co,Es,Us];vo.prototype.h=Os(_o);var yo=Cs(vo,_o),Eo=class extends ci{constructor(t){super(t)}},Ao=class extends ci{constructor(t){super(t)}h(){return Sr(this,Eo,1)}},wo=[0,Es,[0,ls,rs,ys,-1]],To=Cs(Ao,wo),bo=class extends ci{constructor(t){super(t)}},ko=class extends ci{constructor(t){super(t)}},So=class extends ci{constructor(t){super(t)}l(){return br(this,bo,2)}h(){return Sr(this,ko,5)}},Lo=Cs(class extends ci{constructor(t){super(t)}},[0,vs,fs,is,[0,Ls,[0,ls,-3],[0,rs,-3],[0,ls,-1,[0,Es,[0,ls,-2]]],Es,[0,rs,-1,ys,rs]],ys,-1,as,Es,[0,ls,rs],vs,as]),xo=class extends ci{constructor(t){super(t)}},Ro=Cs(class extends ci{constructor(t){super(t)}},[0,Es,[0,rs,-4]]),Io=class extends ci{constructor(t){super(t)}},Fo=Cs(class extends ci{constructor(t){super(t)}},[0,Es,[0,rs,-4]]),Co=class extends ci{constructor(t){super(t)}},No=[0,ls,-1,is,Ls],Oo=class extends ci{constructor(t){super(t)}};Oo.prototype.h=Os([0,rs,-4,as]);var Mo=class extends ci{constructor(t){super(t)}},Do=Cs(class extends ci{constructor(t){super(t)}},[0,Es,[0,1,ls,ys,wo],as]),Po=class extends ci{constructor(t){super(t)}},$o=class extends ci{constructor(t){super(t)}h(){var t=ir(this,1,void 0,mr);return null==t?I():t}},Uo=class extends ci{constructor(t){super(t)}},Bo=[1,2],jo=Cs(class extends ci{constructor(t){super(t)}},[0,Es,[0,Bo,As,[0,is],As,[0,ws],ls,ys],as]),Go=class extends ci{constructor(t){super(t)}},Vo=[0,ys,ls,rs,vs,-1],Ho=class extends ci{constructor(t){super(t)}},Ko=[0,ms,-1],Xo=class extends ci{constructor(t){super(t)}h(){return ur(this,2,Wo)}l(){return Mr(this,Js,6,Wo)}},Wo=[1,2,3,4,5,6],Yo=class extends ci{constructor(t){super(t)}h(){return null!=ir(this,1,void 0,mr)}l(){return null!=ve(ir(this,2))}},zo=class extends ci{constructor(t){super(t)}},qo=[0,ws,ys,[0,ls,as,-1],[0,cs,as]],Jo=[0,qo,ms,[0,Wo,As,no,As,Ys,As,Ks,As,eo,As,Qs,As,Zs],Ls],Zo=Ns(Jo),Qo=class extends ci{constructor(t){super(t)}},ta=[0,Jo,rs,-1,ls],ea=Fs(502141897,Qo);so[502141897]=ta;var ra=Cs(class extends ci{constructor(t){super(t)}},[0,[0,Ls,-1,ns,ks],No]),na=class extends ci{constructor(t){super(t)}},ia=class extends ci{constructor(t){super(t)}},sa=[0,Jo,rs,[0,Jo],ms],oa=Fs(508968150,ia);so[508968150]=[0,Jo,ta,sa,rs,[0,[0,qo]]],so[508968149]=sa;var aa=class extends ci{constructor(t){super(t)}l(){return br(this,Go,2)}h(){or(this,2)}},ha=[0,Jo,Vo];so[478825465]=ha;var ua=class extends ci{constructor(t){super(t)}},ca=class extends ci{constructor(t){super(t)}},la=class extends ci{constructor(t){super(t)}},da=class extends ci{constructor(t){super(t)}},fa=class extends ci{constructor(t){super(t)}},pa=[0,Jo,[0,Jo],ha,-1],ma=[0,Jo,rs,ls],ga=[0,Jo,rs],va=[0,Jo,ma,ga,rs],_a=Fs(479097054,fa);so[479097054]=[0,Jo,va,pa],so[463370452]=pa,so[464864288]=ma;var ya=Fs(462713202,da);so[462713202]=va,so[474472470]=ga;var Ea=class extends ci{constructor(t){super(t)}},Aa=class extends ci{constructor(t){super(t)}},wa=class extends ci{constructor(t){super(t)}},Ta=class extends ci{constructor(t){super(t)}},ba=[0,Jo,rs,-1,ls],ka=[0,Jo,rs,ms];Ta.prototype.h=Os([0,Jo,ga,[0,Jo],ta,sa,ba,ka]);var Sa=class extends ci{constructor(t){super(t)}},La=Fs(456383383,Sa);so[456383383]=[0,Jo,Vo];var xa=class extends ci{constructor(t){super(t)}},Ra=Fs(476348187,xa);so[476348187]=[0,Jo,Ko];var Ia=class extends ci{constructor(t){super(t)}},Fa=class extends ci{constructor(t){super(t)}},Ca=[0,Ls,-1],Na=Fs(458105876,class extends ci{constructor(t){super(t)}h(){var t=this.B,e=0|t[et],r=ut(this,e);return t=function(t,e,r,n){var i=Fa;!n&&Ze(t)&&(r=0|(e=t.B)[et]);var s=sr(e,2);if(t=!1,null==s){if(n)return Fe();s=[]}else if(s.constructor===xe){if(!(2&s.N)||n)return s;s=s.fa()}else Array.isArray(s)?t=!!(2&s[et]):s=[];if(n){if(!s.length)return Fe();t||(t=!0,st(s))}else t&&(t=!1,ot(s),s=gr(s));return!t&&32&r&&nt(s,32),r=ar(e,r,2,n=new xe(s,i,ye,void 0)),t||tr(e,r),n}(this,t,e,r),!r&&Fa&&(t.Ga=!0),t}});so[458105876]=[0,Ca,ji,[!0,as,[0,ys,-1,vs]],[0,fs,ms,Ls],ms];var Oa=class extends ci{constructor(t){super(t)}},Ma=Fs(458105758,Oa);so[458105758]=[0,Jo,ys,Ca];var Da=class extends ci{constructor(t){super(t)}},Pa=class extends ci{constructor(t){super(t)}},$a=class extends ci{constructor(t){super(t)}},Ua=Ns([0,Es,[0,xs,Es,[0,ss,-1],gs]]),Ba=class extends ci{constructor(t){super(t)}},ja=[0,ss,-1,gs],Ga=class extends ci{constructor(t){super(t)}},Va=class extends ci{constructor(t){super(t)}},Ha=[1,2];Va.prototype.h=Os([0,Ha,As,ja,As,[0,Es,ja]]);var Ka=class extends ci{constructor(t){super(t)}},Xa=Fs(443442058,Ka);so[443442058]=[0,Jo,ys,ls,rs,vs,-1,ms,rs],so[514774813]=ba;var Wa=class extends ci{constructor(t){super(t)}},Ya=Fs(516587230,Wa);function za(t,e){return e=e?e.clone():new Go,void 0!==t.displayNamesLocale?or(e,1,ge(t.displayNamesLocale)):void 0===t.displayNamesLocale&&or(e,1),void 0!==t.maxResults?Pr(e,2,t.maxResults):"maxResults"in t&&or(e,2),void 0!==t.scoreThreshold?Br(e,3,t.scoreThreshold):"scoreThreshold"in t&&or(e,3),void 0!==t.categoryAllowlist?Vr(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&or(e,4),void 0!==t.categoryDenylist?Vr(e,5,t.categoryDenylist):"categoryDenylist"in t&&or(e,5),e}function qa(t){var e=Number(t);return Number.isSafeInteger(e)?e:String(t)}function Ja(t,e=-1,r=""){return{categories:t.map(t=>({index:Nr(t,1)??0??-1,score:Or(t,2)??0,categoryName:ve(ir(t,3))??""??"",displayName:ve(ir(t,4))??""??""})),headIndex:e,headName:r}}function Za(t){var e={classifications:Sr(t,Mo,1).map(t=>Ja(br(t,Ao,4)?.h()??[],Nr(t,2)??0,ve(ir(t,3))??""))};return null!=function(t){return null==t?t:"bigint"==typeof t?(wt(t)?t=Number(t):(t=Ht(64,t),t=wt(t)?Number(t):String(t)),t):te(t)?"number"==typeof t?ae(t):ue(t):void 0}(ir(t,2,void 0,le))&&(e.timestampMs=qa(ir(t,2,void 0,le)??rr)),e}function Qa(t){var e=cr(t,3,Jt),r=cr(t,2,re),n=cr(t,1,ve),i=cr(t,9,ve),s={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)s.categories.push({score:e[t],index:r[t]??-1,categoryName:n[t]??"",displayName:i[t]??""});if((e=br(t,So,4)?.l())&&(s.boundingBox={originX:Nr(e,1,nr)??0,originY:Nr(e,2,nr)??0,width:Nr(e,3,nr)??0,height:Nr(e,4,nr)??0,angle:0}),br(t,So,4)?.h().length)for(let e of br(t,So,4).h())s.keypoints.push({x:ir(e,1,nr,Jt)??0,y:ir(e,2,nr,Jt)??0,score:ir(e,4,nr,Jt)??0,label:ve(ir(e,3,nr))??""});return s}function th(t){var e=[];for(let r of Sr(t,Io,1))t={x:Or(r,1)??0,y:Or(r,2)??0,z:Or(r,3)??0,visibility:Or(r,4)??0},null!=ir(r,5,void 0,Jt)&&(t.presence=Or(r,5)??0),e.push(t);return e}function eh(t){var e=[];for(let r of Sr(t,xo,1))t={x:Or(r,1)??0,y:Or(r,2)??0,z:Or(r,3)??0,visibility:Or(r,4)??0},null!=ir(r,5,void 0,Jt)&&(t.presence=Or(r,5)??0),e.push(t);return e}function rh(t){return Array.from(t,t=>t>127?t-256:t)}function nh(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);var r=0,n=0,i=0;for(let s=0;s<t.length;s++)r+=t[s]*e[s],n+=t[s]*t[s],i+=e[s]*e[s];if(n<=0||i<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return r/Math.sqrt(n*i)}so[516587230]=[0,Jo,ba,ka,rs],so[518928384]=ka;var ih,sh=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 oh(t){if(t)return!0;if(void 0===ih)try{await WebAssembly.instantiate(sh),ih=!0}catch{ih=!1}return ih}async function ah(t,e,r){return{wasmLoaderPath:`${e}/${t}_${r=`wasm${r?"_module":""}${await oh(r)?"":"_nosimd"}_internal`}.js`,wasmBinaryPath:`${e}/${t}_${r}.wasm`}}var hh=class{};function uh(t){return or(new ch,1,ee(t))}hh.forVisionTasks=function(t,e=!1){return ah("vision",t??Hs``,e)},hh.forLiteRtLmTextTasks=function(t,e=!1){return ah("litertlm_text",t??Hs``,e)},hh.forTextTasks=function(t,e=!1){return ah("text",t??Hs``,e)},hh.forRetrievalTasks=function(t,e=!1){return ah("retrieval",t??Hs``,e)},hh.forGenAiTasks=function(t,e=!1){return ah("genai",t??Hs``,e)},hh.forDecisionTasks=function(t,e=!1){return ah("decision",t??Hs``,e)},hh.forAudioTasks=function(t,e=!1){return ah("audio",t??Hs``,e)},hh.isSimdSupported=function(t=!1){return oh(t)};var ch=class extends ci{constructor(t){super(t)}},lh=class extends ci{constructor(t){super(t)}},dh=[0,Ls,2,cs,-2,as,Es,[0,Ls,as]],fh=class extends ci{constructor(t){super(t)}},ph=class extends ci{constructor(t){super(t)}};function mh(t,e){return or(t,1,ee(e))}function gh(t,e){return or(t,2,ee(e))}var vh=class extends ci{constructor(t){super(t)}},_h=[3,4,5,6,7],yh=class extends ci{constructor(t){super(t)}},Eh=class extends ci{constructor(t){super(t)}};Eh.prototype.h=Os([0,[0,Ls,ys,-3,Ls],[0,_h,Ls,-1,As,[0,Ls,ys,cs],As,dh,As,[0,1,dh],As,[0,Ls],As,[0,Ls,ys,cs]]]);var Ah=class{constructor(){this.h="undefined"!=typeof AbortController}async send(t,e,r){var n=this.h?new AbortController:void 0,i=n&&t.ma>0?setTimeout(()=>{n.abort()},t.ma):void 0;try{let i=await fetch(t.url,{method:t.cb,headers:{...t.bb},...t.body&&{body:t.body},...t.withCredentials&&{credentials:"include"},signal:t.ma&&n?n.signal:null});200===i.status?e?.(await i.text()):r?.(i.status)}catch(t){if("AbortError"===t?.name)r?.(408);else r?.(400)}finally{clearTimeout(i)}}},wh=class extends ci{constructor(t){super(t,37)}},Th=[-4,{},Bs,Ls,Ds],bh=[0,ys,Ls,1,ys,-1,Ls,1,Ls,1,as],kh=[0,Ls,ys,-2],Sh=[0,ys,Ls],Lh=[0,ys,Ls],xh=[0,ms,-3],Rh=[0,Ls,ys,-1,as,ls,-1,ys,-5,Es,[0,ys,-4],-1,ms,[0,ms,-3],Ls];var Ih=class extends ci{constructor(t){super(t,19)}},Fh=Ns([-19,{},[0,Ls,1,[0,ys,-6,as,ls,ys,-1,as],1,[0,ys,1,ys,-5],ys,-1,[0,Ls,ys,-8],[0,ys,-3],[0,ys,Ls,ys,-2],[0,ys,-1,Ls,ys,-1,Ls,ys,-1,[0,Es,[0,ys,-1],ms,ys,-5],[0,Ls,ms,ls,-2]],as,[0,ys,-3,as,ls,ys,-1],[0,Ls,ys,-1],[0,ys,-9],[0,ys,-6,Ls,ys,1,ys,ms,Ls,-1,ms,ys,-2,Ls,ys,Ls,ys,ls,-1],1,[0,Ls],1,[0,ys,-4],1,bh,[0,[1,2,3,4,5,6],As,bh,As,Sh,As,Lh,As,[0,Ls],As,Rh,As,kh],Sh,Lh,Rh,[0,[0,Ls,ys,-1,as,ls,-1,ys,-4,Es,[0,ys,-4],-1,1,xh],[0,Ls,ys,-1,as,ls,-1,ys,-4,xh]],kh,[0,ys,[0,ls,-3,Ls],Ls,-2,[0,ls,-1],ms],4,[0,ys,Ls,ys,-1,as,Ls,ys,-1,Ls,ls,-1]],Ls,Es,[-37,{},os,ys,Es,[0,ys,-1],ws,1,ws,[0,vs,-1,ds,hs,-1],ys,[0,ls,ys,-1],ms,ls,as,ys,-1,Rs,Ms,os,ws,Ls,ds,as,-1,[0,Ls,-1],ys,ms,ys,fs,ys,-1,es,1,es,Th,ms,[0,Ls,[0,rs,ls,-2],[0,rs]],[0,Ls,as]],os,Ts,ys,-1,os,Ls,-1,[0,ms,-1,Ls,ms],[0,as,-1,ys],[0,os,ms,as],as,1,bs,1,Th]),Ch=class{constructor(t){this.i=[],this.o=new Ah,this.l=t??"",this.h=setInterval(()=>{this.flush()},6e4)}close(){void 0!==this.h&&(clearInterval(this.h),this.h=void 0),this.flush()}flush(t,e){if(this.error)e?.("net-send-failed");else if(0===this.i.length)t?.();else{var r=this.i;this.i=[],r=function(t){var e=new Ih;return Ir(e=or(e,2,ee(1786)),3,t)}(r),r=Fh(r),this.o.send({url:"https://odml.pa.googleapis.com/v1/log",cb:"POST",ma:1e4,body:r,ib:2,bb:{"Content-Type":"application/x-protobuf","x-goog-api-key":this.l},withCredentials:!1},()=>{t?.()},t=>{this.error=Error(`Logging failed with HTTP error: ${t}`),this.i=[],void 0!==this.h&&(clearInterval(this.h),this.h=void 0),e?.("net-send-failed",t)})}}};class Nh{constructor(){this.ba=this.V=this.Y=this.S=this.W=this.U=this.R=0}}function Oh(t,e){var r=new Eh;r=xr(r,0,1,t.C),r=xr(r,0,2,e),e=or(e=new wh,6,lt(r=r.h(),!1)),(t=t.m).error||t.i.push(e)}function Mh(t,e){var r={R:e.R-t.l.R,U:e.U-t.l.U,W:e.W-t.l.W,S:e.S-t.l.S,Y:e.Y-t.l.Y,V:e.V,ba:e.ba},n=gh(mh(new vh,t.D),1);r=Dh(t,r),Oh(t,n=Rr(n,4,_h,r)),t.l=e}function Dh(t,e){var r=new lh;return t=Ur(t=$r(t=or(r,1,ee(t.F)),7,e.S),5,e.V),t=Ur(t,6,e.ba),e.W>0&&Ur(t,4,e.Y/e.W),0!==e.R&&(r=$r(r=uh(3),2,e.R),Cr(t,8,ch,r)),0!==e.U&&(e=$r(r=uh(4),2,e.U),Cr(t,8,ch,e)),t}var Ph=class{constructor(t,e,r){this.v=performance.now(),this.o=performance.now(),this.i=new Map,this.u=0,this.h=new Nh,this.l=new Nh,this.m=new Ch(r),this.D=function(t){switch(t){case"AudioClassifier":return 4;case"AudioEmbedder":return 5;case"TextClassifier":return 6;case"TextEmbedder":return 7;case"GestureRecognizer":return 8;case"HandDetector":return 9;case"HandLandmarker":return 10;case"ImageClassifier":return 11;case"ImageEmbedder":return 12;case"ImageSegmenter":return 13;case"ObjectDetector":return 14;case"FaceDetector":return 15;case"FaceLandmarker":return 16;case"InteractiveSegmenter":case"InteractiveSegmenterLegacy":return 18;case"HolisticLandmarker":return 20;case"LlmInference":return 21;case"LanguageDetector":return 22;case"PoseLandmarker":return 23;case"UniversalEmbedder":return 28;case"SemanticRetriever":return 29;case"DecisionMaker":return 30;case"TextSummarizer":return 26;case"TextProofreader":return 27;case"AudioTranscriber":return 31;case"TextToSpeech":return 32;default:return 0}}(t),this.F=function(t){switch(t){case"IMAGE":return 11;case"VIDEO":return 12;case"LIVE_STREAM":return 13;case"AUDIO_CLIPS":return 14;case"AUDIO_STREAM":return 15;default:return 10}}(e),t=new yh,"undefined"==typeof navigator?e=0:(e=navigator.userAgent,e=/Android/i.test(e)?1:/iPhone|iPad|iPod/i.test(e)?2:/Windows/i.test(e)?5:/Macintosh/i.test(e)?4:/Linux/i.test(e)?3:0),t=or(t,1,ee(e)),t=or(t,2,ge("")),t=or(t,3,ge("")),t=or(t,4,ge("1.2.0")),t=or(t,5,ge("")),this.C=or(t,6,ee(function(){var t=globalThis.__HOST_ENVIRONMENT__;if("string"==typeof t)switch(t){case"ANDROID":return 1;case"IOS":return 2;case"PYTHON":return 3;case"WEB":break;case"FLUTTER":return 5;case"FLUTTER_WEB":return 6;default:return 0}return 4}()))}za(){var t=new ph;t=Ur(t=or(t,1,ee(this.F)),3,performance.now()-this.v),Oh(this,t=Rr(gh(mh(new vh,this.D),0),3,_h,t)),this.o=performance.now()}Aa(t){var e=this.i.get(t);if(void 0!==e&&(this.i.delete(t),t=performance.now()-e,++this.h.W,this.h.Y+=t,this.h.V=Math.max(this.h.V,t),this.u=Math.max(this.u,t),performance.now()>this.o+3e4)){for(let[r,n]of this.i.entries())t=r,n<e&&(this.h.S++,this.i.delete(t));e={...this.h,ba:performance.now()-this.o},this.h.V=0,this.o=performance.now(),Mh(this,e)}}ya(){var t={...this.h,S:this.h.S+this.i.size,V:this.u,ba:performance.now()-this.v};Mh(this,t);var e=new fh;e=xr(e,0,2,t=Dh(this,t)),Oh(this,e=Rr(t=gh(mh(new vh,this.D),2),5,_h,e))}close(){var t=this.m;"function"==typeof t.close?t.close():t.flush()}};function $h(){var t=navigator;return"undefined"!=typeof OffscreenCanvas&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function Uh(t){if("function"!=typeof importScripts){let e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise((t,r)=>{e.addEventListener("load",()=>{t()},!1),e.addEventListener("error",t=>{r(t)},!1),document.body.appendChild(e)})}try{importScripts(t.toString())}catch(e){if(!(e instanceof TypeError))throw e;{let e=self.import;e?await e(t.toString()):await import(t.toString())}}}function Bh(t){return 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]}function jh(t,e,r){t.o||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),r(e=t.j.stringToNewUTF8(e)),t.j._free(e)}function Gh(t,e,r){if(!t.j.canvas)throw Error("No OpenGL canvas configured.");if(r?t.j._bindTextureToStream(r):t.j._bindTextureToCanvas(),!(r=t.j.canvas.getContext("webgl2")||t.j.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");t.j.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e),t.j.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);var[n,i]=Bh(e);return!t.l||n===t.j.canvas.width&&i===t.j.canvas.height||(t.j.canvas.width=n,t.j.canvas.height=i),[n,i]}function Vh(t,e,r){t.o||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");var n=new Uint32Array(e.length);for(let r=0;r<e.length;r++)n[r]=t.j.stringToNewUTF8(e[r]);e=t.j._malloc(4*n.length),t.j.HEAPU32.set(n,e>>2),r(e);for(let e of n)t.j._free(e);t.j._free(e)}function Hh(t,e,r){t.j.simpleListeners=t.j.simpleListeners||{},t.j.simpleListeners[e]=r}function Kh(t,e,r){var n=[];t.j.simpleListeners=t.j.simpleListeners||{},t.j.simpleListeners[e]=(t,e,i)=>{e?(r(n,i),n=[]):n.push(t)}}var Xh=class{constructor(t,e){this.l=!0,this.j=t,this.h=null,this.i=0,this.o="function"==typeof this.j._addIntToInputStream,void 0!==e?this.j.canvas=e:$h()?this.j.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.j.canvas=document.createElement("canvas"))}async initializeGraph(t){var 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){var r=t.length,n=this.j._malloc(r);this.j.HEAPU8.set(t,n),e?this.j._changeBinaryGraph(r,n):this.j._changeTextGraph(r,n),this.j._free(n)}configureAudio(t,e,r,n,i){this.j._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),jh(this,n||"input_audio",n=>{jh(this,i=i||"audio_header",i=>{this.j._configureAudio(n,i,t,e??0,r)})})}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.j._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.j.gpuOriginForWebTexturesIsBottomLeft=t}ka(t){Hh(this,"__graph_config__",e=>{t(e)}),jh(this,"__graph_config__",t=>{this.j._getGraphConfig(t,void 0)}),delete this.j.simpleListeners.__graph_config__}attachErrorListener(t){this.j.errorListener=t}attachEmptyPacketListener(t,e){this.j.emptyPacketListeners=this.j.emptyPacketListeners||{},this.j.emptyPacketListeners[t]=e}addAudioToStream(t,e,r){this.addAudioToStreamWithShape(t,0,0,e,r)}addAudioToStreamWithShape(t,e,r,n,i){var s=4*t.length;this.i!==s&&(this.h&&this.j._free(this.h),this.h=this.j._malloc(s),this.i=s),this.j.HEAPF32.set(t,this.h/4),jh(this,n,t=>{this.j._addAudioToInputStream(this.h,e,r,t,i)})}addGpuBufferToStream(t,e,r){jh(this,e,e=>{var[n,i]=Gh(this,t,e);this.j._addBoundTextureToStream(e,n,i,r)})}addBoolToStream(t,e,r){jh(this,e,e=>{this.j._addBoolToInputStream(t,e,r)})}addDoubleToStream(t,e,r){jh(this,e,e=>{this.j._addDoubleToInputStream(t,e,r)})}addFloatToStream(t,e,r){jh(this,e,e=>{this.j._addFloatToInputStream(t,e,r)})}addIntToStream(t,e,r){jh(this,e,e=>{this.j._addIntToInputStream(t,e,r)})}addUintToStream(t,e,r){jh(this,e,e=>{this.j._addUintToInputStream(t,e,r)})}addStringToStream(t,e,r){jh(this,e,e=>{jh(this,t,t=>{this.j._addStringToInputStream(t,e,r)})})}addStringRecordToStream(t,e,r){jh(this,e,e=>{Vh(this,Object.keys(t),n=>{Vh(this,Object.values(t),i=>{this.j._addFlatHashMapToInputStream(n,i,Object.keys(t).length,e,r)})})})}addProtoToStream(t,e,r,n){jh(this,r,r=>{jh(this,e,e=>{var i=this.j._malloc(t.length);this.j.HEAPU8.set(t,i),this.j._addProtoToInputStream(i,t.length,e,r,n),this.j._free(i)})})}addEmptyPacketToStream(t,e){jh(this,t,t=>{this.j._addEmptyPacketToInputStream(t,e)})}addBoolVectorToStream(t,e,r){jh(this,e,e=>{var n=this.j._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(let e of t)this.j._addBoolVectorEntry(n,e);this.j._addBoolVectorToInputStream(n,e,r)})}addDoubleVectorToStream(t,e,r){jh(this,e,e=>{var n=this.j._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(let e of t)this.j._addDoubleVectorEntry(n,e);this.j._addDoubleVectorToInputStream(n,e,r)})}addFloatVectorToStream(t,e,r){jh(this,e,e=>{var n=this.j._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(let e of t)this.j._addFloatVectorEntry(n,e);this.j._addFloatVectorToInputStream(n,e,r)})}addIntVectorToStream(t,e,r){jh(this,e,e=>{var n=this.j._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(let e of t)this.j._addIntVectorEntry(n,e);this.j._addIntVectorToInputStream(n,e,r)})}addUintVectorToStream(t,e,r){jh(this,e,e=>{var n=this.j._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(let e of t)this.j._addUintVectorEntry(n,e);this.j._addUintVectorToInputStream(n,e,r)})}addStringVectorToStream(t,e,r){jh(this,e,e=>{var n=this.j._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(let e of t)jh(this,e,t=>{this.j._addStringVectorEntry(n,t)});this.j._addStringVectorToInputStream(n,e,r)})}addBoolToInputSidePacket(t,e){jh(this,e,e=>{this.j._addBoolToInputSidePacket(t,e)})}addDoubleToInputSidePacket(t,e){jh(this,e,e=>{this.j._addDoubleToInputSidePacket(t,e)})}addFloatToInputSidePacket(t,e){jh(this,e,e=>{this.j._addFloatToInputSidePacket(t,e)})}addIntToInputSidePacket(t,e){jh(this,e,e=>{this.j._addIntToInputSidePacket(t,e)})}addUintToInputSidePacket(t,e){jh(this,e,e=>{this.j._addUintToInputSidePacket(t,e)})}addStringToInputSidePacket(t,e){jh(this,e,e=>{jh(this,t,t=>{this.j._addStringToInputSidePacket(t,e)})})}addProtoToInputSidePacket(t,e,r){jh(this,r,r=>{jh(this,e,e=>{var n=this.j._malloc(t.length);this.j.HEAPU8.set(t,n),this.j._addProtoToInputSidePacket(n,t.length,e,r),this.j._free(n)})})}addBoolVectorToInputSidePacket(t,e){jh(this,e,e=>{var r=this.j._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(let e of t)this.j._addBoolVectorEntry(r,e);this.j._addBoolVectorToInputSidePacket(r,e)})}addDoubleVectorToInputSidePacket(t,e){jh(this,e,e=>{var r=this.j._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(let e of t)this.j._addDoubleVectorEntry(r,e);this.j._addDoubleVectorToInputSidePacket(r,e)})}addFloatVectorToInputSidePacket(t,e){jh(this,e,e=>{var r=this.j._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(let e of t)this.j._addFloatVectorEntry(r,e);this.j._addFloatVectorToInputSidePacket(r,e)})}addIntVectorToInputSidePacket(t,e){jh(this,e,e=>{var r=this.j._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(let e of t)this.j._addIntVectorEntry(r,e);this.j._addIntVectorToInputSidePacket(r,e)})}addUintVectorToInputSidePacket(t,e){jh(this,e,e=>{var r=this.j._allocateUintVector(t.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(let e of t)this.j._addUintVectorEntry(r,e);this.j._addUintVectorToInputSidePacket(r,e)})}addStringVectorToInputSidePacket(t,e){jh(this,e,e=>{var r=this.j._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(let e of t)jh(this,e,t=>{this.j._addStringVectorEntry(r,t)});this.j._addStringVectorToInputSidePacket(r,e)})}attachBoolListener(t,e){Hh(this,t,e),jh(this,t,t=>{this.j._attachBoolListener(t)})}attachBoolVectorListener(t,e){Kh(this,t,e),jh(this,t,t=>{this.j._attachBoolVectorListener(t)})}attachIntListener(t,e){Hh(this,t,e),jh(this,t,t=>{this.j._attachIntListener(t)})}attachIntVectorListener(t,e){Kh(this,t,e),jh(this,t,t=>{this.j._attachIntVectorListener(t)})}attachUintListener(t,e){Hh(this,t,e),jh(this,t,t=>{this.j._attachUintListener(t)})}attachUintVectorListener(t,e){Kh(this,t,e),jh(this,t,t=>{this.j._attachUintVectorListener(t)})}attachDoubleListener(t,e){Hh(this,t,e),jh(this,t,t=>{this.j._attachDoubleListener(t)})}attachDoubleVectorListener(t,e){Kh(this,t,e),jh(this,t,t=>{this.j._attachDoubleVectorListener(t)})}attachFloatListener(t,e){Hh(this,t,e),jh(this,t,t=>{this.j._attachFloatListener(t)})}attachFloatVectorListener(t,e){Kh(this,t,e),jh(this,t,t=>{this.j._attachFloatVectorListener(t)})}attachStringListener(t,e){Hh(this,t,e),jh(this,t,t=>{this.j._attachStringListener(t)})}attachStringVectorListener(t,e){Kh(this,t,e),jh(this,t,t=>{this.j._attachStringVectorListener(t)})}attachProtoListener(t,e,r){Hh(this,t,e),jh(this,t,t=>{this.j._attachProtoListener(t,r||!1)})}attachProtoVectorListener(t,e,r){Kh(this,t,e),jh(this,t,t=>{this.j._attachProtoVectorListener(t,r||!1)})}attachAudioListener(t,e,r){this.j._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Hh(this,t,(t,r)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,r)}),jh(this,t,t=>{this.j._attachAudioListener(t,r||!1)})}finishProcessing(){this.j._waitUntilIdle()}closeGraph(){this.j._closeGraph(),this.j.simpleListeners=void 0,this.j.emptyPacketListeners=void 0}};function Wh(t){return class extends t{get qa(){return this.j}Ta(){if("function"==typeof this.qa._mediapipeLoggerGetEncodedApiKey){let t=this.qa._mediapipeLoggerGetEncodedApiKey();return this.qa._decodeBase64(t)}}}}function Yh(t){return class extends t{ab(){this.j._registerModelResourcesGraphService()}}}var zh=Wh(Yh(Xh)),qh=class extends zh{};async function Jh(t,e,r,n){return t=await(async(t,e,r,n,i)=>{if(e&&await Uh(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(r&&(await Uh(r),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&i&&((e=self.Module).locateFile=i.locateFile,i.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=i.mainScriptUrlOrBlob)),i=await self.ModuleFactory(self.Module||i),self.ModuleFactory=self.Module=void 0,new t(i,n)})(t,r.wasmLoaderPath,r.assetLoaderPath,e,{locateFile:t=>t.endsWith(".wasm")?r.wasmBinaryPath.toString():r.assetBinaryPath&&t.endsWith(".data")?r.assetBinaryPath.toString():t}),function(t,e){e=e.runningMode??"";var r=t.h.Ta();t.o=new Ph(t.D(),e,r)}(t,n),await t.A(n),t}async function Zh(t,e,r,n){return Jh(t,e,r,n)}function Qh(t,e,r){try{t.h.j.FS_unlink(`/${r}`)}catch{}t.h.j.FS_createDataFile("/",r,e,!0,!1,!1),tu(t,`/${r}`)}function tu(t,e){var r=br(t.baseOptions,Yo,1)||new Yo;"string"==typeof e?(or(r,2,ge(e)),or(r,1)):e instanceof Uint8Array&&(or(r,1,lt(e,!1)),or(r,2)),xr(t.baseOptions,0,1,r)}function eu(t){try{let e=t.L.length;if(1===e)throw Error(t.L[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.L.map(t=>t.message).join(", "))}finally{t.L=[]}}function ru(t,e){t.J=Math.max(t.J,e)}function nu(t,e){t.F=new uo,Gr(t.F,2,"PassThroughCalculator"),ao(t.F,"free_memory"),ho(t.F,"free_memory_unused_out"),mo(e,"free_memory"),po(e,t.F)}function iu(t,e){ao(t.F,e),ho(t.F,e+"_unused_out")}function su(t){t.h.addBoolToStream(!0,"free_memory",t.J)}var ou=class{constructor(t){this.h=t,this.L=[],this.J=0,this.h.setAutoRenderToScreen(!1)}l(t,e=!0,r=!1,n=!1){if(e){let e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(br(this.baseOptions,Yo,1)?.h()||br(this.baseOptions,Yo,1)?.l()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");!function(t,e,r=!1){var n=br(t.baseOptions,Xo,3);if(!n){var i=n=new Xo,s=new to;Rr(i,4,Wo,s)}"delegate"in e&&("GPU"===e.delegate?(e=n,i=new Ws,Rr(e,2,Wo,i)):(e=n,i=new to,Rr(e,4,Wo,i))),r&&(r=n.l(),e=n.h()||!0===r?.h(),r=new Js,e?xr(r,0,9,e=new qs):xr(r,0,8,e=new zs),Rr(n,6,Wo,r)),xr(t.baseOptions,0,3,n)}(this,e,n);let i=r?"model.litertlm":"model.dat";if(e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then(t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)}).then(t=>{Qh(this,new Uint8Array(t),i),this.u(),this.M()});if(e.modelAssetBuffer instanceof Uint8Array)r?Qh(this,e.modelAssetBuffer,i):tu(this,e.modelAssetBuffer);else if(e.modelAssetBuffer)return async function(t){for(var e=[],r=0;;){let{done:n,value:i}=await t.read();if(n)break;e.push(i),r+=i.length}if(0===e.length)return new Uint8Array(0);if(1===e.length)return e[0];t=new Uint8Array(r),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}(e.modelAssetBuffer).then(t=>{r?Qh(this,t,i):tu(this,t),this.u(),this.M()})}return this.u(),this.M(),Promise.resolve()}M(){}ka(){var t;if(this.h.ka(e=>{t=yo(e)}),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.h.attachErrorListener((t,e)=>{this.L.push(Error(e))}),this.h.ab(),this.h.setGraph(t,e),this.o?.za(),this.F=void 0,eu(this)}finishProcessing(t){this.h.finishProcessing(),eu(this),this.o&&void 0!==t&&this.o.Aa(t)}close(){this.F=void 0,this.o?.ya(),this.o?.close(),this.h.closeGraph()}};function au(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}ou.prototype.close=ou.prototype.close;class hu{constructor(t,e,r,n){this.h=t,this.i=e,this.o=r,this.l=n}bind(){this.h.bindVertexArray(this.i)}close(){this.h.deleteVertexArray(this.i),this.h.deleteBuffer(this.o),this.h.deleteBuffer(this.l)}}function uu(t,e,r){var n=t.h;if(r=au(n.createShader(r),"Failed to create WebGL shader"),n.shaderSource(r,e),n.compileShader(r),!n.getShaderParameter(r,n.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${n.getShaderInfoLog(r)}`);return n.attachShader(t.i,r),r}function cu(t,e){var r=t.h,n=au(r.createVertexArray(),"Failed to create vertex array");r.bindVertexArray(n);var i=au(r.createBuffer(),"Failed to create buffer");r.bindBuffer(r.ARRAY_BUFFER,i),r.enableVertexAttribArray(t.G),r.vertexAttribPointer(t.G,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),r.STATIC_DRAW);var s=au(r.createBuffer(),"Failed to create buffer");return r.bindBuffer(r.ARRAY_BUFFER,s),r.enableVertexAttribArray(t.L),r.vertexAttribPointer(t.L,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array(e?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,null),r.bindVertexArray(null),new hu(r,n,i,s)}function lu(t,e){if(t.h){if(e!==t.h)throw Error("Cannot change GL context once initialized")}else t.h=e}function du(t,e,r,n){return lu(t,e),t.i||(t.o(),t.J()),r?(t.m||(t.m=cu(t,!0)),r=t.m):(t.F||(t.F=cu(t,!1)),r=t.F),e.useProgram(t.i),r.bind(),t.l(),t=n(),r.h.bindVertexArray(null),t}function fu(t,e,r){return lu(t,e),t=au(e.createTexture(),"Failed to create texture"),e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,r??e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r??e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),t}function pu(t,e,r){lu(t,e),t.D||(t.D=au(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.D),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0)}function mu(t){t.h?.bindFramebuffer(t.h.FRAMEBUFFER,null)}var gu=class{C(){return"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n "}o(){var t=this.h;if(this.i=au(t.createProgram(),"Failed to create WebGL program"),this.ea=uu(this,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",t.VERTEX_SHADER),this.aa=uu(this,this.C(),t.FRAGMENT_SHADER),t.linkProgram(this.i),!t.getProgramParameter(this.i,t.LINK_STATUS))throw Error(`Error during program linking: ${t.getProgramInfoLog(this.i)}`);this.G=t.getAttribLocation(this.i,"aVertex"),this.L=t.getAttribLocation(this.i,"aTex")}J(){}l(){}close(){if(this.i){let t=this.h;t.deleteProgram(this.i),t.deleteShader(this.ea),t.deleteShader(this.aa)}this.D&&this.h.deleteFramebuffer(this.D),this.F&&this.F.close(),this.m&&this.m.close()}};var vu=class extends gu{C(){return"\n precision mediump float;\n uniform sampler2D backgroundTexture;\n uniform sampler2D maskTexture;\n uniform sampler2D colorMappingTexture;\n varying vec2 vTex;\n void main() {\n vec4 backgroundColor = texture2D(backgroundTexture, vTex);\n float category = texture2D(maskTexture, vTex).r;\n vec4 categoryColor = texture2D(colorMappingTexture, vec2(category, 0.0));\n gl_FragColor = mix(backgroundColor, categoryColor, categoryColor.a);\n }\n "}J(){var t=this.h;t.activeTexture(t.TEXTURE1),this.v=fu(this,t,t.LINEAR),t.activeTexture(t.TEXTURE2),this.u=fu(this,t,t.NEAREST)}o(){super.o();var t=this.h;this.P=au(t.getUniformLocation(this.i,"backgroundTexture"),"Uniform location"),this.Z=au(t.getUniformLocation(this.i,"colorMappingTexture"),"Uniform location"),this.M=au(t.getUniformLocation(this.i,"maskTexture"),"Uniform location")}l(){super.l();var t=this.h;t.uniform1i(this.M,0),t.uniform1i(this.P,1),t.uniform1i(this.Z,2)}close(){this.v&&this.h.deleteTexture(this.v),this.u&&this.h.deleteTexture(this.u),super.close()}},_u=class extends gu{C(){return"\n precision mediump float;\n uniform sampler2D maskTexture;\n uniform sampler2D defaultTexture;\n uniform sampler2D overlayTexture;\n varying vec2 vTex;\n void main() {\n float confidence = texture2D(maskTexture, vTex).r;\n vec4 defaultColor = texture2D(defaultTexture, vTex);\n vec4 overlayColor = texture2D(overlayTexture, vTex);\n // Apply the alpha from the overlay and merge in the default color\n overlayColor = mix(defaultColor, overlayColor, overlayColor.a);\n gl_FragColor = mix(defaultColor, overlayColor, confidence);\n }\n "}J(){var t=this.h;t.activeTexture(t.TEXTURE1),this.u=fu(this,t),t.activeTexture(t.TEXTURE2),this.v=fu(this,t)}o(){super.o();var t=this.h;this.M=au(t.getUniformLocation(this.i,"defaultTexture"),"Uniform location"),this.P=au(t.getUniformLocation(this.i,"overlayTexture"),"Uniform location"),this.K=au(t.getUniformLocation(this.i,"maskTexture"),"Uniform location")}l(){super.l();var t=this.h;t.uniform1i(this.K,0),t.uniform1i(this.M,1),t.uniform1i(this.P,2)}close(){this.u&&this.h.deleteTexture(this.u),this.v&&this.h.deleteTexture(this.v),super.close()}};function yu(t,e){switch(e){case 0:return t.h.find(t=>t instanceof Uint8Array);case 1:return t.h.find(t=>t instanceof Float32Array);case 2:return t.h.find(t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function Eu(t){var e=yu(t,1);if(!e){if(e=yu(t,0))e=new Float32Array(e).map(t=>t/255);else{e=new Float32Array(t.width*t.height);let n=wu(t);var r=bu(t);if(pu(r,n,Au(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){r=new Float32Array(t.width*t.height*4),n.readPixels(0,0,t.width,t.height,n.RGBA,n.FLOAT,r);for(let t=0,n=0;t<e.length;++t,n+=4)e[t]=r[n]}else n.readPixels(0,0,t.width,t.height,n.RED,n.FLOAT,e)}t.h.push(e)}return e}function Au(t){var e=yu(t,2);if(!e){let r=wu(t);e=ku(t);let n=Eu(t),i=Tu(t);r.texImage2D(r.TEXTURE_2D,0,i,t.width,t.height,0,r.RED,r.FLOAT,n),Su(t)}return e}function wu(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.i||(t.i=au(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.i}function Tu(t){if(t=wu(t),!Lu)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))Lu=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");Lu=t.R16F}return Lu}function bu(t){return t.l||(t.l=new gu),t.l}function ku(t){var e=wu(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);var r=yu(t,2);return r||(r=fu(bu(t),e,t.o?e.LINEAR:e.NEAREST),t.h.push(r),t.u=!0),e.bindTexture(e.TEXTURE_2D,r),r}function Su(t){t.i.bindTexture(t.i.TEXTURE_2D,null)}var Lu,xu=class{constructor(t,e,r,n,i,s,o){this.h=t,this.o=e,this.u=r,this.canvas=n,this.l=i,this.width=s,this.height=o,this.u&&(0===--Ru&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources."))}Va(){return!!yu(this,0)}va(){return!!yu(this,1)}X(){return!!yu(this,2)}ua(){return(e=yu(t=this,0))||(e=Eu(t),e=new Uint8Array(e.map(t=>Math.round(255*t))),t.h.push(e)),e;var t,e}ta(){return Eu(this)}T(){return Au(this)}clone(){var t=[];for(let e of this.h){let r;if(e instanceof Uint8Array)r=new Uint8Array(e);else if(e instanceof Float32Array)r=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{let t=wu(this),e=bu(this);t.activeTexture(t.TEXTURE1),r=fu(e,t,this.o?t.LINEAR:t.NEAREST),t.bindTexture(t.TEXTURE_2D,r);let n=Tu(this);t.texImage2D(t.TEXTURE_2D,0,n,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),pu(e,t,r),du(e,t,!1,()=>{ku(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Su(this)}),mu(e),Su(this)}}t.push(r)}return new xu(t,this.o,this.X(),this.canvas,this.l,this.width,this.height)}close(){this.u&&wu(this).deleteTexture(yu(this,2)),Ru=-1}};xu.prototype.close=xu.prototype.close,xu.prototype.clone=xu.prototype.clone,xu.prototype.getAsWebGLTexture=xu.prototype.T,xu.prototype.getAsFloat32Array=xu.prototype.ta,xu.prototype.getAsUint8Array=xu.prototype.ua,xu.prototype.hasWebGLTexture=xu.prototype.X,xu.prototype.hasFloat32Array=xu.prototype.va,xu.prototype.hasUint8Array=xu.prototype.Va;var Ru=250,Iu={color:"white",lineWidth:4,radius:6};function Fu(t){return{...Iu,fillColor:(t=t||{}).color,...t}}function Cu(t,e){return t instanceof Function?t(e):t}function Nu(t,e,r){return Math.max(Math.min(e,r),Math.min(Math.max(e,r),t))}function Ou(t){if(!t.l)throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");return t.l}function Mu(t){if(!t.u)throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");return t.u}function Du(t,e,r){if(e.X())r(e.T());else{let n=e.va()?e.ta():e.ua();t.o=t.o??new gu;let i=Mu(t);r((t=new xu([n],e.o,!1,i.canvas,t.o,e.width,e.height)).T()),t.close()}}function Pu(t,e,r,n){var i=function(t){return t.h||(t.h=new vu),t.h}(t),s=Mu(t),o=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;du(i,s,!0,()=>{!function(t,e,r,n){var i=t.h;if(i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,e),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,t.v),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,r),t.K&&function(t,e){if(t!==e)return!1;t=t.entries(),e=e.entries();for(let[r,n]of t){t=r;let i=n,s=e.next();if(s.done)return!1;let[o,a]=s.value;if(t!==o||i[0]!==a[0]||i[1]!==a[1]||i[2]!==a[2]||i[3]!==a[3])return!1}return!!e.next().done}(t.K,n))i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.u);else{t.K=n;let e=Array(1024).fill(0);n.forEach((t,r)=>{if(4!==t.length)throw Error(`Color at index ${r} is not a four-channel value.`);e[4*r]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]}),i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.u),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,256,1,0,i.RGBA,i.UNSIGNED_BYTE,new Uint8Array(e))}}(i,e,o,n),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4);var t=i.h;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,null)})}function $u(t,e,r,n){var i=Mu(t),s=function(t){return t.i||(t.i=new _u),t.i}(t),o=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r,a=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;du(s,i,!0,()=>{var t=s.h;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,s.u),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,s.v),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,a),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.drawArrays(i.TRIANGLE_FAN,0,4),i.bindTexture(i.TEXTURE_2D,null),(t=s.h).activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,null)})}var Uu=class{constructor(t,e){"undefined"!=typeof CanvasRenderingContext2D&&t instanceof CanvasRenderingContext2D||t instanceof OffscreenCanvasRenderingContext2D?(this.l=t,this.u=e):this.u=t}Na(t,e){if(t){var r=Ou(this);e=Fu(e),r.save();var n=r.canvas,i=0;for(let s of t)r.fillStyle=Cu(e.fillColor,{index:i,from:s}),r.strokeStyle=Cu(e.color,{index:i,from:s}),r.lineWidth=Cu(e.lineWidth,{index:i,from:s}),(t=new Path2D).arc(s.x*n.width,s.y*n.height,Cu(e.radius,{index:i,from:s}),0,2*Math.PI),r.fill(t),r.stroke(t),++i;r.restore()}}Ma(t,e,r){if(t&&e){var n=Ou(this);r=Fu(r),n.save();var i=n.canvas,s=0;for(let o of e){n.beginPath(),e=t[o.start];let a=t[o.end];e&&a&&(n.strokeStyle=Cu(r.color,{index:s,from:e,to:a}),n.lineWidth=Cu(r.lineWidth,{index:s,from:e,to:a}),n.moveTo(e.x*i.width,e.y*i.height),n.lineTo(a.x*i.width,a.y*i.height)),++s,n.stroke()}n.restore()}}Ja(t,e){var r=Ou(this);e=Fu(e),r.save(),r.beginPath(),r.lineWidth=Cu(e.lineWidth,{}),r.strokeStyle=Cu(e.color,{}),r.fillStyle=Cu(e.fillColor,{}),r.moveTo(t.originX,t.originY),r.lineTo(t.originX+t.width,t.originY),r.lineTo(t.originX+t.width,t.originY+t.height),r.lineTo(t.originX,t.originY+t.height),r.lineTo(t.originX,t.originY),r.stroke(),r.fill(),r.restore()}Ka(t,e,r=[0,0,0,255]){this.l?function(t,e,r,n){var i=Mu(t);Du(t,e,e=>{Pu(t,e,r,n),(e=Ou(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)})}(this,t,r,e):Pu(this,t.T(),r,e)}La(t,e,r){this.l?function(t,e,r,n){var i=Mu(t);Du(t,e,e=>{$u(t,e,r,n),(e=Ou(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)})}(this,t,e,r):$u(this,t.T(),e,r)}close(){this.h?.close(),this.h=void 0,this.i?.close(),this.i=void 0,this.o?.close(),this.o=void 0}};function Bu(t,e){switch(e){case 0:return t.h.find(t=>t instanceof ImageData);case 1:return t.h.find(t=>"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap);case 2:return t.h.find(t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function ju(t){var e=Bu(t,0);if(!e){e=Vu(t);let r=Hu(t),n=new Uint8Array(t.width*t.height*4);pu(r,e,Gu(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,n),mu(r),e=new ImageData(new Uint8ClampedArray(n.buffer),t.width,t.height),t.h.push(e)}return e}function Gu(t){var e=Bu(t,2);if(!e){let r=Vu(t);e=Ku(t);let n=Bu(t,1)||ju(t);r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,n),Xu(t)}return e}function Vu(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.i||(t.i=au(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.i}function Hu(t){return t.l||(t.l=new gu),t.l}function Ku(t){var e=Vu(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);var r=Bu(t,2);return r||(r=fu(Hu(t),e),t.h.push(r),t.o=!0),e.bindTexture(e.TEXTURE_2D,r),r}function Xu(t){t.i.bindTexture(t.i.TEXTURE_2D,null)}function Wu(t){var e=Vu(t);return du(Hu(t),e,!0,()=>function(t,e){var r=t.canvas;if(r.width===t.width&&r.height===t.height)return e();var n=r.width,i=r.height;return r.width=t.width,r.height=t.height,t=e(),r.width=n,r.height=i,t}(t,()=>{if(e.bindFramebuffer(e.FRAMEBUFFER,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),!(t.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return t.canvas.transferToImageBitmap()}))}Uu.prototype.close=Uu.prototype.close,Uu.prototype.drawConfidenceMask=Uu.prototype.La,Uu.prototype.drawCategoryMask=Uu.prototype.Ka,Uu.prototype.drawBoundingBox=Uu.prototype.Ja,Uu.prototype.drawConnectors=Uu.prototype.Ma,Uu.prototype.drawLandmarks=Uu.prototype.Na,Uu.lerp=function(t,e,r,n,i){return Nu(n*(1-(t-e)/(r-e))+i*(1-(r-t)/(r-e)),n,i)},Uu.clamp=Nu;var Yu=class{constructor(t,e,r,n,i,s,o){this.h=t,this.u=e,this.o=r,this.canvas=n,this.l=i,this.width=s,this.height=o,(this.u||this.o)&&(0===--zu&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources."))}Ua(){return!!Bu(this,0)}wa(){return!!Bu(this,1)}X(){return!!Bu(this,2)}Ra(){return ju(this)}Qa(){var t=Bu(this,1);return t||(Gu(this),Ku(this),t=Wu(this),Xu(this),this.h.push(t),this.u=!0),t}T(){return Gu(this)}clone(){var t=[];for(let e of this.h){let r;if(e instanceof ImageData)r=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){let t=Vu(this),e=Hu(this);t.activeTexture(t.TEXTURE1),r=fu(e,t),t.bindTexture(t.TEXTURE_2D,r),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.bindTexture(t.TEXTURE_2D,null),pu(e,t,r),du(e,t,!1,()=>{Ku(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Xu(this)}),mu(e),Xu(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);Gu(this),Ku(this),r=Wu(this),Xu(this)}t.push(r)}return new Yu(t,this.wa(),this.X(),this.canvas,this.l,this.width,this.height)}close(){this.u&&Bu(this,1).close(),this.o&&Vu(this).deleteTexture(Bu(this,2)),zu=-1}};Yu.prototype.close=Yu.prototype.close,Yu.prototype.clone=Yu.prototype.clone,Yu.prototype.getAsWebGLTexture=Yu.prototype.T,Yu.prototype.getAsImageBitmap=Yu.prototype.Qa,Yu.prototype.getAsImageData=Yu.prototype.Ra,Yu.prototype.hasWebGLTexture=Yu.prototype.X,Yu.prototype.hasImageBitmap=Yu.prototype.wa,Yu.prototype.hasImageData=Yu.prototype.Ua;var zu=250;function qu(...t){return t.map(([t,e])=>({start:t,end:e}))}var Ju,Zu=Yh((Ju=Wh(Xh),class extends Ju{get pa(){return this.j}Ea(t,e,r){jh(this,e,e=>{var[n,i]=Gh(this,t,e);this.pa._addBoundTextureAsImageToStream(e,n,i,r)})}ha(t,e){Hh(this,t,e),jh(this,t,t=>{this.pa._attachImageListener(t)})}ia(t,e){Kh(this,t,e),jh(this,t,t=>{this.pa._attachImageVectorListener(t)})}})),Qu=class extends Zu{};async function tc(t,e,r){return Zh(t,r.canvas??($h()?void 0:document.createElement("canvas")),e,r)}function ec(t,e,r,n){if(t.o&&void 0!==n){var i=br(t.baseOptions,Xo,3);i?.h()||i?.l()?.h()?(++(i=t.o).h.U,i.i.set(n,performance.now())):(++(i=t.o).h.R,i.i.set(n,performance.now()))}if(t.ra){if(i=new Oo,r?.regionOfInterest){if(!t.Da)throw Error("This task doesn't support region-of-interest.");var s=r.regionOfInterest;if(s.left>=s.right||s.top>=s.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(s.left<0||s.top<0||s.right>1||s.bottom>1)throw Error("Expected RectF values to be in [0,1].");Br(i,1,(s.left+s.right)/2),Br(i,2,(s.top+s.bottom)/2),Br(i,4,s.right-s.left),Br(i,3,s.bottom-s.top)}else Br(i,1,.5),Br(i,2,.5),Br(i,4,1),Br(i,3,1);if(r?.rotationDegrees){if(r?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(Br(i,5,-Math.PI*r.rotationDegrees/180),r?.rotationDegrees%180!=0){let[t,n]=Bh(e);r=Or(i,3)*n/t,s=Or(i,4)*t/n,Br(i,4,r),Br(i,3,s)}}t.h.addProtoToStream(i.h(),"mediapipe.NormalizedRect",t.ra,n)}t.h.Ea(e,t.Ca,n??performance.now()),t.finishProcessing(n)}function rc(t,e,r){if(t.K)throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");ec(t,e,r,t.J+1)}function nc(t,e,r,n){if(!t.K)throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");ec(t,e,r,n)}function ic(t,e,r,n){var i=e.data,s=e.width,o=s*(e=e.height);if((i instanceof Uint8Array||i instanceof Float32Array)&&i.length!==o)throw Error("Unsupported channel count: "+i.length/o);return t=new xu([i],r,!1,t.h.j.canvas,t.ea,s,e),n?t.clone():t}var sc=class extends ou{constructor(t,e,r,n){super(t),this.h=t,this.Ca=e,this.ra=r,this.Da=n,this.ea=new gu,this.K=!1}l(t,e=!0,r=!1,n=!1){if("runningMode"in t){var i=this.K=!!t.runningMode&&"IMAGE"!==t.runningMode;or(this.baseOptions,2,null==i?i:Zt(i))}if(void 0!==t.canvas&&this.h.j.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e,r,n)}close(){this.ea.close(),super.close()}};sc.prototype.close=sc.prototype.close;var oc=class extends sc{constructor(t,e){super(new Qu(t,e),"image_in","norm_rect_in",!1),this.m={detections:[]},xr(t=this.i=new Qo,0,1,e=new zo),Br(this.i,2,.5),Br(this.i,3,.3)}D(){return"FaceDetector"}get baseOptions(){return br(this.i,zo,1)}set baseOptions(t){xr(this.i,0,1,t)}A(t){return"minDetectionConfidence"in t&&Br(this.i,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&Br(this.i,3,t.minSuppressionThreshold??.3),this.l(t)}H(t,e){return this.m={detections:[]},rc(this,t,e),this.m}I(t,e,r){return this.m={detections:[]},nc(this,t,r,e),this.m}u(){var t=new vo;mo(t,"image_in"),mo(t,"norm_rect_in"),go(t,"detections");var e=new io;ui(e,ea,this.i);var r=new uo;Gr(r,2,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect_in"),ho(r,"DETECTIONS:detections"),r.A(e),po(t,r),this.h.attachProtoVectorListener("detections",(t,e)=>{for(let e of t)t=Lo(e),this.m.detections.push(Qa(t));ru(this,e)}),this.h.attachEmptyPacketListener("detections",t=>{ru(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};oc.prototype.detectForVideo=oc.prototype.I,oc.prototype.detect=oc.prototype.H,oc.prototype.setOptions=oc.prototype.A,oc.createFromModelPath=async function(t,e){return tc(oc,t,{baseOptions:{modelAssetPath:e}})},oc.createFromModelBuffer=function(t,e){return tc(oc,t,{baseOptions:{modelAssetBuffer:e}})},oc.createFromOptions=function(t,e){return tc(oc,t,e)};var ac=qu([61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]),hc=qu([263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]),uc=qu([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),cc=qu([474,475],[475,476],[476,477],[477,474]),lc=qu([33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]),dc=qu([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),fc=qu([469,470],[470,471],[471,472],[472,469]),pc=qu([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]),mc=[...ac,...hc,...uc,...lc,...dc,...pc],gc=qu([127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]);function vc(t){t.m={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var _c=class extends sc{constructor(t,e){super(new Qu(t,e),"image_in","norm_rect",!1),this.m={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,xr(t=this.i=new ia,0,1,e=new zo),this.C=new na,xr(this.i,0,3,this.C),this.v=new Qo,xr(this.i,0,2,this.v),Pr(this.v,4,1),Br(this.v,2,.5),Br(this.C,2,.5),Br(this.i,4,.5)}D(){return"FaceLandmarker"}get baseOptions(){return br(this.i,zo,1)}set baseOptions(t){xr(this.i,0,1,t)}A(t){return"numFaces"in t&&Pr(this.v,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&Br(this.v,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&Br(this.i,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&Br(this.C,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}H(t,e){return vc(this),rc(this,t,e),this.m}I(t,e,r){return vc(this),nc(this,t,r,e),this.m}u(){var t=new vo;mo(t,"image_in"),mo(t,"norm_rect"),go(t,"face_landmarks");var e=new io;ui(e,oa,this.i);var r=new uo;Gr(r,2,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"NORM_LANDMARKS:face_landmarks"),r.A(e),po(t,r),this.h.attachProtoVectorListener("face_landmarks",(t,e)=>{for(let e of t)t=Fo(e),this.m.faceLandmarks.push(th(t));ru(this,e)}),this.h.attachEmptyPacketListener("face_landmarks",t=>{ru(this,t)}),this.outputFaceBlendshapes&&(go(t,"blendshapes"),ho(r,"BLENDSHAPES:blendshapes"),this.h.attachProtoVectorListener("blendshapes",(t,e)=>{if(this.outputFaceBlendshapes)for(let e of t)t=To(e),this.m.faceBlendshapes.push(Ja(t.h()??[]));ru(this,e)}),this.h.attachEmptyPacketListener("blendshapes",t=>{ru(this,t)})),this.outputFacialTransformationMatrixes&&(go(t,"face_geometry"),ho(r,"FACE_GEOMETRY:face_geometry"),this.h.attachProtoVectorListener("face_geometry",(t,e)=>{if(this.outputFacialTransformationMatrixes)for(let e of t)(t=br(t=ra(e),Co,2))&&this.m.facialTransformationMatrixes.push({rows:Nr(t,1)??0??0,columns:Nr(t,2)??0??0,data:cr(t,3,Jt).slice()??[]});ru(this,e)}),this.h.attachEmptyPacketListener("face_geometry",t=>{ru(this,t)})),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};_c.prototype.detectForVideo=_c.prototype.I,_c.prototype.detect=_c.prototype.H,_c.prototype.setOptions=_c.prototype.A,_c.createFromModelPath=function(t,e){return tc(_c,t,{baseOptions:{modelAssetPath:e}})},_c.createFromModelBuffer=function(t,e){return tc(_c,t,{baseOptions:{modelAssetBuffer:e}})},_c.createFromOptions=function(t,e){return tc(_c,t,e)},_c.FACE_LANDMARKS_LIPS=ac,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LIPS",_c.FACE_LANDMARKS_LIPS),_c.FACE_LANDMARKS_LEFT_EYE=hc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYE",_c.FACE_LANDMARKS_LEFT_EYE),_c.FACE_LANDMARKS_LEFT_EYEBROW=uc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYEBROW",_c.FACE_LANDMARKS_LEFT_EYEBROW),_c.FACE_LANDMARKS_LEFT_IRIS=cc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_IRIS",_c.FACE_LANDMARKS_LEFT_IRIS),_c.FACE_LANDMARKS_RIGHT_EYE=lc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYE",_c.FACE_LANDMARKS_RIGHT_EYE),_c.FACE_LANDMARKS_RIGHT_EYEBROW=dc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW",_c.FACE_LANDMARKS_RIGHT_EYEBROW),_c.FACE_LANDMARKS_RIGHT_IRIS=fc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_IRIS",_c.FACE_LANDMARKS_RIGHT_IRIS),_c.FACE_LANDMARKS_FACE_OVAL=pc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_FACE_OVAL",_c.FACE_LANDMARKS_FACE_OVAL),_c.FACE_LANDMARKS_CONTOURS=mc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_CONTOURS",_c.FACE_LANDMARKS_CONTOURS),_c.FACE_LANDMARKS_TESSELATION=gc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_TESSELATION",_c.FACE_LANDMARKS_TESSELATION);var yc=qu([0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[5,9],[9,10],[10,11],[11,12],[9,13],[13,14],[14,15],[15,16],[13,17],[0,17],[17,18],[18,19],[19,20]);function Ec(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function Ac(t){return 0===t.gestures.length?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function wc(t,e=!0){var r=[];for(let i of t){var n=To(i);t=[];for(let r of n.h())n=e&&null!=Nr(r,1)?Nr(r,1)??0:-1,t.push({score:Or(r,2)??0,index:n,categoryName:ve(ir(r,3))??""??"",displayName:ve(ir(r,4))??""??""});r.push(t)}return r}var Tc=class extends sc{constructor(t,e){super(new Qu(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],xr(t=this.m=new fa,0,1,e=new zo),this.v=new da,xr(this.m,0,2,this.v),this.G=new la,xr(this.v,0,3,this.G),this.C=new ca,xr(this.v,0,2,this.C),this.i=new ua,xr(this.m,0,3,this.i),Br(this.C,2,.5),Br(this.v,4,.5),Br(this.G,2,.5)}D(){return"GestureRecognizer"}get baseOptions(){return br(this.m,zo,1)}set baseOptions(t){xr(this.m,0,1,t)}A(t){if(Pr(this.C,3,t.numHands??1),"minHandDetectionConfidence"in t&&Br(this.C,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Br(this.v,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Br(this.G,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new aa,r=e,n=za(t.cannedGesturesClassifierOptions,br(this.i,aa,3)?.l());xr(r,0,2,n),xr(this.i,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&br(this.i,aa,3)?.h();return t.customGesturesClassifierOptions?(xr(r=e=new aa,0,2,n=za(t.customGesturesClassifierOptions,br(this.i,aa,4)?.l())),xr(this.i,0,4,e)):void 0===t.customGesturesClassifierOptions&&br(this.i,aa,4)?.h(),this.l(t)}Ya(t,e){return Ec(this),rc(this,t,e),Ac(this)}Za(t,e,r){return Ec(this),nc(this,t,r,e),Ac(this)}u(){var t=new vo;mo(t,"image_in"),mo(t,"norm_rect"),go(t,"hand_gestures"),go(t,"hand_landmarks"),go(t,"world_hand_landmarks"),go(t,"handedness");var e=new io;ui(e,_a,this.m);var r=new uo;Gr(r,2,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"HAND_GESTURES:hand_gestures"),ho(r,"LANDMARKS:hand_landmarks"),ho(r,"WORLD_LANDMARKS:world_hand_landmarks"),ho(r,"HANDEDNESS:handedness"),r.A(e),po(t,r),this.h.attachProtoVectorListener("hand_landmarks",(t,e)=>{for(let e of t)t=Fo(e),this.landmarks.push(th(t));ru(this,e)}),this.h.attachEmptyPacketListener("hand_landmarks",t=>{ru(this,t)}),this.h.attachProtoVectorListener("world_hand_landmarks",(t,e)=>{for(let e of t)t=Ro(e),this.worldLandmarks.push(eh(t));ru(this,e)}),this.h.attachEmptyPacketListener("world_hand_landmarks",t=>{ru(this,t)}),this.h.attachProtoVectorListener("hand_gestures",(t,e)=>{this.gestures.push(...wc(t,!1)),ru(this,e)}),this.h.attachEmptyPacketListener("hand_gestures",t=>{ru(this,t)}),this.h.attachProtoVectorListener("handedness",(t,e)=>{this.handedness.push(...wc(t)),ru(this,e)}),this.h.attachEmptyPacketListener("handedness",t=>{ru(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};function bc(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}Tc.prototype.recognizeForVideo=Tc.prototype.Za,Tc.prototype.recognize=Tc.prototype.Ya,Tc.prototype.setOptions=Tc.prototype.A,Tc.createFromModelPath=function(t,e){return tc(Tc,t,{baseOptions:{modelAssetPath:e}})},Tc.createFromModelBuffer=function(t,e){return tc(Tc,t,{baseOptions:{modelAssetBuffer:e}})},Tc.createFromOptions=function(t,e){return tc(Tc,t,e)},Tc.HAND_CONNECTIONS=yc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$gesture_recognizer$gesture_recognizer.GestureRecognizer.HAND_CONNECTIONS",Tc.HAND_CONNECTIONS);var kc=class extends sc{constructor(t,e){super(new Qu(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],xr(t=this.i=new da,0,1,e=new zo),this.v=new la,xr(this.i,0,3,this.v),this.m=new ca,xr(this.i,0,2,this.m),Pr(this.m,3,1),Br(this.m,2,.5),Br(this.v,2,.5),Br(this.i,4,.5)}D(){return"HandLandmarker"}get baseOptions(){return br(this.i,zo,1)}set baseOptions(t){xr(this.i,0,1,t)}A(t){return"numHands"in t&&Pr(this.m,3,t.numHands??1),"minHandDetectionConfidence"in t&&Br(this.m,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&Br(this.i,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&Br(this.v,2,t.minHandPresenceConfidence??.5),this.l(t)}H(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],rc(this,t,e),bc(this)}I(t,e,r){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],nc(this,t,r,e),bc(this)}u(){var t=new vo;mo(t,"image_in"),mo(t,"norm_rect"),go(t,"hand_landmarks"),go(t,"world_hand_landmarks"),go(t,"handedness");var e=new io;ui(e,ya,this.i);var r=new uo;Gr(r,2,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"LANDMARKS:hand_landmarks"),ho(r,"WORLD_LANDMARKS:world_hand_landmarks"),ho(r,"HANDEDNESS:handedness"),r.A(e),po(t,r),this.h.attachProtoVectorListener("hand_landmarks",(t,e)=>{for(let e of t)t=Fo(e),this.landmarks.push(th(t));ru(this,e)}),this.h.attachEmptyPacketListener("hand_landmarks",t=>{ru(this,t)}),this.h.attachProtoVectorListener("world_hand_landmarks",(t,e)=>{for(let e of t)t=Ro(e),this.worldLandmarks.push(eh(t));ru(this,e)}),this.h.attachEmptyPacketListener("world_hand_landmarks",t=>{ru(this,t)}),this.h.attachProtoVectorListener("handedness",(t,e)=>{var r=this.handedness,n=r.push,i=[];for(let e of t){t=To(e);let r=[];for(let e of t.h())r.push({score:Or(e,2)??0,index:Nr(e,1)??0??-1,categoryName:ve(ir(e,3))??""??"",displayName:ve(ir(e,4))??""??""});i.push(r)}n.call(r,...i),ru(this,e)}),this.h.attachEmptyPacketListener("handedness",t=>{ru(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};kc.prototype.detectForVideo=kc.prototype.I,kc.prototype.detect=kc.prototype.H,kc.prototype.setOptions=kc.prototype.A,kc.createFromModelPath=function(t,e){return tc(kc,t,{baseOptions:{modelAssetPath:e}})},kc.createFromModelBuffer=function(t,e){return tc(kc,t,{baseOptions:{modelAssetBuffer:e}})},kc.createFromOptions=function(t,e){return tc(kc,t,e)},kc.HAND_CONNECTIONS=yc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$hand_landmarker$hand_landmarker.HandLandmarker.HAND_CONNECTIONS",kc.HAND_CONNECTIONS);var Sc=qu([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function Lc(t){t.i={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function xc(t){try{if(!t.G)return t.i;t.G(t.i)}finally{su(t)}}function Rc(t,e){t=Fo(t),e.push(th(t))}var Ic=class extends sc{constructor(t,e){super(new Qu(t,e),"input_frames_image",null,!1),this.i={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,xr(t=this.m=new Ta,0,1,e=new zo),this.Z=new la,xr(this.m,0,2,this.Z),this.Ba=new Ea,xr(this.m,0,3,this.Ba),this.v=new Qo,xr(this.m,0,4,this.v),this.P=new na,xr(this.m,0,5,this.P),this.C=new Aa,xr(this.m,0,6,this.C),this.aa=new wa,xr(this.m,0,7,this.aa),Br(this.v,2,.5),Br(this.v,3,.3),Br(this.P,2,.5),Br(this.C,2,.5),Br(this.C,3,.3),Br(this.aa,2,.5),Br(this.Z,2,.5)}D(){return"HolisticLandmarker"}get baseOptions(){return br(this.m,zo,1)}set baseOptions(t){xr(this.m,0,1,t)}A(t){return"minFaceDetectionConfidence"in t&&Br(this.v,2,t.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in t&&Br(this.v,3,t.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in t&&Br(this.P,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&Br(this.C,2,t.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in t&&Br(this.C,3,t.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in t&&Br(this.aa,2,t.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&Br(this.Z,2,t.minHandLandmarksConfidence??.5),this.l(t)}H(t,e,r){var n="function"!=typeof e?e:{};return this.G="function"==typeof e?e:r,Lc(this),rc(this,t,n),xc(this)}I(t,e,r,n){var i="function"!=typeof r?r:{};return this.G="function"==typeof r?r:n,Lc(this),nc(this,t,i,e),xc(this)}u(){var t=new vo;mo(t,"input_frames_image"),go(t,"pose_landmarks"),go(t,"pose_world_landmarks"),go(t,"face_landmarks"),go(t,"left_hand_landmarks"),go(t,"left_hand_world_landmarks"),go(t,"right_hand_landmarks"),go(t,"right_hand_world_landmarks");var e=new io,r=new $s;Gr(r,1,"type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),function(t,e){if(null!=e)if(Array.isArray(e))or(t,2,Be(e,0,Ge));else{if(!("string"==typeof e||e instanceof N||x(e)))throw Error("invalid value in Any.value field: "+e+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");vr(t,2,lt(e,!1),I())}}(r,this.m.h());var n=new uo;Gr(n,2,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),Cr(n,8,$s,r),ao(n,"IMAGE:input_frames_image"),ho(n,"POSE_LANDMARKS:pose_landmarks"),ho(n,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),ho(n,"FACE_LANDMARKS:face_landmarks"),ho(n,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),ho(n,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),ho(n,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),ho(n,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),n.A(e),po(t,n),nu(this,t),this.h.attachProtoListener("pose_landmarks",(t,e)=>{Rc(t,this.i.poseLandmarks),ru(this,e)}),this.h.attachEmptyPacketListener("pose_landmarks",t=>{ru(this,t)}),this.h.attachProtoListener("pose_world_landmarks",(t,e)=>{var r=this.i.poseWorldLandmarks;t=Ro(t),r.push(eh(t)),ru(this,e)}),this.h.attachEmptyPacketListener("pose_world_landmarks",t=>{ru(this,t)}),this.outputPoseSegmentationMasks&&(ho(n,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),iu(this,"pose_segmentation_mask"),this.h.ha("pose_segmentation_mask",(t,e)=>{this.i.poseSegmentationMasks=[ic(this,t,!0,!this.G)],ru(this,e)}),this.h.attachEmptyPacketListener("pose_segmentation_mask",t=>{this.i.poseSegmentationMasks=[],ru(this,t)})),this.h.attachProtoListener("face_landmarks",(t,e)=>{Rc(t,this.i.faceLandmarks),ru(this,e)}),this.h.attachEmptyPacketListener("face_landmarks",t=>{ru(this,t)}),this.outputFaceBlendshapes&&(go(t,"extra_blendshapes"),ho(n,"FACE_BLENDSHAPES:extra_blendshapes"),this.h.attachProtoListener("extra_blendshapes",(t,e)=>{var r=this.i.faceBlendshapes;this.outputFaceBlendshapes&&(t=To(t),r.push(Ja(t.h()??[]))),ru(this,e)}),this.h.attachEmptyPacketListener("extra_blendshapes",t=>{ru(this,t)})),this.h.attachProtoListener("left_hand_landmarks",(t,e)=>{Rc(t,this.i.leftHandLandmarks),ru(this,e)}),this.h.attachEmptyPacketListener("left_hand_landmarks",t=>{ru(this,t)}),this.h.attachProtoListener("left_hand_world_landmarks",(t,e)=>{var r=this.i.leftHandWorldLandmarks;t=Ro(t),r.push(eh(t)),ru(this,e)}),this.h.attachEmptyPacketListener("left_hand_world_landmarks",t=>{ru(this,t)}),this.h.attachProtoListener("right_hand_landmarks",(t,e)=>{Rc(t,this.i.rightHandLandmarks),ru(this,e)}),this.h.attachEmptyPacketListener("right_hand_landmarks",t=>{ru(this,t)}),this.h.attachProtoListener("right_hand_world_landmarks",(t,e)=>{var r=this.i.rightHandWorldLandmarks;t=Ro(t),r.push(eh(t)),ru(this,e)}),this.h.attachEmptyPacketListener("right_hand_world_landmarks",t=>{ru(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};Ic.prototype.detectForVideo=Ic.prototype.I,Ic.prototype.detect=Ic.prototype.H,Ic.prototype.setOptions=Ic.prototype.A,Ic.createFromModelPath=function(t,e){return tc(Ic,t,{baseOptions:{modelAssetPath:e}})},Ic.createFromModelBuffer=function(t,e){return tc(Ic,t,{baseOptions:{modelAssetBuffer:e}})},Ic.createFromOptions=function(t,e){return tc(Ic,t,e)},Ic.HAND_CONNECTIONS=yc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.HAND_CONNECTIONS",Ic.HAND_CONNECTIONS),Ic.POSE_CONNECTIONS=Sc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.POSE_CONNECTIONS",Ic.POSE_CONNECTIONS),Ic.FACE_LANDMARKS_LIPS=ac,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LIPS",Ic.FACE_LANDMARKS_LIPS),Ic.FACE_LANDMARKS_LEFT_EYE=hc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_EYE",Ic.FACE_LANDMARKS_LEFT_EYE),Ic.FACE_LANDMARKS_LEFT_EYEBROW=uc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_EYEBROW",Ic.FACE_LANDMARKS_LEFT_EYEBROW),Ic.FACE_LANDMARKS_LEFT_IRIS=cc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_IRIS",Ic.FACE_LANDMARKS_LEFT_IRIS),Ic.FACE_LANDMARKS_RIGHT_EYE=lc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_EYE",Ic.FACE_LANDMARKS_RIGHT_EYE),Ic.FACE_LANDMARKS_RIGHT_EYEBROW=dc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW",Ic.FACE_LANDMARKS_RIGHT_EYEBROW),Ic.FACE_LANDMARKS_RIGHT_IRIS=fc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_IRIS",Ic.FACE_LANDMARKS_RIGHT_IRIS),Ic.FACE_LANDMARKS_FACE_OVAL=pc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_FACE_OVAL",Ic.FACE_LANDMARKS_FACE_OVAL),Ic.FACE_LANDMARKS_CONTOURS=mc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_CONTOURS",Ic.FACE_LANDMARKS_CONTOURS),Ic.FACE_LANDMARKS_TESSELATION=gc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_TESSELATION",Ic.FACE_LANDMARKS_TESSELATION);var Fc=class extends sc{constructor(t,e){super(new Qu(t,e),"input_image","norm_rect",!0),this.m={classifications:[]},xr(t=this.i=new Sa,0,1,e=new zo)}D(){return"ImageClassifier"}get baseOptions(){return br(this.i,zo,1)}set baseOptions(t){xr(this.i,0,1,t)}A(t){return xr(this.i,0,2,za(t,br(this.i,Go,2))),this.l(t)}Ha(t,e){return this.m={classifications:[]},rc(this,t,e),this.m}Ia(t,e,r){return this.m={classifications:[]},nc(this,t,r,e),this.m}u(){var t=new vo;mo(t,"input_image"),mo(t,"norm_rect"),go(t,"classifications");var e=new io;ui(e,La,this.i);var r=new uo;Gr(r,2,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),ao(r,"IMAGE:input_image"),ao(r,"NORM_RECT:norm_rect"),ho(r,"CLASSIFICATIONS:classifications"),r.A(e),po(t,r),this.h.attachProtoListener("classifications",(t,e)=>{this.m=Za(Do(t)),ru(this,e)}),this.h.attachEmptyPacketListener("classifications",t=>{ru(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};Fc.prototype.classifyForVideo=Fc.prototype.Ia,Fc.prototype.classify=Fc.prototype.Ha,Fc.prototype.setOptions=Fc.prototype.A,Fc.createFromModelPath=function(t,e){return tc(Fc,t,{baseOptions:{modelAssetPath:e}})},Fc.createFromModelBuffer=function(t,e){return tc(Fc,t,{baseOptions:{modelAssetBuffer:e}})},Fc.createFromOptions=function(t,e){return tc(Fc,t,e)};var Cc=class extends sc{constructor(t,e){super(new Qu(t,e),"image_in","norm_rect",!0),this.i=new xa,this.embeddings={embeddings:[]},xr(t=this.i,0,1,e=new zo)}D(){return"ImageEmbedder"}get baseOptions(){return br(this.i,zo,1)}set baseOptions(t){xr(this.i,0,1,t)}A(t){var e=this.i,r=br(this.i,Ho,2);if(r=r?r.clone():new Ho,void 0!==t.l2Normalize){var n=t.l2Normalize;or(r,1,null==n?n:Zt(n))}else"l2Normalize"in t&&or(r,1);return void 0!==t.quantize?or(r,2,null==(n=t.quantize)?n:Zt(n)):"quantize"in t&&or(r,2),xr(e,0,2,r),this.l(t)}Oa(t,e){return rc(this,t,e),this.embeddings}Pa(t,e,r){return nc(this,t,r,e),this.embeddings}u(){var t=new vo;mo(t,"image_in"),mo(t,"norm_rect"),go(t,"embeddings_out");var e=new io;ui(e,Ra,this.i);var r=new uo;Gr(r,2,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"EMBEDDINGS:embeddings_out"),r.A(e),po(t,r),this.h.attachProtoListener("embeddings_out",(t,e)=>{t=jo(t),this.embeddings=function(t){return{embeddings:Sr(t,Uo,1).map(t=>{var e={headIndex:Nr(t,3)??0??-1,headName:ve(ir(t,4))??""??""};if(ur(t,1,Bo))t=cr(t=Mr(t,Po,1,Bo),1,Jt),e.floatEmbedding=t.slice();else{let r=new Uint8Array(0);e.quantizedEmbedding=Mr(t,$o,2,Bo)?.h()?.i()??r}return e}),timestampMs:qa(ir(t,2,void 0,le)??rr)}}(t),ru(this,e)}),this.h.attachEmptyPacketListener("embeddings_out",t=>{ru(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};Cc.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=nh(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=nh(rh(t.quantizedEmbedding),rh(e.quantizedEmbedding))}return t},Cc.prototype.embedForVideo=Cc.prototype.Pa,Cc.prototype.embed=Cc.prototype.Oa,Cc.prototype.setOptions=Cc.prototype.A,Cc.createFromModelPath=function(t,e){return tc(Cc,t,{baseOptions:{modelAssetPath:e}})},Cc.createFromModelBuffer=function(t,e){return tc(Cc,t,{baseOptions:{modelAssetBuffer:e}})},Cc.createFromOptions=function(t,e){return tc(Cc,t,e)};var Nc=class{constructor(t,e,r){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=r}close(){this.confidenceMasks?.forEach(t=>{t.close()}),this.categoryMask?.close()}};function Oc(t){var e=function(t){return Sr(t,uo,1)}(t.ka()).filter(t=>(ve(ir(t,1))??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));if(t.v=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(br(e[0],io,7)?.u()?.h()??new Map).forEach((e,r)=>{t.v[Number(r)]=ve(ir(e,1))??""})}function Mc(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Dc(t){try{let e=new Nc(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.m)return e;t.m(e)}finally{su(t)}}Nc.prototype.close=Nc.prototype.close;var Pc=class extends sc{constructor(t,e){super(new Qu(t,e),"image_in","norm_rect",!1),this.v=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.i=new Oa,this.C=new Ia,xr(this.i,0,3,this.C),xr(t=this.i,0,1,e=new zo)}D(){return"ImageSegmenter"}get baseOptions(){return br(this.i,zo,1)}set baseOptions(t){xr(this.i,0,1,t)}A(t){return void 0!==t.displayNamesLocale?or(this.i,2,ge(t.displayNamesLocale)):"displayNamesLocale"in t&&or(this.i,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}M(){Oc(this)}segment(t,e,r){var n="function"!=typeof e?e:{};return this.m="function"==typeof e?e:r,Mc(this),rc(this,t,n),Dc(this)}fb(t,e,r,n){var i="function"!=typeof r?r:{};return this.m="function"==typeof r?r:n,Mc(this),nc(this,t,i,e),Dc(this)}Sa(){return this.v}u(){var t=new vo;mo(t,"image_in"),mo(t,"norm_rect");var e=new io;ui(e,Ma,this.i);var r=new uo;Gr(r,2,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),r.A(e),po(t,r),nu(this,t),this.outputConfidenceMasks&&(go(t,"confidence_masks"),ho(r,"CONFIDENCE_MASKS:confidence_masks"),iu(this,"confidence_masks"),this.h.ia("confidence_masks",(t,e)=>{this.confidenceMasks=t.map(t=>ic(this,t,!0,!this.m)),ru(this,e)}),this.h.attachEmptyPacketListener("confidence_masks",t=>{this.confidenceMasks=[],ru(this,t)})),this.outputCategoryMask&&(go(t,"category_mask"),ho(r,"CATEGORY_MASK:category_mask"),iu(this,"category_mask"),this.h.ha("category_mask",(t,e)=>{this.categoryMask=ic(this,t,!1,!this.m),ru(this,e)}),this.h.attachEmptyPacketListener("category_mask",t=>{this.categoryMask=void 0,ru(this,t)})),go(t,"quality_scores"),ho(r,"QUALITY_SCORES:quality_scores"),this.h.attachFloatVectorListener("quality_scores",(t,e)=>{this.qualityScores=t,ru(this,e)}),this.h.attachEmptyPacketListener("quality_scores",t=>{this.categoryMask=void 0,ru(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};Pc.prototype.getLabels=Pc.prototype.Sa,Pc.prototype.segmentForVideo=Pc.prototype.fb,Pc.prototype.segment=Pc.prototype.segment,Pc.prototype.setOptions=Pc.prototype.A,Pc.createFromModelPath=function(t,e){return tc(Pc,t,{baseOptions:{modelAssetPath:e}})},Pc.createFromModelBuffer=function(t,e){return tc(Pc,t,{baseOptions:{modelAssetBuffer:e}})},Pc.createFromOptions=function(t,e){return tc(Pc,t,e)};var $c={0:0,1:1,2:2,3:3};function Uc(){return $h()?void 0:document.createElement("canvas")}var Bc=class extends ou{constructor(t,e){super(new qh(t,e)),this.v=new gu,this.delegate="CPU",this.i=0,this.baseOptions=new zo,this.C=this.m=0}D(){return"InteractiveSegmenter"}get j(){return this.h.j}A(t){return this.delegate=t.baseOptions?.delegate??"CPU",super.l(t)}gb(t){if(0===this.i)throw Error("Segmenter is not initialized.");var e;if(0!==this.m&&(this.j._free(this.m),this.m=0),!(e="undefined"!=typeof ImageData&&t instanceof ImageData))if("object"!=typeof t||null===t)e=!1;else{e=t.data;var r=t.width,n=t.height;e=Number.isInteger(r)&&r>0&&Number.isInteger(n)&&n>0&&(e instanceof Uint8ClampedArray||e instanceof Uint8Array)}if(e)e=t.width,r=t.height,t=t.data;else{if([e,r]=Bh(t),"undefined"!=typeof OffscreenCanvas)n=new OffscreenCanvas(e,r);else{if("undefined"==typeof document)throw Error("Canvas is not supported in this environment.");n=document.createElement("canvas")}if(n.width=e,n.height=r,!(n=n.getContext("2d")))throw Error("Canvas 2D context is not supported in this environment.");n.drawImage(t,0,0),t=n.getImageData(0,0,e,r).data}if(!t)throw Error("Unsupported image source or failed to extract image pixels.");n=function({Xa:t,width:e,height:r}){if(e<=0||r<=0)throw Error(`Invalid image dimensions: ${e}x${r}. Dimensions must be positive.`);if(t%(e*r)!==0)throw Error(`Invalid image dimensions or pixel data length. Pixel data length ${t} is not a multiple of the number of pixels (${e*r}).`);if(4!==(t/=e*r)&&3!==t&&1!==t)throw Error(`Invalid image dimensions or pixel data length. Calculated channels: ${t}. Expected 1, 3, or 4.`);return t}({Xa:t.length,width:e,height:r});var i=this.j._malloc(t.length);if(this.j.HEAPU8.set(t,i),this.m=i,!this.j._interactive_segmenter_set_image(this.i,i,e,r,n))throw Error("Failed to set image on native engine.")}segment(t){if(0===this.i)throw Error("Segmenter is not initialized.");var e=function(t){t=t.map(({isCompleted:t,brushMode:e,point:r})=>{e=$c[e]??0,r=r.map(({x:t,y:e})=>{var r=new Da;return jr(r,1,t),jr(r,2,e),r});var n=new Pa;return Dr(n,t),vr(n,1,ee(e),0),Ir(n,2,r),n});var e=new $a;return Ir(e,1,t),Ua(e)}(t);t=this.j._malloc(e.length),this.j.HEAPU8.set(e,t);var r=this.j._malloc(12),n=r+4,i=r+8,s=0,o=this.C++;try{if(this.o)if("GPU"===this.delegate){var a=this.o;++a.h.U,a.i.set(o,performance.now())}else{var h=this.o;++h.h.R,h.i.set(o,performance.now())}if(0===(s=this.j._interactive_segmenter_segment(this.i,t,e.length,r,n,i)))throw Error("Segmentation failed.");this.o?.Aa(o);let c=this.j.HEAPU32[r/4],l=this.j.HEAPU32[n/4],d=new Float32Array(this.j.HEAPU8.buffer,s,this.j.HEAPU32[i/4]/4);var u=new Float32Array(d);if(a=c*l,(u instanceof Uint8Array||u instanceof Float32Array)&&u.length!==a)throw Error("Unsupported channel count: "+u.length/a);return new xu([u],!0,!1,this.h.j.canvas??void 0,this.v,c,l)}finally{0!==t&&this.j._free(t),0!==r&&this.j._free(r),0!==s&&this.j._free(s)}}u(){0!==this.i&&(this.o?.ya(),this.j._interactive_segmenter_close(this.i),this.i=0),0!==this.m&&(this.j._free(this.m),this.m=0);var t=new Xo;if("GPU"===this.delegate){var e=new Ws;Rr(t,2,Wo,e)}else Pr(e=new ro,1,4),Rr(t,1,Wo,e);if(xr(this.baseOptions,0,3,t),t=Zo(this.baseOptions),e=this.j._malloc(t.length),this.j.HEAPU8.set(t,e),this.i=this.j._interactive_segmenter_create(e,t.length),this.j._free(e),0===this.i)throw Error("Failed to create native InteractiveSegmenter engine.");this.o?.za()}close(){0!==this.i&&(this.j._interactive_segmenter_close(this.i),this.i=0),0!==this.m&&(this.j._free(this.m),this.m=0),this.v.close(),super.close()}};Bc.prototype.close=Bc.prototype.close,Bc.prototype.segment=Bc.prototype.segment,Bc.prototype.setImage=Bc.prototype.gb,Bc.prototype.setOptions=Bc.prototype.A,Bc.createFromModelPath=function(t,e){return Zh(Bc,Uc(),t,{baseOptions:{modelAssetPath:e}})},Bc.createFromModelBuffer=function(t,e){return Zh(Bc,Uc(),t,{baseOptions:{modelAssetBuffer:e}})},Bc.createFromOptions=function(t,e){var r=e.canvas??Uc();return Zh(Bc,r,t,e)};var jc=class{constructor(t,e,r){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=r}close(){this.confidenceMasks?.forEach(t=>{t.close()}),this.categoryMask?.close()}};jc.prototype.close=jc.prototype.close;var Gc=class extends sc{constructor(t,e){super(new Qu(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.i=new Oa,this.v=new Ia,xr(this.i,0,3,this.v),xr(t=this.i,0,1,e=new zo)}D(){return"InteractiveSegmenterLegacy"}get baseOptions(){return br(this.i,zo,1)}set baseOptions(t){xr(this.i,0,1,t)}A(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}segment(t,e,r,n){var i="function"!=typeof r?r:{};if(this.m="function"==typeof r?r:n,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,r=this.J+1,n=new Va,e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var s=new Ba;Dr(s,!0),jr(s,1,e.keypoint.x),jr(s,2,e.keypoint.y),Rr(n,1,Ha,s)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");{let t=new Ga;for(s of e.scribble)Dr(e=new Ba,!0),jr(e,1,s.x),jr(e,2,s.y),Cr(t,1,Ba,e);Rr(n,2,Ha,t)}}this.h.addProtoToStream(n.h(),"mediapipe.tasks.vision.interactive_segmenter_legacy.proto.RegionOfInterest","roi_in",r),rc(this,t,i);t:{try{let t=new jc(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.m){var o=t;break t}this.m(t)}finally{su(this)}o=void 0}return o}u(){var t=new vo;mo(t,"image_in"),mo(t,"roi_in"),mo(t,"norm_rect_in");var e=new io;ui(e,Ma,this.i);var r=new uo;Gr(r,2,"mediapipe.tasks.vision.interactive_segmenter_legacy.InteractiveSegmenterLegacyGraph"),ao(r,"IMAGE:image_in"),ao(r,"ROI:roi_in"),ao(r,"NORM_RECT:norm_rect_in"),r.A(e),po(t,r),nu(this,t),this.outputConfidenceMasks&&(go(t,"confidence_masks"),ho(r,"CONFIDENCE_MASKS:confidence_masks"),iu(this,"confidence_masks"),this.h.ia("confidence_masks",(t,e)=>{this.confidenceMasks=t.map(t=>ic(this,t,!0,!this.m)),ru(this,e)}),this.h.attachEmptyPacketListener("confidence_masks",t=>{this.confidenceMasks=[],ru(this,t)})),this.outputCategoryMask&&(go(t,"category_mask"),ho(r,"CATEGORY_MASK:category_mask"),iu(this,"category_mask"),this.h.ha("category_mask",(t,e)=>{this.categoryMask=ic(this,t,!1,!this.m),ru(this,e)}),this.h.attachEmptyPacketListener("category_mask",t=>{this.categoryMask=void 0,ru(this,t)})),go(t,"quality_scores"),ho(r,"QUALITY_SCORES:quality_scores"),this.h.attachFloatVectorListener("quality_scores",(t,e)=>{this.qualityScores=t,ru(this,e)}),this.h.attachEmptyPacketListener("quality_scores",t=>{this.categoryMask=void 0,ru(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};Gc.prototype.segment=Gc.prototype.segment,Gc.prototype.setOptions=Gc.prototype.A,Gc.createFromModelPath=function(t,e){return tc(Gc,t,{baseOptions:{modelAssetPath:e}})},Gc.createFromModelBuffer=function(t,e){return tc(Gc,t,{baseOptions:{modelAssetBuffer:e}})},Gc.createFromOptions=function(t,e){return tc(Gc,t,e)};var Vc=class extends sc{constructor(t,e){super(new Qu(t,e),"input_frame_gpu","norm_rect",!1),this.m={detections:[]},xr(t=this.i=new Ka,0,1,e=new zo)}D(){return"ObjectDetector"}get baseOptions(){return br(this.i,zo,1)}set baseOptions(t){xr(this.i,0,1,t)}A(t){return void 0!==t.displayNamesLocale?or(this.i,2,ge(t.displayNamesLocale)):"displayNamesLocale"in t&&or(this.i,2),void 0!==t.maxResults?Pr(this.i,3,t.maxResults):"maxResults"in t&&or(this.i,3),void 0!==t.scoreThreshold?Br(this.i,4,t.scoreThreshold):"scoreThreshold"in t&&or(this.i,4),void 0!==t.categoryAllowlist?Vr(this.i,5,t.categoryAllowlist):"categoryAllowlist"in t&&or(this.i,5),void 0!==t.categoryDenylist?Vr(this.i,6,t.categoryDenylist):"categoryDenylist"in t&&or(this.i,6),this.l(t)}H(t,e){return this.m={detections:[]},rc(this,t,e),this.m}I(t,e,r){return this.m={detections:[]},nc(this,t,r,e),this.m}u(){var t=new vo;mo(t,"input_frame_gpu"),mo(t,"norm_rect"),go(t,"detections");var e=new io;ui(e,Xa,this.i);var r=new uo;Gr(r,2,"mediapipe.tasks.vision.ObjectDetectorGraph"),ao(r,"IMAGE:input_frame_gpu"),ao(r,"NORM_RECT:norm_rect"),ho(r,"DETECTIONS:detections"),r.A(e),po(t,r),this.h.attachProtoVectorListener("detections",(t,e)=>{for(let e of t)t=Lo(e),this.m.detections.push(Qa(t));ru(this,e)}),this.h.attachEmptyPacketListener("detections",t=>{ru(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};Vc.prototype.detectForVideo=Vc.prototype.I,Vc.prototype.detect=Vc.prototype.H,Vc.prototype.setOptions=Vc.prototype.A,Vc.createFromModelPath=async function(t,e){return tc(Vc,t,{baseOptions:{modelAssetPath:e}})},Vc.createFromModelBuffer=function(t,e){return tc(Vc,t,{baseOptions:{modelAssetBuffer:e}})},Vc.createFromOptions=function(t,e){return tc(Vc,t,e)};var Hc=class{constructor(t,e,r){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=r}close(){this.segmentationMasks?.forEach(t=>{t.close()})}};function Kc(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Xc(t){try{let e=new Hc(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.v)return e;t.v(e)}finally{su(t)}}Hc.prototype.close=Hc.prototype.close;var Wc=class extends sc{constructor(t,e){super(new Qu(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,xr(t=this.i=new Wa,0,1,e=new zo),this.C=new wa,xr(this.i,0,3,this.C),this.m=new Aa,xr(this.i,0,2,this.m),Pr(this.m,4,1),Br(this.m,2,.5),Br(this.C,2,.5),Br(this.i,4,.5)}D(){return"PoseLandmarker"}get baseOptions(){return br(this.i,zo,1)}set baseOptions(t){xr(this.i,0,1,t)}A(t){return"numPoses"in t&&Pr(this.m,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&Br(this.m,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&Br(this.i,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&Br(this.C,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.l(t)}H(t,e,r){var n="function"!=typeof e?e:{};return this.v="function"==typeof e?e:r,Kc(this),rc(this,t,n),Xc(this)}I(t,e,r,n){var i="function"!=typeof r?r:{};return this.v="function"==typeof r?r:n,Kc(this),nc(this,t,i,e),Xc(this)}u(){var t=new vo;mo(t,"image_in"),mo(t,"norm_rect"),go(t,"normalized_landmarks"),go(t,"world_landmarks"),go(t,"segmentation_masks");var e=new io;ui(e,Ya,this.i);var r=new uo;Gr(r,2,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),ao(r,"IMAGE:image_in"),ao(r,"NORM_RECT:norm_rect"),ho(r,"NORM_LANDMARKS:normalized_landmarks"),ho(r,"WORLD_LANDMARKS:world_landmarks"),r.A(e),po(t,r),nu(this,t),this.h.attachProtoVectorListener("normalized_landmarks",(t,e)=>{this.landmarks=[];for(let e of t)t=Fo(e),this.landmarks.push(th(t));ru(this,e)}),this.h.attachEmptyPacketListener("normalized_landmarks",t=>{this.landmarks=[],ru(this,t)}),this.h.attachProtoVectorListener("world_landmarks",(t,e)=>{this.worldLandmarks=[];for(let e of t)t=Ro(e),this.worldLandmarks.push(eh(t));ru(this,e)}),this.h.attachEmptyPacketListener("world_landmarks",t=>{this.worldLandmarks=[],ru(this,t)}),this.outputSegmentationMasks&&(ho(r,"SEGMENTATION_MASK:segmentation_masks"),iu(this,"segmentation_masks"),this.h.ia("segmentation_masks",(t,e)=>{this.segmentationMasks=t.map(t=>ic(this,t,!0,!this.v)),ru(this,e)}),this.h.attachEmptyPacketListener("segmentation_masks",t=>{this.segmentationMasks=[],ru(this,t)})),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};Wc.prototype.detectForVideo=Wc.prototype.I,Wc.prototype.detect=Wc.prototype.H,Wc.prototype.setOptions=Wc.prototype.A,Wc.createFromModelPath=function(t,e){return tc(Wc,t,{baseOptions:{modelAssetPath:e}})},Wc.createFromModelBuffer=function(t,e){return tc(Wc,t,{baseOptions:{modelAssetBuffer:e}})},Wc.createFromOptions=function(t,e){return tc(Wc,t,e)},Wc.POSE_CONNECTIONS=Sc,r("module$exports$google3$third_party$mediapipe$tasks$web$vision$pose_landmarker$pose_landmarker.PoseLandmarker.POSE_CONNECTIONS",Wc.POSE_CONNECTIONS);export{Uu as DrawingUtils,oc as FaceDetector,_c as FaceLandmarker,hh as FilesetResolver,Tc as GestureRecognizer,kc as HandLandmarker,Ic as HolisticLandmarker,Fc as ImageClassifier,Cc as ImageEmbedder,Pc as ImageSegmenter,Nc as ImageSegmenterResult,Bc as InteractiveSegmenter,Gc as InteractiveSegmenterLegacy,jc as InteractiveSegmenterLegacyResult,Yu as MPImage,xu as MPMask,Vc as ObjectDetector,Wc as PoseLandmarker,ou as TaskRunner,sc as VisionTaskRunner};
1
+ var t="undefined"!=typeof self?self:{};function e(e,r){e=e.split(".");for(var n,i=t;e.length&&(n=e.shift());)e.length||void 0===r?i=i[n]&&i[n]!==Object.prototype[n]?i[n]:i[n]={}:i[n]=r}function r(){throw Error("Invalid UTF8")}function n(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}var i,s,o=void 0,a="undefined"!=typeof TextDecoder,h="undefined"!=typeof TextEncoder;function u(t){if(h)t=(s||=new TextEncoder).encode(t);else{let r=0,n=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(e<128)n[r++]=e;else{if(e<2048)n[r++]=e>>6|192;else{if(e>=55296&&e<=57343){if(e<=56319&&i<t.length){let s=t.charCodeAt(++i);if(s>=56320&&s<=57343){e=1024*(e-55296)+s-56320+65536,n[r++]=e>>18|240,n[r++]=e>>12&63|128,n[r++]=e>>6&63|128,n[r++]=63&e|128;continue}i--}e=65533}n[r++]=e>>12|224,n[r++]=e>>6&63|128}n[r++]=63&e|128}}t=r===n.length?n:n.subarray(0,r)}return t}function c(e){t.setTimeout(()=>{throw e},0)}function l(){var e=t.navigator;return e&&(e=e.userAgent)?e:""}function d(t){return d[" "](t),t}d[" "]=function(){};var f={},p=null;function m(t){var e=t.length,r=3*e/4;r%3?r=Math.floor(r):-1!="=.".indexOf(t[e-1])&&(r=-1!="=.".indexOf(t[e-2])?r-2:r-1);var n=new Uint8Array(r),i=0;return function(t,e){function r(e){for(;n<t.length;){let e=t.charAt(n++),r=p[e];if(null!=r)return r;if(!/^[\s\xa0]*$/.test(e))throw Error("Unknown base64 encoding at char: "+e)}return e}g();for(var n=0;;){let t=r(-1),n=r(0),i=r(64),s=r(64);if(64===s&&-1===t)break;e(t<<2|n>>4),64!=i&&(e(n<<4&240|i>>2),64!=s&&e(i<<6&192|s))}}(t,function(t){n[i++]=t}),i!==r?n.subarray(0,i):n}function g(){if(!p){p={};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"];for(let r=0;r<5;r++){let n=t.concat(e[r].split(""));f[r]=n;for(let t=0;t<n.length;t++){let e=n[t];void 0===p[e]&&(p[e]=t)}}}}var v="undefined"!=typeof Uint8Array,_=!(-1!=l().indexOf("Trident")||-1!=l().indexOf("MSIE"))&&"function"==typeof btoa,y=/[-_.]/g,E={"-":"+",_:"/",".":"="};function A(t){return E[t]||""}function w(t){if(!_)return m(t);t=y.test(t)?t.replace(y,A):t,t=atob(t);var e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}function T(t){return v&&null!=t&&t instanceof Uint8Array}var b={};function k(){return L||=new x(null,b)}function S(t){R(b);var e=t.h;return null==(e=null==e||T(e)?e:"string"==typeof e?w(e):null)?e:t.h=e}var L,x=class{i(){return new Uint8Array(S(this)||0)}constructor(t,e){if(R(e),this.h=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}};function R(t){if(t!==b)throw Error("illegal external caller")}function I(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}var F,C,N=void 0;function O(t){return I(t=Error(t),"warning"),t}function M(t,e){if(null!=t){var r=N??={},n=r[t]||0;n>=e||(r[t]=n+1,I(t=Error(),"incident"),c(t))}}t:{for(var D=["CLOSURE_FLAGS"],P=t,$=0;$<D.length;$++)if(null==(P=P[D[$]])){C=null;break t}C=P}var U=C&&C[748402147];function B(){return"function"==typeof BigInt}F=null==U||U;var j="function"==typeof Symbol&&"symbol"==typeof Symbol();function G(t,e,r=!1){return"function"==typeof Symbol&&"symbol"==typeof Symbol()?r&&Symbol.for&&t?Symbol.for(t):null!=t?Symbol(t):Symbol():e}var V,H=G("jas",void 0,!0),K=G(void 0,"0di"),X=G(void 0,"1oa"),W=G(void 0,Symbol()),Y=G(void 0,"0ub"),z=G(void 0,"0ubs"),q=G(void 0,"0ubsb"),J=G(void 0,"0actk"),Z=G("m_m","lb",!0),Q=G(),tt={Wa:{value:0,configurable:!0,writable:!0,enumerable:!1}},et=Object.defineProperties,rt=j?H:"Wa",nt=[];function it(t,e){j||rt in t||et(t,tt),t[rt]|=e}function st(t,e){j||rt in t||et(t,tt),t[rt]=e}function ot(t){return it(t,34),t}function at(t){return it(t,8192),t}function ht(t,e){return 2&e&&(t|=2),1|t}st(nt,7),V=Object.freeze(nt);var ut={};function ct(t){return null!=t&&t[Z]===ut}function lt(t,e){return void 0===e?t.i!==dt&&!!(2&t.B[rt]):!!(2&e)&&t.i!==dt}var dt={};function ft(t,e){if(null!=t)if("string"==typeof t)t=t?new x(t,b):k();else if(!(t instanceof x))if(T(t))t=t.length?new x(new Uint8Array(t),b):k();else{if(!e)throw Error();t=void 0}return t}class pt{constructor(t,e,r){this.h=t,this.i=e,this.l=r}next(){var t=this.h.next();return t.done||(t.value=this.i.call(this.l,t.value)),t}[Symbol.iterator](){return this}}function mt(t,e,r){var n,i=128&e?0:-1,s=t.length;(n=!!s)&&(n=null!=(n=t[s-1])&&"object"==typeof n&&n.constructor===Object);var o=s+(n?-1:0);for(e=128&e?1:0;e<o;e++)r(e-i,t[e]);if(n){t=t[s-1];for(let e in t)!isNaN(e)&&r(+e,t[e])}}Object.freeze({});var gt={};function vt(t){return 128&t?gt:void 0}function _t(t){return t.jb=!0,t}var yt=_t(t=>"number"==typeof t),Et=_t(t=>"string"==typeof t),At=_t(t=>"boolean"==typeof t),wt="function"==typeof t.BigInt&&"bigint"==typeof t.BigInt(0);function Tt(t){var e=t;if(Et(e)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e))throw Error(String(e))}else if(yt(e)&&!Number.isSafeInteger(e))throw Error(String(e));return wt?BigInt(t):t=At(t)?t?"1":"0":Et(t)?t.trim()||"0":String(t)}var bt=_t(t=>wt?t>=St&&t<=xt:"-"===t[0]?Rt(t,kt):Rt(t,Lt)),kt=Number.MIN_SAFE_INTEGER.toString(),St=wt?BigInt(Number.MIN_SAFE_INTEGER):void 0,Lt=Number.MAX_SAFE_INTEGER.toString(),xt=wt?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Rt(t,e){if(t.length>e.length)return!1;if(t.length<e.length||t===e)return!0;for(let r=0;r<t.length;r++){let n=t[r],i=e[r];if(n>i)return!1;if(n<i)return!0}}var It,Ft="function"==typeof Uint8Array.prototype.slice,Ct=0,Nt=0;function Ot(t){var e=t>>>0;Ct=e,Nt=(t-e)/4294967296>>>0}function Mt(t){if(t<0){Ot(-t);let[e,r]=Ht(Ct,Nt);Ct=e>>>0,Nt=r>>>0}else Ot(t)}function Dt(t){var e=It||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),Nt=0,Ct=e.getUint32(0,!0)}function Pt(t,e){var r=4294967296*e+(t>>>0);return Number.isSafeInteger(r)?r:Bt(t,e)}function $t(t,e){return Tt(B()?BigInt.asUintN(64,(BigInt(e>>>0)<<BigInt(32))+BigInt(t>>>0)):Bt(t,e))}function Ut(t,e){return B()?Tt(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(e))<<BigInt(32))+BigInt.asUintN(32,BigInt(t)))):Tt(Gt(t,e))}function Bt(t,e){if(t>>>=0,(e>>>=0)<=2097151)var r=""+(4294967296*e+t);else B()?r=""+(BigInt(e)<<BigInt(32)|BigInt(t)):(t=(16777215&t)+6777216*(r=16777215&(t>>>24|e<<8))+6710656*(e=e>>16&65535),r+=8147497*e,e*=2,t>=1e7&&(r+=t/1e7>>>0,t%=1e7),r>=1e7&&(e+=r/1e7>>>0,r%=1e7),r=e+jt(r)+jt(t));return r}function jt(t){return t=String(t),"0000000".slice(t.length)+t}function Gt(t,e){if(2147483648&e)if(B())t=""+(BigInt(0|e)<<BigInt(32)|BigInt(t>>>0));else{let[r,n]=Ht(t,e);t="-"+Bt(r,n)}else t=Bt(t,e);return t}function Vt(t){if(t.length<16)Mt(Number(t));else if(B())t=BigInt(t),Ct=Number(t&BigInt(4294967295))>>>0,Nt=Number(t>>BigInt(32)&BigInt(4294967295));else{let e=+("-"===t[0]);Nt=Ct=0;let r=t.length;for(let n=e,i=(r-e)%6+e;i<=r;n=i,i+=6){let e=Number(t.slice(n,i));Nt*=1e6,(Ct=1e6*Ct+e)>=4294967296&&(Nt+=Math.trunc(Ct/4294967296),Nt>>>=0,Ct>>>=0)}if(e){let[t,e]=Ht(Ct,Nt);Ct=t,Nt=e}}}function Ht(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function Kt(t){return Array.prototype.slice.call(t)}var Xt="function"==typeof BigInt?BigInt.asIntN:void 0,Wt="function"==typeof BigInt?BigInt.asUintN:void 0,Yt=Number.isSafeInteger,zt=Number.isFinite,qt=Math.trunc,Jt=Tt(0);function Zt(t){if("number"!=typeof t)throw Error(`Value of float/double field must be a number, found ${typeof t}: ${t}`);return t}function Qt(t){return null==t||"number"==typeof t?t:"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function te(t){if("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}var ee=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function re(t){switch(typeof t){case"bigint":return!0;case"number":return zt(t);case"string":return ee.test(t);default:return!1}}function ne(t){if(null!=t){if(!zt(t))throw O("enum");t|=0}return t}function ie(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return zt(t)?0|t:void 0}function se(t){if(null==t)return t;if("string"==typeof t&&t)t=+t;else if("number"!=typeof t)return;return zt(t)?t>>>0:void 0}function oe(t,e){if(e??=1024,!re(t))throw O("int64");var r=typeof t;switch(e){case 512:switch(r){case"string":return le(t);case"bigint":return String(Xt(64,t));default:return ce(t)}case 1024:switch(r){case"string":return de(t);case"bigint":return Tt(Xt(64,t));default:return Tt(Yt(t)?t:ce(t))}case 0:switch(r){case"string":return le(t);case"bigint":return Tt(Xt(64,t));default:return ue(t)}default:return function(t,e=`unexpected value ${t}!`){throw Error(e)}(e,"Unknown format requested type for int64")}}function ae(t){var e=t.length;return("-"===t[0]?e<20||20===e&&t<="-9223372036854775808":e<19||19===e&&t<="9223372036854775807")?t:(Vt(t),Gt(Ct,Nt))}function he(t){if("-"===t[0])var e=!1;else e=(e=t.length)<20||20===e&&t<="18446744073709551615";return e?t:(Vt(t),Bt(Ct,Nt))}function ue(t){if(t=qt(t),!Yt(t)){Mt(t);var e=Ct,r=Nt;(t=2147483648&r)&&(r=~r>>>0,0==(e=1+~e>>>0)&&(r=r+1>>>0)),t="number"==typeof(e=Pt(e,r))?t?-e:e:t?"-"+e:e}return t}function ce(t){return t=qt(t),Yt(t)?t=String(t):(Mt(t),t=Gt(Ct,Nt)),t}function le(t){var e=qt(Number(t));return Yt(e)?String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),ae(t))}function de(t){var e=qt(Number(t));return Yt(e)?Tt(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),B()?Tt(Xt(64,BigInt(t))):Tt(ae(t)))}function fe(t){var e=typeof t;return null==t?t:"bigint"===e?Tt(Xt(64,t)):re(t)?"string"===e?de(t):Tt(Yt(t)?t:ce(t)):void 0}function pe(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Xt(64,t));if(re(t)){if("string"===e)return le(t);if("number"===e)return ue(t)}}function me(t){if(null==t)return t;var e=typeof t;if("bigint"===e)return String(Wt(64,t));if(re(t)){if("string"===e)return e=qt(Number(t)),Yt(e)&&e>=0?t=String(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),t=he(t)),t;if("number"===e)return function(t){return(t=qt(t))>=0&&Yt(t)||(Mt(t),t=Pt(Ct,Nt)),t}(t)}}function ge(t){if(null==t||"string"==typeof t||t instanceof x)return t}function ve(t){if("string"!=typeof t)throw Error();return t}function _e(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function ye(t){return null==t||"string"==typeof t?t:void 0}function Ee(t,e,r,n){return ct(t)?t:Array.isArray(t)?((n=(r=0|t[rt])|32&n|2&n)!==r&&st(t,n),new e(t)):(r?2&n?((t=e[K])||(ot((t=new e).B),t=e[K]=t),e=t):e=new e:e=void 0,e)}function Ae(t,e,r){return e?oe(t,1024):fe(t)??(r?Jt:void 0)}function we(t){return t}var Te={},be=function(){try{return d(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class ke{constructor(){this.h=new Map}get(t){return this.h.get(t)}set(t,e){return this.h.set(t,e),this.size=this.h.size,this}delete(t){return t=this.h.delete(t),this.size=this.h.size,t}clear(){this.h.clear(),this.size=this.h.size}has(t){return this.h.has(t)}entries(){return this.h.entries()}keys(){return this.h.keys()}values(){return this.h.values()}forEach(t,e){return this.h.forEach(t,e)}[Symbol.iterator](){return this.entries()}}var Se=be?(Object.setPrototypeOf(ke.prototype,Map.prototype),Object.defineProperties(ke.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),ke):class extends Map{constructor(){super()}};function Le(t){return t}function xe(t){if(2&t.N)throw Error("Cannot mutate an immutable Map")}var Re,Ie=class extends Se{constructor(t,e,r=Le,n=Le){super(),this.N=0|t[rt],this.O=e,this.ca=r,this.oa=this.O?Fe:n;for(let i=0;i<t.length;i++){let s=t[i],o=r(s[0],!1,!0),a=s[1];e?void 0===a&&(a=null):a=n(s[1],!1,!0,void 0,void 0,this.N),super.set(o,a)}}fa(t){return at(Array.from(super.entries(),t))}clear(){xe(this),super.clear()}delete(t){return xe(this),super.delete(this.ca(t,!0,!1))}entries(){if(this.O){var t=super.keys();t=new pt(t,Ce,this)}else t=super.entries();return t}values(){if(this.O){var t=super.keys();t=new pt(t,Ie.prototype.get,this)}else t=super.values();return t}forEach(t,e){this.O?super.forEach((r,n,i)=>{t.call(e,i.get(n),n,i)}):super.forEach(t,e)}set(t,e){return xe(this),null==(t=this.ca(t,!0,!1))?this:null==e?(super.delete(t),this):super.set(t,this.oa(e,!0,!0,this.O,!1,this.N))}hb(t){var e=this.ca(t[0],!1,!0);t=t[1],t=this.O?void 0===t?null:t:this.oa(t,!1,!0,void 0,!1,this.N),super.set(e,t)}has(t){return super.has(this.ca(t,!1,!1))}get(t){t=this.ca(t,!1,!1);var e=super.get(t);if(void 0!==e){var r=this.O;return r?((r=this.oa(e,!1,!0,r,this.Ga,this.N))!==e&&super.set(t,r),r):e}}[Symbol.iterator](){return this.entries()}};function Fe(t,e,r,n,i,s){return t=Ee(t,n,r,s),i&&(t=Qe(t)),t}function Ce(t){return[t,this.get(t)]}function Ne(){return Re||=new Ie(ot([]),void 0,void 0,void 0,Te)}function Oe(t){return W?t[W]:void 0}function Me(t,e){for(let r in t)!isNaN(r)&&e(t,+r,t[r])}Ie.prototype.toJSON=void 0;var De,Pe,$e,Ue=class{},Be={eb:!0};function je(t,e){e<100||M(z,1)}function Ge(t,e,r,n){var i=void 0!==n;n=!!n;var s,o=W;!i&&j&&o&&(s=t[o])&&Me(s,je),o=[];var a=t.length;s=4294967295;var h=!1,u=!!(64&e),c=u?128&e?0:-1:void 0;if(!(1&e)){var l=a&&t[a-1];null!=l&&"object"==typeof l&&l.constructor===Object?s=--a:l=void 0,!u||128&e||i||(h=!0,s=(De??we)(s-c,c,t,l,void 0)+c)}e=void 0;for(var d=0;d<a;d++){let i=t[d];if(null!=i&&null!=(i=r(i,n)))if(u&&d>=s){let t=d-c;(e??={})[t]=i}else o[d]=i}if(l)for(let t in l){if(null==(a=l[t])||null==(a=r(a,n)))continue;let i;d=+t,u&&!Number.isNaN(d)&&(i=d+c)<s?o[i]=a:(e??={})[t]=a}return e&&(h?o.push(e):o[s]=e),i&&W&&(t=Oe(t))&&t instanceof Ue&&(o[W]=function(t){var e=new Ue;return Me(t,(t,r,n)=>{e[r]=Kt(n)}),e.la=t.la,e}(t)),o}function Ve(t){return t[0]=He(t[0]),t[1]=He(t[1]),t}function He(t){switch(typeof t){case"number":return Number.isFinite(t)?t:""+t;case"bigint":return bt(t)?Number(t):""+t;case"boolean":return t?1:0;case"object":if(Array.isArray(t)){var e=0|t[rt];return 0===t.length&&1&e?void 0:Ge(t,e,He)}if(ct(t))return Ke(t);if(t instanceof x){if(null==(e=t.h))t="";else if("string"==typeof e)t=e;else{if(_){for(var r="",n=0,i=e.length-10240;n<i;)r+=String.fromCharCode.apply(null,e.subarray(n,n+=10240));r+=String.fromCharCode.apply(null,n?e.subarray(n):e),e=btoa(r)}else{void 0===r&&(r=0),g(),r=f[r],n=Array(Math.floor(e.length/3)),i=r[64]||"";let t=0,u=0;for(;t<e.length-2;t+=3){var s=e[t],o=e[t+1],a=e[t+2],h=r[s>>2];s=r[(3&s)<<4|o>>4],o=r[(15&o)<<2|a>>6],a=r[63&a],n[u++]=h+s+o+a}switch(h=0,a=i,e.length-t){case 2:a=r[(15&(h=e[t+1]))<<2]||i;case 1:e=e[t],n[u]=r[e>>2]+r[(3&e)<<4|h>>4]+a+i}e=n.join("")}t=t.h=e}return t}return t instanceof Ie?t=0!==t.size?t.fa(Ve):void 0:void 0}return t}function Ke(t){return Ge(t=t.B,0|t[rt],He)}function Xe(t,e){return We(t,e[0],e[1])}function We(t,e,r,n=0){if(null==t){var i=32;r?(t=[r],i|=128):t=[],e&&(i=-16760833&i|(1023&e)<<14)}else{if(!Array.isArray(t))throw Error("narr");if(i=0|t[rt],F&&1&i)throw Error("rfarr");if(2048&i&&!(2&i)&&function(){if(F)throw Error("carr");M(J,5)}(),256&i)throw Error("farr");if(64&i)return(i|n)!==i&&st(t,i|n),t;if(r&&(i|=128,r!==t[0]))throw Error("mid");t:{i|=64;var s=(r=t).length;if(s){var o=s-1;let t=r[o];if(null!=t&&"object"==typeof t&&t.constructor===Object){if((o-=e=128&i?0:-1)>=1024)throw Error("pvtlmt");for(var a in t)(s=+a)<o&&(r[s+e]=t[a],delete t[a]);i=-16760833&i|(1023&o)<<14;break t}}if(e){if((a=Math.max(e,s-(128&i?0:-1)))>1024)throw Error("spvt");i=-16760833&i|(1023&a)<<14}}}return st(t,64|i|n),t}function Ye(t,e){if("object"!=typeof t)return t;if(Array.isArray(t)){var r=0|t[rt];return 0===t.length&&1&r?void 0:ze(t,r,e)}if(ct(t))return Je(t);if(t instanceof Ie){if(2&(e=t.N))return t;if(!t.size)return;if(r=ot(t.fa()),t.O)for(t=0;t<r.length;t++){let n=r[t],i=n[1];i=null==i||"object"!=typeof i?void 0:ct(i)?Je(i):Array.isArray(i)?ze(i,0|i[rt],!!(32&e)):void 0,n[1]=i}return r}return t instanceof x?t:void 0}function ze(t,e,r){return 2&e||(!r||4096&e||16&e?t=Ze(t,e,!1,r&&!(16&e)):(it(t,34),4&e&&Object.freeze(t))),t}function qe(t,e,r){return t=new t.constructor(e),r&&(t.i=dt),t.o=dt,t}function Je(t){var e=t.B,r=0|e[rt];return lt(t,r)?t:nr(t,e,r)?qe(t,e):Ze(e,r)}function Ze(t,e,r,n){return n??=!!(34&e),t=Ge(t,e,Ye,n),n=32,r&&(n|=2),st(t,e=16769217&e|n),t}function Qe(t){var e=t.B,r=0|e[rt];return lt(t,r)?nr(t,e,r)?qe(t,e,!0):new t.constructor(Ze(e,r,!1)):t}function tr(t){if(t.i!==dt)return!1;var e=t.B;return it(e=Ze(e,0|e[rt]),2048),t.B=e,t.i=void 0,t.o=void 0,!0}function er(t){if(!tr(t)&&lt(t,0|t.B[rt]))throw Error()}function rr(t,e){void 0===e&&(e=0|t[rt]),32&e&&!(4096&e)&&st(t,4096|e)}function nr(t,e,r){return!!(2&r)||!(!(32&r)||4096&r)&&(st(e,2|r),t.i=dt,!0)}var ir=Tt(0),sr={};function or(t,e,r,n){if(null!==(e=ar(t.B,e,void 0,n))||r&&t.o!==dt)return e}function ar(t,e,r,n){if(-1===e)return null;var i=e+(r?0:-1),s=t.length-1;if(!(s<1+(r?0:-1))){if(i>=s){var o=t[s];if(null!=o&&"object"==typeof o&&o.constructor===Object){r=o[e];var a=!0}else{if(i!==s)return;r=o}}else r=t[i];if(n&&null!=r){if(null==(n=n(r)))return n;if(!Object.is(n,r))return a?o[e]=n:t[i]=n,n}return r}}function hr(t,e,r,n){er(t);var i=t.B;return ur(i,0|i[rt],e,r,n),t}function ur(t,e,r,n,i){var s=r+(i?0:-1),o=t.length-1;if(o>=1+(i?0:-1)&&s>=o){let i=t[o];if(null!=i&&"object"==typeof i&&i.constructor===Object)return i[r]=n,e}return s<=o?(t[s]=n,e):(void 0!==n&&(r>=(o=(e??=0|t[rt])>>14&1023||536870912)?null!=n&&(t[o+(i?0:-1)]={[r]:n}):t[s]=n),e)}function cr(t,e){return ct(t=ar(t.B,e))||Array.isArray(t)}function lr(t,e,r){return cr(t,e=Er(t,r)===e?e:-1)}function dr(t,e,r,n,i){var s=t.B,o=0|s[rt];n=n&&4!==n?1!==n&&(t?lt(t,o):2&o)?1:n:4,i=!!i||3===n,2===n&&tr(t)&&(o=0|(s=t.B)[rt]);var a=(t=pr(s,e))===V?7:0|t[rt],h=ht(a,o),u=!(4&h);if(u){let e=0,n=0;for(;e<t.length;e++){let i=r(t[e]);null!=i&&(t[n++]=i)}n<e&&(t.length=n),r=-513&h|4,h=r&=-1025,h&=-4097}return h!==a&&(st(t,h),2&h&&Object.freeze(t)),fr(t,h,s,o,e,n,u,i)}function fr(t,e,r,n,i,s,o,a){var h=e,u=mr(e);return u&&2===s&&(t=Kt(t),h=0,e=Cr(e,n),n=ur(r,n,i,t),u=!1),u||(1===s||4===s&&(2&e||!(16&e)&&32&n)?((e|=!t.length||o&&!(4096&e)||32&n&&!(4096&e||16&e)?2:256)!==h&&st(t,e),Object.freeze(t)):(a||(e|=16),e!==h&&st(t,e))),2&e||!(4096&e||16&e)||rr(r,n),t}function pr(t,e,r){return t=ar(t,e,r),Array.isArray(t)?t:V}function mr(t){return!!(2&t)&&!!(4&t)||!!(256&t)}function gr(t){return ft(t,!0)}function vr(t){t=Kt(t);for(let e=0;e<t.length;e++){let r=t[e]=Kt(t[e]);Array.isArray(r[1])&&(r[1]=ot(r[1]))}return at(t)}function _r(t,e,r,n){er(t),ur(t=t.B,0|t[rt],e,("0"===n?0===Number(r):r===n)?void 0:r)}function yr(t,e,r){if(2&e)throw Error();var n=vt(e),i=pr(t,r,n),s=i===V?7:0|i[rt],o=ht(s,e);return(2&o||mr(o)||16&o)&&(o===s||mr(o)||st(i,o),i=Kt(i),s=0,o=Cr(o,e),ur(t,e,r,i,n)),(o&=-13)!==s&&st(i,o),i}function Er(t,e){return Tr(Ar(t=t.B),t,void 0,e)}function Ar(t){if(j)return t[X]??(t[X]=new Map);if(X in t)return t[X];var e=new Map;return Object.defineProperty(t,X,{value:e}),e}function wr(t,e,r,n,i){var s=Ar(t),o=Tr(s,t,e,r,i);return o!==n&&(o&&(e=ur(t,e,o,void 0,i)),s.set(r,n)),e}function Tr(t,e,r,n,i){var s=t.get(n);if(null!=s)return s;s=0;for(let t=0;t<n.length;t++){let o=n[t];null!=ar(e,o,i)&&(0!==s&&(r=ur(e,r,s,void 0,i)),s=o)}return t.set(n,s),s}function br(t,e,r){var n=0|t[rt],i=vt(n),s=ar(t,r,i);if(ct(s)){if(!lt(s))return tr(s),s.B;var o=s.B}else Array.isArray(s)&&(o=s,2&n&&ot(o));if(o){let t=0|o[rt];2&t&&(o=Ze(o,t))}return(o=Xe(o,e))!==s&&ur(t,n,r,o,i),o}function kr(t,e,r,n){var i=t.B,s=0|i[rt];if(e=function(t,e,r,n,i){var s=!1;if(null!=(n=ar(t,n,i,t=>{var n=Ee(t,r,!1,e);return s=n!==t&&null!=n,n})))return s&&!lt(n)&&rr(t,e),n}(i,s,e,r,n),null==e)return e;if(!lt(t,s=0|i[rt])){let o=Qe(e);o!==e&&(tr(t)&&(s=0|(i=t.B)[rt]),rr(i,s=ur(i,s,r,e=o,n)))}return e}function Sr(t,e,r,n,i,s,o,a){s=s&&4!==s?1!==s&&(t?lt(t,r):2&r)?1:s:4,o=!!o||3===s;var h=!!a&&!(t?lt(t,r):2&r);(2===s||h)&&t&&tr(t)&&(r=0|(e=t.B)[rt]);var u=(t=pr(e,i))===V?7:0|t[rt],c=ht(u,r);if(a=!(4&c)){var l=t,d=r;let e=!!(2&c);e&&(d|=2);let i=!e,s=!0,o=0,a=0;for(;o<l.length;o++){let t=Ee(l[o],n,!1,d);if(t instanceof n){if(!e){let e=lt(t);i&&=!e,s&&=e}l[a++]=t}}a<o&&(l.length=a),c|=4,c=s?-4097&c:4096|c,c=i?8|c:-9&c}if(c!==u&&(st(t,c),2&c&&Object.freeze(t)),h&&!(8&c||!t.length&&(1===s||4===s&&(2&c||!(16&c)&&32&r)))){for(mr(c)&&(t=Kt(t),c=Cr(c,r),r=ur(e,r,i,t)),n=t,h=c,u=0;u<n.length;u++)(l=n[u])!==(c=Qe(l))&&(n[u]=c);h|=8,st(t,c=h=n.length?4096|h:-4097&h)}return fr(t,c,e,r,i,s,a,o)}function Lr(t,e,r){var n=t.B;return Sr(t,n,0|n[rt],e,r,void 0,!1,!0)}function xr(t){return null==t&&(t=void 0),t}function Rr(t,e,r,n,i){return hr(t,r,n=xr(n),i),n&&!lt(n)&&rr(t.B),t}function Ir(t,e,r,n){t:{var i=n=xr(n);er(t);let s=t.B,o=0|s[rt];if(null==i){let t=Ar(s);if(Tr(t,s,o,r)!==e)break t;t.set(r,0)}else o=wr(s,o,r,e);ur(s,o,e,i)}return n&&!lt(n)&&rr(t.B),t}function Fr(t,e,r){er(t);var n=t.B,i=0|n[rt];if(null==r)ur(n,i,e);else{var s=r===V?7:0|r[rt],o=s,a=mr(s),h=a||Object.isFrozen(r),u=!0,c=!0;for(let t=0;t<r.length;t++){var l=r[t];a||(l=lt(l),u&&=!l,c&&=l)}a||(s=u?13:5,s=c?-4097&s:4096|s),h&&s===o||(r=Kt(r),o=0,s=Cr(s,i)),s!==o&&st(r,s),i=ur(n,i,e,r),2&s||!(4096&s||16&s)||rr(n,i)}return t}function Cr(t,e){return-273&(2&e?2|t:-3&t)}function Nr(t,e,r,n){er(t);var i=t.B;t=Sr(t,i,0|i[rt],r,e,2,!0),n=null!=n?n:new r,t.push(n),e=r=t===V?7:0|t[rt],(n=lt(n))?(r&=-9,1===t.length&&(r&=-4097)):r|=4096,r!==e&&st(t,r),n||rr(i)}function Or(t,e,r){return ie(or(t,e,r))}function Mr(t,e){return or(t,e,void 0,Qt)??0}function Dr(t,e,r,n){return kr(t,e,r=Er(t,n)===r?r:-1,void 0)}function Pr(t,e){_r(t,3,null==e?e:te(e),!1)}function $r(t,e,r){if(null!=r){if("number"!=typeof r)throw O("int32");if(!zt(r))throw O("int32");r|=0}hr(t,e,r)}function Ur(t,e,r){return hr(t,e,null==r?r:oe(r))}function Br(t,e,r){return hr(t,e,null==r?r:function(t){if(!re(t))throw O("uint64");switch(typeof t){case"string":var e=qt(Number(t));return Yt(e)&&e>=0?t=Tt(e):(-1!==(e=t.indexOf("."))&&(t=t.substring(0,e)),t=B()?Tt(Wt(64,BigInt(t))):Tt(he(t))),t;case"bigint":return Tt(Wt(64,t));default:return t>=0&&Yt(t)||((t=qt(t))>=0&&Yt(t)?t=String(t):(Mt(t),t=Bt(Ct,Nt))),Tt(t)}}(r))}function jr(t,e,r){hr(t,e,null==r?r:Zt(r))}function Gr(t,e,r){_r(t,e,null==r?r:Zt(r),0)}function Vr(t,e,r){_r(t,e,_e(r),"")}function Hr(t,e,r){{er(t);let o=t.B,a=0|o[rt];if(null==r)ur(o,a,e);else{var n=t=r===V?7:0|r[rt],i=mr(t),s=i||Object.isFrozen(r);for(i||(t=0),s||(r=Kt(r),n=0,t=Cr(t,a),s=!1),t|=5,t|=(4&t?512&t?512:1024&t?1024:0:void 0)??1024,i=0;i<r.length;i++){let e=r[i],o=ve(e);Object.is(e,o)||(s&&(r=Kt(r),n=0,t=Cr(t,a),s=!1),r[i]=o)}t!==n&&(s&&(r=Kt(r),t=Cr(t,a)),st(r,t)),ur(o,a,e,r)}}}function Kr(t,e,r){er(t),dr(t,e,ye,2,!0).push(ve(r))}var Xr=class{constructor(t,e,r){if(this.buffer=t,r&&!e)throw Error();this.h=e}};function Wr(t,e){if("string"==typeof t)return new Xr(w(t),e);if(Array.isArray(t))return new Xr(new Uint8Array(t),e);if(t.constructor===Uint8Array)return new Xr(t,!1);if(t.constructor===ArrayBuffer)return t=new Uint8Array(t),new Xr(t,!1);if(t.constructor===x)return e=S(t)||new Uint8Array(0),new Xr(e,!0,t);if(t instanceof Uint8Array)return t=t.constructor===Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Xr(t,!1);throw Error()}function Yr(t,e){var r=0,n=0,i=0,s=t.i,o=t.h;do{var a=s[o++];r|=(127&a)<<i,i+=7}while(i<32&&128&a);if(i>32)for(n|=(127&a)>>4,i=3;i<32&&128&a;i+=7)n|=(127&(a=s[o++]))<<i;if(rn(t,o),!(128&a))return e(r>>>0,n>>>0);throw Error()}function zr(t){for(var e=0,r=t.h,n=r+10,i=t.i;r<n;){let n=i[r++];if(e|=n,!(128&n))return rn(t,r),!!(127&e)}throw Error()}function qr(t){var e=t.i,r=t.h,n=e[r++],i=127&n;if(128&n&&(i|=(127&(n=e[r++]))<<7,128&n&&(i|=(127&(n=e[r++]))<<14,128&n&&(i|=(127&(n=e[r++]))<<21,128&n&&(i|=(n=e[r++])<<28,128&n&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++])))))throw Error();return rn(t,r),i}function Jr(t){return qr(t)>>>0}function Zr(t){return Yr(t,Ut)}function Qr(t){var e=t.i,r=t.h,n=e[r],i=e[r+1],s=e[r+2];return e=e[r+3],rn(t,t.h+4),(n|i<<8|s<<16|e<<24)>>>0}function tn(t){var e=Qr(t);t=2*(e>>31)+1;var r=e>>>23&255;return e&=8388607,255==r?e?NaN:t*(1/0):0==r?1401298464324817e-60*t*e:t*Math.pow(2,r-150)*(e+8388608)}function en(t){return qr(t)}function rn(t,e){if(t.h=e,e>t.l)throw Error()}function nn(t,e){if(e<0)throw Error();var r=t.h;if((e=r+e)>t.l)throw Error();return t.h=e,r}function sn(t,e){if(0==e)return k();var r=nn(t,e);return t.ga&&t.u?r=t.i.subarray(r,r+e):(t=t.i,r=r===(e=r+e)?new Uint8Array(0):Ft?t.slice(r,e):new Uint8Array(t.subarray(r,e))),0==r.length?k():new x(r,b)}var on=class{constructor(t,e,r,n){this.i=null,this.u=!1,this.h=this.l=this.o=0,this.init(t,e,r,n)}init(t,e,r,{ga:n=!1,na:i=!1}={}){this.ga=n,this.na=i,t&&(t=Wr(t,this.na),this.i=t.buffer,this.u=t.h,this.o=e||0,this.l=void 0!==r?this.o+r:this.i.length,this.h=this.o)}clear(){this.i=null,this.u=!1,this.h=this.l=this.o=0,this.ga=!1}},an=[],hn=0;function un(t,e,r,n){if(yn.length){let i=yn.pop();return i.A(n),i.h.init(t,e,r,n),i}return new _n(t,e,r,n)}function cn(t){t.h.clear(),t.l=-1,t.i=-1,yn.length<100&&yn.push(t)}function ln(t){var e=t.h;if(e.h==e.l)return!1;t.o=t.h.h;var r=Jr(t.h);if(e=r>>>3,!((r&=7)>=0&&r<=5))throw Error();if(e<1)throw Error();return t.l=e,t.i=r,!0}function dn(t){try{switch(t.i){case 0:0!=t.i?dn(t):zr(t.h);break;case 1:var e=t.h;rn(e,e.h+8);break;case 2:if(2!=t.i)dn(t);else{var r=Jr(t.h),n=t.h;rn(n,n.h+r)}break;case 5:var i=t.h;rn(i,i.h+4);break;case 3:fn();let s=t.l;try{for(;;){if(!ln(t))throw Error();if(4==t.i){if(t.l!=s)throw Error();break}dn(t)}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{hn>0&&hn--}break;default:throw Error()}}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}}function fn(){if(hn>=100)throw new SyntaxError;hn++}function pn(t,e,r){var n=t.h.l,i=Jr(t.h),s=(i=t.h.h+i)-n;if(s<=0&&(t.h.l=i,r(e,t,void 0,void 0,void 0),s=i-t.h.h),s)throw Error();return t.h.h=i,t.h.l=n,e}function mn(t){var e=Jr(t.h),s=nn(t=t.h,e);if(t=t.i,a){var h,u=t;(h=i)||(h=i=new TextDecoder("utf-8",{fatal:!0})),e=s+e,u=0===s&&e===u.length?u:u.subarray(s,e);try{var c=h.decode(u)}catch(t){if(void 0===o){try{h.decode(new Uint8Array([128]))}catch(t){}try{h.decode(new Uint8Array([97])),o=!0}catch(t){o=!1}}throw!o&&(i=void 0),t}}else{e=(c=s)+e,s=[];let i,o=null;for(;c<e;){var l=t[c++];l<128?s.push(l):l<224?c>=e?r():(i=t[c++],l<194||128!=(192&i)?(c--,r()):s.push((31&l)<<6|63&i)):l<240?c>=e-1?r():(i=t[c++],128!=(192&i)||224===l&&i<160||237===l&&i>=160||128!=(192&(h=t[c++]))?(c--,r()):s.push((15&l)<<12|(63&i)<<6|63&h)):l<=244?c>=e-2?r():(i=t[c++],128!=(192&i)||i-144+(l<<28)>>30||128!=(192&(h=t[c++]))||128!=(192&(u=t[c++]))?(c--,r()):(l=(7&l)<<18|(63&i)<<12|(63&h)<<6|63&u,l-=65536,s.push(55296+(l>>10&1023),56320+(1023&l)))):r(),s.length>=8192&&(o=n(o,s),s.length=0)}c=n(o,s)}return c}function gn(t){var e=Jr(t.h);return sn(t.h,e)}function vn(t,e,r){var n=Jr(t.h);for(n=t.h.h+n;t.h.h<n;)r.push(e(t.h))}var _n=class{constructor(t,e,r,n){if(an.length){let i=an.pop();i.init(t,e,r,n),t=i}else t=new on(t,e,r,n);this.h=t,this.o=this.h.h,this.i=this.l=-1,this.A(n)}A({sa:t=!1}={}){this.sa=t}},yn=[];function En(t){return new Tn(4294967295&t,Math.floor(t/4294967296))}function An(t){return t?/^\d+$/.test(t)?(Vt(t),new Tn(Ct,Nt)):null:wn||=new Tn(0,0)}var wn,Tn=class{constructor(t,e){this.i=t>>>0,this.h=e>>>0}};function bn(t){return new On(4294967295&t,Math.floor(t/4294967296))}function kn(t){return t?/^-?\d+$/.test(t)?(Vt(t),new On(Ct,Nt)):null:Sn||=new On(0,0)}var Sn,Ln,xn,Rn,In,Fn,Cn,Nn,On=class{constructor(t,e){this.i=t>>>0,this.h=e>>>0}};function Mn(t,e,r){return"undefined"!=typeof BigInt64Array?(Cn||(Cn=new BigInt64Array(1),Nn=new Uint32Array(Cn.buffer),Cn[0]=BigInt(1),Fn=1===Nn[0]),Cn[0]=t,new e(Nn[t=Fn?0:1],Nn[1-t])):(In||(Ln=BigInt(Number.MIN_SAFE_INTEGER),xn=BigInt(Number.MAX_SAFE_INTEGER),Rn=BigInt(4294967295),In=BigInt(32)),t>=Ln&&t<=xn?r(Number(t)):(t=BigInt.asUintN(64,t),new e(Number(t&Rn),Number(t>>In))))}function Dn(t,e,r){for(;r>0||e>127;)t.h.push(127&e|128),e=(e>>>7|r<<25)>>>0,r>>>=7;t.h.push(e)}function Pn(t,e){for(;e>127;)t.h.push(127&e|128),e>>>=7;t.h.push(e)}function $n(t,e){if(e>=0)Pn(t,e);else{for(let r=0;r<9;r++)t.h.push(127&e|128),e>>=7;t.h.push(1)}}function Un(t,e){Vt(e),function(t){var e=Nt>>31;t(Ct<<1^e,(Nt<<1|Ct>>>31)^e)}((e,r)=>{Dn(t,e>>>0,r>>>0)})}function Bn(t,e){t.h.push(e>>>0&255),t.h.push(e>>>8&255),t.h.push(e>>>16&255),t.h.push(e>>>24&255)}var jn=class{constructor(){this.h=[]}length(){return this.h.length}end(){var t=this.h;return this.h=[],t}};function Gn(t,e){0!==e.length&&(t.l.push(e),t.i+=e.length)}function Vn(t,e,r){Pn(t.h,8*e+r)}function Hn(t,e){return Vn(t,e,2),e=t.h.end(),Gn(t,e),e.push(t.i),e}function Kn(t,e){var r=e.pop();for(r=t.i+t.h.length()-r;r>127;)e.push(127&r|128),r>>>=7,t.i++;e.push(r),t.i++}function Xn(t,e,r){if(null!=r)switch(Vn(t,e,0),typeof r){case"number":t=t.h,Mt(r),Dn(t,Ct,Nt);break;case"bigint":r=Mn(r,On,bn),Dn(t.h,r.i,r.h);break;default:r=kn(r),Dn(t.h,r.i,r.h)}}function Wn(t,e,r){Vn(t,e,2),Pn(t.h,r.length),Gn(t,t.h.end()),Gn(t,r)}function Yn(t,e,r,n){null!=r&&(e=Hn(t,e),n(r,t),Kn(t,e))}var zn=class{constructor(){this.l=[],this.i=0,this.h=new jn}};function qn(t){if("string"==typeof t)kn(t)}function Jn(){var t=class{constructor(){throw Error()}};return Object.setPrototypeOf(t,t.prototype),t}var Zn=Jn(),Qn=Jn(),ti=Jn(),ei=Jn(),ri=Jn(),ni=Jn(),ii=Jn(),si=Jn(),oi=Jn(),ai=Jn(),hi=Jn(),ui=Jn();function ci(t,e,r){var n=t.B;W&&W in n&&(n=n[W])&&delete n[e.h],e.i?e.u(t,e.i,e.h,r,e.l):e.u(t,e.h,r,e.l)}var li=class{constructor(t,e){this.B=We(t,e,void 0,2048)}toJSON(){return Ke(this)}u(){var t=Oa,e=this.B,r=t.h,n=W;if(j&&n&&null!=e[n]?.[r]&&M(Y,3),e=t.h,Q&&W&&void 0===Q&&(n=(r=this.B)[W])&&(n=n.la))try{n(r,e,Be)}catch(t){c(t)}return t.i?t.o(this,t.i,t.h,t.l):t.o(this,t.h,t.defaultValue,t.l)}clone(){var t=this.B,e=0|t[rt];return nr(this,t,e)?qe(this,t,!0):new this.constructor(Ze(t,e,!1))}};li.prototype[Z]=ut,li.prototype.toString=function(){return this.B.toString()};var di=class{constructor(t,e,r){this.h=t,this.i=e,t=Zn,this.l=!!t&&r===t||!1}};function fi(t,e){return new di(t,e,Zn)}function pi(t,e,r,n,i){Yn(t,r,Si(e,n),i)}var mi,gi,vi=fi(function(t,e,r,n,i){return 2===t.i&&(pn(t,br(e,n,r),i),!0)},pi),_i=fi(function(t,e,r,n,i){return 2===t.i&&(pn(t,br(e,n,r),i),!0)},pi),yi=Symbol(),Ei=Symbol(),Ai=Symbol(),wi=Symbol(),Ti=Symbol();function bi(t,e,r,n){var i=n[t];if(i)return i;(i={}).Fa=n,i.da=function(t){switch(typeof t){case"boolean":return Pe||=[0,void 0,!0];case"number":return t>0?void 0:0===t?$e||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}(n[0]);var s=n[1],o=1;s&&s.constructor===Object&&(i.ja=s,"function"==typeof(s=n[++o])&&(i.xa=!0,mi??=s,gi??=n[o+1],s=n[o+=2]));for(var a={};s&&Array.isArray(s)&&s.length&&"number"==typeof s[0]&&s[0]>0;){for(var h=0;h<s.length;h++)a[s[h]]=s;s=n[++o]}for(h=1;void 0!==s;){let t;"number"==typeof s&&(h+=s,s=n[++o]);var u=void 0;if(s instanceof di?t=s:(t=vi,o--),t?.l){s=n[++o],u=n;var c=o;"function"==typeof s&&(s=s(),u[c]=s),u=s}for(c=h+1,"number"==typeof(s=n[++o])&&s<0&&(c-=s,s=n[++o]);h<c;h++){let n=a[h];u?r(i,h,t,u,n):e(i,h,t,n)}}return n[t]=i}function ki(t){return Array.isArray(t)?t[0]instanceof di?t:[_i,t]:[t,void 0]}function Si(t,e){return t instanceof li?t.B:Array.isArray(t)?Xe(t,e):void 0}function Li(t,e,r,n){var i=r.h;t[e]=n?(t,e,r)=>i(t,e,r,n):i}function xi(t,e,r,n,i){var s,o,a=r.h;t[e]=(t,e,r)=>a(t,e,r,o||=bi(Ei,Li,xi,n).da,s||=Ri(n),i)}function Ri(t){var e=t[Ai];if(null!=e)return e;var r=bi(Ei,Li,xi,t);return e=r.xa?(t,e)=>mi(t,e,r):(t,e)=>{t:{fn();try{for(;ln(e)&&4!=e.i;){let h=e.l,u=r[h];if(null==u){let t=r.ja;if(t){let e=t[h];if(e){let t=Fi(e);null!=t&&(u=r[h]=t)}}}if(null==u||!u(e,t,h)){var n=e;let r=n.o;if(dn(n),n.sa)var i=void 0;else{let t=n.h.h-r;n.h.h=r,i=sn(n.h,t)}n=void 0;var s=t,o=h,a=i;a&&((n=s[W]??(s[W]=new Ue))[o]??(n[o]=[])).push(a)}}let u=Oe(t);u&&(u.la=r.Fa[Ti]);var h=!0;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{hn>0&&hn--}h=void 0}return h},t[Ai]=e,t[Ti]=Ii.bind(t),e}function Ii(t,e,r,n){var i=this[Ei],s=this[Ai],o=Xe(void 0,i.da),a=Oe(t);if(a){var h=!1,u=i.ja;if(u){if(i=(e,r,i)=>{if(0!==i.length)if(u[r])for(let t of i){e=un(t);try{h=!0,s(o,e)}finally{cn(e)}}else n?.(t,r,i)},null==e)Me(a,i);else if(null!=a){let t=a[e];t&&i(a,e,t)}if(h){let n=0|t[rt];if(2&n&&2048&n&&!r?.eb)throw Error();let i=vt(n),s=(e,s)=>{if(null!=ar(t,e,i)){if(1===r?.mb)return;throw Error()}null!=s&&(n=ur(t,n,e,s,i)),delete a[e]};null==e?mt(o,0|o[rt],(t,e)=>{s(t,e)}):s(e,ar(o,e,i))}}}}function Fi(t){var e=(t=ki(t))[0].h;if(t=t[1]){let r=Ri(t),n=bi(Ei,Li,xi,t).da;return(t,i,s)=>e(t,i,s,n,r)}return e}function Ci(t,e,r){t[e]=r.i}function Ni(t,e,r,n){var i,s,o=r.i;t[e]=(t,e,r)=>o(t,e,r,s||=bi(yi,Ci,Ni,n).da,i||=Oi(n))}function Oi(t){var e=t[wi];if(!e){let r=bi(yi,Ci,Ni,t);e=(t,e)=>Mi(t,e,r),t[wi]=e}return e}function Mi(t,e,r){mt(t,0|t[rt],(t,n)=>{if(null!=n){var i=function(t,e){var r=t[e];if(r)return r;if((r=t.ja)&&(r=r[e])){var n=(r=ki(r))[0].i;if(r=r[1]){let e=Oi(r),i=bi(yi,Ci,Ni,r).da;r=t.xa?gi(i,e):(t,r,s)=>n(t,r,s,i,e)}else r=n;return t[e]=r}}(r,t);i?i(e,n,t):t<500||M(q,3)}}),(t=Oe(t))&&Me(t,(t,r,n)=>{for(Gn(e,e.h.end()),t=0;t<n.length;t++)Gn(e,S(n[t])||new Uint8Array(0))})}var Di=Tt(0);function Pi(t,e,r){if(Array.isArray(e)){var n=0|e[rt];if(4&n)return e;for(var i=0,s=0;i<e.length;i++){let r=t(e[i]);null!=r&&(e[s++]=r)}return s<i&&(e.length=s),t=1|n,r&&(t=-1537&t|4),t!==n&&st(e,t),r&&2&t&&Object.freeze(e),e}}var $i=(t,e)=>{var r=new zn;Mi(t.B,r,bi(yi,Ci,Ni,e)),Gn(r,r.h.end()),t=new Uint8Array(r.i);var n=(e=r.l).length,i=0;for(let r=0;r<n;r++){let n=e[r];t.set(n,i),i+=n.length}return r.l=[t],t};function Ui(t,e,r){return new di(t,e,r)}function Bi(t,e,r){return new di(t,e,r)}function ji(t,e,r){ur(t,0|t[rt],e,r,vt(0|t[rt]))}var Gi=fi(function(t,e,r,n,i){if(2!==t.i)return!1;if(t=Kt(t=pn(t,Xe([void 0,void 0],n),i)),i=vt(n=0|e[rt]),2&n)throw Error();var s=ar(e,r,i);if(s instanceof Ie)2&s.N?((s=s.fa()).push(t),ur(e,n,r,s,i)):s.hb(t);else if(Array.isArray(s)){var o=0|s[rt];8192&o||st(s,o|=8192),2&o&&ur(e,n,r,s=vr(s),i),s.push(t)}else ur(e,n,r,at([t]),i);return!0},function(t,e,r,n,i){if(e instanceof Ie)e.forEach((e,s)=>{Yn(t,r,Xe([s,e],n),i)});else if(Array.isArray(e)){for(let s=0;s<e.length;s++){let o=e[s];Array.isArray(o)&&Yn(t,r,Xe(o,n),i)}at(e)}});function Vi(t,e,r){null!=(e=Qt(e))&&(Vn(t,r,5),t=t.h,Dt(e),Bn(t,Ct))}function Hi(t,e,r){null!=(e=pe(e))&&(qn(e),Xn(t,r,e))}function Ki(t,e,r){null!=(e=ie(e))&&null!=e&&(Vn(t,r,0),$n(t.h,e))}function Xi(t,e,r){null!=(e=null==e||"boolean"==typeof e?e:"number"==typeof e?!!e:void 0)&&(Vn(t,r,0),t.h.h.push(e?1:0))}function Wi(t,e,r){null!=(e=ye(e))&&Wn(t,r,u(e))}function Yi(t,e,r,n,i){Yn(t,r,Si(e,n),i)}function zi(t,e,r){null!=(e=ge(e))&&Wn(t,r,Wr(e,!0).buffer)}function qi(t,e,r){null!=(e=se(e))&&null!=e&&(Vn(t,r,0),Pn(t.h,e))}function Ji(t,e,r){null!=(e=ie(e))&&(e=parseInt(e,10),Vn(t,r,0),$n(t.h,e))}function Zi(t,e,r){return(5===t.i||2===t.i)&&(e=yr(e,0|e[rt],r),2==t.i?vn(t,tn,e):e.push(tn(t.h)),!0)}function Qi(t,e,r){return 0===t.i&&(ji(e,r,Zr(t.h)),!0)}function ts(t,e,r){return(0===t.i||2===t.i)&&(e=yr(e,0|e[rt],r),2==t.i?vn(t,qr,e):e.push(qr(t.h)),!0)}function es(t,e,r){return 2===t.i&&(ji(e,r,(t=gn(t))===k()?void 0:t),!0)}var rs=Ui(function(t,e,r){if(1!==t.i)return!1;var n=t.h;t=Qr(n);var i=Qr(n);n=2*(i>>31)+1;var s=i>>>20&2047;return t=4294967296*(1048575&i)+t,ji(e,r,2047==s?t?NaN:n*(1/0):0==s?5e-324*n*t:n*Math.pow(2,s-1075)*(t+4503599627370496)),!0},function(t,e,r){null!=(e=Qt(e))&&(Vn(t,r,1),t=t.h,(r=It||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),Ct=r.getUint32(0,!0),Nt=r.getUint32(4,!0),Bn(t,Ct),Bn(t,Nt))},ai),ns=Ui(function(t,e,r){return 5===t.i&&(ji(e,r,tn(t.h)),!0)},Vi,oi),is=Bi(Zi,function(t,e,r){if(null!=(e=Pi(Qt,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&(Vn(n,i,5),n=n.h,Dt(s),Bn(n,Ct))}},oi),ss=Bi(Zi,function(t,e,r){if(null!=(e=Pi(Qt,e,!0))&&e.length){Vn(t,r,2),Pn(t.h,4*e.length);for(let n=0;n<e.length;n++)r=t.h,Dt(e[n]),Bn(r,Ct)}},oi),os=Ui(function(t,e,r){return 5===t.i&&(ji(e,r,0===(t=tn(t.h))?void 0:t),!0)},Vi,oi),as=Ui(function(t,e,r){return Qi(t,e,r)},Hi,ni),hs=Ui(function(t,e,r){return Qi(t,e,r)},Hi,ni),us=Bi(function(t,e,r){return 0!==t.i&&2!==t.i?t=!1:(e=yr(e,0|e[rt],r),2==t.i?vn(t,Zr,e):e.push(Zr(t.h)),t=!0),t},function(t,e,r){if(null!=(e=Pi(pe,e,!1)))for(let n=0;n<e.length;n++)Xn(t,r,e[n])},ni),cs=Ui(function(t,e,r){return 0!==t.i?e=!1:(ji(e,r,(t=Zr(t.h))===Di?void 0:t),e=!0),e},Hi,ni),ls=Ui(function(t,e,r){return 0!==t.i?t=!1:(ji(e,r,Yr(t.h,$t)),t=!0),t},function(t,e,r){if(null!=(e=me(e))){if("string"==typeof e)An(e);if(null!=e)switch(Vn(t,r,0),typeof e){case"number":t=t.h,Mt(e),Dn(t,Ct,Nt);break;case"bigint":r=Mn(e,Tn,En),Dn(t.h,r.i,r.h);break;default:r=An(e),Dn(t.h,r.i,r.h)}}},ii),ds=Ui(function(t,e,r){return 0===t.i&&(ji(e,r,qr(t.h)),!0)},Ki,ei),fs=Bi(ts,function(t,e,r){if(null!=(e=Pi(ie,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&(Vn(n,i,0),$n(n.h,s))}},ei),ps=Bi(ts,function(t,e,r){if(null!=(e=Pi(ie,e,!0))&&e.length){r=Hn(t,r);for(let r=0;r<e.length;r++)$n(t.h,e[r]);Kn(t,r)}},ei),ms=Ui(function(t,e,r){return 0===t.i&&(ji(e,r,0===(t=qr(t.h))?void 0:t),!0)},Ki,ei),gs=Ui(function(t,e,r){return 0===t.i&&(ji(e,r,zr(t.h)),!0)},Xi,Qn),vs=Ui(function(t,e,r){return 0===t.i&&(ji(e,r,!1===(t=zr(t.h))?void 0:t),!0)},Xi,Qn),_s=Bi(function(t,e,r){return 2===t.i&&(t=mn(t),yr(e,0|e[rt],r).push(t),!0)},function(t,e,r){if(null!=(e=Pi(ye,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&Wn(n,i,u(s))}},ti),ys=Ui(function(t,e,r){return 2===t.i&&(ji(e,r,""===(t=mn(t))?void 0:t),!0)},Wi,ti),Es=Ui(function(t,e,r){return 2===t.i&&(ji(e,r,mn(t)),!0)},Wi,ti),As=function(t,e,r=Zn){return new di(t,e,r)}(function(t,e,r,n,i){return 2===t.i&&(n=Xe(void 0,n),yr(e,0|e[rt],r).push(n),pn(t,n,i),!0)},function(t,e,r,n,i){if(Array.isArray(e)){for(let s=0;s<e.length;s++)Yi(t,e[s],r,n,i);1&(t=0|e[rt])||st(e,1|t)}}),ws=fi(function(t,e,r,n,i,s){if(2!==t.i)return!1;var o=0|e[rt];return wr(e,o,s,r,vt(o)),pn(t,e=br(e,n,r),i),!0},Yi),Ts=Ui(function(t,e,r){return 2===t.i&&(ji(e,r,gn(t)),!0)},zi,hi),bs=Bi(function(t,e,r){return 2===t.i&&(t=gn(t),yr(e,0|e[rt],r).push(t),!0)},function(t,e,r){if(null!=(e=Pi(ge,e,!1)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&Wn(n,i,Wr(s,!0).buffer)}},hi),ks=Ui(function(t,e,r){return 0===t.i&&(ji(e,r,Jr(t.h)),!0)},qi,ri),Ss=Bi(function(t,e,r){return(0===t.i||2===t.i)&&(e=yr(e,0|e[rt],r),2==t.i?vn(t,Jr,e):e.push(Jr(t.h)),!0)},function(t,e,r){if(null!=(e=Pi(se,e,!0)))for(let o=0;o<e.length;o++){var n=t,i=r,s=e[o];null!=s&&(Vn(n,i,0),Pn(n.h,s))}},ri),Ls=Ui(function(t,e,r){return 0===t.i&&(ji(e,r,0===(t=Jr(t.h))?void 0:t),!0)},qi,ri),xs=Ui(function(t,e,r){return 0===t.i&&(ji(e,r,qr(t.h)),!0)},Ji,ui),Rs=Ui(function(t,e,r){return 0===t.i&&(ji(e,r,0===(t=qr(t.h))?void 0:t),!0)},Ji,ui),Is=Ui(function(t,e,r){return 0!==t.i?t=!1:(ji(e,r,function(t){return Yr(t,(t,e)=>{var r=-(1&t);return Ut(t=(t>>>1|e<<31)^r,e>>>1^r)})}(t.h)),t=!0),t},function(t,e,r){if(null!=(e=pe(e))&&(qn(e),null!=e))switch(Vn(t,r,0),typeof e){case"number":t=t.h,e=(r=e)<0,Ot(r=2*Math.abs(r)),r=Ct;let n=Nt;e&&(0==r?0==n?n=r=4294967295:(n--,r=4294967295):r--),Dn(t,Ct=r,Nt=n);break;case"bigint":t=t.h,e=e<<BigInt(1)^e>>BigInt(63),Ct=Number(BigInt.asUintN(32,e)),Nt=Number(BigInt.asUintN(32,e>>BigInt(32))),Dn(t,Ct,Nt);break;default:Un(t.h,e)}},si);class Fs{constructor(t,e){var r=so;this.h=t,this.i=e,this.o=kr,this.u=Rr,this.defaultValue=void 0,this.l=null!=r.kb?gt:void 0}register(){d(this)}}function Cs(t,e){return new Fs(t,e)}function Ns(t,e){return(r,n)=>{t:{let s={na:!0};n&&Object.assign(s,n),r=un(r,void 0,void 0,s);try{let n=new t,s=n.B;Ri(e)(s,r);var i=n;break t}catch(t){if(t instanceof RangeError)throw new SyntaxError;throw t}finally{cn(r)}i=void 0}return i}}function Os(t){return e=>$i(e,t)}function Ms(t){return function(){return $i(this,t)}}var Ds=[0,Ts,bs,gs,Es],Ps=[0,ys,[0,Rs,[0,cs,ms],Rs,-1,[0,xs],Rs,-1],Ui(es,zi,hi)];var $s,Us=class extends li{constructor(t){super(t)}},Bs=[0,ys,Ui(es,function(t,e,r){if(null!=e){if(e instanceof li){let n=e.nb;return void(n?(e=n(e),null!=e&&Wn(t,r,Wr(e,!0).buffer)):M(q,3))}if(Array.isArray(e))return void M(q,3)}zi(t,e,r)},hi)],js=[0,1,[0,12,ds,10,gs],[0,7,[0,ds,-1]]],Gs=globalThis.trustedTypes;var Vs=class{constructor(t){this.h=t}toString(){return this.h+""}};function Hs(t){var e;return void 0===$s&&($s=function(){var t=null;if(!Gs)return t;try{let e=t=>t;t=Gs.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(t){}return t}()),t=(e=$s)?e.createScriptURL(t):t,new Vs(t)}function Ks(t,...e){if(0===e.length)return Hs(t[0]);var r=t[0];for(let n=0;n<e.length;n++)r+=encodeURIComponent(e[n])+t[n+1];return Hs(r)}var Xs=[0,ds,xs,gs,-1,ps,xs,-1,gs,-1],Ws=[0,xs,-1,gs],Ys=class extends li{constructor(t){super(t)}},zs=[0,gs,Es,gs,xs,-1,Bi(function(t,e,r){return(0===t.i||2===t.i)&&(e=yr(e,0|e[rt],r),2==t.i?vn(t,en,e):e.push(qr(t.h)),!0)},function(t,e,r){if(null!=(e=Pi(ie,e,!0))&&e.length){r=Hn(t,r);for(let r=0;r<e.length;r++)$n(t.h,e[r]);Kn(t,r)}},ui),Es,-1,[0,gs,-1],xs,gs,-1,Ws],qs=class extends li{constructor(t){super(t)}},Js=class extends li{constructor(t){super(t)}},Zs=class extends li{constructor(t){super(t)}h(){return cr(this,9)}},Qs=[0,3,gs,-1,2,[0,[2],ds,ws,[0,ks]],[0,xs,gs,xs,gs,xs,4,[0,gs,Es,-1,gs,ds,-1,gs],xs,gs,-4,xs,_s,gs,_s,gs,-1,ds,gs,-3,[0,gs,ds],[0,Es,ds,-1],[0,gs],[0,gs,-1],[0,gs,ds,-1]],[0,[3,4],Es,-1,ws,[0,ds],ws,[0,xs,-2]],[0],Es,gs],to=[0,Es,-2],eo=class extends li{constructor(t){super(t)}},ro=[0],no=class extends li{constructor(t){super(t)}},io=[0,ds,gs,1,gs,-4],so=class extends li{constructor(t){super(t,2)}},oo={};oo[336783863]=[0,Es,gs,-1,ds,[0,[1,2,3,4,5,6,7,8,9],ws,ro,ws,zs,ws,to,ws,io,ws,Xs,ws,[0,Es,-2],ws,[0,Es,xs],ws,Qs,ws,Ws],[0,Es],gs,[0,[1,3],[2,4],ws,[0,ps],-1,ws,[0,_s],-1,As,[0,Es,-1]],Es];var ao=[0,cs,-1,vs,-3,cs,ps,ys,ms,cs,-1,vs,ms,vs,-2,ys];function ho(t,e){Kr(t,3,e)}function uo(t,e){Kr(t,4,e)}var co=class extends li{constructor(t){super(t,500)}A(t){return Rr(this,0,7,t)}},lo=[-1,{}],fo=[0,Es,1,lo],po=[0,Es,_s,lo];function mo(t,e){Nr(t,1,co,e)}function go(t,e){Kr(t,10,e)}function vo(t,e){Kr(t,15,e)}var _o=class extends li{constructor(t){super(t,500)}A(t){return Rr(this,0,1001,t)}},yo=[-500,As,[-500,ys,-1,_s,-3,[-2,oo,gs],As,Bs,ms,-1,fo,po,As,[0,ys,vs],ys,ao,ms,_s,987,_s],4,As,[-500,Es,-1,[-1,{}],998,Es],As,[-500,Es,_s,-1,[-2,{},gs],997,_s,-1],ms,As,[-500,Es,_s,lo,998,_s],_s,ms,fo,po,As,[0,ys,-1,lo],_s,-2,ao,ys,-1,vs,[0,vs,Ls],978,lo,As,Bs];_o.prototype.h=Ms(yo);var Eo=Ns(_o,yo),Ao=class extends li{constructor(t){super(t)}},wo=class extends li{constructor(t){super(t)}h(){return Lr(this,Ao,1)}},To=[0,As,[0,ds,ns,Es,-1]],bo=Ns(wo,To),ko=class extends li{constructor(t){super(t)}},So=class extends li{constructor(t){super(t)}},Lo=class extends li{constructor(t){super(t)}l(){return kr(this,ko,2)}h(){return Lr(this,So,5)}},xo=Ns(class extends li{constructor(t){super(t)}},[0,_s,ps,ss,[0,xs,[0,ds,-3],[0,ns,-3],[0,ds,-1,[0,As,[0,ds,-2]]],As,[0,ns,-1,Es,ns]],Es,-1,hs,As,[0,ds,ns],_s,hs]),Ro=class extends li{constructor(t){super(t)}},Io=Ns(class extends li{constructor(t){super(t)}},[0,As,[0,ns,-4]]),Fo=class extends li{constructor(t){super(t)}},Co=Ns(class extends li{constructor(t){super(t)}},[0,As,[0,ns,-4]]),No=class extends li{constructor(t){super(t)}},Oo=[0,ds,-1,ss,xs],Mo=class extends li{constructor(t){super(t)}};Mo.prototype.h=Ms([0,ns,-4,hs]);var Do=class extends li{constructor(t){super(t)}},Po=Ns(class extends li{constructor(t){super(t)}},[0,As,[0,1,ds,Es,To],hs]),$o=class extends li{constructor(t){super(t)}},Uo=class extends li{constructor(t){super(t)}h(){var t=or(this,1,void 0,gr);return null==t?k():t}},Bo=class extends li{constructor(t){super(t)}},jo=[1,2],Go=Ns(class extends li{constructor(t){super(t)}},[0,As,[0,jo,ws,[0,ss],ws,[0,Ts],ds,Es],hs]),Vo=class extends li{constructor(t){super(t)}},Ho=[0,Es,ds,ns,_s,-1],Ko=class extends li{constructor(t){super(t)}},Xo=[0,gs,-1],Wo=class extends li{constructor(t){super(t)}h(){return lr(this,2,Yo)}l(){return Dr(this,Zs,6,Yo)}},Yo=[1,2,3,4,5,6],zo=class extends li{constructor(t){super(t)}h(){return null!=or(this,1,void 0,gr)}l(){return null!=ye(or(this,2))}},qo=class extends li{constructor(t){super(t)}},Jo=[0,Ts,Es,[0,ds,hs,-1],[0,ls,hs]],Zo=[0,Jo,gs,[0,Yo,ws,io,ws,zs,ws,Xs,ws,ro,ws,to,ws,Qs],xs],Qo=Os(Zo),ta=class extends li{constructor(t){super(t)}},ea=[0,Zo,ns,-1,ds],ra=Cs(502141897,ta);oo[502141897]=ea;var na=Ns(class extends li{constructor(t){super(t)}},[0,[0,xs,-1,is,Ss],Oo]),ia=class extends li{constructor(t){super(t)}},sa=class extends li{constructor(t){super(t)}},oa=[0,Zo,ns,[0,Zo],gs],aa=Cs(508968150,sa);oo[508968150]=[0,Zo,ea,oa,ns,[0,[0,Jo]]],oo[508968149]=oa;var ha=class extends li{constructor(t){super(t)}l(){return kr(this,Vo,2)}h(){hr(this,2)}},ua=[0,Zo,Ho];oo[478825465]=ua;var ca=class extends li{constructor(t){super(t)}},la=class extends li{constructor(t){super(t)}},da=class extends li{constructor(t){super(t)}},fa=class extends li{constructor(t){super(t)}},pa=class extends li{constructor(t){super(t)}},ma=[0,Zo,[0,Zo],ua,-1],ga=[0,Zo,ns,ds],va=[0,Zo,ns],_a=[0,Zo,ga,va,ns],ya=Cs(479097054,pa);oo[479097054]=[0,Zo,_a,ma],oo[463370452]=ma,oo[464864288]=ga;var Ea=Cs(462713202,fa);oo[462713202]=_a,oo[474472470]=va;var Aa=class extends li{constructor(t){super(t)}},wa=class extends li{constructor(t){super(t)}},Ta=class extends li{constructor(t){super(t)}},ba=class extends li{constructor(t){super(t)}},ka=[0,Zo,ns,-1,ds],Sa=[0,Zo,ns,gs];ba.prototype.h=Ms([0,Zo,va,[0,Zo],ea,oa,ka,Sa]);var La=class extends li{constructor(t){super(t)}},xa=Cs(456383383,La);oo[456383383]=[0,Zo,Ho];var Ra=class extends li{constructor(t){super(t)}},Ia=Cs(476348187,Ra);oo[476348187]=[0,Zo,Xo];var Fa=class extends li{constructor(t){super(t)}},Ca=class extends li{constructor(t){super(t)}},Na=[0,xs,-1],Oa=Cs(458105876,class extends li{constructor(t){super(t)}h(){var t=this.B,e=0|t[rt],r=lt(this,e);return t=function(t,e,r,n){var i=Ca;!n&&tr(t)&&(r=0|(e=t.B)[rt]);var s=ar(e,2);if(t=!1,null==s){if(n)return Ne();s=[]}else if(s.constructor===Ie){if(!(2&s.N)||n)return s;s=s.fa()}else Array.isArray(s)?t=!!(2&s[rt]):s=[];if(n){if(!s.length)return Ne();t||(t=!0,ot(s))}else t&&(t=!1,at(s),s=vr(s));return!t&&32&r&&it(s,32),r=ur(e,r,2,n=new Ie(s,i,Ae,void 0)),t||rr(e,r),n}(this,t,e,r),!r&&Ca&&(t.Ga=!0),t}});oo[458105876]=[0,Na,Gi,[!0,hs,[0,Es,-1,_s]],[0,ps,gs,xs],gs];var Ma=class extends li{constructor(t){super(t)}},Da=Cs(458105758,Ma);oo[458105758]=[0,Zo,Es,Na];var Pa=class extends li{constructor(t){super(t)}},$a=class extends li{constructor(t){super(t)}},Ua=class extends li{constructor(t){super(t)}},Ba=Os([0,As,[0,Rs,As,[0,os,-1],vs]]),ja=class extends li{constructor(t){super(t)}},Ga=[0,os,-1,vs],Va=class extends li{constructor(t){super(t)}},Ha=class extends li{constructor(t){super(t)}},Ka=[1,2];Ha.prototype.h=Ms([0,Ka,ws,Ga,ws,[0,As,Ga]]);var Xa=class extends li{constructor(t){super(t)}},Wa=Cs(443442058,Xa);oo[443442058]=[0,Zo,Es,ds,ns,_s,-1,gs,ns],oo[514774813]=ka;var Ya=class extends li{constructor(t){super(t)}},za=Cs(516587230,Ya);function qa(t,e){return e=e?e.clone():new Vo,void 0!==t.displayNamesLocale?hr(e,1,_e(t.displayNamesLocale)):void 0===t.displayNamesLocale&&hr(e,1),void 0!==t.maxResults?$r(e,2,t.maxResults):"maxResults"in t&&hr(e,2),void 0!==t.scoreThreshold?jr(e,3,t.scoreThreshold):"scoreThreshold"in t&&hr(e,3),void 0!==t.categoryAllowlist?Hr(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&hr(e,4),void 0!==t.categoryDenylist?Hr(e,5,t.categoryDenylist):"categoryDenylist"in t&&hr(e,5),e}function Ja(t){var e=Number(t);return Number.isSafeInteger(e)?e:String(t)}function Za(t,e=-1,r=""){return{categories:t.map(t=>({index:Or(t,1)??0??-1,score:Mr(t,2)??0,categoryName:ye(or(t,3))??""??"",displayName:ye(or(t,4))??""??""})),headIndex:e,headName:r}}function Qa(t){var e={classifications:Lr(t,Do,1).map(t=>Za(kr(t,wo,4)?.h()??[],Or(t,2)??0,ye(or(t,3))??""))};return null!=function(t){return null==t?t:"bigint"==typeof t?(bt(t)?t=Number(t):(t=Xt(64,t),t=bt(t)?Number(t):String(t)),t):re(t)?"number"==typeof t?ue(t):le(t):void 0}(or(t,2,void 0,fe))&&(e.timestampMs=Ja(or(t,2,void 0,fe)??ir)),e}function th(t){var e=dr(t,3,Qt),r=dr(t,2,ie),n=dr(t,1,ye),i=dr(t,9,ye),s={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)s.categories.push({score:e[t],index:r[t]??-1,categoryName:n[t]??"",displayName:i[t]??""});if((e=kr(t,Lo,4)?.l())&&(s.boundingBox={originX:Or(e,1,sr)??0,originY:Or(e,2,sr)??0,width:Or(e,3,sr)??0,height:Or(e,4,sr)??0,angle:0}),kr(t,Lo,4)?.h().length)for(let e of kr(t,Lo,4).h())s.keypoints.push({x:or(e,1,sr,Qt)??0,y:or(e,2,sr,Qt)??0,score:or(e,4,sr,Qt)??0,label:ye(or(e,3,sr))??""});return s}function eh(t){var e=[];for(let r of Lr(t,Fo,1))t={x:Mr(r,1)??0,y:Mr(r,2)??0,z:Mr(r,3)??0,visibility:Mr(r,4)??0},null!=or(r,5,void 0,Qt)&&(t.presence=Mr(r,5)??0),e.push(t);return e}function rh(t){var e=[];for(let r of Lr(t,Ro,1))t={x:Mr(r,1)??0,y:Mr(r,2)??0,z:Mr(r,3)??0,visibility:Mr(r,4)??0},null!=or(r,5,void 0,Qt)&&(t.presence=Mr(r,5)??0),e.push(t);return e}function nh(t){return Array.from(t,t=>t>127?t-256:t)}function ih(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);var r=0,n=0,i=0;for(let s=0;s<t.length;s++)r+=t[s]*e[s],n+=t[s]*t[s],i+=e[s]*e[s];if(n<=0||i<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return r/Math.sqrt(n*i)}function sh(t,e,r){return r=`wasm${r?"_module":""}_internal`,Promise.resolve({wasmLoaderPath:`${e}/${t}_${r}.js`,wasmBinaryPath:`${e}/${t}_${r}.wasm`})}oo[516587230]=[0,Zo,ka,Sa,ns],oo[518928384]=Sa;var oh=class{};function ah(t){return hr(new hh,1,ne(t))}oh.forVisionTasks=function(t,e=!1){return sh("vision",t??Ks``,e)},oh.forLiteRtLmTextTasks=function(t,e=!1){return sh("litertlm_text",t??Ks``,e)},oh.forTextTasks=function(t,e=!1){return sh("text",t??Ks``,e)},oh.forRetrievalTasks=function(t,e=!1){return sh("retrieval",t??Ks``,e)},oh.forGenAiTasks=function(t,e=!1){return sh("genai",t??Ks``,e)},oh.forDecisionTasks=function(t,e=!1){return sh("decision",t??Ks``,e)},oh.forAudioTasks=function(t,e=!1){return sh("audio",t??Ks``,e)};var hh=class extends li{constructor(t){super(t)}},uh=class extends li{constructor(t){super(t)}},ch=[0,xs,2,ls,-2,hs,As,[0,xs,hs]],lh=class extends li{constructor(t){super(t)}},dh=class extends li{constructor(t){super(t)}};function fh(t,e){return hr(t,1,ne(e))}function ph(t,e){return hr(t,2,ne(e))}var mh=class extends li{constructor(t){super(t)}},gh=[3,4,5,6,7],vh=class extends li{constructor(t){super(t)}},_h=class extends li{constructor(t){super(t)}};_h.prototype.h=Ms([0,[0,xs,Es,-3,xs],[0,gh,xs,-1,ws,[0,xs,Es,ls],ws,ch,ws,[0,1,ch],ws,[0,xs],ws,[0,xs,Es,ls]]]);var yh=class{constructor(){this.h="undefined"!=typeof AbortController}async send(t,e,r){var n=this.h?new AbortController:void 0,i=n&&t.ma>0?setTimeout(()=>{n.abort()},t.ma):void 0;try{let i=await fetch(t.url,{method:t.cb,headers:{...t.bb},...t.body&&{body:t.body},...t.withCredentials&&{credentials:"include"},signal:t.ma&&n?n.signal:null});200===i.status?e?.(await i.text()):r?.(i.status)}catch(t){if("AbortError"===t?.name)r?.(408);else r?.(400)}finally{clearTimeout(i)}}},Eh=class extends li{constructor(t){super(t,37)}},Ah=[-4,{},js,xs,Ps],wh=[0,Es,xs,1,Es,-1,xs,1,xs,1,hs],Th=[0,xs,Es,-2],bh=[0,Es,xs],kh=[0,Es,xs],Sh=[0,gs,-3],Lh=[0,xs,Es,-1,hs,ds,-1,Es,-5,As,[0,Es,-4],-1,gs,[0,gs,-3],xs];var xh=class extends li{constructor(t){super(t,19)}},Rh=Os([-19,{},[0,xs,1,[0,Es,-6,hs,ds,Es,-1,hs],1,[0,Es,1,Es,-5],Es,-1,[0,xs,Es,-8],[0,Es,-3],[0,Es,xs,Es,-2],[0,Es,-1,xs,Es,-1,xs,Es,-1,[0,As,[0,Es,-1],gs,Es,-5],[0,xs,gs,ds,-2]],hs,[0,Es,-3,hs,ds,Es,-1],[0,xs,Es,-1],[0,Es,-9],[0,Es,-6,xs,Es,1,Es,gs,xs,-1,gs,Es,-2,xs,Es,xs,Es,ds,-1],1,[0,xs],1,[0,Es,-4],1,wh,[0,[1,2,3,4,5,6],ws,wh,ws,bh,ws,kh,ws,[0,xs],ws,Lh,ws,Th],bh,kh,Lh,[0,[0,xs,Es,-1,hs,ds,-1,Es,-4,As,[0,Es,-4],-1,1,Sh],[0,xs,Es,-1,hs,ds,-1,Es,-4,Sh]],Th,[0,Es,[0,ds,-3,xs],xs,-2,[0,ds,-1],gs],4,[0,Es,xs,Es,-1,hs,xs,Es,-1,xs,ds,-1]],xs,As,[-37,{},as,Es,As,[0,Es,-1],Ts,1,Ts,[0,_s,-1,fs,us,-1],Es,[0,ds,Es,-1],gs,ds,hs,Es,-1,Is,Ds,as,Ts,xs,fs,hs,-1,[0,xs,-1],Es,gs,Es,ps,Es,-1,rs,1,rs,Ah,gs,[0,xs,[0,ns,ds,-2],[0,ns]],[0,xs,hs]],as,bs,Es,-1,as,xs,-1,[0,gs,-1,xs,gs],[0,hs,-1,Es],[0,as,gs,hs],hs,1,ks,1,Ah]),Ih=class{constructor(t){this.i=[],this.o=new yh,this.l=t??"",this.h=setInterval(()=>{this.flush()},6e4)}close(){void 0!==this.h&&(clearInterval(this.h),this.h=void 0),this.flush()}flush(t,e){if(this.error)e?.("net-send-failed");else if(0===this.i.length)t?.();else{var r=this.i;this.i=[],r=function(t){var e=new xh;return Fr(e=hr(e,2,ne(1786)),3,t)}(r),r=Rh(r),this.o.send({url:"https://odml.pa.googleapis.com/v1/log",cb:"POST",ma:1e4,body:r,ib:2,bb:{"Content-Type":"application/x-protobuf","x-goog-api-key":this.l},withCredentials:!1},()=>{t?.()},t=>{this.error=Error(`Logging failed with HTTP error: ${t}`),this.i=[],void 0!==this.h&&(clearInterval(this.h),this.h=void 0),e?.("net-send-failed",t)})}}};class Fh{constructor(){this.ba=this.V=this.Y=this.S=this.W=this.U=this.R=0}}function Ch(t,e){var r=new _h;r=Rr(r,0,1,t.C),r=Rr(r,0,2,e),e=hr(e=new Eh,6,ft(r=r.h(),!1)),(t=t.m).error||t.i.push(e)}function Nh(t,e){var r={R:e.R-t.l.R,U:e.U-t.l.U,W:e.W-t.l.W,S:e.S-t.l.S,Y:e.Y-t.l.Y,V:e.V,ba:e.ba},n=ph(fh(new mh,t.D),1);r=Oh(t,r),Ch(t,n=Ir(n,4,gh,r)),t.l=e}function Oh(t,e){var r=new uh;return t=Br(t=Ur(t=hr(r,1,ne(t.F)),7,e.S),5,e.V),t=Br(t,6,e.ba),e.W>0&&Br(t,4,e.Y/e.W),0!==e.R&&(r=Ur(r=ah(3),2,e.R),Nr(t,8,hh,r)),0!==e.U&&(e=Ur(r=ah(4),2,e.U),Nr(t,8,hh,e)),t}var Mh=class{constructor(t,e,r){this.v=performance.now(),this.o=performance.now(),this.i=new Map,this.u=0,this.h=new Fh,this.l=new Fh,this.m=new Ih(r),this.D=function(t){switch(t){case"AudioClassifier":return 4;case"AudioEmbedder":return 5;case"TextClassifier":return 6;case"TextEmbedder":return 7;case"GestureRecognizer":return 8;case"HandDetector":return 9;case"HandLandmarker":return 10;case"ImageClassifier":return 11;case"ImageEmbedder":return 12;case"ImageSegmenter":return 13;case"ObjectDetector":return 14;case"FaceDetector":return 15;case"FaceLandmarker":return 16;case"InteractiveSegmenter":case"InteractiveSegmenterLegacy":return 18;case"HolisticLandmarker":return 20;case"LlmInference":return 21;case"LanguageDetector":return 22;case"PoseLandmarker":return 23;case"UniversalEmbedder":return 28;case"SemanticRetriever":return 29;case"DecisionMaker":return 30;case"TextSummarizer":return 26;case"TextProofreader":return 27;case"AudioTranscriber":return 31;case"TextToSpeech":return 32;default:return 0}}(t),this.F=function(t){switch(t){case"IMAGE":return 11;case"VIDEO":return 12;case"LIVE_STREAM":return 13;case"AUDIO_CLIPS":return 14;case"AUDIO_STREAM":return 15;default:return 10}}(e),t=new vh,"undefined"==typeof navigator?e=0:(e=navigator.userAgent,e=/Android/i.test(e)?1:/iPhone|iPad|iPod/i.test(e)?2:/Windows/i.test(e)?5:/Macintosh/i.test(e)?4:/Linux/i.test(e)?3:0),t=hr(t,1,ne(e)),t=hr(t,2,_e("")),t=hr(t,3,_e("")),t=hr(t,4,_e("1.2.1")),t=hr(t,5,_e("")),this.C=hr(t,6,ne(function(){var t=globalThis.__HOST_ENVIRONMENT__;if("string"==typeof t)switch(t){case"ANDROID":return 1;case"IOS":return 2;case"PYTHON":return 3;case"WEB":break;case"FLUTTER":return 5;case"FLUTTER_WEB":return 6;default:return 0}return 4}()))}za(){var t=new dh;t=Br(t=hr(t,1,ne(this.F)),3,performance.now()-this.v),Ch(this,t=Ir(ph(fh(new mh,this.D),0),3,gh,t)),this.o=performance.now()}Aa(t){var e=this.i.get(t);if(void 0!==e&&(this.i.delete(t),t=performance.now()-e,++this.h.W,this.h.Y+=t,this.h.V=Math.max(this.h.V,t),this.u=Math.max(this.u,t),performance.now()>this.o+3e4)){for(let[r,n]of this.i.entries())t=r,n<e&&(this.h.S++,this.i.delete(t));e={...this.h,ba:performance.now()-this.o},this.h.V=0,this.o=performance.now(),Nh(this,e)}}ya(){var t={...this.h,S:this.h.S+this.i.size,V:this.u,ba:performance.now()-this.v};Nh(this,t);var e=new lh;e=Rr(e,0,2,t=Oh(this,t)),Ch(this,e=Ir(t=ph(fh(new mh,this.D),2),5,gh,e))}close(){var t=this.m;"function"==typeof t.close?t.close():t.flush()}};function Dh(){var t=navigator;return"undefined"!=typeof OffscreenCanvas&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(t)||!!((t=t.userAgent.match(/Version\/([\d]+).*Safari/))&&t.length>=1&&Number(t[1])>=17))}async function Ph(t){if("function"!=typeof importScripts){let e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise((t,r)=>{e.addEventListener("load",()=>{t()},!1),e.addEventListener("error",t=>{r(t)},!1),document.body.appendChild(e)})}try{importScripts(t.toString())}catch(e){if(!(e instanceof TypeError))throw e;{let e=self.import;e?await e(t.toString()):await import(t.toString())}}}function $h(t){return 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]}function Uh(t,e,r){t.o||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),r(e=t.j.stringToNewUTF8(e)),t.j._free(e)}function Bh(t,e,r){if(!t.j.canvas)throw Error("No OpenGL canvas configured.");if(r?t.j._bindTextureToStream(r):t.j._bindTextureToCanvas(),!(r=t.j.canvas.getContext("webgl2")||t.j.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");t.j.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e),t.j.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1);var[n,i]=$h(e);return!t.l||n===t.j.canvas.width&&i===t.j.canvas.height||(t.j.canvas.width=n,t.j.canvas.height=i),[n,i]}function jh(t,e,r){t.o||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");var n=new Uint32Array(e.length);for(let r=0;r<e.length;r++)n[r]=t.j.stringToNewUTF8(e[r]);e=t.j._malloc(4*n.length),t.j.HEAPU32.set(n,e>>2),r(e);for(let e of n)t.j._free(e);t.j._free(e)}function Gh(t,e,r){t.j.simpleListeners=t.j.simpleListeners||{},t.j.simpleListeners[e]=r}function Vh(t,e,r){var n=[];t.j.simpleListeners=t.j.simpleListeners||{},t.j.simpleListeners[e]=(t,e,i)=>{e?(r(n,i),n=[]):n.push(t)}}var Hh=class{constructor(t,e){this.l=!0,this.j=t,this.h=null,this.i=0,this.o="function"==typeof this.j._addIntToInputStream,void 0!==e?this.j.canvas=e:Dh()?this.j.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.j.canvas=document.createElement("canvas"))}async initializeGraph(t){var 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){var r=t.length,n=this.j._malloc(r);this.j.HEAPU8.set(t,n),e?this.j._changeBinaryGraph(r,n):this.j._changeTextGraph(r,n),this.j._free(n)}configureAudio(t,e,r,n,i){this.j._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),Uh(this,n||"input_audio",n=>{Uh(this,i=i||"audio_header",i=>{this.j._configureAudio(n,i,t,e??0,r)})})}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.j._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.j.gpuOriginForWebTexturesIsBottomLeft=t}ka(t){Gh(this,"__graph_config__",e=>{t(e)}),Uh(this,"__graph_config__",t=>{this.j._getGraphConfig(t,void 0)}),delete this.j.simpleListeners.__graph_config__}attachErrorListener(t){this.j.errorListener=t}attachEmptyPacketListener(t,e){this.j.emptyPacketListeners=this.j.emptyPacketListeners||{},this.j.emptyPacketListeners[t]=e}addAudioToStream(t,e,r){this.addAudioToStreamWithShape(t,0,0,e,r)}addAudioToStreamWithShape(t,e,r,n,i){var s=4*t.length;this.i!==s&&(this.h&&this.j._free(this.h),this.h=this.j._malloc(s),this.i=s),this.j.HEAPF32.set(t,this.h/4),Uh(this,n,t=>{this.j._addAudioToInputStream(this.h,e,r,t,i)})}addGpuBufferToStream(t,e,r){Uh(this,e,e=>{var[n,i]=Bh(this,t,e);this.j._addBoundTextureToStream(e,n,i,r)})}addBoolToStream(t,e,r){Uh(this,e,e=>{this.j._addBoolToInputStream(t,e,r)})}addDoubleToStream(t,e,r){Uh(this,e,e=>{this.j._addDoubleToInputStream(t,e,r)})}addFloatToStream(t,e,r){Uh(this,e,e=>{this.j._addFloatToInputStream(t,e,r)})}addIntToStream(t,e,r){Uh(this,e,e=>{this.j._addIntToInputStream(t,e,r)})}addUintToStream(t,e,r){Uh(this,e,e=>{this.j._addUintToInputStream(t,e,r)})}addStringToStream(t,e,r){Uh(this,e,e=>{Uh(this,t,t=>{this.j._addStringToInputStream(t,e,r)})})}addStringRecordToStream(t,e,r){Uh(this,e,e=>{jh(this,Object.keys(t),n=>{jh(this,Object.values(t),i=>{this.j._addFlatHashMapToInputStream(n,i,Object.keys(t).length,e,r)})})})}addProtoToStream(t,e,r,n){Uh(this,r,r=>{Uh(this,e,e=>{var i=this.j._malloc(t.length);this.j.HEAPU8.set(t,i),this.j._addProtoToInputStream(i,t.length,e,r,n),this.j._free(i)})})}addEmptyPacketToStream(t,e){Uh(this,t,t=>{this.j._addEmptyPacketToInputStream(t,e)})}addBoolVectorToStream(t,e,r){Uh(this,e,e=>{var n=this.j._allocateBoolVector(t.length);if(!n)throw Error("Unable to allocate new bool vector on heap.");for(let e of t)this.j._addBoolVectorEntry(n,e);this.j._addBoolVectorToInputStream(n,e,r)})}addDoubleVectorToStream(t,e,r){Uh(this,e,e=>{var n=this.j._allocateDoubleVector(t.length);if(!n)throw Error("Unable to allocate new double vector on heap.");for(let e of t)this.j._addDoubleVectorEntry(n,e);this.j._addDoubleVectorToInputStream(n,e,r)})}addFloatVectorToStream(t,e,r){Uh(this,e,e=>{var n=this.j._allocateFloatVector(t.length);if(!n)throw Error("Unable to allocate new float vector on heap.");for(let e of t)this.j._addFloatVectorEntry(n,e);this.j._addFloatVectorToInputStream(n,e,r)})}addIntVectorToStream(t,e,r){Uh(this,e,e=>{var n=this.j._allocateIntVector(t.length);if(!n)throw Error("Unable to allocate new int vector on heap.");for(let e of t)this.j._addIntVectorEntry(n,e);this.j._addIntVectorToInputStream(n,e,r)})}addUintVectorToStream(t,e,r){Uh(this,e,e=>{var n=this.j._allocateUintVector(t.length);if(!n)throw Error("Unable to allocate new unsigned int vector on heap.");for(let e of t)this.j._addUintVectorEntry(n,e);this.j._addUintVectorToInputStream(n,e,r)})}addStringVectorToStream(t,e,r){Uh(this,e,e=>{var n=this.j._allocateStringVector(t.length);if(!n)throw Error("Unable to allocate new string vector on heap.");for(let e of t)Uh(this,e,t=>{this.j._addStringVectorEntry(n,t)});this.j._addStringVectorToInputStream(n,e,r)})}addBoolToInputSidePacket(t,e){Uh(this,e,e=>{this.j._addBoolToInputSidePacket(t,e)})}addDoubleToInputSidePacket(t,e){Uh(this,e,e=>{this.j._addDoubleToInputSidePacket(t,e)})}addFloatToInputSidePacket(t,e){Uh(this,e,e=>{this.j._addFloatToInputSidePacket(t,e)})}addIntToInputSidePacket(t,e){Uh(this,e,e=>{this.j._addIntToInputSidePacket(t,e)})}addUintToInputSidePacket(t,e){Uh(this,e,e=>{this.j._addUintToInputSidePacket(t,e)})}addStringToInputSidePacket(t,e){Uh(this,e,e=>{Uh(this,t,t=>{this.j._addStringToInputSidePacket(t,e)})})}addProtoToInputSidePacket(t,e,r){Uh(this,r,r=>{Uh(this,e,e=>{var n=this.j._malloc(t.length);this.j.HEAPU8.set(t,n),this.j._addProtoToInputSidePacket(n,t.length,e,r),this.j._free(n)})})}addBoolVectorToInputSidePacket(t,e){Uh(this,e,e=>{var r=this.j._allocateBoolVector(t.length);if(!r)throw Error("Unable to allocate new bool vector on heap.");for(let e of t)this.j._addBoolVectorEntry(r,e);this.j._addBoolVectorToInputSidePacket(r,e)})}addDoubleVectorToInputSidePacket(t,e){Uh(this,e,e=>{var r=this.j._allocateDoubleVector(t.length);if(!r)throw Error("Unable to allocate new double vector on heap.");for(let e of t)this.j._addDoubleVectorEntry(r,e);this.j._addDoubleVectorToInputSidePacket(r,e)})}addFloatVectorToInputSidePacket(t,e){Uh(this,e,e=>{var r=this.j._allocateFloatVector(t.length);if(!r)throw Error("Unable to allocate new float vector on heap.");for(let e of t)this.j._addFloatVectorEntry(r,e);this.j._addFloatVectorToInputSidePacket(r,e)})}addIntVectorToInputSidePacket(t,e){Uh(this,e,e=>{var r=this.j._allocateIntVector(t.length);if(!r)throw Error("Unable to allocate new int vector on heap.");for(let e of t)this.j._addIntVectorEntry(r,e);this.j._addIntVectorToInputSidePacket(r,e)})}addUintVectorToInputSidePacket(t,e){Uh(this,e,e=>{var r=this.j._allocateUintVector(t.length);if(!r)throw Error("Unable to allocate new unsigned int vector on heap.");for(let e of t)this.j._addUintVectorEntry(r,e);this.j._addUintVectorToInputSidePacket(r,e)})}addStringVectorToInputSidePacket(t,e){Uh(this,e,e=>{var r=this.j._allocateStringVector(t.length);if(!r)throw Error("Unable to allocate new string vector on heap.");for(let e of t)Uh(this,e,t=>{this.j._addStringVectorEntry(r,t)});this.j._addStringVectorToInputSidePacket(r,e)})}attachBoolListener(t,e){Gh(this,t,e),Uh(this,t,t=>{this.j._attachBoolListener(t)})}attachBoolVectorListener(t,e){Vh(this,t,e),Uh(this,t,t=>{this.j._attachBoolVectorListener(t)})}attachIntListener(t,e){Gh(this,t,e),Uh(this,t,t=>{this.j._attachIntListener(t)})}attachIntVectorListener(t,e){Vh(this,t,e),Uh(this,t,t=>{this.j._attachIntVectorListener(t)})}attachUintListener(t,e){Gh(this,t,e),Uh(this,t,t=>{this.j._attachUintListener(t)})}attachUintVectorListener(t,e){Vh(this,t,e),Uh(this,t,t=>{this.j._attachUintVectorListener(t)})}attachDoubleListener(t,e){Gh(this,t,e),Uh(this,t,t=>{this.j._attachDoubleListener(t)})}attachDoubleVectorListener(t,e){Vh(this,t,e),Uh(this,t,t=>{this.j._attachDoubleVectorListener(t)})}attachFloatListener(t,e){Gh(this,t,e),Uh(this,t,t=>{this.j._attachFloatListener(t)})}attachFloatVectorListener(t,e){Vh(this,t,e),Uh(this,t,t=>{this.j._attachFloatVectorListener(t)})}attachStringListener(t,e){Gh(this,t,e),Uh(this,t,t=>{this.j._attachStringListener(t)})}attachStringVectorListener(t,e){Vh(this,t,e),Uh(this,t,t=>{this.j._attachStringVectorListener(t)})}attachProtoListener(t,e,r){Gh(this,t,e),Uh(this,t,t=>{this.j._attachProtoListener(t,r||!1)})}attachProtoVectorListener(t,e,r){Vh(this,t,e),Uh(this,t,t=>{this.j._attachProtoVectorListener(t,r||!1)})}attachAudioListener(t,e,r){this.j._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Gh(this,t,(t,r)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,r)}),Uh(this,t,t=>{this.j._attachAudioListener(t,r||!1)})}finishProcessing(){this.j._waitUntilIdle()}closeGraph(){this.j._closeGraph(),this.j.simpleListeners=void 0,this.j.emptyPacketListeners=void 0}};function Kh(t){return class extends t{get qa(){return this.j}Ta(){if("function"==typeof this.qa._mediapipeLoggerGetEncodedApiKey){let t=this.qa._mediapipeLoggerGetEncodedApiKey();return this.qa._decodeBase64(t)}}}}function Xh(t){return class extends t{ab(){this.j._registerModelResourcesGraphService()}}}var Wh=Kh(Xh(Hh)),Yh=class extends Wh{};async function zh(t,e,r,n){return t=await(async(t,e,r,n,i)=>{if(e&&await Ph(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(r&&(await Ph(r),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&i&&((e=self.Module).locateFile=i.locateFile,i.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=i.mainScriptUrlOrBlob)),i=await self.ModuleFactory(self.Module||i),self.ModuleFactory=self.Module=void 0,new t(i,n)})(t,r.wasmLoaderPath,r.assetLoaderPath,e,{locateFile:t=>t.endsWith(".wasm")?r.wasmBinaryPath.toString():r.assetBinaryPath&&t.endsWith(".data")?r.assetBinaryPath.toString():t}),function(t,e){e=e.runningMode??"";var r=t.h.Ta();t.o=new Mh(t.D(),e,r)}(t,n),await t.A(n),t}async function qh(t,e,r,n){return zh(t,e,r,n)}function Jh(t,e,r){try{t.h.j.FS_unlink(`/${r}`)}catch{}t.h.j.FS_createDataFile("/",r,e,!0,!1,!1),Zh(t,`/${r}`)}function Zh(t,e){var r=kr(t.baseOptions,zo,1)||new zo;"string"==typeof e?(hr(r,2,_e(e)),hr(r,1)):e instanceof Uint8Array&&(hr(r,1,ft(e,!1)),hr(r,2)),Rr(t.baseOptions,0,1,r)}function Qh(t){try{let e=t.L.length;if(1===e)throw Error(t.L[0].message);if(e>1)throw Error("Encountered multiple errors: "+t.L.map(t=>t.message).join(", "))}finally{t.L=[]}}function tu(t,e){t.J=Math.max(t.J,e)}function eu(t,e){t.F=new co,Vr(t.F,2,"PassThroughCalculator"),ho(t.F,"free_memory"),uo(t.F,"free_memory_unused_out"),go(e,"free_memory"),mo(e,t.F)}function ru(t,e){ho(t.F,e),uo(t.F,e+"_unused_out")}function nu(t){t.h.addBoolToStream(!0,"free_memory",t.J)}var iu=class{constructor(t){this.h=t,this.L=[],this.J=0,this.h.setAutoRenderToScreen(!1)}l(t,e=!0,r=!1,n=!1){if(e){let e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(kr(this.baseOptions,zo,1)?.h()||kr(this.baseOptions,zo,1)?.l()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");!function(t,e,r=!1){var n=kr(t.baseOptions,Wo,3);if(!n){var i=n=new Wo,s=new eo;Ir(i,4,Yo,s)}"delegate"in e&&("GPU"===e.delegate?(e=n,i=new Ys,Ir(e,2,Yo,i)):(e=n,i=new eo,Ir(e,4,Yo,i))),r&&(r=n.l(),e=n.h()||!0===r?.h(),r=new Zs,e?Rr(r,0,9,e=new Js):Rr(r,0,8,e=new qs),Ir(n,6,Yo,r)),Rr(t.baseOptions,0,3,n)}(this,e,n);let i=r?"model.litertlm":"model.dat";if(e.modelAssetPath)return fetch(e.modelAssetPath.toString()).then(t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${e.modelAssetPath} (${t.status})`)}).then(t=>{Jh(this,new Uint8Array(t),i),this.u(),this.M()});if(e.modelAssetBuffer instanceof Uint8Array)r?Jh(this,e.modelAssetBuffer,i):Zh(this,e.modelAssetBuffer);else if(e.modelAssetBuffer)return async function(t){for(var e=[],r=0;;){let{done:n,value:i}=await t.read();if(n)break;e.push(i),r+=i.length}if(0===e.length)return new Uint8Array(0);if(1===e.length)return e[0];t=new Uint8Array(r),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}(e.modelAssetBuffer).then(t=>{r?Jh(this,t,i):Zh(this,t),this.u(),this.M()})}return this.u(),this.M(),Promise.resolve()}M(){}ka(){var t;if(this.h.ka(e=>{t=Eo(e)}),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.h.attachErrorListener((t,e)=>{this.L.push(Error(e))}),this.h.ab(),this.h.setGraph(t,e),this.o?.za(),this.F=void 0,Qh(this)}finishProcessing(t){this.h.finishProcessing(),Qh(this),this.o&&void 0!==t&&this.o.Aa(t)}close(){this.F=void 0,this.o?.ya(),this.o?.close(),this.h.closeGraph()}};function su(t,e){if(!t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}iu.prototype.close=iu.prototype.close;class ou{constructor(t,e,r,n){this.h=t,this.i=e,this.o=r,this.l=n}bind(){this.h.bindVertexArray(this.i)}close(){this.h.deleteVertexArray(this.i),this.h.deleteBuffer(this.o),this.h.deleteBuffer(this.l)}}function au(t,e,r){var n=t.h;if(r=su(n.createShader(r),"Failed to create WebGL shader"),n.shaderSource(r,e),n.compileShader(r),!n.getShaderParameter(r,n.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${n.getShaderInfoLog(r)}`);return n.attachShader(t.i,r),r}function hu(t,e){var r=t.h,n=su(r.createVertexArray(),"Failed to create vertex array");r.bindVertexArray(n);var i=su(r.createBuffer(),"Failed to create buffer");r.bindBuffer(r.ARRAY_BUFFER,i),r.enableVertexAttribArray(t.G),r.vertexAttribPointer(t.G,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),r.STATIC_DRAW);var s=su(r.createBuffer(),"Failed to create buffer");return r.bindBuffer(r.ARRAY_BUFFER,s),r.enableVertexAttribArray(t.L),r.vertexAttribPointer(t.L,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array(e?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,null),r.bindVertexArray(null),new ou(r,n,i,s)}function uu(t,e){if(t.h){if(e!==t.h)throw Error("Cannot change GL context once initialized")}else t.h=e}function cu(t,e,r,n){return uu(t,e),t.i||(t.o(),t.J()),r?(t.m||(t.m=hu(t,!0)),r=t.m):(t.F||(t.F=hu(t,!1)),r=t.F),e.useProgram(t.i),r.bind(),t.l(),t=n(),r.h.bindVertexArray(null),t}function lu(t,e,r){return uu(t,e),t=su(e.createTexture(),"Failed to create texture"),e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,r??e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r??e.LINEAR),e.bindTexture(e.TEXTURE_2D,null),t}function du(t,e,r){uu(t,e),t.D||(t.D=su(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.D),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0)}function fu(t){t.h?.bindFramebuffer(t.h.FRAMEBUFFER,null)}var pu=class{C(){return"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n "}o(){var t=this.h;if(this.i=su(t.createProgram(),"Failed to create WebGL program"),this.ea=au(this,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",t.VERTEX_SHADER),this.aa=au(this,this.C(),t.FRAGMENT_SHADER),t.linkProgram(this.i),!t.getProgramParameter(this.i,t.LINK_STATUS))throw Error(`Error during program linking: ${t.getProgramInfoLog(this.i)}`);this.G=t.getAttribLocation(this.i,"aVertex"),this.L=t.getAttribLocation(this.i,"aTex")}J(){}l(){}close(){if(this.i){let t=this.h;t.deleteProgram(this.i),t.deleteShader(this.ea),t.deleteShader(this.aa)}this.D&&this.h.deleteFramebuffer(this.D),this.F&&this.F.close(),this.m&&this.m.close()}};var mu=class extends pu{C(){return"\n precision mediump float;\n uniform sampler2D backgroundTexture;\n uniform sampler2D maskTexture;\n uniform sampler2D colorMappingTexture;\n varying vec2 vTex;\n void main() {\n vec4 backgroundColor = texture2D(backgroundTexture, vTex);\n float category = texture2D(maskTexture, vTex).r;\n vec4 categoryColor = texture2D(colorMappingTexture, vec2(category, 0.0));\n gl_FragColor = mix(backgroundColor, categoryColor, categoryColor.a);\n }\n "}J(){var t=this.h;t.activeTexture(t.TEXTURE1),this.v=lu(this,t,t.LINEAR),t.activeTexture(t.TEXTURE2),this.u=lu(this,t,t.NEAREST)}o(){super.o();var t=this.h;this.P=su(t.getUniformLocation(this.i,"backgroundTexture"),"Uniform location"),this.Z=su(t.getUniformLocation(this.i,"colorMappingTexture"),"Uniform location"),this.M=su(t.getUniformLocation(this.i,"maskTexture"),"Uniform location")}l(){super.l();var t=this.h;t.uniform1i(this.M,0),t.uniform1i(this.P,1),t.uniform1i(this.Z,2)}close(){this.v&&this.h.deleteTexture(this.v),this.u&&this.h.deleteTexture(this.u),super.close()}},gu=class extends pu{C(){return"\n precision mediump float;\n uniform sampler2D maskTexture;\n uniform sampler2D defaultTexture;\n uniform sampler2D overlayTexture;\n varying vec2 vTex;\n void main() {\n float confidence = texture2D(maskTexture, vTex).r;\n vec4 defaultColor = texture2D(defaultTexture, vTex);\n vec4 overlayColor = texture2D(overlayTexture, vTex);\n // Apply the alpha from the overlay and merge in the default color\n overlayColor = mix(defaultColor, overlayColor, overlayColor.a);\n gl_FragColor = mix(defaultColor, overlayColor, confidence);\n }\n "}J(){var t=this.h;t.activeTexture(t.TEXTURE1),this.u=lu(this,t),t.activeTexture(t.TEXTURE2),this.v=lu(this,t)}o(){super.o();var t=this.h;this.M=su(t.getUniformLocation(this.i,"defaultTexture"),"Uniform location"),this.P=su(t.getUniformLocation(this.i,"overlayTexture"),"Uniform location"),this.K=su(t.getUniformLocation(this.i,"maskTexture"),"Uniform location")}l(){super.l();var t=this.h;t.uniform1i(this.K,0),t.uniform1i(this.M,1),t.uniform1i(this.P,2)}close(){this.u&&this.h.deleteTexture(this.u),this.v&&this.h.deleteTexture(this.v),super.close()}};function vu(t,e){switch(e){case 0:return t.h.find(t=>t instanceof Uint8Array);case 1:return t.h.find(t=>t instanceof Float32Array);case 2:return t.h.find(t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function _u(t){var e=vu(t,1);if(!e){if(e=vu(t,0))e=new Float32Array(e).map(t=>t/255);else{e=new Float32Array(t.width*t.height);let n=Eu(t);var r=wu(t);if(du(r,n,yu(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){r=new Float32Array(t.width*t.height*4),n.readPixels(0,0,t.width,t.height,n.RGBA,n.FLOAT,r);for(let t=0,n=0;t<e.length;++t,n+=4)e[t]=r[n]}else n.readPixels(0,0,t.width,t.height,n.RED,n.FLOAT,e)}t.h.push(e)}return e}function yu(t){var e=vu(t,2);if(!e){let r=Eu(t);e=Tu(t);let n=_u(t),i=Au(t);r.texImage2D(r.TEXTURE_2D,0,i,t.width,t.height,0,r.RED,r.FLOAT,n),bu(t)}return e}function Eu(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.i||(t.i=su(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.i}function Au(t){if(t=Eu(t),!ku)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))ku=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");ku=t.R16F}return ku}function wu(t){return t.l||(t.l=new pu),t.l}function Tu(t){var e=Eu(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);var r=vu(t,2);return r||(r=lu(wu(t),e,t.o?e.LINEAR:e.NEAREST),t.h.push(r),t.u=!0),e.bindTexture(e.TEXTURE_2D,r),r}function bu(t){t.i.bindTexture(t.i.TEXTURE_2D,null)}var ku,Su=class{constructor(t,e,r,n,i,s,o){this.h=t,this.o=e,this.u=r,this.canvas=n,this.l=i,this.width=s,this.height=o,this.u&&(0===--Lu&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources."))}Va(){return!!vu(this,0)}va(){return!!vu(this,1)}X(){return!!vu(this,2)}ua(){return(e=vu(t=this,0))||(e=_u(t),e=new Uint8Array(e.map(t=>Math.round(255*t))),t.h.push(e)),e;var t,e}ta(){return _u(this)}T(){return yu(this)}clone(){var t=[];for(let e of this.h){let r;if(e instanceof Uint8Array)r=new Uint8Array(e);else if(e instanceof Float32Array)r=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{let t=Eu(this),e=wu(this);t.activeTexture(t.TEXTURE1),r=lu(e,t,this.o?t.LINEAR:t.NEAREST),t.bindTexture(t.TEXTURE_2D,r);let n=Au(this);t.texImage2D(t.TEXTURE_2D,0,n,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),du(e,t,r),cu(e,t,!1,()=>{Tu(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),bu(this)}),fu(e),bu(this)}}t.push(r)}return new Su(t,this.o,this.X(),this.canvas,this.l,this.width,this.height)}close(){this.u&&Eu(this).deleteTexture(vu(this,2)),Lu=-1}};Su.prototype.close=Su.prototype.close,Su.prototype.clone=Su.prototype.clone,Su.prototype.getAsWebGLTexture=Su.prototype.T,Su.prototype.getAsFloat32Array=Su.prototype.ta,Su.prototype.getAsUint8Array=Su.prototype.ua,Su.prototype.hasWebGLTexture=Su.prototype.X,Su.prototype.hasFloat32Array=Su.prototype.va,Su.prototype.hasUint8Array=Su.prototype.Va;var Lu=250,xu={color:"white",lineWidth:4,radius:6};function Ru(t){return{...xu,fillColor:(t=t||{}).color,...t}}function Iu(t,e){return t instanceof Function?t(e):t}function Fu(t,e,r){return Math.max(Math.min(e,r),Math.min(Math.max(e,r),t))}function Cu(t){if(!t.l)throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");return t.l}function Nu(t){if(!t.u)throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");return t.u}function Ou(t,e,r){if(e.X())r(e.T());else{let n=e.va()?e.ta():e.ua();t.o=t.o??new pu;let i=Nu(t);r((t=new Su([n],e.o,!1,i.canvas,t.o,e.width,e.height)).T()),t.close()}}function Mu(t,e,r,n){var i=function(t){return t.h||(t.h=new mu),t.h}(t),s=Nu(t),o=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r;cu(i,s,!0,()=>{!function(t,e,r,n){var i=t.h;if(i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,e),i.activeTexture(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,t.v),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,r),t.K&&function(t,e){if(t!==e)return!1;t=t.entries(),e=e.entries();for(let[r,n]of t){t=r;let i=n,s=e.next();if(s.done)return!1;let[o,a]=s.value;if(t!==o||i[0]!==a[0]||i[1]!==a[1]||i[2]!==a[2]||i[3]!==a[3])return!1}return!!e.next().done}(t.K,n))i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.u);else{t.K=n;let e=Array(1024).fill(0);n.forEach((t,r)=>{if(4!==t.length)throw Error(`Color at index ${r} is not a four-channel value.`);e[4*r]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]}),i.activeTexture(i.TEXTURE2),i.bindTexture(i.TEXTURE_2D,t.u),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,256,1,0,i.RGBA,i.UNSIGNED_BYTE,new Uint8Array(e))}}(i,e,o,n),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.drawArrays(s.TRIANGLE_FAN,0,4);var t=i.h;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,null)})}function Du(t,e,r,n){var i=Nu(t),s=function(t){return t.i||(t.i=new gu),t.i}(t),o=Array.isArray(r)?new ImageData(new Uint8ClampedArray(r),1,1):r,a=Array.isArray(n)?new ImageData(new Uint8ClampedArray(n),1,1):n;cu(s,i,!0,()=>{var t=s.h;t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,s.u),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,s.v),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,a),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.drawArrays(i.TRIANGLE_FAN,0,4),i.bindTexture(i.TEXTURE_2D,null),(t=s.h).activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,null)})}var Pu=class{constructor(t,e){"undefined"!=typeof CanvasRenderingContext2D&&t instanceof CanvasRenderingContext2D||t instanceof OffscreenCanvasRenderingContext2D?(this.l=t,this.u=e):this.u=t}Na(t,e){if(t){var r=Cu(this);e=Ru(e),r.save();var n=r.canvas,i=0;for(let s of t)r.fillStyle=Iu(e.fillColor,{index:i,from:s}),r.strokeStyle=Iu(e.color,{index:i,from:s}),r.lineWidth=Iu(e.lineWidth,{index:i,from:s}),(t=new Path2D).arc(s.x*n.width,s.y*n.height,Iu(e.radius,{index:i,from:s}),0,2*Math.PI),r.fill(t),r.stroke(t),++i;r.restore()}}Ma(t,e,r){if(t&&e){var n=Cu(this);r=Ru(r),n.save();var i=n.canvas,s=0;for(let o of e){n.beginPath(),e=t[o.start];let a=t[o.end];e&&a&&(n.strokeStyle=Iu(r.color,{index:s,from:e,to:a}),n.lineWidth=Iu(r.lineWidth,{index:s,from:e,to:a}),n.moveTo(e.x*i.width,e.y*i.height),n.lineTo(a.x*i.width,a.y*i.height)),++s,n.stroke()}n.restore()}}Ja(t,e){var r=Cu(this);e=Ru(e),r.save(),r.beginPath(),r.lineWidth=Iu(e.lineWidth,{}),r.strokeStyle=Iu(e.color,{}),r.fillStyle=Iu(e.fillColor,{}),r.moveTo(t.originX,t.originY),r.lineTo(t.originX+t.width,t.originY),r.lineTo(t.originX+t.width,t.originY+t.height),r.lineTo(t.originX,t.originY+t.height),r.lineTo(t.originX,t.originY),r.stroke(),r.fill(),r.restore()}Ka(t,e,r=[0,0,0,255]){this.l?function(t,e,r,n){var i=Nu(t);Ou(t,e,e=>{Mu(t,e,r,n),(e=Cu(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)})}(this,t,r,e):Mu(this,t.T(),r,e)}La(t,e,r){this.l?function(t,e,r,n){var i=Nu(t);Ou(t,e,e=>{Du(t,e,r,n),(e=Cu(t)).drawImage(i.canvas,0,0,e.canvas.width,e.canvas.height)})}(this,t,e,r):Du(this,t.T(),e,r)}close(){this.h?.close(),this.h=void 0,this.i?.close(),this.i=void 0,this.o?.close(),this.o=void 0}};function $u(t,e){switch(e){case 0:return t.h.find(t=>t instanceof ImageData);case 1:return t.h.find(t=>"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap);case 2:return t.h.find(t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture);default:throw Error(`Type is not supported: ${e}`)}}function Uu(t){var e=$u(t,0);if(!e){e=ju(t);let r=Gu(t),n=new Uint8Array(t.width*t.height*4);du(r,e,Bu(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,n),fu(r),e=new ImageData(new Uint8ClampedArray(n.buffer),t.width,t.height),t.h.push(e)}return e}function Bu(t){var e=$u(t,2);if(!e){let r=ju(t);e=Vu(t);let n=$u(t,1)||Uu(t);r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,n),Hu(t)}return e}function ju(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.i||(t.i=su(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.i}function Gu(t){return t.l||(t.l=new pu),t.l}function Vu(t){var e=ju(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);var r=$u(t,2);return r||(r=lu(Gu(t),e),t.h.push(r),t.o=!0),e.bindTexture(e.TEXTURE_2D,r),r}function Hu(t){t.i.bindTexture(t.i.TEXTURE_2D,null)}function Ku(t){var e=ju(t);return cu(Gu(t),e,!0,()=>function(t,e){var r=t.canvas;if(r.width===t.width&&r.height===t.height)return e();var n=r.width,i=r.height;return r.width=t.width,r.height=t.height,t=e(),r.width=n,r.height=i,t}(t,()=>{if(e.bindFramebuffer(e.FRAMEBUFFER,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.TRIANGLE_FAN,0,4),!(t.canvas instanceof OffscreenCanvas))throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");return t.canvas.transferToImageBitmap()}))}Pu.prototype.close=Pu.prototype.close,Pu.prototype.drawConfidenceMask=Pu.prototype.La,Pu.prototype.drawCategoryMask=Pu.prototype.Ka,Pu.prototype.drawBoundingBox=Pu.prototype.Ja,Pu.prototype.drawConnectors=Pu.prototype.Ma,Pu.prototype.drawLandmarks=Pu.prototype.Na,Pu.lerp=function(t,e,r,n,i){return Fu(n*(1-(t-e)/(r-e))+i*(1-(r-t)/(r-e)),n,i)},Pu.clamp=Fu;var Xu=class{constructor(t,e,r,n,i,s,o){this.h=t,this.u=e,this.o=r,this.canvas=n,this.l=i,this.width=s,this.height=o,(this.u||this.o)&&(0===--Wu&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources."))}Ua(){return!!$u(this,0)}wa(){return!!$u(this,1)}X(){return!!$u(this,2)}Ra(){return Uu(this)}Qa(){var t=$u(this,1);return t||(Bu(this),Vu(this),t=Ku(this),Hu(this),this.h.push(t),this.u=!0),t}T(){return Bu(this)}clone(){var t=[];for(let e of this.h){let r;if(e instanceof ImageData)r=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){let t=ju(this),e=Gu(this);t.activeTexture(t.TEXTURE1),r=lu(e,t),t.bindTexture(t.TEXTURE_2D,r),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.bindTexture(t.TEXTURE_2D,null),du(e,t,r),cu(e,t,!1,()=>{Vu(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Hu(this)}),fu(e),Hu(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);Bu(this),Vu(this),r=Ku(this),Hu(this)}t.push(r)}return new Xu(t,this.wa(),this.X(),this.canvas,this.l,this.width,this.height)}close(){this.u&&$u(this,1).close(),this.o&&ju(this).deleteTexture($u(this,2)),Wu=-1}};Xu.prototype.close=Xu.prototype.close,Xu.prototype.clone=Xu.prototype.clone,Xu.prototype.getAsWebGLTexture=Xu.prototype.T,Xu.prototype.getAsImageBitmap=Xu.prototype.Qa,Xu.prototype.getAsImageData=Xu.prototype.Ra,Xu.prototype.hasWebGLTexture=Xu.prototype.X,Xu.prototype.hasImageBitmap=Xu.prototype.wa,Xu.prototype.hasImageData=Xu.prototype.Ua;var Wu=250;function Yu(...t){return t.map(([t,e])=>({start:t,end:e}))}var zu,qu=Xh((zu=Kh(Hh),class extends zu{get pa(){return this.j}Ea(t,e,r){Uh(this,e,e=>{var[n,i]=Bh(this,t,e);this.pa._addBoundTextureAsImageToStream(e,n,i,r)})}ha(t,e){Gh(this,t,e),Uh(this,t,t=>{this.pa._attachImageListener(t)})}ia(t,e){Vh(this,t,e),Uh(this,t,t=>{this.pa._attachImageVectorListener(t)})}})),Ju=class extends qu{};async function Zu(t,e,r){return qh(t,r.canvas??(Dh()?void 0:document.createElement("canvas")),e,r)}function Qu(t,e,r,n){if(t.o&&void 0!==n){var i=kr(t.baseOptions,Wo,3);i?.h()||i?.l()?.h()?(++(i=t.o).h.U,i.i.set(n,performance.now())):(++(i=t.o).h.R,i.i.set(n,performance.now()))}if(t.ra){if(i=new Mo,r?.regionOfInterest){if(!t.Da)throw Error("This task doesn't support region-of-interest.");var s=r.regionOfInterest;if(s.left>=s.right||s.top>=s.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(s.left<0||s.top<0||s.right>1||s.bottom>1)throw Error("Expected RectF values to be in [0,1].");jr(i,1,(s.left+s.right)/2),jr(i,2,(s.top+s.bottom)/2),jr(i,4,s.right-s.left),jr(i,3,s.bottom-s.top)}else jr(i,1,.5),jr(i,2,.5),jr(i,4,1),jr(i,3,1);if(r?.rotationDegrees){if(r?.rotationDegrees%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(jr(i,5,-Math.PI*r.rotationDegrees/180),r?.rotationDegrees%180!=0){let[t,n]=$h(e);r=Mr(i,3)*n/t,s=Mr(i,4)*t/n,jr(i,4,r),jr(i,3,s)}}t.h.addProtoToStream(i.h(),"mediapipe.NormalizedRect",t.ra,n)}t.h.Ea(e,t.Ca,n??performance.now()),t.finishProcessing(n)}function tc(t,e,r){if(t.K)throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");Qu(t,e,r,t.J+1)}function ec(t,e,r,n){if(!t.K)throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");Qu(t,e,r,n)}function rc(t,e,r,n){var i=e.data,s=e.width,o=s*(e=e.height);if((i instanceof Uint8Array||i instanceof Float32Array)&&i.length!==o)throw Error("Unsupported channel count: "+i.length/o);return t=new Su([i],r,!1,t.h.j.canvas,t.ea,s,e),n?t.clone():t}var nc=class extends iu{constructor(t,e,r,n){super(t),this.h=t,this.Ca=e,this.ra=r,this.Da=n,this.ea=new pu,this.K=!1}l(t,e=!0,r=!1,n=!1){if("runningMode"in t){var i=this.K=!!t.runningMode&&"IMAGE"!==t.runningMode;hr(this.baseOptions,2,null==i?i:te(i))}if(void 0!==t.canvas&&this.h.j.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e,r,n)}close(){this.ea.close(),super.close()}};nc.prototype.close=nc.prototype.close;var ic=class extends nc{constructor(t,e){super(new Ju(t,e),"image_in","norm_rect_in",!1),this.m={detections:[]},Rr(t=this.i=new ta,0,1,e=new qo),jr(this.i,2,.5),jr(this.i,3,.3)}D(){return"FaceDetector"}get baseOptions(){return kr(this.i,qo,1)}set baseOptions(t){Rr(this.i,0,1,t)}A(t){return"minDetectionConfidence"in t&&jr(this.i,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&jr(this.i,3,t.minSuppressionThreshold??.3),this.l(t)}H(t,e){return this.m={detections:[]},tc(this,t,e),this.m}I(t,e,r){return this.m={detections:[]},ec(this,t,r,e),this.m}u(){var t=new _o;go(t,"image_in"),go(t,"norm_rect_in"),vo(t,"detections");var e=new so;ci(e,ra,this.i);var r=new co;Vr(r,2,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),ho(r,"IMAGE:image_in"),ho(r,"NORM_RECT:norm_rect_in"),uo(r,"DETECTIONS:detections"),r.A(e),mo(t,r),this.h.attachProtoVectorListener("detections",(t,e)=>{for(let e of t)t=xo(e),this.m.detections.push(th(t));tu(this,e)}),this.h.attachEmptyPacketListener("detections",t=>{tu(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};ic.prototype.detectForVideo=ic.prototype.I,ic.prototype.detect=ic.prototype.H,ic.prototype.setOptions=ic.prototype.A,ic.createFromModelPath=async function(t,e){return Zu(ic,t,{baseOptions:{modelAssetPath:e}})},ic.createFromModelBuffer=function(t,e){return Zu(ic,t,{baseOptions:{modelAssetBuffer:e}})},ic.createFromOptions=function(t,e){return Zu(ic,t,e)};var sc=Yu([61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]),oc=Yu([263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]),ac=Yu([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),hc=Yu([474,475],[475,476],[476,477],[477,474]),uc=Yu([33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]),cc=Yu([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),lc=Yu([469,470],[470,471],[471,472],[472,469]),dc=Yu([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]),fc=[...sc,...oc,...ac,...uc,...cc,...dc],pc=Yu([127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]);function mc(t){t.m={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var gc=class extends nc{constructor(t,e){super(new Ju(t,e),"image_in","norm_rect",!1),this.m={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,Rr(t=this.i=new sa,0,1,e=new qo),this.C=new ia,Rr(this.i,0,3,this.C),this.v=new ta,Rr(this.i,0,2,this.v),$r(this.v,4,1),jr(this.v,2,.5),jr(this.C,2,.5),jr(this.i,4,.5)}D(){return"FaceLandmarker"}get baseOptions(){return kr(this.i,qo,1)}set baseOptions(t){Rr(this.i,0,1,t)}A(t){return"numFaces"in t&&$r(this.v,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&jr(this.v,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&jr(this.i,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&jr(this.C,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}H(t,e){return mc(this),tc(this,t,e),this.m}I(t,e,r){return mc(this),ec(this,t,r,e),this.m}u(){var t=new _o;go(t,"image_in"),go(t,"norm_rect"),vo(t,"face_landmarks");var e=new so;ci(e,aa,this.i);var r=new co;Vr(r,2,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),ho(r,"IMAGE:image_in"),ho(r,"NORM_RECT:norm_rect"),uo(r,"NORM_LANDMARKS:face_landmarks"),r.A(e),mo(t,r),this.h.attachProtoVectorListener("face_landmarks",(t,e)=>{for(let e of t)t=Co(e),this.m.faceLandmarks.push(eh(t));tu(this,e)}),this.h.attachEmptyPacketListener("face_landmarks",t=>{tu(this,t)}),this.outputFaceBlendshapes&&(vo(t,"blendshapes"),uo(r,"BLENDSHAPES:blendshapes"),this.h.attachProtoVectorListener("blendshapes",(t,e)=>{if(this.outputFaceBlendshapes)for(let e of t)t=bo(e),this.m.faceBlendshapes.push(Za(t.h()??[]));tu(this,e)}),this.h.attachEmptyPacketListener("blendshapes",t=>{tu(this,t)})),this.outputFacialTransformationMatrixes&&(vo(t,"face_geometry"),uo(r,"FACE_GEOMETRY:face_geometry"),this.h.attachProtoVectorListener("face_geometry",(t,e)=>{if(this.outputFacialTransformationMatrixes)for(let e of t)(t=kr(t=na(e),No,2))&&this.m.facialTransformationMatrixes.push({rows:Or(t,1)??0??0,columns:Or(t,2)??0??0,data:dr(t,3,Qt).slice()??[]});tu(this,e)}),this.h.attachEmptyPacketListener("face_geometry",t=>{tu(this,t)})),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};gc.prototype.detectForVideo=gc.prototype.I,gc.prototype.detect=gc.prototype.H,gc.prototype.setOptions=gc.prototype.A,gc.createFromModelPath=function(t,e){return Zu(gc,t,{baseOptions:{modelAssetPath:e}})},gc.createFromModelBuffer=function(t,e){return Zu(gc,t,{baseOptions:{modelAssetBuffer:e}})},gc.createFromOptions=function(t,e){return Zu(gc,t,e)},gc.FACE_LANDMARKS_LIPS=sc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LIPS",gc.FACE_LANDMARKS_LIPS),gc.FACE_LANDMARKS_LEFT_EYE=oc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYE",gc.FACE_LANDMARKS_LEFT_EYE),gc.FACE_LANDMARKS_LEFT_EYEBROW=ac,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYEBROW",gc.FACE_LANDMARKS_LEFT_EYEBROW),gc.FACE_LANDMARKS_LEFT_IRIS=hc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_IRIS",gc.FACE_LANDMARKS_LEFT_IRIS),gc.FACE_LANDMARKS_RIGHT_EYE=uc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYE",gc.FACE_LANDMARKS_RIGHT_EYE),gc.FACE_LANDMARKS_RIGHT_EYEBROW=cc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW",gc.FACE_LANDMARKS_RIGHT_EYEBROW),gc.FACE_LANDMARKS_RIGHT_IRIS=lc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_IRIS",gc.FACE_LANDMARKS_RIGHT_IRIS),gc.FACE_LANDMARKS_FACE_OVAL=dc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_FACE_OVAL",gc.FACE_LANDMARKS_FACE_OVAL),gc.FACE_LANDMARKS_CONTOURS=fc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_CONTOURS",gc.FACE_LANDMARKS_CONTOURS),gc.FACE_LANDMARKS_TESSELATION=pc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_TESSELATION",gc.FACE_LANDMARKS_TESSELATION);var vc=Yu([0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[5,9],[9,10],[10,11],[11,12],[9,13],[13,14],[14,15],[15,16],[13,17],[0,17],[17,18],[18,19],[19,20]);function _c(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function yc(t){return 0===t.gestures.length?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:t.gestures,landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handedness:t.handedness,handednesses:t.handedness}}function Ec(t,e=!0){var r=[];for(let i of t){var n=bo(i);t=[];for(let r of n.h())n=e&&null!=Or(r,1)?Or(r,1)??0:-1,t.push({score:Mr(r,2)??0,index:n,categoryName:ye(or(r,3))??""??"",displayName:ye(or(r,4))??""??""});r.push(t)}return r}var Ac=class extends nc{constructor(t,e){super(new Ju(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Rr(t=this.m=new pa,0,1,e=new qo),this.v=new fa,Rr(this.m,0,2,this.v),this.G=new da,Rr(this.v,0,3,this.G),this.C=new la,Rr(this.v,0,2,this.C),this.i=new ca,Rr(this.m,0,3,this.i),jr(this.C,2,.5),jr(this.v,4,.5),jr(this.G,2,.5)}D(){return"GestureRecognizer"}get baseOptions(){return kr(this.m,qo,1)}set baseOptions(t){Rr(this.m,0,1,t)}A(t){if($r(this.C,3,t.numHands??1),"minHandDetectionConfidence"in t&&jr(this.C,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&jr(this.v,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&jr(this.G,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new ha,r=e,n=qa(t.cannedGesturesClassifierOptions,kr(this.i,ha,3)?.l());Rr(r,0,2,n),Rr(this.i,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&kr(this.i,ha,3)?.h();return t.customGesturesClassifierOptions?(Rr(r=e=new ha,0,2,n=qa(t.customGesturesClassifierOptions,kr(this.i,ha,4)?.l())),Rr(this.i,0,4,e)):void 0===t.customGesturesClassifierOptions&&kr(this.i,ha,4)?.h(),this.l(t)}Ya(t,e){return _c(this),tc(this,t,e),yc(this)}Za(t,e,r){return _c(this),ec(this,t,r,e),yc(this)}u(){var t=new _o;go(t,"image_in"),go(t,"norm_rect"),vo(t,"hand_gestures"),vo(t,"hand_landmarks"),vo(t,"world_hand_landmarks"),vo(t,"handedness");var e=new so;ci(e,ya,this.m);var r=new co;Vr(r,2,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),ho(r,"IMAGE:image_in"),ho(r,"NORM_RECT:norm_rect"),uo(r,"HAND_GESTURES:hand_gestures"),uo(r,"LANDMARKS:hand_landmarks"),uo(r,"WORLD_LANDMARKS:world_hand_landmarks"),uo(r,"HANDEDNESS:handedness"),r.A(e),mo(t,r),this.h.attachProtoVectorListener("hand_landmarks",(t,e)=>{for(let e of t)t=Co(e),this.landmarks.push(eh(t));tu(this,e)}),this.h.attachEmptyPacketListener("hand_landmarks",t=>{tu(this,t)}),this.h.attachProtoVectorListener("world_hand_landmarks",(t,e)=>{for(let e of t)t=Io(e),this.worldLandmarks.push(rh(t));tu(this,e)}),this.h.attachEmptyPacketListener("world_hand_landmarks",t=>{tu(this,t)}),this.h.attachProtoVectorListener("hand_gestures",(t,e)=>{this.gestures.push(...Ec(t,!1)),tu(this,e)}),this.h.attachEmptyPacketListener("hand_gestures",t=>{tu(this,t)}),this.h.attachProtoVectorListener("handedness",(t,e)=>{this.handedness.push(...Ec(t)),tu(this,e)}),this.h.attachEmptyPacketListener("handedness",t=>{tu(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};function wc(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}Ac.prototype.recognizeForVideo=Ac.prototype.Za,Ac.prototype.recognize=Ac.prototype.Ya,Ac.prototype.setOptions=Ac.prototype.A,Ac.createFromModelPath=function(t,e){return Zu(Ac,t,{baseOptions:{modelAssetPath:e}})},Ac.createFromModelBuffer=function(t,e){return Zu(Ac,t,{baseOptions:{modelAssetBuffer:e}})},Ac.createFromOptions=function(t,e){return Zu(Ac,t,e)},Ac.HAND_CONNECTIONS=vc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$gesture_recognizer$gesture_recognizer.GestureRecognizer.HAND_CONNECTIONS",Ac.HAND_CONNECTIONS);var Tc=class extends nc{constructor(t,e){super(new Ju(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Rr(t=this.i=new fa,0,1,e=new qo),this.v=new da,Rr(this.i,0,3,this.v),this.m=new la,Rr(this.i,0,2,this.m),$r(this.m,3,1),jr(this.m,2,.5),jr(this.v,2,.5),jr(this.i,4,.5)}D(){return"HandLandmarker"}get baseOptions(){return kr(this.i,qo,1)}set baseOptions(t){Rr(this.i,0,1,t)}A(t){return"numHands"in t&&$r(this.m,3,t.numHands??1),"minHandDetectionConfidence"in t&&jr(this.m,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&jr(this.i,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&jr(this.v,2,t.minHandPresenceConfidence??.5),this.l(t)}H(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],tc(this,t,e),wc(this)}I(t,e,r){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],ec(this,t,r,e),wc(this)}u(){var t=new _o;go(t,"image_in"),go(t,"norm_rect"),vo(t,"hand_landmarks"),vo(t,"world_hand_landmarks"),vo(t,"handedness");var e=new so;ci(e,Ea,this.i);var r=new co;Vr(r,2,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),ho(r,"IMAGE:image_in"),ho(r,"NORM_RECT:norm_rect"),uo(r,"LANDMARKS:hand_landmarks"),uo(r,"WORLD_LANDMARKS:world_hand_landmarks"),uo(r,"HANDEDNESS:handedness"),r.A(e),mo(t,r),this.h.attachProtoVectorListener("hand_landmarks",(t,e)=>{for(let e of t)t=Co(e),this.landmarks.push(eh(t));tu(this,e)}),this.h.attachEmptyPacketListener("hand_landmarks",t=>{tu(this,t)}),this.h.attachProtoVectorListener("world_hand_landmarks",(t,e)=>{for(let e of t)t=Io(e),this.worldLandmarks.push(rh(t));tu(this,e)}),this.h.attachEmptyPacketListener("world_hand_landmarks",t=>{tu(this,t)}),this.h.attachProtoVectorListener("handedness",(t,e)=>{var r=this.handedness,n=r.push,i=[];for(let e of t){t=bo(e);let r=[];for(let e of t.h())r.push({score:Mr(e,2)??0,index:Or(e,1)??0??-1,categoryName:ye(or(e,3))??""??"",displayName:ye(or(e,4))??""??""});i.push(r)}n.call(r,...i),tu(this,e)}),this.h.attachEmptyPacketListener("handedness",t=>{tu(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};Tc.prototype.detectForVideo=Tc.prototype.I,Tc.prototype.detect=Tc.prototype.H,Tc.prototype.setOptions=Tc.prototype.A,Tc.createFromModelPath=function(t,e){return Zu(Tc,t,{baseOptions:{modelAssetPath:e}})},Tc.createFromModelBuffer=function(t,e){return Zu(Tc,t,{baseOptions:{modelAssetBuffer:e}})},Tc.createFromOptions=function(t,e){return Zu(Tc,t,e)},Tc.HAND_CONNECTIONS=vc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$hand_landmarker$hand_landmarker.HandLandmarker.HAND_CONNECTIONS",Tc.HAND_CONNECTIONS);var bc=Yu([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function kc(t){t.i={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function Sc(t){try{if(!t.G)return t.i;t.G(t.i)}finally{nu(t)}}function Lc(t,e){t=Co(t),e.push(eh(t))}var xc=class extends nc{constructor(t,e){super(new Ju(t,e),"input_frames_image",null,!1),this.i={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,Rr(t=this.m=new ba,0,1,e=new qo),this.Z=new da,Rr(this.m,0,2,this.Z),this.Ba=new Aa,Rr(this.m,0,3,this.Ba),this.v=new ta,Rr(this.m,0,4,this.v),this.P=new ia,Rr(this.m,0,5,this.P),this.C=new wa,Rr(this.m,0,6,this.C),this.aa=new Ta,Rr(this.m,0,7,this.aa),jr(this.v,2,.5),jr(this.v,3,.3),jr(this.P,2,.5),jr(this.C,2,.5),jr(this.C,3,.3),jr(this.aa,2,.5),jr(this.Z,2,.5)}D(){return"HolisticLandmarker"}get baseOptions(){return kr(this.m,qo,1)}set baseOptions(t){Rr(this.m,0,1,t)}A(t){return"minFaceDetectionConfidence"in t&&jr(this.v,2,t.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in t&&jr(this.v,3,t.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in t&&jr(this.P,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"minPoseDetectionConfidence"in t&&jr(this.C,2,t.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in t&&jr(this.C,3,t.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in t&&jr(this.aa,2,t.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in t&&(this.outputPoseSegmentationMasks=!!t.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in t&&jr(this.Z,2,t.minHandLandmarksConfidence??.5),this.l(t)}H(t,e,r){var n="function"!=typeof e?e:{};return this.G="function"==typeof e?e:r,kc(this),tc(this,t,n),Sc(this)}I(t,e,r,n){var i="function"!=typeof r?r:{};return this.G="function"==typeof r?r:n,kc(this),ec(this,t,i,e),Sc(this)}u(){var t=new _o;go(t,"input_frames_image"),vo(t,"pose_landmarks"),vo(t,"pose_world_landmarks"),vo(t,"face_landmarks"),vo(t,"left_hand_landmarks"),vo(t,"left_hand_world_landmarks"),vo(t,"right_hand_landmarks"),vo(t,"right_hand_world_landmarks");var e=new so,r=new Us;Vr(r,1,"type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),function(t,e){if(null!=e)if(Array.isArray(e))hr(t,2,Ge(e,0,He));else{if(!("string"==typeof e||e instanceof x||T(e)))throw Error("invalid value in Any.value field: "+e+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");_r(t,2,ft(e,!1),k())}}(r,this.m.h());var n=new co;Vr(n,2,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),Nr(n,8,Us,r),ho(n,"IMAGE:input_frames_image"),uo(n,"POSE_LANDMARKS:pose_landmarks"),uo(n,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),uo(n,"FACE_LANDMARKS:face_landmarks"),uo(n,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),uo(n,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),uo(n,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),uo(n,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),n.A(e),mo(t,n),eu(this,t),this.h.attachProtoListener("pose_landmarks",(t,e)=>{Lc(t,this.i.poseLandmarks),tu(this,e)}),this.h.attachEmptyPacketListener("pose_landmarks",t=>{tu(this,t)}),this.h.attachProtoListener("pose_world_landmarks",(t,e)=>{var r=this.i.poseWorldLandmarks;t=Io(t),r.push(rh(t)),tu(this,e)}),this.h.attachEmptyPacketListener("pose_world_landmarks",t=>{tu(this,t)}),this.outputPoseSegmentationMasks&&(uo(n,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),ru(this,"pose_segmentation_mask"),this.h.ha("pose_segmentation_mask",(t,e)=>{this.i.poseSegmentationMasks=[rc(this,t,!0,!this.G)],tu(this,e)}),this.h.attachEmptyPacketListener("pose_segmentation_mask",t=>{this.i.poseSegmentationMasks=[],tu(this,t)})),this.h.attachProtoListener("face_landmarks",(t,e)=>{Lc(t,this.i.faceLandmarks),tu(this,e)}),this.h.attachEmptyPacketListener("face_landmarks",t=>{tu(this,t)}),this.outputFaceBlendshapes&&(vo(t,"extra_blendshapes"),uo(n,"FACE_BLENDSHAPES:extra_blendshapes"),this.h.attachProtoListener("extra_blendshapes",(t,e)=>{var r=this.i.faceBlendshapes;this.outputFaceBlendshapes&&(t=bo(t),r.push(Za(t.h()??[]))),tu(this,e)}),this.h.attachEmptyPacketListener("extra_blendshapes",t=>{tu(this,t)})),this.h.attachProtoListener("left_hand_landmarks",(t,e)=>{Lc(t,this.i.leftHandLandmarks),tu(this,e)}),this.h.attachEmptyPacketListener("left_hand_landmarks",t=>{tu(this,t)}),this.h.attachProtoListener("left_hand_world_landmarks",(t,e)=>{var r=this.i.leftHandWorldLandmarks;t=Io(t),r.push(rh(t)),tu(this,e)}),this.h.attachEmptyPacketListener("left_hand_world_landmarks",t=>{tu(this,t)}),this.h.attachProtoListener("right_hand_landmarks",(t,e)=>{Lc(t,this.i.rightHandLandmarks),tu(this,e)}),this.h.attachEmptyPacketListener("right_hand_landmarks",t=>{tu(this,t)}),this.h.attachProtoListener("right_hand_world_landmarks",(t,e)=>{var r=this.i.rightHandWorldLandmarks;t=Io(t),r.push(rh(t)),tu(this,e)}),this.h.attachEmptyPacketListener("right_hand_world_landmarks",t=>{tu(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};xc.prototype.detectForVideo=xc.prototype.I,xc.prototype.detect=xc.prototype.H,xc.prototype.setOptions=xc.prototype.A,xc.createFromModelPath=function(t,e){return Zu(xc,t,{baseOptions:{modelAssetPath:e}})},xc.createFromModelBuffer=function(t,e){return Zu(xc,t,{baseOptions:{modelAssetBuffer:e}})},xc.createFromOptions=function(t,e){return Zu(xc,t,e)},xc.HAND_CONNECTIONS=vc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.HAND_CONNECTIONS",xc.HAND_CONNECTIONS),xc.POSE_CONNECTIONS=bc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.POSE_CONNECTIONS",xc.POSE_CONNECTIONS),xc.FACE_LANDMARKS_LIPS=sc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LIPS",xc.FACE_LANDMARKS_LIPS),xc.FACE_LANDMARKS_LEFT_EYE=oc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_EYE",xc.FACE_LANDMARKS_LEFT_EYE),xc.FACE_LANDMARKS_LEFT_EYEBROW=ac,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_EYEBROW",xc.FACE_LANDMARKS_LEFT_EYEBROW),xc.FACE_LANDMARKS_LEFT_IRIS=hc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_IRIS",xc.FACE_LANDMARKS_LEFT_IRIS),xc.FACE_LANDMARKS_RIGHT_EYE=uc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_EYE",xc.FACE_LANDMARKS_RIGHT_EYE),xc.FACE_LANDMARKS_RIGHT_EYEBROW=cc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW",xc.FACE_LANDMARKS_RIGHT_EYEBROW),xc.FACE_LANDMARKS_RIGHT_IRIS=lc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_IRIS",xc.FACE_LANDMARKS_RIGHT_IRIS),xc.FACE_LANDMARKS_FACE_OVAL=dc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_FACE_OVAL",xc.FACE_LANDMARKS_FACE_OVAL),xc.FACE_LANDMARKS_CONTOURS=fc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_CONTOURS",xc.FACE_LANDMARKS_CONTOURS),xc.FACE_LANDMARKS_TESSELATION=pc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_TESSELATION",xc.FACE_LANDMARKS_TESSELATION);var Rc=class extends nc{constructor(t,e){super(new Ju(t,e),"input_image","norm_rect",!0),this.m={classifications:[]},Rr(t=this.i=new La,0,1,e=new qo)}D(){return"ImageClassifier"}get baseOptions(){return kr(this.i,qo,1)}set baseOptions(t){Rr(this.i,0,1,t)}A(t){return Rr(this.i,0,2,qa(t,kr(this.i,Vo,2))),this.l(t)}Ha(t,e){return this.m={classifications:[]},tc(this,t,e),this.m}Ia(t,e,r){return this.m={classifications:[]},ec(this,t,r,e),this.m}u(){var t=new _o;go(t,"input_image"),go(t,"norm_rect"),vo(t,"classifications");var e=new so;ci(e,xa,this.i);var r=new co;Vr(r,2,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),ho(r,"IMAGE:input_image"),ho(r,"NORM_RECT:norm_rect"),uo(r,"CLASSIFICATIONS:classifications"),r.A(e),mo(t,r),this.h.attachProtoListener("classifications",(t,e)=>{this.m=Qa(Po(t)),tu(this,e)}),this.h.attachEmptyPacketListener("classifications",t=>{tu(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};Rc.prototype.classifyForVideo=Rc.prototype.Ia,Rc.prototype.classify=Rc.prototype.Ha,Rc.prototype.setOptions=Rc.prototype.A,Rc.createFromModelPath=function(t,e){return Zu(Rc,t,{baseOptions:{modelAssetPath:e}})},Rc.createFromModelBuffer=function(t,e){return Zu(Rc,t,{baseOptions:{modelAssetBuffer:e}})},Rc.createFromOptions=function(t,e){return Zu(Rc,t,e)};var Ic=class extends nc{constructor(t,e){super(new Ju(t,e),"image_in","norm_rect",!0),this.i=new Ra,this.embeddings={embeddings:[]},Rr(t=this.i,0,1,e=new qo)}D(){return"ImageEmbedder"}get baseOptions(){return kr(this.i,qo,1)}set baseOptions(t){Rr(this.i,0,1,t)}A(t){var e=this.i,r=kr(this.i,Ko,2);if(r=r?r.clone():new Ko,void 0!==t.l2Normalize){var n=t.l2Normalize;hr(r,1,null==n?n:te(n))}else"l2Normalize"in t&&hr(r,1);return void 0!==t.quantize?hr(r,2,null==(n=t.quantize)?n:te(n)):"quantize"in t&&hr(r,2),Rr(e,0,2,r),this.l(t)}Oa(t,e){return tc(this,t,e),this.embeddings}Pa(t,e,r){return ec(this,t,r,e),this.embeddings}u(){var t=new _o;go(t,"image_in"),go(t,"norm_rect"),vo(t,"embeddings_out");var e=new so;ci(e,Ia,this.i);var r=new co;Vr(r,2,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),ho(r,"IMAGE:image_in"),ho(r,"NORM_RECT:norm_rect"),uo(r,"EMBEDDINGS:embeddings_out"),r.A(e),mo(t,r),this.h.attachProtoListener("embeddings_out",(t,e)=>{t=Go(t),this.embeddings=function(t){return{embeddings:Lr(t,Bo,1).map(t=>{var e={headIndex:Or(t,3)??0??-1,headName:ye(or(t,4))??""??""};if(lr(t,1,jo))t=dr(t=Dr(t,$o,1,jo),1,Qt),e.floatEmbedding=t.slice();else{let r=new Uint8Array(0);e.quantizedEmbedding=Dr(t,Uo,2,jo)?.h()?.i()??r}return e}),timestampMs:Ja(or(t,2,void 0,fe)??ir)}}(t),tu(this,e)}),this.h.attachEmptyPacketListener("embeddings_out",t=>{tu(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};Ic.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=ih(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=ih(nh(t.quantizedEmbedding),nh(e.quantizedEmbedding))}return t},Ic.prototype.embedForVideo=Ic.prototype.Pa,Ic.prototype.embed=Ic.prototype.Oa,Ic.prototype.setOptions=Ic.prototype.A,Ic.createFromModelPath=function(t,e){return Zu(Ic,t,{baseOptions:{modelAssetPath:e}})},Ic.createFromModelBuffer=function(t,e){return Zu(Ic,t,{baseOptions:{modelAssetBuffer:e}})},Ic.createFromOptions=function(t,e){return Zu(Ic,t,e)};var Fc=class{constructor(t,e,r){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=r}close(){this.confidenceMasks?.forEach(t=>{t.close()}),this.categoryMask?.close()}};function Cc(t){var e=function(t){return Lr(t,co,1)}(t.ka()).filter(t=>(ye(or(t,1))??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));if(t.v=[],e.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(kr(e[0],so,7)?.u()?.h()??new Map).forEach((e,r)=>{t.v[Number(r)]=ye(or(e,1))??""})}function Nc(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Oc(t){try{let e=new Fc(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.m)return e;t.m(e)}finally{nu(t)}}Fc.prototype.close=Fc.prototype.close;var Mc=class extends nc{constructor(t,e){super(new Ju(t,e),"image_in","norm_rect",!1),this.v=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.i=new Ma,this.C=new Fa,Rr(this.i,0,3,this.C),Rr(t=this.i,0,1,e=new qo)}D(){return"ImageSegmenter"}get baseOptions(){return kr(this.i,qo,1)}set baseOptions(t){Rr(this.i,0,1,t)}A(t){return void 0!==t.displayNamesLocale?hr(this.i,2,_e(t.displayNamesLocale)):"displayNamesLocale"in t&&hr(this.i,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}M(){Cc(this)}segment(t,e,r){var n="function"!=typeof e?e:{};return this.m="function"==typeof e?e:r,Nc(this),tc(this,t,n),Oc(this)}fb(t,e,r,n){var i="function"!=typeof r?r:{};return this.m="function"==typeof r?r:n,Nc(this),ec(this,t,i,e),Oc(this)}Sa(){return this.v}u(){var t=new _o;go(t,"image_in"),go(t,"norm_rect");var e=new so;ci(e,Da,this.i);var r=new co;Vr(r,2,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),ho(r,"IMAGE:image_in"),ho(r,"NORM_RECT:norm_rect"),r.A(e),mo(t,r),eu(this,t),this.outputConfidenceMasks&&(vo(t,"confidence_masks"),uo(r,"CONFIDENCE_MASKS:confidence_masks"),ru(this,"confidence_masks"),this.h.ia("confidence_masks",(t,e)=>{this.confidenceMasks=t.map(t=>rc(this,t,!0,!this.m)),tu(this,e)}),this.h.attachEmptyPacketListener("confidence_masks",t=>{this.confidenceMasks=[],tu(this,t)})),this.outputCategoryMask&&(vo(t,"category_mask"),uo(r,"CATEGORY_MASK:category_mask"),ru(this,"category_mask"),this.h.ha("category_mask",(t,e)=>{this.categoryMask=rc(this,t,!1,!this.m),tu(this,e)}),this.h.attachEmptyPacketListener("category_mask",t=>{this.categoryMask=void 0,tu(this,t)})),vo(t,"quality_scores"),uo(r,"QUALITY_SCORES:quality_scores"),this.h.attachFloatVectorListener("quality_scores",(t,e)=>{this.qualityScores=t,tu(this,e)}),this.h.attachEmptyPacketListener("quality_scores",t=>{this.categoryMask=void 0,tu(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};Mc.prototype.getLabels=Mc.prototype.Sa,Mc.prototype.segmentForVideo=Mc.prototype.fb,Mc.prototype.segment=Mc.prototype.segment,Mc.prototype.setOptions=Mc.prototype.A,Mc.createFromModelPath=function(t,e){return Zu(Mc,t,{baseOptions:{modelAssetPath:e}})},Mc.createFromModelBuffer=function(t,e){return Zu(Mc,t,{baseOptions:{modelAssetBuffer:e}})},Mc.createFromOptions=function(t,e){return Zu(Mc,t,e)};var Dc={0:0,1:1,2:2,3:3};function Pc(){return Dh()?void 0:document.createElement("canvas")}var $c=class extends iu{constructor(t,e){super(new Yh(t,e)),this.v=new pu,this.delegate="CPU",this.i=0,this.baseOptions=new qo,this.C=this.m=0}D(){return"InteractiveSegmenter"}get j(){return this.h.j}A(t){return this.delegate=t.baseOptions?.delegate??"CPU",super.l(t)}gb(t){if(0===this.i)throw Error("Segmenter is not initialized.");var e;if(0!==this.m&&(this.j._free(this.m),this.m=0),!(e="undefined"!=typeof ImageData&&t instanceof ImageData))if("object"!=typeof t||null===t)e=!1;else{e=t.data;var r=t.width,n=t.height;e=Number.isInteger(r)&&r>0&&Number.isInteger(n)&&n>0&&(e instanceof Uint8ClampedArray||e instanceof Uint8Array)}if(e)e=t.width,r=t.height,t=t.data;else{if([e,r]=$h(t),"undefined"!=typeof OffscreenCanvas)n=new OffscreenCanvas(e,r);else{if("undefined"==typeof document)throw Error("Canvas is not supported in this environment.");n=document.createElement("canvas")}if(n.width=e,n.height=r,!(n=n.getContext("2d")))throw Error("Canvas 2D context is not supported in this environment.");n.drawImage(t,0,0),t=n.getImageData(0,0,e,r).data}if(!t)throw Error("Unsupported image source or failed to extract image pixels.");n=function({Xa:t,width:e,height:r}){if(e<=0||r<=0)throw Error(`Invalid image dimensions: ${e}x${r}. Dimensions must be positive.`);if(t%(e*r)!==0)throw Error(`Invalid image dimensions or pixel data length. Pixel data length ${t} is not a multiple of the number of pixels (${e*r}).`);if(4!==(t/=e*r)&&3!==t&&1!==t)throw Error(`Invalid image dimensions or pixel data length. Calculated channels: ${t}. Expected 1, 3, or 4.`);return t}({Xa:t.length,width:e,height:r});var i=this.j._malloc(t.length);if(this.j.HEAPU8.set(t,i),this.m=i,!this.j._interactive_segmenter_set_image(this.i,i,e,r,n))throw Error("Failed to set image on native engine.")}segment(t){if(0===this.i)throw Error("Segmenter is not initialized.");var e=function(t){t=t.map(({isCompleted:t,brushMode:e,point:r})=>{e=Dc[e]??0,r=r.map(({x:t,y:e})=>{var r=new Pa;return Gr(r,1,t),Gr(r,2,e),r});var n=new $a;return Pr(n,t),_r(n,1,ne(e),0),Fr(n,2,r),n});var e=new Ua;return Fr(e,1,t),Ba(e)}(t);t=this.j._malloc(e.length),this.j.HEAPU8.set(e,t);var r=this.j._malloc(12),n=r+4,i=r+8,s=0,o=this.C++;try{if(this.o)if("GPU"===this.delegate){var a=this.o;++a.h.U,a.i.set(o,performance.now())}else{var h=this.o;++h.h.R,h.i.set(o,performance.now())}if(0===(s=this.j._interactive_segmenter_segment(this.i,t,e.length,r,n,i)))throw Error("Segmentation failed.");this.o?.Aa(o);let u=this.j.HEAPU32[r/4],c=this.j.HEAPU32[n/4],l=new Float32Array(this.j.HEAPU8.buffer,s,this.j.HEAPU32[i/4]/4),d=new Float32Array(l);if(a=u*c,(d instanceof Uint8Array||d instanceof Float32Array)&&d.length!==a)throw Error("Unsupported channel count: "+d.length/a);return new Su([d],!0,!1,this.h.j.canvas??void 0,this.v,u,c)}finally{0!==t&&this.j._free(t),0!==r&&this.j._free(r),0!==s&&this.j._free(s)}}u(){0!==this.i&&(this.o?.ya(),this.j._interactive_segmenter_close(this.i),this.i=0),0!==this.m&&(this.j._free(this.m),this.m=0);var t=new Wo;if("GPU"===this.delegate){var e=new Ys;Ir(t,2,Yo,e)}else $r(e=new no,1,4),Ir(t,1,Yo,e);if(Rr(this.baseOptions,0,3,t),t=Qo(this.baseOptions),e=this.j._malloc(t.length),this.j.HEAPU8.set(t,e),this.i=this.j._interactive_segmenter_create(e,t.length),this.j._free(e),0===this.i)throw Error("Failed to create native InteractiveSegmenter engine.");this.o?.za()}close(){0!==this.i&&(this.j._interactive_segmenter_close(this.i),this.i=0),0!==this.m&&(this.j._free(this.m),this.m=0),this.v.close(),super.close()}};$c.prototype.close=$c.prototype.close,$c.prototype.segment=$c.prototype.segment,$c.prototype.setImage=$c.prototype.gb,$c.prototype.setOptions=$c.prototype.A,$c.createFromModelPath=function(t,e){return qh($c,Pc(),t,{baseOptions:{modelAssetPath:e}})},$c.createFromModelBuffer=function(t,e){return qh($c,Pc(),t,{baseOptions:{modelAssetBuffer:e}})},$c.createFromOptions=function(t,e){var r=e.canvas??Pc();return qh($c,r,t,e)};var Uc=class{constructor(t,e,r){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=r}close(){this.confidenceMasks?.forEach(t=>{t.close()}),this.categoryMask?.close()}};Uc.prototype.close=Uc.prototype.close;var Bc=class extends nc{constructor(t,e){super(new Ju(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.i=new Ma,this.v=new Fa,Rr(this.i,0,3,this.v),Rr(t=this.i,0,1,e=new qo)}D(){return"InteractiveSegmenterLegacy"}get baseOptions(){return kr(this.i,qo,1)}set baseOptions(t){Rr(this.i,0,1,t)}A(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}segment(t,e,r,n){var i="function"!=typeof r?r:{};if(this.m="function"==typeof r?r:n,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,r=this.J+1,n=new Ha,e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var s=new ja;Pr(s,!0),Gr(s,1,e.keypoint.x),Gr(s,2,e.keypoint.y),Ir(n,1,Ka,s)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");{let t=new Va;for(s of e.scribble)Pr(e=new ja,!0),Gr(e,1,s.x),Gr(e,2,s.y),Nr(t,1,ja,e);Ir(n,2,Ka,t)}}this.h.addProtoToStream(n.h(),"mediapipe.tasks.vision.interactive_segmenter_legacy.proto.RegionOfInterest","roi_in",r),tc(this,t,i);t:{try{let t=new Uc(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.m){var o=t;break t}this.m(t)}finally{nu(this)}o=void 0}return o}u(){var t=new _o;go(t,"image_in"),go(t,"roi_in"),go(t,"norm_rect_in");var e=new so;ci(e,Da,this.i);var r=new co;Vr(r,2,"mediapipe.tasks.vision.interactive_segmenter_legacy.InteractiveSegmenterLegacyGraph"),ho(r,"IMAGE:image_in"),ho(r,"ROI:roi_in"),ho(r,"NORM_RECT:norm_rect_in"),r.A(e),mo(t,r),eu(this,t),this.outputConfidenceMasks&&(vo(t,"confidence_masks"),uo(r,"CONFIDENCE_MASKS:confidence_masks"),ru(this,"confidence_masks"),this.h.ia("confidence_masks",(t,e)=>{this.confidenceMasks=t.map(t=>rc(this,t,!0,!this.m)),tu(this,e)}),this.h.attachEmptyPacketListener("confidence_masks",t=>{this.confidenceMasks=[],tu(this,t)})),this.outputCategoryMask&&(vo(t,"category_mask"),uo(r,"CATEGORY_MASK:category_mask"),ru(this,"category_mask"),this.h.ha("category_mask",(t,e)=>{this.categoryMask=rc(this,t,!1,!this.m),tu(this,e)}),this.h.attachEmptyPacketListener("category_mask",t=>{this.categoryMask=void 0,tu(this,t)})),vo(t,"quality_scores"),uo(r,"QUALITY_SCORES:quality_scores"),this.h.attachFloatVectorListener("quality_scores",(t,e)=>{this.qualityScores=t,tu(this,e)}),this.h.attachEmptyPacketListener("quality_scores",t=>{this.categoryMask=void 0,tu(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};Bc.prototype.segment=Bc.prototype.segment,Bc.prototype.setOptions=Bc.prototype.A,Bc.createFromModelPath=function(t,e){return Zu(Bc,t,{baseOptions:{modelAssetPath:e}})},Bc.createFromModelBuffer=function(t,e){return Zu(Bc,t,{baseOptions:{modelAssetBuffer:e}})},Bc.createFromOptions=function(t,e){return Zu(Bc,t,e)};var jc=class extends nc{constructor(t,e){super(new Ju(t,e),"input_frame_gpu","norm_rect",!1),this.m={detections:[]},Rr(t=this.i=new Xa,0,1,e=new qo)}D(){return"ObjectDetector"}get baseOptions(){return kr(this.i,qo,1)}set baseOptions(t){Rr(this.i,0,1,t)}A(t){return void 0!==t.displayNamesLocale?hr(this.i,2,_e(t.displayNamesLocale)):"displayNamesLocale"in t&&hr(this.i,2),void 0!==t.maxResults?$r(this.i,3,t.maxResults):"maxResults"in t&&hr(this.i,3),void 0!==t.scoreThreshold?jr(this.i,4,t.scoreThreshold):"scoreThreshold"in t&&hr(this.i,4),void 0!==t.categoryAllowlist?Hr(this.i,5,t.categoryAllowlist):"categoryAllowlist"in t&&hr(this.i,5),void 0!==t.categoryDenylist?Hr(this.i,6,t.categoryDenylist):"categoryDenylist"in t&&hr(this.i,6),this.l(t)}H(t,e){return this.m={detections:[]},tc(this,t,e),this.m}I(t,e,r){return this.m={detections:[]},ec(this,t,r,e),this.m}u(){var t=new _o;go(t,"input_frame_gpu"),go(t,"norm_rect"),vo(t,"detections");var e=new so;ci(e,Wa,this.i);var r=new co;Vr(r,2,"mediapipe.tasks.vision.ObjectDetectorGraph"),ho(r,"IMAGE:input_frame_gpu"),ho(r,"NORM_RECT:norm_rect"),uo(r,"DETECTIONS:detections"),r.A(e),mo(t,r),this.h.attachProtoVectorListener("detections",(t,e)=>{for(let e of t)t=xo(e),this.m.detections.push(th(t));tu(this,e)}),this.h.attachEmptyPacketListener("detections",t=>{tu(this,t)}),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};jc.prototype.detectForVideo=jc.prototype.I,jc.prototype.detect=jc.prototype.H,jc.prototype.setOptions=jc.prototype.A,jc.createFromModelPath=async function(t,e){return Zu(jc,t,{baseOptions:{modelAssetPath:e}})},jc.createFromModelBuffer=function(t,e){return Zu(jc,t,{baseOptions:{modelAssetBuffer:e}})},jc.createFromOptions=function(t,e){return Zu(jc,t,e)};var Gc=class{constructor(t,e,r){this.landmarks=t,this.worldLandmarks=e,this.segmentationMasks=r}close(){this.segmentationMasks?.forEach(t=>{t.close()})}};function Vc(t){t.landmarks=[],t.worldLandmarks=[],t.segmentationMasks=void 0}function Hc(t){try{let e=new Gc(t.landmarks,t.worldLandmarks,t.segmentationMasks);if(!t.v)return e;t.v(e)}finally{nu(t)}}Gc.prototype.close=Gc.prototype.close;var Kc=class extends nc{constructor(t,e){super(new Ju(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,Rr(t=this.i=new Ya,0,1,e=new qo),this.C=new Ta,Rr(this.i,0,3,this.C),this.m=new wa,Rr(this.i,0,2,this.m),$r(this.m,4,1),jr(this.m,2,.5),jr(this.C,2,.5),jr(this.i,4,.5)}D(){return"PoseLandmarker"}get baseOptions(){return kr(this.i,qo,1)}set baseOptions(t){Rr(this.i,0,1,t)}A(t){return"numPoses"in t&&$r(this.m,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&jr(this.m,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&jr(this.i,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&jr(this.C,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.l(t)}H(t,e,r){var n="function"!=typeof e?e:{};return this.v="function"==typeof e?e:r,Vc(this),tc(this,t,n),Hc(this)}I(t,e,r,n){var i="function"!=typeof r?r:{};return this.v="function"==typeof r?r:n,Vc(this),ec(this,t,i,e),Hc(this)}u(){var t=new _o;go(t,"image_in"),go(t,"norm_rect"),vo(t,"normalized_landmarks"),vo(t,"world_landmarks"),vo(t,"segmentation_masks");var e=new so;ci(e,za,this.i);var r=new co;Vr(r,2,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),ho(r,"IMAGE:image_in"),ho(r,"NORM_RECT:norm_rect"),uo(r,"NORM_LANDMARKS:normalized_landmarks"),uo(r,"WORLD_LANDMARKS:world_landmarks"),r.A(e),mo(t,r),eu(this,t),this.h.attachProtoVectorListener("normalized_landmarks",(t,e)=>{this.landmarks=[];for(let e of t)t=Co(e),this.landmarks.push(eh(t));tu(this,e)}),this.h.attachEmptyPacketListener("normalized_landmarks",t=>{this.landmarks=[],tu(this,t)}),this.h.attachProtoVectorListener("world_landmarks",(t,e)=>{this.worldLandmarks=[];for(let e of t)t=Io(e),this.worldLandmarks.push(rh(t));tu(this,e)}),this.h.attachEmptyPacketListener("world_landmarks",t=>{this.worldLandmarks=[],tu(this,t)}),this.outputSegmentationMasks&&(uo(r,"SEGMENTATION_MASK:segmentation_masks"),ru(this,"segmentation_masks"),this.h.ia("segmentation_masks",(t,e)=>{this.segmentationMasks=t.map(t=>rc(this,t,!0,!this.v)),tu(this,e)}),this.h.attachEmptyPacketListener("segmentation_masks",t=>{this.segmentationMasks=[],tu(this,t)})),t=t.h(),this.setGraph(new Uint8Array(t),!0)}};Kc.prototype.detectForVideo=Kc.prototype.I,Kc.prototype.detect=Kc.prototype.H,Kc.prototype.setOptions=Kc.prototype.A,Kc.createFromModelPath=function(t,e){return Zu(Kc,t,{baseOptions:{modelAssetPath:e}})},Kc.createFromModelBuffer=function(t,e){return Zu(Kc,t,{baseOptions:{modelAssetBuffer:e}})},Kc.createFromOptions=function(t,e){return Zu(Kc,t,e)},Kc.POSE_CONNECTIONS=bc,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$pose_landmarker$pose_landmarker.PoseLandmarker.POSE_CONNECTIONS",Kc.POSE_CONNECTIONS);export{Pu as DrawingUtils,ic as FaceDetector,gc as FaceLandmarker,oh as FilesetResolver,Ac as GestureRecognizer,Tc as HandLandmarker,xc as HolisticLandmarker,Rc as ImageClassifier,Ic as ImageEmbedder,Mc as ImageSegmenter,Fc as ImageSegmenterResult,$c as InteractiveSegmenter,Bc as InteractiveSegmenterLegacy,Uc as InteractiveSegmenterLegacyResult,Xu as MPImage,Su as MPMask,jc as ObjectDetector,Kc as PoseLandmarker,iu as TaskRunner,nc as VisionTaskRunner};
2
2
  //# sourceMappingURL=vision_bundle_mjs.js.map