@mediapipe/tasks-vision 0.10.6 → 20230920.0.0

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=self;function e(e,n){e=e.split(".");var r,s=t;e[0]in s||void 0===s.execScript||s.execScript("var "+e[0]);for(;e.length&&(r=e.shift());)e.length||void 0===n?s=s[r]&&s[r]!==Object.prototype[r]?s[r]:s[r]={}:s[r]=n}function n(t){return t}function r(){throw Error("Invalid UTF8")}function s(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let i,o;const a="undefined"!=typeof TextDecoder;let c;const h="undefined"!=typeof TextEncoder;function u(t){if(h)t=(c||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let s=0;s<t.length;s++){var e=t.charCodeAt(s);if(128>e)r[n++]=e;else{if(2048>e)r[n++]=e>>6|192;else{if(55296<=e&&57343>=e){if(56319>=e&&s<t.length){const i=t.charCodeAt(++s);if(56320<=i&&57343>=i){e=1024*(e-55296)+i-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}s--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}var l,d;t:{for(var f=["CLOSURE_FLAGS"],p=t,g=0;g<f.length;g++)if(null==(p=p[f[g]])){d=null;break t}d=p}var m,y=d&&d[610401301];l=null!=y&&y;const _=t.navigator;function v(t){return!!l&&(!!m&&m.brands.some((({brand:e})=>e&&-1!=e.indexOf(t))))}function A(e){var n;return(n=t.navigator)&&(n=n.userAgent)||(n=""),-1!=n.indexOf(e)}function w(){return!!l&&(!!m&&0<m.brands.length)}function E(){return w()?v("Chromium"):(A("Chrome")||A("CriOS"))&&!(!w()&&A("Edge"))||A("Silk")}m=_&&_.userAgentData||null;var b=!w()&&(A("Trident")||A("MSIE"));!A("Android")||E(),E(),A("Safari")&&(E()||!w()&&A("Coast")||!w()&&A("Opera")||!w()&&A("Edge")||(w()?v("Microsoft Edge"):A("Edg/"))||w()&&v("Opera"));var T={},k=null;function L(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);var r=new Uint8Array(n),s=0;return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),s=k[n];if(null!=s)return s;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}S();for(var r=0;;){var s=n(-1),i=n(0),o=n(64),a=n(64);if(64===a&&-1===s)break;e(s<<2|i>>4),64!=o&&(e(i<<4&240|o>>2),64!=a&&e(o<<6&192|a))}}(t,(function(t){r[s++]=t})),s!==n?r.subarray(0,s):r}function S(){if(!k){k={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=t.concat(e[n].split(""));T[n]=r;for(var s=0;s<r.length;s++){var i=r[s];void 0===k[i]&&(k[i]=s)}}}}var F="undefined"!=typeof Uint8Array,x=!b&&"function"==typeof btoa;function O(t){if(!x){var e;void 0===e&&(e=0),S(),e=T[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let c=0,h=0;for(;c<t.length-2;c+=3){var s=t[c],i=t[c+1],o=t[c+2],a=e[s>>2];s=e[(3&s)<<4|i>>4],i=e[(15&i)<<2|o>>6],o=e[63&o],n[h++]=a+s+i+o}switch(a=0,o=r,t.length-c){case 2:o=e[(15&(a=t[c+1]))<<2]||r;case 1:t=t[c],n[h]=e[t>>2]+e[(3&t)<<4|a>>4]+o+r}return n.join("")}for(e="",n=0,r=t.length-10240;n<r;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const R=/[-_.]/g,M={"-":"+",_:"/",".":"="};function C(t){return M[t]||""}function P(t){if(!x)return L(t);R.test(t)&&(t=t.replace(R,C)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function I(t){return F&&null!=t&&t instanceof Uint8Array}let N;function D(){return N||=new Uint8Array(0)}var $={};let U;function B(t){if(t!==$)throw Error("illegal external caller")}function G(){return U||=new V(null,$)}function j(t){B($);var e=t.L;return null==(e=null==e||I(e)?e:"string"==typeof e?P(e):null)?e:t.L=e}var V=class{constructor(t,e){if(B(e),this.L=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}fa(){const t=j(this);return t?new Uint8Array(t):D()}};function z(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function W(){return Error("Failed to read varint, encoding is invalid.")}function H(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function K(t){return 0==t.length?G():new V(t,$)}function X(t){if("string"==typeof t)return{buffer:P(t),G:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),G:!1};if(t.constructor===Uint8Array)return{buffer:t,G:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),G:!1};if(t.constructor===V)return{buffer:j(t)||D(),G:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),G:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}const Y="function"==typeof Uint8Array.prototype.slice;let q,J=0,Z=0;function Q(t){const e=0>t;let n=(t=Math.abs(t))>>>0;if(t=Math.floor((t-n)/4294967296),e){const[e,r]=st(n,t);t=r,n=e}J=n>>>0,Z=t>>>0}function tt(t){const e=q||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),Z=0,J=e.getUint32(0,!0)}function et(t,e){return 4294967296*e+(t>>>0)}function nt(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),t=et(t,e),n?-t:t}function rt(t){if(16>t.length)Q(Number(t));else if("function"==typeof BigInt)t=BigInt(t),J=Number(t&BigInt(4294967295))>>>0,Z=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);Z=J=0;const n=t.length;for(let r=e,s=(n-e)%6+e;s<=n;r=s,s+=6){const e=Number(t.slice(r,s));Z*=1e6,J=1e6*J+e,4294967296<=J&&(Z+=Math.trunc(J/4294967296),Z>>>=0,J>>>=0)}if(e){const[t,e]=st(J,Z);J=t,Z=e}}}function st(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function it(t,e,{O:n=!1}={}){t.O=n,e&&(e=X(e),t.h=e.buffer,t.s=e.G,t.v=0,t.l=t.h.length,t.g=t.v)}function ot(t,e){if(t.g=e,e>t.l)throw H(t.l,e)}function at(t,e){let n,r=0,s=0,i=0;const o=t.h;let a=t.g;do{n=o[a++],r|=(127&n)<<i,i+=7}while(32>i&&128&n);for(32<i&&(s|=(127&n)>>4),i=3;32>i&&128&n;i+=7)n=o[a++],s|=(127&n)<<i;if(ot(t,a),128>n)return e(r>>>0,s>>>0);throw W()}function ct(t){let e=0,n=t.g;const r=n+10,s=t.h;for(;n<r;){const r=s[n++];if(e|=r,0==(128&r))return ot(t,n),!!(127&e)}throw W()}function ht(t){var e=t.h;const n=t.g,r=e[n],s=e[n+1],i=e[n+2];return e=e[n+3],ot(t,t.g+4),(r<<0|s<<8|i<<16|e<<24)>>>0}function ut(t,e){if(0>e)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,r=n+e;if(r>t.l)throw H(e,t.l-n);return t.g=r,n}function lt(t,e){if(0==e)return G();var n=ut(t,e);return t.O&&t.s?n=t.h.subarray(n,n+e):(t=t.h,n=n===(e=n+e)?D():Y?t.slice(n,e):new Uint8Array(t.subarray(n,e))),K(n)}var dt=class{constructor(t,e){this.h=null,this.s=!1,this.g=this.l=this.v=0,it(this,t,e)}m(){const t=this.h;let e=this.g,n=t[e++],r=127&n;if(128&n&&(n=t[e++],r|=(127&n)<<7,128&n&&(n=t[e++],r|=(127&n)<<14,128&n&&(n=t[e++],r|=(127&n)<<21,128&n&&(n=t[e++],r|=n<<28,128&n&&128&t[e++]&&128&t[e++]&&128&t[e++]&&128&t[e++]&&128&t[e++])))))throw W();return ot(this,e),r}j(){return this.m()>>>0}A(){var t=ht(this);const e=2*(t>>31)+1,n=t>>>23&255;return t&=8388607,255==n?t?NaN:1/0*e:0==n?e*Math.pow(2,-149)*t:e*Math.pow(2,n-150)*(t+Math.pow(2,23))}C(){return this.m()}},ft=[];function pt(t){var e=t.g;if(e.g==e.l)return!1;t.l=t.g.g;var n=t.g.j();if(e=n>>>3,!(0<=(n&=7)&&5>=n))throw z(n,t.l);if(1>e)throw Error(`Invalid field number: ${e} (at position ${t.l})`);return t.m=e,t.h=n,!0}function gt(t){switch(t.h){case 0:0!=t.h?gt(t):ct(t.g);break;case 1:ot(t=t.g,t.g+8);break;case 2:if(2!=t.h)gt(t);else{var e=t.g.j();ot(t=t.g,t.g+e)}break;case 5:ot(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!pt(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.h){if(t.m!=e)throw Error("Unmatched end-group tag");break}gt(t)}break;default:throw z(t.h,t.l)}}function mt(t,e,n){const r=t.g.l,s=t.g.j(),i=t.g.g+s;let o=i-r;if(0>=o&&(t.g.l=i,n(e,t,void 0,void 0,void 0),o=i-t.g.g),o)throw Error(`Message parsing ended unexpectedly. Expected to read ${s} bytes, instead read ${s-o} bytes, either the data ended unexpectedly or the message misreported its own length`);return t.g.g=i,t.g.l=r,e}function yt(t){var e=t.g.j(),n=ut(t=t.g,e);if(t=t.h,a){var c,h=t;(c=o)||(c=o=new TextDecoder("utf-8",{fatal:!0})),t=n+e,h=0===n&&t===h.length?h:h.subarray(n,t);try{var u=c.decode(h)}catch(t){if(void 0===i){try{c.decode(new Uint8Array([128]))}catch(t){}try{c.decode(new Uint8Array([97])),i=!0}catch(t){i=!1}}throw!i&&(o=void 0),t}}else{e=(u=n)+e,n=[];let i,o=null;for(;u<e;){var l=t[u++];128>l?n.push(l):224>l?u>=e?r():(i=t[u++],194>l||128!=(192&i)?(u--,r()):n.push((31&l)<<6|63&i)):240>l?u>=e-1?r():(i=t[u++],128!=(192&i)||224===l&&160>i||237===l&&160<=i||128!=(192&(h=t[u++]))?(u--,r()):n.push((15&l)<<12|(63&i)<<6|63&h)):244>=l?u>=e-2?r():(i=t[u++],128!=(192&i)||0!=i-144+(l<<28)>>30||128!=(192&(h=t[u++]))||128!=(192&(c=t[u++]))?(u--,r()):(l=(7&l)<<18|(63&i)<<12|(63&h)<<6|63&c,l-=65536,n.push(55296+(l>>10&1023),56320+(1023&l)))):r(),8192<=n.length&&(o=s(o,n),n.length=0)}u=s(o,n)}return u}function _t(t){const e=t.g.j();return lt(t.g,e)}function vt(t,e,n){var r=t.g.j();for(r=t.g.g+r;t.g.g<r;)n.push(e.call(t.g))}var At=[];function wt(t){return t?/^\d+$/.test(t)?(rt(t),new Et(J,Z)):null:bt||=new Et(0,0)}var Et=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let bt;function Tt(t){return t?/^-?\d+$/.test(t)?(rt(t),new kt(J,Z)):null:Lt||=new kt(0,0)}var kt=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let Lt;function St(t,e,n){for(;0<n||127<e;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function Ft(t,e){for(;127<e;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function xt(t,e){if(0<=e)Ft(t,e);else{for(let n=0;9>n;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Ot(t,e){t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function Rt(t,e){0!==e.length&&(t.l.push(e),t.h+=e.length)}function Mt(t,e,n){Ft(t.g,8*e+n)}function Ct(t,e){return Mt(t,e,2),e=t.g.end(),Rt(t,e),e.push(t.h),e}function Pt(t,e){var n=e.pop();for(n=t.h+t.g.length()-n;127<n;)e.push(127&n|128),n>>>=7,t.h++;e.push(n),t.h++}function It(t,e,n){Mt(t,e,2),Ft(t.g,n.length),Rt(t,t.g.end()),Rt(t,n)}function Nt(t,e,n,r){null!=n&&(e=Ct(t,e),r(n,t),Pt(t,e))}class Dt{constructor(t,e,n){this.g=t,this.h=e,this.l=n}}function $t(t){return Array.prototype.slice.call(t)}const Ut="function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():void 0;var Bt=Ut?(t,e)=>{t[Ut]|=e}:(t,e)=>{void 0!==t.g?t.g|=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}})};function Gt(t){const e=Vt(t);1!=(1&e)&&(Object.isFrozen(t)&&(t=$t(t)),Wt(t,1|e))}var jt=Ut?(t,e)=>{t[Ut]&=~e}:(t,e)=>{void 0!==t.g&&(t.g&=~e)},Vt=Ut?t=>0|t[Ut]:t=>0|t.g,zt=Ut?t=>t[Ut]:t=>t.g,Wt=Ut?(t,e)=>{t[Ut]=e}:(t,e)=>{void 0!==t.g?t.g=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}})};function Ht(t){return Bt(t,1),t}function Kt(t){return Bt(t,34),t}function Xt(t,e){Wt(e,-255&(0|t))}function Yt(t,e){Wt(e,-221&(34|t))}function qt(t){return 0===(t=t>>11&1023)?536870912:t}var Jt,Zt={};function Qt(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function te(t,e,n){if(null!=t)if("string"==typeof t)t=t?new V(t,$):G();else if(t.constructor!==V)if(I(t))t=n?K(t):t.length?new V(new Uint8Array(t),$):G();else{if(!e)throw Error();t=void 0}return t}const ee=[];function ne(t){if(2&t)throw Error()}Wt(ee,39),Jt=Object.freeze(ee);class re{constructor(t,e,n){this.l=0,this.g=t,this.h=e,this.m=n}next(){if(this.l<this.g.length){const t=this.g[this.l++];return{done:!1,value:this.h?this.h.call(this.m,t):t}}return{done:!0,value:void 0}}[Symbol.iterator](){return new re(this.g,this.h,this.m)}}var se={};let ie,oe;function ae(t,e){(e=ie?e[ie]:void 0)&&(t[ie]=$t(e))}function ce(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function he(t){return null==t?t:"number"==typeof t||"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function ue(t){return null==t?t:"boolean"==typeof t||"number"==typeof t?!!t:void 0}function le(t){return"number"==typeof t&&Number.isFinite(t)||!!t&&"string"==typeof t&&isFinite(t)}function de(t){if(null==t)return t;if("string"==typeof t){if(!t)return;t=+t}return"number"==typeof t?t:void 0}function fe(t){if(null==t)return t;if("string"==typeof t){if(!t)return;t=+t}return"number"==typeof t?t:void 0}function pe(t){if("string"!=typeof t)throw Error();return t}function ge(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function me(t){return null==t||"string"==typeof t?t:void 0}function ye(t,e,n,r){var s=!1;return null==t||"object"!=typeof t||(s=Array.isArray(t))||t.K!==Zt?s?(0===(s=n=Vt(t))&&(s|=32&r),(s|=2&r)!==n&&Wt(t,s),new e(t)):(n?2&r?(t=e[_e])?e=t:(Kt((t=new e).u),e=e[_e]=t):e=new e:e=void 0,e):t}const _e="function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():"di";function ve(t){return t}function Ae(t,e,n){return"string"==typeof(t="number"===(e=typeof t)||"string"===e?t:n?0:void 0)&&(n=+t,Number.isSafeInteger(n))?n:t}let we,Ee;function be(t){switch(typeof t){case"number":return 0<t?void 0:0===t?Ee||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}function Te(t,e){return ke(t,e[0],e[1])}function ke(t,e,n){if(null==t&&(t=we),we=void 0,null==t){var r=96;n?(t=[n],r|=512):t=[],e&&(r=-2095105&r|(1023&e)<<11)}else{if(!Array.isArray(t))throw Error();if(64&(r=Vt(t)))return oe&&delete t[oe],t;if(r|=64,n&&(r|=512,n!==t[0]))throw Error();t:{var s=(n=t).length;if(s){const t=s-1;var i=n[t];if(Qt(i)){1024<=(s=t-(e=+!!(512&(r|=256))-1))&&(Le(n,e,i),s=1023),r=-2095105&r|(1023&s)<<11;break t}}e&&(i=+!!(512&r)-1,1024<(e=Math.max(e,s-i))&&(Le(n,i,{}),r|=256,e=1023),r=-2095105&r|(1023&e)<<11)}}return Wt(t,r),t}function Le(t,e,n){const r=1023+e,s=t.length;for(let i=r;i<s;i++){const r=t[i];null!=r&&r!==n&&(n[i-e]=r)}t.length=r+1,t[r]=n}function Se(t){if(2&t.g)throw Error("Cannot mutate an immutable Map")}var Fe=class extends Map{constructor(t,e,n=ve,r=ve){super();let s=Vt(t);s|=64,Wt(t,s),this.g=s,this.l=e,this.h=n||ve,this.j=this.l?xe:r||ve;for(let i=0;i<t.length;i++){const o=t[i],a=n(o[0],!1,!0);let c=o[1];e?void 0===c&&(c=null):c=r(o[1],!1,!0,void 0,void 0,s),super.set(a,c)}}s(t=Oe){return this.m(t)}m(t=Oe){const e=[],n=super.entries();for(var r;!(r=n.next()).done;)(r=r.value)[0]=t(r[0]),r[1]=t(r[1]),e.push(r);return e}clear(){Se(this),super.clear()}delete(t){return Se(this),super.delete(this.h(t,!0,!1))}entries(){var t=this.A();return new re(t,Re,this)}keys(){return this.C()}values(){var t=this.A();return new re(t,Fe.prototype.get,this)}forEach(t,e){super.forEach(((n,r)=>{t.call(e,this.get(r),r,this)}))}set(t,e){return Se(this),null==(t=this.h(t,!0,!1))?this:null==e?(super.delete(t),this):super.set(t,this.j(e,!0,!0,this.l,!1,this.g))}H(t){const e=this.h(t[0],!1,!0);t=t[1],t=this.l?void 0===t?null:t:this.j(t,!1,!0,void 0,!1,this.g),super.set(e,t)}has(t){return super.has(this.h(t,!1,!1))}get(t){t=this.h(t,!1,!1);const e=super.get(t);if(void 0!==e){var n=this.l;return n?((n=this.j(e,!1,!0,n,this.v,this.g))!==e&&super.set(t,n),n):e}}A(){return Array.from(super.keys())}C(){return super.keys()}[Symbol.iterator](){return this.entries()}};function xe(t,e,n,r,s,i){return t=ye(t,r,n,i),s&&(t=Ue(t)),t}function Oe(t){return t}function Re(t){return[t,this.get(t)]}function Me(t,e,n,r,s,i){if(null!=t){if(Array.isArray(t))t=s&&0==t.length&&1&Vt(t)?void 0:i&&2&Vt(t)?t:Ce(t,e,n,void 0!==r,s,i);else if(Qt(t)){const o={};for(let a in t)o[a]=Me(t[a],e,n,r,s,i);t=o}else t=e(t,r);return t}}function Ce(t,e,n,r,s,i){const o=r||n?Vt(t):0;r=r?!!(32&o):void 0;const a=$t(t);for(let t=0;t<a.length;t++)a[t]=Me(a[t],e,n,r,s,i);return n&&(ae(a,t),n(o,a)),a}function Pe(t){return Me(t,Ie,void 0,void 0,!1,!1)}function Ie(t){return t.K===Zt?t.toJSON():t instanceof Fe?t.s(Pe):function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"boolean":return t?1:0;case"object":if(t&&!Array.isArray(t)){if(I(t))return O(t);if(t instanceof V){const e=t.L;return null==e?"":"string"==typeof e?e:t.L=O(e)}if(t instanceof Fe)return t.s()}}return t}(t)}function Ne(t,e,n=Yt){if(null!=t){if(F&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){const r=Vt(t);return 2&r?t:!e||68&r||!(32&r||0===r)?Ce(t,Ne,4&r?Yt:n,!0,!1,!0):(Wt(t,34|r),t)}return t.K===Zt?(e=t.u,t=2&(n=zt(e))?t:De(t,e,n,!0)):t instanceof Fe&&(e=Kt(t.m(Ne)),t=new Fe(e,t.l,t.h,t.j)),t}}function De(t,e,n,r){return t=t.constructor,we=e=$e(e,n,r),e=new t(e),we=void 0,e}function $e(t,e,n){const r=n||2&e?Yt:Xt,s=!!(32&e);return t=function(t,e,n){const r=$t(t);var s=r.length;const i=256&e?r[s-1]:void 0;for(s+=i?-1:0,e=512&e?1:0;e<s;e++)r[e]=n(r[e]);if(i){e=r[e]={};for(const t in i)e[t]=n(i[t])}return ae(r,t),r}(t,e,(t=>Ne(t,s,r))),Bt(t,32|(n?2:0)),t}function Ue(t){const e=t.u,n=zt(e);return 2&n?De(t,e,n,!1):t}function Be(t,e){return Ge(t=t.u,zt(t),e)}function Ge(t,e,n,r){if(-1===n)return null;if(n>=qt(e)){if(256&e)return t[t.length-1][n]}else{var s=t.length;if(r&&256&e&&null!=(r=t[s-1][n]))return r;if((e=n+(+!!(512&e)-1))<s)return t[e]}}function je(t,e,n,r){const s=t.u,i=zt(s);return ne(i),Ve(s,i,e,n,r),t}function Ve(t,e,n,r,s){var i=qt(e);if(n>=i||s){if(s=e,256&e)i=t[t.length-1];else{if(null==r)return;i=t[i+(+!!(512&e)-1)]={},s|=256}i[n]=r,s!==e&&Wt(t,s)}else t[n+(+!!(512&e)-1)]=r,256&e&&(n in(t=t[t.length-1])&&delete t[n])}function ze(t,e,n,r,s){var i=2&e;let o=Ge(t,e,n,s);Array.isArray(o)||(o=Jt);const a=Vt(o);if(1&a||Ht(o),i)2&a||Kt(o),1&r||Object.freeze(o);else{i=!(2&r);const c=2&a;1&r||!c?i&&32&a&&!c&&jt(o,32):(o=Ht($t(o)),Ve(t,e,n,o,s))}return o}function We(t,e){t=t.u;const n=zt(t),r=Ge(t,n,e),s=he(r);return null!=s&&s!==r&&Ve(t,n,e,s),s}function He(t){t=t.u;const e=zt(t),n=Ge(t,e,1),r=te(n,!0,!!(34&e));return null!=r&&r!==n&&Ve(t,e,1,r),r}function Ke(t,e,n){t=t.u;const r=zt(t),s=2&r;let i=ze(t,r,e,1),o=Vt(i);if(!(4&o)){Object.isFrozen(i)&&(o=0,i=$t(i),Ve(t,r,e,i));let a=0,c=0;for(;a<i.length;a++){const t=n(i[a]);null!=t&&(i[c++]=t)}c<a&&(i.length=c),o|=5,s&&(o|=34),Wt(i,o),2&o&&Object.freeze(i)}return!s&&(2&o||Object.isFrozen(i))&&(i=$t(i),Bt(i,5),Ve(t,r,e,i)),i}let Xe;function Ye(){return Xe??=new Fe(Kt([]),void 0,void 0,void 0,se)}function qe(t){t=$t(t);for(let e=0;e<t.length;e++){const n=t[e]=$t(t[e]);Array.isArray(n[1])&&(n[1]=Kt(n[1]))}return t}function Je(t,e,n){{t=t.u;const r=zt(t);if(ne(r),null==n)Ve(t,r,e);else{if(!(4&Vt(n))){Object.isFrozen(n)&&(n=$t(n));for(let t=0;t<n.length;t++)n[t]=pe(n[t]);Wt(n,5)}Ve(t,r,e,n)}}}function Ze(t,e){return Qe(t=t.u,zt(t),Bs)===e?e:-1}function Qe(t,e,n){let r=0;for(let s=0;s<n.length;s++){const i=n[s];null!=Ge(t,e,i)&&(0!==r&&Ve(t,e,r),r=i)}return r}function tn(t,e,n,r){const s=zt(t);ne(s);const i=Ge(t,s,n,r);let o;if(null!=i&&i.K===Zt)return(e=Ue(i))!==i&&Ve(t,s,n,e,r),e.u;if(Array.isArray(i)){const t=Vt(i);o=2&t?$e(i,t,!1):i,o=Te(o,e)}else o=Te(void 0,e);return o!==i&&Ve(t,s,n,o,r),o}function en(t,e,n,r){t=t.u;const s=zt(t),i=Ge(t,s,n,r);return(e=ye(i,e,!1,s))!==i&&null!=e&&Ve(t,s,n,e,r),e}function nn(t,e,n,r=!1){if(null==(e=en(t,e,n,r)))return e;t=t.u;const s=zt(t);if(!(2&s)){const i=Ue(e);i!==e&&Ve(t,s,n,e=i,r)}return e}function rn(t,e,n,r,s){var i=!!(2&e),o=ze(t,e,r,1);if(o===Jt||!(4&Vt(o))){var a=o;o=!!(2&e);var c=!!(2&Vt(a));i=a,!o&&c&&(a=$t(a));var h=e|(c?2:0);c=c||void 0;let u=0,l=0;for(;u<a.length;u++){const t=ye(a[u],n,!1,h);void 0!==t&&(c=c||2&zt(t.u),a[l++]=t)}return l<u&&(a.length=l),h=5|(a=Vt(n=a)),a!=(c=c?-9&h:8|h)&&(Object.isFrozen(n)&&(n=$t(n)),Wt(n,c)),i!==(a=n)&&Ve(t,e,r,a),(o&&2!==s||1===s)&&Object.freeze(a),a}return 3===s||(i?2===s&&(s=Vt(o),o=$t(o),Wt(o,s),Ve(t,e,r,o)):(i=Object.isFrozen(o),1===s?i||Object.freeze(o):(n=-35&(s=Vt(o)),i&&(s=0,Ve(t,e,r,o=$t(o))),s!==n&&Wt(o,n)))),o}function sn(t,e,n){var r=t.u;const s=zt(r);if(e=rn(r,s,e,n,(t=!!(2&s))?1:2),!(t||8&Vt(e))){for(n=0;n<e.length;n++)(t=e[n])!==(r=Ue(t))&&(e[n]=r);Bt(e,8)}return e}function on(t,e,n,r,s){return null==r&&(r=void 0),je(t,n,r,s)}function an(t,e,n,r){null==r&&(r=void 0),t=t.u;const s=zt(t);ne(s),(n=Qe(t,s,n))&&n!==e&&null!=r&&Ve(t,s,n),Ve(t,s,e,r)}function cn(t,e,n){t=t.u;const r=zt(t);ne(r),t=rn(t,r,e,1,2),e=null!=n?n:new e,t.push(e),e.G()&&jt(t,8)}function hn(t,e){return de(Be(t,e))}function un(t){return t=null==(t=Be(t,2))||le(t)?t:void 0}function ln(t,e){return me(Be(t,e))}function dn(t){return t??0}function fn(t,e){return dn(We(t,e))}function pn(t,e,n){if(null!=n){if("boolean"!=typeof n)throw t=typeof n,Error(`Expected boolean but got ${"object"!=t?t:n?Array.isArray(n)?"array":t:"null"}: ${n}`);n=!!n}je(t,e,n)}function gn(e,n,r){if(null!=r){if("number"!=typeof r)throw ce(e=Error(),"warning"),e;if(!Number.isFinite(r)){const e=Error();ce(e,"incident"),function(e){t.setTimeout((()=>{throw e}),0)}(e)}}je(e,n,r)}function mn(t,e,n){if(null!=n&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);je(t,e,n)}function yn(t,e,n){n=pe(n),t=t.u;const r=zt(t);ne(r),ze(t,r,e,2).push(n)}function _n(t,e,n){e.g?e.m(t,e.g,e.h,n,!0):e.m(t,e.h,n,!0)}Fe.prototype.toJSON=void 0;var vn=class{constructor(t,e){this.u=ke(t,e)}toJSON(){return An(this,Ce(this.u,Ie,void 0,void 0,!1,!1),!0)}l(){var t=Ni;return t.g?t.l(this,t.g,t.h,!0):t.l(this,t.h,t.defaultValue,!0)}clone(){const t=this.u;return De(this,t,zt(t),!1)}G(){return!!(2&Vt(this.u))}};function An(t,e,n){var r=t.constructor.B,s=qt(zt(n?t.u:e)),i=!1;if(r){if(!n){var o;if((e=$t(e)).length&&Qt(o=e[e.length-1]))for(i=0;i<r.length;i++)if(r[i]>=s){Object.assign(e[e.length-1]={},o);break}i=!0}var a;s=e,n=!n,t=qt(o=zt(t.u)),o=+!!(512&o)-1;for(let e=0;e<r.length;e++){var c=r[e];if(c<t){var h=s[c+=o];null==h?s[c]=n?Jt:Ht([]):n&&h!==Jt&&Gt(h)}else{if(!a){var u=void 0;s.length&&Qt(u=s[s.length-1])?a=u:s.push(a={})}h=a[c],null==a[c]?a[c]=n?Jt:Ht([]):n&&h!==Jt&&Gt(h)}}}if(!(r=e.length))return e;let l,d;if(Qt(a=e[r-1])){t:{var f=a;u={},s=!1;for(let t in f)n=f[t],Array.isArray(n)&&n!=n&&(s=!0),null!=n?u[t]=n:s=!0;if(s){for(let t in u){f=u;break t}f=null}}f!=a&&(l=!0),r--}for(;0<r&&null==(a=e[r-1]);r--)d=!0;return l||d?(e=i?e:Array.prototype.slice.call(e,0,r),i&&(e.length=r),f&&e.push(f),e):e}function wn(t){return{aa:lr,S:t}}function En(t,e){if(Array.isArray(e)){var n=Vt(e);if(4&n)return e;for(var r=0,s=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[s++]=n)}return s<r&&(e.length=s),Wt(e,5|n),2&n&&Object.freeze(e),e}}vn.prototype.K=Zt,vn.prototype.toString=function(){return An(this,this.u,!1).toString()};const bn=Symbol();function Tn(t){let e=t[bn];if(!e){const n=Nn(t),r=n.m;e=r?(t,e)=>r(t,e,n):(t,e)=>{for(;pt(e)&&4!=e.h;){var r=e.m,s=n[r];if(!s){var i=n.h;i&&(i=i[r])&&(s=n[r]=kn(i))}s&&s(e,t,r)||(r=(s=e).l,gt(s),s.Y?s=void 0:(i=s.g.g-r,s.g.g=r,s=lt(s.g,i)),r=t,s&&(ie||=Symbol(),(i=r[ie])?i.push(s):r[ie]=[s]))}(e=n.l)&&(t[oe||=Symbol()]=e)},t[bn]=e}return e}function kn(t){const e=function(t){if(t=t.S)return Tn(t)}(t),n=t.aa.g;if(e){const r=Nn(t.S).g;return(t,s,i)=>n(t,s,i,r,e)}return(t,e,r)=>n(t,e,r)}function Ln(t,e,n,r){e.g=be(t[0]);let s=1;if(t.length>s&&!(t[s]instanceof Dt)){var i=t[s++];if(Array.isArray(i))return e.m=i[0],e.h=i[1],e;e.h=i}for(i=0;s<t.length;){const u=t[s++];var o=t[s];for("number"==typeof o?(s++,i+=o):i++,u.l&&((o=e.l)||(e.l=o=[]),o.push(i)),o=s;o<t.length&&!(t[o]instanceof Dt);)o++;if(o-=s){var a=t,c=s,h=a[c];if("function"==typeof h&&(h=h(),a[c]=h),(a=Array.isArray(h))&&!(a=Cn in h||xn in h)&&(a=0<h.length)){const t=be(c=(a=h)[0]);null!=t&&t!==c&&(a[0]=t),a=null!=t}(h=a?h:void 0)?(s++,e[i]=1===o?r(u,h):r(u,h,t[s++])):e[i]=n(u,t[s++])}else e[i]=n(u)}return e}const Sn=Symbol();function Fn(t){let e=t[Sn];if(!e){const n=Mn(t);e=(t,e)=>$n(t,e,n),t[Sn]=e}return e}const xn=Symbol();function On(t){return t.h}function Rn(t,e){let n,r;const s=t.h;return(t,i,o)=>s(t,i,o,r||=Mn(e).g,n||=Fn(e))}function Mn(t){let e=t[xn];return e||(e=Ln(t,t[xn]={},On,Rn),Cn in t&&xn in t&&(t.length=0),e)}const Cn=Symbol();function Pn(t,e){const n=t.g;return e?(t,r,s)=>n(t,r,s,e):n}function In(t,e,n){const r=t.g;let s,i;return(t,o,a)=>r(t,o,a,i||=Nn(e).g,s||=Tn(e),n)}function Nn(t){let e=t[Cn];return e||(e=Ln(t,t[Cn]={},Pn,In),Cn in t&&xn in t&&(t.length=0),e)}function Dn(t,e){var n=t[e];if(n)return n;if((n=t.h)&&(n=n[e])){var r=n.S,s=n.aa.h;if(r){const t=Fn(r),e=Mn(r).g;n=(n,r,i)=>s(n,r,i,e,t)}else n=s;return t[e]=n}}function $n(t,e,n){for(var r=zt(t),s=+!!(512&r)-1,i=t.length,o=512&r?1:0,a=i+(256&r?-1:0);o<a;o++){const r=t[o];if(null==r)continue;const i=o-s,a=Dn(n,i);a&&a(e,r,i)}if(256&r){r=t[i-1];for(let t in r)s=+t,Number.isNaN(s)||null!=(i=r[t])&&(a=Dn(n,s))&&a(e,i,s)}if(t=ie?t[ie]:void 0)for(Rt(e,e.g.end()),n=0;n<t.length;n++)Rt(e,j(t[n])||D())}function Un(t,e){return new Dt(t,e,!1)}function Bn(t,e){return new Dt(t,e,!0)}function Gn(t,e,n){Ve(t,zt(t),e,n)}var jn=Un((function(t,e,n,r,s){return 2===t.h&&(t=mt(t,Te([void 0,void 0],r),s),ne(r=zt(e)),(s=Ge(e,r,n))instanceof Fe?0!=(2&s.g)?((s=s.m()).push(t),Ve(e,r,n,s)):s.H(t):Array.isArray(s)?(2&Vt(s)&&Ve(e,r,n,s=qe(s)),s.push(t)):Ve(e,r,n,[t]),!0)}),(function(t,e,n,r,s){if(e instanceof Fe)e.forEach(((e,i)=>{Nt(t,n,Te([i,e],r),s)}));else if(Array.isArray(e))for(let i=0;i<e.length;i++){const o=e[i];Array.isArray(o)&&Nt(t,n,Te(o,r),s)}}));function Vn(t,e,n){t:if(null!=e){if(le(e)){if("string"==typeof e)break t;if("number"==typeof e)break t}e=void 0}null!=e&&("string"==typeof e&&Tt(e),null!=e&&(Mt(t,n,0),"number"==typeof e?(t=t.g,Q(e),St(t,J,Z)):(n=Tt(e),St(t.g,n.h,n.g))))}function zn(t,e,n){null!=(e=de(e))&&null!=e&&(Mt(t,n,0),xt(t.g,e))}function Wn(t,e,n){null!=(e=ue(e))&&(Mt(t,n,0),t.g.g.push(e?1:0))}function Hn(t,e,n){null!=(e=me(e))&&It(t,n,u(e))}function Kn(t,e,n,r,s){Nt(t,n,e instanceof vn?e.u:Array.isArray(e)?Te(e,r):void 0,s)}function Xn(t,e,n){null!=(e=null==e||"string"==typeof e||I(e)||e instanceof V?e:void 0)&&It(t,n,X(e).buffer)}function Yn(t,e,n){return(5===t.h||2===t.h)&&(e=ze(e,zt(e),n,2,!1),2==t.h?vt(t,dt.prototype.A,e):e.push(t.g.A()),!0)}var qn=Un((function(t,e,n){if(1!==t.h)return!1;var r=t.g;t=ht(r);const s=ht(r);r=2*(s>>31)+1;const i=s>>>20&2047;return t=4294967296*(1048575&s)+t,Gn(e,n,2047==i?t?NaN:1/0*r:0==i?r*Math.pow(2,-1074)*t:r*Math.pow(2,i-1075)*(t+4503599627370496)),!0}),(function(t,e,n){null!=(e=he(e))&&(Mt(t,n,1),t=t.g,(n=q||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),J=n.getUint32(0,!0),Z=n.getUint32(4,!0),Ot(t,J),Ot(t,Z))})),Jn=Un((function(t,e,n){return 5===t.h&&(Gn(e,n,t.g.A()),!0)}),(function(t,e,n){null!=(e=he(e))&&(Mt(t,n,5),t=t.g,tt(e),Ot(t,J))})),Zn=Bn(Yn,(function(t,e,n){if(null!=(e=En(he,e)))for(let i=0;i<e.length;i++){var r=t,s=e[i];null!=s&&(Mt(r,n,5),r=r.g,tt(s),Ot(r,J))}})),Qn=Bn(Yn,(function(t,e,n){if(null!=(e=En(he,e))&&e.length){Mt(t,n,2),Ft(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,tt(e[r]),Ot(n,J)}})),tr=Un((function(t,e,n){return 0===t.h&&(Gn(e,n,at(t.g,nt)),!0)}),Vn),er=Un((function(t,e,n){return 0===t.h&&(Gn(e,n,0===(t=at(t.g,nt))?void 0:t),!0)}),Vn),nr=Un((function(t,e,n){return 0===t.h&&(Gn(e,n,at(t.g,et)),!0)}),(function(t,e,n){t:if(null!=e){if(le(e)){if("string"==typeof e)break t;if("number"==typeof e)break t}e=void 0}null!=e&&("string"==typeof e&&wt(e),null!=e&&(Mt(t,n,0),"number"==typeof e?(t=t.g,Q(e),St(t,J,Z)):(n=wt(e),St(t.g,n.h,n.g))))})),rr=Un((function(t,e,n){return 0===t.h&&(Gn(e,n,t.g.m()),!0)}),zn),sr=Bn((function(t,e,n){return(0===t.h||2===t.h)&&(e=ze(e,zt(e),n,2,!1),2==t.h?vt(t,dt.prototype.m,e):e.push(t.g.m()),!0)}),(function(t,e,n){if(null!=(e=En(de,e))&&e.length){n=Ct(t,n);for(let n=0;n<e.length;n++)xt(t.g,e[n]);Pt(t,n)}})),ir=Un((function(t,e,n){return 0===t.h&&(Gn(e,n,0===(t=t.g.m())?void 0:t),!0)}),zn),or=Un((function(t,e,n){return 0===t.h&&(Gn(e,n,ct(t.g)),!0)}),Wn),ar=Un((function(t,e,n){return 0===t.h&&(Gn(e,n,!1===(t=ct(t.g))?void 0:t),!0)}),Wn),cr=Bn((function(t,e,n){if(2!==t.h)return!1;t=yt(t);const r=zt(e);return ne(r),ze(e,r,n,2).push(t),!0}),(function(t,e,n){if(null!=(e=En(me,e)))for(let s=0;s<e.length;s++){var r=e[s];null!=r&&It(t,n,u(r))}})),hr=Un((function(t,e,n){return 2===t.h&&(Gn(e,n,""===(t=yt(t))?void 0:t),!0)}),Hn),ur=Un((function(t,e,n){return 2===t.h&&(Gn(e,n,yt(t)),!0)}),Hn),lr=Un((function(t,e,n,r,s){return 2===t.h&&(mt(t,tn(e,r,n,!0),s),!0)}),Kn),dr=Un((function(t,e,n,r,s){return 2===t.h&&(mt(t,tn(e,r,n),s),!0)}),Kn),fr=Bn((function(t,e,n,r,s){if(2!==t.h)return!1;r=Te(void 0,r);const i=zt(e);ne(i);let o=ze(e,i,n,3);return(Object.isFrozen(o)||4&Vt(o))&&(o=$t(o),Ve(e,i,n,o)),o.push(r),mt(t,r,s),!0}),(function(t,e,n,r,s){if(Array.isArray(e))for(let i=0;i<e.length;i++)Kn(t,e[i],n,r,s)})),pr=Un((function(t,e,n,r,s,i){if(2!==t.h)return!1;const o=zt(e);return ne(o),(i=Qe(e,o,i))&&n!==i&&Ve(e,o,i),mt(t,e=tn(e,r,n),s),!0}),Kn),gr=Un((function(t,e,n){return 2===t.h&&(Gn(e,n,_t(t)),!0)}),Xn),mr=Bn((function(t,e,n){return(0===t.h||2===t.h)&&(e=ze(e,zt(e),n,2,!1),2==t.h?vt(t,dt.prototype.j,e):e.push(t.g.j()),!0)}),(function(t,e,n){if(null!=(e=En(fe,e)))for(let i=0;i<e.length;i++){var r=t,s=e[i];null!=s&&(Mt(r,n,0),Ft(r.g,s))}})),yr=Un((function(t,e,n){return 0===t.h&&(Gn(e,n,t.g.m()),!0)}),(function(t,e,n){null!=(e=de(e))&&(e=parseInt(e,10),Mt(t,n,0),xt(t.g,e))})),_r=Bn((function(t,e,n){return(0===t.h||2===t.h)&&(e=ze(e,zt(e),n,2,!1),2==t.h?vt(t,dt.prototype.C,e):e.push(t.g.m()),!0)}),(function(t,e,n){if(null!=(e=En(de,e))&&e.length){n=Ct(t,n);for(let n=0;n<e.length;n++)xt(t.g,e[n]);Pt(t,n)}}));class vr{constructor(t,e){this.h=t,this.g=e,this.l=nn,this.m=on,this.defaultValue=void 0}}function Ar(t,e){return new vr(t,e)}function wr(t,e){return(n,r)=>{t:{if(At.length){const t=At.pop();t.o(r),it(t.g,n,r),n=t}else n=new class{constructor(t,e){if(ft.length){const n=ft.pop();it(n,t,e),t=n}else t=new dt(t,e);this.g=t,this.l=this.g.g,this.h=this.m=-1,this.o(e)}o({Y:t=!1}={}){this.Y=t}}(n,r);try{var s=new t;const r=s.u;Tn(e)(r,n),oe&&delete r[oe];var i=s;break t}finally{(s=n.g).h=null,s.s=!1,s.v=0,s.l=0,s.g=0,s.O=!1,n.m=-1,n.h=-1,100>At.length&&At.push(n)}i=void 0}return i}}function Er(t){return function(){const e=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};$n(this.u,e,Mn(t)),Rt(e,e.g.end());const n=new Uint8Array(e.h),r=e.l,s=r.length;let i=0;for(let t=0;t<s;t++){const e=r[t];n.set(e,i),i+=e.length}return e.l=[n],n}}var br,Tr=[0,hr,Un((function(t,e,n){return 2===t.h&&(Gn(e,n,(t=_t(t))===G()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof vn){const r=e.Aa;return void(r&&(e=r(e),null!=e&&It(t,n,X(e).buffer)))}if(Array.isArray(e))return}Xn(t,e,n)}))];function kr(e){if(void 0===br){var r=null,s=t.trustedTypes;if(s&&s.createPolicy){try{r=s.createPolicy("goog#html",{createHTML:n,createScript:n,createScriptURL:n})}catch(e){t.console&&t.console.error(e.message)}br=r}else br=r}return e=(r=br)?r.createScriptURL(e):e,new class{constructor(t){this.g=t}toString(){return this.g+""}}(e)}var Lr=[0,ur],Sr=[0,rr,yr,or,or,sr,yr,yr],Fr=[0,or,or],xr=class extends vn{constructor(){super()}};xr.B=[6];var Or=[0,or,ur,or,yr,yr,_r,ur,ur,dr,Fr,yr],Rr=[0,ur,ur,ur],Mr=class extends vn{constructor(){super()}},Cr=[0],Pr=[0,rr],Ir=[1,2,3,4,5],Nr=class extends vn{constructor(t){super(t,2)}},Dr={},$r=[-2,Dr,or];Dr[336783863]=wn([0,ur,or,or,rr,dr,[0,pr,Cr,Ir,pr,Or,Ir,pr,Rr,Ir,pr,Pr,Ir,pr,Sr,Ir],dr,Lr]);var Ur=[0,hr,ar],Br=[0,er,er,ar,ar,ar,ar,er,sr,hr,ir,er,er,ar,ir,ar,ar,ar,hr],Gr=[-1,{}],jr=[0,ur,dr,2,Gr],Vr=[0,ur,cr,dr,Gr];function zr(t,e){e=ge(e),t=t.u;const n=zt(t);ne(n),Ve(t,n,2,""===e?void 0:e)}function Wr(t,e){yn(t,3,e)}function Hr(t,e){yn(t,4,e)}var Kr=class extends vn{constructor(t){super(t,500)}o(t){return on(this,0,7,t)}};Kr.B=[3,4,5,6,8,13,17,1005];var Xr=[-500,hr,hr,cr,cr,cr,cr,dr,$r,fr,Tr,ir,ir,dr,jr,dr,Vr,fr,Ur,hr,dr,Br,ir,cr,cr,988],Yr=[0,hr,hr,dr,Gr],qr=[-500,ur,ur,dr,[-1,{}],ur,999],Jr=[-500,ur,cr,cr,dr,[-2,{},or],cr,998,cr],Zr=[-500,ur,cr,dr,Gr,cr,999];function Qr(t,e){cn(t,Kr,e)}function ts(t,e){yn(t,10,e)}function es(t,e){yn(t,15,e)}var ns=class extends vn{constructor(t){super(t,500)}o(t){return on(this,0,1001,t)}};ns.B=[1,6,7,9,10,15,16,17,14,1002];var rs=[-500,fr,Xr,fr,5,qr,fr,Jr,ir,fr,Zr,cr,ir,dr,jr,dr,Vr,fr,Yr,cr,cr,cr,dr,Br,hr,hr,ar,dr,980,Gr,fr,Tr],ss=wr(ns,rs);ns.prototype.g=Er(rs);var is=[0,fr,[0,rr,rr,rr]],os=class extends vn{constructor(t){super(t)}},as=[0,rr,Jn,ur,ur],cs=class extends vn{constructor(t){super(t)}g(){return sn(this,os,1)}};cs.B=[1];var hs=[0,fr,as],us=wr(cs,hs),ls=[0,rr,Jn],ds=[0,rr,rr,dr,is],fs=class extends vn{constructor(t){super(t)}},ps=[0,rr,rr,rr,rr],gs=[0,Jn,Jn,Jn,Jn],ms=class extends vn{constructor(t){super(t)}},ys=[0,Jn,Jn,ur,Jn],_s=class extends vn{constructor(t){super(t)}h(){return nn(this,fs,2)}g(){return sn(this,ms,5)}};_s.B=[5];var vs=[0,yr,dr,ps,dr,gs,dr,ds,fr,ys],As=class extends vn{constructor(t){super(t)}};As.B=[1,2,3,8,9];var ws=wr(As,[0,cr,sr,Qn,dr,vs,ur,ur,tr,fr,ls,cr,tr]),Es=class extends vn{constructor(t){super(t)}},bs=[0,Jn,Jn,Jn,Jn,Jn],Ts=class extends vn{constructor(t){super(t)}};Ts.B=[1];var ks=wr(Ts,[0,fr,bs]),Ls=class extends vn{constructor(t){super(t)}},Ss=[0,Jn,Jn,Jn,Jn,Jn],Fs=class extends vn{constructor(t){super(t)}};Fs.B=[1];var xs=wr(Fs,[0,fr,Ss]),Os=class extends vn{constructor(t){super(t)}};Os.B=[3];var Rs=[0,rr,rr,Qn,yr],Ms=class extends vn{constructor(){super()}};Ms.prototype.g=Er([0,Jn,Jn,Jn,Jn,Jn,tr]);var Cs=class extends vn{constructor(t){super(t)}},Ps=[0,rr,2,ur,dr,hs],Is=class extends vn{constructor(t){super(t)}};Is.B=[1];var Ns=wr(Is,[0,fr,Ps,tr]),Ds=class extends vn{constructor(t){super(t)}};Ds.B=[1];var $s=class extends vn{constructor(t){super(t)}da(){const t=He(this);return null==t?G():t}},Us=class extends vn{constructor(t){super(t)}},Bs=[1,2],Gs=[0,pr,[0,Qn],Bs,pr,[0,gr],Bs,rr,ur],js=class extends vn{constructor(t){super(t)}};js.B=[1];var Vs=wr(js,[0,fr,Gs,tr]),zs=class extends vn{constructor(t){super(t)}};zs.B=[4,5];var Ws=[0,ur,rr,Jn,cr,cr],Hs=class extends vn{constructor(t){super(t)}},Ks=[0,or,or],Xs=class extends vn{constructor(t){super(t)}},Ys=[1,2,3,4,5],qs=class extends vn{constructor(t){super(t)}g(){return null!=He(this)}h(){return null!=ln(this,2)}},Js=[0,gr,ur,dr,[0,rr,tr,tr],dr,[0,nr,tr]],Zs=class extends vn{constructor(t){super(t)}g(){return ue(Be(this,2))??!1}},Qs=[0,dr,Js,or,dr,[0,pr,Pr,Ys,pr,Or,Ys,pr,Sr,Ys,pr,Cr,Ys,pr,Rr,Ys]],ti=class extends vn{constructor(t){super(t)}},ei=[0,dr,Qs,Jn,Jn,rr],ni=Ar(502141897,ti);Dr[502141897]=wn(ei);var ri=[0,dr,Js];Dr[512499200]=wn(ri);var si=[0,dr,ri];Dr[515723506]=wn(si);var ii=wr(class extends vn{constructor(t){super(t)}},[0,dr,[0,yr,yr,Zn,mr],dr,Rs]),oi=[0,dr,Qs];Dr[508981768]=wn(oi);var ai=class extends vn{constructor(t){super(t)}},ci=[0,dr,Qs,Jn,dr,oi,or],hi=class extends vn{constructor(t){super(t)}},ui=[0,dr,Qs,dr,ei,dr,ci,Jn,dr,si];Dr[508968149]=wn(ci);var li=Ar(508968150,hi);Dr[508968150]=wn(ui);var di=class extends vn{constructor(t){super(t)}},fi=Ar(513916220,di);Dr[513916220]=wn([0,dr,Qs,dr,ui,rr]);var pi=class extends vn{constructor(t){super(t)}h(){return nn(this,zs,2)}g(){je(this,2)}},gi=[0,dr,Qs,dr,Ws];Dr[478825465]=wn(gi);var mi=[0,dr,Qs];Dr[478825422]=wn(mi);var yi=class extends vn{constructor(t){super(t)}},_i=[0,dr,Qs,dr,mi,dr,gi,dr,gi],vi=class extends vn{constructor(t){super(t)}},Ai=[0,dr,Qs,Jn,rr],wi=class extends vn{constructor(t){super(t)}},Ei=[0,dr,Qs,Jn],bi=class extends vn{constructor(t){super(t)}},Ti=[0,dr,Qs,dr,Ai,dr,Ei,Jn],ki=class extends vn{constructor(t){super(t)}},Li=[0,dr,Qs,dr,Ti,dr,_i];Dr[463370452]=wn(_i),Dr[464864288]=wn(Ai),Dr[474472470]=wn(Ei);var Si=Ar(462713202,bi);Dr[462713202]=wn(Ti);var Fi=Ar(479097054,ki);Dr[479097054]=wn(Li);var xi=class extends vn{constructor(t){super(t)}},Oi=Ar(456383383,xi);Dr[456383383]=wn([0,dr,Qs,dr,Ws]);var Ri=class extends vn{constructor(t){super(t)}},Mi=Ar(476348187,Ri);Dr[476348187]=wn([0,dr,Qs,dr,Ks]);var Ci=class extends vn{constructor(t){super(t)}},Pi=[0,yr,yr],Ii=class extends vn{constructor(t){super(t)}};Ii.B=[3];var Ni=Ar(458105876,class extends vn{constructor(t){super(t)}g(){var t=this.u;const e=zt(t);var n=2&e;return t=function(t,e,n){var r=Ii;const s=2&e;let i=!1;if(null==n){if(s)return Ye();n=[]}else if(n.constructor===Fe){if(0==(2&n.g)||s)return n;n=n.m()}else Array.isArray(n)?i=!!(2&Vt(n)):n=[];if(s){if(!n.length)return Ye();i||(i=!0,Kt(n))}else i&&(i=!1,n=qe(n));return i||(64&Vt(n)?jt(n,32):32&e&&Bt(n,32)),Ve(t,e,2,r=new Fe(n,r,Ae,void 0),!1),r}(t,e,Ge(t,e,2)),null==t||!n&&Ii&&(t.v=!0),n=t}});Dr[458105876]=wn([0,dr,Pi,jn,[0,tr,dr,[0,ur,ur,cr]]]);var Di=class extends vn{constructor(t){super(t)}},$i=Ar(458105758,Di);Dr[458105758]=wn([0,dr,Qs,ur,dr,Pi]);var Ui=class extends vn{constructor(t){super(t)}};Ui.B=[5,6];var Bi=Ar(443442058,Ui);Dr[443442058]=wn([0,dr,Qs,ur,rr,Jn,cr,cr]);var Gi=class extends vn{constructor(t){super(t)}},ji=[0,dr,Qs,Jn,Jn,rr];Dr[514774813]=wn(ji);var Vi=class extends vn{constructor(t){super(t)}},zi=[0,dr,Qs,Jn],Wi=class extends vn{constructor(t){super(t)}},Hi=[0,dr,Qs,dr,ji,dr,zi,Jn];Dr[518928384]=wn(zi);var Ki=Ar(516587230,Wi);function Xi(t,e){return e=e?e.clone():new zs,void 0!==t.displayNamesLocale?je(e,1,ge(t.displayNamesLocale)):void 0===t.displayNamesLocale&&je(e,1),void 0!==t.maxResults?gn(e,2,t.maxResults):"maxResults"in t&&je(e,2),void 0!==t.scoreThreshold?mn(e,3,t.scoreThreshold):"scoreThreshold"in t&&je(e,3),void 0!==t.categoryAllowlist?Je(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&je(e,4),void 0!==t.categoryDenylist?Je(e,5,t.categoryDenylist):"categoryDenylist"in t&&je(e,5),e}function Yi(t,e=-1,n=""){return{categories:t.map((t=>({index:dn(hn(t,1))??-1,score:fn(t,2)??0,categoryName:ln(t,3)??""??"",displayName:ln(t,4)??""??""}))),headIndex:e,headName:n}}function qi(t){var e=Ke(t,3,he),n=Ke(t,2,de);const r=Ke(t,1,me),s=Ke(t,9,me),i={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)i.categories.push({score:e[t],index:n[t]??-1,categoryName:r[t]??"",displayName:s[t]??""});if((e=nn(t,_s,4)?.h())&&(i.boundingBox={originX:hn(e,1)??0,originY:hn(e,2)??0,width:hn(e,3)??0,height:hn(e,4)??0,angle:0}),nn(t,_s,4)?.g().length)for(const e of nn(t,_s,4).g())i.keypoints.push({x:We(e,1)??0,y:We(e,2)??0,score:We(e,4)??0,label:ln(e,3)??""});return i}function Ji(t){const e=[];for(const n of sn(t,Ls,1))e.push({x:fn(n,1)??0,y:fn(n,2)??0,z:fn(n,3)??0});return e}function Zi(t){const e=[];for(const n of sn(t,Es,1))e.push({x:fn(n,1)??0,y:fn(n,2)??0,z:fn(n,3)??0});return e}function Qi(t){return Array.from(t,(t=>127<t?t-256:t))}function to(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,r=0,s=0;for(let i=0;i<t.length;i++)n+=t[i]*e[i],r+=t[i]*t[i],s+=e[i]*e[i];if(0>=r||0>=s)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*s)}let eo;Dr[516587230]=wn(Hi);const no=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 ro(){if(void 0===eo)try{await WebAssembly.instantiate(no),eo=!0}catch{eo=!1}return eo}async function so(t,e){const n=await ro()?"wasm_internal":"wasm_nosimd_internal";return void 0!==e?{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}:{wasmLoaderPath:kr(`./${encodeURIComponent(t)}_${encodeURIComponent(n)}.js`),wasmBinaryPath:kr(`./${encodeURIComponent(t)}_${encodeURIComponent(n)}.wasm`)}}var io=class{};function oo(){const t=navigator.userAgent;return t.includes("Safari")&&!t.includes("Chrome")}async function ao(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),!1),e.addEventListener("error",(t=>{n(t)}),!1),document.body.appendChild(e)}))}importScripts(t.toString())}function co(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function ho(t,e,n){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(n?t.i._bindTextureToStream(n):t.i._bindTextureToCanvas(),!(n=t.i.canvas.getContext("webgl2")||t.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");return t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),e.videoWidth?(n=e.videoWidth,e=e.videoHeight):e.naturalWidth?(n=e.naturalWidth,e=e.naturalHeight):(n=e.width,e=e.height),!t.l||n===t.i.canvas.width&&e===t.i.canvas.height||(t.i.canvas.width=n,t.i.canvas.height=e),[n,e]}function uo(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.i.stringToNewUTF8(e[n]);e=t.i._malloc(4*r.length),t.i.HEAPU32.set(r,e>>2),n(e);for(const e of r)t.i._free(e);t.i._free(e)}function lo(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function fo(t,e,n){let r=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,s)=>{e?(n(r,s),r=[]):r.push(t)}}io.forVisionTasks=function(t=""){return so("vision",t)},io.forTextTasks=function(t=""){return so("text",t)},io.forAudioTasks=function(t=""){return so("audio",t)},io.isSimdSupported=function(){return ro()};async function po(t,e,n,r){return t=await(async(t,e,n,r,s)=>{if(e&&await ao(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await ao(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&s&&((e=self.Module).locateFile=s.locateFile,s.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=s.mainScriptUrlOrBlob)),s=await self.ModuleFactory(self.Module||s),self.ModuleFactory=self.Module=void 0,new t(s,r)})(t,n.wasmLoaderPath,n.assetLoaderPath,e,{locateFile(t){var e=n.wasmBinaryPath.toString();return e.includes(t)?e:(e=n.assetBinaryPath?.toString(),e?.includes(t)?e:t)}}),await t.o(r),t}function go(t,e){const n=nn(t.baseOptions,qs,1)||new qs;"string"==typeof e?(je(n,2,ge(e)),je(n,1)):e instanceof Uint8Array&&(je(n,1,te(e,!1,!1)),je(n,2)),on(t.baseOptions,0,1,n)}function mo(t){try{const e=t.I.length;if(1===e)throw Error(t.I[0].message);if(1<e)throw Error("Encountered multiple errors: "+t.I.map((t=>t.message)).join(", "))}finally{t.I=[]}}function yo(t,e){t.H=Math.max(t.H,e)}function _o(t,e){t.A=new Kr,zr(t.A,"PassThroughCalculator"),Wr(t.A,"free_memory"),Hr(t.A,"free_memory_unused_out"),ts(e,"free_memory"),Qr(e,t.A)}function vo(t,e){Wr(t.A,e),Hr(t.A,e+"_unused_out")}function Ao(t){t.g.addBoolToStream(!0,"free_memory",t.H)}var wo=class{constructor(t){this.g=t,this.I=[],this.H=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){if(e){const e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(nn(this.baseOptions,qs,1)?.g()||nn(this.baseOptions,qs,1)?.h()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){let n=nn(t.baseOptions,Xs,3);if(!n){var r=n=new Xs,s=new Mr;an(r,4,Ys,s)}"delegate"in e&&("GPU"===e.delegate?(e=n,r=new xr,an(e,2,Ys,r)):(e=n,r=new Mr,an(e,4,Ys,r))),on(t.baseOptions,0,3,n)}(this,e),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=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(t),!0,!1,!1),go(this,"/model.dat"),this.m(),this.N()}));go(this,e.modelAssetBuffer)}return this.m(),this.N(),Promise.resolve()}N(){}U(){let t;if(this.g.U((e=>{t=ss(e)})),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.I.push(Error(e))})),this.g.xa(),this.g.setGraph(t,e),this.A=void 0,mo(this)}finishProcessing(){this.g.finishProcessing(),mo(this)}close(){this.A=void 0,this.g.closeGraph()}};wo.prototype.close=wo.prototype.close;const Eo={color:"white",lineWidth:4,radius:6};function bo(t){return{...Eo,fillColor:(t=t||{}).color,...t}}function To(t,e){return t instanceof Function?t(e):t}function ko(t,e,n){return Math.max(Math.min(e,n),Math.min(Math.max(e,n),t))}var Lo=class{constructor(t){this.g=t}ka(t,e){if(t){var n=this.g;e=bo(e),n.save();var r=n.canvas,s=0;for(const i of t)n.fillStyle=To(e.fillColor,{index:s,from:i}),n.strokeStyle=To(e.color,{index:s,from:i}),n.lineWidth=To(e.lineWidth,{index:s,from:i}),(t=new Path2D).arc(i.x*r.width,i.y*r.height,To(e.radius,{index:s,from:i}),0,2*Math.PI),n.fill(t),n.stroke(t),++s;n.restore()}}ja(t,e,n){if(t&&e){var r=this.g;n=bo(n),r.save();var s=r.canvas,i=0;for(const o of e){r.beginPath(),e=t[o.start];const a=t[o.end];e&&a&&(r.strokeStyle=To(n.color,{index:i,from:e,to:a}),r.lineWidth=To(n.lineWidth,{index:i,from:e,to:a}),r.moveTo(e.x*s.width,e.y*s.height),r.lineTo(a.x*s.width,a.y*s.height)),++i,r.stroke()}r.restore()}}ia(t,e){const n=this.g;e=bo(e),n.save(),n.beginPath(),n.lineWidth=To(e.lineWidth,{}),n.strokeStyle=To(e.color,{}),n.fillStyle=To(e.fillColor,{}),n.moveTo(t.originX,t.originY),n.lineTo(t.originX+t.width,t.originY),n.lineTo(t.originX+t.width,t.originY+t.height),n.lineTo(t.originX,t.originY+t.height),n.lineTo(t.originX,t.originY),n.stroke(),n.fill(),n.restore()}};function So(t,e){if(null===t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}Lo.prototype.drawBoundingBox=Lo.prototype.ia,Lo.prototype.drawConnectors=Lo.prototype.ja,Lo.prototype.drawLandmarks=Lo.prototype.ka,Lo.lerp=function(t,e,n,r,s){return ko(r*(1-(t-e)/(n-e))+s*(1-(n-t)/(n-e)),r,s)},Lo.clamp=ko;class Fo{constructor(t,e,n,r){this.g=t,this.h=e,this.m=n,this.l=r}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function xo(t,e,n){const r=t.h;if(n=So(r.createShader(n),"Failed to create WebGL shader"),r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${r.getShaderInfoLog(n)}`);return r.attachShader(t.g,n),n}function Oo(t,e){const n=t.h,r=So(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(r);const s=So(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,s),n.enableVertexAttribArray(t.s),n.vertexAttribPointer(t.s,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const i=So(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(t.A),n.vertexAttribPointer(t.A,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(e?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.bindVertexArray(null),new Fo(n,r,s,i)}function Ro(t,e){if(t.h){if(e!==t.h)throw Error("Cannot change GL context once initialized")}else t.h=e}function Mo(t,e,n,r){if(Ro(t,e),!t.g){const e=t.h;if(t.g=So(e.createProgram(),"Failed to create WebGL program"),t.C=xo(t,"\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 }",e.VERTEX_SHADER),t.v=xo(t,"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n ",e.FRAGMENT_SHADER),e.linkProgram(t.g),!e.getProgramParameter(t.g,e.LINK_STATUS))throw Error(`Error during program linking: ${e.getProgramInfoLog(t.g)}`);t.s=e.getAttribLocation(t.g,"aVertex"),t.A=e.getAttribLocation(t.g,"aTex")}return n?(t.m||(t.m=Oo(t,!0)),n=t.m):(t.j||(t.j=Oo(t,!1)),n=t.j),e.useProgram(t.g),n.bind(),t=r(),n.g.bindVertexArray(null),t}function Co(t,e,n){Ro(t,e),t.l||(t.l=So(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.l),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0)}function Po(t){t.h?.bindFramebuffer(t.h.FRAMEBUFFER,null)}var Io=class{close(){if(this.g){const t=this.h;t.deleteProgram(this.g),t.deleteShader(this.C),t.deleteShader(this.v)}this.l&&this.h.deleteFramebuffer(this.l),this.j&&this.j.close(),this.m&&this.m.close()}};function No(t,e){switch(e){case 0:return t.g.find((t=>t instanceof ImageData));case 1:return t.g.find((t=>"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function Do(t){var e=No(t,0);if(!e){e=Uo(t);const n=Bo(t),r=new Uint8Array(t.width*t.height*4);Co(n,e,$o(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,r),Po(n),e=new ImageData(new Uint8ClampedArray(r.buffer),t.width,t.height),t.g.push(e)}return e}function $o(t){let e=No(t,2);if(!e){const n=Uo(t);e=jo(t);const r=No(t,1)||Do(t);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),Vo(t)}return e}function Uo(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when iniitializing the image.");return t.h||(t.h=So(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Bo(t){return t.l||(t.l=new Io),t.l}function Go(t){(t=Uo(t)).texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR)}function jo(t){const e=Uo(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=No(t,2);return n?e.bindTexture(e.TEXTURE_2D,n):(n=So(e.createTexture(),"Failed to create texture"),t.g.push(n),t.m=!0,e.bindTexture(e.TEXTURE_2D,n),Go(t)),n}function Vo(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function zo(t){const e=Uo(t);return Mo(Bo(t),e,!0,(()=>function(t,e){const n=t.canvas;if(n.width===t.width&&n.height===t.height)return e();const r=n.width,s=n.height;return n.width=t.width,n.height=t.height,t=e(),n.width=r,n.height=s,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()}))))}var Wo=class{constructor(t,e,n,r,s,i,o){this.g=t,this.j=e,this.m=n,this.canvas=r,this.l=s,this.width=i,this.height=o,(this.j||this.m)&&(0===--Ho&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources."))}ta(){return!!No(this,0)}Z(){return!!No(this,1)}J(){return!!No(this,2)}pa(){return Do(this)}oa(){var t=No(this,1);return t||($o(this),jo(this),t=zo(this),Vo(this),this.g.push(t),this.j=!0),t}T(){return $o(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof ImageData)n=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){const t=Uo(this),e=Bo(this);t.activeTexture(t.TEXTURE1),n=So(t.createTexture(),"Failed to create texture"),t.bindTexture(t.TEXTURE_2D,n),Go(this),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),Co(e,t,n),Mo(e,t,!1,(()=>{jo(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Vo(this)})),Po(e),Vo(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);$o(this),jo(this),n=zo(this),Vo(this)}t.push(n)}return new Wo(t,this.Z(),this.J(),this.canvas,this.l,this.width,this.height)}close(){this.j&&No(this,1).close(),this.m&&Uo(this).deleteTexture(No(this,2)),Ho=-1}};Wo.prototype.close=Wo.prototype.close,Wo.prototype.clone=Wo.prototype.clone,Wo.prototype.getAsWebGLTexture=Wo.prototype.T,Wo.prototype.getAsImageBitmap=Wo.prototype.oa,Wo.prototype.getAsImageData=Wo.prototype.pa,Wo.prototype.hasWebGLTexture=Wo.prototype.J,Wo.prototype.hasImageBitmap=Wo.prototype.Z,Wo.prototype.hasImageData=Wo.prototype.ta;var Ho=250;function Ko(t,e){switch(e){case 0:return t.g.find((t=>t instanceof Uint8Array));case 1:return t.g.find((t=>t instanceof Float32Array));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function Xo(t){var e=Ko(t,1);if(!e){if(e=Ko(t,0))e=new Float32Array(e).map((t=>t/255));else{e=new Float32Array(t.width*t.height);const r=qo(t);var n=Zo(t);if(Co(n,r,Yo(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document){n=new Float32Array(t.width*t.height*4),r.readPixels(0,0,t.width,t.height,r.RGBA,r.FLOAT,n);for(let t=0,r=0;t<e.length;++t,r+=4)e[t]=n[r]}else r.readPixels(0,0,t.width,t.height,r.RED,r.FLOAT,e)}t.g.push(e)}return e}function Yo(t){let e=Ko(t,2);if(!e){const n=qo(t);e=ta(t);const r=Xo(t),s=Jo(t);n.texImage2D(n.TEXTURE_2D,0,s,t.width,t.height,0,n.RED,n.FLOAT,r),ea(t)}return e}function qo(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=So(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Jo(t){if(t=qo(t),!na)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))na=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");na=t.R16F}return na}function Zo(t){return t.l||(t.l=new Io),t.l}function Qo(t){(t=qo(t)).texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST)}function ta(t){const e=qo(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=Ko(t,2);return n?e.bindTexture(e.TEXTURE_2D,n):(n=So(e.createTexture(),"Failed to create texture"),t.g.push(n),t.m=!0,e.bindTexture(e.TEXTURE_2D,n),Qo(t)),n}function ea(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var na,ra=class{constructor(t,e,n,r,s,i){this.g=t,this.m=e,this.canvas=n,this.l=r,this.width=s,this.height=i,this.m&&(0===--sa&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources."))}ua(){return!!Ko(this,0)}sa(){return!!Ko(this,1)}J(){return!!Ko(this,2)}qa(){return(e=Ko(t=this,0))||(e=Xo(t),e=new Uint8Array(e.map((t=>255*t))),t.g.push(e)),e;var t,e}na(){return Xo(this)}T(){return Yo(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof Uint8Array)n=new Uint8Array(e);else if(e instanceof Float32Array)n=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{const t=qo(this),e=Zo(this);t.activeTexture(t.TEXTURE1),n=So(t.createTexture(),"Failed to create texture"),t.bindTexture(t.TEXTURE_2D,n),Qo(this);const r=Jo(this);t.texImage2D(t.TEXTURE_2D,0,r,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),Co(e,t,n),Mo(e,t,!1,(()=>{ta(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),ea(this)})),Po(e),ea(this)}}t.push(n)}return new ra(t,this.J(),this.canvas,this.l,this.width,this.height)}close(){this.m&&qo(this).deleteTexture(Ko(this,2)),sa=-1}};ra.prototype.close=ra.prototype.close,ra.prototype.clone=ra.prototype.clone,ra.prototype.getAsWebGLTexture=ra.prototype.T,ra.prototype.getAsFloat32Array=ra.prototype.na,ra.prototype.getAsUint8Array=ra.prototype.qa,ra.prototype.hasWebGLTexture=ra.prototype.J,ra.prototype.hasFloat32Array=ra.prototype.sa,ra.prototype.hasUint8Array=ra.prototype.ua;var sa=250;function ia(...t){return t.map((([t,e])=>({start:t,end:e})))}const oa=function(t){return class extends t{xa(){this.i._registerModelResourcesGraphService()}}}((aa=class{constructor(t,e){this.l=!0,this.i=t,this.g=null,this.h=0,this.m="function"==typeof this.i._addIntToInputStream,void 0!==e?this.i.canvas=e:"undefined"==typeof OffscreenCanvas||oo()?(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas")):this.i.canvas=new OffscreenCanvas(1,1)}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,e){const n=t.length,r=this.i._malloc(n);this.i.HEAPU8.set(t,r),e?this.i._changeBinaryGraph(n,r):this.i._changeTextGraph(n,r),this.i._free(r)}configureAudio(t,e,n,r,s){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),co(this,r||"input_audio",(r=>{co(this,s=s||"audio_header",(s=>{this.i._configureAudio(r,s,t,e,n)}))}))}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}U(t){lo(this,"__graph_config__",(e=>{t(e)})),co(this,"__graph_config__",(t=>{this.i._getGraphConfig(t,void 0)})),delete this.i.simpleListeners.__graph_config__}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,r,s){const i=4*t.length;this.h!==i&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(i),this.h=i),this.i.HEAPF32.set(t,this.g/4),co(this,r,(t=>{this.i._addAudioToInputStream(this.g,e,n,t,s)}))}addGpuBufferToStream(t,e,n){co(this,e,(e=>{const[r,s]=ho(this,t,e);this.i._addBoundTextureToStream(e,r,s,n)}))}addBoolToStream(t,e,n){co(this,e,(e=>{this.i._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){co(this,e,(e=>{this.i._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){co(this,e,(e=>{this.i._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){co(this,e,(e=>{this.i._addIntToInputStream(t,e,n)}))}addStringToStream(t,e,n){co(this,e,(e=>{co(this,t,(t=>{this.i._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){co(this,e,(e=>{uo(this,Object.keys(t),(r=>{uo(this,Object.values(t),(s=>{this.i._addFlatHashMapToInputStream(r,s,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){co(this,n,(n=>{co(this,e,(e=>{const s=this.i._malloc(t.length);this.i.HEAPU8.set(t,s),this.i._addProtoToInputStream(s,t.length,e,n,r),this.i._free(s)}))}))}addEmptyPacketToStream(t,e){co(this,t,(t=>{this.i._addEmptyPacketToInputStream(t,e)}))}addBoolToInputSidePacket(t,e){co(this,e,(e=>{this.i._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){co(this,e,(e=>{this.i._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){co(this,e,(e=>{this.i._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){co(this,e,(e=>{this.i._addIntToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){co(this,e,(e=>{co(this,t,(t=>{this.i._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){co(this,n,(n=>{co(this,e,(e=>{const r=this.i._malloc(t.length);this.i.HEAPU8.set(t,r),this.i._addProtoToInputSidePacket(r,t.length,e,n),this.i._free(r)}))}))}attachBoolListener(t,e){lo(this,t,e),co(this,t,(t=>{this.i._attachBoolListener(t)}))}attachBoolVectorListener(t,e){fo(this,t,e),co(this,t,(t=>{this.i._attachBoolVectorListener(t)}))}attachIntListener(t,e){lo(this,t,e),co(this,t,(t=>{this.i._attachIntListener(t)}))}attachIntVectorListener(t,e){fo(this,t,e),co(this,t,(t=>{this.i._attachIntVectorListener(t)}))}attachDoubleListener(t,e){lo(this,t,e),co(this,t,(t=>{this.i._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){fo(this,t,e),co(this,t,(t=>{this.i._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){lo(this,t,e),co(this,t,(t=>{this.i._attachFloatListener(t)}))}attachFloatVectorListener(t,e){fo(this,t,e),co(this,t,(t=>{this.i._attachFloatVectorListener(t)}))}attachStringListener(t,e){lo(this,t,e),co(this,t,(t=>{this.i._attachStringListener(t)}))}attachStringVectorListener(t,e){fo(this,t,e),co(this,t,(t=>{this.i._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){lo(this,t,e),co(this,t,(t=>{this.i._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){fo(this,t,e),co(this,t,(t=>{this.i._attachProtoVectorListener(t,n||!1)}))}attachAudioListener(t,e,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),lo(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),co(this,t,(t=>{this.i._attachAudioListener(t,n||!1)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends aa{get W(){return this.i}ea(t,e,n){co(this,e,(e=>{const[r,s]=ho(this,t,e);this.W._addBoundTextureAsImageToStream(e,r,s,n)}))}P(t,e){lo(this,t,e),co(this,t,(t=>{this.W._attachImageListener(t)}))}R(t,e){fo(this,t,e),co(this,t,(t=>{this.W._attachImageVectorListener(t)}))}}));var aa,ca=class extends oa{};async function ha(t,e,n){return async function(t,e,n,r){return po(t,e,n,r)}(t,n.canvas??("undefined"==typeof OffscreenCanvas||oo()?document.createElement("canvas"):void 0),e,n)}function ua(t,e,n,r){if(t.X){const i=new Ms;if(n?.regionOfInterest){if(!t.ca)throw Error("This task doesn't support region-of-interest.");var s=n.regionOfInterest;if(s.left>=s.right||s.top>=s.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(0>s.left||0>s.top||1<s.right||1<s.bottom)throw Error("Expected RectF values to be in [0,1].");mn(i,1,(s.left+s.right)/2),mn(i,2,(s.top+s.bottom)/2),mn(i,4,s.right-s.left),mn(i,3,s.bottom-s.top)}else mn(i,1,.5),mn(i,2,.5),mn(i,4,1),mn(i,3,1);if(n?.rotationDegrees){if(0!=n?.rotationDegrees%90)throw Error("Expected rotation to be a multiple of 90°.");if(mn(i,5,-Math.PI*n.rotationDegrees/180),0!=n?.rotationDegrees%180){const[t,r]=void 0!==e.videoWidth?[e.videoWidth,e.videoHeight]:void 0!==e.naturalWidth?[e.naturalWidth,e.naturalHeight]:[e.width,e.height];n=fn(i,3)*r/t,s=fn(i,4)*t/r,mn(i,4,n),mn(i,3,s)}}t.g.addProtoToStream(i.g(),"mediapipe.NormalizedRect",t.X,r)}t.g.ea(e,t.ba,r??performance.now()),t.finishProcessing()}function la(t,e,n){if(t.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");ua(t,e,n,t.H+1)}function da(t,e,n,r){if(!t.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");ua(t,e,n,r)}function fa(t,e,n){var r=e.data;const s=e.width,i=s*(e=e.height);if((r instanceof Uint8Array||r instanceof Float32Array)&&r.length!==i)throw Error("Unsupported channel count: "+r.length/i);return t=new ra([r],!1,t.g.i.canvas,t.M,s,e),n?t.clone():t}var pa=class extends wo{constructor(t,e,n,r){super(t),this.g=t,this.ba=e,this.X=n,this.ca=r,this.M=new Io}l(t,e=!0){if("runningMode"in t&&pn(this.baseOptions,2,!!t.runningMode&&"IMAGE"!==t.runningMode),void 0!==t.canvas&&this.g.i.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e)}close(){this.M.close(),super.close()}};pa.prototype.close=pa.prototype.close;var ga=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},this.h=new ti,t=new Zs,on(this.h,0,1,t),mn(this.h,2,.5),mn(this.h,3,.3)}get baseOptions(){return nn(this.h,Zs,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return"minDetectionConfidence"in t&&mn(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&mn(this.h,3,t.minSuppressionThreshold??.3),this.l(t)}F(t,e){return this.j={detections:[]},la(this,t,e),this.j}D(t,e,n){return this.j={detections:[]},da(this,t,n,e),this.j}m(){var t=new ns;ts(t,"image_in"),ts(t,"norm_rect_in"),es(t,"detections");const e=new Nr;_n(e,ni,this.h);const n=new Kr;zr(n,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),Wr(n,"IMAGE:image_in"),Wr(n,"NORM_RECT:norm_rect_in"),Hr(n,"DETECTIONS:detections"),n.o(e),Qr(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=ws(e),this.j.detections.push(qi(t));yo(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ga.prototype.detectForVideo=ga.prototype.D,ga.prototype.setOptions=ga.prototype.o,ga.createFromModelPath=async function(t,e){return ha(ga,t,{baseOptions:{modelAssetPath:e}})},ga.createFromModelBuffer=function(t,e){return ha(ga,t,{baseOptions:{modelAssetBuffer:e}})},ga.createFromOptions=function(t,e){return ha(ga,t,e)};var ma=ia([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]),ya=ia([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]),_a=ia([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),va=ia([474,475],[475,476],[476,477],[477,474]),Aa=ia([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]),wa=ia([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),Ea=ia([469,470],[470,471],[471,472],[472,469]),ba=ia([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]),Ta=[...ma,...ya,..._a,...Aa,...wa,...ba],ka=ia([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 La(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var Sa=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,this.h=new hi,t=new Zs,on(this.h,0,1,t),this.v=new ai,on(this.h,0,3,this.v),this.s=new ti,on(this.h,0,2,this.s),gn(this.s,4,1),mn(this.s,2,.5),mn(this.v,2,.5),mn(this.h,4,.5)}get baseOptions(){return nn(this.h,Zs,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return"numFaces"in t&&gn(this.s,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&mn(this.s,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&mn(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&mn(this.v,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}F(t,e){return La(this),la(this,t,e),this.j}D(t,e,n){return La(this),da(this,t,n,e),this.j}m(){var t=new ns;ts(t,"image_in"),ts(t,"norm_rect"),es(t,"face_landmarks");const e=new Nr;_n(e,li,this.h);const n=new Kr;zr(n,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),Wr(n,"IMAGE:image_in"),Wr(n,"NORM_RECT:norm_rect"),Hr(n,"NORM_LANDMARKS:face_landmarks"),n.o(e),Qr(t,n),this.g.attachProtoVectorListener("face_landmarks",((t,e)=>{for(const e of t)t=xs(e),this.j.faceLandmarks.push(Ji(t));yo(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{yo(this,t)})),this.outputFaceBlendshapes&&(es(t,"blendshapes"),Hr(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",((t,e)=>{if(this.outputFaceBlendshapes)for(const e of t)t=us(e),this.j.faceBlendshapes.push(Yi(t.g()??[]));yo(this,e)})),this.g.attachEmptyPacketListener("blendshapes",(t=>{yo(this,t)}))),this.outputFacialTransformationMatrixes&&(es(t,"face_geometry"),Hr(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",((t,e)=>{if(this.outputFacialTransformationMatrixes)for(const e of t)(t=nn(ii(e),Os,2))&&this.j.facialTransformationMatrixes.push({rows:dn(hn(t,1))??0,columns:dn(hn(t,2))??0,data:Ke(t,3,he)??[]});yo(this,e)})),this.g.attachEmptyPacketListener("face_geometry",(t=>{yo(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Sa.prototype.detectForVideo=Sa.prototype.D,Sa.prototype.detect=Sa.prototype.F,Sa.prototype.setOptions=Sa.prototype.o,Sa.createFromModelPath=function(t,e){return ha(Sa,t,{baseOptions:{modelAssetPath:e}})},Sa.createFromModelBuffer=function(t,e){return ha(Sa,t,{baseOptions:{modelAssetBuffer:e}})},Sa.createFromOptions=function(t,e){return ha(Sa,t,e)},Sa.FACE_LANDMARKS_LIPS=ma,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LIPS",Sa.FACE_LANDMARKS_LIPS),Sa.FACE_LANDMARKS_LEFT_EYE=ya,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYE",Sa.FACE_LANDMARKS_LEFT_EYE),Sa.FACE_LANDMARKS_LEFT_EYEBROW=_a,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYEBROW",Sa.FACE_LANDMARKS_LEFT_EYEBROW),Sa.FACE_LANDMARKS_LEFT_IRIS=va,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_IRIS",Sa.FACE_LANDMARKS_LEFT_IRIS),Sa.FACE_LANDMARKS_RIGHT_EYE=Aa,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYE",Sa.FACE_LANDMARKS_RIGHT_EYE),Sa.FACE_LANDMARKS_RIGHT_EYEBROW=wa,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW",Sa.FACE_LANDMARKS_RIGHT_EYEBROW),Sa.FACE_LANDMARKS_RIGHT_IRIS=Ea,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_IRIS",Sa.FACE_LANDMARKS_RIGHT_IRIS),Sa.FACE_LANDMARKS_FACE_OVAL=ba,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_FACE_OVAL",Sa.FACE_LANDMARKS_FACE_OVAL),Sa.FACE_LANDMARKS_CONTOURS=Ta,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_CONTOURS",Sa.FACE_LANDMARKS_CONTOURS),Sa.FACE_LANDMARKS_TESSELATION=ka,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_TESSELATION",Sa.FACE_LANDMARKS_TESSELATION);var Fa=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect",!0),this.j=new di,t=new Zs,on(this.j,0,1,t)}get baseOptions(){return nn(this.j,Zs,1)}set baseOptions(t){on(this.j,0,1,t)}o(t){return super.l(t)}za(t,e,n){const r="function"!=typeof e?e:{};if(this.h="function"==typeof e?e:n,la(this,t,r??{}),!this.h)return this.s}m(){var t=new ns;ts(t,"image_in"),ts(t,"norm_rect"),es(t,"stylized_image");const e=new Nr;_n(e,fi,this.j);const n=new Kr;zr(n,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),Wr(n,"IMAGE:image_in"),Wr(n,"NORM_RECT:norm_rect"),Hr(n,"STYLIZED_IMAGE:stylized_image"),n.o(e),Qr(t,n),this.g.P("stylized_image",((t,e)=>{var n=!this.h,r=t.data,s=t.width;const i=s*(t=t.height);if(r instanceof Uint8Array)if(r.length===3*i){const e=new Uint8ClampedArray(4*i);for(let t=0;t<i;++t)e[4*t]=r[3*t],e[4*t+1]=r[3*t+1],e[4*t+2]=r[3*t+2],e[4*t+3]=255;r=new ImageData(e,s,t)}else{if(r.length!==4*i)throw Error("Unsupported channel count: "+r.length/i);r=new ImageData(new Uint8ClampedArray(r.buffer,r.byteOffset,r.length),s,t)}else if(!(r instanceof WebGLTexture))throw Error(`Unsupported format: ${r.constructor.name}`);s=new Wo([r],!1,!1,this.g.i.canvas,this.M,s,t),this.s=n=n?s.clone():s,this.h&&this.h(n),yo(this,e)})),this.g.attachEmptyPacketListener("stylized_image",(t=>{this.s=null,this.h&&this.h(null),yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Fa.prototype.stylize=Fa.prototype.za,Fa.prototype.setOptions=Fa.prototype.o,Fa.createFromModelPath=function(t,e){return ha(Fa,t,{baseOptions:{modelAssetPath:e}})},Fa.createFromModelBuffer=function(t,e){return ha(Fa,t,{baseOptions:{modelAssetBuffer:e}})},Fa.createFromOptions=function(t,e){return ha(Fa,t,e)};var xa=ia([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 Oa(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function Ra(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 Ma(t,e=!0){const n=[];for(const s of t){var r=us(s);t=[];for(const n of r.g())r=e&&null!=hn(n,1)?dn(hn(n,1)):-1,t.push({score:fn(n,2)??0,index:r,categoryName:ln(n,3)??""??"",displayName:ln(n,4)??""??""});n.push(t)}return n}var Ca=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],this.v=new ki,t=new Zs,on(this.v,0,1,t),this.C=new bi,on(this.v,0,2,this.C),this.s=new wi,on(this.C,0,3,this.s),this.h=new vi,on(this.C,0,2,this.h),this.j=new yi,on(this.v,0,3,this.j),mn(this.h,2,.5),mn(this.C,4,.5),mn(this.s,2,.5)}get baseOptions(){return nn(this.v,Zs,1)}set baseOptions(t){on(this.v,0,1,t)}o(t){if(gn(this.h,3,t.numHands??1),"minHandDetectionConfidence"in t&&mn(this.h,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&mn(this.C,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&mn(this.s,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new pi,n=Xi(t.cannedGesturesClassifierOptions,nn(this.j,pi,3)?.h());on(e,0,2,n),on(this.j,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&nn(this.j,pi,3)?.g();return t.customGesturesClassifierOptions?(on(e=new pi,0,2,n=Xi(t.customGesturesClassifierOptions,nn(this.j,pi,4)?.h())),on(this.j,0,4,e)):void 0===t.customGesturesClassifierOptions&&nn(this.j,pi,4)?.g(),this.l(t)}va(t,e){return Oa(this),la(this,t,e),Ra(this)}wa(t,e,n){return Oa(this),da(this,t,n,e),Ra(this)}m(){var t=new ns;ts(t,"image_in"),ts(t,"norm_rect"),es(t,"hand_gestures"),es(t,"hand_landmarks"),es(t,"world_hand_landmarks"),es(t,"handedness");const e=new Nr;_n(e,Fi,this.v);const n=new Kr;zr(n,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),Wr(n,"IMAGE:image_in"),Wr(n,"NORM_RECT:norm_rect"),Hr(n,"HAND_GESTURES:hand_gestures"),Hr(n,"LANDMARKS:hand_landmarks"),Hr(n,"WORLD_LANDMARKS:world_hand_landmarks"),Hr(n,"HANDEDNESS:handedness"),n.o(e),Qr(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t){t=xs(e);const n=[];for(const e of sn(t,Ls,1))n.push({x:fn(e,1)??0,y:fn(e,2)??0,z:fn(e,3)??0});this.landmarks.push(n)}yo(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{yo(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t){t=ks(e);const n=[];for(const e of sn(t,Es,1))n.push({x:fn(e,1)??0,y:fn(e,2)??0,z:fn(e,3)??0});this.worldLandmarks.push(n)}yo(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{yo(this,t)})),this.g.attachProtoVectorListener("hand_gestures",((t,e)=>{this.gestures.push(...Ma(t,!1)),yo(this,e)})),this.g.attachEmptyPacketListener("hand_gestures",(t=>{yo(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{this.handedness.push(...Ma(t)),yo(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Pa(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}Ca.prototype.recognizeForVideo=Ca.prototype.wa,Ca.prototype.recognize=Ca.prototype.va,Ca.prototype.setOptions=Ca.prototype.o,Ca.createFromModelPath=function(t,e){return ha(Ca,t,{baseOptions:{modelAssetPath:e}})},Ca.createFromModelBuffer=function(t,e){return ha(Ca,t,{baseOptions:{modelAssetBuffer:e}})},Ca.createFromOptions=function(t,e){return ha(Ca,t,e)},Ca.HAND_CONNECTIONS=xa,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$gesture_recognizer$gesture_recognizer.GestureRecognizer.HAND_CONNECTIONS",Ca.HAND_CONNECTIONS);var Ia=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],this.j=new bi,t=new Zs,on(this.j,0,1,t),this.s=new wi,on(this.j,0,3,this.s),this.h=new vi,on(this.j,0,2,this.h),gn(this.h,3,1),mn(this.h,2,.5),mn(this.s,2,.5),mn(this.j,4,.5)}get baseOptions(){return nn(this.j,Zs,1)}set baseOptions(t){on(this.j,0,1,t)}o(t){return"numHands"in t&&gn(this.h,3,t.numHands??1),"minHandDetectionConfidence"in t&&mn(this.h,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&mn(this.j,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&mn(this.s,2,t.minHandPresenceConfidence??.5),this.l(t)}F(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],la(this,t,e),Pa(this)}D(t,e,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],da(this,t,n,e),Pa(this)}m(){var t=new ns;ts(t,"image_in"),ts(t,"norm_rect"),es(t,"hand_landmarks"),es(t,"world_hand_landmarks"),es(t,"handedness");const e=new Nr;_n(e,Si,this.j);const n=new Kr;zr(n,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),Wr(n,"IMAGE:image_in"),Wr(n,"NORM_RECT:norm_rect"),Hr(n,"LANDMARKS:hand_landmarks"),Hr(n,"WORLD_LANDMARKS:world_hand_landmarks"),Hr(n,"HANDEDNESS:handedness"),n.o(e),Qr(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t)t=xs(e),this.landmarks.push(Ji(t));yo(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{yo(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t)t=ks(e),this.worldLandmarks.push(Zi(t));yo(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{yo(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{var n=this.handedness,r=n.push;const s=[];for(const e of t){t=us(e);const n=[];for(const e of t.g())n.push({score:fn(e,2)??0,index:dn(hn(e,1))??-1,categoryName:ln(e,3)??""??"",displayName:ln(e,4)??""??""});s.push(n)}r.call(n,...s),yo(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ia.prototype.detectForVideo=Ia.prototype.D,Ia.prototype.detect=Ia.prototype.F,Ia.prototype.setOptions=Ia.prototype.o,Ia.createFromModelPath=function(t,e){return ha(Ia,t,{baseOptions:{modelAssetPath:e}})},Ia.createFromModelBuffer=function(t,e){return ha(Ia,t,{baseOptions:{modelAssetBuffer:e}})},Ia.createFromOptions=function(t,e){return ha(Ia,t,e)},Ia.HAND_CONNECTIONS=xa,e("module$exports$google3$third_party$mediapipe$tasks$web$vision$hand_landmarker$hand_landmarker.HandLandmarker.HAND_CONNECTIONS",Ia.HAND_CONNECTIONS);var Na=class extends pa{constructor(t,e){super(new ca(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},this.h=new xi,t=new Zs,on(this.h,0,1,t)}get baseOptions(){return nn(this.h,Zs,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){var e=Xi(t,nn(this.h,zs,2));return on(this.h,0,2,e),this.l(t)}ga(t,e){return this.j={classifications:[]},la(this,t,e),this.j}ha(t,e,n){return this.j={classifications:[]},da(this,t,n,e),this.j}m(){var t=new ns;ts(t,"input_image"),ts(t,"norm_rect"),es(t,"classifications");const e=new Nr;_n(e,Oi,this.h);const n=new Kr;zr(n,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),Wr(n,"IMAGE:input_image"),Wr(n,"NORM_RECT:norm_rect"),Hr(n,"CLASSIFICATIONS:classifications"),n.o(e),Qr(t,n),this.g.attachProtoListener("classifications",((t,e)=>{this.j=function(t){const e={classifications:sn(t,Cs,1).map((t=>Yi(nn(t,cs,4)?.g()??[],dn(hn(t,2)),ln(t,3)??"")))};return null!=un(t)&&(e.timestampMs=dn(un(t))),e}(Ns(t)),yo(this,e)})),this.g.attachEmptyPacketListener("classifications",(t=>{yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Na.prototype.classifyForVideo=Na.prototype.ha,Na.prototype.classify=Na.prototype.ga,Na.prototype.setOptions=Na.prototype.o,Na.createFromModelPath=function(t,e){return ha(Na,t,{baseOptions:{modelAssetPath:e}})},Na.createFromModelBuffer=function(t,e){return ha(Na,t,{baseOptions:{modelAssetBuffer:e}})},Na.createFromOptions=function(t,e){return ha(Na,t,e)};var Da=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect",!0),this.h=new Ri,this.embeddings={embeddings:[]},t=new Zs,on(this.h,0,1,t)}get baseOptions(){return nn(this.h,Zs,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){var e=this.h,n=nn(this.h,Hs,2);return n=n?n.clone():new Hs,void 0!==t.l2Normalize?pn(n,1,t.l2Normalize):"l2Normalize"in t&&je(n,1),void 0!==t.quantize?pn(n,2,t.quantize):"quantize"in t&&je(n,2),on(e,0,2,n),this.l(t)}la(t,e){return la(this,t,e),this.embeddings}ma(t,e,n){return da(this,t,n,e),this.embeddings}m(){var t=new ns;ts(t,"image_in"),ts(t,"norm_rect"),es(t,"embeddings_out");const e=new Nr;_n(e,Mi,this.h);const n=new Kr;zr(n,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),Wr(n,"IMAGE:image_in"),Wr(n,"NORM_RECT:norm_rect"),Hr(n,"EMBEDDINGS:embeddings_out"),n.o(e),Qr(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=Vs(t),this.embeddings=function(t){return{embeddings:sn(t,Us,1).map((t=>{const e={headIndex:dn(hn(t,3))??-1,headName:ln(t,4)??""??""};if(void 0!==en(t,Ds,Ze(t,1)))t=Ke(t=nn(t,Ds,Ze(t,1)),1,he),e.floatEmbedding=t;else{const n=new Uint8Array(0);e.quantizedEmbedding=nn(t,$s,Ze(t,2))?.da()?.fa()??n}return e})),timestampMs:dn(un(t))}}(t),yo(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Da.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=to(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=to(Qi(t.quantizedEmbedding),Qi(e.quantizedEmbedding))}return t},Da.prototype.embedForVideo=Da.prototype.ma,Da.prototype.embed=Da.prototype.la,Da.prototype.setOptions=Da.prototype.o,Da.createFromModelPath=function(t,e){return ha(Da,t,{baseOptions:{modelAssetPath:e}})},Da.createFromModelBuffer=function(t,e){return ha(Da,t,{baseOptions:{modelAssetBuffer:e}})},Da.createFromOptions=function(t,e){return ha(Da,t,e)};var $a=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};function Ua(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Ba(t){try{const e=new $a(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{Ao(t)}}$a.prototype.close=$a.prototype.close;var Ga=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Di,this.v=new Ci,on(this.h,0,3,this.v),t=new Zs,on(this.h,0,1,t)}get baseOptions(){return nn(this.h,Zs,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?je(this.h,2,ge(t.displayNamesLocale)):"displayNamesLocale"in t&&je(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}N(){!function(t){const e=sn(t.U(),Kr,1).filter((t=>(ln(t,1)??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")));if(t.s=[],1<e.length)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(nn(e[0],Nr,7)?.l()?.g()??new Map).forEach(((e,n)=>{t.s[Number(n)]=ln(e,1)??""}))}(this)}V(t,e,n){const r="function"!=typeof e?e:{};return this.j="function"==typeof e?e:n,Ua(this),la(this,t,r),Ba(this)}ya(t,e,n,r){const s="function"!=typeof n?n:{};return this.j="function"==typeof n?n:r,Ua(this),da(this,t,s,e),Ba(this)}ra(){return this.s}m(){var t=new ns;ts(t,"image_in"),ts(t,"norm_rect");const e=new Nr;_n(e,$i,this.h);const n=new Kr;zr(n,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),Wr(n,"IMAGE:image_in"),Wr(n,"NORM_RECT:norm_rect"),n.o(e),Qr(t,n),_o(this,t),this.outputConfidenceMasks&&(es(t,"confidence_masks"),Hr(n,"CONFIDENCE_MASKS:confidence_masks"),vo(this,"confidence_masks"),this.g.R("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>fa(this,t,!this.j))),yo(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],yo(this,t)}))),this.outputCategoryMask&&(es(t,"category_mask"),Hr(n,"CATEGORY_MASK:category_mask"),vo(this,"category_mask"),this.g.P("category_mask",((t,e)=>{this.categoryMask=fa(this,t,!this.j),yo(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,yo(this,t)}))),es(t,"quality_scores"),Hr(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,yo(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ga.prototype.getLabels=Ga.prototype.ra,Ga.prototype.segmentForVideo=Ga.prototype.ya,Ga.prototype.segment=Ga.prototype.V,Ga.prototype.setOptions=Ga.prototype.o,Ga.createFromModelPath=function(t,e){return ha(Ga,t,{baseOptions:{modelAssetPath:e}})},Ga.createFromModelBuffer=function(t,e){return ha(Ga,t,{baseOptions:{modelAssetBuffer:e}})},Ga.createFromOptions=function(t,e){return ha(Ga,t,e)};var ja=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};ja.prototype.close=ja.prototype.close;var Va=class extends vn{constructor(t){super(t)}},za=[0,rr,rr,rr],Wa=[0,qn,qn,qn,qn,or],Ha=[0,qn,qn,qn,qn,or,qn,qn],Ka=[0,dr,Ha],Xa=[0,dr,Ka,dr,za],Ya=[0,dr,Ha,dr,za],qa=[0,dr,Ha,rr,rr],Ja=[0,dr,qa,dr,za],Za=[0,qn,qn,qn,qn,or,dr,za,dr,za],Qa=[0,qn,qn,qn,qn,or,yr],tc=class extends vn{constructor(t){super(t)}},ec=[0,qn,qn,or],nc=class extends vn{constructor(){super()}};nc.B=[1];var rc=class extends vn{constructor(t){super(t)}},sc=[1,2,3,4,5,6,7,8,9,10,14,15],ic=[0,pr,Ha,sc,pr,Ya,sc,pr,Ka,sc,pr,Xa,sc,pr,ec,sc,pr,Qa,sc,pr,Wa,sc,pr,[0,ur,qn,qn,qn,or,rr,or,or,qn,3,dr,za],sc,pr,qa,sc,pr,Ja,sc,qn,dr,za,ur,pr,Za,sc,pr,[0,fr,ec],sc],oc=[0,ur,rr,rr,or],ac=class extends vn{constructor(){super()}};ac.B=[1],ac.prototype.g=Er([0,fr,ic,ur,dr,oc]);var cc=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Di,this.v=new Ci,on(this.h,0,3,this.v),t=new Zs,on(this.h,0,1,t)}get baseOptions(){return nn(this.h,Zs,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}V(t,e,n,r){const s="function"!=typeof n?n:{};this.j="function"==typeof n?n:r,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.H+1,r=new ac;const i=new rc;var o=new Va;if(gn(o,1,255),on(i,0,12,o),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var a=new tc;pn(a,3,!0),mn(a,1,e.keypoint.x),mn(a,2,e.keypoint.y),an(i,5,sc,a)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(o=new nc,e.scribble))pn(e=new tc,3,!0),mn(e,1,a.x),mn(e,2,a.y),cn(o,tc,e);an(i,15,sc,o)}cn(r,rc,i),this.g.addProtoToStream(r.g(),"drishti.RenderData","roi_in",n),la(this,t,s);t:{try{const t=new ja(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var c=t;break t}this.j(t)}finally{Ao(this)}c=void 0}return c}m(){var t=new ns;ts(t,"image_in"),ts(t,"roi_in"),ts(t,"norm_rect_in");const e=new Nr;_n(e,$i,this.h);const n=new Kr;zr(n,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),Wr(n,"IMAGE:image_in"),Wr(n,"ROI:roi_in"),Wr(n,"NORM_RECT:norm_rect_in"),n.o(e),Qr(t,n),_o(this,t),this.outputConfidenceMasks&&(es(t,"confidence_masks"),Hr(n,"CONFIDENCE_MASKS:confidence_masks"),vo(this,"confidence_masks"),this.g.R("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>fa(this,t,!this.j))),yo(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],yo(this,t)}))),this.outputCategoryMask&&(es(t,"category_mask"),Hr(n,"CATEGORY_MASK:category_mask"),vo(this,"category_mask"),this.g.P("category_mask",((t,e)=>{this.categoryMask=fa(this,t,!this.j),yo(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,yo(this,t)}))),es(t,"quality_scores"),Hr(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,yo(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};cc.prototype.segment=cc.prototype.V,cc.prototype.setOptions=cc.prototype.o,cc.createFromModelPath=function(t,e){return ha(cc,t,{baseOptions:{modelAssetPath:e}})},cc.createFromModelBuffer=function(t,e){return ha(cc,t,{baseOptions:{modelAssetBuffer:e}})},cc.createFromOptions=function(t,e){return ha(cc,t,e)};var hc=class extends pa{constructor(t,e){super(new ca(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},this.h=new Ui,t=new Zs,on(this.h,0,1,t)}get baseOptions(){return nn(this.h,Zs,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?je(this.h,2,ge(t.displayNamesLocale)):"displayNamesLocale"in t&&je(this.h,2),void 0!==t.maxResults?gn(this.h,3,t.maxResults):"maxResults"in t&&je(this.h,3),void 0!==t.scoreThreshold?mn(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&je(this.h,4),void 0!==t.categoryAllowlist?Je(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&je(this.h,5),void 0!==t.categoryDenylist?Je(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&je(this.h,6),this.l(t)}F(t,e){return this.j={detections:[]},la(this,t,e),this.j}D(t,e,n){return this.j={detections:[]},da(this,t,n,e),this.j}m(){var t=new ns;ts(t,"input_frame_gpu"),ts(t,"norm_rect"),es(t,"detections");const e=new Nr;_n(e,Bi,this.h);const n=new Kr;zr(n,"mediapipe.tasks.vision.ObjectDetectorGraph"),Wr(n,"IMAGE:input_frame_gpu"),Wr(n,"NORM_RECT:norm_rect"),Hr(n,"DETECTIONS:detections"),n.o(e),Qr(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=ws(e),this.j.detections.push(qi(t));yo(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{yo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};hc.prototype.detectForVideo=hc.prototype.D,hc.prototype.detect=hc.prototype.F,hc.prototype.setOptions=hc.prototype.o,hc.createFromModelPath=async function(t,e){return ha(hc,t,{baseOptions:{modelAssetPath:e}})},hc.createFromModelBuffer=function(t,e){return ha(hc,t,{baseOptions:{modelAssetBuffer:e}})},hc.createFromOptions=function(t,e){return ha(hc,t,e)};function uc(t){t.landmarks=[],t.worldLandmarks=[],t.v=void 0}function lc(t){try{const e=new class{constructor(t,e,n){this.landmarks=t,this.worldLandmarks=e,this.g=n}close(){this.g?.forEach((t=>{t.close()}))}}(t.landmarks,t.worldLandmarks,t.v);if(!t.s)return e;t.s(e)}finally{Ao(t)}}var dc=class extends pa{constructor(t,e){super(new ca(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,this.h=new Wi,t=new Zs,on(this.h,0,1,t),this.C=new Vi,on(this.h,0,3,this.C),this.j=new Gi,on(this.h,0,2,this.j),gn(this.j,4,1),mn(this.j,2,.5),mn(this.C,2,.5),mn(this.h,4,.5)}get baseOptions(){return nn(this.h,Zs,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return"numPoses"in t&&gn(this.j,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&mn(this.j,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&mn(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&mn(this.C,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.l(t)}F(t,e,n){const r="function"!=typeof e?e:{};return this.s="function"==typeof e?e:n,uc(this),la(this,t,r),lc(this)}D(t,e,n,r){const s="function"!=typeof n?n:{};return this.s="function"==typeof n?n:r,uc(this),da(this,t,s,e),lc(this)}m(){var t=new ns;ts(t,"image_in"),ts(t,"norm_rect"),es(t,"normalized_landmarks"),es(t,"world_landmarks"),es(t,"segmentation_masks");const e=new Nr;_n(e,Ki,this.h);const n=new Kr;zr(n,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),Wr(n,"IMAGE:image_in"),Wr(n,"NORM_RECT:norm_rect"),Hr(n,"NORM_LANDMARKS:normalized_landmarks"),Hr(n,"WORLD_LANDMARKS:world_landmarks"),n.o(e),Qr(t,n),_o(this,t),this.g.attachProtoVectorListener("normalized_landmarks",((t,e)=>{this.landmarks=[];for(const e of t)t=xs(e),this.landmarks.push(Ji(t));yo(this,e)})),this.g.attachEmptyPacketListener("normalized_landmarks",(t=>{this.landmarks=[],yo(this,t)})),this.g.attachProtoVectorListener("world_landmarks",((t,e)=>{this.worldLandmarks=[];for(const e of t)t=ks(e),this.worldLandmarks.push(Zi(t));yo(this,e)})),this.g.attachEmptyPacketListener("world_landmarks",(t=>{this.worldLandmarks=[],yo(this,t)})),this.outputSegmentationMasks&&(Hr(n,"SEGMENTATION_MASK:segmentation_masks"),vo(this,"segmentation_masks"),this.g.R("segmentation_masks",((t,e)=>{this.v=t.map((t=>fa(this,t,!this.s))),yo(this,e)})),this.g.attachEmptyPacketListener("segmentation_masks",(t=>{this.v=[],yo(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};dc.prototype.detectForVideo=dc.prototype.D,dc.prototype.detect=dc.prototype.F,dc.prototype.setOptions=dc.prototype.o,dc.createFromModelPath=function(t,e){return ha(dc,t,{baseOptions:{modelAssetPath:e}})},dc.createFromModelBuffer=function(t,e){return ha(dc,t,{baseOptions:{modelAssetBuffer:e}})},dc.createFromOptions=function(t,e){return ha(dc,t,e)},dc.POSE_CONNECTIONS=ia([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]),e("module$exports$google3$third_party$mediapipe$tasks$web$vision$pose_landmarker$pose_landmarker.PoseLandmarker.POSE_CONNECTIONS",dc.POSE_CONNECTIONS);export{Lo as DrawingUtils,ga as FaceDetector,Sa as FaceLandmarker,Fa as FaceStylizer,io as FilesetResolver,Ca as GestureRecognizer,Ia as HandLandmarker,Na as ImageClassifier,Da as ImageEmbedder,Ga as ImageSegmenter,$a as ImageSegmenterResult,cc as InteractiveSegmenter,ja as InteractiveSegmenterResult,Wo as MPImage,ra as MPMask,hc as ObjectDetector,dc as PoseLandmarker,wo as TaskRunner,pa as VisionTaskRunner};
1
+ var t=self;function e(t){return t}function n(){throw Error("Invalid UTF8")}function r(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let s,i;const o="undefined"!=typeof TextDecoder;let a;const h="undefined"!=typeof TextEncoder;function c(t){if(h)t=(a||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let s=0;s<t.length;s++){var e=t.charCodeAt(s);if(128>e)r[n++]=e;else{if(2048>e)r[n++]=e>>6|192;else{if(55296<=e&&57343>=e){if(56319>=e&&s<t.length){const i=t.charCodeAt(++s);if(56320<=i&&57343>=i){e=1024*(e-55296)+i-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}s--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}var u,l;t:{for(var f=["CLOSURE_FLAGS"],d=t,p=0;p<f.length;p++)if(null==(d=d[f[p]])){l=null;break t}l=d}var g,m=l&&l[610401301];u=null!=m&&m;const y=t.navigator;function v(t){return!!u&&(!!g&&g.brands.some((({brand:e})=>e&&-1!=e.indexOf(t))))}function _(e){var n;return(n=t.navigator)&&(n=n.userAgent)||(n=""),-1!=n.indexOf(e)}function w(){return!!u&&(!!g&&0<g.brands.length)}function A(){return w()?v("Chromium"):(_("Chrome")||_("CriOS"))&&!(!w()&&_("Edge"))||_("Silk")}g=y&&y.userAgentData||null;var b=!w()&&(_("Trident")||_("MSIE"));!_("Android")||A(),A(),_("Safari")&&(A()||!w()&&_("Coast")||!w()&&_("Opera")||!w()&&_("Edge")||(w()?v("Microsoft Edge"):_("Edg/"))||w()&&v("Opera"));var E={},T=null;function k(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);var r=new Uint8Array(n),s=0;return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),s=T[n];if(null!=s)return s;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}x();for(var r=0;;){var s=n(-1),i=n(0),o=n(64),a=n(64);if(64===a&&-1===s)break;e(s<<2|i>>4),64!=o&&(e(i<<4&240|o>>2),64!=a&&e(o<<6&192|a))}}(t,(function(t){r[s++]=t})),s!==n?r.subarray(0,s):r}function x(){if(!T){T={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=t.concat(e[n].split(""));E[n]=r;for(var s=0;s<r.length;s++){var i=r[s];void 0===T[i]&&(T[i]=s)}}}}var L="undefined"!=typeof Uint8Array,S=!b&&"function"==typeof btoa;function F(t){if(!S){var e;void 0===e&&(e=0),x(),e=E[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let h=0,c=0;for(;h<t.length-2;h+=3){var s=t[h],i=t[h+1],o=t[h+2],a=e[s>>2];s=e[(3&s)<<4|i>>4],i=e[(15&i)<<2|o>>6],o=e[63&o],n[c++]=a+s+i+o}switch(a=0,o=r,t.length-h){case 2:o=e[(15&(a=t[h+1]))<<2]||r;case 1:t=t[h],n[c]=e[t>>2]+e[(3&t)<<4|a>>4]+o+r}return n.join("")}for(e="",n=0,r=t.length-10240;n<r;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const O=/[-_.]/g,M={"-":"+",_:"/",".":"="};function P(t){return M[t]||""}function R(t){if(!S)return k(t);O.test(t)&&(t=t.replace(O,P)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function C(t){return L&&null!=t&&t instanceof Uint8Array}let I;function D(){return I||=new Uint8Array(0)}var U={};let B;function N(t){if(t!==U)throw Error("illegal external caller")}function G(){return B||=new V(null,U)}function j(t){N(U);var e=t.N;return null==(e=null==e||C(e)?e:"string"==typeof e?R(e):null)?e:t.N=e}var V=class{constructor(t,e){if(N(e),this.N=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}ha(){const t=j(this);return t?new Uint8Array(t):D()}};function z(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function W(){return Error("Failed to read varint, encoding is invalid.")}function X(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function H(t){return 0==t.length?G():new V(t,U)}function $(t){if("string"==typeof t)return{buffer:R(t),H:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),H:!1};if(t.constructor===Uint8Array)return{buffer:t,H:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),H:!1};if(t.constructor===V)return{buffer:j(t)||D(),H:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),H:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}const Y="function"==typeof Uint8Array.prototype.slice;let q,K=0,J=0;function Z(t){const e=0>t;let n=(t=Math.abs(t))>>>0;if(t=Math.floor((t-n)/4294967296),e){const[e,r]=rt(n,t);t=r,n=e}K=n>>>0,J=t>>>0}function Q(t){const e=q||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),J=0,K=e.getUint32(0,!0)}function tt(t,e){return 4294967296*e+(t>>>0)}function et(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),t=tt(t,e),n?-t:t}function nt(t){if(16>t.length)Z(Number(t));else if("function"==typeof BigInt)t=BigInt(t),K=Number(t&BigInt(4294967295))>>>0,J=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);J=K=0;const n=t.length;for(let r=e,s=(n-e)%6+e;s<=n;r=s,s+=6){const e=Number(t.slice(r,s));J*=1e6,K=1e6*K+e,4294967296<=K&&(J+=Math.trunc(K/4294967296),J>>>=0,K>>>=0)}if(e){const[t,e]=rt(K,J);K=t,J=e}}}function rt(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function st(t,e,{R:n=!1}={}){t.R=n,e&&(e=$(e),t.h=e.buffer,t.s=e.H,t.v=0,t.l=t.h.length,t.g=t.v)}function it(t,e){if(t.g=e,e>t.l)throw X(t.l,e)}function ot(t,e){let n,r=0,s=0,i=0;const o=t.h;let a=t.g;do{n=o[a++],r|=(127&n)<<i,i+=7}while(32>i&&128&n);for(32<i&&(s|=(127&n)>>4),i=3;32>i&&128&n;i+=7)n=o[a++],s|=(127&n)<<i;if(it(t,a),128>n)return e(r>>>0,s>>>0);throw W()}function at(t){let e=0,n=t.g;const r=n+10,s=t.h;for(;n<r;){const r=s[n++];if(e|=r,0==(128&r))return it(t,n),!!(127&e)}throw W()}function ht(t){var e=t.h;const n=t.g,r=e[n],s=e[n+1],i=e[n+2];return e=e[n+3],it(t,t.g+4),(r<<0|s<<8|i<<16|e<<24)>>>0}function ct(t,e){if(0>e)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,r=n+e;if(r>t.l)throw X(e,t.l-n);return t.g=r,n}function ut(t,e){if(0==e)return G();var n=ct(t,e);return t.R&&t.s?n=t.h.subarray(n,n+e):(t=t.h,n=n===(e=n+e)?D():Y?t.slice(n,e):new Uint8Array(t.subarray(n,e))),H(n)}var lt=class{constructor(t,e){this.h=null,this.s=!1,this.g=this.l=this.v=0,st(this,t,e)}m(){const t=this.h;let e=this.g,n=t[e++],r=127&n;if(128&n&&(n=t[e++],r|=(127&n)<<7,128&n&&(n=t[e++],r|=(127&n)<<14,128&n&&(n=t[e++],r|=(127&n)<<21,128&n&&(n=t[e++],r|=n<<28,128&n&&128&t[e++]&&128&t[e++]&&128&t[e++]&&128&t[e++]&&128&t[e++])))))throw W();return it(this,e),r}j(){return this.m()>>>0}A(){var t=ht(this);const e=2*(t>>31)+1,n=t>>>23&255;return t&=8388607,255==n?t?NaN:1/0*e:0==n?e*Math.pow(2,-149)*t:e*Math.pow(2,n-150)*(t+Math.pow(2,23))}C(){return this.m()}},ft=[];function dt(t){var e=t.g;if(e.g==e.l)return!1;t.l=t.g.g;var n=t.g.j();if(e=n>>>3,!(0<=(n&=7)&&5>=n))throw z(n,t.l);if(1>e)throw Error(`Invalid field number: ${e} (at position ${t.l})`);return t.m=e,t.h=n,!0}function pt(t){switch(t.h){case 0:0!=t.h?pt(t):at(t.g);break;case 1:it(t=t.g,t.g+8);break;case 2:if(2!=t.h)pt(t);else{var e=t.g.j();it(t=t.g,t.g+e)}break;case 5:it(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!dt(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.h){if(t.m!=e)throw Error("Unmatched end-group tag");break}pt(t)}break;default:throw z(t.h,t.l)}}function gt(t,e,n){const r=t.g.l,s=t.g.j(),i=t.g.g+s;let o=i-r;if(0>=o&&(t.g.l=i,n(e,t,void 0,void 0,void 0),o=i-t.g.g),o)throw Error(`Message parsing ended unexpectedly. Expected to read ${s} bytes, instead read ${s-o} bytes, either the data ended unexpectedly or the message misreported its own length`);return t.g.g=i,t.g.l=r,e}function mt(t){var e=t.g.j(),a=ct(t=t.g,e);if(t=t.h,o){var h,c=t;(h=i)||(h=i=new TextDecoder("utf-8",{fatal:!0})),t=a+e,c=0===a&&t===c.length?c:c.subarray(a,t);try{var u=h.decode(c)}catch(t){if(void 0===s){try{h.decode(new Uint8Array([128]))}catch(t){}try{h.decode(new Uint8Array([97])),s=!0}catch(t){s=!1}}throw!s&&(i=void 0),t}}else{e=(u=a)+e,a=[];let s,i=null;for(;u<e;){var l=t[u++];128>l?a.push(l):224>l?u>=e?n():(s=t[u++],194>l||128!=(192&s)?(u--,n()):a.push((31&l)<<6|63&s)):240>l?u>=e-1?n():(s=t[u++],128!=(192&s)||224===l&&160>s||237===l&&160<=s||128!=(192&(c=t[u++]))?(u--,n()):a.push((15&l)<<12|(63&s)<<6|63&c)):244>=l?u>=e-2?n():(s=t[u++],128!=(192&s)||0!=s-144+(l<<28)>>30||128!=(192&(c=t[u++]))||128!=(192&(h=t[u++]))?(u--,n()):(l=(7&l)<<18|(63&s)<<12|(63&c)<<6|63&h,l-=65536,a.push(55296+(l>>10&1023),56320+(1023&l)))):n(),8192<=a.length&&(i=r(i,a),a.length=0)}u=r(i,a)}return u}function yt(t){const e=t.g.j();return ut(t.g,e)}function vt(t,e,n){var r=t.g.j();for(r=t.g.g+r;t.g.g<r;)n.push(e.call(t.g))}var _t=[];function wt(t){return t?/^\d+$/.test(t)?(nt(t),new At(K,J)):null:bt||=new At(0,0)}var At=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let bt;function Et(t){return t?/^-?\d+$/.test(t)?(nt(t),new Tt(K,J)):null:kt||=new Tt(0,0)}var Tt=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let kt;function xt(t,e,n){for(;0<n||127<e;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function Lt(t,e){for(;127<e;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function St(t,e){if(0<=e)Lt(t,e);else{for(let n=0;9>n;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Ft(t,e){t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function Ot(t,e){0!==e.length&&(t.l.push(e),t.h+=e.length)}function Mt(t,e,n){Lt(t.g,8*e+n)}function Pt(t,e){return Mt(t,e,2),e=t.g.end(),Ot(t,e),e.push(t.h),e}function Rt(t,e){var n=e.pop();for(n=t.h+t.g.length()-n;127<n;)e.push(127&n|128),n>>>=7,t.h++;e.push(n),t.h++}function Ct(t,e,n){Mt(t,e,2),Lt(t.g,n.length),Ot(t,t.g.end()),Ot(t,n)}function It(t,e,n,r){null!=n&&(e=Pt(t,e),r(n,t),Rt(t,e))}class Dt{constructor(t,e,n){this.g=t,this.h=e,this.l=n}}function Ut(t){return Array.prototype.slice.call(t)}const Bt="function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():void 0;var Nt=Bt?(t,e)=>{t[Bt]|=e}:(t,e)=>{void 0!==t.D?t.D|=e:Object.defineProperties(t,{D:{value:e,configurable:!0,writable:!0,enumerable:!1}})};function Gt(t){const e=Vt(t);1!=(1&e)&&(Object.isFrozen(t)&&(t=Ut(t)),Wt(t,1|e))}var jt=Bt?(t,e)=>{t[Bt]&=~e}:(t,e)=>{void 0!==t.D&&(t.D&=~e)},Vt=Bt?t=>0|t[Bt]:t=>0|t.D,zt=Bt?t=>t[Bt]:t=>t.D,Wt=Bt?(t,e)=>{t[Bt]=e}:(t,e)=>{void 0!==t.D?t.D=e:Object.defineProperties(t,{D:{value:e,configurable:!0,writable:!0,enumerable:!1}})};function Xt(t){return Nt(t,1),t}function Ht(t){return Nt(t,34),t}function $t(t,e){Wt(e,-255&(0|t))}function Yt(t,e){Wt(e,-221&(34|t))}function qt(t){return 0===(t=t>>11&1023)?536870912:t}var Kt,Jt={};function Zt(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function Qt(t,e,n){if(null!=t)if("string"==typeof t)t=t?new V(t,U):G();else if(t.constructor!==V)if(C(t))t=n?H(t):t.length?new V(new Uint8Array(t),U):G();else{if(!e)throw Error();t=void 0}return t}const te=[];function ee(t){if(2&t)throw Error()}Wt(te,39),Kt=Object.freeze(te);class ne{constructor(t,e,n){this.l=0,this.g=t,this.h=e,this.m=n}next(){if(this.l<this.g.length){const t=this.g[this.l++];return{done:!1,value:this.h?this.h.call(this.m,t):t}}return{done:!0,value:void 0}}[Symbol.iterator](){return new ne(this.g,this.h,this.m)}}var re={};let se,ie;function oe(t,e){(e=se?e[se]:void 0)&&(t[se]=Ut(e))}function ae(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function he(t){return null==t?t:"number"==typeof t||"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function ce(t){return null==t?t:"boolean"==typeof t||"number"==typeof t?!!t:void 0}function ue(t){return"number"==typeof t&&Number.isFinite(t)||!!t&&"string"==typeof t&&isFinite(t)}function le(t){if(null==t)return t;if("string"==typeof t){if(!t)return;t=+t}return"number"==typeof t?t:void 0}function fe(t){if(null==t)return t;if("string"==typeof t){if(!t)return;t=+t}return"number"==typeof t?t:void 0}function de(t){if("string"!=typeof t)throw Error();return t}function pe(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function ge(t){return null==t||"string"==typeof t?t:void 0}function me(t,e,n,r){var s=!1;return null==t||"object"!=typeof t||(s=Array.isArray(t))||t.M!==Jt?s?(0===(s=n=Vt(t))&&(s|=32&r),(s|=2&r)!==n&&Wt(t,s),new e(t)):(n?2&r?(t=e[ye])?e=t:(Ht((t=new e).u),e=e[ye]=t):e=new e:e=void 0,e):t}const ye="function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():"di";function ve(t){return t}function _e(t,e,n){return"string"==typeof(t="number"===(e=typeof t)||"string"===e?t:n?0:void 0)&&(n=+t,Number.isSafeInteger(n))?n:t}let we,Ae,be;function Ee(t){switch(typeof t){case"boolean":return Ae||=[0,void 0,!0];case"number":return 0<t?void 0:0===t?be||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}function Te(t,e){return ke(t,e[0],e[1])}function ke(t,e,n){if(null==t&&(t=we),we=void 0,null==t){var r=96;n?(t=[n],r|=512):t=[],e&&(r=-2095105&r|(1023&e)<<11)}else{if(!Array.isArray(t))throw Error();if(64&(r=Vt(t)))return ie&&delete t[ie],t;if(r|=64,n&&(r|=512,n!==t[0]))throw Error();t:{var s=(n=t).length;if(s){const t=s-1;var i=n[t];if(Zt(i)){1024<=(s=t-(e=+!!(512&(r|=256))-1))&&(xe(n,e,i),s=1023),r=-2095105&r|(1023&s)<<11;break t}}e&&(i=+!!(512&r)-1,1024<(e=Math.max(e,s-i))&&(xe(n,i,{}),r|=256,e=1023),r=-2095105&r|(1023&e)<<11)}}return Wt(t,r),t}function xe(t,e,n){const r=1023+e,s=t.length;for(let i=r;i<s;i++){const r=t[i];null!=r&&r!==n&&(n[i-e]=r)}t.length=r+1,t[r]=n}function Le(t){if(2&t.g)throw Error("Cannot mutate an immutable Map")}var Se=class extends Map{constructor(t,e,n=ve,r=ve){super();let s=Vt(t);s|=64,Wt(t,s),this.g=s,this.l=e,this.h=n||ve,this.j=this.l?Fe:r||ve;for(let i=0;i<t.length;i++){const o=t[i],a=n(o[0],!1,!0);let h=o[1];e?void 0===h&&(h=null):h=r(o[1],!1,!0,void 0,void 0,s),super.set(a,h)}}s(t=Oe){return this.m(t)}m(t=Oe){const e=[],n=super.entries();for(var r;!(r=n.next()).done;)(r=r.value)[0]=t(r[0]),r[1]=t(r[1]),e.push(r);return e}clear(){Le(this),super.clear()}delete(t){return Le(this),super.delete(this.h(t,!0,!1))}entries(){var t=this.A();return new ne(t,Me,this)}keys(){return this.C()}values(){var t=this.A();return new ne(t,Se.prototype.get,this)}forEach(t,e){super.forEach(((n,r)=>{t.call(e,this.get(r),r,this)}))}set(t,e){return Le(this),null==(t=this.h(t,!0,!1))?this:null==e?(super.delete(t),this):super.set(t,this.j(e,!0,!0,this.l,!1,this.g))}I(t){const e=this.h(t[0],!1,!0);t=t[1],t=this.l?void 0===t?null:t:this.j(t,!1,!0,void 0,!1,this.g),super.set(e,t)}has(t){return super.has(this.h(t,!1,!1))}get(t){t=this.h(t,!1,!1);const e=super.get(t);if(void 0!==e){var n=this.l;return n?((n=this.j(e,!1,!0,n,this.v,this.g))!==e&&super.set(t,n),n):e}}A(){return Array.from(super.keys())}C(){return super.keys()}[Symbol.iterator](){return this.entries()}};function Fe(t,e,n,r,s,i){return t=me(t,r,n,i),s&&(t=Ne(t)),t}function Oe(t){return t}function Me(t){return[t,this.get(t)]}function Pe(t,e,n,r,s,i){if(null!=t){if(Array.isArray(t))t=s&&0==t.length&&1&Vt(t)?void 0:i&&2&Vt(t)?t:Re(t,e,n,void 0!==r,s,i);else if(Zt(t)){const o={};for(let a in t)o[a]=Pe(t[a],e,n,r,s,i);t=o}else t=e(t,r);return t}}function Re(t,e,n,r,s,i){const o=r||n?Vt(t):0;r=r?!!(32&o):void 0;const a=Ut(t);for(let t=0;t<a.length;t++)a[t]=Pe(a[t],e,n,r,s,i);return n&&(oe(a,t),n(o,a)),a}function Ce(t){return Pe(t,Ie,void 0,void 0,!1,!1)}function Ie(t){return t.M===Jt?t.toJSON():t instanceof Se?t.s(Ce):function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"boolean":return t?1:0;case"object":if(t&&!Array.isArray(t)){if(C(t))return F(t);if(t instanceof V){const e=t.N;return null==e?"":"string"==typeof e?e:t.N=F(e)}if(t instanceof Se)return t.s()}}return t}(t)}function De(t,e,n=Yt){if(null!=t){if(L&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){const r=Vt(t);return 2&r?t:!e||68&r||!(32&r||0===r)?Re(t,De,4&r?Yt:n,!0,!1,!0):(Wt(t,34|r),t)}return t.M===Jt?(e=t.u,t=2&(n=zt(e))?t:Ue(t,e,n,!0)):t instanceof Se&&(e=Ht(t.m(De)),t=new Se(e,t.l,t.h,t.j)),t}}function Ue(t,e,n,r){return t=t.constructor,we=e=Be(e,n,r),e=new t(e),we=void 0,e}function Be(t,e,n){const r=n||2&e?Yt:$t,s=!!(32&e);return t=function(t,e,n){const r=Ut(t);var s=r.length;const i=256&e?r[s-1]:void 0;for(s+=i?-1:0,e=512&e?1:0;e<s;e++)r[e]=n(r[e]);if(i){e=r[e]={};for(const t in i)e[t]=n(i[t])}return oe(r,t),r}(t,e,(t=>De(t,s,r))),Nt(t,32|(n?2:0)),t}function Ne(t){const e=t.u,n=zt(e);return 2&n?Ue(t,e,n,!1):t}function Ge(t,e){return je(t=t.u,zt(t),e)}function je(t,e,n,r){if(-1===n)return null;if(n>=qt(e)){if(256&e)return t[t.length-1][n]}else{var s=t.length;if(r&&256&e&&null!=(r=t[s-1][n]))return r;if((e=n+(+!!(512&e)-1))<s)return t[e]}}function Ve(t,e,n,r){const s=t.u,i=zt(s);return ee(i),ze(s,i,e,n,r),t}function ze(t,e,n,r,s){var i=qt(e);if(n>=i||s){if(s=e,256&e)i=t[t.length-1];else{if(null==r)return;i=t[i+(+!!(512&e)-1)]={},s|=256}i[n]=r,s!==e&&Wt(t,s)}else t[n+(+!!(512&e)-1)]=r,256&e&&(n in(t=t[t.length-1])&&delete t[n])}function We(t,e,n,r,s){var i=2&e;let o=je(t,e,n,s);Array.isArray(o)||(o=Kt);const a=Vt(o);if(1&a||Xt(o),i)2&a||Ht(o),1&r||Object.freeze(o);else{i=!(2&r);const h=2&a;1&r||!h?i&&32&a&&!h&&jt(o,32):(o=Xt(Ut(o)),ze(t,e,n,o,s))}return o}function Xe(t,e){t=t.u;const n=zt(t),r=je(t,n,e),s=he(r);return null!=s&&s!==r&&ze(t,n,e,s),s}function He(t){t=t.u;const e=zt(t),n=je(t,e,1),r=Qt(n,!0,!!(34&e));return null!=r&&r!==n&&ze(t,e,1,r),r}function $e(t,e,n){t=t.u;const r=zt(t),s=2&r;let i=We(t,r,e,1),o=Vt(i);if(!(4&o)){Object.isFrozen(i)&&(o=0,i=Ut(i),ze(t,r,e,i));let a=0,h=0;for(;a<i.length;a++){const t=n(i[a]);null!=t&&(i[h++]=t)}h<a&&(i.length=h),o|=5,s&&(o|=34),Wt(i,o),2&o&&Object.freeze(i)}return!s&&(2&o||Object.isFrozen(i))&&(i=Ut(i),Nt(i,5),ze(t,r,e,i)),i}let Ye;function qe(){return Ye??=new Se(Ht([]),void 0,void 0,void 0,re)}function Ke(t){t=Ut(t);for(let e=0;e<t.length;e++){const n=t[e]=Ut(t[e]);Array.isArray(n[1])&&(n[1]=Ht(n[1]))}return t}function Je(t,e,n){{t=t.u;const r=zt(t);if(ee(r),null==n)ze(t,r,e);else{if(!(4&Vt(n))){Object.isFrozen(n)&&(n=Ut(n));for(let t=0;t<n.length;t++)n[t]=de(n[t]);Wt(n,5)}ze(t,r,e,n)}}}function Ze(t,e){return Qe(t=t.u,zt(t),Xs)===e?e:-1}function Qe(t,e,n){let r=0;for(let s=0;s<n.length;s++){const i=n[s];null!=je(t,e,i)&&(0!==r&&ze(t,e,r),r=i)}return r}function tn(t,e,n,r){const s=zt(t);ee(s);const i=je(t,s,n,r);let o;if(null!=i&&i.M===Jt)return(e=Ne(i))!==i&&ze(t,s,n,e,r),e.u;if(Array.isArray(i)){const t=Vt(i);o=2&t?Be(i,t,!1):i,o=Te(o,e)}else o=Te(void 0,e);return o!==i&&ze(t,s,n,o,r),o}function en(t,e,n,r){t=t.u;const s=zt(t),i=je(t,s,n,r);return(e=me(i,e,!1,s))!==i&&null!=e&&ze(t,s,n,e,r),e}function nn(t,e,n,r=!1){if(null==(e=en(t,e,n,r)))return e;t=t.u;const s=zt(t);if(!(2&s)){const i=Ne(e);i!==e&&ze(t,s,n,e=i,r)}return e}function rn(t,e,n,r,s){var i=!!(2&e),o=We(t,e,r,1);if(o===Kt||!(4&Vt(o))){var a=o;o=!!(2&e);var h=!!(2&Vt(a));i=a,!o&&h&&(a=Ut(a));var c=e|(h?2:0);h=h||void 0;let u=0,l=0;for(;u<a.length;u++){const t=me(a[u],n,!1,c);void 0!==t&&(h=h||2&zt(t.u),a[l++]=t)}return l<u&&(a.length=l),c=5|(a=Vt(n=a)),a!=(h=h?-9&c:8|c)&&(Object.isFrozen(n)&&(n=Ut(n)),Wt(n,h)),i!==(a=n)&&ze(t,e,r,a),(o&&2!==s||1===s)&&Object.freeze(a),a}return 3===s||(i?2===s&&(s=Vt(o),o=Ut(o),Wt(o,s),ze(t,e,r,o)):(i=Object.isFrozen(o),1===s?i||Object.freeze(o):(n=-35&(s=Vt(o)),i&&(s=0,ze(t,e,r,o=Ut(o))),s!==n&&Wt(o,n)))),o}function sn(t,e,n){var r=t.u;const s=zt(r);if(e=rn(r,s,e,n,(t=!!(2&s))?1:2),!(t||8&Vt(e))){for(n=0;n<e.length;n++)(t=e[n])!==(r=Ne(t))&&(e[n]=r);Nt(e,8)}return e}function on(t,e,n,r,s){return null==r&&(r=void 0),Ve(t,n,r,s)}function an(t,e,n,r){null==r&&(r=void 0),t=t.u;const s=zt(t);ee(s),(n=Qe(t,s,n))&&n!==e&&null!=r&&ze(t,s,n),ze(t,s,e,r)}function hn(t,e,n){t=t.u;const r=zt(t);ee(r),t=rn(t,r,e,1,2),e=null!=n?n:new e,t.push(e),e.H()&&jt(t,8)}function cn(t,e){return le(Ge(t,e))}function un(t){return t=null==(t=Ge(t,2))||ue(t)?t:void 0}function ln(t,e){return ge(Ge(t,e))}function fn(t){return t??0}function dn(t,e){return fn(Xe(t,e))}function pn(t,e,n){if(null!=n){if("boolean"!=typeof n)throw t=typeof n,Error(`Expected boolean but got ${"object"!=t?t:n?Array.isArray(n)?"array":t:"null"}: ${n}`);n=!!n}Ve(t,e,n)}function gn(e,n,r){if(null!=r){if("number"!=typeof r)throw ae(e=Error(),"warning"),e;if(!Number.isFinite(r)){const e=Error();ae(e,"incident"),function(e){t.setTimeout((()=>{throw e}),0)}(e)}}Ve(e,n,r)}function mn(t,e,n){if(null!=n&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);Ve(t,e,n)}function yn(t,e,n){n=de(n),t=t.u;const r=zt(t);ee(r),We(t,r,e,2).push(n)}function vn(t,e,n){e.g?e.m(t,e.g,e.h,n,!0):e.m(t,e.h,n,!0)}Se.prototype.toJSON=void 0;var _n=class{constructor(t,e){this.u=ke(t,e)}toJSON(){return wn(this,Re(this.u,Ie,void 0,void 0,!1,!1),!0)}l(){var t=ji;return t.g?t.l(this,t.g,t.h,!0):t.l(this,t.h,t.defaultValue,!0)}clone(){const t=this.u;return Ue(this,t,zt(t),!1)}H(){return!!(2&Vt(this.u))}};function wn(t,e,n){var r=t.constructor.B,s=qt(zt(n?t.u:e)),i=!1;if(r){if(!n){var o;if((e=Ut(e)).length&&Zt(o=e[e.length-1]))for(i=0;i<r.length;i++)if(r[i]>=s){Object.assign(e[e.length-1]={},o);break}i=!0}var a;s=e,n=!n,t=qt(o=zt(t.u)),o=+!!(512&o)-1;for(let e=0;e<r.length;e++){var h=r[e];if(h<t){var c=s[h+=o];null==c?s[h]=n?Kt:Xt([]):n&&c!==Kt&&Gt(c)}else{if(!a){var u=void 0;s.length&&Zt(u=s[s.length-1])?a=u:s.push(a={})}c=a[h],null==a[h]?a[h]=n?Kt:Xt([]):n&&c!==Kt&&Gt(c)}}}if(!(r=e.length))return e;let l,f;if(Zt(a=e[r-1])){t:{var d=a;u={},s=!1;for(let t in d)n=d[t],Array.isArray(n)&&n!=n&&(s=!0),null!=n?u[t]=n:s=!0;if(s){for(let t in u){d=u;break t}d=null}}d!=a&&(l=!0),r--}for(;0<r&&null==(a=e[r-1]);r--)f=!0;return l||f?(e=i?e:Array.prototype.slice.call(e,0,r),i&&(e.length=r),d&&e.push(d),e):e}function An(t){return{ca:mr,U:t}}function bn(t,e){if(Array.isArray(e)){var n=Vt(e);if(4&n)return e;for(var r=0,s=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[s++]=n)}return s<r&&(e.length=s),Wt(e,5|n),2&n&&Object.freeze(e),e}}_n.prototype.M=Jt,_n.prototype.toString=function(){return wn(this,this.u,!1).toString()};const En=Symbol();function Tn(t){let e=t[En];if(!e){const n=On(t),r=jn(t),s=r.h;e=s?(t,e)=>s(t,e,r):(t,e)=>{for(;dt(e)&&4!=e.h;){var s=e.m,i=r[s];if(!i){var o=r.g;o&&(o=o[s])&&(i=r[s]=kn(o))}i&&i(e,t,s)||(s=(i=e).l,pt(i),i.aa?i=void 0:(o=i.g.g-s,i.g.g=s,i=ut(i.g,o)),s=t,i&&(se||=Symbol(),(o=s[se])?o.push(i):s[se]=[i]))}for(const e in n){t[ie||=Symbol()]=n;break}},t[En]=e}return e}function kn(t){const e=function(t){if(t=t.U)return Tn(t)}(t),n=t.ca.g;if(e){const r=jn(t.U).L;return(t,s,i)=>n(t,s,i,r,e)}return(t,e,r)=>n(t,e,r)}const xn=Symbol();function Ln(t,e,n,r){let s;if(r){const e=r[xn];s=e?e.L:Ee(r[0]),n[t]=e??r}s&&s===Ae?((e=n.xa)||(n.xa=e=[]),e.push(t)):e.l&&((e=n.Ba)||(n.Ba=e=[]),e.push(t))}function Sn(t,e,n,r){Ln(t,e,r)}function Fn(t,e,n,r,s){Ln(t,e,s,n)}function On(t){let e=t[xn];return e||(e=t[xn]={},Mn(t,e,Sn,Fn,e))}function Mn(t,e,n,r,s){e.L=Ee(t[0]);let i=1;if(t.length>i&&!(t[i]instanceof Dt)){var o=t[i++];if(Array.isArray(o))return e.h=o[0],e.g=o[1],e;e.g=o}for(o=0;i<t.length;){var a=t[i++],h=t[i];for("number"==typeof h?(i++,o+=h):o++,h=i;h<t.length&&!(t[h]instanceof Dt);)h++;if(h-=i){var c=t,u=i,l=c[u];if("function"==typeof l&&(l=l(),c[u]=l),(c=Array.isArray(l))&&!(c=Bn in l||Cn in l)&&(c=0<l.length)){const t=Ee(u=(c=l)[0]);null!=t&&t!==u&&(c[0]=t),c=null!=t}(l=c?l:void 0)?(i++,1===h?void 0!==(a=r(o,a,l,void 0,s))&&(e[o]=a):void 0!==(a=r(o,a,l,t[i++],s))&&(e[o]=a)):void 0!==(a=n(o,a,t[i++],s))&&(e[o]=a)}else void 0!==(a=n(o,a,void 0,s))&&(e[o]=a)}return e}const Pn=Symbol();function Rn(t){let e=t[Pn];if(!e){const n=Un(t);e=(t,e)=>zn(t,e,n),t[Pn]=e}return e}const Cn=Symbol();function In(t,e){return e.h}function Dn(t,e,n){let r,s;const i=e.h;return(t,e,o)=>i(t,e,o,s||=Un(n).L,r||=Rn(n))}function Un(t){let e=t[Cn];return e||(e=Mn(t,t[Cn]={},In,Dn),Bn in t&&Cn in t&&(t.length=0),e)}const Bn=Symbol();function Nn(t,e,n){const r=e.g;return n?(t,e,s)=>r(t,e,s,n):r}function Gn(t,e,n,r){const s=e.g;let i,o;return(t,e,a)=>s(t,e,a,o||=jn(n).L,i||=Tn(n),r)}function jn(t){let e=t[Bn];return e||(On(t),e=Mn(t,t[Bn]={},Nn,Gn),Bn in t&&Cn in t&&(t.length=0),e)}function Vn(t,e){var n=t[e];if(n)return n;if((n=t.g)&&(n=n[e])){var r=n.U,s=n.ca.h;if(r){const t=Rn(r),e=Un(r).L;n=(n,r,i)=>s(n,r,i,e,t)}else n=s;return t[e]=n}}function zn(t,e,n){for(var r=zt(t),s=+!!(512&r)-1,i=t.length,o=512&r?1:0,a=i+(256&r?-1:0);o<a;o++){const r=t[o];if(null==r)continue;const i=o-s,a=Vn(n,i);a&&a(e,r,i)}if(256&r){r=t[i-1];for(let t in r)s=+t,Number.isNaN(s)||null!=(i=r[t])&&(a=Vn(n,s))&&a(e,i,s)}if(t=se?t[se]:void 0)for(Ot(e,e.g.end()),n=0;n<t.length;n++)Ot(e,j(t[n])||D())}function Wn(t,e){return new Dt(t,e,!1)}function Xn(t,e){return new Dt(t,e,!0)}function Hn(t,e,n){ze(t,zt(t),e,n)}var $n=Wn((function(t,e,n,r,s){return 2===t.h&&(t=gt(t,Te([void 0,void 0],r),s),ee(r=zt(e)),(s=je(e,r,n))instanceof Se?0!=(2&s.g)?((s=s.m()).push(t),ze(e,r,n,s)):s.I(t):Array.isArray(s)?(2&Vt(s)&&ze(e,r,n,s=Ke(s)),s.push(t)):ze(e,r,n,[t]),!0)}),(function(t,e,n,r,s){if(e instanceof Se)e.forEach(((e,i)=>{It(t,n,Te([i,e],r),s)}));else if(Array.isArray(e))for(let i=0;i<e.length;i++){const o=e[i];Array.isArray(o)&&It(t,n,Te(o,r),s)}}));function Yn(t,e,n){t:if(null!=e){if(ue(e)){if("string"==typeof e)break t;if("number"==typeof e)break t}e=void 0}null!=e&&("string"==typeof e&&Et(e),null!=e&&(Mt(t,n,0),"number"==typeof e?(t=t.g,Z(e),xt(t,K,J)):(n=Et(e),xt(t.g,n.h,n.g))))}function qn(t,e,n){null!=(e=le(e))&&null!=e&&(Mt(t,n,0),St(t.g,e))}function Kn(t,e,n){null!=(e=ce(e))&&(Mt(t,n,0),t.g.g.push(e?1:0))}function Jn(t,e,n){null!=(e=ge(e))&&Ct(t,n,c(e))}function Zn(t,e,n,r,s){It(t,n,e instanceof _n?e.u:Array.isArray(e)?Te(e,r):void 0,s)}function Qn(t,e,n){null!=(e=null==e||"string"==typeof e||C(e)||e instanceof V?e:void 0)&&Ct(t,n,$(e).buffer)}function tr(t,e,n){return(5===t.h||2===t.h)&&(e=We(e,zt(e),n,2,!1),2==t.h?vt(t,lt.prototype.A,e):e.push(t.g.A()),!0)}var er=Wn((function(t,e,n){if(1!==t.h)return!1;var r=t.g;t=ht(r);const s=ht(r);r=2*(s>>31)+1;const i=s>>>20&2047;return t=4294967296*(1048575&s)+t,Hn(e,n,2047==i?t?NaN:1/0*r:0==i?r*Math.pow(2,-1074)*t:r*Math.pow(2,i-1075)*(t+4503599627370496)),!0}),(function(t,e,n){null!=(e=he(e))&&(Mt(t,n,1),t=t.g,(n=q||=new DataView(new ArrayBuffer(8))).setFloat64(0,+e,!0),K=n.getUint32(0,!0),J=n.getUint32(4,!0),Ft(t,K),Ft(t,J))})),nr=Wn((function(t,e,n){return 5===t.h&&(Hn(e,n,t.g.A()),!0)}),(function(t,e,n){null!=(e=he(e))&&(Mt(t,n,5),t=t.g,Q(e),Ft(t,K))})),rr=Xn(tr,(function(t,e,n){if(null!=(e=bn(he,e)))for(let i=0;i<e.length;i++){var r=t,s=e[i];null!=s&&(Mt(r,n,5),r=r.g,Q(s),Ft(r,K))}})),sr=Xn(tr,(function(t,e,n){if(null!=(e=bn(he,e))&&e.length){Mt(t,n,2),Lt(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,Q(e[r]),Ft(n,K)}})),ir=Wn((function(t,e,n){return 0===t.h&&(Hn(e,n,ot(t.g,et)),!0)}),Yn),or=Wn((function(t,e,n){return 0===t.h&&(Hn(e,n,0===(t=ot(t.g,et))?void 0:t),!0)}),Yn),ar=Wn((function(t,e,n){return 0===t.h&&(Hn(e,n,ot(t.g,tt)),!0)}),(function(t,e,n){t:if(null!=e){if(ue(e)){if("string"==typeof e)break t;if("number"==typeof e)break t}e=void 0}null!=e&&("string"==typeof e&&wt(e),null!=e&&(Mt(t,n,0),"number"==typeof e?(t=t.g,Z(e),xt(t,K,J)):(n=wt(e),xt(t.g,n.h,n.g))))})),hr=Wn((function(t,e,n){return 0===t.h&&(Hn(e,n,t.g.m()),!0)}),qn),cr=Xn((function(t,e,n){return(0===t.h||2===t.h)&&(e=We(e,zt(e),n,2,!1),2==t.h?vt(t,lt.prototype.m,e):e.push(t.g.m()),!0)}),(function(t,e,n){if(null!=(e=bn(le,e))&&e.length){n=Pt(t,n);for(let n=0;n<e.length;n++)St(t.g,e[n]);Rt(t,n)}})),ur=Wn((function(t,e,n){return 0===t.h&&(Hn(e,n,0===(t=t.g.m())?void 0:t),!0)}),qn),lr=Wn((function(t,e,n){return 0===t.h&&(Hn(e,n,at(t.g)),!0)}),Kn),fr=Wn((function(t,e,n){return 0===t.h&&(Hn(e,n,!1===(t=at(t.g))?void 0:t),!0)}),Kn),dr=Xn((function(t,e,n){if(2!==t.h)return!1;t=mt(t);const r=zt(e);return ee(r),We(e,r,n,2).push(t),!0}),(function(t,e,n){if(null!=(e=bn(ge,e)))for(let s=0;s<e.length;s++){var r=e[s];null!=r&&Ct(t,n,c(r))}})),pr=Wn((function(t,e,n){return 2===t.h&&(Hn(e,n,""===(t=mt(t))?void 0:t),!0)}),Jn),gr=Wn((function(t,e,n){return 2===t.h&&(Hn(e,n,mt(t)),!0)}),Jn),mr=Wn((function(t,e,n,r,s){return 2===t.h&&(gt(t,tn(e,r,n,!0),s),!0)}),Zn),yr=Wn((function(t,e,n,r,s){return 2===t.h&&(gt(t,tn(e,r,n),s),!0)}),Zn),vr=Xn((function(t,e,n,r,s){if(2!==t.h)return!1;r=Te(void 0,r);const i=zt(e);ee(i);let o=We(e,i,n,3);return(Object.isFrozen(o)||4&Vt(o))&&(o=Ut(o),ze(e,i,n,o)),o.push(r),gt(t,r,s),!0}),(function(t,e,n,r,s){if(Array.isArray(e))for(let i=0;i<e.length;i++)Zn(t,e[i],n,r,s)})),_r=Wn((function(t,e,n,r,s,i){if(2!==t.h)return!1;const o=zt(e);return ee(o),(i=Qe(e,o,i))&&n!==i&&ze(e,o,i),gt(t,e=tn(e,r,n),s),!0}),Zn),wr=Wn((function(t,e,n){return 2===t.h&&(Hn(e,n,yt(t)),!0)}),Qn),Ar=Xn((function(t,e,n){return(0===t.h||2===t.h)&&(e=We(e,zt(e),n,2,!1),2==t.h?vt(t,lt.prototype.j,e):e.push(t.g.j()),!0)}),(function(t,e,n){if(null!=(e=bn(fe,e)))for(let i=0;i<e.length;i++){var r=t,s=e[i];null!=s&&(Mt(r,n,0),Lt(r.g,s))}})),br=Wn((function(t,e,n){return 0===t.h&&(Hn(e,n,t.g.m()),!0)}),(function(t,e,n){null!=(e=le(e))&&(e=parseInt(e,10),Mt(t,n,0),St(t.g,e))})),Er=Xn((function(t,e,n){return(0===t.h||2===t.h)&&(e=We(e,zt(e),n,2,!1),2==t.h?vt(t,lt.prototype.C,e):e.push(t.g.m()),!0)}),(function(t,e,n){if(null!=(e=bn(le,e))&&e.length){n=Pt(t,n);for(let n=0;n<e.length;n++)St(t.g,e[n]);Rt(t,n)}}));class Tr{constructor(t,e){this.h=t,this.g=e,this.l=nn,this.m=on,this.defaultValue=void 0}}function kr(t,e){return new Tr(t,e)}function xr(t,e){return(n,r)=>{t:{if(_t.length){const t=_t.pop();t.o(r),st(t.g,n,r),n=t}else n=new class{constructor(t,e){if(ft.length){const n=ft.pop();st(n,t,e),t=n}else t=new lt(t,e);this.g=t,this.l=this.g.g,this.h=this.m=-1,this.o(e)}o({aa:t=!1}={}){this.aa=t}}(n,r);try{var s=new t;const r=s.u;Tn(e)(r,n),ie&&delete r[ie];var i=s;break t}finally{(s=n.g).h=null,s.s=!1,s.v=0,s.l=0,s.g=0,s.R=!1,n.m=-1,n.h=-1,100>_t.length&&_t.push(n)}i=void 0}return i}}function Lr(t){return function(){const e=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};zn(this.u,e,Un(t)),Ot(e,e.g.end());const n=new Uint8Array(e.h),r=e.l,s=r.length;let i=0;for(let t=0;t<s;t++){const e=r[t];n.set(e,i),i+=e.length}return e.l=[n],n}}var Sr,Fr=[0,pr,Wn((function(t,e,n){return 2===t.h&&(Hn(e,n,(t=yt(t))===G()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof _n){const r=e.Ea;return void(r&&(e=r(e),null!=e&&Ct(t,n,$(e).buffer)))}if(Array.isArray(e))return}Qn(t,e,n)}))];function Or(n){if(void 0===Sr){var r=null,s=t.trustedTypes;if(s&&s.createPolicy){try{r=s.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(e){t.console&&t.console.error(e.message)}Sr=r}else Sr=r}return n=(r=Sr)?r.createScriptURL(n):n,new class{constructor(t){this.g=t}toString(){return this.g+""}}(n)}var Mr=[0,gr],Pr=[0,hr,br,lr,lr,cr,br,br],Rr=[0,lr,lr],Cr=class extends _n{constructor(){super()}};Cr.B=[6];var Ir=[0,lr,gr,lr,br,br,Er,gr,gr,yr,Rr,br],Dr=[0,gr,gr,gr],Ur=class extends _n{constructor(){super()}},Br=[0],Nr=[0,hr],Gr=[1,2,3,4,5],jr=class extends _n{constructor(t){super(t,2)}},Vr={},zr=[-2,Vr,lr];Vr[336783863]=An([0,gr,lr,lr,hr,yr,[0,_r,Br,Gr,_r,Ir,Gr,_r,Dr,Gr,_r,Nr,Gr,_r,Pr,Gr],yr,Mr]);var Wr=[0,pr,fr],Xr=[0,or,or,fr,fr,fr,fr,or,cr,pr,ur,or,or,fr,ur,fr,fr,fr,pr],Hr=[-1,{}],$r=[0,gr,yr,2,Hr],Yr=[0,gr,dr,yr,Hr];function qr(t,e){e=pe(e),t=t.u;const n=zt(t);ee(n),ze(t,n,2,""===e?void 0:e)}function Kr(t,e){yn(t,3,e)}function Jr(t,e){yn(t,4,e)}var Zr=class extends _n{constructor(t){super(t,500)}o(t){return on(this,0,7,t)}};Zr.B=[3,4,5,6,8,13,17,1005];var Qr=[-500,pr,pr,dr,dr,dr,dr,yr,zr,vr,Fr,ur,ur,yr,$r,yr,Yr,vr,Wr,pr,yr,Xr,ur,dr,dr,988],ts=[0,pr,pr,yr,Hr],es=[-500,gr,gr,yr,[-1,{}],gr,999],ns=[-500,gr,dr,dr,yr,[-2,{},lr],dr,998,dr],rs=[-500,gr,dr,yr,Hr,dr,999];function ss(t,e){hn(t,Zr,e)}function is(t,e){yn(t,10,e)}function os(t,e){yn(t,15,e)}var as=class extends _n{constructor(t){super(t,500)}o(t){return on(this,0,1001,t)}};as.B=[1,6,7,9,10,15,16,17,14,1002];var hs=[-500,vr,Qr,vr,5,es,vr,ns,ur,vr,rs,dr,ur,yr,$r,yr,Yr,vr,ts,dr,dr,dr,yr,Xr,pr,pr,fr,yr,980,Hr,vr,Fr],cs=xr(as,hs);as.prototype.g=Lr(hs);var us=[0,vr,[0,hr,hr,hr]],ls=class extends _n{constructor(t){super(t)}},fs=[0,hr,nr,gr,gr],ds=class extends _n{constructor(t){super(t)}g(){return sn(this,ls,1)}};ds.B=[1];var ps=[0,vr,fs],gs=xr(ds,ps),ms=[0,hr,nr],ys=[0,hr,hr,yr,us],vs=class extends _n{constructor(t){super(t)}},_s=[0,hr,hr,hr,hr],ws=[0,nr,nr,nr,nr],As=class extends _n{constructor(t){super(t)}},bs=[0,nr,nr,gr,nr],Es=class extends _n{constructor(t){super(t)}h(){return nn(this,vs,2)}g(){return sn(this,As,5)}};Es.B=[5];var Ts=[0,br,yr,_s,yr,ws,yr,ys,vr,bs],ks=class extends _n{constructor(t){super(t)}};ks.B=[1,2,3,8,9];var xs=xr(ks,[0,dr,cr,sr,yr,Ts,gr,gr,ir,vr,ms,dr,ir]),Ls=class extends _n{constructor(t){super(t)}},Ss=[0,nr,nr,nr,nr,nr],Fs=class extends _n{constructor(t){super(t)}};Fs.B=[1];var Os=xr(Fs,[0,vr,Ss]),Ms=class extends _n{constructor(t){super(t)}},Ps=[0,nr,nr,nr,nr,nr],Rs=class extends _n{constructor(t){super(t)}};Rs.B=[1];var Cs=xr(Rs,[0,vr,Ps]),Is=class extends _n{constructor(t){super(t)}};Is.B=[3];var Ds=[0,hr,hr,sr,br],Us=class extends _n{constructor(){super()}};Us.prototype.g=Lr([0,nr,nr,nr,nr,nr,ir]);var Bs=class extends _n{constructor(t){super(t)}},Ns=[0,hr,2,gr,yr,ps],Gs=class extends _n{constructor(t){super(t)}};Gs.B=[1];var js=xr(Gs,[0,vr,Ns,ir]),Vs=class extends _n{constructor(t){super(t)}};Vs.B=[1];var zs=class extends _n{constructor(t){super(t)}fa(){const t=He(this);return null==t?G():t}},Ws=class extends _n{constructor(t){super(t)}},Xs=[1,2],Hs=[0,_r,[0,sr],Xs,_r,[0,wr],Xs,hr,gr],$s=class extends _n{constructor(t){super(t)}};$s.B=[1];var Ys=xr($s,[0,vr,Hs,ir]),qs=class extends _n{constructor(t){super(t)}};qs.B=[4,5];var Ks=[0,gr,hr,nr,dr,dr],Js=class extends _n{constructor(t){super(t)}},Zs=[0,lr,lr],Qs=class extends _n{constructor(t){super(t)}},ti=[1,2,3,4,5],ei=class extends _n{constructor(t){super(t)}g(){return null!=He(this)}h(){return null!=ln(this,2)}},ni=[0,wr,gr,yr,[0,hr,ir,ir],yr,[0,ar,ir]],ri=class extends _n{constructor(t){super(t)}g(){return ce(Ge(this,2))??!1}},si=[0,yr,ni,lr,yr,[0,_r,Nr,ti,_r,Ir,ti,_r,Pr,ti,_r,Br,ti,_r,Dr,ti]],ii=class extends _n{constructor(t){super(t)}},oi=[0,yr,si,nr,nr,hr],ai=kr(502141897,ii);Vr[502141897]=An(oi);var hi=[0,yr,ni];Vr[512499200]=An(hi);var ci=[0,yr,hi];Vr[515723506]=An(ci);var ui=xr(class extends _n{constructor(t){super(t)}},[0,yr,[0,br,br,rr,Ar],yr,Ds]),li=[0,yr,si];Vr[508981768]=An(li);var fi=class extends _n{constructor(t){super(t)}},di=[0,yr,si,nr,yr,li,lr],pi=class extends _n{constructor(t){super(t)}},gi=[0,yr,si,yr,oi,yr,di,nr,yr,ci];Vr[508968149]=An(di);var mi=kr(508968150,pi);Vr[508968150]=An(gi);var yi=class extends _n{constructor(t){super(t)}},vi=kr(513916220,yi);Vr[513916220]=An([0,yr,si,yr,gi,hr]);var _i=class extends _n{constructor(t){super(t)}h(){return nn(this,qs,2)}g(){Ve(this,2)}},wi=[0,yr,si,yr,Ks];Vr[478825465]=An(wi);var Ai=[0,yr,si];Vr[478825422]=An(Ai);var bi=class extends _n{constructor(t){super(t)}},Ei=[0,yr,si,yr,Ai,yr,wi,yr,wi],Ti=class extends _n{constructor(t){super(t)}},ki=[0,yr,si,nr,hr],xi=class extends _n{constructor(t){super(t)}},Li=[0,yr,si,nr],Si=class extends _n{constructor(t){super(t)}},Fi=[0,yr,si,yr,ki,yr,Li,nr],Oi=class extends _n{constructor(t){super(t)}},Mi=[0,yr,si,yr,Fi,yr,Ei];Vr[463370452]=An(Ei),Vr[464864288]=An(ki),Vr[474472470]=An(Li);var Pi=kr(462713202,Si);Vr[462713202]=An(Fi);var Ri=kr(479097054,Oi);Vr[479097054]=An(Mi);var Ci=class extends _n{constructor(t){super(t)}},Ii=kr(456383383,Ci);Vr[456383383]=An([0,yr,si,yr,Ks]);var Di=class extends _n{constructor(t){super(t)}},Ui=kr(476348187,Di);Vr[476348187]=An([0,yr,si,yr,Zs]);var Bi=class extends _n{constructor(t){super(t)}},Ni=[0,br,br],Gi=class extends _n{constructor(t){super(t)}};Gi.B=[3];var ji=kr(458105876,class extends _n{constructor(t){super(t)}g(){var t=this.u;const e=zt(t);var n=2&e;return t=function(t,e,n){var r=Gi;const s=2&e;let i=!1;if(null==n){if(s)return qe();n=[]}else if(n.constructor===Se){if(0==(2&n.g)||s)return n;n=n.m()}else Array.isArray(n)?i=!!(2&Vt(n)):n=[];if(s){if(!n.length)return qe();i||(i=!0,Ht(n))}else i&&(i=!1,n=Ke(n));return i||(64&Vt(n)?jt(n,32):32&e&&Nt(n,32)),ze(t,e,2,r=new Se(n,r,_e,void 0),!1),r}(t,e,je(t,e,2)),null==t||!n&&Gi&&(t.v=!0),n=t}});Vr[458105876]=An([0,yr,Ni,$n,[!0,ir,yr,[0,gr,gr,dr]]]);var Vi=class extends _n{constructor(t){super(t)}},zi=kr(458105758,Vi);Vr[458105758]=An([0,yr,si,gr,yr,Ni]);var Wi=class extends _n{constructor(t){super(t)}};Wi.B=[5,6];var Xi=kr(443442058,Wi);Vr[443442058]=An([0,yr,si,gr,hr,nr,dr,dr]);var Hi=class extends _n{constructor(t){super(t)}},$i=[0,yr,si,nr,nr,hr];Vr[514774813]=An($i);var Yi=class extends _n{constructor(t){super(t)}},qi=[0,yr,si,nr],Ki=class extends _n{constructor(t){super(t)}},Ji=[0,yr,si,yr,$i,yr,qi,nr];Vr[518928384]=An(qi);var Zi=kr(516587230,Ki);function Qi(t,e){return e=e?e.clone():new qs,void 0!==t.displayNamesLocale?Ve(e,1,pe(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Ve(e,1),void 0!==t.maxResults?gn(e,2,t.maxResults):"maxResults"in t&&Ve(e,2),void 0!==t.scoreThreshold?mn(e,3,t.scoreThreshold):"scoreThreshold"in t&&Ve(e,3),void 0!==t.categoryAllowlist?Je(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&Ve(e,4),void 0!==t.categoryDenylist?Je(e,5,t.categoryDenylist):"categoryDenylist"in t&&Ve(e,5),e}function to(t,e=-1,n=""){return{categories:t.map((t=>({index:fn(cn(t,1))??-1,score:dn(t,2)??0,categoryName:ln(t,3)??""??"",displayName:ln(t,4)??""??""}))),headIndex:e,headName:n}}function eo(t){var e=$e(t,3,he),n=$e(t,2,le);const r=$e(t,1,ge),s=$e(t,9,ge),i={categories:[],keypoints:[]};for(let t=0;t<e.length;t++)i.categories.push({score:e[t],index:n[t]??-1,categoryName:r[t]??"",displayName:s[t]??""});if((e=nn(t,Es,4)?.h())&&(i.boundingBox={originX:cn(e,1)??0,originY:cn(e,2)??0,width:cn(e,3)??0,height:cn(e,4)??0,angle:0}),nn(t,Es,4)?.g().length)for(const e of nn(t,Es,4).g())i.keypoints.push({x:Xe(e,1)??0,y:Xe(e,2)??0,score:Xe(e,4)??0,label:ln(e,3)??""});return i}function no(t){const e=[];for(const n of sn(t,Ms,1))e.push({x:dn(n,1)??0,y:dn(n,2)??0,z:dn(n,3)??0});return e}function ro(t){const e=[];for(const n of sn(t,Ls,1))e.push({x:dn(n,1)??0,y:dn(n,2)??0,z:dn(n,3)??0});return e}function so(t){return Array.from(t,(t=>127<t?t-256:t))}function io(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,r=0,s=0;for(let i=0;i<t.length;i++)n+=t[i]*e[i],r+=t[i]*t[i],s+=e[i]*e[i];if(0>=r||0>=s)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*s)}let oo;Vr[516587230]=An(Ji);const ao=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 ho(){if(void 0===oo)try{await WebAssembly.instantiate(ao),oo=!0}catch{oo=!1}return oo}async function co(t,e){const n=await ho()?"wasm_internal":"wasm_nosimd_internal";return void 0!==e?{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}:{wasmLoaderPath:Or(`./${encodeURIComponent(t)}_${encodeURIComponent(n)}.js`),wasmBinaryPath:Or(`./${encodeURIComponent(t)}_${encodeURIComponent(n)}.wasm`)}}var uo=class{};function lo(){const t=navigator.userAgent;return t.includes("Safari")&&!t.includes("Chrome")}async function fo(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),!1),e.addEventListener("error",(t=>{n(t)}),!1),document.body.appendChild(e)}))}importScripts(t.toString())}function po(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function go(t,e,n){if(!t.i.canvas)throw Error("No OpenGL canvas configured.");if(n?t.i._bindTextureToStream(n):t.i._bindTextureToCanvas(),!(n=t.i.canvas.getContext("webgl2")||t.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");return t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,e),t.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),e.videoWidth?(n=e.videoWidth,e=e.videoHeight):e.naturalWidth?(n=e.naturalWidth,e=e.naturalHeight):(n=e.width,e=e.height),!t.l||n===t.i.canvas.width&&e===t.i.canvas.height||(t.i.canvas.width=n,t.i.canvas.height=e),[n,e]}function mo(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.i.stringToNewUTF8(e[n]);e=t.i._malloc(4*r.length),t.i.HEAPU32.set(r,e>>2),n(e);for(const e of r)t.i._free(e);t.i._free(e)}function yo(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function vo(t,e,n){let r=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,s)=>{e?(n(r,s),r=[]):r.push(t)}}uo.forVisionTasks=function(t=""){return co("vision",t)},uo.forTextTasks=function(t=""){return co("text",t)},uo.forAudioTasks=function(t=""){return co("audio",t)},uo.isSimdSupported=function(){return ho()};async function _o(t,e,n,r){return t=await(async(t,e,n,r,s)=>{if(e&&await fo(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await fo(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&s&&((e=self.Module).locateFile=s.locateFile,s.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=s.mainScriptUrlOrBlob)),s=await self.ModuleFactory(self.Module||s),self.ModuleFactory=self.Module=void 0,new t(s,r)})(t,n.wasmLoaderPath,n.assetLoaderPath,e,{locateFile(t){var e=n.wasmBinaryPath.toString();return e.includes(t)?e:(e=n.assetBinaryPath?.toString(),e?.includes(t)?e:t)}}),await t.o(r),t}function wo(t,e){const n=nn(t.baseOptions,ei,1)||new ei;"string"==typeof e?(Ve(n,2,pe(e)),Ve(n,1)):e instanceof Uint8Array&&(Ve(n,1,Qt(e,!1,!1)),Ve(n,2)),on(t.baseOptions,0,1,n)}function Ao(t){try{const e=t.J.length;if(1===e)throw Error(t.J[0].message);if(1<e)throw Error("Encountered multiple errors: "+t.J.map((t=>t.message)).join(", "))}finally{t.J=[]}}function bo(t,e){t.I=Math.max(t.I,e)}function Eo(t,e){t.A=new Zr,qr(t.A,"PassThroughCalculator"),Kr(t.A,"free_memory"),Jr(t.A,"free_memory_unused_out"),is(e,"free_memory"),ss(e,t.A)}function To(t,e){Kr(t.A,e),Jr(t.A,e+"_unused_out")}function ko(t){t.g.addBoolToStream(!0,"free_memory",t.I)}var xo=class{constructor(t){this.g=t,this.J=[],this.I=0,this.g.setAutoRenderToScreen(!1)}l(t,e=!0){if(e){const e=t.baseOptions||{};if(t.baseOptions?.modelAssetBuffer&&t.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(nn(this.baseOptions,ei,1)?.g()||nn(this.baseOptions,ei,1)?.h()||t.baseOptions?.modelAssetBuffer||t.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(t,e){let n=nn(t.baseOptions,Qs,3);if(!n){var r=n=new Qs,s=new Ur;an(r,4,ti,s)}"delegate"in e&&("GPU"===e.delegate?(e=n,r=new Cr,an(e,2,ti,r)):(e=n,r=new Ur,an(e,4,ti,r))),on(t.baseOptions,0,3,n)}(this,e),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=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(t),!0,!1,!1),wo(this,"/model.dat"),this.m(),this.P()}));wo(this,e.modelAssetBuffer)}return this.m(),this.P(),Promise.resolve()}P(){}W(){let t;if(this.g.W((e=>{t=cs(e)})),!t)throw Error("Failed to retrieve CalculatorGraphConfig");return t}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.J.push(Error(e))})),this.g.Aa(),this.g.setGraph(t,e),this.A=void 0,Ao(this)}finishProcessing(){this.g.finishProcessing(),Ao(this)}close(){this.A=void 0,this.g.closeGraph()}};xo.prototype.close=xo.prototype.close;const Lo={color:"white",lineWidth:4,radius:6};function So(t){return{...Lo,fillColor:(t=t||{}).color,...t}}function Fo(t,e){return t instanceof Function?t(e):t}function Oo(t,e,n){return Math.max(Math.min(e,n),Math.min(Math.max(e,n),t))}var Mo=class{constructor(t){this.g=t}ma(t,e){if(t){var n=this.g;e=So(e),n.save();var r=n.canvas,s=0;for(const i of t)n.fillStyle=Fo(e.fillColor,{index:s,from:i}),n.strokeStyle=Fo(e.color,{index:s,from:i}),n.lineWidth=Fo(e.lineWidth,{index:s,from:i}),(t=new Path2D).arc(i.x*r.width,i.y*r.height,Fo(e.radius,{index:s,from:i}),0,2*Math.PI),n.fill(t),n.stroke(t),++s;n.restore()}}la(t,e,n){if(t&&e){var r=this.g;n=So(n),r.save();var s=r.canvas,i=0;for(const o of e){r.beginPath(),e=t[o.start];const a=t[o.end];e&&a&&(r.strokeStyle=Fo(n.color,{index:i,from:e,to:a}),r.lineWidth=Fo(n.lineWidth,{index:i,from:e,to:a}),r.moveTo(e.x*s.width,e.y*s.height),r.lineTo(a.x*s.width,a.y*s.height)),++i,r.stroke()}r.restore()}}ka(t,e){const n=this.g;e=So(e),n.save(),n.beginPath(),n.lineWidth=Fo(e.lineWidth,{}),n.strokeStyle=Fo(e.color,{}),n.fillStyle=Fo(e.fillColor,{}),n.moveTo(t.originX,t.originY),n.lineTo(t.originX+t.width,t.originY),n.lineTo(t.originX+t.width,t.originY+t.height),n.lineTo(t.originX,t.originY+t.height),n.lineTo(t.originX,t.originY),n.stroke(),n.fill(),n.restore()}};function Po(t,e){if(null===t)throw Error(`Unable to obtain required WebGL resource: ${e}`);return t}Mo.prototype.drawBoundingBox=Mo.prototype.ka,Mo.prototype.drawConnectors=Mo.prototype.la,Mo.prototype.drawLandmarks=Mo.prototype.ma,Mo.lerp=function(t,e,n,r,s){return Oo(r*(1-(t-e)/(n-e))+s*(1-(n-t)/(n-e)),r,s)},Mo.clamp=Oo;class Ro{constructor(t,e,n,r){this.g=t,this.h=e,this.m=n,this.l=r}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function Co(t,e,n){const r=t.h;if(n=Po(r.createShader(n),"Failed to create WebGL shader"),r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${r.getShaderInfoLog(n)}`);return r.attachShader(t.g,n),n}function Io(t,e){const n=t.h,r=Po(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(r);const s=Po(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,s),n.enableVertexAttribArray(t.s),n.vertexAttribPointer(t.s,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const i=Po(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(t.A),n.vertexAttribPointer(t.A,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(e?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.bindVertexArray(null),new Ro(n,r,s,i)}function Do(t,e){if(t.h){if(e!==t.h)throw Error("Cannot change GL context once initialized")}else t.h=e}function Uo(t,e,n,r){if(Do(t,e),!t.g){const e=t.h;if(t.g=Po(e.createProgram(),"Failed to create WebGL program"),t.C=Co(t,"\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 }",e.VERTEX_SHADER),t.v=Co(t,"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n ",e.FRAGMENT_SHADER),e.linkProgram(t.g),!e.getProgramParameter(t.g,e.LINK_STATUS))throw Error(`Error during program linking: ${e.getProgramInfoLog(t.g)}`);t.s=e.getAttribLocation(t.g,"aVertex"),t.A=e.getAttribLocation(t.g,"aTex")}return n?(t.m||(t.m=Io(t,!0)),n=t.m):(t.j||(t.j=Io(t,!1)),n=t.j),e.useProgram(t.g),n.bind(),t=r(),n.g.bindVertexArray(null),t}function Bo(t,e,n){Do(t,e),t.l||(t.l=Po(e.createFramebuffer(),"Failed to create framebuffe.")),e.bindFramebuffer(e.FRAMEBUFFER,t.l),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0)}function No(t){t.h?.bindFramebuffer(t.h.FRAMEBUFFER,null)}var Go=class{close(){if(this.g){const t=this.h;t.deleteProgram(this.g),t.deleteShader(this.C),t.deleteShader(this.v)}this.l&&this.h.deleteFramebuffer(this.l),this.j&&this.j.close(),this.m&&this.m.close()}};function jo(t,e){switch(e){case 0:return t.g.find((t=>t instanceof ImageData));case 1:return t.g.find((t=>"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function Vo(t){var e=jo(t,0);if(!e){e=Wo(t);const n=Xo(t),r=new Uint8Array(t.width*t.height*4);Bo(n,e,zo(t)),e.readPixels(0,0,t.width,t.height,e.RGBA,e.UNSIGNED_BYTE,r),No(n),e=new ImageData(new Uint8ClampedArray(r.buffer),t.width,t.height),t.g.push(e)}return e}function zo(t){let e=jo(t,2);if(!e){const n=Wo(t);e=$o(t);const r=jo(t,1)||Vo(t);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),Yo(t)}return e}function Wo(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when iniitializing the image.");return t.h||(t.h=Po(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function Xo(t){return t.l||(t.l=new Go),t.l}function Ho(t){(t=Wo(t)).texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR)}function $o(t){const e=Wo(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=jo(t,2);return n?e.bindTexture(e.TEXTURE_2D,n):(n=Po(e.createTexture(),"Failed to create texture"),t.g.push(n),t.m=!0,e.bindTexture(e.TEXTURE_2D,n),Ho(t)),n}function Yo(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}function qo(t){const e=Wo(t);return Uo(Xo(t),e,!0,(()=>function(t,e){const n=t.canvas;if(n.width===t.width&&n.height===t.height)return e();const r=n.width,s=n.height;return n.width=t.width,n.height=t.height,t=e(),n.width=r,n.height=s,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()}))))}var Ko=class{constructor(t,e,n,r,s,i,o){this.g=t,this.j=e,this.m=n,this.canvas=r,this.l=s,this.width=i,this.height=o,(this.j||this.m)&&(0===--Jo&&console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources."))}va(){return!!jo(this,0)}ba(){return!!jo(this,1)}K(){return!!jo(this,2)}ra(){return Vo(this)}qa(){var t=jo(this,1);return t||(zo(this),$o(this),t=qo(this),Yo(this),this.g.push(t),this.j=!0),t}V(){return zo(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof ImageData)n=new ImageData(e.data,this.width,this.height);else if(e instanceof WebGLTexture){const t=Wo(this),e=Xo(this);t.activeTexture(t.TEXTURE1),n=Po(t.createTexture(),"Failed to create texture"),t.bindTexture(t.TEXTURE_2D,n),Ho(this),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),Bo(e,t,n),Uo(e,t,!1,(()=>{$o(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),Yo(this)})),No(e),Yo(this)}else{if(!(e instanceof ImageBitmap))throw Error(`Type is not supported: ${e}`);zo(this),$o(this),n=qo(this),Yo(this)}t.push(n)}return new Ko(t,this.ba(),this.K(),this.canvas,this.l,this.width,this.height)}close(){this.j&&jo(this,1).close(),this.m&&Wo(this).deleteTexture(jo(this,2)),Jo=-1}};Ko.prototype.close=Ko.prototype.close,Ko.prototype.clone=Ko.prototype.clone,Ko.prototype.getAsWebGLTexture=Ko.prototype.V,Ko.prototype.getAsImageBitmap=Ko.prototype.qa,Ko.prototype.getAsImageData=Ko.prototype.ra,Ko.prototype.hasWebGLTexture=Ko.prototype.K,Ko.prototype.hasImageBitmap=Ko.prototype.ba,Ko.prototype.hasImageData=Ko.prototype.va;var Jo=250;function Zo(t,e){switch(e){case 0:return t.g.find((t=>t instanceof Uint8Array));case 1:return t.g.find((t=>t instanceof Float32Array));case 2:return t.g.find((t=>"undefined"!=typeof WebGLTexture&&t instanceof WebGLTexture));default:throw Error(`Type is not supported: ${e}`)}}function Qo(t){var e=Zo(t,1);if(!e){if(e=Zo(t,0))e=new Float32Array(e).map((t=>t/255));else{e=new Float32Array(t.width*t.height);const r=ea(t);var n=ra(t);if(Bo(n,r,ta(t)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document){n=new Float32Array(t.width*t.height*4),r.readPixels(0,0,t.width,t.height,r.RGBA,r.FLOAT,n);for(let t=0,r=0;t<e.length;++t,r+=4)e[t]=n[r]}else r.readPixels(0,0,t.width,t.height,r.RED,r.FLOAT,e)}t.g.push(e)}return e}function ta(t){let e=Zo(t,2);if(!e){const n=ea(t);e=ia(t);const r=Qo(t),s=na(t);n.texImage2D(n.TEXTURE_2D,0,s,t.width,t.height,0,n.RED,n.FLOAT,r),oa(t)}return e}function ea(t){if(!t.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return t.h||(t.h=Po(t.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),t.h}function na(t){if(t=ea(t),!aa)if(t.getExtension("EXT_color_buffer_float")&&t.getExtension("OES_texture_float_linear")&&t.getExtension("EXT_float_blend"))aa=t.R32F;else{if(!t.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");aa=t.R16F}return aa}function ra(t){return t.l||(t.l=new Go),t.l}function sa(t){(t=ea(t)).texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST)}function ia(t){const e=ea(t);e.viewport(0,0,t.width,t.height),e.activeTexture(e.TEXTURE0);let n=Zo(t,2);return n?e.bindTexture(e.TEXTURE_2D,n):(n=Po(e.createTexture(),"Failed to create texture"),t.g.push(n),t.m=!0,e.bindTexture(e.TEXTURE_2D,n),sa(t)),n}function oa(t){t.h.bindTexture(t.h.TEXTURE_2D,null)}var aa,ha=class{constructor(t,e,n,r,s,i){this.g=t,this.m=e,this.canvas=n,this.l=r,this.width=s,this.height=i,this.m&&(0===--ca&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources."))}wa(){return!!Zo(this,0)}ua(){return!!Zo(this,1)}K(){return!!Zo(this,2)}sa(){return(e=Zo(t=this,0))||(e=Qo(t),e=new Uint8Array(e.map((t=>255*t))),t.g.push(e)),e;var t,e}pa(){return Qo(this)}V(){return ta(this)}clone(){const t=[];for(const e of this.g){let n;if(e instanceof Uint8Array)n=new Uint8Array(e);else if(e instanceof Float32Array)n=new Float32Array(e);else{if(!(e instanceof WebGLTexture))throw Error(`Type is not supported: ${e}`);{const t=ea(this),e=ra(this);t.activeTexture(t.TEXTURE1),n=Po(t.createTexture(),"Failed to create texture"),t.bindTexture(t.TEXTURE_2D,n),sa(this);const r=na(this);t.texImage2D(t.TEXTURE_2D,0,r,this.width,this.height,0,t.RED,t.FLOAT,null),t.bindTexture(t.TEXTURE_2D,null),Bo(e,t,n),Uo(e,t,!1,(()=>{ia(this),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4),oa(this)})),No(e),oa(this)}}t.push(n)}return new ha(t,this.K(),this.canvas,this.l,this.width,this.height)}close(){this.m&&ea(this).deleteTexture(Zo(this,2)),ca=-1}};ha.prototype.close=ha.prototype.close,ha.prototype.clone=ha.prototype.clone,ha.prototype.getAsWebGLTexture=ha.prototype.V,ha.prototype.getAsFloat32Array=ha.prototype.pa,ha.prototype.getAsUint8Array=ha.prototype.sa,ha.prototype.hasWebGLTexture=ha.prototype.K,ha.prototype.hasFloat32Array=ha.prototype.ua,ha.prototype.hasUint8Array=ha.prototype.wa;var ca=250;function ua(...t){return t.map((([t,e])=>({start:t,end:e})))}const la=function(t){return class extends t{Aa(){this.i._registerModelResourcesGraphService()}}}((fa=class{constructor(t,e){this.l=!0,this.i=t,this.g=null,this.h=0,this.m="function"==typeof this.i._addIntToInputStream,void 0!==e?this.i.canvas=e:"undefined"==typeof OffscreenCanvas||lo()?(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas")):this.i.canvas=new OffscreenCanvas(1,1)}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,e){const n=t.length,r=this.i._malloc(n);this.i.HEAPU8.set(t,r),e?this.i._changeBinaryGraph(n,r):this.i._changeTextGraph(n,r),this.i._free(r)}configureAudio(t,e,n,r,s){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),po(this,r||"input_audio",(r=>{po(this,s=s||"audio_header",(s=>{this.i._configureAudio(r,s,t,e,n)}))}))}setAutoResizeCanvas(t){this.l=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}W(t){yo(this,"__graph_config__",(e=>{t(e)})),po(this,"__graph_config__",(t=>{this.i._getGraphConfig(t,void 0)})),delete this.i.simpleListeners.__graph_config__}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,r,s){const i=4*t.length;this.h!==i&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(i),this.h=i),this.i.HEAPF32.set(t,this.g/4),po(this,r,(t=>{this.i._addAudioToInputStream(this.g,e,n,t,s)}))}addGpuBufferToStream(t,e,n){po(this,e,(e=>{const[r,s]=go(this,t,e);this.i._addBoundTextureToStream(e,r,s,n)}))}addBoolToStream(t,e,n){po(this,e,(e=>{this.i._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){po(this,e,(e=>{this.i._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){po(this,e,(e=>{this.i._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){po(this,e,(e=>{this.i._addIntToInputStream(t,e,n)}))}addStringToStream(t,e,n){po(this,e,(e=>{po(this,t,(t=>{this.i._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){po(this,e,(e=>{mo(this,Object.keys(t),(r=>{mo(this,Object.values(t),(s=>{this.i._addFlatHashMapToInputStream(r,s,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){po(this,n,(n=>{po(this,e,(e=>{const s=this.i._malloc(t.length);this.i.HEAPU8.set(t,s),this.i._addProtoToInputStream(s,t.length,e,n,r),this.i._free(s)}))}))}addEmptyPacketToStream(t,e){po(this,t,(t=>{this.i._addEmptyPacketToInputStream(t,e)}))}addBoolToInputSidePacket(t,e){po(this,e,(e=>{this.i._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){po(this,e,(e=>{this.i._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){po(this,e,(e=>{this.i._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){po(this,e,(e=>{this.i._addIntToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){po(this,e,(e=>{po(this,t,(t=>{this.i._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){po(this,n,(n=>{po(this,e,(e=>{const r=this.i._malloc(t.length);this.i.HEAPU8.set(t,r),this.i._addProtoToInputSidePacket(r,t.length,e,n),this.i._free(r)}))}))}attachBoolListener(t,e){yo(this,t,e),po(this,t,(t=>{this.i._attachBoolListener(t)}))}attachBoolVectorListener(t,e){vo(this,t,e),po(this,t,(t=>{this.i._attachBoolVectorListener(t)}))}attachIntListener(t,e){yo(this,t,e),po(this,t,(t=>{this.i._attachIntListener(t)}))}attachIntVectorListener(t,e){vo(this,t,e),po(this,t,(t=>{this.i._attachIntVectorListener(t)}))}attachDoubleListener(t,e){yo(this,t,e),po(this,t,(t=>{this.i._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){vo(this,t,e),po(this,t,(t=>{this.i._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){yo(this,t,e),po(this,t,(t=>{this.i._attachFloatListener(t)}))}attachFloatVectorListener(t,e){vo(this,t,e),po(this,t,(t=>{this.i._attachFloatVectorListener(t)}))}attachStringListener(t,e){yo(this,t,e),po(this,t,(t=>{this.i._attachStringListener(t)}))}attachStringVectorListener(t,e){vo(this,t,e),po(this,t,(t=>{this.i._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){yo(this,t,e),po(this,t,(t=>{this.i._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){vo(this,t,e),po(this,t,(t=>{this.i._attachProtoVectorListener(t,n||!1)}))}attachAudioListener(t,e,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),yo(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),po(this,t,(t=>{this.i._attachAudioListener(t,n||!1)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends fa{get Y(){return this.i}ga(t,e,n){po(this,e,(e=>{const[r,s]=go(this,t,e);this.Y._addBoundTextureAsImageToStream(e,r,s,n)}))}S(t,e){yo(this,t,e),po(this,t,(t=>{this.Y._attachImageListener(t)}))}T(t,e){vo(this,t,e),po(this,t,(t=>{this.Y._attachImageVectorListener(t)}))}}));var fa,da=class extends la{};async function pa(t,e,n){return async function(t,e,n,r){return _o(t,e,n,r)}(t,n.canvas??("undefined"==typeof OffscreenCanvas||lo()?document.createElement("canvas"):void 0),e,n)}function ga(t,e,n,r){if(t.Z){const i=new Us;if(n?.regionOfInterest){if(!t.ea)throw Error("This task doesn't support region-of-interest.");var s=n.regionOfInterest;if(s.left>=s.right||s.top>=s.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(0>s.left||0>s.top||1<s.right||1<s.bottom)throw Error("Expected RectF values to be in [0,1].");mn(i,1,(s.left+s.right)/2),mn(i,2,(s.top+s.bottom)/2),mn(i,4,s.right-s.left),mn(i,3,s.bottom-s.top)}else mn(i,1,.5),mn(i,2,.5),mn(i,4,1),mn(i,3,1);if(n?.rotationDegrees){if(0!=n?.rotationDegrees%90)throw Error("Expected rotation to be a multiple of 90°.");if(mn(i,5,-Math.PI*n.rotationDegrees/180),0!=n?.rotationDegrees%180){const[t,r]=void 0!==e.videoWidth?[e.videoWidth,e.videoHeight]:void 0!==e.naturalWidth?[e.naturalWidth,e.naturalHeight]:[e.width,e.height];n=dn(i,3)*r/t,s=dn(i,4)*t/r,mn(i,4,n),mn(i,3,s)}}t.g.addProtoToStream(i.g(),"mediapipe.NormalizedRect",t.Z,r)}t.g.ga(e,t.da,r??performance.now()),t.finishProcessing()}function ma(t,e,n){if(t.baseOptions?.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");ga(t,e,n,t.I+1)}function ya(t,e,n,r){if(!t.baseOptions?.g())throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");ga(t,e,n,r)}function va(t,e,n){var r=e.data;const s=e.width,i=s*(e=e.height);if((r instanceof Uint8Array||r instanceof Float32Array)&&r.length!==i)throw Error("Unsupported channel count: "+r.length/i);return t=new ha([r],!1,t.g.i.canvas,t.O,s,e),n?t.clone():t}var _a=class extends xo{constructor(t,e,n,r){super(t),this.g=t,this.da=e,this.Z=n,this.ea=r,this.O=new Go}l(t,e=!0){if("runningMode"in t&&pn(this.baseOptions,2,!!t.runningMode&&"IMAGE"!==t.runningMode),void 0!==t.canvas&&this.g.i.canvas!==t.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(t,e)}close(){this.O.close(),super.close()}};_a.prototype.close=_a.prototype.close;var wa=class extends _a{constructor(t,e){super(new da(t,e),"image_in","norm_rect_in",!1),this.j={detections:[]},this.h=new ii,t=new ri,on(this.h,0,1,t),mn(this.h,2,.5),mn(this.h,3,.3)}get baseOptions(){return nn(this.h,ri,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return"minDetectionConfidence"in t&&mn(this.h,2,t.minDetectionConfidence??.5),"minSuppressionThreshold"in t&&mn(this.h,3,t.minSuppressionThreshold??.3),this.l(t)}G(t,e){return this.j={detections:[]},ma(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},ya(this,t,n,e),this.j}m(){var t=new as;is(t,"image_in"),is(t,"norm_rect_in"),os(t,"detections");const e=new jr;vn(e,ai,this.h);const n=new Zr;qr(n,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),Kr(n,"IMAGE:image_in"),Kr(n,"NORM_RECT:norm_rect_in"),Jr(n,"DETECTIONS:detections"),n.o(e),ss(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=xs(e),this.j.detections.push(eo(t));bo(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{bo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};wa.prototype.detectForVideo=wa.prototype.F,wa.prototype.setOptions=wa.prototype.o,wa.createFromModelPath=async function(t,e){return pa(wa,t,{baseOptions:{modelAssetPath:e}})},wa.createFromModelBuffer=function(t,e){return pa(wa,t,{baseOptions:{modelAssetBuffer:e}})},wa.createFromOptions=function(t,e){return pa(wa,t,e)};var Aa=ua([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]),ba=ua([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]),Ea=ua([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),Ta=ua([474,475],[475,476],[476,477],[477,474]),ka=ua([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]),xa=ua([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),La=ua([469,470],[470,471],[471,472],[472,469]),Sa=ua([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]),Fa=[...Aa,...ba,...Ea,...ka,...xa,...Sa],Oa=ua([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 Ma(t){t.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var Pa=class extends _a{constructor(t,e){super(new da(t,e),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,this.h=new pi,t=new ri,on(this.h,0,1,t),this.v=new fi,on(this.h,0,3,this.v),this.s=new ii,on(this.h,0,2,this.s),gn(this.s,4,1),mn(this.s,2,.5),mn(this.v,2,.5),mn(this.h,4,.5)}get baseOptions(){return nn(this.h,ri,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return"numFaces"in t&&gn(this.s,4,t.numFaces??1),"minFaceDetectionConfidence"in t&&mn(this.s,2,t.minFaceDetectionConfidence??.5),"minTrackingConfidence"in t&&mn(this.h,4,t.minTrackingConfidence??.5),"minFacePresenceConfidence"in t&&mn(this.v,2,t.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in t&&(this.outputFaceBlendshapes=!!t.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in t&&(this.outputFacialTransformationMatrixes=!!t.outputFacialTransformationMatrixes),this.l(t)}G(t,e){return Ma(this),ma(this,t,e),this.j}F(t,e,n){return Ma(this),ya(this,t,n,e),this.j}m(){var t=new as;is(t,"image_in"),is(t,"norm_rect"),os(t,"face_landmarks");const e=new jr;vn(e,mi,this.h);const n=new Zr;qr(n,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),Kr(n,"IMAGE:image_in"),Kr(n,"NORM_RECT:norm_rect"),Jr(n,"NORM_LANDMARKS:face_landmarks"),n.o(e),ss(t,n),this.g.attachProtoVectorListener("face_landmarks",((t,e)=>{for(const e of t)t=Cs(e),this.j.faceLandmarks.push(no(t));bo(this,e)})),this.g.attachEmptyPacketListener("face_landmarks",(t=>{bo(this,t)})),this.outputFaceBlendshapes&&(os(t,"blendshapes"),Jr(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",((t,e)=>{if(this.outputFaceBlendshapes)for(const e of t)t=gs(e),this.j.faceBlendshapes.push(to(t.g()??[]));bo(this,e)})),this.g.attachEmptyPacketListener("blendshapes",(t=>{bo(this,t)}))),this.outputFacialTransformationMatrixes&&(os(t,"face_geometry"),Jr(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",((t,e)=>{if(this.outputFacialTransformationMatrixes)for(const e of t)(t=nn(ui(e),Is,2))&&this.j.facialTransformationMatrixes.push({rows:fn(cn(t,1))??0,columns:fn(cn(t,2))??0,data:$e(t,3,he)??[]});bo(this,e)})),this.g.attachEmptyPacketListener("face_geometry",(t=>{bo(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Pa.prototype.detectForVideo=Pa.prototype.F,Pa.prototype.detect=Pa.prototype.G,Pa.prototype.setOptions=Pa.prototype.o,Pa.createFromModelPath=function(t,e){return pa(Pa,t,{baseOptions:{modelAssetPath:e}})},Pa.createFromModelBuffer=function(t,e){return pa(Pa,t,{baseOptions:{modelAssetBuffer:e}})},Pa.createFromOptions=function(t,e){return pa(Pa,t,e)},Pa.FACE_LANDMARKS_LIPS=Aa,Pa.FACE_LANDMARKS_LEFT_EYE=ba,Pa.FACE_LANDMARKS_LEFT_EYEBROW=Ea,Pa.FACE_LANDMARKS_LEFT_IRIS=Ta,Pa.FACE_LANDMARKS_RIGHT_EYE=ka,Pa.FACE_LANDMARKS_RIGHT_EYEBROW=xa,Pa.FACE_LANDMARKS_RIGHT_IRIS=La,Pa.FACE_LANDMARKS_FACE_OVAL=Sa,Pa.FACE_LANDMARKS_CONTOURS=Fa,Pa.FACE_LANDMARKS_TESSELATION=Oa;var Ra=class extends _a{constructor(t,e){super(new da(t,e),"image_in","norm_rect",!0),this.j=new yi,t=new ri,on(this.j,0,1,t)}get baseOptions(){return nn(this.j,ri,1)}set baseOptions(t){on(this.j,0,1,t)}o(t){return super.l(t)}Da(t,e,n){const r="function"!=typeof e?e:{};if(this.h="function"==typeof e?e:n,ma(this,t,r??{}),!this.h)return this.s}m(){var t=new as;is(t,"image_in"),is(t,"norm_rect"),os(t,"stylized_image");const e=new jr;vn(e,vi,this.j);const n=new Zr;qr(n,"mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"),Kr(n,"IMAGE:image_in"),Kr(n,"NORM_RECT:norm_rect"),Jr(n,"STYLIZED_IMAGE:stylized_image"),n.o(e),ss(t,n),this.g.S("stylized_image",((t,e)=>{var n=!this.h,r=t.data,s=t.width;const i=s*(t=t.height);if(r instanceof Uint8Array)if(r.length===3*i){const e=new Uint8ClampedArray(4*i);for(let t=0;t<i;++t)e[4*t]=r[3*t],e[4*t+1]=r[3*t+1],e[4*t+2]=r[3*t+2],e[4*t+3]=255;r=new ImageData(e,s,t)}else{if(r.length!==4*i)throw Error("Unsupported channel count: "+r.length/i);r=new ImageData(new Uint8ClampedArray(r.buffer,r.byteOffset,r.length),s,t)}else if(!(r instanceof WebGLTexture))throw Error(`Unsupported format: ${r.constructor.name}`);s=new Ko([r],!1,!1,this.g.i.canvas,this.O,s,t),this.s=n=n?s.clone():s,this.h&&this.h(n),bo(this,e)})),this.g.attachEmptyPacketListener("stylized_image",(t=>{this.s=null,this.h&&this.h(null),bo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ra.prototype.stylize=Ra.prototype.Da,Ra.prototype.setOptions=Ra.prototype.o,Ra.createFromModelPath=function(t,e){return pa(Ra,t,{baseOptions:{modelAssetPath:e}})},Ra.createFromModelBuffer=function(t,e){return pa(Ra,t,{baseOptions:{modelAssetBuffer:e}})},Ra.createFromOptions=function(t,e){return pa(Ra,t,e)};var Ca=ua([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 Ia(t){t.gestures=[],t.landmarks=[],t.worldLandmarks=[],t.handedness=[]}function Da(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 Ua(t,e=!0){const n=[];for(const s of t){var r=gs(s);t=[];for(const n of r.g())r=e&&null!=cn(n,1)?fn(cn(n,1)):-1,t.push({score:dn(n,2)??0,index:r,categoryName:ln(n,3)??""??"",displayName:ln(n,4)??""??""});n.push(t)}return n}var Ba=class extends _a{constructor(t,e){super(new da(t,e),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],this.v=new Oi,t=new ri,on(this.v,0,1,t),this.C=new Si,on(this.v,0,2,this.C),this.s=new xi,on(this.C,0,3,this.s),this.h=new Ti,on(this.C,0,2,this.h),this.j=new bi,on(this.v,0,3,this.j),mn(this.h,2,.5),mn(this.C,4,.5),mn(this.s,2,.5)}get baseOptions(){return nn(this.v,ri,1)}set baseOptions(t){on(this.v,0,1,t)}o(t){if(gn(this.h,3,t.numHands??1),"minHandDetectionConfidence"in t&&mn(this.h,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&mn(this.C,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&mn(this.s,2,t.minHandPresenceConfidence??.5),t.cannedGesturesClassifierOptions){var e=new _i,n=Qi(t.cannedGesturesClassifierOptions,nn(this.j,_i,3)?.h());on(e,0,2,n),on(this.j,0,3,e)}else void 0===t.cannedGesturesClassifierOptions&&nn(this.j,_i,3)?.g();return t.customGesturesClassifierOptions?(on(e=new _i,0,2,n=Qi(t.customGesturesClassifierOptions,nn(this.j,_i,4)?.h())),on(this.j,0,4,e)):void 0===t.customGesturesClassifierOptions&&nn(this.j,_i,4)?.g(),this.l(t)}ya(t,e){return Ia(this),ma(this,t,e),Da(this)}za(t,e,n){return Ia(this),ya(this,t,n,e),Da(this)}m(){var t=new as;is(t,"image_in"),is(t,"norm_rect"),os(t,"hand_gestures"),os(t,"hand_landmarks"),os(t,"world_hand_landmarks"),os(t,"handedness");const e=new jr;vn(e,Ri,this.v);const n=new Zr;qr(n,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),Kr(n,"IMAGE:image_in"),Kr(n,"NORM_RECT:norm_rect"),Jr(n,"HAND_GESTURES:hand_gestures"),Jr(n,"LANDMARKS:hand_landmarks"),Jr(n,"WORLD_LANDMARKS:world_hand_landmarks"),Jr(n,"HANDEDNESS:handedness"),n.o(e),ss(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t){t=Cs(e);const n=[];for(const e of sn(t,Ms,1))n.push({x:dn(e,1)??0,y:dn(e,2)??0,z:dn(e,3)??0});this.landmarks.push(n)}bo(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{bo(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t){t=Os(e);const n=[];for(const e of sn(t,Ls,1))n.push({x:dn(e,1)??0,y:dn(e,2)??0,z:dn(e,3)??0});this.worldLandmarks.push(n)}bo(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{bo(this,t)})),this.g.attachProtoVectorListener("hand_gestures",((t,e)=>{this.gestures.push(...Ua(t,!1)),bo(this,e)})),this.g.attachEmptyPacketListener("hand_gestures",(t=>{bo(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{this.handedness.push(...Ua(t)),bo(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{bo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};function Na(t){return{landmarks:t.landmarks,worldLandmarks:t.worldLandmarks,handednesses:t.handedness,handedness:t.handedness}}Ba.prototype.recognizeForVideo=Ba.prototype.za,Ba.prototype.recognize=Ba.prototype.ya,Ba.prototype.setOptions=Ba.prototype.o,Ba.createFromModelPath=function(t,e){return pa(Ba,t,{baseOptions:{modelAssetPath:e}})},Ba.createFromModelBuffer=function(t,e){return pa(Ba,t,{baseOptions:{modelAssetBuffer:e}})},Ba.createFromOptions=function(t,e){return pa(Ba,t,e)},Ba.HAND_CONNECTIONS=Ca;var Ga=class extends _a{constructor(t,e){super(new da(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],this.j=new Si,t=new ri,on(this.j,0,1,t),this.s=new xi,on(this.j,0,3,this.s),this.h=new Ti,on(this.j,0,2,this.h),gn(this.h,3,1),mn(this.h,2,.5),mn(this.s,2,.5),mn(this.j,4,.5)}get baseOptions(){return nn(this.j,ri,1)}set baseOptions(t){on(this.j,0,1,t)}o(t){return"numHands"in t&&gn(this.h,3,t.numHands??1),"minHandDetectionConfidence"in t&&mn(this.h,2,t.minHandDetectionConfidence??.5),"minTrackingConfidence"in t&&mn(this.j,4,t.minTrackingConfidence??.5),"minHandPresenceConfidence"in t&&mn(this.s,2,t.minHandPresenceConfidence??.5),this.l(t)}G(t,e){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],ma(this,t,e),Na(this)}F(t,e,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],ya(this,t,n,e),Na(this)}m(){var t=new as;is(t,"image_in"),is(t,"norm_rect"),os(t,"hand_landmarks"),os(t,"world_hand_landmarks"),os(t,"handedness");const e=new jr;vn(e,Pi,this.j);const n=new Zr;qr(n,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),Kr(n,"IMAGE:image_in"),Kr(n,"NORM_RECT:norm_rect"),Jr(n,"LANDMARKS:hand_landmarks"),Jr(n,"WORLD_LANDMARKS:world_hand_landmarks"),Jr(n,"HANDEDNESS:handedness"),n.o(e),ss(t,n),this.g.attachProtoVectorListener("hand_landmarks",((t,e)=>{for(const e of t)t=Cs(e),this.landmarks.push(no(t));bo(this,e)})),this.g.attachEmptyPacketListener("hand_landmarks",(t=>{bo(this,t)})),this.g.attachProtoVectorListener("world_hand_landmarks",((t,e)=>{for(const e of t)t=Os(e),this.worldLandmarks.push(ro(t));bo(this,e)})),this.g.attachEmptyPacketListener("world_hand_landmarks",(t=>{bo(this,t)})),this.g.attachProtoVectorListener("handedness",((t,e)=>{var n=this.handedness,r=n.push;const s=[];for(const e of t){t=gs(e);const n=[];for(const e of t.g())n.push({score:dn(e,2)??0,index:fn(cn(e,1))??-1,categoryName:ln(e,3)??""??"",displayName:ln(e,4)??""??""});s.push(n)}r.call(n,...s),bo(this,e)})),this.g.attachEmptyPacketListener("handedness",(t=>{bo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ga.prototype.detectForVideo=Ga.prototype.F,Ga.prototype.detect=Ga.prototype.G,Ga.prototype.setOptions=Ga.prototype.o,Ga.createFromModelPath=function(t,e){return pa(Ga,t,{baseOptions:{modelAssetPath:e}})},Ga.createFromModelBuffer=function(t,e){return pa(Ga,t,{baseOptions:{modelAssetBuffer:e}})},Ga.createFromOptions=function(t,e){return pa(Ga,t,e)},Ga.HAND_CONNECTIONS=Ca;var ja=class extends _a{constructor(t,e){super(new da(t,e),"input_image","norm_rect",!0),this.j={classifications:[]},this.h=new Ci,t=new ri,on(this.h,0,1,t)}get baseOptions(){return nn(this.h,ri,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){var e=Qi(t,nn(this.h,qs,2));return on(this.h,0,2,e),this.l(t)}ia(t,e){return this.j={classifications:[]},ma(this,t,e),this.j}ja(t,e,n){return this.j={classifications:[]},ya(this,t,n,e),this.j}m(){var t=new as;is(t,"input_image"),is(t,"norm_rect"),os(t,"classifications");const e=new jr;vn(e,Ii,this.h);const n=new Zr;qr(n,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),Kr(n,"IMAGE:input_image"),Kr(n,"NORM_RECT:norm_rect"),Jr(n,"CLASSIFICATIONS:classifications"),n.o(e),ss(t,n),this.g.attachProtoListener("classifications",((t,e)=>{this.j=function(t){const e={classifications:sn(t,Bs,1).map((t=>to(nn(t,ds,4)?.g()??[],fn(cn(t,2)),ln(t,3)??"")))};return null!=un(t)&&(e.timestampMs=fn(un(t))),e}(js(t)),bo(this,e)})),this.g.attachEmptyPacketListener("classifications",(t=>{bo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ja.prototype.classifyForVideo=ja.prototype.ja,ja.prototype.classify=ja.prototype.ia,ja.prototype.setOptions=ja.prototype.o,ja.createFromModelPath=function(t,e){return pa(ja,t,{baseOptions:{modelAssetPath:e}})},ja.createFromModelBuffer=function(t,e){return pa(ja,t,{baseOptions:{modelAssetBuffer:e}})},ja.createFromOptions=function(t,e){return pa(ja,t,e)};var Va=class extends _a{constructor(t,e){super(new da(t,e),"image_in","norm_rect",!0),this.h=new Di,this.embeddings={embeddings:[]},t=new ri,on(this.h,0,1,t)}get baseOptions(){return nn(this.h,ri,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){var e=this.h,n=nn(this.h,Js,2);return n=n?n.clone():new Js,void 0!==t.l2Normalize?pn(n,1,t.l2Normalize):"l2Normalize"in t&&Ve(n,1),void 0!==t.quantize?pn(n,2,t.quantize):"quantize"in t&&Ve(n,2),on(e,0,2,n),this.l(t)}na(t,e){return ma(this,t,e),this.embeddings}oa(t,e,n){return ya(this,t,n,e),this.embeddings}m(){var t=new as;is(t,"image_in"),is(t,"norm_rect"),os(t,"embeddings_out");const e=new jr;vn(e,Ui,this.h);const n=new Zr;qr(n,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),Kr(n,"IMAGE:image_in"),Kr(n,"NORM_RECT:norm_rect"),Jr(n,"EMBEDDINGS:embeddings_out"),n.o(e),ss(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=Ys(t),this.embeddings=function(t){return{embeddings:sn(t,Ws,1).map((t=>{const e={headIndex:fn(cn(t,3))??-1,headName:ln(t,4)??""??""};if(void 0!==en(t,Vs,Ze(t,1)))t=$e(t=nn(t,Vs,Ze(t,1)),1,he),e.floatEmbedding=t;else{const n=new Uint8Array(0);e.quantizedEmbedding=nn(t,zs,Ze(t,2))?.fa()?.ha()??n}return e})),timestampMs:fn(un(t))}}(t),bo(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{bo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Va.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=io(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=io(so(t.quantizedEmbedding),so(e.quantizedEmbedding))}return t},Va.prototype.embedForVideo=Va.prototype.oa,Va.prototype.embed=Va.prototype.na,Va.prototype.setOptions=Va.prototype.o,Va.createFromModelPath=function(t,e){return pa(Va,t,{baseOptions:{modelAssetPath:e}})},Va.createFromModelBuffer=function(t,e){return pa(Va,t,{baseOptions:{modelAssetBuffer:e}})},Va.createFromOptions=function(t,e){return pa(Va,t,e)};var za=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};function Wa(t){t.categoryMask=void 0,t.confidenceMasks=void 0,t.qualityScores=void 0}function Xa(t){try{const e=new za(t.confidenceMasks,t.categoryMask,t.qualityScores);if(!t.j)return e;t.j(e)}finally{ko(t)}}za.prototype.close=za.prototype.close;var Ha=class extends _a{constructor(t,e){super(new da(t,e),"image_in","norm_rect",!1),this.s=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Vi,this.v=new Bi,on(this.h,0,3,this.v),t=new ri,on(this.h,0,1,t)}get baseOptions(){return nn(this.h,ri,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?Ve(this.h,2,pe(t.displayNamesLocale)):"displayNamesLocale"in t&&Ve(this.h,2),"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}P(){!function(t){const e=sn(t.W(),Zr,1).filter((t=>(ln(t,1)??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator")));if(t.s=[],1<e.length)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");1===e.length&&(nn(e[0],jr,7)?.l()?.g()??new Map).forEach(((e,n)=>{t.s[Number(n)]=ln(e,1)??""}))}(this)}X(t,e,n){const r="function"!=typeof e?e:{};return this.j="function"==typeof e?e:n,Wa(this),ma(this,t,r),Xa(this)}Ca(t,e,n,r){const s="function"!=typeof n?n:{};return this.j="function"==typeof n?n:r,Wa(this),ya(this,t,s,e),Xa(this)}ta(){return this.s}m(){var t=new as;is(t,"image_in"),is(t,"norm_rect");const e=new jr;vn(e,zi,this.h);const n=new Zr;qr(n,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),Kr(n,"IMAGE:image_in"),Kr(n,"NORM_RECT:norm_rect"),n.o(e),ss(t,n),Eo(this,t),this.outputConfidenceMasks&&(os(t,"confidence_masks"),Jr(n,"CONFIDENCE_MASKS:confidence_masks"),To(this,"confidence_masks"),this.g.T("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>va(this,t,!this.j))),bo(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],bo(this,t)}))),this.outputCategoryMask&&(os(t,"category_mask"),Jr(n,"CATEGORY_MASK:category_mask"),To(this,"category_mask"),this.g.S("category_mask",((t,e)=>{this.categoryMask=va(this,t,!this.j),bo(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,bo(this,t)}))),os(t,"quality_scores"),Jr(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,bo(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,bo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Ha.prototype.getLabels=Ha.prototype.ta,Ha.prototype.segmentForVideo=Ha.prototype.Ca,Ha.prototype.segment=Ha.prototype.X,Ha.prototype.setOptions=Ha.prototype.o,Ha.createFromModelPath=function(t,e){return pa(Ha,t,{baseOptions:{modelAssetPath:e}})},Ha.createFromModelBuffer=function(t,e){return pa(Ha,t,{baseOptions:{modelAssetBuffer:e}})},Ha.createFromOptions=function(t,e){return pa(Ha,t,e)};var $a=class{constructor(t,e,n){this.confidenceMasks=t,this.categoryMask=e,this.qualityScores=n}close(){this.confidenceMasks?.forEach((t=>{t.close()})),this.categoryMask?.close()}};$a.prototype.close=$a.prototype.close;var Ya=class extends _n{constructor(t){super(t)}},qa=[0,hr,hr,hr],Ka=[0,er,er,er,er,lr],Ja=[0,er,er,er,er,lr,er,er],Za=[0,yr,Ja],Qa=[0,yr,Za,yr,qa],th=[0,yr,Ja,yr,qa],eh=[0,yr,Ja,hr,hr],nh=[0,yr,eh,yr,qa],rh=[0,er,er,er,er,lr,yr,qa,yr,qa],sh=[0,er,er,er,er,lr,br],ih=class extends _n{constructor(t){super(t)}},oh=[0,er,er,lr],ah=class extends _n{constructor(){super()}};ah.B=[1];var hh=class extends _n{constructor(t){super(t)}},ch=[1,2,3,4,5,6,7,8,9,10,14,15],uh=[0,_r,Ja,ch,_r,th,ch,_r,Za,ch,_r,Qa,ch,_r,oh,ch,_r,sh,ch,_r,Ka,ch,_r,[0,gr,er,er,er,lr,hr,lr,lr,er,3,yr,qa],ch,_r,eh,ch,_r,nh,ch,er,yr,qa,gr,_r,rh,ch,_r,[0,vr,oh],ch],lh=[0,gr,hr,hr,lr],fh=class extends _n{constructor(){super()}};fh.B=[1],fh.prototype.g=Lr([0,vr,uh,gr,yr,lh]);var dh=class extends _a{constructor(t,e){super(new da(t,e),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Vi,this.v=new Bi,on(this.h,0,3,this.v),t=new ri,on(this.h,0,1,t)}get baseOptions(){return nn(this.h,ri,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return"outputCategoryMask"in t&&(this.outputCategoryMask=t.outputCategoryMask??!1),"outputConfidenceMasks"in t&&(this.outputConfidenceMasks=t.outputConfidenceMasks??!0),super.l(t)}X(t,e,n,r){const s="function"!=typeof n?n:{};this.j="function"==typeof n?n:r,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.I+1,r=new fh;const i=new hh;var o=new Ya;if(gn(o,1,255),on(i,0,12,o),e.keypoint&&e.scribble)throw Error("Cannot provide both keypoint and scribble.");if(e.keypoint){var a=new ih;pn(a,3,!0),mn(a,1,e.keypoint.x),mn(a,2,e.keypoint.y),an(i,5,ch,a)}else{if(!e.scribble)throw Error("Must provide either a keypoint or a scribble.");for(a of(o=new ah,e.scribble))pn(e=new ih,3,!0),mn(e,1,a.x),mn(e,2,a.y),hn(o,ih,e);an(i,15,ch,o)}hn(r,hh,i),this.g.addProtoToStream(r.g(),"drishti.RenderData","roi_in",n),ma(this,t,s);t:{try{const t=new $a(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var h=t;break t}this.j(t)}finally{ko(this)}h=void 0}return h}m(){var t=new as;is(t,"image_in"),is(t,"roi_in"),is(t,"norm_rect_in");const e=new jr;vn(e,zi,this.h);const n=new Zr;qr(n,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"),Kr(n,"IMAGE:image_in"),Kr(n,"ROI:roi_in"),Kr(n,"NORM_RECT:norm_rect_in"),n.o(e),ss(t,n),Eo(this,t),this.outputConfidenceMasks&&(os(t,"confidence_masks"),Jr(n,"CONFIDENCE_MASKS:confidence_masks"),To(this,"confidence_masks"),this.g.T("confidence_masks",((t,e)=>{this.confidenceMasks=t.map((t=>va(this,t,!this.j))),bo(this,e)})),this.g.attachEmptyPacketListener("confidence_masks",(t=>{this.confidenceMasks=[],bo(this,t)}))),this.outputCategoryMask&&(os(t,"category_mask"),Jr(n,"CATEGORY_MASK:category_mask"),To(this,"category_mask"),this.g.S("category_mask",((t,e)=>{this.categoryMask=va(this,t,!this.j),bo(this,e)})),this.g.attachEmptyPacketListener("category_mask",(t=>{this.categoryMask=void 0,bo(this,t)}))),os(t,"quality_scores"),Jr(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",((t,e)=>{this.qualityScores=t,bo(this,e)})),this.g.attachEmptyPacketListener("quality_scores",(t=>{this.categoryMask=void 0,bo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};dh.prototype.segment=dh.prototype.X,dh.prototype.setOptions=dh.prototype.o,dh.createFromModelPath=function(t,e){return pa(dh,t,{baseOptions:{modelAssetPath:e}})},dh.createFromModelBuffer=function(t,e){return pa(dh,t,{baseOptions:{modelAssetBuffer:e}})},dh.createFromOptions=function(t,e){return pa(dh,t,e)};var ph=class extends _a{constructor(t,e){super(new da(t,e),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},this.h=new Wi,t=new ri,on(this.h,0,1,t)}get baseOptions(){return nn(this.h,ri,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return void 0!==t.displayNamesLocale?Ve(this.h,2,pe(t.displayNamesLocale)):"displayNamesLocale"in t&&Ve(this.h,2),void 0!==t.maxResults?gn(this.h,3,t.maxResults):"maxResults"in t&&Ve(this.h,3),void 0!==t.scoreThreshold?mn(this.h,4,t.scoreThreshold):"scoreThreshold"in t&&Ve(this.h,4),void 0!==t.categoryAllowlist?Je(this.h,5,t.categoryAllowlist):"categoryAllowlist"in t&&Ve(this.h,5),void 0!==t.categoryDenylist?Je(this.h,6,t.categoryDenylist):"categoryDenylist"in t&&Ve(this.h,6),this.l(t)}G(t,e){return this.j={detections:[]},ma(this,t,e),this.j}F(t,e,n){return this.j={detections:[]},ya(this,t,n,e),this.j}m(){var t=new as;is(t,"input_frame_gpu"),is(t,"norm_rect"),os(t,"detections");const e=new jr;vn(e,Xi,this.h);const n=new Zr;qr(n,"mediapipe.tasks.vision.ObjectDetectorGraph"),Kr(n,"IMAGE:input_frame_gpu"),Kr(n,"NORM_RECT:norm_rect"),Jr(n,"DETECTIONS:detections"),n.o(e),ss(t,n),this.g.attachProtoVectorListener("detections",((t,e)=>{for(const e of t)t=xs(e),this.j.detections.push(eo(t));bo(this,e)})),this.g.attachEmptyPacketListener("detections",(t=>{bo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};ph.prototype.detectForVideo=ph.prototype.F,ph.prototype.detect=ph.prototype.G,ph.prototype.setOptions=ph.prototype.o,ph.createFromModelPath=async function(t,e){return pa(ph,t,{baseOptions:{modelAssetPath:e}})},ph.createFromModelBuffer=function(t,e){return pa(ph,t,{baseOptions:{modelAssetBuffer:e}})},ph.createFromOptions=function(t,e){return pa(ph,t,e)};function gh(t){t.landmarks=[],t.worldLandmarks=[],t.v=void 0}function mh(t){try{const e=new class{constructor(t,e,n){this.landmarks=t,this.worldLandmarks=e,this.g=n}close(){this.g?.forEach((t=>{t.close()}))}}(t.landmarks,t.worldLandmarks,t.v);if(!t.s)return e;t.s(e)}finally{ko(t)}}var yh=class extends _a{constructor(t,e){super(new da(t,e),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,this.h=new Ki,t=new ri,on(this.h,0,1,t),this.C=new Yi,on(this.h,0,3,this.C),this.j=new Hi,on(this.h,0,2,this.j),gn(this.j,4,1),mn(this.j,2,.5),mn(this.C,2,.5),mn(this.h,4,.5)}get baseOptions(){return nn(this.h,ri,1)}set baseOptions(t){on(this.h,0,1,t)}o(t){return"numPoses"in t&&gn(this.j,4,t.numPoses??1),"minPoseDetectionConfidence"in t&&mn(this.j,2,t.minPoseDetectionConfidence??.5),"minTrackingConfidence"in t&&mn(this.h,4,t.minTrackingConfidence??.5),"minPosePresenceConfidence"in t&&mn(this.C,2,t.minPosePresenceConfidence??.5),"outputSegmentationMasks"in t&&(this.outputSegmentationMasks=t.outputSegmentationMasks??!1),this.l(t)}G(t,e,n){const r="function"!=typeof e?e:{};return this.s="function"==typeof e?e:n,gh(this),ma(this,t,r),mh(this)}F(t,e,n,r){const s="function"!=typeof n?n:{};return this.s="function"==typeof n?n:r,gh(this),ya(this,t,s,e),mh(this)}m(){var t=new as;is(t,"image_in"),is(t,"norm_rect"),os(t,"normalized_landmarks"),os(t,"world_landmarks"),os(t,"segmentation_masks");const e=new jr;vn(e,Zi,this.h);const n=new Zr;qr(n,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),Kr(n,"IMAGE:image_in"),Kr(n,"NORM_RECT:norm_rect"),Jr(n,"NORM_LANDMARKS:normalized_landmarks"),Jr(n,"WORLD_LANDMARKS:world_landmarks"),n.o(e),ss(t,n),Eo(this,t),this.g.attachProtoVectorListener("normalized_landmarks",((t,e)=>{this.landmarks=[];for(const e of t)t=Cs(e),this.landmarks.push(no(t));bo(this,e)})),this.g.attachEmptyPacketListener("normalized_landmarks",(t=>{this.landmarks=[],bo(this,t)})),this.g.attachProtoVectorListener("world_landmarks",((t,e)=>{this.worldLandmarks=[];for(const e of t)t=Os(e),this.worldLandmarks.push(ro(t));bo(this,e)})),this.g.attachEmptyPacketListener("world_landmarks",(t=>{this.worldLandmarks=[],bo(this,t)})),this.outputSegmentationMasks&&(Jr(n,"SEGMENTATION_MASK:segmentation_masks"),To(this,"segmentation_masks"),this.g.T("segmentation_masks",((t,e)=>{this.v=t.map((t=>va(this,t,!this.s))),bo(this,e)})),this.g.attachEmptyPacketListener("segmentation_masks",(t=>{this.v=[],bo(this,t)}))),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};yh.prototype.detectForVideo=yh.prototype.F,yh.prototype.detect=yh.prototype.G,yh.prototype.setOptions=yh.prototype.o,yh.createFromModelPath=function(t,e){return pa(yh,t,{baseOptions:{modelAssetPath:e}})},yh.createFromModelBuffer=function(t,e){return pa(yh,t,{baseOptions:{modelAssetBuffer:e}})},yh.createFromOptions=function(t,e){return pa(yh,t,e)},yh.POSE_CONNECTIONS=ua([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]);export{Mo as DrawingUtils,wa as FaceDetector,Pa as FaceLandmarker,Ra as FaceStylizer,uo as FilesetResolver,Ba as GestureRecognizer,Ga as HandLandmarker,ja as ImageClassifier,Va as ImageEmbedder,Ha as ImageSegmenter,za as ImageSegmenterResult,dh as InteractiveSegmenter,$a as InteractiveSegmenterResult,Ko as MPImage,ha as MPMask,ph as ObjectDetector,yh as PoseLandmarker,xo as TaskRunner,_a as VisionTaskRunner};
2
2
  //# sourceMappingURL=vision_bundle_mjs.js.map