@letscooee/web-sdk
Version:
Engage uniquely and boost conversions with AI-powered customer journeys driven by real-time intent
10 lines (8 loc) • 347 kB
JavaScript
import{$ as Yi,$a as Fs,A as Gi,Aa as z,B as Re,Ba as xn,C as Me,Ca as On,D as $t,Da as Dn,E as Zn,Ea as Jt,F as Ot,Fa as ii,G as kt,Ga as Ps,H as Ds,Ha as zi,I as wt,Ia as De,J as Cl,Ja as dn,K as ti,Ka as At,L as Bt,La as It,M as Sl,Ma as Et,N as Ct,Na as Je,O as dt,Oa as An,P as V,Pa as Ol,Q as Tl,Qa as qi,R as Il,Ra as Ki,S as Wi,Sa as tt,T as As,Ta as lt,U as vr,Ua as Dl,V as ni,Va as Al,W as Ns,Wa as Nl,X as Rs,Xa as er,Y as Pe,Ya as Ls,Z as Qn,Za as Rl,_ as yr,_a as tr,a as x,aa as St,ab as nr,b as Ee,bb as Ml,c as ei,ca as Er,cb as Pl,d as dl,da as et,db as $n,e as Ui,ea as Gt,eb as Ll,f as Hi,fa as jn,fb as Fl,g as ne,ga as ri,h as fl,ha as un,hb as Vl,i as ji,ia as Se,ib as kl,j as Ft,ja as Te,jb as Gn,k as pl,ka as In,kb as Bl,l as Os,la as st,lb as Ul,m as hl,ma as at,mb as Hl,n as ml,na as Oe,nb as Xi,o as gl,oa as X,ob as Nn,p as _l,pa as Z,pb as fn,q as vl,qa as We,qb as Ji,r as yl,ra as ct,rb as oi,s as El,sa as vt,sb as jl,t as bl,ta as yt,tb as si,u as wl,ua as Ms,ub as $l,v as $i,va as xl,vb as Gl,w as Vt,wa as Xe,wb as Zi,x as Jn,xa as Dt,xb as Wl,y as an,ya as je,z as J,za as br}from"./chunk-EZUOM3MU.js";var Kl=Ui((ql,Qi)=>{"use strict";(function(t){"use strict";var e={};e.VERSION="1.6.1";var n,r={},i=function(d,_){return function(){return _.apply(d,arguments)}},o=function(){var d=arguments,_=d[0],h,E;for(E=1;E<d.length;E++)for(h in d[E])!(h in _)&&d[E].hasOwnProperty(h)&&(_[h]=d[E][h]);return _},s=function(d,_){return{value:d,name:_}};e.TRACE=s(1,"TRACE"),e.DEBUG=s(2,"DEBUG"),e.INFO=s(3,"INFO"),e.TIME=s(4,"TIME"),e.WARN=s(5,"WARN"),e.ERROR=s(8,"ERROR"),e.OFF=s(99,"OFF");var l=function(d){this.context=d,this.setLevel(d.filterLevel),this.log=this.info};l.prototype={setLevel:function(d){d&&"value"in d&&(this.context.filterLevel=d)},getLevel:function(){return this.context.filterLevel},enabledFor:function(d){var _=this.context.filterLevel;return d.value>=_.value},trace:function(){this.invoke(e.TRACE,arguments)},debug:function(){this.invoke(e.DEBUG,arguments)},info:function(){this.invoke(e.INFO,arguments)},warn:function(){this.invoke(e.WARN,arguments)},error:function(){this.invoke(e.ERROR,arguments)},time:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"start"])},timeEnd:function(d){typeof d=="string"&&d.length>0&&this.invoke(e.TIME,[d,"end"])},invoke:function(d,_){n&&this.enabledFor(d)&&n(_,o({level:d},this.context))}};var u=new l({filterLevel:e.OFF});(function(){var d=e;d.enabledFor=i(u,u.enabledFor),d.trace=i(u,u.trace),d.debug=i(u,u.debug),d.time=i(u,u.time),d.timeEnd=i(u,u.timeEnd),d.info=i(u,u.info),d.warn=i(u,u.warn),d.error=i(u,u.error),d.log=d.info})(),e.setHandler=function(d){n=d},e.setLevel=function(d){u.setLevel(d);for(var _ in r)r.hasOwnProperty(_)&&r[_].setLevel(d)},e.getLevel=function(){return u.getLevel()},e.get=function(d){return r[d]||(r[d]=new l(o({name:d},u.context)))},e.createDefaultHandler=function(d){d=d||{},d.formatter=d.formatter||function(w,N){N.name&&w.unshift("["+N.name+"]")};var _={},h=function(E,w){Function.prototype.apply.call(E,console,w)};return typeof console>"u"?function(){}:function(E,w){E=Array.prototype.slice.call(E);var N=console.log,B;w.level===e.TIME?(B=(w.name?"["+w.name+"] ":"")+E[0],E[1]==="start"?console.time?console.time(B):_[B]=new Date().getTime():console.timeEnd?console.timeEnd(B):h(N,[B+": "+(new Date().getTime()-_[B])+"ms"])):(w.level===e.WARN&&console.warn?N=console.warn:w.level===e.ERROR&&console.error?N=console.error:w.level===e.INFO&&console.info?N=console.info:w.level===e.DEBUG&&console.debug?N=console.debug:w.level===e.TRACE&&console.trace&&(N=console.trace),d.formatter(E,w),h(N,E))}},e.useDefaults=function(d){e.setLevel(d&&d.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(d))},e.setDefaults=e.useDefaults,typeof define=="function"&&define.amd?define(e):typeof Qi<"u"&&Qi.exports?Qi.exports=e:(e._prevLogger=t.Logger,e.noConflict=function(){return t.Logger=e._prevLogger,e},t.Logger=e)})(ql)});var iu=Ui((ru,$s)=>{"use strict";(function(t){if(typeof ru=="object"&&typeof $s<"u")$s.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e=this,e.localforage=t()}})(function(){var t,e,n;return function r(i,o,s){function l(_,h){if(!o[_]){if(!i[_]){var E=typeof ei=="function"&&ei;if(!h&&E)return E(_,!0);if(u)return u(_,!0);var w=new Error("Cannot find module '"+_+"'");throw w.code="MODULE_NOT_FOUND",w}var N=o[_]={exports:{}};i[_][0].call(N.exports,function(B){var P=i[_][1][B];return l(P||B)},N,N.exports,r,i,o,s)}return o[_].exports}for(var u=typeof ei=="function"&&ei,d=0;d<s.length;d++)l(s[d]);return l}({1:[function(r,i,o){(function(s){"use strict";var l=s.MutationObserver||s.WebKitMutationObserver,u;if(l){var d=0,_=new l(B),h=s.document.createTextNode("");_.observe(h,{characterData:!0}),u=function(){h.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var E=new s.MessageChannel;E.port1.onmessage=B,u=function(){E.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?u=function(){var Y=s.document.createElement("script");Y.onreadystatechange=function(){B(),Y.onreadystatechange=null,Y.parentNode.removeChild(Y),Y=null},s.document.documentElement.appendChild(Y)}:u=function(){setTimeout(B,0)};var w,N=[];function B(){w=!0;for(var Y,G,te=N.length;te;){for(G=N,N=[],Y=-1;++Y<te;)G[Y]();te=N.length}w=!1}i.exports=P;function P(Y){N.push(Y)===1&&!w&&u()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,i,o){"use strict";var s=r(1);function l(){}var u={},d=["REJECTED"],_=["FULFILLED"],h=["PENDING"];i.exports=E;function E(H){if(typeof H!="function")throw new TypeError("resolver must be a function");this.state=h,this.queue=[],this.outcome=void 0,H!==l&&P(this,H)}E.prototype.catch=function(H){return this.then(null,H)},E.prototype.then=function(H,ve){if(typeof H!="function"&&this.state===_||typeof ve!="function"&&this.state===d)return this;var fe=new this.constructor(l);if(this.state!==h){var be=this.state===_?H:ve;N(fe,be,this.outcome)}else this.queue.push(new w(fe,H,ve));return fe};function w(H,ve,fe){this.promise=H,typeof ve=="function"&&(this.onFulfilled=ve,this.callFulfilled=this.otherCallFulfilled),typeof fe=="function"&&(this.onRejected=fe,this.callRejected=this.otherCallRejected)}w.prototype.callFulfilled=function(H){u.resolve(this.promise,H)},w.prototype.otherCallFulfilled=function(H){N(this.promise,this.onFulfilled,H)},w.prototype.callRejected=function(H){u.reject(this.promise,H)},w.prototype.otherCallRejected=function(H){N(this.promise,this.onRejected,H)};function N(H,ve,fe){s(function(){var be;try{be=ve(fe)}catch(Ve){return u.reject(H,Ve)}be===H?u.reject(H,new TypeError("Cannot resolve promise with itself")):u.resolve(H,be)})}u.resolve=function(H,ve){var fe=Y(B,ve);if(fe.status==="error")return u.reject(H,fe.value);var be=fe.value;if(be)P(H,be);else{H.state=_,H.outcome=ve;for(var Ve=-1,Ne=H.queue.length;++Ve<Ne;)H.queue[Ve].callFulfilled(ve)}return H},u.reject=function(H,ve){H.state=d,H.outcome=ve;for(var fe=-1,be=H.queue.length;++fe<be;)H.queue[fe].callRejected(ve);return H};function B(H){var ve=H&&H.then;if(H&&(typeof H=="object"||typeof H=="function")&&typeof ve=="function")return function(){ve.apply(H,arguments)}}function P(H,ve){var fe=!1;function be(Ye){fe||(fe=!0,u.reject(H,Ye))}function Ve(Ye){fe||(fe=!0,u.resolve(H,Ye))}function Ne(){ve(Ve,be)}var Le=Y(Ne);Le.status==="error"&&be(Le.value)}function Y(H,ve){var fe={};try{fe.value=H(ve),fe.status="success"}catch(be){fe.status="error",fe.value=be}return fe}E.resolve=G;function G(H){return H instanceof this?H:u.resolve(new this(l),H)}E.reject=te;function te(H){var ve=new this(l);return u.reject(ve,H)}E.all=q;function q(H){var ve=this;if(Object.prototype.toString.call(H)!=="[object Array]")return this.reject(new TypeError("must be an array"));var fe=H.length,be=!1;if(!fe)return this.resolve([]);for(var Ve=new Array(fe),Ne=0,Le=-1,Ye=new this(l);++Le<fe;)Ke(H[Le],Le);return Ye;function Ke(_t,D){ve.resolve(_t).then(O,function(L){be||(be=!0,u.reject(Ye,L))});function O(L){Ve[D]=L,++Ne===fe&&!be&&(be=!0,u.resolve(Ye,Ve))}}}E.race=Ae;function Ae(H){var ve=this;if(Object.prototype.toString.call(H)!=="[object Array]")return this.reject(new TypeError("must be an array"));var fe=H.length,be=!1;if(!fe)return this.resolve([]);for(var Ve=-1,Ne=new this(l);++Ve<fe;)Le(H[Ve]);return Ne;function Le(Ye){ve.resolve(Ye).then(function(Ke){be||(be=!0,u.resolve(Ne,Ke))},function(Ke){be||(be=!0,u.reject(Ne,Ke))})}}},{1:1}],3:[function(r,i,o){(function(s){"use strict";typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,i,o){"use strict";var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};function l(f,b){if(!(f instanceof b))throw new TypeError("Cannot call a class as a function")}function u(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var d=u();function _(){try{if(!d||!d.open)return!1;var f=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),b=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!f||b)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function h(f,b){f=f||[],b=b||{};try{return new Blob(f,b)}catch(C){if(C.name!=="TypeError")throw C;for(var m=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,S=new m,I=0;I<f.length;I+=1)S.append(f[I]);return S.getBlob(b.type)}}typeof Promise>"u"&&r(3);var E=Promise;function w(f,b){b&&f.then(function(m){b(null,m)},function(m){b(m)})}function N(f,b,m){typeof b=="function"&&f.then(b),typeof m=="function"&&f.catch(m)}function B(f){return typeof f!="string"&&(console.warn(f+" used as a key, but it is not a string."),f=String(f)),f}function P(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var Y="local-forage-detect-blob-support",G=void 0,te={},q=Object.prototype.toString,Ae="readonly",H="readwrite";function ve(f){for(var b=f.length,m=new ArrayBuffer(b),S=new Uint8Array(m),I=0;I<b;I++)S[I]=f.charCodeAt(I);return m}function fe(f){return new E(function(b){var m=f.transaction(Y,H),S=h([""]);m.objectStore(Y).put(S,"key"),m.onabort=function(I){I.preventDefault(),I.stopPropagation(),b(!1)},m.oncomplete=function(){var I=navigator.userAgent.match(/Chrome\/(\d+)/),C=navigator.userAgent.match(/Edge\//);b(C||!I||parseInt(I[1],10)>=43)}}).catch(function(){return!1})}function be(f){return typeof G=="boolean"?E.resolve(G):fe(f).then(function(b){return G=b,G})}function Ve(f){var b=te[f.name],m={};m.promise=new E(function(S,I){m.resolve=S,m.reject=I}),b.deferredOperations.push(m),b.dbReady?b.dbReady=b.dbReady.then(function(){return m.promise}):b.dbReady=m.promise}function Ne(f){var b=te[f.name],m=b.deferredOperations.pop();if(m)return m.resolve(),m.promise}function Le(f,b){var m=te[f.name],S=m.deferredOperations.pop();if(S)return S.reject(b),S.promise}function Ye(f,b){return new E(function(m,S){if(te[f.name]=te[f.name]||K(),f.db)if(b)Ve(f),f.db.close();else return m(f.db);var I=[f.name];b&&I.push(f.version);var C=d.open.apply(d,I);b&&(C.onupgradeneeded=function(R){var k=C.result;try{k.createObjectStore(f.storeName),R.oldVersion<=1&&k.createObjectStore(Y)}catch(j){if(j.name==="ConstraintError")console.warn('The database "'+f.name+'" has been upgraded from version '+R.oldVersion+" to version "+R.newVersion+', but the storage "'+f.storeName+'" already exists.');else throw j}}),C.onerror=function(R){R.preventDefault(),S(C.error)},C.onsuccess=function(){var R=C.result;R.onversionchange=function(k){k.target.close()},m(R),Ne(f)}})}function Ke(f){return Ye(f,!1)}function _t(f){return Ye(f,!0)}function D(f,b){if(!f.db)return!0;var m=!f.db.objectStoreNames.contains(f.storeName),S=f.version<f.db.version,I=f.version>f.db.version;if(S&&(f.version!==b&&console.warn('The database "'+f.name+`" can't be downgraded from version `+f.db.version+" to version "+f.version+"."),f.version=f.db.version),I||m){if(m){var C=f.db.version+1;C>f.version&&(f.version=C)}return!0}return!1}function O(f){return new E(function(b,m){var S=new FileReader;S.onerror=m,S.onloadend=function(I){var C=btoa(I.target.result||"");b({__local_forage_encoded_blob:!0,data:C,type:f.type})},S.readAsBinaryString(f)})}function L(f){var b=ve(atob(f.data));return h([b],{type:f.type})}function M(f){return f&&f.__local_forage_encoded_blob}function v(f){var b=this,m=b._initReady().then(function(){var S=te[b._dbInfo.name];if(S&&S.dbReady)return S.dbReady});return N(m,f,f),m}function y(f){Ve(f);for(var b=te[f.name],m=b.forages,S=0;S<m.length;S++){var I=m[S];I._dbInfo.db&&(I._dbInfo.db.close(),I._dbInfo.db=null)}return f.db=null,Ke(f).then(function(C){return f.db=C,D(f)?_t(f):C}).then(function(C){f.db=b.db=C;for(var R=0;R<m.length;R++)m[R]._dbInfo.db=C}).catch(function(C){throw Le(f,C),C})}function U(f,b,m,S){S===void 0&&(S=1);try{var I=f.db.transaction(f.storeName,b);m(null,I)}catch(C){if(S>0&&(!f.db||C.name==="InvalidStateError"||C.name==="NotFoundError"))return E.resolve().then(function(){if(!f.db||C.name==="NotFoundError"&&!f.db.objectStoreNames.contains(f.storeName)&&f.version<=f.db.version)return f.db&&(f.version=f.db.version+1),_t(f)}).then(function(){return y(f).then(function(){U(f,b,m,S-1)})}).catch(m);m(C)}}function K(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function oe(f){var b=this,m={db:null};if(f)for(var S in f)m[S]=f[S];var I=te[m.name];I||(I=K(),te[m.name]=I),I.forages.push(b),b._initReady||(b._initReady=b.ready,b.ready=v);var C=[];function R(){return E.resolve()}for(var k=0;k<I.forages.length;k++){var j=I.forages[k];j!==b&&C.push(j._initReady().catch(R))}var $=I.forages.slice(0);return E.all(C).then(function(){return m.db=I.db,Ke(m)}).then(function(W){return m.db=W,D(m,b._defaultConfig.version)?_t(m):W}).then(function(W){m.db=I.db=W,b._dbInfo=m;for(var se=0;se<$.length;se++){var xe=$[se];xe!==b&&(xe._dbInfo.db=m.db,xe._dbInfo.version=m.version)}})}function ae(f,b){var m=this;f=B(f);var S=new E(function(I,C){m.ready().then(function(){U(m._dbInfo,Ae,function(R,k){if(R)return C(R);try{var j=k.objectStore(m._dbInfo.storeName),$=j.get(f);$.onsuccess=function(){var W=$.result;W===void 0&&(W=null),M(W)&&(W=L(W)),I(W)},$.onerror=function(){C($.error)}}catch(W){C(W)}})}).catch(C)});return w(S,b),S}function de(f,b){var m=this,S=new E(function(I,C){m.ready().then(function(){U(m._dbInfo,Ae,function(R,k){if(R)return C(R);try{var j=k.objectStore(m._dbInfo.storeName),$=j.openCursor(),W=1;$.onsuccess=function(){var se=$.result;if(se){var xe=se.value;M(xe)&&(xe=L(xe));var Ue=f(xe,se.key,W++);Ue!==void 0?I(Ue):se.continue()}else I()},$.onerror=function(){C($.error)}}catch(se){C(se)}})}).catch(C)});return w(S,b),S}function ee(f,b,m){var S=this;f=B(f);var I=new E(function(C,R){var k;S.ready().then(function(){return k=S._dbInfo,q.call(b)==="[object Blob]"?be(k.db).then(function(j){return j?b:O(b)}):b}).then(function(j){U(S._dbInfo,H,function($,W){if($)return R($);try{var se=W.objectStore(S._dbInfo.storeName);j===null&&(j=void 0);var xe=se.put(j,f);W.oncomplete=function(){j===void 0&&(j=null),C(j)},W.onabort=W.onerror=function(){var Ue=xe.error?xe.error:xe.transaction.error;R(Ue)}}catch(Ue){R(Ue)}})}).catch(R)});return w(I,m),I}function ce(f,b){var m=this;f=B(f);var S=new E(function(I,C){m.ready().then(function(){U(m._dbInfo,H,function(R,k){if(R)return C(R);try{var j=k.objectStore(m._dbInfo.storeName),$=j.delete(f);k.oncomplete=function(){I()},k.onerror=function(){C($.error)},k.onabort=function(){var W=$.error?$.error:$.transaction.error;C(W)}}catch(W){C(W)}})}).catch(C)});return w(S,b),S}function re(f){var b=this,m=new E(function(S,I){b.ready().then(function(){U(b._dbInfo,H,function(C,R){if(C)return I(C);try{var k=R.objectStore(b._dbInfo.storeName),j=k.clear();R.oncomplete=function(){S()},R.onabort=R.onerror=function(){var $=j.error?j.error:j.transaction.error;I($)}}catch($){I($)}})}).catch(I)});return w(m,f),m}function he(f){var b=this,m=new E(function(S,I){b.ready().then(function(){U(b._dbInfo,Ae,function(C,R){if(C)return I(C);try{var k=R.objectStore(b._dbInfo.storeName),j=k.count();j.onsuccess=function(){S(j.result)},j.onerror=function(){I(j.error)}}catch($){I($)}})}).catch(I)});return w(m,f),m}function le(f,b){var m=this,S=new E(function(I,C){if(f<0){I(null);return}m.ready().then(function(){U(m._dbInfo,Ae,function(R,k){if(R)return C(R);try{var j=k.objectStore(m._dbInfo.storeName),$=!1,W=j.openKeyCursor();W.onsuccess=function(){var se=W.result;if(!se){I(null);return}f===0||$?I(se.key):($=!0,se.advance(f))},W.onerror=function(){C(W.error)}}catch(se){C(se)}})}).catch(C)});return w(S,b),S}function me(f){var b=this,m=new E(function(S,I){b.ready().then(function(){U(b._dbInfo,Ae,function(C,R){if(C)return I(C);try{var k=R.objectStore(b._dbInfo.storeName),j=k.openKeyCursor(),$=[];j.onsuccess=function(){var W=j.result;if(!W){S($);return}$.push(W.key),W.continue()},j.onerror=function(){I(j.error)}}catch(W){I(W)}})}).catch(I)});return w(m,f),m}function ge(f,b){b=P.apply(this,arguments);var m=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||m.name,f.storeName=f.storeName||m.storeName);var S=this,I;if(!f.name)I=E.reject("Invalid arguments");else{var C=f.name===m.name&&S._dbInfo.db,R=C?E.resolve(S._dbInfo.db):Ke(f).then(function(k){var j=te[f.name],$=j.forages;j.db=k;for(var W=0;W<$.length;W++)$[W]._dbInfo.db=k;return k});f.storeName?I=R.then(function(k){if(k.objectStoreNames.contains(f.storeName)){var j=k.version+1;Ve(f);var $=te[f.name],W=$.forages;k.close();for(var se=0;se<W.length;se++){var xe=W[se];xe._dbInfo.db=null,xe._dbInfo.version=j}var Ue=new E(function(He,ut){var ot=d.open(f.name,j);ot.onerror=function(Xt){var Qr=ot.result;Qr.close(),ut(Xt)},ot.onupgradeneeded=function(){var Xt=ot.result;Xt.deleteObjectStore(f.storeName)},ot.onsuccess=function(){var Xt=ot.result;Xt.close(),He(Xt)}});return Ue.then(function(He){$.db=He;for(var ut=0;ut<W.length;ut++){var ot=W[ut];ot._dbInfo.db=He,Ne(ot._dbInfo)}}).catch(function(He){throw(Le(f,He)||E.resolve()).catch(function(){}),He})}}):I=R.then(function(k){Ve(f);var j=te[f.name],$=j.forages;k.close();for(var W=0;W<$.length;W++){var se=$[W];se._dbInfo.db=null}var xe=new E(function(Ue,He){var ut=d.deleteDatabase(f.name);ut.onerror=function(){var ot=ut.result;ot&&ot.close(),He(ut.error)},ut.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},ut.onsuccess=function(){var ot=ut.result;ot&&ot.close(),Ue(ot)}});return xe.then(function(Ue){j.db=Ue;for(var He=0;He<$.length;He++){var ut=$[He];Ne(ut._dbInfo)}}).catch(function(Ue){throw(Le(f,Ue)||E.resolve()).catch(function(){}),Ue})})}return w(I,b),I}var _e={_driver:"asyncStorage",_initStorage:oe,_support:_(),iterate:de,getItem:ae,setItem:ee,removeItem:ce,clear:re,length:he,key:le,keys:me,dropInstance:ge};function p(){return typeof openDatabase=="function"}var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="~~local_forage_type~",g=/^~~local_forage_type~([^~]+)~/,T="__lfsc__:",A=T.length,F="arbf",ye="blob",Ie="si08",we="ui08",ke="uic8",Be="si16",Qe="si32",Ht="ur16",Kt="ui32",Tn="fl32",xt="fl64",jt=A+F.length,ki=Object.prototype.toString;function il(f){var b=f.length*.75,m=f.length,S,I=0,C,R,k,j;f[f.length-1]==="="&&(b--,f[f.length-2]==="="&&b--);var $=new ArrayBuffer(b),W=new Uint8Array($);for(S=0;S<m;S+=4)C=a.indexOf(f[S]),R=a.indexOf(f[S+1]),k=a.indexOf(f[S+2]),j=a.indexOf(f[S+3]),W[I++]=C<<2|R>>4,W[I++]=(R&15)<<4|k>>2,W[I++]=(k&3)<<6|j&63;return $}function ws(f){var b=new Uint8Array(f),m="",S;for(S=0;S<b.length;S+=3)m+=a[b[S]>>2],m+=a[(b[S]&3)<<4|b[S+1]>>4],m+=a[(b[S+1]&15)<<2|b[S+2]>>6],m+=a[b[S+2]&63];return b.length%3===2?m=m.substring(0,m.length-1)+"=":b.length%3===1&&(m=m.substring(0,m.length-2)+"=="),m}function Dp(f,b){var m="";if(f&&(m=ki.call(f)),f&&(m==="[object ArrayBuffer]"||f.buffer&&ki.call(f.buffer)==="[object ArrayBuffer]")){var S,I=T;f instanceof ArrayBuffer?(S=f,I+=F):(S=f.buffer,m==="[object Int8Array]"?I+=Ie:m==="[object Uint8Array]"?I+=we:m==="[object Uint8ClampedArray]"?I+=ke:m==="[object Int16Array]"?I+=Be:m==="[object Uint16Array]"?I+=Ht:m==="[object Int32Array]"?I+=Qe:m==="[object Uint32Array]"?I+=Kt:m==="[object Float32Array]"?I+=Tn:m==="[object Float64Array]"?I+=xt:b(new Error("Failed to get type for BinaryArray"))),b(I+ws(S))}else if(m==="[object Blob]"){var C=new FileReader;C.onload=function(){var R=c+f.type+"~"+ws(this.result);b(T+ye+R)},C.readAsArrayBuffer(f)}else try{b(JSON.stringify(f))}catch(R){console.error("Couldn't convert value into a JSON string: ",f),b(null,R)}}function Ap(f){if(f.substring(0,A)!==T)return JSON.parse(f);var b=f.substring(jt),m=f.substring(A,jt),S;if(m===ye&&g.test(b)){var I=b.match(g);S=I[1],b=b.substring(I[0].length)}var C=il(b);switch(m){case F:return C;case ye:return h([C],{type:S});case Ie:return new Int8Array(C);case we:return new Uint8Array(C);case ke:return new Uint8ClampedArray(C);case Be:return new Int16Array(C);case Ht:return new Uint16Array(C);case Qe:return new Int32Array(C);case Kt:return new Uint32Array(C);case Tn:return new Float32Array(C);case xt:return new Float64Array(C);default:throw new Error("Unkown type: "+m)}}var Cs={serialize:Dp,deserialize:Ap,stringToBuffer:il,bufferToString:ws};function ol(f,b,m,S){f.executeSql("CREATE TABLE IF NOT EXISTS "+b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],m,S)}function Np(f){var b=this,m={db:null};if(f)for(var S in f)m[S]=typeof f[S]!="string"?f[S].toString():f[S];var I=new E(function(C,R){try{m.db=openDatabase(m.name,String(m.version),m.description,m.size)}catch(k){return R(k)}m.db.transaction(function(k){ol(k,m,function(){b._dbInfo=m,C()},function(j,$){R($)})},R)});return m.serializer=Cs,I}function Hn(f,b,m,S,I,C){f.executeSql(m,S,I,function(R,k){k.code===k.SYNTAX_ERR?R.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[b.storeName],function(j,$){$.rows.length?C(j,k):ol(j,b,function(){j.executeSql(m,S,I,C)},C)},C):C(R,k)},C)}function Rp(f,b){var m=this;f=B(f);var S=new E(function(I,C){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(k){Hn(k,R,"SELECT * FROM "+R.storeName+" WHERE key = ? LIMIT 1",[f],function(j,$){var W=$.rows.length?$.rows.item(0).value:null;W&&(W=R.serializer.deserialize(W)),I(W)},function(j,$){C($)})})}).catch(C)});return w(S,b),S}function Mp(f,b){var m=this,S=new E(function(I,C){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(k){Hn(k,R,"SELECT * FROM "+R.storeName,[],function(j,$){for(var W=$.rows,se=W.length,xe=0;xe<se;xe++){var Ue=W.item(xe),He=Ue.value;if(He&&(He=R.serializer.deserialize(He)),He=f(He,Ue.key,xe+1),He!==void 0){I(He);return}}I()},function(j,$){C($)})})}).catch(C)});return w(S,b),S}function sl(f,b,m,S){var I=this;f=B(f);var C=new E(function(R,k){I.ready().then(function(){b===void 0&&(b=null);var j=b,$=I._dbInfo;$.serializer.serialize(b,function(W,se){se?k(se):$.db.transaction(function(xe){Hn(xe,$,"INSERT OR REPLACE INTO "+$.storeName+" (key, value) VALUES (?, ?)",[f,W],function(){R(j)},function(Ue,He){k(He)})},function(xe){if(xe.code===xe.QUOTA_ERR){if(S>0){R(sl.apply(I,[f,j,m,S-1]));return}k(xe)}})})}).catch(k)});return w(C,m),C}function Pp(f,b,m){return sl.apply(this,[f,b,m,1])}function Lp(f,b){var m=this;f=B(f);var S=new E(function(I,C){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(k){Hn(k,R,"DELETE FROM "+R.storeName+" WHERE key = ?",[f],function(){I()},function(j,$){C($)})})}).catch(C)});return w(S,b),S}function Fp(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var C=b._dbInfo;C.db.transaction(function(R){Hn(R,C,"DELETE FROM "+C.storeName,[],function(){S()},function(k,j){I(j)})})}).catch(I)});return w(m,f),m}function Vp(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var C=b._dbInfo;C.db.transaction(function(R){Hn(R,C,"SELECT COUNT(key) as c FROM "+C.storeName,[],function(k,j){var $=j.rows.item(0).c;S($)},function(k,j){I(j)})})}).catch(I)});return w(m,f),m}function kp(f,b){var m=this,S=new E(function(I,C){m.ready().then(function(){var R=m._dbInfo;R.db.transaction(function(k){Hn(k,R,"SELECT key FROM "+R.storeName+" WHERE id = ? LIMIT 1",[f+1],function(j,$){var W=$.rows.length?$.rows.item(0).key:null;I(W)},function(j,$){C($)})})}).catch(C)});return w(S,b),S}function Bp(f){var b=this,m=new E(function(S,I){b.ready().then(function(){var C=b._dbInfo;C.db.transaction(function(R){Hn(R,C,"SELECT key FROM "+C.storeName,[],function(k,j){for(var $=[],W=0;W<j.rows.length;W++)$.push(j.rows.item(W).key);S($)},function(k,j){I(j)})})}).catch(I)});return w(m,f),m}function Up(f){return new E(function(b,m){f.transaction(function(S){S.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(I,C){for(var R=[],k=0;k<C.rows.length;k++)R.push(C.rows.item(k).name);b({db:f,storeNames:R})},function(I,C){m(C)})},function(S){m(S)})})}function Hp(f,b){b=P.apply(this,arguments);var m=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||m.name,f.storeName=f.storeName||m.storeName);var S=this,I;return f.name?I=new E(function(C){var R;f.name===m.name?R=S._dbInfo.db:R=openDatabase(f.name,"","",0),f.storeName?C({db:R,storeNames:[f.storeName]}):C(Up(R))}).then(function(C){return new E(function(R,k){C.db.transaction(function(j){function $(Ue){return new E(function(He,ut){j.executeSql("DROP TABLE IF EXISTS "+Ue,[],function(){He()},function(ot,Xt){ut(Xt)})})}for(var W=[],se=0,xe=C.storeNames.length;se<xe;se++)W.push($(C.storeNames[se]));E.all(W).then(function(){R()}).catch(function(Ue){k(Ue)})},function(j){k(j)})})}):I=E.reject("Invalid arguments"),w(I,b),I}var jp={_driver:"webSQLStorage",_initStorage:Np,_support:p(),iterate:Mp,getItem:Rp,setItem:Pp,removeItem:Lp,clear:Fp,length:Vp,key:kp,keys:Bp,dropInstance:Hp};function $p(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function al(f,b){var m=f.name+"/";return f.storeName!==b.storeName&&(m+=f.storeName+"/"),m}function Gp(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch{return!0}}function Wp(){return!Gp()||localStorage.length>0}function Yp(f){var b=this,m={};if(f)for(var S in f)m[S]=f[S];return m.keyPrefix=al(f,b._defaultConfig),Wp()?(b._dbInfo=m,m.serializer=Cs,E.resolve()):E.reject()}function zp(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo.keyPrefix,I=localStorage.length-1;I>=0;I--){var C=localStorage.key(I);C.indexOf(S)===0&&localStorage.removeItem(C)}});return w(m,f),m}function qp(f,b){var m=this;f=B(f);var S=m.ready().then(function(){var I=m._dbInfo,C=localStorage.getItem(I.keyPrefix+f);return C&&(C=I.serializer.deserialize(C)),C});return w(S,b),S}function Kp(f,b){var m=this,S=m.ready().then(function(){for(var I=m._dbInfo,C=I.keyPrefix,R=C.length,k=localStorage.length,j=1,$=0;$<k;$++){var W=localStorage.key($);if(W.indexOf(C)===0){var se=localStorage.getItem(W);if(se&&(se=I.serializer.deserialize(se)),se=f(se,W.substring(R),j++),se!==void 0)return se}}});return w(S,b),S}function Xp(f,b){var m=this,S=m.ready().then(function(){var I=m._dbInfo,C;try{C=localStorage.key(f)}catch{C=null}return C&&(C=C.substring(I.keyPrefix.length)),C});return w(S,b),S}function Jp(f){var b=this,m=b.ready().then(function(){for(var S=b._dbInfo,I=localStorage.length,C=[],R=0;R<I;R++){var k=localStorage.key(R);k.indexOf(S.keyPrefix)===0&&C.push(k.substring(S.keyPrefix.length))}return C});return w(m,f),m}function Zp(f){var b=this,m=b.keys().then(function(S){return S.length});return w(m,f),m}function Qp(f,b){var m=this;f=B(f);var S=m.ready().then(function(){var I=m._dbInfo;localStorage.removeItem(I.keyPrefix+f)});return w(S,b),S}function eh(f,b,m){var S=this;f=B(f);var I=S.ready().then(function(){b===void 0&&(b=null);var C=b;return new E(function(R,k){var j=S._dbInfo;j.serializer.serialize(b,function($,W){if(W)k(W);else try{localStorage.setItem(j.keyPrefix+f,$),R(C)}catch(se){(se.name==="QuotaExceededError"||se.name==="NS_ERROR_DOM_QUOTA_REACHED")&&k(se),k(se)}})})});return w(I,m),I}function th(f,b){if(b=P.apply(this,arguments),f=typeof f!="function"&&f||{},!f.name){var m=this.config();f.name=f.name||m.name,f.storeName=f.storeName||m.storeName}var S=this,I;return f.name?I=new E(function(C){f.storeName?C(al(f,S._defaultConfig)):C(f.name+"/")}).then(function(C){for(var R=localStorage.length-1;R>=0;R--){var k=localStorage.key(R);k.indexOf(C)===0&&localStorage.removeItem(k)}}):I=E.reject("Invalid arguments"),w(I,b),I}var nh={_driver:"localStorageWrapper",_initStorage:Yp,_support:$p(),iterate:Kp,getItem:qp,setItem:eh,removeItem:Qp,clear:zp,length:Zp,key:Xp,keys:Jp,dropInstance:th},rh=function(b,m){return b===m||typeof b=="number"&&typeof m=="number"&&isNaN(b)&&isNaN(m)},ih=function(b,m){for(var S=b.length,I=0;I<S;){if(rh(b[I],m))return!0;I++}return!1},cl=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},Zr={},ll={},_r={INDEXEDDB:_e,WEBSQL:jp,LOCALSTORAGE:nh},oh=[_r.INDEXEDDB._driver,_r.WEBSQL._driver,_r.LOCALSTORAGE._driver],Bi=["dropInstance"],Ss=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Bi),sh={description:"",driver:oh.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ah(f,b){f[b]=function(){var m=arguments;return f.ready().then(function(){return f[b].apply(f,m)})}}function Ts(){for(var f=1;f<arguments.length;f++){var b=arguments[f];if(b)for(var m in b)b.hasOwnProperty(m)&&(cl(b[m])?arguments[0][m]=b[m].slice():arguments[0][m]=b[m])}return arguments[0]}var ch=function(){function f(b){l(this,f);for(var m in _r)if(_r.hasOwnProperty(m)){var S=_r[m],I=S._driver;this[m]=I,Zr[I]||this.defineDriver(S)}this._defaultConfig=Ts({},sh),this._config=Ts({},this._defaultConfig,b),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return f.prototype.config=function(m){if((typeof m>"u"?"undefined":s(m))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var S in m){if(S==="storeName"&&(m[S]=m[S].replace(/\W/g,"_")),S==="version"&&typeof m[S]!="number")return new Error("Database version must be a number.");this._config[S]=m[S]}return"driver"in m&&m.driver?this.setDriver(this._config.driver):!0}else return typeof m=="string"?this._config[m]:this._config},f.prototype.defineDriver=function(m,S,I){var C=new E(function(R,k){try{var j=m._driver,$=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!m._driver){k($);return}for(var W=Ss.concat("_initStorage"),se=0,xe=W.length;se<xe;se++){var Ue=W[se],He=!ih(Bi,Ue);if((He||m[Ue])&&typeof m[Ue]!="function"){k($);return}}var ut=function(){for(var Qr=function(dh){return function(){var fh=new Error("Method "+dh+" is not implemented by the current driver"),ul=E.reject(fh);return w(ul,arguments[arguments.length-1]),ul}},Is=0,uh=Bi.length;Is<uh;Is++){var xs=Bi[Is];m[xs]||(m[xs]=Qr(xs))}};ut();var ot=function(Qr){Zr[j]&&console.info("Redefining LocalForage driver: "+j),Zr[j]=m,ll[j]=Qr,R()};"_support"in m?m._support&&typeof m._support=="function"?m._support().then(ot,k):ot(!!m._support):ot(!0)}catch(Xt){k(Xt)}});return N(C,S,I),C},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(m,S,I){var C=Zr[m]?E.resolve(Zr[m]):E.reject(new Error("Driver not found."));return N(C,S,I),C},f.prototype.getSerializer=function(m){var S=E.resolve(Cs);return N(S,m),S},f.prototype.ready=function(m){var S=this,I=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return N(I,m,m),I},f.prototype.setDriver=function(m,S,I){var C=this;cl(m)||(m=[m]);var R=this._getSupportedDrivers(m);function k(){C._config.driver=C.driver()}function j(se){return C._extend(se),k(),C._ready=C._initStorage(C._config),C._ready}function $(se){return function(){var xe=0;function Ue(){for(;xe<se.length;){var He=se[xe];return xe++,C._dbInfo=null,C._ready=null,C.getDriver(He).then(j).catch(Ue)}k();var ut=new Error("No available storage method found.");return C._driverSet=E.reject(ut),C._driverSet}return Ue()}}var W=this._driverSet!==null?this._driverSet.catch(function(){return E.resolve()}):E.resolve();return this._driverSet=W.then(function(){var se=R[0];return C._dbInfo=null,C._ready=null,C.getDriver(se).then(function(xe){C._driver=xe._driver,k(),C._wrapLibraryMethodsWithReady(),C._initDriver=$(R)})}).catch(function(){k();var se=new Error("No available storage method found.");return C._driverSet=E.reject(se),C._driverSet}),N(this._driverSet,S,I),this._driverSet},f.prototype.supports=function(m){return!!ll[m]},f.prototype._extend=function(m){Ts(this,m)},f.prototype._getSupportedDrivers=function(m){for(var S=[],I=0,C=m.length;I<C;I++){var R=m[I];this.supports(R)&&S.push(R)}return S},f.prototype._wrapLibraryMethodsWithReady=function(){for(var m=0,S=Ss.length;m<S;m++)ah(this,Ss[m])},f.prototype.createInstance=function(m){return new f(m)},f}(),lh=new ch;i.exports=lh},{3:3}]},{},[4])(4)})});var ou=Ui((Ys,zs)=>{"use strict";(function(t,e){typeof Ys=="object"&&typeof zs<"u"?zs.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.fetchRetry=e())})(Ys,function(){"use strict";var t=function(r,i){if(i=i||{},typeof r!="function")throw new n("fetch must be a function");if(typeof i!="object")throw new n("defaults must be an object");if(i.retries!==void 0&&!e(i.retries))throw new n("retries must be a positive integer");if(i.retryDelay!==void 0&&!e(i.retryDelay)&&typeof i.retryDelay!="function")throw new n("retryDelay must be a positive integer or a function returning a positive integer");if(i.retryOn!==void 0&&!Array.isArray(i.retryOn)&&typeof i.retryOn!="function")throw new n("retryOn property expects an array or function");var o={retries:3,retryDelay:1e3,retryOn:[]};return i=Object.assign(o,i),function(l,u){var d=i.retries,_=i.retryDelay,h=i.retryOn;if(u&&u.retries!==void 0)if(e(u.retries))d=u.retries;else throw new n("retries must be a positive integer");if(u&&u.retryDelay!==void 0)if(e(u.retryDelay)||typeof u.retryDelay=="function")_=u.retryDelay;else throw new n("retryDelay must be a positive integer or a function returning a positive integer");if(u&&u.retryOn)if(Array.isArray(u.retryOn)||typeof u.retryOn=="function")h=u.retryOn;else throw new n("retryOn property expects an array or function");return new Promise(function(E,w){var N=function(P){var Y=typeof Request<"u"&&l instanceof Request?l.clone():l;r(Y,u).then(function(G){if(Array.isArray(h)&&h.indexOf(G.status)===-1)E(G);else if(typeof h=="function")try{return Promise.resolve(h(P,null,G)).then(function(te){te?B(P,null,G):E(G)}).catch(w)}catch(te){w(te)}else P<d?B(P,null,G):E(G)}).catch(function(G){if(typeof h=="function")try{Promise.resolve(h(P,G,null)).then(function(te){te?B(P,G,null):w(G)}).catch(function(te){w(te)})}catch(te){w(te)}else P<d?B(P,G,null):w(G)})};function B(P,Y,G){var te=typeof _=="function"?_(P,Y,G):_;setTimeout(function(){N(++P)},te)}N(0)})}};function e(r){return Number.isInteger(r)&&r>=0}function n(r){this.name="ArgumentError",this.message=r}return t})});var ef=Ui(($o,Qd)=>{"use strict";(function(t,e){typeof $o=="object"&&typeof Qd<"u"?e($o):typeof define=="function"&&define.amd?define(["exports"],e):e((t=typeof globalThis<"u"?globalThis:t||self).Sqrl={})})($o,function(t){"use strict";function e(D){var O,L,M=new Error(D);return O=M,L=e.prototype,Object.setPrototypeOf?Object.setPrototypeOf(O,L):O.__proto__=L,M}function n(D,O,L){var M=O.slice(0,L).split(/\n/),v=M.length,y=M[v-1].length+1;throw e(D+=" at line "+v+" col "+y+`:
`+O.split(/\n/)[v-1]+`
`+Array(y).join(" ")+"^")}e.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});var r=new Function("return this")().Promise,i=!1;try{i=new Function("return (async function(){}).constructor")()}catch(D){if(!(D instanceof SyntaxError))throw D}function o(D,O){return Object.prototype.hasOwnProperty.call(D,O)}function s(D,O,L){for(var M in O)o(O,M)&&(O[M]==null||typeof O[M]!="object"||M!=="storage"&&M!=="prefixes"||L?D[M]=O[M]:D[M]=s({},O[M]));return D}var l=/^async +/,u=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,d=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,_=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g,h=/[.*+\-?^${}()|[\]\\]/g;function E(D){return h.test(D)?D.replace(h,"\\$&"):D}function w(D,O){O.rmWhitespace&&(D=D.replace(/[\r\n]+/g,`
`).replace(/^\s+|\s+$/gm,"")),u.lastIndex=0,d.lastIndex=0,_.lastIndex=0;var L=O.prefixes,M=[L.h,L.b,L.i,L.r,L.c,L.e].reduce(function(ce,re){return ce&&re?ce+"|"+E(re):re?E(re):ce},""),v=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+E(O.tags[1])+")","g"),y=new RegExp("([^]*?)"+E(O.tags[0])+"(-|_)?\\s*("+M+")?\\s*","g"),U=0,K=!1;function oe(ce,re){var he,le={f:[]},me=0,ge="c";function _e(ye){var Ie=D.slice(U,ye),we=Ie.trim();if(ge==="f")we==="safe"?le.raw=!0:O.async&&l.test(we)?(we=we.replace(l,""),le.f.push([we,"",!0])):le.f.push([we,""]);else if(ge==="fp")le.f[le.f.length-1][1]+=we;else if(ge==="err"){if(we){var ke=Ie.search(/\S/);n("invalid syntax",D,U+ke)}}else le[ge]=we;U=ye+1}for(re==="h"||re==="b"||re==="c"?ge="n":re==="r"&&(le.raw=!0,re="i"),v.lastIndex=U;(he=v.exec(D))!==null;){var p=he[1],a=he[2],c=he[3],g=he[4],T=he[5],A=he.index;if(p)p==="("?(me===0&&(ge==="n"?(_e(A),ge="p"):ge==="f"&&(_e(A),ge="fp")),me++):p===")"?--me===0&&ge!=="c"&&(_e(A),ge="err"):me===0&&p==="|"?(_e(A),ge="f"):p==="=>"&&(_e(A),U+=1,ge="res");else if(a)if(a==="/*"){var F=D.indexOf("*/",v.lastIndex);F===-1&&n("unclosed comment",D,he.index),v.lastIndex=F+2}else a==="'"?(d.lastIndex=he.index,d.exec(D)?v.lastIndex=d.lastIndex:n("unclosed string",D,he.index)):a==='"'?(_.lastIndex=he.index,_.exec(D)?v.lastIndex=_.lastIndex:n("unclosed string",D,he.index)):a==="`"&&(u.lastIndex=he.index,u.exec(D)?v.lastIndex=u.lastIndex:n("unclosed string",D,he.index));else if(c)return _e(A),U=A+he[0].length,y.lastIndex=U,K=T,g&&re==="h"&&(re="s"),le.t=re,le}return n("unclosed tag",D,ce),le}var ae=function ce(re,he){re.b=[],re.d=[];var le,me=!1,ge=[];function _e(ke,Be){ke&&(ke=function(Qe,Ht,Kt,Tn){var xt,jt;return typeof Ht.autoTrim=="string"?xt=jt=Ht.autoTrim:Array.isArray(Ht.autoTrim)&&(xt=Ht.autoTrim[1],jt=Ht.autoTrim[0]),(Kt||Kt===!1)&&(xt=Kt),(Tn||Tn===!1)&&(jt=Tn),xt==="slurp"&&jt==="slurp"?Qe.trim():(xt==="_"||xt==="slurp"?Qe=String.prototype.trimLeft?Qe.trimLeft():Qe.replace(/^[\s\uFEFF\xA0]+/,""):xt!=="-"&&xt!=="nl"||(Qe=Qe.replace(/^(?:\n|\r|\r\n)/,"")),jt==="_"||jt==="slurp"?Qe=String.prototype.trimRight?Qe.trimRight():Qe.replace(/[\s\uFEFF\xA0]+$/,""):jt!=="-"&&jt!=="nl"||(Qe=Qe.replace(/(?:\n|\r|\r\n)$/,"")),Qe)}(ke,O,K,Be))&&(ke=ke.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),ge.push(ke))}for(;(le=y.exec(D))!==null;){var p,a=le[1],c=le[2],g=le[3]||"";for(var T in L)if(L[T]===g){p=T;break}_e(a,c),U=le.index+le[0].length,p||n("unrecognized tag type: "+g,D,U);var A=oe(le.index,p),F=A.t;if(F==="h"){var ye=A.n||"";O.async&&l.test(ye)&&(A.a=!0,A.n=ye.replace(l,"")),A=ce(A),ge.push(A)}else if(F==="c"){if(re.n===A.n)return me?(me.d=ge,re.b.push(me)):re.d=ge,re;n("Helper start and end don't match",D,le.index+le[0].length)}else if(F==="b"){me?(me.d=ge,re.b.push(me)):re.d=ge;var Ie=A.n||"";O.async&&l.test(Ie)&&(A.a=!0,A.n=Ie.replace(l,"")),me=A,ge=[]}else if(F==="s"){var we=A.n||"";O.async&&l.test(we)&&(A.a=!0,A.n=we.replace(l,"")),ge.push(A)}else ge.push(A)}if(!he)throw e('unclosed helper "'+re.n+'"');return _e(D.slice(U,D.length),!1),re.d=ge,re}({f:[]},!0);if(O.plugins)for(var de=0;de<O.plugins.length;de++){var ee=O.plugins[de];ee.processAST&&(ae.d=ee.processAST(ae.d,O))}return ae.d}function N(D,O){var L=w(D,O),M="var tR='';"+(O.useWith?"with("+O.varName+"||{}){":"")+te(L,O)+"if(cb){cb(null,tR)} return tR"+(O.useWith?"}":"");if(O.plugins)for(var v=0;v<O.plugins.length;v++){var y=O.plugins[v];y.processFnString&&(M=y.processFnString(M,O))}return M}function B(D,O){for(var L=0;L<O.length;L++){var M=O[L][0],v=O[L][1];D=(O[L][2]?"await ":"")+"c.l('F','"+M+"')("+D,v&&(D+=","+v),D+=")"}return D}function P(D,O,L,M,v,y){var U="{exec:"+(v?"async ":"")+G(L,O,D)+",params:["+M+"]";return y&&(U+=",name:'"+y+"'"),v&&(U+=",async:true"),U+="}"}function Y(D,O){for(var L="[",M=0;M<D.length;M++){var v=D[M];L+=P(O,v.res||"",v.d,v.p||"",v.a,v.n),M<D.length&&(L+=",")}return L+="]"}function G(D,O,L){return"function("+O+"){var tR='';"+te(D,L)+"return tR}"}function te(D,O){for(var L=0,M=D.length,v="";L<M;L++){var y=D[L];if(typeof y=="string")v+="tR+='"+y+"';";else{var U=y.t,K=y.c||"",oe=y.f,ae=y.n||"",de=y.p||"",ee=y.res||"",ce=y.b,re=!!y.a;if(U==="i"){O.defaultFilter&&(K="c.l('F','"+O.defaultFilter+"')("+K+")");var he=B(K,oe);!y.raw&&O.autoEscape&&(he="c.l('F','e')("+he+")"),v+="tR+="+he+";"}else if(U==="h")if(O.storage.nativeHelpers.get(ae))v+=O.storage.nativeHelpers.get(ae)(y,O);else{var le=(re?"await ":"")+"c.l('H','"+ae+"')("+P(O,ee,y.d,de,re);le+=ce?","+Y(ce,O):",[]",v+="tR+="+B(le+=",c)",oe)+";"}else U==="s"?v+="tR+="+B((re?"await ":"")+"c.l('H','"+ae+"')({params:["+de+"]},[],c)",oe)+";":U==="e"&&(v+=K+`
`)}}return v}var q=function(){function D(O){this.cache=O}return D.prototype.define=function(O,L){this.cache[O]=L},D.prototype.get=function(O){return this.cache[O]},D.prototype.remove=function(O){delete this.cache[O]},D.prototype.reset=function(){this.cache={}},D.prototype.load=function(O){s(this.cache,O,!0)},D}();function Ae(D,O,L,M){if(O&&O.length>0)throw e((M?"Native":"")+"Helper '"+D+"' doesn't accept blocks");if(L&&L.length>0)throw e((M?"Native":"")+"Helper '"+D+"' doesn't accept filters")}var H={"&":"&","<":"<",">":">",'"':""","'":"'"};function ve(D){return H[D]}var fe=new q({}),be=new q({each:function(D,O){var L="",M=D.params[0];if(Ae("each",O,!1),D.async)return new Promise(function(y){(function U(K,oe,ae,de,ee){ae(K[oe],oe).then(function(ce){de+=ce,oe===K.length-1?ee(de):U(K,oe+1,ae,de,ee)})})(M,0,D.exec,L,y)});for(var v=0;v<M.length;v++)L+=D.exec(M[v],v);return L},foreach:function(D,O){var L=D.params[0];if(Ae("foreach",O,!1),D.async)return new Promise(function(y){(function U(K,oe,ae,de,ee,ce){de(oe[ae],K[oe[ae]]).then(function(re){ee+=re,ae===oe.length-1?ce(ee):U(K,oe,ae+1,de,ee,ce)})})(L,Object.keys(L),0,D.exec,"",y)});var M="";for(var v in L)o(L,v)&&(M+=D.exec(v,L[v]));return M},include:function(D,O,L){Ae("include",O,!1);var M=L.storage.templates.get(D.params[0]);if(!M)throw e('Could not fetch template "'+D.params[0]+'"');return M(D.params[1],L)},extends:function(D,O,L){var M=D.params[1]||{};M.content=D.exec();for(var v=0;v<O.length;v++){var y=O[v];M[y.name]=y.exec()}var U=L.storage.templates.get(D.params[0]);if(!U)throw e('Could not fetch template "'+D.params[0]+'"');return U(M,L)},useScope:function(D,O){return Ae("useScope",O,!1),D.exec(D.params[0])}}),Ve=new q({if:function(D,O){Ae("if",!1,D.f,!0);var L="if("+D.p+"){"+te(D.d,O)+"}";if(D.b)for(var M=0;M<D.b.length;M++){var v=D.b[M];v.n==="else"?L+="else{"+te(v.d,O)+"}":v.n==="elif"&&(L+="else if("+v.p+"){"+te(v.d,O)+"}")}return L},try:function(D,O){if(Ae("try",!1,D.f,!0),!D.b||D.b.length!==1||D.b[0].n!=="catch")throw e("native helper 'try' only accepts 1 block, 'catch'");var L="try{"+te(D.d,O)+"}",M=D.b[0];return L+="catch"+(M.res?"("+M.res+")":"")+"{"+te(M.d,O)+"}"},block:function(D,O){return Ae("block",D.b,D.f,!0),"if(!"+O.varName+"["+D.p+"]){tR+=("+G(D.d,"",O)+")()}else{tR+="+O.varName+"["+D.p+"]}"}}),Ne=new q({e:function(D){var O=String(D);return/[&<>"']/.test(O)?O.replace(/[&<>"']/g,ve):O}}),Le={varName:"it",autoTrim:[!1,"nl"],autoEscape:!0,defaultFilter:!1,tags:["{{","}}"],l:function(D,O){if(D==="H"){var L=this.storage.helpers.get(O);if(L)return L;throw e("Can't find helper '"+O+"'")}if(D==="F"){var M=this.storage.filters.get(O);if(M)return M;throw e("Can't find filter '"+O+"'")}},async:!1,storage:{helpers:be,nativeHelpers:Ve,filters:Ne,templates:fe},prefixes:{h:"@",b:"#",i:"",r:"*",c:"/",e:"!"},cache:!1,plugins:[],useWith:!1};function Ye(D,O){var L={};return s(L,Le),O&&s(L,O),D&&s(L,D),L.l.bind(L),L}function Ke(D,O){var L,M=Ye(O||{}),v=Function;if(M.async){if(!i)throw e("This environment doesn't support async/await");v=i}if(M.varName&&(L=M.varName,/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(L)===!1))throw e("options.varName must be a valid JS identifier");try{return new v(M.varName,"c","cb",N(D,M))}catch(y){throw y instanceof SyntaxError?e(`Bad template syntax
`+y.message+`
`+Array(y.message.length+1).join("=")+`
`+N(D,M)):y}}function _t(D,O){var L;return O.cache&&O.name&&O.storage.templates.get(O.name)?O.storage.templates.get(O.name):(L=typeof D=="function"?D:Ke(D,O),O.cache&&O.name&&O.storage.templates.define(O.name,L),L)}Le.l.bind(Le),t.compile=Ke,t.compileScope=te,t.compileScopeIntoFunction=G,t.compileToString=N,t.defaultConfig=Le,t.filters=Ne,t.getConfig=Ye,t.helpers=be,t.nativeHelpers=Ve,t.parse=w,t.render=function(D,O,L,M){var v=Ye(L||{});if(!v.async)return _t(D,v)(O,v);if(!M){if(typeof r=="function")return new r(function(y,U){try{y(_t(D,v)(O,v))}catch(K){U(K)}});throw e("Please provide a callback function, this env doesn't support Promises")}try{_t(D,v)(O,v,M)}catch(y){return M(y)}},t.templates=fe,Object.defineProperty(t,"__esModule",{value:!0})})});var hh={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function mh(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function gh(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var Vs;function _h(t,e){if(!Vs){let n=Element.prototype;Vs=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?Vs.call(t,e):!1}function vh(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[mh(r)]=[n,i]}),e}function yh(t,e){return e.get(As).resolveComponentFactory(t).inputs}function Eh(t,e){let n=t.childNodes,r=e.map(()=>[]),i=-1;e.some((o,s)=>o==="*"?(i=s,!0):!1);for(let o=0,s=n.length;o<s;++o){let l=n[o],u=bh(l,e,i);u!==-1&&r[u].push(l)}return r}function bh(t,e,n){let r=n;return gh(t)&&e.some((i,o)=>i!=="*"&&_h(t,i)?(r=o,!0):!1),r}var wh=10,ks=class{componentFactory;inputMap=new Map;constructor(e,n){this.componentFactory=n.get(As).resolveComponentFactory(e);for(let r of this.componentFactory.inputs)this.inputMap.set(r.propName,r.templateName)}create(e){return new Bs(this.componentFactory,e,this.inputMap)}},Bs=class{componentFactory;injector;inputMap;eventEmitters=new Os(1);events=this.eventEmitters.pipe(wl(e=>_l(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,n,r){this.componentFactory=e,this.injector=n,this.inputMap=r,this.ngZone=this.injector.get(Gt),this.appRef=this.injector.get(ri),this.cdScheduler=n.get(Cl),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=hh.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},wh))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,n){if(this.componentRef===null){this.initialInputValues.set(e,n);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,n),Tl(this.componentRef.hostView)&&(Il(this.componentRef.changeDetectorRef),this.cdScheduler.notify(6))})}initializeComponent(e){let n=Ot.create({providers:[],parent:this.injector}),r=Eh(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(n,r,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,n]of this.initialInputValues)this.setInputValue(e,n);this.initialInputValues.clear()}initializeOutputs(e){let n=this.componentFactory.outputs.map(({propName:r,templateName:i})=>{let o=e.instance[r];return new ji(s=>{let l=o.subscribe(u=>s.next({name:i,value:u}));return()=>l.unsubscribe()})});this.eventEmitters.next(n)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},Us=class extends HTMLElement{ngElementEventsSubscription=null};function Yl(t,e){let n=yh(t,e.injector),r=e.strategyFactory||new ks(t,e.injector),i=vh(n);class o extends Us{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let l=this._ngElementStrategy=r.create(this.injector||e.injector);n.forEach(({propName:u,transform:d})=>{if(!this.hasOwnProperty(u))return;let _=this[u];delete this[u],l.setInputValue(u,_,d)})}return this._ngElementStrategy}_ngElementStrategy;constructor(l){super(),this.injector=l}attributeChangedCallback(l,u,d,_){let[h,E]=i[l];this.ngElementStrategy.setInputValue(h,d,E)}connectedCallback(){let l=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),l=!0),this.ngElementStrategy.connect(this),l||this.subscribeToEvents()}di