diff --git a/index.html b/index.html index 86758e6a..97eb304f 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,7 @@ bata stuff + no this is not ok to open if you do you will have ishoos oped at your one risk chat bot still in dev games dino game diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 00000000..854448ad --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,12 @@ +{ + "name": "fun-miles", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@nicolasroehm/ngx-retroarch": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@nicolasroehm/ngx-retroarch/-/ngx-retroarch-1.0.4.tgz", + "integrity": "sha512-JwVYQf5FAIkjzA2m37WhZnLRH1x4wKcZDHkqfbJfeaBeUTQVgN0/Dx3ebs5dQRKVe3AEPS+Fw6PwObG57q07SA==" + } + } +} diff --git a/node_modules/@nicolasroehm/ngx-retroarch/elements.js b/node_modules/@nicolasroehm/ngx-retroarch/elements.js new file mode 100644 index 00000000..c2d9e635 --- /dev/null +++ b/node_modules/@nicolasroehm/ngx-retroarch/elements.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,h={},v={};function a(e){var n=v[e];if(void 0!==n)return n.exports;var r=v[e]={id:e,loaded:!1,exports:{}};return h[e](r,r.exports,a),r.loaded=!0,r.exports}a.m=h,e=[],a.O=(n,r,f,s)=>{if(!r){var o=1/0;for(t=0;t=s)&&Object.keys(a.O).every(p=>a.O[p](r[c]))?r.splice(c--,1):(u=!1,s0&&e[t-1][2]>s;t--)e[t]=e[t-1];e[t]=[r,f,s]},a.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return a.d(n,{a:n}),n},a.d=(e,n)=>{for(var r in n)a.o(n,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},a.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),a.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={666:0};a.O.j=f=>0===e[f];var n=(f,s)=>{var c,l,[t,o,u]=s,i=0;for(c in o)a.o(o,c)&&(a.m[c]=o[c]);if(u)var d=u(a);for(f&&f(s);i{!function(X,oe){"use strict";function ge(){var e=Ue.splice(0,Ue.length);for(F=0;e.length;)e.shift().call(null,e.shift())}function ye(e,r){for(var i=0,h=e.length;i1)&&tt(this)}}}),x(o,pe,{value:function(p){-1>0,de="__"+se+dt,be="addEventListener",Le="attached",ce="Callback",me="detached",te="extends",pe="attributeChanged"+ce,vt=Le+ce,rt="connected"+ce,mt="disconnected"+ce,ze="created"+ce,kt=me+ce,ot="ADDITION",pt="REMOVAL",Oe="DOMAttrModified",bt="DOMContentLoaded",Et="DOMSubtreeModified",qe="<",st="=",Mt=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,wt=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],He=[],We=[],le="",De=A.documentElement,Ee=He.indexOf||function(e){for(var r=this.length;r--&&this[r]!==e;);return r},it=ne.prototype,Pe=it.hasOwnProperty,at=it.isPrototypeOf,Re=ne.defineProperty,Ne=[],Xe=ne.getOwnPropertyDescriptor,Y=ne.getOwnPropertyNames,Ct=ne.getPrototypeOf,Ye=ne.setPrototypeOf,Se=!!ne.__proto__,$e="__dreCEv1",Me=X.customElements,t=!/^force/.test(oe.type)&&!!(Me&&Me.define&&Me.get&&Me.whenDefined),a=ne.create||ne,u=X.Map||function(){var e,r=[],i=[];return{get:function(h){return i[Ee.call(r,h)]},set:function(h,s){(e=Ee.call(r,h))<0?i[r.push(h)-1]=s:i[e]=s}}},c=X.Promise||function(e){function r(o){for(h=!0;i.length;)i.shift()(o)}var i=[],h=!1,s={catch:function(){return s},then:function(o){return i.push(o),h&&setTimeout(r,1),s}};return e(r),s},f=!1,m=a(null),E=a(null),v=new u,C=function(e){return e.toLowerCase()},w=ne.create||function e(r){return r?(e.prototype=r,new e):this},b=Ye||(Se?function(e,r){return e.__proto__=r,e}:Y&&Xe?function(){function e(r,i){for(var h,s=Y(i),o=0,l=s.length;o
",new H(function(e,r){if(e[0]&&"childList"==e[0].type&&!e[0].removedNodes[0].childNodes.length){var i=(Ce=Xe(P,"innerHTML"))&&Ce.set;i&&Re(P,"innerHTML",{set:function(h){for(;this.lastChild;)this.removeChild(this.lastChild);i.call(this,h)}})}r.disconnect(),Ce=null}).observe(Ce,{childList:!0,subtree:!0}),Ce.innerHTML=""),ue||(Ye||Se?(we=function(e,r){at.call(r,e)||Fe(e,r)},ae=Fe):ae=we=function(e,r){e[de]||(e[de]=ne(!0),Fe(e,r))},G?(I=!1,e=Xe(P,be),r=e.value,i=function(o){var l=new CustomEvent(Oe,{bubbles:!0});l.attrName=o,l.prevValue=R.call(this,o),l.newValue=null,l[pt]=l.attrChange=2,V.call(this,o),$.call(this,l)},h=function(o,l){var d=Q.call(this,o),p=d&&R.call(this,o),y=new CustomEvent(Oe,{bubbles:!0});K.call(this,o,l),y.attrName=o,y.prevValue=d?p:null,y.newValue=l,d?y.MODIFICATION=y.attrChange=1:y[ot]=y.attrChange=0,$.call(this,y)},s=function(o){var l,d=o.currentTarget,p=d[de],y=o.propertyName;p.hasOwnProperty(y)&&(p=p[y],(l=new CustomEvent(Oe,{bubbles:!0})).attrName=p.name,l.prevValue=p.value||null,l.newValue=p.value=d[y]||null,null==l.prevValue?l[ot]=l.attrChange=0:l.MODIFICATION=l.attrChange=1,$.call(d,l))},e.value=function(o,l,d){o===Oe&&this[pe]&&this.setAttribute!==h&&(this[de]={className:{name:"class",value:this.className}},this.setAttribute=h,this.removeAttribute=i,r.call(this,"propertychange",s)),r.call(this,o,l,d)},Re(P,be,e)):H||(De[be](Oe,Te),De.setAttribute(de,1),De.removeAttribute(de),I&&(je=function(e){var r,i,h,s=this;if(s===e.target){for(h in r=s[de],s[de]=i=nt(s),i){if(!(h in r))return Be(0,s,h,r[h],i[h],ot);if(i[h]!==r[h])return Be(1,s,h,r[h],i[h],"MODIFICATION")}for(h in r)if(!(h in i))return Be(2,s,h,r[h],i[h],pt)}},Be=function(e,r,i,h,s,o){var l={attrChange:e,currentTarget:r,attrName:i,prevValue:h,newValue:s};l[o]=e,Qe(l)},nt=function(e){for(var r,i,h={},s=e.attributes,o=0,l=s.length;o$");if(r[te]="a",(e.prototype=w(S.prototype)).constructor=e,X.customElements.define(i,e,r),!h.test(A.createElement("a",{is:i}).outerHTML)||!h.test((new e).outerHTML))throw r}(function e(){return Reflect.construct(S,[],e)},{},"document-register-element-a"+dt)}catch(e){ft()}if(!oe.noBuiltIn)try{if(N.call(A,"a","a").outerHTML.indexOf("is")<0)throw{}}catch(e){C=function(r){return{is:r.toLowerCase()}}}}(window)},277:()=>{"use strict";!function(t){const a=t.performance;function u(I){a&&a.mark&&a.mark(I)}function c(I,k){a&&a.measure&&a.measure(I,k)}u("Zone");const f=t.__Zone_symbol_prefix||"__zone_symbol__";function m(I){return f+I}const E=!0===t[m("forceDuplicateZoneCheck")];if(t.Zone){if(E||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}let v=(()=>{class I{constructor(n,e){this._parent=n,this._name=e?e.name||"unnamed":"",this._properties=e&&e.properties||{},this._zoneDelegate=new w(this,this._parent&&this._parent._zoneDelegate,e)}static assertZonePatched(){if(t.Promise!==re.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let n=I.current;for(;n.parent;)n=n.parent;return n}static get current(){return F.zone}static get currentTask(){return ue}static __load_patch(n,e,r=!1){if(re.hasOwnProperty(n)){if(!r&&E)throw Error("Already loaded patch: "+n)}else if(!t["__Zone_disable_"+n]){const i="Zone:"+n;u(i),re[n]=e(t,I,Te),c(i,i)}}get parent(){return this._parent}get name(){return this._name}get(n){const e=this.getZoneWith(n);if(e)return e._properties[n]}getZoneWith(n){let e=this;for(;e;){if(e._properties.hasOwnProperty(n))return e;e=e._parent}return null}fork(n){if(!n)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,n)}wrap(n,e){if("function"!=typeof n)throw new Error("Expecting function got: "+n);const r=this._zoneDelegate.intercept(this,n,e),i=this;return function(){return i.runGuarded(r,this,arguments,e)}}run(n,e,r,i){F={parent:F,zone:this};try{return this._zoneDelegate.invoke(this,n,e,r,i)}finally{F=F.parent}}runGuarded(n,e=null,r,i){F={parent:F,zone:this};try{try{return this._zoneDelegate.invoke(this,n,e,r,i)}catch(h){if(this._zoneDelegate.handleError(this,h))throw h}}finally{F=F.parent}}runTask(n,e,r){if(n.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");if(n.state===B&&(n.type===O||n.type===j))return;const i=n.state!=Q;i&&n._transitionTo(Q,R),n.runCount++;const h=ue;ue=n,F={parent:F,zone:this};try{n.type==j&&n.data&&!n.data.isPeriodic&&(n.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,n,e,r)}catch(s){if(this._zoneDelegate.handleError(this,s))throw s}}finally{n.state!==B&&n.state!==K&&(n.type==O||n.data&&n.data.isPeriodic?i&&n._transitionTo(R,Q):(n.runCount=0,this._updateTaskCount(n,-1),i&&n._transitionTo(B,Q,B))),F=F.parent,ue=h}}scheduleTask(n){if(n.zone&&n.zone!==this){let r=this;for(;r;){if(r===n.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${n.zone.name}`);r=r.parent}}n._transitionTo($,B);const e=[];n._zoneDelegates=e,n._zone=this;try{n=this._zoneDelegate.scheduleTask(this,n)}catch(r){throw n._transitionTo(K,$,B),this._zoneDelegate.handleError(this,r),r}return n._zoneDelegates===e&&this._updateTaskCount(n,1),n.state==$&&n._transitionTo(R,$),n}scheduleMicroTask(n,e,r,i){return this.scheduleTask(new b(N,n,e,r,i,void 0))}scheduleMacroTask(n,e,r,i,h){return this.scheduleTask(new b(j,n,e,r,i,h))}scheduleEventTask(n,e,r,i,h){return this.scheduleTask(new b(O,n,e,r,i,h))}cancelTask(n){if(n.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(n.zone||z).name+"; Execution: "+this.name+")");n._transitionTo(V,R,Q);try{this._zoneDelegate.cancelTask(this,n)}catch(e){throw n._transitionTo(K,V),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(n,-1),n._transitionTo(B,V),n.runCount=0,n}_updateTaskCount(n,e){const r=n._zoneDelegates;-1==e&&(n._zoneDelegates=null);for(let i=0;iI.hasTask(n,e),onScheduleTask:(I,k,n,e)=>I.scheduleTask(n,e),onInvokeTask:(I,k,n,e,r,i)=>I.invokeTask(n,e,r,i),onCancelTask:(I,k,n,e)=>I.cancelTask(n,e)};class w{constructor(k,n,e){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=k,this._parentDelegate=n,this._forkZS=e&&(e&&e.onFork?e:n._forkZS),this._forkDlgt=e&&(e.onFork?n:n._forkDlgt),this._forkCurrZone=e&&(e.onFork?this.zone:n._forkCurrZone),this._interceptZS=e&&(e.onIntercept?e:n._interceptZS),this._interceptDlgt=e&&(e.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=e&&(e.onIntercept?this.zone:n._interceptCurrZone),this._invokeZS=e&&(e.onInvoke?e:n._invokeZS),this._invokeDlgt=e&&(e.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=e&&(e.onInvoke?this.zone:n._invokeCurrZone),this._handleErrorZS=e&&(e.onHandleError?e:n._handleErrorZS),this._handleErrorDlgt=e&&(e.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=e&&(e.onHandleError?this.zone:n._handleErrorCurrZone),this._scheduleTaskZS=e&&(e.onScheduleTask?e:n._scheduleTaskZS),this._scheduleTaskDlgt=e&&(e.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=e&&(e.onScheduleTask?this.zone:n._scheduleTaskCurrZone),this._invokeTaskZS=e&&(e.onInvokeTask?e:n._invokeTaskZS),this._invokeTaskDlgt=e&&(e.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=e&&(e.onInvokeTask?this.zone:n._invokeTaskCurrZone),this._cancelTaskZS=e&&(e.onCancelTask?e:n._cancelTaskZS),this._cancelTaskDlgt=e&&(e.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=e&&(e.onCancelTask?this.zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const r=e&&e.onHasTask;(r||n&&n._hasTaskZS)&&(this._hasTaskZS=r?e:C,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=k,e.onScheduleTask||(this._scheduleTaskZS=C,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this.zone),e.onInvokeTask||(this._invokeTaskZS=C,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this.zone),e.onCancelTask||(this._cancelTaskZS=C,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this.zone))}fork(k,n){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,k,n):new v(k,n)}intercept(k,n,e){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,k,n,e):n}invoke(k,n,e,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,k,n,e,r,i):n.apply(e,r)}handleError(k,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,k,n)}scheduleTask(k,n){let e=n;if(this._scheduleTaskZS)this._hasTaskZS&&e._zoneDelegates.push(this._hasTaskDlgtOwner),e=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,k,n),e||(e=n);else if(n.scheduleFn)n.scheduleFn(n);else{if(n.type!=N)throw new Error("Task is missing scheduleFn.");T(n)}return e}invokeTask(k,n,e,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,k,n,e,r):n.callback.apply(e,r)}cancelTask(k,n){let e;if(this._cancelTaskZS)e=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,k,n);else{if(!n.cancelFn)throw Error("Task is not cancelable");e=n.cancelFn(n)}return e}hasTask(k,n){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,k,n)}catch(e){this.handleError(k,e)}}_updateTaskCount(k,n){const e=this._taskCounts,r=e[k],i=e[k]=r+n;if(i<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=i||this.hasTask(this.zone,{microTask:e.microTask>0,macroTask:e.macroTask>0,eventTask:e.eventTask>0,change:k})}}class b{constructor(k,n,e,r,i,h){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=k,this.source=n,this.data=r,this.scheduleFn=i,this.cancelFn=h,!e)throw new Error("callback is not defined");this.callback=e;const s=this;this.invoke=k===O&&r&&r.useG?b.invokeTask:function(){return b.invokeTask.call(t,s,this,arguments)}}static invokeTask(k,n,e){k||(k=this),fe++;try{return k.runCount++,k.zone.runTask(k,n,e)}finally{1==fe&&Z(),fe--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(B,$)}_transitionTo(k,n,e){if(this._state!==n&&this._state!==e)throw new Error(`${this.type} '${this.source}': can not transition to '${k}', expecting state '${n}'${e?" or '"+e+"'":""}, was '${this._state}'.`);this._state=k,k==B&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const H=m("setTimeout"),S=m("Promise"),P=m("then");let L,G=[],x=!1;function T(I){if(0===fe&&0===G.length)if(L||t[S]&&(L=t[S].resolve(0)),L){let k=L[P];k||(k=L.then),k.call(L,Z)}else t[H](Z,0);I&&G.push(I)}function Z(){if(!x){for(x=!0;G.length;){const I=G;G=[];for(let k=0;kF,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:T,showUncaughtError:()=>!v[m("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W};let F={parent:null,zone:new v(null,null)},ue=null,fe=0;function W(){}c("Zone","Zone"),t.Zone=v}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global);const oe=Object.getOwnPropertyDescriptor,ge=Object.defineProperty,ye=Object.getPrototypeOf,_t=Object.create,Ve=Array.prototype.slice,Ie="addEventListener",Je="removeEventListener",Qe=Zone.__symbol__(Ie),et=Zone.__symbol__(Je),he="true",ve="false",Ze=Zone.__symbol__("");function Fe(t,a){return Zone.current.wrap(t,a)}function lt(t,a,u,c,f){return Zone.current.scheduleMacroTask(t,a,u,c,f)}const U=Zone.__symbol__,Ae="undefined"!=typeof window,ke=Ae?window:void 0,J=Ae&&ke||"object"==typeof self&&self||global,yt=[null];function tt(t,a){for(let u=t.length-1;u>=0;u--)"function"==typeof t[u]&&(t[u]=Fe(t[u],a+"_"+u));return t}function ft(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}const A="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,ne=!("nw"in J)&&void 0!==J.process&&"[object process]"==={}.toString.call(J.process),ht=!ne&&!A&&!(!Ae||!ke.HTMLElement),Ue=void 0!==J.process&&"[object process]"==={}.toString.call(J.process)&&!A&&!(!Ae||!ke.HTMLElement),je={},Be=function(t){if(!(t=t||J.event))return;let a=je[t.type];a||(a=je[t.type]=U("ON_PROPERTY"+t.type));const u=this||t.target||J,c=u[a];let f;if(ht&&u===ke&&"error"===t.type){const m=t;f=c&&c.call(this,m.message,m.filename,m.lineno,m.colno,m.error),!0===f&&t.preventDefault()}else f=c&&c.apply(this,arguments),null!=f&&!f&&t.preventDefault();return f};function nt(t,a,u){let c=oe(t,a);if(!c&&u&&oe(u,a)&&(c={enumerable:!0,configurable:!0}),!c||!c.configurable)return;const f=U("on"+a+"patched");if(t.hasOwnProperty(f)&&t[f])return;delete c.writable,delete c.value;const m=c.get,E=c.set,v=a.substr(2);let C=je[v];C||(C=je[v]=U("ON_PROPERTY"+v)),c.set=function(w){let b=this;!b&&t===J&&(b=J),b&&(b[C]&&b.removeEventListener(v,Be),E&&E.apply(b,yt),"function"==typeof w?(b[C]=w,b.addEventListener(v,Be,!1)):b[C]=null)},c.get=function(){let w=this;if(!w&&t===J&&(w=J),!w)return null;const b=w[C];if(b)return b;if(m){let H=m&&m.call(this);if(H)return c.set.call(this,H),"function"==typeof w.removeAttribute&&w.removeAttribute(a),H}return null},ge(t,a,c),t[f]=!0}function Ge(t,a,u){if(a)for(let c=0;cfunction(E,v){const C=u(E,v);return C.cbIdx>=0&&"function"==typeof v[C.cbIdx]?lt(C.name,v[C.cbIdx],C,f):m.apply(E,v)})}function se(t,a){t[U("OriginalDelegate")]=a}let dt=!1,de=!1;function Le(){if(dt)return de;dt=!0;try{const t=ke.navigator.userAgent;(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/")||-1!==t.indexOf("Edge/"))&&(de=!0)}catch(t){}return de}Zone.__load_patch("ZoneAwarePromise",(t,a,u)=>{const c=Object.getOwnPropertyDescriptor,f=Object.defineProperty,E=u.symbol,v=[],C=!0===t[E("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],w=E("Promise"),b=E("then");u.onUnhandledError=s=>{if(u.showUncaughtError()){const o=s&&s.rejection;o?console.error("Unhandled Promise rejection:",o instanceof Error?o.message:o,"; Zone:",s.zone.name,"; Task:",s.task&&s.task.source,"; Value:",o,o instanceof Error?o.stack:void 0):console.error(s)}},u.microtaskDrainDone=()=>{for(;v.length;){const s=v.shift();try{s.zone.runGuarded(()=>{throw s.throwOriginal?s.rejection:s})}catch(o){P(o)}}};const S=E("unhandledPromiseRejectionHandler");function P(s){u.onUnhandledError(s);try{const o=a[S];"function"==typeof o&&o.call(this,s)}catch(o){}}function G(s){return s&&s.then}function x(s){return s}function L(s){return n.reject(s)}const T=E("state"),Z=E("value"),z=E("finally"),B=E("parentPromiseValue"),$=E("parentPromiseState"),Q=null,V=!0,K=!1;function j(s,o){return l=>{try{F(s,o,l)}catch(d){F(s,!1,d)}}}const Te=E("currentTaskTrace");function F(s,o,l){const d=function(){let s=!1;return function(l){return function(){s||(s=!0,l.apply(null,arguments))}}}();if(s===l)throw new TypeError("Promise resolved with itself");if(s[T]===Q){let p=null;try{("object"==typeof l||"function"==typeof l)&&(p=l&&l.then)}catch(y){return d(()=>{F(s,!1,y)})(),s}if(o!==K&&l instanceof n&&l.hasOwnProperty(T)&&l.hasOwnProperty(Z)&&l[T]!==Q)fe(l),F(s,l[T],l[Z]);else if(o!==K&&"function"==typeof p)try{p.call(l,d(j(s,o)),d(j(s,!1)))}catch(y){d(()=>{F(s,!1,y)})()}else{s[T]=o;const y=s[Z];if(s[Z]=l,s[z]===z&&o===V&&(s[T]=s[$],s[Z]=s[B]),o===K&&l instanceof Error){const _=a.currentTask&&a.currentTask.data&&a.currentTask.data.__creationTrace__;_&&f(l,Te,{configurable:!0,enumerable:!1,writable:!0,value:_})}for(let _=0;_{try{const g=s[Z],M=!!l&&z===l[z];M&&(l[B]=g,l[$]=y);const D=o.run(_,void 0,M&&_!==L&&_!==x?[]:[g]);F(l,!0,D)}catch(g){F(l,!1,g)}},l)}const k=function(){};class n{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(o){return F(new this(null),V,o)}static reject(o){return F(new this(null),K,o)}static race(o){let l,d,p=new this((g,M)=>{l=g,d=M});function y(g){l(g)}function _(g){d(g)}for(let g of o)G(g)||(g=this.resolve(g)),g.then(y,_);return p}static all(o){return n.allWithCallback(o)}static allSettled(o){return(this&&this.prototype instanceof n?this:n).allWithCallback(o,{thenCallback:d=>({status:"fulfilled",value:d}),errorCallback:d=>({status:"rejected",reason:d})})}static allWithCallback(o,l){let d,p,y=new this((D,q)=>{d=D,p=q}),_=2,g=0;const M=[];for(let D of o){G(D)||(D=this.resolve(D));const q=g;try{D.then(ee=>{M[q]=l?l.thenCallback(ee):ee,_--,0===_&&d(M)},ee=>{l?(M[q]=l.errorCallback(ee),_--,0===_&&d(M)):p(ee)})}catch(ee){p(ee)}_++,g++}return _-=2,0===_&&d(M),y}constructor(o){const l=this;if(!(l instanceof n))throw new Error("Must be an instanceof Promise.");l[T]=Q,l[Z]=[];try{o&&o(j(l,V),j(l,K))}catch(d){F(l,!1,d)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return n}then(o,l){let d=this.constructor[Symbol.species];(!d||"function"!=typeof d)&&(d=this.constructor||n);const p=new d(k),y=a.current;return this[T]==Q?this[Z].push(y,p,o,l):W(this,y,p,o,l),p}catch(o){return this.then(null,o)}finally(o){let l=this.constructor[Symbol.species];(!l||"function"!=typeof l)&&(l=n);const d=new l(k);d[z]=z;const p=a.current;return this[T]==Q?this[Z].push(p,d,o,o):W(this,p,d,o,o),d}}n.resolve=n.resolve,n.reject=n.reject,n.race=n.race,n.all=n.all;const e=t[w]=t.Promise;t.Promise=n;const r=E("thenPatched");function i(s){const o=s.prototype,l=c(o,"then");if(l&&(!1===l.writable||!l.configurable))return;const d=o.then;o[b]=d,s.prototype.then=function(p,y){return new n((g,M)=>{d.call(this,g,M)}).then(p,y)},s[r]=!0}return u.patchThen=i,e&&(i(e),ae(t,"fetch",s=>function(s){return function(o,l){let d=s.apply(o,l);if(d instanceof n)return d;let p=d.constructor;return p[r]||i(p),d}}(s))),Promise[a.__symbol__("uncaughtPromiseErrors")]=v,n}),Zone.__load_patch("toString",t=>{const a=Function.prototype.toString,u=U("OriginalDelegate"),c=U("Promise"),f=U("Error"),m=function(){if("function"==typeof this){const w=this[u];if(w)return"function"==typeof w?a.call(w):Object.prototype.toString.call(w);if(this===Promise){const b=t[c];if(b)return a.call(b)}if(this===Error){const b=t[f];if(b)return a.call(b)}}return a.call(this)};m[u]=a,Function.prototype.toString=m;const E=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":E.call(this)}});let ce=!1;if("undefined"!=typeof window)try{const t=Object.defineProperty({},"passive",{get:function(){ce=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){ce=!1}const me={useG:!0},te={},pe={},vt=new RegExp("^"+Ze+"(\\w+)(true|false)$"),rt=U("propagationStopped");function mt(t,a){const u=(a?a(t):t)+ve,c=(a?a(t):t)+he,f=Ze+u,m=Ze+c;te[t]={},te[t][ve]=f,te[t][he]=m}function ze(t,a,u){const c=u&&u.add||Ie,f=u&&u.rm||Je,m=u&&u.listeners||"eventListeners",E=u&&u.rmAll||"removeAllListeners",v=U(c),C="."+c+":",H=function(L,T,Z){if(L.isRemoved)return;const z=L.callback;"object"==typeof z&&z.handleEvent&&(L.callback=$=>z.handleEvent($),L.originalDelegate=z),L.invoke(L,T,[Z]);const B=L.options;B&&"object"==typeof B&&B.once&&T[f].call(T,Z.type,L.originalDelegate?L.originalDelegate:L.callback,B)},S=function(L){if(!(L=L||t.event))return;const T=this||L.target||t,Z=T[te[L.type][ve]];if(Z)if(1===Z.length)H(Z[0],T,L);else{const z=Z.slice();for(let B=0;Bfunction(f,m){f[rt]=!0,c&&c.apply(f,m)})}function pt(t,a,u,c,f){const m=Zone.__symbol__(c);if(a[m])return;const E=a[m]=a[c];a[c]=function(v,C,w){return C&&C.prototype&&f.forEach(function(b){const H=`${u}.${c}::`+b,S=C.prototype;if(S.hasOwnProperty(b)){const P=t.ObjectGetOwnPropertyDescriptor(S,b);P&&P.value?(P.value=t.wrapWithCurrentZone(P.value,H),t._redefineProperty(C.prototype,b,P)):S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}else S[b]&&(S[b]=t.wrapWithCurrentZone(S[b],H))}),E.call(a,v,C,w)},t.attachOriginToPatched(a[c],E)}const Et=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],st=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],le=["load"],De=["blur","error","focus","load","resize","scroll","messageerror"],Ee=["bounce","finish","start"],it=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],Pe=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],at=["close","error","open","message"],Re=["error","message"],Ne=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],Et,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function Xe(t,a,u){if(!u||0===u.length)return a;const c=u.filter(m=>m.target===t);if(!c||0===c.length)return a;const f=c[0].ignoreProperties;return a.filter(m=>-1===f.indexOf(m))}function Y(t,a,u,c){t&&Ge(t,Xe(t,a,u),c)}Zone.__load_patch("util",(t,a,u)=>{u.patchOnProperties=Ge,u.patchMethod=ae,u.bindArguments=tt,u.patchMacroTask=Ce;const c=a.__symbol__("BLACK_LISTED_EVENTS"),f=a.__symbol__("UNPATCHED_EVENTS");t[f]&&(t[c]=t[f]),t[c]&&(a[c]=a[f]=t[c]),u.patchEventPrototype=ot,u.patchEventTarget=ze,u.isIEOrEdge=Le,u.ObjectDefineProperty=ge,u.ObjectGetOwnPropertyDescriptor=oe,u.ObjectCreate=_t,u.ArraySlice=Ve,u.patchClass=we,u.wrapWithCurrentZone=Fe,u.filterProperties=Xe,u.attachOriginToPatched=se,u._redefineProperty=Object.defineProperty,u.patchCallbacks=pt,u.getGlobalObjects=()=>({globalSources:pe,zoneSymbolEventNames:te,eventNames:Ne,isBrowser:ht,isMix:Ue,isNode:ne,TRUE_STR:he,FALSE_STR:ve,ZONE_SYMBOL_PREFIX:Ze,ADD_EVENT_LISTENER_STR:Ie,REMOVE_EVENT_LISTENER_STR:Je})});const Ye=U("zoneTask");function Se(t,a,u,c){let f=null,m=null;u+=c;const E={};function v(w){const b=w.data;return b.args[0]=function(){return w.invoke.apply(this,arguments)},b.handleId=f.apply(t,b.args),w}function C(w){return m.call(t,w.data.handleId)}f=ae(t,a+=c,w=>function(b,H){if("function"==typeof H[0]){const S={isPeriodic:"Interval"===c,delay:"Timeout"===c||"Interval"===c?H[1]||0:void 0,args:H},P=H[0];H[0]=function(){try{return P.apply(this,arguments)}finally{S.isPeriodic||("number"==typeof S.handleId?delete E[S.handleId]:S.handleId&&(S.handleId[Ye]=null))}};const G=lt(a,H[0],S,v,C);if(!G)return G;const x=G.data.handleId;return"number"==typeof x?E[x]=G:x&&(x[Ye]=G),x&&x.ref&&x.unref&&"function"==typeof x.ref&&"function"==typeof x.unref&&(G.ref=x.ref.bind(x),G.unref=x.unref.bind(x)),"number"==typeof x||x?x:G}return w.apply(t,H)}),m=ae(t,u,w=>function(b,H){const S=H[0];let P;"number"==typeof S?P=E[S]:(P=S&&S[Ye],P||(P=S)),P&&"string"==typeof P.type?"notScheduled"!==P.state&&(P.cancelFn&&P.data.isPeriodic||0===P.runCount)&&("number"==typeof S?delete E[S]:S&&(S[Ye]=null),P.zone.cancelTask(P)):w.apply(t,H)})}Zone.__load_patch("legacy",t=>{const a=t[Zone.__symbol__("legacyPatch")];a&&a()}),Zone.__load_patch("queueMicrotask",(t,a,u)=>{u.patchMethod(t,"queueMicrotask",c=>function(f,m){a.current.scheduleMicroTask("queueMicrotask",m[0])})}),Zone.__load_patch("timers",t=>{const a="set",u="clear";Se(t,a,u,"Timeout"),Se(t,a,u,"Interval"),Se(t,a,u,"Immediate")}),Zone.__load_patch("requestAnimationFrame",t=>{Se(t,"request","cancel","AnimationFrame"),Se(t,"mozRequest","mozCancel","AnimationFrame"),Se(t,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(t,a)=>{const u=["alert","prompt","confirm"];for(let c=0;cfunction(C,w){return a.current.run(m,t,w,v)})}),Zone.__load_patch("EventTarget",(t,a,u)=>{(function(t,a){a.patchEventPrototype(t,a)})(t,u),function(t,a){if(Zone[a.symbol("patchEventTarget")])return;const{eventNames:u,zoneSymbolEventNames:c,TRUE_STR:f,FALSE_STR:m,ZONE_SYMBOL_PREFIX:E}=a.getGlobalObjects();for(let C=0;C{we("MutationObserver"),we("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(t,a,u)=>{we("IntersectionObserver")}),Zone.__load_patch("FileReader",(t,a,u)=>{we("FileReader")}),Zone.__load_patch("on_property",(t,a,u)=>{!function(t,a){if(ne&&!Ue||Zone[t.symbol("patchEvents")])return;const u="undefined"!=typeof WebSocket,c=a.__Zone_ignore_on_properties;if(ht){const E=window,v=function(){try{const t=ke.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch(t){}return!1}()?[{target:E,ignoreProperties:["error"]}]:[];Y(E,Ne.concat(["messageerror"]),c&&c.concat(v),ye(E)),Y(Document.prototype,Ne,c),void 0!==E.SVGElement&&Y(E.SVGElement.prototype,Ne,c),Y(Element.prototype,Ne,c),Y(HTMLElement.prototype,Ne,c),Y(HTMLMediaElement.prototype,st,c),Y(HTMLFrameSetElement.prototype,Et.concat(De),c),Y(HTMLBodyElement.prototype,Et.concat(De),c),Y(HTMLFrameElement.prototype,le,c),Y(HTMLIFrameElement.prototype,le,c);const C=E.HTMLMarqueeElement;C&&Y(C.prototype,Ee,c);const w=E.Worker;w&&Y(w.prototype,Re,c)}const f=a.XMLHttpRequest;f&&Y(f.prototype,it,c);const m=a.XMLHttpRequestEventTarget;m&&Y(m&&m.prototype,it,c),"undefined"!=typeof IDBIndex&&(Y(IDBIndex.prototype,Pe,c),Y(IDBRequest.prototype,Pe,c),Y(IDBOpenDBRequest.prototype,Pe,c),Y(IDBDatabase.prototype,Pe,c),Y(IDBTransaction.prototype,Pe,c),Y(IDBCursor.prototype,Pe,c)),u&&Y(WebSocket.prototype,at,c)}(u,t)}),Zone.__load_patch("customElements",(t,a,u)=>{!function(t,a){const{isBrowser:u,isMix:c}=a.getGlobalObjects();(u||c)&&t.customElements&&"customElements"in t&&a.patchCallbacks(a,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(t,u)}),Zone.__load_patch("XHR",(t,a)=>{!function(w){const b=w.XMLHttpRequest;if(!b)return;const H=b.prototype;let P=H[Qe],G=H[et];if(!P){const N=w.XMLHttpRequestEventTarget;if(N){const j=N.prototype;P=j[Qe],G=j[et]}}const x="readystatechange",L="scheduled";function T(N){const j=N.data,O=j.target;O[m]=!1,O[v]=!1;const re=O[f];P||(P=O[Qe],G=O[et]),re&&G.call(O,x,re);const Te=O[f]=()=>{if(O.readyState===O.DONE)if(!j.aborted&&O[m]&&N.state===L){const ue=O[a.__symbol__("loadfalse")];if(0!==O.status&&ue&&ue.length>0){const fe=N.invoke;N.invoke=function(){const W=O[a.__symbol__("loadfalse")];for(let I=0;Ifunction(N,j){return N[c]=0==j[2],N[E]=j[1],B.apply(N,j)}),R=U("fetchTaskAborting"),Q=U("fetchTaskScheduling"),V=ae(H,"send",()=>function(N,j){if(!0===a.current[Q]||N[c])return V.apply(N,j);{const O={target:N,url:N[E],isPeriodic:!1,args:j,aborted:!1},re=lt("XMLHttpRequest.send",Z,O,T,z);N&&!0===N[v]&&!O.aborted&&re.state===L&&re.invoke()}}),K=ae(H,"abort",()=>function(N,j){const O=function(N){return N[u]}(N);if(O&&"string"==typeof O.type){if(null==O.cancelFn||O.data&&O.data.aborted)return;O.zone.cancelTask(O)}else if(!0===a.current[R])return K.apply(N,j)})}(t);const u=U("xhrTask"),c=U("xhrSync"),f=U("xhrListener"),m=U("xhrScheduled"),E=U("xhrURL"),v=U("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",t=>{t.navigator&&t.navigator.geolocation&&function(t,a){const u=t.constructor.name;for(let c=0;c{const C=function(){return v.apply(this,tt(arguments,u+"."+f))};return se(C,v),C})(m)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(t,a)=>{function u(c){return function(f){kt(t,c).forEach(E=>{const v=t.PromiseRejectionEvent;if(v){const C=new v(c,{promise:f.promise,reason:f.rejection});E.invoke(C)}})}}t.PromiseRejectionEvent&&(a[U("unhandledPromiseRejectionHandler")]=u("unhandledrejection"),a[U("rejectionHandledHandler")]=u("rejectionhandled"))})},520:(X,oe,ge)=>{"use strict";ge(277),ge(142)}},X=>{X(X.s=520)}]);(self.webpackChunkngx_retroarch=self.webpackChunkngx_retroarch||[]).push([[179],{430:cr=>{cr.exports=function Te(tt,qt,Ke){function at(lt,Ie){if(!qt[lt]){if(!tt[lt]){if(Oe)return Oe(lt,!0);var le=new Error("Cannot find module '"+lt+"'");throw le.code="MODULE_NOT_FOUND",le}var ft=qt[lt]={exports:{}};tt[lt][0].call(ft.exports,function(Ae){return at(tt[lt][1][Ae]||Ae)},ft,ft.exports,Te,tt,qt,Ke)}return qt[lt].exports}for(var Oe=void 0,Ft=0;Ft=43)}}).catch(function(){return!1})}(h).then(function(v){return Qt=v})}function nt(h){var v=Ye[h.name],p={};p.promise=new K(function(C,w){p.resolve=C,p.reject=w}),v.deferredOperations.push(p),v.dbReady=v.dbReady?v.dbReady.then(function(){return p.promise}):p.promise}function Ze(h){var p=Ye[h.name].deferredOperations.pop();if(p)return p.resolve(),p.promise}function Zt(h,v){var C=Ye[h.name].deferredOperations.pop();if(C)return C.reject(v),C.promise}function bt(h,v){return new K(function(p,C){if(Ye[h.name]=Ye[h.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},h.db){if(!v)return p(h.db);nt(h),h.db.close()}var w=[h.name];v&&w.push(h.version);var D=Ft.open.apply(Ft,w);v&&(D.onupgradeneeded=function(T){var L=D.result;try{L.createObjectStore(h.storeName),T.oldVersion<=1&&L.createObjectStore(ut)}catch(V){if("ConstraintError"!==V.name)throw V;console.warn('The database "'+h.name+'" has been upgraded from version '+T.oldVersion+" to version "+T.newVersion+', but the storage "'+h.storeName+'" already exists.')}}),D.onerror=function(T){T.preventDefault(),C(D.error)},D.onsuccess=function(){var T=D.result;T.onversionchange=function(L){L.target.close()},p(T),Ze(h)}})}function Xt(h){return bt(h,!1)}function Tn(h){return bt(h,!0)}function $t(h,v){if(!h.db)return!0;var p=!h.db.objectStoreNames.contains(h.storeName),w=h.version>h.db.version;if(h.versionh.version&&(h.version=D)}return!0}return!1}function Nn(h){return Ie([J(atob(h.data))],{type:h.type})}function zi(h){return h&&h.__local_forage_encoded_blob}function Ki(h){var v=this,p=v._initReady().then(function(){var C=Ye[v._dbInfo.name];if(C&&C.dbReady)return C.dbReady});return ft(p,h,h),p}function Ht(h,v,p,C){void 0===C&&(C=1);try{var w=h.db.transaction(h.storeName,v);p(null,w)}catch(D){if(C>0&&(!h.db||"InvalidStateError"===D.name||"NotFoundError"===D.name))return K.resolve().then(function(){if(!h.db||"NotFoundError"===D.name&&!h.db.objectStoreNames.contains(h.storeName)&&h.version<=h.db.version)return h.db&&(h.version=h.db.version+1),Tn(h)}).then(function(){return function(h){nt(h);for(var v=Ye[h.name],p=v.forages,C=0;C>4,B[w++]=(15&T)<<4|L>>2,B[w++]=(3&L)<<6|63&V;return F}function Ls(h){var C,v=new Uint8Array(h),p="";for(C=0;C>2],p+=Jt[(3&v[C])<<4|v[C+1]>>4],p+=Jt[(15&v[C+1])<<2|v[C+2]>>6],p+=Jt[63&v[C+2]];return v.length%3==2?p=p.substring(0,p.length-1)+"=":v.length%3==1&&(p=p.substring(0,p.length-2)+"=="),p}var wi={serialize:function(h,v){var p="";if(h&&(p=Ps.call(h)),h&&("[object ArrayBuffer]"===p||h.buffer&&"[object ArrayBuffer]"===Ps.call(h.buffer))){var C,w=Fr;h instanceof ArrayBuffer?(C=h,w+=hr):(C=h.buffer,"[object Int8Array]"===p?w+="si08":"[object Uint8Array]"===p?w+="ui08":"[object Uint8ClampedArray]"===p?w+="uic8":"[object Int16Array]"===p?w+="si16":"[object Uint16Array]"===p?w+="ur16":"[object Int32Array]"===p?w+="si32":"[object Uint32Array]"===p?w+="ui32":"[object Float32Array]"===p?w+="fl32":"[object Float64Array]"===p?w+="fl64":v(new Error("Failed to get type for BinaryArray"))),v(w+Ls(C))}else if("[object Blob]"===p){var D=new FileReader;D.onload=function(){var T="~~local_forage_type~"+h.type+"~"+Ls(this.result);v(Fr+gr+T)},D.readAsArrayBuffer(h)}else try{v(JSON.stringify(h))}catch(T){console.error("Couldn't convert value into a JSON string: ",h),v(null,T)}},deserialize:function(h){if(h.substring(0,fr)!==Fr)return JSON.parse(h);var C,v=h.substring(Ns),p=h.substring(fr,Ns);if(p===gr&&ea.test(v)){var w=v.match(ea);C=w[1],v=v.substring(w[0].length)}var D=Ci(v);switch(p){case hr:return D;case gr:return Ie([D],{type:C});case"si08":return new Int8Array(D);case"ui08":return new Uint8Array(D);case"uic8":return new Uint8ClampedArray(D);case"si16":return new Int16Array(D);case"ur16":return new Uint16Array(D);case"si32":return new Int32Array(D);case"ui32":return new Uint32Array(D);case"fl32":return new Float32Array(D);case"fl64":return new Float64Array(D);default:throw new Error("Unkown type: "+p)}},stringToBuffer:Ci,bufferToString:Ls};function Ti(h,v,p,C){h.executeSql("CREATE TABLE IF NOT EXISTS "+v.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],p,C)}function ve(h,v,p,C,w,D){h.executeSql(p,C,w,function(T,L){L.code===L.SYNTAX_ERR?T.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[v.storeName],function(V,F){F.rows.length?D(V,L):Ti(V,v,function(){V.executeSql(p,C,w,D)},D)},D):D(T,L)},D)}function Ji(h,v,p,C){var w=this;h=Ae(h);var D=new K(function(T,L){w.ready().then(function(){void 0===v&&(v=null);var V=v,F=w._dbInfo;F.serializer.serialize(v,function(B,q){q?L(q):F.db.transaction(function(ue){ve(ue,F,"INSERT OR REPLACE INTO "+F.storeName+" (key, value) VALUES (?, ?)",[h,B],function(){T(V)},function(Ee,Ge){L(Ge)})},function(ue){if(ue.code===ue.QUOTA_ERR){if(C>0)return void T(Ji.apply(w,[h,V,p,C-1]));L(ue)}})})}).catch(L)});return le(D,p),D}function _(h){return new K(function(v,p){h.transaction(function(C){C.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(w,D){for(var T=[],L=0;L0}var mr={_driver:"localStorageWrapper",_initStorage:function(h){var p={};if(h)for(var C in h)p[C]=h[C];return p.keyPrefix=Y(h,this._defaultConfig),oe()?(this._dbInfo=p,p.serializer=wi,K.resolve()):K.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(h){return!1}}(),iterate:function(h,v){var p=this,C=p.ready().then(function(){for(var w=p._dbInfo,D=w.keyPrefix,T=D.length,L=localStorage.length,V=1,F=0;F=0;w--){var D=localStorage.key(w);0===D.indexOf(C)&&localStorage.removeItem(D)}});return le(p,h),p},length:function(h){var p=this.keys().then(function(C){return C.length});return le(p,h),p},key:function(h,v){var p=this,C=p.ready().then(function(){var D,w=p._dbInfo;try{D=localStorage.key(h)}catch(T){D=null}return D&&(D=D.substring(w.keyPrefix.length)),D});return le(C,v),C},keys:function(h){var v=this,p=v.ready().then(function(){for(var C=v._dbInfo,w=localStorage.length,D=[],T=0;T=0;T--){var L=localStorage.key(T);0===L.indexOf(D)&&localStorage.removeItem(L)}}):K.reject("Invalid arguments"),v),w}},wt=function(v,p){return v===p||"number"==typeof v&&"number"==typeof p&&isNaN(v)&&isNaN(p)},en=function(v,p){for(var C=v.length,w=0;w{"use strict";function Mn(y,_,I,S,N,Y,Z){try{var oe=y[Y](Z),fe=oe.value}catch(De){return void I(De)}oe.done?_(fe):Promise.resolve(fe).then(S,N)}function Te(y){return function(){var _=this,I=arguments;return new Promise(function(S,N){var Y=y.apply(_,I);function Z(fe){Mn(Y,S,N,Z,oe,"next",fe)}function oe(fe){Mn(Y,S,N,Z,oe,"throw",fe)}Z(void 0)})}}function tt(y){return y.arrayBuffer?y.arrayBuffer():new Promise((_,I)=>{const S=new FileReader;S.addEventListener("loadend",()=>{_(S.result)}),S.addEventListener("error",I),S.readAsArrayBuffer(y)})}function qt(y){return Ke.apply(this,arguments)}function Ke(){return(Ke=Te(function*(y){const _=yield tt(y);return new Uint8Array(_)})).apply(this,arguments)}function at(y){return"undefined"!=typeof Blob&&y instanceof Blob}function Oe(y){return"undefined"!=typeof SharedArrayBuffer&&y instanceof SharedArrayBuffer}Wn.d(xn,{Ri:()=>Q}),cr=Wn.hmd(cr);const Ft="undefined"!=typeof process&&process.versions&&void 0!==process.versions.node&&void 0===process.versions.electron;function lt(y){return 0===y.byteOffset&&y.byteLength===y.buffer.byteLength}class Ie{constructor(_){this.typedArray=_ instanceof ArrayBuffer||Oe(_)?new Uint8Array(_):new Uint8Array(_.buffer,_.byteOffset,_.byteLength)}getLength(){var _=this;return Te(function*(){return _.typedArray.byteLength})()}read(_,I){var S=this;return Te(function*(){return new Uint8Array(S.typedArray.buffer,S.typedArray.byteOffset+_,I)})()}}class K{constructor(_){this.blob=_}getLength(){var _=this;return Te(function*(){return _.blob.size})()}read(_,I){var S=this;return Te(function*(){const N=S.blob.slice(_,_+I),Y=yield tt(N);return new Uint8Array(Y)})()}sliceAsBlob(_,I,S=""){var N=this;return Te(function*(){return N.blob.slice(_,_+I,S)})()}}function Ae(y,_){var I=y.length;if(_<=I)return y;var S=new Uint8Array(Math.max(I<<1,_));return S.set(y,0),S}function on(y,_,I,S,N,Y){for(var Z=dr,oe=J,fe=0;fe>>4;if(We<=15)Y[fe]=We,fe++;else{var Le=0,kt=0;16==We?(kt=3+Z(S,N,2),N+=2,Le=Y[fe-1]):17==We?(kt=3+Z(S,N,3),N+=3):18==We&&(kt=11+Z(S,N,7),N+=7);for(var X=fe+kt;fe>>1;YN&&(N=oe),Y++}for(;Y>1<<4|oe,De=_-oe,We=y[Y]<>>15-_]=fe,We++}function Jr(y,_){for(var I=k.rev15,S=15-_,N=0;N>>S}function dr(y,_,I){return(y[_>>>3]|y[1+(_>>>3)]<<8)>>>(7&_)&(1<>>3]|y[1+(_>>>3)]<<8|y[2+(_>>>3)]<<16)>>>(7&_)&(1<>>3]|y[1+(_>>>3)]<<8|y[2+(_>>>3)]<<16)>>>(7&_)}const k=(y=Uint16Array,_=Uint32Array,{next_code:new y(16),bl_count:new y(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new y(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new _(32),flmap:new y(512),fltree:[],fdmap:new y(32),fdtree:[],lmap:new y(32768),ltree:[],ttree:[],dmap:new y(32768),dtree:[],imap:new y(512),itree:[],rev15:new y(32768),lhst:new _(286),dhst:new _(30),ihst:new _(19),lits:new _(15e3),strt:new y(65536),prev:new y(32768)});var y,_;!function(){for(var _=0;_<32768;_++){var I=_;k.rev15[_]=((I=(4278255360&(I=(4042322160&(I=(3435973836&(I=(2863311530&I)>>>1|(1431655765&I)<<1))>>>2|(858993459&I)<<2))>>>4|(252645135&I)<<4))>>>8|(16711935&I)<<8)>>>16|I<<16)>>>17}function S(N,Y,Z){for(;0!=Y--;)N.push(0,Z)}for(_=0;_<32;_++)k.ldef[_]=k.of0[_]<<3|k.exb[_],k.ddef[_]=k.df0[_]<<4|k.dxb[_];S(k.fltree,144,8),S(k.fltree,112,9),S(k.fltree,24,7),S(k.fltree,8,8),Qt(k.fltree,9),Ye(k.fltree,9,k.flmap),Jr(k.fltree,9),S(k.fdtree,32,5),Qt(k.fdtree,5),Ye(k.fdtree,5,k.fdmap),Jr(k.fdtree,5),S(k.itree,19,0),S(k.ltree,286,0),S(k.dtree,30,0),S(k.ttree,320,0)}();const je={table:function(){for(var y=new Uint32Array(256),_=0;_<256;_++){for(var I=_,S=0;S<8;S++)1&I?I=3988292384^I>>>1:I>>>=1;y[_]=I}return y}(),update:function(y,_,I,S){for(var N=0;N>>8;return y},crc:function(y,_,I){return 4294967295^je.update(4294967295,y,_,I)}};const Ze={numWorkers:1,workerURL:"",useWorkers:!1};let Zt=0,bt=0,Xt=!0;const Tn=[],$t=[],Rn=[],Nn=new Map;function zi(y){Ss(y.target);const{id:_,error:I,data:S}=y.data,N=Nn.get(_);Nn.delete(_),I?N.reject(I):N.resolve(S)}function Ki(y){return new Promise((_,I)=>{const S=new Worker(y);S.onmessage=N=>{"start"===N.data?(S.onerror=void 0,S.onmessage=void 0,_(S)):I(new Error(`unexpected message: ${N.data}`))},S.onerror=I})}const Ht=function(){if(Ft){const{Worker:y}=function(y,_){return y.require("worker_threads")}(cr);return{createWorker:_=>Te(function*(){return new y(_)})(),addEventListener(_,I){_.on("message",S=>{I({target:_,data:S})})},terminate:_=>Te(function*(){yield _.terminate()})()}}return{createWorker:y=>Te(function*(){try{return yield Ki(y)}catch(I){console.warn("could not load worker:",y)}let _;try{const I=yield fetch(y,{mode:"cors"});if(!I.ok)throw new Error(`could not load: ${y}`);_=yield I.text(),y=URL.createObjectURL(new Blob([_],{type:"application/javascript"}));const S=yield Ki(y);return Ze.workerURL=y,S}catch(I){console.warn("could not load worker via fetch:",y)}if(void 0!==_)try{y=`data:application/javascript;base64,${btoa(_)}`;const I=yield Ki(y);return Ze.workerURL=y,I}catch(I){console.warn("could not load worker via dataURI")}throw console.warn("workers will not be used"),new Error("can not start workers")})(),addEventListener(y,_){y.addEventListener("message",_)},terminate:y=>Te(function*(){y.terminate()})()}}();function Ss(y){$t.push(y),Wi()}function qo(){return Yi.apply(this,arguments)}function Yi(){return(Yi=Te(function*(){if(0===$t.length&&bt>>2<<3));for(var Ln,mr,fe=0,De=0,We=0,Le=0,kt=0,X=0,An=0,Je=0,Fe=0;0==fe;)if(fe=S(y,Fe,1),De=S(y,Fe+1,2),Fe+=3,0!=De){if(oe&&(_=Ae(_,Je+(1<<17))),1==De&&(Ln=k.flmap,mr=k.fdmap,X=511,An=31),2==De){We=N(y,Fe,5)+257,Le=N(y,Fe+5,5)+1,kt=N(y,Fe+10,4)+4,Fe+=14;for(var rt=0;rt<38;rt+=2)k.itree[rt]=0,k.itree[rt+1]=0;var $e=1;for(rt=0;rt$e&&($e=Be)}Fe+=3*kt,Qt(k.itree,$e),Ye(k.itree,$e,k.imap),Ln=k.lmap,mr=k.dmap,Fe=Y(k.imap,(1<<$e)-1,We+Le,y,Fe,k.ttree);var yr=ut(k.ttree,0,We,k.ltree);X=(1<>>4;if(ee>>>8==0)_[Je++]=ee;else{if(256==ee)break;var Vs=Je+ee-254;if(ee>264){var tn=k.ldef[ee-257];Vs=Je+(tn>>>3)+N(y,Fe,7&tn),Fe+=7&tn}var an=mr[Z(y,Fe)&An],es=k.ddef[an>>>4],h=(es>>>4)+S(y,Fe+=15&an,15&es);for(Fe+=15&es,oe&&(_=Ae(_,Je+(1<<17)));Je>>3),en=y[wt-4]|y[wt-3]<<8;oe&&(_=Ae(_,Je+en)),_.set(new I(y.buffer,y.byteOffset+wt,en),Je),Fe=wt+en<<3,Je+=en}_.length==Je||_.slice(0,Je)})(y,_)})(y,N),S(I?new Blob([N],{type:I}):N.buffer)}function Wi(){return Ei.apply(this,arguments)}function Ei(){return(Ei=Te(function*(){if(0!==Rn.length){if(Ze.useWorkers&&Xt){const y=yield qo();if(Xt){if(y){if(0===Rn.length)return void Ss(y);const{id:_,src:I,uncompressedSize:S,type:N,resolve:Y,reject:Z}=Rn.shift();Nn.set(_,{id:_,resolve:Y,reject:Z}),y.postMessage({type:"inflate",data:{id:_,type:N,src:I,uncompressedSize:S}},[])}return}}for(;Rn.length;){const{src:y,uncompressedSize:_,type:I,resolve:S}=Rn.shift();let N=y;at(y)&&(N=yield qt(y)),Os(N,_,I,S)}}})).apply(this,arguments)}function xs(y,_,I){return new Promise((S,N)=>{Rn.push({src:y,uncompressedSize:_,type:I,resolve:S,reject:N,id:Zt++}),Wi()})}class Jo{constructor(_,I){this._reader=_,this._rawEntry=I,this.name=I.name,this.nameBytes=I.nameBytes,this.size=I.uncompressedSize,this.compressedSize=I.compressedSize,this.comment=I.comment,this.commentBytes=I.commentBytes,this.compressionMethod=I.compressionMethod,this.lastModDate=function(y,_){return new Date(1980+(y>>9&127),(y>>5&15)-1,31&y,_>>11&31,_>>5&63,2*(31&_),0)}(I.lastModFileDate,I.lastModFileTime),this.isDirectory=0===I.uncompressedSize&&I.name.endsWith("/"),this.encrypted=!!(1&I.generalPurposeBitFlag)}blob(_="application/octet-stream"){var I=this;return Te(function*(){return yield function(y,_,I){return de.apply(this,arguments)}(I._reader,I._rawEntry,_)})()}arrayBuffer(){var _=this;return Te(function*(){return yield function(y,_){return ve.apply(this,arguments)}(_._reader,_._rawEntry)})()}text(){var _=this;return Te(function*(){const I=yield _.arrayBuffer();return pr(new Uint8Array(I))})()}json(){var _=this;return Te(function*(){const I=yield _.text();return JSON.parse(I)})()}}const ea=101010256,Fr=101075792;function fr(y,_,I){return hr.apply(this,arguments)}function hr(){return(hr=Te(function*(y,_,I){return yield y.read(_,I)})).apply(this,arguments)}function gr(y,_,I,S){return bi.apply(this,arguments)}function bi(){return(bi=Te(function*(y,_,I,S){return y.sliceAsBlob?yield y.sliceAsBlob(_,I,S):yield y.read(_,I)})).apply(this,arguments)}const Ms_unsigned=()=>0;function Dt(y,_){return y[_]+256*y[_+1]}function Ct(y,_){return y[_]+256*y[_+1]+65536*y[_+2]+16777216*y[_+3]}function Pn(y,_){return Ct(y,_)+4294967296*Ct(y,_+4)}const Qi=new TextDecoder;function pr(y,_){return Oe(y.buffer)&&(y=new Uint8Array(y)),Qi.decode(y)}function Rs(y,_){return Di.apply(this,arguments)}function Di(){return(Di=Te(function*(y,_){const I=Math.min(65557,_),S=_-I,N=yield fr(y,S,I);for(let Y=I-22;Y>=0;--Y){if(Ct(N,Y)!==ea)continue;const Z=new Uint8Array(N.buffer,N.byteOffset+Y,N.byteLength-Y),oe=Dt(Z,4);if(0!==oe)throw new Error(`multi-volume zip files are not supported. This is volume: ${oe}`);const fe=Dt(Z,10),De=Ct(Z,12),We=Ct(Z,16),Le=Dt(Z,20),kt=Z.length-22;if(Le!==kt)throw new Error(`invalid comment length. expected: ${kt}, actual: ${Le}`);const X=new Uint8Array(Z.buffer,Z.byteOffset+22,Le),An=pr(X);return 65535===fe||4294967295===We?yield Ps(y,S+Y,An,X):yield Fs(y,We,De,fe,An,X)}throw new Error("could not find end of central directory. maybe not zip file")})).apply(this,arguments)}const Ns=117853008;function Ps(y,_,I,S){return Ci.apply(this,arguments)}function Ci(){return(Ci=Te(function*(y,_,I,S){const N=_-20,Y=yield fr(y,N,20);if(Ct(Y,0)!==Ns)throw new Error("invalid zip64 end of central directory locator signature");const Z=Pn(Y,8),oe=yield fr(y,Z,56);if(Ct(oe,0)!==Fr)throw new Error("invalid zip64 end of central directory record signature");const fe=Pn(oe,32),De=Pn(oe,40);return Fs(y,Pn(oe,48),De,fe,I,S)})).apply(this,arguments)}function Fs(y,_,I,S,N,Y){return Zi.apply(this,arguments)}function Zi(){return(Zi=Te(function*(y,_,I,S,N,Y){let Z=0;const oe=yield fr(y,_,I),fe=[];for(let We=0;WeFe.length)throw new Error("extra field length exceeds extra field buffer size");X.extraFields.push({id:wt,data:Fe.slice(rt,$e)}),Ln=$e}if(X.commentBytes=An.slice(Je,Je+X.fileCommentLength),X.comment=pr(X.commentBytes),Z+=An.length,4294967295===X.uncompressedSize||4294967295===X.compressedSize||4294967295===X.relativeOffsetOfLocalHeader){const wt=X.extraFields.find($e=>1===$e.id);if(!wt)return new Error("expected zip64 extended information extra field");const en=wt.data;let rt=0;if(4294967295===X.uncompressedSize){if(rt+8>en.length)throw new Error("zip64 extended information extra field does not include uncompressed size");X.uncompressedSize=Pn(en,rt),rt+=8}if(4294967295===X.compressedSize){if(rt+8>en.length)throw new Error("zip64 extended information extra field does not include compressed size");X.compressedSize=Pn(en,rt),rt+=8}if(4294967295===X.relativeOffsetOfLocalHeader){if(rt+8>en.length)throw new Error("zip64 extended information extra field does not include relative header offset");X.relativeOffsetOfLocalHeader=Pn(en,rt),rt+=8}}const mr=X.extraFields.find(wt=>28789===wt.id&&wt.data.length>=6&&1===wt.data[0]&&Ct(wt.data,1),Ms_unsigned(X.nameBytes));if(mr&&(X.fileName=pr(mr.data.slice(5))),0===X.compressionMethod){let wt=X.uncompressedSize;if(0!=(1&X.generalPurposeBitFlag)&&(wt+=12),X.compressedSize!==wt)throw new Error(`compressed size mismatch for stored file: ${X.compressedSize} != ${wt}`)}fe.push(X)}return{zip:{comment:N,commentBytes:Y},entries:fe.map(We=>new Jo(y,We))}})).apply(this,arguments)}function wi(y,_){return Ti.apply(this,arguments)}function Ti(){return(Ti=Te(function*(y,_){if(1&_.generalPurposeBitFlag)throw new Error("encrypted entries not supported");const I=yield fr(y,_.relativeOffsetOfLocalHeader,30),S=yield y.getLength(),N=Ct(I,0);if(67324752!==N)throw new Error(`invalid local file header signature: 0x${N.toString(16)}`);const Y=Dt(I,26),Z=Dt(I,28),oe=_.relativeOffsetOfLocalHeader+I.length+Y+Z;let fe;if(0===_.compressionMethod)fe=!1;else{if(8!==_.compressionMethod)throw new Error(`unsupported compression method: ${_.compressionMethod}`);fe=!0}const De=oe;if(0!==_.compressedSize&&De+_.compressedSize>S)throw new Error(`file data overflows file bounds: ${De} + ${_.compressedSize} > ${S}`);return{decompress:fe,fileDataStart:De}})).apply(this,arguments)}function ve(){return(ve=Te(function*(y,_){const{decompress:I,fileDataStart:S}=yield wi(y,_);if(!I){const Z=yield fr(y,S,_.compressedSize);return lt(Z)?Z.buffer:Z.slice().buffer}const N=yield gr(y,S,_.compressedSize);return yield xs(N,_.uncompressedSize)})).apply(this,arguments)}function de(){return(de=Te(function*(y,_,I){const{decompress:S,fileDataStart:N}=yield wi(y,_);if(!S){const oe=yield gr(y,N,_.compressedSize,I);return at(oe)?oe:new Blob([Oe(oe.buffer)?new Uint8Array(oe):oe],{type:I})}const Y=yield gr(y,N,_.compressedSize);return yield xs(Y,_.uncompressedSize,I)})).apply(this,arguments)}function na(y){return ti.apply(this,arguments)}function ti(){return(ti=Te(function*(y){let _;if("undefined"!=typeof Blob&&y instanceof Blob)_=new K(y);else if(y instanceof ArrayBuffer||y&&y.buffer&&y.buffer instanceof ArrayBuffer)_=new Ie(y);else if(Oe(y)||Oe(y.buffer))_=new Ie(y);else if("string"==typeof y){const S=yield fetch(y);if(!S.ok)throw new Error(`failed http request ${y}, status: ${S.status}: ${S.statusText}`);const N=yield S.blob();_=new K(N)}else{if("function"!=typeof y.getLength||"function"!=typeof y.read)throw new Error("unsupported source type");_=y}const I=yield _.getLength();if(I>Number.MAX_SAFE_INTEGER)throw new Error(`file too large. size: ${I}. Only file sizes up 4503599627370496 bytes are supported`);return yield Rs(_,I)})).apply(this,arguments)}function Q(y){return Ai.apply(this,arguments)}function Ai(){return(Ai=Te(function*(y){const{zip:_,entries:I}=yield na(y);return{zip:_,entries:Object.fromEntries(I.map(S=>[S.name,S]))}})).apply(this,arguments)}},955:(cr,xn,Wn)=>{"use strict";function Mn(e){return"function"==typeof e}let Te=!1;const tt={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else Te&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Te=e},get useDeprecatedSynchronousErrorHandling(){return Te}};function qt(e){setTimeout(()=>{throw e},0)}const Ke={closed:!0,next(e){},error(e){if(tt.useDeprecatedSynchronousErrorHandling)throw e;qt(e)},complete(){}},at=Array.isArray||(e=>e&&"number"==typeof e.length);function Oe(e){return null!==e&&"object"==typeof e}const lt=(()=>{function e(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((n,r)=>`${r+1}) ${n.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return e.prototype=Object.create(Error.prototype),e})();class Ie{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let t;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:r,_unsubscribe:i,_subscriptions:s}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof Ie)n.remove(this);else if(null!==n)for(let o=0;ot.concat(n instanceof lt?n.errors:n),[])}Ie.EMPTY=((e=new Ie).closed=!0,e);const le="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class Ae extends Ie{constructor(t,n,r){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Ke;break;case 1:if(!t){this.destination=Ke;break}if("object"==typeof t){t instanceof Ae?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new on(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new on(this,t,n,r)}}[le](){return this}static create(t,n,r){const i=new Ae(t,n,r);return i.syncErrorThrowable=!1,i}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class on extends Ae{constructor(t,n,r,i){super(),this._parentSubscriber=t;let s,o=this;Mn(n)?s=n:n&&(s=n.next,r=n.error,i=n.complete,n!==Ke&&(o=Object.create(n),Mn(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=s,this._error=r,this._complete=i}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:n}=this;tt.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?this.__tryOrSetError(n,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:n}=this,{useDeprecatedSynchronousErrorHandling:r}=tt;if(this._error)r&&n.syncErrorThrowable?(this.__tryOrSetError(n,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(n.syncErrorThrowable)r?(n.syncErrorValue=t,n.syncErrorThrown=!0):qt(t),this.unsubscribe();else{if(this.unsubscribe(),r)throw t;qt(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const n=()=>this._complete.call(this._context);tt.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,n){try{t.call(this._context,n)}catch(r){if(this.unsubscribe(),tt.useDeprecatedSynchronousErrorHandling)throw r;qt(r)}}__tryOrSetError(t,n,r){if(!tt.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,r)}catch(i){return tt.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=i,t.syncErrorThrown=!0,!0):(qt(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const Ye="function"==typeof Symbol&&Symbol.observable||"@@observable";function Jr(e){return e}let J=(()=>{class e{constructor(n){this._isScalar=!1,n&&(this._subscribe=n)}lift(n){const r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,i){const{operator:s}=this,o=function(e,t,n){if(e){if(e instanceof Ae)return e;if(e[le])return e[le]()}return e||t||n?new Ae(e,t,n):new Ae(Ke)}(n,r,i);if(o.add(s?s.call(o,this.source):this.source||tt.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),tt.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o}_trySubscribe(n){try{return this._subscribe(n)}catch(r){tt.useDeprecatedSynchronousErrorHandling&&(n.syncErrorThrown=!0,n.syncErrorValue=r),function(e){for(;e;){const{closed:t,destination:n,isStopped:r}=e;if(t||r)return!1;e=n&&n instanceof Ae?n:null}return!0}(n)?n.error(r):console.warn(r)}}forEach(n,r){return new(r=k(r))((i,s)=>{let o;o=this.subscribe(a=>{try{n(a)}catch(l){s(l),o&&o.unsubscribe()}},s,i)})}_subscribe(n){const{source:r}=this;return r&&r.subscribe(n)}[Ye](){return this}pipe(...n){return 0===n.length?this:function(e){return 0===e.length?Jr:1===e.length?e[0]:function(n){return e.reduce((r,i)=>i(r),n)}}(n)(this)}toPromise(n){return new(n=k(n))((r,i)=>{let s;this.subscribe(o=>s=o,o=>i(o),()=>r(s))})}}return e.create=t=>new e(t),e})();function k(e){if(e||(e=tt.Promise||Promise),!e)throw new Error("no Promise impl found");return e}const nt=(()=>{function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e})();class Ze extends Ie{constructor(t,n){super(),this.subject=t,this.subscriber=n,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,n=t.observers;if(this.subject=null,!n||0===n.length||t.isStopped||t.closed)return;const r=n.indexOf(this.subscriber);-1!==r&&n.splice(r,1)}}class Zt extends Ae{constructor(t){super(t),this.destination=t}}let bt=(()=>{class e extends J{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[le](){return new Zt(this)}lift(n){const r=new Xt(this,this);return r.operator=n,r}next(n){if(this.closed)throw new nt;if(!this.isStopped){const{observers:r}=this,i=r.length,s=r.slice();for(let o=0;onew Xt(t,n),e})();class Xt extends bt{constructor(t,n){super(),this.destination=t,this.source=n}next(t){const{destination:n}=this;n&&n.next&&n.next(t)}error(t){const{destination:n}=this;n&&n.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:n}=this;return n?this.source.subscribe(t):Ie.EMPTY}}function Tn(e){return e&&"function"==typeof e.schedule}function $t(e,t){return function(r){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new Rn(e,t))}}class Rn{constructor(t,n){this.project=t,this.thisArg=n}call(t,n){return n.subscribe(new Nn(t,this.project,this.thisArg))}}class Nn extends Ae{constructor(t,n,r){super(t),this.project=n,this.count=0,this.thisArg=r||this}_next(t){let n;try{n=this.project.call(this.thisArg,t,this.count++)}catch(r){return void this.destination.error(r)}this.destination.next(n)}}const zi=e=>t=>{for(let n=0,r=e.length;ne&&"number"==typeof e.length&&"function"!=typeof e;function Wi(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}const Ei=e=>{if(e&&"function"==typeof e[Ye])return(e=>t=>{const n=e[Ye]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(t)})(e);if(Os(e))return zi(e);if(Wi(e))return(e=>t=>(e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,qt),t))(e);if(e&&"function"==typeof e[Ht])return(e=>t=>{const n=e[Ht]();for(;;){let r;try{r=n.next()}catch(i){return t.error(i),t}if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t})(e);{const n=`You provided ${Oe(e)?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(n)}};function ei(e,t){return new J(n=>{const r=new Ie;let i=0;return r.add(t.schedule(function(){i!==e.length?(n.next(e[i++]),n.closed||r.add(this.schedule())):n.complete()})),r})}function Jt(e,t){return t?function(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[Ye]}(e))return function(e,t){return new J(n=>{const r=new Ie;return r.add(t.schedule(()=>{const i=e[Ye]();r.add(i.subscribe({next(s){r.add(t.schedule(()=>n.next(s)))},error(s){r.add(t.schedule(()=>n.error(s)))},complete(){r.add(t.schedule(()=>n.complete()))}}))})),r})}(e,t);if(Wi(e))return function(e,t){return new J(n=>{const r=new Ie;return r.add(t.schedule(()=>e.then(i=>{r.add(t.schedule(()=>{n.next(i),r.add(t.schedule(()=>n.complete()))}))},i=>{r.add(t.schedule(()=>n.error(i)))}))),r})}(e,t);if(Os(e))return ei(e,t);if(function(e){return e&&"function"==typeof e[Ht]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new J(n=>{const r=new Ie;let i;return r.add(()=>{i&&"function"==typeof i.return&&i.return()}),r.add(t.schedule(()=>{i=e[Ht](),r.add(t.schedule(function(){if(n.closed)return;let s,o;try{const a=i.next();s=a.value,o=a.done}catch(a){return void n.error(a)}o?n.complete():(n.next(s),this.schedule())}))})),r})}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}(e,t):e instanceof J?e:new J(Ei(e))}class qi extends Ae{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class Fr extends Ae{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function hr(e,t){if(t.closed)return;if(e instanceof J)return e.subscribe(t);let n;try{n=Ei(e)(t)}catch(r){t.error(r)}return n}function gr(e,t,n=Number.POSITIVE_INFINITY){return"function"==typeof t?r=>r.pipe(gr((i,s)=>Jt(e(i,s)).pipe($t((o,a)=>t(i,o,s,a))),n)):("number"==typeof t&&(n=t),r=>r.lift(new bi(e,n)))}class bi{constructor(t,n=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=n}call(t,n){return n.subscribe(new Ms(t,this.project,this.concurrent))}}class Ms extends Fr{constructor(t,n,r=Number.POSITIVE_INFINITY){super(t),this.project=n,this.concurrent=r,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function Ct(e=Number.POSITIVE_INFINITY){return gr(Jr,e)}function Pn(e,t){return t?ei(e,t):new J(zi(e))}function Qi(...e){let t=Number.POSITIVE_INFINITY,n=null,r=e[e.length-1];return Tn(r)?(n=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(t=e.pop())):"number"==typeof r&&(t=e.pop()),null===n&&1===e.length&&e[0]instanceof J?e[0]:Ct(t)(Pn(e,n))}function pr(){return function(t){return t.lift(new Rs(t))}}class Rs{constructor(t){this.connectable=t}call(t,n){const{connectable:r}=this;r._refCount++;const i=new Di(t,r),s=n.subscribe(i);return i.closed||(i.connection=r.connect()),s}}class Di extends Ae{constructor(t,n){super(t),this.connectable=n}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const n=t._refCount;if(n<=0)return void(this.connection=null);if(t._refCount=n-1,n>1)return void(this.connection=null);const{connection:r}=this,i=t._connection;this.connection=null,i&&(!r||i===r)&&i.unsubscribe()}}class Ns extends J{constructor(t,n){super(),this.source=t,this.subjectFactory=n,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new Ie,t.add(this.source.subscribe(new Ci(this.getSubject(),this))),t.closed&&(this._connection=null,t=Ie.EMPTY)),t}refCount(){return pr()(this)}}const Ps=(()=>{const e=Ns.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:e._subscribe},_isComplete:{value:e._isComplete,writable:!0},getSubject:{value:e.getSubject},connect:{value:e.connect},refCount:{value:e.refCount}}})();class Ci extends Zt{constructor(t,n){super(t),this.connectable=n}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const n=t._connection;t._refCount=0,t._subject=null,t._connection=null,n&&n.unsubscribe()}}}function Ti(){return new bt}function ve(e){for(let t in e)if(e[t]===ve)return t;throw Error("Could not find renamed property on target object.")}function de(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(de).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function Ji(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}const na=ve({__forward_ref__:ve});function ti(e){return e.__forward_ref__=ti,e.toString=function(){return de(this())},e}function Q(e){return Ai(e)?e():e}function Ai(e){return"function"==typeof e&&e.hasOwnProperty(na)&&e.__forward_ref__===ti}class y extends Error{constructor(t,n){super(function(e,t){return`${e?`NG0${e}: `:""}${t}`}(t,n)),this.code=t}}function S(e){return"string"==typeof e?e:null==e?"":String(e)}function N(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():S(e)}function fe(e,t){const n=t?` in ${t}`:"";throw new y("201",`No provider for ${N(e)} found${n}`)}function $e(e,t){null==e&&function(e,t,n,r){throw new Error(`ASSERTION ERROR: ${e}`+(null==r?"":` [Expected=> ${n} ${r} ${t} <=Actual]`))}(t,e,null,"!=")}function ee(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function tn(e){return{providers:e.providers||[],imports:e.imports||[]}}function an(e){return Bs(e,p)||Bs(e,w)}function Bs(e,t){return e.hasOwnProperty(t)?e[t]:null}function v(e){return e&&(e.hasOwnProperty(C)||e.hasOwnProperty(D))?e[C]:null}const p=ve({\u0275prov:ve}),C=ve({\u0275inj:ve}),w=ve({ngInjectableDef:ve}),D=ve({ngInjectorDef:ve});var T=(()=>((T=T||{})[T.Default=0]="Default",T[T.Host=1]="Host",T[T.Self=2]="Self",T[T.SkipSelf=4]="SkipSelf",T[T.Optional=8]="Optional",T))();let L;function F(e){const t=L;return L=e,t}function B(e,t,n){const r=an(e);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:n&T.Optional?null:void 0!==t?t:void fe(de(e),"Injector")}function ue(e){return{toString:e}.toString()}var Ee=(()=>((Ee=Ee||{})[Ee.OnPush=0]="OnPush",Ee[Ee.Default=1]="Default",Ee))(),be=(()=>((be=be||{})[be.Emulated=0]="Emulated",be[be.None=2]="None",be[be.ShadowDom=3]="ShadowDom",be))();const In="undefined"!=typeof globalThis&&globalThis,ts="undefined"!=typeof window&&window,ra="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Vc="undefined"!=typeof global&&global,Re=In||Vc||ts||ra,Si={},He=[],vl=ve({\u0275cmp:ve}),Bc=ve({\u0275dir:ve}),Uc=ve({\u0275pipe:ve}),Gg=ve({\u0275mod:ve}),ww=ve({\u0275loc:ve}),ni=ve({\u0275fac:ve}),ia=ve({__NG_ELEMENT_ID__:ve});let Tw=0;function ri(e){return ue(()=>{const n={},r={type:e.type,providersResolver:null,decls:e.decls,vars:e.vars,factory:null,template:e.template||null,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:n,inputs:null,outputs:null,exportAs:e.exportAs||null,onPush:e.changeDetection===Ee.OnPush,directiveDefs:null,pipeDefs:null,selectors:e.selectors||He,viewQuery:e.viewQuery||null,features:e.features||null,data:e.data||{},encapsulation:e.encapsulation||be.Emulated,id:"c",styles:e.styles||He,_:null,setInput:null,schemas:e.schemas||null,tView:null},i=e.directives,s=e.features,o=e.pipes;return r.id+=Tw++,r.inputs=Xg(e.inputs,n),r.outputs=Xg(e.outputs),s&&s.forEach(a=>a(r)),r.directiveDefs=i?()=>("function"==typeof i?i():i).map(qg):null,r.pipeDefs=o?()=>("function"==typeof o?o():o).map(Qg):null,r})}function qg(e){return mn(e)||function(e){return e[Bc]||null}(e)}function Qg(e){return function(e){return e[Uc]||null}(e)}const Zg={};function ii(e){return ue(()=>{const t={type:e.type,bootstrap:e.bootstrap||He,declarations:e.declarations||He,imports:e.imports||He,exports:e.exports||He,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null};return null!=e.id&&(Zg[e.id]=e.type),t})}function Xg(e,t){if(null==e)return Si;const n={};for(const r in e)if(e.hasOwnProperty(r)){let i=e[r],s=i;Array.isArray(i)&&(s=i[1],i=i[0]),n[i]=r,t&&(t[i]=s)}return n}const Fn=ri;function pn(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,onDestroy:e.type.prototype.ngOnDestroy||null}}function mn(e){return e[vl]||null}function Gn(e,t){const n=e[Gg]||null;if(!n&&!0===t)throw new Error(`Type ${de(e)} does not have '\u0275mod' property.`);return n}function kr(e){return Array.isArray(e)&&"object"==typeof e[1]}function vr(e){return Array.isArray(e)&&!0===e[1]}function Hc(e){return 0!=(8&e.flags)}function Cl(e){return 2==(2&e.flags)}function wl(e){return 1==(1&e.flags)}function Er(e){return null!==e.template}function Rw(e){return 0!=(512&e[2])}function os(e,t){return e.hasOwnProperty(ni)?e[ni]:null}class Kc{constructor(t,n,r){this.previousValue=t,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}}function ep(e){return e.type.prototype.ngOnChanges&&(e.setInput=Fw),Lw}function Lw(){const e=np(this),t=null==e?void 0:e.current;if(t){const n=e.previous;if(n===Si)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function Fw(e,t,n,r){const i=np(e)||function(e,t){return e[tp]=t}(e,{previous:Si,current:null}),s=i.current||(i.current={}),o=i.previous,a=this.declaredInputs[n],l=o[a];s[a]=new Kc(l&&l.currentValue,t,o===Si),e[r]=t}const tp="__ngSimpleChanges__";function np(e){return e[tp]||null}const rp="http://www.w3.org/2000/svg";let Wc;function mt(e){return!!e.listen}const sp={createRenderer:(e,t)=>void 0!==Wc?Wc:"undefined"!=typeof document?document:void 0};function Mt(e){for(;Array.isArray(e);)e=e[0];return e}function Al(e,t){return Mt(t[e])}function Zn(e,t){return Mt(t[e.index])}function qc(e,t){return e.data[t]}function zs(e,t){return e[t]}function Vn(e,t){const n=t[e];return kr(n)?n:n[0]}function op(e){return 4==(4&e[2])}function Qc(e){return 128==(128&e[2])}function xi(e,t){return null==t?null:e[t]}function ap(e){e[18]=0}function Zc(e,t){e[5]+=t;let n=e,r=e[3];for(;null!==r&&(1===t&&1===n[5]||-1===t&&0===n[5]);)r[5]+=t,n=r,r=r[3]}const he={lFrame:pp(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function lp(){return he.bindingsEnabled}function P(){return he.lFrame.lView}function Ne(){return he.lFrame.tView}function nn(e){return he.lFrame.contextLView=e,e[8]}function Vt(){let e=up();for(;null!==e&&64===e.type;)e=e.parent;return e}function up(){return he.lFrame.currentTNode}function Vr(e,t){const n=he.lFrame;n.currentTNode=e,n.isParent=t}function Xc(){return he.lFrame.isParent}function Il(){return he.isInCheckNoChangesMode}function Sl(e){he.isInCheckNoChangesMode=e}function yn(){const e=he.lFrame;let t=e.bindingRootIndex;return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Br(){return he.lFrame.bindingIndex}function Ks(){return he.lFrame.bindingIndex++}function si(e){const t=he.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function Zw(e,t){const n=he.lFrame;n.bindingIndex=n.bindingRootIndex=e,ed(t)}function ed(e){he.lFrame.currentDirectiveIndex=e}function fp(){return he.lFrame.currentQueryIndex}function nd(e){he.lFrame.currentQueryIndex=e}function Jw(e){const t=e[1];return 2===t.type?t.declTNode:1===t.type?e[6]:null}function hp(e,t,n){if(n&T.SkipSelf){let i=t,s=e;for(;!(i=i.parent,null!==i||n&T.Host||(i=Jw(s),null===i||(s=s[15],10&i.type))););if(null===i)return!1;t=i,e=s}const r=he.lFrame=gp();return r.currentTNode=t,r.lView=e,!0}function Ol(e){const t=gp(),n=e[1];he.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function gp(){const e=he.lFrame,t=null===e?null:e.child;return null===t?pp(e):t}function pp(e){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=t),t}function mp(){const e=he.lFrame;return he.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const yp=mp;function xl(){const e=mp();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function _n(){return he.lFrame.selectedIndex}function Mi(e){he.lFrame.selectedIndex=e}function It(){he.lFrame.currentNamespace=rp}function Xn(){he.lFrame.currentNamespace=null}function Ml(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n=r)break}else t[l]<0&&(e[18]+=65536),(a>11>16&&(3&e[2])===t){e[2]+=2048;try{s.call(a)}finally{}}}else try{s.call(a)}finally{}}class ua{constructor(t,n,r){this.factory=t,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=r}}function Pl(e,t,n){const r=mt(e);let i=0;for(;it){o=s-1;break}}}for(;s>16}(e),r=t;for(;n>0;)r=r[15],n--;return r}let od=!0;function Fl(e){const t=od;return od=e,t}let fT=0;function da(e,t){const n=ld(e,t);if(-1!==n)return n;const r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,ad(r.data,e),ad(t,null),ad(r.blueprint,null));const i=kl(e,t),s=e.injectorIndex;if(bp(i)){const o=Ys(i),a=Ws(i,t),l=a[1].data;for(let u=0;u<8;u++)t[s+u]=a[o+u]|l[o+u]}return t[s+8]=i,s}function ad(e,t){e.push(0,0,0,0,0,0,0,0,t)}function ld(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function kl(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;null!==i;){const s=i[1],o=s.type;if(r=2===o?s.declTNode:1===o?i[6]:null,null===r)return-1;if(n++,i=i[15],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return-1}function Vl(e,t,n){!function(e,t,n){let r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(ia)&&(r=n[ia]),null==r&&(r=n[ia]=fT++);const i=255&r;t.data[e+(i>>5)]|=1<=0?255&t:pT:t}(n);if("function"==typeof s){if(!hp(t,e,r))return r&T.Host?wp(i,n,r):Tp(t,n,r,i);try{const o=s(r);if(null!=o||r&T.Optional)return o;fe(n)}finally{yp()}}else if("number"==typeof s){let o=null,a=ld(e,t),l=-1,u=r&T.Host?t[16][6]:null;for((-1===a||r&T.SkipSelf)&&(l=-1===a?kl(e,t):t[a+8],-1!==l&&Op(r,!1)?(o=t[1],a=Ys(l),t=Ws(l,t)):a=-1);-1!==a;){const c=t[1];if(Sp(s,a,c.data)){const d=mT(a,t,n,o,r,u);if(d!==Ip)return d}l=t[a+8],-1!==l&&Op(r,t[1].data[a+8]===u)&&Sp(s,a,t)?(o=c,a=Ys(l),t=Ws(l,t)):a=-1}}}return Tp(t,n,r,i)}const Ip={};function pT(){return new Gs(Vt(),P())}function mT(e,t,n,r,i,s){const o=t[1],a=o.data[e+8],c=Bl(a,o,n,null==r?Cl(a)&&od:r!=o&&0!=(3&a.type),i&T.Host&&s===a);return null!==c?fa(t,o,c,a):Ip}function Bl(e,t,n,r,i){const s=e.providerIndexes,o=t.data,a=1048575&s,l=e.directiveStart,c=s>>20,f=i?a+c:e.directiveEnd;for(let g=r?a:a+c;g=l&&m.type===n)return g}if(i){const g=o[l];if(g&&Er(g)&&g.type===n)return l}return null}function fa(e,t,n,r){let i=e[n];const s=t.data;if(function(e){return e instanceof ua}(i)){const o=i;o.resolving&&function(e,t){throw new y("200",`Circular dependency in DI detected for ${e}`)}(N(s[n]));const a=Fl(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?F(o.injectImpl):null;hp(e,r,T.Default);try{i=e[n]=o.factory(void 0,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&function(e,t,n){const{ngOnChanges:r,ngOnInit:i,ngDoCheck:s}=t.type.prototype;if(r){const o=ep(t);(n.preOrderHooks||(n.preOrderHooks=[])).push(e,o),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,o)}i&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-e,i),s&&((n.preOrderHooks||(n.preOrderHooks=[])).push(e,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,s))}(n,s[n],t)}finally{null!==l&&F(l),Fl(a),o.resolving=!1,yp()}}return i}function Sp(e,t,n){return!!(n[t+(e>>5)]&1<{const t=e.prototype.constructor,n=t[ni]||ud(t),r=Object.prototype;let i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){const s=i[ni]||ud(i);if(s&&s!==n)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function ud(e){return Ai(e)?()=>{const t=ud(Q(e));return t&&t()}:os(e)}const Qs="__parameters__";function as(e,t,n){return ue(()=>{const r=function(e){return function(...n){if(e){const r=e(...n);for(const i in r)this[i]=r[i]}}}(t);function i(...s){if(this instanceof i)return r.apply(this,s),this;const o=new i(...s);return a.annotation=o,a;function a(l,u,c){const d=l.hasOwnProperty(Qs)?l[Qs]:Object.defineProperty(l,Qs,{value:[]})[Qs];for(;d.length<=c;)d.push(null);return(d[c]=d[c]||[]).push(o),l}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i})}class ke{constructor(t,n){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=ee({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}toString(){return`InjectionToken ${this._desc}`}}function Jn(e,t){void 0===t&&(t=e);for(let n=0;nArray.isArray(n)?Ur(n,t):t(n))}function $l(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function ls(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Bn(e,t,n){let r=Xs(e,t);return r>=0?e[1|r]=n:(r=~r,function(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(1===i)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;)e[i]=e[i-2],i--;e[t]=n,e[t+1]=r}}(e,r,t,n)),r}function hd(e,t){const n=Xs(e,t);if(n>=0)return e[1|n]}function Xs(e,t){return function(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){const s=r+(i-r>>1),o=e[s<t?i=s:r=s+1}return~(i< ");else if("object"==typeof t){let s=[];for(let o in t)if(t.hasOwnProperty(o)){let a=t[o];s.push(o+":"+("string"==typeof a?JSON.stringify(a):de(a)))}i=`{${s.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${e.replace(OT,"\n ")}`}("\n"+e.message,i,n,r),e.ngTokenPath=i,e[Js]=null,e}const va=_a(as("Inject",e=>({token:e})),-1),jr=_a(as("Optional"),8),cs=_a(as("SkipSelf"),4);let Yl;function no(e){var t;return(null===(t=function(){if(void 0===Yl&&(Yl=null,Re.trustedTypes))try{Yl=Re.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch(e){}return Yl}())||void 0===t?void 0:t.createHTML(e))||e}class ds{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class HT extends ds{getTypeName(){return"HTML"}}class zT extends ds{getTypeName(){return"Style"}}class KT extends ds{getTypeName(){return"Script"}}class YT extends ds{getTypeName(){return"URL"}}class WT extends ds{getTypeName(){return"ResourceURL"}}function Un(e){return e instanceof ds?e.changingThisBreaksApplicationSecurity:e}function $r(e,t){const n=Hp(e);if(null!=n&&n!==t){if("ResourceURL"===n&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${n} (see https://g.co/ng/security#xss)`)}return n===t}function Hp(e){return e instanceof ds&&e.getTypeName()||null}class JT{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const n=(new window.DOMParser).parseFromString(no(t),"text/html").body;return null===n?this.inertDocumentHelper.getInertBodyElement(t):(n.removeChild(n.firstChild),n)}catch(n){return null}}}class eA{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const n=this.inertDocument.createElement("html");this.inertDocument.appendChild(n);const r=this.inertDocument.createElement("body");n.appendChild(r)}}getInertBodyElement(t){const n=this.inertDocument.createElement("template");if("content"in n)return n.innerHTML=no(t),n;const r=this.inertDocument.createElement("body");return r.innerHTML=no(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(r),r}stripCustomNsAttrs(t){const n=t.attributes;for(let i=n.length-1;0ba(t.trim())).join(", ")}function Hr(e){const t={};for(const n of e.split(","))t[n]=!0;return t}function Da(...e){const t={};for(const n of e)for(const r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}const Yp=Hr("area,br,col,hr,img,wbr"),Wp=Hr("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Gp=Hr("rp,rt"),bd=Da(Yp,Da(Wp,Hr("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Da(Gp,Hr("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Da(Gp,Wp)),Dd=Hr("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Cd=Hr("srcset"),qp=Da(Dd,Cd,Hr("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Hr("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),iA=Hr("script,style,template");class sA{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let n=t.firstChild,r=!0;for(;n;)if(n.nodeType===Node.ELEMENT_NODE?r=this.startElement(n):n.nodeType===Node.TEXT_NODE?this.chars(n.nodeValue):this.sanitizedSomething=!0,r&&n.firstChild)n=n.firstChild;else for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let i=this.checkClobberedElement(n,n.nextSibling);if(i){n=i;break}n=this.checkClobberedElement(n,n.parentNode)}return this.buf.join("")}startElement(t){const n=t.nodeName.toLowerCase();if(!bd.hasOwnProperty(n))return this.sanitizedSomething=!0,!iA.hasOwnProperty(n);this.buf.push("<"),this.buf.push(n);const r=t.attributes;for(let i=0;i"),!0}endElement(t){const n=t.nodeName.toLowerCase();bd.hasOwnProperty(n)&&!Yp.hasOwnProperty(n)&&(this.buf.push(""))}chars(t){this.buf.push(Qp(t))}checkClobberedElement(t,n){if(n&&(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return n}}const oA=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,aA=/([^\#-~ |!])/g;function Qp(e){return e.replace(/&/g,"&").replace(oA,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(aA,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Gl;function Zp(e,t){let n=null;try{Gl=Gl||function(e){const t=new eA(e);return function(){try{return!!(new window.DOMParser).parseFromString(no(""),"text/html")}catch(e){return!1}}()?new JT(t):t}(e);let r=t?String(t):"";n=Gl.getInertBodyElement(r);let i=5,s=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=s,s=n.innerHTML,n=Gl.getInertBodyElement(r)}while(r!==s);return no((new sA).sanitizeChildren(wd(n)||n))}finally{if(n){const r=wd(n)||n;for(;r.firstChild;)r.removeChild(r.firstChild)}}}function wd(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var et=(()=>((et=et||{})[et.NONE=0]="NONE",et[et.HTML=1]="HTML",et[et.STYLE=2]="STYLE",et[et.SCRIPT=3]="SCRIPT",et[et.URL=4]="URL",et[et.RESOURCE_URL=5]="RESOURCE_URL",et))();function Td(e){const t=function(){const e=P();return e&&e[12]}();return t?t.sanitize(et.URL,e)||"":$r(e,"URL")?Un(e):ba(S(e))}const em="__ngContext__";function un(e,t){e[em]=t}function Id(e){const t=function(e){return e[em]||null}(e);return t?Array.isArray(t)?t:t.lView:null}function ql(e){return e.ngOriginalError}function TA(e,...t){e.error(...t)}class fs{constructor(){this._console=console}handleError(t){const n=this._findOriginalError(t),r=this._findContext(t),i=function(e){return e&&e.ngErrorLogger||TA}(t);i(this._console,"ERROR",t),n&&i(this._console,"ORIGINAL ERROR",n),r&&i(this._console,"ERROR CONTEXT",r)}_findContext(t){return t?function(e){return e.ngDebugContext}(t)||this._findContext(ql(t)):null}_findOriginalError(t){let n=t&&ql(t);for(;n&&ql(n);)n=ql(n);return n||null}}const um=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Re))();function zr(e){return e instanceof Function?e():e}var jn=(()=>((jn=jn||{})[jn.Important=1]="Important",jn[jn.DashCase=2]="DashCase",jn))();function xd(e,t){return undefined(e,t)}function Ta(e){const t=e[3];return vr(t)?t[3]:t}function Md(e){return gm(e[13])}function Rd(e){return gm(e[4])}function gm(e){for(;null!==e&&!vr(e);)e=e[4];return e}function io(e,t,n,r,i){if(null!=r){let s,o=!1;vr(r)?s=r:kr(r)&&(o=!0,r=r[0]);const a=Mt(r);0===e&&null!==n?null==i?Em(t,n,a):hs(t,n,a,i||null,!0):1===e&&null!==n?hs(t,n,a,i||null,!0):2===e?function(e,t,n){const r=Zl(e,t);r&&function(e,t,n,r){mt(e)?e.removeChild(t,n,r):t.removeChild(n)}(e,r,t,n)}(t,a,o):3===e&&t.destroyNode(a),null!=s&&function(e,t,n,r,i){const s=n[7];s!==Mt(n)&&io(t,e,r,s,i);for(let a=10;a0&&(e[n-1][4]=r[4]);const s=ls(e,10+t);!function(e,t){Aa(e,t,t[11],2,null,null),t[0]=null,t[6]=null}(r[1],r);const o=s[19];null!==o&&o.detachView(s[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}function ym(e,t){if(!(256&t[2])){const n=t[11];mt(n)&&n.destroyNode&&Aa(e,t,n,3,null,null),function(e){let t=e[13];if(!t)return Fd(e[1],e);for(;t;){let n=null;if(kr(t))n=t[13];else{const r=t[10];r&&(n=r)}if(!n){for(;t&&!t[4]&&t!==e;)kr(t)&&Fd(t[1],t),t=t[3];null===t&&(t=e),kr(t)&&Fd(t[1],t),n=t&&t[4]}t=n}}(t)}}function Fd(e,t){if(!(256&t[2])){t[2]&=-129,t[2]|=256,function(e,t){let n;if(null!=e&&null!=(n=e.destroyHooks))for(let r=0;r=0?r[i=u]():r[i=-u].unsubscribe(),s+=2}else{const o=r[i=n[s+1]];n[s].call(o)}if(null!==r){for(let s=i+1;ss?"":i[d+1].toLowerCase();const g=8&r?f:null;if(g&&-1!==xm(g,u,0)||2&r&&u!==f){if(br(r))return!1;o=!0}}}}else{if(!o&&!br(r)&&!br(l))return!1;if(o&&br(l))continue;o=!1,r=l|1&r}}return br(r)||o}function br(e){return 0==(1&e)}function tI(e,t,n,r){if(null===t)return-1;let i=0;if(r||!n){let s=!1;for(;i-1)for(n++;n0?'="'+a+'"':"")+"]"}else 8&r?i+="."+o:4&r&&(i+=" "+o);else""!==i&&!br(o)&&(t+=Pm(s,i),i=""),r=o,s=s||!br(r);n++}return""!==i&&(t+=Pm(s,i)),t}const pe={};function G(e){Lm(Ne(),P(),_n()+e,Il())}function Lm(e,t,n,r){if(!r)if(3==(3&t[2])){const s=e.preOrderCheckHooks;null!==s&&Rl(t,s,n)}else{const s=e.preOrderHooks;null!==s&&Nl(t,s,0,n)}Mi(n)}function eu(e,t){return e<<17|t<<2}function Dr(e){return e>>17&32767}function jd(e){return 2|e}function oi(e){return(131068&e)>>2}function $d(e,t){return-131069&e|t<<2}function Hd(e){return 1|e}function Km(e,t){const n=e.contentQueries;if(null!==n)for(let r=0;r20&&Lm(e,t,20,Il()),n(r,i)}finally{Mi(s)}}function Zd(e,t,n){!lp()||(function(e,t,n,r){const i=n.directiveStart,s=n.directiveEnd;e.firstCreatePass||da(n,t),un(r,t);const o=n.initialInputs;for(let a=i;a0;){const n=e[--t];if("number"==typeof n&&n<0)return n}return 0})(a)!=l&&a.push(l),a.push(r,i,o)}}function ty(e,t){null!==e.hostBindings&&e.hostBindings(1,t)}function ny(e,t){t.flags|=2,(e.components||(e.components=[])).push(t.index)}function RI(e,t,n){if(n){if(t.exportAs)for(let r=0;r0&&tf(n)}}function tf(e){for(let r=Md(e);null!==r;r=Rd(r))for(let i=10;i0&&tf(s)}const n=e[1].components;if(null!==n)for(let r=0;r0&&tf(i)}}function BI(e,t){const n=Vn(t,e),r=n[1];(function(e,t){for(let n=t.length;nPromise.resolve(null))();function ay(e){return e[7]||(e[7]=[])}function ly(e){return e.cleanup||(e.cleanup=[])}function cy(e,t){const n=e[9],r=n?n.get(fs,null):null;r&&r.handleError(t)}function dy(e,t,n,r,i){for(let s=0;sthis.processProvider(a,t,n)),Ur([t],a=>this.processInjectorType(a,[],s)),this.records.set(lo,uo(void 0,this));const o=this.records.get(Oa);this.scope=null!=o?o.value:null,this.source=i||("object"==typeof t?null:de(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,n=ma,r=T.Default){this.assertNotDestroyed();const i=eo(this),s=F(void 0);try{if(!(r&T.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function(e){return"function"==typeof e||"object"==typeof e&&e instanceof ke}(t)&&an(t);a=l&&this.injectableDefInScope(l)?uo(lf(t),xa):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(r&T.Self?hy():this.parent).get(t,n=r&T.Optional&&n===ma?null:n)}catch(o){if("NullInjectorError"===o.name){if((o[Js]=o[Js]||[]).unshift(de(t)),i)throw o;return Lp(o,t,"R3InjectorError",this.source)}throw o}finally{F(s),eo(i)}}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((r,i)=>t.push(de(i))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,n,r){if(!(t=Q(t)))return!1;let i=v(t);const s=null==i&&t.ngModule||void 0,o=void 0===s?t:s,a=-1!==r.indexOf(o);if(void 0!==s&&(i=v(s)),null==i)return!1;if(null!=i.imports&&!a){let c;r.push(o);try{Ur(i.imports,d=>{this.processInjectorType(d,n,r)&&(void 0===c&&(c=[]),c.push(d))})}finally{}if(void 0!==c)for(let d=0;dthis.processProvider(m,f,g||He))}}this.injectorDefTypes.add(o);const l=os(o)||(()=>new o);this.records.set(o,uo(l,xa));const u=i.providers;if(null!=u&&!a){const c=t;Ur(u,d=>this.processProvider(d,c,u))}return void 0!==s&&void 0!==t.providers}processProvider(t,n,r){let i=co(t=Q(t))?t:Q(t&&t.provide);const s=function(e,t,n){return my(e)?uo(void 0,e.useValue):uo(function(e,t,n){let r;if(co(e)){const i=Q(e);return os(i)||lf(i)}if(my(e))r=()=>Q(e.useValue);else if(function(e){return!(!e||!e.useFactory)}(e))r=()=>e.useFactory(...us(e.deps||[]));else if(function(e){return!(!e||!e.useExisting)}(e))r=()=>te(Q(e.useExisting));else{const i=Q(e&&(e.useClass||e.provide));if(!function(e){return!!e.deps}(e))return os(i)||lf(i);r=()=>new i(...us(e.deps))}return r}(e),xa)}(t);if(co(t)||!0!==t.multi)this.records.get(i);else{let o=this.records.get(i);o||(o=uo(void 0,xa,!0),o.factory=()=>us(o.multi),this.records.set(i,o)),i=t,o.multi.push(t)}this.records.set(i,s)}hydrate(t,n){return n.value===xa&&(n.value=WI,n.value=n.factory()),"object"==typeof n.value&&n.value&&function(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(n.value)&&this.onDestroy.add(n.value),n.value}injectableDefInScope(t){if(!t.providedIn)return!1;const n=Q(t.providedIn);return"string"==typeof n?"any"===n||n===this.scope:this.injectorDefTypes.has(n)}}function lf(e){const t=an(e),n=null!==t?t.factory:os(e);if(null!==n)return n;if(e instanceof ke)throw new Error(`Token ${de(e)} is missing a \u0275prov definition.`);if(e instanceof Function)return function(e){const t=e.length;if(t>0){const r=function(e,t){const n=[];for(let r=0;rn.factory(e):()=>new e}(e);throw new Error("unreachable")}function uo(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function my(e){return null!==e&&"object"==typeof e&&yd in e}function co(e){return"function"==typeof e}const yy=function(e,t,n){return function(e,t=null,n=null,r){const i=gy(e,t,n,r);return i._resolveInjectorDefTypes(),i}({name:n},t,e,n)};class ze{static create(t,n){return Array.isArray(t)?yy(t,n,""):yy(t.providers,t.parent,t.name||"")}}function mS(e,t){Ml(Id(e)[1],Vt())}ze.THROW_IF_NOT_FOUND=ma,ze.NULL=new fy,ze.\u0275prov=ee({token:ze,providedIn:"any",factory:()=>te(lo)}),ze.__NG_ELEMENT_ID__=-1;let ou=null;function fo(){if(!ou){const e=Re.Symbol;if(e&&e.iterator)ou=e.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let n=0;na(Mt(z[r.index])):r.index;if(mt(n)){let z=null;if(!a&&l&&(z=function(e,t,n,r){const i=e.cleanup;if(null!=i)for(let s=0;sl?a[l]:null}"string"==typeof o&&(s+=2)}return null}(e,t,i,r.index)),null!==z)(z.__ngLastListenerFn__||z).__ngNextListenerFn__=s,z.__ngLastListenerFn__=s,g=!1;else{s=Df(r,t,d,s,!1);const ce=n.listen(R,i,s);f.push(s,ce),c&&c.push(i,U,M,M+1)}}else s=Df(r,t,d,s,!0),R.addEventListener(i,s,o),f.push(s),c&&c.push(i,U,M,o)}else s=Df(r,t,d,s,!1);const m=r.outputs;let b;if(g&&null!==m&&(b=m[i])){const E=b.length;if(E)for(let R=0;R0;)t=t[15],e--;return t}(e,he.lFrame.contextLView))[8]}(e)}function E_(e,t,n,r,i){const s=e[n+1],o=null===t;let a=r?Dr(s):oi(s),l=!1;for(;0!==a&&(!1===l||o);){const c=e[a+1];aO(e[a],t)&&(l=!0,e[a+1]=r?Hd(c):jd(c)),a=r?Dr(c):oi(c)}l&&(e[n+1]=r?jd(s):Hd(s))}function aO(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&Xs(e,t)>=0}const Ut={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function b_(e){return e.substring(Ut.key,Ut.keyEnd)}function lO(e){return e.substring(Ut.value,Ut.valueEnd)}function C_(e,t){const n=Ut.textEnd;let r=Ut.key=Co(e,t,n);return n===r?-1:(r=Ut.keyEnd=function(e,t,n){let r;for(;t=65&&(-33&r)<=90||r>=48&&r<=57);)t++;return t}(e,r,n),r=T_(e,r,n),r=Ut.value=Co(e,r,n),r=Ut.valueEnd=function(e,t,n){let r=-1,i=-1,s=-1,o=t,a=o;for(;o32&&(a=o),s=i,i=r,r=-33&l}return a}(e,r,n),T_(e,r,n))}function Co(e,t,n){for(;t=0;n=C_(t,n))x_(e,b_(t),lO(t))}function S_(e,t){return t>=e.expandoStartIndex}function O_(e,t,n,r){const i=e.data;if(null===i[n+1]){const s=i[_n()],o=S_(e,n);N_(s,r)&&null===t&&!o&&(t=!1),t=function(e,t,n,r){const i=function(e){const t=he.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}(e);let s=r?t.residualClasses:t.residualStyles;if(null===i)0===(r?t.classBindings:t.styleBindings)&&(n=Pa(n=Tf(null,e,t,n,r),t.attrs,r),s=null);else{const o=t.directiveStylingLast;if(-1===o||e[o]!==i)if(n=Tf(i,e,t,n,r),null===s){let l=function(e,t,n){const r=n?t.classBindings:t.styleBindings;if(0!==oi(r))return e[Dr(r)]}(e,t,r);void 0!==l&&Array.isArray(l)&&(l=Tf(null,e,t,l[1],r),l=Pa(l,t.attrs,r),function(e,t,n,r){e[Dr(n?t.classBindings:t.styleBindings)]=r}(e,t,r,l))}else s=function(e,t,n){let r;const i=t.directiveEnd;for(let s=1+t.directiveStylingLast;s0)&&(u=!0)}else c=n;if(i)if(0!==l){const f=Dr(e[a+1]);e[r+1]=eu(f,a),0!==f&&(e[f+1]=$d(e[f+1],r)),e[a+1]=function(e,t){return 131071&e|t<<17}(e[a+1],r)}else e[r+1]=eu(a,0),0!==a&&(e[a+1]=$d(e[a+1],r)),a=r;else e[r+1]=eu(l,0),0===a?a=r:e[l+1]=$d(e[l+1],r),l=r;u&&(e[r+1]=jd(e[r+1])),E_(e,c,r,!0),E_(e,c,r,!1),function(e,t,n,r,i){const s=i?e.residualClasses:e.residualStyles;null!=s&&"string"==typeof t&&Xs(s,t)>=0&&(n[r+1]=Hd(n[r+1]))}(t,c,e,r,s),o=eu(a,l),s?t.classBindings=o:t.styleBindings=o}(i,s,t,n,o,r)}}function Tf(e,t,n,r,i){let s=null;const o=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a0;){const l=e[i],u=Array.isArray(l),c=u?l[1]:l,d=null===c;let f=n[i+1];f===pe&&(f=d?He:void 0);let g=d?hd(f,r):c===r?f:void 0;if(u&&!uu(g)&&(g=hd(l,r)),uu(g)&&(a=g,o))return a;const m=e[i+1];i=o?Dr(m):oi(m)}if(null!==t){let l=s?t.residualClasses:t.residualStyles;null!=l&&(a=hd(l,r))}return a}function uu(e){return void 0!==e}function N_(e,t){return 0!=(e.flags&(t?16:32))}function me(e,t=""){const n=P(),r=Ne(),i=e+20,s=r.firstCreatePass?so(r,i,1,t,null):r.data[i],o=n[i]=function(e,t){return mt(e)?e.createText(t):e.createTextNode(t)}(n[11],t);Xl(r,n,o,s),Vr(s,!1)}function Ue(e){return La("",e,""),Ue}function La(e,t,n){const r=P(),i=function(e,t,n,r){return cn(e,Ks(),n)?t+S(n)+r:pe}(r,e,t,n);return i!==pe&&li(r,_n(),i),La}function Fa(e,t,n,r,i){const s=P(),o=function(e,t,n,r,i,s){const a=gs(e,Br(),n,i);return si(2),a?t+S(n)+r+S(i)+s:pe}(s,e,t,n,r,i);return o!==pe&&li(s,_n(),o),Fa}function Af(e,t,n,r,i,s,o){const a=P(),l=mo(a,e,t,n,r,i,s,o);return l!==pe&&li(a,_n(),l),Af}const ms=void 0;var $O=["en",[["a","p"],["AM","PM"],ms],[["AM","PM"],ms,ms],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],ms,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],ms,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",ms,"{1} 'at' {0}",ms],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(e){const t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}];let wo={};function En(e){const t=function(e){return e.toLowerCase().replace(/_/g,"-")}(e);let n=X_(t);if(n)return n;const r=t.split("-")[0];if(n=X_(r),n)return n;if("en"===r)return $O;throw new Error(`Missing locale data for the locale "${e}".`)}function X_(e){return e in wo||(wo[e]=Re.ng&&Re.ng.common&&Re.ng.common.locales&&Re.ng.common.locales[e]),wo[e]}var H=(()=>((H=H||{})[H.LocaleId=0]="LocaleId",H[H.DayPeriodsFormat=1]="DayPeriodsFormat",H[H.DayPeriodsStandalone=2]="DayPeriodsStandalone",H[H.DaysFormat=3]="DaysFormat",H[H.DaysStandalone=4]="DaysStandalone",H[H.MonthsFormat=5]="MonthsFormat",H[H.MonthsStandalone=6]="MonthsStandalone",H[H.Eras=7]="Eras",H[H.FirstDayOfWeek=8]="FirstDayOfWeek",H[H.WeekendRange=9]="WeekendRange",H[H.DateFormat=10]="DateFormat",H[H.TimeFormat=11]="TimeFormat",H[H.DateTimeFormat=12]="DateTimeFormat",H[H.NumberSymbols=13]="NumberSymbols",H[H.NumberFormats=14]="NumberFormats",H[H.CurrencyCode=15]="CurrencyCode",H[H.CurrencySymbol=16]="CurrencySymbol",H[H.CurrencyName=17]="CurrencyName",H[H.Currencies=18]="Currencies",H[H.Directionality=19]="Directionality",H[H.PluralCase=20]="PluralCase",H[H.ExtraData=21]="ExtraData",H))();const cu="en-US";let J_=cu;function If(e){$e(e,"Expected localeId to be defined"),"string"==typeof e&&(J_=e.toLowerCase().replace(/_/g,"-"))}class w0{}const A0="ngComponent";class Hx{resolveComponentFactory(t){throw function(e){const t=Error(`No component factory found for ${de(e)}. Did you add it to @NgModule.entryComponents?`);return t[A0]=e,t}(t)}}class ci{}function pu(...e){}function Ao(e,t){return new bn(Zn(e,t))}ci.NULL=new Hx;const Yx=function(){return Ao(Vt(),P())};let bn=(()=>{class e{constructor(n){this.nativeElement=n}}return e.__NG_ELEMENT_ID__=Yx,e})();function I0(e){return e instanceof bn?e.nativeElement:e}class ys{}let Lf=(()=>{class e{}return e.__NG_ELEMENT_ID__=()=>Gx(),e})();const Gx=function(){const e=P(),n=Vn(Vt().index,e);return function(e){return e[11]}(kr(n)?n:e)};let Ff=(()=>{class e{}return e.\u0275prov=ee({token:e,providedIn:"root",factory:()=>null}),e})();class mu{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const S0=new mu("12.2.4");class O0{constructor(){}supports(t){return Ra(t)}create(t){return new Xx(t)}}const Zx=(e,t)=>t;class Xx{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||Zx}forEachItem(t){let n;for(n=this._itHead;null!==n;n=n._next)t(n)}forEachOperation(t){let n=this._itHead,r=this._removalsHead,i=0,s=null;for(;n||r;){const o=!r||n&&n.currentIndex{o=this._trackByFn(i,a),null!==n&&Object.is(n.trackById,o)?(r&&(n=this._verifyReinsertion(n,a,o,i)),Object.is(n.item,a)||this._addIdentityChange(n,a)):(n=this._mismatch(n,a,o,i),r=!0),n=n._next,i++}),this.length=i;return this._truncate(n),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,n,r,i){let s;return null===t?s=this._itTail:(s=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(t.item,n)||this._addIdentityChange(t,n),this._reinsertAfter(t,s,i)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(r,i))?(Object.is(t.item,n)||this._addIdentityChange(t,n),this._moveAfter(t,s,i)):t=this._addAfter(new Jx(n,r),s,i),t}_verifyReinsertion(t,n,r,i){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==s?t=this._reinsertAfter(s,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t}_truncate(t){for(;null!==t;){const n=t._next;this._addToRemovals(this._unlink(t)),t=n}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,n,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const i=t._prevRemoved,s=t._nextRemoved;return null===i?this._removalsHead=s:i._nextRemoved=s,null===s?this._removalsTail=i:s._prevRemoved=i,this._insertAfter(t,n,r),this._addToMoves(t,r),t}_moveAfter(t,n,r){return this._unlink(t),this._insertAfter(t,n,r),this._addToMoves(t,r),t}_addAfter(t,n,r){return this._insertAfter(t,n,r),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,n,r){const i=null===n?this._itHead:n._next;return t._next=i,t._prev=n,null===i?this._itTail=t:i._prev=t,null===n?this._itHead=t:n._next=t,null===this._linkedRecords&&(this._linkedRecords=new x0),this._linkedRecords.put(t),t.currentIndex=r,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const n=t._prev,r=t._next;return null===n?this._itHead=r:n._next=r,null===r?this._itTail=n:r._prev=n,t}_addToMoves(t,n){return t.previousIndex===n||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new x0),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,n){return t.item=n,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class Jx{constructor(t,n){this.item=t,this.trackById=n,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class eM{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,n){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===n||n<=r.currentIndex)&&Object.is(r.trackById,t))return r;return null}remove(t){const n=t._prevDup,r=t._nextDup;return null===n?this._head=r:n._nextDup=r,null===r?this._tail=n:r._prevDup=n,null===this._head}}class x0{constructor(){this.map=new Map}put(t){const n=t.trackById;let r=this.map.get(n);r||(r=new eM,this.map.set(n,r)),r.add(t)}get(t,n){const i=this.map.get(t);return i?i.get(t,n):null}remove(t){const n=t.trackById;return this.map.get(n).remove(t)&&this.map.delete(n),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function M0(e,t,n){const r=e.previousIndex;if(null===r)return r;let i=0;return n&&r{if(n&&n.key===i)this._maybeAddToChanges(n,r),this._appendAfter=n,n=n._next;else{const s=this._getOrCreateRecordForKey(i,r);n=this._insertBeforeOrAppend(n,s)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(let r=n;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,n){if(t){const r=t._prev;return n._next=t,n._prev=r,t._prev=n,r&&(r._next=n),t===this._mapHead&&(this._mapHead=n),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=n,n._prev=this._appendAfter):this._mapHead=n,this._appendAfter=n,null}_getOrCreateRecordForKey(t,n){if(this._records.has(t)){const i=this._records.get(t);this._maybeAddToChanges(i,n);const s=i._prev,o=i._next;return s&&(s._next=o),o&&(o._prev=s),i._next=null,i._prev=null,i}const r=new nM(t);return this._records.set(t,r),r.currentValue=n,this._addToAdditions(r),r}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,n){Object.is(n,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=n,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,n){t instanceof Map?t.forEach(n):Object.keys(t).forEach(r=>n(t[r],r))}}class nM{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function N0(){return new ja([new O0])}let ja=(()=>{class e{constructor(n){this.factories=n}static create(n,r){if(null!=r){const i=r.factories.slice();n=n.concat(i)}return new e(n)}static extend(n){return{provide:e,useFactory:r=>e.create(n,r||N0()),deps:[[e,new cs,new jr]]}}find(n){const r=this.factories.find(i=>i.supports(n));if(null!=r)return r;throw new Error(`Cannot find a differ supporting object '${n}' of type '${function(e){return e.name||typeof e}(n)}'`)}}return e.\u0275prov=ee({token:e,providedIn:"root",factory:N0}),e})();function P0(){return new Io([new R0])}let Io=(()=>{class e{constructor(n){this.factories=n}static create(n,r){if(r){const i=r.factories.slice();n=n.concat(i)}return new e(n)}static extend(n){return{provide:e,useFactory:r=>e.create(n,r||P0()),deps:[[e,new cs,new jr]]}}find(n){const r=this.factories.find(i=>i.supports(n));if(r)return r;throw new Error(`Cannot find a differ supporting object '${n}'`)}}return e.\u0275prov=ee({token:e,providedIn:"root",factory:P0}),e})();function yu(e,t,n,r,i=!1){for(;null!==n;){const s=t[n.index];if(null!==s&&r.push(Mt(s)),vr(s))for(let a=10;a-1&&(Ld(t,r),ls(n,r))}this._attachedToViewContainer=!1}ym(this._lView[1],this._lView)}onDestroy(t){Zm(this._lView[1],this._lView,null,t)}markForCheck(){nf(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){sf(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(e,t,n){Sl(!0);try{sf(e,t,n)}finally{Sl(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function(e,t){Aa(e,t,t[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class iM extends $a{constructor(t){super(t),this._view=t}detectChanges(){oy(this._view)}checkNoChanges(){!function(e){Sl(!0);try{oy(e)}finally{Sl(!1)}}(this._view)}get context(){return null}}const oM=function(e){return function(e,t,n){if(Cl(e)&&!n){const r=Vn(e.index,t);return new $a(r,r)}return 47&e.type?new $a(t[16],t):null}(Vt(),P(),16==(16&e))};let di=(()=>{class e{}return e.__NG_ELEMENT_ID__=oM,e})();const uM=[new R0],dM=new ja([new O0]),fM=new Io(uM),gM=function(){return _u(Vt(),P())};let fi=(()=>{class e{}return e.__NG_ELEMENT_ID__=gM,e})();const pM=fi,mM=class extends pM{constructor(t,n,r){super(),this._declarationLView=t,this._declarationTContainer=n,this.elementRef=r}createEmbeddedView(t){const n=this._declarationTContainer.tViews,r=Ia(this._declarationLView,n,t,16,null,n.declTNode,null,null,null,null);r[17]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[19];return null!==s&&(r[19]=s.createEmbeddedView(n)),Sa(n,r,t),new $a(r)}};function _u(e,t){return 4&e.type?new mM(t,e,Ao(e,t)):null}class _s{}const EM=function(){return k0(Vt(),P())};let Gr=(()=>{class e{}return e.__NG_ELEMENT_ID__=EM,e})();const DM=Gr,L0=class extends DM{constructor(t,n,r){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=r}get element(){return Ao(this._hostTNode,this._hostLView)}get injector(){return new Gs(this._hostTNode,this._hostLView)}get parentInjector(){const t=kl(this._hostTNode,this._hostLView);if(bp(t)){const n=Ws(t,this._hostLView),r=Ys(t);return new Gs(n[1].data[r+8],n)}return new Gs(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const n=F0(this._lContainer);return null!==n&&n[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,n,r){const i=t.createEmbeddedView(n||{});return this.insert(i,r),i}createComponent(t,n,r,i,s){const o=r||this.parentInjector;if(!s&&null==t.ngModule&&o){const l=o.get(_s,null);l&&(s=l)}const a=t.create(o,i,void 0,s);return this.insert(a.hostView,n),a}insert(t,n){const r=t._lView,i=r[1];if(function(e){return vr(e[3])}(r)){const c=this.indexOf(t);if(-1!==c)this.detach(c);else{const d=r[3],f=new L0(d,d[6],d[3]);f.detach(f.indexOf(t))}}const s=this._adjustIndex(n),o=this._lContainer;!function(e,t,n,r){const i=10+r,s=n.length;r>0&&(n[i-1][4]=t),rum});class sv extends w0{constructor(t,n){super(),this.componentDef=t,this.ngModule=n,this.componentType=t.type,this.selector=function(e){return e.map(oI).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!n}get inputs(){return iv(this.componentDef.inputs)}get outputs(){return iv(this.componentDef.outputs)}create(t,n,r,i){const s=(i=i||this.ngModule)?function(e,t){return{get:(n,r,i)=>{const s=e.get(n,Mo,i);return s!==Mo||r===Mo?s:t.get(n,r,i)}}}(t,i.injector):t,o=s.get(ys,sp),a=s.get(Ff,null),l=o.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",c=r?function(e,t,n){if(mt(e))return e.selectRootElement(t,n===be.ShadowDom);let r="string"==typeof t?e.querySelector(t):t;return r.textContent="",r}(l,r,this.componentDef.encapsulation):Pd(o.createRenderer(null,this.componentDef),u,function(e){const t=e.toLowerCase();return"svg"===t?rp:"math"===t?"http://www.w3.org/1998/MathML/":null}(u)),d=this.componentDef.onPush?576:528,f=function(e,t){return{components:[],scheduler:e||um,clean:zI,playerHandler:t||null,flags:0}}(),g=ru(0,null,null,1,0,null,null,null,null,null),m=Ia(null,g,f,d,null,null,o,l,a,s);let b,E;Ol(m);try{const R=function(e,t,n,r,i,s){const o=n[1];n[20]=e;const l=so(o,20,2,"#host",null),u=l.mergedAttrs=t.hostAttrs;null!==u&&(su(l,u,!0),null!==e&&(Pl(i,e,u),null!==l.classes&&Ud(i,e,l.classes),null!==l.styles&&Om(i,e,l.styles)));const c=r.createRenderer(e,t),d=Ia(n,Gm(t),null,t.onPush?64:16,n[20],l,r,c,s||null,null);return o.firstCreatePass&&(Vl(da(l,n),o,t.type),ny(o,l),ry(l,n.length,1)),iu(n,d),n[20]=d}(c,this.componentDef,m,o,l);if(c)if(r)Pl(l,c,["ng-version",S0.full]);else{const{attrs:M,classes:U}=function(e){const t=[],n=[];let r=1,i=2;for(;r0&&Ud(l,c,U.join(" "))}if(E=qc(g,20),void 0!==n){const M=E.projection=[];for(let U=0;Ul(o,t)),t.contentQueries){const l=Vt();t.contentQueries(1,o,l.directiveStart)}const a=Vt();return!s.firstCreatePass||null===t.hostBindings&&null===t.hostAttrs||(Mi(a.index),ey(n[1],a,0,a.directiveStart,a.directiveEnd,t),ty(t,o)),o}(R,this.componentDef,m,f,[mS]),Sa(g,m,null)}finally{xl()}return new bR(this.componentType,b,Ao(E,m),m,E)}}class bR extends class{}{constructor(t,n,r,i,s){super(),this.location=r,this._rootLView=i,this._tNode=s,this.instance=n,this.hostView=this.changeDetectorRef=new iM(i),this.componentType=t}get injector(){return new Gs(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}}const Ro=new Map;class wR extends _s{constructor(t,n){super(),this._parent=n,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new rv(this);const r=Gn(t),i=function(e){return e[ww]||null}(t);i&&If(i),this._bootstrapComponents=zr(r.bootstrap),this._r3Injector=gy(t,n,[{provide:_s,useValue:this},{provide:ci,useValue:this.componentFactoryResolver}],de(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,n=ze.THROW_IF_NOT_FOUND,r=T.Default){return t===ze||t===_s||t===lo?this:this._r3Injector.get(t,n,r)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Qf extends class{}{constructor(t){super(),this.moduleType=t,null!==Gn(t)&&function(e){const t=new Set;!function n(r){const i=Gn(r,!0),s=i.id;null!==s&&(function(e,t,n){if(t&&t!==n)throw new Error(`Duplicate module registered for ${e} - ${de(t)} vs ${de(t.name)}`)}(s,Ro.get(s),r),Ro.set(s,r));const o=zr(i.imports);for(const a of o)t.has(a)||(t.add(a),n(a))}(e)}(t)}create(t){return new wR(this.moduleType,t)}}function Cu(e,t,n,r){return uv(P(),yn(),e,t,n,r)}function Qa(e,t){const n=e[t];return n===pe?void 0:n}function uv(e,t,n,r,i,s){const o=t+n;return cn(e,o,i)?Yr(e,o+1,s?r.call(s,i):r(i)):Qa(e,o+1)}function gt(e,t){const n=Ne();let r;const i=e+20;n.firstCreatePass?(r=function(e,t){if(t)for(let n=t.length-1;n>=0;n--){const r=t[n];if(e===r.name)return r}throw new y("302",`The pipe '${e}' could not be found!`)}(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks||(n.destroyHooks=[])).push(i,r.onDestroy)):r=n.data[i];const s=r.factory||(r.factory=os(r.type)),o=F(ne);try{const a=Fl(!1),l=s();return Fl(a),function(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}(n,P(),i,l),l}finally{F(o)}}function St(e,t,n){const r=e+20,i=P(),s=zs(i,r);return Xa(i,Za(i,r)?uv(i,yn(),t,s.transform,n,s):s.transform(n))}function Zf(e,t,n,r){const i=e+20,s=P(),o=zs(s,i);return Xa(s,Za(s,i)?function(e,t,n,r,i,s,o){const a=t+n;return gs(e,a,i,s)?Yr(e,a+2,o?r.call(o,i,s):r(i,s)):Qa(e,a+2)}(s,yn(),t,o.transform,n,r,o):o.transform(n,r))}function Za(e,t){return e[1].data[t].pure}function Xa(e,t){return wr.isWrapped(t)&&(t=wr.unwrap(t),e[Br()]=pe),t}function Xf(e){return t=>{setTimeout(e,void 0,t)}}const vt=class extends bt{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,n,r){var i,s,o;let a=t,l=n||(()=>null),u=r;if(t&&"object"==typeof t){const d=t;a=null===(i=d.next)||void 0===i?void 0:i.bind(d),l=null===(s=d.error)||void 0===s?void 0:s.bind(d),u=null===(o=d.complete)||void 0===o?void 0:o.bind(d)}this.__isAsync&&(l=Xf(l),a&&(a=Xf(a)),u&&(u=Xf(u)));const c=super.subscribe({next:a,error:l,complete:u});return t instanceof Ie&&t.add(c),c}};function VR(){return this._results[fo()]()}class wu{constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const n=fo(),r=wu.prototype;r[n]||(r[n]=VR)}get changes(){return this._changes||(this._changes=new vt)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,n){return this._results.reduce(t,n)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,n){const r=this;r.dirty=!1;const i=Jn(t);(this._changesDetected=!function(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r0)r.push(o[a/2]);else{const u=s[a+1],c=t[-l];for(let d=10;d{class e{constructor(n){this.appInits=n,this.resolve=pu,this.reject=pu,this.initialized=!1,this.done=!1,this.donePromise=new Promise((r,i)=>{this.resolve=r,this.reject=i})}runInitializers(){if(this.initialized)return;const n=[],r=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let i=0;i{s.subscribe({complete:a,error:l})});n.push(o)}}Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),0===n.length&&r(),this.initialized=!0}}return e.\u0275fac=function(n){return new(n||e)(te(Iu,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();const rl=new ke("AppId"),bN={provide:rl,useFactory:function(){return`${uh()}${uh()}${uh()}`},deps:[]};function uh(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Fv=new ke("Platform Initializer"),ch=new ke("Platform ID"),DN=new ke("appBootstrapListener");let dh=(()=>{class e{log(n){console.log(n)}warn(n){console.warn(n)}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();const ki=new ke("LocaleId"),kv=new ke("DefaultCurrencyCode");class wN{constructor(t,n){this.ngModuleFactory=t,this.componentFactories=n}}const fh=function(e){return new Qf(e)},TN=fh,AN=function(e){return Promise.resolve(fh(e))},Vv=function(e){const t=fh(e),r=zr(Gn(e).declarations).reduce((i,s)=>{const o=mn(s);return o&&i.push(new sv(o)),i},[]);return new wN(t,r)},IN=Vv,SN=function(e){return Promise.resolve(Vv(e))};let Ou=(()=>{class e{constructor(){this.compileModuleSync=TN,this.compileModuleAsync=AN,this.compileModuleAndAllComponentsSync=IN,this.compileModuleAndAllComponentsAsync=SN}clearCache(){}clearCacheFor(n){}getModuleId(n){}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();const MN=(()=>Promise.resolve(0))();function hh(e){"undefined"==typeof Zone?MN.then(()=>{e&&e.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",e)}class Rt{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new vt(!1),this.onMicrotaskEmpty=new vt(!1),this.onStable=new vt(!1),this.onError=new vt(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!r&&n,i.shouldCoalesceRunChangeDetection=r,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=function(){let e=Re.requestAnimationFrame,t=Re.cancelAnimationFrame;if("undefined"!=typeof Zone&&e&&t){const n=e[Zone.__symbol__("OriginalDelegate")];n&&(e=n);const r=t[Zone.__symbol__("OriginalDelegate")];r&&(t=r)}return{nativeRequestAnimationFrame:e,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function(e){const t=()=>{!function(e){e.isCheckStableRunning||-1!==e.lastRequestAnimationFrameId||(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(Re,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,ph(e),e.isCheckStableRunning=!0,gh(e),e.isCheckStableRunning=!1},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),ph(e))}(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,r,i,s,o,a)=>{try{return Bv(e),n.invokeTask(i,s,o,a)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||e.shouldCoalesceRunChangeDetection)&&t(),Uv(e)}},onInvoke:(n,r,i,s,o,a,l)=>{try{return Bv(e),n.invoke(i,s,o,a,l)}finally{e.shouldCoalesceRunChangeDetection&&t(),Uv(e)}},onHasTask:(n,r,i,s)=>{n.hasTask(i,s),r===i&&("microTask"==s.change?(e._hasPendingMicrotasks=s.microTask,ph(e),gh(e)):"macroTask"==s.change&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(n,r,i,s)=>(n.handleError(i,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}(i)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Rt.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(Rt.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,NN,pu,pu);try{return s.runTask(o,n,r)}finally{s.cancelTask(o)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}}const NN={};function gh(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function ph(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&-1!==e.lastRequestAnimationFrameId)}function Bv(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Uv(e){e._nesting--,gh(e)}class FN{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new vt,this.onMicrotaskEmpty=new vt,this.onStable=new vt,this.onError=new vt}run(t,n,r){return t.apply(n,r)}runGuarded(t,n,r){return t.apply(n,r)}runOutsideAngular(t){return t()}runTask(t,n,r,i){return t.apply(n,r)}}let mh=(()=>{class e{constructor(n){this._ngZone=n,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),n.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Rt.assertNotInAngularZone(),hh(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())hh(()=>{for(;0!==this._callbacks.length;){let n=this._callbacks.pop();clearTimeout(n.timeoutId),n.doneCb(this._didWork)}this._didWork=!1});else{let n=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(n)||(clearTimeout(r.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(n=>({source:n.source,creationLocation:n.creationLocation,data:n.data})):[]}addCallback(n,r,i){let s=-1;r&&r>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==s),n(this._didWork,this.getPendingTasks())},r)),this._callbacks.push({doneCb:n,timeoutId:s,updateCb:i})}whenStable(n,r,i){if(i&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(n,r,i),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(n,r,i){return[]}}return e.\u0275fac=function(n){return new(n||e)(te(Rt))},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})(),jv=(()=>{class e{constructor(){this._applications=new Map,yh.addToWindow(this)}registerApplication(n,r){this._applications.set(n,r)}unregisterApplication(n){this._applications.delete(n)}unregisterAllApplications(){this._applications.clear()}getTestability(n){return this._applications.get(n)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(n,r=!0){return yh.findTestabilityInTree(this,n,r)}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();class kN{addToWindow(t){}findTestabilityInTree(t,n,r){return null}}let yh=new kN,$v=!0,Hv=!1;let xr;const Kv=new ke("AllowMultipleToken");function Yv(e,t,n=[]){const r=`Platform: ${t}`,i=new ke(r);return(s=[])=>{let o=Wv();if(!o||o.injector.get(Kv,!1))if(e)e(n.concat(s).concat({provide:i,useValue:!0}));else{const a=n.concat(s).concat({provide:i,useValue:!0},{provide:Oa,useValue:"platform"});!function(e){if(xr&&!xr.destroyed&&!xr.injector.get(Kv,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");xr=e.get(Gv);const t=e.get(Fv,null);t&&t.forEach(n=>n())}(ze.create({providers:a,name:r}))}return function(e){const t=Wv();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}(i)}}function Wv(){return xr&&!xr.destroyed?xr:null}let Gv=(()=>{class e{constructor(n){this._injector=n,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(n,r){const a=function(e,t){let n;return n="noop"===e?new FN:("zone.js"===e?void 0:e)||new Rt({enableLongStackTrace:(Hv=!0,$v),shouldCoalesceEventChangeDetection:!!(null==t?void 0:t.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==t?void 0:t.ngZoneRunCoalescing)}),n}(r?r.ngZone:void 0,{ngZoneEventCoalescing:r&&r.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:r&&r.ngZoneRunCoalescing||!1}),l=[{provide:Rt,useValue:a}];return a.run(()=>{const u=ze.create({providers:l,parent:this.injector,name:n.moduleType.name}),c=n.create(u),d=c.injector.get(fs,null);if(!d)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return a.runOutsideAngular(()=>{const f=a.onError.subscribe({next:g=>{d.handleError(g)}});c.onDestroy(()=>{_h(this._modules,c),f.unsubscribe()})}),function(e,t,n){try{const r=n();return bf(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}(d,a,()=>{const f=c.injector.get(Po);return f.runInitializers(),f.donePromise.then(()=>(If(c.injector.get(ki,cu)||cu),this._moduleDoBootstrap(c),c))})})}bootstrapModule(n,r=[]){const i=qv({},r);return function(e,t,n){const r=new Qf(n);return Promise.resolve(r)}(0,0,n).then(s=>this.bootstrapModuleFactory(s,i))}_moduleDoBootstrap(n){const r=n.injector.get(Lo);if(n._bootstrapComponents.length>0)n._bootstrapComponents.forEach(i=>r.bootstrap(i));else{if(!n.instance.ngDoBootstrap)throw new Error(`The module ${de(n.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);n.instance.ngDoBootstrap(r)}this._modules.push(n)}onDestroy(n){this._destroyListeners.push(n)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n()),this._destroyed=!0}get destroyed(){return this._destroyed}}return e.\u0275fac=function(n){return new(n||e)(te(ze))},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();function qv(e,t){return Array.isArray(t)?t.reduce(qv,e):Object.assign(Object.assign({},e),t)}let Lo=(()=>{class e{constructor(n,r,i,s,o){this._zone=n,this._injector=r,this._exceptionHandler=i,this._componentFactoryResolver=s,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const a=new J(u=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{u.next(this._stable),u.complete()})}),l=new J(u=>{let c;this._zone.runOutsideAngular(()=>{c=this._zone.onStable.subscribe(()=>{Rt.assertNotInAngularZone(),hh(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,u.next(!0))})})});const d=this._zone.onUnstable.subscribe(()=>{Rt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{u.next(!1)}))});return()=>{c.unsubscribe(),d.unsubscribe()}});this.isStable=Qi(a,l.pipe(e=>pr()(function(e,t){return function(r){let i;i="function"==typeof e?e:function(){return e};const s=Object.create(r,Ps);return s.source=r,s.subjectFactory=i,s}}(Ti)(e))))}bootstrap(n,r){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let i;i=n instanceof w0?n:this._componentFactoryResolver.resolveComponentFactory(n),this.componentTypes.push(i.componentType);const s=function(e){return e.isBoundToModule}(i)?void 0:this._injector.get(_s),a=i.create(ze.NULL,[],r||i.selector,s),l=a.location.nativeElement,u=a.injector.get(mh,null),c=u&&a.injector.get(jv);return u&&c&&c.registerApplication(l,u),a.onDestroy(()=>{this.detachView(a.hostView),_h(this.components,a),c&&c.unregisterApplication(l)}),this._loadComponent(a),a}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let n of this._views)n.detectChanges()}catch(n){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(n))}finally{this._runningTick=!1}}attachView(n){const r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){const r=n;_h(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(DN,[]).concat(this._bootstrapListeners).forEach(i=>i(n))}ngOnDestroy(){this._views.slice().forEach(n=>n.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return e.\u0275fac=function(n){return new(n||e)(te(Rt),te(ze),te(fs),te(ci),te(Po))},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();function _h(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const cP=Yv(null,"core",[{provide:ch,useValue:"unknown"},{provide:Gv,deps:[ze]},{provide:jv,deps:[]},{provide:dh,deps:[]}]),pP=[{provide:Lo,useClass:Lo,deps:[Rt,ze,fs,ci,Po]},{provide:_R,deps:[Rt],useFactory:function(e){let t=[];return e.onStable.subscribe(()=>{for(;t.length;)t.pop()()}),function(n){t.push(n)}}},{provide:Po,useClass:Po,deps:[[new jr,Iu]]},{provide:Ou,useClass:Ou,deps:[]},bN,{provide:ja,useFactory:function(){return dM},deps:[]},{provide:Io,useFactory:function(){return fM},deps:[]},{provide:ki,useFactory:function(e){return If(e=e||"undefined"!=typeof $localize&&$localize.locale||cu),e},deps:[[new va(ki),new jr,new cs]]},{provide:kv,useValue:"USD"}];let yP=(()=>{class e{constructor(n){}}return e.\u0275fac=function(n){return new(n||e)(te(Lo))},e.\u0275mod=ii({type:e}),e.\u0275inj=tn({providers:pP}),e})(),Bu=null;function ll(){return Bu}const rn=new ke("DocumentToken");var Nt=(()=>((Nt=Nt||{})[Nt.Zero=0]="Zero",Nt[Nt.One=1]="One",Nt[Nt.Two=2]="Two",Nt[Nt.Few=3]="Few",Nt[Nt.Many=4]="Many",Nt[Nt.Other=5]="Other",Nt))(),Ot=(()=>((Ot=Ot||{})[Ot.Format=0]="Format",Ot[Ot.Standalone=1]="Standalone",Ot))(),xe=(()=>((xe=xe||{})[xe.Narrow=0]="Narrow",xe[xe.Abbreviated=1]="Abbreviated",xe[xe.Wide=2]="Wide",xe[xe.Short=3]="Short",xe))(),pt=(()=>((pt=pt||{})[pt.Short=0]="Short",pt[pt.Medium=1]="Medium",pt[pt.Long=2]="Long",pt[pt.Full=3]="Full",pt))(),se=(()=>((se=se||{})[se.Decimal=0]="Decimal",se[se.Group=1]="Group",se[se.List=2]="List",se[se.PercentSign=3]="PercentSign",se[se.PlusSign=4]="PlusSign",se[se.MinusSign=5]="MinusSign",se[se.Exponential=6]="Exponential",se[se.SuperscriptingExponent=7]="SuperscriptingExponent",se[se.PerMille=8]="PerMille",se[se.Infinity=9]="Infinity",se[se.NaN=10]="NaN",se[se.TimeSeparator=11]="TimeSeparator",se[se.CurrencyDecimal=12]="CurrencyDecimal",se[se.CurrencyGroup=13]="CurrencyGroup",se))();function Uu(e,t){return sr(En(e)[H.DateFormat],t)}function ju(e,t){return sr(En(e)[H.TimeFormat],t)}function $u(e,t){return sr(En(e)[H.DateTimeFormat],t)}function ir(e,t){const n=En(e),r=n[H.NumberSymbols][t];if(void 0===r){if(t===se.CurrencyDecimal)return n[H.NumberSymbols][se.Decimal];if(t===se.CurrencyGroup)return n[H.NumberSymbols][se.Group]}return r}const TL=function(e){return En(e)[H.PluralCase]};function AE(e){if(!e[H.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[H.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function sr(e,t){for(let n=t;n>-1;n--)if(void 0!==e[n])return e[n];throw new Error("Locale data API: locale data undefined")}function Ph(e){const[t,n]=e.split(":");return{hours:+t,minutes:+n}}const ML=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,ul={},RL=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var jt=(()=>((jt=jt||{})[jt.Short=0]="Short",jt[jt.ShortGMT=1]="ShortGMT",jt[jt.Long=2]="Long",jt[jt.Extended=3]="Extended",jt))(),ae=(()=>((ae=ae||{})[ae.FullYear=0]="FullYear",ae[ae.Month=1]="Month",ae[ae.Date=2]="Date",ae[ae.Hours=3]="Hours",ae[ae.Minutes=4]="Minutes",ae[ae.Seconds=5]="Seconds",ae[ae.FractionalSeconds=6]="FractionalSeconds",ae[ae.Day=7]="Day",ae))(),we=(()=>((we=we||{})[we.DayPeriods=0]="DayPeriods",we[we.Days=1]="Days",we[we.Months=2]="Months",we[we.Eras=3]="Eras",we))();function NL(e,t,n,r){let i=function(e){if(OE(e))return e;if("number"==typeof e&&!isNaN(e))return new Date(e);if("string"==typeof e){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){const[i,s=1,o=1]=e.split("-").map(a=>+a);return Hu(i,s-1,o)}const n=parseFloat(e);if(!isNaN(e-n))return new Date(n);let r;if(r=e.match(ML))return function(e){const t=new Date(0);let n=0,r=0;const i=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),r=Number(e[9]+e[11])),i.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));const o=Number(e[4]||0)-n,a=Number(e[5]||0)-r,l=Number(e[6]||0),u=Math.floor(1e3*parseFloat("0."+(e[7]||0)));return s.call(t,o,a,l,u),t}(r)}const t=new Date(e);if(!OE(t))throw new Error(`Unable to convert "${e}" into a date`);return t}(e);t=gi(n,t)||t;let a,o=[];for(;t;){if(a=RL.exec(t),!a){o.push(t);break}{o=o.concat(a.slice(1));const c=o.pop();if(!c)break;t=c}}let l=i.getTimezoneOffset();r&&(l=SE(r,l),i=function(e,t,n){const i=e.getTimezoneOffset();return function(e,t){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+t),e}(e,-1*(SE(t,i)-i))}(i,r));let u="";return o.forEach(c=>{const d=function(e){if(Fh[e])return Fh[e];let t;switch(e){case"G":case"GG":case"GGG":t=ot(we.Eras,xe.Abbreviated);break;case"GGGG":t=ot(we.Eras,xe.Wide);break;case"GGGGG":t=ot(we.Eras,xe.Narrow);break;case"y":t=Pt(ae.FullYear,1,0,!1,!0);break;case"yy":t=Pt(ae.FullYear,2,0,!0,!0);break;case"yyy":t=Pt(ae.FullYear,3,0,!1,!0);break;case"yyyy":t=Pt(ae.FullYear,4,0,!1,!0);break;case"Y":t=Wu(1);break;case"YY":t=Wu(2,!0);break;case"YYY":t=Wu(3);break;case"YYYY":t=Wu(4);break;case"M":case"L":t=Pt(ae.Month,1,1);break;case"MM":case"LL":t=Pt(ae.Month,2,1);break;case"MMM":t=ot(we.Months,xe.Abbreviated);break;case"MMMM":t=ot(we.Months,xe.Wide);break;case"MMMMM":t=ot(we.Months,xe.Narrow);break;case"LLL":t=ot(we.Months,xe.Abbreviated,Ot.Standalone);break;case"LLLL":t=ot(we.Months,xe.Wide,Ot.Standalone);break;case"LLLLL":t=ot(we.Months,xe.Narrow,Ot.Standalone);break;case"w":t=Lh(1);break;case"ww":t=Lh(2);break;case"W":t=Lh(1,!0);break;case"d":t=Pt(ae.Date,1);break;case"dd":t=Pt(ae.Date,2);break;case"c":case"cc":t=Pt(ae.Day,1);break;case"ccc":t=ot(we.Days,xe.Abbreviated,Ot.Standalone);break;case"cccc":t=ot(we.Days,xe.Wide,Ot.Standalone);break;case"ccccc":t=ot(we.Days,xe.Narrow,Ot.Standalone);break;case"cccccc":t=ot(we.Days,xe.Short,Ot.Standalone);break;case"E":case"EE":case"EEE":t=ot(we.Days,xe.Abbreviated);break;case"EEEE":t=ot(we.Days,xe.Wide);break;case"EEEEE":t=ot(we.Days,xe.Narrow);break;case"EEEEEE":t=ot(we.Days,xe.Short);break;case"a":case"aa":case"aaa":t=ot(we.DayPeriods,xe.Abbreviated);break;case"aaaa":t=ot(we.DayPeriods,xe.Wide);break;case"aaaaa":t=ot(we.DayPeriods,xe.Narrow);break;case"b":case"bb":case"bbb":t=ot(we.DayPeriods,xe.Abbreviated,Ot.Standalone,!0);break;case"bbbb":t=ot(we.DayPeriods,xe.Wide,Ot.Standalone,!0);break;case"bbbbb":t=ot(we.DayPeriods,xe.Narrow,Ot.Standalone,!0);break;case"B":case"BB":case"BBB":t=ot(we.DayPeriods,xe.Abbreviated,Ot.Format,!0);break;case"BBBB":t=ot(we.DayPeriods,xe.Wide,Ot.Format,!0);break;case"BBBBB":t=ot(we.DayPeriods,xe.Narrow,Ot.Format,!0);break;case"h":t=Pt(ae.Hours,1,-12);break;case"hh":t=Pt(ae.Hours,2,-12);break;case"H":t=Pt(ae.Hours,1);break;case"HH":t=Pt(ae.Hours,2);break;case"m":t=Pt(ae.Minutes,1);break;case"mm":t=Pt(ae.Minutes,2);break;case"s":t=Pt(ae.Seconds,1);break;case"ss":t=Pt(ae.Seconds,2);break;case"S":t=Pt(ae.FractionalSeconds,1);break;case"SS":t=Pt(ae.FractionalSeconds,2);break;case"SSS":t=Pt(ae.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":t=Ku(jt.Short);break;case"ZZZZZ":t=Ku(jt.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=Ku(jt.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":t=Ku(jt.Long);break;default:return null}return Fh[e]=t,t}(c);u+=d?d(i,n,l):"''"===c?"'":c.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}function Hu(e,t,n){const r=new Date(0);return r.setFullYear(e,t,n),r.setHours(0,0,0),r}function gi(e,t){const n=function(e){return En(e)[H.LocaleId]}(e);if(ul[n]=ul[n]||{},ul[n][t])return ul[n][t];let r="";switch(t){case"shortDate":r=Uu(e,pt.Short);break;case"mediumDate":r=Uu(e,pt.Medium);break;case"longDate":r=Uu(e,pt.Long);break;case"fullDate":r=Uu(e,pt.Full);break;case"shortTime":r=ju(e,pt.Short);break;case"mediumTime":r=ju(e,pt.Medium);break;case"longTime":r=ju(e,pt.Long);break;case"fullTime":r=ju(e,pt.Full);break;case"short":const i=gi(e,"shortTime"),s=gi(e,"shortDate");r=zu($u(e,pt.Short),[i,s]);break;case"medium":const o=gi(e,"mediumTime"),a=gi(e,"mediumDate");r=zu($u(e,pt.Medium),[o,a]);break;case"long":const l=gi(e,"longTime"),u=gi(e,"longDate");r=zu($u(e,pt.Long),[l,u]);break;case"full":const c=gi(e,"fullTime"),d=gi(e,"fullDate");r=zu($u(e,pt.Full),[c,d])}return r&&(ul[n][t]=r),r}function zu(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,function(n,r){return null!=t&&r in t?t[r]:n})),e}function Nr(e,t,n="-",r,i){let s="";(e<0||i&&e<=0)&&(i?e=1-e:(e=-e,s=n));let o=String(e);for(;o.length0||a>-n)&&(a+=n),e===ae.Hours)0===a&&-12===n&&(a=12);else if(e===ae.FractionalSeconds)return function(e,t){return Nr(e,3).substr(0,t)}(a,t);const l=ir(o,se.MinusSign);return Nr(a,t,l,r,i)}}function ot(e,t,n=Ot.Format,r=!1){return function(i,s){return function(e,t,n,r,i,s){switch(n){case we.Months:return function(e,t,n){const r=En(e),s=sr([r[H.MonthsFormat],r[H.MonthsStandalone]],t);return sr(s,n)}(t,i,r)[e.getMonth()];case we.Days:return function(e,t,n){const r=En(e),s=sr([r[H.DaysFormat],r[H.DaysStandalone]],t);return sr(s,n)}(t,i,r)[e.getDay()];case we.DayPeriods:const o=e.getHours(),a=e.getMinutes();if(s){const u=function(e){const t=En(e);return AE(t),(t[H.ExtraData][2]||[]).map(r=>"string"==typeof r?Ph(r):[Ph(r[0]),Ph(r[1])])}(t),c=function(e,t,n){const r=En(e);AE(r);const s=sr([r[H.ExtraData][0],r[H.ExtraData][1]],t)||[];return sr(s,n)||[]}(t,i,r),d=u.findIndex(f=>{if(Array.isArray(f)){const[g,m]=f,b=o>=g.hours&&a>=g.minutes,E=o0?Math.floor(i/60):Math.ceil(i/60);switch(e){case jt.Short:return(i>=0?"+":"")+Nr(o,2,s)+Nr(Math.abs(i%60),2,s);case jt.ShortGMT:return"GMT"+(i>=0?"+":"")+Nr(o,1,s);case jt.Long:return"GMT"+(i>=0?"+":"")+Nr(o,2,s)+":"+Nr(Math.abs(i%60),2,s);case jt.Extended:return 0===r?"Z":(i>=0?"+":"")+Nr(o,2,s)+":"+Nr(Math.abs(i%60),2,s);default:throw new Error(`Unknown zone width "${e}"`)}}}function IE(e){return Hu(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function Lh(e,t=!1){return function(n,r){let i;if(t){const s=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,o=n.getDate();i=1+Math.floor((o+s)/7)}else{const s=IE(n),o=function(e){const t=Hu(e,0,1).getDay();return Hu(e,0,1+(t<=4?4:11)-t)}(s.getFullYear()),a=s.getTime()-o.getTime();i=1+Math.round(a/6048e5)}return Nr(i,e,ir(r,se.MinusSign))}}function Wu(e,t=!1){return function(n,r){return Nr(IE(n).getFullYear(),e,ir(r,se.MinusSign),t)}}const Fh={};function SE(e,t){e=e.replace(/:/g,"");const n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function OE(e){return e instanceof Date&&!isNaN(e.valueOf())}class qu{}let eF=(()=>{class e extends qu{constructor(n){super(),this.locale=n}getPluralCategory(n,r){switch(TL(r||this.locale)(n)){case Nt.Zero:return"zero";case Nt.One:return"one";case Nt.Two:return"two";case Nt.Few:return"few";case Nt.Many:return"many";default:return"other"}}}return e.\u0275fac=function(n){return new(n||e)(te(ki))},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})(),NE=(()=>{class e{constructor(n,r,i,s){this._iterableDiffers=n,this._keyValueDiffers=r,this._ngEl=i,this._renderer=s,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(n){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof n?n.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(n){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof n?n.split(/\s+/):n,this._rawClass&&(Ra(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const n=this._iterableDiffer.diff(this._rawClass);n&&this._applyIterableChanges(n)}else if(this._keyValueDiffer){const n=this._keyValueDiffer.diff(this._rawClass);n&&this._applyKeyValueChanges(n)}}_applyKeyValueChanges(n){n.forEachAddedItem(r=>this._toggleClass(r.key,r.currentValue)),n.forEachChangedItem(r=>this._toggleClass(r.key,r.currentValue)),n.forEachRemovedItem(r=>{r.previousValue&&this._toggleClass(r.key,!1)})}_applyIterableChanges(n){n.forEachAddedItem(r=>{if("string"!=typeof r.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${de(r.item)}`);this._toggleClass(r.item,!0)}),n.forEachRemovedItem(r=>this._toggleClass(r.item,!1))}_applyClasses(n){n&&(Array.isArray(n)||n instanceof Set?n.forEach(r=>this._toggleClass(r,!0)):Object.keys(n).forEach(r=>this._toggleClass(r,!!n[r])))}_removeClasses(n){n&&(Array.isArray(n)||n instanceof Set?n.forEach(r=>this._toggleClass(r,!1)):Object.keys(n).forEach(r=>this._toggleClass(r,!1)))}_toggleClass(n,r){(n=n.trim())&&n.split(/\s+/g).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}}return e.\u0275fac=function(n){return new(n||e)(ne(ja),ne(Io),ne(bn),ne(Lf))},e.\u0275dir=Fn({type:e,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),e})();class rF{constructor(t,n,r,i){this.$implicit=t,this.ngForOf=n,this.index=r,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let jh=(()=>{class e{constructor(n,r,i){this._viewContainer=n,this._template=r,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(n){n&&(this._template=n)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const n=this._ngForOf;if(!this._differ&&n)try{this._differ=this._differs.find(n).create(this.ngForTrackBy)}catch(r){throw new Error(`Cannot find a differ supporting object '${n}' of type '${function(e){return e.name||typeof e}(n)}'. NgFor only supports binding to Iterables such as Arrays.`)}}if(this._differ){const n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){const r=[];n.forEachOperation((i,s,o)=>{if(null==i.previousIndex){const a=this._viewContainer.createEmbeddedView(this._template,new rF(null,this._ngForOf,-1,-1),null===o?void 0:o),l=new PE(i,a);r.push(l)}else if(null==o)this._viewContainer.remove(null===s?void 0:s);else if(null!==s){const a=this._viewContainer.get(s);this._viewContainer.move(a,o);const l=new PE(i,a);r.push(l)}});for(let i=0;i{this._viewContainer.get(i.currentIndex).context.$implicit=i.item})}_perViewChange(n,r){n.context.$implicit=r.item}static ngTemplateContextGuard(n,r){return!0}}return e.\u0275fac=function(n){return new(n||e)(ne(Gr),ne(fi),ne(ja))},e.\u0275dir=Fn({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),e})();class PE{constructor(t,n){this.record=t,this.view=n}}let Qu=(()=>{class e{constructor(n,r){this._viewContainer=n,this._context=new sF,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){LE("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){LE("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,r){return!0}}return e.\u0275fac=function(n){return new(n||e)(ne(Gr),ne(fi))},e.\u0275dir=Fn({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),e})();class sF{constructor(){this.$implicit=null,this.ngIf=null}}function LE(e,t){if(t&&!t.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${de(t)}'.`)}let kE=(()=>{class e{constructor(n,r,i){this._ngEl=n,this._differs=r,this._renderer=i,this._ngStyle=null,this._differ=null}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){const n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,r){const[i,s]=n.split(".");null!=(r=null!=r&&s?`${r}${s}`:r)?this._renderer.setStyle(this._ngEl.nativeElement,i,r):this._renderer.removeStyle(this._ngEl.nativeElement,i)}_applyChanges(n){n.forEachRemovedItem(r=>this._setStyle(r.key,null)),n.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),n.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}}return e.\u0275fac=function(n){return new(n||e)(ne(bn),ne(Io),ne(Lf))},e.\u0275dir=Fn({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),e})();let VE=(()=>{class e{constructor(n){this.locale=n}transform(n,r="mediumDate",i,s){if(null==n||""===n||n!=n)return null;try{return NL(n,r,s||this.locale,i)}catch(o){throw function(e,t){return Error(`InvalidPipeArgument: '${t}' for pipe '${de(e)}'`)}(e,o.message)}}}return e.\u0275fac=function(n){return new(n||e)(ne(ki,16))},e.\u0275pipe=pn({name:"date",type:e,pure:!0}),e})(),UE=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=ii({type:e}),e.\u0275inj=tn({providers:[{provide:qu,useClass:eF}]}),e})();class Yh extends class extends class{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function(e){Bu||(Bu=e)}(new Yh)}onAndCancel(t,n,r){return t.addEventListener(n,r,!1),()=>{t.removeEventListener(n,r,!1)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,n){return(n=n||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return"window"===n?window:"document"===n?t:"body"===n?t.body:null}getBaseHref(t){const n=(dl=dl||document.querySelector("base"),dl?dl.getAttribute("href"):null);return null==n?null:function(e){Zu=Zu||document.createElement("a"),Zu.setAttribute("href",e);const t=Zu.pathname;return"/"===t.charAt(0)?t:`/${t}`}(n)}resetBaseElement(){dl=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function(e,t){t=encodeURIComponent(t);for(const n of e.split(";")){const r=n.indexOf("="),[i,s]=-1==r?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(s)}return null}(document.cookie,t)}}let Zu,dl=null;const HE=new ke("TRANSITION_ID"),VF=[{provide:Iu,useFactory:function(e,t,n){return()=>{n.get(Po).donePromise.then(()=>{const r=ll(),i=t.querySelectorAll(`style[ng-transition="${e}"]`);for(let s=0;s{const s=t.findTestabilityInTree(r,i);if(null==s)throw new Error("Could not find testability for element.");return s},Re.getAllAngularTestabilities=()=>t.getAllTestabilities(),Re.getAllAngularRootElements=()=>t.getAllRootElements(),Re.frameworkStabilizers||(Re.frameworkStabilizers=[]),Re.frameworkStabilizers.push(r=>{const i=Re.getAllAngularTestabilities();let s=i.length,o=!1;const a=function(l){o=o||l,s--,0==s&&r(o)};i.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(t,n,r){if(null==n)return null;const i=t.getTestability(n);return null!=i?i:r?ll().isShadowRoot(n)?this.findTestabilityInTree(t,n.host,!0):this.findTestabilityInTree(t,n.parentElement,!0):null}}let BF=(()=>{class e{build(){return new XMLHttpRequest}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();const fl=new ke("EventManagerPlugins");let Ju=(()=>{class e{constructor(n,r){this._zone=r,this._eventNameToPlugin=new Map,n.forEach(i=>i.manager=this),this._plugins=n.slice().reverse()}addEventListener(n,r,i){return this._findPluginFor(r).addEventListener(n,r,i)}addGlobalEventListener(n,r,i){return this._findPluginFor(r).addGlobalEventListener(n,r,i)}getZone(){return this._zone}_findPluginFor(n){const r=this._eventNameToPlugin.get(n);if(r)return r;const i=this._plugins;for(let s=0;s{class e{constructor(){this._stylesSet=new Set}addStyles(n){const r=new Set;n.forEach(i=>{this._stylesSet.has(i)||(this._stylesSet.add(i),r.add(i))}),this.onStylesAdded(r)}onStylesAdded(n){}getAllStyles(){return Array.from(this._stylesSet)}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})(),hl=(()=>{class e extends KE{constructor(n){super(),this._doc=n,this._hostNodes=new Map,this._hostNodes.set(n.head,[])}_addStylesToHost(n,r,i){n.forEach(s=>{const o=this._doc.createElement("style");o.textContent=s,i.push(r.appendChild(o))})}addHost(n){const r=[];this._addStylesToHost(this._stylesSet,n,r),this._hostNodes.set(n,r)}removeHost(n){const r=this._hostNodes.get(n);r&&r.forEach(YE),this._hostNodes.delete(n)}onStylesAdded(n){this._hostNodes.forEach((r,i)=>{this._addStylesToHost(n,i,r)})}ngOnDestroy(){this._hostNodes.forEach(n=>n.forEach(YE))}}return e.\u0275fac=function(n){return new(n||e)(te(rn))},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();function YE(e){ll().remove(e)}const qh={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Qh=/%COMP%/g;function ec(e,t,n){for(let r=0;r{if("__ngUnwrap__"===t)return e;!1===e(t)&&(t.preventDefault(),t.returnValue=!1)}}let tc=(()=>{class e{constructor(n,r,i){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.rendererByCompId=new Map,this.defaultRenderer=new Zh(n)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;switch(r.encapsulation){case be.Emulated:{let i=this.rendererByCompId.get(r.id);return i||(i=new e2(this.eventManager,this.sharedStylesHost,r,this.appId),this.rendererByCompId.set(r.id,i)),i.applyToHost(n),i}case 1:case be.ShadowDom:return new t2(this.eventManager,this.sharedStylesHost,n,r);default:if(!this.rendererByCompId.has(r.id)){const i=ec(r.id,r.styles,[]);this.sharedStylesHost.addStyles(i),this.rendererByCompId.set(r.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return e.\u0275fac=function(n){return new(n||e)(te(Ju),te(hl),te(rl))},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();class Zh{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,n){return n?document.createElementNS(qh[n]||n,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,n){t.appendChild(n)}insertBefore(t,n,r){t&&t.insertBefore(n,r)}removeChild(t,n){t&&t.removeChild(n)}selectRootElement(t,n){let r="string"==typeof t?document.querySelector(t):t;if(!r)throw new Error(`The selector "${t}" did not match any elements`);return n||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,i){if(i){n=i+":"+n;const s=qh[i];s?t.setAttributeNS(s,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){const i=qh[r];i?t.removeAttributeNS(i,n):t.removeAttribute(`${r}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,i){i&(jn.DashCase|jn.Important)?t.style.setProperty(n,r,i&jn.Important?"important":""):t.style[n]=r}removeStyle(t,n,r){r&jn.DashCase?t.style.removeProperty(n):t.style[n]=""}setProperty(t,n,r){t[n]=r}setValue(t,n){t.nodeValue=n}listen(t,n,r){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,n,qE(r)):this.eventManager.addEventListener(t,n,qE(r))}}class e2 extends Zh{constructor(t,n,r,i){super(t),this.component=r;const s=ec(i+"-"+r.id,r.styles,[]);n.addStyles(s),this.contentAttr=function(e){return"_ngcontent-%COMP%".replace(Qh,e)}(i+"-"+r.id),this.hostAttr=function(e){return"_nghost-%COMP%".replace(Qh,e)}(i+"-"+r.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,n){const r=super.createElement(t,n);return super.setAttribute(r,this.contentAttr,""),r}}class t2 extends Zh{constructor(t,n,r,i){super(t),this.sharedStylesHost=n,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=ec(i.id,i.styles,[]);for(let o=0;o{class e extends Gh{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i){return n.addEventListener(r,i,!1),()=>this.removeEventListener(n,r,i)}removeEventListener(n,r,i){return n.removeEventListener(r,i)}}return e.\u0275fac=function(n){return new(n||e)(te(rn))},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();const XE=["alt","control","meta","shift"],u2={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},JE={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},c2={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let d2=(()=>{class e extends Gh{constructor(n){super(n)}supports(n){return null!=e.parseEventName(n)}addEventListener(n,r,i){const s=e.parseEventName(r),o=e.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ll().onAndCancel(n,s.domEventName,o))}static parseEventName(n){const r=n.toLowerCase().split("."),i=r.shift();if(0===r.length||"keydown"!==i&&"keyup"!==i)return null;const s=e._normalizeKey(r.pop());let o="";if(XE.forEach(l=>{const u=r.indexOf(l);u>-1&&(r.splice(u,1),o+=l+".")}),o+=s,0!=r.length||0===s.length)return null;const a={};return a.domEventName=i,a.fullKey=o,a}static getEventFullKey(n){let r="",i=function(e){let t=e.key;if(null==t){if(t=e.keyIdentifier,null==t)return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),3===e.location&&JE.hasOwnProperty(t)&&(t=JE[t]))}return u2[t]||t}(n);return i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),XE.forEach(s=>{s!=i&&c2[s](n)&&(r+=s+".")}),r+=i,r}static eventCallback(n,r,i){return s=>{e.getEventFullKey(s)===n&&i.runGuarded(()=>r(s))}}static _normalizeKey(n){switch(n){case"esc":return"escape";default:return n}}}return e.\u0275fac=function(n){return new(n||e)(te(rn))},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})(),nc=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=ee({factory:function(){return te(Jh)},token:e,providedIn:"root"}),e})(),Jh=(()=>{class e extends nc{constructor(n){super(),this._doc=n}sanitize(n,r){if(null==r)return null;switch(n){case et.NONE:return r;case et.HTML:return $r(r,"HTML")?Un(r):Zp(this._doc,String(r)).toString();case et.STYLE:return $r(r,"Style")?Un(r):r;case et.SCRIPT:if($r(r,"Script"))return Un(r);throw new Error("unsafe value used in a script context");case et.URL:return Hp(r),$r(r,"URL")?Un(r):ba(String(r));case et.RESOURCE_URL:if($r(r,"ResourceURL"))return Un(r);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${n} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(n){return function(e){return new HT(e)}(n)}bypassSecurityTrustStyle(n){return function(e){return new zT(e)}(n)}bypassSecurityTrustScript(n){return function(e){return new KT(e)}(n)}bypassSecurityTrustUrl(n){return function(e){return new YT(e)}(n)}bypassSecurityTrustResourceUrl(n){return function(e){return new WT(e)}(n)}}return e.\u0275fac=function(n){return new(n||e)(te(rn))},e.\u0275prov=ee({factory:function(){return function(e){return new Jh(e.get(rn))}(te(lo))},token:e,providedIn:"root"}),e})();const v2=Yv(cP,"browser",[{provide:ch,useValue:"browser"},{provide:Fv,useValue:function(){Yh.makeCurrent(),Wh.init()},multi:!0},{provide:rn,useFactory:function(){return function(e){Wc=e}(document),document},deps:[]}]),E2=[[],{provide:Oa,useValue:"root"},{provide:fs,useFactory:function(){return new fs},deps:[]},{provide:fl,useClass:n2,multi:!0,deps:[rn,Rt,ch]},{provide:fl,useClass:d2,multi:!0,deps:[rn]},[],{provide:tc,useClass:tc,deps:[Ju,hl,rl]},{provide:ys,useExisting:tc},{provide:KE,useExisting:hl},{provide:hl,useClass:hl,deps:[rn]},{provide:mh,useClass:mh,deps:[Rt]},{provide:Ju,useClass:Ju,deps:[fl,Rt]},{provide:class{},useClass:BF,deps:[]},[]];let eg=(()=>{class e{constructor(n){if(n)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(n){return{ngModule:e,providers:[{provide:rl,useValue:n.appId},{provide:HE,useExisting:rl},VF]}}}return e.\u0275fac=function(n){return new(n||e)(te(e,12))},e.\u0275mod=ii({type:e}),e.\u0275inj=tn({providers:E2,imports:[UE,yP]}),e})();"undefined"!=typeof window&&window;class S2 extends Ie{constructor(t,n){super()}schedule(t,n=0){return this}}class tb extends S2{constructor(t,n){super(t,n),this.scheduler=t,this.work=n,this.pending=!1}schedule(t,n=0){if(this.closed)return this;this.state=t;const r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,n)),this.pending=!0,this.delay=n,this.id=this.id||this.requestAsyncId(i,this.id,n),this}requestAsyncId(t,n,r=0){return setInterval(t.flush.bind(t,this),r)}recycleAsyncId(t,n,r=0){if(null!==r&&this.delay===r&&!1===this.pending)return n;clearInterval(n)}execute(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(t,n);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,n){let i,r=!1;try{this.work(t)}catch(s){r=!0,i=!!s&&s||new Error(s)}if(r)return this.unsubscribe(),i}_unsubscribe(){const t=this.id,n=this.scheduler,r=n.actions,i=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&r.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null}}let nb=(()=>{class e{constructor(n,r=e.now){this.SchedulerAction=n,this.now=r}schedule(n,r=0,i){return new this.SchedulerAction(this,n).schedule(i,r)}}return e.now=()=>Date.now(),e})();class pi extends nb{constructor(t,n=nb.now){super(t,()=>pi.delegate&&pi.delegate!==this?pi.delegate.now():n()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,n=0,r){return pi.delegate&&pi.delegate!==this?pi.delegate.schedule(t,n,r):super.schedule(t,n,r)}flush(t){const{actions:n}=this;if(this.active)return void n.push(t);let r;this.active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=n.shift());if(this.active=!1,r){for(;t=n.shift();)t.unsubscribe();throw r}}}const M2=new class extends pi{}(class extends tb{constructor(t,n){super(t,n),this.scheduler=t,this.work=n}schedule(t,n=0){return n>0?super.schedule(t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)}execute(t,n){return n>0||this.closed?super.execute(t,n):this._execute(t,n)}requestAsyncId(t,n,r=0){return null!==r&&r>0||null===r&&this.delay>0?super.requestAsyncId(t,n,r):t.flush(this)}}),R2=new J(e=>e.complete());function ng(e){return e?function(e){return new J(t=>e.schedule(()=>t.complete()))}(e):R2}function qr(...e){let t=e[e.length-1];return Tn(t)?(e.pop(),ei(e,t)):Pn(e)}class or{constructor(t,n,r){this.kind=t,this.value=n,this.error=r,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,n,r){switch(this.kind){case"N":return t&&t(this.value);case"E":return n&&n(this.error);case"C":return r&&r()}}accept(t,n,r){return t&&"function"==typeof t.next?this.observe(t):this.do(t,n,r)}toObservable(){switch(this.kind){case"N":return qr(this.value);case"E":return function(e,t){return new J(n=>n.error(e))}(this.error);case"C":return ng()}throw new Error("unexpected notification kind value")}static createNext(t){return void 0!==t?new or("N",t):or.undefinedValueNotification}static createError(t){return new or("E",void 0,t)}static createComplete(){return or.completeNotification}}or.completeNotification=new or("C"),or.undefinedValueNotification=new or("N",void 0);class rc extends Ae{constructor(t,n,r=0){super(t),this.scheduler=n,this.delay=r}static dispatch(t){const{notification:n,destination:r}=t;n.observe(r),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(rc.dispatch,this.delay,new k2(t,this.destination)))}_next(t){this.scheduleMessage(or.createNext(t))}_error(t){this.scheduleMessage(or.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(or.createComplete()),this.unsubscribe()}}class k2{constructor(t,n){this.notification=t,this.destination=n}}class rb extends bt{constructor(t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,r){super(),this.scheduler=r,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const n=this._events;n.push(t),n.length>this._bufferSize&&n.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new V2(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(t){const n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,s=r.length;let o;if(this.closed)throw new nt;if(this.isStopped||this.hasError?o=Ie.EMPTY:(this.observers.push(t),o=new Ze(this,t)),i&&t.add(t=new rc(t,i)),n)for(let a=0;an&&(o=Math.max(o,s-n)),o>0&&i.splice(0,o),i}}class V2{constructor(t,n){this.time=t,this.value=n}}function ic(e,t){return"function"==typeof t?n=>n.pipe(ic((r,i)=>Jt(e(r,i)).pipe($t((s,o)=>t(r,s,i,o))))):n=>n.lift(new B2(e))}class B2{constructor(t){this.project=t}call(t,n){return n.subscribe(new U2(t,this.project))}}class U2 extends Fr{constructor(t,n){super(t),this.project=n,this.index=0}_next(t){let n;const r=this.index++;try{n=this.project(t,r)}catch(i){return void this.destination.error(i)}this._innerSub(n)}_innerSub(t){const n=this.innerSubscription;n&&n.unsubscribe();const r=new qi(this),i=this.destination;i.add(r),this.innerSubscription=hr(t,r),this.innerSubscription!==r&&i.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;(!t||t.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}const sc={schedule(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)},scheduleBeforeRender(e){if("undefined"==typeof window)return sc.schedule(e,0);if(void 0===window.requestAnimationFrame)return sc.schedule(e,16);const t=window.requestAnimationFrame(e);return()=>window.cancelAnimationFrame(t)}};let rg;function Q2(e,t,n){let r=n;return function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}(e)&&t.some((i,s)=>!("*"===i||!function(e,t){if(!rg){const n=Element.prototype;rg=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE&&rg.call(e,t)}(e,i)||(r=s,0))),r}class X2{constructor(t,n){this.componentFactory=n.get(ci).resolveComponentFactory(t)}create(t){return new J2(this.componentFactory,t)}}class J2{constructor(t,n){this.componentFactory=t,this.injector=n,this.eventEmitters=new rb(1),this.events=this.eventEmitters.pipe(ic(r=>Qi(...r))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map(({propName:r})=>r)),this.ngZone=this.injector.get(Rt),this.elementZone="undefined"==typeof Zone?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{null===this.componentRef||null!==this.scheduledDestroyFn||(this.scheduledDestroyFn=sc.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},10))})}getInputValue(t){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,n){this.runInZone(()=>{null!==this.componentRef?function(e,t){return e===t||e!=e&&t!=t}(n,this.getInputValue(t))&&(void 0!==n||!this.unchangedInputs.has(t))||(this.recordInputChange(t,n),this.unchangedInputs.delete(t),this.hasInputChanges=!0,this.componentRef.instance[t]=n,this.scheduleDetectChanges()):this.initialInputValues.set(t,n)})}initializeComponent(t){const n=ze.create({providers:[],parent:this.injector}),r=function(e,t){const n=e.childNodes,r=t.map(()=>[]);let i=-1;t.some((s,o)=>"*"===s&&(i=o,!0));for(let s=0,o=n.length;s{this.initialInputValues.has(t)&&this.setInputValue(t,this.initialInputValues.get(t))}),this.initialInputValues.clear()}initializeOutputs(t){const n=this.componentFactory.outputs.map(({propName:r,templateName:i})=>t.instance[r].pipe($t(o=>({name:i,value:o}))));this.eventEmitters.next(n)}callNgOnChanges(t){if(!this.implementsOnChanges||null===this.inputChanges)return;const n=this.inputChanges;this.inputChanges=null,t.instance.ngOnChanges(n)}markViewForCheck(t){this.hasInputChanges&&(this.hasInputChanges=!1,t.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=sc.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(t,n){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const r=this.inputChanges[t];if(r)return void(r.currentValue=n);const i=this.unchangedInputs.has(t),s=i?void 0:this.getInputValue(t);this.inputChanges[t]=new Kc(s,n,i)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}}class ek extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}function xt(e,t,n,r){return new(n||(n=Promise))(function(s,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):function(s){return s instanceof n?s:new n(function(o){o(s)})}(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})}var ik=Wn(962);function Ui(e){return!!e&&(e instanceof J||"function"==typeof e.lift&&"function"==typeof e.subscribe)}function ac(e,t){return new J(n=>{const r=e.length;if(0===r)return void n.complete();const i=new Array(r);let s=0,o=0;for(let a=0;a{u||(u=!0,o++),i[a]=c},error:c=>n.error(c),complete:()=>{s++,(s===r||!u)&&(o===r&&n.next(t?t.reduce((c,d,f)=>(c[d]=i[f],c),{}):i),n.complete())}}))}})}function ab(...e){return Ct(1)(qr(...e))}function lb(e){return new J(t=>{let n;try{n=e()}catch(i){return void t.error(i)}return(n?Jt(n):ng()).subscribe(t)})}const ak=(()=>{function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e})();function lc(e){return t=>0===e?ng():t.lift(new lk(e))}class lk{constructor(t){if(this.total=t,this.total<0)throw new ak}call(t,n){return n.subscribe(new uk(t,this.total))}}class uk extends Ae{constructor(t,n){super(t),this.total=n,this.count=0}_next(t){const n=this.total,r=++this.count;r<=n&&(this.destination.next(t),r===n&&(this.destination.complete(),this.unsubscribe()))}}function ub(e,t,n){let r;return r=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:n},i=>i.lift(function({bufferSize:e=Number.POSITIVE_INFINITY,windowTime:t=Number.POSITIVE_INFINITY,refCount:n,scheduler:r}){let i,o,s=0,a=!1,l=!1;return function(c){let d;s++,!i||a?(a=!1,i=new rb(e,t,r),d=i.subscribe(this),o=c.subscribe({next(f){i.next(f)},error(f){a=!0,i.error(f)},complete(){l=!0,o=void 0,i.complete()}}),l&&(o=void 0)):d=i.subscribe(this),this.add(()=>{s--,d.unsubscribe(),d=void 0,o&&!l&&n&&0===s&&(o.unsubscribe(),o=void 0,i=void 0)})}}(r))}class uc{}let cb=(()=>{class e extends uc{getTranslation(n){return qr({})}}return e.\u0275fac=function(){let t;return function(r){return(t||(t=Ul(e)))(r||e)}}(),e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();class sg{}let db=(()=>{class e{handle(n){return n.key}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();function gl(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;let i,s,o,n=typeof e;if(n==typeof t&&"object"==n){if(!Array.isArray(e)){if(Array.isArray(t))return!1;for(s in o=Object.create(null),e){if(!gl(e[s],t[s]))return!1;o[s]=!0}for(s in t)if(!(s in o)&&void 0!==t[s])return!1;return!0}if(!Array.isArray(t))return!1;if((i=e.length)==t.length){for(s=0;s{og(t[r])?r in e?n[r]=fb(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n}class cc{}let hb=(()=>{class e extends cc{constructor(){super(...arguments),this.templateMatcher=/{{\s?([^{}\s]*)\s?}}/g}interpolate(n,r){let i;return i="string"==typeof n?this.interpolateString(n,r):"function"==typeof n?this.interpolateFunction(n,r):n,i}getValue(n,r){let i="string"==typeof r?r.split("."):[r];r="";do{r+=i.shift(),!Hn(n)||!Hn(n[r])||"object"!=typeof n[r]&&i.length?i.length?r+=".":n=void 0:(n=n[r],r="")}while(i.length);return n}interpolateFunction(n,r){return n(r)}interpolateString(n,r){return r?n.replace(this.templateMatcher,(i,s)=>{let o=this.getValue(r,s);return Hn(o)?o:i}):n}}return e.\u0275fac=function(){let t;return function(r){return(t||(t=Ul(e)))(r||e)}}(),e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();class dc{}let gb=(()=>{class e extends dc{compile(n,r){return n}compileTranslations(n,r){return n}}return e.\u0275fac=function(){let t;return function(r){return(t||(t=Ul(e)))(r||e)}}(),e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();class pb{constructor(){this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new vt,this.onLangChange=new vt,this.onDefaultLangChange=new vt}}const ag=new ke("USE_STORE"),lg=new ke("USE_DEFAULT_LANG"),ug=new ke("DEFAULT_LANGUAGE"),cg=new ke("USE_EXTEND");let Vo=(()=>{class e{constructor(n,r,i,s,o,a=!0,l=!1,u=!1,c){this.store=n,this.currentLoader=r,this.compiler=i,this.parser=s,this.missingTranslationHandler=o,this.useDefaultLang=a,this.isolate=l,this.extend=u,this.pending=!1,this._onTranslationChange=new vt,this._onLangChange=new vt,this._onDefaultLangChange=new vt,this._langs=[],this._translations={},this._translationRequests={},c&&this.setDefaultLang(c)}get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(n){this.isolate?this._defaultLang=n:this.store.defaultLang=n}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(n){this.isolate?this._currentLang=n:this.store.currentLang=n}get langs(){return this.isolate?this._langs:this.store.langs}set langs(n){this.isolate?this._langs=n:this.store.langs=n}get translations(){return this.isolate?this._translations:this.store.translations}set translations(n){this.isolate?this._translations=n:this.store.translations=n}setDefaultLang(n){if(n===this.defaultLang)return;let r=this.retrieveTranslations(n);void 0!==r?(null==this.defaultLang&&(this.defaultLang=n),r.pipe(lc(1)).subscribe(i=>{this.changeDefaultLang(n)})):this.changeDefaultLang(n)}getDefaultLang(){return this.defaultLang}use(n){if(n===this.currentLang)return qr(this.translations[n]);let r=this.retrieveTranslations(n);return void 0!==r?(this.currentLang||(this.currentLang=n),r.pipe(lc(1)).subscribe(i=>{this.changeLang(n)}),r):(this.changeLang(n),qr(this.translations[n]))}retrieveTranslations(n){let r;return(void 0===this.translations[n]||this.extend)&&(this._translationRequests[n]=this._translationRequests[n]||this.getTranslation(n),r=this._translationRequests[n]),r}getTranslation(n){this.pending=!0;const r=this.currentLoader.getTranslation(n).pipe(ub(1),lc(1));return this.loadingTranslations=r.pipe($t(i=>this.compiler.compileTranslations(i,n)),ub(1),lc(1)),this.loadingTranslations.subscribe({next:i=>{this.translations[n]=this.extend&&this.translations[n]?Object.assign(Object.assign({},i),this.translations[n]):i,this.updateLangs(),this.pending=!1},error:i=>{this.pending=!1}}),r}setTranslation(n,r,i=!1){r=this.compiler.compileTranslations(r,n),this.translations[n]=(i||this.extend)&&this.translations[n]?fb(this.translations[n],r):r,this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}getLangs(){return this.langs}addLangs(n){n.forEach(r=>{-1===this.langs.indexOf(r)&&this.langs.push(r)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(n,r,i){let s;if(r instanceof Array){let o={},a=!1;for(let l of r)o[l]=this.getParsedResult(n,l,i),Ui(o[l])&&(a=!0);return a?function(...e){if(1===e.length){const t=e[0];if(at(t))return ac(t,null);if(Oe(t)&&Object.getPrototypeOf(t)===Object.prototype){const n=Object.keys(t);return ac(n.map(r=>t[r]),n)}}if("function"==typeof e[e.length-1]){const t=e.pop();return ac(e=1===e.length&&at(e[0])?e[0]:e,null).pipe($t(n=>t(...n)))}return ac(e,null)}(r.map(u=>Ui(o[u])?o[u]:qr(o[u]))).pipe($t(u=>{let c={};return u.forEach((d,f)=>{c[r[f]]=d}),c})):o}if(n&&(s=this.parser.interpolate(this.parser.getValue(n,r),i)),void 0===s&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(s=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],r),i)),void 0===s){let o={key:r,translateService:this};void 0!==i&&(o.interpolateParams=i),s=this.missingTranslationHandler.handle(o)}return void 0!==s?s:r}get(n,r){if(!Hn(n)||!n.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(function(e,t){return gr(e,void 0,1)}(i=>Ui(i=this.getParsedResult(i,n,r))?i:qr(i)));{let i=this.getParsedResult(this.translations[this.currentLang],n,r);return Ui(i)?i:qr(i)}}getStreamOnTranslationChange(n,r){if(!Hn(n)||!n.length)throw new Error('Parameter "key" required');return ab(lb(()=>this.get(n,r)),this.onTranslationChange.pipe(ic(i=>{const s=this.getParsedResult(i.translations,n,r);return"function"==typeof s.subscribe?s:qr(s)})))}stream(n,r){if(!Hn(n)||!n.length)throw new Error('Parameter "key" required');return ab(lb(()=>this.get(n,r)),this.onLangChange.pipe(ic(i=>{const s=this.getParsedResult(i.translations,n,r);return Ui(s)?s:qr(s)})))}instant(n,r){if(!Hn(n)||!n.length)throw new Error('Parameter "key" required');let i=this.getParsedResult(this.translations[this.currentLang],n,r);if(Ui(i)){if(n instanceof Array){let s={};return n.forEach((o,a)=>{s[n[a]]=n[a]}),s}return n}return i}set(n,r,i=this.currentLang){this.translations[i][n]=this.compiler.compile(r,i),this.updateLangs(),this.onTranslationChange.emit({lang:i,translations:this.translations[i]})}changeLang(n){this.currentLang=n,this.onLangChange.emit({lang:n,translations:this.translations[n]}),null==this.defaultLang&&this.changeDefaultLang(n)}changeDefaultLang(n){this.defaultLang=n,this.onDefaultLangChange.emit({lang:n,translations:this.translations[n]})}reloadLang(n){return this.resetLang(n),this.getTranslation(n)}resetLang(n){this._translationRequests[n]=void 0,this.translations[n]=void 0}getBrowserLang(){if("undefined"==typeof window||void 0===window.navigator)return;let n=window.navigator.languages?window.navigator.languages[0]:null;return n=n||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,void 0!==n?(-1!==n.indexOf("-")&&(n=n.split("-")[0]),-1!==n.indexOf("_")&&(n=n.split("_")[0]),n):void 0}getBrowserCultureLang(){if("undefined"==typeof window||void 0===window.navigator)return;let n=window.navigator.languages?window.navigator.languages[0]:null;return n=n||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,n}}return e.\u0275fac=function(n){return new(n||e)(te(pb),te(uc),te(dc),te(cc),te(sg),te(lg),te(ag),te(cg),te(ug))},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})(),dg=(()=>{class e{constructor(n,r){this.translate=n,this._ref=r,this.value=""}updateValue(n,r,i){let s=o=>{this.value=void 0!==o?o:n,this.lastKey=n,this._ref.markForCheck()};if(i){let o=this.translate.getParsedResult(i,n,r);Ui(o.subscribe)?o.subscribe(s):s(o)}this.translate.get(n,r).subscribe(s)}transform(n,...r){if(!n||!n.length)return n;if(gl(n,this.lastKey)&&gl(r,this.lastParams))return this.value;let i;if(Hn(r[0])&&r.length)if("string"==typeof r[0]&&r[0].length){let s=r[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{i=JSON.parse(s)}catch(o){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${r[0]}`)}}else"object"==typeof r[0]&&!Array.isArray(r[0])&&(i=r[0]);return this.lastKey=n,this.lastParams=r,this.updateValue(n,i),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(s=>{this.lastKey&&s.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(n,i,s.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(s=>{this.lastKey&&(this.lastKey=null,this.updateValue(n,i,s.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(n,i))})),this.value}_dispose(){void 0!==this.onTranslationChange&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),void 0!==this.onLangChange&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),void 0!==this.onDefaultLangChange&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}}return e.\u0275fac=function(n){return new(n||e)(ne(Vo,16),ne(di,16))},e.\u0275pipe=pn({name:"translate",type:e,pure:!1}),e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})(),fk=(()=>{class e{static forRoot(n={}){return{ngModule:e,providers:[n.loader||{provide:uc,useClass:cb},n.compiler||{provide:dc,useClass:gb},n.parser||{provide:cc,useClass:hb},n.missingTranslationHandler||{provide:sg,useClass:db},pb,{provide:ag,useValue:n.isolate},{provide:lg,useValue:n.useDefaultLang},{provide:cg,useValue:n.extend},{provide:ug,useValue:n.defaultLanguage},Vo]}}static forChild(n={}){return{ngModule:e,providers:[n.loader||{provide:uc,useClass:cb},n.compiler||{provide:dc,useClass:gb},n.parser||{provide:cc,useClass:hb},n.missingTranslationHandler||{provide:sg,useClass:db},{provide:ag,useValue:n.isolate},{provide:lg,useValue:n.useDefaultLang},{provide:cg,useValue:n.extend},{provide:ug,useValue:n.defaultLanguage},Vo]}}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=ii({type:e}),e.\u0275inj=tn({}),e})();var Bo=Wn(430);class mb{}const mi="*";function fc(e,t){return{type:7,name:e,definitions:t,options:{}}}function Uo(e,t=null){return{type:4,styles:t,timings:e}}function fg(e,t=null){return{type:3,steps:e,options:t}}function yb(e,t=null){return{type:2,steps:e,options:t}}function Wt(e){return{type:6,styles:e,offset:null}}function jo(e){return{type:5,steps:e}}function hc(e,t,n=null){return{type:1,expr:e,animation:t,options:n}}function gc(e,t=null){return{type:8,animation:e,options:t}}function hg(e=null){return{type:9,options:e}}function Hk(e,t=null){return{type:10,animation:e,options:t}}function gg(e,t,n=null){return{type:11,selector:e,animation:t,options:n}}function _b(e){Promise.resolve(null).then(e)}class $o{constructor(t=0,n=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+n}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){_b(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const n="start"==t?this._onStartFns:this._onDoneFns;n.forEach(r=>r()),n.length=0}}class vb{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let n=0,r=0,i=0;const s=this.players.length;0==s?_b(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++n==s&&this._onFinish()}),o.onDestroy(()=>{++r==s&&this._onDestroy()}),o.onStart(()=>{++i==s&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const n=t*this.totalTime;this.players.forEach(r=>{const i=r.totalTime?Math.min(1,n/r.totalTime):1;r.setPosition(i)})}getPosition(){const t=this.players.reduce((n,r)=>null===n||r.totalTime>n.totalTime?r:n,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const n="start"==t?this._onStartFns:this._onDoneFns;n.forEach(r=>r()),n.length=0}}function Eb(){return"undefined"!=typeof window&&void 0!==window.document}function mg(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function ji(e){switch(e.length){case 0:return new $o;case 1:return e[0];default:return new vb(e)}}function bb(e,t,n,r,i={},s={}){const o=[],a=[];let l=-1,u=null;if(r.forEach(c=>{const d=c.offset,f=d==l,g=f&&u||{};Object.keys(c).forEach(m=>{let b=m,E=c[m];if("offset"!==m)switch(b=t.normalizePropertyName(b,o),E){case"!":E=i[m];break;case mi:E=s[m];break;default:E=t.normalizeStyleValue(m,b,E,o)}g[b]=E}),f||a.push(g),u=g,l=d}),o.length){const c="\n - ";throw new Error(`Unable to animate due to the following errors:${c}${o.join(c)}`)}return a}function yg(e,t,n,r){switch(t){case"start":e.onStart(()=>r(n&&_g(n,"start",e)));break;case"done":e.onDone(()=>r(n&&_g(n,"done",e)));break;case"destroy":e.onDestroy(()=>r(n&&_g(n,"destroy",e)))}}function _g(e,t,n){const r=n.totalTime,s=vg(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,null==r?e.totalTime:r,!!n.disabled),o=e._data;return null!=o&&(s._data=o),s}function vg(e,t,n,r,i="",s=0,o){return{element:e,triggerName:t,fromState:n,toState:r,phaseName:i,totalTime:s,disabled:!!o}}function zn(e,t,n){let r;return e instanceof Map?(r=e.get(t),r||e.set(t,r=n)):(r=e[t],r||(r=e[t]=n)),r}function Db(e){const t=e.indexOf(":");return[e.substring(1,t),e.substr(t+1)]}let Eg=(e,t)=>!1,bg=(e,t)=>!1,Cb=(e,t,n)=>[];const wb=mg();(wb||"undefined"!=typeof Element)&&(Eg=Eb()?(e,t)=>{for(;t&&t!==document.documentElement;){if(t===e)return!0;t=t.parentNode||t.host}return!1}:(e,t)=>e.contains(t),bg=(()=>{if(wb||Element.prototype.matches)return(e,t)=>e.matches(t);{const e=Element.prototype,t=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;return t?(n,r)=>t.apply(n,[r]):bg}})(),Cb=(e,t,n)=>{let r=[];if(n){const i=e.querySelectorAll(t);for(let s=0;s{const r=n.replace(/([a-z])([A-Z])/g,"$1-$2");t[r]=e[n]}),t}let Ib=(()=>{class e{validateStyleProperty(n){return Dg(n)}matchesElement(n,r){return Cg(n,r)}containsElement(n,r){return wg(n,r)}query(n,r,i){return Tg(n,r,i)}computeStyle(n,r,i){return i||""}animate(n,r,i,s,o,a=[],l){return new $o(i,s)}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();class pc{}pc.NOOP=new Ib;const Ag="ng-enter",mc="ng-leave",yc="ng-trigger",_c=".ng-trigger",Ob="ng-animating",Ig=".ng-animating";function ws(e){if("number"==typeof e)return e;const t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:Sg(parseFloat(t[1]),t[2])}function Sg(e,t){switch(t){case"s":return 1e3*e;default:return e}}function vc(e,t,n){return e.hasOwnProperty("duration")?e:function(e,t,n){let i,s=0,o="";if("string"==typeof e){const a=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push(`The provided timing value "${e}" is invalid.`),{duration:0,delay:0,easing:""};i=Sg(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(s=Sg(parseFloat(l),a[4]));const u=a[5];u&&(o=u)}else i=e;if(!n){let a=!1,l=t.length;i<0&&(t.push("Duration values below 0 are not allowed for this animation step."),a=!0),s<0&&(t.push("Delay values below 0 are not allowed for this animation step."),a=!0),a&&t.splice(l,0,`The provided timing value "${e}" is invalid.`)}return{duration:i,delay:s,easing:o}}(e,t,n)}function Ho(e,t={}){return Object.keys(e).forEach(n=>{t[n]=e[n]}),t}function $i(e,t,n={}){if(t)for(let r in e)n[r]=e[r];else Ho(e,n);return n}function Mb(e,t,n){return n?t+":"+n+";":""}function Rb(e){let t="";for(let n=0;n{const i=xg(r);n&&!n.hasOwnProperty(r)&&(n[r]=e.style[i]),e.style[i]=t[r]}),mg()&&Rb(e))}function Ts(e,t){e.style&&(Object.keys(t).forEach(n=>{const r=xg(n);e.style[r]=""}),mg()&&Rb(e))}function pl(e){return Array.isArray(e)?1==e.length?e[0]:yb(e):e}const Og=new RegExp("{{\\s*(.+?)\\s*}}","g");function Nb(e){let t=[];if("string"==typeof e){let n;for(;n=Og.exec(e);)t.push(n[1]);Og.lastIndex=0}return t}function Ec(e,t,n){const r=e.toString(),i=r.replace(Og,(s,o)=>{let a=t[o];return t.hasOwnProperty(o)||(n.push(`Please provide a value for the animation param ${o}`),a=""),a.toString()});return i==r?e:i}function bc(e){const t=[];let n=e.next();for(;!n.done;)t.push(n.value),n=e.next();return t}const Qk=/-+([a-z0-9])/g;function xg(e){return e.replace(Qk,(...t)=>t[1].toUpperCase())}function Zk(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Pb(e,t){return 0===e||0===t}function Lb(e,t,n){const r=Object.keys(n);if(r.length&&t.length){let s=t[0],o=[];if(r.forEach(a=>{s.hasOwnProperty(a)||o.push(a),s[a]=n[a]}),o.length)for(var i=1;ifunction(e,t,n){if(":"==e[0]){const l=function(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(n,r)=>parseFloat(r)>parseFloat(n);case":decrement":return(n,r)=>parseFloat(r) *"}}(e,n);if("function"==typeof l)return void t.push(l);e=l}const r=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return n.push(`The provided transition expression "${e}" is not supported`),t;const i=r[1],s=r[2],o=r[3];t.push(Fb(i,o));"<"==s[0]&&!("*"==i&&"*"==o)&&t.push(Fb(o,i))}(r,n,t)):n.push(e),n}const Cc=new Set(["true","1"]),wc=new Set(["false","0"]);function Fb(e,t){const n=Cc.has(e)||wc.has(e),r=Cc.has(t)||wc.has(t);return(i,s)=>{let o="*"==e||e==i,a="*"==t||t==s;return!o&&n&&"boolean"==typeof i&&(o=i?Cc.has(e):wc.has(e)),!a&&r&&"boolean"==typeof s&&(a=s?Cc.has(t):wc.has(t)),o&&a}}const t3=new RegExp("s*:selfs*,?","g");function Rg(e,t,n){return new n3(e).build(t,n)}class n3{constructor(t){this._driver=t}build(t,n){const r=new s3(n);return this._resetContextStyleTimingState(r),Kn(this,pl(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,n){let r=n.queryCount=0,i=n.depCount=0;const s=[],o=[];return"@"==t.name.charAt(0)&&n.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(n),0==a.type){const l=a,u=l.name;u.toString().split(/\s*,\s*/).forEach(c=>{l.name=c,s.push(this.visitState(l,n))}),l.name=u}else if(1==a.type){const l=this.visitTransition(a,n);r+=l.queryCount,i+=l.depCount,o.push(l)}else n.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:s,transitions:o,queryCount:r,depCount:i,options:null}}visitState(t,n){const r=this.visitStyle(t.styles,n),i=t.options&&t.options.params||null;if(r.containsDynamicStyles){const s=new Set,o=i||{};if(r.styles.forEach(a=>{if(Tc(a)){const l=a;Object.keys(l).forEach(u=>{Nb(l[u]).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}}),s.size){const a=bc(s.values());n.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${a.join(", ")}`)}}return{type:0,name:t.name,style:r,options:i?{params:i}:null}}visitTransition(t,n){n.queryCount=0,n.depCount=0;const r=Kn(this,pl(t.animation),n);return{type:1,matchers:Xk(t.expr,n.errors),animation:r,queryCount:n.queryCount,depCount:n.depCount,options:As(t.options)}}visitSequence(t,n){return{type:2,steps:t.steps.map(r=>Kn(this,r,n)),options:As(t.options)}}visitGroup(t,n){const r=n.currentTime;let i=0;const s=t.steps.map(o=>{n.currentTime=r;const a=Kn(this,o,n);return i=Math.max(i,n.currentTime),a});return n.currentTime=i,{type:3,steps:s,options:As(t.options)}}visitAnimate(t,n){const r=function(e,t){let n=null;if(e.hasOwnProperty("duration"))n=e;else if("number"==typeof e)return Ng(vc(e,t).duration,0,"");const r=e;if(r.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=Ng(0,0,"");return s.dynamic=!0,s.strValue=r,s}return n=n||vc(r,t),Ng(n.duration,n.delay,n.easing)}(t.timings,n.errors);n.currentAnimateTimings=r;let i,s=t.styles?t.styles:Wt({});if(5==s.type)i=this.visitKeyframes(s,n);else{let o=t.styles,a=!1;if(!o){a=!0;const u={};r.easing&&(u.easing=r.easing),o=Wt(u)}n.currentTime+=r.duration+r.delay;const l=this.visitStyle(o,n);l.isEmptyStep=a,i=l}return n.currentAnimateTimings=null,{type:4,timings:r,style:i,options:null}}visitStyle(t,n){const r=this._makeStyleAst(t,n);return this._validateStyleAst(r,n),r}_makeStyleAst(t,n){const r=[];Array.isArray(t.styles)?t.styles.forEach(o=>{"string"==typeof o?o==mi?r.push(o):n.errors.push(`The provided style string value ${o} is not allowed.`):r.push(o)}):r.push(t.styles);let i=!1,s=null;return r.forEach(o=>{if(Tc(o)){const a=o,l=a.easing;if(l&&(s=l,delete a.easing),!i)for(let u in a)if(a[u].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:r,easing:s,offset:t.offset,containsDynamicStyles:i,options:null}}_validateStyleAst(t,n){const r=n.currentAnimateTimings;let i=n.currentTime,s=n.currentTime;r&&s>0&&(s-=r.duration+r.delay),t.styles.forEach(o=>{"string"!=typeof o&&Object.keys(o).forEach(a=>{if(!this._driver.validateStyleProperty(a))return void n.errors.push(`The provided animation property "${a}" is not a supported CSS property for animations`);const l=n.collectedStyles[n.currentQuerySelector],u=l[a];let c=!0;u&&(s!=i&&s>=u.startTime&&i<=u.endTime&&(n.errors.push(`The CSS property "${a}" that exists between the times of "${u.startTime}ms" and "${u.endTime}ms" is also being animated in a parallel animation between the times of "${s}ms" and "${i}ms"`),c=!1),s=u.startTime),c&&(l[a]={startTime:s,endTime:i}),n.options&&function(e,t,n){const r=t.params||{},i=Nb(e);i.length&&i.forEach(s=>{r.hasOwnProperty(s)||n.push(`Unable to resolve the local animation param ${s} in the given list of values`)})}(o[a],n.options,n.errors)})})}visitKeyframes(t,n){const r={type:5,styles:[],options:null};if(!n.currentAnimateTimings)return n.errors.push("keyframes() must be placed inside of a call to animate()"),r;let s=0;const o=[];let a=!1,l=!1,u=0;const c=t.steps.map(R=>{const M=this._makeStyleAst(R,n);let U=null!=M.offset?M.offset:function(e){if("string"==typeof e)return null;let t=null;if(Array.isArray(e))e.forEach(n=>{if(Tc(n)&&n.hasOwnProperty("offset")){const r=n;t=parseFloat(r.offset),delete r.offset}});else if(Tc(e)&&e.hasOwnProperty("offset")){const n=e;t=parseFloat(n.offset),delete n.offset}return t}(M.styles),z=0;return null!=U&&(s++,z=M.offset=U),l=l||z<0||z>1,a=a||z0&&s{const U=f>0?M==g?1:f*M:o[M],z=U*E;n.currentTime=m+b.delay+z,b.duration=z,this._validateStyleAst(R,n),R.offset=U,r.styles.push(R)}),r}visitReference(t,n){return{type:8,animation:Kn(this,pl(t.animation),n),options:As(t.options)}}visitAnimateChild(t,n){return n.depCount++,{type:9,options:As(t.options)}}visitAnimateRef(t,n){return{type:10,animation:this.visitReference(t.animation,n),options:As(t.options)}}visitQuery(t,n){const r=n.currentQuerySelector,i=t.options||{};n.queryCount++,n.currentQuery=t;const[s,o]=function(e){const t=!!e.split(/\s*,\s*/).find(n=>":self"==n);return t&&(e=e.replace(t3,"")),[e=e.replace(/@\*/g,_c).replace(/@\w+/g,n=>_c+"-"+n.substr(1)).replace(/:animating/g,Ig),t]}(t.selector);n.currentQuerySelector=r.length?r+" "+s:s,zn(n.collectedStyles,n.currentQuerySelector,{});const a=Kn(this,pl(t.animation),n);return n.currentQuery=null,n.currentQuerySelector=r,{type:11,selector:s,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:a,originalSelector:t.selector,options:As(t.options)}}visitStagger(t,n){n.currentQuery||n.errors.push("stagger() can only be used inside of query()");const r="full"===t.timings?{duration:0,delay:0,easing:"full"}:vc(t.timings,n.errors,!0);return{type:12,animation:Kn(this,pl(t.animation),n),timings:r,options:null}}}class s3{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function Tc(e){return!Array.isArray(e)&&"object"==typeof e}function As(e){return e?(e=Ho(e)).params&&(e.params=function(e){return e?Ho(e):null}(e.params)):e={},e}function Ng(e,t,n){return{duration:e,delay:t,easing:n}}function Pg(e,t,n,r,i,s,o=null,a=!1){return{type:1,element:e,keyframes:t,preStyleProps:n,postStyleProps:r,duration:i,delay:s,totalTime:i+s,easing:o,subTimeline:a}}class Ac{constructor(){this._map=new Map}consume(t){let n=this._map.get(t);return n?this._map.delete(t):n=[],n}append(t,n){let r=this._map.get(t);r||this._map.set(t,r=[]),r.push(...n)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const c3=new RegExp(":enter","g"),f3=new RegExp(":leave","g");function Lg(e,t,n,r,i,s={},o={},a,l,u=[]){return(new h3).buildKeyframes(e,t,n,r,i,s,o,a,l,u)}class h3{buildKeyframes(t,n,r,i,s,o,a,l,u,c=[]){u=u||new Ac;const d=new Fg(t,n,u,i,s,c,[]);d.options=l,d.currentTimeline.setStyles([o],null,d.errors,l),Kn(this,r,d);const f=d.timelines.filter(g=>g.containsAnimation());if(f.length&&Object.keys(a).length){const g=f[f.length-1];g.allowOnlyTimelineStyles()||g.setStyles([a],null,d.errors,l)}return f.length?f.map(g=>g.buildKeyframes()):[Pg(n,[],[],[],0,0,"",!1)]}visitTrigger(t,n){}visitState(t,n){}visitTransition(t,n){}visitAnimateChild(t,n){const r=n.subInstructions.consume(n.element);if(r){const i=n.createSubContext(t.options),s=n.currentTimeline.currentTime,o=this._visitSubInstructions(r,i,i.options);s!=o&&n.transformIntoNewTimeline(o)}n.previousNode=t}visitAnimateRef(t,n){const r=n.createSubContext(t.options);r.transformIntoNewTimeline(),this.visitReference(t.animation,r),n.transformIntoNewTimeline(r.currentTimeline.currentTime),n.previousNode=t}_visitSubInstructions(t,n,r){let s=n.currentTimeline.currentTime;const o=null!=r.duration?ws(r.duration):null,a=null!=r.delay?ws(r.delay):null;return 0!==o&&t.forEach(l=>{const u=n.appendInstructionToTimeline(l,o,a);s=Math.max(s,u.duration+u.delay)}),s}visitReference(t,n){n.updateOptions(t.options,!0),Kn(this,t.animation,n),n.previousNode=t}visitSequence(t,n){const r=n.subContextCount;let i=n;const s=t.options;if(s&&(s.params||s.delay)&&(i=n.createSubContext(s),i.transformIntoNewTimeline(),null!=s.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Ic);const o=ws(s.delay);i.delayNextStep(o)}t.steps.length&&(t.steps.forEach(o=>Kn(this,o,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),n.previousNode=t}visitGroup(t,n){const r=[];let i=n.currentTimeline.currentTime;const s=t.options&&t.options.delay?ws(t.options.delay):0;t.steps.forEach(o=>{const a=n.createSubContext(t.options);s&&a.delayNextStep(s),Kn(this,o,a),i=Math.max(i,a.currentTimeline.currentTime),r.push(a.currentTimeline)}),r.forEach(o=>n.currentTimeline.mergeTimelineCollectedStyles(o)),n.transformIntoNewTimeline(i),n.previousNode=t}_visitTiming(t,n){if(t.dynamic){const r=t.strValue;return vc(n.params?Ec(r,n.params,n.errors):r,n.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,n){const r=n.currentAnimateTimings=this._visitTiming(t.timings,n),i=n.currentTimeline;r.delay&&(n.incrementTime(r.delay),i.snapshotCurrentStyles());const s=t.style;5==s.type?this.visitKeyframes(s,n):(n.incrementTime(r.duration),this.visitStyle(s,n),i.applyStylesToKeyframe()),n.currentAnimateTimings=null,n.previousNode=t}visitStyle(t,n){const r=n.currentTimeline,i=n.currentAnimateTimings;!i&&r.getCurrentStyleProperties().length&&r.forwardFrame();const s=i&&i.easing||t.easing;t.isEmptyStep?r.applyEmptyStep(s):r.setStyles(t.styles,s,n.errors,n.options),n.previousNode=t}visitKeyframes(t,n){const r=n.currentAnimateTimings,i=n.currentTimeline.duration,s=r.duration,a=n.createSubContext().currentTimeline;a.easing=r.easing,t.styles.forEach(l=>{a.forwardTime((l.offset||0)*s),a.setStyles(l.styles,l.easing,n.errors,n.options),a.applyStylesToKeyframe()}),n.currentTimeline.mergeTimelineCollectedStyles(a),n.transformIntoNewTimeline(i+s),n.previousNode=t}visitQuery(t,n){const r=n.currentTimeline.currentTime,i=t.options||{},s=i.delay?ws(i.delay):0;s&&(6===n.previousNode.type||0==r&&n.currentTimeline.getCurrentStyleProperties().length)&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=Ic);let o=r;const a=n.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,n.errors);n.currentQueryTotal=a.length;let l=null;a.forEach((u,c)=>{n.currentQueryIndex=c;const d=n.createSubContext(t.options,u);s&&d.delayNextStep(s),u===n.element&&(l=d.currentTimeline),Kn(this,t.animation,d),d.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,d.currentTimeline.currentTime)}),n.currentQueryIndex=0,n.currentQueryTotal=0,n.transformIntoNewTimeline(o),l&&(n.currentTimeline.mergeTimelineCollectedStyles(l),n.currentTimeline.snapshotCurrentStyles()),n.previousNode=t}visitStagger(t,n){const r=n.parentContext,i=n.currentTimeline,s=t.timings,o=Math.abs(s.duration),a=o*(n.currentQueryTotal-1);let l=o*n.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":l=a-l;break;case"full":l=r.currentStaggerTime}const c=n.currentTimeline;l&&c.delayNextStep(l);const d=c.currentTime;Kn(this,t.animation,n),n.previousNode=t,r.currentStaggerTime=i.currentTime-d+(i.startTime-r.currentTimeline.startTime)}}const Ic={};class Fg{constructor(t,n,r,i,s,o,a,l){this._driver=t,this.element=n,this.subInstructions=r,this._enterClassName=i,this._leaveClassName=s,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Ic,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Sc(this._driver,n,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,n){if(!t)return;const r=t;let i=this.options;null!=r.duration&&(i.duration=ws(r.duration)),null!=r.delay&&(i.delay=ws(r.delay));const s=r.params;if(s){let o=i.params;o||(o=this.options.params={}),Object.keys(s).forEach(a=>{(!n||!o.hasOwnProperty(a))&&(o[a]=Ec(s[a],o,this.errors))})}}_copyOptions(){const t={};if(this.options){const n=this.options.params;if(n){const r=t.params={};Object.keys(n).forEach(i=>{r[i]=n[i]})}}return t}createSubContext(t=null,n,r){const i=n||this.element,s=new Fg(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(t),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(t){return this.previousNode=Ic,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,n,r){const i={duration:null!=n?n:t.duration,delay:this.currentTimeline.currentTime+(null!=r?r:0)+t.delay,easing:""},s=new g3(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(s),i}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,n,r,i,s,o){let a=[];if(i&&a.push(this.element),t.length>0){t=(t=t.replace(c3,"."+this._enterClassName)).replace(f3,"."+this._leaveClassName);let u=this._driver.query(this.element,t,1!=r);0!==r&&(u=r<0?u.slice(u.length+r,u.length):u.slice(0,r)),a.push(...u)}return!s&&0==a.length&&o.push(`\`query("${n}")\` returned zero elements. (Use \`query("${n}", { optional: true })\` if you wish to allow this.)`),a}}class Sc{constructor(t,n,r,i){this._driver=t,this.element=n,this.startTime=r,this._elementTimelineStylesLookup=i,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const n=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||n?(this.forwardTime(this.currentTime+t),n&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,n){return this.applyStylesToKeyframe(),new Sc(this._driver,t,n||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,n){this._localTimelineStyles[t]=n,this._globalTimelineStyles[t]=n,this._styleSummary[t]={time:this.currentTime,value:n}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(n=>{this._backFill[n]=this._globalTimelineStyles[n]||mi,this._currentKeyframe[n]=mi}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,n,r,i){n&&(this._previousKeyframe.easing=n);const s=i&&i.params||{},o=function(e,t){const n={};let r;return e.forEach(i=>{"*"===i?(r=r||Object.keys(t),r.forEach(s=>{n[s]=mi})):$i(i,!1,n)}),n}(t,this._globalTimelineStyles);Object.keys(o).forEach(a=>{const l=Ec(o[a],s,r);this._pendingStyles[a]=l,this._localTimelineStyles.hasOwnProperty(a)||(this._backFill[a]=this._globalTimelineStyles.hasOwnProperty(a)?this._globalTimelineStyles[a]:mi),this._updateStyle(a,l)})}applyStylesToKeyframe(){const t=this._pendingStyles,n=Object.keys(t);0!=n.length&&(this._pendingStyles={},n.forEach(r=>{this._currentKeyframe[r]=t[r]}),Object.keys(this._localTimelineStyles).forEach(r=>{this._currentKeyframe.hasOwnProperty(r)||(this._currentKeyframe[r]=this._localTimelineStyles[r])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const n=this._localTimelineStyles[t];this._pendingStyles[t]=n,this._updateStyle(t,n)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let n in this._currentKeyframe)t.push(n);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(n=>{const r=this._styleSummary[n],i=t._styleSummary[n];(!r||i.time>r.time)&&this._updateStyle(n,i.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,n=new Set,r=1===this._keyframes.size&&0===this.duration;let i=[];this._keyframes.forEach((a,l)=>{const u=$i(a,!0);Object.keys(u).forEach(c=>{const d=u[c];"!"==d?t.add(c):d==mi&&n.add(c)}),r||(u.offset=l/this.duration),i.push(u)});const s=t.size?bc(t.values()):[],o=n.size?bc(n.values()):[];if(r){const a=i[0],l=Ho(a);a.offset=0,l.offset=1,i=[a,l]}return Pg(this.element,i,s,o,this.duration,this.startTime,this.easing,!1)}}class g3 extends Sc{constructor(t,n,r,i,s,o,a=!1){super(t,n,o.delay),this.keyframes=r,this.preStyleProps=i,this.postStyleProps=s,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:n,duration:r,easing:i}=this.timings;if(this._stretchStartingKeyframe&&n){const s=[],o=r+n,a=n/o,l=$i(t[0],!1);l.offset=0,s.push(l);const u=$i(t[0],!1);u.offset=Bb(a),s.push(u);const c=t.length-1;for(let d=1;d<=c;d++){let f=$i(t[d],!1);f.offset=Bb((n+f.offset*r)/o),s.push(f)}r=o,n=0,i="",t=s}return Pg(this.element,t,this.preStyleProps,this.postStyleProps,r,n,i,!0)}}function Bb(e,t=3){const n=Math.pow(10,t-1);return Math.round(e*n)/n}class kg{}class m3 extends kg{normalizePropertyName(t,n){return xg(t)}normalizeStyleValue(t,n,r,i){let s="";const o=r.toString().trim();if(y3[n]&&0!==r&&"0"!==r)if("number"==typeof r)s="px";else{const a=r.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&i.push(`Please provide a CSS unit value for ${t}:${r}`)}return o+s}}const y3=(()=>function(e){const t={};return e.forEach(n=>t[n]=!0),t}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function Ub(e,t,n,r,i,s,o,a,l,u,c,d,f){return{type:0,element:e,triggerName:t,isRemovalTransition:i,fromState:n,fromStyles:s,toState:r,toStyles:o,timelines:a,queriedElements:l,preStyleProps:u,postStyleProps:c,totalTime:d,errors:f}}const Vg={};class jb{constructor(t,n,r){this._triggerName=t,this.ast=n,this._stateStyles=r}match(t,n,r,i){return function(e,t,n,r,i){return e.some(s=>s(t,n,r,i))}(this.ast.matchers,t,n,r,i)}buildStyles(t,n,r){const i=this._stateStyles["*"],s=this._stateStyles[t],o=i?i.buildStyles(n,r):{};return s?s.buildStyles(n,r):o}build(t,n,r,i,s,o,a,l,u,c){const d=[],f=this.ast.options&&this.ast.options.params||Vg,m=this.buildStyles(r,a&&a.params||Vg,d),b=l&&l.params||Vg,E=this.buildStyles(i,b,d),R=new Set,M=new Map,U=new Map,z="void"===i,ce={params:Object.assign(Object.assign({},f),b)},Qe=c?[]:Lg(t,n,this.ast.animation,s,o,m,E,ce,u,d);let Xe=0;if(Qe.forEach(hn=>{Xe=Math.max(hn.duration+hn.delay,Xe)}),d.length)return Ub(n,this._triggerName,r,i,z,m,E,[],[],M,U,Xe,d);Qe.forEach(hn=>{const gn=hn.element,_i=zn(M,gn,{});hn.preStyleProps.forEach(Lr=>_i[Lr]=!0);const vi=zn(U,gn,{});hn.postStyleProps.forEach(Lr=>vi[Lr]=!0),gn!==n&&R.add(gn)});const wn=bc(R.values());return Ub(n,this._triggerName,r,i,z,m,E,Qe,wn,M,U,Xe)}}class E3{constructor(t,n,r){this.styles=t,this.defaultParams=n,this.normalizer=r}buildStyles(t,n){const r={},i=Ho(this.defaultParams);return Object.keys(t).forEach(s=>{const o=t[s];null!=o&&(i[s]=o)}),this.styles.styles.forEach(s=>{if("string"!=typeof s){const o=s;Object.keys(o).forEach(a=>{let l=o[a];l.length>1&&(l=Ec(l,i,n));const u=this.normalizer.normalizePropertyName(a,n);l=this.normalizer.normalizeStyleValue(a,u,l,n),r[u]=l})}}),r}}class D3{constructor(t,n,r){this.name=t,this.ast=n,this._normalizer=r,this.transitionFactories=[],this.states={},n.states.forEach(i=>{this.states[i.name]=new E3(i.style,i.options&&i.options.params||{},r)}),$b(this.states,"true","1"),$b(this.states,"false","0"),n.transitions.forEach(i=>{this.transitionFactories.push(new jb(t,i,this.states))}),this.fallbackTransition=function(e,t,n){return new jb(e,{type:1,animation:{type:2,steps:[],options:null},matchers:[(o,a)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,n,r,i){return this.transitionFactories.find(o=>o.match(t,n,r,i))||null}matchStyles(t,n,r){return this.fallbackTransition.buildStyles(t,n,r)}}function $b(e,t,n){e.hasOwnProperty(t)?e.hasOwnProperty(n)||(e[n]=e[t]):e.hasOwnProperty(n)&&(e[t]=e[n])}const w3=new Ac;class T3{constructor(t,n,r){this.bodyNode=t,this._driver=n,this._normalizer=r,this._animations={},this._playersById={},this.players=[]}register(t,n){const r=[],i=Rg(this._driver,n,r);if(r.length)throw new Error(`Unable to build the animation due to the following errors: ${r.join("\n")}`);this._animations[t]=i}_buildPlayer(t,n,r){const i=t.element,s=bb(0,this._normalizer,0,t.keyframes,n,r);return this._driver.animate(i,s,t.duration,t.delay,t.easing,[],!0)}create(t,n,r={}){const i=[],s=this._animations[t];let o;const a=new Map;if(s?(o=Lg(this._driver,n,s,Ag,mc,{},{},r,w3,i),o.forEach(c=>{const d=zn(a,c.element,{});c.postStyleProps.forEach(f=>d[f]=null)})):(i.push("The requested animation doesn't exist or has already been destroyed"),o=[]),i.length)throw new Error(`Unable to create the animation due to the following errors: ${i.join("\n")}`);a.forEach((c,d)=>{Object.keys(c).forEach(f=>{c[f]=this._driver.computeStyle(d,f,mi)})});const u=ji(o.map(c=>{const d=a.get(c.element);return this._buildPlayer(c,{},d)}));return this._playersById[t]=u,u.onDestroy(()=>this.destroy(t)),this.players.push(u),u}destroy(t){const n=this._getPlayer(t);n.destroy(),delete this._playersById[t];const r=this.players.indexOf(n);r>=0&&this.players.splice(r,1)}_getPlayer(t){const n=this._playersById[t];if(!n)throw new Error(`Unable to find the timeline player referenced by ${t}`);return n}listen(t,n,r,i){const s=vg(n,"","","");return yg(this._getPlayer(t),r,s,i),()=>{}}command(t,n,r,i){if("register"==r)return void this.register(t,i[0]);if("create"==r)return void this.create(t,n,i[0]||{});const s=this._getPlayer(t);switch(r){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}}const Hb="ng-animate-queued",zb="ng-animate-disabled",Kb=".ng-animate-disabled",O3=[],Yb={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},x3={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},ar="__ng_removed";class Bg{constructor(t,n=""){this.namespaceId=n;const r=t&&t.hasOwnProperty("value");if(this.value=function(e){return null!=e?e:null}(r?t.value:t),r){const s=Ho(t);delete s.value,this.options=s}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const n=t.params;if(n){const r=this.options.params;Object.keys(n).forEach(i=>{null==r[i]&&(r[i]=n[i])})}}}const ml="void",Ug=new Bg(ml);class M3{constructor(t,n,r){this.id=t,this.hostElement=n,this._engine=r,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,lr(n,this._hostClassName)}listen(t,n,r,i){if(!this._triggers.hasOwnProperty(n))throw new Error(`Unable to listen on the animation trigger event "${r}" because the animation trigger "${n}" doesn't exist!`);if(null==r||0==r.length)throw new Error(`Unable to listen on the animation trigger "${n}" because the provided event is undefined!`);if(!function(e){return"start"==e||"done"==e}(r))throw new Error(`The provided animation trigger event "${r}" for the animation trigger "${n}" is not supported!`);const s=zn(this._elementListeners,t,[]),o={name:n,phase:r,callback:i};s.push(o);const a=zn(this._engine.statesByElement,t,{});return a.hasOwnProperty(n)||(lr(t,yc),lr(t,yc+"-"+n),a[n]=Ug),()=>{this._engine.afterFlush(()=>{const l=s.indexOf(o);l>=0&&s.splice(l,1),this._triggers[n]||delete a[n]})}}register(t,n){return!this._triggers[t]&&(this._triggers[t]=n,!0)}_getTrigger(t){const n=this._triggers[t];if(!n)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return n}trigger(t,n,r,i=!0){const s=this._getTrigger(n),o=new jg(this.id,n,t);let a=this._engine.statesByElement.get(t);a||(lr(t,yc),lr(t,yc+"-"+n),this._engine.statesByElement.set(t,a={}));let l=a[n];const u=new Bg(r,this.id);if(!(r&&r.hasOwnProperty("value"))&&l&&u.absorbOptions(l.options),a[n]=u,l||(l=Ug),u.value!==ml&&l.value===u.value){if(!function(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!=r.length)return!1;for(let i=0;i{Ts(t,E),Qr(t,R)})}return}const f=zn(this._engine.playersByElement,t,[]);f.forEach(b=>{b.namespaceId==this.id&&b.triggerName==n&&b.queued&&b.destroy()});let g=s.matchTransition(l.value,u.value,t,u.params),m=!1;if(!g){if(!i)return;g=s.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:n,transition:g,fromState:l,toState:u,player:o,isFallbackTransition:m}),m||(lr(t,Hb),o.onStart(()=>{zo(t,Hb)})),o.onDone(()=>{let b=this.players.indexOf(o);b>=0&&this.players.splice(b,1);const E=this._engine.playersByElement.get(t);if(E){let R=E.indexOf(o);R>=0&&E.splice(R,1)}}),this.players.push(o),f.push(o),o}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((n,r)=>{delete n[t]}),this._elementListeners.forEach((n,r)=>{this._elementListeners.set(r,n.filter(i=>i.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const n=this._engine.playersByElement.get(t);n&&(n.forEach(r=>r.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,n){const r=this._engine.driver.query(t,_c,!0);r.forEach(i=>{if(i[ar])return;const s=this._engine.fetchNamespacesByElement(i);s.size?s.forEach(o=>o.triggerLeaveAnimation(i,n,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>r.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(t,n,r,i){const s=this._engine.statesByElement.get(t);if(s){const o=[];if(Object.keys(s).forEach(a=>{if(this._triggers[a]){const l=this.trigger(t,a,ml,i);l&&o.push(l)}}),o.length)return this._engine.markElementAsRemoved(this.id,t,!0,n),r&&ji(o).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const n=this._elementListeners.get(t),r=this._engine.statesByElement.get(t);if(n&&r){const i=new Set;n.forEach(s=>{const o=s.name;if(i.has(o))return;i.add(o);const l=this._triggers[o].fallbackTransition,u=r[o]||Ug,c=new Bg(ml),d=new jg(this.id,o,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:o,transition:l,fromState:u,toState:c,player:d,isFallbackTransition:!0})})}}removeNode(t,n){const r=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,n),this.triggerLeaveAnimation(t,n,!0))return;let i=!1;if(r.totalAnimations){const s=r.players.length?r.playersByQueriedElement.get(t):[];if(s&&s.length)i=!0;else{let o=t;for(;o=o.parentNode;)if(r.statesByElement.get(o)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(t),i)r.markElementAsRemoved(this.id,t,!1,n);else{const s=t[ar];(!s||s===Yb)&&(r.afterFlush(()=>this.clearElementCache(t)),r.destroyInnerAnimations(t),r._onRemovalComplete(t,n))}}insertNode(t,n){lr(t,this._hostClassName)}drainQueuedTransitions(t){const n=[];return this._queue.forEach(r=>{const i=r.player;if(i.destroyed)return;const s=r.element,o=this._elementListeners.get(s);o&&o.forEach(a=>{if(a.name==r.triggerName){const l=vg(s,r.triggerName,r.fromState.value,r.toState.value);l._data=t,yg(r.player,a.phase,l,a.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):n.push(r)}),this._queue=[],n.sort((r,i)=>{const s=r.transition.ast.depCount,o=i.transition.ast.depCount;return 0==s||0==o?s-o:this._engine.driver.containsElement(r.element,i.element)?1:-1})}destroy(t){this.players.forEach(n=>n.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let n=!1;return this._elementListeners.has(t)&&(n=!0),n=!!this._queue.find(r=>r.element===t)||n,n}}class R3{constructor(t,n,r){this.bodyNode=t,this.driver=n,this._normalizer=r,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(i,s)=>{}}_onRemovalComplete(t,n){this.onRemovalComplete(t,n)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(n=>{n.players.forEach(r=>{r.queued&&t.push(r)})}),t}createNamespace(t,n){const r=new M3(t,n,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,n)?this._balanceNamespaceList(r,n):(this.newHostElements.set(n,r),this.collectEnterElement(n)),this._namespaceLookup[t]=r}_balanceNamespaceList(t,n){const r=this._namespaceList.length-1;if(r>=0){let i=!1;for(let s=r;s>=0;s--)if(this.driver.containsElement(this._namespaceList[s].hostElement,n)){this._namespaceList.splice(s+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(n,t),t}register(t,n){let r=this._namespaceLookup[t];return r||(r=this.createNamespace(t,n)),r}registerTrigger(t,n,r){let i=this._namespaceLookup[t];i&&i.register(n,r)&&this.totalAnimations++}destroy(t,n){if(!t)return;const r=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(r.hostElement),delete this._namespaceLookup[t];const i=this._namespaceList.indexOf(r);i>=0&&this._namespaceList.splice(i,1)}),this.afterFlushAnimationsDone(()=>r.destroy(n))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const n=new Set,r=this.statesByElement.get(t);if(r){const i=Object.keys(r);for(let s=0;s=0&&this.collectedLeaveElements.splice(o,1)}if(t){const o=this._fetchNamespace(t);o&&o.insertNode(n,r)}i&&this.collectEnterElement(n)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,n){n?this.disabledNodes.has(t)||(this.disabledNodes.add(t),lr(t,zb)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),zo(t,zb))}removeNode(t,n,r,i){if(Oc(n)){const s=t?this._fetchNamespace(t):null;if(s?s.removeNode(n,i):this.markElementAsRemoved(t,n,!1,i),r){const o=this.namespacesByHostElement.get(n);o&&o.id!==t&&o.removeNode(n,i)}}else this._onRemovalComplete(n,i)}markElementAsRemoved(t,n,r,i){this.collectedLeaveElements.push(n),n[ar]={namespaceId:t,setForRemoval:i,hasAnimation:r,removedBeforeQueried:!1}}listen(t,n,r,i,s){return Oc(n)?this._fetchNamespace(t).listen(n,r,i,s):()=>{}}_buildInstruction(t,n,r,i,s){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,r,i,t.fromState.options,t.toState.options,n,s)}destroyInnerAnimations(t){let n=this.driver.query(t,_c,!0);n.forEach(r=>this.destroyActiveAnimationsForElement(r)),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,Ig,!0),n.forEach(r=>this.finishActiveQueriedAnimationOnElement(r)))}destroyActiveAnimationsForElement(t){const n=this.playersByElement.get(t);n&&n.forEach(r=>{r.queued?r.markedForDestroy=!0:r.destroy()})}finishActiveQueriedAnimationOnElement(t){const n=this.playersByQueriedElement.get(t);n&&n.forEach(r=>r.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return ji(this.players).onDone(()=>t());t()})}processLeaveNode(t){const n=t[ar];if(n&&n.setForRemoval){if(t[ar]=Yb,n.namespaceId){this.destroyInnerAnimations(t);const r=this._fetchNamespace(n.namespaceId);r&&r.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}this.driver.matchesElement(t,Kb)&&this.markElementAsDisabled(t,!1),this.driver.query(t,Kb,!0).forEach(r=>{this.markElementAsDisabled(r,!1)})}flush(t=-1){let n=[];if(this.newHostElements.size&&(this.newHostElements.forEach((r,i)=>this._balanceNamespaceList(r,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let r=0;rr()),this._flushFns=[],this._whenQuietFns.length){const r=this._whenQuietFns;this._whenQuietFns=[],n.length?ji(n).onDone(()=>{r.forEach(i=>i())}):r.forEach(i=>i())}}reportError(t){throw new Error(`Unable to process animations due to the following failed trigger transitions\n ${t.join("\n")}`)}_flushAnimations(t,n){const r=new Ac,i=[],s=new Map,o=[],a=new Map,l=new Map,u=new Map,c=new Set;this.disabledNodes.forEach(W=>{c.add(W);const re=this.driver.query(W,".ng-animate-queued",!0);for(let _e=0;_e{const _e=Ag+b++;m.set(re,_e),W.forEach(Ve=>lr(Ve,_e))});const E=[],R=new Set,M=new Set;for(let W=0;WR.add(Ve)):M.add(re))}const U=new Map,z=qb(f,Array.from(R));z.forEach((W,re)=>{const _e=mc+b++;U.set(re,_e),W.forEach(Ve=>lr(Ve,_e))}),t.push(()=>{g.forEach((W,re)=>{const _e=m.get(re);W.forEach(Ve=>zo(Ve,_e))}),z.forEach((W,re)=>{const _e=U.get(re);W.forEach(Ve=>zo(Ve,_e))}),E.forEach(W=>{this.processLeaveNode(W)})});const ce=[],Qe=[];for(let W=this._namespaceList.length-1;W>=0;W--)this._namespaceList[W].drainQueuedTransitions(n).forEach(_e=>{const Ve=_e.player,Gt=_e.element;if(ce.push(Ve),this.collectedEnterElements.length){const Xr=Gt[ar];if(Xr&&Xr.setForMove)return void Ve.destroy()}const Zr=!d||!this.driver.containsElement(d,Gt),Yn=U.get(Gt),Hi=m.get(Gt),Et=this._buildInstruction(_e,r,Hi,Yn,Zr);if(Et.errors&&Et.errors.length)Qe.push(Et);else{if(Zr)return Ve.onStart(()=>Ts(Gt,Et.fromStyles)),Ve.onDestroy(()=>Qr(Gt,Et.toStyles)),void i.push(Ve);if(_e.isFallbackTransition)return Ve.onStart(()=>Ts(Gt,Et.fromStyles)),Ve.onDestroy(()=>Qr(Gt,Et.toStyles)),void i.push(Ve);Et.timelines.forEach(Xr=>Xr.stretchStartingKeyframe=!0),r.append(Gt,Et.timelines),o.push({instruction:Et,player:Ve,element:Gt}),Et.queriedElements.forEach(Xr=>zn(a,Xr,[]).push(Ve)),Et.preStyleProps.forEach((Xr,_l)=>{const Fc=Object.keys(Xr);if(Fc.length){let Is=l.get(_l);Is||l.set(_l,Is=new Set),Fc.forEach(Yg=>Is.add(Yg))}}),Et.postStyleProps.forEach((Xr,_l)=>{const Fc=Object.keys(Xr);let Is=u.get(_l);Is||u.set(_l,Is=new Set),Fc.forEach(Yg=>Is.add(Yg))})}});if(Qe.length){const W=[];Qe.forEach(re=>{W.push(`@${re.triggerName} has failed due to:\n`),re.errors.forEach(_e=>W.push(`- ${_e}\n`))}),ce.forEach(re=>re.destroy()),this.reportError(W)}const Xe=new Map,wn=new Map;o.forEach(W=>{const re=W.element;r.has(re)&&(wn.set(re,re),this._beforeAnimationBuild(W.player.namespaceId,W.instruction,Xe))}),i.forEach(W=>{const re=W.element;this._getPreviousPlayers(re,!1,W.namespaceId,W.triggerName,null).forEach(Ve=>{zn(Xe,re,[]).push(Ve),Ve.destroy()})});const hn=E.filter(W=>Zb(W,l,u)),gn=new Map;Gb(gn,this.driver,M,u,mi).forEach(W=>{Zb(W,l,u)&&hn.push(W)});const vi=new Map;g.forEach((W,re)=>{Gb(vi,this.driver,new Set(W),l,"!")}),hn.forEach(W=>{const re=gn.get(W),_e=vi.get(W);gn.set(W,Object.assign(Object.assign({},re),_e))});const Lr=[],Yo=[],Wo={};o.forEach(W=>{const{element:re,player:_e,instruction:Ve}=W;if(r.has(re)){if(c.has(re))return _e.onDestroy(()=>Qr(re,Ve.toStyles)),_e.disabled=!0,_e.overrideTotalTime(Ve.totalTime),void i.push(_e);let Gt=Wo;if(wn.size>1){let Yn=re;const Hi=[];for(;Yn=Yn.parentNode;){const Et=wn.get(Yn);if(Et){Gt=Et;break}Hi.push(Yn)}Hi.forEach(Et=>wn.set(Et,Gt))}const Zr=this._buildAnimation(_e.namespaceId,Ve,Xe,s,vi,gn);if(_e.setRealPlayer(Zr),Gt===Wo)Lr.push(_e);else{const Yn=this.playersByElement.get(Gt);Yn&&Yn.length&&(_e.parentPlayer=ji(Yn)),i.push(_e)}}else Ts(re,Ve.fromStyles),_e.onDestroy(()=>Qr(re,Ve.toStyles)),Yo.push(_e),c.has(re)&&i.push(_e)}),Yo.forEach(W=>{const re=s.get(W.element);if(re&&re.length){const _e=ji(re);W.setRealPlayer(_e)}}),i.forEach(W=>{W.parentPlayer?W.syncPlayerEvents(W.parentPlayer):W.destroy()});for(let W=0;W!Zr.destroyed);Gt.length?F3(this,re,Gt):this.processLeaveNode(re)}return E.length=0,Lr.forEach(W=>{this.players.push(W),W.onDone(()=>{W.destroy();const re=this.players.indexOf(W);this.players.splice(re,1)}),W.play()}),Lr}elementContainsData(t,n){let r=!1;const i=n[ar];return i&&i.setForRemoval&&(r=!0),this.playersByElement.has(n)&&(r=!0),this.playersByQueriedElement.has(n)&&(r=!0),this.statesByElement.has(n)&&(r=!0),this._fetchNamespace(t).elementContainsData(n)||r}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,n,r,i,s){let o=[];if(n){const a=this.playersByQueriedElement.get(t);a&&(o=a)}else{const a=this.playersByElement.get(t);if(a){const l=!s||s==ml;a.forEach(u=>{u.queued||!l&&u.triggerName!=i||o.push(u)})}}return(r||i)&&(o=o.filter(a=>!(r&&r!=a.namespaceId||i&&i!=a.triggerName))),o}_beforeAnimationBuild(t,n,r){const s=n.element,o=n.isRemovalTransition?void 0:t,a=n.isRemovalTransition?void 0:n.triggerName;for(const l of n.timelines){const u=l.element,c=u!==s,d=zn(r,u,[]);this._getPreviousPlayers(u,c,o,a,n.toState).forEach(g=>{const m=g.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),g.destroy(),d.push(g)})}Ts(s,n.fromStyles)}_buildAnimation(t,n,r,i,s,o){const a=n.triggerName,l=n.element,u=[],c=new Set,d=new Set,f=n.timelines.map(m=>{const b=m.element;c.add(b);const E=b[ar];if(E&&E.removedBeforeQueried)return new $o(m.duration,m.delay);const R=b!==l,M=function(e){const t=[];return Qb(e,t),t}((r.get(b)||O3).map(Xe=>Xe.getRealPlayer())).filter(Xe=>!!Xe.element&&Xe.element===b),U=s.get(b),z=o.get(b),ce=bb(0,this._normalizer,0,m.keyframes,U,z),Qe=this._buildPlayer(m,ce,M);if(m.subTimeline&&i&&d.add(b),R){const Xe=new jg(t,a,b);Xe.setRealPlayer(Qe),u.push(Xe)}return Qe});u.forEach(m=>{zn(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>function(e,t,n){let r;if(e instanceof Map){if(r=e.get(t),r){if(r.length){const i=r.indexOf(n);r.splice(i,1)}0==r.length&&e.delete(t)}}else if(r=e[t],r){if(r.length){const i=r.indexOf(n);r.splice(i,1)}0==r.length&&delete e[t]}return r}(this.playersByQueriedElement,m.element,m))}),c.forEach(m=>lr(m,Ob));const g=ji(f);return g.onDestroy(()=>{c.forEach(m=>zo(m,Ob)),Qr(l,n.toStyles)}),d.forEach(m=>{zn(i,m,[]).push(g)}),g}_buildPlayer(t,n,r){return n.length>0?this.driver.animate(t.element,n,t.duration,t.delay,t.easing,r):new $o(t.duration,t.delay)}}class jg{constructor(t,n,r){this.namespaceId=t,this.triggerName=n,this.element=r,this._player=new $o,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(n=>{this._queuedCallbacks[n].forEach(r=>yg(t,n,void 0,r))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const n=this._player;n.triggerCallback&&t.onStart(()=>n.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,n){zn(this._queuedCallbacks,t,[]).push(n)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const n=this._player;n.triggerCallback&&n.triggerCallback(t)}}function Oc(e){return e&&1===e.nodeType}function Wb(e,t){const n=e.style.display;return e.style.display=null!=t?t:"none",n}function Gb(e,t,n,r,i){const s=[];n.forEach(l=>s.push(Wb(l)));const o=[];r.forEach((l,u)=>{const c={};l.forEach(d=>{const f=c[d]=t.computeStyle(u,d,i);(!f||0==f.length)&&(u[ar]=x3,o.push(u))}),e.set(u,c)});let a=0;return n.forEach(l=>Wb(l,s[a++])),o}function qb(e,t){const n=new Map;if(e.forEach(a=>n.set(a,[])),0==t.length)return n;const i=new Set(t),s=new Map;function o(a){if(!a)return 1;let l=s.get(a);if(l)return l;const u=a.parentNode;return l=n.has(u)?u:i.has(u)?1:o(u),s.set(a,l),l}return t.forEach(a=>{const l=o(a);1!==l&&n.get(l).push(a)}),n}const xc="$$classes";function lr(e,t){if(e.classList)e.classList.add(t);else{let n=e[xc];n||(n=e[xc]={}),n[t]=!0}}function zo(e,t){if(e.classList)e.classList.remove(t);else{let n=e[xc];n&&delete n[t]}}function F3(e,t,n){ji(n).onDone(()=>e.processLeaveNode(t))}function Qb(e,t){for(let n=0;ni.add(s)):t.set(e,r),n.delete(e),!0}class Mc{constructor(t,n,r){this.bodyNode=t,this._driver=n,this._normalizer=r,this._triggerCache={},this.onRemovalComplete=(i,s)=>{},this._transitionEngine=new R3(t,n,r),this._timelineEngine=new T3(t,n,r),this._transitionEngine.onRemovalComplete=(i,s)=>this.onRemovalComplete(i,s)}registerTrigger(t,n,r,i,s){const o=t+"-"+i;let a=this._triggerCache[o];if(!a){const l=[],u=Rg(this._driver,s,l);if(l.length)throw new Error(`The animation trigger "${i}" has failed to build due to the following errors:\n - ${l.join("\n - ")}`);a=function(e,t,n){return new D3(e,t,n)}(i,u,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(n,i,a)}register(t,n){this._transitionEngine.register(t,n)}destroy(t,n){this._transitionEngine.destroy(t,n)}onInsert(t,n,r,i){this._transitionEngine.insertNode(t,n,r,i)}onRemove(t,n,r,i){this._transitionEngine.removeNode(t,n,i||!1,r)}disableAnimations(t,n){this._transitionEngine.markElementAsDisabled(t,n)}process(t,n,r,i){if("@"==r.charAt(0)){const[s,o]=Db(r);this._timelineEngine.command(s,n,o,i)}else this._transitionEngine.trigger(t,n,r,i)}listen(t,n,r,i,s){if("@"==r.charAt(0)){const[o,a]=Db(r);return this._timelineEngine.listen(o,n,a,s)}return this._transitionEngine.listen(t,n,r,i,s)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function Xb(e,t){let n=null,r=null;return Array.isArray(t)&&t.length?(n=$g(t[0]),t.length>1&&(r=$g(t[t.length-1]))):t&&(n=$g(t)),n||r?new Ko(e,n,r):null}class Ko{constructor(t,n,r){this._element=t,this._startStyles=n,this._endStyles=r,this._state=0;let i=Ko.initialStylesByElement.get(t);i||Ko.initialStylesByElement.set(t,i={}),this._initialStyles=i}start(){this._state<1&&(this._startStyles&&Qr(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Qr(this._element,this._initialStyles),this._endStyles&&(Qr(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(Ko.initialStylesByElement.delete(this._element),this._startStyles&&(Ts(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Ts(this._element,this._endStyles),this._endStyles=null),Qr(this._element,this._initialStyles),this._state=3)}}function $g(e){let t=null;const n=Object.keys(e);for(let r=0;rthis._handleCallback(l)}apply(){(function(e,t){const n=zg(e,"").trim();let r=0;n.length&&(function(e,t){let n=0;for(let r=0;r=this._delay&&r>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),r1(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(e,t){const r=zg(e,"").split(","),i=Hg(r,t);i>=0&&(r.splice(i,1),Rc(e,"",r.join(",")))}(this._element,this._name))}}function t1(e,t,n){Rc(e,"PlayState",n,n1(e,t))}function n1(e,t){const n=zg(e,"");return n.indexOf(",")>0?Hg(n.split(","),t):Hg([n],t)}function Hg(e,t){for(let n=0;n=0)return n;return-1}function r1(e,t,n){n?e.removeEventListener(e1,t):e.addEventListener(e1,t)}function Rc(e,t,n,r){const i=Jb+t;if(null!=r){const s=e.style[i];if(s.length){const o=s.split(",");o[r]=n,n=o.join(",")}}e.style[i]=n}function zg(e,t){return e.style[Jb+t]||""}class i1{constructor(t,n,r,i,s,o,a,l){this.element=t,this.keyframes=n,this.animationName=r,this._duration=i,this._delay=s,this._finalStyles=a,this._specialStyles=l,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this.currentSnapshot={},this._state=0,this.easing=o||"linear",this.totalTime=i+s,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),!(this._state>=4)&&(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),!(this._state>=3)&&(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._state=0,this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new $3(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const n="start"==t?this._onStartFns:this._onDoneFns;n.forEach(r=>r()),n.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const n=this._state>=3;Object.keys(this._finalStyles).forEach(r=>{"offset"!=r&&(t[r]=n?this._finalStyles[r]:Mg(this.element,r))})}this.currentSnapshot=t}}class G3 extends $o{constructor(t,n){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=Ab(n)}init(){this.__initialized||!this._startingStyles||(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){!this._startingStyles||(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){!this._startingStyles||(Object.keys(this._startingStyles).forEach(t=>{const n=this._startingStyles[t];n?this.element.style.setProperty(t,n):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class o1{constructor(){this._count=0}validateStyleProperty(t){return Dg(t)}matchesElement(t,n){return Cg(t,n)}containsElement(t,n){return wg(t,n)}query(t,n,r){return Tg(t,n,r)}computeStyle(t,n,r){return window.getComputedStyle(t)[n]}buildKeyframeElement(t,n,r){r=r.map(a=>Ab(a));let i=`@keyframes ${n} {\n`,s="";r.forEach(a=>{s=" ";const l=parseFloat(a.offset);i+=`${s}${100*l}% {\n`,s+=" ",Object.keys(a).forEach(u=>{const c=a[u];switch(u){case"offset":return;case"easing":return void(c&&(i+=`${s}animation-timing-function: ${c};\n`));default:return void(i+=`${s}${u}: ${c};\n`)}}),i+=`${s}}\n`}),i+="}\n";const o=document.createElement("style");return o.textContent=i,o}animate(t,n,r,i,s,o=[],a){const l=o.filter(E=>E instanceof i1),u={};Pb(r,i)&&l.forEach(E=>{let R=E.currentSnapshot;Object.keys(R).forEach(M=>u[M]=R[M])});const c=function(e){let t={};return e&&(Array.isArray(e)?e:[e]).forEach(r=>{Object.keys(r).forEach(i=>{"offset"==i||"easing"==i||(t[i]=r[i])})}),t}(n=Lb(t,n,u));if(0==r)return new G3(t,c);const d="gen_css_kf_"+this._count++,f=this.buildKeyframeElement(t,d,n);(function(e){var t;const n=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e);return"undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot?n:document.head})(t).appendChild(f);const m=Xb(t,n),b=new i1(t,n,d,r,i,s,c,m);return b.onDestroy(()=>function(e){e.parentNode.removeChild(e)}(f)),b}}class l1{constructor(t,n,r,i){this.element=t,this.keyframes=n,this.options=r,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=r.duration,this._delay=r.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,n,r){return t.animate(n,r)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(n=>{"offset"!=n&&(t[n]=this._finished?this._finalKeyframe[n]:Mg(this.element,n))}),this.currentSnapshot=t}triggerCallback(t){const n="start"==t?this._onStartFns:this._onDoneFns;n.forEach(r=>r()),n.length=0}}class J3{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(u1().toString()),this._cssKeyframesDriver=new o1}validateStyleProperty(t){return Dg(t)}matchesElement(t,n){return Cg(t,n)}containsElement(t,n){return wg(t,n)}query(t,n,r){return Tg(t,n,r)}computeStyle(t,n,r){return window.getComputedStyle(t)[n]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,n,r,i,s,o=[],a){if(!a&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,n,r,i,s,o);const c={duration:r,delay:i,fill:0==i?"both":"forwards"};s&&(c.easing=s);const d={},f=o.filter(m=>m instanceof l1);Pb(r,i)&&f.forEach(m=>{let b=m.currentSnapshot;Object.keys(b).forEach(E=>d[E]=b[E])});const g=Xb(t,n=Lb(t,n=n.map(m=>$i(m,!1)),d));return new l1(t,n,c,g)}}function u1(){return Eb()&&Element.prototype.animate||{}}let t5=(()=>{class e extends mb{constructor(n,r){super(),this._nextAnimationId=0,this._renderer=n.createRenderer(r.body,{id:"0",encapsulation:be.None,styles:[],data:{animation:[]}})}build(n){const r=this._nextAnimationId.toString();this._nextAnimationId++;const i=Array.isArray(n)?yb(n):n;return c1(this._renderer,null,r,"register",[i]),new n5(r,this._renderer)}}return e.\u0275fac=function(n){return new(n||e)(te(ys),te(rn))},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();class n5 extends class{}{constructor(t,n){super(),this._id=t,this._renderer=n}create(t,n){return new r5(this._id,t,n||{},this._renderer)}}class r5{constructor(t,n,r,i){this.id=t,this.element=n,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",r)}_listen(t,n){return this._renderer.listen(this.element,`@@${this.id}:${t}`,n)}_command(t,...n){return c1(this._renderer,this.element,this.id,t,n)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(t){this._command("setPosition",t)}getPosition(){var t,n;return null!==(n=null===(t=this._renderer.engine.players[+this.id])||void 0===t?void 0:t.getPosition())&&void 0!==n?n:0}}function c1(e,t,n,r,i){return e.setProperty(t,`@@${n}:${r}`,i)}const d1="@.disabled";let i5=(()=>{class e{constructor(n,r,i){this.delegate=n,this.engine=r,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),r.onRemovalComplete=(s,o)=>{o&&o.parentNode(s)&&o.removeChild(s.parentNode,s)}}createRenderer(n,r){const s=this.delegate.createRenderer(n,r);if(!(n&&r&&r.data&&r.data.animation)){let c=this._rendererCache.get(s);return c||(c=new f1("",s,this.engine),this._rendererCache.set(s,c)),c}const o=r.id,a=r.id+"-"+this._currentId;this._currentId++,this.engine.register(a,n);const l=c=>{Array.isArray(c)?c.forEach(l):this.engine.registerTrigger(o,a,n,c.name,c)};return r.data.animation.forEach(l),new s5(this,a,s,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(n,r,i){n>=0&&nr(i)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(s=>{const[o,a]=s;o(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([r,i]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return e.\u0275fac=function(n){return new(n||e)(te(ys),te(Mc),te(Rt))},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();class f1{constructor(t,n,r){this.namespaceId=t,this.delegate=n,this.engine=r,this.destroyNode=this.delegate.destroyNode?i=>n.destroyNode(i):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,n){return this.delegate.createElement(t,n)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,n){this.delegate.appendChild(t,n),this.engine.onInsert(this.namespaceId,n,t,!1)}insertBefore(t,n,r,i=!0){this.delegate.insertBefore(t,n,r),this.engine.onInsert(this.namespaceId,n,t,i)}removeChild(t,n,r){this.engine.onRemove(this.namespaceId,n,this.delegate,r)}selectRootElement(t,n){return this.delegate.selectRootElement(t,n)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,n,r,i){this.delegate.setAttribute(t,n,r,i)}removeAttribute(t,n,r){this.delegate.removeAttribute(t,n,r)}addClass(t,n){this.delegate.addClass(t,n)}removeClass(t,n){this.delegate.removeClass(t,n)}setStyle(t,n,r,i){this.delegate.setStyle(t,n,r,i)}removeStyle(t,n,r){this.delegate.removeStyle(t,n,r)}setProperty(t,n,r){"@"==n.charAt(0)&&n==d1?this.disableAnimations(t,!!r):this.delegate.setProperty(t,n,r)}setValue(t,n){this.delegate.setValue(t,n)}listen(t,n,r){return this.delegate.listen(t,n,r)}disableAnimations(t,n){this.engine.disableAnimations(t,n)}}class s5 extends f1{constructor(t,n,r,i){super(n,r,i),this.factory=t,this.namespaceId=n}setProperty(t,n,r){"@"==n.charAt(0)?"."==n.charAt(1)&&n==d1?this.disableAnimations(t,r=void 0===r||!!r):this.engine.process(this.namespaceId,t,n.substr(1),r):this.delegate.setProperty(t,n,r)}listen(t,n,r){if("@"==n.charAt(0)){const i=function(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(t);let s=n.substr(1),o="";return"@"!=s.charAt(0)&&([s,o]=function(e){const t=e.indexOf(".");return[e.substring(0,t),e.substr(t+1)]}(s)),this.engine.listen(this.namespaceId,i,s,o,a=>{this.factory.scheduleListenerCallback(a._data||-1,r,a)})}return this.delegate.listen(t,n,r)}}let l5=(()=>{class e extends Mc{constructor(n,r,i){super(n.body,r,i)}ngOnDestroy(){this.flush()}}return e.\u0275fac=function(n){return new(n||e)(te(rn),te(pc),te(kg))},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})();const h1=new ke("AnimationModuleType"),g1=[{provide:mb,useClass:t5},{provide:kg,useFactory:function(){return new m3}},{provide:Mc,useClass:l5},{provide:ys,useFactory:function(e,t,n){return new i5(e,t,n)},deps:[tc,Mc,Rt]}],p1=[{provide:pc,useFactory:function(){return"function"==typeof u1()?new J3:new o1}},{provide:h1,useValue:"BrowserAnimations"},...g1],m1=[{provide:pc,useClass:Ib},{provide:h1,useValue:"NoopAnimations"},...g1];let f5=(()=>{class e{static withConfig(n){return{ngModule:e,providers:n.disableAnimations?m1:p1}}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=ii({type:e}),e.\u0275inj=tn({providers:p1,imports:[eg]}),e})();function A(e,t){return[...t&&"before"===t.animateChildren?[gg("@*",hg(),{optional:!0})]:[],fg([Hk(e),...t&&t.animateChildren&&"together"!==t.animateChildren?[]:[gg("@*",hg(),{optional:!0})]]),...t&&"after"===t.animateChildren?[gg("@*",hg(),{optional:!0})]:[]]}function h5(e){return fc(e&&e.anchor||"slideInUpOnEnter",[hc(":enter",[Wt({visibility:"hidden"}),...A(gc([Uo("{{duration}}ms {{delay}}ms",jo([Wt({visibility:"visible",transform:"translate3d(0, {{translate}}, 0)",easing:"ease",offset:0}),Wt({transform:"translate3d(0, 0, 0)",easing:"ease",offset:1})]))]),e)],{params:{delay:e&&e.delay||0,duration:e&&e.duration||1e3,translate:e&&e.translate||"100%"}})])}function g5(e){return fc(e&&e.anchor||"slideOutDownOnLeave",[hc(":leave",[...A(gc([Uo("{{duration}}ms {{delay}}ms",jo([Wt({transform:"translate3d(0, 0, 0)",easing:"ease",offset:0}),Wt({transform:"translate3d(0, {{translate}}, 0)",visibility:"hidden",easing:"ease",offset:1})]))]),e)],{params:{delay:e&&e.delay||0,duration:e&&e.duration||1e3,translate:e&&e.translate||"100%"}})])}function p5(e){return fc(e&&e.anchor||"zoomInOnEnter",[hc(":enter",[Wt({visibility:"hidden"}),...A(gc(fg([Uo("{{duration}}ms {{delay}}ms",jo([Wt({opacity:0,easing:"ease",offset:0}),Wt({opacity:1,easing:"ease",offset:.5}),Wt({opacity:1,easing:"ease",offset:1})])),Uo("{{duration}}ms {{delay}}ms",jo([Wt({visibility:"visible",transform:"scale3d(0.3, 0.3, 0.3)",easing:"ease",offset:0}),Wt({transform:"scale3d(1, 1, 1)",easing:"ease",offset:1})]))])),e)],{params:{delay:e&&e.delay||0,duration:e&&e.duration||1e3}})])}function m5(e){return fc(e&&e.anchor||"zoomOutOnLeave",[hc(":leave",[...A(gc(fg([Uo("{{duration}}ms {{delay}}ms",jo([Wt({opacity:1,transform:"scale3d(1, 1, 1)",easing:"ease",offset:0}),Wt({opacity:0,transform:"scale3d(0.3, 0.3, 0.3)",easing:"ease",offset:.5}),Wt({opacity:0,easing:"ease",offset:1})])),Uo("{{duration}}ms {{delay}}ms",jo([Wt({transform:"scale3d(1, 1, 1)",easing:"ease",offset:0}),Wt({transform:"scale3d(0.3, 0.3, 0.3)",easing:"ease",offset:.5})]))])),e)],{params:{delay:e&&e.delay||0,duration:e&&e.duration||1e3}})])}const I5=new pi(tb);function hw(e){return!at(e)&&e-parseFloat(e)+1>=0}function O5(e){const{index:t,period:n,subscriber:r}=e;if(r.next(t),!r.closed){if(-1===n)return r.complete();e.index=t+1,this.schedule(e,n)}}function gw(e,t,n,r){return Mn(n)&&(r=n,n=void 0),r?gw(e,t,n).pipe($t(i=>at(i)?r(...i):r(i))):new J(i=>{pw(e,t,function(o){i.next(arguments.length>1?Array.prototype.slice.call(arguments):o)},i,n)})}function pw(e,t,n,r,i){let s;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(e)){const o=e;e.addEventListener(t,n,i),s=()=>o.removeEventListener(t,n,i)}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(e)){const o=e;e.on(t,n),s=()=>o.off(t,n)}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(e)){const o=e;e.addListener(t,n),s=()=>o.removeListener(t,n)}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(let o=0,a=e.length;o0&&n.volume<.5),G(1),Pe("ngIf",n.volume>=.5),G(1),Pe("value",100*n.volume),G(4),Pe("ngIf",!n.isFullscreen),G(1),Pe("ngIf",n.isFullscreen)}}const uV=function(e){return{cursor:e}};class Lt{static sendWasmReady(){this.emitWasmReady.emit()}static sendToggleControls(t){this.emitToggleControls.emit(t)}static sendToggleStates(t){this.emitToggleStates.emit(t)}static sendTogglePause(t){this.emitTogglePause.emit(t)}}Lt.\u0275fac=function(t){return new(t||Lt)},Lt.\u0275prov=ee({token:Lt,factory:Lt.\u0275fac}),Lt.emitWasmReady=new vt,Lt.emitToggleControls=new vt,Lt.emitToggleStates=new vt,Lt.emitTogglePause=new vt;class vw{asRetroarchConfig(){const t=Object.keys(this);let n="";for(const r of t)n+=r+' = "'+(null===this[r]?"nul":this[r])+'"\n';return n}}class Kg extends vw{constructor(t){if(super(),this.input_player1_a="x",this.input_player1_b="c",this.input_player1_x="s",this.input_player1_y="z",this.input_player1_up="up",this.input_player1_down="down",this.input_player1_left="left",this.input_player1_right="right",this.input_player1_start="Enter".toLocaleLowerCase(),this.input_player1_select="Shift".toLocaleLowerCase(),this.input_player1_l="a",this.input_player1_r="d",this.input_player1_l2="q",this.input_player1_r2="w",this.input_player1_l3="r",this.input_player1_r3="f",this.input_player1_l_x_plus=null,this.input_player1_l_x_minus=null,this.input_player1_l_y_plus=null,this.input_player1_l_y_minus=null,this.input_player1_r_x_plus=null,this.input_player1_r_x_minus=null,this.input_player1_r_y_plus=null,this.input_player1_r_y_minus=null,this.input_player2_a=null,this.input_player2_b=null,this.input_player2_x=null,this.input_player2_y=null,this.input_player2_up=null,this.input_player2_down=null,this.input_player2_left=null,this.input_player2_right=null,this.input_player2_start=null,this.input_player2_select=null,this.input_player2_l=null,this.input_player2_r=null,this.input_player2_l2=null,this.input_player2_r2=null,this.input_player2_l3=null,this.input_player2_r3=null,this.input_player2_l_x_plus=null,this.input_player2_l_x_minus=null,this.input_player2_l_y_plus=null,this.input_player2_l_y_minus=null,this.input_player2_r_x_plus=null,this.input_player2_r_x_minus=null,this.input_player2_r_y_plus=null,this.input_player2_r_y_minus=null,this.input_player3_a=null,this.input_player3_b=null,this.input_player3_x=null,this.input_player3_y=null,this.input_player3_up=null,this.input_player3_down=null,this.input_player3_left=null,this.input_player3_right=null,this.input_player3_start=null,this.input_player3_select=null,this.input_player3_l=null,this.input_player3_r=null,this.input_player3_l2=null,this.input_player3_r2=null,this.input_player3_l_x_plus=null,this.input_player3_l_x_minus=null,this.input_player3_l_y_plus=null,this.input_player3_l_y_minus=null,this.input_player3_r_x_plus=null,this.input_player3_r_x_minus=null,this.input_player3_r_y_plus=null,this.input_player3_r_y_minus=null,this.input_player4_a=null,this.input_player4_b=null,this.input_player4_x=null,this.input_player4_y=null,this.input_player4_up=null,this.input_player4_down=null,this.input_player4_left=null,this.input_player4_right=null,this.input_player4_start=null,this.input_player4_select=null,this.input_player4_l=null,this.input_player4_r=null,this.input_player4_l2=null,this.input_player4_r2=null,this.input_player4_l_x_plus=null,this.input_player4_l_x_minus=null,this.input_player4_l_y_plus=null,this.input_player4_l_y_minus=null,this.input_player4_r_x_plus=null,this.input_player4_r_x_minus=null,this.input_player4_r_y_plus=null,this.input_player4_r_y_minus=null,t)for(let n of Object.keys(t))n in this&&(this[n]=t[n])}setKey(t,n){let r=Object.keys(this),i=null;for(let s of r)this[s]===n&&(i=s,this[s]=null);return this[t]=n,i}static convertKeyboardValue(t){switch(t.code){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":return t.code.replace("Arrow","").toLowerCase();case"Numpad0":case"Numpad1":case"Numpad2":case"Numpad3":case"Numpad4":case"Numpad5":case"Numpad6":case"Numpad7":case"Numpad8":case"Numpad9":return t.code.replace("Num","key");case"NumpadAdd":return"kp_plus";case"NumpadSubtract":return"kp_minus";case"NumpadEnter":return"kp_enter"}return t.key.toLowerCase()}}let Lc=(()=>{class e{static setConfig(n,r,i=null){e.setItem(i?`${r}_${i}_cfg`:`${r}_cfg`,n)}static getConfig(n,r){const i=e.getItem(`${n}_${r}_cfg`)||e.getItem(`${n}_cfg`);return i?new Kg(i):null}static removeRomConfig(n,r){e.removeItem(`${n}_${r}_cfg`)}static setItem(n,r,i=!0){const s=this.prefixer(n,i);localStorage.setItem(s,JSON.stringify(r))}static getItem(n,r=!0){const i=this.prefixer(n,r),s=localStorage.getItem(i);return"undefined"!==s?JSON.parse(s):(console.error("StorageHelper : getItem -> undefined key"),null)}static removeItem(n,r=!0){const i=this.prefixer(n,r);localStorage.removeItem(i)}static prefixer(n,r){let i=n;return r&&(i=this.storagePrefix+n),i}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e.storagePrefix="ngx-retroarch_",e})(),yi=(()=>{class e{static init(){Bo.config({driver:Bo.INDEXEDDB,name:this.storagePrefix,version:1,storeName:"game_states",description:"Ngx-RetroArch game states"})}static setGameState(n){return xt(this,void 0,void 0,function*(){yield Bo.setItem(n.id,n)})}static getGameState(n){return xt(this,void 0,void 0,function*(){return yield Bo.getItem(n)})}static deleteGameState(n){return xt(this,void 0,void 0,function*(){return yield Bo.removeItem(n)})}static scanGameStates(n){return xt(this,void 0,void 0,function*(){const r=yield Bo.keys();let i=[];for(let s of r)s.startsWith(n)&&i.push(s);return i})}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e.storagePrefix="ngx-retroarch",e})();class cV extends vw{constructor(){super(),this.config_save_on_exit=!1,this.rgui_show_start_screen=!1,this.pause_nonactive=!0,this.input_player1_analog_dpad_mode="1",this.input_player2_analog_dpad_mode="1",this.input_player3_analog_dpad_mode="1",this.input_player4_analog_dpad_mode="1",this.input_menu_toggle="f1",this.input_save_state="f2",this.input_load_state="f3",this.input_reset=null,this.input_audio_mute=null,this.input_rewind=null,this.input_frame_advance=null,this.input_slowmotion=null,this.input_pause_toggle=null,this.input_toggle_fullscreen=null,this.input_toggle_fast_forward_btn=null,this.input_toggle_fast_forward_axis=null,this.input_hold_fast_forward=null,this.input_hold_fast_forward_btn=null,this.input_hold_fast_forward_axis=null,this.input_load_state_btn=null,this.input_load_state_axis=null,this.input_save_state_btn=null,this.input_save_state_axis=null,this.input_toggle_fullscreen_btn=null,this.input_toggle_fullscreen_axis=null,this.input_exit_emulator_btn=null,this.input_exit_emulator_axis=null,this.input_state_slot_increase=null,this.input_state_slot_increase_btn=null,this.input_state_slot_increase_axis=null,this.input_state_slot_decrease=null,this.input_state_slot_decrease_btn=null,this.input_state_slot_decrease_axis=null,this.input_rewind_btn=null,this.input_rewind_axis=null,this.input_movie_record_toggle_btn=null,this.input_movie_record_toggle_axis=null,this.input_pause_toggle_btn=null,this.input_pause_toggle_axis=null,this.input_frame_advance_btn=null,this.input_frame_advance_axis=null,this.input_reset_btn=null,this.input_reset_axis=null,this.input_shader_next=null,this.input_shader_next_btn=null,this.input_shader_next_axis=null,this.input_shader_prev=null,this.input_shader_prev_btn=null,this.input_shader_prev_axis=null,this.input_cheat_index_plus=null,this.input_cheat_index_plus_btn=null,this.input_cheat_index_plus_axis=null,this.input_cheat_index_minus=null,this.input_cheat_index_minus_btn=null,this.input_cheat_index_minus_axis=null,this.input_cheat_toggle=null,this.input_cheat_toggle_btn=null,this.input_cheat_toggle_axis=null,this.input_screenshot_btn=null,this.input_screenshot_axis=null,this.input_audio_mute_btn=null,this.input_audio_mute_axis=null,this.input_osk_toggle=null,this.input_osk_toggle_btn=null,this.input_osk_toggle_axis=null,this.input_netplay_flip_players=null,this.input_netplay_flip_players_btn=null,this.input_netplay_flip_players_axis=null,this.input_slowmotion_btn=null,this.input_slowmotion_axis=null,this.input_enable_hotkey=null,this.input_enable_hotkey_btn=null,this.input_enable_hotkey_axis=null,this.input_volume_up=null,this.input_volume_up_btn=null,this.input_volume_up_axis=null,this.input_volume_down=null,this.input_volume_down_btn=null,this.input_volume_down_axis=null,this.input_overlay_next=null,this.input_overlay_next_btn=null,this.input_overlay_next_axis=null,this.input_disk_eject_toggle=null,this.input_disk_eject_toggle_btn=null,this.input_disk_eject_toggle_axis=null,this.input_disk_next=null,this.input_disk_next_btn=null,this.input_disk_next_axis=null,this.input_disk_prev=null,this.input_disk_prev_btn=null,this.input_disk_prev_axis=null,this.input_grab_mouse_toggle=null,this.input_grab_mouse_toggle_btn=null,this.input_grab_mouse_toggle_axis=null,this.input_menu_toggle_btn=null,this.input_menu_toggle_axis=null}}var sn=(()=>(function(e){e.BUNDLE="home/web_user/retroarch/bundle",e.USERDATA="home/web_user/retroarch/userdata",e.CONFIG="/home/web_user/retroarch/userdata/retroarch.cfg",e.ROM="/rom.bin",e.STATE="/home/web_user/retroarch/userdata/states/rom.state",e.SCREENSHOT="/home/web_user/retroarch/userdata/screenshots/"}(sn||(sn={})),sn))();const dV={PLAY:"Play",PRESS_KEY:"Press keyboard or gamepad button",CMD_UPD:"Command successfully updated!",UNDEFINED:"Undefined",PLAYER:"Player",OVERWRITTEN:"has been overwritten",CLOSING:"Closing",COMMAND:"Command",KEYBOARD:"Keyboard",DPAD:"Dpad",BUTTONS:"Buttons",UP:"Up",DOWN:"Down",LEFT:"Left",RIGHT:"Right",GAME_STATES:"Game states",SAVE_CFG_CORE:"Save for all {{core}} games",SAVE_CFG_GAME:"Save only for this game"},fV={PLAY:"Jouer",PRESS_KEY:"Appuyez sur une touche du clavier ou de la manette de jeu",CMD_UPD:"Commande mise \xe0 jour avec succ\xe8s !",UNDEFINED:"Ind\xe9finie",PLAYER:"Joueur",OVERWRITTEN:"a \xe9t\xe9 \xe9cras\xe9",CLOSING:"Fermeture",COMMAND:"Commande",KEYBOARD:"Clavier",DPAD:"Croix directionnelle",BUTTONS:"Boutons",UP:"Haut",DOWN:"Bas",LEFT:"Gauche",RIGHT:"Droite",GAME_STATES:"Sauvegardes",SAVE_CFG_CORE:"Sauvegarder pour tous les jeux {{core}}",SAVE_CFG_GAME:"Sauvegarder uniquement pour ce jeu"};window.Module={canvas:null,noInitialRun:!0,arguments:["/rom.bin","--verbose"],onRuntimeInitialized:function(){Lt.sendWasmReady()}};let hV=(()=>{class e{constructor(n,r,i,s){this.elementRef=n,this.changeDetectorRef=r,this.renderer=i,this.translateService=s,this.lang="en",this.assetPath="./",this.romPath="./",this.core=null,this.rom=null,this.development=!1,this.canvas=null,this.isFocused=!1,this.romReady=!1,this.wasmReady=!1,this.bundleReady=!1,this.gameStarted=!1,this.showControls=!1,this.showStates=!1,this.romName=null,this.romData=null,this.mainConfig=new cV,this.playerConfig=null,this.installedCores=["snes9x"],this.fileExts={mgba:["gb","gbc","gba"],dolphin:["iso","gcm","dol","tgc","wbfs","ciso","gcz","wad"],genesis_plus_gx:["mdx","md","smd","gen","sms","gg","sg","68k","chd"],nestopia:["nes","fds","unf","unif"],mupen64plus_next:["n64","v64","z64","u1","ndd"],parallel_n64:["n64","v64","z64","u1","ndd"],citra:["3ds","3dsx","cci","cxi"],desmume:["nds","srl"],beetle_psx:["ccd","iso"],ppsspp:["cso","pbp"],snes9x:["smc","sfc","swc","fig","bs","st"]},this.wasmReadySub=this.wasmReadySubscription(),this.toggleStatesSub=this.toggleStatesSubscription(),this.toggleControlsSub=this.toggleControlsSubscription()}ngOnInit(){return xt(this,void 0,void 0,function*(){yi.init(),this.initI18n(),this.initModule(),yield this.loadCore(),yield this.loadRom(),this.development&&(yield this.loadAssetBundle())})}ngOnDestroy(){this.wasmReadySub.unsubscribe(),this.toggleStatesSub.unsubscribe(),this.toggleControlsSub.unsubscribe()}onClickPlay(n){return xt(this,void 0,void 0,function*(){yield this.initCore()})}initI18n(){let n=null;switch(this.lang){case"en":n=dV;break;case"fr":n=fV}this.translateService.setDefaultLang("en"),this.translateService.use(this.lang),this.translateService.setTranslation(this.lang,n)}initModule(){this.canvas=document.getElementById("canvas"),window.Module.canvas=this.canvas,this.development||(window.Module.print=n=>{},window.Module.printErr=n=>{})}loadCore(){if(!this.installedCores.includes(this.core))throw new Error(`EmulatorComponent : loadCore -> Could not load specified core "${this.core}". Here is a list of available cores [${this.installedCores.join(", ")}]`);return new Promise((n,r)=>{const i=this.renderer.createElement("script");i.src=this.assetPath+this.core+"_libretro"+(this.development?"":".min")+".js",i.onload=()=>(this.devLog("1 - Core ready"),n()),this.renderer.appendChild(this.elementRef.nativeElement,i)})}loadRom(){return xt(this,void 0,void 0,function*(){if(!this.rom)throw new Error("EmulatorComponent : loadRom -> ROM is required.");const n=this.romPath+this.rom;let r=yield this.getFile(n,"blob");if(!r)throw new Error(`EmulatorComponent : loadRom -> Unable to fetch ROM at ${n}`);const i=this.rom.split(".").pop();if("zip"===i)r=yield this.unzipFile(r);else if(!this.fileExts[this.core].includes(i))throw new Error(`EmulatorComponent : loadRom -> Invalid ROM file for "${this.core}" core. Are you using the right core?`);const s=yield r.arrayBuffer();this.romName=this.rom.split(".")[0],this.romData=new Uint8Array(s),this.romReady=!0,this.changeDetectorRef.detectChanges(),this.devLog("1.1 - ROM ready","#421e8a")})}loadAssetBundle(){return xt(this,void 0,void 0,function*(){if(!this.romReady||!this.wasmReady)return this.devLog(`Unable to load the asset bundle : ${this.romReady?"WASM":"ROM"} is not ready yet!`,"none","#F5BD00");const n=[["","assets"],["/assets","menu_widgets"],["/assets","ozone"],["/assets/ozone","png"],["/assets/ozone/png","dark"],["/assets/ozone/png","sidebar"],["/assets","xmb"],["/assets/xmb","monochrome"],["/assets/xmb/monochrome","png"]];FS.createPath("/",sn.BUNDLE,!0,!0);for(let o=0;o That zip file appears to be empty!");let s=null;for(let o of i){let a=o.split(".").pop();this.fileExts[this.core].includes(a)&&(s=o)}if(!s)throw new Error(`EmulatorComponent : unzipFile -> Couldn't find a valid ROM file for "${this.core}" core in that zip file. Are you using the right core?`);return yield r[s].blob()})}getFile(n,r){return new Promise(i=>{fetch(n,{method:"GET"}).then(s=>s.ok?i(s[r]()):(console.warn(`EmulatorComponent : getFile -> Unable to fetch file at ${n}`),i(null)))})}wasmReadySubscription(){return Lt.emitWasmReady.subscribe(n=>{this.devLog("2 - WASM ready"),this.wasmReady=!0,this.development&&this.loadAssetBundle()})}toggleStatesSubscription(){return Lt.emitToggleStates.subscribe(n=>{this.showStates=n,this.changeDetectorRef.detectChanges()})}toggleControlsSubscription(){return Lt.emitToggleControls.subscribe(n=>{this.showControls=n,this.changeDetectorRef.detectChanges()})}}return e.\u0275fac=function(n){return new(n||e)(ne(bn),ne(di),ne(Lf),ne(Vo))},e.\u0275cmp=ri({type:e,selectors:[["ngx-retroarch"]],inputs:{lang:"lang",assetPath:"assetPath",romPath:"romPath",core:"core",rom:"rom",development:"development"},decls:7,vars:5,consts:[["id","retroarch-container"],["id","canvas"],[4,"ngIf"],[3,"playEvent",4,"ngIf"],[3,"canvas","core","romName","mainConfig","playerConfig",4,"ngIf"],[3,"core","romName","mainConfig","playerConfig",4,"ngIf"],[3,"romName",4,"ngIf"],[3,"playEvent"],[3,"canvas","core","romName","mainConfig","playerConfig"],[3,"core","romName","mainConfig","playerConfig"],[3,"romName"]],template:function(n,r){1&n&&(O(0,"div",0),ie(1,"canvas",1),dt(2,F5,1,0,"ngx-loading-bars",2),dt(3,k5,1,0,"ngx-play-btn",3),dt(4,V5,1,5,"ngx-hud",4),dt(5,B5,1,4,"ngx-controls",5),dt(6,U5,1,1,"ngx-states",6),x()),2&n&&(G(2),Pe("ngIf",!r.romReady||!r.bundleReady&&r.development),G(1),Pe("ngIf",r.romReady&&(!r.development||r.bundleReady&&r.development)&&!r.gameStarted),G(1),Pe("ngIf",r.gameStarted),G(1),Pe("ngIf",r.showControls),G(1),Pe("ngIf",r.showStates))},directives:function(){return[Qu,_V,vV,yV,gV,pV]},styles:["#retroarch-container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;overflow:hidden}#retroarch-container[_ngcontent-%COMP%] *{font-family:Arial}#retroarch-container[_ngcontent-%COMP%] #canvas[_ngcontent-%COMP%]{max-width:100%;height:auto!important;width:100%!important;background:black}#retroarch-container[_ngcontent-%COMP%] ngx-hud[_ngcontent-%COMP%], #retroarch-container[_ngcontent-%COMP%] ngx-controls[_ngcontent-%COMP%], #retroarch-container[_ngcontent-%COMP%] ngx-states[_ngcontent-%COMP%]{position:absolute;height:100%;width:100%}#retroarch-container[_ngcontent-%COMP%] ngx-controls[_ngcontent-%COMP%], #retroarch-container[_ngcontent-%COMP%] ngx-states[_ngcontent-%COMP%]{overflow:hidden;will-change:transform}#retroarch-container[_ngcontent-%COMP%] ngx-play-btn[_ngcontent-%COMP%]{display:block;position:absolute}"]}),e})(),Ew=(()=>{class e{static watchResize(n){"ResizeObserver"in self&&new ResizeObserver(i=>{i.forEach(s=>{const o=s.target.dataset.breakpoints?JSON.parse(s.target.dataset.breakpoints):this.defaultBreakpoints;Object.keys(o).forEach(a=>{s.contentRect.width>=o[a]?s.target.classList.add(a):s.target.classList.remove(a)})})}).observe(n)}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e.defaultBreakpoints={sm:384,md:576,lg:768,xl:960},e})();class yl{constructor(t,n){this.dpad_up=null,this.dpad_down=null,this.dpad_left=null,this.dpad_right=null,this.btn_start=null,this.btn_select=null,this.btn_a=null,this.btn_b=null,this.btn_x=null,this.btn_y=null,this.btn_l=null,this.btn_r=null,t&&n&&this.fromPlayerConfig(t,n)}static getPropByAction(t){const n=`_${t}`;return Object.keys(new yl).find(i=>i.endsWith(n))}fromPlayerConfig(t,n){const r=`input_player${n}_`,i=Object.keys(this),s=Object.keys(t),o=[];for(let a of i)o.push(a.split("_").pop());for(let a of s){if(!a.startsWith(r))continue;const l=a.replace(r,"");o.includes(l)&&(this[i.find(c=>c.endsWith(l))]=t[a])}}}let gV=(()=>{class e{constructor(n,r){this.changeDetectorRef=n,this.translateService=r,this.players=4,this.activePlayer=1,this.curAction="",this.curAssignedKey=null,this.newAssignedKey=null,this.overwritePlayer=null,this.overwriteCmd="",this.listenerHasFocus=!1,this.showListener=!1,this.controls=[]}ngOnInit(){this.setControls()}ngAfterViewInit(){Ew.watchResize(this.dataObserveResizes.nativeElement)}onClickClose(){Lt.sendToggleControls(!1),Lt.sendTogglePause(!1)}onClickChangeTab(n){this.activePlayer=n+1,this.changeDetectorRef.detectChanges()}onClickCloseListener(){this.showListener=!1,this.changeDetectorRef.detectChanges()}onClickSave(n){n?(Lc.setConfig(this.playerConfig,this.core),Lc.removeRomConfig(this.core,this.romName)):Lc.setConfig(this.playerConfig,this.core,this.romName),FS.writeFile(sn.CONFIG,this.mainConfig.asRetroarchConfig()+this.playerConfig.asRetroarchConfig()),wasmTable.get(108)(),this.onClickClose()}onClickEditKey(n){this.overwritePlayer=null,this.overwriteCmd=null,this.curAssignedKey=null,this.newAssignedKey=null,this.showListener=!0;const r=`input_player${this.activePlayer}_${n}`;this.curAction=this.translateService.instant(n.toUpperCase()),this.curAssignedKey=this.playerConfig[r],this.changeDetectorRef.detectChanges(),this.listenerEl.nativeElement.addEventListener("keydown",i=>{const s=Kg.convertKeyboardValue(i),o=this.playerConfig.setKey(r,s);if(o&&o!==r){const l=o.replace("input_player","");this.overwritePlayer=Number(l.charAt(0)),this.overwriteCmd=l.substring(2);const u=yl.getPropByAction(this.overwriteCmd);this.controls[this.overwritePlayer-1][u]=null}this.newAssignedKey=s;const a=yl.getPropByAction(n);this.controls[this.activePlayer-1][a]=s,this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.showListener=!1,this.changeDetectorRef.detectChanges()},this.overwriteCmd?5e3:2e3)}),this.listenerEl.nativeElement.focus()}updateKeyboardLabel(n){switch(n){case"up":return"\u2191";case"down":return"\u2193";case"left":return"\u2190";case"right":return"\u2192";case"enter":return n+" \u21b5";case null:return this.translateService.instant("UNDEFINED")}return n}setControls(){let n=[];for(let r=1;r<=this.players;r++)n.push(new yl(this.playerConfig,r));this.controls=n}}return e.\u0275fac=function(n){return new(n||e)(ne(di),ne(Vo))},e.\u0275cmp=ri({type:e,selectors:[["ngx-controls"]],viewQuery:function(n,r){if(1&n&&(el(j5,5),el(mw,5)),2&n){let i;Ja(i=tl())&&(r.listenerEl=i.first),Ja(i=tl())&&(r.dataObserveResizes=i.first)}},inputs:{core:"core",romName:"romName",mainConfig:"mainConfig",playerConfig:"playerConfig"},decls:131,vars:54,consts:[[1,"backdrop"],[1,"wrapper"],[1,"content"],["class","key-listener","tabindex","0",4,"ngIf"],[1,"header"],[1,"nav","nav-pills","nav-fill"],["class","nav-item",4,"ngFor","ngForOf"],[1,"btn",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px"],["d","M0 0h24v24H0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"],[1,"body"],[1,"flex-grid"],["dataObserveResizes",""],[1,"col"],[1,"table","table-striped"],[1,"text-uppercase"],[1,"keyboard-key",3,"click"],[1,"footer"],[1,"flex-btns"],["type","button",1,"btn","save-btn",3,"click"],["tabindex","0",1,"key-listener"],["keyListener",""],["class","info",4,"ngIf"],[1,"binding"],["class","cur",4,"ngIf"],["class","new",4,"ngIf"],["class","closing",4,"ngIf"],[1,"info"],[1,"cur"],[1,"new"],[1,"new-msg"],["class","new-alert",4,"ngIf"],[1,"new-alert"],[1,"alert-msg"],[1,"alert-cmd"],[1,"closing"],[1,"nav-item"],[1,"nav-link",3,"click"]],template:function(n,r){1&n&&(ie(0,"div",0),O(1,"div",1),O(2,"div",2),dt(3,G5,12,7,"div",3),O(4,"div",4),O(5,"ul",5),dt(6,q5,4,6,"li",6),O(7,"li"),O(8,"button",7),Me("click",function(){return r.onClickClose()}),It(),O(9,"svg",8),ie(10,"path",9),ie(11,"path",10),x(),x(),x(),x(),x(),Xn(),O(12,"div",11),O(13,"div",12,13),O(15,"div",14),O(16,"h4"),me(17),gt(18,"translate"),x(),O(19,"table",15),O(20,"thead"),O(21,"tr"),O(22,"th"),O(23,"small"),me(24),gt(25,"translate"),x(),x(),O(26,"th"),O(27,"small"),me(28),gt(29,"translate"),x(),x(),x(),x(),O(30,"tbody"),O(31,"tr"),O(32,"td",16),me(33),gt(34,"translate"),x(),O(35,"td"),O(36,"span",17),Me("click",function(){return r.onClickEditKey("up")}),me(37),x(),x(),x(),O(38,"tr"),O(39,"td",16),me(40),gt(41,"translate"),x(),O(42,"td"),O(43,"span",17),Me("click",function(){return r.onClickEditKey("down")}),me(44),x(),x(),x(),O(45,"tr"),O(46,"td",16),me(47),gt(48,"translate"),x(),O(49,"td"),O(50,"span",17),Me("click",function(){return r.onClickEditKey("left")}),me(51),x(),x(),x(),O(52,"tr"),O(53,"td",16),me(54),gt(55,"translate"),x(),O(56,"td"),O(57,"span",17),Me("click",function(){return r.onClickEditKey("right")}),me(58),x(),x(),x(),x(),x(),x(),O(59,"div",14),O(60,"h4"),me(61),gt(62,"translate"),x(),O(63,"table",15),O(64,"thead"),O(65,"tr"),O(66,"th"),O(67,"small"),me(68),gt(69,"translate"),x(),x(),O(70,"th"),O(71,"small"),me(72),gt(73,"translate"),x(),x(),x(),x(),O(74,"tbody"),O(75,"tr"),O(76,"td",16),me(77,"START"),x(),O(78,"td"),O(79,"span",17),Me("click",function(){return r.onClickEditKey("start")}),me(80),x(),x(),x(),O(81,"tr"),O(82,"td",16),me(83,"SELECT"),x(),O(84,"td"),O(85,"span",17),Me("click",function(){return r.onClickEditKey("select")}),me(86),x(),x(),x(),O(87,"tr"),O(88,"td",16),me(89,"A"),x(),O(90,"td"),O(91,"span",17),Me("click",function(){return r.onClickEditKey("a")}),me(92),x(),x(),x(),O(93,"tr"),O(94,"td",16),me(95,"B"),x(),O(96,"td"),O(97,"span",17),Me("click",function(){return r.onClickEditKey("b")}),me(98),x(),x(),x(),O(99,"tr"),O(100,"td",16),me(101,"X"),x(),O(102,"td"),O(103,"span",17),Me("click",function(){return r.onClickEditKey("x")}),me(104),x(),x(),x(),O(105,"tr"),O(106,"td",16),me(107,"Y"),x(),O(108,"td"),O(109,"span",17),Me("click",function(){return r.onClickEditKey("y")}),me(110),x(),x(),x(),O(111,"tr"),O(112,"td",16),me(113,"L"),x(),O(114,"td"),O(115,"span",17),Me("click",function(){return r.onClickEditKey("l")}),me(116),x(),x(),x(),O(117,"tr"),O(118,"td",16),me(119,"R"),x(),O(120,"td"),O(121,"span",17),Me("click",function(){return r.onClickEditKey("r")}),me(122),x(),x(),x(),x(),x(),x(),x(),x(),O(123,"div",18),O(124,"div",19),O(125,"button",20),Me("click",function(){return r.onClickSave(!0)}),me(126),gt(127,"translate"),x(),O(128,"button",20),Me("click",function(){return r.onClickSave(!1)}),me(129),gt(130,"translate"),x(),x(),x(),x(),x()),2&n&&(G(3),Pe("ngIf",r.showListener),G(3),Pe("ngForOf",function(e,t,n){const r=yn()+e,i=P();return i[r]===pe?Yr(i,r,n?t.call(n):t()):function(e,t){return e[t]}(i,r)}(51,Q5).constructor(r.players)),G(11),Ue(St(18,26,"DPAD")),G(7),Ue(St(25,28,"COMMAND")),G(4),Ue(St(29,30,"KEYBOARD")),G(5),Ue(St(34,32,"UP")),G(4),Ue(r.updateKeyboardLabel(r.controls[r.activePlayer-1].dpad_up)),G(3),Ue(St(41,34,"DOWN")),G(4),Ue(r.updateKeyboardLabel(r.controls[r.activePlayer-1].dpad_down)),G(3),Ue(St(48,36,"LEFT")),G(4),Ue(r.updateKeyboardLabel(r.controls[r.activePlayer-1].dpad_left)),G(3),Ue(St(55,38,"RIGHT")),G(4),Ue(r.updateKeyboardLabel(r.controls[r.activePlayer-1].dpad_right)),G(3),Ue(St(62,40,"BUTTONS")),G(7),Ue(St(69,42,"COMMAND")),G(4),Ue(St(73,44,"KEYBOARD")),G(8),Ue(r.updateKeyboardLabel(r.controls[r.activePlayer-1].btn_start)),G(6),Ue(r.updateKeyboardLabel(r.controls[r.activePlayer-1].btn_select)),G(6),Ue(r.updateKeyboardLabel(r.controls[r.activePlayer-1].btn_a)),G(6),Ue(r.updateKeyboardLabel(r.controls[r.activePlayer-1].btn_b)),G(6),Ue(r.updateKeyboardLabel(r.controls[r.activePlayer-1].btn_x)),G(6),Ue(r.updateKeyboardLabel(r.controls[r.activePlayer-1].btn_y)),G(6),Ue(r.updateKeyboardLabel(r.controls[r.activePlayer-1].btn_l)),G(6),Ue(r.updateKeyboardLabel(r.controls[r.activePlayer-1].btn_r)),G(4),Ue(Zf(127,46,"SAVE_CFG_CORE",Cu(52,Z5,r.core))),G(3),Ue(St(130,49,"SAVE_CFG_GAME")))},directives:[Qu,jh],pipes:[dg],styles:[".keyboard-key{display:inline-block;align-items:center;background:linear-gradient(-225deg,#d5dbe4,#f8f8f8);border-radius:3px;box-shadow:inset 0 -2px #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px #1e235a66;color:#002b6f;line-height:18px;justify-content:center;margin-right:.4em;padding:0 5px 3px;position:relative;top:-1px;text-transform:uppercase;cursor:pointer}.keyboard-key:hover{box-shadow:none;background:linear-gradient(319deg,#d5dbe4,#f8f8f8);color:#7c5ac0}.key-listener{position:absolute;width:100%;height:100%;z-index:1;background:rgba(27,0,92,.76);display:flex;justify-content:center;align-items:center;flex-direction:column}.key-listener:not(:focus){animation:changeBackgroundColor 2s infinite}.key-listener .btn{position:absolute;right:0;top:0;background:#0000006b;border:none;margin:10px;padding:5px;fill:#fff;cursor:pointer;display:flex}.key-listener .btn:hover{background:black}.key-listener .info{margin-bottom:10px;text-shadow:1px 1px 1px black}.key-listener .closing{color:#ffffffbf;font-size:12px;font-style:italic;margin-top:7px}.key-listener .binding{width:100%;background:black;min-height:50px;display:flex;justify-content:center;align-items:center}.key-listener .binding .new{text-align:center}.key-listener .binding .new .new-msg{color:#fff}.key-listener .binding .new .new-alert{display:block;margin-bottom:10px}.key-listener .binding .new .new-alert .alert-msg{color:#87818a}.key-listener .binding .new .new-alert .alert-msg .alert-cmd{color:#ffe000;text-transform:capitalize}.key-listener .binding .cur,.key-listener .binding .new-msg{margin:6px 0;display:block;font-size:30px;font-weight:bold;text-transform:uppercase}.key-listener .binding .cur{color:#5a5a5a;transform:skew(-15deg)}@keyframes changeBackgroundColor{0%{background-color:#6b00a2db}50%{background-color:#1b005cc2}to{background-color:#6b00a2db}}.flex-btns{display:flex;padding:10px 5px}.nav{display:flex;flex-wrap:wrap;padding:10px;margin:0;list-style:none}.nav.nav-fill .nav-item{flex:1 1 auto;text-align:center}.nav.nav-fill .nav-item .nav-link{width:100%;background:0 0;border:0;display:block;padding:10px 0;color:#c4a7ff;text-decoration:none;cursor:pointer;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}.nav.nav-fill .nav-item .nav-link:hover{color:#fff;background-color:#c4a7ff2e}.nav.nav-fill .nav-item .nav-link.active{color:#fff;background-color:#7c5ac0}.table{width:100%;max-width:100%;border-spacing:0;border-collapse:collapse}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #cdb4ff}td,th{padding:0}th{text-transform:uppercase;font-weight:normal;color:#ab82ff}table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f92e}\n",yw,_w],encapsulation:3,data:{animation:[p5({duration:100}),m5({duration:300})]}}),e})(),pV=(()=>{class e{constructor(n,r){this.sanitizer=n,this.changeDetectorRef=r,this.states=[]}ngOnInit(){this.getStates()}ngAfterViewInit(){Ew.watchResize(this.dataObserveResizes.nativeElement)}onClickClose(){Lt.sendToggleStates(!1),Lt.sendTogglePause(!1)}onClickLoad(n){return xt(this,void 0,void 0,function*(){const r=yield yi.getGameState(n);FS.writeFile(sn.STATE,r.state),window.Module._cmd_load_state(),this.onClickClose()})}onClickDelete(n){return xt(this,void 0,void 0,function*(){yield yi.deleteGameState(n),this.states=this.states.filter(r=>r.id!==n),this.changeDetectorRef.detectChanges()})}getStates(){return xt(this,void 0,void 0,function*(){const n=yield yi.scanGameStates(this.romName);let r=[];for(let i of n){let s=yield yi.getGameState(i);s.safeImg=this.sanitizer.bypassSecurityTrustResourceUrl(s.img),r.push(s)}r.sort((i,s)=>i.datediv{display:none}.card .card-img-overlay:hover .line.action-line>div{display:block}.card .card-img-overlay .line{display:flex;text-shadow:1px 1px black;align-items:center}.card .card-img-overlay .line .left{flex-grow:1}.card .card-img-overlay .line .date{font-size:75%}.card .card-img-overlay .line .btn{background:#2e008a9c!important;border-radius:50%}.card .card-img-overlay .line .btn:hover{background:#2e008a!important}\n",yw,_w],encapsulation:3,data:{animation:[]}}),e})();class mV{constructor(t,n,r){this.id=null,this.label=null,this.img=null,this.safeImg=null,this.romName=null,this.date=null,this.state=null,this.label=`Save - n\xb0${t}`,this.romName=n,this.date=new Date,this.id=`${n}_state_${this.getDateSuffix(this.date)}`,this.state=r}getDateSuffix(t){const n=t.getDate()<10?"0"+t.getDate():t.getDate(),r=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,i=t.getHours()<10?"0"+t.getHours():t.getHours(),s=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),o=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return`${t.getFullYear()}-${r}-${n}_${i}:${s}:${o}`}}let bw=(()=>{class e{static readAsyncFile(n){return xt(this,void 0,void 0,function*(){return new Promise(r=>{let i=0;const s=setInterval(o=>xt(this,void 0,void 0,function*(){const a=FS.readFile(n);if(!a)return;const l=a.length/1e6;if(l===i&&0!==l)return clearInterval(s),r(a);i=l}),500)})})}static getScreenshot(){return xt(this,void 0,void 0,function*(){const n=FS.analyzePath(sn.SCREENSHOT);let r=Object.keys(n.object.contents).length;return window.Module._cmd_take_screenshot(),new Promise(i=>{const s=setInterval(o=>xt(this,void 0,void 0,function*(){const a=FS.analyzePath(sn.SCREENSHOT),l=Object.keys(a.object.contents),u=l.length;if(u!==r||0===r)return void(r=u);clearInterval(s);const c=a.object.contents[l[l.length-1]].contents,f=(yield new Promise(g=>{const m=new FileReader;m.onload=b=>g(m.result),m.readAsDataURL(new Blob([c]))})).split(",",2)[1];return i("data:image/png;base64, "+f)}),200)})})}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac}),e})(),Dw=(()=>{class e{constructor(n,r){this.elementRef=n,this.changeDetectorRef=r,this.min=0,this.max=100,this.value=100,this.step=1,this.valuePrecision=0,this.dir="ltr",this.disabled=!1,this.inputEvent=new vt,this.changeEvent=new vt,this.pointerIsDown=!1,this.percentComplete=100}ngOnInit(){this.ignoreChange=!1,this.isRTL="rtl"===this.dir,this.updateStyle()}computeValueAndStyle(n){const r=n.target.offsetWidth,s=Math.min(Math.max(n.offsetX,0),r)/r,l=this.constrainValue(this.min+(this.isRTL?1-s:s)*(this.max-this.min));this.value===l||this.ignoreChange||(this.value=l,this.inputEvent.emit(),this.updateStyle())}updateStyle(){const n=100*(this.value-this.min)/(this.max-this.min);this.percentComplete=this.isRTL?100-n:n,this.changeDetectorRef.detectChanges()}toggleMute(n){this.value=n?this.min:this.max,this.updateStyle()}onDragEnd(n){this.changeEvent.emit()}onDragging(n){0===n.clientX&&0===n.clientY||n.offsetX<0||this.computeValueAndStyle(n)}onDragStart(n){const r=document.createElement("span");n.dataTransfer.setDragImage(r,0,0),n.dataTransfer.setData("Text",n.target.id),this.computeValueAndStyle(n)}onPointerDown(n){this.computeValueAndStyle(n)}constrainValue(n){const r=this.valuePrecision||this.getPrescision(this.step)||0,i=Math.min(Math.max(n,this.min),this.max),s=Math.round(i/this.step)*this.step,o=r?s.toFixed(r):Math.round(s).toString();return Number(o)}getPrescision(n){const r=String(n).split(".")[1];return r?r.length:0}}return e.\u0275fac=function(n){return new(n||e)(ne(bn),ne(di))},e.\u0275cmp=ri({type:e,selectors:[["ngx-range-slider"]],inputs:{min:"min",max:"max",value:"value",step:"step",valuePrecision:"valuePrecision",dir:"dir",disabled:"disabled"},outputs:{inputEvent:"inputEvent",changeEvent:"changeEvent"},decls:3,vars:5,consts:[["tabindex","0","role","slider","draggable","true",3,"ngClass","dragend","drag","pointerdown","dragstart"],[1,"thumb-wrapper"],[1,"thumb"]],template:function(n,r){1&n&&(O(0,"div",0),Me("dragend",function(s){return r.onDragEnd(s)})("drag",function(s){return r.onDragging(s)})("pointerdown",function(s){return r.onPointerDown(s)})("dragstart",function(s){return r.onDragStart(s)}),O(1,"div",1),ie(2,"div",2),x(),x()),2&n&&(Tr("--value-percent:"+r.percentComplete+"%"),Pe("ngClass",Cu(3,J5,r.pointerIsDown)))},directives:[NE],styles:['.range-slider{--element-height: 24px;--track-height: 3px;--thumb-size: 16px;position:relative;display:flex;align-items:center;height:var(--element-height);width:100%;min-width:130px;overflow:visible;cursor:pointer;touch-action:none}.range-slider:focus{outline:0}.range-slider:focus .thumb{box-shadow:0 0 0 .3em #6221ea33}.range-slider:before{content:"";display:block;width:100%;height:var(--track-height);border-radius:calc(var(--track-height) / 2);background:linear-gradient(#6221ea,#6221ea) 0/var(--value-percent, 0%) 100% no-repeat #fff}.range-slider[disabled]{filter:grayscale(1);opacity:.8}.range-slider .thumb-wrapper{position:absolute;left:calc(var(--thumb-size) / 2);right:calc(var(--thumb-size) / 2);bottom:0;height:0;overflow:visible}.range-slider .thumb-wrapper .thumb{background:#6221ea;border-radius:50%;width:var(--thumb-size);height:var(--thumb-size);position:absolute;bottom:calc(var(--element-height) / 2 - var(--thumb-size) / 2);left:var(--value-percent, 0%);margin-left:calc(var(--thumb-size) / 2 * -1);transition:transform .2s ease;will-change:transform;pointer-events:none}.range-slider.touch-active .thumb-wrapper .thumb{box-shadow:none;transform:scale(1.3)}\n'],encapsulation:3}),e})(),yV=(()=>{class e{constructor(n,r){this.elementRef=n,this.changeDetectorRef=r,this.isFullscreen=!1,this.isPaused=!1,this.isMouseMoving=!1,this.isHUDHovered=!1,this.defaultVolume=1,this.volume=this.defaultVolume,this.audioOverride=!1,this.togglePauseSub=this.togglePauseSubscription()}ngOnInit(){return xt(this,void 0,void 0,function*(){this.overrideQueueAudio(),this.fullscreenSubscription(),this.watchDebouncedMouse()})}ngOnDestroy(){this.togglePauseSub.unsubscribe()}watchDebouncedMouse(){const n=function(e=0,t,n){let r=-1;return hw(t)?r=Number(t)<1?1:Number(t):Tn(t)&&(n=t),Tn(n)||(n=I5),new J(i=>{const s=hw(e)?e:+e-n.now();return n.schedule(O5,s,{index:0,period:r,subscriber:i})})}(0,1e3),r=gw(this.elementRef.nativeElement,"mousemove");n.pipe(function(e){return t=>t.lift(new P5(e))}(r)).subscribe(s=>this.setIsMouseMoving())}onMouseEnterHUD(){this.isHUDHovered=!0,clearTimeout(this.movingTimeout)}onLeaveEnterHUD(){this.isHUDHovered=!1,this.setIsMouseMoving()}onClickShowStates(){this.onClickTogglePlayPause(!0),Lt.sendToggleStates(!0)}onClickShowControls(){this.onClickTogglePlayPause(!0),Lt.sendToggleControls(!0)}onInputVolume(n){this.volume=.01*n,this.changeDetectorRef.detectChanges()}onClickToggleMute(){this.volume=this.volume>0?0:1,this.rangeSliderComponent.value=100*this.volume,this.rangeSliderComponent.updateStyle(),this.changeDetectorRef.detectChanges()}onClickTogglePlayPause(n=null){if(!this.isPaused&&(null===n||!0===n))return this.isPaused=!0,this.changeDetectorRef.detectChanges(),void window.Module.pauseMainLoop();this.isPaused&&(null===n||!1===n)&&(window.Module.resumeMainLoop(),this.isPaused=!1,this.changeDetectorRef.detectChanges())}onClickToggleFullscreen(){return xt(this,void 0,void 0,function*(){if(!this.isFullscreen)return this.elementRef.nativeElement.parentElement.requestFullscreen(),this.isFullscreen=!0,void this.changeDetectorRef.detectChanges();document.exitFullscreen(),this.isFullscreen=!1,this.isPaused||Browser.setWindowedCanvasSize(),this.changeDetectorRef.detectChanges()})}onClickQuickSave(){return xt(this,void 0,void 0,function*(){const n=FS.analyzePath(sn.STATE);n.object&&n.object.contents&&FS.unlink(sn.STATE),window.Module._cmd_save_state();const r=yield bw.readAsyncFile(sn.STATE),i=(yield yi.scanGameStates(this.romName)).length,s=new mV(i+1,this.romName,r);s.img=yield bw.getScreenshot(),yield yi.setGameState(s)})}onClickQuickLoad(){return xt(this,void 0,void 0,function*(){const n=yield yi.scanGameStates(this.romName);if(!n.length)return;n.sort().reverse();const r=yield yi.getGameState(n[0]);FS.writeFile(sn.STATE,r.state),window.Module._cmd_load_state()})}overrideQueueAudio(){this.audioOverride||(this.audioOverride=!0,RA.queueAudio=function(){var r,n=RA.bufIndex;r=RA.bufIndex?RA.buffers[RA.bufIndex-1].endTime:RA.context.currentTime,RA.buffers[n].endTime=r+RA.buffers[n].duration;const i=RA.context.createBufferSource();i.buffer=RA.buffers[n],this.setVolume(i),i.start(r),RA.bufIndex++,RA.bufOffset=0}.bind(this))}setVolume(n){const r=RA.context.createGain();r.connect(RA.context.destination),n.connect(r),r.gain.setValueAtTime(this.volume,RA.context.currentTime)}setIsMouseMoving(){if(!this.isHUDHovered){if(this.isMouseMoving)return clearTimeout(this.movingTimeout),void this.setMovingTimeout();this.isMouseMoving=!0,this.changeDetectorRef.detectChanges(),this.setMovingTimeout()}}setMovingTimeout(){this.movingTimeout=setTimeout(n=>{this.isMouseMoving=!1,this.changeDetectorRef.detectChanges()},3e3)}togglePauseSubscription(){return Lt.emitTogglePause.subscribe(n=>{this.onClickTogglePlayPause(n)})}fullscreenSubscription(){this.elementRef.nativeElement.parentElement.addEventListener("fullscreenchange",n=>{document.fullscreenElement||(this.isFullscreen=!1,this.isPaused||Browser.setWindowedCanvasSize(),this.changeDetectorRef.detectChanges())})}}return e.\u0275fac=function(n){return new(n||e)(ne(bn),ne(di))},e.\u0275cmp=ri({type:e,selectors:[["ngx-hud"]],viewQuery:function(n,r){if(1&n&&el(Dw,5),2&n){let i;Ja(i=tl())&&(r.rangeSliderComponent=i.first)}},inputs:{canvas:"canvas",core:"core",romName:"romName",mainConfig:"mainConfig",playerConfig:"playerConfig"},decls:3,vars:5,consts:[[1,"hud-wrapper",3,"ngStyle"],["class","isPaused",4,"ngIf"],["class","bottom",3,"mouseenter","mouseleave",4,"ngIf"],[1,"isPaused"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px",3,"click"],["d","M0 0h24v24H0z","fill","none"],["d","M6 19h4V5H6v14zm8-14v14h4V5h-4z"],[1,"bottom",3,"mouseenter","mouseleave"],[1,"left"],[1,"btn",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px"],["d","M0 0v24h24V0H0zm23 16c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V8c0-1.1.9-2 2-2h18c1.1 0 2 .9 2 2v8z","fill","none"],["d","M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-10 7H8v3H6v-3H3v-2h3V8h2v3h3v2zm4.5 2c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4-3c-.83 0-1.5-.67-1.5-1.5S18.67 9 19.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"],["d","M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"],["d","M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"],["d","M7.11 8.53L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47zM6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47zm1.01 5.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32zM13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93z"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px",4,"ngIf"],[1,"volume"],["min","0","max","100","step","1",3,"value","inputEvent"],["rangeSliderRef",""],["d","M8 5v14l11-7z"],["d","M7 9v6h4l5 5V4l-5 5H7z"],["d","M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 5V4L9 9H5z"],["d","M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"],["d","M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"],["d","M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"]],template:function(n,r){1&n&&(O(0,"div",0),dt(1,eV,4,0,"div",1),dt(2,lV,32,10,"div",2),x()),2&n&&(Pe("ngStyle",Cu(3,uV,r.isMouseMoving?"default":"none")),G(1),Pe("ngIf",r.isPaused),G(1),Pe("ngIf",r.isMouseMoving))},directives:[kE,Qu,Dw],styles:[".hud-wrapper{width:100%;height:100%;overflow:hidden;position:relative}.hud-wrapper .isPaused{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.452)}.hud-wrapper .isPaused svg{fill:#fff;width:80px;height:80px;cursor:pointer;animation:flickerAnimation 2s infinite}.hud-wrapper .bottom{display:flex;align-items:center;position:absolute;bottom:0;width:100%;height:50px;box-shadow:inset 0 -39px 36px -23px #000000d4;transition:all .2s ease-in-out}.hud-wrapper .bottom div.left{flex-grow:1}.hud-wrapper .bottom div.left .volume{align-items:center;display:inline-flex}.hud-wrapper .bottom button.btn{color:#fff;fill:#fff;filter:drop-shadow(2px 2px 1px #000);align-items:center;margin:0 5px;cursor:pointer;background:none;border:none}.hud-wrapper .bottom button.btn svg{width:30px;height:30px}.hud-wrapper .bottom button.btn:hover{fill:#9c6bff}@keyframes flickerAnimation{0%{opacity:1}50%{opacity:0}to{opacity:1}}\n"],encapsulation:3,data:{animation:[h5({duration:200}),g5({duration:200})]}}),e})(),_V=(()=>{class e{constructor(){}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=ri({type:e,selectors:[["ngx-loading-bars"]],decls:6,vars:0,consts:[["id","loader"]],template:function(n,r){1&n&&(O(0,"div",0),ie(1,"span"),ie(2,"span"),ie(3,"span"),ie(4,"span"),ie(5,"span"),x())},styles:["#loader{display:block;position:absolute;top:50%;left:50%;height:50px;width:50px;margin:-25px 0 0 -25px}#loader span{position:absolute;display:block;bottom:10px;width:9px;height:5px;background:rgba(0,0,0,.25);animation:loader 1.5s infinite ease-in-out}#loader span:nth-child(2){left:11px;animation-delay:.2s}#loader span:nth-child(3){left:22px;animation-delay:.4s}#loader span:nth-child(4){left:33px;animation-delay:.6s}#loader span:nth-child(5){left:44px;animation-delay:.8s}@keyframes loader{0%{height:5px;transform:translateY(0);background:rgba(0,0,0,.25)}25%{height:30px;transform:translateY(15px);background:#7b37ff}50%{height:5px;transform:translateY(0);background:rgba(0,0,0,.25)}to{height:5px;transform:translateY(0);background:rgba(0,0,0,.25)}}\n"],encapsulation:3}),e})(),vV=(()=>{class e{constructor(){this.playEvent=new vt}onClickPlay(){this.playEvent.emit()}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=ri({type:e,selectors:[["ngx-play-btn"]],outputs:{playEvent:"playEvent"},decls:10,vars:3,consts:[["type","button",1,"playBtn",3,"click"],["width","66px","height","43px","viewBox","0 0 66 43","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink"],["id","arrow","stroke","none","stroke-width","1","fill","none","fill-rule","evenodd"],["d","M40.1543933,3.89485454 L43.9763149,0.139296592 C44.1708311,-0.0518420739 44.4826329,-0.0518571125 44.6771675,0.139262789 L65.6916134,20.7848311 C66.0855801,21.1718824 66.0911863,21.8050225 65.704135,22.1989893 C65.7000188,22.2031791 65.6958657,22.2073326 65.6916762,22.2114492 L44.677098,42.8607841 C44.4825957,43.0519059 44.1708242,43.0519358 43.9762853,42.8608513 L40.1545186,39.1069479 C39.9575152,38.9134427 39.9546793,38.5968729 40.1481845,38.3998695 C40.1502893,38.3977268 40.1524132,38.395603 40.1545562,38.3934985 L56.9937789,21.8567812 C57.1908028,21.6632968 57.193672,21.3467273 57.0001876,21.1497035 C56.9980647,21.1475418 56.9959223,21.1453995 56.9937605,21.1432767 L40.1545208,4.60825197 C39.9574869,4.41477773 39.9546013,4.09820839 40.1480756,3.90117456 C40.1501626,3.89904911 40.1522686,3.89694235 40.1543933,3.89485454 Z","fill","#FFFFFF",1,"one"],["d","M20.1543933,3.89485454 L23.9763149,0.139296592 C24.1708311,-0.0518420739 24.4826329,-0.0518571125 24.6771675,0.139262789 L45.6916134,20.7848311 C46.0855801,21.1718824 46.0911863,21.8050225 45.704135,22.1989893 C45.7000188,22.2031791 45.6958657,22.2073326 45.6916762,22.2114492 L24.677098,42.8607841 C24.4825957,43.0519059 24.1708242,43.0519358 23.9762853,42.8608513 L20.1545186,39.1069479 C19.9575152,38.9134427 19.9546793,38.5968729 20.1481845,38.3998695 C20.1502893,38.3977268 20.1524132,38.395603 20.1545562,38.3934985 L36.9937789,21.8567812 C37.1908028,21.6632968 37.193672,21.3467273 37.0001876,21.1497035 C36.9980647,21.1475418 36.9959223,21.1453995 36.9937605,21.1432767 L20.1545208,4.60825197 C19.9574869,4.41477773 19.9546013,4.09820839 20.1480756,3.90117456 C20.1501626,3.89904911 20.1522686,3.89694235 20.1543933,3.89485454 Z","fill","#FFFFFF",1,"two"],["d","M0.154393339,3.89485454 L3.97631488,0.139296592 C4.17083111,-0.0518420739 4.48263286,-0.0518571125 4.67716753,0.139262789 L25.6916134,20.7848311 C26.0855801,21.1718824 26.0911863,21.8050225 25.704135,22.1989893 C25.7000188,22.2031791 25.6958657,22.2073326 25.6916762,22.2114492 L4.67709797,42.8607841 C4.48259567,43.0519059 4.17082418,43.0519358 3.97628526,42.8608513 L0.154518591,39.1069479 C-0.0424848215,38.9134427 -0.0453206733,38.5968729 0.148184538,38.3998695 C0.150289256,38.3977268 0.152413239,38.395603 0.154556228,38.3934985 L16.9937789,21.8567812 C17.1908028,21.6632968 17.193672,21.3467273 17.0001876,21.1497035 C16.9980647,21.1475418 16.9959223,21.1453995 16.9937605,21.1432767 L0.15452076,4.60825197 C-0.0425130651,4.41477773 -0.0453986756,4.09820839 0.148075568,3.90117456 C0.150162624,3.89904911 0.152268631,3.89694235 0.154393339,3.89485454 Z","fill","#FFFFFF",1,"three"]],template:function(n,r){1&n&&(O(0,"button",0),Me("click",function(){return r.onClickPlay()}),O(1,"span"),me(2),gt(3,"translate"),x(),O(4,"span"),It(),O(5,"svg",1),O(6,"g",2),ie(7,"path",3),ie(8,"path",4),ie(9,"path",5),x(),x(),x(),x()),2&n&&(G(2),Ue(St(3,1,"PLAY")))},pipes:[dg],styles:[".playBtn{font-weight:bold;text-transform:uppercase;border:2px solid rgba(255,255,255,.15);cursor:pointer;padding:10px 10px 10px 45px;font-size:40px;color:#fff;background:#7b37ff;transition:1s;box-shadow:6px 6px #1b1e3d;transform:skew(-15deg)}.playBtn span:nth-child(2){transition:.5s;margin-right:0;width:20px;margin-left:30px;position:relative;top:12%;transform:skew(15deg)}.playBtn span:nth-child(2) svg{vertical-align:top}.playBtn span:nth-child(2) svg path.one{transition:.4s;transform:translate(-60%)}.playBtn span:nth-child(2) svg path.two{transition:.5s;transform:translate(-30%)}.playBtn:hover{transition:.5s;box-shadow:10px 10px #421e8a}.playBtn:hover span:nth-child(2){transition:.5s;margin-right:45px}.playBtn:hover span:nth-child(2) svg path.one{transform:translate(0);animation:colorAnim 1s infinite .6s}.playBtn:hover span:nth-child(2) svg path.two{transform:translate(0);animation:colorAnim 1s infinite .4s}.playBtn:hover span:nth-child(2) svg path.three{animation:colorAnim 1s infinite .2s}@keyframes colorAnim{0%{fill:#fff}50%{fill:#ffffff26}to{fill:#fff}}\n"],encapsulation:3}),e})();const EV=fk.forRoot();let bV=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=ii({type:e}),e.\u0275inj=tn({imports:[[UE,f5,EV]]}),e})(),DV=(()=>{class e{constructor(n){this.injector=n}ngDoBootstrap(){const n=function(e,t){const n=function(e,t){return t.get(ci).resolveComponentFactory(e).inputs}(e,t.injector),r=t.strategyFactory||new X2(e,t.injector),i=function(e){const t={};return e.forEach(({propName:n,templateName:r})=>{t[function(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}(r)]=n}),t}(n);class s extends ek{constructor(a){super(),this.injector=a}get ngElementStrategy(){if(!this._ngElementStrategy){const a=this._ngElementStrategy=r.create(this.injector||t.injector);n.forEach(({propName:l})=>{if(!this.hasOwnProperty(l))return;const u=this[l];delete this[l],a.setInputValue(l,u)})}return this._ngElementStrategy}attributeChangedCallback(a,l,u,c){this.ngElementStrategy.setInputValue(i[a],u)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{const l=function(e,t,n){if("function"!=typeof CustomEvent){const s=e.createEvent("CustomEvent");return s.initCustomEvent(t,!1,!1,n),s}return new CustomEvent(t,{bubbles:!1,cancelable:!1,detail:n})}(this.ownerDocument,a.name,a.value);this.dispatchEvent(l)})}}return s.observedAttributes=Object.keys(i),n.forEach(({propName:o})=>{Object.defineProperty(s.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(a){this.ngElementStrategy.setInputValue(o,a)},configurable:!0,enumerable:!0})}),s}(hV,{injector:this.injector});customElements.define("ngx-retroarch",n)}}return e.\u0275fac=function(n){return new(n||e)(te(ze))},e.\u0275mod=ii({type:e}),e.\u0275inj=tn({imports:[[eg,bV]]}),e})();(function(){if(Hv)throw new Error("Cannot enable prod mode after platform setup.");$v=!1})(),v2().bootstrapModule(DV,{ngZone:"noop"}).catch(e=>console.error(e))},714:cr=>{function xn(Wn){return Promise.resolve().then(()=>{var Mn=new Error("Cannot find module '"+Wn+"'");throw Mn.code="MODULE_NOT_FOUND",Mn})}xn.keys=()=>[],xn.resolve=xn,xn.id=714,cr.exports=xn}},cr=>{cr(cr.s=955)}]); \ No newline at end of file diff --git a/node_modules/@nicolasroehm/ngx-retroarch/package.json b/node_modules/@nicolasroehm/ngx-retroarch/package.json new file mode 100644 index 00000000..4b09ceb5 --- /dev/null +++ b/node_modules/@nicolasroehm/ngx-retroarch/package.json @@ -0,0 +1,25 @@ +{ + "name": "@nicolasroehm/ngx-retroarch", + "version": "1.0.4", + "description": "RetroArch web component", + "main": "elements.js", + "scripts": { + }, + "repository": { + "type": "git", + "url": "git+https://github.com/NicolasRoehm/ngx-retroarch.git" + }, + "private": false, + "keywords": [ + "retroarch", + "web-component", + "ngx", + "angular", + "typescript", + "javascript" + ], + "author": "Nicolas Roehm", + "license": "MIT", + "homepage": "https://github.com/NicolasRoehm/ngx-retroarch#readme", + "files": ["elements.js", "snes9x_libretro.min.js", "snes9x_libretro.wasm"] +} \ No newline at end of file diff --git a/node_modules/@nicolasroehm/ngx-retroarch/snes9x_libretro.min.js b/node_modules/@nicolasroehm/ngx-retroarch/snes9x_libretro.min.js new file mode 100644 index 00000000..7553544e --- /dev/null +++ b/node_modules/@nicolasroehm/ngx-retroarch/snes9x_libretro.min.js @@ -0,0 +1 @@ +var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;var nodeFS;var nodePath;if(ENVIRONMENT_IS_NODE){if(ENVIRONMENT_IS_WORKER){scriptDirectory=require("path").dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=function shell_read(filename,binary){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);return nodeFS["readFileSync"](filename,binary?null:"utf8")};readBinary=function readBinary(filename){var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);quit_=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){var data;if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){arguments_=scriptArgs}else if(typeof arguments!="undefined"){arguments_=arguments}if(typeof quit==="function"){quit_=function(status){quit(status)}}if(typeof print!=="undefined"){if(typeof console==="undefined")console={};console.log=print;console.warn=console.error=typeof printErr!=="undefined"?printErr:print}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!=="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=function(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=function(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var STACK_ALIGN=16;function alignMemory(size,factor){if(!factor)factor=STACK_ALIGN;return Math.ceil(size/factor)*factor}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var getTempRet0=function(){return tempRet0};var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||false;if(typeof WebAssembly!=="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heap,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heap[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}function allocateUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8Array(str,HEAP8,ret,size);return ret}function allocateUTF8OnStack(str){var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8Array(str,HEAP8,ret,size);return ret}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||268435456;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;__ATINIT__.push({func:function(){___wasm_call_ctors()}});function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();TTY.init();callRuntimeCallbacks(__ATINIT__)}function preMain(){FS.ignorePermissions=false;callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);FS.quit();TTY.shutdown();runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what+="";err(what);ABORT=true;EXITSTATUS=1;what="abort("+what+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(what);throw e}function hasPrefix(str,prefix){return String.prototype.startsWith?str.startsWith(prefix):str.indexOf(prefix)===0}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return hasPrefix(filename,dataURIPrefix)}var fileURIPrefix="file://";function isFileURI(filename){return hasPrefix(filename,fileURIPrefix)}var wasmBinaryFile="snes9x_libretro.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch==="function"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(wasmBinaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["ef"];updateGlobalBufferAndViews(wasmMemory.buffer);wasmTable=Module["asm"]["jf"];removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiatedSource(output){receiveInstance(output["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiatedSource)})})}else{return instantiateArrayBuffer(receiveInstantiatedSource)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}instantiateAsync();return{}}var tempDouble;var tempI64;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback(Module);continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){wasmTable.get(func)()}else{wasmTable.get(func)(callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(typeof setImmediate==="undefined"){var setImmediates=[];var emscriptenMainLoopMessageId="setimmediate";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module["setImmediates"]===undefined)Module["setImmediates"]=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0}var _emscripten_get_now;if(ENVIRONMENT_IS_NODE){_emscripten_get_now=function(){var t=process["hrtime"]();return t[0]*1e3+t[1]/1e6}}else if(typeof dateNow!=="undefined"){_emscripten_get_now=dateNow}else _emscripten_get_now=function(){return performance.now()};function setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg,noSetTiming){noExitRuntime=true;assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func=browserIterationFunc;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}console.log('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();if(thisMainLoopId1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}GL.newRenderingFrameStarted();Browser.mainLoop.runIter(browserIterationFunc);if(thisMainLoopId0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"unwind"}}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;setMainLoop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||function(){};canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",function(ev){if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!=="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;var canvas=Module["canvas"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullscreen);if(Module["onFullscreen"])Module["onFullscreen"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?function(){canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null)||(canvasContainer["webkitRequestFullScreen"]?function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null);canvasContainer.requestFullscreen()},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function(func){if(typeof requestAnimationFrame==="function"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;RAF(func)},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){if(ABORT)return;func()})},safeSetTimeout:function(func,timeout){noExitRuntime=true;return setTimeout(function(){if(ABORT)return;func()},timeout)},getMimetype:function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)},getMovementX:function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY:function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},asyncLoad:function(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency("al "+url):"";readAsync(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)},resizeListeners:[],updateResizeListeners:function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h>2];rightBuffer[RA.bufOffset]=HEAPF32[buf+(count*8+4)>>2];RA.bufOffset++;count++;samples--}return count},queueAudio:function(){var index=RA.bufIndex;var startTime;if(RA.bufIndex)startTime=RA.buffers[RA.bufIndex-1].endTime;else startTime=RA.context.currentTime;RA.buffers[index].endTime=startTime+RA.buffers[index].duration;const bufferSource=RA.context.createBufferSource();bufferSource.buffer=RA.buffers[index];bufferSource.connect(RA.context.destination);bufferSource.start(startTime);RA.bufIndex++;RA.bufOffset=0},block:function(){do{RA.process()}while(RA.bufIndex===RA.numBuffers)}};function _RWebAudioBufferSize(){return RA.numBuffers*RA.BUFFER_SIZE*8}function _RWebAudioFree(){RA.bufIndex=0;RA.bufOffset=0}function _RWebAudioInit(latency){var ac=window["AudioContext"]||window["webkitAudioContext"];if(!ac)return 0;RA.context=new ac;RA.numBuffers=latency*RA.context.sampleRate/(1e3*RA.BUFFER_SIZE)|0;if(RA.numBuffers<2)RA.numBuffers=2;for(var i=0;i>1;var quadIndexes=new Uint16Array(numIndexes);var i=0,v=0;while(1){quadIndexes[i++]=v;if(i>=numIndexes)break;quadIndexes[i++]=v+1;if(i>=numIndexes)break;quadIndexes[i++]=v+2;if(i>=numIndexes)break;quadIndexes[i++]=v;if(i>=numIndexes)break;quadIndexes[i++]=v+2;if(i>=numIndexes)break;quadIndexes[i++]=v+3;if(i>=numIndexes)break;v+=4}context.GLctx.bufferData(34963,quadIndexes,35044);context.GLctx.bindBuffer(34963,null)}},getTempVertexBuffer:function getTempVertexBuffer(sizeBytes){var idx=GL.log2ceilLookup(sizeBytes);var ringbuffer=GL.currentContext.tempVertexBuffers1[idx];var nextFreeBufferIndex=GL.currentContext.tempVertexBufferCounters1[idx];GL.currentContext.tempVertexBufferCounters1[idx]=GL.currentContext.tempVertexBufferCounters1[idx]+1&GL.numTempVertexBuffersPerSize-1;var vbo=ringbuffer[nextFreeBufferIndex];if(vbo){return vbo}var prevVBO=GLctx.getParameter(34964);ringbuffer[nextFreeBufferIndex]=GLctx.createBuffer();GLctx.bindBuffer(34962,ringbuffer[nextFreeBufferIndex]);GLctx.bufferData(34962,1<>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},calcBufLength:function calcBufLength(size,type,stride,count){if(stride>0){return count*stride}var typeSize=GL.byteSizeByType[type-GL.byteSizeByTypeRoot];return size*typeSize*count},usedTempBuffers:[],preDrawHandleClientVertexAttribBindings:function preDrawHandleClientVertexAttribBindings(count){GL.resetBufferBinding=false;for(var i=0;i>2]=num;HEAPU32[ptr+4>>2]=(num-HEAPU32[ptr>>2])/4294967296}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=0&&type!=1){GL.recordError(1280)}return;case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case"number":ret=result;break;case"boolean":ret=result?1:0;break;case"string":GL.recordError(1280);return;case"object":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i>2]=result[i];break;case 2:HEAPF32[p+i*4>>2]=result[i];break;case 4:HEAP8[p+i>>0]=result[i]?1:0;break}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Unknown object returned from WebGL getParameter("+name_+")! (error: "+e+")");return}}break;default:GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Native code calling glGet"+type+"v("+name_+") and it returns "+result+" of type "+typeof result+"!");return}}switch(type){case 1:writeI53ToI64(p,ret);break;case 0:HEAP32[p>>2]=ret;break;case 2:HEAPF32[p>>2]=ret;break;case 4:HEAP8[p>>0]=ret?1:0;break}}function _glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function _RWebCamPoll(data,frame_raw_cb,frame_gl_cb){if(!RWC.ready(data))return 0;var ret=0;if(RWC.contexts[data].glTexId!==0&&frame_gl_cb!==0){_glGetIntegerv(32873,RWC.tmp);var prev=HEAP32[RWC.tmp>>2];_glBindTexture(3553,RWC.contexts[data].glTexId);if(RWC.contexts[data].glFirstFrame){Module.ctx.texImage2D(Module.ctx.TEXTURE_2D,0,Module.ctx.RGB,Module.ctx.RGB,Module.ctx.UNSIGNED_BYTE,RWC.contexts[data].videoElement);RWC.contexts[data].glFirstFrame=false}else{Module.ctx.texSubImage2D(Module.ctx.TEXTURE_2D,0,0,0,Module.ctx.RGB,Module.ctx.UNSIGNED_BYTE,RWC.contexts[data].videoElement)}_glBindTexture(3553,prev);Runtime.dynCall("viii",frame_gl_cb,[RWC.contexts[data].glTexId,3553,0]);ret=1}if(RWC.contexts[data].rawFbCanvas&&frame_raw_cb!==0){if(!RWC.contexts[data].rawFbCanvasCtx){RWC.contexts[data].rawFbCanvas.width=RWC.contexts[data].videoElement.videoWidth;RWC.contexts[data].rawFbCanvas.height=RWC.contexts[data].videoElement.videoHeight;RWC.contexts[data].rawFbCanvasCtx=RWC.contexts[data].rawFbCanvas.getContext("2d");RWC.contexts[data].rawBuffer=_malloc(RWC.contexts[data].videoElement.videoWidth*RWC.contexts[data].videoElement.videoHeight*4)}RWC.contexts[data].rawFbCanvasCtx.drawImage(RWC.contexts[data].videoElement,0,0,RWC.contexts[data].rawFbCanvas.width,RWC.contexts[data].rawFbCanvas.height);var image=RWC.contexts[data].rawFbCanvasCtx.getImageData(0,0,RWC.contexts[data].videoElement.videoWidth,RWC.contexts[data].videoElement.videoHeight);Module.HEAPU8.set(image.data,RWC.contexts[data].rawBuffer);Runtime.dynCall("viiii",frame_raw_cb,[RWC.contexts[data].rawBuffer,RWC.contexts[data].videoElement.videoWidth,RWC.contexts[data].videoElement.videoHeight,RWC.contexts[data].videoElement.videoWidth*4]);ret=1}return ret}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i>2]=id}}function _glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _RWebCamStart(data){var ret=0;if(RWC.contexts[data].glTex){_glGenTextures(1,RWC.tmp);RWC.contexts[data].glTexId=HEAP32[RWC.tmp>>2];if(RWC.contexts[data].glTexId!==0){_glGetIntegerv(32873,RWC.tmp);var prev=HEAP32[RWC.tmp>>2];_glBindTexture(3553,RWC.contexts[data].glTexId);_glTexParameteri(3553,10240,9729);_glTexParameteri(3553,10241,9729);_glTexParameteri(3553,10242,33071);_glTexParameteri(3553,10243,33071);_glBindTexture(3553,prev);RWC.contexts[data].glFirstFrame=true;ret=1}}if(RWC.contexts[data].rawFb){RWC.contexts[data].rawFbCanvas=document.createElement("canvas");RWC.contexts[data].rawFbCanvas.classList.add("retroarchWebcamCanvas");ret=1}return ret}function _glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _RWebCamStop(data){if(RWC.contexts[data].glTexId){_glDeleteTextures(1,RWC.contexts[data].glTexId)}if(RWC.contexts[data].rawFbCanvas){if(RWC.contexts[data].rawBuffer){_free(RWC.contexts[data].rawBuffer);RWC.contexts[data].rawBuffer=0;RWC.contexts[data].rawFbCanvasCtx=null}RWC.contexts[data].rawFbCanvas=null}}function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}function _atexit(func,arg){__ATEXIT__.unshift({func:func,arg:arg})}function ___cxa_atexit(a0,a1){return _atexit(a0,a1)}function _tzset(){if(_tzset.called)return;_tzset.called=true;var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAP32[__get_timezone()>>2]=stdTimezoneOffset*60;HEAP32[__get_daylight()>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocateUTF8(winterName);var summerNamePtr=allocateUTF8(summerName);if(summerOffset>2]=winterNamePtr;HEAP32[__get_tzname()+4>>2]=summerNamePtr}else{HEAP32[__get_tzname()>>2]=summerNamePtr;HEAP32[__get_tzname()+4>>2]=winterNamePtr}}function _localtime_r(time,tmPtr){_tzset();var date=new Date(HEAP32[time>>2]*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var start=new Date(date.getFullYear(),0,1);var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst;var zonePtr=HEAP32[__get_tzname()+(dst?4:0)>>2];HEAP32[tmPtr+40>>2]=zonePtr;return tmPtr}function ___localtime_r(a0,a1){return _localtime_r(a0,a1)}function setErrNo(value){HEAP32[___errno_location()>>2]=value;return value}var PATH={splitPath:function(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:function(path){if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))},join2:function(l,r){return PATH.normalize(l+"/"+r)}};function getRandomDevice(){if(typeof crypto==="object"&&typeof crypto["getRandomValues"]==="function"){var randomBuffer=new Uint8Array(1);return function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0]}}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");return function(){return crypto_module["randomBytes"](1)[0]}}catch(e){}}return function(){abort("randomDevice")}}var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:function(from,to){from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function mmapAlloc(size){var alignedSize=alignMemory(size,16384);var ptr=_malloc(alignedSize);while(size=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr:function(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr:function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup:function(parent,name){throw FS.genericErrors[44]},mknod:function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink:function(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir:function(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink:function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length8){throw new FS.ErrnoError(32)}var parts=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}},hashName:function(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:function(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:function(parent,name,mode,rdev){var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:function(node){FS.hashRemoveNode(node)},isRoot:function(node){return node===node.parent},isMountpoint:function(node){return!!node.mounted},isFile:function(mode){return(mode&61440)===32768},isDir:function(mode){return(mode&61440)===16384},isLink:function(mode){return(mode&61440)===40960},isChrdev:function(mode){return(mode&61440)===8192},isBlkdev:function(mode){return(mode&61440)===24576},isFIFO:function(mode){return(mode&61440)===4096},isSocket:function(mode){return(mode&49152)===49152},flagModes:{"r":0,"r+":2,"w":577,"w+":578,"a":1089,"a+":1090},modeStringToFlags:function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},flagsToPermissionString:function(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return 2}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return 2}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return 2}return 0},mayLookup:function(dir){var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:function(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen:function(node,flags){if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:function(fd){return FS.streams[fd]},createStream:function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){};FS.FSStream.prototype={object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}}}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:function(fd){FS.streams[fd]=null},chrdev_stream_ops:{open:function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:function(){throw new FS.ErrnoError(70)}},major:function(dev){return dev>>8},minor:function(dev){return dev&255},makedev:function(ma,mi){return ma<<8|mi},registerDevice:function(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:function(dev){return FS.devices[dev]},getMounts:function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:function(parent,name){return parent.node_ops.lookup(parent,name)},mknod:function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create:function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:function(path,mode){var dirs=path.split("/");var d="";for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}};var lazyArray=this;lazyArray.setDataGetter(function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){FS.forceLoadFile(node);var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;HEAP32[buf+56>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+76>>2]=0;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+80>>2]=tempI64[0],HEAP32[buf+84>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags,offset){var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},doMkdir:function(path,mode){path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0},doMknod:function(path,mode,dev){switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}FS.mknod(path,mode,dev);return 0},doReadlink:function(path,buf,bufsize){if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len},doAccess:function(path,amode){if(amode&~7){return-28}var node;var lookup=FS.lookupPath(path,{follow:true});node=lookup.node;if(!node){return-44}var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-2}return 0},doDup:function(path,flags,suggestFD){var suggest=FS.getStream(suggestFD);if(suggest)FS.close(suggest);return FS.open(path,flags,0,suggestFD,suggestFD).fd},doReadv:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream},get64:function(low,high){return low}};function ___sys_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.open(stream.path,stream.flags,0,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 12:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_fstat64(fd,buf){try{var stream=SYSCALLS.getStreamFromFD(fd);return SYSCALLS.doStat(FS.stat,stream.path,buf)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_ftruncate64(fd,zero,low,high){try{var length=SYSCALLS.get64(low,high);FS.ftruncate(fd,length);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_getcwd(buf,size){try{if(size===0)return-28;var cwd=FS.cwd();var cwdLengthInBytes=lengthBytesUTF8(cwd);if(size>>0,(tempDouble=id,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos>>2]=tempI64[0],HEAP32[dirp+pos+4>>2]=tempI64[1];tempI64=[(idx+1)*struct_size>>>0,(tempDouble=(idx+1)*struct_size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos+8>>2]=tempI64[0],HEAP32[dirp+pos+12>>2]=tempI64[1];HEAP16[dirp+pos+16>>1]=280;HEAP8[dirp+pos+18>>0]=type;stringToUTF8(name,dirp+pos+19,256);pos+=struct_size;idx+=1}FS.llseek(stream,idx*struct_size,0);return pos}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_getpid(){return 42}function ___sys_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:abort("bad ioctl syscall "+op)}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_mkdir(path,mode){try{path=SYSCALLS.getStr(path);return SYSCALLS.doMkdir(path,mode)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_open(path,flags,varargs){SYSCALLS.varargs=varargs;try{var pathname=SYSCALLS.getStr(path);var mode=varargs?SYSCALLS.get():0;var stream=FS.open(pathname,flags,mode);return stream.fd}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_readlink(path,buf,bufsize){try{path=SYSCALLS.getStr(path);return SYSCALLS.doReadlink(path,buf,bufsize)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_rename(old_path,new_path){try{old_path=SYSCALLS.getStr(old_path);new_path=SYSCALLS.getStr(new_path);FS.rename(old_path,new_path);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_rmdir(path){try{path=SYSCALLS.getStr(path);FS.rmdir(path);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_unlink(path){try{path=SYSCALLS.getStr(path);FS.unlink(path);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _abort(){abort()}var _emscripten_get_now_is_monotonic=true;function _clock_gettime(clk_id,tp){var now;if(clk_id===0){now=Date.now()}else if((clk_id===1||clk_id===4)&&_emscripten_get_now_is_monotonic){now=_emscripten_get_now()}else{setErrNo(28);return-1}HEAP32[tp>>2]=now/1e3|0;HEAP32[tp+4>>2]=now%1e3*1e3*1e3|0;return 0}var ERRNO_CODES={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};function _dummyErrnoCodes(){if(!ERRNO_CODES){console.error("ERRNO_CODES not imported!")}}var EGL={errorCode:12288,defaultDisplayInitialized:false,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:false,depth:false,stencil:false,antialias:false},stringCache:{},setErrorCode:function(code){EGL.errorCode=code},chooseConfig:function(display,attribList,config,config_size,numConfigs){if(display!=62e3){EGL.setErrorCode(12296);return 0}if(attribList){for(;;){var param=HEAP32[attribList>>2];if(param==12321){var alphaSize=HEAP32[attribList+4>>2];EGL.contextAttributes.alpha=alphaSize>0}else if(param==12325){var depthSize=HEAP32[attribList+4>>2];EGL.contextAttributes.depth=depthSize>0}else if(param==12326){var stencilSize=HEAP32[attribList+4>>2];EGL.contextAttributes.stencil=stencilSize>0}else if(param==12337){var samples=HEAP32[attribList+4>>2];EGL.contextAttributes.antialias=samples>0}else if(param==12338){var samples=HEAP32[attribList+4>>2];EGL.contextAttributes.antialias=samples==1}else if(param==12544){var requestedPriority=HEAP32[attribList+4>>2];EGL.contextAttributes.lowLatency=requestedPriority!=12547}else if(param==12344){break}attribList+=8}}if((!config||!config_size)&&!numConfigs){EGL.setErrorCode(12300);return 0}if(numConfigs){HEAP32[numConfigs>>2]=1}if(config&&config_size>0){HEAP32[config>>2]=62002}EGL.setErrorCode(12288);return 1}};function _eglBindAPI(api){if(api==12448){EGL.setErrorCode(12288);return 1}else{EGL.setErrorCode(12300);return 0}}function _eglChooseConfig(display,attrib_list,configs,config_size,numConfigs){return EGL.chooseConfig(display,attrib_list,configs,config_size,numConfigs)}function _eglCreateContext(display,config,hmm,contextAttribs){if(display!=62e3){EGL.setErrorCode(12296);return 0}var glesContextVersion=1;for(;;){var param=HEAP32[contextAttribs>>2];if(param==12440){glesContextVersion=HEAP32[contextAttribs+4>>2]}else if(param==12344){break}else{EGL.setErrorCode(12292);return 0}contextAttribs+=8}if(glesContextVersion!=2){EGL.setErrorCode(12293);return 0}EGL.contextAttributes.majorVersion=glesContextVersion-1;EGL.contextAttributes.minorVersion=0;EGL.context=GL.createContext(Module["canvas"],EGL.contextAttributes);if(EGL.context!=0){EGL.setErrorCode(12288);GL.makeContextCurrent(EGL.context);Module.useWebGL=true;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});GL.makeContextCurrent(null);return 62004}else{EGL.setErrorCode(12297);return 0}}function _eglCreateWindowSurface(display,config,win,attrib_list){if(display!=62e3){EGL.setErrorCode(12296);return 0}if(config!=62002){EGL.setErrorCode(12293);return 0}EGL.setErrorCode(12288);return 62006}function _eglDestroyContext(display,context){if(display!=62e3){EGL.setErrorCode(12296);return 0}if(context!=62004){EGL.setErrorCode(12294);return 0}GL.deleteContext(EGL.context);EGL.setErrorCode(12288);if(EGL.currentContext==context){EGL.currentContext=0}return 1}function _eglDestroySurface(display,surface){if(display!=62e3){EGL.setErrorCode(12296);return 0}if(surface!=62006){EGL.setErrorCode(12301);return 1}if(EGL.currentReadSurface==surface){EGL.currentReadSurface=0}if(EGL.currentDrawSurface==surface){EGL.currentDrawSurface=0}EGL.setErrorCode(12288);return 1}function _eglGetConfigs(display,configs,config_size,numConfigs){return EGL.chooseConfig(display,0,configs,config_size,numConfigs)}function _eglGetCurrentContext(){return EGL.currentContext}function _eglGetDisplay(nativeDisplayType){EGL.setErrorCode(12288);return 62e3}function _eglGetError(){return EGL.errorCode}function _eglInitialize(display,majorVersion,minorVersion){if(display==62e3){if(majorVersion){HEAP32[majorVersion>>2]=1}if(minorVersion){HEAP32[minorVersion>>2]=4}EGL.defaultDisplayInitialized=true;EGL.setErrorCode(12288);return 1}else{EGL.setErrorCode(12296);return 0}}function _eglMakeCurrent(display,draw,read,context){if(display!=62e3){EGL.setErrorCode(12296);return 0}if(context!=0&&context!=62004){EGL.setErrorCode(12294);return 0}if(read!=0&&read!=62006||draw!=0&&draw!=62006){EGL.setErrorCode(12301);return 0}GL.makeContextCurrent(context?EGL.context:null);EGL.currentContext=context;EGL.currentDrawSurface=draw;EGL.currentReadSurface=read;EGL.setErrorCode(12288);return 1}function _eglQuerySurface(display,surface,attribute,value){if(display!=62e3){EGL.setErrorCode(12296);return 0}if(surface!=62006){EGL.setErrorCode(12301);return 0}if(!value){EGL.setErrorCode(12300);return 0}EGL.setErrorCode(12288);switch(attribute){case 12328:HEAP32[value>>2]=62002;return 1;case 12376:return 1;case 12375:HEAP32[value>>2]=Module["canvas"].width;return 1;case 12374:HEAP32[value>>2]=Module["canvas"].height;return 1;case 12432:HEAP32[value>>2]=-1;return 1;case 12433:HEAP32[value>>2]=-1;return 1;case 12434:HEAP32[value>>2]=-1;return 1;case 12422:HEAP32[value>>2]=12420;return 1;case 12441:HEAP32[value>>2]=12442;return 1;case 12435:HEAP32[value>>2]=12437;return 1;case 12416:case 12417:case 12418:case 12419:return 1;default:EGL.setErrorCode(12292);return 0}}function _eglSwapBuffers(){if(!EGL.defaultDisplayInitialized){EGL.setErrorCode(12289)}else if(!Module.ctx){EGL.setErrorCode(12290)}else if(Module.ctx.isContextLost()){EGL.setErrorCode(12302)}else{EGL.setErrorCode(12288);return 1}return 0}function _eglTerminate(display){if(display!=62e3){EGL.setErrorCode(12296);return 0}EGL.currentContext=0;EGL.currentReadSurface=0;EGL.currentDrawSurface=0;EGL.defaultDisplayInitialized=false;EGL.setErrorCode(12288);return 1}var JSEvents={inEventHandler:0,removeAllEventListeners:function(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall:function(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence2?UTF8ToString(cString):cString}var specialHTMLTargets=[0,typeof document!=="undefined"?document:0,typeof window!=="undefined"?window:0];function findEventTarget(target){target=maybeCStringToJsString(target);var domElement=specialHTMLTargets[target]||(typeof document!=="undefined"?document.querySelector(target):undefined);return domElement}function findCanvasEventTarget(target){return findEventTarget(target)}function _emscripten_get_canvas_element_size(target,width,height){var canvas=findCanvasEventTarget(target);if(!canvas)return-4;HEAP32[width>>2]=canvas.width;HEAP32[height>>2]=canvas.height}function fillFullscreenChangeEventData(eventStruct){var fullscreenElement=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;var isFullscreen=!!fullscreenElement;HEAP32[eventStruct>>2]=isFullscreen;HEAP32[eventStruct+4>>2]=JSEvents.fullscreenEnabled();var reportedElement=isFullscreen?fullscreenElement:JSEvents.previousFullscreenElement;var nodeName=JSEvents.getNodeNameForTarget(reportedElement);var id=reportedElement&&reportedElement.id?reportedElement.id:"";stringToUTF8(nodeName,eventStruct+8,128);stringToUTF8(id,eventStruct+136,128);HEAP32[eventStruct+264>>2]=reportedElement?reportedElement.clientWidth:0;HEAP32[eventStruct+268>>2]=reportedElement?reportedElement.clientHeight:0;HEAP32[eventStruct+272>>2]=screen.width;HEAP32[eventStruct+276>>2]=screen.height;if(isFullscreen){JSEvents.previousFullscreenElement=fullscreenElement}}function _emscripten_get_fullscreen_status(fullscreenStatus){if(!JSEvents.fullscreenEnabled())return-1;fillFullscreenChangeEventData(fullscreenStatus);return 0}function fillGamepadEventData(eventStruct,e){HEAPF64[eventStruct>>3]=e.timestamp;for(var i=0;i>3]=e.axes[i]}for(var i=0;i>3]=e.buttons[i].value}else{HEAPF64[eventStruct+i*8+528>>3]=e.buttons[i]}}for(var i=0;i>2]=e.buttons[i].pressed}else{HEAP32[eventStruct+i*4+1040>>2]=e.buttons[i]==1}}HEAP32[eventStruct+1296>>2]=e.connected;HEAP32[eventStruct+1300>>2]=e.index;HEAP32[eventStruct+8>>2]=e.axes.length;HEAP32[eventStruct+12>>2]=e.buttons.length;stringToUTF8(e.id,eventStruct+1304,64);stringToUTF8(e.mapping,eventStruct+1368,64)}function _emscripten_get_gamepad_status(index,gamepadState){if(index<0||index>=JSEvents.lastGamepadState.length)return-5;if(!JSEvents.lastGamepadState[index])return-7;fillGamepadEventData(gamepadState,JSEvents.lastGamepadState[index]);return 0}function _emscripten_glActiveTexture(x0){GLctx["activeTexture"](x0)}function _emscripten_glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _emscripten_glBeginQueryEXT(target,id){GLctx.disjointTimerQueryExt["beginQueryEXT"](target,GL.timerQueriesEXT[id])}function _emscripten_glBindAttribLocation(program,index,name){GLctx.bindAttribLocation(GL.programs[program],index,UTF8ToString(name))}function _emscripten_glBindBuffer(target,buffer){if(target==34962){GLctx.currentArrayBufferBinding=buffer}else if(target==34963){GLctx.currentElementArrayBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])}function _emscripten_glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,GL.framebuffers[framebuffer])}function _emscripten_glBindRenderbuffer(target,renderbuffer){GLctx.bindRenderbuffer(target,GL.renderbuffers[renderbuffer])}function _emscripten_glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _emscripten_glBindVertexArrayOES(vao){GLctx["bindVertexArray"](GL.vaos[vao]);var ibo=GLctx.getParameter(34965);GLctx.currentElementArrayBufferBinding=ibo?ibo.name|0:0}function _emscripten_glBlendColor(x0,x1,x2,x3){GLctx["blendColor"](x0,x1,x2,x3)}function _emscripten_glBlendEquation(x0){GLctx["blendEquation"](x0)}function _emscripten_glBlendEquationSeparate(x0,x1){GLctx["blendEquationSeparate"](x0,x1)}function _emscripten_glBlendFunc(x0,x1){GLctx["blendFunc"](x0,x1)}function _emscripten_glBlendFuncSeparate(x0,x1,x2,x3){GLctx["blendFuncSeparate"](x0,x1,x2,x3)}function _emscripten_glBufferData(target,size,data,usage){GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}function _emscripten_glBufferSubData(target,offset,size,data){GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}function _emscripten_glCheckFramebufferStatus(x0){return GLctx["checkFramebufferStatus"](x0)}function _emscripten_glClear(x0){GLctx["clear"](x0)}function _emscripten_glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _emscripten_glClearDepthf(x0){GLctx["clearDepth"](x0)}function _emscripten_glClearStencil(x0){GLctx["clearStencil"](x0)}function _emscripten_glColorMask(red,green,blue,alpha){GLctx.colorMask(!!red,!!green,!!blue,!!alpha)}function _emscripten_glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _emscripten_glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)}function _emscripten_glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data){GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,data?HEAPU8.subarray(data,data+imageSize):null)}function _emscripten_glCopyTexImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx["copyTexImage2D"](x0,x1,x2,x3,x4,x5,x6,x7)}function _emscripten_glCopyTexSubImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx["copyTexSubImage2D"](x0,x1,x2,x3,x4,x5,x6,x7)}function _emscripten_glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;GL.programs[id]=program;return id}function _emscripten_glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _emscripten_glCullFace(x0){GLctx["cullFace"](x0)}function _emscripten_glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentArrayBufferBinding)GLctx.currentArrayBufferBinding=0;if(id==GLctx.currentElementArrayBufferBinding)GLctx.currentElementArrayBufferBinding=0}}function _emscripten_glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _emscripten_glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _emscripten_glDeleteQueriesEXT(n,ids){for(var i=0;i>2];var query=GL.timerQueriesEXT[id];if(!query)continue;GLctx.disjointTimerQueryExt["deleteQueryEXT"](query);GL.timerQueriesEXT[id]=null}}function _emscripten_glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _emscripten_glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _emscripten_glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _emscripten_glDeleteVertexArraysOES(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDepthFunc(x0){GLctx["depthFunc"](x0)}function _emscripten_glDepthMask(flag){GLctx.depthMask(!!flag)}function _emscripten_glDepthRangef(x0,x1){GLctx["depthRange"](x0,x1)}function _emscripten_glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])}function _emscripten_glDisable(x0){GLctx["disable"](x0)}function _emscripten_glDisableVertexAttribArray(index){var cb=GL.currentContext.clientBuffers[index];cb.enabled=false;GLctx.disableVertexAttribArray(index)}function _emscripten_glDrawArrays(mode,first,count){GL.preDrawHandleClientVertexAttribBindings(first+count);GLctx.drawArrays(mode,first,count);GL.postDrawHandleClientVertexAttribBindings()}function _emscripten_glDrawArraysInstancedANGLE(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}var tempFixedLengthArray=[];function _emscripten_glDrawBuffersWEBGL(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawElements(mode,count,type,indices){var buf;if(!GLctx.currentElementArrayBufferBinding){var size=GL.calcBufLength(1,type,0,count);buf=GL.getTempIndexBuffer(size);GLctx.bindBuffer(34963,buf);GLctx.bufferSubData(34963,0,HEAPU8.subarray(indices,indices+size));indices=0}GL.preDrawHandleClientVertexAttribBindings(count);GLctx.drawElements(mode,count,type,indices);GL.postDrawHandleClientVertexAttribBindings(count);if(!GLctx.currentElementArrayBufferBinding){GLctx.bindBuffer(34963,null)}}function _emscripten_glDrawElementsInstancedANGLE(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glEnable(x0){GLctx["enable"](x0)}function _emscripten_glEnableVertexAttribArray(index){var cb=GL.currentContext.clientBuffers[index];cb.enabled=true;GLctx.enableVertexAttribArray(index)}function _emscripten_glEndQueryEXT(target){GLctx.disjointTimerQueryExt["endQueryEXT"](target)}function _emscripten_glFinish(){GLctx["finish"]()}function _emscripten_glFlush(){GLctx["flush"]()}function _emscripten_glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _emscripten_glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _emscripten_glFrontFace(x0){GLctx["frontFace"](x0)}function _emscripten_glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _emscripten_glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _emscripten_glGenQueriesEXT(n,ids){for(var i=0;i>2]=0;return}var id=GL.getNewId(GL.timerQueriesEXT);query.name=id;GL.timerQueriesEXT[id]=query;HEAP32[ids+i*4>>2]=id}}function _emscripten_glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _emscripten_glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _emscripten_glGenVertexArraysOES(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function __glGetActiveAttribOrUniform(funcName,program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx[funcName](program,index);if(info){var numBytesWrittenExclNull=name&&stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull;if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}}function _emscripten_glGetActiveAttrib(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveAttrib",program,index,bufSize,length,size,type,name)}function _emscripten_glGetActiveUniform(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveUniform",program,index,bufSize,length,size,type,name)}function _emscripten_glGetAttachedShaders(program,maxCount,count,shaders){var result=GLctx.getAttachedShaders(GL.programs[program]);var len=result.length;if(len>maxCount){len=maxCount}HEAP32[count>>2]=len;for(var i=0;i>2]=id}}function _emscripten_glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function _emscripten_glGetBooleanv(name_,p){emscriptenWebGLGet(name_,p,4)}function _emscripten_glGetBufferParameteriv(target,value,data){if(!data){GL.recordError(1281);return}HEAP32[data>>2]=GLctx.getBufferParameter(target,value)}function _emscripten_glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function _emscripten_glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,2)}function _emscripten_glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result}function _emscripten_glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function _emscripten_glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _emscripten_glGetQueryObjecti64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}writeI53ToI64(params,ret)}function _emscripten_glGetQueryObjectivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryObjectui64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}writeI53ToI64(params,ret)}function _emscripten_glGetQueryObjectuivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryivEXT(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.disjointTimerQueryExt["getQueryEXT"](target,pname)}function _emscripten_glGetRenderbufferParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getRenderbufferParameter(target,pname)}function _emscripten_glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetShaderPrecisionFormat(shaderType,precisionType,range,precision){var result=GLctx.getShaderPrecisionFormat(shaderType,precisionType);HEAP32[range>>2]=result.rangeMin;HEAP32[range+4>>2]=result.rangeMax;HEAP32[precision>>2]=result.precision}function _emscripten_glGetShaderSource(shader,bufSize,length,source){var result=GLctx.getShaderSource(GL.shaders[shader]);if(!result)return;var numBytesWrittenExclNull=bufSize>0&&source?stringToUTF8(result,source,bufSize):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var logLength=log?log.length+1:0;HEAP32[p>>2]=logLength}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source?source.length+1:0;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _emscripten_glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));ret=stringToNewUTF8(exts.join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);{glVersion="OpenGL ES 2.0 ("+glVersion+")"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES "+ver_num[1]+" ("+glslVersion+")"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280);return 0}GL.stringCache[name_]=ret;return ret}function _emscripten_glGetTexParameterfv(target,pname,params){if(!params){GL.recordError(1281);return}HEAPF32[params>>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetTexParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getTexParameter(target,pname)}function jstoi_q(str){return parseInt(str)}function _emscripten_glGetUniformLocation(program,name){name=UTF8ToString(name);var arrayIndex=0;if(name[name.length-1]=="]"){var leftBrace=name.lastIndexOf("[");arrayIndex=name[leftBrace+1]!="]"?jstoi_q(name.slice(leftBrace+1)):0;name=name.slice(0,leftBrace)}var uniformInfo=GL.programInfos[program]&&GL.programInfos[program].uniforms[name];if(uniformInfo&&arrayIndex>=0&&arrayIndex>2]=data;break;case 2:HEAPF32[params>>2]=data;break}}else{for(var i=0;i>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break}}}}function _emscripten_glGetUniformfv(program,location,params){emscriptenWebGLGetUniform(program,location,params,2)}function _emscripten_glGetUniformiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,0)}function _emscripten_glGetVertexAttribPointerv(index,pname,pointer){if(!pointer){GL.recordError(1281);return}if(GL.currentContext.clientBuffers[index].enabled){err("glGetVertexAttribPointer on client-side array: not supported, bad data returned")}HEAP32[pointer>>2]=GLctx.getVertexAttribOffset(index,pname)}function emscriptenWebGLGetVertexAttrib(index,pname,params,type){if(!params){GL.recordError(1281);return}if(GL.currentContext.clientBuffers[index].enabled){err("glGetVertexAttrib*v on client-side array: not supported, bad data returned")}var data=GLctx.getVertexAttrib(index,pname);if(pname==34975){HEAP32[params>>2]=data&&data["name"]}else if(typeof data=="number"||typeof data=="boolean"){switch(type){case 0:HEAP32[params>>2]=data;break;case 2:HEAPF32[params>>2]=data;break;case 5:HEAP32[params>>2]=Math.fround(data);break}}else{for(var i=0;i>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break;case 5:HEAP32[params+i*4>>2]=Math.fround(data[i]);break}}}}function _emscripten_glGetVertexAttribfv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,2)}function _emscripten_glGetVertexAttribiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,5)}function _emscripten_glHint(x0,x1){GLctx["hint"](x0,x1)}function _emscripten_glIsBuffer(buffer){var b=GL.buffers[buffer];if(!b)return 0;return GLctx.isBuffer(b)}function _emscripten_glIsEnabled(x0){return GLctx["isEnabled"](x0)}function _emscripten_glIsFramebuffer(framebuffer){var fb=GL.framebuffers[framebuffer];if(!fb)return 0;return GLctx.isFramebuffer(fb)}function _emscripten_glIsProgram(program){program=GL.programs[program];if(!program)return 0;return GLctx.isProgram(program)}function _emscripten_glIsQueryEXT(id){var query=GL.timerQueriesEXT[id];if(!query)return 0;return GLctx.disjointTimerQueryExt["isQueryEXT"](query)}function _emscripten_glIsRenderbuffer(renderbuffer){var rb=GL.renderbuffers[renderbuffer];if(!rb)return 0;return GLctx.isRenderbuffer(rb)}function _emscripten_glIsShader(shader){var s=GL.shaders[shader];if(!s)return 0;return GLctx.isShader(s)}function _emscripten_glIsTexture(id){var texture=GL.textures[id];if(!texture)return 0;return GLctx.isTexture(texture)}function _emscripten_glIsVertexArrayOES(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx["isVertexArray"](vao)}function _emscripten_glLineWidth(x0){GLctx["lineWidth"](x0)}function _emscripten_glLinkProgram(program){GLctx.linkProgram(GL.programs[program]);GL.populateUniformTable(program)}function _emscripten_glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function _emscripten_glPolygonOffset(x0,x1){GLctx["polygonOffset"](x0,x1)}function _emscripten_glQueryCounterEXT(id,target){GLctx.disjointTimerQueryExt["queryCounterEXT"](GL.timerQueriesEXT[id],target)}function computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}function __colorChannelsInGlTextureFormat(format){var colorChannels={5:3,6:4,8:2,29502:3,29504:4};return colorChannels[format-6402]||1}function heapObjectForWebGLType(type){type-=5120;if(type==1)return HEAPU8;if(type==4)return HEAP32;if(type==6)return HEAPF32;if(type==5||type==28922)return HEAPU32;return HEAPU16}function heapAccessShiftForWebGLHeap(heap){return 31-Math.clz32(heap.BYTES_PER_ELEMENT)}function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var heap=heapObjectForWebGLType(type);var shift=heapAccessShiftForWebGLHeap(heap);var byteSize=1<>shift,pixels+bytes>>shift)}function _emscripten_glReadPixels(x,y,width,height,format,type,pixels){var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _emscripten_glReleaseShaderCompiler(){}function _emscripten_glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _emscripten_glSampleCoverage(value,invert){GLctx.sampleCoverage(value,!!invert)}function _emscripten_glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _emscripten_glShaderBinary(){GL.recordError(1280)}function _emscripten_glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _emscripten_glStencilFunc(x0,x1,x2){GLctx["stencilFunc"](x0,x1,x2)}function _emscripten_glStencilFuncSeparate(x0,x1,x2,x3){GLctx["stencilFuncSeparate"](x0,x1,x2,x3)}function _emscripten_glStencilMask(x0){GLctx["stencilMask"](x0)}function _emscripten_glStencilMaskSeparate(x0,x1){GLctx["stencilMaskSeparate"](x0,x1)}function _emscripten_glStencilOp(x0,x1,x2){GLctx["stencilOp"](x0,x1,x2)}function _emscripten_glStencilOpSeparate(x0,x1,x2,x3){GLctx["stencilOpSeparate"](x0,x1,x2,x3)}function _emscripten_glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _emscripten_glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _emscripten_glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _emscripten_glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _emscripten_glTexParameteriv(target,pname,params){var param=HEAP32[params>>2];GLctx.texParameteri(target,pname,param)}function _emscripten_glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _emscripten_glUniform1f(location,v0){GLctx.uniform1f(GL.uniforms[location],v0)}var miniTempWebGLFloatBuffers=[];function _emscripten_glUniform1fv(location,count,value){if(count<=288){var view=miniTempWebGLFloatBuffers[count-1];for(var i=0;i>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1fv(GL.uniforms[location],view)}function _emscripten_glUniform1i(location,v0){GLctx.uniform1i(GL.uniforms[location],v0)}var __miniTempWebGLIntBuffers=[];function _emscripten_glUniform1iv(location,count,value){if(count<=288){var view=__miniTempWebGLIntBuffers[count-1];for(var i=0;i>2]}}else{var view=HEAP32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1iv(GL.uniforms[location],view)}function _emscripten_glUniform2f(location,v0,v1){GLctx.uniform2f(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2fv(location,count,value){if(count<=144){var view=miniTempWebGLFloatBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(GL.uniforms[location],view)}function _emscripten_glUniform2i(location,v0,v1){GLctx.uniform2i(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2iv(location,count,value){if(count<=144){var view=__miniTempWebGLIntBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2iv(GL.uniforms[location],view)}function _emscripten_glUniform3f(location,v0,v1,v2){GLctx.uniform3f(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3fv(location,count,value){if(count<=96){var view=miniTempWebGLFloatBuffers[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(GL.uniforms[location],view)}function _emscripten_glUniform3i(location,v0,v1,v2){GLctx.uniform3i(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3iv(location,count,value){if(count<=96){var view=__miniTempWebGLIntBuffers[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3iv(GL.uniforms[location],view)}function _emscripten_glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4fv(location,count,value){if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(GL.uniforms[location],view)}function _emscripten_glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4iv(location,count,value){if(count<=72){var view=__miniTempWebGLIntBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2];view[i+3]=HEAP32[value+(4*i+12)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4iv(GL.uniforms[location],view)}function _emscripten_glUniformMatrix2fv(location,count,transpose,value){if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniformMatrix2fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix3fv(location,count,transpose,value){if(count<=32){var view=miniTempWebGLFloatBuffers[9*count-1];for(var i=0;i<9*count;i+=9){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*36>>2)}GLctx.uniformMatrix3fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix4fv(location,count,transpose,value){if(count<=18){var view=miniTempWebGLFloatBuffers[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _emscripten_glValidateProgram(program){GLctx.validateProgram(GL.programs[program])}function _emscripten_glVertexAttrib1f(x0,x1){GLctx["vertexAttrib1f"](x0,x1)}function _emscripten_glVertexAttrib1fv(index,v){GLctx.vertexAttrib1f(index,HEAPF32[v>>2])}function _emscripten_glVertexAttrib2f(x0,x1,x2){GLctx["vertexAttrib2f"](x0,x1,x2)}function _emscripten_glVertexAttrib2fv(index,v){GLctx.vertexAttrib2f(index,HEAPF32[v>>2],HEAPF32[v+4>>2])}function _emscripten_glVertexAttrib3f(x0,x1,x2,x3){GLctx["vertexAttrib3f"](x0,x1,x2,x3)}function _emscripten_glVertexAttrib3fv(index,v){GLctx.vertexAttrib3f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2])}function _emscripten_glVertexAttrib4f(x0,x1,x2,x3,x4){GLctx["vertexAttrib4f"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])}function _emscripten_glVertexAttribDivisorANGLE(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribPointer(index,size,type,normalized,stride,ptr){var cb=GL.currentContext.clientBuffers[index];if(!GLctx.currentArrayBufferBinding){cb.size=size;cb.type=type;cb.normalized=normalized;cb.stride=stride;cb.ptr=ptr;cb.clientside=true;cb.vertexAttribPointerAdaptor=function(index,size,type,normalized,stride,ptr){this.vertexAttribPointer(index,size,type,normalized,stride,ptr)};return}cb.clientside=false;GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _emscripten_glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}function _emscripten_html5_remove_all_event_listeners(){JSEvents.removeAllEventListeners()}function _longjmp(env,value){_setThrew(env,value||1);throw"longjmp"}function _emscripten_longjmp(a0,a1){return _longjmp(a0,a1)}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function _emscripten_request_pointerlock(target,deferUntilInEventHandler){target=findEventTarget(target);if(!target)return-4;if(!target.requestPointerLock&&!target.msRequestPointerLock){return-1}var canPerformRequests=JSEvents.canPerformEventHandlerRequests();if(!canPerformRequests){if(deferUntilInEventHandler){JSEvents.deferCall(requestPointerLock,2,[target]);return 1}else{return-2}}return requestPointerLock(target)}function _emscripten_get_heap_size(){return HEAPU8.length}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=_emscripten_get_heap_size();var maxHeapSize=2147483648;if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}function _emscripten_sample_gamepad_data(){return(JSEvents.lastGamepadState=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null)?0:-1}function _emscripten_set_canvas_element_size(target,width,height){var canvas=findCanvasEventTarget(target);if(!canvas)return-4;canvas.width=width;canvas.height=height;return 0}function _emscripten_set_element_css_size(target,width,height){target=findEventTarget(target);if(!target)return-4;target.style.width=width+"px";target.style.height=height+"px";return 0}function registerGamepadEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.gamepadEvent)JSEvents.gamepadEvent=_malloc(1432);var gamepadEventHandlerFunc=function(ev){var e=ev||event;var gamepadEvent=JSEvents.gamepadEvent;fillGamepadEventData(gamepadEvent,e["gamepad"]);if(wasmTable.get(callbackfunc)(eventTypeId,gamepadEvent,userData))e.preventDefault()};var eventHandler={target:findEventTarget(target),allowsDeferredCalls:true,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:gamepadEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_gamepadconnected_callback_on_thread(userData,useCapture,callbackfunc,targetThread){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;registerGamepadEventCallback(2,userData,useCapture,callbackfunc,26,"gamepadconnected",targetThread);return 0}function _emscripten_set_gamepaddisconnected_callback_on_thread(userData,useCapture,callbackfunc,targetThread){if(!navigator.getGamepads&&!navigator.webkitGetGamepads)return-1;registerGamepadEventCallback(2,userData,useCapture,callbackfunc,27,"gamepaddisconnected",targetThread);return 0}function registerKeyEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.keyEvent)JSEvents.keyEvent=_malloc(164);var keyEventHandlerFunc=function(e){var keyEventData=JSEvents.keyEvent;var idx=keyEventData>>2;HEAP32[idx+0]=e.location;HEAP32[idx+1]=e.ctrlKey;HEAP32[idx+2]=e.shiftKey;HEAP32[idx+3]=e.altKey;HEAP32[idx+4]=e.metaKey;HEAP32[idx+5]=e.repeat;HEAP32[idx+6]=e.charCode;HEAP32[idx+7]=e.keyCode;HEAP32[idx+8]=e.which;stringToUTF8(e.key||"",keyEventData+36,32);stringToUTF8(e.code||"",keyEventData+68,32);stringToUTF8(e.char||"",keyEventData+100,32);stringToUTF8(e.locale||"",keyEventData+132,32);if(wasmTable.get(callbackfunc)(eventTypeId,keyEventData,userData))e.preventDefault()};var eventHandler={target:findEventTarget(target),allowsDeferredCalls:true,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:keyEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_keydown_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){registerKeyEventCallback(target,userData,useCapture,callbackfunc,2,"keydown",targetThread);return 0}function _emscripten_set_keypress_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){registerKeyEventCallback(target,userData,useCapture,callbackfunc,1,"keypress",targetThread);return 0}function _emscripten_set_keyup_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){registerKeyEventCallback(target,userData,useCapture,callbackfunc,3,"keyup",targetThread);return 0}function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop){var browserIterationFunc=wasmTable.get(func);setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop)}function getBoundingClientRect(e){return specialHTMLTargets.indexOf(e)<0?e.getBoundingClientRect():{"left":0,"top":0}}function fillMouseEventData(eventStruct,e,target){var idx=eventStruct>>2;HEAP32[idx+0]=e.screenX;HEAP32[idx+1]=e.screenY;HEAP32[idx+2]=e.clientX;HEAP32[idx+3]=e.clientY;HEAP32[idx+4]=e.ctrlKey;HEAP32[idx+5]=e.shiftKey;HEAP32[idx+6]=e.altKey;HEAP32[idx+7]=e.metaKey;HEAP16[idx*2+16]=e.button;HEAP16[idx*2+17]=e.buttons;HEAP32[idx+9]=e["movementX"];HEAP32[idx+10]=e["movementY"];var rect=getBoundingClientRect(target);HEAP32[idx+11]=e.clientX-rect.left;HEAP32[idx+12]=e.clientY-rect.top}function registerMouseEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.mouseEvent)JSEvents.mouseEvent=_malloc(64);target=findEventTarget(target);var mouseEventHandlerFunc=function(ev){var e=ev||event;fillMouseEventData(JSEvents.mouseEvent,e,target);if(wasmTable.get(callbackfunc)(eventTypeId,JSEvents.mouseEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:eventTypeString!="mousemove"&&eventTypeString!="mouseenter"&&eventTypeString!="mouseleave",eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:mouseEventHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_mousedown_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){registerMouseEventCallback(target,userData,useCapture,callbackfunc,5,"mousedown",targetThread);return 0}function _emscripten_set_mousemove_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){registerMouseEventCallback(target,userData,useCapture,callbackfunc,8,"mousemove",targetThread);return 0}function _emscripten_set_mouseup_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){registerMouseEventCallback(target,userData,useCapture,callbackfunc,6,"mouseup",targetThread);return 0}function registerWheelEventCallback(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread){if(!JSEvents.wheelEvent)JSEvents.wheelEvent=_malloc(96);var wheelHandlerFunc=function(ev){var e=ev||event;var wheelEvent=JSEvents.wheelEvent;fillMouseEventData(wheelEvent,e,target);HEAPF64[wheelEvent+64>>3]=e["deltaX"];HEAPF64[wheelEvent+72>>3]=e["deltaY"];HEAPF64[wheelEvent+80>>3]=e["deltaZ"];HEAP32[wheelEvent+88>>2]=e["deltaMode"];if(wasmTable.get(callbackfunc)(eventTypeId,wheelEvent,userData))e.preventDefault()};var eventHandler={target:target,allowsDeferredCalls:true,eventTypeString:eventTypeString,callbackfunc:callbackfunc,handlerFunc:wheelHandlerFunc,useCapture:useCapture};JSEvents.registerOrRemoveHandler(eventHandler)}function _emscripten_set_wheel_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target=findEventTarget(target);if(typeof target.onwheel!=="undefined"){registerWheelEventCallback(target,userData,useCapture,callbackfunc,9,"wheel",targetThread);return 0}else{return-1}}function _emscripten_thread_sleep(msecs){var start=_emscripten_get_now();while(_emscripten_get_now()-start>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAP32[penviron_buf_size>>2]=bufSize;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _exit(status){exit(status)}function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_fdstat_get(fd,pbuf){try{var stream=SYSCALLS.getStreamFromFD(fd);var type=stream.tty?2:FS.isDir(stream.mode)?3:FS.isLink(stream.mode)?7:4;HEAP8[pbuf>>0]=type;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_read(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doReadv(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{var stream=SYSCALLS.getStreamFromFD(fd);var HIGH_OFFSET=4294967296;var offset=offset_high*HIGH_OFFSET+(offset_low>>>0);var DOUBLE_LIMIT=9007199254740992;if(offset<=-DOUBLE_LIMIT||offset>=DOUBLE_LIMIT){return-61}FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doWritev(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _getTempRet0(){return getTempRet0()|0}function _glActiveTexture(x0){GLctx["activeTexture"](x0)}function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _glBindBuffer(target,buffer){if(target==34962){GLctx.currentArrayBufferBinding=buffer}else if(target==34963){GLctx.currentElementArrayBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])}function _glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,GL.framebuffers[framebuffer])}function _glBindRenderbuffer(target,renderbuffer){GLctx.bindRenderbuffer(target,GL.renderbuffers[renderbuffer])}function _glBlendEquation(x0){GLctx["blendEquation"](x0)}function _glBlendFunc(x0,x1){GLctx["blendFunc"](x0,x1)}function _glBufferData(target,size,data,usage){GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}function _glCheckFramebufferStatus(x0){return GLctx["checkFramebufferStatus"](x0)}function _glClear(x0){GLctx["clear"](x0)}function _glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;GL.programs[id]=program;return id}function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentArrayBufferBinding)GLctx.currentArrayBufferBinding=0;if(id==GLctx.currentElementArrayBufferBinding)GLctx.currentElementArrayBufferBinding=0}}function _glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _glDisable(x0){GLctx["disable"](x0)}function _glDisableVertexAttribArray(index){var cb=GL.currentContext.clientBuffers[index];cb.enabled=false;GLctx.disableVertexAttribArray(index)}function _glDrawArrays(mode,first,count){GL.preDrawHandleClientVertexAttribBindings(first+count);GLctx.drawArrays(mode,first,count);GL.postDrawHandleClientVertexAttribBindings()}function _glEnable(x0){GLctx["enable"](x0)}function _glEnableVertexAttribArray(index){var cb=GL.currentContext.clientBuffers[index];cb.enabled=true;GLctx.enableVertexAttribArray(index)}function _glFinish(){GLctx["finish"]()}function _glFlush(){GLctx["flush"]()}function _glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function _glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function _glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function _glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var logLength=log?log.length+1:0;HEAP32[p>>2]=logLength}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source?source.length+1:0;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function _glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));ret=stringToNewUTF8(exts.join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);{glVersion="OpenGL ES 2.0 ("+glVersion+")"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES "+ver_num[1]+" ("+glslVersion+")"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280);return 0}GL.stringCache[name_]=ret;return ret}function _glGetUniformLocation(program,name){name=UTF8ToString(name);var arrayIndex=0;if(name[name.length-1]=="]"){var leftBrace=name.lastIndexOf("[");arrayIndex=name[leftBrace+1]!="]"?jstoi_q(name.slice(leftBrace+1)):0;name=name.slice(0,leftBrace)}var uniformInfo=GL.programInfos[program]&&GL.programInfos[program].uniforms[name];if(uniformInfo&&arrayIndex>=0&&arrayIndex>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1fv(GL.uniforms[location],view)}function _glUniform1i(location,v0){GLctx.uniform1i(GL.uniforms[location],v0)}function _glUniform2f(location,v0,v1){GLctx.uniform2f(GL.uniforms[location],v0,v1)}function _glUniform2fv(location,count,value){if(count<=144){var view=miniTempWebGLFloatBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(GL.uniforms[location],view)}function _glUniform3f(location,v0,v1,v2){GLctx.uniform3f(GL.uniforms[location],v0,v1,v2)}function _glUniform3fv(location,count,value){if(count<=96){var view=miniTempWebGLFloatBuffers[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(GL.uniforms[location],view)}function _glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(GL.uniforms[location],v0,v1,v2,v3)}function _glUniform4fv(location,count,value){if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(GL.uniforms[location],view)}function _glUniformMatrix4fv(location,count,transpose,value){if(count<=18){var view=miniTempWebGLFloatBuffers[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){var cb=GL.currentContext.clientBuffers[index];if(!GLctx.currentArrayBufferBinding){cb.size=size;cb.type=type;cb.normalized=normalized;cb.stride=stride;cb.ptr=ptr;cb.clientside=true;cb.vertexAttribPointerAdaptor=function(index,size,type,normalized,stride,ptr){this.vertexAttribPointer(index,size,type,normalized,stride,ptr)};return}cb.clientside=false;GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}function _mktime(tmPtr){_tzset();var date=new Date(HEAP32[tmPtr+20>>2]+1900,HEAP32[tmPtr+16>>2],HEAP32[tmPtr+12>>2],HEAP32[tmPtr+8>>2],HEAP32[tmPtr+4>>2],HEAP32[tmPtr>>2],0);var dst=HEAP32[tmPtr+32>>2];var guessedOffset=date.getTimezoneOffset();var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dstOffset=Math.min(winterOffset,summerOffset);if(dst<0){HEAP32[tmPtr+32>>2]=Number(summerOffset!=winterOffset&&dstOffset==guessedOffset)}else if(dst>0!=(dstOffset==guessedOffset)){var nonDstOffset=Math.max(winterOffset,summerOffset);var trueOffset=dst>0?dstOffset:nonDstOffset;date.setTime(date.getTime()+(trueOffset-guessedOffset)*6e4)}HEAP32[tmPtr+24>>2]=date.getDay();var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();return date.getTime()/1e3|0}function _setTempRet0($i){setTempRet0($i|0)}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value==="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}else{return"PM"}},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){return date.tm_wday||7},"%U":function(date){var janFirst=new Date(date.tm_year+1900,0,1);var firstSunday=janFirst.getDay()===0?janFirst:__addDays(janFirst,7-janFirst.getDay());var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstSunday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstSundayUntilEndJanuary=31-firstSunday.getDate();var days=firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstSunday,janFirst)===0?"01":"00"},"%V":function(date){var janFourthThisYear=new Date(date.tm_year+1900,0,4);var janFourthNextYear=new Date(date.tm_year+1901,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);var endDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);if(compareByDay(endDate,firstWeekStartThisYear)<0){return"53"}if(compareByDay(firstWeekStartNextYear,endDate)<=0){return"01"}var daysDifference;if(firstWeekStartThisYear.getFullYear()=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};for(var rule in EXPANSION_RULES_2){if(pattern.indexOf(rule)>=0){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _strftime_l(s,maxsize,format,tm){return _strftime(s,maxsize,format,tm)}function _sysconf(name){switch(name){case 30:return 16384;case 85:var maxHeapSize=2147483648;return maxHeapSize/16384;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:case 80:case 81:case 79:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:{if(typeof navigator==="object")return navigator["hardwareConcurrency"]||1;return 1}}setErrNo(28);return-1}function _time(ptr){var ret=Date.now()/1e3|0;if(ptr){HEAP32[ptr>>2]=ret}return ret}Module["requestFullscreen"]=function Module_requestFullscreen(lockPointer,resizeCanvas){Browser.requestFullscreen(lockPointer,resizeCanvas)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};Module["createContext"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};var GLctx;var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.staticInit();for(var i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));var miniTempWebGLFloatBuffersStorage=new Float32Array(288);for(var i=0;i<288;++i){miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i+1)}var __miniTempWebGLIntBuffersStorage=new Int32Array(288);for(var i=0;i<288;++i){__miniTempWebGLIntBuffers[i]=__miniTempWebGLIntBuffersStorage.subarray(0,i+1)}function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var asmLibraryArg={"Sa":_RWebAudioBufferSize,"Ua":_RWebAudioFree,"_a":_RWebAudioInit,"Db":_RWebAudioRecalibrateTime,"Za":_RWebAudioSampleRate,"Va":_RWebAudioSetNonblockState,"Wa":_RWebAudioStart,"Xa":_RWebAudioStop,"Ya":_RWebAudioWrite,"Ta":_RWebAudioWriteAvail,"Ra":_RWebCamFree,"fb":_RWebCamInit,"Na":_RWebCamPoll,"Pa":_RWebCamStart,"Oa":_RWebCamStop,"o":___assert_fail,"h":___cxa_atexit,"pb":___localtime_r,"fa":___sys_fcntl64,"zb":___sys_fstat64,"ub":___sys_ftruncate64,"xb":___sys_getcwd,"Ab":___sys_getdents64,"vb":___sys_getpid,"tb":___sys_ioctl,"Bb":___sys_mkdir,"U":___sys_open,"yb":___sys_readlink,"qb":___sys_rename,"rb":___sys_rmdir,"ha":___sys_stat64,"sb":___sys_unlink,"c":_abort,"ka":_clock_gettime,"hd":_dummyErrnoCodes,"Ga":_eglBindAPI,"cf":_eglChooseConfig,"Aa":_eglCreateContext,"af":_eglCreateWindowSurface,"X":_eglDestroyContext,"Da":_eglDestroySurface,"df":_eglGetConfigs,"Ba":_eglGetCurrentContext,"bf":_eglGetDisplay,"Ja":_eglGetError,"Ha":_eglInitialize,"O":_eglMakeCurrent,"W":_eglQuerySurface,"Ca":_eglSwapBuffers,"Ia":_eglTerminate,"bb":_emscripten_exit_pointerlock,"Qa":_emscripten_force_exit,"Z":_emscripten_get_canvas_element_size,"Ka":_emscripten_get_fullscreen_status,"F":_emscripten_get_gamepad_status,"se":_emscripten_glActiveTexture,"re":_emscripten_glAttachShader,"Ie":_emscripten_glBeginQueryEXT,"qe":_emscripten_glBindAttribLocation,"pe":_emscripten_glBindBuffer,"oe":_emscripten_glBindFramebuffer,"ne":_emscripten_glBindRenderbuffer,"me":_emscripten_glBindTexture,"Ae":_emscripten_glBindVertexArrayOES,"le":_emscripten_glBlendColor,"ke":_emscripten_glBlendEquation,"je":_emscripten_glBlendEquationSeparate,"ie":_emscripten_glBlendFunc,"he":_emscripten_glBlendFuncSeparate,"ge":_emscripten_glBufferData,"fe":_emscripten_glBufferSubData,"ee":_emscripten_glCheckFramebufferStatus,"de":_emscripten_glClear,"ce":_emscripten_glClearColor,"be":_emscripten_glClearDepthf,"ae":_emscripten_glClearStencil,"$d":_emscripten_glColorMask,"_d":_emscripten_glCompileShader,"Zd":_emscripten_glCompressedTexImage2D,"Xd":_emscripten_glCompressedTexSubImage2D,"Wd":_emscripten_glCopyTexImage2D,"Vd":_emscripten_glCopyTexSubImage2D,"Ud":_emscripten_glCreateProgram,"Td":_emscripten_glCreateShader,"Sd":_emscripten_glCullFace,"Rd":_emscripten_glDeleteBuffers,"Qd":_emscripten_glDeleteFramebuffers,"Pd":_emscripten_glDeleteProgram,"Ke":_emscripten_glDeleteQueriesEXT,"Od":_emscripten_glDeleteRenderbuffers,"Md":_emscripten_glDeleteShader,"Ld":_emscripten_glDeleteTextures,"ze":_emscripten_glDeleteVertexArraysOES,"Kd":_emscripten_glDepthFunc,"Jd":_emscripten_glDepthMask,"Id":_emscripten_glDepthRangef,"Hd":_emscripten_glDetachShader,"Gd":_emscripten_glDisable,"Fd":_emscripten_glDisableVertexAttribArray,"Ed":_emscripten_glDrawArrays,"ve":_emscripten_glDrawArraysInstancedANGLE,"we":_emscripten_glDrawBuffersWEBGL,"Dd":_emscripten_glDrawElements,"ue":_emscripten_glDrawElementsInstancedANGLE,"Cd":_emscripten_glEnable,"Bd":_emscripten_glEnableVertexAttribArray,"He":_emscripten_glEndQueryEXT,"Ad":_emscripten_glFinish,"zd":_emscripten_glFlush,"yd":_emscripten_glFramebufferRenderbuffer,"xd":_emscripten_glFramebufferTexture2D,"wd":_emscripten_glFrontFace,"vd":_emscripten_glGenBuffers,"td":_emscripten_glGenFramebuffers,"Le":_emscripten_glGenQueriesEXT,"rd":_emscripten_glGenRenderbuffers,"qd":_emscripten_glGenTextures,"ye":_emscripten_glGenVertexArraysOES,"ud":_emscripten_glGenerateMipmap,"pd":_emscripten_glGetActiveAttrib,"od":_emscripten_glGetActiveUniform,"nd":_emscripten_glGetAttachedShaders,"md":_emscripten_glGetAttribLocation,"ld":_emscripten_glGetBooleanv,"kd":_emscripten_glGetBufferParameteriv,"jd":_emscripten_glGetError,"id":_emscripten_glGetFloatv,"gd":_emscripten_glGetFramebufferAttachmentParameteriv,"fd":_emscripten_glGetIntegerv,"dd":_emscripten_glGetProgramInfoLog,"ed":_emscripten_glGetProgramiv,"Ce":_emscripten_glGetQueryObjecti64vEXT,"Ee":_emscripten_glGetQueryObjectivEXT,"Be":_emscripten_glGetQueryObjectui64vEXT,"De":_emscripten_glGetQueryObjectuivEXT,"Fe":_emscripten_glGetQueryivEXT,"cd":_emscripten_glGetRenderbufferParameteriv,"ad":_emscripten_glGetShaderInfoLog,"$c":_emscripten_glGetShaderPrecisionFormat,"_c":_emscripten_glGetShaderSource,"bd":_emscripten_glGetShaderiv,"Zc":_emscripten_glGetString,"Yc":_emscripten_glGetTexParameterfv,"Xc":_emscripten_glGetTexParameteriv,"Uc":_emscripten_glGetUniformLocation,"Wc":_emscripten_glGetUniformfv,"Vc":_emscripten_glGetUniformiv,"Rc":_emscripten_glGetVertexAttribPointerv,"Tc":_emscripten_glGetVertexAttribfv,"Sc":_emscripten_glGetVertexAttribiv,"Qc":_emscripten_glHint,"Pc":_emscripten_glIsBuffer,"Oc":_emscripten_glIsEnabled,"Nc":_emscripten_glIsFramebuffer,"Mc":_emscripten_glIsProgram,"Je":_emscripten_glIsQueryEXT,"Lc":_emscripten_glIsRenderbuffer,"Kc":_emscripten_glIsShader,"Jc":_emscripten_glIsTexture,"xe":_emscripten_glIsVertexArrayOES,"Ic":_emscripten_glLineWidth,"Hc":_emscripten_glLinkProgram,"Gc":_emscripten_glPixelStorei,"Fc":_emscripten_glPolygonOffset,"Ge":_emscripten_glQueryCounterEXT,"Dc":_emscripten_glReadPixels,"Cc":_emscripten_glReleaseShaderCompiler,"Bc":_emscripten_glRenderbufferStorage,"Ac":_emscripten_glSampleCoverage,"zc":_emscripten_glScissor,"yc":_emscripten_glShaderBinary,"xc":_emscripten_glShaderSource,"wc":_emscripten_glStencilFunc,"vc":_emscripten_glStencilFuncSeparate,"uc":_emscripten_glStencilMask,"sc":_emscripten_glStencilMaskSeparate,"rc":_emscripten_glStencilOp,"qc":_emscripten_glStencilOpSeparate,"pc":_emscripten_glTexImage2D,"oc":_emscripten_glTexParameterf,"nc":_emscripten_glTexParameterfv,"mc":_emscripten_glTexParameteri,"lc":_emscripten_glTexParameteriv,"kc":_emscripten_glTexSubImage2D,"jc":_emscripten_glUniform1f,"hc":_emscripten_glUniform1fv,"gc":_emscripten_glUniform1i,"fc":_emscripten_glUniform1iv,"ec":_emscripten_glUniform2f,"dc":_emscripten_glUniform2fv,"cc":_emscripten_glUniform2i,"bc":_emscripten_glUniform2iv,"ac":_emscripten_glUniform3f,"$b":_emscripten_glUniform3fv,"_b":_emscripten_glUniform3i,"Yb":_emscripten_glUniform3iv,"Xb":_emscripten_glUniform4f,"Wb":_emscripten_glUniform4fv,"Vb":_emscripten_glUniform4i,"Ub":_emscripten_glUniform4iv,"Tb":_emscripten_glUniformMatrix2fv,"Sb":_emscripten_glUniformMatrix3fv,"Rb":_emscripten_glUniformMatrix4fv,"Qb":_emscripten_glUseProgram,"Pb":_emscripten_glValidateProgram,"Nb":_emscripten_glVertexAttrib1f,"Mb":_emscripten_glVertexAttrib1fv,"Lb":_emscripten_glVertexAttrib2f,"Kb":_emscripten_glVertexAttrib2fv,"Jb":_emscripten_glVertexAttrib3f,"Ib":_emscripten_glVertexAttrib3fv,"Hb":_emscripten_glVertexAttrib4f,"Gb":_emscripten_glVertexAttrib4fv,"te":_emscripten_glVertexAttribDivisorANGLE,"Fb":_emscripten_glVertexAttribPointer,"Eb":_emscripten_glViewport,"db":_emscripten_html5_remove_all_event_listeners,"L":_emscripten_longjmp,"hb":_emscripten_memcpy_big,"cb":_emscripten_request_pointerlock,"ib":_emscripten_resize_heap,"ea":_emscripten_sample_gamepad_data,"ja":_emscripten_set_canvas_element_size,"ia":_emscripten_set_element_css_size,"ab":_emscripten_set_gamepadconnected_callback_on_thread,"$a":_emscripten_set_gamepaddisconnected_callback_on_thread,"tc":_emscripten_set_keydown_callback_on_thread,"Zb":_emscripten_set_keypress_callback_on_thread,"ic":_emscripten_set_keyup_callback_on_thread,"Ec":_emscripten_set_main_loop,"Y":_emscripten_set_main_loop_timing,"Ob":_emscripten_set_mousedown_callback_on_thread,"wb":_emscripten_set_mousemove_callback_on_thread,"Cb":_emscripten_set_mouseup_callback_on_thread,"mb":_emscripten_set_wheel_callback_on_thread,"ob":_emscripten_thread_sleep,"lb":_environ_get,"nb":_environ_sizes_get,"ma":_exit,"G":_fd_close,"kb":_fd_fdstat_get,"ga":_fd_read,"eb":_fd_seek,"T":_fd_write,"b":_getTempRet0,"H":_glActiveTexture,"ua":_glAttachShader,"oa":_glBindBuffer,"q":_glBindFramebuffer,"aa":_glBindRenderbuffer,"d":_glBindTexture,"K":_glBlendEquation,"y":_glBlendFunc,"Re":_glBufferData,"I":_glCheckFramebufferStatus,"C":_glClear,"S":_glClearColor,"Ne":_glCompileShader,"Ve":_glCreateProgram,"wa":_glCreateShader,"R":_glDeleteBuffers,"x":_glDeleteFramebuffers,"qa":_glDeleteProgram,"ba":_glDeleteRenderbuffers,"sa":_glDeleteShader,"k":_glDeleteTextures,"l":_glDisable,"V":_glDisableVertexAttribArray,"t":_glDrawArrays,"A":_glEnable,"Qe":_glEnableVertexAttribArray,"Ea":_glFinish,"Fa":_glFlush,"$":_glFramebufferRenderbuffer,"J":_glFramebufferTexture2D,"za":_glGenBuffers,"Q":_glGenFramebuffers,"Ma":_glGenRenderbuffers,"u":_glGenTextures,"M":_glGenerateMipmap,"pa":_glGetAttribLocation,"da":_glGetError,"P":_glGetIntegerv,"Te":_glGetProgramInfoLog,"ta":_glGetProgramiv,"Me":_glGetShaderInfoLog,"na":_glGetShaderiv,"f":_glGetString,"E":_glGetUniformLocation,"ra":_glIsProgram,"Ue":_glLinkProgram,"B":_glPixelStorei,"ca":_glReadPixels,"La":_glRenderbufferStorage,"_":_glScissor,"Oe":_glShaderSource,"w":_glTexImage2D,"e":_glTexParameteri,"N":_glTexSubImage2D,"xa":_glUniform1f,"Ye":_glUniform1fv,"v":_glUniform1i,"$e":_glUniform2f,"n":_glUniform2fv,"_e":_glUniform3f,"Xe":_glUniform3fv,"Ze":_glUniform4f,"We":_glUniform4fv,"Se":_glUniformMatrix4fv,"D":_glUseProgram,"Pe":_glVertexAttribPointer,"s":_glViewport,"la":invoke_i,"r":invoke_ii,"p":invoke_iii,"ya":invoke_iiii,"va":invoke_iiiiii,"gb":invoke_j,"m":invoke_v,"g":invoke_vi,"i":invoke_vii,"Yd":invoke_viii,"Nd":_mktime,"a":_setTempRet0,"z":_strftime,"jb":_strftime_l,"sd":_sysconf,"j":_time};var asm=createWasm();var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["ff"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["gf"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["hf"]).apply(null,arguments)};var _fflush=Module["_fflush"]=function(){return(_fflush=Module["_fflush"]=Module["asm"]["kf"]).apply(null,arguments)};var ___errno_location=Module["___errno_location"]=function(){return(___errno_location=Module["___errno_location"]=Module["asm"]["lf"]).apply(null,arguments)};var _cmd_savefiles=Module["_cmd_savefiles"]=function(){return(_cmd_savefiles=Module["_cmd_savefiles"]=Module["asm"]["mf"]).apply(null,arguments)};var _cmd_save_state=Module["_cmd_save_state"]=function(){return(_cmd_save_state=Module["_cmd_save_state"]=Module["asm"]["nf"]).apply(null,arguments)};var _cmd_load_state=Module["_cmd_load_state"]=function(){return(_cmd_load_state=Module["_cmd_load_state"]=Module["asm"]["of"]).apply(null,arguments)};var _cmd_take_screenshot=Module["_cmd_take_screenshot"]=function(){return(_cmd_take_screenshot=Module["_cmd_take_screenshot"]=Module["asm"]["pf"]).apply(null,arguments)};var _cmd_toggle_menu=Module["_cmd_toggle_menu"]=function(){return(_cmd_toggle_menu=Module["_cmd_toggle_menu"]=Module["asm"]["qf"]).apply(null,arguments)};var _cmd_undo_save_state=Module["_cmd_undo_save_state"]=function(){return(_cmd_undo_save_state=Module["_cmd_undo_save_state"]=Module["asm"]["rf"]).apply(null,arguments)};var _cmd_undo_load_state=Module["_cmd_undo_load_state"]=function(){return(_cmd_undo_load_state=Module["_cmd_undo_load_state"]=Module["asm"]["sf"]).apply(null,arguments)};var _main=Module["_main"]=function(){return(_main=Module["_main"]=Module["asm"]["tf"]).apply(null,arguments)};var __get_tzname=Module["__get_tzname"]=function(){return(__get_tzname=Module["__get_tzname"]=Module["asm"]["uf"]).apply(null,arguments)};var __get_daylight=Module["__get_daylight"]=function(){return(__get_daylight=Module["__get_daylight"]=Module["asm"]["vf"]).apply(null,arguments)};var __get_timezone=Module["__get_timezone"]=function(){return(__get_timezone=Module["__get_timezone"]=Module["asm"]["wf"]).apply(null,arguments)};var stackSave=Module["stackSave"]=function(){return(stackSave=Module["stackSave"]=Module["asm"]["xf"]).apply(null,arguments)};var stackRestore=Module["stackRestore"]=function(){return(stackRestore=Module["stackRestore"]=Module["asm"]["yf"]).apply(null,arguments)};var stackAlloc=Module["stackAlloc"]=function(){return(stackAlloc=Module["stackAlloc"]=Module["asm"]["zf"]).apply(null,arguments)};var _setThrew=Module["_setThrew"]=function(){return(_setThrew=Module["_setThrew"]=Module["asm"]["Af"]).apply(null,arguments)};var dynCall_j=Module["dynCall_j"]=function(){return(dynCall_j=Module["dynCall_j"]=Module["asm"]["Bf"]).apply(null,arguments)};function invoke_ii(index,a1){var sp=stackSave();try{return wasmTable.get(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{wasmTable.get(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{wasmTable.get(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{wasmTable.get(index)()}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return wasmTable.get(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_i(index){var sp=stackSave();try{return wasmTable.get(index)()}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_j(index){var sp=stackSave();try{return dynCall_j(index)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}Module["callMain"]=callMain;Module["FS"]=FS;var calledRun;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}var calledMain=false;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function callMain(args){var entryFunction=Module["_main"];args=args||[];var argc=args.length+1;var argv=stackAlloc((argc+1)*4);HEAP32[argv>>2]=allocateUTF8OnStack(thisProgram);for(var i=1;i>2)+i]=allocateUTF8OnStack(args[i-1])}HEAP32[(argv>>2)+argc]=0;try{var ret=entryFunction(argc,argv);exit(ret,true)}catch(e){if(e instanceof ExitStatus){return}else if(e=="unwind"){noExitRuntime=true;return}else{var toLog=e;if(e&&typeof e==="object"&&e.stack){toLog=[e,e.stack]}err("exception thrown: "+toLog);quit_(1,e)}}finally{calledMain=true}}function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(shouldRunNow)callMain(args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){if(implicit&&noExitRuntime&&status===0){return}if(noExitRuntime){}else{EXITSTATUS=status;exitRuntime();if(Module["onExit"])Module["onExit"](status);ABORT=true}quit_(status,new ExitStatus(status))}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"])shouldRunNow=false;run(); diff --git a/node_modules/@nicolasroehm/ngx-retroarch/snes9x_libretro.wasm b/node_modules/@nicolasroehm/ngx-retroarch/snes9x_libretro.wasm new file mode 100644 index 00000000..0978caa0 Binary files /dev/null and b/node_modules/@nicolasroehm/ngx-retroarch/snes9x_libretro.wasm differ diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..481a070c --- /dev/null +++ b/package-lock.json @@ -0,0 +1,17 @@ +{ + "name": "fun-miles", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@nicolasroehm/ngx-retroarch": "^1.0.4" + } + }, + "node_modules/@nicolasroehm/ngx-retroarch": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@nicolasroehm/ngx-retroarch/-/ngx-retroarch-1.0.4.tgz", + "integrity": "sha512-JwVYQf5FAIkjzA2m37WhZnLRH1x4wKcZDHkqfbJfeaBeUTQVgN0/Dx3ebs5dQRKVe3AEPS+Fw6PwObG57q07SA==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..bcd95001 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@nicolasroehm/ngx-retroarch": "^1.0.4" + } +} diff --git a/rechrowarch.html b/rechrowarch.html new file mode 100644 index 00000000..8c702c83 --- /dev/null +++ b/rechrowarch.html @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file