You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
43 KiB
JavaScript
1 line
43 KiB
JavaScript
(globalThis.webpackChunkweb_stories_wp=globalThis.webpackChunkweb_stories_wp||[]).push([[4005],{513:function(t,e,r){(function(){"use strict";var t;function e(t){var e=0;return function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}var n="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,r){return t==Array.prototype||t==Object.prototype||(t[e]=r.value),t};var i=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof r.g&&r.g];for(var e=0;e<t.length;++e){var n=t[e];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}(this);function o(t,e){if(e)t:{var r=i;t=t.split(".");for(var o=0;o<t.length-1;o++){var a=t[o];if(!(a in r))break t;r=r[a]}(e=e(o=r[t=t[t.length-1]]))!=o&&null!=e&&n(r,t,{configurable:!0,writable:!0,value:e})}}function a(t){return(t={next:t})[Symbol.iterator]=function(){return this},t}function u(t){var r="undefined"!=typeof Symbol&&Symbol.iterator&&t[Symbol.iterator];return r?r.call(t):{next:e(t)}}function s(t){if(!(t instanceof Array)){t=u(t);for(var e,r=[];!(e=t.next()).done;)r.push(e.value);t=r}return t}o("Symbol",(function(t){function e(t,e){this.h=t,n(this,"description",{configurable:!0,writable:!0,value:e})}if(t)return t;e.prototype.toString=function(){return this.h};var r="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",i=0;return function t(n){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return new e(r+(n||"")+"_"+i++,n)}})),o("Symbol.iterator",(function(t){if(t)return t;t=Symbol("Symbol.iterator");for(var r="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),o=0;o<r.length;o++){var u=i[r[o]];"function"==typeof u&&"function"!=typeof u.prototype[t]&&n(u.prototype,t,{configurable:!0,writable:!0,value:function(){return a(e(this))}})}return t}));var c="function"==typeof Object.assign?Object.assign:function(t,e){for(var r=1;r<arguments.length;r++){var n=arguments[r];if(n)for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};o("Object.assign",(function(t){return t||c}));var f,l="function"==typeof Object.create?Object.create:function(t){function e(){}return e.prototype=t,new e};if("function"==typeof Object.setPrototypeOf)f=Object.setPrototypeOf;else{var h;t:{var p={};try{p.__proto__={a:!0},h=p.a;break t}catch(t){}h=!1}f=h?function(t,e){if(t.__proto__=e,t.__proto__!==e)throw new TypeError(t+" is not extensible");return t}:null}var v=f;function d(t,e){if(t.prototype=l(e.prototype),t.prototype.constructor=t,v)v(t,e);else for(var r in e)if("prototype"!=r)if(Object.defineProperties){var n=Object.getOwnPropertyDescriptor(e,r);n&&Object.defineProperty(t,r,n)}else t[r]=e[r];t.za=e.prototype}function y(){this.m=!1,this.j=null,this.i=void 0,this.h=1,this.v=this.s=0,this.l=null}function b(t){if(t.m)throw new TypeError("Generator is already running");t.m=!0}function g(t,e){t.l={ma:e,na:!0},t.h=t.s||t.v}function m(t,e,r){return t.h=r,{value:e}}function w(t){this.h=new y,this.i=t}function A(t,e,r,n){try{var i=e.call(t.h.j,r);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return t.h.m=!1,i;var o=i.value}catch(e){return t.h.j=null,g(t.h,e),j(t)}return t.h.j=null,n.call(t.h,o),j(t)}function j(t){for(;t.h.h;)try{var e=t.i(t.h);if(e)return t.h.m=!1,{value:e.value,done:!1}}catch(e){t.h.i=void 0,g(t.h,e)}if(t.h.m=!1,t.h.l){if(e=t.h.l,t.h.l=null,e.na)throw e.ma;return{value:e.return,done:!0}}return{value:void 0,done:!0}}function x(t){this.next=function(e){return b(t.h),t.h.j?e=A(t,t.h.j.next,e,t.h.u):(t.h.u(e),e=j(t)),e},this.throw=function(e){return b(t.h),t.h.j?e=A(t,t.h.j.throw,e,t.h.u):(g(t.h,e),e=j(t)),e},this.return=function(e){return function(t,e){b(t.h);var r=t.h.j;return r?A(t,"return"in r?r.return:function(t){return{value:t,done:!0}},e,t.h.return):(t.h.return(e),j(t))}(t,e)},this[Symbol.iterator]=function(){return this}}function E(t){return function(t){function e(e){return t.next(e)}function r(e){return t.throw(e)}return new Promise((function(n,i){!function t(o){o.done?n(o.value):Promise.resolve(o.value).then(e,r).then(t,i)}(t.next())}))}(new x(new w(t)))}function F(t){return t||Array.prototype.fill}y.prototype.u=function(t){this.i=t},y.prototype.return=function(t){this.l={return:t},this.h=this.v},o("Promise",(function(t){function e(t){this.i=0,this.j=void 0,this.h=[],this.u=!1;var e=this.l();try{t(e.resolve,e.reject)}catch(t){e.reject(t)}}function r(){this.h=null}function n(t){return t instanceof e?t:new e((function(e){e(t)}))}if(t)return t;r.prototype.i=function(t){if(null==this.h){this.h=[];var e=this;this.j((function(){e.m()}))}this.h.push(t)};var o=i.setTimeout;r.prototype.j=function(t){o(t,0)},r.prototype.m=function(){for(;this.h&&this.h.length;){var t=this.h;this.h=[];for(var e=0;e<t.length;++e){var r=t[e];t[e]=null;try{r()}catch(t){this.l(t)}}}this.h=null},r.prototype.l=function(t){this.j((function(){throw t}))},e.prototype.l=function(){function t(t){return function(n){r||(r=!0,t.call(e,n))}}var e=this,r=!1;return{resolve:t(this.I),reject:t(this.m)}},e.prototype.I=function(t){if(t===this)this.m(new TypeError("A Promise cannot resolve to itself"));else if(t instanceof e)this.L(t);else{t:switch(typeof t){case"object":var r=null!=t;break t;case"function":r=!0;break t;default:r=!1}r?this.F(t):this.s(t)}},e.prototype.F=function(t){var e=void 0;try{e=t.then}catch(t){return void this.m(t)}"function"==typeof e?this.M(e,t):this.s(t)},e.prototype.m=function(t){this.v(2,t)},e.prototype.s=function(t){this.v(1,t)},e.prototype.v=function(t,e){if(0!=this.i)throw Error("Cannot settle("+t+", "+e+"): Promise already settled in state"+this.i);this.i=t,this.j=e,2===this.i&&this.K(),this.H()},e.prototype.K=function(){var t=this;o((function(){if(t.D()){var e=i.console;void 0!==e&&e.error(t.j)}}),1)},e.prototype.D=function(){if(this.u)return!1;var t=i.CustomEvent,e=i.Event,r=i.dispatchEvent;return void 0===r||("function"==typeof t?t=new t("unhandledrejection",{cancelable:!0}):"function"==typeof e?t=new e("unhandledrejection",{cancelable:!0}):(t=i.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,t),t.promise=this,t.reason=this.j,r(t))},e.prototype.H=function(){if(null!=this.h){for(var t=0;t<this.h.length;++t)a.i(this.h[t]);this.h=null}};var a=new r;return e.prototype.L=function(t){var e=this.l();t.T(e.resolve,e.reject)},e.prototype.M=function(t,e){var r=this.l();try{t.call(e,r.resolve,r.reject)}catch(t){r.reject(t)}},e.prototype.then=function(t,r){function n(t,e){return"function"==typeof t?function(e){try{i(t(e))}catch(t){o(t)}}:e}var i,o,a=new e((function(t,e){i=t,o=e}));return this.T(n(t,i),n(r,o)),a},e.prototype.catch=function(t){return this.then(void 0,t)},e.prototype.T=function(t,e){function r(){switch(n.i){case 1:t(n.j);break;case 2:e(n.j);break;default:throw Error("Unexpected state: "+n.i)}}var n=this;null==this.h?a.i(r):this.h.push(r),this.u=!0},e.resolve=n,e.reject=function(t){return new e((function(e,r){r(t)}))},e.race=function(t){return new e((function(e,r){for(var i=u(t),o=i.next();!o.done;o=i.next())n(o.value).T(e,r)}))},e.all=function(t){var r=u(t),i=r.next();return i.done?n([]):new e((function(t,e){function o(e){return function(r){a[e]=r,0==--u&&t(a)}}var a=[],u=0;do{a.push(void 0),u++,n(i.value).T(o(a.length-1),e),i=r.next()}while(!i.done)}))},e})),o("Array.prototype.keys",(function(t){return t||function(){return function(t,e){t instanceof String&&(t+="");var r=0,n=!1,i={next:function(){if(!n&&r<t.length){var i=r++;return{value:e(i,t[i]),done:!1}}return n=!0,{done:!0,value:void 0}}};return i[Symbol.iterator]=function(){return i},i}(this,(function(t){return t}))}})),o("Array.prototype.fill",(function(t){return t||function(t,e,r){var n=this.length||0;for(0>e&&(e=Math.max(0,n+e)),(null==r||r>n)&&(r=n),0>(r=Number(r))&&(r=Math.max(0,n+r)),e=Number(e||0);e<r;e++)this[e]=t;return this}})),o("Int8Array.prototype.fill",F),o("Uint8Array.prototype.fill",F),o("Uint8ClampedArray.prototype.fill",F),o("Int16Array.prototype.fill",F),o("Uint16Array.prototype.fill",F),o("Int32Array.prototype.fill",F),o("Uint32Array.prototype.fill",F),o("Float32Array.prototype.fill",F),o("Float64Array.prototype.fill",F),o("Object.is",(function(t){return t||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}})),o("Array.prototype.includes",(function(t){return t||function(t,e){var r=this;r instanceof String&&(r=String(r));var n=r.length;for(0>(e=e||0)&&(e=Math.max(e+n,0));e<n;e++){var i=r[e];if(i===t||Object.is(i,t))return!0}return!1}})),o("String.prototype.includes",(function(t){return t||function(t,e){if(null==this)throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype.includes must not be a regular expression");return-1!==this.indexOf(t,e||0)}}));var O=this||self;function Aa(t,e){t=t.split(".");var r,n=O;t[0]in n||void 0===n.execScript||n.execScript("var "+t[0]);for(;t.length&&(r=t.shift());)t.length||void 0===e?n=n[r]&&n[r]!==Object.prototype[r]?n[r]:n[r]={}:n[r]=e}function Ba(t){var e;return(e=O.navigator)&&(e=e.userAgent)||(e=""),-1!=e.indexOf(t)}var S=Array.prototype.map?function(t,e){return Array.prototype.map.call(t,e,void 0)}:function(t,e){for(var r=t.length,n=Array(r),i="string"==typeof t?t.split(""):t,o=0;o<r;o++)o in i&&(n[o]=e.call(void 0,i[o],o,t));return n},T={},_=null;function Fa(t){var e=t.length,r=3*e/4;r%3?r=Math.floor(r):-1!="=.".indexOf(t[e-1])&&(r=-1!="=.".indexOf(t[e-2])?r-2:r-1);var n=new Uint8Array(r),i=0;return function Ga(t,e){function r(e){for(;n<t.length;){var r=t.charAt(n++),i=_[r];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(r))throw Error("Unknown base64 encoding at char: "+r)}return e}Ha();for(var n=0;;){var i=r(-1),o=r(0),a=r(64),u=r(64);if(64===u&&-1===i)break;e(i<<2|o>>4),64!=a&&(e(o<<4&240|a>>2),64!=u&&e(a<<6&192|u))}}(t,(function(t){n[i++]=t})),i!==r?n.subarray(0,i):n}function Ha(){if(!_){_={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],r=0;5>r;r++){var n=t.concat(e[r].split(""));T[r]=n;for(var i=0;i<n.length;i++){var o=n[i];void 0===_[o]&&(_[o]=i)}}}}var k="undefined"!=typeof Uint8Array,R=!(Ba("Trident")||Ba("MSIE"))&&"function"==typeof O.btoa;function Ka(t){if(!R){var e;void 0===e&&(e=0),Ha(),e=T[e];for(var r=Array(Math.floor(t.length/3)),n=e[64]||"",i=0,o=0;i<t.length-2;i+=3){var a=t[i],u=t[i+1],s=t[i+2],c=e[a>>2];a=e[(3&a)<<4|u>>4],u=e[(15&u)<<2|s>>6],s=e[63&s],r[o++]=c+a+u+s}switch(c=0,s=n,t.length-i){case 2:s=e[(15&(c=t[i+1]))<<2]||n;case 1:t=t[i],r[o]=e[t>>2]+e[(3&t)<<4|c>>4]+s+n}return r.join("")}for(e="";10240<t.length;)e+=String.fromCharCode.apply(null,t.subarray(0,10240)),t=t.subarray(10240);return e+=String.fromCharCode.apply(null,t),btoa(e)}var U,C=RegExp("[-_.]","g");function Ma(t){switch(t){case"-":return"+";case"_":return"/";case".":return"=";default:return""}}function Na(t){if(!R)return Fa(t);C.test(t)&&(t=t.replace(C,Ma)),t=atob(t);for(var e=new Uint8Array(t.length),r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}function Pa(){return U||(U=new Uint8Array(0))}var P={},B="function"==typeof Uint8Array.prototype.slice,M=0,L=0;function Sa(t){var e=0>t,r=(t=Math.abs(t))>>>0;t=Math.floor((t-r)/4294967296),e&&(e=(r=u(Ta(r,t))).next().value,t=r.next().value,r=e),M=r>>>0,L=t>>>0}var I,N="function"==typeof BigInt;function Ta(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function Va(t,e){this.i=t>>>0,this.h=e>>>0}function Wa(t){if(!t)return I||(I=new Va(0,0));if(!/^-?\d+$/.test(t))return null;if(16>t.length)Sa(Number(t));else if(N)t=BigInt(t),M=Number(t&BigInt(4294967295))>>>0,L=Number(t>>BigInt(32)&BigInt(4294967295));else{var e=+("-"===t[0]);L=M=0;for(var r=t.length,n=e,i=(r-e)%6+e;i<=r;n=i,i+=6)n=Number(t.slice(n,i)),L*=1e6,4294967296<=(M=1e6*M+n)&&(L+=M/4294967296|0,M%=4294967296);e&&(t=(e=u(Ta(M,L))).next().value,e=e.next().value,M=t,L=e)}return new Va(M,L)}function Ya(t,e){return Error("Invalid wire type: "+t+" (at position "+e+")")}function Za(){return Error("Failed to read varint, encoding is invalid.")}function D(t,e){return Error("Tried to read past the end of the data "+e+" > "+t)}function G(){throw Error("Invalid UTF8")}function V(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}var W,H,z,Y=void 0,X="undefined"!=typeof TextDecoder,K="undefined"!=typeof TextEncoder;function Z(t){if(t!==P)throw Error("illegal external caller")}function J(t,e){if(Z(e),this.V=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}function Q(){return z||(z=new J(null,P))}function q(t){Z(P);var e=t.V;return null==(e=null==e||k&&null!=e&&e instanceof Uint8Array?e:"string"==typeof e?Na(e):null)?e:t.V=e}function $(t,e){this.i=null,this.m=!1,this.h=this.j=this.l=0,tt(this,t,e)}function tt(t,e,r){r=void 0===r?{}:r,t.S=void 0!==r.S&&r.S,e&&(e=function(t){if("string"==typeof t)return{buffer:Na(t),C:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),C:!1};if(t.constructor===Uint8Array)return{buffer:t,C:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),C:!1};if(t.constructor===J)return{buffer:q(t)||Pa(),C:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),C:!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")}(e),t.i=e.buffer,t.m=e.C,t.l=0,t.j=t.i.length,t.h=t.l)}function et(t,e){if(t.h=e,e>t.j)throw D(t.j,e)}function rt(t){var e=t.i,r=t.h,n=e[r++],i=127&n;if(128&n&&(i|=(127&(n=e[r++]))<<7,128&n&&(i|=(127&(n=e[r++]))<<14,128&n&&(i|=(127&(n=e[r++]))<<21,128&n&&(i|=(n=e[r++])<<28,128&n&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++]&&128&e[r++])))))throw Za();return et(t,r),i}function nt(t,e){if(0>e)throw Error("Tried to read a negative byte length: "+e);var r=t.h,n=r+e;if(n>t.j)throw D(e,t.j-r);return t.h=n,r}$.prototype.reset=function(){this.h=this.l};var it=[];function ot(){this.h=[]}function at(t,e,r){for(;0<r||127<e;)t.h.push(127&e|128),e=(e>>>7|r<<25)>>>0,r>>>=7;t.h.push(e)}function ut(t,e){for(;127<e;)t.h.push(127&e|128),e>>>=7;t.h.push(e)}function st(t,e){if(it.length){var r=it.pop();tt(r,t,e),t=r}else t=new $(t,e);this.h=t,this.j=this.h.h,this.i=this.l=-1,this.setOptions(e)}function ct(t){var e=t.h;if(e.h==e.j)return!1;t.j=t.h.h;var r=rt(t.h)>>>0;if(e=r>>>3,!(0<=(r&=7)&&5>=r))throw Ya(r,t.j);if(1>e)throw Error("Invalid field number: "+e+" (at position "+t.j+")");return t.l=e,t.i=r,!0}function ft(t){switch(t.i){case 0:if(0!=t.i)ft(t);else t:{for(var e=(t=t.h).h,r=e+10,n=t.i;e<r;)if(0==(128&n[e++])){et(t,e);break t}throw Za()}break;case 1:et(t=t.h,t.h+8);break;case 2:2!=t.i?ft(t):(e=rt(t.h)>>>0,et(t=t.h,t.h+e));break;case 5:et(t=t.h,t.h+4);break;case 3:for(e=t.l;;){if(!ct(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.i){if(t.l!=e)throw Error("Unmatched end-group tag");break}ft(t)}break;default:throw Ya(t.i,t.j)}}ot.prototype.length=function(){return this.h.length},ot.prototype.end=function(){var t=this.h;return this.h=[],t},st.prototype.setOptions=function(t){t=void 0===t?{}:t,this.ca=void 0!==t.ca&&t.ca},st.prototype.reset=function(){this.h.reset(),this.j=this.h.h,this.i=this.l=-1};var lt=[];function ht(){this.j=[],this.i=0,this.h=new ot}function pt(t,e){0!==e.length&&(t.j.push(e),t.i+=e.length)}var vt="function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():void 0;function dt(t,e){return vt?t[vt]|=e:void 0!==t.A?t.A|=e:(Object.defineProperties(t,{A:{value:e,configurable:!0,writable:!0,enumerable:!1}}),e)}function yt(t,e){vt?t[vt]&&(t[vt]&=~e):void 0!==t.A&&(t.A&=~e)}function bt(t){var e;return null==(e=vt?t[vt]:t.A)?0:e}function gt(t,e){vt?t[vt]=e:void 0!==t.A?t.A=e:Object.defineProperties(t,{A:{value:e,configurable:!0,writable:!0,enumerable:!1}})}function Ab(t){return dt(t,1),t}function Bb(t,e){gt(e,-51&(0|t))}function Cb(t,e){gt(e,-41&(18|t))}var mt={};function Eb(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}var wt,At,jt=[];function Hb(t){if(2&bt(t.o))throw Error("Cannot mutate an immutable Message")}function Ib(t){var e=t.length;(e=e?t[e-1]:void 0)&&Eb(e)?e.g=1:(e={},t.push((e.g=1,e)))}function Jb(t){var e=t.i+t.G;return t.B||(t.B=t.o[e]={})}function xt(t,e){return-1===e?null:e>=t.i?t.B?t.B[e]:void 0:t.o[e+t.G]}function Et(t,e,r,n){Hb(t),Kb(t,e,r,n)}function Kb(t,e,r,n){t.j&&(t.j=void 0),e>=t.i||n?Jb(t)[e]=r:(t.o[e+t.G]=r,(t=t.B)&&e in t&&delete t[e])}function Lb(t,e,r,n){var i=xt(t,e);Array.isArray(i)||(i=wt);var o=bt(i);if(1&o||Ab(i),n)2&o||dt(i,2),1&r||Object.freeze(i);else{n=!(2&r);var a=2&o;1&r||!a?n&&16&o&&!a&&yt(i,16):Kb(t,e,i=Ab(Array.prototype.slice.call(i)))}return i}function Mb(t,e){var r=xt(t,e),n=null==r?r:"number"==typeof r||"NaN"===r||"Infinity"===r||"-Infinity"===r?Number(r):void 0;return null!=n&&n!==r&&Kb(t,e,n),n}function Nb(t,e,r,n,i){t.h||(t.h={});var o=t.h[r],a=Lb(t,r,3,i);if(!o){var u=a;o=[];var s=!!(16&bt(t.o));a=!!(2&bt(u));var c=u;!i&&a&&(u=Array.prototype.slice.call(u));for(var f=a,l=0;l<u.length;l++){var h=u[l],p=e,v=!1;if(v=void 0!==v&&v,void 0!==(h=Array.isArray(h)?new p(h):v?new p:void 0)){var d=v=bt(p=h.o);a&&(d|=2),s&&(d|=16),d!=v&>(p,d),p=d,f=f||!!(2&p),o.push(h)}}return t.h[r]=o,e=33|(s=bt(u)),s!=(e=f?-9&e:8|e)&&(f=u,Object.isFrozen(f)&&(f=Array.prototype.slice.call(f)),gt(f,e),u=f),c!==u&&Kb(t,r,u),(i||n&&a)&&dt(o,2),n&&Object.freeze(o),o}return i||(i=Object.isFrozen(o),n&&!i?Object.freeze(o):!n&&i&&(o=Array.prototype.slice.call(o),t.h[r]=o)),o}function Ob(t,e,r){var n=!!(2&bt(t.o));if(e=Nb(t,e,r,n,n),t=Lb(t,r,3,n),!(n||8&bt(t))){for(n=0;n<e.length;n++){if(2&bt((r=e[n]).o)){var i=Pb(r,!1);i.j=r}else i=r;r!==i&&(e[n]=i,t[n]=i.o)}dt(t,8)}return e}function Ft(t,e,r){if(null!=r&&"number"!=typeof r)throw Error("Value of float/double field must be a number|null|undefined, found "+typeof r+": "+r);Et(t,e,r)}function Qb(t,e,r,n,i){Hb(t);var o=Nb(t,r,e,!1,!1);return r=null!=n?n:new r,t=Lb(t,e,2,!1),null!=i?(o.splice(i,0,r),t.splice(i,0,r.o)):(o.push(r),t.push(r.o)),r.C()&&yt(t,8),r}function Rb(t,e){return null==t?e:t}function Ot(t,e,r){return r=void 0===r?0:r,Rb(Mb(t,e),r)}function Ub(t,e,r,n){if(null!=t){if(Array.isArray(t))t=Vb(t,e,r,void 0!==n);else if(Eb(t)){var i,o={};for(i in t)o[i]=Ub(t[i],e,r,n);t=o}else t=e(t,n);return t}}function Vb(t,e,r,n){var i=bt(t);n=n?!!(16&i):void 0,t=Array.prototype.slice.call(t);for(var o=0;o<t.length;o++)t[o]=Ub(t[o],e,r,n);return r(i,t),t}function Wb(t){return t.ja===mt?t.toJSON():function Tb(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"object":if(t)if(Array.isArray(t)){if(0!=(128&bt(t)))return Ib(t=Array.prototype.slice.call(t)),t}else{if(k&&null!=t&&t instanceof Uint8Array)return Ka(t);if(t instanceof J){var e=t.V;return null==e?"":"string"==typeof e?e:t.V=Ka(e)}}}return t}(t)}function Xb(t,e){128&t&&Ib(e)}function Yb(t,e,r){if(r=void 0===r?Cb:r,null!=t){if(k&&t instanceof Uint8Array)return t.length?new J(new Uint8Array(t),P):Q();if(Array.isArray(t)){var n=bt(t);return 2&n?t:!e||32&n||!(16&n||0===n)?(4&(e=bt(t=Vb(t,Yb,4&n?Cb:r,!0)))&&2&e&&Object.freeze(t),t):(gt(t,2|n),t)}return t.ja===mt?Zb(t):t}}function St(t,e,r,n,i,o,a){if(t=t.h&&t.h[r]){if(2&(n=bt(t))?n=t:(Cb(n,o=S(t,Zb)),Object.freeze(o),n=o),Hb(e),a=null==n?wt:Ab([]),null!=n){for(o=!!n.length,t=0;t<n.length;t++){var u=n[t];o=o&&!(2&bt(u.o)),a[t]=u.o}o=1|(o?8:0),((t=bt(a))&o)!==o&&(Object.isFrozen(a)&&(a=Array.prototype.slice.call(a)),gt(a,t|o)),e.h||(e.h={}),e.h[r]=n}else e.h&&(e.h[r]=void 0);Kb(e,r,a,i)}else Et(e,r,Yb(n,o,a),i)}function Zb(t){return 2&bt(t.o)||dt((t=Pb(t,!0)).o,2),t}function Pb(t,e){var r=t.o,n=[];dt(n,16);var i=t.constructor.h;if(i&&n.push(i),i=t.B){n.length=r.length,n.fill(void 0,n.length,r.length);var o={};n[n.length-1]=o}0!=(128&bt(r))&&Ib(n),e=e||t.C()?Cb:Bb,o=t.constructor,At=n,n=new o(n),At=void 0,t.R&&(n.R=t.R.slice()),o=!!(16&bt(r));for(var a=i?r.length-1:r.length,u=0;u<a;u++)St(t,n,u-t.G,r[u],!1,o,e);if(i)for(var s in i)St(t,n,+s,i[s],!0,o,e);return n}function Tt(t,e,r){null==t&&(t=At),At=void 0;var n,i=this.constructor.i||0,o=0<i,a=this.constructor.h,u=!1;if(null==t){var s=48,c=!0;o&&(i=0,s|=128),gt(t=a?[a]:[],s)}else{if(!Array.isArray(t))throw Error();if(a&&a!==t[0])throw Error();var f=s=dt(t,0);if((c=0!=(16&f))&&((u=0!=(32&f))||(f|=32)),o){if(128&f)i=0;else if(0<t.length){var l=t[t.length-1];if(Eb(l)&&"g"in l){i=0,f|=128,delete l.g;var h,p=!0;for(h in l){p=!1;break}p&&t.pop()}}}else if(128&f)throw Error();s!==f&>(t,f)}if(this.G=(a?0:-1)-i,this.h=void 0,this.o=t,i=(a=this.o.length)-1,a&&Eb(a=this.o[i])?(this.B=a,this.i=i-this.G):void 0!==e&&-1<e?(this.i=Math.max(e,i+1-this.G),this.B=void 0):this.i=Number.MAX_VALUE,!o&&this.B&&"g"in this.B)throw Error('Unexpected "g" flag in sparse object of message that is not a group type.');if(r)for(e=c&&!u&&!0,o=this.i,c=0;c<r.length;c++)(u=r[c])<o?(i=t[u+=this.G])?_t(i,e):t[u]=wt:(n||(n=Jb(this)),(i=n[u])?_t(i,e):n[u]=wt)}function _t(t,e){if(Array.isArray(t)){var r=bt(t),n=1;!e||2&r||(n|=16),(r&n)!==n&>(t,r|n)}}function kt(t,e,r){if(r){var n,i={};for(n in r){var o=r[n],a=o.ra;a||(i.J=o.xa||o.oa.W,o.ia?(i.aa=It(o.ia),a=function(t){return function(e,r,n){return t.J(e,r,n,t.aa)}}(i)):o.ka?(i.Z=Nt(o.da.P,o.ka),a=function(t){return function(e,r,n){return t.J(e,r,n,t.Z)}}(i)):a=i.J,o.ra=a),a(e,t,o.da),i={J:i.J,aa:i.aa,Z:i.Z}}}!function(t,e){if(e=e.R){pt(t,t.h.end());for(var r=0;r<e.length;r++)pt(t,q(e[r])||Pa())}}(e,t)}gt(jt,23),wt=Object.freeze(jt),Tt.prototype.toJSON=function(){return Vb(this.o,Wb,Xb)},Tt.prototype.C=function(){return!!(2&bt(this.o))},Tt.prototype.ja=mt,Tt.prototype.toString=function(){return this.o.toString()};var Rt=Symbol();function Ut(t,e,r){return t[Rt]||(t[Rt]=function(t,n){return e(t,n,r)})}function Ct(t){var e=t[Rt];if(!e){var r=Qt(t);e=function(t,e){return qt(t,e,r)},t[Rt]=e}return e}function Pt(t){var e=function(t){var e=t.ia;return e?Ct(e):(e=t.wa)?Ut(t.da.P,e,t.ka):void 0}(t),r=t.da,n=t.oa.U;return e?function(t,i){return n(t,i,r,e)}:function(t,e){return n(t,e,r)}}function Bt(t,e){var r=t[e];return"function"==typeof r&&0===r.length&&(r=r(),t[e]=r),Array.isArray(r)&&(Yt in r||Dt in r||0<r.length&&"function"==typeof r[0])?r:void 0}function Mt(t,e,r,n,i,o){e.P=t[0];var a=1;if(t.length>a&&"number"!=typeof t[a]){var u=t[a++];r(e,u)}for(;a<t.length;){r=t[a++];for(var s=a+1;s<t.length&&"number"!=typeof t[s];)s++;switch(u=t[a++],s-=a){case 0:n(e,r,u);break;case 1:(s=Bt(t,a))?(a++,i(e,r,u,s)):n(e,r,u,t[a++]);break;case 2:i(e,r,u,s=Bt(t,s=a++),t[a++]);break;case 3:o(e,r,u,t[a++],t[a++],t[a++]);break;case 4:o(e,r,u,t[a++],t[a++],t[a++],t[a++]);break;default:throw Error("unexpected number of binary field arguments: "+s)}}return e}var Lt=Symbol();function It(t){var e=t[Lt];if(!e){var r=zt(t);e=function(t,e){return $t(t,e,r)},t[Lt]=e}return e}function Nt(t,e){var r=t[Lt];return r||(r=function(t,r){return kt(t,r,e)},t[Lt]=r),r}var Dt=Symbol();function Gt(t,e){t.push(e)}function Vt(t,e,r){t.push(e,r.W)}function Wt(t,e,r,n){var i=It(n),o=zt(n).P,a=r.W;t.push(e,(function(t,e,r){return a(t,e,r,o,i)}))}function Ht(t,e,r,n,i,o){var a=Nt(n,o),u=r.W;t.push(e,(function(t,e,r){return u(t,e,r,n,a)}))}function zt(t){var e=t[Dt];return e||(e=Mt(t,t[Dt]=[],Gt,Vt,Wt,Ht),Yt in t&&Dt in t&&(t.length=0),e)}var Yt=Symbol();function Xt(t,e){t[0]=e}function Kt(t,e,r,n){var i=r.U;t[e]=n?function(t,e,r){return i(t,e,r,n)}:i}function Zt(t,e,r,n,i){var o=r.U,a=Ct(n),u=Qt(n).P;t[e]=function(t,e,r){return o(t,e,r,u,a,i)}}function Jt(t,e,r,n,i,o,a){var u=r.U,s=Ut(n,i,o);t[e]=function(t,e,r){return u(t,e,r,n,s,a)}}function Qt(t){var e=t[Yt];return e||(e=Mt(t,t[Yt]={},Xt,Kt,Zt,Jt),Yt in t&&Dt in t&&(t.length=0),e)}function qt(t,e,r){for(;ct(e)&&4!=e.i;){var n=e.l,i=r[n];if(!i){var o=r[0];o&&(o=o[n])&&(i=r[n]=Pt(o))}if(!i||!i(e,t,n)){n=t,o=(i=e).j,ft(i);var a=i;if(!a.ca){if(i=a.h.h-o,a.h.h=o,a=a.h,0==i)i=Q();else{if(o=nt(a,i),a.S&&a.m)i=a.i.subarray(o,o+i);else{a=a.i;var u=o;i=u===(i=o+i)?Pa():B?a.slice(u,i):new Uint8Array(a.subarray(u,i))}i=0==i.length?Q():new J(i,P)}(o=n.R)?o.push(i):n.R=[i]}}}return t}function $t(t,e,r){for(var n=r.length,i=1==n%2,o=i?1:0;o<n;o+=2)(0,r[o+1])(e,t,r[o]);kt(t,e,i?r[0]:void 0)}function Ac(t,e){return{U:t,W:e}}var te=Ac((function(t,e,r){if(5!==t.i)return!1;var n=(t=t.h).i,i=t.h,o=n[i],a=n[i+1],u=n[i+2];return n=n[i+3],et(t,t.h+4),t=2*((a=(o<<0|a<<8|u<<16|n<<24)>>>0)>>31)+1,o=a>>>23&255,a&=8388607,Et(e,r,255==o?a?NaN:1/0*t:0==o?t*Math.pow(2,-149)*a:t*Math.pow(2,o-150)*(a+Math.pow(2,23))),!0}),(function(t,e,r){if(null!=(e=Mb(e,r))){ut(t.h,8*r+5),t=t.h;var n=+e;0===n?0<1/n?M=L=0:(L=0,M=2147483648):isNaN(n)?(L=0,M=2147483647):34028234663852886e22<(n=(r=0>n?-2147483648:0)?-n:n)?(L=0,M=(2139095040|r)>>>0):11754943508222875e-54>n?(n=Math.round(n/Math.pow(2,-149)),L=0,M=(r|n)>>>0):(e=Math.floor(Math.log(n)/Math.LN2),n*=Math.pow(2,-e),16777216<=(n=Math.round(8388608*n))&&++e,L=0,M=(r|e+127<<23|8388607&n)>>>0),r=M,t.h.push(r>>>0&255),t.h.push(r>>>8&255),t.h.push(r>>>16&255),t.h.push(r>>>24&255)}})),ee=Ac((function(t,e,r){if(0!==t.i)return!1;var n=t.h,i=0,o=t=0,a=n.i,u=n.h;do{var s=a[u++];i|=(127&s)<<o,o+=7}while(32>o&&128&s);for(32<o&&(t|=(127&s)>>4),o=3;32>o&&128&s;o+=7)t|=(127&(s=a[u++]))<<o;if(et(n,u),!(128>s))throw Za();return n=i>>>0,(t=2147483648&(s=t>>>0))&&(s=~s>>>0,0==(n=1+~n>>>0)&&(s=s+1>>>0)),n=4294967296*s+(n>>>0),Et(e,r,t?-n:n),!0}),(function(t,e,r){null!=(e=xt(e,r))&&("string"==typeof e&&Wa(e),null!=e&&(ut(t.h,8*r),"number"==typeof e?(t=t.h,Sa(e),at(t,M,L)):(r=Wa(e),at(t.h,r.i,r.h))))})),re=Ac((function(t,e,r){return 0===t.i&&(Et(e,r,rt(t.h)),!0)}),(function(t,e,r){if(null!=(e=xt(e,r))&&null!=e)if(ut(t.h,8*r),t=t.h,0<=(r=e))ut(t,r);else{for(e=0;9>e;e++)t.h.push(127&r|128),r>>=7;t.h.push(1)}})),ne=Ac((function(t,e,r){if(2!==t.i)return!1;var n=rt(t.h)>>>0,i=nt(t=t.h,n);if(t=t.i,X){var o,a=t;(o=W)||(o=W=new TextDecoder("utf-8",{fatal:!0})),t=i+n,a=0===i&&t===a.length?a:a.subarray(i,t);try{var u=o.decode(a)}catch(t){if(void 0===Y){try{o.decode(new Uint8Array([128]))}catch(t){}try{o.decode(new Uint8Array([97])),Y=!0}catch(t){Y=!1}}throw!Y&&(W=void 0),t}}else{n=(u=i)+n,i=[];for(var s,c,f=null;u<n;)128>(s=t[u++])?i.push(s):224>s?u>=n?G():(c=t[u++],194>s||128!=(192&c)?(u--,G()):i.push((31&s)<<6|63&c)):240>s?u>=n-1?G():128!=(192&(c=t[u++]))||224===s&&160>c||237===s&&160<=c||128!=(192&(a=t[u++]))?(u--,G()):i.push((15&s)<<12|(63&c)<<6|63&a):244>=s?u>=n-2?G():128!=(192&(c=t[u++]))||0!=c-144+(s<<28)>>30||128!=(192&(a=t[u++]))||128!=(192&(o=t[u++]))?(u--,G()):(s=(7&s)<<18|(63&c)<<12|(63&a)<<6|63&o,s-=65536,i.push(55296+(s>>10&1023),56320+(1023&s))):G(),8192<=i.length&&(f=V(f,i),i.length=0);u=V(f,i)}return Et(e,r,u),!0}),(function(t,e,r){if(null!=(e=xt(e,r))){var n=!1;if(n=void 0!==n&&n,K){if(n&&/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/.test(e))throw Error("Found an unpaired surrogate");e=(H||(H=new TextEncoder)).encode(e)}else{for(var i=0,o=new Uint8Array(3*e.length),a=0;a<e.length;a++){var u=e.charCodeAt(a);if(128>u)o[i++]=u;else{if(2048>u)o[i++]=u>>6|192;else{if(55296<=u&&57343>=u){if(56319>=u&&a<e.length){var s=e.charCodeAt(++a);if(56320<=s&&57343>=s){u=1024*(u-55296)+s-56320+65536,o[i++]=u>>18|240,o[i++]=u>>12&63|128,o[i++]=u>>6&63|128,o[i++]=63&u|128;continue}a--}if(n)throw Error("Found an unpaired surrogate");u=65533}o[i++]=u>>12|224,o[i++]=u>>6&63|128}o[i++]=63&u|128}}e=i===o.length?o:o.subarray(0,i)}ut(t.h,8*r+2),ut(t.h,e.length),pt(t,t.h.end()),pt(t,e)}})),ie=Ac((function(t,e,r,n,i){if(2!==t.i)return!1;e=Qb(e,r,n),r=t.h.j,n=rt(t.h)>>>0;var o=t.h.h+n,a=o-r;if(0>=a&&(t.h.j=o,i(e,t,void 0,void 0,void 0),a=o-t.h.h),a)throw Error("Message parsing ended unexpectedly. Expected to read "+n+" bytes, instead read "+(n-a)+" bytes, either the data ended unexpectedly or the message misreported its own length");return t.h.h=o,t.h.j=r,!0}),(function(t,e,r,n,i){if(null!=(e=Ob(e,n,r)))for(n=0;n<e.length;n++){var o=t;ut(o.h,8*r+2);var a=o.h.end();pt(o,a),a.push(o.i),o=a,i(e[n],t),a=t;var u=o.pop();for(u=a.i+a.h.length()-u;127<u;)o.push(127&u|128),u>>>=7,a.i++;o.push(u),a.i++}}));function Fc(t){return function(e,r){t:{if(lt.length){var n=lt.pop();n.setOptions(r),tt(n.h,e,r),e=n}else e=new st(e,r);try{var i=Qt(t),o=qt(new i.P,e,i);break t}finally{(i=e.h).i=null,i.m=!1,i.l=0,i.j=0,i.h=0,i.S=!1,e.l=-1,e.i=-1,100>lt.length&<.push(e)}o=void 0}return o}}function Gc(t){return function(){var e=new ht;$t(this,e,zt(t)),pt(e,e.h.end());for(var r=new Uint8Array(e.i),n=e.j,i=n.length,o=0,a=0;a<i;a++){var u=n[a];r.set(u,o),o+=u.length}return e.j=[r],r}}function oe(t){Tt.call(this,t)}d(oe,Tt);var ae=[oe,1,re,2,te,3,ne,4,ne];function Ic(t){Tt.call(this,t,-1,ue)}oe.prototype.l=Gc(ae),d(Ic,Tt),Ic.prototype.addClassification=function(t,e){return Qb(this,1,oe,t,e),this};var ue=[1],se=Fc([Ic,1,ie,ae]);function Lc(t){Tt.call(this,t)}d(Lc,Tt);var ce=[Lc,1,te,2,te,3,te,4,te,5,te];function Nc(t){Tt.call(this,t,-1,fe)}Lc.prototype.l=Gc(ce),d(Nc,Tt);var fe=[1],le=Fc([Nc,1,ie,ce]);function Qc(t){Tt.call(this,t)}d(Qc,Tt);var he=[Qc,1,te,2,te,3,te,4,te,5,te,6,ee],pe=Fc(he);function Tc(t,e,r){if(r=t.createShader(0===r?t.VERTEX_SHADER:t.FRAGMENT_SHADER),t.shaderSource(r,e),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))throw Error("Could not compile WebGL shader.\n\n"+t.getShaderInfoLog(r));return r}function Uc(t){return Ob(t,oe,1).map((function(t){var e=xt(t,1);return{index:null==e?0:e,qa:Ot(t,2),label:null!=xt(t,3)?Rb(xt(t,3),""):void 0,displayName:null!=xt(t,4)?Rb(xt(t,4),""):void 0}}))}function Vc(t){return{x:Ot(t,1),y:Ot(t,2),z:Ot(t,3),visibility:null!=Mb(t,4)?Ot(t,4):void 0}}function Wc(t,e){this.i=t,this.h=e,this.m=0}function Xc(t,e,r){return function Yc(t,e){var r=t.h;if(void 0===t.s){var n=Tc(r,"\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 }",0),i=Tc(r,"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D sampler0;\n void main(){\n gl_FragColor = texture2D(sampler0, vTex);\n }",1),o=r.createProgram();if(r.attachShader(o,n),r.attachShader(o,i),r.linkProgram(o),!r.getProgramParameter(o,r.LINK_STATUS))throw Error("Could not compile WebGL program.\n\n"+r.getProgramInfoLog(o));n=t.s=o,r.useProgram(n),i=r.getUniformLocation(n,"sampler0"),t.l={O:r.getAttribLocation(n,"aVertex"),N:r.getAttribLocation(n,"aTex"),ya:i},t.v=r.createBuffer(),r.bindBuffer(r.ARRAY_BUFFER,t.v),r.enableVertexAttribArray(t.l.O),r.vertexAttribPointer(t.l.O,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,null),t.u=r.createBuffer(),r.bindBuffer(r.ARRAY_BUFFER,t.u),r.enableVertexAttribArray(t.l.N),r.vertexAttribPointer(t.l.N,2,r.FLOAT,!1,0,0),r.bufferData(r.ARRAY_BUFFER,new Float32Array([0,1,0,0,1,0,1,1]),r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,null),r.uniform1i(i,0)}n=t.l,r.useProgram(t.s),r.canvas.width=e.width,r.canvas.height=e.height,r.viewport(0,0,e.width,e.height),r.activeTexture(r.TEXTURE0),t.i.bindTexture2d(e.glName),r.enableVertexAttribArray(n.O),r.bindBuffer(r.ARRAY_BUFFER,t.v),r.vertexAttribPointer(n.O,2,r.FLOAT,!1,0,0),r.enableVertexAttribArray(n.N),r.bindBuffer(r.ARRAY_BUFFER,t.u),r.vertexAttribPointer(n.N,2,r.FLOAT,!1,0,0),r.bindFramebuffer(r.DRAW_FRAMEBUFFER?r.DRAW_FRAMEBUFFER:r.FRAMEBUFFER,null),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.colorMask(!0,!0,!0,!0),r.drawArrays(r.TRIANGLE_FAN,0,4),r.disableVertexAttribArray(n.O),r.disableVertexAttribArray(n.N),r.bindBuffer(r.ARRAY_BUFFER,null),t.i.bindTexture2d(0)}(t,e),"function"==typeof t.h.canvas.transferToImageBitmap?Promise.resolve(t.h.canvas.transferToImageBitmap()):r?Promise.resolve(t.h.canvas):"function"==typeof createImageBitmap?createImageBitmap(t.h.canvas):(void 0===t.j&&(t.j=document.createElement("canvas")),new Promise((function(e){t.j.height=t.h.canvas.height,t.j.width=t.h.canvas.width,t.j.getContext("2d",{}).drawImage(t.h.canvas,0,0,t.h.canvas.width,t.h.canvas.height),e(t.j)})))}function Zc(t){this.h=t}Qc.prototype.l=Gc(he);var ve=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]);function de(t,e){return e+t}function ye(t,e){window[t]=e}function be(t){if(this.h=t,this.listeners={},this.l={},this.L={},this.s={},this.v={},this.M=this.u=this.ga=!0,this.I=Promise.resolve(),this.fa="",this.D={},this.locateFile=t&&t.locateFile||de,"object"==typeof window)var e=window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/";else{if("undefined"==typeof location)throw Error("solutions can only be loaded on a web page or in a web worker");e=location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/"}if(this.ha=e,t.options)for(var r=(e=u(Object.keys(t.options))).next();!r.done;r=e.next()){r=r.value;var n=t.options[r].default;void 0!==n&&(this.l[r]="function"==typeof n?n():n)}}function ge(t){var e,r,n,i,o,a,u,c,f,l,h;return E((function(p){switch(p.h){case 1:return t.ga?(e=void 0===t.h.files?[]:"function"==typeof t.h.files?t.h.files(t.l):t.h.files,m(p,E((function(t){switch(t.h){case 1:return t.s=2,m(t,WebAssembly.instantiate(ve),4);case 4:t.h=3,t.s=0;break;case 2:return t.s=0,t.l=null,t.return(!1);case 3:return t.return(!0)}})),2)):p.return();case 2:if(r=p.i,"object"==typeof window)return ye("createMediapipeSolutionsWasm",{locateFile:t.locateFile}),ye("createMediapipeSolutionsPackedAssets",{locateFile:t.locateFile}),a=e.filter((function(t){return void 0!==t.data})),u=e.filter((function(t){return void 0===t.data})),c=Promise.all(a.map((function(e){var r=me(t,e.url);if(void 0!==e.path){var n=e.path;r=r.then((function(e){return t.overrideFile(n,e),Promise.resolve(e)}))}return r}))),f=Promise.all(u.map((function(e){return void 0===e.simd||e.simd&&r||!e.simd&&!r?function(t){var e=document.createElement("script");return e.setAttribute("src",t),e.setAttribute("crossorigin","anonymous"),new Promise((function(t){e.addEventListener("load",(function(){t()}),!1),e.addEventListener("error",(function(){t()}),!1),document.body.appendChild(e)}))}(t.locateFile(e.url,t.ha)):Promise.resolve()}))).then((function(){var e,r,n;return E((function(i){if(1==i.h)return e=window.createMediapipeSolutionsWasm,r=window.createMediapipeSolutionsPackedAssets,n=t,m(i,e(r),2);n.i=i.i,i.h=0}))})),l=E((function(e){return t.h.graph&&t.h.graph.url?e=m(e,me(t,t.h.graph.url),0):(e.h=0,e=void 0),e})),m(p,Promise.all([f,c,l]),7);if("function"!=typeof importScripts)throw Error("solutions can only be loaded on a web page or in a web worker");return n=e.filter((function(t){return void 0===t.simd||t.simd&&r||!t.simd&&!r})).map((function(e){return t.locateFile(e.url,t.ha)})),importScripts.apply(null,s(n)),i=t,m(p,createMediapipeSolutionsWasm(Module),6);case 6:i.i=p.i,t.m=new OffscreenCanvas(1,1),t.i.canvas=t.m,o=t.i.GL.createContext(t.m,{antialias:!1,alpha:!1,va:"undefined"!=typeof WebGL2RenderingContext?2:1}),t.i.GL.makeContextCurrent(o),p.h=4;break;case 7:if(t.m=document.createElement("canvas"),!(h=t.m.getContext("webgl2",{}))&&!(h=t.m.getContext("webgl",{})))return alert("Failed to create WebGL canvas context when passing video frame."),p.return();t.K=h,t.i.canvas=t.m,t.i.createContext(t.m,!0,!0,{});case 4:t.j=new t.i.SolutionWasm,t.ga=!1,p.h=0}}))}function me(t,e){var r,n;return E((function(i){return e in t.L?i.return(t.L[e]):(r=t.locateFile(e,""),n=fetch(r).then((function(t){return t.arrayBuffer()})),t.L[e]=n,i.return(n))}))}function we(t,e,r){var n,i,o,a,s,c,f,l,h,p,v,d,y,b;return E((function(g){switch(g.h){case 1:if(!r)return g.return(e);for(n={},i=0,o=u(Object.keys(r)),a=o.next();!a.done;a=o.next())s=a.value,"string"!=typeof(c=r[s])&&"texture"===c.type&&void 0!==e[c.stream]&&++i;1<i&&(t.M=!1),f=u(Object.keys(r)),a=f.next();case 2:if(a.done){g.h=4;break}if(l=a.value,"string"==typeof(h=r[l]))return y=n,b=l,m(g,function(t,e,r){var n;return E((function(i){return"number"==typeof r||r instanceof Uint8Array||r instanceof t.i.Uint8BlobList?i.return(r):r instanceof t.i.Texture2dDataOut?((n=t.v[e])||(n=new Wc(t.i,t.K),t.v[e]=n),i.return(Xc(n,r,t.M))):i.return(void 0)}))}(t,l,e[h]),14);if(p=e[h.stream],"detection_list"===h.type){if(p){for(var w=p.getRectList(),A=p.getLandmarksList(),j=p.getClassificationsList(),x=[],F=0;F<w.size();++F){var O=pe(w.get(F)),S=void 0;S=void 0===S?0:S,O={la:{sa:Ot(O,1),ta:Ot(O,2),height:Ot(O,3),width:Ot(O,4),rotation:Ot(O,5,0),pa:Rb(xt(O,6),S)},ea:Ob(le(A.get(F)),Lc,1).map(Vc),ba:Uc(se(j.get(F)))},x.push(O)}w=x}else w=[];n[l]=w,g.h=7;break}if("proto_list"===h.type){if(p){for(w=Array(p.size()),A=0;A<p.size();A++)w[A]=p.get(A);p.delete()}else w=[];n[l]=w,g.h=7;break}if(void 0===p){g.h=3;break}if("float_list"===h.type){n[l]=p,g.h=7;break}if("proto"===h.type){n[l]=p,g.h=7;break}if("texture"!==h.type)throw Error("Unknown output config type: '"+h.type+"'");return(v=t.v[l])||(v=new Wc(t.i,t.K),t.v[l]=v),m(g,Xc(v,p,t.M),13);case 13:d=g.i,n[l]=d;case 7:h.transform&&n[l]&&(n[l]=h.transform(n[l])),g.h=3;break;case 14:y[b]=g.i;case 3:a=f.next(),g.h=2;break;case 4:return g.return(n)}}))}function Ae(t,e){for(var r=e.name||"$",n=[].concat(s(e.wants)),i=new t.i.StringList,o=u(e.wants),a=o.next();!a.done;a=o.next())i.push_back(a.value);o=t.i.PacketListener.implement({onResults:function(i){for(var o={},a=0;a<e.wants.length;++a)o[n[a]]=i.get(a);var u=t.listeners[r];u&&(t.I=we(t,o,e.outs).then((function(r){r=u(r);for(var i=0;i<e.wants.length;++i){var a=o[n[i]];"object"==typeof a&&a.hasOwnProperty&&a.hasOwnProperty("delete")&&a.delete()}r&&(t.I=r)})))}}),t.j.attachMultiListener(i,o),i.delete()}function je(t){return void 0===t&&(t=0),1===t?"selfie_segmentation_landscape.tflite":"selfie_segmentation.tflite"}function xe(t){var e=this;t=t||{},this.h=new be({locateFile:t.locateFile,files:function(t){return[{simd:!0,url:"selfie_segmentation_solution_simd_wasm_bin.js"},{simd:!1,url:"selfie_segmentation_solution_wasm_bin.js"},{data:!0,url:je(t.modelSelection)}]},graph:{url:"selfie_segmentation.binarypb"},listeners:[{wants:["segmentation_mask","image_transformed"],outs:{image:{type:"texture",stream:"image_transformed"},segmentationMask:{type:"texture",stream:"segmentation_mask"}}}],inputs:{image:{type:"video",stream:"input_frames_gpu"}},options:{useCpuInference:{type:0,graphOptionXref:{calculatorType:"InferenceCalculator",fieldName:"use_cpu_inference"},default:"object"==typeof window&&void 0!==window.navigator&&("iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)},selfieMode:{type:0,graphOptionXref:{calculatorType:"GlScalerCalculator",calculatorIndex:1,fieldName:"flip_horizontal"}},modelSelection:{type:1,graphOptionXref:{calculatorType:"ConstantSidePacketCalculator",calculatorName:"ConstantSidePacketCalculatorModelSelection",fieldName:"int_value"},onChange:function(t){var r,n,i;return E((function(o){return 1==o.h?(r=je(t),n="third_party/mediapipe/modules/selfie_segmentation/"+r,m(o,me(e.h,r),2)):(i=o.i,e.h.overrideFile(n,i),o.return(!0))}))}}}})}(t=be.prototype).close=function(){return this.j&&this.j.delete(),Promise.resolve()},t.reset=function(){var t=this;return E((function(e){t.j&&(t.j.reset(),t.s={},t.v={}),e.h=0}))},t.setOptions=function(t,e){var r=this;if(e=e||this.h.options){for(var n=[],i=[],o={},a=u(Object.keys(t)),s=a.next();!s.done;o={X:o.X,Y:o.Y},s=a.next())if(!((s=s.value)in this.l)||this.l[s]!==t[s]){this.l[s]=t[s];var c=e[s];void 0!==c&&(c.onChange&&(o.X=c.onChange,o.Y=t[s],n.push(function(t){return function(){return E((function(e){if(1==e.h)return m(e,t.X(t.Y),2);!0===e.i&&(r.u=!0),e.h=0}))}}(o))),c.graphOptionXref&&(s=Object.assign({},{calculatorName:"",calculatorIndex:0},c.graphOptionXref,{valueNumber:1===c.type?t[s]:0,valueBoolean:0===c.type&&t[s],valueString:2===c.type?t[s]:""}),i.push(s)))}0===n.length&&0===i.length||(this.u=!0,this.H=(void 0===this.H?[]:this.H).concat(i),this.F=(void 0===this.F?[]:this.F).concat(n))}},t.initialize=function(){var t=this;return E((function(e){return 1==e.h?m(e,ge(t),2):3!=e.h?m(e,function(t){var e,r,n,i,o,a,s,c;return E((function(f){if(1==f.h)return t.h.graph&&t.h.graph.url&&t.fa===t.h.graph.url?f.return():(t.u=!0,t.h.graph&&t.h.graph.url?(t.fa=t.h.graph.url,m(f,me(t,t.h.graph.url),3)):void(f.h=2));for(2!=f.h&&(e=f.i,t.j.loadGraph(e)),r=u(Object.keys(t.D)),n=r.next();!n.done;n=r.next())i=n.value,t.j.overrideFile(i,t.D[i]);if(t.D={},t.h.listeners)for(o=u(t.h.listeners),a=o.next();!a.done;a=o.next())s=a.value,Ae(t,s);c=t.l,t.l={},t.setOptions(c),f.h=0}))}(t),3):m(e,function(t){var e,r,n,i,o,a;return E((function(s){switch(s.h){case 1:if(!t.u)return s.return();if(!t.F){s.h=2;break}e=u(t.F),r=e.next();case 3:if(r.done){s.h=5;break}return m(s,(0,r.value)(),4);case 4:r=e.next(),s.h=3;break;case 5:t.F=void 0;case 2:if(t.H){for(n=new t.i.GraphOptionChangeRequestList,i=u(t.H),o=i.next();!o.done;o=i.next())a=o.value,n.push_back(a);t.j.changeOptions(n),n.delete(),t.H=void 0}t.u=!1,s.h=0}}))}(t),0)}))},t.overrideFile=function(t,e){this.j?this.j.overrideFile(t,e):this.D[t]=e},t.clearOverriddenFiles=function(){this.D={},this.j&&this.j.clearOverriddenFiles()},t.send=function(t,e){var r,n,i,o,a,s,c,f,l,h=this;return E((function(p){switch(p.h){case 1:return h.h.inputs?(r=1e3*(null==e?performance.now():e),m(p,h.I,2)):p.return();case 2:return m(p,h.initialize(),3);case 3:for(n=new h.i.PacketDataList,i=u(Object.keys(t)),o=i.next();!o.done;o=i.next())if(a=o.value,s=h.h.inputs[a]){t:{var v=t[a];switch(s.type){case"video":var d=h.s[s.stream];if(d||(d=new Wc(h.i,h.K),h.s[s.stream]=d),0===d.m&&(d.m=d.i.createTexture()),"undefined"!=typeof HTMLVideoElement&&v instanceof HTMLVideoElement)var y=v.videoWidth,b=v.videoHeight;else"undefined"!=typeof HTMLImageElement&&v instanceof HTMLImageElement?(y=v.naturalWidth,b=v.naturalHeight):(y=v.width,b=v.height);b={glName:d.m,width:y,height:b},(y=d.h).canvas.width=b.width,y.canvas.height=b.height,y.activeTexture(y.TEXTURE0),d.i.bindTexture2d(d.m),y.texImage2D(y.TEXTURE_2D,0,y.RGBA,y.RGBA,y.UNSIGNED_BYTE,v),d.i.bindTexture2d(0),d=b;break t;case"detections":for((d=h.s[s.stream])||(d=new Zc(h.i),h.s[s.stream]=d),d.data||(d.data=new d.h.DetectionListData),d.data.reset(v.length),b=0;b<v.length;++b){y=v[b];var g=d.data,w=g.setBoundingBox,A=b,j=y.la,x=new Qc;if(Ft(x,1,j.sa),Ft(x,2,j.ta),Ft(x,3,j.height),Ft(x,4,j.width),Ft(x,5,j.rotation),Et(x,6,j.pa),j=x.l(),w.call(g,A,j),y.ea)for(g=0;g<y.ea.length;++g){x=y.ea[g],A=(w=d.data).addNormalizedLandmark,j=b,x=Object.assign({},x,{visibility:x.visibility?x.visibility:0});var E=new Lc;Ft(E,1,x.x),Ft(E,2,x.y),Ft(E,3,x.z),x.visibility&&Ft(E,4,x.visibility),x=E.l(),A.call(w,j,x)}if(y.ba)for(g=0;g<y.ba.length;++g)A=(w=d.data).addClassification,j=b,x=y.ba[g],Ft(E=new oe,2,x.qa),x.index&&Et(E,1,x.index),x.label&&Et(E,3,x.label),x.displayName&&Et(E,4,x.displayName),x=E.l(),A.call(w,j,x)}d=d.data;break t;default:d={}}}switch(c=d,f=s.stream,s.type){case"video":n.pushTexture2d(Object.assign({},c,{stream:f,timestamp:r}));break;case"detections":(l=c).stream=f,l.timestamp=r,n.pushDetectionList(l);break;default:throw Error("Unknown input config type: '"+s.type+"'")}}return h.j.send(n),m(p,h.I,4);case 4:n.delete(),p.h=0}}))},t.onResults=function(t,e){this.listeners[e||"$"]=t},Aa("Solution",be),Aa("OptionType",{BOOL:0,NUMBER:1,ua:2,0:"BOOL",1:"NUMBER",2:"STRING"}),(t=xe.prototype).close=function(){return this.h.close(),Promise.resolve()},t.onResults=function(t){this.h.onResults(t)},t.initialize=function(){var t=this;return E((function(e){return m(e,t.h.initialize(),0)}))},t.reset=function(){this.h.reset()},t.send=function(t){var e=this;return E((function(r){return m(r,e.h.send(t),0)}))},t.setOptions=function(t){this.h.setOptions(t)},Aa("SelfieSegmentation",xe),Aa("VERSION","0.1.1675465747")}).call(this)}}]); |