@letscooee/web-sdk 9.9.0 → 9.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.min.js +22 -22
- package/dist/widget.min.js +35 -82
- package/package.json +1 -1
package/dist/widget.min.js
CHANGED
|
@@ -1,83 +1,36 @@
|
|
|
1
|
-
"use strict";(()=>{var lN=Object.create,uu=Object.defineProperty,uN=Object.defineProperties,QE=Object.getOwnPropertyDescriptor,dN=Object.getOwnPropertyDescriptors,fN=Object.getOwnPropertyNames,JE=Object.getOwnPropertySymbols,pN=Object.getPrototypeOf,ew=Object.prototype.hasOwnProperty,hN=Object.prototype.propertyIsEnumerable,qh=(e,t,n)=>t in e?uu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w=(e,t)=>{for(var n in t||={})ew.call(t,n)&&qh(e,n,t[n]);if(JE)for(var n of JE(t))hN.call(t,n)&&qh(e,n,t[n]);return e},ne=(e,t)=>uN(e,dN(t)),Mc=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Wn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mN=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fN(t))!ew.call(e,i)&&i!==n&&uu(e,i,{get:()=>t[i],enumerable:!(r=QE(t,i))||r.enumerable});return e},Re=(e,t,n)=>(n=e!=null?lN(pN(e)):{},mN(t||!e||!e.__esModule?uu(n,"default",{value:e,enumerable:!0}):n,e)),tw=(e,t,n,r)=>{for(var i=r>1?void 0:r?QE(t,n):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&uu(t,n,i),i},Yh=(e,t,n)=>qh(e,typeof t!="symbol"?t+"":t,n),fs=Wn((e,t)=>{"use strict";(function(n){"use strict";var r={};r.VERSION="1.6.1";var i,s={},o=function(d,f){return function(){return f.apply(d,arguments)}},a=function(){var d=arguments,f=d[0],g,m;for(m=1;m<d.length;m++)for(g in d[m])!(g in f)&&d[m].hasOwnProperty(g)&&(f[g]=d[m][g]);return f},l=function(d,f){return{value:d,name:f}};r.TRACE=l(1,"TRACE"),r.DEBUG=l(2,"DEBUG"),r.INFO=l(3,"INFO"),r.TIME=l(4,"TIME"),r.WARN=l(5,"WARN"),r.ERROR=l(8,"ERROR"),r.OFF=l(99,"OFF");var c=function(d){this.context=d,this.setLevel(d.filterLevel),this.log=this.info};c.prototype={setLevel:function(d){d&&"value"in d&&(this.context.filterLevel=d)},getLevel:function(){return this.context.filterLevel},enabledFor:function(d){var f=this.context.filterLevel;return d.value>=f.value},trace:function(){this.invoke(r.TRACE,arguments)},debug:function(){this.invoke(r.DEBUG,arguments)},info:function(){this.invoke(r.INFO,arguments)},warn:function(){this.invoke(r.WARN,arguments)},error:function(){this.invoke(r.ERROR,arguments)},time:function(d){typeof d=="string"&&d.length>0&&this.invoke(r.TIME,[d,"start"])},timeEnd:function(d){typeof d=="string"&&d.length>0&&this.invoke(r.TIME,[d,"end"])},invoke:function(d,f){i&&this.enabledFor(d)&&i(f,a({level:d},this.context))}};var h=new c({filterLevel:r.OFF});(function(){var d=r;d.enabledFor=o(h,h.enabledFor),d.trace=o(h,h.trace),d.debug=o(h,h.debug),d.time=o(h,h.time),d.timeEnd=o(h,h.timeEnd),d.info=o(h,h.info),d.warn=o(h,h.warn),d.error=o(h,h.error),d.log=d.info})(),r.setHandler=function(d){i=d},r.setLevel=function(d){h.setLevel(d);for(var f in s)s.hasOwnProperty(f)&&s[f].setLevel(d)},r.getLevel=function(){return h.getLevel()},r.get=function(d){return s[d]||(s[d]=new c(a({name:d},h.context)))},r.createDefaultHandler=function(d){d=d||{},d.formatter=d.formatter||function(m,_){_.name&&m.unshift("["+_.name+"]")};var f={},g=function(m,_){Function.prototype.apply.call(m,console,_)};return typeof console>"u"?function(){}:function(m,_){m=Array.prototype.slice.call(m);var x=console.log,A;_.level===r.TIME?(A=(_.name?"["+_.name+"] ":"")+m[0],m[1]==="start"?console.time?console.time(A):f[A]=new Date().getTime():console.timeEnd?console.timeEnd(A):g(x,[A+": "+(new Date().getTime()-f[A])+"ms"])):(_.level===r.WARN&&console.warn?x=console.warn:_.level===r.ERROR&&console.error?x=console.error:_.level===r.INFO&&console.info?x=console.info:_.level===r.DEBUG&&console.debug?x=console.debug:_.level===r.TRACE&&console.trace&&(x=console.trace),d.formatter(m,_),g(x,m))}},r.useDefaults=function(d){r.setLevel(d&&d.defaultLevel||r.DEBUG),r.setHandler(r.createDefaultHandler(d))},r.setDefaults=r.useDefaults,typeof define=="function"&&define.amd?define(r):typeof t<"u"&&t.exports?t.exports=r:(r._prevLogger=n.Logger,r.noConflict=function(){return n.Logger=r._prevLogger,r},n.Logger=r)})(e)}),Yn=Wn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MilestoneRewardType=e.ProgressBarLayout=e.EngagementContentSource=e.EngagementObjective=e.OnsiteDeliveryType=e.ClickActionType=e.FrequencyGapUnit=e.FrequencyType=e.RedirectBehaviour=e.EngagementPlacementPosition=e.EngagementCollectionSource=e.PromotionType=e.CartFilterEnum=e.CartCurrencyOperator=e.CartCriteria=e.URLCriteria=e.UTMCriteria=e.CartItemSource=e.EngagementItemSource=e.PurchasedVisitor=e.LoggedInVisitor=e.SessionType=e.EngagementContentType=e.TriggerType=e.EngagementType=e.EngagementStatus=e.TimePreference=e.ScheduleFrequency=e.CriteriaFrequency=void 0;var t=function(E){return E[E.ONCE_PER_USER=1]="ONCE_PER_USER",E[E.ONCE_PER_SESSION=2]="ONCE_PER_SESSION",E[E.EVERY_TIME=3]="EVERY_TIME",E}(t||(e.CriteriaFrequency=t={})),n=function(E){return E[E.ONE_TIME=1]="ONE_TIME",E[E.MULTIPLE=2]="MULTIPLE",E[E.RECURRING=3]="RECURRING",E}(n||(e.ScheduleFrequency=n={})),r=function(E){return E[E.NOW=1]="NOW",E[E.LATER=2]="LATER",E[E.NEVER=3]="NEVER",E}(r||(e.TimePreference=r={})),i=function(E){return E[E.PUBLISHED=1]="PUBLISHED",E[E.DRAFT=2]="DRAFT",E[E.PAUSED=3]="PAUSED",E[E.STOPPED=5]="STOPPED",E[E.COMPLETED=6]="COMPLETED",E[E.UNINSTALLED=8]="UNINSTALLED",E}(i||(e.EngagementStatus=i={})),s=function(E){return E.CAMPAIGN="CAMPAIGN",E.NATIVE_AB="NATIVE_AB",E.CRO_COPILOT="CRO_COPILOT",E}(s||(e.EngagementType=s={})),o=function(E){return E[E.NONE=0]="NONE",E[E.RULE_BASED=1]="RULE_BASED",E[E.INTENT_BASED=2]="INTENT_BASED",E}(o||(e.TriggerType=o={})),a=function(E){return E[E.SINGLE=1]="SINGLE",E[E.EXCLUSION=2]="EXCLUSION",E[E.ABTESTING=3]="ABTESTING",E}(a||(e.EngagementContentType=a={})),l=function(E){return E[E.ALL=0]="ALL",E[E.NEW_ONLY=1]="NEW_ONLY",E[E.RETURNING_ONLY=2]="RETURNING_ONLY",E}(l||(e.SessionType=l={})),c=function(E){return E.ALL="ALL",E.LOGGED_IN="LOGGED_IN",E.NON_LOGGED_IN="NON_LOGGED_IN",E}(c||(e.LoggedInVisitor=c={})),h=function(E){return E.ALL="ALL",E.PURCHASED="PURCHASED",E.NON_PURCHASED="NON_PURCHASED",E}(h||(e.PurchasedVisitor=h={})),d=function(E){return E[E.NONE=0]="NONE",E[E.ITEM_RECOMMENDATION=1]="ITEM_RECOMMENDATION",E[E.MULTIPLE_ITEMS=2]="MULTIPLE_ITEMS",E[E.SINGLE_ITEM=3]="SINGLE_ITEM",E[E.TOP_SELLING=4]="TOP_SELLING",E[E.STOCK_CLEARANCE=5]="STOCK_CLEARANCE",E[E.NEW_ARRIVALS=6]="NEW_ARRIVALS",E[E.RECENTLY_VIEWED=7]="RECENTLY_VIEWED",E[E.EVENT_ITEM=8]="EVENT_ITEM",E[E.CART_ITEM=9]="CART_ITEM",E[E.BUNDLE=10]="BUNDLE",E[E.CURRENT_ITEM=11]="CURRENT_ITEM",E[E.PURCHASED_PREVIOUSLY=12]="PURCHASED_PREVIOUSLY",E[E.COLLECTION_ITEMS=13]="COLLECTION_ITEMS",E[E.TRENDING_ITEMS=14]="TRENDING_ITEMS",E}(d||(e.EngagementItemSource=d={})),f=function(E){return E[E.LAST_ADDED=1]="LAST_ADDED",E[E.FIRST_ADDED=2]="FIRST_ADDED",E[E.HIGHEST_PRICE=3]="HIGHEST_PRICE",E[E.LOWEST_PRICE=4]="LOWEST_PRICE",E[E.FIRST_MATCHING_TAG=5]="FIRST_MATCHING_TAG",E[E.ALL=6]="ALL",E}(f||(e.CartItemSource=f={})),g=function(E){return E[E.ALL=0]="ALL",E[E.ONLY_ORGANIC=1]="ONLY_ORGANIC",E[E.ONLY_NON_ORGANIC=2]="ONLY_NON_ORGANIC",E[E.INCLUDES=3]="INCLUDES",E[E.EXCLUDES=4]="EXCLUDES",E}(g||(e.UTMCriteria=g={})),m=function(E){return E[E.NONE=0]="NONE",E[E.LIKE=1]="LIKE",E[E.NOT_LIKE=2]="NOT_LIKE",E[E.EQUALS=3]="EQUALS",E[E.NOT_EQUALS=4]="NOT_EQUALS",E}(m||(e.URLCriteria=m={})),_=function(E){return E[E.NONE=0]="NONE",E[E.LESS_THAN=1]="LESS_THAN",E[E.GREATER_THAN=2]="GREATER_THAN",E[E.BETWEEN=3]="BETWEEN",E[E.EQUALS=4]="EQUALS",E}(_||(e.CartCriteria=_={})),x=function(E){return E[E.ALL=0]="ALL",E[E.INCLUDES=1]="INCLUDES",E[E.EXCLUDES=2]="EXCLUDES",E}(x||(e.CartCurrencyOperator=x={})),A=function(E){return E[E.NONE=0]="NONE",E[E.AMOUNT=1]="AMOUNT",E[E.TOTAL_PRODUCT=2]="TOTAL_PRODUCT",E[E.UNIQUE_PRODUCT=3]="UNIQUE_PRODUCT",E}(A||(e.CartFilterEnum=A={})),F=function(E){return E[E.NONE=0]="NONE",E[E.ITEM=1]="ITEM",E[E.COLLECTION=2]="COLLECTION",E}(F||(e.PromotionType=F={})),U=function(E){return E[E.NONE=0]="NONE",E[E.SINGLE=1]="SINGLE",E[E.MULTIPLE=2]="MULTIPLE",E}(U||(e.EngagementCollectionSource=U={})),M=function(E){return E.BEFORE="before",E.AFTER="after",E.INSIDE_FIRST="insideFirst",E.INSIDE_LAST="insideLast",E}(M||(e.EngagementPlacementPosition=M={})),Y=function(E){return E.SHOPIFY_CHECKOUT="shopify_checkout",E.THIRD_PARTY_CHECKOUT="third_party_checkout",E.CART_PAGE="cart_page",E.CART_DRAWER="cart_drawer",E}(Y||(e.RedirectBehaviour=Y={})),Ae=function(E){return E.ONCE_IN_SESSION="ONCE_IN_SESSION",E.ACROSS_SESSIONS="ACROSS_SESSIONS",E}(Ae||(e.FrequencyType=Ae={})),ct=function(E){return E.DAYS="DAYS",E.HOURS="HOURS",E.MINUTES="MINUTES",E.SECONDS="SECONDS",E}(ct||(e.FrequencyGapUnit=ct={})),j=function(E){return E[E.NONE=0]="NONE",E[E.REJECT_POPUP=1]="REJECT_POPUP",E[E.ACCEPT_POPUP=2]="ACCEPT_POPUP",E[E.GO_TO_URL=4]="GO_TO_URL",E[E.SHARE=5]="SHARE",E[E.KEY_VALUE=100]="KEY_VALUE",E[E.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",E[E.ADD_TO_CART=102]="ADD_TO_CART",E[E.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",E[E.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",E[E.OPEN_CART=105]="OPEN_CART",E[E.SUBMIT_FORM=106]="SUBMIT_FORM",E[E.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",E[E.ADD_BUNDLE=108]="ADD_BUNDLE",E[E.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",E}(j||(e.ClickActionType=j={})),fe=function(E){return E.POPUP="POPUP",E.PAGE_EMBED="PAGE_EMBED",E.CART_EMBED="CART_EMBED",E.ANNOUNCEMENT_BAR="ANNOUNCEMENT_BAR",E}(fe||(e.OnsiteDeliveryType=fe={})),te=function(E){return E.PRODUCT_PROMOTION="PRODUCT_PROMOTION",E.BUNDLE_AND_UPSELL="BUNDLE_AND_UPSELL",E.CART_RECOVERY="CART_RECOVERY",E.ANNOUNCEMENT="ANNOUNCEMENT",E.LEAD_GENERATION="LEAD_GENERATION",E.DATA_COLLECTION="DATA_COLLECTION",E.SALE_PROMOTION="SALE_PROMOTION",E.SUBSCRIPTION_UPSELL="SUBSCRIPTION_UPSELL",E.SHOPPABLE_VIDEO="SHOPPABLE_VIDEO",E.BYOB="BYOB",E.PROGRESS_BAR="PROGRESS_BAR",E.BUY_NOW="BUY_NOW",E.STICKY_ATC="STICKY_ATC",E.EXPERIMENT="EXPERIMENT",E}(te||(e.EngagementObjective=te={})),pe=function(E){return E.COOEE="COOEE",E.KLAVIYO="KLAVIYO",E}(pe||(e.EngagementContentSource=pe={})),Le=function(E){return E.ICONS="ICONS",E.TILES="TILES",E}(Le||(e.ProgressBarLayout=Le={})),ut=function(E){return E.FREE_SHIPPING="FREE_SHIPPING",E.DISCOUNT="DISCOUNT",E.FREE_AUTO_GIFT="FREE_AUTO_GIFT",E.FREE_GIFT_SELECT="FREE_GIFT_SELECT",E}(ut||(e.MilestoneRewardType=ut={}))}),xa=Wn(e=>{"use strict";var t=e&&e.__awaiter||function(r,i,s,o){function a(l){return l instanceof s?l:new s(function(c){c(l)})}return new(s||(s=Promise))(function(l,c){function h(g){try{f(o.next(g))}catch(m){c(m)}}function d(g){try{f(o.throw(g))}catch(m){c(m)}}function f(g){g.done?l(g.value):a(g.value).then(h,d)}f((o=o.apply(r,i||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.JSUtils=void 0;var n=class{static isObject(r){return typeof r=="object"&&!Array.isArray(r)&&r!==null}static parseToAny(r){try{return JSON.parse(r.toString())}catch{}return r.toString().match(this.ISO_WITHOUT_MS_REGEX)?new Date(r.toString()):r}static sleep(r){return t(this,void 0,void 0,function*(){return new Promise(i=>setTimeout(i,r))})}static hasKeys(r){return r?Object.keys(r).length>=1:!1}static convertObjectToArray(r,i){return i.reduce((s,o)=>(r.hasOwnProperty(o)&&r[o]!=null&&s.push({[o]:r[o]}),s),[])}static removeNullUndefinedKeys(r){return Object.keys(r).reduce((i,s)=>(r[s]!==null&&r[s]!==void 0&&(i[s]=r[s]),i),{})}static stringify(r){return JSON.stringify(r,function(i,s){return s===void 0?null:s})}};e.JSUtils=n,n.ISO_WITHOUT_MS_REGEX=new RegExp(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/)}),uD=Wn((e,t)=>{"use strict";(function(n){if(typeof e=="object"&&typeof t<"u")t.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var r;typeof window<"u"?r=window:typeof global<"u"?r=global:typeof self<"u"?r=self:r=this,r.localforage=n()}})(function(){var n,r,i;return function s(o,a,l){function c(f,g){if(!a[f]){if(!o[f]){var m=typeof Mc=="function"&&Mc;if(!g&&m)return m(f,!0);if(h)return h(f,!0);var _=new Error("Cannot find module '"+f+"'");throw _.code="MODULE_NOT_FOUND",_}var x=a[f]={exports:{}};o[f][0].call(x.exports,function(A){var F=o[f][1][A];return c(F||A)},x,x.exports,s,o,a,l)}return a[f].exports}for(var h=typeof Mc=="function"&&Mc,d=0;d<l.length;d++)c(l[d]);return c}({1:[function(s,o,a){(function(l){"use strict";var c=l.MutationObserver||l.WebKitMutationObserver,h;if(c){var d=0,f=new c(A),g=l.document.createTextNode("");f.observe(g,{characterData:!0}),h=function(){g.data=d=++d%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var m=new l.MessageChannel;m.port1.onmessage=A,h=function(){m.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?h=function(){var U=l.document.createElement("script");U.onreadystatechange=function(){A(),U.onreadystatechange=null,U.parentNode.removeChild(U),U=null},l.document.documentElement.appendChild(U)}:h=function(){setTimeout(A,0)};var _,x=[];function A(){_=!0;for(var U,M,Y=x.length;Y;){for(M=x,x=[],U=-1;++U<Y;)M[U]();Y=x.length}_=!1}o.exports=F;function F(U){x.push(U)===1&&!_&&h()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(s,o,a){"use strict";var l=s(1);function c(){}var h={},d=["REJECTED"],f=["FULFILLED"],g=["PENDING"];o.exports=m;function m(j){if(typeof j!="function")throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,j!==c&&F(this,j)}m.prototype.catch=function(j){return this.then(null,j)},m.prototype.then=function(j,fe){if(typeof j!="function"&&this.state===f||typeof fe!="function"&&this.state===d)return this;var te=new this.constructor(c);if(this.state!==g){var pe=this.state===f?j:fe;x(te,pe,this.outcome)}else this.queue.push(new _(te,j,fe));return te};function _(j,fe,te){this.promise=j,typeof fe=="function"&&(this.onFulfilled=fe,this.callFulfilled=this.otherCallFulfilled),typeof te=="function"&&(this.onRejected=te,this.callRejected=this.otherCallRejected)}_.prototype.callFulfilled=function(j){h.resolve(this.promise,j)},_.prototype.otherCallFulfilled=function(j){x(this.promise,this.onFulfilled,j)},_.prototype.callRejected=function(j){h.reject(this.promise,j)},_.prototype.otherCallRejected=function(j){x(this.promise,this.onRejected,j)};function x(j,fe,te){l(function(){var pe;try{pe=fe(te)}catch(Le){return h.reject(j,Le)}pe===j?h.reject(j,new TypeError("Cannot resolve promise with itself")):h.resolve(j,pe)})}h.resolve=function(j,fe){var te=U(A,fe);if(te.status==="error")return h.reject(j,te.value);var pe=te.value;if(pe)F(j,pe);else{j.state=f,j.outcome=fe;for(var Le=-1,ut=j.queue.length;++Le<ut;)j.queue[Le].callFulfilled(fe)}return j},h.reject=function(j,fe){j.state=d,j.outcome=fe;for(var te=-1,pe=j.queue.length;++te<pe;)j.queue[te].callRejected(fe);return j};function A(j){var fe=j&&j.then;if(j&&(typeof j=="object"||typeof j=="function")&&typeof fe=="function")return function(){fe.apply(j,arguments)}}function F(j,fe){var te=!1;function pe($t){te||(te=!0,h.reject(j,$t))}function Le($t){te||(te=!0,h.resolve(j,$t))}function ut(){fe(Le,pe)}var E=U(ut);E.status==="error"&&pe(E.value)}function U(j,fe){var te={};try{te.value=j(fe),te.status="success"}catch(pe){te.status="error",te.value=pe}return te}m.resolve=M;function M(j){return j instanceof this?j:h.resolve(new this(c),j)}m.reject=Y;function Y(j){var fe=new this(c);return h.reject(fe,j)}m.all=Ae;function Ae(j){var fe=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=j.length,pe=!1;if(!te)return this.resolve([]);for(var Le=new Array(te),ut=0,E=-1,$t=new this(c);++E<te;)Bt(j[E],E);return $t;function Bt(qe,Kt){fe.resolve(qe).then(Se,function(D){pe||(pe=!0,h.reject($t,D))});function Se(D){Le[Kt]=D,++ut===te&&!pe&&(pe=!0,h.resolve($t,Le))}}}m.race=ct;function ct(j){var fe=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var te=j.length,pe=!1;if(!te)return this.resolve([]);for(var Le=-1,ut=new this(c);++Le<te;)E(j[Le]);return ut;function E($t){fe.resolve($t).then(function(Bt){pe||(pe=!0,h.resolve(ut,Bt))},function(Bt){pe||(pe=!0,h.reject(ut,Bt))})}}},{1:1}],3:[function(s,o,a){(function(l){"use strict";typeof l.Promise!="function"&&(l.Promise=s(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(s,o,a){"use strict";var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v};function c(v,S){if(!(v instanceof S))throw new TypeError("Cannot call a class as a function")}function h(){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=h();function f(){try{if(!d||!d.open)return!1;var v=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),S=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!v||S)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function g(v,S){v=v||[],S=S||{};try{return new Blob(v,S)}catch(N){if(N.name!=="TypeError")throw N;for(var C=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,P=new C,R=0;R<v.length;R+=1)P.append(v[R]);return P.getBlob(S.type)}}typeof Promise>"u"&&s(3);var m=Promise;function _(v,S){S&&v.then(function(C){S(null,C)},function(C){S(C)})}function x(v,S,C){typeof S=="function"&&v.then(S),typeof C=="function"&&v.catch(C)}function A(v){return typeof v!="string"&&(console.warn(v+" used as a key, but it is not a string."),v=String(v)),v}function F(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var U="local-forage-detect-blob-support",M=void 0,Y={},Ae=Object.prototype.toString,ct="readonly",j="readwrite";function fe(v){for(var S=v.length,C=new ArrayBuffer(S),P=new Uint8Array(C),R=0;R<S;R++)P[R]=v.charCodeAt(R);return C}function te(v){return new m(function(S){var C=v.transaction(U,j),P=g([""]);C.objectStore(U).put(P,"key"),C.onabort=function(R){R.preventDefault(),R.stopPropagation(),S(!1)},C.oncomplete=function(){var R=navigator.userAgent.match(/Chrome\/(\d+)/),N=navigator.userAgent.match(/Edge\//);S(N||!R||parseInt(R[1],10)>=43)}}).catch(function(){return!1})}function pe(v){return typeof M=="boolean"?m.resolve(M):te(v).then(function(S){return M=S,M})}function Le(v){var S=Y[v.name],C={};C.promise=new m(function(P,R){C.resolve=P,C.reject=R}),S.deferredOperations.push(C),S.dbReady?S.dbReady=S.dbReady.then(function(){return C.promise}):S.dbReady=C.promise}function ut(v){var S=Y[v.name],C=S.deferredOperations.pop();if(C)return C.resolve(),C.promise}function E(v,S){var C=Y[v.name],P=C.deferredOperations.pop();if(P)return P.reject(S),P.promise}function $t(v,S){return new m(function(C,P){if(Y[v.name]=Y[v.name]||we(),v.db)if(S)Le(v),v.db.close();else return C(v.db);var R=[v.name];S&&R.push(v.version);var N=d.open.apply(d,R);S&&(N.onupgradeneeded=function(V){var H=N.result;try{H.createObjectStore(v.storeName),V.oldVersion<=1&&H.createObjectStore(U)}catch(z){if(z.name==="ConstraintError")console.warn('The database "'+v.name+'" has been upgraded from version '+V.oldVersion+" to version "+V.newVersion+', but the storage "'+v.storeName+'" already exists.');else throw z}}),N.onerror=function(V){V.preventDefault(),P(N.error)},N.onsuccess=function(){var V=N.result;V.onversionchange=function(H){H.target.close()},C(V),ut(v)}})}function Bt(v){return $t(v,!1)}function qe(v){return $t(v,!0)}function Kt(v,S){if(!v.db)return!0;var C=!v.db.objectStoreNames.contains(v.storeName),P=v.version<v.db.version,R=v.version>v.db.version;if(P&&(v.version!==S&&console.warn('The database "'+v.name+`" can't be downgraded from version `+v.db.version+" to version "+v.version+"."),v.version=v.db.version),R||C){if(C){var N=v.db.version+1;N>v.version&&(v.version=N)}return!0}return!1}function Se(v){return new m(function(S,C){var P=new FileReader;P.onerror=C,P.onloadend=function(R){var N=btoa(R.target.result||"");S({__local_forage_encoded_blob:!0,data:N,type:v.type})},P.readAsBinaryString(v)})}function D(v){var S=fe(atob(v.data));return g([S],{type:v.type})}function I(v){return v&&v.__local_forage_encoded_blob}function K(v){var S=this,C=S._initReady().then(function(){var P=Y[S._dbInfo.name];if(P&&P.dbReady)return P.dbReady});return x(C,v,v),C}function re(v){Le(v);for(var S=Y[v.name],C=S.forages,P=0;P<C.length;P++){var R=C[P];R._dbInfo.db&&(R._dbInfo.db.close(),R._dbInfo.db=null)}return v.db=null,Bt(v).then(function(N){return v.db=N,Kt(v)?qe(v):N}).then(function(N){v.db=S.db=N;for(var V=0;V<C.length;V++)C[V]._dbInfo.db=N}).catch(function(N){throw E(v,N),N})}function ae(v,S,C,P){P===void 0&&(P=1);try{var R=v.db.transaction(v.storeName,S);C(null,R)}catch(N){if(P>0&&(!v.db||N.name==="InvalidStateError"||N.name==="NotFoundError"))return m.resolve().then(function(){if(!v.db||N.name==="NotFoundError"&&!v.db.objectStoreNames.contains(v.storeName)&&v.version<=v.db.version)return v.db&&(v.version=v.db.version+1),qe(v)}).then(function(){return re(v).then(function(){ae(v,S,C,P-1)})}).catch(C);C(N)}}function we(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ve(v){var S=this,C={db:null};if(v)for(var P in v)C[P]=v[P];var R=Y[C.name];R||(R=we(),Y[C.name]=R),R.forages.push(S),S._initReady||(S._initReady=S.ready,S.ready=K);var N=[];function V(){return m.resolve()}for(var H=0;H<R.forages.length;H++){var z=R.forages[H];z!==S&&N.push(z._initReady().catch(V))}var W=R.forages.slice(0);return m.all(N).then(function(){return C.db=R.db,Bt(C)}).then(function($){return C.db=$,Kt(C,S._defaultConfig.version)?qe(C):$}).then(function($){C.db=R.db=$,S._dbInfo=C;for(var ce=0;ce<W.length;ce++){var ze=W[ce];ze!==S&&(ze._dbInfo.db=C.db,ze._dbInfo.version=C.version)}})}function ue(v,S){var C=this;v=A(v);var P=new m(function(R,N){C.ready().then(function(){ae(C._dbInfo,ct,function(V,H){if(V)return N(V);try{var z=H.objectStore(C._dbInfo.storeName),W=z.get(v);W.onsuccess=function(){var $=W.result;$===void 0&&($=null),I($)&&($=D($)),R($)},W.onerror=function(){N(W.error)}}catch($){N($)}})}).catch(N)});return _(P,S),P}function Ie(v,S){var C=this,P=new m(function(R,N){C.ready().then(function(){ae(C._dbInfo,ct,function(V,H){if(V)return N(V);try{var z=H.objectStore(C._dbInfo.storeName),W=z.openCursor(),$=1;W.onsuccess=function(){var ce=W.result;if(ce){var ze=ce.value;I(ze)&&(ze=D(ze));var vt=v(ze,ce.key,$++);vt!==void 0?R(vt):ce.continue()}else R()},W.onerror=function(){N(W.error)}}catch(ce){N(ce)}})}).catch(N)});return _(P,S),P}function je(v,S,C){var P=this;v=A(v);var R=new m(function(N,V){var H;P.ready().then(function(){return H=P._dbInfo,Ae.call(S)==="[object Blob]"?pe(H.db).then(function(z){return z?S:Se(S)}):S}).then(function(z){ae(P._dbInfo,j,function(W,$){if(W)return V(W);try{var ce=$.objectStore(P._dbInfo.storeName);z===null&&(z=void 0);var ze=ce.put(z,v);$.oncomplete=function(){z===void 0&&(z=null),N(z)},$.onabort=$.onerror=function(){var vt=ze.error?ze.error:ze.transaction.error;V(vt)}}catch(vt){V(vt)}})}).catch(V)});return _(R,C),R}function It(v,S){var C=this;v=A(v);var P=new m(function(R,N){C.ready().then(function(){ae(C._dbInfo,j,function(V,H){if(V)return N(V);try{var z=H.objectStore(C._dbInfo.storeName),W=z.delete(v);H.oncomplete=function(){R()},H.onerror=function(){N(W.error)},H.onabort=function(){var $=W.error?W.error:W.transaction.error;N($)}}catch($){N($)}})}).catch(N)});return _(P,S),P}function He(v){var S=this,C=new m(function(P,R){S.ready().then(function(){ae(S._dbInfo,j,function(N,V){if(N)return R(N);try{var H=V.objectStore(S._dbInfo.storeName),z=H.clear();V.oncomplete=function(){P()},V.onabort=V.onerror=function(){var W=z.error?z.error:z.transaction.error;R(W)}}catch(W){R(W)}})}).catch(R)});return _(C,v),C}function Xe(v){var S=this,C=new m(function(P,R){S.ready().then(function(){ae(S._dbInfo,ct,function(N,V){if(N)return R(N);try{var H=V.objectStore(S._dbInfo.storeName),z=H.count();z.onsuccess=function(){P(z.result)},z.onerror=function(){R(z.error)}}catch(W){R(W)}})}).catch(R)});return _(C,v),C}function Pt(v,S){var C=this,P=new m(function(R,N){if(v<0){R(null);return}C.ready().then(function(){ae(C._dbInfo,ct,function(V,H){if(V)return N(V);try{var z=H.objectStore(C._dbInfo.storeName),W=!1,$=z.openKeyCursor();$.onsuccess=function(){var ce=$.result;if(!ce){R(null);return}v===0||W?R(ce.key):(W=!0,ce.advance(v))},$.onerror=function(){N($.error)}}catch(ce){N(ce)}})}).catch(N)});return _(P,S),P}function ke(v){var S=this,C=new m(function(P,R){S.ready().then(function(){ae(S._dbInfo,ct,function(N,V){if(N)return R(N);try{var H=V.objectStore(S._dbInfo.storeName),z=H.openKeyCursor(),W=[];z.onsuccess=function(){var $=z.result;if(!$){P(W);return}W.push($.key),$.continue()},z.onerror=function(){R(z.error)}}catch($){R($)}})}).catch(R)});return _(C,v),C}function u(v,S){S=F.apply(this,arguments);var C=this.config();v=typeof v!="function"&&v||{},v.name||(v.name=v.name||C.name,v.storeName=v.storeName||C.storeName);var P=this,R;if(!v.name)R=m.reject("Invalid arguments");else{var N=v.name===C.name&&P._dbInfo.db,V=N?m.resolve(P._dbInfo.db):Bt(v).then(function(H){var z=Y[v.name],W=z.forages;z.db=H;for(var $=0;$<W.length;$++)W[$]._dbInfo.db=H;return H});v.storeName?R=V.then(function(H){if(H.objectStoreNames.contains(v.storeName)){var z=H.version+1;Le(v);var W=Y[v.name],$=W.forages;H.close();for(var ce=0;ce<$.length;ce++){var ze=$[ce];ze._dbInfo.db=null,ze._dbInfo.version=z}var vt=new m(function(ft,rn){var Zt=d.open(v.name,z);Zt.onerror=function(fr){var jh=Zt.result;jh.close(),rn(fr)},Zt.onupgradeneeded=function(){var fr=Zt.result;fr.deleteObjectStore(v.storeName)},Zt.onsuccess=function(){var fr=Zt.result;fr.close(),ft(fr)}});return vt.then(function(ft){W.db=ft;for(var rn=0;rn<$.length;rn++){var Zt=$[rn];Zt._dbInfo.db=ft,ut(Zt._dbInfo)}}).catch(function(ft){throw(E(v,ft)||m.resolve()).catch(function(){}),ft})}}):R=V.then(function(H){Le(v);var z=Y[v.name],W=z.forages;H.close();for(var $=0;$<W.length;$++){var ce=W[$];ce._dbInfo.db=null}var ze=new m(function(vt,ft){var rn=d.deleteDatabase(v.name);rn.onerror=function(){var Zt=rn.result;Zt&&Zt.close(),ft(rn.error)},rn.onblocked=function(){console.warn('dropInstance blocked for database "'+v.name+'" until all open connections are closed')},rn.onsuccess=function(){var Zt=rn.result;Zt&&Zt.close(),vt(Zt)}});return ze.then(function(vt){z.db=vt;for(var ft=0;ft<W.length;ft++){var rn=W[ft];ut(rn._dbInfo)}}).catch(function(vt){throw(E(v,vt)||m.resolve()).catch(function(){}),vt})})}return _(R,S),R}var p={_driver:"asyncStorage",_initStorage:ve,_support:f(),iterate:Ie,getItem:ue,setItem:je,removeItem:It,clear:He,length:Xe,key:Pt,keys:ke,dropInstance:u};function y(){return typeof openDatabase=="function"}var T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L="~~local_forage_type~",B=/^~~local_forage_type~([^~]+)~/,Q="__lfsc__:",et=Q.length,Ge="arbf",Me="blob",dt="si08",J="ui08",De="uic8",me="si16",tt="si32",Cn="ur16",Sn="ui32",lt="fl32",ye="fl64",kn=et+Ge.length,ro=Object.prototype.toString;function za(v){var S=v.length*.75,C=v.length,P,R=0,N,V,H,z;v[v.length-1]==="="&&(S--,v[v.length-2]==="="&&S--);var W=new ArrayBuffer(S),$=new Uint8Array(W);for(P=0;P<C;P+=4)N=T.indexOf(v[P]),V=T.indexOf(v[P+1]),H=T.indexOf(v[P+2]),z=T.indexOf(v[P+3]),$[R++]=N<<2|V>>4,$[R++]=(V&15)<<4|H>>2,$[R++]=(H&3)<<6|z&63;return W}function lu(v){var S=new Uint8Array(v),C="",P;for(P=0;P<S.length;P+=3)C+=T[S[P]>>2],C+=T[(S[P]&3)<<4|S[P+1]>>4],C+=T[(S[P+1]&15)<<2|S[P+2]>>6],C+=T[S[P+2]&63];return S.length%3===2?C=C.substring(0,C.length-1)+"=":S.length%3===1&&(C=C.substring(0,C.length-2)+"=="),C}function rD(v,S){var C="";if(v&&(C=ro.call(v)),v&&(C==="[object ArrayBuffer]"||v.buffer&&ro.call(v.buffer)==="[object ArrayBuffer]")){var P,R=Q;v instanceof ArrayBuffer?(P=v,R+=Ge):(P=v.buffer,C==="[object Int8Array]"?R+=dt:C==="[object Uint8Array]"?R+=J:C==="[object Uint8ClampedArray]"?R+=De:C==="[object Int16Array]"?R+=me:C==="[object Uint16Array]"?R+=Cn:C==="[object Int32Array]"?R+=tt:C==="[object Uint32Array]"?R+=Sn:C==="[object Float32Array]"?R+=lt:C==="[object Float64Array]"?R+=ye:S(new Error("Failed to get type for BinaryArray"))),S(R+lu(P))}else if(C==="[object Blob]"){var N=new FileReader;N.onload=function(){var V=L+v.type+"~"+lu(this.result);S(Q+Me+V)},N.readAsArrayBuffer(v)}else try{S(JSON.stringify(v))}catch(V){console.error("Couldn't convert value into a JSON string: ",v),S(null,V)}}function iD(v){if(v.substring(0,et)!==Q)return JSON.parse(v);var S=v.substring(kn),C=v.substring(et,kn),P;if(C===Me&&B.test(S)){var R=S.match(B);P=R[1],S=S.substring(R[0].length)}var N=za(S);switch(C){case Ge:return N;case Me:return g([N],{type:P});case dt:return new Int8Array(N);case J:return new Uint8Array(N);case De:return new Uint8ClampedArray(N);case me:return new Int16Array(N);case Cn:return new Uint16Array(N);case tt:return new Int32Array(N);case Sn:return new Uint32Array(N);case lt:return new Float32Array(N);case ye:return new Float64Array(N);default:throw new Error("Unkown type: "+C)}}var hh={serialize:rD,deserialize:iD,stringToBuffer:za,bufferToString:lu};function YE(v,S,C,P){v.executeSql("CREATE TABLE IF NOT EXISTS "+S.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],C,P)}function sD(v){var S=this,C={db:null};if(v)for(var P in v)C[P]=typeof v[P]!="string"?v[P].toString():v[P];var R=new m(function(N,V){try{C.db=openDatabase(C.name,String(C.version),C.description,C.size)}catch(H){return V(H)}C.db.transaction(function(H){YE(H,C,function(){S._dbInfo=C,N()},function(z,W){V(W)})},V)});return C.serializer=hh,R}function ds(v,S,C,P,R,N){v.executeSql(C,P,R,function(V,H){H.code===H.SYNTAX_ERR?V.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[S.storeName],function(z,W){W.rows.length?N(z,H):YE(z,S,function(){z.executeSql(C,P,R,N)},N)},N):N(V,H)},N)}function oD(v,S){var C=this;v=A(v);var P=new m(function(R,N){C.ready().then(function(){var V=C._dbInfo;V.db.transaction(function(H){ds(H,V,"SELECT * FROM "+V.storeName+" WHERE key = ? LIMIT 1",[v],function(z,W){var $=W.rows.length?W.rows.item(0).value:null;$&&($=V.serializer.deserialize($)),R($)},function(z,W){N(W)})})}).catch(N)});return _(P,S),P}function aD(v,S){var C=this,P=new m(function(R,N){C.ready().then(function(){var V=C._dbInfo;V.db.transaction(function(H){ds(H,V,"SELECT * FROM "+V.storeName,[],function(z,W){for(var $=W.rows,ce=$.length,ze=0;ze<ce;ze++){var vt=$.item(ze),ft=vt.value;if(ft&&(ft=V.serializer.deserialize(ft)),ft=v(ft,vt.key,ze+1),ft!==void 0){R(ft);return}}R()},function(z,W){N(W)})})}).catch(N)});return _(P,S),P}function KE(v,S,C,P){var R=this;v=A(v);var N=new m(function(V,H){R.ready().then(function(){S===void 0&&(S=null);var z=S,W=R._dbInfo;W.serializer.serialize(S,function($,ce){ce?H(ce):W.db.transaction(function(ze){ds(ze,W,"INSERT OR REPLACE INTO "+W.storeName+" (key, value) VALUES (?, ?)",[v,$],function(){V(z)},function(vt,ft){H(ft)})},function(ze){if(ze.code===ze.QUOTA_ERR){if(P>0){V(KE.apply(R,[v,z,C,P-1]));return}H(ze)}})})}).catch(H)});return _(N,C),N}function lD(v,S,C){return KE.apply(this,[v,S,C,1])}function cD(v,S){var C=this;v=A(v);var P=new m(function(R,N){C.ready().then(function(){var V=C._dbInfo;V.db.transaction(function(H){ds(H,V,"DELETE FROM "+V.storeName+" WHERE key = ?",[v],function(){R()},function(z,W){N(W)})})}).catch(N)});return _(P,S),P}function JD(v){var S=this,C=new m(function(P,R){S.ready().then(function(){var N=S._dbInfo;N.db.transaction(function(V){ds(V,N,"DELETE FROM "+N.storeName,[],function(){P()},function(H,z){R(z)})})}).catch(R)});return _(C,v),C}function Vk(v){var S=this,C=new m(function(P,R){S.ready().then(function(){var N=S._dbInfo;N.db.transaction(function(V){ds(V,N,"SELECT COUNT(key) as c FROM "+N.storeName,[],function(H,z){var W=z.rows.item(0).c;P(W)},function(H,z){R(z)})})}).catch(R)});return _(C,v),C}function qk(v,S){var C=this,P=new m(function(R,N){C.ready().then(function(){var V=C._dbInfo;V.db.transaction(function(H){ds(H,V,"SELECT key FROM "+V.storeName+" WHERE id = ? LIMIT 1",[v+1],function(z,W){var $=W.rows.length?W.rows.item(0).key:null;R($)},function(z,W){N(W)})})}).catch(N)});return _(P,S),P}function cR(v){var S=this,C=new m(function(P,R){S.ready().then(function(){var N=S._dbInfo;N.db.transaction(function(V){ds(V,N,"SELECT key FROM "+N.storeName,[],function(H,z){for(var W=[],$=0;$<z.rows.length;$++)W.push(z.rows.item($).key);P(W)},function(H,z){R(z)})})}).catch(R)});return _(C,v),C}function xR(v){return new m(function(S,C){v.transaction(function(P){P.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(R,N){for(var V=[],H=0;H<N.rows.length;H++)V.push(N.rows.item(H).name);S({db:v,storeNames:V})},function(R,N){C(N)})},function(P){C(P)})})}function TR(v,S){S=F.apply(this,arguments);var C=this.config();v=typeof v!="function"&&v||{},v.name||(v.name=v.name||C.name,v.storeName=v.storeName||C.storeName);var P=this,R;return v.name?R=new m(function(N){var V;v.name===C.name?V=P._dbInfo.db:V=openDatabase(v.name,"","",0),v.storeName?N({db:V,storeNames:[v.storeName]}):N(xR(V))}).then(function(N){return new m(function(V,H){N.db.transaction(function(z){function W(vt){return new m(function(ft,rn){z.executeSql("DROP TABLE IF EXISTS "+vt,[],function(){ft()},function(Zt,fr){rn(fr)})})}for(var $=[],ce=0,ze=N.storeNames.length;ce<ze;ce++)$.push(W(N.storeNames[ce]));m.all($).then(function(){V()}).catch(function(vt){H(vt)})},function(z){H(z)})})}):R=m.reject("Invalid arguments"),_(R,S),R}var IR={_driver:"webSQLStorage",_initStorage:sD,_support:y(),iterate:aD,getItem:oD,setItem:lD,removeItem:cD,clear:JD,length:Vk,key:qk,keys:cR,dropInstance:TR};function DR(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function XE(v,S){var C=v.name+"/";return v.storeName!==S.storeName&&(C+=v.storeName+"/"),C}function OR(){var v="_localforage_support_test";try{return localStorage.setItem(v,!0),localStorage.removeItem(v),!1}catch{return!0}}function kR(){return!OR()||localStorage.length>0}function RR(v){var S=this,C={};if(v)for(var P in v)C[P]=v[P];return C.keyPrefix=XE(v,S._defaultConfig),kR()?(S._dbInfo=C,C.serializer=hh,m.resolve()):m.reject()}function PR(v){var S=this,C=S.ready().then(function(){for(var P=S._dbInfo.keyPrefix,R=localStorage.length-1;R>=0;R--){var N=localStorage.key(R);N.indexOf(P)===0&&localStorage.removeItem(N)}});return _(C,v),C}function NR(v,S){var C=this;v=A(v);var P=C.ready().then(function(){var R=C._dbInfo,N=localStorage.getItem(R.keyPrefix+v);return N&&(N=R.serializer.deserialize(N)),N});return _(P,S),P}function AR(v,S){var C=this,P=C.ready().then(function(){for(var R=C._dbInfo,N=R.keyPrefix,V=N.length,H=localStorage.length,z=1,W=0;W<H;W++){var $=localStorage.key(W);if($.indexOf(N)===0){var ce=localStorage.getItem($);if(ce&&(ce=R.serializer.deserialize(ce)),ce=v(ce,$.substring(V),z++),ce!==void 0)return ce}}});return _(P,S),P}function LR(v,S){var C=this,P=C.ready().then(function(){var R=C._dbInfo,N;try{N=localStorage.key(v)}catch{N=null}return N&&(N=N.substring(R.keyPrefix.length)),N});return _(P,S),P}function MR(v){var S=this,C=S.ready().then(function(){for(var P=S._dbInfo,R=localStorage.length,N=[],V=0;V<R;V++){var H=localStorage.key(V);H.indexOf(P.keyPrefix)===0&&N.push(H.substring(P.keyPrefix.length))}return N});return _(C,v),C}function VR(v){var S=this,C=S.keys().then(function(P){return P.length});return _(C,v),C}function UR(v,S){var C=this;v=A(v);var P=C.ready().then(function(){var R=C._dbInfo;localStorage.removeItem(R.keyPrefix+v)});return _(P,S),P}function BR(v,S,C){var P=this;v=A(v);var R=P.ready().then(function(){S===void 0&&(S=null);var N=S;return new m(function(V,H){var z=P._dbInfo;z.serializer.serialize(S,function(W,$){if($)H($);else try{localStorage.setItem(z.keyPrefix+v,W),V(N)}catch(ce){(ce.name==="QuotaExceededError"||ce.name==="NS_ERROR_DOM_QUOTA_REACHED")&&H(ce),H(ce)}})})});return _(R,C),R}function FR(v,S){if(S=F.apply(this,arguments),v=typeof v!="function"&&v||{},!v.name){var C=this.config();v.name=v.name||C.name,v.storeName=v.storeName||C.storeName}var P=this,R;return v.name?R=new m(function(N){v.storeName?N(XE(v,P._defaultConfig)):N(v.name+"/")}).then(function(N){for(var V=localStorage.length-1;V>=0;V--){var H=localStorage.key(V);H.indexOf(N)===0&&localStorage.removeItem(H)}}):R=m.reject("Invalid arguments"),_(R,S),R}var jR={_driver:"localStorageWrapper",_initStorage:RR,_support:DR(),iterate:AR,getItem:NR,setItem:BR,removeItem:UR,clear:PR,length:VR,key:LR,keys:MR,dropInstance:FR},HR=function(v,S){return v===S||typeof v=="number"&&typeof S=="number"&&isNaN(v)&&isNaN(S)},$R=function(v,S){for(var C=v.length,P=0;P<C;){if(HR(v[P],S))return!0;P++}return!1},kS=Array.isArray||function(v){return Object.prototype.toString.call(v)==="[object Array]"},Nl={},PS={},io={INDEXEDDB:p,WEBSQL:IR,LOCALSTORAGE:jR},GR=[io.INDEXEDDB._driver,io.WEBSQL._driver,io.LOCALSTORAGE._driver],Nc=["dropInstance"],gh=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Nc),WR={description:"",driver:GR.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function zR(v,S){v[S]=function(){var C=arguments;return v.ready().then(function(){return v[S].apply(v,C)})}}function mh(){for(var v=1;v<arguments.length;v++){var S=arguments[v];if(S)for(var C in S)S.hasOwnProperty(C)&&(kS(S[C])?arguments[0][C]=S[C].slice():arguments[0][C]=S[C])}return arguments[0]}var qR=function(){function v(S){c(this,v);for(var C in io)if(io.hasOwnProperty(C)){var P=io[C],R=P._driver;this[C]=R,Nl[R]||this.defineDriver(P)}this._defaultConfig=mh({},WR),this._config=mh({},this._defaultConfig,S),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return v.prototype.config=function(S){if((typeof S>"u"?"undefined":l(S))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var C in S){if(C==="storeName"&&(S[C]=S[C].replace(/\W/g,"_")),C==="version"&&typeof S[C]!="number")return new Error("Database version must be a number.");this._config[C]=S[C]}return"driver"in S&&S.driver?this.setDriver(this._config.driver):!0}else return typeof S=="string"?this._config[S]:this._config},v.prototype.defineDriver=function(S,C,P){var R=new m(function(N,V){try{var H=S._driver,z=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!S._driver){V(z);return}for(var W=gh.concat("_initStorage"),$=0,ce=W.length;$<ce;$++){var ze=W[$],vt=!$R(Nc,ze);if((vt||S[ze])&&typeof S[ze]!="function"){V(z);return}}var ft=function(){for(var Zt=function(YR){return function(){var KR=new Error("Method "+YR+" is not implemented by the current driver"),LS=m.reject(KR);return _(LS,arguments[arguments.length-1]),LS}},fr=0,jh=Nc.length;fr<jh;fr++){var Hh=Nc[fr];S[Hh]||(S[Hh]=Zt(Hh))}};ft();var rn=function(Zt){Nl[H]&&console.info("Redefining LocalForage driver: "+H),Nl[H]=S,PS[H]=Zt,N()};"_support"in S?S._support&&typeof S._support=="function"?S._support().then(rn,V):rn(!!S._support):rn(!0)}catch(Zt){V(Zt)}});return x(R,C,P),R},v.prototype.driver=function(){return this._driver||null},v.prototype.getDriver=function(S,C,P){var R=Nl[S]?m.resolve(Nl[S]):m.reject(new Error("Driver not found."));return x(R,C,P),R},v.prototype.getSerializer=function(S){var C=m.resolve(hh);return x(C,S),C},v.prototype.ready=function(S){var C=this,P=C._driverSet.then(function(){return C._ready===null&&(C._ready=C._initDriver()),C._ready});return x(P,S,S),P},v.prototype.setDriver=function(S,C,P){var R=this;kS(S)||(S=[S]);var N=this._getSupportedDrivers(S);function V(){R._config.driver=R.driver()}function H($){return R._extend($),V(),R._ready=R._initStorage(R._config),R._ready}function z($){return function(){var ce=0;function ze(){for(;ce<$.length;){var vt=$[ce];return ce++,R._dbInfo=null,R._ready=null,R.getDriver(vt).then(H).catch(ze)}V();var ft=new Error("No available storage method found.");return R._driverSet=m.reject(ft),R._driverSet}return ze()}}var W=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=W.then(function(){var $=N[0];return R._dbInfo=null,R._ready=null,R.getDriver($).then(function(ce){R._driver=ce._driver,V(),R._wrapLibraryMethodsWithReady(),R._initDriver=z(N)})}).catch(function(){V();var $=new Error("No available storage method found.");return R._driverSet=m.reject($),R._driverSet}),x(this._driverSet,C,P),this._driverSet},v.prototype.supports=function(S){return!!PS[S]},v.prototype._extend=function(S){mh(this,S)},v.prototype._getSupportedDrivers=function(S){for(var C=[],P=0,R=S.length;P<R;P++){var N=S[P];this.supports(N)&&C.push(N)}return C},v.prototype._wrapLibraryMethodsWithReady=function(){for(var S=0,C=gh.length;S<C;S++)zR(this,gh[S])},v.prototype.createInstance=function(S){return new v(S)},v}(),ZR=new qR;o.exports=ZR},{3:3}]},{},[4])(4)})}),Ff=Wn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MustacheUtils=void 0;var t=class MS{static escapeHtml(r){return String(r).replace(/"/g,i=>MS.entityMap[i])}};e.MustacheUtils=t,t.entityMap={'"':"""}}),D_=Wn((e,t)=>{"use strict";(function(n,r){typeof e=="object"&&typeof t<"u"?t.exports=r():typeof define=="function"&&define.amd?define(r):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=r())})(e,function(){"use strict";var n=function(s,o){if(o=o||{},typeof s!="function")throw new i("fetch must be a function");if(typeof o!="object")throw new i("defaults must be an object");if(o.retries!==void 0&&!r(o.retries))throw new i("retries must be a positive integer");if(o.retryDelay!==void 0&&!r(o.retryDelay)&&typeof o.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(o.retryOn!==void 0&&!Array.isArray(o.retryOn)&&typeof o.retryOn!="function")throw new i("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return o=Object.assign(a,o),function(l,c){var h=o.retries,d=o.retryDelay,f=o.retryOn;if(c&&c.retries!==void 0)if(r(c.retries))h=c.retries;else throw new i("retries must be a positive integer");if(c&&c.retryDelay!==void 0)if(r(c.retryDelay)||typeof c.retryDelay=="function")d=c.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(c&&c.retryOn)if(Array.isArray(c.retryOn)||typeof c.retryOn=="function")f=c.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(g,m){var _=function(A){var F=typeof Request<"u"&&l instanceof Request?l.clone():l;s(F,c).then(function(U){if(Array.isArray(f)&&f.indexOf(U.status)===-1)g(U);else if(typeof f=="function")try{return Promise.resolve(f(A,null,U)).then(function(M){M?x(A,null,U):g(U)}).catch(m)}catch(M){m(M)}else A<h?x(A,null,U):g(U)}).catch(function(U){if(typeof f=="function")try{Promise.resolve(f(A,U,null)).then(function(M){M?x(A,U,null):m(U)}).catch(function(M){m(M)})}catch(M){m(M)}else A<h?x(A,U,null):m(U)})};function x(A,F,U){var M=typeof d=="function"?d(A,F,U):d;setTimeout(function(){_(++A)},M)}_(0)})}};function r(s){return Number.isInteger(s)&&s>=0}function i(s){this.name="ArgumentError",this.message=s}return n})}),Jf=Wn((e,t)=>{"use strict";(function(n,r){"use strict";var i="1.0.40",s="",o="?",a="function",l="undefined",c="object",h="string",d="major",f="model",g="name",m="type",_="vendor",x="version",A="architecture",F="console",U="mobile",M="tablet",Y="smarttv",Ae="wearable",ct="embedded",j=500,fe="Amazon",te="Apple",pe="ASUS",Le="BlackBerry",ut="Browser",E="Chrome",$t="Edge",Bt="Firefox",qe="Google",Kt="Huawei",Se="LG",D="Microsoft",I="Motorola",K="Opera",re="Samsung",ae="Sharp",we="Sony",ve="Xiaomi",ue="Zebra",Ie="Facebook",je="Chromium OS",It="Mac OS",He=" Browser",Xe=function(J,De){var me={};for(var tt in J)De[tt]&&De[tt].length%2===0?me[tt]=De[tt].concat(J[tt]):me[tt]=J[tt];return me},Pt=function(J){for(var De={},me=0;me<J.length;me++)De[J[me].toUpperCase()]=J[me];return De},ke=function(J,De){return typeof J===h?u(De).indexOf(u(J))!==-1:!1},u=function(J){return J.toLowerCase()},p=function(J){return typeof J===h?J.replace(/[^\d\.]/g,s).split(".")[0]:r},y=function(J,De){if(typeof J===h)return J=J.replace(/^\s\s*/,s),typeof De===l?J:J.substring(0,j)},T=function(J,De){for(var me=0,tt,Cn,Sn,lt,ye,kn;me<De.length&&!ye;){var ro=De[me],za=De[me+1];for(tt=Cn=0;tt<ro.length&&!ye&&ro[tt];)if(ye=ro[tt++].exec(J),ye)for(Sn=0;Sn<za.length;Sn++)kn=ye[++Cn],lt=za[Sn],typeof lt===c&<.length>0?lt.length===2?typeof lt[1]==a?this[lt[0]]=lt[1].call(this,kn):this[lt[0]]=lt[1]:lt.length===3?typeof lt[1]===a&&!(lt[1].exec&<[1].test)?this[lt[0]]=kn?lt[1].call(this,kn,lt[2]):r:this[lt[0]]=kn?kn.replace(lt[1],lt[2]):r:lt.length===4&&(this[lt[0]]=kn?lt[3].call(this,kn.replace(lt[1],lt[2])):r):this[lt]=kn||r;me+=2}},L=function(J,De){for(var me in De)if(typeof De[me]===c&&De[me].length>0){for(var tt=0;tt<De[me].length;tt++)if(ke(De[me][tt],J))return me===o?r:me}else if(ke(De[me],J))return me===o?r:me;return De.hasOwnProperty("*")?De["*"]:J},B={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Q={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},et={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[x,[g,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[x,[g,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[g,x],[/opios[\/ ]+([\w\.]+)/i],[x,[g,K+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[x,[g,K+" GX"]],[/\bopr\/([\w\.]+)/i],[x,[g,K]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[x,[g,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[x,[g,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[g,x],[/quark(?:pc)?\/([-\w\.]+)/i],[x,[g,"Quark"]],[/\bddg\/([\w\.]+)/i],[x,[g,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[x,[g,"UC"+ut]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[x,[g,"WeChat"]],[/konqueror\/([\w\.]+)/i],[x,[g,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[x,[g,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[x,[g,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[x,[g,"Smart Lenovo "+ut]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure "+ut],x],[/\bfocus\/([\w\.]+)/i],[x,[g,Bt+" Focus"]],[/\bopt\/([\w\.]+)/i],[x,[g,K+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[x,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[x,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[x,[g,K+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[x,[g,"MIUI"+He]],[/fxios\/([\w\.-]+)/i],[x,[g,Bt]],[/\bqihoobrowser\/?([\w\.]*)/i],[x,[g,"360"]],[/\b(qq)\/([\w\.]+)/i],[[g,/(.+)/,"$1Browser"],x],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1"+He],x],[/samsungbrowser\/([\w\.]+)/i],[x,[g,re+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[x,[g,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[g,"Sogou Mobile"],x],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[g,x],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[g],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[x,g],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[g,Ie],x],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[g,x],[/\bgsa\/([\w\.]+) .*safari\//i],[x,[g,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[x,[g,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[x,[g,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,E+" WebView"],x],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[x,[g,"Android "+ut]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[g,x],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[x,[g,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[x,g],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[g,[x,L,B]],[/(webkit|khtml)\/([\w\.]+)/i],[g,x],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[g,"Netscape"],x],[/(wolvic|librewolf)\/([\w\.]+)/i],[g,x],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[x,[g,Bt+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[g,[x,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[g,[x,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,u]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,s,u]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,u]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[_,re],[m,M]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[f,[_,re],[m,U]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[_,te],[m,U]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[_,te],[m,M]],[/(macintosh);/i],[f,[_,te]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[_,ae],[m,U]],[/(?:honor)([-\w ]+)[;\)]/i],[f,[_,"Honor"],[m,U]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[_,Kt],[m,M]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[_,Kt],[m,U]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[f,/_/g," "],[_,ve],[m,U]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[_,ve],[m,M]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[_,"OPPO"],[m,U]],[/\b(opd2\d{3}a?) bui/i],[f,[_,"OPPO"],[m,M]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[_,"Vivo"],[m,U]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[f,[_,"Realme"],[m,U]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[_,I],[m,U]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[_,I],[m,M]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[_,Se],[m,M]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[_,Se],[m,U]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[_,"Lenovo"],[m,M]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g," "],[_,"Nokia"],[m,U]],[/(pixel c)\b/i],[f,[_,qe],[m,M]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[_,qe],[m,U]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[_,we],[m,U]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[_,we],[m,M]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[_,"OnePlus"],[m,U]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[_,fe],[m,M]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[_,fe],[m,U]],[/(playbook);[-\w\),; ]+(rim)/i],[f,_,[m,M]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[_,Le],[m,U]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[_,pe],[m,M]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[_,pe],[m,U]],[/(nexus 9)/i],[f,[_,"HTC"],[m,M]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[_,[f,/_/g," "],[m,U]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[f,[_,"TCL"],[m,M]],[/(itel) ((\w+))/i],[[_,u],f,[m,L,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[_,"Acer"],[m,M]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[_,"Meizu"],[m,U]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[f,[_,"Ulefone"],[m,U]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[f,[_,"Energizer"],[m,U]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[f,[_,"Cat"],[m,U]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[f,[_,"Smartfren"],[m,U]],[/droid.+; (a(?:015|06[35]|142p?))/i],[f,[_,"Nothing"],[m,U]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[_,f,[m,U]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[_,f,[m,M]],[/(surface duo)/i],[f,[_,D],[m,M]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[_,"Fairphone"],[m,U]],[/(u304aa)/i],[f,[_,"AT&T"],[m,U]],[/\bsie-(\w*)/i],[f,[_,"Siemens"],[m,U]],[/\b(rct\w+) b/i],[f,[_,"RCA"],[m,M]],[/\b(venue[\d ]{2,7}) b/i],[f,[_,"Dell"],[m,M]],[/\b(q(?:mv|ta)\w+) b/i],[f,[_,"Verizon"],[m,M]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[_,"Barnes & Noble"],[m,M]],[/\b(tm\d{3}\w+) b/i],[f,[_,"NuVision"],[m,M]],[/\b(k88) b/i],[f,[_,"ZTE"],[m,M]],[/\b(nx\d{3}j) b/i],[f,[_,"ZTE"],[m,U]],[/\b(gen\d{3}) b.+49h/i],[f,[_,"Swiss"],[m,U]],[/\b(zur\d{3}) b/i],[f,[_,"Swiss"],[m,M]],[/\b((zeki)?tb.*\b) b/i],[f,[_,"Zeki"],[m,M]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[_,"Dragon Touch"],f,[m,M]],[/\b(ns-?\w{0,9}) b/i],[f,[_,"Insignia"],[m,M]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[_,"NextBook"],[m,M]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[_,"Voice"],f,[m,U]],[/\b(lvtel\-)?(v1[12]) b/i],[[_,"LvTel"],f,[m,U]],[/\b(ph-1) /i],[f,[_,"Essential"],[m,U]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[_,"Envizen"],[m,M]],[/\b(trio[-\w\. ]+) b/i],[f,[_,"MachSpeed"],[m,M]],[/\btu_(1491) b/i],[f,[_,"Rotor"],[m,M]],[/(shield[\w ]+) b/i],[f,[_,"Nvidia"],[m,M]],[/(sprint) (\w+)/i],[_,f,[m,U]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[_,D],[m,U]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[_,ue],[m,M]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[_,ue],[m,U]],[/smart-tv.+(samsung)/i],[_,[m,Y]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[_,re],[m,Y]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[_,Se],[m,Y]],[/(apple) ?tv/i],[_,[f,te+" TV"],[m,Y]],[/crkey/i],[[f,E+"cast"],[_,qe],[m,Y]],[/droid.+aft(\w+)( bui|\))/i],[f,[_,fe],[m,Y]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[_,ae],[m,Y]],[/(bravia[\w ]+)( bui|\))/i],[f,[_,we],[m,Y]],[/(mitv-\w{5}) bui/i],[f,[_,ve],[m,Y]],[/Hbbtv.*(technisat) (.*);/i],[_,f,[m,Y]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[_,y],[f,y],[m,Y]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,Y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[_,f,[m,F]],[/droid.+; (shield) bui/i],[f,[_,"Nvidia"],[m,F]],[/(playstation [345portablevi]+)/i],[f,[_,we],[m,F]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[_,D],[m,F]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[f,[_,re],[m,Ae]],[/((pebble))app/i],[_,f,[m,Ae]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[_,te],[m,Ae]],[/droid.+; (glass) \d/i],[f,[_,qe],[m,Ae]],[/droid.+; (wt63?0{2,3})\)/i],[f,[_,ue],[m,Ae]],[/droid.+; (glass) \d/i],[f,[_,qe],[m,Ae]],[/(pico) (4|neo3(?: link|pro)?)/i],[_,f,[m,Ae]],[/; (quest( \d| pro)?)/i],[f,[_,Ie],[m,Ae]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[_,[m,ct]],[/(aeobc)\b/i],[f,[_,fe],[m,ct]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[f,[m,U]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[m,M]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,M]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,U]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[_,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[x,[g,$t+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[g,x],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[x,[g,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[g,x],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[x,g]],os:[[/microsoft (windows) (vista|xp)/i],[g,x],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[g,[x,L,Q]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[x,L,Q],[g,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[x,/_/g,"."],[g,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[g,It],[x,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[x,g],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[g,x],[/\(bb(10);/i],[x,[g,Le]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[x,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[x,[g,Bt+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[x,[g,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[x,[g,"watchOS"]],[/crkey\/([\d\.]+)/i],[x,[g,E+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[g,je],x],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[g,x],[/(sunos) ?([\w\.\d]*)/i],[[g,"Solaris"],x],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[g,x]]},Ge=function(J,De){if(typeof J===c&&(De=J,J=r),!(this instanceof Ge))return new Ge(J,De).getResult();var me=typeof n!==l&&n.navigator?n.navigator:r,tt=J||(me&&me.userAgent?me.userAgent:s),Cn=me&&me.userAgentData?me.userAgentData:r,Sn=De?Xe(et,De):et,lt=me&&me.userAgent==tt;return this.getBrowser=function(){var ye={};return ye[g]=r,ye[x]=r,T.call(ye,tt,Sn.browser),ye[d]=p(ye[x]),lt&&me&&me.brave&&typeof me.brave.isBrave==a&&(ye[g]="Brave"),ye},this.getCPU=function(){var ye={};return ye[A]=r,T.call(ye,tt,Sn.cpu),ye},this.getDevice=function(){var ye={};return ye[_]=r,ye[f]=r,ye[m]=r,T.call(ye,tt,Sn.device),lt&&!ye[m]&&Cn&&Cn.mobile&&(ye[m]=U),lt&&ye[f]=="Macintosh"&&me&&typeof me.standalone!==l&&me.maxTouchPoints&&me.maxTouchPoints>2&&(ye[f]="iPad",ye[m]=M),ye},this.getEngine=function(){var ye={};return ye[g]=r,ye[x]=r,T.call(ye,tt,Sn.engine),ye},this.getOS=function(){var ye={};return ye[g]=r,ye[x]=r,T.call(ye,tt,Sn.os),lt&&!ye[g]&&Cn&&Cn.platform&&Cn.platform!="Unknown"&&(ye[g]=Cn.platform.replace(/chrome os/i,je).replace(/macos/i,It)),ye},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return tt},this.setUA=function(ye){return tt=typeof ye===h&&ye.length>j?y(ye,j):ye,this},this.setUA(tt),this};Ge.VERSION=i,Ge.BROWSER=Pt([g,x,d]),Ge.CPU=Pt([A]),Ge.DEVICE=Pt([f,_,m,F,U,Y,M,Ae,ct]),Ge.ENGINE=Ge.OS=Pt([g,x]),typeof e!==l?(typeof t!==l&&t.exports&&(e=t.exports=Ge),e.UAParser=Ge):typeof define===a&&define.amd?define(function(){return Ge}):typeof n!==l&&(n.UAParser=Ge);var Me=typeof n!==l&&(n.jQuery||n.Zepto);if(Me&&!Me.ua){var dt=new Ge;Me.ua=dt.getResult(),Me.ua.get=function(){return dt.getUA()},Me.ua.set=function(J){dt.setUA(J);var De=dt.getResult();for(var me in De)Me.ua[me]=De[me]}}})(typeof window=="object"?window:e)}),R_=Wn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URLBuilder=void 0;var t=function(){function n(r){try{this.base=new URL(r),this.params=new URLSearchParams(this.base.search.slice(1))}catch(i){console.error("Un-parsable URL",i)}}return n.prototype.appendQueryParam=function(r,i){this.params.append(r,i?i.toString():"")},n.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},n.prototype.deleteQueryParam=function(r){this.params.delete(r)},n.prototype.getBase=function(){return this.base},n.prototype.getPath=function(){return this.base.pathname},n.prototype.getHostname=function(){return this.base.hostname},n.prototype.getParams=function(){return this.params},n.prototype.getQueryParam=function(r){if(!this.params)return"";var i=this.params.get(r);return!i||i==="undefined"||i==="null"?void 0:i},n.prototype.getQueryString=function(){return this.params.toString()},n.prototype.setPath=function(r){return this.base.pathname=r,this},n.prototype.setQueryParam=function(r,i){return this.params.set(r,i?i.toString():""),this},n.prototype.setQueryString=function(r){if(r)return r[0]==="?"&&(r=r.slice(1)),this.params=new URLSearchParams(r),this},n.prototype.toString=function(){var r=this.params.toString();return r===""?this.base.search="":this.base.search="?"+r,this.base.toString()},n}();e.URLBuilder=t}),tp=Wn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PriceRuleType=e.DiscountType=void 0;var t=function(r){return r[r.NONE=0]="NONE",r[r.STATIC=1]="STATIC",r[r.UNIQUE_FLAT=2]="UNIQUE_FLAT",r[r.UNIQUE_FLAT_ITEMS=3]="UNIQUE_FLAT_ITEMS",r[r.UNIQUE_FIXED_ITEMS=4]="UNIQUE_FIXED_ITEMS",r[r.UNIQUE_CHEAPEST_ITEM_FREE=5]="UNIQUE_CHEAPEST_ITEM_FREE",r[r.BXGY=6]="BXGY",r}(t||(e.DiscountType=t={})),n=function(r){return r.FIXED_AMOUNT="fixed_amount",r.PERCENTAGE="percentage",r}(n||(e.PriceRuleType=n={}))}),A_=Wn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayUtils=void 0;var t=class VS{static of(r,i){return i!==void 0?new Array(r).fill(i):Array.from({length:r},(s,o)=>o)}static remove(r,i){let s=r.indexOf(i);return s===-1?!1:(r.splice(s,1),!0)}static swap(r,i,s){[r[i],r[s]]=[r[s],r[i]]}static sum(r,i){return r.reduce((s,o)=>s+Math.max(i?i(o):+o,0),0)}static unique(r,i){return r.filter((s,o,a)=>a.findIndex(l=>l[i]===s[i])===o)}static shuffle(r){let i=r.length;for(;i!=0;){let s=Math.floor(Math.random()*i);i--,VS.swap(r,i,s)}}};e.ArrayUtils=t}),hx=Wn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageDestination=e.AssetType=void 0;var t=function(r){return r[r.IMAGE=1]="IMAGE",r[r.VIDEO=2]="VIDEO",r[r.GIF=3]="GIF",r[r.SCREENSHOT=4]="SCREENSHOT",r[r.THREE_D=5]="THREE_D",r[r.FONT=6]="FONT",r[r.TEXT=7]="TEXT",r[r.JSON=8]="JSON",r[r.SVG=9]="SVG",r[r.HTML=10]="HTML",r[r.LOGO=11]="LOGO",r[r.OTHERS=1e3]="OTHERS",r}(t||(e.AssetType=t={})),n=function(r){return r.AWS_S3="AWS_S3",r.SHOPIFY_FILES="SHOPIFY_FILES",r}(n||(e.StorageDestination=n={}))}),gx=Wn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TemplateStatus=void 0;var t=function(n){return n[n.DRAFT=1]="DRAFT",n[n.PUBLISHED=2]="PUBLISHED",n[n.DISABLED=3]="DISABLED",n}(t||(e.TemplateStatus=t={}))}),vx=Wn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionType=void 0;var t=function(n){return n.VIEW_ITEM="VIEW_ITEM",n.ADD_TO_CART="ADD_TO_CART",n.VIEW_CATEGORY="VIEW_CATEGORY",n.VIEW_TAG="VIEW_TAG",n.SEARCH="SEARCH",n.APPLY_COUPON="APPLY_COUPON",n}(t||(e.ActionType=t={}))}),_x=Wn(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(r,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(r,o,a)}:function(r,i,s,o){o===void 0&&(o=s),r[o]=i[s]}),n=e&&e.__exportStar||function(r,i){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,r,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(hx(),e),n(gx(),e),n(Yn(),e),n(vx(),e)});function gN(e,t){return Object.is(e,t)}var on=null,du=!1,Kh=1,Ti=Symbol("SIGNAL");function $e(e){let t=on;return on=e,t}function rw(){return on}var fu={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function iw(e){if(du)throw new Error("");if(on===null)return;on.consumerOnSignalRead(e);let t=on.nextProducerIndex++;if(hu(on),t<on.producerNode.length&&on.producerNode[t]!==e&&Oc(on)){let n=on.producerNode[t];pu(n,on.producerIndexOfThis[t])}on.producerNode[t]!==e&&(on.producerNode[t]=e,on.producerIndexOfThis[t]=Oc(on)?cw(e,on,t):0),on.producerLastReadVersion[t]=e.version}function yN(){Kh++}function vN(e){if(!(Oc(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===Kh)){if(!e.producerMustRecompute(e)&&!Xh(e)){nw(e);return}e.producerRecomputeValue(e),nw(e)}}function ow(e){if(e.liveConsumerNode===void 0)return;let t=du;du=!0;try{for(let n of e.liveConsumerNode)n.dirty||_N(n)}finally{du=t}}function sw(){return on?.consumerAllowSignalWrites!==!1}function _N(e){e.dirty=!0,ow(e),e.consumerMarkedDirty?.(e)}function nw(e){e.dirty=!1,e.lastCleanEpoch=Kh}function Zh(e){return e&&(e.nextProducerIndex=0),$e(e)}function aw(e,t){if($e(t),!(!e||e.producerNode===void 0||e.producerIndexOfThis===void 0||e.producerLastReadVersion===void 0)){if(Oc(e))for(let n=e.nextProducerIndex;n<e.producerNode.length;n++)pu(e.producerNode[n],e.producerIndexOfThis[n]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function Xh(e){hu(e);for(let t=0;t<e.producerNode.length;t++){let n=e.producerNode[t],r=e.producerLastReadVersion[t];if(r!==n.version||(vN(n),r!==n.version))return!0}return!1}function Jh(e){if(hu(e),Oc(e))for(let t=0;t<e.producerNode.length;t++)pu(e.producerNode[t],e.producerIndexOfThis[t]);e.producerNode.length=e.producerLastReadVersion.length=e.producerIndexOfThis.length=0,e.liveConsumerNode&&(e.liveConsumerNode.length=e.liveConsumerIndexOfThis.length=0)}function cw(e,t,n){if(lw(e),e.liveConsumerNode.length===0&&uw(e))for(let r=0;r<e.producerNode.length;r++)e.producerIndexOfThis[r]=cw(e.producerNode[r],e,r);return e.liveConsumerIndexOfThis.push(n),e.liveConsumerNode.push(t)-1}function pu(e,t){if(lw(e),e.liveConsumerNode.length===1&&uw(e))for(let r=0;r<e.producerNode.length;r++)pu(e.producerNode[r],e.producerIndexOfThis[r]);let n=e.liveConsumerNode.length-1;if(e.liveConsumerNode[t]=e.liveConsumerNode[n],e.liveConsumerIndexOfThis[t]=e.liveConsumerIndexOfThis[n],e.liveConsumerNode.length--,e.liveConsumerIndexOfThis.length--,t<e.liveConsumerNode.length){let r=e.liveConsumerIndexOfThis[t],i=e.liveConsumerNode[t];hu(i),i.producerIndexOfThis[r]=t}}function Oc(e){return e.consumerIsAlwaysLive||(e?.liveConsumerNode?.length??0)>0}function hu(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function lw(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function uw(e){return e.producerNode!==void 0}function EN(){throw new Error}var dw=EN;function fw(e){dw(e)}function pw(e){dw=e}var wN=null;function hw(e){let t=Object.create(gw);t.value=e;let n=()=>(iw(t),t.value);return n[Ti]=t,n}function Qh(e,t){sw()||fw(e),e.equal(e.value,t)||(e.value=t,bN(e))}function mw(e,t){sw()||fw(e),Qh(e,t(e.value))}var gw=ne(w({},fu),{equal:gN,value:void 0,kind:"signal"});function bN(e){e.version++,yN(),ow(e),wN?.()}function Te(e){return typeof e=="function"}function mu(e){let t=e(n=>{Error.call(n),n.stack=new Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var gu=mu(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:
|
|
2
|
-
${
|
|
3
|
-
`)}`:"",this.name="UnsubscriptionError",this.errors=t});function Lo(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var ot=class $h{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let s of n)s.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(Te(r))try{r()}catch(s){t=s instanceof gu?s.errors:[s]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let s of i)try{yw(s)}catch(o){t=t??[],o instanceof gu?t=[...t,...o.errors]:t.push(o)}}if(t)throw new gu(t)}}add(t){var n;if(t&&t!==this)if(this.closed)yw(t);else{if(t instanceof $h){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}}_hasParent(t){let{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){let{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&Lo(n,t)}remove(t){let{_finalizers:n}=this;n&&Lo(n,t),t instanceof $h&&t._removeParent(this)}};ot.EMPTY=(()=>{let e=new ot;return e.closed=!0,e})();var em=ot.EMPTY;function yu(e){return e instanceof ot||e&&"closed"in e&&Te(e.remove)&&Te(e.add)&&Te(e.unsubscribe)}function yw(e){Te(e)?e():e.unsubscribe()}var Mr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},zs={setTimeout(e,t,...n){let{delegate:r}=zs;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=zs;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function vu(e){zs.setTimeout(()=>{let{onUnhandledError:t}=Mr;if(t)t(e);else throw e})}function Pc(){}var vw=tm("C",void 0,void 0);function _w(e){return tm("E",void 0,e)}function Ew(e){return tm("N",e,void 0)}function tm(e,t,n){return{kind:e,value:t,error:n}}var Fo=null;function qs(e){if(Mr.useDeprecatedSynchronousErrorHandling){let t=!Fo;if(t&&(Fo={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=Fo;if(Fo=null,n)throw r}}else e()}function ww(e){Mr.useDeprecatedSynchronousErrorHandling&&Fo&&(Fo.errorThrown=!0,Fo.error=e)}var Bo=class extends ot{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,yu(e)&&e.add(this)):this.destination=DN}static create(e,t,n){return new Ys(e,t,n)}next(e){this.isStopped?rm(Ew(e),this):this._next(e)}error(e){this.isStopped?rm(_w(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?rm(vw,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},CN=Function.prototype.bind;function nm(e,t){return CN.call(e,t)}var im=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){_u(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){_u(n)}else _u(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){_u(t)}}},Ys=class extends Bo{constructor(e,t,n){super();let r;if(Te(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let i;this&&Mr.useDeprecatedNextContext?(i=Object.create(e),i.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&nm(e.next,i),error:e.error&&nm(e.error,i),complete:e.complete&&nm(e.complete,i)}):r=e}this.destination=new im(r)}};function _u(e){Mr.useDeprecatedSynchronousErrorHandling?ww(e):vu(e)}function SN(e){throw e}function rm(e,t){let{onStoppedNotification:n}=Mr;n&&zs.setTimeout(()=>n(e,t))}var DN={closed:!0,next:Pc,error:SN,complete:Pc},Ks=typeof Symbol=="function"&&Symbol.observable||"@@observable";function oo(e){return e}function bw(e){return e.length===0?oo:e.length===1?e[0]:function(t){return e.reduce((n,r)=>r(n),t)}}var nt=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,i){let s=TN(n)?n:new Ys(n,r,i);return qs(()=>{let{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=Cw(r),new r((i,s)=>{let o=new Ys({next:a=>{try{n(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:i});this.subscribe(o)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[Ks](){return this}pipe(...n){return bw(n)(this)}toPromise(n){return n=Cw(n),new n((r,i)=>{let s;this.subscribe(o=>s=o,o=>i(o),()=>r(s))})}}return e.create=t=>new e(t),e})();function Cw(e){var t;return(t=e??Mr.Promise)!==null&&t!==void 0?t:Promise}function IN(e){return e&&Te(e.next)&&Te(e.error)&&Te(e.complete)}function TN(e){return e&&e instanceof Bo||IN(e)&&yu(e)}function xN(e){return Te(e?.lift)}function Tt(e){return t=>{if(xN(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Nt(e,t,n,r,i){return new om(e,t,n,r,i)}var om=class extends Bo{constructor(e,t,n,r,i,s){super(e),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=t?function(o){try{t(o)}catch(a){e.error(a)}}:super._next,this._error=r?function(o){try{r(o)}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(o){e.error(o)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}},Zs={schedule(e){let t=requestAnimationFrame,n=cancelAnimationFrame,{delegate:r}=Zs;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);let i=t(s=>{n=void 0,e(s)});return new ot(()=>n?.(i))},requestAnimationFrame(...e){let{delegate:t}=Zs;return(t?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){let{delegate:t}=Zs;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},Sw=mu(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),ee=(()=>{class e extends nt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new Eu(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new Sw}next(n){qs(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){qs(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){qs(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:r,isStopped:i,observers:s}=this;return r||i?em:(this.currentObservers=null,s.push(n),new ot(()=>{this.currentObservers=null,Lo(s,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:i,isStopped:s}=this;r?n.error(i):s&&n.complete()}asObservable(){let n=new nt;return n.source=this,n}}return e.create=(t,n)=>new Eu(t,n),e})(),Eu=class extends ee{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.next)===null||n===void 0||n.call(t,e)}error(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.error)===null||n===void 0||n.call(t,e)}complete(){var e,t;(t=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||t===void 0||t.call(e)}_subscribe(e){var t,n;return(n=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&n!==void 0?n:em}},Or=class extends ee{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:n}=this;if(e)throw t;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}},kc={now(){return(kc.delegate||Date).now()},delegate:void 0},Vo=class extends ee{constructor(e=1/0,t=1/0,n=kc){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,t)}next(e){let{isStopped:t,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:i,_windowTime:s}=this;t||(n.push(e),!r&&n.push(i.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(e),{_infiniteTimeWindow:n,_buffer:r}=this,i=r.slice();for(let s=0;s<i.length&&!e.closed;s+=n?1:2)e.next(i[s]);return this._checkFinalizedStatuses(e),t}_trimBuffer(){let{_bufferSize:e,_timestampProvider:t,_buffer:n,_infiniteTimeWindow:r}=this,i=(r?1:2)*e;if(e<1/0&&i<n.length&&n.splice(0,n.length-i),!r){let s=t.now(),o=0;for(let a=1;a<n.length&&n[a]<=s;a+=2)o=a;o&&n.splice(0,o+1)}}},wu=class extends ot{constructor(e,t){super()}schedule(e,t=0){return this}},Lc={setInterval(e,t,...n){let{delegate:r}=Lc;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){let{delegate:t}=Lc;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},Xs=class extends wu{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){var n;if(this.closed)return this;this.state=e;let r=this.id,i=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(i,this.id,t),this}requestAsyncId(e,t,n=0){return Lc.setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,t,n=0){if(n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&Lc.clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let n=!1,r;try{this.work(e)}catch(i){n=!0,r=i||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:e,scheduler:t}=this,{actions:n}=t;this.work=this.state=this.scheduler=null,this.pending=!1,Lo(n,this),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}},Js=class US{constructor(t,n=US.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}};Js.now=kc.now;var Qs=class extends Js{constructor(e,t=Js.now){super(e,t),this.actions=[],this._active=!1}flush(e){let{actions:t}=this;if(this._active){t.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},Uo=new Qs(Xs),Dw=Uo,bu=class extends Xs{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,n=0){return n!==null&&n>0?super.requestAsyncId(e,t,n):(e.actions.push(this),e._scheduled||(e._scheduled=Zs.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,t,n=0){var r;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,t,n);let{actions:i}=e;t!=null&&((r=i[i.length-1])===null||r===void 0?void 0:r.id)!==t&&(Zs.cancelAnimationFrame(t),e._scheduled=void 0)}},Cu=class extends Qs{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:n}=this,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}}},Su=new Cu(bu),Ho=new nt(e=>e.complete());function Du(e){return e&&Te(e.schedule)}function Iw(e){return e[e.length-1]}function so(e){return Du(Iw(e))?e.pop():void 0}function Tw(e,t){return typeof Iw(e)=="number"?e.pop():t}function Rw(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{c(r.next(h))}catch(d){o(d)}}function l(h){try{c(r.throw(h))}catch(d){o(d)}}function c(h){h.done?s(h.value):i(h.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function xw(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function jo(e){return this instanceof jo?(this.v=e,this):new jo(e)}function Nw(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(g){return function(m){return Promise.resolve(m).then(g,d)}}function a(g,m){r[g]&&(i[g]=function(_){return new Promise(function(x,A){s.push([g,_,x,A])>1||l(g,_)})},m&&(i[g]=m(i[g])))}function l(g,m){try{c(r[g](m))}catch(_){f(s[0][3],_)}}function c(g){g.value instanceof jo?Promise.resolve(g.value.v).then(h,d):f(s[0][2],g)}function h(g){l("next",g)}function d(g){l("throw",g)}function f(g,m){g(m),s.shift(),s.length&&l(s[0][0],s[0][1])}}function Aw(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof xw=="function"?xw(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=e[s]&&function(o){return new Promise(function(a,l){o=e[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}}var ea=e=>e&&typeof e.length=="number"&&typeof e!="function";function Iu(e){return Te(e?.then)}function Tu(e){return Te(e[Ks])}function xu(e){return Symbol.asyncIterator&&Te(e?.[Symbol.asyncIterator])}function Ru(e){return new TypeError(`You provided ${e!==null&&typeof e=="object"?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function RN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Nu=RN();function Au(e){return Te(e?.[Nu])}function Mu(e){return Nw(this,arguments,function*(){let t=e.getReader();try{for(;;){let{value:n,done:r}=yield jo(t.read());if(r)return yield jo(void 0);yield yield jo(n)}}finally{t.releaseLock()}})}function Ou(e){return Te(e?.getReader)}function Ut(e){if(e instanceof nt)return e;if(e!=null){if(Tu(e))return NN(e);if(ea(e))return AN(e);if(Iu(e))return MN(e);if(xu(e))return Mw(e);if(Au(e))return ON(e);if(Ou(e))return PN(e)}throw Ru(e)}function NN(e){return new nt(t=>{let n=e[Ks]();if(Te(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function AN(e){return new nt(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function MN(e){return new nt(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,vu)})}function ON(e){return new nt(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function Mw(e){return new nt(t=>{kN(e,t).catch(n=>t.error(n))})}function PN(e){return Mw(Mu(e))}function kN(e,t){var n,r,i,s;return Rw(this,void 0,void 0,function*(){try{for(n=Aw(e);r=yield n.next(),!r.done;){let o=r.value;if(t.next(o),t.closed)return}}catch(o){i={error:o}}finally{try{r&&!r.done&&(s=n.return)&&(yield s.call(n))}finally{if(i)throw i.error}}t.complete()})}function pr(e,t,n,r=0,i=!1){let s=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(s),!i)return s}function Pu(e,t=0){return Tt((n,r)=>{n.subscribe(Nt(r,i=>pr(r,e,()=>r.next(i),t),()=>pr(r,e,()=>r.complete(),t),i=>pr(r,e,()=>r.error(i),t)))})}function ku(e,t=0){return Tt((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function Ow(e,t){return Ut(e).pipe(ku(t),Pu(t))}function Pw(e,t){return Ut(e).pipe(ku(t),Pu(t))}function kw(e,t){return new nt(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Lw(e,t){return new nt(n=>{let r;return pr(n,t,()=>{r=e[Nu](),pr(n,t,()=>{let i,s;try{({value:i,done:s}=r.next())}catch(o){n.error(o);return}s?n.complete():n.next(i)},0,!0)}),()=>Te(r?.return)&&r.return()})}function Lu(e,t){if(!e)throw new Error("Iterable cannot be null");return new nt(n=>{pr(n,t,()=>{let r=e[Symbol.asyncIterator]();pr(n,t,()=>{r.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function Fw(e,t){return Lu(Mu(e),t)}function Bw(e,t){if(e!=null){if(Tu(e))return Ow(e,t);if(ea(e))return kw(e,t);if(Iu(e))return Pw(e,t);if(xu(e))return Lu(e,t);if(Au(e))return Lw(e,t);if(Ou(e))return Fw(e,t)}throw Ru(e)}function xi(e,t){return t?Bw(e,t):Ut(e)}function $o(...e){let t=so(e);return xi(e,t)}function Vw(e){return e instanceof Date&&!isNaN(e)}function hr(e,t){return Tt((n,r)=>{let i=0;n.subscribe(Nt(r,s=>{r.next(e.call(t,s,i++))}))})}var{isArray:LN}=Array;function FN(e,t){return LN(t)?e(...t):e(t)}function Uw(e){return hr(t=>FN(e,t))}function Hw(e,t,n,r,i,s,o,a){let l=[],c=0,h=0,d=!1,f=()=>{d&&!l.length&&!c&&t.complete()},g=_=>c<r?m(_):l.push(_),m=_=>{s&&t.next(_),c++;let x=!1;Ut(n(_,h++)).subscribe(Nt(t,A=>{i?.(A),s?g(A):t.next(A)},()=>{x=!0},void 0,()=>{if(x)try{for(c--;l.length&&c<r;){let A=l.shift();o?pr(t,o,()=>m(A)):m(A)}f()}catch(A){t.error(A)}}))};return e.subscribe(Nt(t,g,()=>{d=!0,f()})),()=>{a?.()}}function Ri(e,t,n=1/0){return Te(t)?Ri((r,i)=>hr((s,o)=>t(r,s,i,o))(Ut(e(r,i))),n):(typeof t=="number"&&(n=t),Tt((r,i)=>Hw(r,i,e,n)))}function Fu(e=1/0){return Ri(oo,e)}function jw(){return Fu(1)}function sm(...e){return jw()(xi(e,so(e)))}function am(e){return new nt(t=>{Ut(e()).subscribe(t)})}var BN=["addListener","removeListener"],VN=["addEventListener","removeEventListener"],UN=["on","off"];function Ni(e,t,n,r){if(Te(n)&&(r=n,n=void 0),r)return Ni(e,t,n).pipe(Uw(r));let[i,s]=$N(e)?VN.map(o=>a=>e[o](t,a,n)):HN(e)?BN.map($w(e,t)):jN(e)?UN.map($w(e,t)):[];if(!i&&ea(e))return Ri(o=>Ni(o,t,n))(Ut(e));if(!i)throw new TypeError("Invalid event target");return new nt(o=>{let a=(...l)=>o.next(1<l.length?l:l[0]);return i(a),()=>s(a)})}function $w(e,t){return n=>r=>e[n](t,r)}function HN(e){return Te(e.addListener)&&Te(e.removeListener)}function jN(e){return Te(e.on)&&Te(e.off)}function $N(e){return Te(e.addEventListener)&&Te(e.removeEventListener)}function Bu(e=0,t,n=Dw){let r=-1;return t!=null&&(Du(t)?n=t:r=t),new nt(i=>{let s=Vw(e)?+e-n.now():e;s<0&&(s=0);let o=0;return n.schedule(function(){i.closed||(i.next(o++),0<=r?this.schedule(void 0,r):i.complete())},s)})}function cm(e=0,t=Uo){return e<0&&(e=0),Bu(e,e,t)}function ao(...e){let t=so(e),n=Tw(e,1/0),r=e;return r.length?r.length===1?Ut(r[0]):Fu(n)(xi(r,t)):Ho}function Wo(e,t){return Tt((n,r)=>{let i=0;n.subscribe(Nt(r,s=>e.call(t,s,i++)&&r.next(s)))})}function Ww(e){return Tt((t,n)=>{let r=!1,i=null,s=null,o=!1,a=()=>{if(s?.unsubscribe(),s=null,r){r=!1;let c=i;i=null,n.next(c)}o&&n.complete()},l=()=>{s=null,o&&n.complete()};t.subscribe(Nt(n,c=>{r=!0,i=c,s||Ut(e(c)).subscribe(s=Nt(n,a,l))},()=>{o=!0,(!r||!s||s.closed)&&n.complete()}))})}function Vu(e,t=Uo){return Ww(()=>Bu(e,t))}function Pr(e,t=Uo){return Tt((n,r)=>{let i=null,s=null,o=null,a=()=>{if(i){i.unsubscribe(),i=null;let c=s;s=null,r.next(c)}};function l(){let c=o+e,h=t.now();if(h<c){i=this.schedule(void 0,c-h),r.add(i);return}a()}n.subscribe(Nt(r,c=>{s=c,o=t.now(),i||(i=t.schedule(l,e),r.add(i))},()=>{a(),r.complete()},void 0,()=>{s=i=null}))})}function lm(e){return e<=0?()=>Ho:Tt((t,n)=>{let r=0;t.subscribe(Nt(n,i=>{++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function Uu(e,t=oo){return e=e??WN,Tt((n,r)=>{let i,s=!0;n.subscribe(Nt(r,o=>{let a=t(o);(s||!e(i,a))&&(s=!1,i=a,r.next(o))}))})}function WN(e,t){return e===t}function um(e){return Wo((t,n)=>e<=n)}function Ai(...e){let t=so(e);return Tt((n,r)=>{(t?sm(e,n,t):sm(e,n)).subscribe(r)})}function ta(e,t){return Tt((n,r)=>{let i=null,s=0,o=!1,a=()=>o&&!i&&r.complete();n.subscribe(Nt(r,l=>{i?.unsubscribe();let c=0,h=s++;Ut(e(l,h)).subscribe(i=Nt(r,d=>r.next(t?t(l,d,h,c++):d),()=>{i=null,a()}))},()=>{o=!0,a()}))})}function mr(e){return Tt((t,n)=>{Ut(e).subscribe(Nt(n,()=>n.complete(),Pc)),!n.closed&&t.subscribe(n)})}function dm(e,t,n){let r=Te(e)||t||n?{next:e,error:t,complete:n}:e;return r?Tt((i,s)=>{var o;(o=r.subscribe)===null||o===void 0||o.call(r);let a=!0;i.subscribe(Nt(s,l=>{var c;(c=r.next)===null||c===void 0||c.call(r,l),s.next(l)},()=>{var l;a=!1,(l=r.complete)===null||l===void 0||l.call(r),s.complete()},l=>{var c;a=!1,(c=r.error)===null||c===void 0||c.call(r,l),s.error(l)},()=>{var l,c;a&&((l=r.unsubscribe)===null||l===void 0||l.call(r)),(c=r.finalize)===null||c===void 0||c.call(r)}))}):oo}var Ob="https://g.co/ng/security#xss",We=class extends Error{code;constructor(e,t){super(Ag(e,t)),this.code=e}};function Ag(e,t){return`${`NG0${Math.abs(e)}`}${t?": "+t:""}`}function Mg(e){return{toString:e}.toString()}var zo=globalThis;function At(e){for(let t in e)if(e[t]===At)return t;throw Error("Could not find renamed property on target object.")}function GN(e,t){for(let n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function gr(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(gr).join(", ")}]`;if(e==null)return""+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return""+n;let r=n.indexOf(`
|
|
4
|
-
`);return r>=0?n.slice(0,r):n}function
|
|
5
|
-
`+
|
|
6
|
-
`&&
|
|
7
|
-
`)}`}function qo(e,t){return e.hasOwnProperty(Xu)?e[Xu]:null}function lA(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(n&&(i=n(i),s=n(s)),s!==i)return!1}return!0}function uA(e){return e.flat(Number.POSITIVE_INFINITY)}function Fg(e,t){e.forEach(n=>Array.isArray(n)?Fg(n,t):t(n))}function Ub(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Qu(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function dA(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let s=i-2;e[i]=e[s],i--}e[t]=n,e[t+1]=r}}function fA(e,t,n){let r=el(e,t);return r>=0?e[r|1]=n:(r=~r,dA(e,r,t,n)),r}function fm(e,t){let n=el(e,t);if(n>=0)return e[n|1]}function el(e,t){return pA(e,t,1)}function pA(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let s=r+(i-r>>1),o=e[s<<n];if(t===o)return s<<n;o>t?i=s:r=s+1}return~(i<<n)}var Yo={},Oi=[],jc=new he(""),Hb=new he("",-1),jb=new he(""),ed=class{get(e,t=Hc){if(t===Hc){let n=new Error(`NullInjectorError: No provider for ${gr(e)}!`);throw n.name="NullInjectorError",n}return t}};function Ko(e){return e[KN]||null}function $b(e){return e[ZN]||null}function Wb(e){return e[kg]||null}function hA(e){let t=Ko(e)||$b(e)||Wb(e);return t!==null&&t.standalone}function Gb(e){return{\u0275providers:e}}function mA(...e){return{\u0275providers:zb(!0,e),\u0275fromNgModule:!0}}function zb(e,...t){let n=[],r=new Set,i,s=o=>{n.push(o)};return Fg(t,o=>{let a=o;Rm(a,s,[],r)&&(i||=[],i.push(a))}),i!==void 0&&qb(i,s),n}function qb(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:i}=e[n];Bg(i,s=>{t(s,r)})}}function Rm(e,t,n,r){if(e=Ln(e),!e)return!1;let i=null,s=qw(e),o=!s&&Ko(e);if(!s&&!o){let l=e.ngModule;if(s=qw(l),s)i=l;else return!1}else{if(o&&!o.standalone)return!1;i=e}let a=r.has(i);if(o){if(a)return!1;if(r.add(i),o.dependencies){let l=typeof o.dependencies=="function"?o.dependencies():o.dependencies;for(let c of l)Rm(c,t,n,r)}}else if(s){if(s.imports!=null&&!a){r.add(i);let c;try{Fg(s.imports,h=>{Rm(h,t,n,r)&&(c||=[],c.push(h))})}finally{}c!==void 0&&qb(c,t)}if(!a){let c=qo(i)||(()=>new i);t({provide:i,useFactory:c,deps:Oi},i),t({provide:jb,useValue:i,multi:!0},i),t({provide:jc,useValue:()=>Ze(i),multi:!0},i)}let l=s.providers;if(l!=null&&!a){let c=e;Bg(l,h=>{t(h,c)})}}else return!1;return i!==e&&e.providers!==void 0}function Bg(e,t){for(let n of e)Fb(n)&&(n=n.\u0275providers),Array.isArray(n)?Bg(n,t):t(n)}var gA=At({provide:String,useValue:At});function Yb(e){return e!==null&&typeof e=="object"&&gA in e}function yA(e){return!!(e&&e.useExisting)}function vA(e){return!!(e&&e.useFactory)}function la(e){return typeof e=="function"}function _A(e){return!!e.useClass}var wd=new he(""),Gu={},EA={},pm;function bd(){return pm===void 0&&(pm=new ed),pm}var zn=class{},$c=class extends zn{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,Am(e,s=>this.processProvider(s)),this.records.set(Hb,na(void 0,this)),r.has("environment")&&this.records.set(zn,na(void 0,this));let i=this.records.get(wd);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(jb,Oi,Ye.Self))}destroy(){Bc(this),this._destroyed=!0;let e=$e(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),$e(e)}}onDestroy(e){return Bc(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Bc(this);let t=co(this),n=Gn(void 0),r;try{return e()}finally{co(t),Gn(n)}}get(e,t=Hc,n=Ye.Default){if(Bc(this),e.hasOwnProperty(Kw))return e[Kw](this);n=Ed(n);let r,i=co(this),s=Gn(void 0);try{if(!(n&Ye.SkipSelf)){let a=this.records.get(e);if(a===void 0){let l=DA(e)&&Pg(e);l&&this.injectableDefInScope(l)?a=na(Nm(e),Gu):a=null,this.records.set(e,a)}if(a!=null)return this.hydrate(e,a)}let o=n&Ye.Self?bd():this.parent;return t=n&Ye.Optional&&t===Hc?null:t,o.get(e,t)}catch(o){if(o.name==="NullInjectorError"){if((o[Ju]=o[Ju]||[]).unshift(gr(e)),i)throw o;return aA(o,e,"R3InjectorError",this.source)}else throw o}finally{Gn(s),co(i)}}resolveInjectorInitializers(){let e=$e(null),t=co(this),n=Gn(void 0),r;try{let i=this.get(jc,Oi,Ye.Self);for(let s of i)s()}finally{co(t),Gn(n),$e(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(gr(n));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=Ln(e);let t=la(e)?e:Ln(e&&e.provide),n=bA(e);if(!la(e)&&e.multi===!0){let r=this.records.get(t);r||(r=na(void 0,Gu,!0),r.factory=()=>xm(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t){let n=$e(null);try{return t.value===Gu&&(t.value=EA,t.value=t.factory()),typeof t.value=="object"&&t.value&&SA(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{$e(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Ln(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function Nm(e){let t=Pg(e),n=t!==null?t.factory:qo(e);if(n!==null)return n;if(e instanceof he)throw new We(204,!1);if(e instanceof Function)return wA(e);throw new We(204,!1)}function wA(e){if(e.length>0)throw new We(204,!1);let t=qN(e);return t!==null?()=>t.factory(e):()=>new e}function bA(e){if(Yb(e))return na(void 0,e.useValue);{let t=Kb(e);return na(t,Gu)}}function Kb(e,t,n){let r;if(la(e)){let i=Ln(e);return qo(i)||Nm(i)}else if(Yb(e))r=()=>Ln(e.useValue);else if(vA(e))r=()=>e.useFactory(...xm(e.deps||[]));else if(yA(e))r=()=>Ze(Ln(e.useExisting));else{let i=Ln(e&&(e.useClass||e.provide));if(CA(e))r=()=>new i(...xm(e.deps));else return qo(i)||Nm(i)}return r}function Bc(e){if(e.destroyed)throw new We(205,!1)}function na(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function CA(e){return!!e.deps}function SA(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function DA(e){return typeof e=="function"||typeof e=="object"&&e instanceof he}function Am(e,t){for(let n of e)Array.isArray(n)?Am(n,t):n&&Fb(n)?Am(n.\u0275providers,t):t(n)}function Zb(e,t){e instanceof $c&&Bc(e);let n,r=co(e),i=Gn(void 0);try{return t()}finally{co(r),Gn(i)}}function Xb(){return Bb()!==void 0||iA()!=null}function Jb(e){if(!Xb())throw new We(-203,!1)}function IA(e){return typeof e=="function"}var ji=0,_e=1,be=2,Rn=3,Lr=4,Vr=5,Wc=6,td=7,Wt=8,Gc=9,Pi=10,sn=11,zc=12,Xw=13,ha=14,Fr=15,Zo=16,ra=17,ki=18,tl=19,Qb=20,lo=21,hm=22,nd=23,Qn=24,aa=25,Ht=26,eC=1,Xo=7,rd=8,ua=9,xn=10;function Mi(e){return Array.isArray(e)&&typeof e[eC]=="object"}function $i(e){return Array.isArray(e)&&e[eC]===!0}function Vg(e){return(e.flags&4)!==0}function ma(e){return e.componentOffset>-1}function Cd(e){return(e.flags&1)===1}function Xr(e){return!!e.template}function id(e){return(e[be]&512)!==0}function nl(e){return(e[be]&256)===256}var Mm=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function tC(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var rs=(()=>{let e=()=>nC;return e.ngInherit=!0,e})();function nC(e){return e.type.prototype.ngOnChanges&&(e.setInput=xA),TA}function TA(){let e=iC(this),t=e?.current;if(t){let n=e.previous;if(n===Yo)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function xA(e,t,n,r,i){let s=this.declaredInputs[r],o=iC(e)||RA(e,{previous:Yo,current:null}),a=o.current||(o.current={}),l=o.previous,c=l[s];a[s]=new Mm(c&&c.currentValue,n,l===Yo),tC(e,t,i,n)}var rC="__ngSimpleChanges__";function iC(e){return e[rC]||null}function RA(e,t){return e[rC]=t}var Jw=null,mt=function(e,t=null,n){Jw?.(e,t,n)},oC="svg",NA="math";function er(e){for(;Array.isArray(e);)e=e[ji];return e}function sC(e,t){return er(t[e])}function Qr(e,t){return er(t[e.index])}function Ug(e,t){return e.data[t]}function Sd(e,t){return e[t]}function yr(e,t){let n=t[e];return Mi(n)?n:n[ji]}function AA(e){return(e[be]&4)===4}function Hg(e){return(e[be]&128)===128}function MA(e){return $i(e[Rn])}function uo(e,t){return t==null?null:e[t]}function aC(e){e[ra]=0}function jg(e){e[be]&1024||(e[be]|=1024,Hg(e)&&rl(e))}function OA(e,t){for(;e>0;)t=t[ha],e--;return t}function Dd(e){return!!(e[be]&9216||e[Qn]?.dirty)}function Om(e){e[Pi].changeDetectionScheduler?.notify(8),e[be]&64&&(e[be]|=1024),Dd(e)&&rl(e)}function rl(e){e[Pi].changeDetectionScheduler?.notify(0);let t=Jo(e);for(;t!==null&&!(t[be]&8192||(t[be]|=8192,!Hg(t)));)t=Jo(t)}function cC(e,t){if(nl(e))throw new We(911,!1);e[lo]===null&&(e[lo]=[]),e[lo].push(t)}function PA(e,t){if(e[lo]===null)return;let n=e[lo].indexOf(t);n!==-1&&e[lo].splice(n,1)}function Jo(e){let t=e[Rn];return $i(t)?t[Rn]:t}function lC(e){return e[td]??=[]}function uC(e){return e.cleanup??=[]}function kA(e,t,n,r){let i=lC(t);i.push(n),e.firstCreatePass&&uC(e).push(r,i.length-1)}var xe={lFrame:vC(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Pm=!1;function LA(){return xe.lFrame.elementDepthCount}function FA(){xe.lFrame.elementDepthCount++}function BA(){xe.lFrame.elementDepthCount--}function $g(){return xe.bindingsEnabled}function VA(){return xe.skipHydrationRootTNode!==null}function UA(e){return xe.skipHydrationRootTNode===e}function HA(){xe.skipHydrationRootTNode=null}function Be(){return xe.lFrame.lView}function Xt(){return xe.lFrame.tView}function Jt(e){return xe.lFrame.contextLView=e,e[Wt]}function Qt(e){return xe.lFrame.contextLView=null,e}function tr(){let e=dC();for(;e!==null&&e.type===64;)e=e.parent;return e}function dC(){return xe.lFrame.currentTNode}function jA(){let e=xe.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function po(e,t){let n=xe.lFrame;n.currentTNode=e,n.isParent=t}function Wg(){return xe.lFrame.isParent}function fC(){xe.lFrame.isParent=!1}function pC(){return xe.lFrame.contextLView}function hC(){return Pm}function Qw(e){let t=Pm;return Pm=e,t}function Gg(){let e=xe.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function $A(e){return xe.lFrame.bindingIndex=e}function il(){return xe.lFrame.bindingIndex++}function WA(e){let t=xe.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function GA(){return xe.lFrame.inI18n}function zA(e,t){let n=xe.lFrame;n.bindingIndex=n.bindingRootIndex=e,km(t)}function qA(){return xe.lFrame.currentDirectiveIndex}function km(e){xe.lFrame.currentDirectiveIndex=e}function YA(e){let t=xe.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function mC(){return xe.lFrame.currentQueryIndex}function zg(e){xe.lFrame.currentQueryIndex=e}function KA(e){let t=e[_e];return t.type===2?t.declTNode:t.type===1?e[Vr]:null}function gC(e,t,n){if(n&Ye.SkipSelf){let i=t,s=e;for(;(i=i.parent,i===null&&!(n&Ye.Host))&&(i=KA(s),!(i===null||(s=s[ha],i.type&10))););if(i===null)return!1;t=i,e=s}let r=xe.lFrame=yC();return r.currentTNode=t,r.lView=e,!0}function qg(e){let t=yC(),n=e[_e];xe.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function yC(){let e=xe.lFrame,t=e===null?null:e.child;return t===null?vC(e):t}function vC(e){let 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 e!==null&&(e.child=t),t}function _C(){let e=xe.lFrame;return xe.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var EC=_C;function Yg(){let e=_C();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 ZA(e){return(xe.lFrame.contextLView=OA(e,xe.lFrame.contextLView))[Wt]}function ho(){return xe.lFrame.selectedIndex}function Qo(e){xe.lFrame.selectedIndex=e}function Kg(){let e=xe.lFrame;return Ug(e.tView,e.selectedIndex)}function _r(){xe.lFrame.currentNamespace=oC}function is(){XA()}function XA(){xe.lFrame.currentNamespace=null}function JA(){return xe.lFrame.currentNamespace}var wC=!0;function Id(){return wC}function Td(e){wC=e}function QA(e,t,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:s}=t.type.prototype;if(r){let o=nC(t);(n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o)}i&&(n.preOrderHooks??=[]).push(0-e,i),s&&((n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s))}function Zg(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let i=e.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:o,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:c}=i;s&&(e.contentHooks??=[]).push(-n,s),o&&((e.contentHooks??=[]).push(n,o),(e.contentCheckHooks??=[]).push(n,o)),a&&(e.viewHooks??=[]).push(-n,a),l&&((e.viewHooks??=[]).push(n,l),(e.viewCheckHooks??=[]).push(n,l)),c!=null&&(e.destroyHooks??=[]).push(n,c)}}function zu(e,t,n){bC(e,t,3,n)}function qu(e,t,n,r){(e[be]&3)===n&&bC(e,t,n,r)}function mm(e,t){let n=e[be];(n&3)===t&&(n&=16383,n+=1,e[be]=n)}function bC(e,t,n,r){let i=r!==void 0?e[ra]&65535:0,s=r??-1,o=t.length-1,a=0;for(let l=i;l<o;l++)if(typeof t[l+1]=="number"){if(a=t[l],r!=null&&a>=r)break}else t[l]<0&&(e[ra]+=65536),(a<s||s==-1)&&(eM(e,n,t,l),e[ra]=(e[ra]&4294901760)+l+2),l++}function eb(e,t){mt(4,e,t);let n=$e(null);try{t.call(e)}finally{$e(n),mt(5,e,t)}}function eM(e,t,n,r){let i=n[r]<0,s=n[r+1],o=i?-n[r]:n[r],a=e[o];i?e[be]>>14<e[ra]>>16&&(e[be]&3)===t&&(e[be]+=16384,eb(a,s)):eb(a,s)}var ca=-1,es=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n){this.factory=e,this.canSeeViewProviders=t,this.injectImpl=n}};function tM(e){return e instanceof es}function nM(e){return(e.flags&8)!==0}function rM(e){return(e.flags&16)!==0}function iM(e,t,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i=="number"){if(i!==0)break;r++;let s=n[r++],o=n[r++],a=n[r++];e.setAttribute(t,o,a,s)}else{let s=i,o=n[++r];sM(s)?e.setProperty(t,s,o):e.setAttribute(t,s,o),r++}}return r}function oM(e){return e===3||e===4||e===6}function sM(e){return e.charCodeAt(0)===64}function da(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let i=t[r];typeof i=="number"?n=i:n===0||(n===-1||n===2?tb(e,n,i,null,t[++r]):tb(e,n,i,null,null))}}return e}function tb(e,t,n,r,i){let s=0,o=e.length;if(t===-1)o=-1;else for(;s<e.length;){let a=e[s++];if(typeof a=="number"){if(a===t){o=-1;break}else if(a>t){o=s-1;break}}}for(;s<e.length;){let a=e[s];if(typeof a=="number")break;if(a===n){if(r===null){i!==null&&(e[s+1]=i);return}else if(r===e[s+1]){e[s+2]=i;return}}s++,r!==null&&s++,i!==null&&s++}o!==-1&&(e.splice(o,0,t),s=o+1),e.splice(s++,0,n),r!==null&&e.splice(s++,0,r),i!==null&&e.splice(s++,0,i)}var gm={},Lm=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=Ed(n);let r=this.injector.get(e,gm,n);return r!==gm||t===gm?r:this.parentInjector.get(e,t,n)}};function CC(e){return e!==ca}function od(e){return e&32767}function aM(e){return e>>16}function sd(e,t){let n=aM(e),r=t;for(;n>0;)r=r[ha],n--;return r}var Fm=!0;function ad(e){let t=Fm;return Fm=e,t}var cM=256,SC=cM-1,DC=5,lM=0,Kr={};function uM(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(Uc)&&(r=n[Uc]),r==null&&(r=n[Uc]=lM++);let i=r&SC,s=1<<i;t.data[e+(i>>DC)]|=s}function cd(e,t){let n=IC(e,t);if(n!==-1)return n;let r=t[_e];r.firstCreatePass&&(e.injectorIndex=t.length,ym(r.data,e),ym(t,null),ym(r.blueprint,null));let i=Xg(e,t),s=e.injectorIndex;if(CC(i)){let o=od(i),a=sd(i,t),l=a[_e].data;for(let c=0;c<8;c++)t[s+c]=a[o+c]|l[o+c]}return t[s+8]=i,s}function ym(e,t){e.push(0,0,0,0,0,0,0,0,t)}function IC(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Xg(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=AC(i),r===null)return ca;if(n++,i=i[ha],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return ca}function Bm(e,t,n){uM(e,t,n)}function TC(e,t,n){if(n&Ye.Optional||e!==void 0)return e;Lg(t,"NodeInjector")}function xC(e,t,n,r){if(n&Ye.Optional&&r===void 0&&(r=null),(n&(Ye.Self|Ye.Host))===0){let i=e[Gc],s=Gn(void 0);try{return i?i.get(t,r,n&Ye.Optional):Vb(t,r,n&Ye.Optional)}finally{Gn(s)}}return TC(r,t,n)}function RC(e,t,n,r=Ye.Default,i){if(e!==null){if(t[be]&2048&&!(r&Ye.Self)){let o=hM(e,t,n,r,Kr);if(o!==Kr)return o}let s=NC(e,t,n,r,Kr);if(s!==Kr)return s}return xC(t,n,r,i)}function NC(e,t,n,r,i){let s=fM(n);if(typeof s=="function"){if(!gC(t,e,r))return r&Ye.Host?TC(i,n,r):xC(t,n,r,i);try{let o;if(o=s(r),o==null&&!(r&Ye.Optional))Lg(n);else return o}finally{EC()}}else if(typeof s=="number"){let o=null,a=IC(e,t),l=ca,c=r&Ye.Host?t[Fr][Vr]:null;for((a===-1||r&Ye.SkipSelf)&&(l=a===-1?Xg(e,t):t[a+8],l===ca||!rb(r,!1)?a=-1:(o=t[_e],a=od(l),t=sd(l,t)));a!==-1;){let h=t[_e];if(nb(s,a,h.data)){let d=dM(a,t,n,o,r,c);if(d!==Kr)return d}l=t[a+8],l!==ca&&rb(r,t[_e].data[a+8]===c)&&nb(s,a,t)?(o=h,a=od(l),t=sd(l,t)):a=-1}}return i}function dM(e,t,n,r,i,s){let o=t[_e],a=o.data[e+8],l=r==null?ma(a)&&Fm:r!=o&&(a.type&3)!==0,c=i&Ye.Host&&s===a,h=Yu(a,o,n,l,c);return h!==null?qc(t,o,h,a):Kr}function Yu(e,t,n,r,i){let s=e.providerIndexes,o=t.data,a=s&1048575,l=e.directiveStart,c=e.directiveEnd,h=s>>20,d=r?a:a+h,f=i?a+h:c;for(let g=d;g<f;g++){let m=o[g];if(g<l&&n===m||g>=l&&m.type===n)return g}if(i){let g=o[l];if(g&&Xr(g)&&g.type===n)return l}return null}function qc(e,t,n,r){let i=e[n],s=t.data;if(tM(i)){let o=i;o.resolving&&JN(XN(s[n]));let a=ad(o.canSeeViewProviders);o.resolving=!0;let l,c=o.injectImpl?Gn(o.injectImpl):null,h=gC(e,r,Ye.Default);try{i=e[n]=o.factory(void 0,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&QA(n,s[n],t)}finally{c!==null&&Gn(c),ad(a),o.resolving=!1,EC()}}return i}function fM(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(Uc)?e[Uc]:void 0;return typeof t=="number"?t>=0?t&SC:pM:t}function nb(e,t,n){let r=1<<e;return!!(n[t+(e>>DC)]&r)}function rb(e,t){return!(e&Ye.Self)&&!(e&Ye.Host&&t)}var Go=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return RC(this._tNode,this._lView,e,Ed(n),t)}};function pM(){return new Go(tr(),Be())}function xd(e){return Mg(()=>{let t=e.prototype.constructor,n=t[Xu]||Vm(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let s=i[Xu]||Vm(i);if(s&&s!==n)return s;i=Object.getPrototypeOf(i)}return s=>new s})}function Vm(e){return Pb(e)?()=>{let t=Vm(Ln(e));return t&&t()}:qo(e)}function hM(e,t,n,r,i){let s=e,o=t;for(;s!==null&&o!==null&&o[be]&2048&&!id(o);){let a=NC(s,o,n,r|Ye.Self,Kr);if(a!==Kr)return a;let l=s.parent;if(!l){let c=o[Qb];if(c){let h=c.get(n,Kr,r);if(h!==Kr)return h}l=AC(o),o=o[ha]}s=l}return i}function AC(e){let t=e[_e],n=t.type;return n===2?t.declTNode:n===1?e[Vr]:null}function ib(e,t=null,n=null,r){let i=mM(e,t,n,r);return i.resolveInjectorInitializers(),i}function mM(e,t=null,n=null,r,i=new Set){let s=[n||Oi,mA(e)];return r=r||(typeof e=="object"?void 0:gr(e)),new $c(s,t||bd(),r||null,i)}var gt=class BS{static THROW_IF_NOT_FOUND=Hc;static NULL=new ed;static create(t,n){if(Array.isArray(t))return ib({name:""},n,t,"");{let r=t.name??"";return ib({name:r},t.parent,t.providers,r)}}static \u0275prov=ie({token:BS,providedIn:"any",factory:()=>Ze(Hb)});static __NG_ELEMENT_ID__=-1},gM=new he("");gM.__NG_ELEMENT_ID__=e=>{let t=tr();if(t===null)throw new We(204,!1);if(t.type&2)return t.value;if(e&Ye.Optional)return null;throw new We(204,!1)};var MC=!1,Jg=(()=>{class e{static __NG_ELEMENT_ID__=yM;static __NG_ENV_ID__=n=>n}return e})(),Um=class extends Jg{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return cC(this._lView,e),()=>PA(this._lView,e)}};function yM(){return new Um(Be())}var Li=class{},Rd=new he("",{providedIn:"root",factory:()=>!1}),OC=new he(""),Qg=new he(""),Nd=(()=>{class e{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new Or(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=ie({token:e,providedIn:"root",factory:()=>new e})}return e})(),Hm=class extends ee{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Xb()&&(this.destroyRef=O(Jg,{optional:!0})??void 0,this.pendingTasks=O(Nd,{optional:!0})??void 0)}emit(e){let t=$e(null);try{super.next(e)}finally{$e(t)}}subscribe(e,t,n){let r=e,i=t||(()=>null),s=n;if(e&&typeof e=="object"){let a=e;r=a.next?.bind(a),i=a.error?.bind(a),s=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let o=super.subscribe({next:r,error:i,complete:s});return e instanceof ot&&e.add(o),o}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(t),n!==void 0&&this.pendingTasks?.remove(n)})}}},Je=Hm;function ld(...e){}function PC(e){let t,n;function r(){e=ld;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function ob(e){return queueMicrotask(()=>e()),()=>{e=ld}}var ey="isAngularZone",ud=ey+"_ID",vM=0,Fe=class Gh{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Je(!1);onMicrotaskEmpty=new Je(!1);onStable=new Je(!1);onError=new Je(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:s=MC}=t;if(typeof Zone>"u")throw new We(908,!1);Zone.assertZonePatched();let o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!i&&r,o.shouldCoalesceRunChangeDetection=i,o.callbackScheduled=!1,o.scheduleInRootZone=s,wM(o)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(ey)===!0}static assertInAngularZone(){if(!Gh.isInAngularZone())throw new We(909,!1)}static assertNotInAngularZone(){if(Gh.isInAngularZone())throw new We(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){let s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+i,t,_M,ld,ld);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)}},_M={};function ty(e){if(e._nesting==0&&!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 EM(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){PC(()=>{e.callbackScheduled=!1,jm(e),e.isCheckStableRunning=!0,ty(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),jm(e)}function wM(e){let t=()=>{EM(e)},n=vM++;e._inner=e._inner.fork({name:"angular",properties:{[ey]:!0,[ud]:n,[ud+n]:!0},onInvokeTask:(r,i,s,o,a,l)=>{if(bM(l))return r.invokeTask(s,o,a,l);try{return sb(e),r.invokeTask(s,o,a,l)}finally{(e.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),ab(e)}},onInvoke:(r,i,s,o,a,l,c)=>{try{return sb(e),r.invoke(s,o,a,l,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!CM(l)&&t(),ab(e)}},onHasTask:(r,i,s,o)=>{r.hasTask(s,o),i===s&&(o.change=="microTask"?(e._hasPendingMicrotasks=o.microTask,jm(e),ty(e)):o.change=="macroTask"&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(r,i,s,o)=>(r.handleError(s,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}function jm(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function sb(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function ab(e){e._nesting--,ty(e)}var dd=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Je;onMicrotaskEmpty=new Je;onStable=new Je;onError=new Je;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function bM(e){return kC(e,"__ignore_ng_zone__")}function CM(e){return kC(e,"__scheduler_tick__")}function kC(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Fi=class{_console=console;handleError(e){this._console.error("ERROR",e)}},SM=new he("",{providedIn:"root",factory:()=>{let e=O(Fe),t=O(Fi);return n=>e.runOutsideAngular(()=>t.handleError(n))}});function DM(){return ga(tr(),Be())}function ga(e,t){return new yt(Qr(e,t))}var yt=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=DM}return e})();function IM(e){return e instanceof yt?e.nativeElement:e}function Er(e,t){let n=hw(e),r=n[Ti];return t?.equal&&(r.equal=t.equal),n.set=i=>Qh(r,i),n.update=i=>mw(r,i),n.asReadonly=TM.bind(n),n}function TM(){let e=this[Ti];if(e.readonlyFn===void 0){let t=()=>this();t[Ti]=e,e.readonlyFn=t}return e.readonlyFn}function xM(){return this._results[Symbol.iterator]()}var $m=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new ee}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=uA(e);(this._changesDetected=!lA(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=xM};function LC(e){return(e.flags&128)===128}var FC=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(FC||{}),ny=new Map,RM=0;function NM(){return RM++}function AM(e){ny.set(e[tl],e)}function BC(e){return ny.get(e)||null}function Wm(e){ny.delete(e[tl])}var Gm=class{lViewId;nodeIndex;native;component;directives;localRefs;get lView(){return BC(this.lViewId)}constructor(e,t,n){this.lViewId=e,this.nodeIndex=t,this.native=n}};function VC(e){let t=vm(e);if(t){if(Mi(t)){let n=t,r,i,s;if(UC(e)){if(r=PM(n,e),r==-1)throw new Error("The provided component was not found in the application");i=e}else if(MM(e)){if(r=kM(n,e),r==-1)throw new Error("The provided directive was not found in the application");s=LM(r,n)}else if(r=lb(n,e),r==-1)return null;let o=er(n[r]),a=vm(o),l=a&&!Array.isArray(a)?a:cb(n,r,o);if(i&&l.component===void 0&&(l.component=i,Zr(l.component,l)),s&&l.directives===void 0){l.directives=s;for(let c=0;c<s.length;c++)Zr(s[c],l)}Zr(l.native,l),t=l}}else{let n=e,r=n;for(;r=r.parentNode;){let i=vm(r);if(i){let s=Array.isArray(i)?i:i.lView;if(!s)return null;let o=lb(s,n);if(o>=0){let a=er(s[o]),l=cb(s,o,a);Zr(a,l),t=l;break}}}}return t||null}function cb(e,t,n){return new Gm(e[tl],t,n)}var zm="__ngContext__";function Zr(e,t){Mi(t)?(e[zm]=t[tl],AM(t)):e[zm]=t}function vm(e){let t=e[zm];return typeof t=="number"?BC(t):t||null}function UC(e){return e&&e.constructor&&e.constructor.\u0275cmp}function MM(e){return e&&e.constructor&&e.constructor.\u0275dir}function lb(e,t){let n=e[_e];for(let r=Ht;r<n.bindingStartIndex;r++)if(er(e[r])===t)return r;return-1}function OM(e){if(e.child)return e.child;if(e.next)return e.next;for(;e.parent&&!e.parent.next;)e=e.parent;return e.parent&&e.parent.next}function PM(e,t){let n=e[_e].components;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(yr(i,e)[Wt]===t)return i}else if(yr(Ht,e)[Wt]===t)return Ht;return-1}function kM(e,t){let n=e[_e].firstChild;for(;n;){let r=n.directiveStart,i=n.directiveEnd;for(let s=r;s<i;s++)if(e[s]===t)return n.index;n=OM(n)}return-1}function LM(e,t){let n=t[_e].data[e];if(n.directiveStart===0)return Oi;let r=[];for(let i=n.directiveStart;i<n.directiveEnd;i++){let s=t[i];UC(s)||r.push(s)}return r}function HC(e){return $C(e[zc])}function jC(e){return $C(e[Lr])}function $C(e){for(;e!==null&&!$i(e);)e=e[Lr];return e}var qm;function WC(e){qm=e}function GC(){if(qm!==void 0)return qm;if(typeof document<"u")return document;throw new We(210,!1)}var ol=new he("",{providedIn:"root",factory:()=>FM}),FM="ng",ry=new he(""),os=new he("",{providedIn:"platform",factory:()=>"unknown"}),zC=new he(""),iy=new he("",{providedIn:"root",factory:()=>GC().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),BM="h",VM="b",qC=!1,UM=new he("",{providedIn:"root",factory:()=>qC}),oy=function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e}(oy||{}),ya=new he(""),ub=new Set;function mo(e){ub.has(e)||(ub.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var YC=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=HM}return e})();function HM(){return new YC(Be(),tr())}var ia=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(ia||{}),KC=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=ie({token:e,providedIn:"root",factory:()=>new e})}return e})(),jM=[ia.EarlyRead,ia.Write,ia.MixedReadWrite,ia.Read],$M=(()=>{class e{ngZone=O(Fe);scheduler=O(Li);errorHandler=O(Fi,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){O(ya,{optional:!0})}execute(){let n=this.sequences.size>0;n&&mt(16),this.executing=!0;for(let r of jM)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let s=i.hooks[r];return s(i.pipelinedValue)},i.snapshot))}catch(s){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(s)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&mt(17)}register(n){let{view:r}=n;r!==void 0?((r[aa]??=[]).push(n),rl(r),r[be]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(n){this.sequences.add(n),this.scheduler.notify(7)}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(oy.AFTER_NEXT_RENDER,n):n()}static \u0275prov=ie({token:e,providedIn:"root",factory:()=>new e})}return e})(),Ym=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,i,s=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=s,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[aa];e&&(this.view[aa]=e.filter(t=>t!==this))}};function sy(e,t){!t?.injector&&Jb(sy);let n=t?.injector??O(gt);return mo("NgAfterRender"),ZC(e,n,t,!1)}function ei(e,t){!t?.injector&&Jb(ei);let n=t?.injector??O(gt);return mo("NgAfterNextRender"),ZC(e,n,t,!0)}function WM(e,t){if(e instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[t]=e,n}else return[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function ZC(e,t,n,r){let i=t.get(KC);i.impl??=t.get($M);let s=t.get(ya,null,{optional:!0}),o=n?.phase??ia.MixedReadWrite,a=n?.manualCleanup!==!0?t.get(Jg):null,l=t.get(YC,null,{optional:!0}),c=new Ym(i.impl,WM(e,o),l?.view,r,a,s?.snapshot(null));return i.impl.register(c),c}var GM=()=>null;function XC(e,t,n=!1){return GM(e,t,n)}function JC(e,t){let n=e.contentQueries;if(n!==null){let r=$e(null);try{for(let i=0;i<n.length;i+=2){let s=n[i],o=n[i+1];if(o!==-1){let a=e.data[o];zg(s),a.contentQueries(2,t[o],o)}}}finally{$e(r)}}}function Km(e,t,n){zg(0);let r=$e(null);try{t(e,n)}finally{$e(r)}}function ay(e,t,n){if(Vg(t)){let r=$e(null);try{let i=t.directiveStart,s=t.directiveEnd;for(let o=i;o<s;o++){let a=e.data[o];if(a.contentQueries){let l=n[o];a.contentQueries(1,l,o)}}}finally{$e(r)}}}var Jr=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Jr||{}),Hu;function zM(){if(Hu===void 0&&(Hu=null,zo.trustedTypes))try{Hu=zo.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Hu}function Ad(e){return zM()?.createHTML(e)||e}var ju;function qM(){if(ju===void 0&&(ju=null,zo.trustedTypes))try{ju=zo.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return ju}function db(e){return qM()?.createHTML(e)||e}var Bi=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Ob})`}},Zm=class extends Bi{getTypeName(){return"HTML"}},Xm=class extends Bi{getTypeName(){return"Style"}},Jm=class extends Bi{getTypeName(){return"Script"}},Qm=class extends Bi{getTypeName(){return"URL"}},eg=class extends Bi{getTypeName(){return"ResourceURL"}};function ti(e){return e instanceof Bi?e.changingThisBreaksApplicationSecurity:e}function go(e,t){let n=YM(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${Ob})`)}return n===t}function YM(e){return e instanceof Bi&&e.getTypeName()||null}function QC(e){return new Zm(e)}function e0(e){return new Xm(e)}function t0(e){return new Jm(e)}function n0(e){return new Qm(e)}function r0(e){return new eg(e)}function KM(e){let t=new ng(e);return ZM()?new tg(t):t}var tg=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(Ad(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},ng=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=Ad(e),t}};function ZM(){try{return!!new window.DOMParser().parseFromString(Ad(""),"text/html")}catch{return!1}}var XM=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Md(e){return e=String(e),e.match(XM)?e:"unsafe:"+e}function Wi(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function sl(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var i0=Wi("area,br,col,hr,img,wbr"),o0=Wi("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),s0=Wi("rp,rt"),JM=sl(s0,o0),QM=sl(o0,Wi("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")),eO=sl(s0,Wi("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")),fb=sl(i0,QM,eO,JM),a0=Wi("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),tO=Wi("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,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),nO=Wi("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"),rO=sl(a0,tO,nO),iO=Wi("script,style,template"),rg=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=aO(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=sO(t);if(i){t=i;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=pb(e).toLowerCase();if(!fb.hasOwnProperty(t))return this.sanitizedSomething=!0,!iO.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r<n.length;r++){let i=n.item(r),s=i.name,o=s.toLowerCase();if(!rO.hasOwnProperty(o)){this.sanitizedSomething=!0;continue}let a=i.value;a0[o]&&(a=Md(a)),this.buf.push(" ",s,'="',hb(a),'"')}return this.buf.push(">"),!0}endElement(e){let t=pb(e).toLowerCase();fb.hasOwnProperty(t)&&!i0.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(hb(e))}};function oO(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function sO(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw c0(t);return t}function aO(e){let t=e.firstChild;if(t&&oO(e,t))throw c0(t);return t}function pb(e){let t=e.nodeName;return typeof t=="string"?t:"FORM"}function c0(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var cO=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,lO=/([^\#-~ |!])/g;function hb(e){return e.replace(/&/g,"&").replace(cO,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(lO,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}var $u;function cy(e,t){let n=null;try{$u=$u||KM(e);let r=t?String(t):"";n=$u.getInertBodyElement(r);let i=5,s=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=s,s=n.innerHTML,n=$u.getInertBodyElement(r)}while(r!==s);let o=new rg().sanitizeChildren(mb(n)||n);return Ad(o)}finally{if(n){let r=mb(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function mb(e){return"content"in e&&uO(e)?e.content:null}function uO(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var ni=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(ni||{});function Ur(e){let t=l0();return t?db(t.sanitize(ni.HTML,e)||""):go(e,"HTML")?db(ti(e)):cy(GC(),Qc(e))}function an(e){let t=l0();return t?t.sanitize(ni.URL,e)||"":go(e,"URL")?ti(e):Md(Qc(e))}function l0(){let e=Be();return e&&e[Pi].sanitizer}var dO=/^>|^->|<!--|-->|--!>|<!-$/g,fO=/(<|>)/g,pO="\u200B$1\u200B";function hO(e){return e.replace(dO,t=>t.replace(fO,pO))}function u0(e){return e.ownerDocument.defaultView}function mO(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let s=t.length;if(i+s===r||e.charCodeAt(i+s)<=32)return i}n=i+1}}var d0="ng-template";function gO(e,t,n,r){let i=0;if(r){for(;i<t.length&&typeof t[i]=="string";i+=2)if(t[i]==="class"&&mO(t[i+1].toLowerCase(),n,0)!==-1)return!0}else if(ly(e))return!1;if(i=t.indexOf(1,i),i>-1){let s;for(;++i<t.length&&typeof(s=t[i])=="string";)if(s.toLowerCase()===n)return!0}return!1}function ly(e){return e.type===4&&e.value!==d0}function yO(e,t,n){let r=e.type===4&&!n?d0:e.value;return t===r}function vO(e,t,n){let r=4,i=e.attrs,s=i!==null?wO(i):0,o=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!o&&!kr(r)&&!kr(l))return!1;if(o&&kr(l))continue;o=!1,r=l|r&1;continue}if(!o)if(r&4){if(r=2|r&1,l!==""&&!yO(e,l,n)||l===""&&t.length===1){if(kr(r))return!1;o=!0}}else if(r&8){if(i===null||!gO(e,i,l,n)){if(kr(r))return!1;o=!0}}else{let c=t[++a],h=_O(l,i,ly(e),n);if(h===-1){if(kr(r))return!1;o=!0;continue}if(c!==""){let d;if(h>s?d="":d=i[h+1].toLowerCase(),r&2&&c!==d){if(kr(r))return!1;o=!0}}}}return kr(r)||o}function kr(e){return(e&1)===0}function _O(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let s=!1;for(;i<t.length;){let o=t[i];if(o===e)return i;if(o===3||o===6)s=!0;else if(o===1||o===2){let a=t[++i];for(;typeof a=="string";)a=t[++i];continue}else{if(o===4)break;if(o===0){i+=4;continue}}i+=s?1:2}return-1}else return bO(t,e)}function EO(e,t,n=!1){for(let r=0;r<t.length;r++)if(vO(e,t[r],n))return!0;return!1}function wO(e){for(let t=0;t<e.length;t++){let n=e[t];if(oM(n))return t}return e.length}function bO(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r=="number")return-1;if(r===t)return n;n++}return-1}function gb(e,t){return e?":not("+t.trim()+")":t}function CO(e){let t=e[0],n=1,r=2,i="",s=!1;for(;n<e.length;){let o=e[n];if(typeof o=="string")if(r&2){let a=e[++n];i+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+o:r&4&&(i+=" "+o);else i!==""&&!kr(o)&&(t+=gb(s,i),i=""),r=o,s=s||!kr(r);n++}return i!==""&&(t+=gb(s,i)),t}function SO(e){return e.map(CO).join(",")}function DO(e){let t=[],n=[],r=1,i=2;for(;r<e.length;){let s=e[r];if(typeof s=="string")i===2?s!==""&&t.push(s,e[++r]):i===8&&n.push(s);else{if(!kr(i))break;i=s}r++}return n.length&&t.push(1,...n),t}var Gi={};function IO(e,t){return e.createText(t)}function TO(e,t,n){e.setValue(t,n)}function xO(e,t){return e.createComment(hO(t))}function f0(e,t,n){return e.createElement(t,n)}function fd(e,t,n,r,i){e.insertBefore(t,n,r,i)}function p0(e,t,n){e.appendChild(t,n)}function yb(e,t,n,r,i){r!==null?fd(e,t,n,r,i):p0(e,t,n)}function RO(e,t,n){e.removeChild(null,t,n)}function NO(e,t,n){e.setAttribute(t,"style",n)}function AO(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function h0(e,t,n){let{mergedAttrs:r,classes:i,styles:s}=n;r!==null&&iM(e,t,r),i!==null&&AO(e,t,i),s!==null&&NO(e,t,s)}function uy(e,t,n,r,i,s,o,a,l,c,h){let d=Ht+r,f=d+i,g=MO(d,f),m=typeof c=="function"?c():c;return g[_e]={type:e,blueprint:g,template:n,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof s=="function"?s():s,pipeRegistry:typeof o=="function"?o():o,firstChild:null,schemas:l,consts:m,incompleteFirstPass:!1,ssrId:h}}function MO(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:Gi);return n}function OO(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=uy(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function dy(e,t,n,r,i,s,o,a,l,c,h){let d=t.blueprint.slice();return d[ji]=i,d[be]=r|4|128|8|64|1024,(c!==null||e&&e[be]&2048)&&(d[be]|=2048),aC(d),d[Rn]=d[ha]=e,d[Wt]=n,d[Pi]=o||e&&e[Pi],d[sn]=a||e&&e[sn],d[Gc]=l||e&&e[Gc]||null,d[Vr]=s,d[tl]=NM(),d[Wc]=h,d[Qb]=c,d[Fr]=t.type==2?e[Fr]:d,d}function PO(e,t,n){let r=Qr(t,e),i=OO(n),s=e[Pi].rendererFactory,o=fy(e,dy(e,i,null,m0(n),r,t,null,s.createRenderer(r,n),null,null,null));return e[t.index]=o}function m0(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function g0(e,t,n,r){if(n===0)return-1;let i=t.length;for(let s=0;s<n;s++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function fy(e,t){return e[zc]?e[Xw][Lr]=t:e[zc]=t,e[Xw]=t,t}function q(e=1){y0(Xt(),Be(),ho()+e,!1)}function y0(e,t,n,r){if(!r)if((t[be]&3)===3){let i=e.preOrderCheckHooks;i!==null&&zu(t,i,n)}else{let i=e.preOrderHooks;i!==null&&qu(t,i,0,n)}Qo(n)}var Od=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Od||{});function ig(e,t,n,r){let i=$e(null);try{let[s,o,a]=e.inputs[n],l=null;(o&Od.SignalBased)!==0&&(l=t[s][Ti]),l!==null&&l.transformFn!==void 0?r=l.transformFn(r):a!==null&&(r=a.call(t,r)),e.setInput!==null?e.setInput(t,l,r,n,s):tC(t,l,s,r)}finally{$e(i)}}function v0(e,t,n,r,i){let s=ho(),o=r&2;try{Qo(-1),o&&t.length>Ht&&y0(e,t,Ht,!1),mt(o?2:0,i),n(r,i)}finally{Qo(s),mt(o?3:1,i)}}function Pd(e,t,n){UO(e,t,n),(n.flags&64)===64&&HO(e,t,n)}function py(e,t,n=Qr){let r=t.localNames;if(r!==null){let i=t.index+1;for(let s=0;s<r.length;s+=2){let o=r[s+1],a=o===-1?n(t,e):e[o];e[i++]=a}}}function kO(e,t,n,r){let i=r.get(UM,qC)||n===Jr.ShadowDom,s=e.selectRootElement(t,i);return LO(s),s}function LO(e){FO(e)}var FO=()=>null;function BO(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function _0(e,t,n,r,i,s,o,a){if(!a&&my(t,e,n,r,i)){ma(t)&&VO(n,t.index);return}if(t.type&3){let l=Qr(t,n);r=BO(r),i=o!=null?o(i,t.value||"",r):i,s.setProperty(l,r,i)}else t.type&12}function VO(e,t){let n=yr(t,e);n[be]&16||(n[be]|=64)}function UO(e,t,n){let r=n.directiveStart,i=n.directiveEnd;ma(n)&&PO(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||cd(n,t);let s=n.initialInputs;for(let o=r;o<i;o++){let a=e.data[o],l=qc(t,e,o,n);if(Zr(l,t),s!==null&&GO(t,o-r,l,a,n,s),Xr(a)){let c=yr(n.index,t);c[Wt]=qc(t,e,o,n)}}}function HO(e,t,n){let r=n.directiveStart,i=n.directiveEnd,s=n.index,o=qA();try{Qo(s);for(let a=r;a<i;a++){let l=e.data[a],c=t[a];km(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&jO(l,c)}}finally{Qo(-1),km(o)}}function jO(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function hy(e,t){let n=e.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let s=n[i];EO(t,s.selectors,!1)&&(r??=[],Xr(s)?r.unshift(s):r.push(s))}return r}function $O(e,t,n,r,i,s){let o=Qr(e,t);WO(t[sn],o,s,e.value,n,r,i)}function WO(e,t,n,r,i,s,o){if(s==null)e.removeAttribute(t,i,n);else{let a=o==null?Qc(s):o(s,r||"",i);e.setAttribute(t,i,a,n)}}function GO(e,t,n,r,i,s){let o=s[t];if(o!==null)for(let a=0;a<o.length;a+=2){let l=o[a],c=o[a+1];ig(r,n,l,c)}}function E0(e,t){let n=e[Gc],r=n?n.get(Fi,null):null;r&&r.handleError(t)}function my(e,t,n,r,i){let s=e.inputs?.[r],o=e.hostDirectiveInputs?.[r],a=!1;if(o)for(let l=0;l<o.length;l+=2){let c=o[l],h=o[l+1],d=t.data[c];ig(d,n[c],h,i),a=!0}if(s)for(let l of s){let c=n[l],h=t.data[l];ig(h,c,r,i),a=!0}return a}function zO(e,t){let n=yr(t,e),r=n[_e];qO(r,n);let i=n[ji];i!==null&&n[Wc]===null&&(n[Wc]=XC(i,n[Gc])),mt(18),gy(r,n,n[Wt]),mt(19,n[Wt])}function qO(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function gy(e,t,n){qg(t);try{let r=e.viewQuery;r!==null&&Km(1,r,n);let i=e.template;i!==null&&v0(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[ki]?.finishViewCreation(e),e.staticContentQueries&&JC(e,t),e.staticViewQueries&&Km(2,e.viewQuery,n);let s=e.components;s!==null&&YO(t,s)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[be]&=-5,Yg()}}function YO(e,t){for(let n=0;n<t.length;n++)zO(e,t[n])}function kd(e,t,n,r){let i=$e(null);try{let s=t.tView,o=e[be]&4096?4096:16,a=dy(e,s,n,o,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=e[t.index];a[Zo]=l;let c=e[ki];return c!==null&&(a[ki]=c.createEmbeddedView(s)),gy(s,a,n),a}finally{$e(i)}}function Yc(e,t){return!t||t.firstChild===null||LC(e)}var KO;function yy(e,t){return KO(e,t)}var Vi=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Vi||{});function w0(e){return(e.flags&32)===32}function oa(e,t,n,r,i){if(r!=null){let s,o=!1;$i(r)?s=r:Mi(r)&&(o=!0,r=r[ji]);let a=er(r);e===0&&n!==null?i==null?p0(t,n,a):fd(t,n,a,i||null,!0):e===1&&n!==null?fd(t,n,a,i||null,!0):e===2?RO(t,a,o):e===3&&t.destroyNode(a),s!=null&&aP(t,e,s,n,i)}}function ZO(e,t){b0(e,t),t[ji]=null,t[Vr]=null}function XO(e,t,n,r,i,s){r[ji]=i,r[Vr]=t,Bd(e,r,n,1,i,s)}function b0(e,t){t[Pi].changeDetectionScheduler?.notify(9),Bd(e,t,t[sn],2,null,null)}function JO(e){let t=e[zc];if(!t)return _m(e[_e],e);for(;t;){let n=null;if(Mi(t))n=t[zc];else{let r=t[xn];r&&(n=r)}if(!n){for(;t&&!t[Lr]&&t!==e;)Mi(t)&&_m(t[_e],t),t=t[Rn];t===null&&(t=e),Mi(t)&&_m(t[_e],t),n=t&&t[Lr]}t=n}}function vy(e,t){let n=e[ua],r=n.indexOf(t);n.splice(r,1)}function Ld(e,t){if(nl(t))return;let n=t[sn];n.destroyNode&&Bd(e,t,n,3,null,null),JO(t)}function _m(e,t){if(nl(t))return;let n=$e(null);try{t[be]&=-129,t[be]|=256,t[Qn]&&Jh(t[Qn]),eP(e,t),QO(e,t),t[_e].type===1&&t[sn].destroy();let r=t[Zo];if(r!==null&&$i(t[Rn])){r!==t[Rn]&&vy(r,t);let i=t[ki];i!==null&&i.detachView(e)}Wm(t)}finally{$e(n)}}function QO(e,t){let n=e.cleanup,r=t[td];if(n!==null)for(let o=0;o<n.length-1;o+=2)if(typeof n[o]=="string"){let a=n[o+3];a>=0?r[a]():r[-a].unsubscribe(),o+=2}else{let a=r[n[o+1]];n[o].call(a)}r!==null&&(t[td]=null);let i=t[lo];if(i!==null){t[lo]=null;for(let o=0;o<i.length;o++){let a=i[o];a()}}let s=t[nd];if(s!==null){t[nd]=null;for(let o of s)o.destroy()}}function eP(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let i=t[n[r]];if(!(i instanceof es)){let s=n[r+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){let a=i[s[o]],l=s[o+1];mt(4,a,l);try{l.call(a)}finally{mt(5,a,l)}}else{mt(4,i,s);try{s.call(i)}finally{mt(5,i,s)}}}}}function tP(e,t,n){return nP(e,t.parent,n)}function nP(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[ji];if(ma(r)){let{encapsulation:i}=e.data[r.directiveStart+r.componentOffset];if(i===Jr.None||i===Jr.Emulated)return null}return Qr(r,n)}function rP(e,t,n){return oP(e,t,n)}function iP(e,t,n){return e.type&40?Qr(e,n):null}var oP=iP,vb;function Fd(e,t,n,r){let i=tP(e,r,t),s=t[sn],o=r.parent||t[Vr],a=rP(o,r,t);if(i!=null)if(Array.isArray(n))for(let l=0;l<n.length;l++)yb(s,i,n[l],a,!1);else yb(s,i,n,a,!1);vb!==void 0&&vb(s,r,t,n,i)}function Vc(e,t){if(t!==null){let n=t.type;if(n&3)return Qr(t,e);if(n&4)return og(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Vc(e,r);{let i=e[t.index];return $i(i)?og(-1,i):er(i)}}else{if(n&128)return Vc(e,t.next);if(n&32)return yy(t,e)()||er(e[t.index]);{let r=C0(e,t);if(r!==null){if(Array.isArray(r))return r[0];let i=Jo(e[Fr]);return Vc(i,r)}else return Vc(e,t.next)}}}return null}function C0(e,t){if(t!==null){let n=e[Fr][Vr],r=t.projection;return n.projection[r]}return null}function og(e,t){let n=xn+e+1;if(n<t.length){let r=t[n],i=r[_e].firstChild;if(i!==null)return Vc(r,i)}return t[Xo]}function _y(e,t,n,r,i,s,o){for(;n!=null;){if(n.type===128){n=n.next;continue}let a=r[n.index],l=n.type;if(o&&t===0&&(a&&Zr(er(a),r),n.flags|=2),!w0(n))if(l&8)_y(e,t,n.child,r,i,s,!1),oa(t,e,i,a,s);else if(l&32){let c=yy(n,r),h;for(;h=c();)oa(t,e,i,h,s);oa(t,e,i,a,s)}else l&16?sP(e,t,r,n,i,s):oa(t,e,i,a,s);n=o?n.projectionNext:n.next}}function Bd(e,t,n,r,i,s){_y(n,r,e.firstChild,t,i,s,!1)}function sP(e,t,n,r,i,s){let o=n[Fr],a=o[Vr].projection[r.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let c=a[l];oa(t,e,i,c,s)}else{let l=a,c=o[Rn];LC(r)&&(l.flags|=128),_y(e,t,l,c,i,s,!0)}}function aP(e,t,n,r,i){let s=n[Xo],o=er(n);s!==o&&oa(t,e,r,s,i);for(let a=xn;a<n.length;a++){let l=n[a];Bd(l[_e],l,e,t,r,s)}}function cP(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let s=r.indexOf("-")===-1?void 0:Vi.DashCase;i==null?e.removeStyle(n,r,s):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),s|=Vi.Important),e.setStyle(n,r,i,s))}}function pd(e,t,n,r,i=!1){for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let s=t[n.index];s!==null&&r.push(er(s)),$i(s)&&lP(s,r);let o=n.type;if(o&8)pd(e,t,n.child,r);else if(o&32){let a=yy(n,t),l;for(;l=a();)r.push(l)}else if(o&16){let a=C0(t,n);if(Array.isArray(a))r.push(...a);else{let l=Jo(t[Fr]);pd(l[_e],l,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function lP(e,t){for(let n=xn;n<e.length;n++){let r=e[n],i=r[_e].firstChild;i!==null&&pd(r[_e],r,i,t)}e[Xo]!==e[ji]&&t.push(e[Xo])}function S0(e){if(e[aa]!==null){for(let t of e[aa])t.impl.addSequence(t);e[aa].length=0}}var D0=[];function uP(e){return e[Qn]??dP(e)}function dP(e){let t=D0.pop()??Object.create(pP);return t.lView=e,t}function fP(e){e.lView[Qn]!==e&&(e.lView=null,D0.push(e))}var pP=ne(w({},fu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{rl(e.lView)},consumerOnSignalRead(){this.lView[Qn]=this}});function hP(e){let t=e[Qn]??Object.create(mP);return t.lView=e,t}var mP=ne(w({},fu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=Jo(e.lView);for(;t&&!I0(t[_e]);)t=Jo(t);t&&jg(t)},consumerOnSignalRead(){this.lView[Qn]=this}});function I0(e){return e.type!==2}function T0(e){if(e[nd]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[nd])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));t=n&&!!(e[be]&8192)}}var gP=100;function x0(e,t=!0,n=0){let r=e[Pi].rendererFactory,i=!1;i||r.begin?.();try{yP(e,n)}catch(s){throw t&&E0(e,s),s}finally{i||r.end?.()}}function yP(e,t){let n=hC();try{Qw(!0),sg(e,t);let r=0;for(;Dd(e);){if(r===gP)throw new We(103,!1);r++,sg(e,1)}}finally{Qw(n)}}function vP(e,t,n,r){if(nl(t))return;let i=t[be],s=!1,o=!1;qg(t);let a=!0,l=null,c=null;s||(I0(e)?(c=uP(t),l=Zh(c)):rw()===null?(a=!1,c=hP(t),l=Zh(c)):t[Qn]&&(Jh(t[Qn]),t[Qn]=null));try{aC(t),$A(e.bindingStartIndex),n!==null&&v0(e,t,n,2,r);let h=(i&3)===3;if(!s)if(h){let g=e.preOrderCheckHooks;g!==null&&zu(t,g,null)}else{let g=e.preOrderHooks;g!==null&&qu(t,g,0,null),mm(t,0)}if(o||_P(t),T0(t),R0(t,0),e.contentQueries!==null&&JC(e,t),!s)if(h){let g=e.contentCheckHooks;g!==null&&zu(t,g)}else{let g=e.contentHooks;g!==null&&qu(t,g,1),mm(t,1)}wP(e,t);let d=e.components;d!==null&&A0(t,d,0);let f=e.viewQuery;if(f!==null&&Km(2,f,r),!s)if(h){let g=e.viewCheckHooks;g!==null&&zu(t,g)}else{let g=e.viewHooks;g!==null&&qu(t,g,2),mm(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[hm]){for(let g of t[hm])g();t[hm]=null}s||(S0(t),t[be]&=-73)}catch(h){throw s||rl(t),h}finally{c!==null&&(aw(c,l),a&&fP(c)),Yg()}}function R0(e,t){for(let n=HC(e);n!==null;n=jC(n))for(let r=xn;r<n.length;r++){let i=n[r];N0(i,t)}}function _P(e){for(let t=HC(e);t!==null;t=jC(t)){if(!(t[be]&2))continue;let n=t[ua];for(let r=0;r<n.length;r++){let i=n[r];jg(i)}}}function EP(e,t,n){mt(18);let r=yr(t,e);N0(r,n),mt(19,r[Wt])}function N0(e,t){Hg(e)&&sg(e,t)}function sg(e,t){let n=e[_e],r=e[be],i=e[Qn],s=!!(t===0&&r&16);if(s||=!!(r&64&&t===0),s||=!!(r&1024),s||=!!(i?.dirty&&Xh(i)),s||=!1,i&&(i.dirty=!1),e[be]&=-9217,s)vP(n,e,n.template,e[Wt]);else if(r&8192){T0(e),R0(e,1);let o=n.components;o!==null&&A0(e,o,1),S0(e)}}function A0(e,t,n){for(let r=0;r<t.length;r++)EP(e,t[r],n)}function wP(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let i=n[r];if(i<0)Qo(~i);else{let s=i,o=n[++r],a=n[++r];zA(o,s);let l=t[s];mt(24,l),a(2,l),mt(25,l)}}}finally{Qo(-1)}}function Ey(e,t){let n=hC()?64:1088;for(e[Pi].changeDetectionScheduler?.notify(t);e;){e[be]|=n;let r=Jo(e);if(id(e)&&!r)return e;e=r}return null}function M0(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function O0(e,t){let n=xn+t;if(n<e.length)return e[n]}function Vd(e,t,n,r=!0){let i=t[_e];if(bP(i,t,e,n),r){let o=og(n,e),a=t[sn],l=a.parentNode(e[Xo]);l!==null&&XO(i,e[Vr],a,t,l,o)}let s=t[Wc];s!==null&&s.firstChild!==null&&(s.firstChild=null)}function P0(e,t){let n=Kc(e,t);return n!==void 0&&Ld(n[_e],n),n}function Kc(e,t){if(e.length<=xn)return;let n=xn+t,r=e[n];if(r){let i=r[Zo];i!==null&&i!==e&&vy(i,r),t>0&&(e[n-1][Lr]=r[Lr]);let s=Qu(e,xn+t);ZO(r[_e],r);let o=s[ki];o!==null&&o.detachView(s[_e]),r[Rn]=null,r[Lr]=null,r[be]&=-129}return r}function bP(e,t,n,r){let i=xn+r,s=n.length;r>0&&(n[i-1][Lr]=t),r<s-xn?(t[Lr]=n[i],Ub(n,xn+r,t)):(n.push(t),t[Lr]=null),t[Rn]=n;let o=t[Zo];o!==null&&n!==o&&k0(o,t);let a=t[ki];a!==null&&a.insertView(e),Om(t),t[be]|=128}function k0(e,t){let n=e[ua],r=t[Rn];if(Mi(r))e[be]|=2;else{let i=r[Rn][Fr];t[Fr]!==i&&(e[be]|=2)}n===null?e[ua]=[t]:n.push(t)}var ts=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,t=e[_e];return pd(t,e,t.firstChild,[])}constructor(e,t,n=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=n}get context(){return this._lView[Wt]}get dirty(){return!!(this._lView[be]&9280)||!!this._lView[Qn]?.dirty}set context(e){this._lView[Wt]=e}get destroyed(){return nl(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Rn];if($i(e)){let t=e[rd],n=t?t.indexOf(this):-1;n>-1&&(Kc(e,n),Qu(t,n))}this._attachedToViewContainer=!1}Ld(this._lView[_e],this._lView)}onDestroy(e){cC(this._lView,e)}markForCheck(){Ey(this._cdRefInjectingView||this._lView,4)}markForRefresh(){jg(this._cdRefInjectingView||this._lView)}detach(){this._lView[be]&=-129}reattach(){Om(this._lView),this._lView[be]|=128}detectChanges(){this._lView[be]|=1024,x0(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new We(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=id(this._lView),t=this._lView[Zo];t!==null&&!e&&vy(t,this._lView),b0(this._lView[_e],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new We(902,!1);this._appRef=e;let t=id(this._lView),n=this._lView[Zo];n!==null&&!t&&k0(n,this._lView),Om(this._lView)}},Br=(()=>{class e{static __NG_ELEMENT_ID__=DP}return e})(),CP=Br,SP=class extends CP{_declarationLView;_declarationTContainer;elementRef;constructor(e,t,n){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){let r=kd(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new ts(r)}};function DP(){return Ud(tr(),Be())}function Ud(e,t){return e.type&4?new SP(t,e,ga(e,t)):null}function al(e,t,n,r,i){let s=e.data[t];if(s===null)s=IP(e,t,n,r,i),GA()&&(s.flags|=32);else if(s.type&64){s.type=n,s.value=r,s.attrs=i;let o=jA();s.injectorIndex=o===null?-1:o.injectorIndex}return po(s,!0),s}function IP(e,t,n,r,i){let s=dC(),o=Wg(),a=o?s:s&&s.parent,l=e.data[t]=xP(e,a,n,t,r,i);return TP(e,l,s,o),l}function TP(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function xP(e,t,n,r,i,s){let o=t?t.injectorIndex:-1,a=0;return VA()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:o,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:s,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var vW=new RegExp(`^(\\d+)*(${VM}|${BM})*(.*)`),RP=()=>null;function Zc(e,t){return RP(e,t)}var ag=class{},hd=class{},cg=class{resolveComponentFactory(e){throw Error(`No component factory found for ${gr(e)}.`)}},fo=class{static NULL=new cg},hn=class{},va=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>NP()}return e})();function NP(){let e=Be(),t=tr(),n=yr(t.index,e);return(Mi(n)?n:e)[sn]}var AP=(()=>{class e{static \u0275prov=ie({token:e,providedIn:"root",factory:()=>null})}return e})();function lg(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,s=0;if(t!==null)for(let o=0;o<t.length;o++){let a=t[o];if(typeof a=="number")s=a;else if(s==1)i=Gw(i,a);else if(s==2){let l=a,c=t[++o];r=Gw(r,l+": "+c+";")}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}function kt(e,t=Ye.Default){let n=Be();if(n===null)return Ze(e,t);let r=tr();return RC(r,n,Ln(e),t)}function wy(e,t,n,r,i){let s=r===null?null:{"":-1},o=i(e,n);if(o!==null){let a,l=null,c=null,h=OP(o);h===null?a=o:[a,l,c]=h,LP(e,t,n,a,s,l,c)}s!==null&&r!==null&&MP(n,r,s)}function MP(e,t,n){let r=e.localNames=[];for(let i=0;i<t.length;i+=2){let s=n[t[i+1]];if(s==null)throw new We(-301,!1);r.push(t[i],s)}}function OP(e){let t=null,n=!1;for(let o=0;o<e.length;o++){let a=e[o];if(o===0&&Xr(a)&&(t=a),a.findHostDirectiveDefs!==null){n=!0;break}}if(!n)return null;let r=null,i=null,s=null;for(let o of e)o.findHostDirectiveDefs!==null&&(r??=[],i??=new Map,s??=new Map,PP(o,r,s,i)),o===t&&(r??=[],r.push(o));return r!==null?(r.push(...t===null?e:e.slice(1)),[r,i,s]):null}function PP(e,t,n,r){let i=t.length;e.findHostDirectiveDefs(e,t,r),n.set(e,[i,t.length-1])}function kP(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function LP(e,t,n,r,i,s,o){let a=r.length,l=!1;for(let f=0;f<a;f++){let g=r[f];!l&&Xr(g)&&(l=!0,kP(e,n,f)),Bm(cd(n,t),e,g.type)}jP(n,e.data.length,a);for(let f=0;f<a;f++){let g=r[f];g.providersResolver&&g.providersResolver(g)}let c=!1,h=!1,d=g0(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let f=0;f<a;f++){let g=r[f];if(n.mergedAttrs=da(n.mergedAttrs,g.hostAttrs),BP(e,n,t,d,g),HP(d,g,i),o!==null&&o.has(g)){let[_,x]=o.get(g);n.directiveToIndex.set(g.type,[d,_+n.directiveStart,x+n.directiveStart])}else(s===null||!s.has(g))&&n.directiveToIndex.set(g.type,d);g.contentQueries!==null&&(n.flags|=4),(g.hostBindings!==null||g.hostAttrs!==null||g.hostVars!==0)&&(n.flags|=64);let m=g.type.prototype;!c&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),c=!0),!h&&(m.ngOnChanges||m.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),h=!0),d++}FP(e,n,s)}function FP(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let i=e.data[r];if(n===null||!n.has(i))_b(0,t,i,r),_b(1,t,i,r),wb(t,r,!1);else{let s=n.get(i);Eb(0,t,s,r),Eb(1,t,s,r),wb(t,r,!0)}}}function _b(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o;e===0?o=t.inputs??={}:o=t.outputs??={},o[s]??=[],o[s].push(r),L0(t,s)}}function Eb(e,t,n,r){let i=e===0?n.inputs:n.outputs;for(let s in i)if(i.hasOwnProperty(s)){let o=i[s],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[o]??=[],a[o].push(r,s),L0(t,o)}}function L0(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function wb(e,t,n){let{attrs:r,inputs:i,hostDirectiveInputs:s}=e;if(r===null||!n&&i===null||n&&s===null||ly(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let o=null,a=0;for(;a<r.length;){let l=r[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!n&&i.hasOwnProperty(l)){let c=i[l];for(let h of c)if(h===t){o??=[],o.push(l,r[a+1]);break}}else if(n&&s.hasOwnProperty(l)){let c=s[l];for(let h=0;h<c.length;h+=2)if(c[h]===t){o??=[],o.push(c[h+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(o)}function BP(e,t,n,r,i){e.data[r]=i;let s=i.factory||(i.factory=qo(i.type,!0)),o=new es(s,Xr(i),kt);e.blueprint[r]=o,n[r]=o,VP(e,t,r,g0(e,n,i.hostVars,Gi),i)}function VP(e,t,n,r,i){let s=i.hostBindings;if(s){let o=e.hostBindingOpCodes;o===null&&(o=e.hostBindingOpCodes=[]);let a=~t.index;UP(o)!=a&&o.push(a),o.push(n,r,s)}}function UP(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function HP(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;Xr(t)&&(n[""]=e)}}function jP(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function F0(e,t,n,r,i,s,o,a){let l=t.consts,c=uo(l,o),h=al(t,e,2,r,c);return s&&wy(t,n,h,uo(l,a),i),h.mergedAttrs=da(h.mergedAttrs,h.attrs),h.attrs!==null&&lg(h,h.attrs,!1),h.mergedAttrs!==null&&lg(h,h.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,h),h}function B0(e,t){Zg(e,t),Vg(t)&&e.queries.elementEnd(t)}var ug=class extends fo{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Ko(e);return new Xc(t,this.ngModule)}};function $P(e){return Object.keys(e).map(t=>{let[n,r,i]=e[t],s={propName:n,templateName:t,isSignal:(r&Od.SignalBased)!==0};return i&&(s.transform=i),s})}function WP(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function GP(e,t,n){let r=t instanceof zn?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Lm(n,r):n}function zP(e){let t=e.get(hn,null);if(t===null)throw new We(407,!1);let n=e.get(AP,null),r=e.get(Li,null);return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r}}function qP(e,t){let n=(e.selectors[0][0]||"div").toLowerCase();return f0(t,n,n==="svg"?oC:n==="math"?NA:null)}var Xc=class extends hd{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return $P(this.componentDef.inputs)}get outputs(){return WP(this.componentDef.outputs)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=SO(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r){mt(22);let i=$e(null);try{let s=this.componentDef,o=n?["ng-version","19.2.0"]:DO(this.componentDef.selectors[0]),a=uy(0,null,null,1,0,null,null,null,null,[o],null),l=GP(s,r||this.ngModule,e),c=zP(l),h=c.rendererFactory.createRenderer(null,s),d=n?kO(h,n,s.encapsulation,l):qP(s,h),f=dy(null,a,null,512|m0(s),null,null,c,h,l,null,XC(d,l,!0));f[Ht]=d,qg(f);let g=null;try{let m=F0(Ht,a,f,"#host",()=>[this.componentDef],!0,0);d&&(h0(h,d,m),Zr(d,f)),Pd(a,f,m),ay(a,m,f),B0(a,m),t!==void 0&&YP(m,this.ngContentSelectors,t),g=yr(m.index,f),f[Wt]=g[Wt],gy(a,f,null)}catch(m){throw g!==null&&Wm(g),Wm(f),m}finally{mt(23),Yg()}return new dg(this.componentType,f)}finally{$e(i)}}},dg=class extends ag{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t){super(),this._rootLView=t,this._tNode=Ug(t[_e],Ht),this.location=ga(this._tNode,t),this.instance=yr(this._tNode.index,t)[Wt],this.hostView=this.changeDetectorRef=new ts(t,void 0,!1),this.componentType=e}setInput(e,t){let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,i=my(n,r[_e],r,e,t);this.previousInputValues.set(e,t);let s=yr(n.index,r);Ey(s,1)}get injector(){return new Go(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function YP(e,t,n){let r=e.projection=[];for(let i=0;i<t.length;i++){let s=n[i];r.push(s!=null&&s.length?Array.from(s):null)}}var Hr=(()=>{class e{static __NG_ELEMENT_ID__=KP}return e})();function KP(){let e=tr();return U0(e,Be())}var ZP=Hr,V0=class extends ZP{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return ga(this._hostTNode,this._hostLView)}get injector(){return new Go(this._hostTNode,this._hostLView)}get parentInjector(){let e=Xg(this._hostTNode,this._hostLView);if(CC(e)){let t=sd(e,this._hostLView),n=od(e),r=t[_e].data[n+8];return new Go(r,t)}else return new Go(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=bb(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-xn}createEmbeddedView(e,t,n){let r,i;typeof n=="number"?r=n:n!=null&&(r=n.index,i=n.injector);let s=Zc(this._lContainer,e.ssrId),o=e.createEmbeddedViewImpl(t||{},i,s);return this.insertImpl(o,r,Yc(this._hostTNode,s)),o}createComponent(e,t,n,r,i){let s=e&&!IA(e),o;if(s)o=t;else{let g=t||{};o=g.index,n=g.injector,r=g.projectableNodes,i=g.environmentInjector||g.ngModuleRef}let a=s?e:new Xc(Ko(e)),l=n||this.parentInjector;if(!i&&a.ngModule==null){let g=(s?l:this.parentInjector).get(zn,null);g&&(i=g)}let c=Ko(a.componentType??{}),h=Zc(this._lContainer,c?.id??null),d=h?.firstChild??null,f=a.create(l,r,d,i);return this.insertImpl(f.hostView,o,Yc(this._hostTNode,h)),f}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(MA(r)){let o=this.indexOf(e);if(o!==-1)this.detach(o);else{let a=r[Rn],l=new V0(a,a[Vr],a[Rn]);l.detach(l.indexOf(e))}}let i=this._adjustIndex(t),s=this._lContainer;return Vd(s,r,i,n),e.attachToViewContainerRef(),Ub(Em(s),i,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=bb(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=Kc(this._lContainer,t);n&&(Qu(Em(this._lContainer),t),Ld(n[_e],n))}detach(e){let t=this._adjustIndex(e,-1),n=Kc(this._lContainer,t);return n&&Qu(Em(this._lContainer),t)!=null?new ts(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function bb(e){return e[rd]}function Em(e){return e[rd]||(e[rd]=[])}function U0(e,t){let n,r=t[e.index];return $i(r)?n=r:(n=M0(r,t,null,e),t[e.index]=n,fy(t,n)),JP(n,t,e,r),new V0(n,e,t)}function XP(e,t){let n=e[sn],r=n.createComment(""),i=Qr(t,e),s=n.parentNode(i);return fd(n,s,r,n.nextSibling(i),!1),r}var JP=t1,QP=()=>!1;function e1(e,t,n){return QP(e,t,n)}function t1(e,t,n,r){if(e[Xo])return;let i;n.type&8?i=er(r):i=XP(t,n),e[Xo]=i}var fg=class FS{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new FS(this.queryList)}setDirty(){this.queryList.setDirty()}},pg=class jS{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,i=[];for(let s=0;s<r;s++){let o=n.getByIndex(s),a=this.queries[o.indexInDeclarationView];i.push(a.clone())}return new jS(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let n=0;n<this.queries.length;n++)by(t,n).matches!==null&&this.queries[n].setDirty()}},hg=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=l1(e):this.predicate=e}},mg=class HS{queries;constructor(t=[]){this.queries=t}elementStart(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(t,n)}elementEnd(t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(t)}embeddedTView(t){let n=null;for(let r=0;r<this.length;r++){let i=n!==null?n.length:0,s=this.getByIndex(r).embeddedTView(t,i);s&&(s.indexInDeclarationView=r,n!==null?n.push(s):n=[s])}return n!==null?new HS(n):null}template(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(t,n)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},gg=class $S{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,n=-1){this.metadata=t,this._declarationNodeIndex=n}elementStart(t,n){this.isApplyingToNode(n)&&this.matchTNode(t,n)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,n){this.elementStart(t,n)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new $S(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,r=t.parent;for(;r!==null&&r.type&8&&r.index!==n;)r=r.parent;return n===(r!==null?r.index:-1)}return this._appliesToNextNode}matchTNode(t,n){let r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){let s=r[i];this.matchTNodeWithReadOption(t,n,n1(n,s)),this.matchTNodeWithReadOption(t,n,Yu(n,t,s,!1,!1))}else r===Br?n.type&4&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,Yu(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===yt||i===Hr||i===Br&&n.type&4)this.addMatch(n.index,-2);else{let s=Yu(n,t,i,!1,!1);s!==null&&this.addMatch(n.index,s)}else this.addMatch(n.index,r)}}addMatch(t,n){this.matches===null?this.matches=[t,n]:this.matches.push(t,n)}};function n1(e,t){let n=e.localNames;if(n!==null){for(let r=0;r<n.length;r+=2)if(n[r]===t)return n[r+1]}return null}function r1(e,t){return e.type&11?ga(e,t):e.type&4?Ud(e,t):null}function i1(e,t,n,r){return n===-1?r1(t,e):n===-2?o1(e,t,r):qc(e,e[_e],n,t)}function o1(e,t,n){if(n===yt)return ga(t,e);if(n===Br)return Ud(t,e);if(n===Hr)return U0(t,e)}function H0(e,t,n,r){let i=t[ki].queries[r];if(i.matches===null){let s=e.data,o=n.matches,a=[];for(let l=0;o!==null&&l<o.length;l+=2){let c=o[l];if(c<0)a.push(null);else{let h=s[c];a.push(i1(t,h,o[l+1],n.metadata.read))}}i.matches=a}return i.matches}function yg(e,t,n,r){let i=e.queries.getByIndex(n),s=i.matches;if(s!==null){let o=H0(e,t,i,n);for(let a=0;a<s.length;a+=2){let l=s[a];if(l>0)r.push(o[a/2]);else{let c=s[a+1],h=t[-l];for(let d=xn;d<h.length;d++){let f=h[d];f[Zo]===f[Rn]&&yg(f[_e],f,c,r)}if(h[ua]!==null){let d=h[ua];for(let f=0;f<d.length;f++){let g=d[f];yg(g[_e],g,c,r)}}}}}return r}function s1(e,t){return e[ki].queries[t].queryList}function a1(e,t,n){let r=new $m((n&4)===4);return kA(e,t,r,r.destroy),(t[ki]??=new pg).queries.push(new fg(r))-1}function c1(e,t,n){let r=Xt();return r.firstCreatePass&&(u1(r,new hg(e,t,n),-1),(t&2)===2&&(r.staticViewQueries=!0)),a1(r,Be(),t)}function l1(e){return e.split(",").map(t=>t.trim())}function u1(e,t,n){e.queries===null&&(e.queries=new mg),e.queries.track(new gg(t,n))}function by(e,t){return e.queries.getByIndex(t)}function d1(e,t){let n=e[_e],r=by(n,t);return r.crossesNgTemplate?yg(n,e,t,[]):H0(n,e,r,t)}var Ui=class{},md=class extends Ui{injector;componentFactoryResolver=new ug(this);instance=null;constructor(e){super();let t=new $c([...e.providers,{provide:Ui,useValue:this},{provide:fo,useValue:this.componentFactoryResolver}],e.parent||bd(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function f1(e,t,n=null){return new md({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var p1=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=zb(!1,n.type),i=r.length>0?f1([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,i)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ie({token:e,providedIn:"environment",factory:()=>new e(Ze(zn))})}return e})();function st(e){return Mg(()=>{let t=j0(e),n=ne(w({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===FC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?i=>i.get(p1).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Jr.Emulated,styles:e.styles||Oi,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&mo("NgStandalone"),$0(n);let r=e.dependencies;return n.directiveDefs=Cb(r,!1),n.pipeDefs=Cb(r,!0),n.id=v1(n),n})}function h1(e){return Ko(e)||$b(e)}function m1(e){return e!==null}function g1(e,t){if(e==null)return Yo;let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],s,o,a,l;Array.isArray(i)?(a=i[0],s=i[1],o=i[2]??s,l=i[3]||null):(s=i,o=i,a=Od.None,l=null),n[s]=[r,a,l],t[s]=o}return n}function y1(e){if(e==null)return Yo;let t={};for(let n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function jr(e){return Mg(()=>{let t=j0(e);return $0(t),t})}function ss(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function j0(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||Yo,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Oi,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:g1(e.inputs,t),outputs:y1(e.outputs),debugInfo:null}}function $0(e){e.features?.forEach(t=>t(e))}function Cb(e,t){if(!e)return null;let n=t?Wb:h1;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(m1)}function v1(e){let t=0,n=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function _1(e){return Object.getPrototypeOf(e.prototype).constructor}function wr(e){let t=_1(e.type),n=!0,r=[e];for(;t;){let i;if(Xr(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new We(903,!1);i=t.\u0275dir}if(i){if(n){r.push(i);let o=e;o.inputs=wm(e.inputs),o.declaredInputs=wm(e.declaredInputs),o.outputs=wm(e.outputs);let a=i.hostBindings;a&&S1(e,a);let l=i.viewQuery,c=i.contentQueries;if(l&&b1(e,l),c&&C1(e,c),E1(e,i),GN(e.outputs,i.outputs),Xr(i)&&i.data.animation){let h=e.data;h.animation=(h.animation||[]).concat(i.data.animation)}}let s=i.features;if(s)for(let o=0;o<s.length;o++){let a=s[o];a&&a.ngInherit&&a(e),a===wr&&(n=!1)}}t=Object.getPrototypeOf(t)}w1(r)}function E1(e,t){for(let n in t.inputs){if(!t.inputs.hasOwnProperty(n)||e.inputs.hasOwnProperty(n))continue;let r=t.inputs[n];r!==void 0&&(e.inputs[n]=r,e.declaredInputs[n]=t.declaredInputs[n])}}function w1(e){let t=0,n=null;for(let r=e.length-1;r>=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=da(i.hostAttrs,n=da(n,i.hostAttrs))}}function wm(e){return e===Yo?{}:e===Oi?[]:e}function b1(e,t){let n=e.viewQuery;n?e.viewQuery=(r,i)=>{t(r,i),n(r,i)}:e.viewQuery=t}function C1(e,t){let n=e.contentQueries;n?e.contentQueries=(r,i,s)=>{t(r,i,s),n(r,i,s)}:e.contentQueries=t}function S1(e,t){let n=e.hostBindings;n?e.hostBindings=(r,i)=>{t(r,i),n(r,i)}:e.hostBindings=t}function W0(e,t,n){return e[t]=n}function Hi(e,t,n){let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function D1(e,t,n,r){let i=Hi(e,t,n);return Hi(e,t+1,r)||i}function I1(e,t,n,r,i,s,o,a,l){let c=t.consts,h=al(t,e,4,o||null,a||null);$g()&&wy(t,n,h,uo(c,l),hy),h.mergedAttrs=da(h.mergedAttrs,h.attrs),Zg(t,h);let d=h.tView=uy(2,h,r,i,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return t.queries!==null&&(t.queries.template(t,h),d.queries=t.queries.embeddedTView(h)),h}function vg(e,t,n,r,i,s,o,a,l,c){let h=n+Ht,d=t.firstCreatePass?I1(h,t,e,r,i,s,o,a,l):t.data[h];po(d,!1);let f=T1(t,e,d,n);Id()&&Fd(t,e,f,d),Zr(f,e);let g=M0(f,e,f,d);return e[h]=g,fy(e,g),e1(g,d,e),Cd(d)&&Pd(t,e,d),l!=null&&py(e,d,c),d}function pt(e,t,n,r,i,s,o,a){let l=Be(),c=Xt(),h=uo(c.consts,s);return vg(l,c,e,t,n,r,i,h,o,a),pt}var T1=x1;function x1(e,t,n,r){return Td(!0),t[sn].createComment("")}var G0=new he(""),R1=(()=>{class e{static \u0275prov=ie({token:e,providedIn:"root",factory:()=>new _g})}return e})(),_g=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),this.queuedEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||(this.queuedEffectCount++,n.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}};function Cy(e){return!!e&&typeof e.then=="function"}function z0(e){return!!e&&typeof e.subscribe=="function"}var N1=new he(""),q0=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=O(N1,{optional:!0})??[];injector=O(gt);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let s=Zb(this.injector,i);if(Cy(s))n.push(s);else if(z0(s)){let o=new Promise((a,l)=>{s.subscribe({complete:a,error:l})});n.push(o)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),A1=new he("");function M1(){pw(()=>{throw new We(600,!1)})}function O1(e){return e.isBoundToModule}var P1=10,vr=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=O(SM);afterRenderManager=O(KC);zonelessEnabled=O(Rd);rootEffectScheduler=O(R1);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new ee;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=O(Nd).hasPendingTasks.pipe(hr(n=>!n));constructor(){O(ya,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=O(zn);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){mt(10);let i=n instanceof hd;if(!this._injector.get(q0).done){let d=!i&&hA(n),f=!1;throw new We(405,f)}let s;i?s=n:s=this._injector.get(fo).resolveComponentFactory(n),this.componentTypes.push(s.componentType);let o=O1(s)?void 0:this._injector.get(Ui),a=r||s.selector,l=s.create(gt.NULL,[],a,o),c=l.location.nativeElement,h=l.injector.get(G0,null);return h?.registerApplication(c),l.onDestroy(()=>{this.detachView(l.hostView),Ku(this.components,l),h?.unregisterApplication(c)}),this._loadComponent(l),mt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){mt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(oy.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new We(101,!1);let n=$e(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,$e(n),this.afterTick.next(),mt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(hn,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<P1;)mt(14),this.synchronizeOnce(),mt(15)}synchronizeOnce(){if(this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r,notifyErrorHandler:i}of this.allViews)k1(r,i,n,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}else this._rendererFactory?.begin?.(),this._rendererFactory?.end?.();this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>Dd(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;Ku(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(A1,[]).forEach(r=>r(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>Ku(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new We(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Ku(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function k1(e,t,n,r){!n&&!Dd(e)||x0(e,t,n&&!r?0:1)}function Ea(e,t,n,r){let i=Be(),s=il();if(Hi(i,s,t)){let o=Xt(),a=Kg();$O(a,i,e,t,n,r)}return Ea}function Y0(e,t,n,r){return Hi(e,il(),n)?t+Qc(n)+r:Gi}function Wu(e,t){return e<<17|t<<2}function ns(e){return e>>17&32767}function L1(e){return(e&2)==2}function F1(e,t){return e&131071|t<<17}function Eg(e){return e|2}function fa(e){return(e&131068)>>2}function bm(e,t){return e&-131069|t<<2}function B1(e){return(e&1)===1}function wg(e){return e|1}function V1(e,t,n,r,i,s){let o=s?t.classBindings:t.styleBindings,a=ns(o),l=fa(o);e[r]=n;let c=!1,h;if(Array.isArray(n)){let d=n;h=d[1],(h===null||el(d,h)>0)&&(c=!0)}else h=n;if(i)if(l!==0){let d=ns(e[a+1]);e[r+1]=Wu(d,a),d!==0&&(e[d+1]=bm(e[d+1],r)),e[a+1]=F1(e[a+1],r)}else e[r+1]=Wu(a,0),a!==0&&(e[a+1]=bm(e[a+1],r)),a=r;else e[r+1]=Wu(l,0),a===0?a=r:e[l+1]=bm(e[l+1],r),l=r;c&&(e[r+1]=Eg(e[r+1])),Sb(e,h,r,!0),Sb(e,h,r,!1),U1(t,h,e,r,s),o=Wu(a,l),s?t.classBindings=o:t.styleBindings=o}function U1(e,t,n,r,i){let s=i?e.residualClasses:e.residualStyles;s!=null&&typeof t=="string"&&el(s,t)>=0&&(n[r+1]=wg(n[r+1]))}function Sb(e,t,n,r){let i=e[n+1],s=t===null,o=r?ns(i):fa(i),a=!1;for(;o!==0&&(a===!1||s);){let l=e[o],c=e[o+1];H1(l,t)&&(a=!0,e[o+1]=r?wg(c):Eg(c)),o=r?ns(c):fa(c)}a&&(e[n+1]=r?Eg(i):wg(i))}function H1(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?el(e,t)>=0:!1}function Ve(e,t,n){let r=Be(),i=il();if(Hi(r,i,t)){let s=Xt(),o=Kg();_0(s,o,r,e,t,r[sn],n,!1)}return Ve}function Db(e,t,n,r,i){my(t,e,n,i?"class":"style",r)}function yo(e,t,n){return K0(e,t,n,!1),yo}function vo(e,t){return K0(e,t,null,!0),vo}function K0(e,t,n,r){let i=Be(),s=Xt(),o=WA(2);if(s.firstUpdatePass&&$1(s,e,o,r),t!==Gi&&Hi(i,o,t)){let a=s.data[ho()];Y1(s,a,i,i[sn],e,i[o+1]=K1(t,n),r,o)}}function j1(e,t){return t>=e.expandoStartIndex}function $1(e,t,n,r){let i=e.data;if(i[n+1]===null){let s=i[ho()],o=j1(e,n);Z1(s,r)&&t===null&&!o&&(t=!1),t=W1(i,s,t,r),V1(i,s,t,n,o,r)}}function W1(e,t,n,r){let i=YA(e),s=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=Cm(null,e,t,n,r),n=Jc(n,t.attrs,r),s=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i)if(n=Cm(i,e,t,n,r),s===null){let a=G1(e,t,r);a!==void 0&&Array.isArray(a)&&(a=Cm(null,e,t,a[1],r),a=Jc(a,t.attrs,r),z1(e,t,r,a))}else s=q1(e,t,r)}return s!==void 0&&(r?t.residualClasses=s:t.residualStyles=s),n}function G1(e,t,n){let r=n?t.classBindings:t.styleBindings;if(fa(r)!==0)return e[ns(r)]}function z1(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[ns(i)]=r}function q1(e,t,n){let r,i=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<i;s++){let o=e[s].hostAttrs;r=Jc(r,o,n)}return Jc(r,t.attrs,n)}function Cm(e,t,n,r,i){let s=null,o=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<o&&(s=t[a],r=Jc(r,s.hostAttrs,i),s!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function Jc(e,t,n){let r=n?1:2,i=-1;if(t!==null)for(let s=0;s<t.length;s++){let o=t[s];typeof o=="number"?i=o:i===r&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),fA(e,o,n?!0:t[++s]))}return e===void 0?null:e}function Y1(e,t,n,r,i,s,o,a){if(!(t.type&3))return;let l=e.data,c=l[a+1],h=B1(c)?Ib(l,t,n,i,fa(c),o):void 0;if(!gd(h)){gd(s)||L1(c)&&(s=Ib(l,null,n,i,a,o));let d=sC(ho(),n);cP(r,o,d,i,s)}}function Ib(e,t,n,r,i,s){let o=t===null,a;for(;i>0;){let l=e[i],c=Array.isArray(l),h=c?l[1]:l,d=h===null,f=n[i+1];f===Gi&&(f=d?Oi:void 0);let g=d?fm(f,r):h===r?f:void 0;if(c&&!gd(g)&&(g=fm(l,r)),gd(g)&&(a=g,o))return a;let m=e[i+1];i=o?ns(m):fa(m)}if(t!==null){let l=s?t.residualClasses:t.residualStyles;l!=null&&(a=fm(l,r))}return a}function gd(e){return e!==void 0}function K1(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=gr(ti(e)))),e}function Z1(e,t){return(e.flags&(t?8:16))!==0}var bg=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),i=this.detach(r);if(r-n>1){let s=this.detach(n);this.attach(n,i),this.attach(r,s)}else this.attach(n,i)}move(e,t){this.attach(t,this.detach(e))}};function Sm(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function X1(e,t,n){let r,i,s=0,o=e.length-1,a;if(Array.isArray(t)){let l=t.length-1;for(;s<=o&&s<=l;){let c=e.at(s),h=t[s],d=Sm(s,c,s,h,n);if(d!==0){d<0&&e.updateValue(s,h),s++;continue}let f=e.at(o),g=t[l],m=Sm(o,f,l,g,n);if(m!==0){m<0&&e.updateValue(o,g),o--,l--;continue}let _=n(s,c),x=n(o,f),A=n(s,h);if(Object.is(A,x)){let F=n(l,g);Object.is(F,_)?(e.swap(s,o),e.updateValue(o,g),l--,o--):e.move(o,s),e.updateValue(s,h),s++;continue}if(r??=new yd,i??=xb(e,s,o,n),Cg(e,r,s,A))e.updateValue(s,h),s++,o++;else if(i.has(A))r.set(_,e.detach(s)),o--;else{let F=e.create(s,t[s]);e.attach(s,F),s++,o++}}for(;s<=l;)Tb(e,r,n,s,t[s]),s++}else if(t!=null){let l=t[Symbol.iterator](),c=l.next();for(;!c.done&&s<=o;){let h=e.at(s),d=c.value,f=Sm(s,h,s,d,n);if(f!==0)f<0&&e.updateValue(s,d),s++,c=l.next();else{r??=new yd,i??=xb(e,s,o,n);let g=n(s,d);if(Cg(e,r,s,g))e.updateValue(s,d),s++,o++,c=l.next();else if(!i.has(g))e.attach(s,e.create(s,d)),s++,o++,c=l.next();else{let m=n(s,h);r.set(m,e.detach(s)),o--}}}for(;!c.done;)Tb(e,r,n,e.length,c.value),c=l.next()}for(;s<=o;)e.destroy(e.detach(o--));r?.forEach(l=>{e.destroy(l)})}function Cg(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Tb(e,t,n,r,i){if(Cg(e,t,r,n(r,i)))e.updateValue(r,i);else{let s=e.create(r,i);e.attach(r,s)}}function xb(e,t,n,r){let i=new Set;for(let s=t;s<=n;s++)i.add(r(s,e.at(s)));return i}var yd=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function xt(e,t){mo("NgControlFlow");let n=Be(),r=il(),i=n[r]!==Gi?n[r]:-1,s=i!==-1?vd(n,Ht+i):void 0,o=0;if(Hi(n,r,e)){let a=$e(null);try{if(s!==void 0&&P0(s,o),e!==-1){let l=Ht+e,c=vd(n,l),h=Tg(n[_e],l),d=Zc(c,h.tView.ssrId),f=kd(n,h,t,{dehydratedView:d});Vd(c,f,o,Yc(h,d))}}finally{$e(a)}}else if(s!==void 0){let a=O0(s,o);a!==void 0&&(a[Wt]=t)}}var Sg=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-xn}};function as(e,t){return t}var Dg=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function en(e,t,n,r,i,s,o,a,l,c,h,d,f){mo("NgControlFlow");let g=Be(),m=Xt(),_=l!==void 0,x=Be(),A=a?o.bind(x[Fr][Wt]):o,F=new Dg(_,A);x[Ht+e]=F,vg(g,m,e+1,t,n,r,i,uo(m.consts,s)),_&&vg(g,m,e+2,l,c,h,d,uo(m.consts,f))}var Ig=class extends bg{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-xn}at(e){return this.getLView(e)[Wt].$implicit}attach(e,t){let n=t[Wc];this.needsIndexUpdate||=e!==this.length,Vd(this.lContainer,t,e,Yc(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,J1(this.lContainer,e)}create(e,t){let n=Zc(this.lContainer,this.templateTNode.tView.ssrId),r=kd(this.hostLView,this.templateTNode,new Sg(this.lContainer,t,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(e){Ld(e[_e],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[Wt].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[Wt].$index=e}getLView(e){return Q1(this.lContainer,e)}};function tn(e){let t=$e(null),n=ho();try{let r=Be(),i=r[_e],s=r[n],o=n+1,a=vd(r,o);if(s.liveCollection===void 0){let c=Tg(i,o);s.liveCollection=new Ig(a,r,c)}else s.liveCollection.reset();let l=s.liveCollection;if(X1(l,e,s.trackByFn),l.updateIndexes(),s.hasEmptyBlock){let c=il(),h=l.length===0;if(Hi(r,c,h)){let d=n+2,f=vd(r,d);if(h){let g=Tg(i,d),m=Zc(f,g.tView.ssrId),_=kd(r,g,void 0,{dehydratedView:m});Vd(f,_,0,Yc(g,m))}else P0(f,0)}}}finally{$e(t)}}function vd(e,t){return e[t]}function J1(e,t){return Kc(e,t)}function Q1(e,t){return O0(e,t)}function Tg(e,t){return Ug(e,t)}function Z(e,t,n,r){let i=Be(),s=Xt(),o=Ht+e,a=i[sn],l=s.firstCreatePass?F0(o,s,i,t,hy,$g(),n,r):s.data[o],c=ek(s,i,l,a,t,e);i[o]=c;let h=Cd(l);return po(l,!0),h0(a,c,l),!w0(l)&&Id()&&Fd(s,i,c,l),(LA()===0||h)&&Zr(c,i),FA(),h&&(Pd(s,i,l),ay(s,l,i)),r!==null&&py(i,l),Z}function X(){let e=tr();Wg()?fC():(e=e.parent,po(e,!1));let t=e;UA(t)&&HA(),BA();let n=Xt();return n.firstCreatePass&&B0(n,t),t.classesWithoutHost!=null&&nM(t)&&Db(n,t,Be(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&rM(t)&&Db(n,t,Be(),t.stylesWithoutHost,!1),X}function Ne(e,t,n,r){return Z(e,t,n,r),X(),Ne}var ek=(e,t,n,r,i,s)=>(Td(!0),f0(r,i,JA()));function tk(e,t,n,r,i){let s=t.consts,o=uo(s,r),a=al(t,e,8,"ng-container",o);o!==null&&lg(a,o,!0);let l=uo(s,i);return $g()&&wy(t,n,a,l,hy),a.mergedAttrs=da(a.mergedAttrs,a.attrs),t.queries!==null&&t.queries.elementStart(t,a),a}function Z0(e,t,n){let r=Be(),i=Xt(),s=e+Ht,o=i.firstCreatePass?tk(s,i,r,t,n):i.data[s];po(o,!0);let a=nk(i,r,o,e);return r[s]=a,Id()&&Fd(i,r,a,o),Zr(a,r),Cd(o)&&(Pd(i,r,o),ay(i,o,r)),n!=null&&py(r,o),Z0}function X0(){let e=tr(),t=Xt();return Wg()?fC():(e=e.parent,po(e,!1)),t.firstCreatePass&&(Zg(t,e),Vg(e)&&t.queries.elementEnd(e)),X0}function Hd(e,t,n){return Z0(e,t,n),X0(),Hd}var nk=(e,t,n,r)=>(Td(!0),xO(t[sn],""));function nr(){return Be()}var _d="en-US",rk=_d;function ik(e){typeof e=="string"&&(rk=e.toLowerCase().replace(/_/g,"-"))}var ok=(e,t,n)=>{};function wt(e,t,n,r){let i=Be(),s=Xt(),o=tr();return ak(s,i,i[sn],o,e,t,r),wt}function sk(e,t,n,r){let i=e.cleanup;if(i!=null)for(let s=0;s<i.length-1;s+=2){let o=i[s];if(o===n&&i[s+1]===r){let a=t[td],l=i[s+2];return a.length>l?a[l]:null}typeof o=="string"&&(s+=2)}return null}function ak(e,t,n,r,i,s,o){let a=Cd(r),l=e.firstCreatePass?uC(e):null,c=t[Wt],h=lC(t),d=!0;if(r.type&3||o){let f=Qr(r,t),g=o?o(f):f,m=h.length,_=o?A=>o(er(A[r.index])):r.index,x=null;if(!o&&a&&(x=sk(e,t,i,r.index)),x!==null){let A=x.__ngLastListenerFn__||x;A.__ngNextListenerFn__=s,x.__ngLastListenerFn__=s,d=!1}else{s=Ab(r,t,c,s),ok(f,i,s);let A=n.listen(g,i,s);h.push(s,A),l&&l.push(i,_,m,m+1)}}else s=Ab(r,t,c,s);if(d){let f=r.outputs?.[i],g=r.hostDirectiveOutputs?.[i];if(g&&g.length)for(let m=0;m<g.length;m+=2){let _=g[m],x=g[m+1];Rb(r,e,t,_,x,i,s,h,l)}if(f&&f.length)for(let m of f)Rb(r,e,t,m,i,i,s,h,l)}}function Rb(e,t,n,r,i,s,o,a,l){let c=n[r],h=t.data[r].outputs[i],d=c[h].subscribe(o),f=a.length;a.push(o,d),l&&l.push(s,e.index,f,-(f+1))}function Nb(e,t,n,r){let i=$e(null);try{return mt(6,t,n),n(r)!==!1}catch(s){return E0(e,s),!1}finally{mt(7,t,n),$e(i)}}function Ab(e,t,n,r){return function i(s){if(s===Function)return r;let o=ma(e)?yr(e.index,t):t;Ey(o,5);let a=Nb(t,n,r,s),l=i.__ngNextListenerFn__;for(;l;)a=Nb(t,n,l,s)&&a,l=l.__ngNextListenerFn__;return a}}function de(e=1){return ZA(e)}function qn(e,t,n){return zi(e,"",t,"",n),qn}function zi(e,t,n,r,i){let s=Be(),o=Y0(s,t,n,r);if(o!==Gi){let a=Xt(),l=Kg();_0(a,l,s,e,o,s[sn],i,!1)}return zi}function wa(e,t,n){c1(e,t,n)}function ba(e){let t=Be(),n=Xt(),r=mC();zg(r+1);let i=by(n,r);if(e.dirty&&AA(t)===((i.metadata.flags&2)===2)){if(i.matches===null)e.reset([]);else{let s=d1(t,r);e.reset(s,IM),e.notifyOnChanges()}return!0}return!1}function Ca(){return s1(Be(),mC())}function Sy(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function Dy(e){let t=pC();return Sd(t,Ht+e)}function bt(e,t=""){let n=Be(),r=Xt(),i=e+Ht,s=r.firstCreatePass?al(r,i,1,t,null):r.data[i],o=ck(r,n,s,t,e);n[i]=o,Id()&&Fd(r,n,o,s),po(s,!1)}var ck=(e,t,n,r,i)=>(Td(!0),IO(t[sn],r));function Sa(e){return rr("",e,""),Sa}function rr(e,t,n){let r=Be(),i=Y0(r,e,t,n);return i!==Gi&&lk(r,ho(),i),rr}function lk(e,t,n){let r=sC(t,e);TO(e[sn],r,n)}var J0={};function _o(e){let t=Xt(),n=Be(),r=e+Ht,i=al(t,r,128,null,null);return po(i,!1),Sy(t,n,r,J0),_o}function cs(e){mo("NgLet");let t=Xt(),n=Be(),r=ho();return Sy(t,n,r,e),e}function ri(e){let t=pC(),n=Sd(t,Ht+e);if(n===J0)throw new We(314,!1);return n}function uk(e,t,n){let r=Xt();if(r.firstCreatePass){let i=Xr(e);xg(n,r.data,r.blueprint,i,!0),xg(t,r.data,r.blueprint,i,!1)}}function xg(e,t,n,r,i){if(e=Ln(e),Array.isArray(e))for(let s=0;s<e.length;s++)xg(e[s],t,n,r,i);else{let s=Xt(),o=Be(),a=tr(),l=la(e)?e:Ln(e.provide),c=Kb(e),h=a.providerIndexes&1048575,d=a.directiveStart,f=a.providerIndexes>>20;if(la(e)||!e.multi){let g=new es(c,i,kt),m=Im(l,t,i?h:h+f,d);m===-1?(Bm(cd(a,o),s,l),Dm(s,e,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(g),o.push(g)):(n[m]=g,o[m]=g)}else{let g=Im(l,t,h+f,d),m=Im(l,t,h,h+f),_=g>=0&&n[g],x=m>=0&&n[m];if(i&&!x||!i&&!_){Bm(cd(a,o),s,l);let A=pk(i?fk:dk,n.length,i,r,c);!i&&x&&(n[m].providerFactory=A),Dm(s,e,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(A),o.push(A)}else{let A=Q0(n[i?m:g],c,!i&&r);Dm(s,e,g>-1?g:m,A)}!i&&r&&x&&n[m].componentProviders++}}}function Dm(e,t,n,r){let i=la(t),s=_A(t);if(i||s){let o=(s?Ln(t.useClass):t).prototype.ngOnDestroy;if(o){let a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=a.indexOf(n);l===-1?a.push(n,[r,o]):a[l+1].push(r,o)}else a.push(n,o)}}}function Q0(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function Im(e,t,n,r){for(let i=n;i<r;i++)if(t[i]===e)return i;return-1}function dk(e,t,n,r){return Rg(this.multi,[])}function fk(e,t,n,r){let i=this.multi,s;if(this.providerFactory){let o=this.providerFactory.componentProviders,a=qc(n,n[_e],this.providerFactory.index,r);s=a.slice(0,o),Rg(i,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],Rg(i,s);return s}function Rg(e,t){for(let n=0;n<e.length;n++){let r=e[n];t.push(r())}return t}function pk(e,t,n,r,i){let s=new es(e,n,kt);return s.multi=[],s.index=t,s.componentProviders=0,Q0(s,i,r&&!n),s}function jd(e,t=[]){return n=>{n.providersResolver=(r,i)=>uk(r,i?i(e):e,t)}}function eS(e,t,n,r){return nS(Be(),Gg(),e,t,n,r)}function tS(e,t){let n=e[t];return n===Gi?void 0:n}function nS(e,t,n,r,i,s){let o=t+n;return Hi(e,o,i)?W0(e,o+1,s?r.call(s,i):r(i)):tS(e,o+1)}function hk(e,t,n,r,i,s,o){let a=t+n;return D1(e,a,i,s)?W0(e,a+2,o?r.call(o,i,s):r(i,s)):tS(e,a+2)}function Dn(e,t){let n=Xt(),r,i=e+Ht;n.firstCreatePass?(r=mk(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let s=r.factory||(r.factory=qo(r.type,!0)),o,a=Gn(kt);try{let l=ad(!1),c=s();return ad(l),Sy(n,Be(),i,c),c}finally{Gn(a)}}function mk(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Nn(e,t,n){let r=e+Ht,i=Be(),s=Sd(i,r);return iS(i,r)?nS(i,Gg(),t,s.transform,n,s):s.transform(n)}function rS(e,t,n,r){let i=e+Ht,s=Be(),o=Sd(s,i);return iS(s,i)?hk(s,Gg(),t,o.transform,n,r,o):o.transform(n,r)}function iS(e,t){return e[_e].data[t].pure}function oS(e,t){return Ud(e,t)}var pa=class{full;major;minor;patch;constructor(e){this.full=e;let t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}},Iy=new pa("19.2.0"),gk=(()=>{class e{zone=O(Fe);changeDetectionScheduler=O(Li);applicationRef=O(vr);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function yk({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:n}){return e??=()=>new Fe(ne(w({},vk()),{scheduleInRootZone:n})),[{provide:Fe,useFactory:e},{provide:jc,multi:!0,useFactory:()=>{let r=O(gk,{optional:!0});return()=>r.initialize()}},{provide:jc,multi:!0,useFactory:()=>{let r=O(_k);return()=>{r.initialize()}}},t===!0?{provide:OC,useValue:!0}:[],{provide:Qg,useValue:n??MC}]}function vk(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var _k=(()=>{class e{subscription=new ot;initialized=!1;zone=O(Fe);pendingTasks=O(Nd);initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Fe.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Fe.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),sS=(()=>{class e{appRef=O(vr);taskService=O(Nd);ngZone=O(Fe);zonelessEnabled=O(Rd);tracing=O(ya,{optional:!0});disableScheduling=O(OC,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new ot;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ud):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(O(Qg,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof dd||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;let r=!1;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{this.appRef.dirtyFlags|=16,r=!0;break}case 13:{this.appRef.dirtyFlags|=2,r=!0;break}case 11:{r=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let i=this.useMicrotaskScheduler?ob:PC;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(n){return!(this.disableScheduling&&!n||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(ud+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(n),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,ob(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function aS(){return mo("NgZoneless"),Gb([{provide:Li,useExisting:sS},{provide:Fe,useClass:dd},{provide:Rd,useValue:!0},{provide:Qg,useValue:!1},[]])}function Ek(){return typeof $localize<"u"&&$localize.locale||_d}var Ty=new he("",{providedIn:"root",factory:()=>O(Ty,Ye.Optional|Ye.SkipSelf)||Ek()}),Ng=new he(""),wk=new he("");function Fc(e){return!e.moduleRef}function bk(e){let t=Fc(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Fe);return n.run(()=>{Fc(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(Fi,null),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:s=>{r.handleError(s)}})}),Fc(e)){let s=()=>t.destroy(),o=e.platformInjector.get(Ng);o.add(s),t.onDestroy(()=>{i.unsubscribe(),o.delete(s)})}else{let s=()=>e.moduleRef.destroy(),o=e.platformInjector.get(Ng);o.add(s),e.moduleRef.onDestroy(()=>{Ku(e.allPlatformModules,e.moduleRef),i.unsubscribe(),o.delete(s)})}return Sk(r,n,()=>{let s=t.get(q0);return s.runInitializers(),s.donePromise.then(()=>{let o=t.get(Ty,_d);if(ik(o||_d),!t.get(wk,!0))return Fc(e)?t.get(vr):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Fc(e)){let a=t.get(vr);return e.rootComponent!==void 0&&a.bootstrap(e.rootComponent),a}else return Ck(e.moduleRef,e.allPlatformModules),e.moduleRef})})})}function Ck(e,t){let n=e.injector.get(vr);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(e.instance.ngDoBootstrap)e.instance.ngDoBootstrap(n);else throw new We(-403,!1);t.push(e)}function Sk(e,t,n){try{let r=n();return Cy(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var Zu=null;function Dk(e=[],t){return gt.create({name:t,providers:[{provide:wd,useValue:"platform"},{provide:Ng,useValue:new Set([()=>Zu=null])},...e]})}function Ik(e=[]){if(Zu)return Zu;let t=Dk(e);return Zu=t,M1(),Tk(t),t}function Tk(e){let t=e.get(ry,null);Zb(e,()=>{t?.forEach(n=>n())})}var ir=(()=>{class e{static __NG_ELEMENT_ID__=xk}return e})();function xk(e){return Rk(tr(),Be(),(e&16)===16)}function Rk(e,t,n){if(ma(e)&&!n){let r=yr(e.index,t);return new ts(r,r)}else if(e.type&175){let r=t[Fr];return new ts(r,t)}return null}function cS(e){mt(8);try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,i=Ik(r),s=[yk({}),{provide:Li,useExisting:sS},...n||[]],o=new md({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return bk({r3Injector:o.injector,platformInjector:i,rootComponent:t})}catch(t){return Promise.reject(t)}finally{mt(9)}}function Da(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function xy(e,t=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):t}function Ry(e){let t=$e(null);try{return e()}finally{$e(t)}}var Mb=class{[Ti];constructor(e){this[Ti]=e}destroy(){this[Ti].destroy()}};function $d(e,t){let n=Ko(e),r=t.elementInjector||bd();return new Xc(n).create(r,t.projectableNodes,t.hostElement,t.environmentInjector)}var Nk={schedule(e,t){let n=setTimeout(e,t);return()=>clearTimeout(n)}};function Ak(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Mk(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}var Ny;function Ok(e,t){if(!Ny){let n=Element.prototype;Ny=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return e.nodeType===Node.ELEMENT_NODE?Ny.call(e,t):!1}function Pk(e){let t={};return e.forEach(({propName:n,templateName:r,transform:i})=>{t[Ak(r)]=[n,i]}),t}function kk(e,t){return t.get(fo).resolveComponentFactory(e).inputs}function Lk(e,t){let n=e.childNodes,r=t.map(()=>[]),i=-1;t.some((s,o)=>s==="*"?(i=o,!0):!1);for(let s=0,o=n.length;s<o;++s){let a=n[s],l=Fk(a,t,i);l!==-1&&r[l].push(a)}return r}function Fk(e,t,n){let r=n;return Mk(e)&&t.some((i,s)=>i!=="*"&&Ok(e,i)?(r=s,!0):!1),r}var Bk=10,Ay=class{componentFactory;inputMap=new Map;constructor(e,t){this.componentFactory=t.get(fo).resolveComponentFactory(e);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(e){return new My(this.componentFactory,e,this.inputMap)}},My=class{componentFactory;injector;inputMap;eventEmitters=new Vo(1);events=this.eventEmitters.pipe(ta(e=>ao(...e)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(e,t,n){this.componentFactory=e,this.injector=t,this.inputMap=n,this.ngZone=this.injector.get(Fe),this.appRef=this.injector.get(vr),this.cdScheduler=t.get(Li),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=Nk.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},Bk))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t){if(this.componentRef===null){this.initialInputValues.set(e,t);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(e)??e,t),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(e){let t=gt.create({providers:[],parent:this.injector}),n=Lk(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,n,e),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[e,t]of this.initialInputValues)this.setInputValue(e,t);this.initialInputValues.clear()}initializeOutputs(e){let t=this.componentFactory.outputs.map(({propName:n,templateName:r})=>{let i=e.instance[n];return new nt(s=>{let o=i.subscribe(a=>s.next({name:r,value:a}));return()=>o.unsubscribe()})});this.eventEmitters.next(t)}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},Oy=class extends HTMLElement{ngElementEventsSubscription=null};function lS(e,t){let n=kk(e,t.injector),r=t.strategyFactory||new Ay(e,t.injector),i=Pk(n);class s extends Oy{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=r.create(this.injector||t.injector);n.forEach(({propName:l,transform:c})=>{if(!this.hasOwnProperty(l))return;let h=this[l];delete this[l],a.setInputValue(l,h,c)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,h){let[d,f]=i[a];this.ngElementStrategy.setInputValue(d,c,f)}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=>{let l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return n.forEach(({propName:o,transform:a})=>{Object.defineProperty(s.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(l){this.ngElementStrategy.setInputValue(o,l,a)},configurable:!0,enumerable:!0})}),s}var pS=null;function Ia(){return pS}function hS(e){pS??=e}var Wd=class{},Qe=new he(""),mS=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:()=>O(Uk),providedIn:"platform"})}return e})(),Uk=(()=>{class e extends mS{_location;_history;_doc=O(Qe);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Ia().getBaseHref(this._doc)}onPopState(n){let r=Ia().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Ia().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,i){this._history.pushState(n,r,i)}replaceState(n,r,i){this._history.replaceState(n,r,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function gS(e,t){return e?t?e.endsWith("/")?t.startsWith("/")?e+t.slice(1):e+t:t.startsWith("/")?e+t:`${e}/${t}`:e:t}function uS(e){let t=e.search(/#|\?|$/);return e[t-1]==="/"?e.slice(0,t-1)+e.slice(t):e}function ls(e){return e&&e[0]!=="?"?`?${e}`:e}var ky=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:()=>O(jk),providedIn:"root"})}return e})(),Hk=new he(""),jk=(()=>{class e extends ky{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??O(Qe).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return gS(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+ls(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,s){let o=this.prepareExternalUrl(i+ls(s));this._platformLocation.pushState(n,r,o)}replaceState(n,r,i,s){let o=this.prepareExternalUrl(i+ls(s));this._platformLocation.replaceState(n,r,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(n){return new(n||e)(Ze(mS),Ze(Hk,8))};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Ly=(()=>{class e{_subject=new ee;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=Gk(uS(dS(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+ls(r))}normalize(n){return e.stripTrailingSlash(Wk(this._basePath,dS(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",i=null){this._locationStrategy.pushState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+ls(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+ls(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(i=>i(n,r))}subscribe(n,r,i){return this._subject.subscribe({next:n,error:r??void 0,complete:i??void 0})}static normalizeQueryParams=ls;static joinWithSlash=gS;static stripTrailingSlash=uS;static \u0275fac=function(n){return new(n||e)(Ze(ky))};static \u0275prov=ie({token:e,factory:()=>$k(),providedIn:"root"})}return e})();function $k(){return new Ly(Ze(ky))}function Wk(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function dS(e){return e.replace(/\/index.html$/,"")}function Gk(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}function yS(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[i,s]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(s)}return null}var Py=/\s+/,fS=[],vS=(()=>{class e{_ngEl;_renderer;initialClasses=fS;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(Py):fS}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(Py):n}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let r of n)this._updateState(r,!0);else if(n!=null)for(let r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){let i=this.stateMap.get(n);i!==void 0?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let r=n[0],i=n[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(n,r){n=n.trim(),n.length>0&&n.split(Py).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(n){return new(n||e)(kt(yt),kt(va))};static \u0275dir=jr({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})(),_S=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(n){this._viewContainerRef=n}ngOnChanges(n){if(this._shouldRecreateView(n)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,i):!1,get:(n,r,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,i)}})}static \u0275fac=function(n){return new(n||e)(kt(Hr))};static \u0275dir=jr({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[rs]})}return e})(),Fy="browser",zk="server";function ES(e){return e===Fy}function By(e){return e===zk}var Gd=class{},Uy=class extends Wd{supportsDOMEvents=!0},Hy=class GS extends Uy{static makeCurrent(){hS(new GS)}onAndCancel(t,n,r,i){return t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.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 n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=Yk();return n==null?null:Kk(n)}resetBaseElement(){cl=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return yS(document.cookie,t)}},cl=null;function Yk(){return cl=cl||document.querySelector("base"),cl?cl.getAttribute("href"):null}function Kk(e){return new URL(e,document.baseURI).pathname}var Zk=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac})}return e})(),jy=new he(""),IS=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,i,s){return this._findPluginFor(r).addEventListener(n,r,i,s)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new We(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(n){return new(n||e)(Ze(jy),Ze(Fe))};static \u0275prov=ie({token:e,factory:e.\u0275fac})}return e})(),qd=class{_doc;constructor(e){this._doc=e}manager},zd="ng-app-id";function wS(e){for(let t of e)t.remove()}function bS(e,t){let n=t.createElement("style");return n.textContent=e,n}function Xk(e,t,n,r){let i=e.head?.querySelectorAll(`style[${zd}="${t}"],link[${zd}="${t}"]`);if(i)for(let s of i)s.removeAttribute(zd),s instanceof HTMLLinkElement?r.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&n.set(s.textContent,{usage:0,elements:[s]})}function $y(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var TS=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,i,s={}){this.doc=n,this.appId=r,this.nonce=i,this.isServer=By(s),Xk(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let i of n)this.addUsage(i,this.inline,bS);r?.forEach(i=>this.addUsage(i,this.external,$y))}removeStyles(n,r){for(let i of n)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(n,r,i){let s=r.get(n);s?s.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(o=>this.addElement(o,i(n,this.doc)))})}removeUsage(n,r){let i=r.get(n);i&&(i.usage--,i.usage<=0&&(wS(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])wS(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,bS(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,$y(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute(zd,this.appId),n.appendChild(r)}static \u0275fac=function(n){return new(n||e)(Ze(Qe),Ze(ol),Ze(iy,8),Ze(os))};static \u0275prov=ie({token:e,factory:e.\u0275fac})}return e})(),Vy={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/",math:"http://www.w3.org/1998/Math/MathML"},Gy=/%COMP%/g,xS="%COMP%",Jk=`_nghost-${xS}`,Qk=`_ngcontent-${xS}`,eL=!0,tL=new he("",{providedIn:"root",factory:()=>eL});function nL(e){return Qk.replace(Gy,e)}function rL(e){return Jk.replace(Gy,e)}function RS(e,t){return t.map(n=>n.replace(Gy,e))}var CS=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,i,s,o,a,l,c=null,h=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=a,this.ngZone=l,this.nonce=c,this.tracingService=h,this.platformIsServer=By(a),this.defaultRenderer=new ll(n,o,l,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Jr.ShadowDom&&(r=ne(w({},r),{encapsulation:Jr.Emulated}));let i=this.getOrCreateRenderer(n,r);return i instanceof Yd?i.applyToHost(n):i instanceof ul&&i.applyStyles(),i}getOrCreateRenderer(n,r){let i=this.rendererByCompId,s=i.get(r.id);if(!s){let o=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,d=this.platformIsServer,f=this.tracingService;switch(r.encapsulation){case Jr.Emulated:s=new Yd(l,c,r,this.appId,h,o,a,d,f);break;case Jr.ShadowDom:return new Wy(l,c,n,r,o,a,this.nonce,d,f);default:s=new ul(l,c,r,h,o,a,d,f);break}i.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(n){return new(n||e)(Ze(IS),Ze(TS),Ze(ol),Ze(tL),Ze(Qe),Ze(os),Ze(Fe),Ze(iy),Ze(ya,8))};static \u0275prov=ie({token:e,factory:e.\u0275fac})}return e})(),ll=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i){this.eventManager=e,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.tracingService=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Vy[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(SS(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(SS(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new We(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let i=Vy[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Vy[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(Vi.DashCase|Vi.Important)?e.style.setProperty(t,n,r&Vi.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Vi.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e=="string"&&(e=Ia().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);let i=this.decoratePreventDefault(n);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(e,t,i)),this.eventManager.addEventListener(e,t,i,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function SS(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Wy=class extends ll{sharedStylesHost;hostEl;shadowRoot;constructor(e,t,n,r,i,s,o,a,l){super(e,i,s,a,l),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=r.styles;c=RS(r.id,c);for(let d of c){let f=document.createElement("style");o&&f.setAttribute("nonce",o),f.textContent=d,this.shadowRoot.appendChild(f)}let h=r.getExternalStyles?.();if(h)for(let d of h){let f=$y(d,i);o&&f.setAttribute("nonce",o),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},ul=class extends ll{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,i,s,o,a,l){super(e,i,s,o,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=n.styles;this.styles=l?RS(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Yd=class extends ul{contentAttr;hostAttr;constructor(e,t,n,r,i,s,o,a,l){let c=r+"-"+n.id;super(e,t,n,i,s,o,a,l,c),this.contentAttr=nL(c),this.hostAttr=rL(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}},iL=(()=>{class e extends qd{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i,s){return n.addEventListener(r,i,s),()=>this.removeEventListener(n,r,i,s)}removeEventListener(n,r,i,s){return n.removeEventListener(r,i,s)}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ie({token:e,factory:e.\u0275fac})}return e})(),DS=["alt","control","meta","shift"],oL={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},sL={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},aL=(()=>{class e extends qd{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,i,s){let o=e.parseEventName(r),a=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Ia().onAndCancel(n,o.domEventName,a,s))}static parseEventName(n){let r=n.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let s=e._normalizeKey(r.pop()),o="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),o="code."),DS.forEach(c=>{let h=r.indexOf(c);h>-1&&(r.splice(h,1),o+=c+".")}),o+=s,r.length!=0||s.length===0)return null;let l={};return l.domEventName=i,l.fullKey=o,l}static matchEventFullKeyCode(n,r){let i=oL[n.key]||n.key,s="";return r.indexOf("code.")>-1&&(i=n.code,s="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),DS.forEach(o=>{if(o!==i){let a=sL[o];a(n)&&(s+=o+".")}}),s+=i,s===r)}static eventCallback(n,r,i){return s=>{e.matchEventFullKeyCode(s,n)&&i.runGuarded(()=>r(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ie({token:e,factory:e.\u0275fac})}return e})();function NS(e){return cS(cL(e))}function cL(e){return{appProviders:[...pL,...e?.providers??[]],platformProviders:fL}}function lL(){Hy.makeCurrent()}function uL(){return new Fi}function dL(){return WC(document),document}var fL=[{provide:os,useValue:Fy},{provide:ry,useValue:lL,multi:!0},{provide:Qe,useFactory:dL,deps:[]}],pL=[{provide:wd,useValue:"root"},{provide:Fi,useFactory:uL,deps:[]},{provide:jy,useClass:iL,multi:!0,deps:[Qe]},{provide:jy,useClass:aL,multi:!0,deps:[Qe]},CS,TS,IS,{provide:hn,useExisting:CS},{provide:Gd,useClass:Zk,deps:[]},[]],zy=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:function(n){let r=null;return n?r=new(n||e):r=Ze(hL),r},providedIn:"root"})}return e})(),hL=(()=>{class e extends zy{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case ni.NONE:return r;case ni.HTML:return go(r,"HTML")?ti(r):cy(this._doc,String(r)).toString();case ni.STYLE:return go(r,"Style")?ti(r):r;case ni.SCRIPT:if(go(r,"Script"))return ti(r);throw new We(5200,!1);case ni.URL:return go(r,"URL")?ti(r):Md(String(r));case ni.RESOURCE_URL:if(go(r,"ResourceURL"))return ti(r);throw new We(5201,!1);default:throw new We(5202,!1)}}bypassSecurityTrustHtml(n){return QC(n)}bypassSecurityTrustStyle(n){return e0(n)}bypassSecurityTrustScript(n){return t0(n)}bypassSecurityTrustUrl(n){return n0(n)}bypassSecurityTrustResourceUrl(n){return r0(n)}static \u0275fac=function(n){return new(n||e)(Ze(Qe))};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),AS="9.9.0",k=class Wh{static SDK_VERSION=AS;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_EXPERIMENT_START="CE Experiment Start";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static PAYMENT_MODAL_DETAILS=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}];static{let t=Wh.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");Wh.SDK_VERSION_CODE=parseInt(t,10)}},mn={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${k.SDK_VERSION}/dist/widget.min.js`},or=Re(fs()),b=class{static log(...e){or.default.info(...e)}static debug(...e){or.default.debug(...e)}static error(...e){or.default.error(...e)}static warn(...e){or.default.warn(...e)}static info(...e){or.default.info(...e)}static trace(...e){or.default.trace(...e)}static configure(e=k.LOG_PREFIX){or.default.useDefaults({formatter:function(n){n.unshift(`${e} (v${k.SDK_VERSION}):`)}});let t=this.getDebugParam();(t==="1"||t==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?or.default.setLevel(or.default[localStorage.cooeeLogLevel]):or.default.setLevel(mn.debug?or.default.TRACE:or.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let e=`
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
border-radius: 4px;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Cooee SDK: v${k.SDK_VERSION}`,console.group("%c Elevate your ecommerce experience with Cooee \u{1F680} ",e),console.log(`%c${t}`,"font-size: 13px; line-height: 1.8;"),console.groupEnd()}},OS={providers:[aS()]},Uf=Re(Yn()),Ct=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(e){return e??={},this.gaEnabled=e.gaEnabled,this.gaMeasurementID=e.gaMeasurementID,this.pixelPush=e.pixelPush,this.website=e.website??{},this.currencyCount=e.currencyCount??0,this.money=e.money,this.currency=e.currency,this.storefrontToken=e.storefrontToken,this.skipItemAttribute=e.skipItemAttribute,this}},Zd=class{static format(e,t){let n=/{{\s*(\w+)\s*}}/;return t.replace(n,(r,i)=>{switch(i){case"amount":return this.formatWithDelimiters(e,2);case"amount_no_decimals":return this.formatWithDelimiters(e,0);case"amount_with_comma_separator":return this.formatWithDelimiters(e,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(e,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(e,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(e,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(e,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(e,2," ",".");default:return r}})}static formatWithDelimiters(e,t=2,n=",",r="."){if(isNaN(e)||e==null)return"0";let i=(e/100).toFixed(t).split("."),s=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),o=i[1]?r+i[1]:"";return s+o}},gn=class{id;mID;vID;vName;imageURL;name;link;quantity;price;constructor(e){this.id=e.id,this.mID=e.mID,this.vID=e.vID,this.vName=e.vName,this.imageURL=e.imageURL,this.name=e.name,this.link=e.link,this.quantity=e.quantity,this.price=e.price}},Oe=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;activeExperiment;inInactive=!1;lastEnterActive=new Date;lastEnterInactive=null;currentItem;_currencyCode;get currencyCode(){return this._currencyCode}set currencyCode(e){this._currencyCode=e}static get(){return window.CooeeSDK.runtimeData}isInactive(){return this.inInactive}async setInactive(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))}setActive(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0}isFirstActive(){return this.lastEnterInactive==null}getCurrentItem(){return this.currentItem}setCurrentItem(e){this.currentItem=new gn(e)}},AI=Re(xa()),Yy=Re(uD());function Ra(e){return Yy.default.createInstance({name:"lc",storeName:e,driver:Yy.default.LOCALSTORAGE})}var Eo=class{static storage;static async get(e,t){return await this.storage?.getItem(e)??t}static set(e,t){return this.storage?.setItem(e,t)}static remove(e){return this.storage?.removeItem(e)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}},rt=class extends Eo{static storeName="usr";static{this.storage=Ra(this.storeName)}},ge=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"},yn=class extends Eo{static storeName="ses";static{this.storage=Ra(this.storeName)}},dD=Object.prototype.toString;function ps(e){switch(dD.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ii(e,Error)}}function Na(e,t){return dD.call(e)===`[object ${t}]`}function Jd(e){return Na(e,"ErrorEvent")}function Qd(e){return Na(e,"DOMError")}function Ky(e){return Na(e,"DOMException")}function Fn(e){return Na(e,"String")}function Aa(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function hs(e){return e===null||Aa(e)||typeof e!="object"&&typeof e!="function"}function $r(e){return Na(e,"Object")}function ms(e){return typeof Event<"u"&&ii(e,Event)}function Zy(e){return typeof Element<"u"&&ii(e,Element)}function Xy(e){return Na(e,"RegExp")}function qi(e){return!!(e&&e.then&&typeof e.then=="function")}function Jy(e){return $r(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ii(e,t){try{return e instanceof t}catch{return!1}}function dl(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function oi(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ef(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let i=e[r];try{dl(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function fD(e,t,n=!1){return Fn(e)?Xy(t)?t.test(e):Fn(t)?n?e===t:e.includes(t):!1:!1}function Ma(e,t=[],n=!1){return t.some(r=>fD(e,r,n))}function ev(e,t,n=250,r,i,s,o){if(!s.exception||!s.exception.values||!o||!ii(o.originalException,Error))return;let a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=vL(Qy(e,t,i,o.originalException,r,s.exception.values,a,0),n))}function Qy(e,t,n,r,i,s,o,a){if(s.length>=n+1)return s;let l=[...s];if(ii(r[i],Error)){pD(o,a);let c=e(t,r[i]),h=l.length;hD(c,i,h,a),l=Qy(e,t,n,r[i],i,[c,...l],c,h)}return Array.isArray(r.errors)&&r.errors.forEach((c,h)=>{if(ii(c,Error)){pD(o,a);let d=e(t,c),f=l.length;hD(d,`errors[${h}]`,f,a),l=Qy(e,t,n,c,i,[d,...l],d,f)}}),l}function pD(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=ne(w(w({},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function hD(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=ne(w({},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}function vL(e,t){return e.map(n=>(n.value&&(n.value=oi(n.value,t)),n))}var br="8.18.0",Ee=globalThis;function Oa(e,t,n){let r=n||Ee,i=r.__SENTRY__=r.__SENTRY__||{},s=i[br]=i[br]||{};return s[e]||(s[e]=t())}var tv=Ee,_L=80;function fl(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,i=[],s=0,o=0,a=" > ",l=a.length,c,h=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||_L;for(;n&&s++<r&&(c=EL(n,h),!(c==="html"||s>1&&o+i.length*l+c.length>=d));)i.push(c),o+=c.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function EL(e,t){let n=e,r=[];if(!n||!n.tagName)return"";if(tv.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(i&&i.length)i.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let o=n.className;if(o&&Fn(o)){let a=o.split(/\s+/);for(let l of a)r.push(`.${l}`)}}let s=["aria-label","type","name","title","alt"];for(let o of s){let a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function nv(){try{return tv.document.location.href}catch{return""}}function rv(e){if(!tv.HTMLElement)return null;let t=e,n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}var si=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,wL="Sentry Logger ",pl=["debug","info","warn","error","log","assert","trace"],Pa={};function ka(e){if(!("console"in Ee))return e();let t=Ee.console,n={},r=Object.keys(Pa);r.forEach(i=>{let s=Pa[i];n[i]=t[i],t[i]=s});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function bL(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return si?pl.forEach(n=>{t[n]=(...r)=>{e&&ka(()=>{Ee.console[n](`${wL}[${n}]:`,...r)})}}):pl.forEach(n=>{t[n]=()=>{}}),t}var se=bL(),CL=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function SL(e){return e==="http"||e==="https"}function ai(e,t=!1){let{host:n,path:r,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${o}`}function mD(e){let t=CL.exec(e);if(!t){ka(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i="",s="",o="",a=""]=t.slice(1),l="",c=a,h=c.split("/");if(h.length>1&&(l=h.slice(0,-1).join("/"),c=h.pop()),c){let d=c.match(/^\d+/);d&&(c=d[0])}return gD({host:s,pass:i,path:l,projectId:c,port:o,protocol:n,publicKey:r})}function gD(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function DL(e){if(!si)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(se.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?SL(r)?t&&isNaN(parseInt(t,10))?(se.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(se.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(se.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function tf(e){let t=typeof e=="string"?mD(e):gD(e);if(!(!t||!DL(t)))return t}var An=class extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}};function Lt(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i=="function"&&nf(i,r),e[t]=i}function Bn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{si&&se.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function nf(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,Bn(e,"__sentry_original__",t)}catch{}}function gs(e){return e.__sentry_original__}function ov(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function rf(e){if(ps(e))return w({message:e.message,name:e.name,stack:e.stack},vD(e));if(ms(e)){let t=w({type:e.type,target:yD(e.target),currentTarget:yD(e.currentTarget)},vD(e));return typeof CustomEvent<"u"&&ii(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function yD(e){try{return Zy(e)?fl(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function vD(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function sv(e,t=40){let n=Object.keys(rf(e));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return oi(r,t);for(let i=n.length;i>0;i--){let s=n.slice(0,i).join(", ");if(!(s.length>t))return i===n.length?s:oi(s,t)}return""}function cn(e){return iv(e,new Map)}function iv(e,t){if(IL(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let i of Object.keys(e))typeof e[i]<"u"&&(r[i]=iv(e[i],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(i=>{r.push(iv(i,t))}),r}return e}function IL(e){if(!$r(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}var ci="?",_D=/\(error: (.*)\)/,ED=/captureMessage|captureException/;function cv(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let s=[],o=n.split(`
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Error:`,i)}}function lv(e){let t="console";Vn(t,e),Un(t,TL)}function TL(){"console"in Ee&&pl.forEach(function(e){e in Ee.console&&Lt(Ee.console,e,function(t){return Pa[e]=t,function(...n){ln("console",{args:n,level:e});let r=Pa[e];r&&r.apply(Ee.console,n)}})})}var uv=Ee;function CD(){if(!("fetch"in uv))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function hl(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function dv(){if(typeof EdgeRuntime=="string")return!0;if(!CD())return!1;if(hl(uv.fetch))return!0;let e=!1,t=uv.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=hl(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){si&&se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}var SD=1e3;function li(){return Date.now()/SD}function xL(){let{performance:e}=Ee;if(!e||!e.now)return li;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/SD}var sr=xL(),ml,RL=(()=>{let{performance:e}=Ee;if(!e||!e.now){ml="none";return}let t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,s=i<t,o=e.timing&&e.timing.navigationStart,a=typeof o=="number"?Math.abs(o+n-r):t,l=a<t;return s||l?i<=a?(ml="timeOrigin",e.timeOrigin):(ml="navigationStart",o):(ml="dateNow",r)})();function pv(e){let t="fetch";Vn(t,e),Un(t,NL)}function NL(){dv()&&Lt(Ee,"fetch",function(e){return function(...t){let{method:n,url:r}=AL(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:sr()*1e3};ln("fetch",w({},i));let s=new Error().stack;return e.apply(Ee,t).then(o=>{let a=ne(w({},i),{endTimestamp:sr()*1e3,response:o});return ln("fetch",a),o},o=>{let a=ne(w({},i),{endTimestamp:sr()*1e3,error:o});throw ln("fetch",a),ps(o)&&o.stack===void 0&&(o.stack=s,Bn(o,"framesToPop",1)),o})}})}function fv(e,t){return!!e&&typeof e=="object"&&!!e[t]}function DD(e){return typeof e=="string"?e:e?fv(e,"url")?e.url:e.toString?e.toString():"":""}function AL(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:DD(n),method:fv(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:DD(t),method:fv(t,"method")?String(t.method).toUpperCase():"GET"}}var cf=null;function hv(e){let t="error";Vn(t,e),Un(t,ML)}function ML(){cf=Ee.onerror,Ee.onerror=function(e,t,n,r,i){return ln("error",{column:r,error:i,line:n,msg:e,url:t}),cf&&!cf.__SENTRY_LOADER__?cf.apply(this,arguments):!1},Ee.onerror.__SENTRY_INSTRUMENTED__=!0}var lf=null;function mv(e){let t="unhandledrejection";Vn(t,e),Un(t,OL)}function OL(){lf=Ee.onunhandledrejection,Ee.onunhandledrejection=function(e){return ln("unhandledrejection",e),lf&&!lf.__SENTRY_LOADER__?lf.apply(this,arguments):!0},Ee.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function gv(){return"npm"}function ID(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let s=0;s<t.length;s++)if(t[s]===i)return!0;return t.push(i),!1}function r(i){if(e)t.delete(i);else for(let s=0;s<t.length;s++)if(t[s]===i){t.splice(s,1);break}}return[n,r]}function vn(){let e=Ee,t=e.crypto||e.msCrypto,n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function TD(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Wr(e){let{message:t,event_id:n}=e;if(t)return t;let r=TD(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function La(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function Yi(e,t){let n=TD(e);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=w(w(w({},r),i),t),t&&"data"in t){let s=w(w({},i&&i.data),t.data);n.mechanism.data=s}}function uf(e){if(e&&e.__sentry_captured__)return!0;try{Bn(e,"__sentry_captured__",!0)}catch{}return!1}function df(e){return Array.isArray(e)?e:[e]}function Gr(e,t=100,n=1/0){try{return yv("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function ff(e,t=3,n=100*1024){let r=Gr(e,t);return FL(r)>n?ff(e,t-1,n):r}function yv(e,t,n=1/0,r=1/0,i=ID()){let[s,o]=i;if(t==null||["number","boolean","string"].includes(typeof t)&&!Number.isNaN(t))return t;let a=PL(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(s(t))return"[Circular ~]";let c=t;if(c&&typeof c.toJSON=="function")try{let g=c.toJSON();return yv("",g,l-1,r,i)}catch{}let h=Array.isArray(t)?[]:{},d=0,f=rf(t);for(let g in f){if(!Object.prototype.hasOwnProperty.call(f,g))continue;if(d>=r){h[g]="[MaxProperties ~]";break}let m=f[g];h[g]=yv(g,m,l-1,r,i),d++}return o(t),h}function PL(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(dl(t))return"[VueViewModel]";if(Jy(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${Cr(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=kL(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function kL(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function LL(e){return~-encodeURI(e).split(/%..|./).length}function FL(e){return LL(JSON.stringify(e))}var Ki;(function(e){e[e.PENDING=0]="PENDING";let t=1;e[e.RESOLVED=t]="RESOLVED";let n=2;e[e.REJECTED=n]="REJECTED"})(Ki||(Ki={}));function Sr(e){return new zr(t=>{t(e)})}function wo(e){return new zr((t,n)=>{n(e)})}var zr=class Gs{constructor(t){Gs.prototype.__init.call(this),Gs.prototype.__init2.call(this),Gs.prototype.__init3.call(this),Gs.prototype.__init4.call(this),this._state=Ki.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new Gs((r,i)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(o){i(o)}},s=>{if(!n)i(s);else try{r(n(s))}catch(o){i(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Gs((n,r)=>{let i,s;return this.then(o=>{s=!1,i=o,t&&t()},o=>{s=!0,i=o,t&&t()}).then(()=>{if(s){r(i);return}n(i)})})}__init(){this._resolve=t=>{this._setResult(Ki.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Ki.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===Ki.PENDING){if(qi(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Ki.PENDING)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Ki.RESOLVED&&n[1](this._value),this._state===Ki.REJECTED&&n[2](this._value),n[0]=!0)})}}};function vv(e){let t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function i(o){if(!n())return wo(new An("Not adding Promise because buffer limit was reached."));let a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function s(o){return new zr((a,l)=>{let c=t.length;if(!c)return a(!0);let h=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{Sr(d).then(()=>{--c||(clearTimeout(h),a(!0))},l)})})}return{$:t,add:i,drain:s}}function gl(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}var xD=["fatal","error","warning","log","info","debug"];function _v(e){return e==="warn"?"warning":xD.includes(e)?e:"log"}var ND="sentry-",AD=/^sentry-/;function Ev(e){let t=MD(e);if(!t)return;let n=Object.entries(t).reduce((r,[i,s])=>{if(i.match(AD)){let o=i.slice(ND.length);r[o]=s}return r},{});if(Object.keys(n).length>0)return n}function MD(e){if(!(!e||!Fn(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=RD(n);return Object.entries(r).forEach(([i,s])=>{t[i]=s}),t},{}):RD(e)}function RD(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function ui(e,t=[]){return[e,t]}function bv(e,t){let[n,r]=e;return[n,[...r,t]]}function pf(e,t){let n=e[1];for(let r of n){let i=r[0].type;if(t(r,i))return!0}return!1}function wv(e){return Ee.__SENTRY__&&Ee.__SENTRY__.encodePolyfill?Ee.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Cv(e){let[t,n]=e,r=JSON.stringify(t);function i(s){typeof r=="string"?r=typeof s=="string"?r+s:[wv(r),s]:r.push(typeof s=="string"?wv(s):s)}for(let s of n){let[o,a]=s;if(i(`
|
|
27
|
-
|
|
28
|
-
`),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(Gr(a))}i(l)}}return typeof r=="string"?r:BL(r)}function BL(e){let t=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(t),r=0;for(let i of e)n.set(i,r),r+=i.length;return n}function Sv(e){let t=typeof e.data=="string"?wv(e.data):e.data;return[cn({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var VL={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function hf(e){return VL[e]}function mf(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Dv(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return w(w(w({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:ai(r)}),i&&{trace:cn(w({},i))})}function Iv(e,t,n){let r=[{type:"client_report"},{timestamp:n||li(),discarded_events:e}];return ui(t?{dsn:t}:{},[r])}function OD(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function PD(e,t){return e[t]||e.all||0}function Tv(e,t,n=Date.now()){return PD(e,t)>n}function xv(e,{statusCode:t,headers:n},r=Date.now()){let i=w({},e),s=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(s)for(let a of s.trim().split(",")){let[l,c,,,h]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!c)i.all=r+f;else for(let g of c.split(";"))g==="metric_bucket"?(!h||h.split(";").includes("custom"))&&(i[g]=r+f):i[g]=r+f}else o?i.all=r+OD(o,r):t===429&&(i.all=r+60*1e3);return i}function gf(){return{traceId:vn(),spanId:vn().substring(16)}}var yf=Ee;function Rv(){let e=yf.chrome,t=e&&e.app&&e.app.runtime,n="history"in yf&&!!yf.history.pushState&&!!yf.history.replaceState;return!t&&n}var ht=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ys(){return yl(Ee),Ee}function yl(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||br,t[br]=t[br]||{}}function vl(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||sr(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:vn()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}var Nv="_sentrySpan";function Av(e,t){t?Bn(e,Nv,t):delete e[Nv]}function Mv(e){return e[Nv]}var jL=100,Ov=class WS{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=gf()}clone(){let t=new WS;return t._breadcrumbs=[...this._breadcrumbs],t._tags=w({},this._tags),t._extra=w({},this._extra),t._contexts=w({},this._contexts),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata=w({},this._sdkProcessingMetadata),t._propagationContext=w({},this._propagationContext),t._client=this._client,t._lastEventId=this._lastEventId,Av(t,Mv(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&vl(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags=w(w({},this._tags),t),this._notifyScopeListeners(),this}setTag(t,n){return this._tags=ne(w({},this._tags),{[t]:n}),this._notifyScopeListeners(),this}setExtras(t){return this._extra=w(w({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,n){return this._extra=ne(w({},this._extra),{[t]:n}),this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t,[r,i]=n instanceof Mn?[n.getScopeData(),n.getRequestSession()]:$r(n)?[t,t.requestSession]:[],{tags:s,extra:o,user:a,contexts:l,level:c,fingerprint:h=[],propagationContext:d}=r||{};return this._tags=w(w({},this._tags),s),this._extra=w(w({},this._extra),o),this._contexts=w(w({},this._contexts),l),a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),h.length&&(this._fingerprint=h),d&&(this._propagationContext=d),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Av(this,void 0),this._attachments=[],this._propagationContext=gf(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:jL;if(r<=0)return this;let i=w({timestamp:li()},t),s=this._breadcrumbs;return s.push(i),this._breadcrumbs=s.length>r?s.slice(-r):s,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Mv(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=w(w({},this._sdkProcessingMetadata),t),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n&&n.event_id?n.event_id:vn();if(!this._client)return se.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(t,ne(w({originalException:t,syntheticException:i},n),{event_id:r}),this),r}captureMessage(t,n,r){let i=r&&r.event_id?r.event_id:vn();if(!this._client)return se.warn("No client configured on scope - will not capture message!"),i;let s=new Error(t);return this._client.captureMessage(t,n,ne(w({originalException:t,syntheticException:s},r),{event_id:i}),this),i}captureEvent(t,n){let r=n&&n.event_id?n.event_id:vn();return this._client?(this._client.captureEvent(t,ne(w({},n),{event_id:r}),this),r):(se.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}},Mn=Ov;function kD(){return Oa("defaultCurrentScope",()=>new Mn)}function LD(){return Oa("defaultIsolationScope",()=>new Mn)}var Pv=class{constructor(e,t){let n;e?n=e:n=new Mn;let r;t?r=t:r=new Mn,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(r){throw this._popScope(),r}return qi(n)?n.then(r=>(this._popScope(),r),r=>{throw this._popScope(),r}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Fa(){let e=ys(),t=yl(e);return t.stack=t.stack||new Pv(kD(),LD())}function $L(e){return Fa().withScope(e)}function WL(e,t){let n=Fa();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function FD(e){return Fa().withScope(()=>e(Fa().getIsolationScope()))}function BD(){return{withIsolationScope:FD,withScope:$L,withSetScope:WL,withSetIsolationScope:(e,t)=>FD(t),getCurrentScope:()=>Fa().getScope(),getIsolationScope:()=>Fa().getIsolationScope()}}function vf(e){let t=yl(e);return t.acs?t.acs:BD()}function vs(){let e=ys();return vf(e).getCurrentScope()}function _s(){let e=ys();return vf(e).getIsolationScope()}function _f(){return Oa("globalScope",()=>new Mn)}function Ef(...e){let t=ys(),n=vf(t);if(e.length===2){let[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function Vt(){return vs().getClient()}var GL="_sentryMetrics";function VD(e){let t=e[GL];if(!t)return;let n={};for(let[,[r,i]]of t)(n[r]||(n[r]=[])).push(cn(i));return n}var kv="sentry.source",Lv="sentry.sample_rate",Fv="sentry.op",Bv="sentry.origin",zL=1;function jD(e){let{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=Es(e);return cn({parent_span_id:r,span_id:t,trace_id:n})}function UD(e){return typeof e=="number"?HD(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?HD(e.getTime()):sr()}function HD(e){return e>9999999999?e/1e3:e}function Es(e){if(YL(e))return e.getSpanJSON();try{let{spanId:t,traceId:n}=e.spanContext();if(qL(e)){let{attributes:r,startTime:i,name:s,endTime:o,parentSpanId:a,status:l}=e;return cn({span_id:t,trace_id:n,data:r,description:s,parent_span_id:a,start_timestamp:UD(i),timestamp:UD(o)||void 0,status:KL(l),op:r[Fv],origin:r[Bv],_metrics_summary:VD(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function qL(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function YL(e){return typeof e.getSpanJSON=="function"}function $D(e){let{traceFlags:t}=e.spanContext();return t===zL}function KL(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"unknown_error"}var ZL="_sentryRootSpan";function _l(e){return e[ZL]||e}var wf="production",XL="_frozenDsc";function Vv(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=cn({environment:n.environment||wf,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function WD(e){let t=Vt();if(!t)return{};let n=Vv(Es(e).trace_id||"",t),r=_l(e),i=r[XL];if(i)return i;let s=r.spanContext().traceState,o=s&&s.get("sentry.dsc"),a=o&&Ev(o);if(a)return a;let l=Es(r),c=l.data||{},h=c[Lv];h!=null&&(n.sample_rate=`${h}`);let d=c[kv],f=l.description;return d!=="url"&&f&&(n.transaction=f),n.sampled=String($D(r)),t.emit("createDsc",n,r),n}function GD(e){if(typeof e=="boolean")return Number(e);let t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){ht&&se.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function JL(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function zD(e,t,n,r){let i=mf(n),s=w(w({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&t&&{dsn:ai(t)}),o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ui(s,[o])}function qD(e,t,n,r){let i=mf(n),s=e.type&&e.type!=="replay_event"?e.type:"event";JL(e,n&&n.sdk);let o=Dv(e,i,r,t);return delete e.sdkProcessingMetadata,ui(o,[[{type:s},e]])}function bf(e,t,n,r=0){return new zr((i,s)=>{let o=e[r];if(t===null||typeof o!="function")i(t);else{let a=o(w({},t),n);ht&&o.id&&a===null&&se.log(`Event processor "${o.id}" dropped event`),qi(a)?a.then(l=>bf(e,l,n,r+1).then(i)).then(null,s):bf(e,a,n,r+1).then(i).then(null,s)}})}function YD(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=t;QL(e,t),r&&nF(e,r),rF(e,n),eF(e,i),tF(e,s)}function Uv(e,t){let{extra:n,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:c,eventProcessors:h,attachments:d,propagationContext:f,transactionName:g,span:m}=t;El(e,"extra",n),El(e,"tags",r),El(e,"user",i),El(e,"contexts",s),El(e,"sdkProcessingMetadata",a),o&&(e.level=o),g&&(e.transactionName=g),m&&(e.span=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext=w(w({},e.propagationContext),f)}function El(e,t,n){if(n&&Object.keys(n).length){e[t]=w({},e[t]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function QL(e,t){let{extra:n,tags:r,user:i,contexts:s,level:o,transactionName:a}=t,l=cn(n);l&&Object.keys(l).length&&(e.extra=w(w({},l),e.extra));let c=cn(r);c&&Object.keys(c).length&&(e.tags=w(w({},c),e.tags));let h=cn(i);h&&Object.keys(h).length&&(e.user=w(w({},h),e.user));let d=cn(s);d&&Object.keys(d).length&&(e.contexts=w(w({},d),e.contexts)),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function eF(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function tF(e,t){e.sdkProcessingMetadata=w(w({},e.sdkProcessingMetadata),t)}function nF(e,t){e.contexts=w({trace:jD(t)},e.contexts),e.sdkProcessingMetadata=w({dynamicSamplingContext:WD(t)},e.sdkProcessingMetadata);let n=_l(t),r=Es(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function rF(e,t){e.fingerprint=e.fingerprint?df(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function ZD(e,t,n,r,i,s){let{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l=ne(w({},t),{event_id:t.event_id||n.event_id||vn(),timestamp:t.timestamp||li()}),c=n.integrations||e.integrations.map(_=>_.name);iF(l,e),aF(l,c),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&oF(l,e.stackParser);let h=lF(r,n.captureContext);n.mechanism&&Yi(l,n.mechanism);let d=i?i.getEventProcessors():[],f=_f().getScopeData();if(s){let _=s.getScopeData();Uv(f,_)}if(h){let _=h.getScopeData();Uv(f,_)}let g=[...n.attachments||[],...f.attachments];g.length&&(n.attachments=g),YD(l,f);let m=[...d,...f.eventProcessors];return bf(m,l,n).then(_=>(_&&sF(_),typeof o=="number"&&o>0?cF(_,o,a):_))}function iF(e,t){let{environment:n,release:r,dist:i,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:wf),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=oi(e.message,s));let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=oi(o.value,s));let a=e.request;a&&a.url&&(a.url=oi(a.url,s))}var KD=new WeakMap;function oF(e,t){let n=Ee._sentryDebugIds;if(!n)return;let r,i=KD.get(t);i?r=i:(r=new Map,KD.set(t,r));let s=Object.entries(n).reduce((o,[a,l])=>{let c,h=r.get(a);h?c=h:(c=t(a),r.set(a,c));for(let d=c.length-1;d>=0;d--){let f=c[d];if(f.filename){o[f.filename]=l;break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=s[a.filename])})})}catch{}}function sF(e){let t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function aF(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function cF(e,t,n){if(!e)return null;let r=w(w(w(w(w({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>w(w({},i),i.data&&{data:Gr(i.data,t,n)}))}),e.user&&{user:Gr(e.user,t,n)}),e.contexts&&{contexts:Gr(e.contexts,t,n)}),e.extra&&{extra:Gr(e.extra,t,n)});return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Gr(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>w(w({},i),i.data&&{data:Gr(i.data,t,n)}))),r}function lF(e,t){if(!t)return e;let n=e?e.clone():new Mn;return n.update(t),n}function XD(e){if(e)return uF(e)?{captureContext:e}:fF(e)?{captureContext:e}:e}function uF(e){return e instanceof Mn||typeof e=="function"}var dF=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function fF(e){return Object.keys(e).some(t=>dF.includes(t))}function Cf(e,t){return vs().captureException(e,XD(t))}function wl(e,t){return vs().captureEvent(e,t)}var pF="7";function hF(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function mF(e){return`${hF(e)}${e.projectId}/envelope/`}function gF(e,t){return ov(w({sentry_key:e.publicKey,sentry_version:pF},t&&{sentry_client:`${t.name}/${t.version}`}))}function QD(e,t,n){return t||`${mF(e)}?${gF(e,n)}`}var eI=[];function tI(e,t){let n={};return t.forEach(r=>{r&&jv(e,r,n)}),n}function Hv(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function jv(e,t,n){if(n[t.name]){ht&&se.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,eI.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),eI.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,s)=>r(i,s,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),i=Object.assign((s,o)=>r(s,o,e),{id:t.name});e.addEventProcessor(i)}ht&&se.log(`Integration installed: ${t.name}`)}var nI="Not capturing exception because it's already been captured.",bl=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=tf(e.dsn):ht&&se.warn("No DSN provided, client will not send events."),this._dsn){let t=QD(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport(ne(w({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},e.transportOptions),{url:t}))}}captureException(e,t,n){let r=vn();if(uf(e))return ht&&se.log(nI),r;let i=w({event_id:r},t);return this._process(this.eventFromException(e,i).then(s=>this._captureEvent(s,i,n))),i.event_id}captureMessage(e,t,n,r){let i=w({event_id:vn()},n),s=Aa(e)?e:String(e),o=hs(e)?this.eventFromMessage(s,t,i):this.eventFromException(e,i);return this._process(o.then(a=>this._captureEvent(a,i,r))),i.event_id}captureEvent(e,t,n){let r=vn();if(t&&t.originalException&&uf(t.originalException))return ht&&se.log(nI),r;let i=w({event_id:r},t),s=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,s||n)),i.event_id}captureSession(e){typeof e.release!="string"?ht&&se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),vl(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(r=>n&&r))):Sr(!0)}close(e){return this.flush(e).then(t=>(this.getOptions().enabled=!1,this.emit("close"),t))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];jv(this,e,this._integrations),t||Hv(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=qD(e,this._dsn,this._options._metadata,this._options.tunnel);for(let i of t.attachments||[])n=bv(n,Sv(i));let r=this.sendEnvelope(n);r&&r.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){let t=zD(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=`${e}:${t}`;ht&&se.log(`Adding outcome: "${r}"`),this._outcomes[r]=(this._outcomes[r]||0)+1}}on(e,t){let n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{let r=n.indexOf(t);r>-1&&n.splice(r,1)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(r=>r(...t))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,t=>(ht&&se.error("Error while sending event:",t),t)):(ht&&se.error("Transport disabled"),Sr({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=tI(this,e),Hv(this,e)}_updateSessionFromEvent(e,t){let n=!1,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;for(let o of i){let a=o.mechanism;if(a&&a.handled===!1){n=!0;break}}}let s=e.status==="ok";(s&&e.errors===0||s&&n)&&(vl(e,ne(w({},n&&{status:"crashed"}),{errors:e.errors||Number(r||n)})),this.captureSession(e))}_isClientDoneProcessing(e){return new zr(t=>{let n=0,r=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),t(!0)):(n+=r,e&&n>=e&&(clearInterval(i),t(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r=_s()){let i=this.getOptions(),s=Object.keys(this._integrations);return!t.integrations&&s.length>0&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),ZD(i,e,t,n,this,r).then(o=>{if(o===null)return o;let a=w(w({},r.getPropagationContext()),n?n.getPropagationContext():void 0);if(!(o.contexts&&o.contexts.trace)&&a){let{traceId:l,spanId:c,parentSpanId:h,dsc:d}=a;o.contexts=w({trace:cn({trace_id:l,span_id:c,parent_span_id:h})},o.contexts);let f=d||Vv(l,this);o.sdkProcessingMetadata=w({dynamicSamplingContext:f},o.sdkProcessingMetadata)}return o})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(r=>r.event_id,r=>{if(ht){let i=r;i.logLevel==="log"?se.log(i.message):se.warn(i)}})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,s=$v(e),o=rI(e),a=e.type||"error",l=`before send for type \`${a}\``,c=typeof i>"u"?void 0:GD(i);if(o&&typeof c=="number"&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",e),wo(new An(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let h=a==="replay_event"?"replay":a,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",h,e),new An("An event processor returned `null`, will not send event.","log");if(t.data&&t.data.__sentry__===!0)return f;let g=vF(this,r,f,t);return yF(g,l)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",h,e),$v(e)){let _=1+(e.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+_}throw new An(`${l} returned \`null\`, will not send event.`,"log")}let g=n&&n.getSession();!s&&g&&this._updateSessionFromEvent(g,f);let m=f.transaction_info;if(s&&m&&f.transaction!==e.transaction){let _="custom";f.transaction_info=ne(w({},m),{source:_})}return this.sendEvent(f,t),f}).then(null,f=>{throw f instanceof An?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),new An(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
29
|
-
Reason: ${f}`))})}_process(e){this._numProcessing++,e.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([t,n])=>{let[r,i]=t.split(":");return{reason:r,category:i,quantity:n}})}};function yF(e,t){let n=`${t} must return \`null\` or a valid event.`;if(qi(e))return e.then(r=>{if(!$r(r)&&r!==null)throw new An(n);return r},r=>{throw new An(`${t} rejected with ${r}`)});if(!$r(e)&&e!==null)throw new An(n);return e}function vF(e,t,n,r){let{beforeSend:i,beforeSendTransaction:s,beforeSendSpan:o}=t;if(rI(n)&&i)return i(n,r);if($v(n)){if(n.spans&&o){let a=[];for(let l of n.spans){let c=o(l);c?a.push(c):e.recordDroppedEvent("before_send","span")}n.spans=a}if(s)return s(n,r)}return n}function rI(e){return e.type===void 0}function $v(e){return e.type==="transaction"}var _F=64;function Sf(e,t,n=vv(e.bufferSize||_F)){let r={},i=o=>n.drain(o);function s(o){let a=[];if(pf(o,(d,f)=>{let g=hf(f);if(Tv(r,g)){let m=iI(d,f);e.recordDroppedEvent("ratelimit_backoff",g,m)}else a.push(d)}),a.length===0)return Sr({});let l=ui(o[0],a),c=d=>{pf(l,(f,g)=>{let m=iI(f,g);e.recordDroppedEvent(d,hf(g),m)})},h=()=>t({body:Cv(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&ht&&se.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=xv(r,d),d),d=>{throw c("network_error"),d});return n.add(h).then(d=>d,d=>{if(d instanceof An)return ht&&se.error("Skipped sending event because buffer is full."),c("queue_overflow"),Sr({});throw d})}return{send:s,flush:i}}function iI(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function Wv(e,t,n=[t],r="npm"){let i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(s=>({name:`${r}:@sentry/${s}`,version:br})),version:br}),e._metadata=i}var EF=100;function di(e,t){let n=Vt(),r=_s();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:s=EF}=n.getOptions();if(s<=0)return;let o=li(),a=w({timestamp:o},e),l=i?ka(()=>i(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,s))}var oI,wF="FunctionToString",sI=new WeakMap,bF=()=>({name:wF,setupOnce(){oI=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=gs(this),n=sI.has(Vt())&&t!==void 0?t:this;return oI.apply(n,e)}}catch{}},setup(e){sI.set(e,!0)}}),Df=bF,CF=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],SF="InboundFilters",DF=(e={})=>({name:SF,processEvent(t,n,r){let i=r.getOptions(),s=IF(e,i);return TF(t,s)?null:t}}),Tf=DF;function IF(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:CF],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function TF(e,t){return t.ignoreInternal&&OF(e)?(ht&&se.warn(`Event dropped due to being internal Sentry Error.
|
|
30
|
-
Event: ${Wr(e)}`),!0):xF(e,t.ignoreErrors)?(ht&&se.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
31
|
-
Event: ${Wr(e)}`),!0):kF(e)?(ht&&se.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Event: ${Wr(e)}.
|
|
35
|
-
Url: ${If(e)}`),!0):AF(e,t.allowUrls)?!1:(ht&&se.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
36
|
-
Event: ${Wr(e)}.
|
|
37
|
-
Url: ${If(e)}`),!0)}function xF(e,t){return e.type||!t||!t.length?!1:MF(e).some(n=>Ma(n,t))}function RF(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;let n=e.transaction;return n?Ma(n,t):!1}function NF(e,t){if(!t||!t.length)return!1;let n=If(e);return n?Ma(n,t):!1}function AF(e,t){if(!t||!t.length)return!0;let n=If(e);return n?Ma(n,t):!0}function MF(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function OF(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function PF(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function If(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?PF(t):null}catch{return ht&&se.error(`Cannot extract url for event ${Wr(e)}`),null}}function kF(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}var LF="Dedupe",FF=()=>{let e;return{name:LF,processEvent(t){if(t.type)return t;try{if(BF(t,e))return ht&&se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},xf=FF;function BF(e,t){return t?!!(VF(e,t)||UF(e,t)):!1}function VF(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!lI(e,t)||!cI(e,t))}function UF(e,t){let n=aI(t),r=aI(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!lI(e,t)||!cI(e,t))}function cI(e,t){let n=sf(e),r=sf(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let s=r[i],o=n[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function lI(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function aI(e){return e.exception&&e.exception.values&&e.exception.values[0]}var Gt=Ee,Gv=0;function zv(){return Gv>0}function QF(){Gv++,setTimeout(()=>{Gv--})}function ws(e,t={},n){if(typeof e!="function")return e;try{let i=e.__sentry_wrapped__;if(i)return i;if(gs(e))return e}catch{return e}let r=function(){let i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let s=i.map(o=>ws(o,t));return e.apply(this,s)}catch(s){throw QF(),Ef(o=>{o.addEventProcessor(a=>(t.mechanism&&(La(a,void 0,void 0),Yi(a,t.mechanism)),a.extra=ne(w({},a.extra),{arguments:i}),a)),Cf(s)}),s}};try{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}nf(r,e),Bn(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var Zi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Rf(e,t){let n=Kv(e,t),r={type:t&&t.name,value:iB(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function eB(e,t,n,r){let i=Vt(),s=i&&i.getOptions().normalizeDepth,o=aB(t),a={__serialized__:ff(t,s)};if(o)return{exception:{values:[Rf(e,o)]},extra:a};let l={exception:{values:[{type:ms(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:oB(t,{isUnhandledRejection:r})}]},extra:a};if(n){let c=Kv(e,n);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function qv(e,t){return{exception:{values:[Rf(e,t)]}}}function Kv(e,t){let n=t.stacktrace||t.stack||"",r=nB(t),i=rB(t);try{return e(n,r,i)}catch{}return[]}var tB=/Minified React error #\d+;/i;function nB(e){return e&&tB.test(e.message)?1:0}function rB(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function iB(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function pI(e,t,n,r){let i=n&&n.syntheticException||void 0,s=Nf(e,t,i,r);return Yi(s),s.level="error",n&&n.event_id&&(s.event_id=n.event_id),Sr(s)}function hI(e,t,n="info",r,i){let s=r&&r.syntheticException||void 0,o=Yv(e,t,s,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Sr(o)}function Nf(e,t,n,r,i){let s;if(Jd(t)&&t.error)return qv(e,t.error);if(Qd(t)||Ky(t)){let o=t;if("stack"in t)s=qv(e,t);else{let a=o.name||(Qd(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;s=Yv(e,l,n,r),La(s,l)}return"code"in o&&(s.tags=ne(w({},s.tags),{"DOMException.code":`${o.code}`})),s}return ps(t)?qv(e,t):$r(t)||ms(t)?(s=eB(e,t,n,i),Yi(s,{synthetic:!0}),s):(s=Yv(e,t,n,r),La(s,`${t}`,void 0),Yi(s,{synthetic:!0}),s)}function Yv(e,t,n,r){let i={};if(r&&n){let s=Kv(e,n);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]})}if(Aa(t)){let{__sentry_template_string__:s,__sentry_template_values__:o}=t;return i.logentry={message:s,params:o},i}return i.message=t,i}function oB(e,{isUnhandledRejection:t}){let n=sv(e),r=t?"promise rejection":"exception";return Jd(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:ms(e)?`Event \`${sB(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function sB(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function aB(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function mI(e,{metadata:t,tunnel:n,dsn:r}){let i=w(w({event_id:e.event_id,sent_at:new Date().toISOString()},t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}}),!!n&&!!r&&{dsn:ai(r)}),s=cB(e);return ui(i,[s])}function cB(e){return[{type:"user_report"},e]}var Cl=class extends bl{constructor(e){let t=w({parentSpanIsAlwaysRootSpan:!0},e),n=Gt.SENTRY_SDK_SOURCE||gv();Wv(t,"browser",["browser"],n),super(t),t.sendClientReports&&Gt.document&&Gt.document.addEventListener("visibilitychange",()=>{Gt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return pI(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return hI(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){Zi&&se.warn("SDK not enabled, will not capture user feedback.");return}let t=mI(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){Zi&&se.log("No outcomes to send");return}if(!this._dsn){Zi&&se.log("No dsn provided, will not send outcomes");return}Zi&&se.log("Sending outcomes:",e);let t=Iv(e,this._options.tunnel&&ai(this._dsn));this.sendEnvelope(t)}},gI=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,nn=Ee,lB=1e3,yI,Zv,Xv;function Jv(e){let t="dom";Vn(t,e),Un(t,uB)}function uB(){if(!nn.document)return;let e=ln.bind(null,"dom"),t=vI(e,!0);nn.document.addEventListener("click",t,!1),nn.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=nn[n]&&nn[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Lt(r,"addEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},h=c[s]=c[s]||{refCount:0};if(!h.handler){let d=vI(e);h.handler=d,i.call(this,s,d,a)}h.refCount++}catch{}return i.call(this,s,o,a)}}),Lt(r,"removeEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{let l=this,c=l.__sentry_instrumentation_handlers__||{},h=c[s];h&&(h.refCount--,h.refCount<=0&&(i.call(this,s,h.handler,a),h.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,o,a)}}))})}function dB(e){if(e.type!==Zv)return!1;try{if(!e.target||e.target._sentryId!==Xv)return!1}catch{}return!0}function fB(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function vI(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=pB(n);if(fB(n.type,r))return;Bn(n,"_sentryCaptured",!0),r&&!r._sentryId&&Bn(r,"_sentryId",vn());let i=n.type==="keypress"?"input":n.type;dB(n)||(e({event:n,name:i,global:t}),Zv=n.type,Xv=r?r._sentryId:void 0),clearTimeout(yI),yI=nn.setTimeout(()=>{Xv=void 0,Zv=void 0},lB)}}function pB(e){try{return e.target}catch{return null}}var Af;function Qv(e){let t="history";Vn(t,e),Un(t,hB)}function hB(){if(!Rv())return;let e=nn.onpopstate;nn.onpopstate=function(...n){let r=nn.location.href,i=Af;if(Af=r,ln("history",{from:i,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){let i=r.length>2?r[2]:void 0;if(i){let s=Af,o=String(i);Af=o,ln("history",{from:s,to:o})}return n.apply(this,r)}}Lt(nn.history,"pushState",t),Lt(nn.history,"replaceState",t)}var Mf={};function e_(e){let t=Mf[e];if(t)return t;let n=nn[e];if(hl(n))return Mf[e]=n.bind(nn);let r=nn.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let s=i.contentWindow;s&&s[e]&&(n=s[e]),r.head.removeChild(i)}catch(i){gI&&se.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(Mf[e]=n.bind(nn))}function Of(e){Mf[e]=void 0}var bs="__sentry_xhr_v3__";function t_(e){let t="xhr";Vn(t,e),Un(t,mB)}function mB(){if(!nn.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;Lt(e,"open",function(t){return function(...n){let r=sr()*1e3,i=Fn(n[0])?n[0].toUpperCase():void 0,s=gB(n[1]);if(!i||!s)return t.apply(this,n);this[bs]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let o=()=>{let a=this[bs];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let l={endTimestamp:sr()*1e3,startTimestamp:r,xhr:this};ln("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Lt(this,"onreadystatechange",function(a){return function(...l){return o(),a.apply(this,l)}}):this.addEventListener("readystatechange",o),Lt(this,"setRequestHeader",function(a){return function(...l){let[c,h]=l,d=this[bs];return d&&Fn(c)&&Fn(h)&&(d.request_headers[c.toLowerCase()]=h),a.apply(this,l)}}),t.apply(this,n)}}),Lt(e,"send",function(t){return function(...n){let r=this[bs];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let i={startTimestamp:sr()*1e3,xhr:this};return ln("xhr",i),t.apply(this,n)}})}function gB(e){if(Fn(e))return e;try{return e.toString()}catch{}}function n_(e,t=e_("fetch")){let n=0,r=0;function i(s){let o=s.body.length;n+=o,r++;let a=w({body:s.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);if(!t)return Of("fetch"),wo("No fetch implementation available");try{return t(e.url,a).then(l=>(n-=o,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return Of("fetch"),n-=o,r--,wo(l)}}return Sf(e,i)}var yB=30,vB=50;function r_(e,t,n,r){let i={filename:e,function:t==="<anonymous>"?ci:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var _B=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,EB=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,wB=/\((\S*)(?::(\d+))(?::(\d+))\)/,bB=e=>{let t=_B.exec(e);if(t){let[,r,i,s]=t;return r_(r,ci,+i,+s)}let n=EB.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=wB.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[r,i]=bI(n[1]||ci,n[2]);return r_(i,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},_I=[yB,bB],CB=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,SB=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,DB=e=>{let t=CB.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=SB.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],r=t[1]||ci;return[r,n]=bI(r,n),r_(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},EI=[vB,DB],wI=[_I,EI],i_=cv(...wI),bI=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:ci,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Pf=1024,TB="Breadcrumbs",xB=(e={})=>{let t=w({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:TB,setup(n){t.console&&lv(AB(n)),t.dom&&Jv(NB(n,t.dom)),t.xhr&&t_(MB(n)),t.fetch&&pv(OB(n)),t.history&&Qv(PB(n)),t.sentry&&n.on("beforeSendEvent",RB(n))}}},CI=xB;function RB(e){return function(t){Vt()===e&&di({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:Wr(t)},{event:t})}}function NB(e,t){return function(n){if(Vt()!==e)return;let r,i,s=typeof t=="object"?t.serializeAttribute:void 0,o=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;o&&o>Pf&&(Zi&&se.warn(`\`dom.maxStringLength\` cannot exceed ${Pf}, but a value of ${o} was configured. Sentry will use ${Pf} instead.`),o=Pf),typeof s=="string"&&(s=[s]);try{let l=n.event,c=kB(l)?l.target:l;r=fl(c,{keyAttrs:s,maxStringLength:o}),i=rv(c)}catch{r="<unknown>"}if(r.length===0)return;let a={category:`ui.${n.name}`,message:r};i&&(a.data={"ui.component_name":i}),di(a,{event:n.event,name:n.name,global:n.global})}}function AB(e){return function(t){if(Vt()!==e)return;let n={category:"console",data:{arguments:t.args,logger:"console"},level:_v(t.level),message:ef(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)n.message=`Assertion failed: ${ef(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1);else return;di(n,{input:t.args,level:t.level})}}function MB(e){return function(t){if(Vt()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[bs];if(!n||!r||!i)return;let{method:s,url:o,status_code:a,body:l}=i,c={method:s,url:o,status_code:a},h={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r};di({category:"xhr",data:c,type:"http"},h)}}function OB(e){return function(t){if(Vt()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let i=t.fetchData,s={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r};di({category:"fetch",data:i,level:"error",type:"http"},s)}else{let i=t.response,s=ne(w({},t.fetchData),{status_code:i&&i.status}),o={input:t.args,response:i,startTimestamp:n,endTimestamp:r};di({category:"fetch",data:s,type:"http"},o)}}}function PB(e){return function(t){if(Vt()!==e)return;let n=t.from,r=t.to,i=gl(Gt.location.href),s=n?gl(n):void 0,o=gl(r);(!s||!s.path)&&(s=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),di({category:"navigation",data:{from:n,to:r}})}}function kB(e){return!!e&&!!e.target}var LB=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],FB="BrowserApiErrors",BB=(e={})=>{let t=w({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e);return{name:FB,setupOnce(){t.setTimeout&&Lt(Gt,"setTimeout",SI),t.setInterval&&Lt(Gt,"setInterval",SI),t.requestAnimationFrame&&Lt(Gt,"requestAnimationFrame",VB),t.XMLHttpRequest&&"XMLHttpRequest"in Gt&&Lt(XMLHttpRequest.prototype,"send",UB);let n=t.eventTarget;n&&(Array.isArray(n)?n:LB).forEach(HB)}}},DI=BB;function SI(e){return function(...t){let n=t[0];return t[0]=ws(n,{mechanism:{data:{function:Cr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function VB(e){return function(t){return e.apply(this,[ws(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Cr(e)},handled:!1,type:"instrument"}})])}}function UB(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&Lt(n,r,function(i){let s={mechanism:{data:{function:r,handler:Cr(i)},handled:!1,type:"instrument"}},o=gs(i);return o&&(s.mechanism.data.handler=Cr(o)),ws(i,s)})}),e.apply(this,t)}}function HB(e){let t=Gt,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Lt(n,"addEventListener",function(r){return function(i,s,o){try{typeof s.handleEvent=="function"&&(s.handleEvent=ws(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Cr(s),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,ws(s,{mechanism:{data:{function:"addEventListener",handler:Cr(s),target:e},handled:!1,type:"instrument"}}),o])}}),Lt(n,"removeEventListener",function(r){return function(i,s,o){let a=s;try{let l=a&&a.__sentry_wrapped__;l&&r.call(this,i,l,o)}catch{}return r.call(this,i,a,o)}}))}var jB="GlobalHandlers",$B=(e={})=>{let t=w({onerror:!0,onunhandledrejection:!0},e);return{name:jB,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(WB(n),II("onerror")),t.onunhandledrejection&&(GB(n),II("onunhandledrejection"))}}},TI=$B;function WB(e){hv(t=>{let{stackParser:n,attachStacktrace:r}=xI();if(Vt()!==e||zv())return;let{msg:i,url:s,line:o,column:a,error:l}=t,c=YB(Nf(n,l||i,void 0,r,!1),s,o,a);c.level="error",wl(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function GB(e){mv(t=>{let{stackParser:n,attachStacktrace:r}=xI();if(Vt()!==e||zv())return;let i=zB(t),s=hs(i)?qB(i):Nf(n,i,void 0,r,!0);s.level="error",wl(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function zB(e){if(hs(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function qB(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function YB(e,t,n,r){let i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(r,10))?void 0:r,h=isNaN(parseInt(n,10))?void 0:n,d=Fn(t)&&t.length>0?t:nv();return l.length===0&&l.push({colno:c,filename:d,function:ci,in_app:!0,lineno:h}),e}function II(e){Zi&&se.log(`Global Handler attached: ${e}`)}function xI(){let e=Vt();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var RI=()=>({name:"HttpContext",preprocessEvent(e){if(!Gt.navigator&&!Gt.location&&!Gt.document)return;let t=e.request&&e.request.url||Gt.location&&Gt.location.href,{referrer:n}=Gt.document||{},{userAgent:r}=Gt.navigator||{},i=w(w(w({},e.request&&e.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),s=ne(w(w({},e.request),t&&{url:t}),{headers:i});e.request=s}}),KB="cause",ZB=5,XB="LinkedErrors",JB=(e={})=>{let t=e.limit||ZB,n=e.key||KB;return{name:XB,preprocessEvent(r,i,s){let o=s.getOptions();ev(Rf,o.stackParser,o.maxValueLength,n,t,r,i)}}},NI=JB;function o_(e){return[Tf(),Df(),DI(),CI(),TI(),NI(),xf(),RI()]}var s_=class extends Error{cause;constructor(e,t){super(e),this.cause=t}},St=class zS{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new zS),this.INSTANCE}captureException(t,n,r){b.error(t),this.getNewScope(n,r).captureException(t)}captureMessage(t,n,r,i){this.getNewScope(r,i).captureMessage(t,n??"error")}captureError(t,n,r,i){b.error(t,n);let s=this.getNewScope(r,i),o=new s_(t,n);s.captureException(o)}setGlobalContext(t,n){this.contexts[t]=w({context:n},this.contexts[t])}setUser(t){this.user=t}setTags(t){this.tags=t}getNewScope(t,n){let r=new Mn;if(r.setClient(this.client),r.setUser(this.user),t?.triggerContext){let i=t.triggerContext;r.setExtras(i.triggerData.sentryContext()),delete t.triggerContext}return t&&r.setExtras(t),this.tags&&r.setTags(this.tags),n&&r.setTags(n),Object.keys(this.contexts).forEach(i=>{r.setContext(i,this.contexts[i])}),r.setTag("language",navigator.language),r.setTag("timezone",oe.getTimezone()),r}init(){let t=o_({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new Cl({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:n_,stackParser:i_,integrations:t,environment:mn.mode,release:`web-sdk@${k.SDK_VERSION}`,debug:mn.debug}),this.client.init()}},oe=class{static tz;static isValidURL(e){try{return new URL(e)}catch{return}}static isNull(e){return!e||e==="null"||e==="undefined"}static removeFromArray(e,t){let n=e.indexOf(t);return n===-1?!1:(e.splice(n,1),!0)}static formatCurrency(e,t){if(e==0&&t)return"Free";let n=Oe.get(),r=Ct.get(),i=n.shopCurrencyCode||r.currency,s=n.currencyCode;s||b.warn("Currency code is not set in RuntimeData");let o=r.money?.format??n.moneyFormat,a;if(o&&i===s)a=Zd.format(e*100,o);else{let l;try{l=new Intl.NumberFormat(this.getLang(),{style:"currency",currency:s||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(c){return St.getInstance().captureException(c,{currentCurrency:s,shopCurrency:i}),""}a=l.format(e),a=a.replace("\u20B9","Rs. "),r.money?.showCurrency&&s!=="INR"&&(a=a.concat(` ${s}`))}return a}static formatNumber(e){return new Intl.NumberFormat(this.getLang(),{notation:"compact"}).format(e)}static getLang(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}static getTimezone(){if(this.tz)return this.tz;try{return this.tz=Intl.DateTimeFormat().resolvedOptions().timeZone,this.tz}catch{return""}}static documentReady(e){document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)}static onDocumentLoaded(e){document.readyState==="complete"?e():document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&e()})}static showSnackbar(e){let t=document.createElement("span");t.id="snackbar",t.innerText=e,document.body.appendChild(t),t.className="show",setTimeout(()=>{t.classList.remove("show"),document.body.removeChild(t)},3e3)}static async retrySelectorForElements(e,t=10,n=document){let r=0,i=document.querySelectorAll("nonexistent-tag");for(;r<t;){let s=Math.min(100*2**r,5e3);if(await AI.JSUtils.sleep(s),i=n.querySelectorAll(e),i.length)return b.debug(`Attempt ${r+1}: ${i.length} elements found with ${e}`),i;b.debug(`Attempt ${r+1}: Elements not found with ${e}. Retrying after ${s}ms.`),r++}return b.warn(`Max attempts reached. Element not found with ${e}.`),i}static async retrySelector(e,t=10,n=document){return(await this.retrySelectorForElements(e,t,n)).item(0)}static async retrySelectors(e,t=10,n=document){let r=await this.retrySelectorForElements(e,t,n);return Array.from(r)}static async getCartAttributes(){let e=await rt.get(ge.DEVICE_ID),t=await yn.get(ge.ID,"");return[{key:"letscooee_did",value:e},{key:"letscooee_sid",value:t},{key:"__letscooee_time",value:new Date().toLocaleString()},{key:"__letscooee_via",value:"Buy Now"}]}static onNodesRemoved(e,t,n=document.body){let r=new MutationObserver(i=>{i.forEach(s=>{s.removedNodes.forEach(o=>{(o===e||o.contains(e))&&(t(),r.disconnect())})})});r.observe(n,{childList:!0})}};function Ba(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!1,value:n})}var fi=class zh{transform(t){return t==null?null:oe.formatCurrency(t)}static \u0275fac=function(t){return new(t||zh)};static \u0275pipe=ss({name:"cooeeCurrency",type:zh,pure:!0})},PI=Re(Ff()),QB=Object.prototype.toString,Ua=Array.isArray||function(e){return QB.call(e)==="[object Array]"};function c_(e){return typeof e=="function"}function e2(e){return Ua(e)?"array":typeof e}function a_(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function MI(e,t){return e!=null&&typeof e=="object"&&t in e}function t2(e,t){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(t)}var n2=RegExp.prototype.test;function r2(e,t){return n2.call(e,t)}var i2=/\S/;function o2(e){return!r2(i2,e)}var s2={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function a2(e){return String(e).replace(/[&<>"'`=\/]/g,function(t){return s2[t]})}var c2=/\s*/,l2=/\s+/,OI=/\s*=/,u2=/\s*\}/,d2=/#|\^|\/|>|\{|&|=|!/;function f2(e,t){if(!e)return[];var n=!1,r=[],i=[],s=[],o=!1,a=!1,l="",c=0;function h(){if(o&&!a)for(;s.length;)delete i[s.pop()];else s=[];o=!1,a=!1}var d,f,g;function m(j){if(typeof j=="string"&&(j=j.split(l2,2)),!Ua(j)||j.length!==2)throw new Error("Invalid tags: "+j);d=new RegExp(a_(j[0])+"\\s*"),f=new RegExp("\\s*"+a_(j[1])),g=new RegExp("\\s*"+a_("}"+j[1]))}m(t||Dr.tags);for(var _=new Dl(e),x,A,F,U,M,Y;!_.eos();){if(x=_.pos,F=_.scanUntil(d),F)for(var Ae=0,ct=F.length;Ae<ct;++Ae)U=F.charAt(Ae),o2(U)?(s.push(i.length),l+=U):(a=!0,n=!0,l+=" "),i.push(["text",U,x,x+1]),x+=1,U===`
|
|
38
|
-
`&&(h(),l="",c=0,n=!1);if(!_.scan(d))break;if(o=!0,A=_.scan(d2)||"name",_.scan(c2),A==="="?(F=_.scanUntil(OI),_.scan(OI),_.scanUntil(f)):A==="{"?(F=_.scanUntil(g),_.scan(u2),_.scanUntil(f),A="&"):F=_.scanUntil(f),!_.scan(f))throw new Error("Unclosed tag at "+_.pos);if(A==">"?M=[A,F,x,_.pos,l,c,n]:M=[A,F,x,_.pos],c++,i.push(M),A==="#"||A==="^")r.push(M);else if(A==="/"){if(Y=r.pop(),!Y)throw new Error('Unopened section "'+F+'" at '+x);if(Y[1]!==F)throw new Error('Unclosed section "'+Y[1]+'" at '+x)}else A==="name"||A==="{"||A==="&"?a=!0:A==="="&&m(F)}if(h(),Y=r.pop(),Y)throw new Error('Unclosed section "'+Y[1]+'" at '+_.pos);return h2(p2(i))}function p2(e){for(var t=[],n,r,i=0,s=e.length;i<s;++i)n=e[i],n&&(n[0]==="text"&&r&&r[0]==="text"?(r[1]+=n[1],r[3]=n[3]):(t.push(n),r=n));return t}function h2(e){for(var t=[],n=t,r=[],i,s,o=0,a=e.length;o<a;++o)switch(i=e[o],i[0]){case"#":case"^":n.push(i),r.push(i),n=i[4]=[];break;case"/":s=r.pop(),s[5]=i[2],n=r.length>0?r[r.length-1][4]:t;break;default:n.push(i)}return t}function Dl(e){this.string=e,this.tail=e,this.pos=0}Dl.prototype.eos=function(){return this.tail===""};Dl.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};Dl.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function Va(e,t){this.view=e,this.cache={".":this.view},this.parent=t}Va.prototype.push=function(e){return new Va(e,this)};Va.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var r=this,i,s,o,a=!1;r;){if(e.indexOf(".")>0)for(i=r.view,s=e.split("."),o=0;i!=null&&o<s.length;)o===s.length-1&&(a=MI(i,s[o])||t2(i,s[o])),i=i[s[o++]];else i=r.view[e],a=MI(r.view,e);if(a){n=i;break}r=r.parent}t[e]=n}return c_(n)&&(n=n.call(this.view)),n};function Hn(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Hn.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Hn.prototype.parse=function(e,t){var n=this.templateCache,r=e+":"+(t||Dr.tags).join(":"),i=typeof n<"u",s=i?n.get(r):void 0;return s==null&&(s=f2(e,t),i&&n.set(r,s)),s};Hn.prototype.render=function(e,t,n,r){var i=this.getConfigTags(r),s=this.parse(e,i),o=t instanceof Va?t:new Va(t,void 0);return this.renderTokens(s,o,n,e,r)};Hn.prototype.renderTokens=function(e,t,n,r,i){for(var s="",o,a,l,c=0,h=e.length;c<h;++c)l=void 0,o=e[c],a=o[0],a==="#"?l=this.renderSection(o,t,n,r,i):a==="^"?l=this.renderInverted(o,t,n,r,i):a===">"?l=this.renderPartial(o,t,n,i):a==="&"?l=this.unescapedValue(o,t):a==="name"?l=this.escapedValue(o,t,i):a==="text"&&(l=this.rawValue(o)),l!==void 0&&(s+=l);return s};Hn.prototype.renderSection=function(e,t,n,r,i){var s=this,o="",a=t.lookup(e[1]);function l(d){return s.render(d,t,n,i)}if(a){if(Ua(a))for(var c=0,h=a.length;c<h;++c)o+=this.renderTokens(e[4],t.push(a[c]),n,r,i);else if(typeof a=="object"||typeof a=="string"||typeof a=="number")o+=this.renderTokens(e[4],t.push(a),n,r,i);else if(c_(a)){if(typeof r!="string")throw new Error("Cannot use higher-order sections without the original template");a=a.call(t.view,r.slice(e[3],e[5]),l),a!=null&&(o+=a)}else o+=this.renderTokens(e[4],t,n,r,i);return o}};Hn.prototype.renderInverted=function(e,t,n,r,i){var s=t.lookup(e[1]);if(!s||Ua(s)&&s.length===0)return this.renderTokens(e[4],t,n,r,i)};Hn.prototype.indentPartial=function(e,t,n){for(var r=t.replace(/[^ \t]/g,""),i=e.split(`
|
|
39
|
-
`),s=0;s<i.length;s++)i[s].length&&(s>0||!n)&&(i[s]=r+i[s]);return i.join(`
|
|
40
|
-
`)};Hn.prototype.renderPartial=function(e,t,n,r){if(n){var i=this.getConfigTags(r),s=c_(n)?n(e[1]):n[e[1]];if(s!=null){var o=e[6],a=e[5],l=e[4],c=s;a==0&&l&&(c=this.indentPartial(s,l,o));var h=this.parse(c,i);return this.renderTokens(h,t,n,c,r)}}};Hn.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};Hn.prototype.escapedValue=function(e,t,n){var r=this.getConfigEscape(n)||Dr.escape,i=t.lookup(e[1]);if(i!=null)return typeof i=="number"&&r===Dr.escape?String(i):r(i)};Hn.prototype.rawValue=function(e){return e[1]};Hn.prototype.getConfigTags=function(e){return Ua(e)?e:e&&typeof e=="object"?e.tags:void 0};Hn.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Ua(e))return e.escape};var Dr={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){Sl.templateCache=e},get templateCache(){return Sl.templateCache}},Sl=new Hn;Dr.clearCache=function(){return Sl.clearCache()};Dr.parse=function(e,t){return Sl.parse(e,t)};Dr.render=function(e,t,n,r){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+e2(e)+'" was given as the first argument for mustache#render(template, view, partials)');return Sl.render(e,t,n,r)};Dr.escape=a2;Dr.Scanner=Dl;Dr.Context=Va;Dr.Writer=Hn;var _n=Dr;_n.escape=PI.MustacheUtils.escapeHtml;var Bf=class Kd{transform(t,n){return t?_n.render(t,w({},n)):null}static \u0275fac=function(t){return new(t||Kd)};static \u0275pipe=ss({name:"cooeeDynamicVariables",type:Kd,pure:!0})},l_={};(function e(t,n,r,i){var s=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),o=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!t.OffscreenCanvas)return!1;var D=new OffscreenCanvas(1,1),I=D.getContext("2d");I.fillRect(0,0,1,1);var K=D.transferToImageBitmap();try{I.createPattern(K,"no-repeat")}catch{return!1}return!0}();function l(){}function c(D){var I=n.exports.Promise,K=I!==void 0?I:t.Promise;return typeof K=="function"?new K(D):(D(l,l),null)}var h=function(D,I){return{transform:function(K){if(D)return K;if(I.has(K))return I.get(K);var re=new OffscreenCanvas(K.width,K.height),ae=re.getContext("2d");return ae.drawImage(K,0,0),I.set(K,re),re},clear:function(){I.clear()}}}(a,new Map),d=function(){var D=Math.floor(16.666666666666668),I,K,re={},ae=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(I=function(we){var ve=Math.random();return re[ve]=requestAnimationFrame(function ue(Ie){ae===Ie||ae+D-1<Ie?(ae=Ie,delete re[ve],we()):re[ve]=requestAnimationFrame(ue)}),ve},K=function(we){re[we]&&cancelAnimationFrame(re[we])}):(I=function(we){return setTimeout(we,D)},K=function(we){return clearTimeout(we)}),{frame:I,cancel:K}}(),f=function(){var D,I,K={};function re(ae){function we(ve,ue){ae.postMessage({options:ve||{},callback:ue})}ae.init=function(ve){var ue=ve.transferControlToOffscreen();ae.postMessage({canvas:ue},[ue])},ae.fire=function(ve,ue,Ie){if(I)return we(ve,null),I;var je=Math.random().toString(36).slice(2);return I=c(function(It){function He(Xe){Xe.data.callback===je&&(delete K[je],ae.removeEventListener("message",He),I=null,h.clear(),Ie(),It())}ae.addEventListener("message",He),we(ve,je),K[je]=He.bind(null,{data:{callback:je}})}),I},ae.reset=function(){ae.postMessage({reset:!0});for(var ve in K)K[ve](),delete K[ve]}}return function(){if(D)return D;if(!r&&s){var ae=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(`
|
|
41
|
-
`);try{D=new Worker(URL.createObjectURL(new Blob([ae])))}catch(we){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",we),null}re(D)}return D}}(),g={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function m(D,I){return I?I(D):D}function _(D){return D!=null}function x(D,I,K){return m(D&&_(D[I])?D[I]:g[I],K)}function A(D){return D<0?0:Math.floor(D)}function F(D,I){return Math.floor(Math.random()*(I-D))+D}function U(D){return parseInt(D,16)}function M(D){return D.map(Y)}function Y(D){var I=String(D).replace(/[^0-9a-f]/gi,"");return I.length<6&&(I=I[0]+I[0]+I[1]+I[1]+I[2]+I[2]),{r:U(I.substring(0,2)),g:U(I.substring(2,4)),b:U(I.substring(4,6))}}function Ae(D){var I=x(D,"origin",Object);return I.x=x(I,"x",Number),I.y=x(I,"y",Number),I}function ct(D){D.width=document.documentElement.clientWidth,D.height=document.documentElement.clientHeight}function j(D){var I=D.getBoundingClientRect();D.width=I.width,D.height=I.height}function fe(D){var I=document.createElement("canvas");return I.style.position="fixed",I.style.top="0px",I.style.left="0px",I.style.pointerEvents="none",I.style.zIndex=D,I}function te(D,I,K,re,ae,we,ve,ue,Ie){D.save(),D.translate(I,K),D.rotate(we),D.scale(re,ae),D.arc(0,0,1,ve,ue,Ie),D.restore()}function pe(D){var I=D.angle*(Math.PI/180),K=D.spread*(Math.PI/180);return{x:D.x,y:D.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:D.startVelocity*.5+Math.random()*D.startVelocity,angle2D:-I+(.5*K-Math.random()*K),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:D.color,shape:D.shape,tick:0,totalTicks:D.ticks,decay:D.decay,drift:D.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:D.gravity*3,ovalScalar:.6,scalar:D.scalar,flat:D.flat}}function Le(D,I){I.x+=Math.cos(I.angle2D)*I.velocity+I.drift,I.y+=Math.sin(I.angle2D)*I.velocity+I.gravity,I.velocity*=I.decay,I.flat?(I.wobble=0,I.wobbleX=I.x+10*I.scalar,I.wobbleY=I.y+10*I.scalar,I.tiltSin=0,I.tiltCos=0,I.random=1):(I.wobble+=I.wobbleSpeed,I.wobbleX=I.x+10*I.scalar*Math.cos(I.wobble),I.wobbleY=I.y+10*I.scalar*Math.sin(I.wobble),I.tiltAngle+=.1,I.tiltSin=Math.sin(I.tiltAngle),I.tiltCos=Math.cos(I.tiltAngle),I.random=Math.random()+2);var K=I.tick++/I.totalTicks,re=I.x+I.random*I.tiltCos,ae=I.y+I.random*I.tiltSin,we=I.wobbleX+I.random*I.tiltCos,ve=I.wobbleY+I.random*I.tiltSin;if(D.fillStyle="rgba("+I.color.r+", "+I.color.g+", "+I.color.b+", "+(1-K)+")",D.beginPath(),o&&I.shape.type==="path"&&typeof I.shape.path=="string"&&Array.isArray(I.shape.matrix))D.fill(qe(I.shape.path,I.shape.matrix,I.x,I.y,Math.abs(we-re)*.1,Math.abs(ve-ae)*.1,Math.PI/10*I.wobble));else if(I.shape.type==="bitmap"){var ue=Math.PI/10*I.wobble,Ie=Math.abs(we-re)*.1,je=Math.abs(ve-ae)*.1,It=I.shape.bitmap.width*I.scalar,He=I.shape.bitmap.height*I.scalar,Xe=new DOMMatrix([Math.cos(ue)*Ie,Math.sin(ue)*Ie,-Math.sin(ue)*je,Math.cos(ue)*je,I.x,I.y]);Xe.multiplySelf(new DOMMatrix(I.shape.matrix));var Pt=D.createPattern(h.transform(I.shape.bitmap),"no-repeat");Pt.setTransform(Xe),D.globalAlpha=1-K,D.fillStyle=Pt,D.fillRect(I.x-It/2,I.y-He/2,It,He),D.globalAlpha=1}else if(I.shape==="circle")D.ellipse?D.ellipse(I.x,I.y,Math.abs(we-re)*I.ovalScalar,Math.abs(ve-ae)*I.ovalScalar,Math.PI/10*I.wobble,0,2*Math.PI):te(D,I.x,I.y,Math.abs(we-re)*I.ovalScalar,Math.abs(ve-ae)*I.ovalScalar,Math.PI/10*I.wobble,0,2*Math.PI);else if(I.shape==="star")for(var ke=Math.PI/2*3,u=4*I.scalar,p=8*I.scalar,y=I.x,T=I.y,L=5,B=Math.PI/L;L--;)y=I.x+Math.cos(ke)*p,T=I.y+Math.sin(ke)*p,D.lineTo(y,T),ke+=B,y=I.x+Math.cos(ke)*u,T=I.y+Math.sin(ke)*u,D.lineTo(y,T),ke+=B;else D.moveTo(Math.floor(I.x),Math.floor(I.y)),D.lineTo(Math.floor(I.wobbleX),Math.floor(ae)),D.lineTo(Math.floor(we),Math.floor(ve)),D.lineTo(Math.floor(re),Math.floor(I.wobbleY));return D.closePath(),D.fill(),I.tick<I.totalTicks}function ut(D,I,K,re,ae){var we=I.slice(),ve=D.getContext("2d"),ue,Ie,je=c(function(It){function He(){ue=Ie=null,ve.clearRect(0,0,re.width,re.height),h.clear(),ae(),It()}function Xe(){r&&!(re.width===i.width&&re.height===i.height)&&(re.width=D.width=i.width,re.height=D.height=i.height),!re.width&&!re.height&&(K(D),re.width=D.width,re.height=D.height),ve.clearRect(0,0,re.width,re.height),we=we.filter(function(Pt){return Le(ve,Pt)}),we.length?ue=d.frame(Xe):He()}ue=d.frame(Xe),Ie=He});return{addFettis:function(It){return we=we.concat(It),je},canvas:D,promise:je,reset:function(){ue&&d.cancel(ue),Ie&&Ie()}}}function E(D,I){var K=!D,re=!!x(I||{},"resize"),ae=!1,we=x(I,"disableForReducedMotion",Boolean),ve=s&&!!x(I||{},"useWorker"),ue=ve?f():null,Ie=K?ct:j,je=D&&ue?!!D.__confetti_initialized:!1,It=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,He;function Xe(ke,u,p){for(var y=x(ke,"particleCount",A),T=x(ke,"angle",Number),L=x(ke,"spread",Number),B=x(ke,"startVelocity",Number),Q=x(ke,"decay",Number),et=x(ke,"gravity",Number),Ge=x(ke,"drift",Number),Me=x(ke,"colors",M),dt=x(ke,"ticks",Number),J=x(ke,"shapes"),De=x(ke,"scalar"),me=!!x(ke,"flat"),tt=Ae(ke),Cn=y,Sn=[],lt=D.width*tt.x,ye=D.height*tt.y;Cn--;)Sn.push(pe({x:lt,y:ye,angle:T,spread:L,startVelocity:B,color:Me[Cn%Me.length],shape:J[F(0,J.length)],ticks:dt,decay:Q,gravity:et,drift:Ge,scalar:De,flat:me}));return He?He.addFettis(Sn):(He=ut(D,Sn,Ie,u,p),He.promise)}function Pt(ke){var u=we||x(ke,"disableForReducedMotion",Boolean),p=x(ke,"zIndex",Number);if(u&&It)return c(function(B){B()});K&&He?D=He.canvas:K&&!D&&(D=fe(p),document.body.appendChild(D)),re&&!je&&Ie(D);var y={width:D.width,height:D.height};ue&&!je&&ue.init(D),je=!0,ue&&(D.__confetti_initialized=!0);function T(){if(ue){var B={getBoundingClientRect:function(){if(!K)return D.getBoundingClientRect()}};Ie(B),ue.postMessage({resize:{width:B.width,height:B.height}});return}y.width=y.height=null}function L(){He=null,re&&(ae=!1,t.removeEventListener("resize",T)),K&&D&&(document.body.contains(D)&&document.body.removeChild(D),D=null,je=!1)}return re&&!ae&&(ae=!0,t.addEventListener("resize",T,!1)),ue?ue.fire(ke,y,L):Xe(ke,y,L)}return Pt.reset=function(){ue&&ue.reset(),He&&He.reset()},Pt}var $t;function Bt(){return $t||($t=E(null,{useWorker:!0,resize:!0})),$t}function qe(D,I,K,re,ae,we,ve){var ue=new Path2D(D),Ie=new Path2D;Ie.addPath(ue,new DOMMatrix(I));var je=new Path2D;return je.addPath(Ie,new DOMMatrix([Math.cos(ve)*ae,Math.sin(ve)*ae,-Math.sin(ve)*we,Math.cos(ve)*we,K,re])),je}function Kt(D){if(!o)throw new Error("path confetti are not supported in this browser");var I,K;typeof D=="string"?I=D:(I=D.path,K=D.matrix);var re=new Path2D(I),ae=document.createElement("canvas"),we=ae.getContext("2d");if(!K){for(var ve=1e3,ue=ve,Ie=ve,je=0,It=0,He,Xe,Pt=0;Pt<ve;Pt+=2)for(var ke=0;ke<ve;ke+=2)we.isPointInPath(re,Pt,ke,"nonzero")&&(ue=Math.min(ue,Pt),Ie=Math.min(Ie,ke),je=Math.max(je,Pt),It=Math.max(It,ke));He=je-ue,Xe=It-Ie;var u=10,p=Math.min(u/He,u/Xe);K=[p,0,0,p,-Math.round(He/2+ue)*p,-Math.round(Xe/2+Ie)*p]}return{type:"path",path:I,matrix:K}}function Se(D){var I,K=1,re="#000000",ae='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof D=="string"?I=D:(I=D.text,K="scalar"in D?D.scalar:K,ae="fontFamily"in D?D.fontFamily:ae,re="color"in D?D.color:re);var we=10*K,ve=""+we+"px "+ae,ue=new OffscreenCanvas(we,we),Ie=ue.getContext("2d");Ie.font=ve;var je=Ie.measureText(I),It=Math.ceil(je.actualBoundingBoxRight+je.actualBoundingBoxLeft),He=Math.ceil(je.actualBoundingBoxAscent+je.actualBoundingBoxDescent),Xe=2,Pt=je.actualBoundingBoxLeft+Xe,ke=je.actualBoundingBoxAscent+Xe;It+=Xe+Xe,He+=Xe+Xe,ue=new OffscreenCanvas(It,He),Ie=ue.getContext("2d"),Ie.font=ve,Ie.fillStyle=re,Ie.fillText(I,Pt,ke);var u=1/K;return{type:"bitmap",bitmap:ue.transferToImageBitmap(),matrix:[u,0,0,u,-It*u/2,-He*u/2]}}n.exports=function(){return Bt().apply(this,arguments)},n.exports.reset=function(){Bt().reset()},n.exports.create=E,n.exports.shapeFromPath=Kt,n.exports.shapeFromText=Se})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),l_,!1);var kI=l_.exports,PK=l_.exports.create,Vf=class{static DEFAULTS={scalar:1.4,zIndex:1e4,shapes:["circle","circle","square"],colors:["#f51c8f","#2179e2","#d52dc8","#01a9d9","#78ff44","#fdff6a"]};static async basic(){await this.fire({particleCount:100,spread:70,origin:{y:.6}})}static async leftRight(e=100){let t=[],n=Date.now()+2e3,r=()=>{t.push(this.fire({angle:60,spread:55,origin:{x:0}}),this.fire({angle:120,spread:55,origin:{x:1}})),Date.now()<n&&e>0&&(requestAnimationFrame(r),e--)};r(),await Promise.all(t)}static async realistic(){await Promise.all([this.realisticFire(.25,{spread:26,startVelocity:55}),this.realisticFire(.2,{spread:60}),this.realisticFire(.35,{spread:100,decay:.91,scalar:.8}),this.realisticFire(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),this.realisticFire(.1,{spread:120,startVelocity:45})])}static async fire(e){Object.assign(e,this.DEFAULTS,e),e.particleCount=e.particleCount??this.DEFAULTS.colors.length,await kI(e)}static async realisticFire(e,t){let n={origin:{y:.7}};await this.fire(Object.assign({},n,t,{particleCount:Math.floor(200*e)}))}},pi=class Xd{constructor(t){this.sanitizer=t}transform(t){return t?this.sanitizer.bypassSecurityTrustHtml(t):""}static \u0275fac=function(t){return new(t||Xd)(kt(zy,16))};static \u0275pipe=ss({name:"safeHtml",type:Xd,pure:!0})},m2=(e,t)=>t.minValue;function g2(e,t){if(e&1&&(Z(0,"li",6)(1,"div",7),Ne(2,"div",8),Dn(3,"cooeeCurrency"),Dn(4,"safeHtml"),Ne(5,"img",9),Z(6,"div",10),bt(7),X()()()),e&2){let n=t.$implicit,r=de(2);yo("left",n.calculatedAlignment+"%"),q(2),Ve("innerHTML",Nn(4,7,Nn(3,5,n.minValue)),Ur),q(3),Ve("src",r.getIconURL(n),an),q(2),Sa(n.label)}}function y2(e,t){if(e&1&&(_o(0)(1),Ne(2,"div",0),Dn(3,"cooeeDynamicVariables"),Dn(4,"safeHtml"),Z(5,"div",1)(6,"ul",2)(7,"div",3),Ne(8,"div",4),X(),en(9,g2,8,9,"li",5,m2),X()()),e&2){let n=de(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;q(2),Ve("innerHTML",Nn(4,6,rS(3,3,i,n.localDynamicVariables())),Ur),q(6),yo("width",r.cartValuePercentage+"%"),q(),tn(r.milestones)}}var Hf=class ep{constructor(t){this.elementRef=t,this.elementRef.nativeElement.update=this.update.bind(this)}cart;localDynamicVariables=Er({});calculatedState=Er({});_engagementTrigger=Er(null);progressBarConfig;set engagementTrigger(t){this._engagementTrigger.set(t),this.progressBarConfig=t.progressBarConfig}ngOnInit(){b.debug("Init progressbar"),this.calculateMilestonesSilently()}ngOnDestroy(){b.debug("Destroying progressbar")}update(){this.calculateMilestonesSilently()}getIconURL(t){return t.rewardType===Uf.MilestoneRewardType.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":t.rewardType===Uf.MilestoneRewardType.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":t.rewardType===Uf.MilestoneRewardType.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(t=>b.error(t))}async calculateMilestones(){let t=this._engagementTrigger();if(!t?.progressBarConfig?.milestones?.length){b.warn("Milestones not available in progress bar config",t);return}let n=await this.cart.getNormalisedCart(),r=t.progressBarConfig,i=r.milestones.at(-1),s=i.minValue+Math.floor(i.minValue*5/100),o=n.originalAmount,a=Math.min(o,s),l=100/r.milestones.length,c=l;for(let g of r.milestones)g.calculatedAlignment=c,c+=l;let h=this.calculateTrackedProgress(a,r.milestones);b.debug("Cart value:",o,`, percentage: ${h}%`),this.celebrate(t,o);let d={milestonesReady:!0,cartValuePercentage:h,milestones:r.milestones},f=r.milestones.find(g=>g.minValue>o);if(f){this.localDynamicVariables.set({amount_left:oe.formatCurrency(f.minValue-o)}),d.nextMilestone=f,this.calculatedState.set(d);return}d.lastMilestone=i,this.calculatedState.set(d)}celebrate(t,n){let r=[...t.progressBarConfig.milestones].reverse().find(s=>s.minValue<n);if(!r)return;let i=`lc/en/${t.shortID}/${r.minValue}`;sessionStorage.getItem(i)||(sessionStorage.setItem(i,"1"),this.progressBarConfig?.noConfetti||Vf.realistic())}calculateTrackedProgress(t,n){if(t<=n[0].minValue)return t/n[0].minValue*n[0].calculatedAlignment;if(t>=n[n.length-1].minValue)return 100;for(let r=0;r<n.length-1;r++){let i=n[r].minValue,s=n[r+1].minValue,o=n[r].calculatedAlignment,a=n[r+1].calculatedAlignment;if(t>=i&&t<=s)return(t-i)/(s-i)*(a-o)+o}return 0}static \u0275fac=function(t){return new(t||ep)(kt(yt))};static \u0275cmp=st({type:ep,selectors:[["cooee-progressbar"]],inputs:{cart:"cart",engagementTrigger:"engagementTrigger"},decls:1,vars:1,consts:[["id","lc-heading",1,"lc:font-medium","lc:text-center","lc:text-[12px]","lc-primary-text",3,"innerHTML"],[1,"lc:mt-4","lc:w-[95%]"],["id","lc-milestone-list",1,"lc:flex","lc:items-center","lc:relative","lc:text-[10px]","lc:font-medium"],["id","lc-untracked-path",1,"lc:w-full","lc:bg-gray-200","lc:h-1","lc:absolute","lc-progress-rail"],["id","lc-tracked-path",1,"lc:bg-green-700","lc:h-full","lc:block!"],["id","lc-milestone-list-item",1,"lc:relative","lc:flex","lc:flex-col","lc:items-center","lc:h-[75px]",3,"left"],["id","lc-milestone-list-item",1,"lc:relative","lc:flex","lc:flex-col","lc:items-center","lc:h-[75px]"],[1,"lc:flex","lc:flex-col","lc:items-center","lc:justify-between","lc:absolute","lc:h-full","lc:w-[100px]"],["id","lc-milestone-value",1,"lc-milestone-value",3,"innerHTML"],["width","20","height","20","id","lc-milestone-icon","alt","milestone icon",1,"lc-milestone-icon","lc:bg-green-700",3,"src"],["id","lc-milestone-label",1,"lc="]],template:function(t,n){t&1&&pt(0,y2,11,8),t&2&&xt(n.calculatedState().milestonesReady?0:-1)},dependencies:[Bf,pi,fi],styles:["[_nghost-%COMP%]{display:block;padding:10px;background:linear-gradient(0deg,rgba(44,135,74,.1) 0%,transparent 100%)}.lc-milestone-icon[_ngcontent-%COMP%]{padding:5px;border-radius:1000px}.lc-progress-rail[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{transition:width .5s ease-in-out}"]})};function v2(e,t){return t={exports:{}},e(t,t.exports),t.exports}var _2=C2,E2=D2,w2=x2,gi=[],Tr=[],b2=typeof Uint8Array<"u"?Uint8Array:Array,u_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Cs=0,LI=u_.length;Cs<LI;++Cs)gi[Cs]=u_[Cs],Tr[u_.charCodeAt(Cs)]=Cs;var Cs,LI;Tr[45]=62;Tr[95]=63;function JI(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function C2(e){var t=JI(e),n=t[0],r=t[1];return(n+r)*3/4-r}function S2(e,t,n){return(t+n)*3/4-n}function D2(e){var t,n=JI(e),r=n[0],i=n[1],s=new b2(S2(e,r,i)),o=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)t=Tr[e.charCodeAt(l)]<<18|Tr[e.charCodeAt(l+1)]<<12|Tr[e.charCodeAt(l+2)]<<6|Tr[e.charCodeAt(l+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=t&255;return i===2&&(t=Tr[e.charCodeAt(l)]<<2|Tr[e.charCodeAt(l+1)]>>4,s[o++]=t&255),i===1&&(t=Tr[e.charCodeAt(l)]<<10|Tr[e.charCodeAt(l+1)]<<4|Tr[e.charCodeAt(l+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function I2(e){return gi[e>>18&63]+gi[e>>12&63]+gi[e>>6&63]+gi[e&63]}function T2(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),i.push(I2(r));return i.join("")}function x2(e){for(var t,n=e.length,r=n%3,i=[],s=16383,o=0,a=n-r;o<a;o+=s)i.push(T2(e,o,o+s>a?a:o+s));return r===1?(t=e[n-1],i.push(gi[t>>2]+gi[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(gi[t>>10]+gi[t>>4&63]+gi[t<<2&63]+"=")),i.join("")}var d_={byteLength:_2,toByteArray:E2,fromByteArray:w2},R2=function(e,t,n,r,i){var s,o,a=i*8-r-1,l=(1<<a)-1,c=l>>1,h=-7,d=n?i-1:0,f=n?-1:1,g=e[t+d];for(d+=f,s=g&(1<<-h)-1,g>>=-h,h+=a;h>0;s=s*256+e[t+d],d+=f,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=r;h>0;o=o*256+e[t+d],d+=f,h-=8);if(s===0)s=1-c;else{if(s===l)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,r),s=s-c}return(g?-1:1)*o*Math.pow(2,s-r)},N2=function(e,t,n,r,i,s){var o,a,l,c=s*8-i-1,h=(1<<c)-1,d=h>>1,f=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:s-1,m=r?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=h?(a=0,o=h):o+d>=1?(a=(t*l-1)*Math.pow(2,i),o=o+d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+g]=a&255,g+=m,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[n+g]=o&255,g+=m,o/=256,c-=8);e[n+g-m]|=_*128},Ha={read:R2,write:N2},Wf=v2(function(e,t){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=A,t.INSPECT_MAX_BYTES=50;var r=2147483647;t.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var u=new Uint8Array(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,Uint8Array.prototype),Object.setPrototypeOf(u,p),u.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function s(u){if(u>r)throw new RangeError('The value "'+u+'" is invalid for option "size"');var p=new Uint8Array(u);return Object.setPrototypeOf(p,o.prototype),p}function o(u,p,y){if(typeof u=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(u)}return a(u,p,y)}o.poolSize=8192;function a(u,p,y){if(typeof u=="string")return d(u,p);if(ArrayBuffer.isView(u))return g(u);if(u==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(u));if(Xe(u,ArrayBuffer)||u&&Xe(u.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Xe(u,SharedArrayBuffer)||u&&Xe(u.buffer,SharedArrayBuffer)))return m(u,p,y);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var T=u.valueOf&&u.valueOf();if(T!=null&&T!==u)return o.from(T,p,y);var L=_(u);if(L)return L;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return o.from(u[Symbol.toPrimitive]("string"),p,y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(u))}o.from=function(u,p,y){return a(u,p,y)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(u){if(typeof u!="number")throw new TypeError('"size" argument must be of type number');if(u<0)throw new RangeError('The value "'+u+'" is invalid for option "size"')}function c(u,p,y){return l(u),u<=0?s(u):p!==void 0?typeof y=="string"?s(u).fill(p,y):s(u).fill(p):s(u)}o.alloc=function(u,p,y){return c(u,p,y)};function h(u){return l(u),s(u<0?0:x(u)|0)}o.allocUnsafe=function(u){return h(u)},o.allocUnsafeSlow=function(u){return h(u)};function d(u,p){if((typeof p!="string"||p==="")&&(p="utf8"),!o.isEncoding(p))throw new TypeError("Unknown encoding: "+p);var y=F(u,p)|0,T=s(y),L=T.write(u,p);return L!==y&&(T=T.slice(0,L)),T}function f(u){for(var p=u.length<0?0:x(u.length)|0,y=s(p),T=0;T<p;T+=1)y[T]=u[T]&255;return y}function g(u){if(Xe(u,Uint8Array)){var p=new Uint8Array(u);return m(p.buffer,p.byteOffset,p.byteLength)}return f(u)}function m(u,p,y){if(p<0||u.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(u.byteLength<p+(y||0))throw new RangeError('"length" is outside of buffer bounds');var T;return p===void 0&&y===void 0?T=new Uint8Array(u):y===void 0?T=new Uint8Array(u,p):T=new Uint8Array(u,p,y),Object.setPrototypeOf(T,o.prototype),T}function _(u){if(o.isBuffer(u)){var p=x(u.length)|0,y=s(p);return y.length===0||u.copy(y,0,0,p),y}if(u.length!==void 0)return typeof u.length!="number"||Pt(u.length)?s(0):f(u);if(u.type==="Buffer"&&Array.isArray(u.data))return f(u.data)}function x(u){if(u>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return u|0}function A(u){return+u!=u&&(u=0),o.alloc(+u)}o.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==o.prototype},o.compare=function(u,p){if(Xe(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),Xe(p,Uint8Array)&&(p=o.from(p,p.offset,p.byteLength)),!o.isBuffer(u)||!o.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===p)return 0;for(var y=u.length,T=p.length,L=0,B=Math.min(y,T);L<B;++L)if(u[L]!==p[L]){y=u[L],T=p[L];break}return y<T?-1:T<y?1:0},o.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(u,p){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return o.alloc(0);var y;if(p===void 0)for(p=0,y=0;y<u.length;++y)p+=u[y].length;var T=o.allocUnsafe(p),L=0;for(y=0;y<u.length;++y){var B=u[y];if(Xe(B,Uint8Array))L+B.length>T.length?o.from(B).copy(T,L):Uint8Array.prototype.set.call(T,B,L);else if(o.isBuffer(B))B.copy(T,L);else throw new TypeError('"list" argument must be an Array of Buffers');L+=B.length}return T};function F(u,p){if(o.isBuffer(u))return u.length;if(ArrayBuffer.isView(u)||Xe(u,ArrayBuffer))return u.byteLength;if(typeof u!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(u));var y=u.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&y===0)return 0;for(var L=!1;;)switch(p){case"ascii":case"latin1":case"binary":return y;case"utf8":case"utf-8":return ue(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y*2;case"hex":return y>>>1;case"base64":return It(u).length;default:if(L)return T?-1:ue(u).length;p=(""+p).toLowerCase(),L=!0}}o.byteLength=F;function U(u,p,y){var T=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((y===void 0||y>this.length)&&(y=this.length),y<=0)||(y>>>=0,p>>>=0,y<=p))return"";for(u||(u="utf8");;)switch(u){case"hex":return Kt(this,p,y);case"utf8":case"utf-8":return ut(this,p,y);case"ascii":return Bt(this,p,y);case"latin1":case"binary":return qe(this,p,y);case"base64":return Le(this,p,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(this,p,y);default:if(T)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),T=!0}}o.prototype._isBuffer=!0;function M(u,p,y){var T=u[p];u[p]=u[y],u[y]=T}o.prototype.swap16=function(){var u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var p=0;p<u;p+=2)M(this,p,p+1);return this},o.prototype.swap32=function(){var u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var p=0;p<u;p+=4)M(this,p,p+3),M(this,p+1,p+2);return this},o.prototype.swap64=function(){var u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var p=0;p<u;p+=8)M(this,p,p+7),M(this,p+1,p+6),M(this,p+2,p+5),M(this,p+3,p+4);return this},o.prototype.toString=function(){var u=this.length;return u===0?"":arguments.length===0?ut(this,0,u):U.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(u){if(!o.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:o.compare(this,u)===0},o.prototype.inspect=function(){var u="",p=t.INSPECT_MAX_BYTES;return u=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(u+=" ... "),"<Buffer "+u+">"},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(u,p,y,T,L){if(Xe(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),!o.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(u));if(p===void 0&&(p=0),y===void 0&&(y=u?u.length:0),T===void 0&&(T=0),L===void 0&&(L=this.length),p<0||y>u.length||T<0||L>this.length)throw new RangeError("out of range index");if(T>=L&&p>=y)return 0;if(T>=L)return-1;if(p>=y)return 1;if(p>>>=0,y>>>=0,T>>>=0,L>>>=0,this===u)return 0;for(var B=L-T,Q=y-p,et=Math.min(B,Q),Ge=this.slice(T,L),Me=u.slice(p,y),dt=0;dt<et;++dt)if(Ge[dt]!==Me[dt]){B=Ge[dt],Q=Me[dt];break}return B<Q?-1:Q<B?1:0};function Y(u,p,y,T,L){if(u.length===0)return-1;if(typeof y=="string"?(T=y,y=0):y>2147483647?y=2147483647:y<-2147483648&&(y=-2147483648),y=+y,Pt(y)&&(y=L?0:u.length-1),y<0&&(y=u.length+y),y>=u.length){if(L)return-1;y=u.length-1}else if(y<0)if(L)y=0;else return-1;if(typeof p=="string"&&(p=o.from(p,T)),o.isBuffer(p))return p.length===0?-1:Ae(u,p,y,T,L);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?L?Uint8Array.prototype.indexOf.call(u,p,y):Uint8Array.prototype.lastIndexOf.call(u,p,y):Ae(u,[p],y,T,L);throw new TypeError("val must be string, number or Buffer")}function Ae(u,p,y,T,L){var B=1,Q=u.length,et=p.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(u.length<2||p.length<2)return-1;B=2,Q/=2,et/=2,y/=2}function Ge(me,tt){return B===1?me[tt]:me.readUInt16BE(tt*B)}var Me;if(L){var dt=-1;for(Me=y;Me<Q;Me++)if(Ge(u,Me)===Ge(p,dt===-1?0:Me-dt)){if(dt===-1&&(dt=Me),Me-dt+1===et)return dt*B}else dt!==-1&&(Me-=Me-dt),dt=-1}else for(y+et>Q&&(y=Q-et),Me=y;Me>=0;Me--){for(var J=!0,De=0;De<et;De++)if(Ge(u,Me+De)!==Ge(p,De)){J=!1;break}if(J)return Me}return-1}o.prototype.includes=function(u,p,y){return this.indexOf(u,p,y)!==-1},o.prototype.indexOf=function(u,p,y){return Y(this,u,p,y,!0)},o.prototype.lastIndexOf=function(u,p,y){return Y(this,u,p,y,!1)};function ct(u,p,y,T){y=Number(y)||0;var L=u.length-y;T?(T=Number(T),T>L&&(T=L)):T=L;var B=p.length;T>B/2&&(T=B/2);for(var Q=0;Q<T;++Q){var et=parseInt(p.substr(Q*2,2),16);if(Pt(et))return Q;u[y+Q]=et}return Q}function j(u,p,y,T){return He(ue(p,u.length-y),u,y,T)}function fe(u,p,y,T){return He(Ie(p),u,y,T)}function te(u,p,y,T){return He(It(p),u,y,T)}function pe(u,p,y,T){return He(je(p,u.length-y),u,y,T)}o.prototype.write=function(u,p,y,T){if(p===void 0)T="utf8",y=this.length,p=0;else if(y===void 0&&typeof p=="string")T=p,y=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(y)?(y=y>>>0,T===void 0&&(T="utf8")):(T=y,y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var L=this.length-p;if((y===void 0||y>L)&&(y=L),u.length>0&&(y<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");for(var B=!1;;)switch(T){case"hex":return ct(this,u,p,y);case"utf8":case"utf-8":return j(this,u,p,y);case"ascii":case"latin1":case"binary":return fe(this,u,p,y);case"base64":return te(this,u,p,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,u,p,y);default:if(B)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),B=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Le(u,p,y){return p===0&&y===u.length?d_.fromByteArray(u):d_.fromByteArray(u.slice(p,y))}function ut(u,p,y){y=Math.min(u.length,y);for(var T=[],L=p;L<y;){var B=u[L],Q=null,et=B>239?4:B>223?3:B>191?2:1;if(L+et<=y){var Ge,Me,dt,J;switch(et){case 1:B<128&&(Q=B);break;case 2:Ge=u[L+1],(Ge&192)===128&&(J=(B&31)<<6|Ge&63,J>127&&(Q=J));break;case 3:Ge=u[L+1],Me=u[L+2],(Ge&192)===128&&(Me&192)===128&&(J=(B&15)<<12|(Ge&63)<<6|Me&63,J>2047&&(J<55296||J>57343)&&(Q=J));break;case 4:Ge=u[L+1],Me=u[L+2],dt=u[L+3],(Ge&192)===128&&(Me&192)===128&&(dt&192)===128&&(J=(B&15)<<18|(Ge&63)<<12|(Me&63)<<6|dt&63,J>65535&&J<1114112&&(Q=J))}}Q===null?(Q=65533,et=1):Q>65535&&(Q-=65536,T.push(Q>>>10&1023|55296),Q=56320|Q&1023),T.push(Q),L+=et}return $t(T)}var E=4096;function $t(u){var p=u.length;if(p<=E)return String.fromCharCode.apply(String,u);for(var y="",T=0;T<p;)y+=String.fromCharCode.apply(String,u.slice(T,T+=E));return y}function Bt(u,p,y){var T="";y=Math.min(u.length,y);for(var L=p;L<y;++L)T+=String.fromCharCode(u[L]&127);return T}function qe(u,p,y){var T="";y=Math.min(u.length,y);for(var L=p;L<y;++L)T+=String.fromCharCode(u[L]);return T}function Kt(u,p,y){var T=u.length;(!p||p<0)&&(p=0),(!y||y<0||y>T)&&(y=T);for(var L="",B=p;B<y;++B)L+=ke[u[B]];return L}function Se(u,p,y){for(var T=u.slice(p,y),L="",B=0;B<T.length-1;B+=2)L+=String.fromCharCode(T[B]+T[B+1]*256);return L}o.prototype.slice=function(u,p){var y=this.length;u=~~u,p=p===void 0?y:~~p,u<0?(u+=y,u<0&&(u=0)):u>y&&(u=y),p<0?(p+=y,p<0&&(p=0)):p>y&&(p=y),p<u&&(p=u);var T=this.subarray(u,p);return Object.setPrototypeOf(T,o.prototype),T};function D(u,p,y){if(u%1!==0||u<0)throw new RangeError("offset is not uint");if(u+p>y)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(u,p,y){u=u>>>0,p=p>>>0,y||D(u,p,this.length);for(var T=this[u],L=1,B=0;++B<p&&(L*=256);)T+=this[u+B]*L;return T},o.prototype.readUintBE=o.prototype.readUIntBE=function(u,p,y){u=u>>>0,p=p>>>0,y||D(u,p,this.length);for(var T=this[u+--p],L=1;p>0&&(L*=256);)T+=this[u+--p]*L;return T},o.prototype.readUint8=o.prototype.readUInt8=function(u,p){return u=u>>>0,p||D(u,1,this.length),this[u]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(u,p){return u=u>>>0,p||D(u,2,this.length),this[u]|this[u+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(u,p){return u=u>>>0,p||D(u,2,this.length),this[u]<<8|this[u+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(u,p){return u=u>>>0,p||D(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},o.prototype.readIntLE=function(u,p,y){u=u>>>0,p=p>>>0,y||D(u,p,this.length);for(var T=this[u],L=1,B=0;++B<p&&(L*=256);)T+=this[u+B]*L;return L*=128,T>=L&&(T-=Math.pow(2,8*p)),T},o.prototype.readIntBE=function(u,p,y){u=u>>>0,p=p>>>0,y||D(u,p,this.length);for(var T=p,L=1,B=this[u+--T];T>0&&(L*=256);)B+=this[u+--T]*L;return L*=128,B>=L&&(B-=Math.pow(2,8*p)),B},o.prototype.readInt8=function(u,p){return u=u>>>0,p||D(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},o.prototype.readInt16LE=function(u,p){u=u>>>0,p||D(u,2,this.length);var y=this[u]|this[u+1]<<8;return y&32768?y|4294901760:y},o.prototype.readInt16BE=function(u,p){u=u>>>0,p||D(u,2,this.length);var y=this[u+1]|this[u]<<8;return y&32768?y|4294901760:y},o.prototype.readInt32LE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},o.prototype.readInt32BE=function(u,p){return u=u>>>0,p||D(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},o.prototype.readFloatLE=function(u,p){return u=u>>>0,p||D(u,4,this.length),Ha.read(this,u,!0,23,4)},o.prototype.readFloatBE=function(u,p){return u=u>>>0,p||D(u,4,this.length),Ha.read(this,u,!1,23,4)},o.prototype.readDoubleLE=function(u,p){return u=u>>>0,p||D(u,8,this.length),Ha.read(this,u,!0,52,8)},o.prototype.readDoubleBE=function(u,p){return u=u>>>0,p||D(u,8,this.length),Ha.read(this,u,!1,52,8)};function I(u,p,y,T,L,B){if(!o.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>L||p<B)throw new RangeError('"value" argument is out of bounds');if(y+T>u.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(u,p,y,T){if(u=+u,p=p>>>0,y=y>>>0,!T){var L=Math.pow(2,8*y)-1;I(this,u,p,y,L,0)}var B=1,Q=0;for(this[p]=u&255;++Q<y&&(B*=256);)this[p+Q]=u/B&255;return p+y},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(u,p,y,T){if(u=+u,p=p>>>0,y=y>>>0,!T){var L=Math.pow(2,8*y)-1;I(this,u,p,y,L,0)}var B=y-1,Q=1;for(this[p+B]=u&255;--B>=0&&(Q*=256);)this[p+B]=u/Q&255;return p+y},o.prototype.writeUint8=o.prototype.writeUInt8=function(u,p,y){return u=+u,p=p>>>0,y||I(this,u,p,1,255,0),this[p]=u&255,p+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(u,p,y){return u=+u,p=p>>>0,y||I(this,u,p,2,65535,0),this[p]=u&255,this[p+1]=u>>>8,p+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(u,p,y){return u=+u,p=p>>>0,y||I(this,u,p,2,65535,0),this[p]=u>>>8,this[p+1]=u&255,p+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(u,p,y){return u=+u,p=p>>>0,y||I(this,u,p,4,4294967295,0),this[p+3]=u>>>24,this[p+2]=u>>>16,this[p+1]=u>>>8,this[p]=u&255,p+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(u,p,y){return u=+u,p=p>>>0,y||I(this,u,p,4,4294967295,0),this[p]=u>>>24,this[p+1]=u>>>16,this[p+2]=u>>>8,this[p+3]=u&255,p+4},o.prototype.writeIntLE=function(u,p,y,T){if(u=+u,p=p>>>0,!T){var L=Math.pow(2,8*y-1);I(this,u,p,y,L-1,-L)}var B=0,Q=1,et=0;for(this[p]=u&255;++B<y&&(Q*=256);)u<0&&et===0&&this[p+B-1]!==0&&(et=1),this[p+B]=(u/Q>>0)-et&255;return p+y},o.prototype.writeIntBE=function(u,p,y,T){if(u=+u,p=p>>>0,!T){var L=Math.pow(2,8*y-1);I(this,u,p,y,L-1,-L)}var B=y-1,Q=1,et=0;for(this[p+B]=u&255;--B>=0&&(Q*=256);)u<0&&et===0&&this[p+B+1]!==0&&(et=1),this[p+B]=(u/Q>>0)-et&255;return p+y},o.prototype.writeInt8=function(u,p,y){return u=+u,p=p>>>0,y||I(this,u,p,1,127,-128),u<0&&(u=255+u+1),this[p]=u&255,p+1},o.prototype.writeInt16LE=function(u,p,y){return u=+u,p=p>>>0,y||I(this,u,p,2,32767,-32768),this[p]=u&255,this[p+1]=u>>>8,p+2},o.prototype.writeInt16BE=function(u,p,y){return u=+u,p=p>>>0,y||I(this,u,p,2,32767,-32768),this[p]=u>>>8,this[p+1]=u&255,p+2},o.prototype.writeInt32LE=function(u,p,y){return u=+u,p=p>>>0,y||I(this,u,p,4,2147483647,-2147483648),this[p]=u&255,this[p+1]=u>>>8,this[p+2]=u>>>16,this[p+3]=u>>>24,p+4},o.prototype.writeInt32BE=function(u,p,y){return u=+u,p=p>>>0,y||I(this,u,p,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[p]=u>>>24,this[p+1]=u>>>16,this[p+2]=u>>>8,this[p+3]=u&255,p+4};function K(u,p,y,T,L,B){if(y+T>u.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("Index out of range")}function re(u,p,y,T,L){return p=+p,y=y>>>0,L||K(u,p,y,4),Ha.write(u,p,y,T,23,4),y+4}o.prototype.writeFloatLE=function(u,p,y){return re(this,u,p,!0,y)},o.prototype.writeFloatBE=function(u,p,y){return re(this,u,p,!1,y)};function ae(u,p,y,T,L){return p=+p,y=y>>>0,L||K(u,p,y,8),Ha.write(u,p,y,T,52,8),y+8}o.prototype.writeDoubleLE=function(u,p,y){return ae(this,u,p,!0,y)},o.prototype.writeDoubleBE=function(u,p,y){return ae(this,u,p,!1,y)},o.prototype.copy=function(u,p,y,T){if(!o.isBuffer(u))throw new TypeError("argument should be a Buffer");if(y||(y=0),!T&&T!==0&&(T=this.length),p>=u.length&&(p=u.length),p||(p=0),T>0&&T<y&&(T=y),T===y||u.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(y<0||y>=this.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),u.length-p<T-y&&(T=u.length-p+y);var L=T-y;return this===u&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(p,y,T):Uint8Array.prototype.set.call(u,this.subarray(y,T),p),L},o.prototype.fill=function(u,p,y,T){if(typeof u=="string"){if(typeof p=="string"?(T=p,p=0,y=this.length):typeof y=="string"&&(T=y,y=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!o.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(u.length===1){var L=u.charCodeAt(0);(T==="utf8"&&L<128||T==="latin1")&&(u=L)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(p<0||this.length<p||this.length<y)throw new RangeError("Out of range index");if(y<=p)return this;p=p>>>0,y=y===void 0?this.length:y>>>0,u||(u=0);var B;if(typeof u=="number")for(B=p;B<y;++B)this[B]=u;else{var Q=o.isBuffer(u)?u:o.from(u,T),et=Q.length;if(et===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(B=0;B<y-p;++B)this[B+p]=Q[B%et]}return this};var we=/[^+/0-9A-Za-z-_]/g;function ve(u){if(u=u.split("=")[0],u=u.trim().replace(we,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function ue(u,p){p=p||1/0;for(var y,T=u.length,L=null,B=[],Q=0;Q<T;++Q){if(y=u.charCodeAt(Q),y>55295&&y<57344){if(!L){if(y>56319){(p-=3)>-1&&B.push(239,191,189);continue}else if(Q+1===T){(p-=3)>-1&&B.push(239,191,189);continue}L=y;continue}if(y<56320){(p-=3)>-1&&B.push(239,191,189),L=y;continue}y=(L-55296<<10|y-56320)+65536}else L&&(p-=3)>-1&&B.push(239,191,189);if(L=null,y<128){if((p-=1)<0)break;B.push(y)}else if(y<2048){if((p-=2)<0)break;B.push(y>>6|192,y&63|128)}else if(y<65536){if((p-=3)<0)break;B.push(y>>12|224,y>>6&63|128,y&63|128)}else if(y<1114112){if((p-=4)<0)break;B.push(y>>18|240,y>>12&63|128,y>>6&63|128,y&63|128)}else throw new Error("Invalid code point")}return B}function Ie(u){for(var p=[],y=0;y<u.length;++y)p.push(u.charCodeAt(y)&255);return p}function je(u,p){for(var y,T,L,B=[],Q=0;Q<u.length&&!((p-=2)<0);++Q)y=u.charCodeAt(Q),T=y>>8,L=y%256,B.push(L),B.push(T);return B}function It(u){return d_.toByteArray(ve(u))}function He(u,p,y,T){for(var L=0;L<T&&!(L+y>=p.length||L>=u.length);++L)p[L+y]=u[L];return L}function Xe(u,p){return u instanceof p||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===p.name}function Pt(u){return u!==u}var ke=function(){for(var u="0123456789abcdef",p=new Array(256),y=0;y<16;++y)for(var T=y*16,L=0;L<16;++L)p[T+L]=u[y]+u[L];return p}()}),at=Wf.Buffer;Wf.SlowBuffer;Wf.INSPECT_MAX_BYTES;Wf.kMaxLength;var g_=function(e,t){return g_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},g_(e,t)};function Gf(e,t){g_(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ds=function(e){Gf(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),jt=function(e){Gf(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function jf(e){return e&&e.Math==Math&&e}function QI(){return jf(typeof globalThis=="object"&&globalThis)||jf(typeof window=="object"&&window)||jf(typeof self=="object"&&self)||jf(typeof global=="object"&&global)||Function("return this")()}function A2(){var e=QI();return typeof e.navigator=="object"&&e.navigator.product==="ReactNative"}var M2=function(e){var t=A2()?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(t);for(var n=at.alloc(e),r=0;r<e;++r)n[r]=Math.floor(Math.random()*256);return n},O2=function(){{if(typeof window<"u"){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(at.alloc(t))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(t){return global.crypto.getRandomValues(at.alloc(t))}:M2}},eT=O2();function P2(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function v_(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function k2(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function L2(e){return Rl(e)&&Object.prototype.toString.call(e)==="[object Date]"}function Rl(e){return typeof e=="object"&&e!==null}function zf(e,t){var n=!1;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return n||(console.warn(t),n=!0),e.apply(this,i)}return r}function $f(e){if(ArrayBuffer.isView(e))return at.from(e.buffer,e.byteOffset,e.byteLength);if(P2(e))return at.from(e);throw new jt("Must use either Buffer or TypedArray")}var F2=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,tT=function(e){return typeof e=="string"&&F2.test(e)},y_=function(e){if(!tT(e))throw new jt('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return at.from(t,"hex")},FI=function(e,t){return t===void 0&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")},JK=Math.pow(2,63)-1,QK=-Math.pow(2,63),B2=Math.pow(2,53),V2=-Math.pow(2,53),nT=4,Is=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(t!=null&&typeof t!="string"&&!ArrayBuffer.isView(t)&&!(t instanceof ArrayBuffer)&&!Array.isArray(t))throw new jt("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=n??e.BSON_BINARY_SUBTYPE_DEFAULT,t==null?(this.buffer=at.alloc(e.BUFFER_SIZE),this.position=0):(typeof t=="string"?this.buffer=at.from(t,"binary"):Array.isArray(t)?this.buffer=at.from(t):this.buffer=$f(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if(typeof t=="string"&&t.length!==1)throw new jt("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new jt("only accepts single character Uint8Array or Array");var n;if(typeof t=="string"?n=t.charCodeAt(0):typeof t=="number"?n=t:n=t[0],n<0||n>255)throw new jt("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=at.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},e.prototype.write=function(t,n){if(n=typeof n=="number"?n:this.position,this.buffer.length<n+t.length){var r=at.alloc(this.buffer.length+t.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(t)?(this.buffer.set($f(t),n),this.position=n+t.byteLength>this.position?n+t.length:this.position):typeof t=="string"&&(this.buffer.write(t,n,t.length,"binary"),this.position=n+t.length>this.position?n+t.length:this.position)},e.prototype.read=function(t,n){return n=n&&n>0?n:this.position,this.buffer.slice(t,t+n)},e.prototype.value=function(t){return t=!!t,t&&this.buffer.length===this.position?this.buffer:t?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(t){return this.buffer.toString(t)},e.prototype.toExtendedJSON=function(t){t=t||{};var n=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return t.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new BI(this.buffer.slice(0,this.position));throw new Ds('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,n){n=n||{};var r,i;if("$binary"in t?n.legacy&&typeof t.$binary=="string"&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,r=at.from(t.$binary,"base64")):typeof t.$binary!="string"&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=at.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,r=y_(t.$uuid)),!r)throw new jt("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===nT?new BI(r):new e(r,i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.value(!0);return'new Binary(Buffer.from("'.concat(t.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(Is.prototype,"_bsontype",{value:"Binary"});var f_=16,BI=function(e){Gf(t,e);function t(n){var r=this,i,s;if(n==null)i=t.generate();else if(n instanceof t)i=at.from(n.buffer),s=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===f_)i=$f(n);else if(typeof n=="string")i=y_(n);else throw new jt("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");return r=e.call(this,i,nT)||this,r.__id=s,r}return Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,t.cacheHexString&&(this.__id=FI(n))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(n){if(n===void 0&&(n=!0),t.cacheHexString&&this.__id)return this.__id;var r=FI(this.id,n);return t.cacheHexString&&(this.__id=r),r},t.prototype.toString=function(n){return n?this.id.toString(n):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(n){if(!n)return!1;if(n instanceof t)return n.id.equals(this.id);try{return new t(n).id.equals(this.id)}catch{return!1}},t.prototype.toBinary=function(){return new Is(this.id,Is.SUBTYPE_UUID)},t.generate=function(){var n=eT(f_);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,at.from(n)},t.isValid=function(n){return n?n instanceof t?!0:typeof n=="string"?tT(n):v_(n)?n.length!==f_?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},t.createFromHexString=function(n){var r=y_(n);return new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(Is),qf=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);this.code=t,this.scope=n}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.toJSON();return'new Code("'.concat(String(t.code),'"').concat(t.scope?", ".concat(JSON.stringify(t.scope)):"",")")},e}();Object.defineProperty(qf.prototype,"_bsontype",{value:"Code"});function U2(e){return Rl(e)&&e.$id!=null&&typeof e.$ref=="string"&&(e.$db==null||typeof e.$db=="string")}var Tl=function(){function e(t,n,r,i){if(!(this instanceof e))return new e(t,n,r,i);var s=t.split(".");s.length===2&&(r=s.shift(),t=s.shift()),this.collection=t,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(t){this.collection=t},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(t.$db=this.db),t},e.prototype.toExtendedJSON=function(t){t=t||{};var n={$ref:this.collection,$id:this.oid};return t.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n},e.fromExtendedJSON=function(t){var n=Object.assign({},t);return delete n.$ref,delete n.$id,delete n.$db,new e(t.$ref,t.$id,t.$db,n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(t),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(Tl.prototype,"_bsontype",{value:"DBRef"});var Ir=void 0;try{Ir=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}var VI=65536,H2=1<<24,$a=VI*VI,rT=$a*$a,UI=rT/2,HI={},jI={},le=function(){function e(t,n,r){if(t===void 0&&(t=0),!(this instanceof e))return new e(t,n,r);typeof t=="bigint"?Object.assign(this,e.fromBigInt(t,!!n)):typeof t=="string"?Object.assign(this,e.fromString(t,!!n)):(this.low=t|0,this.high=n|0,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,n,r){return new e(t,n,r)},e.fromInt=function(t,n){var r,i,s;return n?(t>>>=0,(s=0<=t&&t<256)&&(i=jI[t],i)?i:(r=e.fromBits(t,(t|0)<0?-1:0,!0),s&&(jI[t]=r),r)):(t|=0,(s=-128<=t&&t<128)&&(i=HI[t],i)?i:(r=e.fromBits(t,t<0?-1:0,!1),s&&(HI[t]=r),r))},e.fromNumber=function(t,n){if(isNaN(t))return n?e.UZERO:e.ZERO;if(n){if(t<0)return e.UZERO;if(t>=rT)return e.MAX_UNSIGNED_VALUE}else{if(t<=-UI)return e.MIN_VALUE;if(t+1>=UI)return e.MAX_VALUE}return t<0?e.fromNumber(-t,n).neg():e.fromBits(t%$a|0,t/$a|0,n)},e.fromBigInt=function(t,n){return e.fromString(t.toString(),n)},e.fromString=function(t,n,r){if(t.length===0)throw Error("empty string");if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return e.ZERO;if(typeof n=="number"?(r=n,n=!1):n=!!n,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return e.fromString(t.substring(1),n,r).neg();for(var s=e.fromNumber(Math.pow(r,8)),o=e.ZERO,a=0;a<t.length;a+=8){var l=Math.min(8,t.length-a),c=parseInt(t.substring(a,a+l),r);if(l<8){var h=e.fromNumber(Math.pow(r,l));o=o.mul(h).add(e.fromNumber(c))}else o=o.mul(s),o=o.add(e.fromNumber(c))}return o.unsigned=n,o},e.fromBytes=function(t,n,r){return r?e.fromBytesLE(t,n):e.fromBytesBE(t,n)},e.fromBytesLE=function(t,n){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},e.fromBytesBE=function(t,n){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},e.isLong=function(t){return Rl(t)&&t.__isLong__===!0},e.fromValue=function(t,n){return typeof t=="number"?e.fromNumber(t,n):typeof t=="string"?e.fromString(t,n):e.fromBits(t.low,t.high,typeof n=="boolean"?n:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,s=this.low&65535,o=t.high>>>16,a=t.high&65535,l=t.low>>>16,c=t.low&65535,h=0,d=0,f=0,g=0;return g+=s+c,f+=g>>>16,g&=65535,f+=i+l,d+=f>>>16,f&=65535,d+=r+a,h+=d>>>16,d&=65535,h+=n+o,h&=65535,e.fromBits(f<<16|g,h<<16|d,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(t){return this.compare(t)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(Ir){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?Ir.div_u:Ir.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,Ir.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,i,s;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;s=e.UZERO}else{if(this.eq(e.MIN_VALUE)){if(t.eq(e.ONE)||t.eq(e.NEG_ONE))return e.MIN_VALUE;if(t.eq(e.MIN_VALUE))return e.ONE;var o=this.shr(1);return r=o.div(t).shl(1),r.eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(r)),s=r.add(i.div(t)),s)}else if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=e.ZERO}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),l=a<=48?1:Math.pow(2,a-48),c=e.fromNumber(r),h=c.mul(t);h.isNegative()||h.gt(i);)r-=l,c=e.fromNumber(r,this.unsigned),h=c.mul(t);c.isZero()&&(c=e.ONE),s=s.add(c),i=i.sub(h)}return s},e.prototype.div=function(t){return this.divide(t)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},e.prototype.eq=function(t){return this.equals(t)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t=this.high!==0?this.high:this.low,n;for(n=31;n>0&&(t&1<<n)===0;n--);return this.high!==0?n+33:n+1},e.prototype.greaterThan=function(t){return this.comp(t)>0},e.prototype.gt=function(t){return this.greaterThan(t)},e.prototype.greaterThanOrEqual=function(t){return this.comp(t)>=0},e.prototype.gte=function(t){return this.greaterThanOrEqual(t)},e.prototype.ge=function(t){return this.greaterThanOrEqual(t)},e.prototype.isEven=function(){return(this.low&1)===0},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return(this.low&1)===1},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return this.high===0&&this.low===0},e.prototype.lessThan=function(t){return this.comp(t)<0},e.prototype.lt=function(t){return this.lessThan(t)},e.prototype.lessThanOrEqual=function(t){return this.comp(t)<=0},e.prototype.lte=function(t){return this.lessThanOrEqual(t)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),Ir){var n=(this.unsigned?Ir.rem_u:Ir.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,Ir.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(t){return this.modulo(t)},e.prototype.rem=function(t){return this.modulo(t)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),Ir){var n=Ir.mul(this.low,this.high,t.low,t.high);return e.fromBits(n,Ir.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,s=this.low>>>16,o=this.low&65535,a=t.high>>>16,l=t.high&65535,c=t.low>>>16,h=t.low&65535,d=0,f=0,g=0,m=0;return m+=o*h,g+=m>>>16,m&=65535,g+=s*h,f+=g>>>16,g&=65535,g+=o*c,f+=g>>>16,g&=65535,f+=i*h,d+=f>>>16,f&=65535,f+=s*c,d+=f>>>16,f&=65535,f+=o*l,d+=f>>>16,f&=65535,d+=r*h+i*c+s*l+o*a,d&=65535,e.fromBits(g<<16|m,d<<16|f,this.unsigned)},e.prototype.mul=function(t){return this.multiply(t)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(t){return!this.equals(t)},e.prototype.neq=function(t){return this.notEquals(t)},e.prototype.ne=function(t){return this.notEquals(t)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(t){return this.shiftLeft(t)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(t){return this.shiftRight(t)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),t&=63,t===0)return this;var n=this.high;if(t<32){var r=this.low;return e.fromBits(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?e.fromBits(n,0,this.unsigned):e.fromBits(n>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(t){return this.shiftRightUnsigned(t)},e.prototype.shru=function(t){return this.shiftRightUnsigned(t)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(t){return this.subtract(t)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*$a+(this.low>>>0):this.high*$a+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},e.prototype.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(e.MIN_VALUE)){var n=e.fromNumber(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var s=e.fromNumber(Math.pow(t,6),this.unsigned),o=this,a="";;){var l=o.div(s),c=o.sub(l.mul(s)).toInt()>>>0,h=c.toString(t);if(o=l,o.isZero())return h+a;for(;h.length<6;)h="0"+h;a=""+h+a}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(t){return this.lessThanOrEqual(t)},e.prototype.toExtendedJSON=function(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,n){var r=e.fromString(t.$numberLong);return n&&n.relaxed?r.toNumber():r},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(H2),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(le.prototype,"__isLong__",{value:!0});Object.defineProperty(le.prototype,"_bsontype",{value:"Long"});var j2=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,$2=/^(\+|-)?(Infinity|inf)$/i,W2=/^(\+|-)?NaN$/i,Il=6111,p_=-6176,$I=6176,G2=34,h_=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),WI=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),GI=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),z2=/^([-+])?(\d+)?$/,q2=31,zI=16383,Y2=30,K2=31;function qI(e){return!isNaN(parseInt(e,10))}function Z2(e){var t=le.fromNumber(1e9),n=le.fromNumber(0);if(!e.parts[0]&&!e.parts[1]&&!e.parts[2]&&!e.parts[3])return{quotient:e,rem:n};for(var r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new le(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function X2(e,t){if(!e&&!t)return{high:le.fromNumber(0),low:le.fromNumber(0)};var n=e.shiftRightUnsigned(32),r=new le(e.getLowBits(),0),i=t.shiftRightUnsigned(32),s=new le(t.getLowBits(),0),o=n.multiply(i),a=n.multiply(s),l=r.multiply(i),c=r.multiply(s);return o=o.add(a.shiftRightUnsigned(32)),a=new le(a.getLowBits(),0).add(l).add(c.shiftRightUnsigned(32)),o=o.add(a.shiftRightUnsigned(32)),c=a.shiftLeft(32).add(new le(c.getLowBits(),0)),{high:o,low:c}}function J2(e,t){var n=e.high>>>0,r=t.high>>>0;if(n<r)return!0;if(n===r){var i=e.low>>>0,s=t.low>>>0;if(i<s)return!0}return!1}function ja(e,t){throw new jt('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var __=function(){function e(t){if(!(this instanceof e))return new e(t);if(typeof t=="string")this.bytes=e.fromString(t).bytes;else if(v_(t)){if(t.byteLength!==16)throw new jt("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new jt("Decimal128 must take a Buffer or string")}return e.fromString=function(t){var n=!1,r=!1,i=!1,s=0,o=0,a=0,l=0,c=0,h=[0],d=0,f=0,g=0,m=0,_=0,x=0,A=new le(0,0),F=new le(0,0),U=0,M=0;if(t.length>=7e3)throw new jt(""+t+" not a valid Decimal128 string");var Y=t.match(j2),Ae=t.match($2),ct=t.match(W2);if(!Y&&!Ae&&!ct||t.length===0)throw new jt(""+t+" not a valid Decimal128 string");if(Y){var j=Y[2],fe=Y[4],te=Y[5],pe=Y[6];fe&&pe===void 0&&ja(t,"missing exponent power"),fe&&j===void 0&&ja(t,"missing exponent base"),fe===void 0&&(te||pe)&&ja(t,"missing e before exponent")}if((t[M]==="+"||t[M]==="-")&&(n=t[M++]==="-"),!qI(t[M])&&t[M]!=="."){if(t[M]==="i"||t[M]==="I")return new e(at.from(n?WI:GI));if(t[M]==="N")return new e(at.from(h_))}for(;qI(t[M])||t[M]===".";){if(t[M]==="."){r&&ja(t,"contains multiple periods"),r=!0,M=M+1;continue}d<34&&(t[M]!=="0"||i)&&(i||(c=o),i=!0,h[f++]=parseInt(t[M],10),d=d+1),i&&(a=a+1),r&&(l=l+1),o=o+1,M=M+1}if(r&&!o)throw new jt(""+t+" not a valid Decimal128 string");if(t[M]==="e"||t[M]==="E"){var Le=t.substr(++M).match(z2);if(!Le||!Le[2])return new e(at.from(h_));_=parseInt(Le[0],10),M=M+Le[0].length}if(t[M])return new e(at.from(h_));if(g=0,!d)g=0,m=0,h[0]=0,a=1,d=1,s=0;else if(m=d-1,s=a,s!==1)for(;h[c+s-1]===0;)s=s-1;for(_<=l&&l-_>16384?_=p_:_=_-l;_>Il;){if(m=m+1,m-g>G2){var ut=h.join("");if(ut.match(/^0+$/)){_=Il;break}ja(t,"overflow")}_=_-1}for(;_<p_||d<a;){if(m===0&&s<d){_=p_,s=0;break}if(d<a?a=a-1:m=m-1,_<Il)_=_+1;else{var ut=h.join("");if(ut.match(/^0+$/)){_=Il;break}ja(t,"overflow")}}if(m-g+1<s){var E=o;r&&(c=c+1,E=E+1),n&&(c=c+1,E=E+1);var $t=parseInt(t[c+m+1],10),Bt=0;if($t>=5&&(Bt=1,$t===5)){for(Bt=h[m]%2===1?1:0,x=c+m+2;x<E;x++)if(parseInt(t[x],10)){Bt=1;break}}if(Bt){for(var qe=m;qe>=0;qe--)if(++h[qe]>9&&(h[qe]=0,qe===0))if(_<Il)_=_+1,h[qe]=1;else return new e(at.from(n?WI:GI))}}if(A=le.fromNumber(0),F=le.fromNumber(0),s===0)A=le.fromNumber(0),F=le.fromNumber(0);else if(m-g<17){var qe=g;for(F=le.fromNumber(h[qe++]),A=new le(0,0);qe<=m;qe++)F=F.multiply(le.fromNumber(10)),F=F.add(le.fromNumber(h[qe]))}else{var qe=g;for(A=le.fromNumber(h[qe++]);qe<=m-17;qe++)A=A.multiply(le.fromNumber(10)),A=A.add(le.fromNumber(h[qe]));for(F=le.fromNumber(h[qe++]);qe<=m;qe++)F=F.multiply(le.fromNumber(10)),F=F.add(le.fromNumber(h[qe]))}var Kt=X2(A,le.fromString("100000000000000000"));Kt.low=Kt.low.add(F),J2(Kt.low,F)&&(Kt.high=Kt.high.add(le.fromNumber(1))),U=_+$I;var Se={low:le.fromNumber(0),high:le.fromNumber(0)};Kt.high.shiftRightUnsigned(49).and(le.fromNumber(1)).equals(le.fromNumber(1))?(Se.high=Se.high.or(le.fromNumber(3).shiftLeft(61)),Se.high=Se.high.or(le.fromNumber(U).and(le.fromNumber(16383).shiftLeft(47))),Se.high=Se.high.or(Kt.high.and(le.fromNumber(0x7fffffffffff)))):(Se.high=Se.high.or(le.fromNumber(U&16383).shiftLeft(49)),Se.high=Se.high.or(Kt.high.and(le.fromNumber(562949953421311)))),Se.low=Kt.low,n&&(Se.high=Se.high.or(le.fromString("9223372036854775808")));var D=at.alloc(16);return M=0,D[M++]=Se.low.low&255,D[M++]=Se.low.low>>8&255,D[M++]=Se.low.low>>16&255,D[M++]=Se.low.low>>24&255,D[M++]=Se.low.high&255,D[M++]=Se.low.high>>8&255,D[M++]=Se.low.high>>16&255,D[M++]=Se.low.high>>24&255,D[M++]=Se.high.low&255,D[M++]=Se.high.low>>8&255,D[M++]=Se.high.low>>16&255,D[M++]=Se.high.low>>24&255,D[M++]=Se.high.high&255,D[M++]=Se.high.high>>8&255,D[M++]=Se.high.high>>16&255,D[M++]=Se.high.high>>24&255,new e(D)},e.prototype.toString=function(){for(var t,n=0,r=new Array(36),i=0;i<r.length;i++)r[i]=0;var s=0,o=!1,a,l={parts:[0,0,0,0]},c,h,d=[];s=0;var f=this.bytes,g=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,m=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,_=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,x=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24;s=0;var A={low:new le(g,m),high:new le(_,x)};A.high.lessThan(le.ZERO)&&d.push("-");var F=x>>26&q2;if(F>>3===3){if(F===Y2)return d.join("")+"Infinity";if(F===K2)return"NaN";t=x>>15&zI,a=8+(x>>14&1)}else a=x>>14&7,t=x>>17&zI;var U=t-$I;if(l.parts[0]=(x&16383)+((a&15)<<14),l.parts[1]=_,l.parts[2]=m,l.parts[3]=g,l.parts[0]===0&&l.parts[1]===0&&l.parts[2]===0&&l.parts[3]===0)o=!0;else for(h=3;h>=0;h--){var M=0,Y=Z2(l);if(l=Y.quotient,M=Y.rem.low,!!M)for(c=8;c>=0;c--)r[h*9+c]=M%10,M=Math.floor(M/10)}if(o)n=1,r[s]=0;else for(n=36;!r[s];)n=n-1,s=s+1;var Ae=n-1+U;if(Ae>=34||Ae<=-7||U>0){if(n>34)return d.push("".concat(0)),U>0?d.push("E+".concat(U)):U<0&&d.push("E".concat(U)),d.join("");d.push("".concat(r[s++])),n=n-1,n&&d.push(".");for(var i=0;i<n;i++)d.push("".concat(r[s++]));d.push("E"),Ae>0?d.push("+".concat(Ae)):d.push("".concat(Ae))}else if(U>=0)for(var i=0;i<n;i++)d.push("".concat(r[s++]));else{var ct=n+U;if(ct>0)for(var i=0;i<ct;i++)d.push("".concat(r[s++]));else d.push("0");for(d.push(".");ct++<0;)d.push("0");for(var i=0;i<n-Math.max(ct-1,0);i++)d.push("".concat(r[s++]))}return d.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(__.prototype,"_bsontype",{value:"Decimal128"});var Yf=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(t){return this.value.toString(t)},e.prototype.toExtendedJSON=function(t){return t&&(t.legacy||t.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},e.fromExtendedJSON=function(t,n){var r=parseFloat(t.$numberDouble);return n&&n.relaxed?r:new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var t=this.toExtendedJSON();return"new Double(".concat(t.$numberDouble,")")},e}();Object.defineProperty(Yf.prototype,"_bsontype",{value:"Double"});var Kf=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t|0}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(t){return this.value.toString(t)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,n){return n&&n.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(Kf.prototype,"_bsontype",{value:"Int32"});var E_=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(E_.prototype,"_bsontype",{value:"MaxKey"});var w_=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(w_.prototype,"_bsontype",{value:"MinKey"});var Q2=new RegExp("^[0-9a-fA-F]{24}$"),Ss=null,mi=Symbol("id"),un=function(){function e(t){if(!(this instanceof e))return new e(t);var n;if(typeof t=="object"&&t&&"id"in t){if(typeof t.id!="string"&&!ArrayBuffer.isView(t.id))throw new jt("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?n=at.from(t.toHexString(),"hex"):n=t.id}else n=t;if(n==null||typeof n=="number")this[mi]=e.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[mi]=n instanceof at?n:$f(n);else if(typeof n=="string")if(n.length===12){var r=at.from(n);if(r.byteLength===12)this[mi]=r;else throw new jt("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&Q2.test(n))this[mi]=at.from(n,"hex");else throw new jt("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new jt("Argument passed in does not match the accepted types");e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[mi]},set:function(t){this[mi]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(t){this.id.writeUInt32BE(t,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){typeof t!="number"&&(t=Math.floor(Date.now()/1e3));var n=e.getInc(),r=at.alloc(12);return r.writeUInt32BE(t,0),Ss===null&&(Ss=eT(5)),r[4]=Ss[0],r[5]=Ss[1],r[6]=Ss[2],r[7]=Ss[3],r[8]=Ss[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r},e.prototype.toString=function(t){return t?this.id.toString(t):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(t==null)return!1;if(t instanceof e)return this[mi][11]===t[mi][11]&&this[mi].equals(t[mi]);if(typeof t=="string"&&e.isValid(t)&&t.length===12&&v_(this.id))return t===at.prototype.toString.call(this.id,"latin1");if(typeof t=="string"&&e.isValid(t)&&t.length===24)return t.toLowerCase()===this.toHexString();if(typeof t=="string"&&e.isValid(t)&&t.length===12)return at.from(t).equals(this.id);if(typeof t=="object"&&"toHexString"in t&&typeof t.toHexString=="function"){var n=t.toHexString(),r=this.toHexString().toLowerCase();return typeof n=="string"&&n.toLowerCase()===r}return!1},e.prototype.getTimestamp=function(){var t=new Date,n=this.id.readUInt32BE(0);return t.setTime(Math.floor(n)*1e3),t},e.createPk=function(){return new e},e.createFromTime=function(t){var n=at.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(t,0),new e(n)},e.createFromHexString=function(t){if(typeof t>"u"||t!=null&&t.length!==24)throw new jt("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(at.from(t,"hex"))},e.isValid=function(t){if(t==null)return!1;try{return new e(t),!0}catch{return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(Math.random()*16777215),e}();Object.defineProperty(un.prototype,"generate",{value:zf(function(e){return un.generate(e)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(un.prototype,"getInc",{value:zf(function(){return un.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(un.prototype,"get_inc",{value:zf(function(){return un.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(un,"get_inc",{value:zf(function(){return un.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(un.prototype,"_bsontype",{value:"ObjectID"});function eV(e){return e.split("").sort().join("")}var xl=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(this.pattern=t,this.options=eV(n??""),this.pattern.indexOf("\0")!==-1)throw new Ds("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new Ds("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if(!(this.options[r]==="i"||this.options[r]==="m"||this.options[r]==="x"||this.options[r]==="l"||this.options[r]==="s"||this.options[r]==="u"))throw new Ds("The regular expression option [".concat(this.options[r],"] is not supported"))}return e.parseOptions=function(t){return t?t.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(t){return t=t||{},t.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t)if(typeof t.$regex!="string"){if(t.$regex._bsontype==="BSONRegExp")return t}else return new e(t.$regex,e.parseOptions(t.$options));if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new jt("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(xl.prototype,"_bsontype",{value:"BSONRegExp"});var b_=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(b_.prototype,"_bsontype",{value:"Symbol"});var tV=le,iT=function(e){Gf(t,e);function t(n,r){var i=this;return i instanceof t?(le.isLong(n)?i=e.call(this,n.low,n.high,!0)||this:Rl(n)&&typeof n.t<"u"&&typeof n.i<"u"?i=e.call(this,n.i,n.t,!0)||this:i=e.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(n,r)}return t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(n){return new t(le.fromInt(n,!0))},t.fromNumber=function(n){return new t(le.fromNumber(n,!0))},t.fromBits=function(n,r){return new t(n,r)},t.fromString=function(n,r){return new t(le.fromString(n,!0,r))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(n){return new t(n.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=le.MAX_UNSIGNED_VALUE,t}(tV);function nV(e){return Rl(e)&&Reflect.has(e,"_bsontype")&&typeof e._bsontype=="string"}var oT=2147483647,sT=-2147483648,aT=9223372036854776e3,cT=-9223372036854776e3,rV={$oid:un,$binary:Is,$uuid:Is,$symbol:b_,$numberInt:Kf,$numberDecimal:__,$numberDouble:Yf,$numberLong:le,$minKey:w_,$maxKey:E_,$regex:xl,$regularExpression:xl,$timestamp:iT};function lT(e,t){if(t===void 0&&(t={}),typeof e=="number"){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=sT&&e<=oT)return new Kf(e);if(e>=cT&&e<=aT)return le.fromNumber(e)}return new Yf(e)}if(e==null||typeof e!="object")return e;if(e.$undefined)return null;for(var n=Object.keys(e).filter(function(d){return d.startsWith("$")&&e[d]!=null}),r=0;r<n.length;r++){var i=rV[n[r]];if(i)return i.fromExtendedJSON(e,t)}if(e.$date!=null){var s=e.$date,o=new Date;return t.legacy?typeof s=="number"?o.setTime(s):typeof s=="string"&&o.setTime(Date.parse(s)):typeof s=="string"?o.setTime(Date.parse(s)):le.isLong(s)?o.setTime(s.toNumber()):typeof s=="number"&&t.relaxed&&o.setTime(s),o}if(e.$code!=null){var a=Object.assign({},e);return e.$scope&&(a.$scope=lT(e.$scope)),qf.fromExtendedJSON(e)}if(U2(e)||e.$dbPointer){var l=e.$ref?e:e.$dbPointer;if(l instanceof Tl)return l;var c=Object.keys(l).filter(function(d){return d.startsWith("$")}),h=!0;if(c.forEach(function(d){["$ref","$id","$db"].indexOf(d)===-1&&(h=!1)}),h)return Tl.fromExtendedJSON(l)}return e}function iV(e,t){return e.map(function(n,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return bo(n,t)}finally{t.seenObjects.pop()}})}function YI(e){var t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function bo(e,t){if((typeof e=="object"||typeof e=="function")&&e!==null){var n=t.seenObjects.findIndex(function(A){return A.obj===e});if(n!==-1){var r=t.seenObjects.map(function(A){return A.propertyName}),i=r.slice(0,n).map(function(A){return"".concat(A," -> ")}).join(""),s=r[n],o=" -> "+r.slice(n+1,r.length-1).map(function(A){return"".concat(A," -> ")}).join(""),a=r[r.length-1],l=" ".repeat(i.length+s.length/2),c="-".repeat(o.length+(s.length+a.length)/2-1);throw new jt(`Converting circular structure to EJSON:
|
|
42
|
-
`+" ".concat(i).concat(s).concat(o).concat(a,`
|
|
43
|
-
`)+" ".concat(l,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return iV(e,t);if(e===void 0)return null;if(e instanceof Date||L2(e)){var h=e.getTime(),d=h>-1&&h<2534023188e5;return t.legacy?t.relaxed&&d?{$date:e.getTime()}:{$date:YI(e)}:t.relaxed&&d?{$date:YI(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Math.floor(e)===e){var f=e>=sT&&e<=oT,g=e>=cT&&e<=aT;if(f)return{$numberInt:e.toString()};if(g)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||k2(e)){var m=e.flags;if(m===void 0){var _=e.toString().match(/[gimuy]*$/);_&&(m=_[0])}var x=new xl(e.source,m);return x.toExtendedJSON(t)}return e!=null&&typeof e=="object"?sV(e,t):e}var oV={Binary:function(e){return new Is(e.value(),e.sub_type)},Code:function(e){return new qf(e.code,e.scope)},DBRef:function(e){return new Tl(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new __(e.bytes)},Double:function(e){return new Yf(e.value)},Int32:function(e){return new Kf(e.value)},Long:function(e){return le.fromBits(e.low!=null?e.low:e.low_,e.low!=null?e.high:e.high_,e.low!=null?e.unsigned:e.unsigned_)},MaxKey:function(){return new E_},MinKey:function(){return new w_},ObjectID:function(e){return new un(e)},ObjectId:function(e){return new un(e)},BSONRegExp:function(e){return new xl(e.pattern,e.options)},Symbol:function(e){return new b_(e.value)},Timestamp:function(e){return iT.fromBits(e.low,e.high)}};function sV(e,t){if(e==null||typeof e!="object")throw new Ds("not an object instance");var n=e._bsontype;if(typeof n>"u"){var r={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var s=bo(e[i],t);i==="__proto__"?Object.defineProperty(r,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):r[i]=s}finally{t.seenObjects.pop()}}return r}else if(nV(e)){var o=e;if(typeof o.toExtendedJSON!="function"){var a=oV[e._bsontype];if(!a)throw new jt("Unrecognized or invalid _bsontype: "+e._bsontype);o=a(o)}return n==="Code"&&o.scope?o=new qf(o.code,bo(o.scope,t)):n==="DBRef"&&o.oid&&(o=new Tl(bo(o.collection,t),bo(o.oid,t),bo(o.db,t),bo(o.fields,t))),o.toExtendedJSON(t)}else throw new Ds("_bsontype must be a string, but was: "+typeof n)}var KI;(function(e){function t(s,o){var a=Object.assign({},{relaxed:!0,legacy:!1},o);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(s,function(l,c){if(l.indexOf("\0")!==-1)throw new Ds("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return lT(c,a)})}e.parse=t;function n(s,o,a,l){a!=null&&typeof a=="object"&&(l=a,a=0),o!=null&&typeof o=="object"&&!Array.isArray(o)&&(l=o,o=void 0,a=0);var c=Object.assign({relaxed:!0,legacy:!1},l,{seenObjects:[{propertyName:"(root)",obj:null}]}),h=bo(s,c);return JSON.stringify(h,o,a)}e.stringify=n;function r(s,o){return o=o||{},JSON.parse(n(s,o))}e.serialize=r;function i(s,o){return o=o||{},t(JSON.stringify(s),o)}e.deserialize=i})(KI||(KI={}));var ZI,XI=QI();XI.Map?ZI=XI.Map:ZI=function(){function e(t){t===void 0&&(t=[]),this._keys=[],this._values={};for(var n=0;n<t.length;n++)if(t[n]!=null){var r=t[n],i=r[0],s=r[1];this._keys.push(i),this._values[i]={v:s,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(t){var n=this._values[t];return n==null?!1:(delete this._values[t],this._keys.splice(n.i,1),!0)},e.prototype.entries=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?[r,t._values[r].v]:void 0,done:r===void 0}}}},e.prototype.forEach=function(t,n){n=n||this;for(var r=0;r<this._keys.length;r++){var i=this._keys[r];t.call(n,this._values[i].v,i,n)}},e.prototype.get=function(t){return this._values[t]?this._values[t].v:void 0},e.prototype.has=function(t){return this._values[t]!=null},e.prototype.keys=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?r:void 0,done:r===void 0}}}},e.prototype.set=function(t,n){return this._values[t]?(this._values[t].v=n,this):(this._keys.push(t),this._values[t]={v:n,i:this._keys.length-1},this)},e.prototype.values=function(){var t=this,n=0;return{next:function(){var r=t._keys[n++];return{value:r!==void 0?t._values[r].v:void 0,done:r===void 0}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var eZ=le.fromNumber(B2),tZ=le.fromNumber(V2),m_=new Uint8Array(8),nZ=new DataView(m_.buffer,m_.byteOffset,m_.byteLength),aV=1024*1024*17,rZ=at.alloc(aV),Co=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(e){e=e||{},this.triggerID=e.id||e.triggerID,this.nudgeID=e.nudgeID,this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.contentID=e.contentID,this.variation=e.variation,this.props=e.props,this.objective=e.objective,this.onsiteDeliveryType=e.onsiteDeliveryType,this.holdout=e.holdout}},Pe=class{constructor(e,t={},n,r){this.name=e,this.properties=t,this.id=r?new un(r):new un,this.occurred=new Date,n&&(this.trigger=new Co(n)),this.newEvent=!r}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale},Rt=class{static COOEE_URL_PREFIX="?from=cooee";static isShopify(){return!!window.Shopify}static getShopName(){if(this.isShopify())return window.Shopify.shop?.split(".")?.[0]}static getPageName(){if(!this.isShopify())return;let e=new URL(window.location.href).pathname.slice(1).split("/"),t=e[0];if(t==="")return"home";if(t==="collections")return e[2]==="products"?"product":"collection";if(t==="products")return"product";if(t==="cart")return"cart";if(location.href.includes("thank_you"))return"thank_you"}static getProductSlug(e){let t=(e.includes("://")?new URL(e).pathname:e).match(/\/products\/([^/]+?)(?:\.html)?$/);return t?t[1]:null}static getRootPrefix(){return window.Shopify?.routes?.root??"/"}static getCartURL(e){return this.getRootPrefix()+e+this.COOEE_URL_PREFIX}},Wa=class{isLocked=!1;queue=[];async acquire(){if(this.isLocked)await new Promise(e=>this.queue.push(e));else{this.isLocked=!0;return}}release(){if(this.queue.length>0){let e=this.queue.shift();e&&e()}else this.isLocked=!1}},Ue=class qS{static CURRENT;token;items;total_price;original_total_price;currency;item_count;attributes;lock=new Wa;constructor(){}static getCurrent(){return this.CURRENT||(this.CURRENT=new qS),this.CURRENT}async getNormalisedCart(t){await this.fetchCartFromShopify(t);let n=this.convertToCooeeCart();return t&&await rt.set(ge.CURRENT_CART,n),n}async addCooeeAttributes(){await this.lock.acquire();let t=await yn.get(ge.ID),n=await rt.get(ge.DEVICE_ID);if(this.attributes?.letscooee_did===n&&this.attributes?.letscooee_sid===t){b.debug("Not calling Shopify update.js API.","Current attributes:",this.attributes),this.lock.release();return}let r={letscooee_did:n,letscooee_sid:t,__letscooee_time:new Date().toLocaleString()};b.debug("Updating Shopify cart with attributes:",r);let i=Rt.getCartURL("cart/update.js"),s=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:r})})).json();b.debug("Updated cart attributes",JSON.stringify(s)),this.update(s),this.lock.release()}update(t){return this.token=t.token,this.items=t.items,this.total_price=t.total_price,this.original_total_price=t.original_total_price,this.currency=t.currency,this.item_count=t.item_count,this.attributes=t.attributes,Oe.get().currencyCode=this.currency,b.log("Updated ShopifyCart",this),this}toString(){return`ShopifyCart(token: ${this.token}, itemCount: ${this.item_count})`}convertToCooeeCart(){return{amount:this.total_price/100,originalAmount:this.original_total_price/100,currency:this.currency,itemCount:this.item_count,items:this.normaliseItems(this.items),token:this.token}}normaliseItems(t){if(!t)return b.error("No item received to be sent"),[];Array.isArray(t)||(t=[t]);let n=[];for(let r of t){if(!r.id||!r.title){b.warn("Invalid item received",r);continue}let i={name:r.title,quantity:+r.quantity||1,mID:r.product_id?.toString(),vID:r.id.toString(),price:+r.price/100||0,properties:r.properties,key:r.key},s=r.selling_plan_allocation?.selling_plan;if(!s){n.push(i);continue}i.sellingPlanAllocation={sellingPlan:{fixedSellingPlan:s.fixed_selling_plan,id:s.id,name:s.name,recurringDeliveries:s.recurring_deliveries}},n.push(i)}return n}async fetchCartFromShopify(t){if(!t&&this.token){b.debug("Not fetching cart");return}b.debug("Fetching cart");let n=Rt.getCartURL("cart.js"),r=await(await fetch(n)).json();this.update(r)}},Zf=Re(fs()),yi=class ZS{static INSTANCE=new ZS;topics={};constructor(){}static get(){return this.INSTANCE}broadcast(t,n){this.topics[t]||(this.topics[t]=new ee),this.topics[t].next(n)}subscriber(t){return this.topics[t]||(this.topics[t]=new ee),this.topics[t].asObservable()}},zt=class hi{static DEFAULT_SELECTOR="cart-drawer";static _instance;inShadow=!1;cartDrawerElement;cartDrawerShadowElement;configWebsite=Ct.get().website??{};currentState=!1;drawerSubject=new Or({open:!1,firstOpen:!1});mutationObserver;firstOpen=!0;selector;shadowParentElementSelector;iconSelector=['button[drawer-to-open="cart-drawer"]','a[href="/cart"]',".header__icon--cart","#cart-icon-bubble",".cart-icon-bubble",".cart-count",'a[onclick*="handleFloCartBtn"]'].join(",");cartSelector=[hi.DEFAULT_SELECTOR,"#halo-cart-sidebar",'[role="dialog"][class*="cart" i]','[id*="section-cart" i]',"#sidebar-cart","#rebuy-cart","#mini-cart","#flo-cart-wrapper","#drawer-cart","#UpcartPopupBackDrop",'[id$="CartDrawer" i]'].join(",");constructor(){this.initialize(),document.addEventListener(k.CTA_AFTER_REFRESH_UI,this.updateBubble.bind(this))}get element(){return this.cartDrawerElement}static get(){return hi._instance||(hi._instance=new hi),hi._instance}static forceUpdate(){hi._instance=new hi}isOpen(){let t=this.inShadow?this.isPresent():this.isVisible();return Zf.default.log(`Cart drawer is currently ${t?"open":"close"}`),t}open(){if(this.isOpen()){b.log("Drawer is already open");return}document.dispatchEvent(new CustomEvent(k.CTA_OPEN_CART_EVENT));let t=document.querySelector(this.iconSelector);if(!t){b.debug("No clickable cart icon found with selector",this.iconSelector);return}t.click()}onToggle(){return this.drawerSubject}isShopifyDefaultDrawer(){return this.element?.tagName.toLowerCase()===hi.DEFAULT_SELECTOR}isMiniCart(){return this.isShopifyDefaultDrawer()&&this.element?.id==="mini-cart"}refreshUI(t,n=!0){if(this.isMiniCart()&&this.element?._rerenderCart)this.element._rerenderCart({detail:{cart:t}});else if(window.MinimogTheme?.Cart?.renderNewCart)window.MinimogTheme.Cart.renderNewCart();else if(this.isShopifyDefaultDrawer()&&this.element?.renderContents&&t)this.element.classList.remove("is-empty"),this.element.renderContents?.(t);else if(this.element?.onCartDrawerUpdate)this.element.onCartDrawerUpdate();else if(window.cartGiftUpdate){if(!t?.items?.[0])return;let r=t.items[0].id,i=t.items[0].quantity,s=t.items[0].price;window.cartGiftUpdate(r,s,i,"","ADD_TO_CART")}else if(window.icartCartActivityEvent)window.icartCartActivityEvent();else if(window.theme?.CartDrawer)window.theme?.CartDrawer.init?new window.theme.CartDrawer().init():new window.theme.CartDrawer;else if(window.Hs_CartDrawer?.updateSlideCart)window.Hs_CartDrawer.updateSlideCart();else if(window.theme?.fetch_side_cart)window.theme.fetch_side_cart();else if(window.theme?.Cart?.updateCart)window.theme.Cart.updateCart();else if(window.cartUpdate)window.cartUpdate();else if(this.element?._onCartRefresh)this.element._onCartRefresh();else if(window.cart?.getCart)window.cart.getCart();else if(this.element?.tagName?.toLowerCase()==="cart-drawer-component")document.dispatchEvent(new CustomEvent("action:cart:updateCartandShowCart"));else if(this.element?.id==="sidebar-cart")document.body.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{}}));else if(this.element?.id==="quick-cart"){let r=document.querySelector('a[href="/cart"]');r&&r.click()}else window.Shopify?.KT_onItemAdded?window.Shopify.KT_onItemAdded():window.sideCart?.updateCart?window.sideCart.updateCart():window.SLIDECART_UPDATE?(window.SLIDECART_UPDATE(),window.SLIDECART_OPEN?.()):(b.info("No method found to update the cart drawer. Blindly firing some events to try"),document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})));document.dispatchEvent(new CustomEvent(k.CTA_AFTER_REFRESH_UI)),n&&yi.get().broadcast(k.CART_UPDATE_BROADCAST)}async initialize(){let t=this.configWebsite.cartDrawerSelector;if(!t){await this.findCartDrawer();return}let n=t.split(k.SHADOW_SPLITTER);n.length===1?(this.selector=n[0],await this.findCartDrawer()):(this.inShadow=!0,this.shadowParentElementSelector=n[0]?.trim(),this.selector=n[1]?.trim(),await this.findCartDrawerWithShadow())}async findCartDrawer(){if(!Rt.isShopify())return;let t=this.selector||this.cartSelector;if(this.cartDrawerElement=await oe.retrySelector(t),!this.cartDrawerElement){Zf.default.warn("Max attempts exhausted to find cart drawer");return}Zf.default.log("Found",this.cartDrawerElement,`from selector: ${t}`),this.createMutationObservers()}async findCartDrawerWithShadow(){if(!Rt.isShopify()||!this.shadowParentElementSelector)return;let t=(await oe.retrySelector(this.shadowParentElementSelector))?.shadowRoot;t?.mode==="open"&&(this.cartDrawerShadowElement=t,this.createMutationObservers())}isVisible(){if(!this.cartDrawerElement)return!1;if(this.cartDrawerElement.tagName.toLowerCase()===hi.DEFAULT_SELECTOR&&this.cartDrawerElement.open)return!0;if(this.cartDrawerElement.id==="cart-drawer__container")return this.cartDrawerElement.classList.contains("cart-drawer-open");let t=this.cartDrawerElement.getBoundingClientRect(),n=(window.innerHeight||document.documentElement.clientHeight)+.5,r=(window.innerWidth||document.documentElement.clientWidth)+.5,i=t.top<=n&&t.bottom>=0,s=t.left<=r&&t.right>=0,o=i&&s,a=getComputedStyle(this.cartDrawerElement),l=a.display!=="none"&&a.visibility!=="hidden"&&parseFloat(a.opacity)>0,c=!this.cartDrawerElement.hidden,h=this.cartDrawerElement.offsetWidth>0||this.cartDrawerElement.offsetHeight>0||this.cartDrawerElement.getClientRects().length>0,d=a.transform.match(/matrix\(([^)]+)\)/),f=0,g=0;if(d){let M=d[1].split(", ").map(parseFloat);f=M[4],g=M[5]}let m=f+t.left>r||f+t.right<0||g+t.top>n||g+t.bottom<0,_=Math.max(0,Math.min(t.right,r)-Math.max(t.left,0)),x=Math.max(0,Math.min(t.bottom,n)-Math.max(t.top,0)),A=_*x,F=t.width*t.height,U=F>0&&A/F>=.1;return(o||!m)&&l&&c&&h&&U}createMutationObservers(){!this.cartDrawerElement&&!this.cartDrawerShadowElement||(oe.onNodesRemoved(this.cartDrawerElement,()=>{this.initialize()}),this.watchForCartToggle())}watchForCartToggle(){let t=this.cartDrawerElement||this.cartDrawerShadowElement,n=new ee;this.mutationObserver?.disconnect(),this.mutationObserver=new MutationObserver(()=>{n.next()}),this.mutationObserver.observe(t,{attributes:!0,subtree:!0,childList:this.inShadow}),n.pipe(Pr(500)).subscribe(()=>{let r=this.isOpen();this.currentState!==r&&(this.currentState=r,this.drawerSubject.next({open:r,firstOpen:this.firstOpen}),this.firstOpen&&(this.firstOpen=!1))})}isPresent(){return!this.selector||!this.cartDrawerShadowElement?!1:!!this.cartDrawerShadowElement.querySelector(this.selector)}async updateBubble(){let t=(await Ue.getCurrent().getNormalisedCart(!0)).itemCount,n=document.querySelector(".cart-link__bubble");n&&(n.innerText=t+"")}},no=Re(Yn()),ux=Re(D_()),Ts=class{static _flags={};static getFlags(){return this._flags}static setFlags(e){this._flags=e??{}}static isECommerceApp(){return Rt.isShopify()}},I_={d:(e,t)=>{for(var n in t)I_.o(t,n)&&!I_.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},T_={};I_.d(T_,{A:()=>uV,k:()=>x_});var cV=function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(c){try{l(r.next(c))}catch(h){s(h)}}function a(c){try{l(r.throw(c))}catch(h){s(h)}}function l(c){var h;c.done?i(c.value):(h=c.value,h instanceof n?h:new n(function(d){d(h)})).then(o,a)}l((r=r.apply(e,t||[])).next())})},lV=function(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(c){return function(h){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,h[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&h[0]?r.return:h[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,h[1])).done)return i;switch(r=0,i&&(h=[2&h[0],i.value]),h[0]){case 0:case 1:i=h;break;case 4:return o.label++,{value:h[1],done:!1};case 5:o.label++,r=h[1],h=[0];continue;case 7:h=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!((i=i.length>0&&i[i.length-1])||h[0]!==6&&h[0]!==2)){o=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){o.label=h[1];break}if(h[0]===6&&o.label<i[1]){o.label=i[1],i=h;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(h);break}i[2]&&o.ops.pop(),o.trys.pop();continue}h=t.call(e,o)}catch(d){h=[6,d],r=0}finally{n=i=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([l,c])}}};function x_(){return cV(this,void 0,Promise,function(){return lV(this,function(_a){switch(_a.label){case 0:return[4,new Promise(function(resolve,reject){var browserName="Unknown";function __callback(e){resolve({isPrivate:e,browserName})}function identifyChromium(){var e=navigator.userAgent;return e.match(/Chrome/)?navigator.brave!==void 0?"Brave":e.match(/Edg/)?"Edge":e.match(/OPR/)?"Opera":"Chrome":"Chromium"}function assertEvalToString(e){return e===eval.toString().length}function feid(){var toFixedEngineID=0;try{eval("(-1).toFixed(-1);")}catch(e){toFixedEngineID=e.message.length}return toFixedEngineID}function isSafari(){return feid()===44}function isChrome(){return feid()===51}function isFirefox(){return feid()===25}function isMSIE(){return navigator.msSaveBlob!==void 0&&assertEvalToString(39)}function newSafariTest(){var e=String(Math.random());try{window.indexedDB.open(e,1).onupgradeneeded=function(t){var n,r,i=(n=t.target)===null||n===void 0?void 0:n.result;try{i.createObjectStore("test",{autoIncrement:!0}).put(new Blob),__callback(!1)}catch(o){var s=o;return o instanceof Error&&(s=(r=o.message)!==null&&r!==void 0?r:o),typeof s!="string"?void __callback(!1):void __callback(s.includes("BlobURLs are not yet supported"))}finally{i.close(),window.indexedDB.deleteDatabase(e)}}}catch{__callback(!1)}}function oldSafariTest(){var e=window.openDatabase,t=window.localStorage;try{e(null,null,null,null)}catch{return void __callback(!0)}try{t.setItem("test","1"),t.removeItem("test")}catch{return void __callback(!0)}__callback(!1)}function safariPrivateTest(){navigator.maxTouchPoints!==void 0?newSafariTest():oldSafariTest()}function getQuotaLimit(){var e=window;return e.performance!==void 0&&e.performance.memory!==void 0&&e.performance.memory.jsHeapSizeLimit!==void 0?performance.memory.jsHeapSizeLimit:1073741824}function storageQuotaChromePrivateTest(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(e,t){__callback(Math.round(t/1048576)<2*Math.round(getQuotaLimit()/1048576))},function(e){reject(new Error("detectIncognito somehow failed to query storage quota: "+e.message))})}function oldChromePrivateTest(){(0,window.webkitRequestFileSystem)(0,1,function(){__callback(!1)},function(){__callback(!0)})}function chromePrivateTest(){self.Promise!==void 0&&self.Promise.allSettled!==void 0?storageQuotaChromePrivateTest():oldChromePrivateTest()}function firefoxPrivateTest(){__callback(navigator.serviceWorker===void 0)}function msiePrivateTest(){__callback(window.indexedDB===void 0)}function main(){isSafari()?(browserName="Safari",safariPrivateTest()):isChrome()?(browserName=identifyChromium(),chromePrivateTest()):isFirefox()?(browserName="Firefox",firefoxPrivateTest()):isMSIE()?(browserName="Internet Explorer",msiePrivateTest()):reject(new Error("detectIncognito cannot determine the browser"))}main()})];case 1:return[2,_a.sent()]}})})}typeof window<"u"&&(window.detectIncognito=x_);var uV=x_,uT=T_.A,kZ=T_.k,lx=Re(fs()),dT=Re(Jf()),ar=class Ii{static DOCUMENT_STANDARD_MODE="CSS1Compat";static _instance;parentContainer;scalingFactor=1;doc=document;parser=new dT.default;constructor(){}static get(){return Ii._instance||(Ii._instance=new Ii),Ii._instance}getUAParser(){return this.parser}getWidth(){return this.parentContainer&&this.parentContainer!==document.body?this.parentContainer.clientWidth:document.compatMode===Ii.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth}getHeight(){return this.isParentNotBody()?this.parentContainer.clientHeight:document.compatMode===Ii.DOCUMENT_STANDARD_MODE?document.documentElement.clientHeight:window.innerHeight}isMobile(){return this.parser.getDevice().type==="mobile"}calculateScalingFactor(t){let n=t.max,r=t.cont.w,i=t.cont.h,s=t.spc,o=Ii.get().getWidth(),a=Ii.get().getHeight();n&&(o=o?Math.min(o,n):n,a=a?Math.min(a,n):n),a&&(o-=s.getHorizontal(),a-=s.getVertical(),o/a<r/i?this.scalingFactor=o/r:this.scalingFactor=a/i,this.scalingFactor=Math.min(this.scalingFactor,1))}getScalingFactor(){return this.scalingFactor}createElement(t){return this.doc.createElement(t)}appendChild(t,n){t.appendChild(n)}setStyles(t,n){Object.assign(t.style,n)}setStyle(t,n,r){if(n){if(!r){t.style.removeProperty(n);return}t.style.setProperty(n,r,"important")}}setAttribute(t,n,r){t.setAttribute(n,r)}removeInApp(t){let n=document.querySelector(`.${t.rootClassName}`);n&&n.parentElement.removeChild(n)}setParentContainer(t){this.parentContainer=t,this.parentContainer&&this.isParentNotBody()&&this.setStyle(this.parentContainer,"position","relative")}isParentNotBody(){return this.parentContainer!==document.body}},Qf=class{parser;result={};constructor(){this.parser=ar.get().getUAParser()}async get(){let e=this.result;return this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),await this.getBatteryInfo(),await this.getLocation(),e.locale=navigator.language,e.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},e.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},e.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},e.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},e.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},e.navigatorUA=navigator.userAgent,e.isHeadless=navigator.webdriver,e}getDeviceMemory(){let e=navigator;if(!e.deviceMemory)return;let t=e.deviceMemory;this.result.mem={tot:t*1024}}getNetworkType(){let e=navigator,t=e.connection||e.mozConnection||e.webkitConnection;t?.effectiveType&&(this.result.net={type:t.effectiveType})}getOrientation(){let e=screen.orientation?.type;e&&(this.result.orientation=e)}getDPI(){if(!document.body)return;let e=document.createElement("div");e.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(e);let t=window.devicePixelRatio||1,n=e.offsetWidth*t;return document.body.removeChild(e),n}async getLocation(){if(!(!navigator.geolocation||!navigator.permissions||(await navigator.permissions.query({name:"geolocation"})).state!="granted"))return new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>{this.result.coords=[t.coords.latitude,t.coords.longitude],e()},()=>e())})}async getBatteryInfo(){if("getBattery"in navigator)try{let e=await navigator.getBattery();this.result.bat={l:e.level*100,c:e.charging}}catch{}}},fT=Re(R_()),Al=class{static UTM_PARAMS=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id"];static TW_PARAMS={utm_source:"tw_source",utm_campaign:"tw_campaign"};static getReferrer(){if(document.referrer)return document.referrer.replace(location.origin,"")}static getUTMParams(){let e;try{e=new fT.URLBuilder(location.href)}catch{return{}}let t={};this.UTM_PARAMS.forEach(r=>{let i=e.getQueryParam(r);i&&(t[r]=i)});let n={};return Object.keys(this.TW_PARAMS).forEach(r=>{let i=e.getQueryParam(this.TW_PARAMS[r]);i&&(n[r]=i)}),w(w({},n),t)}},vi=class YS{origin;path;qs;name;referrer;utmSource;utmMedium;utmCampaign;utmId;utmTerm;utmContent;constructor(t){this.name=t.name,this.path=t.path,this.qs=t.qs,this.referrer=t.referrer,this.utmSource=t.utmSource||t.utm_source,this.utmMedium=t.utmMedium||t.utm_medium,this.utmCampaign=t.utmCampaign||t.utm_campaign,this.utmId=t.utmId||t.utm_id,this.utmTerm=t.utmTerm||t.utm_term,this.utmContent=t.utmContent||t.utm_content}static parseFromCurrent(){let t=location.pathname==="/"?location.pathname:location.pathname.replace(/\/+$/,"");return new YS(w({origin:location.origin,path:t,qs:location.search,referrer:Al.getReferrer(),name:Oe.get().pageName},Al.getUTMParams()))}},xs=(e=>(e[e.LOW=1]="LOW",e[e.MEDIUM=2]="MEDIUM",e[e.HIGH=3]="HIGH",e))(xs||{}),Ga=class{static trackDeviceID(e){this.isInstalled()}static trackIntent(e){if(!this.isInstalled())return;let t=xs[e]?.toLowerCase();t&&(b.debug(`Sending ${t} intent to MS Clarity`),window.clarity("set","Cooee Intent",t))}static isInstalled(){return window.clarity&&typeof window.clarity=="function"}},fV=" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|adscanner/|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|cookiehubscan|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|jsjcw_scanner|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scanner\\.|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|zgrab",pV=/bot|crawl|http|lighthouse|scan|search|spider/i,Ml;function hV(){if(Ml instanceof RegExp)return Ml;try{Ml=new RegExp(fV,"i")}catch{Ml=pV}return Ml}function pT(e){return!!e&&hV().test(e)}var Ce=class{static storage=new Map;static get(e){return this.storage.has(e)||this.storage.set(e,e.getInstance()),this.storage.get(e)}},qt=class wc{static replaySubject=new Vo(1);static INSTANCE;sentryService=Ce.get(St);lock=new Wa;constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new wc),this.INSTANCE}init(t){if(b.debug("Initialising SDK",t),pT(navigator.userAgent)){b.info("This seems to be a bot. Disabling SDK");return}Rs.getInstance().init(t),wc.INSTANCE.checkForNewSession(!0).then(async()=>{wc.replaySubject.next(!0),wc.replaySubject.complete()}).catch(n=>{b.error("Unable to initiate session",n)})}getCurrentSessionID(){return yn.set(ge.SESSION_LAST_USED_TIME,new Date().getTime()),yn.get(ge.ID,"")}async checkSessionAndGetContext(){return await this.checkForNewSession(),this.getContext()}async getContext(){let t=await Promise.all([this.getCurrentSessionID(),this.getCurrentSessionNumber(),this.getLandingPage()]);return this.sentryService.setGlobalContext("Visitor Session",{id:t[0],number:t[1],landing_page:t[2]}),t}async checkForNewSession(t){await this.lock.acquire();let n=!1;if(await this.isNewSessionRequired()?(await this.startNewSession(),t=!0,n=!0):await this.notSynced()&&(n=!0),t){let r=await this.getContext();await Rs.getInstance().validateSession({sessionID:r[0],sessionNumber:r[1],landingPage:r[2],newSession:n}),await yn.set(ge.SESSION_SYNCED,!0)}this.lock.release()}async startNewSession(){b.debug("Starting new session"),await yn.clear(),b.debug("Cleared SessionStorage before starting new session");let t=new Date,n=new un().toHexString();b.debug("New session ID to be used",n);let r=await rt.get(ge.SESSION_NUMBER,0)+1;xr.prepend(`New Session ID: <strong>${n}</strong> & number: ${r}`),await Promise.all([rt.set(ge.SESSION_NUMBER,r),yn.set(ge.ID,n),yn.set(ge.SESSION_LAST_USED_TIME,t.getTime()),yn.set(ge.SESSION_LANDING_PAGE,vi.parseFromCurrent())])}getLandingPage(){return yn.get(ge.SESSION_LANDING_PAGE,{})}getCurrentSessionNumber(){return rt.get(ge.SESSION_NUMBER,1)}async isNewSessionRequired(){if(!await yn.get(ge.ID))return!0;let t=await yn.get(ge.SESSION_LAST_USED_TIME,0);return t?(new Date().getTime()-t)/1e3>k.IDLE_TIME_IN_SECONDS:!0}async notSynced(){return!await yn.get(ge.SESSION_SYNCED,!1)}},ZT=Re(Yn()),bn=Re(Yn()),Ro=Re(tp()),Pp=Re(A_()),sp,it,ET,k_,Ns,gT,wT,M_,bT,L_,O_,P_,mV,Ol={},CT=[],gV=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,F_=Array.isArray;function So(e,t){for(var n in t)e[n]=t[n];return e}function B_(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function V_(e,t,n){var r,i,s,o={};for(s in t)s=="key"?r=t[s]:s=="ref"?i=t[s]:o[s]=t[s];if(arguments.length>2&&(o.children=arguments.length>3?sp.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)o[s]===void 0&&(o[s]=e.defaultProps[s]);return ip(e,o,r,i,null)}function ip(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++ET,__i:-1,__u:0};return i==null&&it.vnode!=null&&it.vnode(s),s}function Ei(e){return e.children}function _i(e,t){this.props=e,this.context=t}function qa(e,t){if(t==null)return e.__?qa(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?qa(e):null}function ST(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return ST(e)}}function yT(e){(!e.__d&&(e.__d=!0)&&Ns.push(e)&&!op.__r++||gT!==it.debounceRendering)&&((gT=it.debounceRendering)||wT)(op)}function op(){var e,t,n,r,i,s,o,a;for(Ns.sort(M_);e=Ns.shift();)e.__d&&(t=Ns.length,r=void 0,s=(i=(n=e).__v).__e,o=[],a=[],n.__P&&((r=So({},i)).__v=i.__v+1,it.vnode&&it.vnode(r),U_(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[s]:null,o,s??qa(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,TT(o,r,a),r.__e!=s&&ST(r)),Ns.length>t&&Ns.sort(M_));op.__r=0}function DT(e,t,n,r,i,s,o,a,l,c,h){var d,f,g,m,_,x,A=r&&r.__k||CT,F=t.length;for(l=yV(n,t,A,l,F),d=0;d<F;d++)(g=n.__k[d])!=null&&(f=g.__i===-1?Ol:A[g.__i]||Ol,g.__i=d,x=U_(e,g,f,i,s,o,a,l,c,h),m=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&H_(f.ref,null,g),h.push(g.ref,g.__c||m,g)),_==null&&m!=null&&(_=m),4&g.__u||f.__k===g.__k?l=IT(g,l,e):typeof g.type=="function"&&x!==void 0?l=x:m&&(l=m.nextSibling),g.__u&=-7);return n.__e=_,l}function yV(e,t,n,r,i){var s,o,a,l,c,h=n.length,d=h,f=0;for(e.__k=new Array(i),s=0;s<i;s++)(o=t[s])!=null&&typeof o!="boolean"&&typeof o!="function"?(l=s+f,(o=e.__k[s]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?ip(null,o,null,null,null):F_(o)?ip(Ei,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?ip(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,a=null,(c=o.__i=vV(o,n,l,d))!==-1&&(d--,(a=n[c])&&(a.__u|=2)),a==null||a.__v===null?(c==-1&&f--,typeof o.type!="function"&&(o.__u|=4)):c!=l&&(c==l-1?f--:c==l+1?f++:(c>l?f--:f++,o.__u|=4))):e.__k[s]=null;if(d)for(s=0;s<h;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=qa(a)),xT(a,a));return r}function IT(e,t,n){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=IT(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=qa(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function vV(e,t,n,r){var i,s,o=e.key,a=e.type,l=t[n];if(l===null||l&&o==l.key&&a===l.type&&(2&l.__u)==0)return n;if(r>(l!=null&&(2&l.__u)==0?1:0))for(i=n-1,s=n+1;i>=0||s<t.length;){if(i>=0){if((l=t[i])&&(2&l.__u)==0&&o==l.key&&a===l.type)return i;i--}if(s<t.length){if((l=t[s])&&(2&l.__u)==0&&o==l.key&&a===l.type)return s;s++}}return-1}function vT(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||gV.test(t)?n:n+"px"}function rp(e,t,n,r,i){var s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||vT(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||vT(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(bT,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=L_,e.addEventListener(t,s?P_:O_,s)):e.removeEventListener(t,s?P_:O_,s);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function _T(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=L_++;else if(t.t<n.u)return;return n(it.event?it.event(t):t)}}}function U_(e,t,n,r,i,s,o,a,l,c){var h,d,f,g,m,_,x,A,F,U,M,Y,Ae,ct,j,fe,te,pe=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),s=[a=t.__e=n.__e]),(h=it.__b)&&h(t);e:if(typeof pe=="function")try{if(A=t.props,F="prototype"in pe&&pe.prototype.render,U=(h=pe.contextType)&&r[h.__c],M=h?U?U.props.value:h.__:r,n.__c?x=(d=t.__c=n.__c).__=d.__E:(F?t.__c=d=new pe(A,M):(t.__c=d=new _i(A,M),d.constructor=pe,d.render=EV),U&&U.sub(d),d.props=A,d.state||(d.state={}),d.context=M,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),F&&d.__s==null&&(d.__s=d.state),F&&pe.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=So({},d.__s)),So(d.__s,pe.getDerivedStateFromProps(A,d.__s))),g=d.props,m=d.state,d.__v=t,f)F&&pe.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),F&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(F&&pe.getDerivedStateFromProps==null&&A!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(A,M),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(A,d.__s,M)===!1||t.__v==n.__v)){for(t.__v!=n.__v&&(d.props=A,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Le){Le&&(Le.__=t)}),Y=0;Y<d._sb.length;Y++)d.__h.push(d._sb[Y]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(A,d.__s,M),F&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,m,_)})}if(d.context=M,d.props=A,d.__P=e,d.__e=!1,Ae=it.__r,ct=0,F){for(d.state=d.__s,d.__d=!1,Ae&&Ae(t),h=d.render(d.props,d.state,d.context),j=0;j<d._sb.length;j++)d.__h.push(d._sb[j]);d._sb=[]}else do d.__d=!1,Ae&&Ae(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++ct<25);d.state=d.__s,d.getChildContext!=null&&(r=So(So({},r),d.getChildContext())),F&&!f&&d.getSnapshotBeforeUpdate!=null&&(_=d.getSnapshotBeforeUpdate(g,m)),a=DT(e,F_(fe=h!=null&&h.type===Ei&&h.key==null?h.props.children:h)?fe:[fe],t,n,r,i,s,o,a,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),x&&(d.__E=d.__=null)}catch(Le){if(t.__v=null,l||s!=null)if(Le.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else for(te=s.length;te--;)B_(s[te]);else t.__e=n.__e,t.__k=n.__k;it.__e(Le,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=_V(n.__e,t,n,r,i,s,o,l,c);return(h=it.diffed)&&h(t),128&t.__u?void 0:a}function TT(e,t,n){for(var r=0;r<n.length;r++)H_(n[r],n[++r],n[++r]);it.__c&&it.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(s){s.call(i)})}catch(s){it.__e(s,i.__v)}})}function _V(e,t,n,r,i,s,o,a,l){var c,h,d,f,g,m,_,x=n.props,A=t.props,F=t.type;if(F=="svg"?i="http://www.w3.org/2000/svg":F=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((g=s[c])&&"setAttribute"in g==!!F&&(F?g.localName==F:g.nodeType==3)){e=g,s[c]=null;break}}if(e==null){if(F==null)return document.createTextNode(A);e=document.createElementNS(i,F,A.is&&A),a&&(it.__m&&it.__m(t,s),a=!1),s=null}if(F===null)x===A||a&&e.data===A||(e.data=A);else{if(s=s&&sp.call(e.childNodes),x=n.props||Ol,!a&&s!=null)for(x={},c=0;c<e.attributes.length;c++)x[(g=e.attributes[c]).name]=g.value;for(c in x)if(g=x[c],c!="children"){if(c=="dangerouslySetInnerHTML")d=g;else if(!(c in A)){if(c=="value"&&"defaultValue"in A||c=="checked"&&"defaultChecked"in A)continue;rp(e,c,null,g,i)}}for(c in A)g=A[c],c=="children"?f=g:c=="dangerouslySetInnerHTML"?h=g:c=="value"?m=g:c=="checked"?_=g:a&&typeof g!="function"||x[c]===g||rp(e,c,g,x[c],i);if(h)a||d&&(h.__html===d.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),DT(e,F_(f)?f:[f],t,n,r,F=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,o,s?s[0]:n.__k&&qa(n,0),a,l),s!=null)for(c=s.length;c--;)B_(s[c]);a||(c="value",F=="progress"&&m==null?e.removeAttribute("value"):m!==void 0&&(m!==e[c]||F=="progress"&&!m||F=="option"&&m!==x[c])&&rp(e,c,m,x[c],i),c="checked",_!==void 0&&_!==e[c]&&rp(e,c,_,x[c],i))}return e}function H_(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){it.__e(i,n)}}function xT(e,t,n){var r,i;if(it.unmount&&it.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||H_(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){it.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&xT(r[i],t,n||typeof e.type!="function");n||B_(e.__e),e.__c=e.__=e.__e=void 0}function EV(e,t,n){return this.constructor(e,n)}function RT(e,t,n){var r,i,s,o;t==document&&(t=document.documentElement),it.__&&it.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],o=[],U_(t,e=(!r&&n||t).__k=V_(Ei,null,[e]),i||Ol,Ol,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?sp.call(t.childNodes):null,s,!r&&n?n:i?i.__e:t.firstChild,r,o),TT(s,e,o)}sp=CT.slice,it={__e:function(e,t,n,r){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(a){e=a}throw e}},ET=0,k_=function(e){return e!=null&&e.constructor==null},_i.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=So({},this.state),typeof e=="function"&&(e=e(So({},n),this.props)),e&&So(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),yT(this))},_i.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),yT(this))},_i.prototype.render=Ei,Ns=[],wT=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,M_=function(e,t){return e.__v.__b-t.__v.__b},op.__r=0,bT=/(PointerCapture)$|Capture$/i,L_=0,O_=_T(!1),P_=_T(!0),mV=0;var $_,cr,j_,NT,AT=0,VT=[],dn=it,MT=dn.__b,OT=dn.__r,PT=dn.diffed,kT=dn.__c,LT=dn.unmount,FT=dn.__;function wV(e,t){dn.__h&&dn.__h(cr,e,AT||t),AT=0;var n=cr.__H||(cr.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function G_(e,t){var n=wV($_++,7);return SV(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function bV(){for(var e;e=VT.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ap),e.__H.__h.forEach(W_),e.__H.__h=[]}catch(t){e.__H.__h=[],dn.__e(t,e.__v)}}dn.__b=function(e){cr=null,MT&&MT(e)},dn.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),FT&&FT(e,t)},dn.__r=function(e){OT&&OT(e),$_=0;var t=(cr=e.__c).__H;t&&(j_===cr?(t.__h=[],cr.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(ap),t.__h.forEach(W_),t.__h=[],$_=0)),j_=cr},dn.diffed=function(e){PT&&PT(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(VT.push(t)!==1&&NT===dn.requestAnimationFrame||((NT=dn.requestAnimationFrame)||CV)(bV)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),j_=cr=null},dn.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ap),n.__h=n.__h.filter(function(r){return!r.__||W_(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],dn.__e(r,n.__v)}}),kT&&kT(e,t)},dn.unmount=function(e){LT&<(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ap(r)}catch(i){t=i}}),n.__H=void 0,t&&dn.__e(t,n.__v))};var BT=typeof requestAnimationFrame=="function";function CV(e){var t,n=function(){clearTimeout(r),BT&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);BT&&(t=requestAnimationFrame(n))}function ap(e){var t=cr,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),cr=t}function W_(e){var t=cr;e.__c=e.__(),cr=t}function SV(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}var DV=Symbol.for("preact-signals");function q_(){if(Ya>1)Ya--;else{for(var e,t=!1;Pl!==void 0;){var n=Pl;for(Pl=void 0,z_++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&HT(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(z_=0,Ya--,t)throw e}}var Dt=void 0,Pl=void 0,Ya=0,z_=0,cp=0;function UT(e){if(Dt!==void 0){var t=e.n;if(t===void 0||t.t!==Dt)return t={i:0,S:e,p:Dt.s,n:void 0,t:Dt,e:void 0,x:void 0,r:t},Dt.s!==void 0&&(Dt.s.n=t),Dt.s=t,e.n=t,32&Dt.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Dt.s,t.n=void 0,Dt.s.n=t,Dt.s=t),t}}function fn(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}fn.prototype.brand=DV;fn.prototype.h=function(){return!0};fn.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};fn.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}};fn.prototype.subscribe=function(e){var t=this;return In(function(){var n=t.value,r=Dt;Dt=void 0;try{e(n)}finally{Dt=r}})};fn.prototype.valueOf=function(){return this.value};fn.prototype.toString=function(){return this.value+""};fn.prototype.toJSON=function(){return this.value};fn.prototype.peek=function(){var e=Dt;Dt=void 0;try{return this.value}finally{Dt=e}};Object.defineProperty(fn.prototype,"value",{get:function(){var e=UT(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(z_>100)throw new Error("Cycle detected");this.v=e,this.i++,cp++,Ya++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{q_()}}}});function Rr(e){return new fn(e)}function HT(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function jT(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function $T(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Ka(e){fn.call(this,void 0),this.x=e,this.s=void 0,this.g=cp-1,this.f=4}(Ka.prototype=new fn).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===cp))return!0;if(this.g=cp,this.f|=1,this.i>0&&!HT(this))return this.f&=-2,!0;var e=Dt;try{jT(this),Dt=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return Dt=e,$T(this),this.f&=-2,!0};Ka.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}fn.prototype.S.call(this,e)};Ka.prototype.U=function(e){if(this.t!==void 0&&(fn.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Ka.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(Ka.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=UT(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Y_(e){return new Ka(e)}function WT(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Ya++;var n=Dt;Dt=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,K_(e),r}finally{Dt=n,q_()}}}function K_(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,WT(e)}function IV(e){if(Dt!==this)throw new Error("Out-of-order effect");$T(this),Dt=e,this.f&=-2,8&this.f&&K_(this),q_()}function kl(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}kl.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};kl.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,WT(this),jT(this),Ya++;var e=Dt;return Dt=this,IV.bind(this,e)};kl.prototype.N=function(){2&this.f||(this.f|=2,this.o=Pl,Pl=this)};kl.prototype.d=function(){this.f|=8,1&this.f||K_(this)};function In(e){var t=new kl(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var X_,Z_;function Za(e,t){it[e]=t.bind(null,it[e]||function(){})}function lp(e){Z_&&Z_(),Z_=e&&e.S()}function GT(e){var t=this,n=e.data,r=xV(n);r.value=n;var i=G_(function(){for(var s=t.__v;s=s.__;)if(s.__c){s.__c.__$f|=4;break}return t.__$u.c=function(){var o,a=t.__$u.S(),l=i.value;a(),k_(l)||((o=t.base)==null?void 0:o.nodeType)!==3?(t.__$f|=1,t.setState({})):t.base.data=l},Y_(function(){var o=r.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}GT.displayName="_st";Object.defineProperties(fn.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:GT},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});Za("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var s=r[i];s instanceof fn&&(n||(t.__np=n={}),n[i]=s,r[i]=s.peek())}}e(t)});Za("__r",function(e,t){lp();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var s;return In(function(){s=this}),s.c=function(){r.__$f|=1,r.setState({})},s}())),X_=r,lp(n),e(t)});Za("__e",function(e,t,n,r){lp(),X_=void 0,e(t,n,r)});Za("diffed",function(e,t){lp(),X_=void 0;var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var s=n.U;if(s)for(var o in s){var a=s[o];a!==void 0&&!(o in r)&&(a.d(),s[o]=void 0)}else n.U=s={};for(var l in r){var c=s[l],h=r[l];c===void 0?(c=TV(n,l,h,i),s[l]=c):c.o(h,i)}}}e(t)});function TV(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,s=Rr(n);return{o:function(o,a){s.value=o,r=a},d:In(function(){var o=s.value.value;r[t]!==o&&(r[t]=o,i?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}Za("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var s=r[i];s&&s.d()}}}}else{var o=t.__c;if(o){var a=o.__$u;a&&(o.__$u=void 0,a.d())}}e(t)});Za("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});_i.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(r||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var s in e)if(s!=="__source"&&e[s]!==this.props[s])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function xV(e){return G_(function(){return Rr(e)},[])}var up=class{url;alt;constructor(e){e.alt&&(this.alt=e.alt),this.url=e.url}},dp=class{d;cmp;effective;constructor(e={}){this.d=e.d,this.cmp=e.cmp,this.effective=this.d}},J_=class{id;mID;name;groupID;groupName;isSelected;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.name=e.name,this.groupID=e.groupID,this.groupName=e.groupName,this.isSelected=e.isSelected??!1}},wi=class{mID;name;imgs;link;price;sku;isAvailable;quantity;sellingPlans;selectedSellingPlan;effectivePrice;constructor(e){e=e??{},this.mID=e.mID,this.name=e.name,this.imgs=e.imgs?.map(t=>new up(t))??[],this.link=e.link,this.price=new dp(e.price),this.sku=e.sku,this.isAvailable=e.isAvailable,this.quantity=e.quantity,this.effectivePrice=Rr(this.price.effective),e.sellingPlans?.length&&(this.selectedSellingPlan=Rr(void 0)),this.sellingPlans=e.sellingPlans?.map(t=>{let n=new J_(t);return n.isSelected&&(this.selectedSellingPlan.value=n),n})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(e){this.selectedSellingPlan.value=e}},Kn=class{id;mID;name;status;ctg;imgs;videos;portraitVideos;vars;desc;sDesc;link;slug;quantity;category;meta;reviews;tags;selectedOrFirstVariant;selected=Rr(!0);constructor(e){this.update(e),this.selectedOrFirstVariant=Rr(this.selectedVariant)}get imageURL(){return this.imgs?.[0]?.url}get secondaryImageURL(){return this.imgs?.[1]?.url}get getVariantImages(){return this.selectedOrFirstVariant.value.imgs}get variantImage(){return this.getVariantImages[0]?.url}get variantSecondaryImage(){return this.getVariantImages[1]?.url}get selectedVariant(){return this.vars.find(e=>e.isAvailable)??this.vars[0]}set variants(e){this.vars=e,this.selectedOrFirstVariant.value=this.selectedVariant}update(e){return this.id=e.id,this.mID=e.mID,this.name=e.name,this.status=e.status,this.ctg=e.ctg,this.imgs=e.imgs,this.desc=e.desc,this.sDesc=e.sDesc,this.link=e.link,this.slug=e.slug,this.quantity=e.quantity,this.meta=e.meta,this.category=e.category,this.videos=e.videos,this.reviews=e.reviews,this.portraitVideos=e.videos?.filter(t=>t.orientation==="PORTRAIT"),this.tags=e.tags,e.vars&&(this.vars=e.vars.map(t=>new wi(t))),this}toEmbed(e){return e=e??this.selectedOrFirstVariant.value,new gn({id:this.id,mID:this.mID,vID:e.mID,vName:e.name,name:this.name,link:this.link,slug:this.slug,price:e.price.d,imageURL:e.getOneImage()??this.imgs?.[0].url})}},fp=class{id;mID;handle;title;imageURL;constructor(e){e??={},this.id=e.id,this.mID=e.mID,this.handle=e.handle,this.title=e.title,this.imageURL=e.imageURL}},Q_=class{enabled;constructor(e){this.enabled=e.enabled}},eE=class extends Q_{max;min;constructor(e){e??={},super(e),this.min=e.min,this.max=e.max}},pp=class{productQuantity;constructor(e){e??={},this.productQuantity=new eE(e.productQuantity)}},As=class{s;g;i;constructor(e){e.s&&(this.s=new Mt(e.s)),e.g&&(this.g=new Ll(e.g)),this.i=e.i}get solid(){return this.s}get glossy(){return this.g}get img(){return this.i}},Fl="a-f\\d",RV=`#?[${Fl}]{3}[${Fl}]?`,NV=`#?[${Fl}]{6}([${Fl}]{2})?`,AV=new RegExp(`[^#${Fl}]`,"gi"),MV=new RegExp(`^${RV}$|^${NV}$`,"i");function tE(e,t={}){if(typeof e!="string"||AV.test(e)||!MV.test(e))throw new TypeError("Expected a valid hex string");e=e.replace(/^#/,"");let n=1;e.length===8&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),e.length===4&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let r=Number.parseInt(e,16),i=r>>16,s=r>>8&255,o=r&255,a=typeof t.alpha=="number"?t.alpha:n;if(t.format==="array")return[i,s,o,a];if(t.format==="css"){let l=a===1?"":` / ${Number((a*100).toFixed(2))}%`;return`rgb(${i} ${s} ${o}${l})`}return{red:i,green:s,blue:o,alpha:a}}var Mt=class{h;a=100;g;constructor(e){e??={},this.h=e.h,this.a=e.a,this.g=e.g}get hex(){return this.h}get grad(){return this.g}get rgba(){if(!this.hex)return"";try{return tE(this.hex,{format:"css",alpha:this.getAlpha()})}catch(e){return console.error("Invalid hex",e),"#000000"}}getAlpha(){return(this.a??100)/100}},Xi=class{s;r;w;c;constructor(e){this.s=e.s,this.r=e.r,this.w=e.w,e.c&&(this.c=new Mt(e.c))}get radius(){return this.r}get width(){return this.w}get color(){return this.c}get style(){return hp[this.s??1]}},hp=(e=>(e[e.SOLID=1]="SOLID",e[e.DASHED=2]="DASHED",e))(hp||{}),Ll=class KS{static DEFAULT_FALLBACK=new Mt({h:"#000000",a:50});r;c;fb;constructor(t){this.r=t.r,t.c&&(this.c=new Mt(t.c)),t.fb&&(this.fb=new Mt(t.fb))}get radius(){return this.r}get color(){return this.c}get fallback(){return this.fb??KS.DEFAULT_FALLBACK}},Bl=class{blur;spr;clr;x;y;constructor(e){e=e??{},this.blur=e.blur??0,this.spr=e.spr??0,this.x=e.x??0,this.y=e.y??0,this.clr=new Mt(e.clr)}getStyle(e){return`${this.x*e}px ${this.y*e}px ${this.blur*e}px ${this.spr*e}px ${this.clr.rgba}`}},Ji=class{pl;pr;pt;pb;ml;mr;mt;mb;cent;constructor(e){e=e??{},this.pl=e.pl??0,this.pr=e.pr??0,this.pt=e.pt??0,this.pb=e.pb??0,this.ml=e.ml??0,this.mr=e.mr??0,this.mt=e.mt??0,this.mb=e.mb??0,this.cent=e.cent??!1}getHorizontal(){return this.pl+this.pr}getVertical(){return this.pt+this.pb}getPaddingCSS(){return`${this.pt}px ${this.pr}px ${this.pb}px ${this.pl}px`}},Ms=class{rot;constructor(e){e?.rot&&(this.rot=e.rot)}get rotate(){return this.rot}},lr=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(e){this.t=e.t,e.bg&&(this.bg=new As(e.bg)),e.br&&(this.br=new Xi(e.br)),e.shd&&(this.shd=new Bl(e.shd)),e.spc&&(this.spc=new Ji(e.spc)),this.trf=new Ms(e.trf),this.clc=e.clc,this.w=e.w,this.h=e.h,this.x=e.x,this.y=e.y,this.a=e.a}get alpha(){return this.a??100}get type(){return this.t}get typeAsString(){return Ft[this.t]}get click(){return this.clc}},Ft=(e=>(e[e.IMAGE=1]="IMAGE",e[e.TEXT=2]="TEXT",e[e.BUTTON=3]="BUTTON",e[e.FLEXBOX=4]="FLEXBOX",e[e.MULTI_COLUMN=5]="MULTI_COLUMN",e[e.CHECKBOX=6]="CHECKBOX",e[e.PRODUCTS=11]="PRODUCTS",e[e.PRODUCT=12]="PRODUCT",e[e.PRODUCT_IMAGE=13]="PRODUCT_IMAGE",e[e.PRODUCT_TITLE=14]="PRODUCT_TITLE",e[e.PRODUCT_VARIATIONS=15]="PRODUCT_VARIATIONS",e[e.PRODUCT_VARIATIONS_SELLING_PLANS=16]="PRODUCT_VARIATIONS_SELLING_PLANS",e[e.PRODUCT_BUTTON=18]="PRODUCT_BUTTON",e[e.PRODUCT_RATING=19]="PRODUCT_RATING",e[e.EMAIL_INPUT=51]="EMAIL_INPUT",e[e.PHONE_INPUT=52]="PHONE_INPUT",e[e.COUNTDOWN_TIMER=61]="COUNTDOWN_TIMER",e[e.CAROUSEL=62]="CAROUSEL",e[e.SHAPE=100]="SHAPE",e))(Ft||{}),Os=class extends lr{constructor(e){super(e)}},Qi=class extends lr{src;constructor(e){super(e),this.src=e.src}},Xa=(e=>(e[e.START=0]="START",e[e.CENTER=1]="CENTER",e[e.END=2]="END",e[e.JUSTIFY=3]="JUSTIFY",e))(Xa||{}),mp=class{name;fonts;constructor(e){e=e??{},e.name&&(e.name=e.name!=="Arial"?e.name:""),this.name=e.name,this.fonts=e.fonts?.map(t=>new nE(t))}},nE=class{style;url;constructor(e){e=e??{},this.style=e.style,this.url=e.url}getFontDescriptor(){return{style:this.style===2||this.style===4?"italic":"normal",weight:this.style===4||this.style===3?"700":"400"}}getURL(){return`url('${this.url}') format('truetype')`}},pn=class{fw;fs;fam;fmly;lh=1.2;ls;s;tc;ta;td;tdc;constructor(e){this.update(e)}get alignment(){return Xa[this.ta]}get letterSpacing(){return this.ls?this.ls+"px":"normal"}update(e){e=e??{},e.lh&&(this.lh=e.lh),e.tdc&&(this.tdc=new Mt(e.tdc)),this.td=e.td,this.fs=e.s??e.fs??60,this.tc=new Mt(e.tc),this.ta=e.ta??1,this.fw=e.fw??400,this.ls=e.ls??0,this.tc.h??="#000000",this.fam=new mp(e.fam??e.fmly)}resize(e){this.s*=e,this.ls*=e}},bi=class extends lr{typo;constructor(e){super(e);let t=w(w({},e.f),e.typo);e.alg&&(t.ta=e.alg),e.c&&(t.tc=e.c),this.typo=new pn(t)}get color(){return this.typography.tc}get typography(){return this.typo}},Do=class extends bi{prs;constructor(e){super(e),this.prs=e.prs}get parts(){return this.prs}},gp=class extends lr{o;constructor(e){super(e),this.o=e.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}},Ja=class{dd;hh;mm;ss;date;constructor(e){e??={},this.dd=e.dd??0,this.hh=e.hh??0,this.mm=e.mm??0,this.ss=e.ss??0,this.date=e.date?new Date(e.date):void 0}start(e,t){let n=new Date;e===2?(n.setSeconds(n.getSeconds()+this.ss),n.setMinutes(n.getMinutes()+this.mm),n.setHours(n.getHours()+this.hh),n.setDate(n.getDate()+this.dd)):n=this.date??new Date;let r=window.setInterval(()=>{let i=new Date().getTime(),s=n.getTime()-i;if(s<1){clearInterval(r);return}let o=Math.floor(s/(1e3*60*60*24)),a=Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),l=Math.floor(s%(1e3*60*60)/(1e3*60)),c=Math.floor(s%(1e3*60)/1e3);t({days:o,hours:a,minutes:l,seconds:c})},1e3);return r}},Qa=class extends bi{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e),this.gap=e.gap,this.timerType=e.type,this.timer=new Ja(e.timer),this.show=e.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},yp=class{txt;c;constructor(e){e??={},this.txt=e.txt,this.c=new Mt(e.c??{})}get text(){return this.txt}get color(){return this.c}},Io=class extends bi{ph;constructor(e){super(e),this.ph=new yp(e.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}},ec=class extends Io{constructor(e){e??={},super(e)}},tc=class extends Io{},nc=class extends Io{},rc=class extends Qi{},vp=class{en;ex;constructor(e){e=e??{},this.en=e.en,this.ex=e.ex}getEnterAnimation(){switch(this.en){case 2:return[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}];case 3:return[{transform:"translateY(100%)"},{transform:"translateY(0%)"}];case 4:return[{transform:"translateX(-100%)"},{transform:"translateX(0%)"}];case 5:return[{transform:"translateX(100%)"},{transform:"translateX(0%)"}];case 6:return[{transform:"translate(-100%, -100%)"},{transform:"translate(0%, 0%)"}];case 7:return[{transform:"translate(100%, -100%)"},{transform:"translate(0%, 0%)"}];case 8:return[{transform:"translate(-100%, 100%)"},{transform:"translate(0%, 0%)"}];case 9:return[{transform:"translate(100%, 100%)"},{transform:"translate(0%, 0%)"}];case 10:return[{transform:"scale(0.1)"},{transform:"scale(1)"}];default:return[]}}getExitAnimation(){switch(this.ex){case 2:return[{transform:"translateY(0%)"},{transform:"translateY(-100%)"}];case 3:return[{transform:"translateY(0%)"},{transform:"translateY(100%)"}];case 4:return[{transform:"translateX(0%)"},{transform:"translateX(-100%)"}];case 5:return[{transform:"translateX(0%)"},{transform:"translateX(100%)"}];case 6:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, -100%)"}];case 7:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, -100%)"}];case 8:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, 100%)"}];case 9:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, 100%)"}];case 10:return[{transform:"scale(1)"},{transform:"scale(0)"}];default:return[]}}},Vl=class extends lr{gvt;max;cover;anim;embedded;position;constructor(e){e=e??{},super(e),this.gvt=e.gvt??5,this.max=e.max,this.cover=e.cover??!0,this.anim=new vp(e.anim),this.embedded=e.embedded,this.position=e.position??1,this.spc||(this.spc=new Ji({pl:k.IN_APP_DEFAULT_PADDING,pr:k.IN_APP_DEFAULT_PADDING,pt:k.IN_APP_DEFAULT_PADDING,pb:k.IN_APP_DEFAULT_PADDING}))}isEmbedded(){return this.position===2&&!!this.embedded}getEmbeddedSelector(){return`.letscooee-engagement.container-${this.embedded}`}},_p=class extends Vl{cont;elems=[];mob;constructor(e){e=e??{},super(e),this.cont=new gp(e.cont),this.mob=new Vl(e.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),e.elems.forEach(t=>{t.t===1?this.elems.push(new Qi(t)):t.t===2?this.elems.push(new Do(t)):t.t===3?this.elems.push(new Do(t)):t.t===100?this.elems.push(new Os(t)):t.t===51?this.elems.push(new tc(t)):t.t===52?this.elems.push(new nc(t)):t.t===61?this.elems.push(new Qa(t)):t.t===15||t.t===16?this.elems.push(new ec(t)):t.t===13&&this.elems.push(new rc(t))})}getStylesForWrapper(){if(this.cover)return{};let e;return this.gvt===1?e={top:0,left:0}:this.gvt===2?e={top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===3?e={top:0,right:0}:this.gvt===6?e={top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===9?e={bottom:0,right:0}:this.gvt===8?e={bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===7?e={bottom:0,left:0}:this.gvt===4?e={top:"50%",left:0,transform:"translateY(-50%)"}:e={top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},e.overflow="visible",e}getFlexStylesForContainer(){let e={display:"flex",flexDirection:"row"},t,n;return this.gvt===1?(t="flex-start",n="flex-start"):this.gvt===2?(t="center",n="flex-start"):this.gvt===3?(t="flex-end",n="flex-start"):this.gvt===4?(t="flex-start",n="center"):this.gvt===6?(t="flex-end",n="center"):this.gvt===7?(t="flex-start",n="flex-end"):this.gvt===8?(t="center",n="flex-end"):this.gvt===9?(t="flex-end",n="flex-end"):(t="center",n="center"),e.alignItems=n,e.justifyContent=t,e.overflow="visible",e}overrideForMobileView(){this.max=this.mob.max??this.max,this.cover=this.mob.cover??this.cover,this.gvt=this.mob.gvt??this.gvt,this.bg=this.mob.bg??this.bg,this.spc=this.mob.spc??this.spc,this.anim=this.mob.anim??this.anim,this.position=this.mob.position??this.position,this.embedded=this.mob.embedded??this.embedded}},ic=class{gap;dir;wrap;jc;ai;scroll;constructor(e){e??={},this.gap=e.gap??0,this.dir=e.dir??"row",this.wrap=e.wrap??"nowrap",this.jc=e.jc??"flex-start",this.ai=e.ai??"flex-start",this.scroll=e.scroll}},Ep=class{of;disp;pos;top;bottom;left;right;zIndex;constructor(e){e??={},this.of=e.of,this.disp=e.disp,this.pos=e.pos,this.top=e.top,this.bottom=e.bottom,this.left=e.left,this.right=e.right,this.zIndex=e.zIndex}},wp=class{w;h;maxW;maxH;minW;minH;constructor(e){e??={},this.w=e.w??"100%",this.h=e.h??"auto",this.maxW=e.maxW,this.maxH=e.maxH,this.minW=e.minW,this.minH=e.minH}},bp=class{size;bg;br;spc;typo;lout;flex;constructor(e){e??={},this.spc=new Ji(e.spc),e.size&&(this.size=new wp(e.size)),e.bg&&(this.bg=new As(e.bg)),e.br&&(this.br=new Xi(e.br)),e.typo&&(this.typo=new pn(e.typo)),e.lout&&(this.lout=new Ep(e.lout)),e.flex&&(this.flex=new ic(e.flex))}},oc=class{sm;lg;constructor(e){e??={},this.sm=new bp(e.sm),this.lg=new bp(e.lg)}},En=class{t;style;hide;when;clc;constructor(e,t){t??={},this.t=e,this.style=new oc(t.style),this.hide=t.hide,t.when?.op&&(this.when=t.when),t.clc&&(this.clc=t.clc)}get stringType(){return Ft[this.t]}},wn=class extends En{text;constructor(e,t){e?.style?.lg?.typo?.s&&delete e.style.lg.typo.s,e?.style?.sm?.typo?.s&&delete e.style.sm.typo.s,super(t??2,e),e??={},this.text=e.text}},Ps=class extends wn{constructor(e,t){super(e,t??3)}},sc=class extends En{value;constructor(e){super(6,e),e??={},this.value=e.value}},ac=class extends wn{constructor(e=15,t){super(t,e)}},Cp=class extends En{c;iconSize;showSingleStar;fullStar;halfStart;constructor(e){super(19,e),e??={},this.c=new Mt(e.c),this.iconSize=e.iconSize??24,this.showSingleStar=e.showSingleStar??!1,this.fullStar=e.fullStar,this.halfStart=e.halfStart}},zT=Re(fs()),rE=class{enabled;type;color;constructor(e){e??={},this.enabled=e.enabled,this.type=e.type,this.color=new Mt(e.color)}},iE=class{size;enabled;color;constructor(e){e??={},this.enabled=e.enabled,this.size=e.size,this.color=new Mt(e.color)}},Ul=class{navigation;pagination;autoplay;maxInRow;gap;slidesPerView;constructor(e){e??={},this.navigation=new iE(e.navigation),this.pagination=new rE(e.pagination),this.autoplay=e.autoplay,this.slidesPerView=e.slidesPerView??1,this.maxInRow=e.maxInRow??e.slidesPerView??4,this.gap=e.gap??0}},Sp=class extends En{conf;slide;formData;values;allowedTypes;constructor(e){super(62,e),e&&this.update(e)}update(e){e??={},this.slide=ur.getParsedElement(e.slide),this.formData=e.formData,this.values=e.values,this.conf=new Ul(e.conf),this.allowedTypes=e.allowedTypes}},Dp=class extends wn{gap;timer;timerType;horizontal;lblPos;show;constructor(e){e??={},super(e,61),this.gap=e.gap,this.timerType=e.type,this.timer=new Ja(e.timer),this.show=e.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=e.horizontal,this.lblPos=e.lblPos}},To=class extends En{elems;constructor(e){super(4,e),this.update(e)}update(e){e??={},this.elems??=[],e.elems?.forEach(t=>{let n=ur.getParsedElement(t);n&&this.elems.push(n)})}},ks=class extends En{src;sm;lg;constructor(e,t){super(t??1,e),e&&this.update(e)}update(e){this.src=e.src,this.sm=e.sm,this.lg=e.lg}},ur=class XS{static getParsedElements(t){let n=[];return t?.forEach(r=>{let i=XS.getParsedElement(r);i&&n.push(i)}),n}static getParsedElement(t){switch(t.t){case 2:return new wn(t);case 3:return new Ps(t);case 6:return new sc(t);case 11:return new Ip(t);case 12:return new xo(t);case 61:return new Dp(t);case 4:return new To(t);case 1:return new ks(t);case 13:return new ks(t,13);case 14:return new wn(t,14);case 15:case 16:return new ac(t.t,t);case 18:return new Ps(t,18);case 62:return new Sp(t);case 19:return new Cp(t);default:zT.default.error("Unknown element type",t.t);return}}static parseAlignmentToJustifyContent(t){switch(t){case 1:return"center";case 2:return"flex-end";case 0:return"flex-start";default:return"flex-start"}}},xo=class extends En{img;title;desc;price;compareAt;btn;variantDD;show;symbol;cBox;elems;noLinks;constructor(e){if(e??={},super(12,e),this.show=e.show,this.elems=ur.getParsedElements(e.elems),this.noLinks=e.noLinks,!this.elems.length){e.cBox&&this.elems.push(new sc(e.cBox)),this.elems.push(new ks(e.img,13));let t=new wn(e.title,14);t.hide=!e.show?.title,t.text="{{ product.name }}",this.elems.push(t);let n=new wn(e.price);n.text="{{ product.price }}",n.hide=!e.show?.price;let r=new wn(e.compareAt);r.text="{{ product.compare_price }}",r.hide=!e.show?.price,e.compareAt||(r.style=new oc(n.style),r.style.lg.typo=new pn(ne(w({},r.style.lg.typo),{td:"line-through"})),r.style.sm.typo=new pn(ne(w({},r.style.sm.typo),{td:"line-through"})));let i=new To({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:ur.parseAlignmentToJustifyContent(n.style.lg.typo?.ta)}}}});i.elems.push(r),i.elems.push(n),this.elems.push(i);let s=new ac(15,e.variantDD);if(s.hide=!e.show?.variantDD,this.elems.push(s),e.btn){let o=new Ps(e.btn,18);o.hide=!e.show?.btn,this.elems.push(o)}}e.symbol&&(this.symbol=new wn(e.symbol))}},Ip=class extends En{conf;prod;constructor(e){super(11,e),e??={},this.conf=new oE(e.conf),this.prod=new xo(e.prod)}},Tp=class extends Ul{disp;maxItems;constructor(e){e??={},super(e),this.disp=e.disp,this.maxItems=e.maxItems}},oE=class{lg;sm;constructor(e){e??={},this.lg=new Tp(e.lg),this.sm=new Tp(e.sm)}},xp=class extends To{constructor(e){super(e)}},cc=class{cont;elems=[];constructor(e){e=e??{},this.cont=new xp(e.cont),e.elems?.forEach(t=>{this.addRawElement(t)})}addRawElement(e){let t=ur.getParsedElement(e);return t&&this.elems.push(t),t}},qT=Re(Yn()),sE=class{minValue;rewardType;label;reachingText;reachedText;discount;items;calculatedAlignment;constructor(e){this.minValue=e.minValue,this.rewardType=e.rewardType,this.label=e.label,this.reachingText=e.reachingText,this.reachedText=e.reachedText,this.discount=e.discount,this.items=e.items?.map(t=>new gn(t))}},Rp=class{layout;milestones;onlyLatestGift;noConfetti;constructor(e){this.layout=e.layout??qT.ProgressBarLayout.ICONS,this.milestones=e.milestones?.map(t=>new sE(t))??[],this.onlyLatestGift=e.onlyLatestGift,this.noConfetti=e.noConfetti}},Np=class{applyDiscountOnMinimum;constructor(e){this.applyDiscountOnMinimum=e.applyDiscountOnMinimum}},Ap=class{id;alt;sources;items;durationMS;thumbnail;constructor(e={}){this.id=e.id,this.alt=e.alt,this.sources=e.sources,this.durationMS=e.durationMS,this.thumbnail=e.thumbnail,this.items=e.items?e.items.map(t=>new gn(t)):[]}},aE=(e=>(e.GALLERY="GALLERY",e.CURRENT_PRODUCT="CURRENT_PRODUCT",e))(aE||{}),cE=(e=>(e.SWIPER="SWIPER",e.SIMPLE="SIMPLE",e.STORY="STORY",e.FLOATING_POPUP="FLOATING_POPUP",e))(cE||{}),Mp=class{videos;source;template;heading;constructor(e={}){this.videos=e.videos?.map(t=>new Ap(t))??[],this.source=e.source,this.template=e.template,this.heading=e.heading}},Op=class{experiments;constructor(e){this.experiments=e.experiments?.map(t=>new lE(t))}},lE=class{cssSelector;type;display;bg;typo;br;text;constructor(e={}){this.cssSelector=e.cssSelector??"",this.type=e.type??"OTHER",this.display=e.display,e.bg&&(this.bg=new Mt(e.bg)),e.typo&&(this.typo=new pn(e.typo)),e.br&&(this.br=new Xi(e.br)),this.text=e.text}get style(){let e={};return this.display==="HIDE"?e.display="none":this.display==="BLOCK"?e.display="block":this.display==="INLINE"&&(e.display="inline"),this.br?.r&&(e.borderRadius=this.br.r+"px"),this.br?.w&&(e.borderWidth=this.br.w+"px"),this.br?.s&&(e.borderStyle=hp[this.br.s]?.toLowerCase()),this.br?.c?.h&&(e.borderColor=this.br.color?.rgba),this.bg?.h&&(e.backgroundColor=this.bg.rgba),this.type==="TEXT"&&this.typo&&(this.typo.fs&&(e.fontSize=this.typo.fs+"px"),this.typo.lh&&(e.lineHeight=this.typo.lh),this.typo.fw&&(e.fontWeight=this.typo.fw),this.typo.ta&&(e.textAlign=this.typo.alignment),this.typo.tc.h&&(e.color=this.typo.tc.rgba),this.typo.ls&&(e.letterSpacing=this.typo.letterSpacing),this.typo.td&&(e.textDecoration=this.typo.td??"none")),e}},uE=class{engagementID;shortID;contentType;delay;onsiteDeliveryType;objective;redirectBehaviour;constructor(e){this.shortID=e.shortID,this.contentType=e.contentType,this.engagementID=e.engagementID,this.delay=e.delay??0,this.redirectBehaviour=e.redirectBehaviour,this.onsiteDeliveryType=e.onsiteDeliveryType,this.objective=e.objective}isAnySplit(){return this.isABTesting()||this.isExclusionTesting()}isExclusionTesting(){return this.contentType===bn.EngagementContentType.EXCLUSION}isABTesting(){return this.contentType===bn.EngagementContentType.ABTESTING}isSingleContent(){return this.contentType===bn.EngagementContentType.SINGLE}},jn=class QS extends uE{static SWIPER_ELEMENTS=new Set([11,62]);nudgeID;contentID;variation;ian;widget;discount;placement;promotionType;contentSource;manipulation;klaviyoFormID;hasMultiplePlacement;skipSubscribedItems;progressBarConfig;stickyATCConfig;bundleConfig;content;previewType;occurred;id;currency;props;items;nonMutableItems;embeddedItems;bundleFrom;collections;customerData;experimentConfig;discountData=Rr({});constructor(t){super(t),this.id=t.id,this.nudgeID=t.nudgeID,this.currency=Oe.get().currencyCode??"USD",this.contentID=t.contentID,this.variation=t.variation,t.widget&&(this.widget=new cc(t.widget)),this.previewType=t.previewType,this.occurred=t.occurred??new Date,this.props=t.props,this.embeddedItems=t.embeddedItems?.map(n=>new gn(n)),this.items=t.items?.map(n=>new Kn(n))??[],this.nonMutableItems=t.items?.map(n=>new Kn(n))??[],this.collections=t.collections?.map(n=>new fp(n))??[],this.discount=t.discount,this.placement=t.placement,this.customerData=t.customerData,this.ian=t.ian?this.processPopup(t.ian):void 0,this.promotionType=t.promotionType,this.manipulation=new pp(t.manipulation),this.contentSource=t.contentSource,this.klaviyoFormID=t.klaviyoFormID,this.hasMultiplePlacement=t.hasMultiplePlacement,this.skipSubscribedItems=t.skipSubscribedItems,this.stickyATCConfig=t.stickyATCConfig,t.experimentConfig&&(this.experimentConfig=new Op(t.experimentConfig)),t.progressBarConfig&&(this.progressBarConfig=new Rp(t.progressBarConfig)),t.bundleConfig&&(this.bundleConfig=new Np(t.bundleConfig)),t.bundleFrom&&(this.bundleFrom=new Kn(t.bundleFrom)),t.content?.videoConfig&&(this.content={videoConfig:new Mp(t.content.videoConfig)})}shouldDelay(){return this.delay>0}sentryContext(){return{id:this.id,shortID:this.shortID,currency:this.currency,contentType:this.contentType,objective:this.objective,onsiteDeliveryType:this.onsiteDeliveryType,engagementID:this.engagementID,contentID:this.contentID,nudgeID:this.nudgeID,variation:this.variation}}getDelaySeconds(){let t=new Date().getTime()-this.occurred.getTime();return this.delay*1e3-t}isBundle(){return this.objective===bn.EngagementObjective.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===bn.OnsiteDeliveryType.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===bn.OnsiteDeliveryType.PAGE_EMBED}isProgressBar(){return this.objective===bn.EngagementObjective.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===bn.EngagementObjective.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===bn.EngagementObjective.CART_RECOVERY}isProductPromotion(){return this.objective===bn.EngagementObjective.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isCollectionPromoted(){return this.isProductPromotion()&&this.collections.length>0&&this.promotionType===bn.PromotionType.COLLECTION}isBYOB(){return this.objective===bn.EngagementObjective.BYOB}isStickyATC(){return this.objective===bn.EngagementObjective.STICKY_ATC}isShoppableVideo(){return this.objective===bn.EngagementObjective.SHOPPABLE_VIDEO}processPopup(t){let n=JSON.stringify(t),r=this.items[0],i={},s={};if(r){let l=r.selectedOrFirstVariant.value;i={name:r.name,id:r.mID,link:r.link,vID:l.mID,image:r.variantImage,price:oe.formatCurrency(l.price.d),comparePrice:oe.formatCurrency(l.price.cmp),quantity:r.quantity},s={quantity:l.quantity}}let o={productCount:Ue.getCurrent().item_count},a=_n.render(n,{product:i,variant:s,cart:o,discount:this.discount,customer:this.customerData});return r&&(a=a.replace(new RegExp(k.PLACEHOLDER_IMAGE,"gi"),r.variantImage??r.imageURL)),new _p(JSON.parse(a))}calculateDiscountData(t,n){let r=Pp.ArrayUtils.sum(t,o=>o.selectedOrFirstVariant.value.price.d),i=Pp.ArrayUtils.sum(t,o=>{let a=o.selectedOrFirstVariant.value.price;return a.cmp??a.d}),s={actualPrice:r,totalComparePrice:i,discountAmount:0,discountPercentage:0,discountedPrice:r};if(!t?.length||!n||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(s);return}if(Ro.DiscountType.BXGY===this.discount.type&&this.discount.values?.length)s.discountPercentage=this.discount.values[0],this.updateEffectivePrice(t,s.discountPercentage,!0),s.discountAmount=s.actualPrice-Pp.ArrayUtils.sum(t,o=>o.selectedOrFirstVariant.value.effectivePrice.value);else if([Ro.DiscountType.UNIQUE_FLAT_ITEMS,Ro.DiscountType.STATIC].includes(this.discount.type)&&this.discount.values?.length)s.discountPercentage=this.discount.values[0],s.discountAmount=s.actualPrice*s.discountPercentage/100,this.updateEffectivePrice(t,s.discountPercentage);else if(this.discount.type===Ro.DiscountType.UNIQUE_FIXED_ITEMS&&this.discount.values?.length)s.discountAmount=s.actualPrice-this.discount.values[0],s.discountPercentage=s.discountAmount/s.actualPrice*100,this.updateEffectivePrice(t,s.discountPercentage);else if(this.discount.type===Ro.DiscountType.UNIQUE_CHEAPEST_ITEM_FREE){t.sort((a,l)=>l.selectedOrFirstVariant.value.price.d-a.selectedOrFirstVariant.value.price.d);let o=t[t.length-1];o.selectedOrFirstVariant.value.effectivePrice.value=0,s.discountAmount=o.selectedOrFirstVariant.value.price.d,s.discountPercentage=s.discountAmount/s.actualPrice*100}s.discountedPrice=s.actualPrice-s.discountAmount,this.discountData.value=this.formatCurrencyAndNumber(s)}getPrivateAttributesForLineItem(){return Ct.get().skipItemAttribute?{}:{[k.VIA]:"Cooee",[k.CAMPAIGN_ATTRIBUTE]:this.shortID,[k.CONTENT_ATTRIBUTE]:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return Ct.get().skipItemAttribute?[]:[{key:k.VIA,value:"Cooee"},{key:k.CAMPAIGN_ATTRIBUTE,value:this.shortID},{key:k.CONTENT_ATTRIBUTE,value:this.contentID}]}isBundleDiscount(){return[Ro.DiscountType.UNIQUE_FIXED_ITEMS,Ro.DiscountType.UNIQUE_FLAT_ITEMS].includes(this.discount.type)}isBundleOnCartDrawer(){return this.isBundle()&&this.isCartEmbed()}isBundleOnPDP(){return this.isPageEmbed()&&this.isBundle()}hasSwiperElement(){let t=this.widget?.elems.find(r=>QS.SWIPER_ELEMENTS.has(r.t));if(!t)return!1;if(t.t===62)return!0;let n=ar.get().isMobile()?"sm":"lg";return t.conf[n].disp===2}toString(){return`Engagement(id=${this.shortID})`}getCartMagicVariables(){let t=Ue.getCurrent();return{productCount:t.item_count,amount:oe.formatCurrency(t.total_price/100),originalAmount:oe.formatCurrency(t.original_total_price/100)}}updateEffectivePrice(t,n,r=!1){let i=Oe.get().getCurrentItem();t.forEach(s=>{let o=s.selectedOrFirstVariant.value,a=o.price;if(r&&s.mID===i.mID)o.effectivePrice.value=a.d;else{let l=a.d*n/100;o.effectivePrice.value=a.d-l}})}formatCurrencyAndNumber(t){if(!t)return{};let n={discountPercentage:oe.formatNumber(t.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice","totalComparePrice"].map(r=>{n[r]=oe.formatCurrency(t[r])}),n}},lc=class{constructor(e,t){this._startTime=e,this._triggerData=t}intervals=[];selectedEmbeddedItems;renderer;closeCallback;inputFields=[];get startTime(){return this._startTime}get triggerData(){return this._triggerData}get inputs(){return this.inputFields}get rootClassName(){let e=this.triggerData.shortID??this.triggerData.id.slice(-6);return e==="test"&&(e="test-"+this.startTime.getTime().toString()),k.IN_APP_WRAPPER_NAME+"-"+e}get selectedItems(){return this.triggerData.items.filter(e=>e.selected.value)}get shouldGiveFBTDiscount(){let e=this.selectedItems.length;return this.triggerData.bundleConfig?.applyDiscountOnMinimum?this.triggerData.bundleConfig.applyDiscountOnMinimum<=e:e===this.triggerData.items.length}onClose(e){this.closeCallback=e}closeInApp(e,t){t??={};let n=(new Date().getTime()-this.startTime.getTime())/1e3,r=w({eventName:e,duration:n},t);this.stopIntervals(),this.closeCallback&&this.closeCallback(r)}addInputField(e,t){this.inputFields.push({id:e,type:t,isValid:!1})}updateValidation(e,t){this.inputFields.forEach(n=>{if(n.id===e){n.isValid=t;return}})}hasManipulatedProductQuantity(){let e=this.triggerData.manipulation.productQuantity;return e?.enabled&&e.min!=null&&e.max!=null}getManipulatedQuantity(e){let{min:t=1,max:n=100}=this.triggerData.manipulation.productQuantity;if(t>n)return b.error("Invalid range: min should be less than or equal to max."),e;if(e>=t&&e<=n)return e;let r=e%100;return r<t?t:r>n?n:r}stopIntervals(){this.intervals.forEach(e=>clearInterval(e))}},kp=class{loadedFonts=[];async loadAllFonts(e){e.elems?.forEach(t=>{t instanceof bi&&this.loadFamily(t.typography?.fam)})}async loadFamily(e){if(!e?.fonts||this.loadedFonts.indexOf(e.name)>-1)return;let t=[];e.fonts.forEach(n=>{if(n.url){let r=new FontFace(k.COOEE+e.name,n.getURL(),n.getFontDescriptor());t.push(r.load())}}),this.loadedFonts.push(e.name),(await Promise.all(t)).forEach(n=>{document.fonts.add(n)})}},Lp=class{static updateIdentity(e){if(!this.isInstalled())return;let t={};e.email&&(t.email=e.email),e.mobile&&(t.phone_number=e.mobile),b.debug("Sending email/mobile to Klaviyo"),window.klaviyo.push(["identify",t])}static isInstalled(){return window.klaviyo&&typeof window.klaviyo=="object"}},Fp=class{apiService;action;triggerContext;constructor(e,t){this.action=e,this.apiService=Ke.getInstance(),this.triggerContext=t}async execute(){let e=this.containsCTA()?k.EVENT_TRIGGER_CLICKED:k.EVENT_TRIGGER_CLOSED;switch(this.action.at!==106&&await this.closeTriggerAndSendEvent(e),this.action.at){case 2:break;case 4:this.gotoURLAction();break;case 5:this.shareAction();break;case 106:await this.collectFormData();break;case void 0:case 105:break;default:b.error("Received an invalid ClickActionType: ",this.action.at);return}}externalAction(){this.action.ext?.u&&window.open(this.action.ext.u,"_blank")?.focus()}gotoURLAction(){if(this.action.gu?.u){let e=this.action.gu.u;oe.isValidURL(e)||(e=`//${e}`),window.open(e,"_self")}}prompt(){let e=this.action.pmpt;e&&(e===2&&this.promptLocationPermission(),e===3&&this.promptPushNotificationPermission(),e===1&&this.promptCameraPermission())}async closeTriggerAndSendEvent(e,t){this.triggerContext.closeInApp(e,t),await this.dispatchEvent()}shareAction(){if(this.action.share){if(!navigator.share){b.warn("Navigator.share is not compatible with this browser");return}navigator.share({text:this.action.share.text,title:"Share"}).then(e=>console.log(e)).catch(e=>console.error(e))}}containsCTA(){return this.action.at&&this.action.at!==1?!0:!(this.isEmpty(this.action.custKV)&&this.isEmpty(this.action.up))}isEmpty(e){return e?Object.keys(e).length===0:!0}promptLocationPermission(){!navigator.geolocation||!navigator.permissions||navigator.geolocation.getCurrentPosition(e=>{this.apiService.updateDeviceProps({coords:[e.coords.latitude,e.coords.longitude]}),this.sendPermissionData()})}promptPushNotificationPermission(){if(!("Notification"in window)){b.warn("This browser does not support desktop notification");return}if(Notification.permission!=="default"){this.apiService.updateDeviceProps({pnPerm:Notification.permission});return}Notification.requestPermission().then(()=>{this.sendPermissionData()})}promptCameraPermission(){navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally(()=>{this.sendPermissionData()})}checkPermission(e){return navigator.permissions.query({name:e}).then(t=>t.state.toString())}async checkAllPermission(){let e=await this.checkPermission("camera"),t=await this.checkPermission("geolocation"),n=Notification.permission;return{camera:e,location:t,notification:n}}sendPermissionData(){this.checkAllPermission().then(e=>{this.apiService.updateDeviceProps({perm:e})})}async collectFormData(){let e={};for(let t of this.triggerContext.inputs){if(!t.isValid)return;let n=document.getElementById(t.id).value;t.type===51?e.email=n:t.type===52&&(e.mobile=n)}await this.closeTriggerAndSendEvent(k.EVENT_FORM_SUBMITTED,{form:e}),oe.showSnackbar("Coupon applied on cart"),Lp.updateIdentity(e)}async dispatchEvent(){let e=this.triggerContext.triggerData,t={clickAction:this.action,items:this.triggerContext.selectedEmbeddedItems??e.embeddedItems??e.items,collections:e.collections,triggerData:e};await new Ci().process(t);let n={action:this.containsCTA()?k.CAMPAIGN_CLICKED_ACTIVITY:k.CAMPAIGN_CLOSED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:n}))}},uc=class{constructor(e){this.scalingFactor=e}getLayoutStyles(e){if(!e)return{display:"block"};let t={display:e.disp};return e.of&&(t.objectFit=e.of),e.pos==="absolute"&&(t.width="auto !important",t.position="absolute",t.right=e.right+"px",t.left=e.left+"px",t.top=e.top+"px",t.bottom=e.bottom+"px"),t}getSizeStyles(e){let t={};return e?.w&&(t.width=e.w),e?.h&&(t.height=e.h),e?.maxW&&(t.maxWidth=e.maxW),e?.maxH&&(t.maxHeight=e.maxH),e?.minW&&(t.minWidth=e.minW),e?.minH&&(t.minHeight=e.minH),t}getBorderStyles(e){if(!e)return{};let t={};return e.radius&&e.radius>0&&(t.borderRadius=this.getSizePx(e.radius)),e.width&&e.width>0&&(t.borderWidth=this.getSizePx(e.width),t.borderStyle=e.style?.toLowerCase(),e.color?this.getColourStyles(e.color,"border-color",t):t.borderColor="black"),t}getFlexStyles(e){return e?{gap:e.gap+"px",flexWrap:e.wrap,flexDirection:e.dir,justifyContent:e.jc,alignItems:e.ai,width:"100%"}:{}}getSpaceStyles(e){let t={};return e?(t.paddingTop=this.getSizePx(e.pt),t.paddingBottom=this.getSizePx(e.pb),t.paddingLeft=this.getSizePx(e.pl),t.paddingRight=this.getSizePx(e.pr),t.marginTop=this.getSizePx(e.mt),t.marginBottom=this.getSizePx(e.mb),t.marginLeft=e.cent?"auto":this.getSizePx(e.ml),t.marginRight=e.cent?"auto":this.getSizePx(e.mr),t):(t.margin="0 !important",t.padding="unset",t)}getBackgroundStyles(e){if(!e)return{};let t={};if(e.glossy){let n="backdrop-filter",r="-webkit-"+n,i=`blur(${e.glossy.radius}px)`;if(!CSS.supports(r,i)&&!CSS.supports(n,i))return{background:e.glossy.fallback.rgba};if(t[r]=i,t[n]=i,e.glossy.color)return this.getColourStyles(e.glossy.color,"background",t)}else if(e.solid){if(e.solid.grad)return this.getGradientStyles(e.solid.grad,"background",t);if(e.solid.hex)return{backgroundColor:e.solid.rgba}}else if(e.img){if(!e.img.src)return{};let n=(e.img.a??0)/100;t.background=`linear-gradient(rgba(0, 0, 0, ${n}), rgba(0, 0, 0, ${n})),url("${e.img.src}") no-repeat center`,t.backgroundSize="cover",e.img.a&&(t["-webkit-backdrop-filter"]=`opacity(${e.img.a})`,t.backdropFilter=`opacity(${e.img.a})`)}return t}getGradientStyles(e,t,n){if(n??={},e.type==="LINEAR"){let r=`linear-gradient(${e.ang}deg, ${e.c1}, ${e.c2}`;e.c3&&(r+=`, ${e.c3}`),r+=")",n[t]=r}return n}getColourStyles(e,t="color",n){return n??={},e?e.grad?this.getGradientStyles(e.grad,t,n):(e.hex&&(n[t]=e.rgba),n):n}getSizePx(e){return this.getScaledSize(e)+"px"}getScaledSize(e){return(e??0)*this.scalingFactor}},Nr=class{renderer=ar.get();parentHTMLEl;inappElement;inappHTMLEl;triggerContext;stylesConverter;scalingFactor;constructor(e,t,n){this.parentHTMLEl=e,this.inappElement=t,this.triggerContext=n,this.stylesConverter=new uc(this.renderer.getScalingFactor())}getHTMLElement(){return this.inappHTMLEl}insertElement(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)}processCommonBlocks(){this.processWidthAndHeight(),this.processPositionBlock(),this.processTransformBlock(),this.processTransparency(),this.processShadow(),this.registerAction();let e=ne(w(w(w(w({},this.getDisplayStyles()),this.getSpaceStyles()),this.getBorderStyles()),this.getBackgroundStyles()),{boxSizing:"border-box",outline:"none"});this.renderer.setStyles(this.inappHTMLEl,e)}getDisplayStyles(){return{display:"block"}}processWidthAndHeight(){this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.stylesConverter.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.stylesConverter.getSizePx(this.inappElement.h))}processPositionBlock(){let e={position:"absolute",left:this.stylesConverter.getSizePx(this.inappElement.x),top:this.stylesConverter.getSizePx(this.inappElement.y)};this.renderer.setStyles(this.inappHTMLEl,e)}getBorderStyles(){return this.stylesConverter.getBorderStyles(this.inappElement.br)}getSpaceStyles(){return this.stylesConverter.getSpaceStyles(this.inappElement.spc)}processTransparency(){let e=this.inappElement.alpha;if(!isNaN(e)){let t=(e/100).toFixed(2);this.renderer.setStyle(this.inappHTMLEl,"opacity",t)}}processShadow(){let e=this.inappElement.shd;e?this.renderer.setStyle(this.inappHTMLEl,"box-shadow",e.getStyle(this.scalingFactor)):this.renderer.setStyle(this.inappHTMLEl,"box-shadow","unset")}processTransformBlock(){let e=new Ms(this.inappElement.trf);e&&e.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform",`rotate(${e.rotate}deg)`)}registerAction(){let e=this.inappElement.clc;!e||Object.keys(e).length===0||(this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation(),new Fp(e,this.triggerContext).execute()}),this.renderer.setStyle(this.inappHTMLEl,"cursor","pointer"))}getBackgroundStyles(){return this.stylesConverter.getBackgroundStyles(this.inappElement.bg)}},Si=class extends Nr{constructor(e,t,n){super(e,t,n)}processCommonBlocks(){super.processCommonBlocks(),this.processFontBlock(),this.processAlignment()}processFontBlock(){let e={},t=this.inappElement.typography;return t&&(e.fontSize=this.stylesConverter.getSizePx(t.fs),e.fontFamily=k.COOEE+t.fam?.name,e.lineHeight=`${t.lh}`,e.letterSpacing=t.letterSpacing),this.stylesConverter.getColourStyles(this.inappElement.color,"color",e),this.renderer.setStyles(this.inappHTMLEl,e),e}processPart(e,t){let n=[];t.u&&n.push("underline"),t.st&&n.push("line-through"),n.length||n.push("normal"),this.renderer.setStyle(e,"font-weight",t.b?"bold":"normal"),this.renderer.setStyle(e,"font-style",t.i?"italic":"normal"),this.renderer.setStyle(e,"text-decoration",n.join(" ")),this.renderer.setStyle(e,"color",t.c??"inherit"),this.renderer.setStyle(e,"font-family","inherit")}processAlignment(){let e=this.inappElement.typography.ta,t=e?Xa[e]?.toLowerCase():this.inappElement.typography.alignment;t||(t="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",t)}},Hl=class extends Si{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.inappElement.parts?.forEach(e=>{let t=this.renderer.createElement("span");t.innerHTML=e.txt?.toString()?.replace(/\n/g,"<br />"),this.processPart(t,e),this.renderer.appendChild(this.inappHTMLEl,t)}),this.processCommonBlocks()}},jl=class extends Nr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.processCommonBlocks()}},Ls=class extends Nr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("img"),this.insertElement()}render(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","none"),this.renderer.setStyle(this.inappHTMLEl,"max-height","none"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()}},$l=class JS extends Nr{constructor(t,n,r){super(t,n,r),this.parent=t,this.inappHTMLEl=this.renderer.createElement("div")}static MAX_Z_INDEX="2147483647";render(){return this.parent||this.renderer.removeInApp(this.triggerContext),this.insertElement(),this.processCommonBlocks(),this.inappHTMLEl.classList.add(k.IN_APP_WRAPPER_NAME),this.inappHTMLEl.classList.add(this.triggerContext.rootClassName),this.renderer.setStyle(this.inappHTMLEl,"z-index",JS.MAX_Z_INDEX),this.inappHTMLEl}getBackgroundStyles(){return this.inappElement.cover?super.getBackgroundStyles():{}}processWidthAndHeight(){let t=this.inappElement.cont;if(this.inappElement.cover)this.renderer.isParentNotBody()?(this.renderer.setStyle(this.inappHTMLEl,"width","100%"),this.renderer.setStyle(this.inappHTMLEl,"height","100%")):(this.renderer.setStyle(this.inappHTMLEl,"width","100vw"),this.renderer.setStyle(this.inappHTMLEl,"height","100vh")),this.renderer.setStyle(this.inappHTMLEl,"top","0"),this.renderer.setStyle(this.inappHTMLEl,"left","0");else{let n=this.inappElement.spc,r=this.stylesConverter.getScaledSize(t.w)+n.getHorizontal(),i=this.stylesConverter.getScaledSize(t.h)+n.getVertical();this.renderer.setStyle(this.inappHTMLEl,"width",r+"px"),this.renderer.setStyle(this.inappHTMLEl,"height",i+"px")}}getSpaceStyles(){return{padding:this.inappElement.spc.getPaddingCSS()}}getDisplayStyles(){return w(w({display:"flex"},this.inappElement.getStylesForWrapper()),this.inappElement.getFlexStylesForContainer())}processPositionBlock(){if(this.renderer.isParentNotBody()){if(this.triggerContext.triggerData.ian?.isEmbedded()){this.renderer.setStyle(this.inappHTMLEl,"position","block");return}this.renderer.setStyle(this.inappHTMLEl,"position","absolute")}else this.renderer.setStyle(this.inappHTMLEl,"position","fixed")}getBorderStyles(){return{}}processTransparency(){}processTransformBlock(){}processShadow(){}},Vp=class extends Nr{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){return this.processCommonBlocks(),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this.renderer.setStyle(this.inappHTMLEl,"overflow","hidden"),this.inappHTMLEl.classList.add(k.IN_APP_CONTAINER_NAME),this}},dc=class extends Si{borderColor="";constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("input"),this.insertElement()}render(){let e=this.setInputType();this.renderer.setAttribute(this.inappHTMLEl,"placeholder",this.inappElement.placeholderText),this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.inappHTMLEl.addEventListener("click",t=>{t.stopPropagation()}),this.processCommonBlocks(),this.addListener(this.inappHTMLEl,e),this.triggerContext.addInputField(e,this.inappElement.t)}},Up=class px extends dc{static EMAIL_REGEX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;constructor(t,n,r){super(t,n,r)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","email"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,n){t.addEventListener("keydown",r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(px.EMAIL_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(n,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(n,!1)),r.stopPropagation()})}},Hp=class fx extends dc{static MOBILE_REGEX=/^\d+$/;constructor(t,n,r){super(t,n,r)}setInputType(){let t=`coo-${this.inappElement.t}`;return this.renderer.setAttribute(this.inappHTMLEl,"type","tel"),this.renderer.setAttribute(this.inappHTMLEl,"id",t),t}addListener(t,n){t.addEventListener("keydown",r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),t.value.match(fx.MOBILE_REGEX)?(this.renderer.setStyle(this.inappHTMLEl,"border-color",this.borderColor),this.triggerContext.updateValidation(n,!0)):(this.renderer.setStyle(this.inappHTMLEl,"border-color","red"),this.triggerContext.updateValidation(n,!1)),r.stopPropagation()})}},jp=class us extends Si{static DAYS="Days";static HOURS="Hours";static MINUTES="Minutes";static SECONDS="Seconds";elements;spans=[];constructor(t,n,r){super(t,n,r),this.inappHTMLEl=this.renderer.createElement("div"),this.insertElement()}render(){this.addTimerChildren(),this.processAndStartTimer(),this.processCommonBlocks();let t=ne(w(w(w({flex:"1 1 0"},this.stylesConverter.getBackgroundStyles(this.inappElement.bg)),this.stylesConverter.getBorderStyles(this.inappElement.br)),this.stylesConverter.getSpaceStyles(this.inappElement.spc)),{marginLeft:this.stylesConverter.getSizePx(this.inappElement.gap),marginRight:this.stylesConverter.getSizePx(this.inappElement.gap)});this.addStylesToTimer(t)}getBackgroundStyles(){return{}}processFontBlock(){let t=super.processFontBlock();return this.stylesConverter.getColourStyles(this.inappElement.color,"color",t),this.addStylesToTimer(t),t}getSpaceStyles(){return{}}getBorderStyles(){return{}}getDisplayStyles(){return{display:"flex",flexWrap:"nowrap",justifyContent:"center"}}addStylesToTimer(t){this.elements.forEach(n=>this.renderer.setStyles(n,t))}addTimerChildren(){let t=this.inappElement.show;this.elements=[],t.day&&this.elements.push(this.getChild(us.DAYS)),t.hour&&this.elements.push(this.getChild(us.HOURS)),t.minute&&this.elements.push(this.getChild(us.MINUTES)),t.second&&this.elements.push(this.getChild(us.SECONDS)),this.elements.forEach(n=>this.inappHTMLEl.appendChild(n))}getChild(t){let n=this.renderer.createElement("div"),r=this.renderer.createElement("span"),i=this.renderer.createElement("span");return i.innerText=t,r.innerText="00",r.id=`lc-${t}`,this.renderer.setStyle(i,"font-size","0.5em"),this.renderer.setStyle(i,"text-align","center"),this.renderer.setStyle(i,"font-family","inherit"),this.renderer.setStyle(r,"text-align","center"),this.renderer.setStyle(r,"font-family","inherit"),this.inappElement.lblPos==="start"?(n.appendChild(i),n.appendChild(r)):(n.appendChild(r),n.appendChild(i)),this.renderer.setStyle(n,"display","flex"),this.renderer.setStyle(n,"flex-direction",this.inappElement.horizontal?"":"column"),this.renderer.setStyle(n,"justify-content","center"),this.renderer.setStyle(n,"align-items","center"),this.renderer.setStyle(n,"gap","5px"),this.spans.push(r),n}processAndStartTimer(){let t=this.inappElement.timer.start(this.inappElement.timerType,n=>{this.spans.forEach(r=>{r.id===`lc-${us.DAYS}`?r.innerText=String(n.days).padStart(2,"0"):r.id===`lc-${us.HOURS}`?r.innerText=String(n.hours).padStart(2,"0"):r.id===`lc-${us.MINUTES}`?r.innerText=String(n.minutes).padStart(2,"0"):r.id===`lc-${us.SECONDS}`&&(r.innerText=String(n.seconds).padStart(2,"0"))})});this.triggerContext.intervals.push(t)}},$p=class extends Si{constructor(e,t,n){super(e,t,n),this.inappHTMLEl=this.renderer.createElement("select"),this.insertElement()}render(){this.renderer.setStyle(this.inappHTMLEl,"background","#ffffff00"),this.renderer.setStyle(this.inappHTMLEl,"outline","none"),this.processCommonBlocks(),this.addListener(this.inappHTMLEl),this.addOptions()}addListener(e){this.triggerContext.selectedEmbeddedItems?.length||this.updateItems(this.triggerContext.triggerData.items[0].vars[0]),e.addEventListener("click",t=>{t.stopPropagation()}),e.addEventListener("change",()=>{let t=new wi(JSON.parse(e.value));this.updateItems(t)})}updateItems(e){let t=this.triggerContext.triggerData.items[0];this.triggerContext.selectedEmbeddedItems=[t.toEmbed(e)];let n=this.parentHTMLEl.querySelector("#coo-13");if(!n)return;let r=e.imgs[0]??t.imgs?.at(0);r?.url&&n.setAttribute("src",r.url)}addOptions(){let e=this.triggerContext.triggerData.items,t=this.inappHTMLEl;if(!e?.length){t.add(this.createOption(this.inappElement.placeholderText));return}let n=this.triggerContext.selectedEmbeddedItems?.at(0);e[0].vars.forEach(r=>{t.add(this.createOption(r.name??"Default",r,r.mID===n?.vID))})}createOption(e,t,n){let r=this.renderer.createElement("option");return r.text=e,r.value=JSON.stringify(t),n&&(r.selected=!0),t||(r.disabled=!0),r}},Wp=class extends Ls{constructor(e,t,n){super(e,t,n)}render(){super.render(),this.inappHTMLEl.setAttribute("id",`coo-${this.inappElement.type}`)}},fc=class Rc{static ACTIVE_TRIGGER_DATA;renderer=ar.get();safeHTTP;parent;rootContainer;containerHTMLElement;ian;triggerContext;resizeListener;cartDrawerToggleSubscription;constructor(t){this.safeHTTP=Ke.getInstance(),this.resizeListener=()=>this.screenResized(),this.setParentContainer(t)}setParentContainer(t){this.parent=t??document.body,this.renderer.setParentContainer(this.parent)}render(t){this.renderEngagement(new jn(t))}async renderEngagement(t){if(this.triggerContext=new lc(new Date,t),this.triggerContext.onClose(n=>{this.closeInApp(n)}),this.ian=t.ian,(this.renderer.isMobile()||t.previewType==="mobile")&&this.ian.overrideForMobileView(),this.ian.isEmbedded()){let n=document.querySelector(this.ian.getEmbeddedSelector());this.setParentContainer(n)}await this.preloadImages(t),t.shouldDelay()?window.setTimeout(()=>{this.withCartDrawerClosed()},t.getDelaySeconds()):this.withCartDrawerClosed()}withCartDrawerClosed(){if(!zt.get().isOpen()||!this.renderer.isMobile()){this.startRenderingOnce();return}this.cartDrawerToggleSubscription=zt.get().onToggle().subscribe(({open:t})=>{!t&&this.startRenderingOnce()})}startRenderingOnce(){if(!this.shouldSkipCampaign()){Rc.ACTIVE_TRIGGER_DATA=this.triggerContext.triggerData;try{this.startRendering()}catch(t){St.getInstance().captureException(t,{triggerData:JSON.stringify(this.triggerContext.triggerData)});return}this.sendTriggerDisplayed(),this.renderer.isMobile()||window.addEventListener("resize",this.resizeListener),this.cartDrawerToggleSubscription?.unsubscribe()}}shouldSkipCampaign(){let t=this.triggerContext.triggerData;if(!t.previewType&&Rc.ACTIVE_TRIGGER_DATA){let r={triggerShown:new Co(Rc.ACTIVE_TRIGGER_DATA??{})};return this.skipTrigger(t,r),!0}if(Oe.get().isGoKwikPopupOpen)return this.skipTrigger(t,{reason:"GoKwik popup is open"}),!0;let n=k.PAYMENT_MODAL_DETAILS.find(r=>!!document.querySelector(r.identifier));return n?(this.skipTrigger(t,{reason:`${n.gateway} modal is open`}),!0):!1}startRendering(){this.renderer.calculateScalingFactor(this.ian),this.rootContainer=new $l(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext)}catch(t){throw b.error(t),t}}sendTriggerDisplayed(){let t={};this.triggerContext.triggerData.items?.length&&(t.promotedMIDs=this.triggerContext.triggerData.items?.map(i=>i.mID));let n=new Pe(k.EVENT_TRIGGER_DISPLAYED,t,this.triggerContext.triggerData);this.safeHTTP.sendEvent(n);let r={action:k.CAMPAIGN_DISPLAYED_ACTIVITY};document.dispatchEvent(new CustomEvent(k.POPUP_ACTIVITY_EVENT,{detail:r}))}sendTriggerClosed(t){let n=t.eventName;delete t.eventName;let r=new Pe(n,t,this.triggerContext.triggerData);r.name===k.EVENT_TRIGGER_CLICKED&&(r.items=this.triggerContext.selectedEmbeddedItems??this.triggerContext.triggerData.items?.map(i=>i.toEmbed())),this.safeHTTP.sendEvent(r)}addEnterAnimation(t){this.containerHTMLElement.animate(t.getEnterAnimation(),{duration:500})}renderElement(t,n,r){n instanceof tc?new Up(t,n,r).render():n instanceof nc?new Hp(t,n,r).render():n instanceof Do?new Hl(t,n,r).render():n instanceof rc?new Wp(t,n,r).render():n instanceof Qi?new Ls(t,n,r).render():n instanceof Os?new jl(t,n,r).render():n instanceof Qa?new jp(t,n,r).render():n instanceof ec?new $p(t,n,r).render():b.error("Unsupported element type- "+n.type)}renderContainer(t){let n=this.ian?.cont;n&&(this.containerHTMLElement=new Vp(this.rootContainer,n,t).render().getHTMLElement(),new kp().loadAllFonts(this.ian),this.ian.elems?.forEach(async r=>{await this.renderElement(this.containerHTMLElement,r,t)}),this.addEnterAnimation(this.ian.anim))}closeInApp(t){let n=this.ian.anim.getExitAnimation();this.sendTriggerClosed(t),Rc.ACTIVE_TRIGGER_DATA=void 0;let r=this.containerHTMLElement.animate(n,{duration:500,easing:"ease-in-out"});r.onfinish=()=>{this.removeInApp(),window.removeEventListener("resize",this.resizeListener)}}screenResized(){this.removeInApp(),this.startRendering()}removeInApp(){ar.get().removeInApp(this.triggerContext)}skipTrigger(t,n){let r=new Pe(k.EVENT_CAMPAIGN_REJECTED,n,t);this.safeHTTP.sendEvent(r)}async preloadImages(t){let n=t.ian;if(!n)return;let r=[];n.elems.forEach(i=>{let s=i.bg?.img?.src;if(s&&r.push(this.getPromise(s)),i.t===1){let o=i.src;if(!o)return;r.push(this.getPromise(o))}}),n.bg?.img?.src&&r.push(this.getPromise(n.bg.img.src)),n.cont.bg?.img?.src&&r.push(this.getPromise(n.cont.bg.img.src)),await Promise.all(r)}getPromise(t){return new Promise(n=>{let r=new Image;r.onload=n,r.src=t,r.style.display="none"})}},YT=Re(Yn()),KT=Re(xa()),Gp=class{triggerData;safeHttpService=Ke.getInstance();render(e){e.contentSource===YT.EngagementContentSource.KLAVIYO&&(this.triggerData=e,window.addEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),window._klOnsite=window._klOnsite||[],window._klOnsite.push(["openForm",e.klaviyoFormID]))}handleKlaviyoEvents(e){if(e.type!=="klaviyoForms")return;let t=e.detail;if(t.formId!==this.triggerData.klaviyoFormID){b.warn("Received invalid trigger callback");return}switch(t.type){case"open":this.safeHttpService.sendEvent(new Pe(k.EVENT_TRIGGER_DISPLAYED,{form:{id:t.formId}},this.triggerData));break;case"stepSubmit":{let n=this.getFormDetails(t);this.safeHttpService.sendEvent(new Pe(k.EVENT_FORM_SUBMITTED,{form:n},this.triggerData)),this.safeHttpService.updateProfile(n);break}case"close":window.removeEventListener("klaviyoForms",this.handleKlaviyoEvents.bind(this)),this.safeHttpService.sendEvent(new Pe(k.EVENT_TRIGGER_CLOSED,{form:{id:t.formId}},this.triggerData));break}}getFormDetails(e){let t={id:e.formId},n=e.metaData;if(KT.JSUtils.hasKeys(n)){let r=["email","phone_number","first_name","last_name","$email","$phone_number","$first_name","$last_name"];Object.keys(n).forEach(o=>{r.includes(o)||(t[o]=n[o])}),t.email=n.$email??n.email,t.mobile=n.$phone_number??n.phone_number;let i=n.$first_name??n.first_name,s=n.$last_name??n.last_name;(i?.length||s?.length)&&(t.name=i+" "+s)}return t}},zp=class{static trackIntent(e){if(!this.isInstalled()){b.log("Facebook pixel not installed");return}if(!Ct.get().pixelPush){b.log("Facebook pixel push not enabled");return}let t=xs[e.intent]?.toLowerCase(),n=e.segmentName;!t&&!n||(b.debug(`Sending ${t} intent and ${n} segment to Facebook Pixel`),window.fbq("trackCustom","CooeeIntent",{intent_value:t,segment_value:e.segmentName}))}static isInstalled(){return window.fbq&&typeof window.fbq=="function"}},pc=class{static async refreshItems(e){if(e.isCartEmbed()&&!e.isSubscriptionUpsell()){let i=(await Ue.getCurrent().getNormalisedCart()).items.map(s=>s.mID);e.items=e.items.filter(s=>!i.includes(s.mID))}if(Ct.get().currencyCount<=1)return e.items;let t=e.items.length,n=e.items.map(i=>this.updatedItem(i,e.engagementID)),r=(await Promise.all(n)).filter(i=>i!=null);if(t&&!r.length){let i="Failed to fetch any product from Ajax API",s=new Pe(k.EVENT_CAMPAIGN_FAILED,{reason:i,currency:e.currency},e);throw Ke.getInstance().sendEvent(s),new Error(i)}if(e.isCartRecovery()){let i=Ue.getCurrent().items,s=[];for(let o of r)for(let a of o.vars){if(!a.isAvailable)continue;let l=i.find(d=>d.variant_id.toString()===a.mID);if(!l)continue;let c=new Kn(o);c.name=l.title;let h=new wi(a);h.name=l.variant_title,h.price.d=l.discounted_price/100,c.variants=[h],s.push(c)}return s}return r}static async updatedItem(e,t){let n=e,r=St.getInstance(),i=Ce.get(On),s,o=`/products/${n.slug}.js`;try{s=await i.request(o)}catch(l){return b.error(`Failed to fetch ${o}`,l),l instanceof Response?r.captureMessage(`Shopify product fetch failed ${l.status}`,"error",{item:n,path:o},{"engagement.id":t}):r.captureException(l,{item:n,path:o},{"engagement.id":t}),null}if(!s)return b.error("Item not found after AJAX call for:",n),null;n.name=s.title,n.tags=s.tags;let a=n.selectedOrFirstVariant.value;return n.vars.map(l=>{let c=s.variants.find(h=>h.id===+l.mID);l.name=c.title,l.isAvailable=c.available,l.price.d=c.price?c.price/100:c.price,l.price.effective=l.price.d,l.price.cmp=c.compare_at_price?c.compare_at_price/100:c.compare_at_price,+a.mID===c.id&&(a.effectivePrice.value=l.price.d)}),n}},No=class mx{static INSTANCE;httpService=Ce.get(On);sentryService=Ce.get(St);sessionManager=Ce.get(qt);runtime=Oe.get();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new mx),this.INSTANCE}sendSilently(t){this.send(t).catch(n=>b.error(`Failed to send ${t.name}`,n))}async send(t){if(b.debug(`Sending event ${t.name}`),xr.prepend(`Sending event <strong>${t.name}</strong> with id ${t.id}`),this.shouldReject(t)){b.warn(`Rejecting event ${t.name}`);return}await Promise.all([this.addSessionContext(t),this.addShopifyContext(t)]),this.addShopifyAttributes(),t.name!==k.EVENT_APP_BACKGROUND&&this.runtime.setActive(),t.currentItem=this.runtime.getCurrentItem(),t.locale=this.runtime.locale,this.httpService.post("/v1/event/track",t).then(async n=>{b.log("\u2705 Event tracked:",t.name),xr.prepend(`\u2705 Event <strong>${n.eventName}</strong> tracked`),this.processEventResponse(t,n)}).catch(n=>{b.error(`Error sending event ${t.name} to server`,n)})}shouldReject(t){return t.trigger?.triggerID==="test"||t.trigger?.triggerID==="preview"?(b.warn("Not sending event as this is a test trigger"),!0):!1}async addSessionContext(t){let n=await this.sessionManager.checkSessionAndGetContext();t.sessionID=n[0],t.sessionNumber=n[1],t.landingPage=n[2],t.page=vi.parseFromCurrent()}async addShopifyContext(t){if(Rt.isShopify())try{t.cart=await Ue.getCurrent().getNormalisedCart()}catch(n){b.error("Error fetching Shopify cart before sending the event",n)}}processEventResponse(t,n){this.renderWidgetIfAny(t,n).catch(r=>{b.error("Failed to display a campaign",r,t,n),this.sentryService.captureException(r,{event:t,response:n})}),this.utiliseIntentIfCalculated(n)}async renderWidgetIfAny(t,n){if(!n.triggerData){b.log(`Nothing to engage after ${t.name}`);return}b.log(`\u{1F4E3} Engagement(id=${n.triggerData.shortID}) will be shown`,n.triggerData);let r=new jn(n.triggerData);r.occurred=t.occurred;let i;try{i=await pc.refreshItems(r)}catch(s){b.error("Failed to refresh the products",s);return}if(r.items=i,r.contentSource===ZT.EngagementContentSource.KLAVIYO){new Gp().render(r);return}new fc().renderEngagement(r).catch(s=>{b.error("Failed to render popup",s),this.sentryService.captureException(s,{event:t,triggerData:r})})}utiliseIntentIfCalculated(t){t.intent&&(Ga.trackIntent(t.intent),zp.trackIntent(t),xr.prepend(`Intent is <strong>${xs[t.intent]}</strong>`))}addShopifyAttributes(){Rt.isShopify()&&Ue.getCurrent().addCooeeAttributes().catch(t=>{b.error("Fail to add attributes in cart",t)})}},Ke=class yx{static INSTANCE;httpApiService=On.getInstance();eventAPIService=No.getInstance();constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new yx),this.INSTANCE}sendEvent(t){b.debug(`Waiting for auth to send event ${t.name}`),qt.replaySubject.subscribe(async()=>{this.eventAPIService.sendSilently(t)})}updateProfile(t){qt.replaySubject.subscribe(()=>{this.httpApiService.updateUserData(t??{})})}trackOrder(t){qt.replaySubject.subscribe(()=>{this.httpApiService.trackOrder(t)})}updateDeviceProps(t){qt.replaySubject.subscribe(()=>{this.httpApiService.updateDeviceProps({props:t})})}generateDiscount(t){return this.httpApiService.generateDiscount(t)}},xr=class{static isOn=!1;static element;static watch(){let e=b.getDebugParam();(e==="1"||e==="on")&&Ke.getInstance().updateDeviceProps({debugTill:this.getDebugMillis()}),e==="on"?sessionStorage.cooeeDebug="1":e==="off"&&sessionStorage.removeItem("cooeeDebug"),sessionStorage.cooeeDebug&&(this.isOn=!0,this.renderDebugBar())}static prepend(e){if(!this.isOn)return;let t=document.createElement("div");t.innerHTML="• "+new Date().toLocaleString()+" - "+e,this.element.prepend(t)}static renderDebugBar(){this.element=document.createElement("div"),this.element.id="cooee-debugger",this.element.setAttribute("draggable","true"),oe.onDocumentLoaded(()=>{document.body.appendChild(this.element)})}static dragElement(){let e=0,t=0,n=0,r=0,i=a=>{a=a||window.event,a.preventDefault(),n=a.clientX,r=a.clientY,document.onmouseup=o,document.onmousemove=s},s=a=>{a=a||window.event,a.preventDefault(),e=n-a.clientX,t=r-a.clientY,n=a.clientX,r=a.clientY,this.element.style.top=this.element.offsetTop-t+"px",this.element.style.left=this.element.offsetLeft-e+"px"},o=()=>{document.onmouseup=null,document.onmousemove=null};this.element.onmousedown=i}static getDebugMillis(){return new Date().getTime()+6*60*60*1e3}},Wl=class extends Eo{static storeName="app";static{this.storage=Ra(this.storeName)}},Ot=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(e,t){if(!e)return;let n=document.createElement("script");n.id=t??"",n.src=e,mn.mode==="local"&&(n.type="module"),document.head.appendChild(n)}static injectRawScript(e){if(!e)return;let t=document.createElement("script");t.id="cooee-app-script",t.innerHTML=e,document.head.appendChild(t)}static injectRawCSS(e,t=document.head){if(!e)return;let n=document.createElement("style");n.textContent=e,t.appendChild(n)}static injectSwiperCSS(e=document.head){this.injectStylesheet(this.SWIPER_CSS,e)}static injectStylesheet(e,t=document.head){if(!e)return;let n=document.createElement("link");n.rel="stylesheet",n.href=e,e===this.SWIPER_CSS&&(n.crossOrigin="anonymous",n.onload=r=>{let i=r.currentTarget?.sheet?.cssRules;if(i){for(let s of i)if(s.type==CSSRule.FONT_FACE_RULE){let o=e.split("/"),a=o.slice(0,o.length-1).join("/"),l=s.cssText;l=l.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${a}/$4")`);let c=document.createElement("style");c.appendChild(document.createTextNode(l)),document.head.appendChild(c)}}}),t.appendChild(n)}static loadSwiperScript(){let e="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";return new Promise(t=>{if(window.Swiper){t();return}if(Array.from(document.scripts).some(r=>r.src.includes(e))){let r=setInterval(()=>{window.Swiper&&(clearInterval(r),t())},50)}let n=document.createElement("script");n.src=e,n.onload=()=>{t()},n.onerror=()=>{n.remove()},document.body.appendChild(n)})}},qp=class{static processConfiguration(){let e=Ct.get();!e.gaMeasurementID||!e.gaEnabled||this.sendClientID()}static async sendClientID(){let e=await this.getClientID();e&&Ke.getInstance().updateDeviceProps({gaClientID:e})}static async getClientID(){let e=await rt.get(ge.GA_CLIENT_ID),t=await this.getClientIDViaGTag();if(e!==t)return await rt.set(ge.GA_CLIENT_ID,t),t}static async getClientIDViaGTag(){let e=Ct.get().gaMeasurementID;if(!(!e||!window.gtag))return new Promise(t=>{window.gtag("get",e,"client_id",n=>{t(n)})})}},ax=Re(Ff()),eu=Re(Yn()),nx=Re(A_()),rx=Re(xa()),ix=Re(fs()),XT=Re(tp()),JT=Re(fs()),Mo=class{constructor(e){this.triggerContext=e}safeHTTP=Ke.getInstance();eventAPIService=No.getInstance();async execute(e){let t=Oe.get().getCurrentItem(),n=e.clickAction;if(!n)return;let r=e.item,i=this.triggerContext,s=new Ci,o=i.triggerData.redirectBehaviour,a=!!i.triggerData.discount.type&&!!n?.applyDiscount,l={selectedVariants:i.triggerData.nonMutableItems.map(_=>({itemMID:_.mID,mID:_.selectedOrFirstVariant.value.mID})),eID:i.triggerData.engagementID,cID:i.triggerData.contentID},c="",h=[],d=[];if(r?d=[r.toEmbed()]:e.embeddedItem&&(d=[e.embeddedItem]),n.at===108){let _=i.selectedItems;if(d=e.embeddedItems??_.map(x=>x.toEmbed()),i.shouldGiveFBTDiscount||e.embeddedItems?.length){let x;e.embeddedItems?x=e.embeddedItems.map(F=>({itemMID:F.mID,mID:F.vID,quantity:F.quantity})):x=_.map(F=>({itemMID:F.mID,mID:F.selectedOrFirstVariant.value.mID}));let A=i.triggerData.bundleFrom;i.triggerData.isBundleOnCartDrawer()&&A&&(x.push({itemMID:A.mID,mID:A.selectedOrFirstVariant.value.mID,isPrimary:!0}),d.unshift(A.toEmbed())),l.selectedVariants=x,i.triggerData.isBundleOnPDP()&&l.selectedVariants.forEach(F=>{F.mID===t.vID&&(F.isPrimary=!0)})}else l=void 0;h=e.embeddedItems??_}else if(n.at===107){let _=await Ue.getCurrent().getNormalisedCart();d=_.items,l.selectedVariants=_.items.map(x=>({itemMID:x.mID,mID:x.vID}))}else if(n.at===102)h=r?[r]:[e.embeddedItem];else if(n.at===101)c=r?Rt.getRootPrefix()+"products/"+r.slug:e.embeddedItem?.link;else if(n.at===4){let _=oe.isValidURL(n.gu?.u);_&&(c=_.href)}else if(n.at===109){let _=await s.upgradeToSubscription(r,i.triggerData);this.triggerContext.triggerData.skipSubscribedItems&&this.triggerContext.renderer.destroy(),zt.get().refreshUI(_)}else if(n.at===104){let _=this.triggerContext.triggerData.collections?.[0];_&&(c="collections/"+_.handle)}if(this.sendTriggerClicked(d,{from:"button"},e.video),b.debug({redirectPath:c,redirectBehaviour:o,hasDiscount:a}),!a&&c){location.href=c;return}let f,g=!1;try{f=await this.getOrGenerateDiscountCode(l),b.debug("Discount code (if any) to apply",f)}catch(_){if(!this.triggerContext.triggerData.isBYOB()){JT.default.error("Unable to get a discount code",_);return}}if(f&&n.at===103)await s.copyDiscountCode(f);else if(n.at===110){let _=await s.createNewCart(t,f,i.triggerData);_&&(location.href=_);return}try{f&&await Ao.applyWithStorefront(f)}catch(_){b.error(_),g=!0}let m;if(h?.length&&(m=await s.addToCart(h,i.triggerData)),g&&f){Ao.navigate(f,o,c);return}if(c){location.href=c;return}Ao.navigateWithoutDiscount(o,m)}sendTriggerClicked(e,t,n){let r=new Pe(k.EVENT_TRIGGER_CLICKED,t,this.triggerContext.triggerData);r.items=e,n?.id&&(r.videos=[n.id]),this.eventAPIService.sendSilently(r)}async getOrGenerateDiscountCode(e){let t=this.triggerContext.triggerData.discount;if(!t?.type)return;let n="";if(t.type===XT.DiscountType.STATIC){if(!t.code)throw St.getInstance().captureMessage("No discount code found","warning",{triggerContext:this.triggerContext}),new Error("No discount code found");return t.code}if(e){if(n=await this.generateDiscount(e),!n)throw b.error("No discount code found",e),new Error("Discount code not found or generated");return n}}async generateDiscount(e){try{return(await this.safeHTTP.generateDiscount(e))?.code}catch(t){throw oe.showSnackbar("Failed to generate a discount code"),b.error("Error generating discount code",t,e),St.getInstance().captureMessage("Failed to generate discount code","error",{discountData:JSON.stringify(e),triggerContext:this.triggerContext,error:t}),t}}},_t=class extends _i{stylesConverter=new uc(1);renderer=ar.get();mediaStyle={};deviceTypeKey;clickExecutor;componentWillMount(){this.deviceTypeKey=this.renderer.isMobile()?"sm":"lg",this.clickExecutor=new Mo(this.props.triggerContext)}getCompiledStyles(){return this.putStyleAccordingToDevice(),w(w(ne(w(w(w(w(w(w({},this.stylesConverter.getFlexStyles(this.mediaStyle.flex)),this.stylesConverter.getBackgroundStyles(this.mediaStyle.bg)),this.stylesConverter.getBorderStyles(this.mediaStyle.br)),this.stylesConverter.getSizeStyles(this.mediaStyle.size)),this.stylesConverter.getSpaceStyles(this.mediaStyle.spc)),this.stylesConverter.getLayoutStyles(this.mediaStyle.lout)),{boxSizing:"border-box",outline:"none"}),this.getComponentStyles()),this.props.style)}matchWhenCondition(e){if(!e?.op)return!0;let{lhs:t,rhs:n}=e;switch(e.op){case"eq":return t===n;case"gt":return+t>+n;case"gte":return+t>=+n;case"lt":return+t<+n;case"lte":return+t<=+n;case"ne":return t!==n;case"null":return t==null;case"empty":return t.trim()==="";case"in":return new RegExp(`\\b${n}\\b`).test(t);case"nin":return!new RegExp(`\\b${n}\\b`).test(t);default:return b.error(`Invalid operator found for when condition - ${e.op}`),!1}}putStyleAccordingToDevice(){let e=this.props.element;this.mediaStyle=e.style.lg,this.renderer.isMobile()&&e.style.sm&&Object.keys(e.style.sm).length&&(this.mediaStyle=w(w({},this.mediaStyle),e.style.sm))}sendTriggerClicked(e,t){this.clickExecutor.sendTriggerClicked(e,t)}async onClick(e,t){e.stopPropagation(),!t.clickAction&&(t.clickAction=this.props.element.clc),await this.clickExecutor.execute(t)}},PV=0,Kie=Array.isArray;function G(e,t,n,r,i,s){t||(t={});var o,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?o=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--PV,__i:-1,__u:0,__source:i,__self:s};if(typeof e=="function"&&(o=e.defaultProps))for(a in o)l[a]===void 0&&(l[a]=o[a]);return it.vnode&&it.vnode(c),c}var dr=class extends _t{componentDidMount(){this.setState(()=>({text:this.props.element.text})),In(this.onChange.bind(this))}componentWillReceiveProps(e){this.props.element=e.element,this.onChange()}render(){let e=this.getCompiledStyles(),t=this.state.text;return t||(e.display="none",t=""),G("div",{style:e,onClick:this.customOnClick.bind(this),className:"lc-text",children:G("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:t}})})}customOnClick(){this.props.onClick&&this.props.onClick("title")}onChange(){if(this.props.element.text==null)return;let e=this.props.triggerContext.triggerData,t={bundle:e.discountData.value,customer:e.customerData,cart:e.getCartMagicVariables()},n=_n.render(JSON.stringify(this.props.element),t),r=new wn(JSON.parse(n));if(!this.matchWhenCondition(r.when)){this.setState(()=>({text:""}));return}this.setState(()=>({text:r.text}))}getTypoStyles(){let e={},t=this.mediaStyle.typo??new pn;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily=t.fam.name||"inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,e.textDecoration=t.td??"none",this.stylesConverter.getColourStyles(t.tc,"color",e),e}getComponentStyles(){return w({},this.getTypoStyles())}getSpanStyle(){return{overflow:"hidden",display:"-webkit-box",webkitBoxOrient:"vertical",webkitLineClamp:2,color:"inherit",fontSize:"inherit",fontWeight:"inherit",fontFamily:"inherit"}}},Fs=class extends dr{render(){return G("div",{style:this.getCompiledStyles(),className:"lc-button",onClick:e=>this.onClick(e,{item:this.props.item}),children:G("span",{style:this.getSpanStyle(),dangerouslySetInnerHTML:{__html:this.state.text}})})}getComponentStyles(){return ne(w({},super.getComponentStyles()),{cursor:"pointer"})}},dE=class extends _i{render(){if(this.props.element.show[this.props.label.toLowerCase()])return this.props.element.lblPos==="end"?G("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[G("span",{children:this.props.time}),G("span",{style:this.getTimeLabelStyle(),children:this.props.label})]}):G("div",{style:w(w({},this.getElementStyle()),this.props.styles),children:[G("span",{style:this.getTimeLabelStyle(),children:this.props.label}),G("span",{children:this.props.time})]})}getDesign(){}getTimeLabelStyle(){return{fontSize:"0.5em",alignContent:"center"}}getElementStyle(){let e={display:"flex",flexDirection:"column",placeContent:"center center",textAlign:"center"};return this.props.element.horizontal&&(e.gridTemplateColumns="repeat(2, minmax(0, 1fr))"),e}},Gl=class extends dr{labels={Days:"00",Hours:"00",Minutes:"00",Seconds:"00"};componentWillMount(){super.componentWillMount(),this.setState(()=>w({},this.labels)),this.processAndStartTimer()}render(){return G("div",{style:this.getLabelsParentStyle(),children:Object.keys(this.labels).map(e=>G(dE,{styles:this.getCompiledStyles(),label:e,time:this.state[e],element:this.props.element}))})}getLabelsParentStyle(){return{display:"grid",justifyContent:"center",gridTemplateColumns:"repeat(4, auto)",gap:this.stylesConverter.getSizePx(this.props.element.gap)}}getDisplayStyles(){return{display:"grid",placeContent:"center center"}}getComponentStyles(){return w(w({},super.getComponentStyles()),this.getDisplayStyles())}processAndStartTimer(){this.props.element.timer.start(this.props.element.timerType,e=>{this.labels.Days=String(e.days).padStart(2,"0"),this.labels.Hours=String(e.hours).padStart(2,"0"),this.labels.Minutes=String(e.minutes).padStart(2,"0"),this.labels.Seconds=String(e.seconds).padStart(2,"0"),this.setState(()=>w({},this.labels))})}},zl=class extends _t{componentDidMount(){In(()=>{this.setState(()=>({checked:this.props.item.selected.value}))})}render(){return G("div",{style:this.getCompiledStyles(),className:"lc-checkbox",children:G("input",{type:"checkbox",checked:this.state.checked,onChange:this.onChange.bind(this),style:{appearance:"auto"}})})}onChange(e){let{checked:t}=e.target;this.props.item.selected.value=t}getTypoStyles(){let e={},t=this.mediaStyle.typo??new pn;return e.textAlign=t.alignment,e.justifyContent=t.alignment,e}getComponentStyles(){return ne(w({},this.getTypoStyles()),{display:"flex"})}},QT=Re(Yn()),eo=class extends _t{constructor(e,t){super(e,t)}render(){let e=this.props.element[this.deviceTypeKey],t=e?.src||this.props.element.src||this.props.element.lg?.src;return G("img",{onClick:this.customOnClick.bind(this),className:"lc-image",alt:e?.name||"Image",onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this),src:t,style:this.getCompiledStyles()})}customOnClick(e){this.props.element.clc?.at===QT.ClickActionType.ADD_TO_CART&&this.props.triggerContext.triggerData.items[0]&&this.onClick(e,{item:this.props.triggerContext.triggerData.items[0]}),this.props.onClick&&this.props.onClick("image")}getComponentStyles(){let e=this.mediaStyle.lout;if(!e||e.pos!=="absolute")return{};let t={zIndex:e.zIndex,cursor:this.props.element.clc?.at?"pointer":"auto"};return this.mediaStyle.size?.w&&(t.width=this.mediaStyle.size.w),this.mediaStyle.size?.h&&(t.height=this.mediaStyle.size.h),t}handleMouseEnter(e){let t=this.props.element[this.deviceTypeKey]?.secondarySrc;t&&(e.currentTarget.src=t)}handleMouseLeave(e){e.currentTarget.src=this.props.element[this.deviceTypeKey]?.src}},to=class extends _t{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(Oo,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})})}getComponentStyles(){let e=this.mediaStyle.flex??new ic,t={display:"flex",gap:e.gap+"px",flexWrap:e.wrap,flexDirection:e.dir,justifyContent:e.jc,alignItems:e.ai};return e.wrap==="nowrap"&&e.scroll&&(e.dir==="column"?t["overflow-y"]="auto":t["overflow-x"]="auto"),t}},ql=class extends to{render(){if(!(this.props.element.hide||!this.matchWhenCondition(this.props.element.when)))return G("div",{style:this.getCompiledStyles(),class:"lc-flexbox",children:G(hc,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.props.noLinks})})}},Yl=class extends _t{render(){return G("select",{style:this.getCompiledStyles(),value:this.props.selectedVariant.selectedSellingPlan.value?.mID??"",onChange:this.onChange.bind(this),disabled:this.state.disabled,className:"lc-dropdown",children:this.createSelectItems()})}componentDidMount(){In(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new pn;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily="inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,this.stylesConverter.getColourStyles(t.tc,"color",e),e.boxShadow="none",e}getComponentStyles(){let e={};return this.props.selectedVariant.sellingPlans?.length||(e.visibility="hidden"),w(w({},e),this.getTypoStyles())}createSelectItems(){let e=[],t=this.props.selectedVariant;if(!t.sellingPlans?.length)return[];this.props.triggerContext.triggerData.skipSubscribedItems?t.selectedSellingPlan.value||(t.sellingPlans[0].isSelected=!0,t.changeSellingPlan(t.sellingPlans[0])):e.push(G("option",{value:"",selected:!t.selectedSellingPlan,children:"One time purchase"}));for(let n of t.sellingPlans??[])e.push(G("option",{value:n.mID,selected:n.isSelected,children:n.name}));return e}onChange(e){let t=e.target.value;t?this.props.selectedVariant.selectedSellingPlan.value=this.props.selectedVariant.sellingPlans.find(n=>n.mID===t):this.props.selectedVariant.selectedSellingPlan.value=void 0}},ex=Re(Ff()),Kl=class extends _t{colorRegex=new RegExp('fill="#[a-zA-Z0-9]+"');constructor(){super(),_n.escape=ex.MustacheUtils.escapeHtml}render(){let e=this.getCompiledStyles(),t=this.getRating();return t||(e.display="none",t=""),G("div",{style:e,className:"lc-star-rating",dangerouslySetInnerHTML:{__html:t}})}getRating(){let e=this.props.element.fullStar,t=this.props.element.halfStart,n={size:this.props.element.iconSize,color:this.props.element.c.hex};e=_n.render(e,{svg:n}),t=_n.render(t,{svg:n});let r=this.props.review;if(!r?.rating)return"";let i="";if(this.props.element.showSingleStar)i=e;else{let s=5,o=`${r.rating}`.split(".");for(let a=0;a<+o[0];a++)i+=e,s--;o[1]&&(i+=t,s--);for(let a=0;a<s;a++)i+=e.replace(this.colorRegex,'fill="#f1f1f1')}return i}getComponentStyles(){return{display:"flex",alignItems:"center"}}},Zl=class extends _t{render(){return G("select",{style:this.getCompiledStyles(),value:this.props.item.selectedOrFirstVariant.value.mID,onChange:this.onChange.bind(this),disabled:this.state.disabled,className:"lc-dropdown",children:this.createSelectItems()})}componentDidMount(){In(()=>{this.setState(()=>({disabled:this.props.triggerContext.triggerData.isBundle()?!this.props.item.selected.value:!1}))})}getTypoStyles(){let e={},t=this.mediaStyle.typo??new pn;return e.letterSpacing=t.letterSpacing,e.fontSize=t.fs+"px",e.lineHeight=t.lh,e.fontFamily="inherit",e.textAlign=t.alignment,e.fontWeight=t.fw,this.stylesConverter.getColourStyles(t.tc,"color",e),e.boxShadow="none",e}getComponentStyles(){let e={};return this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"&&(e.visibility="hidden"),w(w({},e),this.getTypoStyles())}createSelectItems(){let e=[];for(let t of this.props.item.vars)e.push(G("option",{value:t.mID,disabled:!t.isAvailable,children:t.name}));return e}onChange(e){let t=e.target.value;this.props.item.selectedOrFirstVariant.value=this.props.item.vars.find(n=>n.mID===t)}},hc=class extends _t{constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}renderElement(e){if(!(e.hide||!this.matchWhenCondition(e.when))){if(e.t===4){let t=e;return G(ql,{element:t,triggerContext:this.props.triggerContext,elements:t.elems,item:this.props.item,noLinks:this.props.noLinks})}if(e.t===6)return this.props.triggerContext.triggerData.isBundle()?G(zl,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):void 0;if(e.t===13){let t=e,n=this.props.item,r=n.variantImage??n.imageURL,i=n.variantSecondaryImage??n.secondaryImageURL;t.lg=t.sm={src:r,name:n.name,secondarySrc:i};let s=G(eo,{element:t,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?s:G("a",{href:this.props.item.selectedOrFirstVariant.value.link,style:{display:"block"},children:s})}if(e.t===14)return this.renderProductTitle(e);if(e.t===15){let t=e;return this.props.triggerContext.triggerData.isCartEmbed()&&this.props.item.vars?.length===1&&this.props.item.vars[0].name==="Default Title"?void 0:G(Zl,{element:t,item:this.props.item,triggerContext:this.props.triggerContext})}return e.t===16?G(Yl,{element:e,selectedVariant:this.props.item.selectedOrFirstVariant.value,item:this.props.item,triggerContext:this.props.triggerContext}):e.t===19?G(Kl,{element:e,triggerContext:this.props.triggerContext,review:this.props.item.reviews}):e.t===18||e.t===3?G(Fs,{element:e,item:this.props.item,triggerContext:this.props.triggerContext}):G(Oo,{elements:[e],element:this.props.element,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}renderProductTitle(e){let t=G(dr,{element:e,onClick:this.customOnClick.bind(this),triggerContext:this.props.triggerContext});return this.props.noLinks?t:G("a",{href:this.props.item.selectedOrFirstVariant.value.link,style:{display:"block",textDecoration:this.state.decoration},onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),children:t})}customOnClick(e){this.sendTriggerClicked([this.props.item.toEmbed()],{from:e})}onMouseEnter(){this.setState(()=>({decoration:"underline"}))}onMouseLeave(){this.setState(()=>({decoration:"unset"}))}},tx=Re(tp()),Bs=class extends _t{productElement;constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"}))}render(){let e=JSON.stringify(this.props.element),t=_n.render(e,this.getProductData());if(this.productElement=new xo(JSON.parse(t)),!(this.productElement.hide||!this.matchWhenCondition(this.productElement.when)))return G("div",{style:w({},this.getCompiledStyles()),class:"lc-single-product",children:G(hc,{element:this.productElement,elements:this.productElement.elems,triggerContext:this.props.triggerContext,item:this.props.item,noLinks:this.productElement.noLinks})})}getComponentStyles(){return{flexShrink:0}}getProductData(){if(!this.props.item)return{};let e=this.props.item.selectedOrFirstVariant.value,t=e.price,n=this.props.item.name,r=this.props.item.category,i=oe.formatCurrency(t.d,!0),s=this.props.item.variantImage??this.props.item.imageURL,o=this.props.item.meta,a=this.props.item.tags?.join(",")??"",l=this.props.item.reviews?.rating,c=this.props.item.reviews?.totalReviews,h=t.cmp&&t.cmp>t.d,d=this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(this.props.item.quantity):this.props.item.quantity,f={name:n,price:i,quantity:d,image_url:s,meta:o,category:r,rating:l,reviews:c,tags:a},g=e.effectivePrice.value!==t.d;g&&(f.effective_price=oe.formatCurrency(e.effectivePrice.value));let m=this.props.triggerContext.triggerData.discount.type===tx.DiscountType.BXGY;if(!g&&m&&(f.effective_price=oe.formatCurrency(e.effectivePrice.value),f.price=""),h){f.compare_price=oe.formatCurrency(t.cmp);let x=t.cmp-t.d;f.discount_percent=(x/t.cmp*100).toFixed(0),f.discount_price=oe.formatCurrency(x)}let _={name:e.name,quantity:this.props.triggerContext.hasManipulatedProductQuantity()?this.props.triggerContext.getManipulatedQuantity(e.quantity):e.quantity};return{product:f,variant:_,svg:{color:()=>"{{svg.color}}",size:()=>"{{svg.size}}"}}}};function Yp(e,t){if(!e||!window.Swiper)return;let n=new window.Swiper(e,{loop:!0,slidesPerView:t.maxInRow,spaceBetween:t.gap+"px",pagination:{type:t.pagination.type,el:e.querySelector(".swiper-pagination"),clickable:!0,renderBullet:(r,i)=>`
|
|
44
|
-
<span class="${i}"
|
|
45
|
-
style="background-color: ${t.pagination.color?.rgba};"></span>
|
|
46
|
-
`,renderProgressbar:r=>`
|
|
47
|
-
<span class="${r}"
|
|
48
|
-
style="background-color: ${t.pagination.color?.rgba};">
|
|
49
|
-
</span>
|
|
50
|
-
`},navigation:{nextEl:e.querySelector(".swiper-button-next"),prevEl:e.querySelector(".swiper-button-prev")},autoplay:t.autoplay?.enabled?{delay:t.autoplay?.delay,disableOnInteraction:!1}:!1,autoHeight:!0});return e.style.setProperty("--swiper-navigation-size",`${t.navigation.size}px`),n}function Kp(e,t,n){let r={color:e.navigation.color?.rgba};return e.pagination.enabled&&(r.transform="translateY(-25%)"),G("div",{class:"swiper-container",ref:t,children:[G("div",{class:"swiper-wrapper",children:n()}),e.navigation.enabled&&G("div",{class:"swiper-button-next",style:r,children:G("span",{})}),e.navigation.enabled&&G("div",{class:"swiper-button-prev",style:r,children:G("span",{})}),e.pagination.enabled&&G("div",{className:"swiper-pagination",style:{bottom:0,top:"unset",position:"relative",color:e.pagination.color?.rgba}})]})}var Xl=class extends _t{swiperRef=null;swiperInstance=null;configuration;gap;constructor(e,t){super(e,t),this.configuration=this.renderer.isMobile()?this.props.element.conf.sm:this.props.element.conf.lg,this.gap=(this.configuration.gap??15)+"px"}componentDidMount(){this.props.element.conf[this.deviceTypeKey].disp===2&&Ot.loadSwiperScript().then(()=>{this.swiperInstance=Yp(this.swiperRef,this.props.element.conf[this.deviceTypeKey])})}componentWillUnmount(){this.swiperInstance&&this.swiperInstance.destroy()}render(){let e=this.props.triggerContext.triggerData.items;e.splice(this.configuration.maxItems??10);let t;if(this.configuration.disp===2){let n=i=>{this.swiperRef=i},r=()=>e?.map(i=>G("div",{class:"swiper-slide",children:this.getProductFragment(i)}));t=G("div",{style:ne(w({},this.getCompiledStyles()),{display:"block"}),class:"lc-product-swiper-list",children:Kp(this.configuration,n,r)})}else t=G("div",{style:this.getCompiledStyles(),class:"lc-product-list",children:e?.map((n,r)=>this.getProductFragment(n,r!==e.length-1))});return t}getComponentStyles(){let e=[0,2].includes(this.configuration.disp),t={display:e?"flex":"grid",justifyContent:"safe "+(this.mediaStyle.flex?.jc??"center"),gap:this.gap,flexDirection:this.mediaStyle.flex?.dir??"row"};if(t.flexDirection==="row"){if(e)t.maxWidth="100%",t.overflowY="auto";else if(this.configuration.disp===1){let n=this.props.triggerContext.triggerData,r=n.items.length,i;n.isBundle()?i=this.props.element.prod.symbol?.hide!==!0?r*2-1:r:i=this.props.element.conf[this.deviceTypeKey].maxInRow,t.gridTemplateColumns=`repeat(${i}, auto)`}}return t}getProductFragment(e,t=!1){return G(Ei,{children:[G(Bs,{element:this.props.element.prod,item:e,triggerContext:this.props.triggerContext}),this.props.triggerContext.triggerData.isBundle()&&t&&this.props.element.prod.symbol&&!this.props.element.prod.symbol.hide&&G("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:G(dr,{element:this.props.element.prod.symbol,triggerContext:this.props.triggerContext})})]},e.mID)}},Jl=class extends _t{swiperRef=null;swiperInstance=null;constructor(e,t){super(e,t)}componentDidMount(){Ot.loadSwiperScript().then(()=>{this.swiperInstance=Yp(this.swiperRef,this.props.element.conf)})}componentWillUnmount(){this.swiperInstance&&this.swiperInstance.destroy()}render(){let e=this.props.element,t=r=>{this.swiperRef=r},n=()=>e.values?.map(r=>G("div",{class:"swiper-slide",onClick:i=>this.onClick(i,{clickAction:this.getClickAction(r)}),children:this.renderElement(r)}));return Kp(e.conf,t,n)}getComponentStyles(){return{}}renderElement(e){let t=this.valueAddedSlide(this.props.element.slide,e);switch(t?.t){case 1:return G(eo,{element:t,triggerContext:this.props.triggerContext});case 4:return G(to,{elements:t.elems,element:t,triggerContext:this.props.triggerContext});default:b.warn("Unknown slide type for carousal")}}valueAddedSlide(e,t){let n=JSON.stringify(e),r=_n.render(n,{form:t});return ur.getParsedElement(JSON.parse(r))}getClickAction(e){let t=w({},this.props.element.clc),n=JSON.stringify(t),r=_n.render(n,{form:e});return JSON.parse(r)}},Oo=class extends _t{constructor(e,t){super(e,t),this.setState(()=>({decoration:"unset"})),In(()=>{this.setState(()=>({showButton:!this.props.triggerContext.triggerData.isBundle()||!!this.props.triggerContext.selectedItems.length}))})}renderElement(e){if(!e.hide){if(e.t===4){let t=e;return G(to,{element:t,triggerContext:this.props.triggerContext,elements:t.elems})}if(e.t===61)return G(Gl,{element:e,triggerContext:this.props.triggerContext});if(e.t===3)return this.state.showButton?G(Fs,{element:e,triggerContext:this.props.triggerContext}):void 0;if(e.t===2)return G(dr,{element:e,triggerContext:this.props.triggerContext});if(e.t===1)return G(eo,{element:e,triggerContext:this.props.triggerContext});if(e.t===11)return G(Xl,{element:e,triggerContext:this.props.triggerContext});if(e.t===12)return G(Bs,{element:e,item:this.props.triggerContext.triggerData.items[0],triggerContext:this.props.triggerContext});if(e.t===62)return G(Jl,{element:e,triggerContext:this.props.triggerContext})}}render(){return this.props.elements.map(e=>this.renderElement(e))}getComponentStyles(){return{}}},Ql=class extends _t{clickAction;isClickable;constructor(e,t){super(e,t),this.clickAction=this.props.element.clc,this.isClickable=this.clickAction?.at===4&&this.clickAction.gu?.u}componentDidMount(){In(()=>{let e=this.props.triggerContext.triggerData,t=this.props.triggerContext.selectedItems;e.calculateDiscountData(t,this.props.triggerContext.shouldGiveFBTDiscount)})}render(){return G(Ei,{children:[G("div",{style:this.getCompiledStyles(),class:"lc-container",onClick:e=>{this.onClick(e,{clickAction:this.clickAction})},children:G(Oo,{elements:this.props.elements,element:this.props.element,triggerContext:this.props.triggerContext})}),this.props.triggerContext.triggerData.id==="preview"&&G("div",{class:"letscooee-preview-badge",children:["#",this.props.triggerContext.triggerData.shortID," preview"]})]})}getComponentStyles(){let e={position:"relative",overflow:"hidden",display:"block"};return this.isClickable&&(e.cursor="pointer"),e}async onClick(e,t){if(this.isClickable)return super.onClick(e,t)}},Pn=class Ta{constructor(t){this.engagementTrigger=t,this.triggerContext=new lc(new Date,this.engagementTrigger)}static renderedEngagements=[];static engagementIDsWithTrackedDisplay=new Set;static DEBOUNCE_TIME=1e3;rootContainer;widgetElement;widget;triggerContext;observers=[];runtimeData=Oe.get();widgetAPIService=Ce.get(qr);eventAPIService=Ce.get(No);scrollSubscription;variation;isExclusionWithBVariation;renderSilently(){this.render().catch(t=>St.getInstance().captureException(t,w({},this.engagementTrigger.sentryContext())))}destroy(){b.log(`${this.engagementTrigger} will be destroyed`),this.scrollSubscription?.unsubscribe(),this.observers.forEach(t=>{t?.disconnect&&t.disconnect()}),this.rootContainer?.remove(),Ta.engagementIDsWithTrackedDisplay.delete(this.engagementTrigger.shortID)}async render(){if(this.engagementTrigger.hasMultiplePlacement){let t=await this.getVariation();this.handleVariationResponse(t)}if(this.rootContainer=await this.getWidgetContainer(!0),!this.rootContainer){b.warn(`${this.engagementTrigger} no section found to render the widget`);return}this.afterRootContainerCreated(),this.widget=this.engagementTrigger.widget,await this.getVariationIfRequired(),!this.shouldStopRendering()&&(await this.startRendering(),this.attachScroll(),await this.checkAndSendEvent(),this.triggerContext.renderer=this)}isSameTrigger(t){return this.engagementTrigger.shortID===t.shortID}update(t){ix.default.log(`${this.engagementTrigger} will be updated`),this.updateItems(t.items,this.engagementTrigger.items)}afterRootContainerCreated(){}shouldStopRendering(){return!this.widget&&!this.isExclusionWithBVariation}async getVariationIfRequired(){if(this.engagementTrigger.isSingleContent()||this.engagementTrigger.widget){b.log(`${this.engagementTrigger} already has required data to render widget`);return}let t=await this.observeWidgetContainerInViewport();this.handleVariationResponse(t)}handleVariationResponse(t){t&&(b.log(`${this.engagementTrigger} visitor has been assigned to variation ${t.variation}`),t.items?.length&&(this.engagementTrigger.items=t.items.map(n=>new Kn(n)),this.engagementTrigger.nonMutableItems=t.items.map(n=>new Kn(n))),t.bundleFrom&&(this.engagementTrigger.bundleFrom=new Kn(t.bundleFrom)),t.discount&&(this.engagementTrigger.discount=t.discount),t.placement&&(this.triggerContext.triggerData.placement=t.placement),t.props&&rx.JSUtils.hasKeys(t.props)&&(this.engagementTrigger.props=w(w({},this.engagementTrigger.props),t.props)),this.triggerContext.triggerData.widget=this.widget=new cc(t.widget),this.triggerContext.triggerData.contentID=t.contentID,this.triggerContext.triggerData.variation=this.variation=t.variation,this.triggerContext.triggerData.placement=t.placement,this.triggerContext.triggerData.manipulation=t.manipulation,this.triggerContext.triggerData.content=t.content,this.isExclusionWithBVariation=this.engagementTrigger.isExclusionTesting()&&this.variation==="b",this.isExclusionWithBVariation&&(this.rootContainer.style.height="0.5px"))}addToRendered(){Ta.renderedEngagements.push(this)}async getVariation(){b.log(`${this.engagementTrigger} get variation`);let t={engagementID:this.engagementTrigger.engagementID,isPreview:this.engagementTrigger.id==="preview"};try{return await this.widgetAPIService.getVariation(t)}catch(n){b.error(`${this.engagementTrigger} unable to get the variation`,n);return}}async observeWidgetContainerInViewport(){if(!this.rootContainer){b.warn(`${this.engagementTrigger} No root container found to watch for viewport`);return}let t=window.innerHeight*.3,n={root:null,rootMargin:`-${t}px 0px ${t}px 0px`,threshold:0};return this.isInViewport()?this.getVariation():new Promise(r=>{let i=new IntersectionObserver((s,o)=>{s.forEach(async a=>{if(a.isIntersecting){b.log(`${this.engagementTrigger} root container is near the viewport. Fetching variation`);let l=await this.getVariation();r(l),o.unobserve(this.rootContainer)}})},n);i.observe(this.rootContainer),this.observers.push(i)})}attachScroll(){this.scrollSubscription=Ni(window,"scroll").pipe(Pr(Ta.DEBOUNCE_TIME)).subscribe(()=>{this.checkAndSendEvent()})}async checkAndSendEvent(){let t=this.engagementTrigger.shortID;if(Ta.engagementIDsWithTrackedDisplay.has(t)||!this.isInViewport())return;let n={};this.triggerContext.triggerData.items?.length&&(n.promotedMIDs=this.engagementTrigger.items?.map(s=>s.mID));let r=this.isExclusionWithBVariation?k.EVENT_CAMPAIGN_HOLDOUT:k.EVENT_TRIGGER_DISPLAYED,i=new Pe(r,n,this.engagementTrigger);i.name===k.EVENT_CAMPAIGN_HOLDOUT&&(i.trigger.holdout=!0),this.eventAPIService.sendSilently(i),Ta.engagementIDsWithTrackedDisplay.add(t),this.scrollSubscription.unsubscribe()}generateParentElementID(){return`letscooee-${this.engagementTrigger.shortID}`}createAngularWidget(t){let n=this.widgetElement=document.createElement(t);return n.className="cooee-root",n.cart=Ue.getCurrent(),n.triggerContext=this.triggerContext,n.engagementTrigger=this.engagementTrigger,n.setAttribute("engagement",this.engagementTrigger.shortID),n.addEventListener("cooeeEvent",r=>{let i=r.detail;this.eventAPIService.sendSilently(i)}),this.rootContainer.appendChild(n),this.addToRendered(),n}isInViewport(){let t=this.rootContainer?.getBoundingClientRect();if(!t)return!1;let n=window.innerHeight||document.documentElement.clientHeight,r=(Math.min(t.bottom,n)-Math.max(t.top,0))*t.width,i=t.width*t.height,s=r/i*100;return this.engagementTrigger.isAnySplit()?s>0:s>=30}async getWidgetContainer(t){if(this.rootContainer?.isConnected)return this.rootContainer;let n=await this.createParentElementWithPlacement(t);if(n)return n;let r=`.letscooee[data-engagement-id="${this.triggerContext.triggerData.shortID}"]`;return document.querySelector(r)}async createParentElementWithPlacement(t){let n=this.engagementTrigger.placement;if(!n?.selector)return b.warn(`${this.engagementTrigger} does not have a selector`),null;let r=n.selector,i;if(r.includes(k.SHADOW_SPLITTER)){let l=r.split(k.SHADOW_SPLITTER),c=Ct.get().website.commonCSS;i=(await oe.retrySelector(l[0].trim()))?.shadowRoot,r=l[1].trim(),i&&(Ot.injectRawCSS(c,i),Ot.injectStylesheet(mn.styleURL,i))}b.debug(`${this.engagementTrigger} attempt to render ${n.position}-${r}`);let s=await oe.retrySelector(r,10,i??document);if(!s)return b.warn(`${this.engagementTrigger} no placement found with ${r}`),null;let o=this.generateParentElementID(),a=this.getParentElement(o);if(!t)return a;switch(n.position){case eu.EngagementPlacementPosition.BEFORE:{s.parentElement?.insertBefore(a,s);break}case eu.EngagementPlacementPosition.INSIDE_FIRST:{s.insertBefore(a,s.firstChild);break}case eu.EngagementPlacementPosition.INSIDE_LAST:{s.appendChild(a);break}case eu.EngagementPlacementPosition.AFTER:default:s.parentElement?.insertBefore(a,s.nextSibling)}return a}async startRendering(){let t;try{t=await pc.refreshItems(this.engagementTrigger)}catch(n){b.error(`${this.engagementTrigger} error refreshing the items`,n);return}if(!this.engagementTrigger.isCollectionPromoted()&&!t?.length&&this.engagementTrigger.isProductPromoted()){b.warn(`${this.engagementTrigger} is of ${this.engagementTrigger.objective} but no product found`);return}this.engagementTrigger.items=t,this.renderContainer()}getParentElement(t,n=document){let r=n.getElementById(t);if(r)return r;let i=this.engagementTrigger.objective.toLowerCase().replaceAll("_","-"),s=this.engagementTrigger.shortID;return r=document.createElement("div"),r.id=t,r.className=`letscooee letscooee-engagement engagement-${s} ${i}`,r.dataset.engagementId=s,this.engagementTrigger.id==="preview"&&(r.className+=" letscooee-preview"),r.style.display="block",r.style.minHeight="0.5px",r.style.minWidth="0.5px",r}renderContainer(){if(!this.widget)return;let t=this.rootContainer;if(this.triggerContext.triggerData.hasSwiperElement()){let n=this.rootContainer?.shadowRoot||this.rootContainer?.attachShadow({mode:"open"}),r=Ct.get().website.commonCSS;Ot.injectRawCSS(r,n),Ot.injectStylesheet(mn.styleURL,n),Ot.injectSwiperCSS(n),t=n}RT(V_(Ql,{element:this.widget.cont,triggerContext:this.triggerContext,elements:this.widget.elems}),t),this.addToRendered()}updateItems(t,n){let r=this.getItemDiff(t,n),i=this.getItemDiff(n,t);n.push(...r);for(let s of i)nx.ArrayUtils.remove(n,s)}getItemDiff(t,n){return t.filter(r=>!n.some(i=>i.selectedOrFirstVariant.value.mID===r.selectedOrFirstVariant.value.mID))}},Di=class hT extends Pn{static renderedEngagements=[];constructor(t){super(t)}addToRendered(){hT.renderedEngagements.push(this)}observeWidgetContainerInViewport(){return this.getVariation()}generateParentElementID(){let t=super.generateParentElementID();return this.engagementTrigger.isSubscriptionUpsell()&&(t+=`-${this.engagementTrigger.items[0].selectedOrFirstVariant.value.mID}`),t}async checkAndSendEvent(){if(!zt.get().isOpen()&&this.runtimeData.pageName!=="cart"){b.log("Do not send display event as neither the cart drawer nor the cart page is open.");return}return super.checkAndSendEvent()}},Zp=class mT{constructor(t,n){this.engagementTrigger=t,this.element=n,this.cartItems=Ue.getCurrent().items}cartItems;static renderCartUpsell(t){let n=t.placement;if(!n?.selector){b.warn(`No placement available for ${t.objective}`,t.shortID);return}let r=Array.from(document.querySelectorAll(n.selector));if(!r?.length){b.warn(`No placement found for ${t.objective}`,t.shortID);return}for(let i of r)new mT(t,i).render()}render(){let t=this.findCartItemFromHTMLElement();if(!t||this.engagementTrigger.skipSubscribedItems&&t.selling_plan_allocation)return;let n=this.engagementTrigger.items.find(h=>h.mID===t.product_id.toString());if(!n)return;let r=n.vars.find(h=>h.mID===t.id.toString());if(!r)return;let i=new wi(r),s=t.selling_plan_allocation?.selling_plan;if(s)for(let h of i.sellingPlans??[])h.mID===s.id.toString()&&(h.isSelected=!0,i.changeSellingPlan(h));let o=new Kn(n);o.vars=[i],o.selectedOrFirstVariant.value=i;let a=`lc-cart-item-${this.engagementTrigger.shortID}-${n.mID}`;this.element.classList.add(a);let l=new jn(this.engagementTrigger);l.placement.selector=`.${a}`,l.items=[o];let c=new Di(l);c.renderSilently(),this.watchForCartItemDeletion(c,a)}watchForCartItemDeletion(t,n){let r=new MutationObserver(i=>{i.forEach(s=>{s.removedNodes.forEach(o=>{o===this.element&&(b.debug(`${n} has been removed`),t.destroy(),r.disconnect())})})});r.observe(this.element.parentElement,{childList:!0,subtree:!0})}findCartItemFromHTMLElement(){let t=this.element.innerHTML;return this.cartItems.find(n=>{if(!(t.includes(n.url)||t.includes(n.variant_id))&&(!t.includes(n.product_title)||n.variant_title&&!t.includes(n.variant_title)))return!1;let r=n.selling_plan_allocation?.selling_plan?.name;return!(r&&!t.includes(r))})}},ox=Re(Yn()),Xp=class extends Di{ctaListener=new Ci;constructor(e){super(e),yi.get().subscriber(k.CART_UPDATE_BROADCAST).pipe(Ai(null)).subscribe(this.checkMilestone.bind(this))}update(e){super.update(e),this.widgetElement.update()}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}this.createAngularWidget("cooee-progressbar")}async checkMilestone(){let e=await Ue.getCurrent().getNormalisedCart(),t=[...this.engagementTrigger.progressBarConfig.milestones];for(let n of t){if(e.amount<n.minValue)break;if(b.log("Current milestone",n),n.rewardType===ox.MilestoneRewardType.FREE_AUTO_GIFT){let r=n.items[0],i=e.items.find(s=>s.vID===r.vID||s.mID===r.mID);if(i)b.log(`Item(vID:${r.vID}) already present in the cart. Updating item's properties`),await this.ctaListener.updateLineItem(i,{properties:this.engagementTrigger.getPrivateAttributesForLineItem()});else{let s=await this.ctaListener.addToCart([r],this.engagementTrigger);zt.get().refreshUI(s,!1)}}}}async removeOtherFreeGifts(e){let t=(await Ue.getCurrent().getNormalisedCart()).items.filter(n=>n.vID!==e?.vID&&n.properties[k.CAMPAIGN_ATTRIBUTE]===this.engagementTrigger.shortID);if(t.length)for(let n of t)await this.ctaListener.updateLineItem(n,{quantity:0})}},Jp=class extends Pn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}this.createAngularWidget("cooee-shoppable-videos")}},Qp=class extends Pn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){if(this.widgetElement?.isConnected){this.addToRendered();return}this.createAngularWidget("cooee-sticky-atc")}},sx=Re(xa()),eh=class extends Pn{constructor(e){super(e)}shouldStopRendering(){return!1}renderContainer(){let e=this.getParentElement(`inner-letscooee-${this.engagementTrigger.shortID}`);this.rootContainer.appendChild(e),document.addEventListener(k.ADD_BUNDLE_CTA_INBOUND_EVENT,this.inboundCTAListener.bind(this),!1)}async inboundCTAListener(e){let t=this.engagementTrigger,n=`Engagement(id: ${t.engagementID}, shortID: ${t.shortID})`,r=e.detail;if(!sx.JSUtils.hasKeys(r)){b.error(`No detail received for ${n}`);return}b.log("Detail received for BYOB",r);let i=r.campaignID??r.campaignId??r.campaign_id;if(i!==t.shortID&&i!==t.engagementID){b.warn(`Current ${n} is not BYOB. Received: ${i}`);return}let s=r.items;if(!s?.length)return;let o=s.map(a=>new gn({mID:a.product_id,vID:a.variant_id,quantity:a.quantity||1}));await new Mo(this.triggerContext).execute({embeddedItems:o,clickAction:{at:108,applyDiscount:!0}})}},mc=class{runtimeData=Oe.get();processCartWidgetResponse(e){this.runtimeData.isCartDirty=!1,this.runtimeData.cartEngagements=e;let t=[...Di.renderedEngagements];Di.renderedEngagements.length=0;for(let n of e)b.log(`\u{1F4E3} ${n} received as cart embed`),!this.findAndUpdateCurrent(n,t)&&(b.log(`${n} is new`),n.isProgressBar()?new Xp(n).renderSilently():n.isSubscriptionUpsell()?Zp.renderCartUpsell(n):new Di(n).renderSilently());this.removeOldWidgets(t)}processPageWidgetResponse(e){let t=[...Pn.renderedEngagements];Pn.renderedEngagements.length=0;for(let n of e)b.log(`\u{1F4E3} ${n} received as page embed`),!this.findAndUpdateCurrent(n,t)&&(b.log(`${n} is new`),n.isShoppableVideo()?new Jp(n).renderSilently():n.isBYOB()?new eh(n).renderSilently():n.isStickyATC()?new Qp(n).renderSilently():new Pn(n).renderSilently());this.removeOldWidgets(t)}findAndUpdateCurrent(e,t){let n=t.findIndex(r=>r.isSameTrigger(e));return n<0||e.isSubscriptionUpsell()?!1:(t[n].update(e),t[n].renderSilently(),t.splice(n,1),!0)}removeOldWidgets(e){for(let t of e)t.destroy()}},gc=class{runtimeData=Oe.get();httpService=Ce.get(On);sessionManager=Ce.get(qt);constructor(){}async getWidgetProps(){let e={};e.engagementIDs=this.addAvailableEngagementShortIDs(),e.locale=this.runtimeData.locale,await this.addSessionContext(e),e.currentItem=this.runtimeData.getCurrentItem();try{e.cart=await Ue.getCurrent().getNormalisedCart()}catch(i){b.error("Error fetching Shopify cart before sending widget call",i)}let t=new URLSearchParams(location.search),n=t.get("cooee-preview");n?e.previewIDs=n.trim().split(",").filter(i=>Number.isInteger(+i)):this.runtimeData.previewIDs?.length&&(e.previewIDs=this.runtimeData.previewIDs);let r=t.get("cooee-variant");return r?e.previewVariant=r:this.runtimeData.previewVariant&&(e.previewVariant=this.runtimeData.previewVariant),e}async addSessionContext(e){let t=await this.sessionManager.checkSessionAndGetContext();e.sessionID=t[0],e.sessionNumber=t[1],e.landingPage=t[2],e.page=vi.parseFromCurrent()}addAvailableEngagementShortIDs(){let e=document.querySelectorAll(".letscooee-engagement"),t=[];return e.forEach(n=>{let r=n.dataset.engagementId;r&&+r&&t.push(r)}),t}},qr=class uI extends gc{static INSTANCE;loadWidgetsSubject=new ee;constructor(){super(),this.loadWidgetsSubject.pipe(Pr(300)).subscribe(()=>{this.loadCartWidgets().catch(t=>b.error("Unable to initiate cart widgets",t)),this.loadPageWidgets().catch(t=>b.error("Unable to initiate page widgets",t))}),yi.get().subscriber(k.CART_UPDATE_BROADCAST).subscribe(()=>this.loadWidgetsSubject.next())}static getInstance(){return this.INSTANCE||(this.INSTANCE=new uI),this.INSTANCE}loadOrRenderWidgetsAfterCartChange(){this.runtimeData.isCartDirty?this.loadWidgetsSilently():this.renderCachedCartWidgets()}loadPageWidgetsSilently(){qt.replaySubject.subscribe(async()=>{this.loadPageWidgets().catch(t=>b.error("Unable to initiate load page widgets",t))})}loadCartWidgetsSilently(){qt.replaySubject.subscribe(async()=>{this.loadCartWidgets().catch(t=>b.error("Unable to initiate cart widgets",t))})}loadWidgetsSilently(){qt.replaySubject.subscribe(async()=>{this.loadWidgetsSubject.next()})}async loadPageWidgets(){let t=await this.getWidgetProps();b.log("Load widgets",t),this.httpService.post("/v1/engagement/page-widgets",t).then(async n=>{let r=n.widgets.map(i=>new jn(i));new mc().processPageWidgetResponse(r)}).catch(n=>{b.error("Error sending widget getter",n)})}async loadCartWidgets(){let t=await this.getWidgetProps();b.log("Load cart widgets",t),this.httpService.post("/v1/engagement/cart-widgets",t).then(async n=>{let r=n.widgets.map(i=>new jn(i));new mc().processCartWidgetResponse(r)}).catch(n=>{b.error("Error sending widget getter",n)})}async getVariation(t){let n=await this.getWidgetProps();return this.httpService.post("/v1/engagement/get-variant",w(w({},t),n))}renderCachedCartWidgets(){new mc().processCartWidgetResponse(this.runtimeData.cartEngagements)}},th=class{eventAPIService;constructor(){this.eventAPIService=Ce.get(Po)}processResponse(e){for(let t of e)t.experimentConfig&&(this.runExperiment(t),this.trackExperimentRan(t));document.querySelector("#lc-hide-body")?.remove()}async runExperiment(e){let t=e.experimentConfig?.experiments;if(!t?.length){b.log("Nothing to experiment",e.toString());return}for(let n of t)this.executeSingleExperiment(e,n).catch(r=>b.error("Fail to execute experiment",r))}async executeSingleExperiment(e,t){if(!t.cssSelector){b.debug("No CSS Selector available",e.toString());return}let n=await oe.retrySelectors(t.cssSelector);for(let r of n)Object.assign(r.style,t.style),t.type==="TEXT"&&t.text&&(r.innerHTML=t.text)}trackExperimentRan(e){this.eventAPIService.trackExperiment({name:k.EVENT_EXPERIMENT_START,experiment:new Co(e)}).catch(t=>{b.error("Fail to track experiment",t)})}},Po=class dI extends gc{static INSTANCE;constructor(){super()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new dI),this.INSTANCE}loadExperimentSilently(){rt.get(ge.SDK_TOKEN).then(t=>{t?this.loadExperiments().catch(n=>b.error("Unable to initiate experiment",n)):qt.replaySubject.subscribe(async()=>{this.loadExperiments().catch(n=>b.error("Unable to initiate experiment",n))})})}async loadExperiments(){if(!this.runtimeData.activeExperiment)return;let t=await this.getWidgetProps();b.log("Load experiments",t),this.httpService.post("/v1/engagement/experiments",t).then(async n=>{let r=n.experiments.map(i=>new jn(i));new th().processResponse(r)}).catch(n=>{b.error("Error sending experiment getter",n)})}async trackExperiment(t){await this.addSessionContext(t),await this.httpService.post("/v1/event/experiment",t)}},nh=class{runtimeData=Oe.get();widgetAPIService=Ce.get(qr);experimentAPIService=Ce.get(Po);meddle(){let e=Et.globalRef;e.account=e.account??[],e.profile=e.profile??[],e.events=e.events??[],e.screen=e.screen??[],e.page=e.page??[],this.meddlePage(),this.meddleAccount(),this.meddleEvents(),this.meddleProfile(),this.meddleScreen(),this.exposeMethods()}exposeMethods(){let e=Et.globalRef;e.loadPageWidgets=()=>{this.widgetAPIService.loadPageWidgetsSilently()},e.loadCartWidgets=()=>{this.widgetAPIService.loadCartWidgetsSilently()},e.loadExperiments=()=>{this.experimentAPIService.loadExperimentSilently()},e.previewWidget=Et.previewWidget.bind(Et),e.previewPopup=Et.previewPopup.bind(Et)}overwritePush(e,t){Ba(e,"push",t)}meddleAccount(){this.overwritePush(Et.globalRef.account,(...e)=>{this.processAccount(e[0])}),Et.globalRef.account.forEach(this.processAccount.bind(this))}meddleEvents(){this.overwritePush(Et.globalRef.events,(...e)=>{this.processEvent(e[0])}),Et.globalRef.events.forEach(this.processEvent.bind(this))}meddleProfile(){this.overwritePush(Et.globalRef.profile,(...e)=>{this.processProfile(e[0])}),Et.globalRef.profile.forEach(this.processProfile.bind(this))}meddleScreen(){this.overwritePush(Et.globalRef.screen,(...e)=>{this.processPageName(e[0])}),Et.globalRef.screen.forEach(this.processPageName.bind(this))}processAccount(e){e&&(e.appID&&Et.authenticate(e),e.flags&&Ts.setFlags(e.flags))}processEvent(e){e&&(k.JS_LOAD_WHITELIST_EVENTS.includes(e[0])?Et.sendEvent(e[0],e[1],w({occurred:this.runtimeData.jsLoadTime},e[2])):Et.sendEvent(e[0],e[1],e[2]))}processProfile(e){e&&Et.updateProfile(e)}processPageName(e){e&&Et.setPageName(e)}meddlePage(){this.overwritePush(Et.globalRef.page,(...e)=>{this.processPage(e[0])}),Et.globalRef.page.forEach(this.processPage.bind(this))}processPage(e){e.currentItem&&this.runtimeData.setCurrentItem(e.currentItem),e.currency&&(this.runtimeData.currencyCode=e.currency),e.shopCurrency&&(this.runtimeData.shopCurrencyCode=e.shopCurrency),e.moneyFormat&&(this.runtimeData.moneyFormat=e.moneyFormat),e.jsLoad&&(this.runtimeData.jsLoadTime=e.jsLoad),e.locale&&(this.runtimeData.locale=e.locale),e.pageName&&Et.setPageName(e.pageName),e.activeExperiment&&(this.runtimeData.activeExperiment=e.activeExperiment)}},yc=class{static SESSION_STORAGE=window.sessionStorage;static SESSION_STORAGE_KEY_PREFIX=k.COOEE.concat("-");static getString(e,t){return this.getItem(e)||t}static setString(e,t){this.setItem(e,t)}static remove(e){this.removeItem(e)}static getItem(e){return this.SESSION_STORAGE.getItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}static setItem(e,t){this.SESSION_STORAGE.setItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e),t)}static removeItem(e){this.SESSION_STORAGE.removeItem(this.SESSION_STORAGE_KEY_PREFIX.concat(e))}},vc=class Ac{static INSTANCE;static DEBOUNCE_TIME=1e3;static THRESHOLD=10;safeHttpService=Ce.get(Ke);_lastScreenOrScroll=new Date;lastPercent=0;constructor(){}set lastScreenOrScroll(t){this._lastScreenOrScroll=t}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Ac),this.INSTANCE}resetScrollID(t){yc.remove(k.SESSION_STORAGE_SCROLL_ID),this.lastScreenOrScroll=t??new Date}listen(){if(window.scrollY){let t=this.getPercentScrolledY();this.shouldSendScroll(t)&&this.sendScroll(t)}oe.onDocumentLoaded(()=>{this.observeWindowScroll()})}observeWindowScroll(){Ni(window,"scroll").pipe(Pr(Ac.DEBOUNCE_TIME),hr(()=>{let t=this.getPercentScrolledY();if(t>100){b.warn("Received scroll percent is more than 100",t);return}if(this.shouldSendScroll(t))return t})).subscribe(t=>{this.sendScroll(t)})}shouldSendScroll(t){return Math.abs(this.lastPercent-t)>=Ac.THRESHOLD||this.lastPercent!==t&&t===100}sendScroll(t){if(t==null)return;let n={percent:t,timeMS:new Date().getTime()-this._lastScreenOrScroll.getTime()};this.lastPercent=t;let r=yc.getString(k.SESSION_STORAGE_SCROLL_ID,""),i=new Pe(k.EVENT_SCROLL,n,null,r);this.safeHttpService.sendEvent(i),yc.setString(k.SESSION_STORAGE_SCROLL_ID,i.id.toHexString()),this._lastScreenOrScroll=new Date(i.occurred)}getPercentScrolledY(){let t=window.document.body.scrollHeight,n=window.innerHeight;return Math.ceil((window.scrollY+n)/t*100)}},rh=class fI{static ACTIVE_DURATION="aDur";static INACTIVE_DURATION="iaDur";apiService=Ce.get(Ke);runtimeData=Oe.get();listen(){document.onvisibilitychange=()=>{document.visibilityState==="visible"?this.onVisible():document.visibilityState==="hidden"&&this.onHidden()}}async onVisible(){}async onHidden(){let t=await this.runtimeData.setInactive();if(t===0){b.info("Not sending background event as user was inactive on website");return}b.info(`Sending background event with ${t} seconds`);let n={};n[fI.ACTIVE_DURATION]=t,this.apiService.sendEvent(new Pe(k.EVENT_APP_BACKGROUND,n))}},ih=class{compareCartItemSubject=new ee;constructor(){this.compareCartItemSubject.pipe(Pr(100)).subscribe(this.compareCartItems.bind(this))}listen(){this.compareCartItemSubject.next(),this.overwriteXMLHttpRequest(),this.overwriteFetchMethod()}overwriteXMLHttpRequest(){let e=this,t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(){return this.addEventListener("load",function(){e.performEvent(this._url).catch(n=>b.error("Unable to process cart change in XMLHttpRequest",n))}),t.apply(this,arguments)},b.debug("Securely overwritten window.XMLHttpRequest.send method")}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=function(n){return t.apply(window,arguments).then(r=>(e.performEvent(n.toString()).catch(i=>b.error("Unable to process cart change in fetch",i)),r))},b.debug("Securely overwritten window.fetch method")}async performEvent(e){this.isCartManipulationURL(e)&&(Oe.get().isCartDirty=!0,this.compareCartItemSubject.next())}isCartManipulationURL(e){return/\/cart\/(add|change|update|clear)/.test(e)}sendChangesAsEvents(e,t){let n=e?.items,r=t.items,i=[],s=[];if(b.debug(`Comparing cart change with old count ${n?.length} to new count ${r.length}`),r?.forEach(o=>{let a=n?.find(l=>l.vID===o.vID);if(a){if(a.quantity!==o.quantity){let l=a.quantity<o.quantity,c=Math.abs(a.quantity-o.quantity),h=ne(w({},o),{quantity:c});l?i.push(h):s.push(h)}n&&oe.removeFromArray(n,a)}else i.push(o)}),n)for(let o of n)s.push(o);b.debug(`Cart delta: added: ${i.length}, removed: ${s.length}`),i.length&&this.sendEvent(k.EVENT_ADD_TO_CART,{items:i}),s.length&&e.token===t.token&&this.sendEvent(k.EVENT_REMOVE_FROM_CART,{items:s}),(s.length||i.length)&&yi.get().broadcast(k.CART_UPDATE_BROADCAST,{itemsAdded:i,itemsRemoved:s})}sendEvent(e,t){let n=new Pe(e,t);Ce.get(Ke).sendEvent(n)}async compareCartItems(){let e=await rt.get(ge.CURRENT_CART,{}),t=await Ue.getCurrent().getNormalisedCart(!0);this.sendChangesAsEvents(e,t)}},oh=class{listen(){return this.overwriteFetchMethod(),this}overwriteFetchMethod(){let e=this,t=window.fetch;window.fetch=async function(n,r){try{await e.modifyRequest(n,r)}catch(i){St.getInstance().captureError("Failed to modify graphql request",i,{body:JSON.stringify(r?.body)})}return t(n,r)},b.debug("Securely overwritten window.fetch method for graphql query")}async modifyRequest(e,t){let n=typeof e=="string"?e:e instanceof Request?e.url:"";if(!(n.includes("graphql.json")&&t?.method==="POST")||!t.body)return;let r;if(typeof t.body=="string")try{r=JSON.parse(t.body)}catch{return}else r=t.body;b.debug("Intercepted fetch request of:",n),r?.query.includes("cartCreate")&&(t.body=await this.updatedBody(r),this.sendBuyNowEvent())}async updatedBody(e){let t=e.variables.input.attributes??[],n=await oe.getCartAttributes();return e.variables.input.attributes=[...t,...n],JSON.stringify(e)}sendBuyNowEvent(){let e=Oe.get().getCurrentItem();if(!e)return;let t=new Pe(k.EVENT_BUY_NOW_CLICKED,{items:[e]});Ke.getInstance().sendEvent(t)}},_c=class{constructor(e,t){this.selectors=e,this.eventName=t,this.selectorString=e.join(",")}static INSTANCE;elements;selectorString;clickListenerCallback=e=>{let t=e.currentTarget,n=new Pe(this.eventName,{class:t.className||void 0,tagName:t.tagName||void 0,id:t.id||void 0});Ke.getInstance().sendEvent(n),this.removeClickListener(this.clickListenerCallback)};listenSilently(){this.listen().catch(e=>b.error(e))}async listen(){this.elements=await oe.retrySelectorForElements(this.selectorString),this.elements.forEach(e=>{e.addEventListener("click",this.clickListenerCallback)})}removeClickListener(e){this.elements?.forEach(t=>{t.removeEventListener("click",e)})}},sh=class np extends _c{static selectors=[".product__thumbnail-list-inner > button","product-gallery-navigation > button",".product-media--thumb-container",".product-images-inner > img",".m-product-media",".swiper-button-control",".media__thumb",".slick-arrow",".productView-img-container.product-single__media",".product-gallery__thumbnail_item_inner"];constructor(){super(np.selectors,k.EVENT_ITEM_THUMBNAIL_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new np),this.INSTANCE}},ah=class Bp extends _c{static selectors=[".jdgm-widget.jdgm-preview-badge.jdgm-preview-badge--with-link.jdgm--done-setup","reviewsio-product-ratings",".ruk_rating_snippet.tracked:not(.hidden)","a > .loox-rating",".yotpo-reviews-star-ratings-widget",".yotpo.lp-hero__reviews",".pr-rating > a",".rivyoReviewWidget"];constructor(){super(Bp.selectors,k.EVENT_REVIEW_CLICKED)}static getInstance(){return this.INSTANCE||(this.INSTANCE=new Bp),this.INSTANCE}},ch=class{selector=[".gokwik-checkout button","button.cart__checkout-button","button.cart__checkout","button#checkout","button#checkout2",'button[id*="checkout" i]','button[name*="checkout" i]','button[class*="checkout" i]'].join(",");listen(){oe.onDocumentLoaded(()=>{b.debug("Execution order:","document ready"),this.useLocationHash()})}useLocationHash(){let e=window.location.hash?.substring(1);if(e)if(e.includes(k.HASH_INITIATE_CHECKOUT)){document.dispatchEvent(new Event(k.THIRD_PARTY_CHECKOUT_EVENT));let t=document.querySelector(this.selector);if(!t){b.debug("No clickable cart checkout button found");return}b.debug("Clickable cart checkout button found",t),t.click()}else e.includes(k.HASH_OPEN_CART_DRAWER)&&zt.get().open()}},lh=class{trackSilently(){this.track().catch(e=>St.getInstance().captureException(e))}async track(){let e=window.Shopify?.checkout,t=window.Shopify?.Checkout;if(!e&&!t)return;let n={};this.processSmallCheckout(e,n),this.processBigCheckout(t,n);let r=this.getTokenFromCurrentURLPath();if(r&&(n.urlToken=r),!Object.keys(n).length){b.warn("No processable data found in",e,t);return}n.referrer=document.referrer,n.url=location.href;let i=await Ce.get(qt).checkSessionAndGetContext();n.sessionID=i[0],this.trackOrder(n)}processSmallCheckout(e,t){e&&(e.order_id&&(t.orderID=e.order_id.toString()),e.token&&(t.checkoutToken=e.token.toString()),e.customer_id&&(t.customerID=e.customer_id.toString()))}processBigCheckout(e,t){e&&(e.token&&!t.checkoutToken&&(t.checkoutToken=e.token.toString()),e.cartToken&&(t.cartToken=e.cartToken.toString()))}trackOrder(e){b.info("Found order to be send",e),Ke.getInstance().trackOrder(e)}getTokenFromCurrentURLPath(){let e=new RegExp("[A-Fa-f0-9]{28,32}");return location.pathname?.split("/").find(t=>t.length&&e.test(t))}},tu=class{static attachCheckoutListener(){window.gokwikSdk&&window.gokwikSdk.on("checkout_initiated",async()=>{let e=await Ue.getCurrent().getNormalisedCart(),t={via:"GoKwik",items:e.items,cartToken:e.token,amount:{value:e.amount,currency:e.currency}},n=new Pe(k.EVENT_CHECKOUT_STARTED,t);Ke.getInstance().sendEvent(n)})}},uh=class{async migrate(){}};_n.escape=ax.MustacheUtils.escapeHtml;var Et=class{static globalRef;static authenticated;static async initForMerchantWebsiteOnly(){window.cooeeSDKPreview||(this.initGlobalReference(),await new uh().migrate(),this.autoAuthenticate(),new nh().meddle(),Ce.get(Po).loadExperimentSilently(),new rh().listen(),new lh().trackSilently(),new ih().listen(),new oh().listen(),new ch().listen(),Ce.get(vc).listen(),Ce.get(ah).listenSilently(),Ce.get(sh).listenSilently(),Ce.get(qr).loadPageWidgetsSilently(),this.attachGoKwikListeners(),this.storePreviewParams(),this.setupPreviewListeners(),xr.watch())}static async initForAll(){this.injectWidgetAssets()}static initGlobalReference(){window.CooeeSDK||Ba(window,"CooeeSDK",{}),this.globalRef=window.CooeeSDK,Ba(this.globalRef,"config",new Ct),Ba(this.globalRef,"runtimeData",new Oe),b.debug("Global reference initialised")}static injectWidgetAssets(){Ot.injectScriptURL(mn.widgetURL,"cooee-widget-sdk"),Ot.injectStylesheet(mn.styleURL)}static autoAuthenticate(){let e=Rt.getShopName();e&&this.authenticate({shopifyShop:e})}static authenticate(e){if(this.authenticated)return;let t=e.appID?.trim(),n=e.shopifyShop;if((oe.isNull(t)||t.length!==24)&&oe.isNull(n)){b.warn("Cooee App ID or Shop name is not configured");return}this.authenticated=!0,Ce.get(qt).init(e)}static sendEvent(e,t,n){let r=new Pe(e,t,n?.triggerData);n?.occurred&&(r.occurred=n.occurred),Ce.get(Ke).sendEvent(r)}static updateProfile(e){for(let t in e)if(t.toLowerCase().startsWith("ce "))throw new Error("User property name cannot start with 'CE '");Ce.get(Ke).updateProfile(e)}static setPageName(e){if(!e)return;let t=Oe.get(),n=t.pageName;if(e===n)return;if(t.pageName=e,e==="cart"&&Ce.get(qr).loadOrRenderWidgetsAfterCartChange(),k.BLACKLISTED_PAGE_NAMES.some(s=>e.includes(s))){Ce.get(vc).resetScrollID();return}let r={};n&&(r.ps=n);let i=new Pe(k.EVENT_SCREEN_VIEW,r);i.occurred=t.jsLoadTime,Ce.get(Ke).sendEvent(i),Ce.get(vc).resetScrollID(i.occurred)}static previewPopup(e,t){new fc(t).render(e)}static previewWidget(e){new Pn(new jn(e)).render()}static setupPreviewListeners(){if(window.opener){try{window.opener.postMessage({action:"COOEE_READY_FOR_PREVIEW"},"*")}catch(e){b.error(e)}window.addEventListener("message",e=>{if(b.debug("Received event",e),!e.origin.includes("letscooee.com")&&!e.origin.includes("localhost"))return;let t=e.data;typeof t=="object"&&(t.action==="POPUP_PREVIEW"?(this.previewPopup(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)):t.action==="WIDGET_PREVIEW"&&(this.previewWidget(t.engagementTrigger),e.source?.postMessage({action:"PREVIEW_SUCCESSFUL"},e.origin)))})}}static attachGoKwikListeners(){let e=Oe.get();window.addEventListener("kp-modal:opened",()=>{e.isGoKwikPopupOpen=!0}),window.addEventListener("user-loggedin",t=>{let{token:n}=t.detail;n&&this.updateProfile({goKwikToken:n})}),window.gokwikSdk?tu.attachCheckoutListener():window.addEventListener("gokwikLoaded",tu.attachCheckoutListener)}static storePreviewParams(){let e=Oe.get(),t=new URLSearchParams(location.search),n=t.get("cooee-preview");n&&(e.previewIDs=n.trim().split(",").filter(i=>Number.isInteger(+i)));let r=t.get("cooee-variant");r&&(e.previewVariant=r)}},dh=class eD{static INSTANCE;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new eD),this.INSTANCE}init(){Wl.get(ge.APP_CONFIG,{}).then(t=>this.updateGlobalConfig(t))}async processAppConfigurations(t){b.log("Received app configuration",t),t.currencyCount=t.currencies?.length;let n=this.updateGlobalConfig(t);Wl.set(ge.APP_CONFIG,n).catch(r=>b.error(r)),qp.processConfiguration(),n.website&&(Ot.injectRawScript(n.website.commonJS),Ot.injectRawCSS(n.website.commonCSS)),zt.get().onToggle().subscribe(async({open:r})=>{b.info("Cart drawer is now",r?"open":"closed"),r&&(Ce.get(qr).loadOrRenderWidgetsAfterCartChange(),await this.trackViewCartEvent())})}updateGlobalConfig(t){let n=Et.globalRef.config.update(t);return zt.forceUpdate(),b.debug("App configurations",n),n}async trackViewCartEvent(){let t=await Ue.getCurrent().getNormalisedCart(),n={value:t.amount,currency:t.currency},r={items:t.items,amount:n,drawer:!0};Ke.getInstance().sendEvent(new Pe(k.EVENT_VIEW_CART,r))}},cx=Re(R_()),fh=class kf{static META_REQUIRED_FIELDS=["ad_id"];static GOOGLE_REQUIRED_FIELDS=["gad_source","gclid"];source;adID;campaignID;adName;campaignName;constructor(t){this.adID=t.adID,this.campaignID=t.campaignID,this.source=t.source}static getAdParams(){let t;try{t=new cx.URLBuilder(location.href)}catch{return{}}let n={};if(this.META_REQUIRED_FIELDS.every(r=>Array.from(t.getParams().keys()).includes(r)))return n={source:"META",adID:t.getQueryParam("ad_id")?.trim(),campaignID:t.getQueryParam("campaign_id")?.trim()},new kf(n);if(this.GOOGLE_REQUIRED_FIELDS.every(r=>Array.from(t.getParams().keys()).includes(r)))return n={source:"GOOGLE"},new kf(n)}},Rs=class tD{static INSTANCE;httpAPIService=On.getInstance();coreService=dh.getInstance();sentryService=St.getInstance();sdkToken="";userID="";deviceID="";appID="";shopifyShop="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new tD),this.INSTANCE}init(t){this.appID=t.appID,this.shopifyShop=t.shopifyShop}async storeAndPopulateAuthData(t){t&&(t.userID&&(this.userID=t.userID,await rt.set(ge.ID,t.userID)),t.deviceID&&(this.deviceID=t.deviceID,await rt.set(ge.DEVICE_ID,t.deviceID)),t.sdkToken&&(this.sdkToken=t.sdkToken,await rt.set(ge.SDK_TOKEN,t.sdkToken)),this.updateAPIClient())}async validateSession(t){await this.populateFirstSeen(),await this.populateUserDataFromStorage(),b.log("Validating session with server");let n=await this.getSessionValidateData(t);try{let r=await this.httpAPIService.validateSession(n);b.log("Validating session Response",r),await this.coreService.processAppConfigurations(r.appSettings),await this.storeAndPopulateAuthData(r)}catch(r){throw b.error(r),r}}async populateUserDataFromStorage(){if(this.sdkToken=await rt.get(ge.SDK_TOKEN),!this.sdkToken){b.warn("No SDK token found in local storage");return}this.userID=await rt.get(ge.ID),this.deviceID=await rt.get(ge.DEVICE_ID),this.updateAPIClient()}updateAPIClient(){b.debug("SDK Token:",this.sdkToken),b.log("Device ID:",this.deviceID),b.log("User ID:",this.userID),Ga.trackDeviceID(this.deviceID),xr.prepend(`Device ID: <strong>${this.deviceID}</strong>`),this.httpAPIService.setAPIToken(this.sdkToken),this.sentryService.setGlobalContext("Visitor Info",{device_id:this.deviceID,user_id:this.userID}),this.sentryService.setUser({id:this.deviceID})}async getSessionValidateData(t){let n=await new Qf().get();n.host=location.origin;try{(await uT())?.isPrivate&&(n.private=!0)}catch(i){lx.default.error("Unable to detect private/incognito window",i)}let r=await rt.get(ge.DEVICE_ID);return r||(r=new un().toHexString(),await rt.set(ge.DEVICE_ID,r)),ne(w({deviceID:r,deviceProps:n,appID:this.appID,shopifyShop:this.shopifyShop},t),{sdk:k.SDK,page:vi.parseFromCurrent(),ad:fh.getAdParams(),occurred:this.getSessionStartTime(Oe.get().jsLoadTime),currentItem:Oe.get().getCurrentItem(),cart:await Ue.getCurrent().getNormalisedCart(),properties:{}})}async populateFirstSeen(){let t=await rt.get(ge.FIRST_SEEN),n=t?new Date(t):new Date;t||await rt.set(ge.FIRST_SEEN,n.toISOString()),this.httpAPIService.setFirstSeen(n),this.sentryService.setGlobalContext("Visitor Info",{first_seen:n.toISOString()})}getSessionStartTime(t){return(new Date().getTime()-t.getTime())/1e3>k.IDLE_TIME_IN_SECONDS?new Date:t}},kV=(0,ux.default)(fetch),LV={retryDelay:k.API_CALL_RETRY_DELAY,retryOn:(e,t,n)=>e>=k.API_CALL_MAX_ATTEMPTS?!1:!!(t!==null||n?.status&&n?.status>=500)},On=class nD{static INSTANCE;apiToken="";firstSeen="";constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=new nD),this.INSTANCE}async validateSession(t){return this.post("/v1/event/validate-session",t)}updateUserData(t){this.put("/v1/user/update",t).then(async n=>{b.log("Updated user profile"),await Rs.getInstance().storeAndPopulateAuthData(n)}).catch(n=>{b.error("Error saving user profile",n)})}trackOrder(t){this.post("/v1/event/track-order",t).then(()=>{b.log("Sent Order")}).catch(n=>{b.error("Error sending track order",n)})}generateDiscount(t){return this.post("/v1/event/generate-discount",t)}updateDeviceProps(t){this.put("/v1/device/update",t).then(()=>{b.log("Updated device property")}).catch(async n=>{b.error("Error saving device property",n)})}setAPIToken(t){this.apiToken=t??""}setFirstSeen(t){this.firstSeen=t?.toUTCString()??""}get(t){return this.requestBackend("GET",t)}post(t,n){return this.requestBackend("POST",t,n)}put(t,n){return this.requestBackend("PUT",t,n)}async requestBackend(t,n,r){if(!Ts.isECommerceApp()&&!Ts.getFlags().allowEvents)return b.log(`Rejecting ${t} ${n} as this is not e-commerce app`),Promise.reject();n.startsWith("http")||(n=mn.apiURL+n);let i=this.getDefaultHeaders(),s="keepalive"in new Request("");if(r&&!s&&JSON.stringify(r).includes("CE App Background"))try{return this.performXMLHttpRequest(n,i,r)}catch(a){return St.getInstance().captureException(a,{body:JSON.stringify(r)}),{}}let o={method:t,headers:i,keepalive:!0};return r&&(o.body=JSON.stringify(r)),this.request(n,o)}async request(t,n){let r=w(w({},LV),n),i=await kV(t,r);if(!i.ok)throw i;return i.json()}performXMLHttpRequest(t,n,r){return new Promise((i,s)=>{let o=new XMLHttpRequest;o.open("POST",t,!0),n.forEach((a,l)=>{o.setRequestHeader(l,a)}),o.onreadystatechange=()=>{if(o.readyState===XMLHttpRequest.DONE)if(o.status>=200&&o.status<300)try{o.getResponseHeader("Content-Type")?.includes("application/json")?i(JSON.parse(o.responseText)):s(new Error("Content-Type of response header is not json"))}catch(a){s(a)}else s(new Error(`Received status - ${o.status}(${o.statusText})`))},o.onerror=()=>{s(new Error("Network error occurred during the request."))},o.send(JSON.stringify(r))})}getDefaultHeaders(){let t=new Headers;return t.set("content-type","application/json"),t.set("cooee-sdk",k.SDK),t.set("cooee-sdk-code",k.SDK_VERSION_CODE.toString()),t.set("cooee-sdk-version",k.SDK_VERSION),t.set("cooee-first-seen",this.firstSeen),this.apiToken&&t.append("cooee-sdk-token",this.apiToken),mn.debug&&t.set("cooee-sdk-debug",String(1)),t}},FV=`
|
|
51
|
-
mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
|
|
52
|
-
cartDiscountCodesUpdate(cartId: $cartId, discountCodes: $discountCodes) {
|
|
53
|
-
cart {
|
|
54
|
-
id
|
|
55
|
-
}
|
|
56
|
-
userErrors {
|
|
57
|
-
field
|
|
58
|
-
message
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
`,Ao=class{static navigate(e,t,n){let r=`${location.origin}/discount/${e}`;switch(b.log(`Applying discount code ${e}`,t,n),t){case no.RedirectBehaviour.CART_PAGE:location.href=`${r}?redirect=/cart`;break;case no.RedirectBehaviour.CART_DRAWER:location.href=`${r}?redirect=${location.pathname}#${k.HASH_OPEN_CART_DRAWER}=1`;break;case no.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href=`${r}?redirect=/checkout`;break;case no.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`${r}?redirect=/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;default:location.href=`${r}?redirect=${n||location.pathname}`}}static navigateWithoutDiscount(e,t){let n=zt.get();switch(e){case no.RedirectBehaviour.CART_PAGE:location.href="/cart";break;case no.RedirectBehaviour.SHOPIFY_CHECKOUT:location.href="/checkout";break;case no.RedirectBehaviour.THIRD_PARTY_CHECKOUT:this.checkThirdPartyMethods(`/cart#${k.HASH_INITIATE_CHECKOUT}=1`);break;case no.RedirectBehaviour.CART_DRAWER:{n.open();break}}t&&n.refreshUI(t)}static async applyWithStorefront(e){let t=Ct.get().storefrontToken;if(!t)throw new Error("Storefront token not set for the store");let n=new Headers;n.append("Content-Type","application/json"),n.append("X-Shopify-Storefront-Access-Token",t);let r=JSON.stringify({query:FV,variables:{cartId:`gid://shopify/Cart/${Ue.getCurrent().token}`,discountCodes:[e]}}),i={method:"POST",headers:n,body:r};await On.getInstance().request(k.GRAPHQL_API_PATH,i)}static checkThirdPartyMethods(e){window.triggerGokwikCustomCheckout?window.triggerGokwikCustomCheckout():window.shiprocketCheckoutEvents?.buyCart?window.shiprocketCheckoutEvents.buyCart():window.openCheckout?window.openCheckout():window.openRzpCheckout?window.openRzpCheckout():location.href=e}},dx=Re(xa()),BV=`
|
|
63
|
-
mutation cartCreate($input: CartInput) {
|
|
64
|
-
cartCreate(input: $input) {
|
|
65
|
-
cart {
|
|
66
|
-
id
|
|
67
|
-
checkoutUrl
|
|
68
|
-
}
|
|
69
|
-
userErrors {
|
|
70
|
-
field
|
|
71
|
-
message
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
`,Ci=class{async addToCart(e,t){if(!e.length)return;let n=e.map(a=>{let{vID:l,quantity:c}=this.getVIDAndQuantity(a);return{id:l?+l:+a.mID,quantity:c,properties:t.getPrivateAttributesForLineItem()}}),r=Rt.getCartURL("cart/add.js"),i={items:n},s=zt.get();s.isMiniCart()?i.sections=["mini-cart"]:s.isShopifyDefaultDrawer()&&(i.sections=s.element.getSectionsToRender?.().map(a=>a.section??a.id));let o=JSON.stringify(i);try{let a=await fetch(r,{body:o,method:"post",headers:{"Content-Type":"application/json"}});if(a.status===200||a.status===302)return b.log(`Added ${e.length} items to Cart`),oe.showSnackbar("Product added to your cart"),a.json()}catch(a){b.error("Failed to add product in cart",a)}}async updateLineItem(e,t){if(!dx.JSUtils.hasKeys(t)){b.warn("No update fields provided");return}let n=Rt.getCartURL("cart/change.js"),r=w({id:e.key},t),i=JSON.stringify(r);try{let s=await fetch(n,{body:i,method:"post",headers:{"Content-Type":"application/json"}});(s.status===200||s.status===302)&&(b.log(`Updated ${e}`),Ue.getCurrent().update(s.json()))}catch(s){b.error("Failed to update item in cart",s,e)}}async copyDiscountCode(e){if(e)try{await navigator.clipboard.writeText(e),b.log(`Code-${e} copied`),oe.showSnackbar("Discount code copied")}catch(t){b.error("Failed to copy code",t)}}goToItem(e){if(!e?.link)return;let t=Rt.getProductSlug(e.link);t&&(location.pathname=Rt.getRootPrefix()+"products/"+t)}async upgradeToSubscription(e,t){if(!e){b.warn("Trying to upgrade to subscription with no item");return}let n=await Ue.getCurrent().getNormalisedCart(),r=e.selectedOrFirstVariant.value,i=n.items.findIndex(c=>c.vID===r.mID),s=r.selectedSellingPlan.value,o=Rt.getCartURL("cart/change.js"),a={line:i+1,selling_plan:s?.mID||null,properties:t.getPrivateAttributesForLineItem()},l=JSON.stringify(a);try{let c=await fetch(o,{body:l,method:"post",headers:{"Content-Type":"application/json"}});if(c.status===200||c.status===302){b.log(`Upgraded ${e} selling plan`),oe.showSnackbar("Line item updated");let h=await c.json();return Ue.getCurrent().update(h),h}}catch(c){b.error("Failed to update subscription for item in cart",c)}}async createNewCart(e,t,n){let r=Ct.get().storefrontToken;if(!r)throw new Error("Storefront token not set for the store");if(!e?.vID){b.error("No variant ID found to perform Buy now",e);return}let i=t?[t]:[],s=[{merchandiseId:`gid://shopify/ProductVariant/${e.vID}`,quantity:1,attributes:n.getKVFormatPrivateAttributesForLineItem()}],o=await oe.getCartAttributes(),a=new Headers;a.append("Content-Type","application/json"),a.append("X-Shopify-Storefront-Access-Token",r);let l=JSON.stringify({query:BV,variables:{input:{lines:s,discountCodes:i,attributes:o}}});return(await On.getInstance().request(k.GRAPHQL_API_PATH,{method:"POST",headers:a,body:l})).data?.cartCreate?.cart?.checkoutUrl}async process(e){let t=e.clickAction,n=e.items,r=e.triggerData;if(t.at){let i=t;if(b.log(`Performing ${JSON.stringify(i)} action`),i.at===101)n?.length&&this.goToItem(n[0]);else if(i.at===102)n?.length&&await this.addToCart(n,r);else if(i.at===103)await this.copyDiscountCode(r.discount.code);else if(i.at===105)zt.get().open();else if(i.at===104){let s=e.collections;if(!s?.length)return;location.pathname=Rt.getRootPrefix()+"collections/"+s[0].handle}}t.applyDiscount&&r.discount?.code&&Ao.navigate(r.discount.code,r.redirectBehaviour)}getVIDAndQuantity(e){let t,n;if(e instanceof gn)t=e.vID,n=e.quantity??1;else{if(!e.vars?.length)return{};t=e.selectedOrFirstVariant.value.mID,n=1}return{vID:t,quantity:n}}},Ec=class Lf{cooeeEvent=new Je;elementRef=O(yt);_engagementTrigger=Er(null);_triggerContext=Er(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get triggerContext(){return this._triggerContext()}set triggerContext(t){this._triggerContext.set(t),this._engagementTrigger.set(t.triggerData),this.engagementTriggerReceived(t.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){b.debug("Init",this.constructor.name)}ngOnDestroy(){b.debug("Destroying",this.constructor.name)}sendEventToRenderer(t){this.cooeeEvent.emit(t)}static \u0275fac=function(t){return new(t||Lf)};static \u0275cmp=st({type:Lf,selectors:[["ng-component"]],inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent"},decls:0,vars:0,template:function(t,n){},encapsulation:2})};function VV(e,t){if(e&1&&(Z(0,"div",6),bt(1),X(),Z(2,"div",7),bt(3),X()),e&2){let n=de(2);q(),rr(" ",n.getCurrency(n.selectedVariant().price.cmp)," "),q(2),rr(" ",n.getDiscountPercentage(n.selectedVariant().price),"% off ")}}function UV(e,t){if(e&1&&(Z(0,"div",4),bt(1),X()),e&2){let n=de(2);q(),rr(" ",n.stickyATCConfig.leftText," ")}}function HV(e,t){if(e&1&&(Z(0,"div",1)(1,"div",5),bt(2),X(),pt(3,VV,4,2)(4,UV,2,1,"div",4),X()),e&2){let n=de();q(2),rr(" ",n.getCurrency(n.selectedVariant().price.d)," "),q(),xt(n.selectedVariant().price.cmp?3:-1),q(),xt(n.stickyATCConfig!=null&&n.stickyATCConfig.leftText?4:-1)}}function jV(e,t){if(e&1&&(Z(0,"div",4),bt(1),X()),e&2){let n=de();q(),rr(" ",n.stickyATCConfig.rightText," ")}}var ph=class Xf extends Ec{currentItem;stickyATCConfig;selectedVariant=Er(void 0);constructor(){super()}engagementTriggerReceived(t){this.stickyATCConfig=t.stickyATCConfig,this.currentItem=t.items[0],this.selectedVariant.set(this.currentItem.vars[0])}update(){}getCurrency(t){return oe.formatCurrency(t)}getDiscountPercentage(t){return((t.cmp-t.d)/t.cmp*100).toFixed(0)}async addToCart(){let t=new Pe(k.EVENT_TRIGGER_CLICKED,{},this.engagementTrigger);t.items=[this.currentItem.toEmbed()],this.sendEventToRenderer(t),await new Ci().addToCart([this.currentItem],this.engagementTrigger)}static \u0275fac=function(t){return new(t||Xf)};static \u0275cmp=st({type:Xf,selectors:[["cooee-sticky-atc"]],features:[wr],decls:6,vars:2,consts:[[1,"lc-wrapper"],[1,"lc-prices"],[1,"lc-button-wrapper"],["type","button",1,"lc-button","lc-button-atc",3,"click"],[1,"lc-additional-text"],[1,"lc-sale-price"],[1,"lc-compare-price"],[1,"lc-discount-label"]],template:function(t,n){t&1&&(Z(0,"div",0),pt(1,HV,5,3,"div",1),Z(2,"div",2)(3,"button",3),wt("click",function(){return n.addToCart()}),bt(4,"Add To Cart"),X(),pt(5,jV,2,1,"div",4),X()()),t&2&&(q(),xt(n.selectedVariant()&&n.stickyATCConfig!=null&&n.stickyATCConfig.showProductInfo?1:-1),q(4),xt(n.stickyATCConfig!=null&&n.stickyATCConfig.rightText?5:-1))},styles:["[_nghost-%COMP%]{display:flex;justify-content:center;padding:10px;background-color:#fff;width:100%;box-shadow:4px 0 10px #0006;line-height:normal}.lc-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:8px;max-width:1100px;width:100%}.lc-prices[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px}@media (min-width: 768px){.lc-prices[_ngcontent-%COMP%]{gap:8px}}.lc-sale-price[_ngcontent-%COMP%]{font-size:24px;font-weight:600}.lc-compare-price[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:red;text-decoration:line-through}.lc-discount-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:green}.lc-button-wrapper[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-direction:column;align-items:center}@media (min-width: 768px){.lc-button-wrapper[_ngcontent-%COMP%]{flex-direction:row;gap:8px}}.lc-button[_ngcontent-%COMP%]{background-color:#000;color:#fff;opacity:1;cursor:pointer;pointer-events:auto;border-radius:4px;min-width:150px;width:100%;padding:8px}.lc-additional-text[_ngcontent-%COMP%]{font-size:12px;color:#666}"]})},Ws=Re(_x()),SR=Re(Yn()),ko=class{static getBestSources(e){if(!e)return[];let t=[],n=e.filter(i=>i.format==="mp4").sort((i,s)=>s.width-i.width)[0];n&&t.push(n);let r=e.filter(i=>i.format==="m3u8").sort((i,s)=>s.width-i.width)[0];return r&&t.push(r),t}},fE;function WV(){if(fE==null){let e=typeof document<"u"?document.head:null;fE=!!(e&&(e.createShadowRoot||e.attachShadow))}return fE}function bc(e){if(WV()){let t=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function yh(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){let t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}function Zn(e){return e.composedPath?e.composedPath()[0]:e.target}function vh(e){return e.buttons===0||e.detail===0}function _h(e){let t=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}function pE(e,t=0){return GV(e)?Number(e):arguments.length===2?t:0}function GV(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function Xn(e){return e instanceof yt?e.nativeElement:e}function Tn(e,t,n,r,i){let s=parseInt(Iy.major),o=parseInt(Iy.minor);return s>19||s===19&&o>0||s===0&&o===0?e.listen(t,n,r,i):(t.addEventListener(n,r,i),()=>{t.removeEventListener(n,r,i)})}var Eh=new WeakMap,Vs=(()=>{class e{_appRef;_injector=O(gt);_environmentInjector=O(zn);load(n){let r=this._appRef=this._appRef||this._injector.get(vr),i=Eh.get(r);i||(i={loaders:new Set,refs:[]},Eh.set(r,i),r.onDestroy(()=>{Eh.get(r)?.refs.forEach(s=>s.destroy()),Eh.delete(r)})),i.loaders.has(n)||(i.loaders.add(n),i.refs.push($d(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),hE;try{hE=typeof Intl<"u"&&Intl.v8BreakIterator}catch{hE=!1}var Jn=(()=>{class e{_platformId=O(os);isBrowser=this._platformId?ES(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||hE)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),zV=new he("cdk-dir-doc",{providedIn:"root",factory:qV});function qV(){return O(Qe)}var YV=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function KV(e){let t=e?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?YV.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var Us=(()=>{class e{value="ltr";change=new Je;constructor(){let n=O(zV,{optional:!0});if(n){let r=n.body?n.body.dir:null,i=n.documentElement?n.documentElement.dir:null;this.value=KV(r||i||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Hs;function Ex(){if(Hs==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Hs=!1,Hs;if("scrollBehavior"in document.documentElement.style)Hs=!0;else{let e=Element.prototype.scrollTo;e?Hs=!/\{\s*\[native code\]\s*\}/.test(e.toString()):Hs=!1}}return Hs}var ZV=20,mE=(()=>{class e{_ngZone=O(Fe);_platform=O(Jn);_renderer=O(hn).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new ee;_scrolledCount=0;scrollContainers=new Map;register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let r=this.scrollContainers.get(n);r&&(r.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=ZV){return this._platform.isBrowser?new nt(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=n>0?this._scrolled.pipe(Vu(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):$o()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((n,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(n,r){let i=this.getAncestorScrollContainers(n);return this.scrolled(r).pipe(Wo(s=>!s||i.indexOf(s)>-1))}getAncestorScrollContainers(n){let r=[];return this.scrollContainers.forEach((i,s)=>{this._scrollableContainsElement(s,n)&&r.push(s)}),r}_scrollableContainsElement(n,r){let i=Xn(r),s=n.getElementRef().nativeElement;do if(i==s)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),XV=20,nu=(()=>{class e{_platform=O(Jn);_listeners;_viewportSize;_change=new ee;_document=O(Qe,{optional:!0});constructor(){let n=O(Fe),r=O(hn).createRenderer(null,null);n.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=s=>this._change.next(s);this._listeners=[r.listen("window","resize",i),r.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(n=>n()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+i,right:n.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,r=this._getWindow(),i=n.documentElement,s=i.getBoundingClientRect(),o=-s.top||n.body.scrollTop||r.scrollY||i.scrollTop||0,a=-s.left||n.body.scrollLeft||r.scrollX||i.scrollLeft||0;return{top:o,left:a}}change(n=XV){return n>0?this._change.pipe(Vu(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),gE={},wh=(()=>{class e{_appId=O(ol);getId(n){return this._appId!=="ng"&&(n+=this._appId),gE.hasOwnProperty(n)||(gE[n]=0),`${n}${gE[n]++}`}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function yE(e){return Array.isArray(e)?e:[e]}function kx(e){let t=e.cloneNode(!0),n=t.querySelectorAll("[id]"),r=e.nodeName.toLowerCase();t.removeAttribute("id");for(let i=0;i<n.length;i++)n[i].removeAttribute("id");return r==="canvas"?Cx(e,t):(r==="input"||r==="select"||r==="textarea")&&bx(e,t),wx("canvas",e,t,Cx),wx("input, textarea, select",e,t,bx),t}function wx(e,t,n,r){let i=t.querySelectorAll(e);if(i.length){let s=n.querySelectorAll(e);for(let o=0;o<i.length;o++)r(i[o],s[o])}}var JV=0;function bx(e,t){t.type!=="file"&&(t.value=e.value),t.type==="radio"&&t.name&&(t.name=`mat-clone-${t.name}-${JV++}`)}function Cx(e,t){let n=t.getContext("2d");if(n)try{n.drawImage(e,0,0)}catch{}}function DE(e){let t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height,x:t.x,y:t.y}}function EE(e,t,n){let{top:r,bottom:i,left:s,right:o}=e;return n>=r&&n<=i&&t>=s&&t<=o}function ou(e,t,n){e.top+=t,e.bottom=e.top+e.height,e.left+=n,e.right=e.left+e.width}function Sx(e,t,n,r){let{top:i,right:s,bottom:o,left:a,width:l,height:c}=e,h=l*t,d=c*t;return r>i-d&&r<o+d&&n>a-h&&n<s+h}var bh=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:DE(t)})})}handleScroll(e){let t=Zn(e),n=this.positions.get(t);if(!n)return null;let r=n.scrollPosition,i,s;if(t===this._document){let l=this.getViewportScrollPosition();i=l.top,s=l.left}else i=t.scrollTop,s=t.scrollLeft;let o=r.top-i,a=r.left-s;return this.positions.forEach((l,c)=>{l.clientRect&&t!==c&&t.contains(c)&&ou(l.clientRect,o,a)}),r.top=i,r.left=s,{top:o,left:a}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Lx(e,t){let n=e.rootNodes;if(n.length===1&&n[0].nodeType===t.ELEMENT_NODE)return n[0];let r=t.createElement("div");return n.forEach(i=>r.appendChild(i)),r}function IE(e,t,n){for(let r in t)if(t.hasOwnProperty(r)){let i=t[r];i?e.setProperty(r,i,n?.has(r)?"important":""):e.removeProperty(r)}return e}function Cc(e,t){let n=t?"":"none";IE(e.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":n,"-ms-user-select":n,"-webkit-user-select":n,"-moz-user-select":n})}function Dx(e,t,n){IE(e.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},n)}function Ch(e,t){return t&&t!="none"?e+" "+t:e}function Ix(e,t){e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.style.transform=Sh(t.left,t.top)}function Sh(e,t){return`translate3d(${Math.round(e)}px, ${Math.round(t)}px, 0)`}function Tx(e){let t=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*t}function QV(e){let t=getComputedStyle(e),n=vE(t,"transition-property"),r=n.find(a=>a==="transform"||a==="all");if(!r)return 0;let i=n.indexOf(r),s=vE(t,"transition-duration"),o=vE(t,"transition-delay");return Tx(s[i])+Tx(o[i])}function vE(e,t){return e.getPropertyValue(t).split(",").map(n=>n.trim())}var eU=new Set(["position"]),wE=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,t,n,r,i,s,o,a,l,c){this._document=e,this._rootElement=t,this._direction=n,this._initialDomRect=r,this._previewTemplate=i,this._previewClass=s,this._pickupPositionOnPage=o,this._initialTransform=a,this._zIndex=l,this._renderer=c}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),xx(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return QV(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,n=e?e.template:null,r;if(n&&e){let i=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(n,e.context);s.detectChanges(),r=Lx(s,this._document),this._previewEmbeddedView=s,e.matchSize?Ix(r,i):r.style.transform=Sh(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=kx(this._rootElement),Ix(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return IE(r.style,{"pointer-events":"none",margin:xx(r)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},eU),Cc(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(i=>r.classList.add(i)):r.classList.add(t)),r}};function xx(e){return"showPopover"in e}var tU={passive:!0},Rx={passive:!1},nU={passive:!1,capture:!0},rU=800,Nx=new Set(["position"]),bE=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Er(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new ee;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=ot.EMPTY;_pointerUpSubscription=ot.EMPTY;_scrollSubscription=ot.EMPTY;_resizeSubscription=ot.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>Cc(t,e)))}_disabled=!1;beforeStarted=new ee;started=new ee;released=new ee;ended=new ee;entered=new ee;exited=new ee;dropped=new ee;moved=this._moveEvents;data;constrainPosition;constructor(e,t,n,r,i,s,o){this._config=t,this._document=n,this._ngZone=r,this._viewportRuler=i,this._dragDropRegistry=s,this._renderer=o,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new bh(n),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(n=>Xn(n)),this._handles.forEach(n=>Cc(n,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&t.add(n)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=Xn(e);return t!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[Tn(this._renderer,t,"mousedown",this._pointerDown,Rx),Tn(this._renderer,t,"touchstart",this._pointerDown,tU),Tn(this._renderer,t,"dragstart",this._nativeDragStart,Rx)]),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?Xn(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),Cc(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),Cc(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let r=Math.abs(t.x-this._pickupPositionOnPage.x),i=Math.abs(t.y-this._pickupPositionOnPage.y);if(r+i>=this._config.dragStartThreshold){let s=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),o=this._dropContainer;if(!s){this._endDragSequence(e);return}(!o||!o.isDragging()&&!o.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let n=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(n),this._dropContainer)this._updateActiveDropContainer(n,t);else{let r=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,i=this._activeTransform;i.x=n.x-r.x+this._passiveTransform.x,i.y=n.y-r.y+this._passiveTransform.y,this._applyRootElementTransform(i.x,i.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:n,event:e,distance:this._getDragDistance(n),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){ru(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),n=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=Tn(this._renderer,t,"selectstart",iU,nU)}),n){let r=this._rootElement,i=r.parentNode,s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment("");i.insertBefore(o,r),this._initialTransform=r.style.transform||"",this._preview=new wE(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(i,t)),Dx(r,!1,Nx),this._document.body.appendChild(i.replaceChild(s,r)),this.started.next({source:this,event:e}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let n=this.isDragging(),r=ru(t),i=!r&&t.button!==0,s=this._rootElement,o=Zn(t),a=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+rU>Date.now(),l=r?_h(t):vh(t);if(o&&o.draggable&&t.type==="mousedown"&&t.preventDefault(),n||i||a||l)return;if(this._handles.length){let d=s.style;this._rootElementTapHighlight=d.webkitTapHighlightColor||"",d.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(d=>this._updateOnScroll(d)),this._boundaryElement&&(this._boundaryRect=DE(this._boundaryElement));let c=this._previewTemplate;this._pickupPositionInElement=c&&c.template&&!c.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let h=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:h.x,y:h.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){Dx(this._rootElement,!0,Nx),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,n=t.getItemIndex(this),r=this._getPointerPositionOnPage(e),i=this._getDragDistance(r),s=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:i,dropPoint:r,event:e}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:i,dropPoint:r,event:e}),t.drop(this,n,this._initialIndex,this._initialContainer,s,i,r,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:n,y:r}){let i=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!i&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(i=this._initialContainer),i&&i!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=i,this._dropContainer.enter(this,e,t,i===this._initialContainer&&i.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:i,currentIndex:i.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let r=o=>{(!o||this._preview&&Zn(o)===this._preview.element&&o.propertyName==="transform")&&(s(),n(),clearTimeout(i))},i=setTimeout(r,t*1.5),s=this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,n;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),n=Lx(this._placeholderRef,this._document)):n=kx(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(e,t,n){let r=t===this._rootElement?null:t,i=r?r.getBoundingClientRect():e,s=ru(n)?n.targetTouches[0]:n,o=this._getViewportScrollPosition(),a=s.pageX-i.left-o.left,l=s.pageY-i.top-o.top;return{x:i.left-e.left+a,y:i.top-e.top+l}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),n=ru(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,r=n.pageX-t.left,i=n.pageY-t.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let o=this._ownerSVGElement.createSVGPoint();return o.x=r,o.y=i,o.matrixTransform(s.inverse())}}return{x:r,y:i}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:r}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:i,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,o=this._boundaryRect,{width:a,height:l}=this._getPreviewRect(),c=o.top+s,h=o.bottom-(l-s),d=o.left+i,f=o.right-(a-i);n=Ax(n,d,f),r=Ax(r,c,h)}return{x:n,y:r}}_updatePointerDirectionDelta(e){let{x:t,y:n}=e,r=this._pointerDirectionDelta,i=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-i.x),o=Math.abs(n-i.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=t>i.x?1:-1,i.x=t),o>this._config.pointerDirectionChangeThreshold&&(r.y=n>i.y?1:-1,i.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,Cc(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let n=1/this.scale,r=Sh(e*n,t*n),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=Ch(r,this._initialTransform)}_applyPreviewTransform(e,t){let n=this._previewTemplate?.template?void 0:this._initialTransform,r=Sh(e,t);this._preview.setTransform(Ch(r,n))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(r.width===0&&r.height===0||n.width===0&&n.height===0)return;let i=r.left-n.left,s=n.right-r.right,o=r.top-n.top,a=n.bottom-r.bottom;r.width>n.width?(i>0&&(e+=i),s>0&&(e-=s)):e=0,r.height>n.height?(o>0&&(t+=o),a>0&&(t-=a)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:ru(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let n=Zn(e);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&ou(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=bc(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let n=this._previewContainer||"global";if(n==="parent")return e;if(n==="global"){let r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return Xn(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function Ax(e,t,n){return Math.max(t,Math.min(n,e))}function ru(e){return e.type[0]==="t"}function iU(e){e.preventDefault()}function Fx(e,t,n){let r=Mx(t,e.length-1),i=Mx(n,e.length-1);if(r===i)return;let s=e[r],o=i<r?-1:1;for(let a=r;a!==i;a+=o)e[a]=e[a+o];e[i]=s}function Mx(e,t){return Math.max(0,Math.min(t,e))}var Dh=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,n,r){let i=this._itemPositions,s=this._getItemIndexFromPointerPosition(e,t,n,r);if(s===-1&&i.length>0)return null;let o=this.orientation==="horizontal",a=i.findIndex(_=>_.drag===e),l=i[s],c=i[a].clientRect,h=l.clientRect,d=a>s?1:-1,f=this._getItemOffsetPx(c,h,d),g=this._getSiblingOffsetPx(a,i,d),m=i.slice();return Fx(i,a,s),i.forEach((_,x)=>{if(m[x]===_)return;let A=_.drag===e,F=A?f:g,U=A?e.getPlaceholderElement():_.drag.getRootElement();_.offset+=F;let M=Math.round(_.offset*(1/_.drag.scale));o?(U.style.transform=Ch(`translate3d(${M}px, 0, 0)`,_.initialTransform),ou(_.clientRect,0,F)):(U.style.transform=Ch(`translate3d(0, ${M}px, 0)`,_.initialTransform),ou(_.clientRect,F,0))}),this._previousSwap.overlaps=EE(h,t,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=o?r.x:r.y,{previousIndex:a,currentIndex:s}}enter(e,t,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r,s=this._activeDraggables,o=s.indexOf(e),a=e.getPlaceholderElement(),l=s[i];if(l===e&&(l=s[i+1]),!l&&(i==null||i===-1||i<s.length-1)&&this._shouldEnterAsFirstChild(t,n)&&(l=s[0]),o>-1&&s.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){let c=l.getRootElement();c.parentElement.insertBefore(a,c),s.splice(i,0,e)}else this._element.appendChild(a),s.push(e);a.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let n=this._itemPositions.find(r=>r.drag===e)?.initialTransform;t.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(t=>t.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:n})=>{ou(n,e,t)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let n=t.getVisibleElement();return{drag:t,offset:0,initialTransform:n.style.transform||"",clientRect:DE(n)}}).sort((t,n)=>e?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top)}_getItemOffsetPx(e,t,n){let r=this.orientation==="horizontal",i=r?t.left-e.left:t.top-e.top;return n===-1&&(i+=r?t.width-e.width:t.height-e.height),i}_getSiblingOffsetPx(e,t,n){let r=this.orientation==="horizontal",i=t[e].clientRect,s=t[e+n*-1],o=i[r?"width":"height"]*n;if(s){let a=r?"left":"top",l=r?"right":"bottom";n===-1?o-=s.clientRect[a]-i[l]:o+=i[a]-s.clientRect[l]}return o}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,r=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let i=n[n.length-1].clientRect;return r?e>=i.right:t>=i.bottom}else{let i=n[0].clientRect;return r?e<=i.left:t<=i.top}}_getItemIndexFromPointerPosition(e,t,n,r){let i=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:o,clientRect:a})=>{if(o===e)return!1;if(r){let l=i?r.x:r.y;if(o===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return i?t>=Math.floor(a.left)&&t<Math.floor(a.right):n>=Math.floor(a.top)&&n<Math.floor(a.bottom)});return s===-1||!this._sortPredicate(s,e)?-1:s}},CE=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let n=0;n<t.length;n++){let r=t[n];this._relatedNodes.push([r,r.nextSibling])}this.withItems(e)}sort(e,t,n,r){let i=this._getItemIndexFromPointerPosition(e,t,n),s=this._previousSwap;if(i===-1||this._activeItems[i]===e)return null;let o=this._activeItems[i];if(s.drag===o&&s.overlaps&&s.deltaX===r.x&&s.deltaY===r.y)return null;let a=this.getItemIndex(e),l=e.getPlaceholderElement(),c=o.getRootElement();i>a?c.after(l):c.before(l),Fx(this._activeItems,a,i);let h=this._getRootNode().elementFromPoint(t,n);return s.deltaX=r.x,s.deltaY=r.y,s.drag=o,s.overlaps=c===h||c.contains(h),{previousIndex:a,currentIndex:i}}enter(e,t,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r;i===-1&&(i=this._getClosestItemIndexToPointer(e,t,n));let s=this._activeItems[i],o=this._activeItems.indexOf(e);o>-1&&this._activeItems.splice(o,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(i,0,e),s.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){let[r,i]=this._relatedNodes[n];r.parentNode===e&&r.nextSibling!==i&&(i===null?e.appendChild(r):i.parentNode===e&&e.insertBefore(r,i))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,n){let r=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(n)),i=r?this._activeItems.findIndex(s=>{let o=s.getRootElement();return r===o||o.contains(r)}):-1;return i===-1||!this._sortPredicate(i,e)?-1:i}_getRootNode(){return this._rootNode||(this._rootNode=bc(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,n){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let r=1/0,i=-1;for(let s=0;s<this._activeItems.length;s++){let o=this._activeItems[s];if(o!==e){let{x:a,y:l}=o.getRootElement().getBoundingClientRect(),c=Math.hypot(t-a,n-l);c<r&&(r=c,i=s)}}return i}},Ox=.05,Bx=.05,Ar=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e}(Ar||{}),$n=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e}($n||{}),SE=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new ee;entered=new ee;exited=new ee;dropped=new ee;sorted=new ee;receivingStarted=new ee;receivingStopped=new ee;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=ot.EMPTY;_verticalScrollDirection=Ar.NONE;_horizontalScrollDirection=$n.NONE;_scrollNode;_stopScrollTimers=new ee;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,n,r,i){this._dragDropRegistry=t,this._ngZone=r,this._viewportRuler=i;let s=this.element=Xn(e);this._document=n,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new bh(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,n,r){this._draggingStarted(),r==null&&this.sortingDisabled&&(r=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,n,r,i,s,o,a={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:i,distance:s,dropPoint:o,event:a})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(t.filter(n=>n.isDragging()).every(n=>e.indexOf(n)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof Dh&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new CE(this._document,this._dragDropRegistry);else{let t=new Dh(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,n)=>this.sortPredicate(t,n,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=Xn(this.element),n=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(e);return n>-1&&this._scrollableElements.splice(n,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,n,r){if(this.sortingDisabled||!this._domRect||!Sx(this._domRect,Ox,t,n))return;let i=this._sortStrategy.sort(e,t,n,r);i&&this.sorted.next({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let n,r=Ar.NONE,i=$n.NONE;if(this._parentPositions.positions.forEach((s,o)=>{o===this._document||!s.clientRect||n||Sx(s.clientRect,Ox,e,t)&&([r,i]=oU(o,s.clientRect,this._direction,e,t),(r||i)&&(n=o))}),!r&&!i){let{width:s,height:o}=this._viewportRuler.getViewportSize(),a={width:s,height:o,top:0,right:s,bottom:o,left:0};r=Vx(a,t),i=Ux(a,e),n=window}n&&(r!==this._verticalScrollDirection||i!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=i,this._scrollNode=n,(r||i)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),cm(0,Su).pipe(mr(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===Ar.UP?e.scrollBy(0,-t):this._verticalScrollDirection===Ar.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===$n.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===$n.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&EE(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,n){return this._siblings.find(r=>r._canReceive(e,t,n))}_canReceive(e,t,n){if(!this._domRect||!EE(this._domRect,t,n)||!this.enterPredicate(e,this))return!1;let r=this._getShadowRoot().elementFromPoint(t,n);return r?r===this._container||this._container.contains(r):!1}_startReceiving(e,t){let n=this._activeSiblings;!n.has(e)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=bc(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function Vx(e,t){let{top:n,bottom:r,height:i}=e,s=i*Bx;return t>=n-s&&t<=n+s?Ar.UP:t>=r-s&&t<=r+s?Ar.DOWN:Ar.NONE}function Ux(e,t){let{left:n,right:r,width:i}=e,s=i*Bx;return t>=n-s&&t<=n+s?$n.LEFT:t>=r-s&&t<=r+s?$n.RIGHT:$n.NONE}function oU(e,t,n,r,i){let s=Vx(t,i),o=Ux(t,r),a=Ar.NONE,l=$n.NONE;if(s){let c=e.scrollTop;s===Ar.UP?c>0&&(a=Ar.UP):e.scrollHeight-c>e.clientHeight&&(a=Ar.DOWN)}if(o){let c=e.scrollLeft;n==="rtl"?o===$n.RIGHT?c<0&&(l=$n.RIGHT):e.scrollWidth+c>e.clientWidth&&(l=$n.LEFT):o===$n.LEFT?c>0&&(l=$n.LEFT):e.scrollWidth-c>e.clientWidth&&(l=$n.RIGHT)}return[a,l]}var iu={capture:!0},_E={passive:!1,capture:!0},sU=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=st({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(n,r){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
|
|
76
|
-
`],encapsulation:2,changeDetection:0})}return e})(),Hx=(()=>{class e{_ngZone=O(Fe);_document=O(Qe);_styleLoader=O(Vs);_renderer=O(hn).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Er([]);_globalListeners;_draggingPredicate=n=>n.isDragging();_domNodesToDirectives=null;pointerMove=new ee;pointerUp=new ee;scroll=new ee;constructor(){}registerDropContainer(n){this._dropInstances.has(n)||this._dropInstances.add(n)}registerDragItem(n){this._dragInstances.add(n),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=Tn(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,_E)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(n,r){if(!(this._activeDragInstances().indexOf(n)>-1)&&(this._styleLoader.load(sU),this._activeDragInstances.update(i=>[...i,n]),this._activeDragInstances().length===1)){let i=r.type.startsWith("touch"),s=a=>this.pointerUp.next(a),o=[["scroll",a=>this.scroll.next(a),iu],["selectstart",this._preventDefaultWhileDragging,_E]];i?o.push(["touchend",s,iu],["touchcancel",s,iu]):o.push(["mouseup",s,iu]),i||o.push(["mousemove",a=>this.pointerMove.next(a),_E]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,c])=>Tn(this._renderer,this._document,a,l,c))})}}stopDragging(n){this._activeDragInstances.update(r=>{let i=r.indexOf(n);return i>-1?(r.splice(i,1),[...r]):r}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(n){return this._activeDragInstances().indexOf(n)>-1}scrolled(n){let r=[this.scroll];return n&&n!==this._document&&r.push(new nt(i=>this._ngZone.runOutsideAngular(()=>{let s=Tn(this._renderer,n,"scroll",o=>{this._activeDragInstances().length&&i.next(o)},iu);return()=>{s()}}))),ao(...r)}registerDirectiveNode(n,r){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(n,r)}removeDirectiveNode(n){this._domNodesToDirectives?.delete(n)}getDragDirectiveForNode(n){return this._domNodesToDirectives?.get(n)||null}ngOnDestroy(){this._dragInstances.forEach(n=>this.removeDragItem(n)),this._dropInstances.forEach(n=>this.removeDropContainer(n)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=n=>{this._activeDragInstances().length>0&&n.preventDefault()};_persistentTouchmoveListener=n=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&n.preventDefault(),this.pointerMove.next(n))};_clearGlobalListeners(){this._globalListeners?.forEach(n=>n()),this._globalListeners=void 0}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),aU={dragStartThreshold:5,pointerDirectionChangeThreshold:5},cU=(()=>{class e{_document=O(Qe);_ngZone=O(Fe);_viewportRuler=O(nu);_dragDropRegistry=O(Hx);_renderer=O(hn).createRenderer(null,null);constructor(){}createDrag(n,r=aU){return new bE(n,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(n){return new SE(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Px=new he("CDK_DRAG_PARENT"),lU=new he("CdkDragHandle"),uU=new he("CDK_DRAG_CONFIG"),dU=new he("CdkDropList"),jx=(()=>{class e{element=O(yt);dropContainer=O(dU,{optional:!0,skipSelf:!0});_ngZone=O(Fe);_viewContainerRef=O(Hr);_dir=O(Us,{optional:!0});_changeDetectorRef=O(ir);_selfHandle=O(lU,{optional:!0,self:!0});_parentDrag=O(Px,{optional:!0,skipSelf:!0});_dragDropRegistry=O(Hx);_destroyed=new ee;_handles=new Or([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(n){this._disabled=n,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new Je;released=new Je;ended=new Je;entered=new Je;exited=new Je;dropped=new Je;moved=new nt(n=>{let r=this._dragRef.moved.pipe(hr(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(n);return()=>{r.unsubscribe()}});_injector=O(gt);constructor(){let n=this.dropContainer,r=O(uU,{optional:!0}),i=O(cU);this._dragRef=i.createDrag(this.element,{dragStartThreshold:r&&r.dragStartThreshold!=null?r.dragStartThreshold:5,pointerDirectionChangeThreshold:r&&r.pointerDirectionChangeThreshold!=null?r.pointerDirectionChangeThreshold:5,zIndex:r?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),r&&this._assignDefaults(r),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this),n._dropListRef.beforeStarted.pipe(mr(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(n){this._dragRef.setFreeDragPosition(n)}ngAfterViewInit(){ei(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(n){let r=n.rootElementSelector,i=n.freeDragPosition;r&&!r.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(n){let r=this._handles.getValue();r.push(n),this._handles.next(r)}_removeHandle(n){let r=this._handles.getValue(),i=r.indexOf(n);i>-1&&(r.splice(i,1),this._handles.next(r))}_setPreviewTemplate(n){this._previewTemplate=n}_resetPreviewTemplate(n){n===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(n){this._placeholderTemplate=n}_resetPlaceholderTemplate(n){n===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let n=this.element.nativeElement,r=n;this.rootElementSelector&&(r=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(r||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):Xn(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let r=this._dir,i=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;n.disabled=this.disabled,n.lockAxis=this.lockAxis,n.scale=this.scale,n.dragStartDelay=typeof i=="object"&&i?i:pE(i),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),r&&n.withDirection(r.value)}}),n.beforeStarted.pipe(lm(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let r=this.element.nativeElement.parentElement;for(;r;){let i=this._dragDropRegistry.getDragDirectiveForNode(r);if(i){n.withParent(i._dragRef);break}r=r.parentElement}})}_handleEvents(n){n.started.subscribe(r=>{this.started.emit({source:this,event:r.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(r=>{this.released.emit({source:this,event:r.event})}),n.ended.subscribe(r=>{this.ended.emit({source:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(r=>{this.entered.emit({container:r.container.data,item:this,currentIndex:r.currentIndex})}),n.exited.subscribe(r=>{this.exited.emit({container:r.container.data,item:this})}),n.dropped.subscribe(r=>{this.dropped.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,previousContainer:r.previousContainer.data,container:r.container.data,isPointerOverContainer:r.isPointerOverContainer,item:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event})})}_assignDefaults(n){let{lockAxis:r,dragStartDelay:i,constrainPosition:s,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:c,previewContainer:h}=n;this.disabled=l??!1,this.dragStartDelay=i||0,r&&(this.lockAxis=r),s&&(this.constrainPosition=s),o&&(this.previewClass=o),a&&(this.boundaryElement=a),c&&(this.rootElementSelector=c),h&&(this.previewContainer=h)}_setupHandlesListener(){this._handles.pipe(dm(n=>{let r=n.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),ta(n=>ao(...n.map(r=>r._stateChanges.pipe(Ai(r))))),mr(this._destroyed)).subscribe(n=>{let r=this._dragRef,i=n.element.nativeElement;n.disabled?r.disableHandle(i):r.enableHandle(i)})}static \u0275fac=function(n){return new(n||e)};static \u0275dir=jr({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,r){n&2&&vo("cdk-drag-disabled",r.disabled)("cdk-drag-dragging",r._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",Da],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",xy]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[jd([{provide:Px,useExisting:e}]),rs]})}return e})(),fU=e=>({"lc:cursor-grab":e}),$x=(e,t)=>t.url;function pU(e,t){if(e&1&&Ne(0,"source",11),e&2){let n=t.$implicit;qn("type",n.mimeType),zi("media","(max-width: ",n.width,"px)"),Ve("src",n.url,an)}}function hU(e,t){if(e&1&&Ne(0,"source",12),e&2){let n=t.$implicit;qn("type",n.mimeType),Ve("src",n.url,an)}}var Ih=class qy{constructor(t){this.elementRef=t}video;closeClicked=new Je;videoClicked=new Je;isDragging=!1;VideoUtils=ko;ngOnInit(){let t=this.elementRef.nativeElement.parentElement.parentElement;t.style.zIndex="2147483647"}close(){this.closeClicked.emit()}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.videoClicked.emit()}static \u0275fac=function(t){return new(t||qy)(kt(yt))};static \u0275cmp=st({type:qy,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:16,vars:5,consts:[["role","button","tabindex","0","cdkDrag","",1,"lc-popup-inner","lc:shadow-2xl","lc:rounded-lg","lc:flex","lc:justify-center","lc:items-center",3,"click","keyup","cdkDragMoved","ngClass","cdkDragBoundary"],[1,"lc-close-button","lc:absolute","lc:-top-3.5","lc:-right-3.5","lc:bg-black/50","lc:rounded-full","lc:w-8","lc:h-8","lc:border-none","lc:z-10","lc:flex","lc:justify-center","lc:items-center",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","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 12 19 6.41z"],[1,"lc-play-button"],[1,"lc-icon"],["viewBox","0 0 28.31 30"],["d","M19.15,1.29A1.24,1.24,0,0,0,17.82.15a1.36,1.36,0,0,0-.35.07,3.2,3.2,0,0,0-.65.46l-5.06,4.6a1.24,1.24,0,0,0,0,1.75l0,0a1.22,1.22,0,0,0,.89.39,1.25,1.25,0,0,0,.85-.32l3-2.78.17-.13v8l2.44,2.62ZM26.79,26.6l-7.64-7.93-2.5-2.58-6-6.34L8.9,8,5.23,4.15a1.17,1.17,0,0,0-1.66,0h0a1.18,1.18,0,0,0,0,1.66h0L6.1,8.47H3.32a2.94,2.94,0,0,0-2.45,3v7.16a3,3,0,0,0,2.86,3.08H8.07a.44.44,0,0,1,.33.13C9.7,23,11,24.19,12.26,25.36L17,29.7a1.24,1.24,0,0,0,2.17-1V22.21l5.95,6.15a1.2,1.2,0,0,0,1.67,0,1.17,1.17,0,0,0,.08-1.66Zm-10.14-.67-.18-.11L9.75,19.67a1.72,1.72,0,0,0-1.16-.45H4c-.48,0-.59-.11-.59-.61V11.55c0-.49,0-.6.59-.6H8.29l8.29,8.55ZM29.09,15.07A9.9,9.9,0,0,1,26.33,22l-.11.13a1.24,1.24,0,0,1-2-.28,1.29,1.29,0,0,1,.24-1.52h0a6.77,6.77,0,0,0,1.32-1.89,7.41,7.41,0,0,0-1.37-8.55,1.24,1.24,0,0,1-.08-1.75,1.33,1.33,0,0,1,.41-.29,1.19,1.19,0,0,1,1.34.2A8.88,8.88,0,0,1,28,10.36a10,10,0,0,1,1.17,4.17A3.35,3.35,0,0,1,29.09,15.07Z","transform","translate(-0.86 -0.14)","fill","#191919"],[1,"lc-text"],["loop","","preload","auto","playsinline","","autoplay","",1,"lc:rounded-lg","lc:w-full",3,"muted"],[3,"src","type","media"],[3,"src","type"]],template:function(t,n){t&1&&(Z(0,"div",0),wt("click",function(){return n.onVideoClick()})("keyup",function(){return n.onVideoClick()})("cdkDragMoved",function(){return n.isDragging=!0}),Z(1,"button",1),wt("click",function(r){return r.stopPropagation(),n.close()}),_r(),Z(2,"svg",2),Ne(3,"path",3)(4,"path",4),X()(),is(),Z(5,"div",5)(6,"div",6),_r(),Z(7,"svg",7),Ne(8,"path",8),X()(),is(),Z(9,"div",9),bt(10,"Tap to unmute"),X()(),Z(11,"video",10),en(12,pU,1,4,"source",11,$x),en(14,hU,1,2,"source",12,$x),X()()),t&2&&(Ve("ngClass",eS(3,fU,n.isDragging))("cdkDragBoundary","body"),q(11),Ve("muted",!0),q(),tn(n.video.sources),q(2),tn(n.VideoUtils.getBestSources(n.video.sources)))},dependencies:[vS,jx],styles:["[_nghost-%COMP%]{position:fixed;display:block;right:24px;bottom:24px;max-width:150px}.lc-play-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);transition:all .1s ease-in-out;z-index:999;flex-wrap:wrap;width:100%;max-width:130px;border-radius:5px;padding:5px 10px;background-color:#97979761;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.lc-play-button[_ngcontent-%COMP%] .lc-icon[_ngcontent-%COMP%]{width:14px;height:14px}.lc-play-button[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#fff}.lc-play-button[_ngcontent-%COMP%] .lc-text[_ngcontent-%COMP%]{font-size:11px;line-height:1;color:#fff;font-weight:400;margin-left:5px;text-align:center}"]})},su=class{_attachedHost;attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},Sc=class extends su{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(e,t,n,r,i){super(),this.component=e,this.viewContainerRef=t,this.injector=n,this.projectableNodes=i}},Dc=class extends su{templateRef;viewContainerRef;context;injector;constructor(e,t,n,r){super(),this.templateRef=e,this.viewContainerRef=t,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(e,t=this.context){return this.context=t,super.attach(e)}detach(){return this.context=void 0,super.detach()}},TE=class extends su{element;constructor(e){super(),this.element=e instanceof yt?e.nativeElement:e}},Ic=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof Sc)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof Dc)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof TE)return this._attachedPortal=e,this.attachDomPortal(e)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},Th=class extends Ic{outletElement;_appRef;_defaultInjector;_document;constructor(e,t,n,r,i){super(),this.outletElement=e,this._appRef=n,this._defaultInjector=r,this._document=i}attachComponentPortal(e){let t;if(e.viewContainerRef){let n=e.injector||e.viewContainerRef.injector,r=n.get(Ui,null,{optional:!0})||void 0;t=e.viewContainerRef.createComponent(e.component,{index:e.viewContainerRef.length,injector:n,ngModuleRef:r,projectableNodes:e.projectableNodes||void 0}),this.setDisposeFn(()=>t.destroy())}else{let n=this._appRef,r=e.injector||this._defaultInjector||gt.NULL,i=r.get(zn,n.injector);t=$d(e.component,{elementInjector:r,environmentInjector:i,projectableNodes:e.projectableNodes||void 0}),n.attachView(t.hostView),this.setDisposeFn(()=>{n.viewCount>0&&n.detachView(t.hostView),t.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(t)),this._attachedPortal=e,t}attachTemplatePortal(e){let t=e.viewContainerRef,n=t.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(n);r!==-1&&t.remove(r)}),this._attachedPortal=e,n}attachDomPortal=e=>{let t=e.element;t.parentNode;let n=this._document.createComment("dom-portal");t.parentNode.insertBefore(n,t),this.outletElement.appendChild(t),this._attachedPortal=e,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(t,n)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}},xE=(()=>{class e extends Ic{_moduleRef=O(Ui,{optional:!0});_document=O(Qe);_viewContainerRef=O(Hr);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}attached=new Je;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,i=r.createComponent(n.component,{index:r.length,injector:n.injector||r.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=n=>{let r=n.element;r.parentNode;let i=this._document.createComment("dom-portal");n.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}static \u0275fac=function(n){return new(n||e)};static \u0275dir=jr({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[wr]})}return e})(),au;function mU(){if(au==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>au=!0}))}finally{au=au||!1}return au}function Wx(e){return mU()?e:!!e.capture}var gU=new he("cdk-input-modality-detector-options"),yU={ignoreKeys:[18,17,224,91,16]},Gx=650,RE={passive:!0,capture:!0},vU=(()=>{class e{_platform=O(Jn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Or(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Zn(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<Gx||(this._modality.next(vh(n)?"keyboard":"mouse"),this._mostRecentTarget=Zn(n))};_onTouchstart=n=>{if(_h(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Zn(n)};constructor(){let n=O(Fe),r=O(Qe),i=O(gU,{optional:!0});if(this._options=w(w({},yU),i),this.modalityDetected=this._modality.pipe(um(1)),this.modalityChanged=this.modalityDetected.pipe(Uu()),this._platform.isBrowser){let s=O(hn).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[Tn(s,r,"keydown",this._onKeydown,RE),Tn(s,r,"mousedown",this._onMousedown,RE),Tn(s,r,"touchstart",this._onTouchstart,RE)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Rh=function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e}(Rh||{}),_U=new he("cdk-focus-monitor-default-options"),xh=Wx({passive:!0,capture:!0}),zx=(()=>{class e{_ngZone=O(Fe);_platform=O(Jn);_inputModalityDetector=O(vU);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=O(Qe,{optional:!0});_stopInputModalityDetector=new ee;constructor(){let n=O(_U,{optional:!0});this._detectionMode=n?.detectionMode||Rh.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=Zn(n);for(let i=r;i;i=i.parentElement)n.type==="focus"?this._onFocus(n,i):this._onBlur(n,i)};monitor(n,r=!1){let i=Xn(n);if(!this._platform.isBrowser||i.nodeType!==1)return $o();let s=bc(i)||this._getDocument(),o=this._elementInfo.get(i);if(o)return r&&(o.checkChildren=!0),o.subject;let a={checkChildren:r,subject:new ee,rootNode:s};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(n){let r=Xn(n),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(n,r,i){let s=Xn(n),o=this._getDocument().activeElement;s===o?this._getClosestElementsInfo(s).forEach(([a,l])=>this._originChanged(a,r,l)):(this._setOrigin(r),typeof s.focus=="function"&&s.focus(i))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===Rh.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===Rh.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?Gx:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),s=Zn(n);!i||!i.checkChildren&&r!==s||this._originChanged(r,this._getFocusOrigin(s),i)}_onBlur(n,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,xh),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,xh)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(mr(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,xh),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,xh),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,i){this._setClasses(n,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((i,s)=>{(s===n||i.checkChildren&&s.contains(n))&&r.push([s,i])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let s=n.labels;if(s){for(let o=0;o<s.length;o++)if(s[o].contains(r))return!0}return!1}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),qx=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=st({type:e,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,r){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
|
|
77
|
-
`],encapsulation:2,changeDetection:0})}return e})(),AE=(()=>{class e{_platform=O(Jn);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return wU(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=EU(RU(n));if(r&&(Yx(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),s=Yx(n);return n.hasAttribute("contenteditable")?s!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!TU(n)?!1:i==="audio"?n.hasAttribute("controls")?s!==-1:!1:i==="video"?s===-1?!1:s!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return xU(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function EU(e){try{return e.frameElement}catch{return null}}function wU(e){return!!(e.offsetWidth||e.offsetHeight||typeof e.getClientRects=="function"&&e.getClientRects().length)}function bU(e){let t=e.nodeName.toLowerCase();return t==="input"||t==="select"||t==="button"||t==="textarea"}function CU(e){return DU(e)&&e.type=="hidden"}function SU(e){return IU(e)&&e.hasAttribute("href")}function DU(e){return e.nodeName.toLowerCase()=="input"}function IU(e){return e.nodeName.toLowerCase()=="a"}function Kx(e){if(!e.hasAttribute("tabindex")||e.tabIndex===void 0)return!1;let t=e.getAttribute("tabindex");return!!(t&&!isNaN(parseInt(t,10)))}function Yx(e){if(!Kx(e))return null;let t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function TU(e){let t=e.nodeName.toLowerCase(),n=t==="input"&&e.type;return n==="text"||n==="password"||t==="select"||t==="textarea"}function xU(e){return CU(e)?!1:bU(e)||SU(e)||e.hasAttribute("contenteditable")||Kx(e)}function RU(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}var NE=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_enabled=!0;constructor(e,t,n,r,i=!1,s){this._element=e,this._checker=t,this._ngZone=n,this._document=r,this._injector=s,i||this.attachAnchors()}destroy(){let e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let t=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){let n=this._getFirstTabbableElement(t);return n?.focus(e),!!n}return t.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let t=this._getRegionBoundary("start");return t&&t.focus(e),!!t}focusLastTabbableElement(e){let t=this._getRegionBoundary("end");return t&&t.focus(e),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let n=0;n<t.length;n++){let r=t[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[n]):null;if(r)return r}return null}_getLastTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let n=t.length-1;n>=0;n--){let r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._injector?ei(e,{injector:this._injector}):setTimeout(e)}},Zx=(()=>{class e{_checker=O(AE);_ngZone=O(Fe);_document=O(Qe);_injector=O(gt);constructor(){O(Vs).load(qx)}create(n,r=!1){return new NE(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function ME(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function Yt(e){return e==null?"":typeof e=="string"?e:`${e}px`}function Xx(e,...t){return t.length?t.some(n=>e[n]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}var Jx=Ex(),OE=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(e,t){this._viewportRuler=e,this._document=t}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=Yt(-this._previousScrollPosition.left),e.style.top=Yt(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,t=this._document.body,n=e.style,r=t.style,i=n.scrollBehavior||"",s=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),Jx&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Jx&&(n.scrollBehavior=i,r.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,t=this._viewportRuler.getViewportSize();return e.scrollHeight>t.height||e.scrollWidth>t.width}},PE=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(e,t,n,r){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=n,this._config=r}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(Wo(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}},Nh=class{enable(){}disable(){}attach(){}};function kE(e,t){return t.some(n=>{let r=e.bottom<n.top,i=e.top>n.bottom,s=e.right<n.left,o=e.left>n.right;return r||i||s||o})}function Qx(e,t){return t.some(n=>{let r=e.top<n.top,i=e.bottom>n.bottom,s=e.left<n.left,o=e.right>n.right;return r||i||s||o})}var LE=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(e,t,n,r){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=n,this._config=r}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();kE(t,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},AU=(()=>{class e{_scrollDispatcher=O(mE);_viewportRuler=O(nu);_ngZone=O(Fe);_document=O(Qe);constructor(){}noop=()=>new Nh;close=n=>new PE(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new OE(this._viewportRuler,this._document);reposition=n=>new LE(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),cu=class{positionStrategy;scrollStrategy=new Nh;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(e){if(e){let t=Object.keys(e);for(let n of t)e[n]!==void 0&&(this[n]=e[n])}}},FE=class{connectionPair;scrollableViewProperties;constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}},oR=(()=>{class e{_attachedOverlays=[];_document=O(Qe);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),MU=(()=>{class e extends oR{_ngZone=O(Fe);_renderer=O(hn).createRenderer(null,null);_cleanupKeydown;add(n){super.add(n),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=n=>{let r=this._attachedOverlays;for(let i=r.length-1;i>-1;i--)if(r[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[i]._keydownEvents.next(n));break}};static \u0275fac=(()=>{let n;return function(r){return(n||(n=xd(e)))(r||e)}})();static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),OU=(()=>{class e extends oR{_platform=O(Jn);_ngZone=O(Fe);_renderer=O(hn).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(n){if(super.add(n),!this._isAttached){let r=this._document.body,i={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[Tn(this._renderer,r,"pointerdown",this._pointerDownListener,i),Tn(this._renderer,r,"click",this._clickListener,i),Tn(this._renderer,r,"auxclick",this._clickListener,i),Tn(this._renderer,r,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(n=>n()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=n=>{this._pointerDownEventTarget=Zn(n)};_clickListener=n=>{let r=Zn(n),i=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let s=this._attachedOverlays.slice();for(let o=s.length-1;o>-1;o--){let a=s[o];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(eR(a.overlayElement,r)||eR(a.overlayElement,i))break;let l=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>l.next(n)):l.next(n)}};static \u0275fac=(()=>{let n;return function(r){return(n||(n=xd(e)))(r||e)}})();static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function eR(e,t){let n=typeof ShadowRoot<"u"&&ShadowRoot,r=t;for(;r;){if(r===e)return!0;r=n&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var sR=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275cmp=st({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(n,r){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
|
|
78
|
-
`],encapsulation:2,changeDetection:0})}return e})(),Ah=(()=>{class e{_platform=O(Jn);_containerElement;_document=O(Qe);_styleLoader=O(Vs);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||ME()){let i=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let s=0;s<i.length;s++)i[s].remove()}let r=this._document.createElement("div");r.classList.add(n),ME()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(sR)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),BE=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(e,t,n,r){this._renderer=t,this._ngZone=n,this.element=e.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=t.listen(this.element,"click",r)}detach(){this._ngZone.runOutsideAngular(()=>{let e=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),e.style.pointerEvents="none",e.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},Tc=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new ee;_attachments=new ee;_detachments=new ee;_positionStrategy;_scrollStrategy;_locationChanges=ot.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new ee;_outsidePointerEvents=new ee;_renders=new ee;_afterRenderRef;_afterNextRenderRef;constructor(e,t,n,r,i,s,o,a,l,c=!1,h,d){this._portalOutlet=e,this._host=t,this._pane=n,this._config=r,this._ngZone=i,this._keyboardDispatcher=s,this._document=o,this._location=a,this._outsideClickDispatcher=l,this._animationsDisabled=c,this._injector=h,this._renderer=d,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=Ry(()=>sy(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let t=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=ei(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof t?.onDestroy=="function"&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=w(w({},this._config),e),this._updateElementSize()}setDirection(e){this._config=ne(w({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=Yt(this._config.width),e.height=Yt(this._config.height),e.minWidth=Yt(this._config.minWidth),e.minHeight=Yt(this._config.minHeight),e.maxWidth=Yt(this._config.maxWidth),e.maxHeight=Yt(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new BE(this._document,this._renderer,this._ngZone,t=>{this._backdropClick.next(t)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(e))}):this._backdropRef.element.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(e,t,n){let r=yE(t||[]).filter(i=>!!i);r.length&&(n?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(mr(ao(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e?.disable(),e?.detach?.()}},tR="cdk-overlay-connected-position-bounding-box",PU=/([A-Za-z%]+)$/,VE=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new ee;_resizeSubscription=ot.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(e,t,n,r,i){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=i,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(tR),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,t=this._overlayRect,n=this._viewportRect,r=this._containerRect,i=[],s;for(let o of this._preferredPositions){let a=this._getOriginPoint(e,r,o),l=this._getOverlayPoint(a,t,o),c=this._getOverlayFit(l,t,n,o);if(c.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(o,a);return}if(this._canFitWithFlexibleDimensions(c,l,n)){i.push({position:o,origin:a,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(a,o)});continue}(!s||s.overlayFit.visibleArea<c.visibleArea)&&(s={overlayFit:c,overlayPoint:l,originPoint:a,position:o,overlayRect:t})}if(i.length){let o=null,a=-1;for(let l of i){let c=l.boundingBoxRect.width*l.boundingBoxRect.height*(l.position.weight||1);c>a&&(a=c,o=l)}this._isPushed=!1,this._applyPosition(o.position,o.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&js(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(tR),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,n){let r;if(n.originX=="center")r=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,o=this._isRtl()?e.left:e.right;r=n.originX=="start"?s:o}t.left<0&&(r-=t.left);let i;return n.originY=="center"?i=e.top+e.height/2:i=n.originY=="top"?e.top:e.bottom,t.top<0&&(i-=t.top),{x:r,y:i}}_getOverlayPoint(e,t,n){let r;n.overlayX=="center"?r=-t.width/2:n.overlayX==="start"?r=this._isRtl()?-t.width:0:r=this._isRtl()?0:-t.width;let i;return n.overlayY=="center"?i=-t.height/2:i=n.overlayY=="top"?0:-t.height,{x:e.x+r,y:e.y+i}}_getOverlayFit(e,t,n,r){let i=rR(t),{x:s,y:o}=e,a=this._getOffset(r,"x"),l=this._getOffset(r,"y");a&&(s+=a),l&&(o+=l);let c=0-s,h=s+i.width-n.width,d=0-o,f=o+i.height-n.height,g=this._subtractOverflows(i.width,c,h),m=this._subtractOverflows(i.height,d,f),_=g*m;return{visibleArea:_,isCompletelyWithinViewport:i.width*i.height===_,fitsInViewportVertically:m===i.height,fitsInViewportHorizontally:g==i.width}}_canFitWithFlexibleDimensions(e,t,n){if(this._hasFlexibleDimensions){let r=n.bottom-t.y,i=n.right-t.x,s=nR(this._overlayRef.getConfig().minHeight),o=nR(this._overlayRef.getConfig().minWidth),a=e.fitsInViewportVertically||s!=null&&s<=r,l=e.fitsInViewportHorizontally||o!=null&&o<=i;return a&&l}return!1}_pushOverlayOnScreen(e,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let r=rR(t),i=this._viewportRect,s=Math.max(e.x+r.width-i.width,0),o=Math.max(e.y+r.height-i.height,0),a=Math.max(i.top-n.top-e.y,0),l=Math.max(i.left-n.left-e.x,0),c=0,h=0;return r.width<=i.width?c=l||-s:c=e.x<this._viewportMargin?i.left-n.left-e.x:0,r.height<=i.height?h=a||-o:h=e.y<this._viewportMargin?i.top-n.top-e.y:0,this._previousPushAmount={x:c,y:h},{x:e.x+c,y:e.y+h}}_applyPosition(e,t){if(this._setTransformOrigin(e),this._setOverlayElementStyles(t,e),this._setBoundingBoxStyles(t,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let n=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!kU(this._lastScrollVisibility,n)){let r=new FE(e,n);this._positionChanges.next(r)}this._lastScrollVisibility=n}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let t=this._boundingBox.querySelectorAll(this._transformOriginSelector),n,r=e.overlayY;e.overlayX==="center"?n="center":this._isRtl()?n=e.overlayX==="start"?"right":"left":n=e.overlayX==="start"?"left":"right";for(let i=0;i<t.length;i++)t[i].style.transformOrigin=`${n} ${r}`}_calculateBoundingBoxRect(e,t){let n=this._viewportRect,r=this._isRtl(),i,s,o;if(t.overlayY==="top")s=e.y,i=n.height-s+this._viewportMargin;else if(t.overlayY==="bottom")o=n.height-e.y+this._viewportMargin*2,i=n.height-o+this._viewportMargin;else{let f=Math.min(n.bottom-e.y+n.top,e.y),g=this._lastBoundingBoxSize.height;i=f*2,s=e.y-f,i>g&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-g/2)}let a=t.overlayX==="start"&&!r||t.overlayX==="end"&&r,l=t.overlayX==="end"&&!r||t.overlayX==="start"&&r,c,h,d;if(l)d=n.width-e.x+this._viewportMargin*2,c=e.x-this._viewportMargin;else if(a)h=e.x,c=n.right-e.x;else{let f=Math.min(n.right-e.x+n.left,e.x),g=this._lastBoundingBoxSize.width;c=f*2,h=e.x-f,c>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=e.x-g/2)}return{top:s,left:h,bottom:o,right:d,width:c,height:i}}_setBoundingBoxStyles(e,t){let n=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let i=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=Yt(n.height),r.top=Yt(n.top),r.bottom=Yt(n.bottom),r.width=Yt(n.width),r.left=Yt(n.left),r.right=Yt(n.right),t.overlayX==="center"?r.alignItems="center":r.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?r.justifyContent="center":r.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",i&&(r.maxHeight=Yt(i)),s&&(r.maxWidth=Yt(s))}this._lastBoundingBoxSize=n,js(this._boundingBox.style,r)}_resetBoundingBoxStyles(){js(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){js(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let n={},r=this._hasExactPosition(),i=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){let c=this._viewportRuler.getViewportScrollPosition();js(n,this._getExactOverlayY(t,e,c)),js(n,this._getExactOverlayX(t,e,c))}else n.position="static";let o="",a=this._getOffset(t,"x"),l=this._getOffset(t,"y");a&&(o+=`translateX(${a}px) `),l&&(o+=`translateY(${l}px)`),n.transform=o.trim(),s.maxHeight&&(r?n.maxHeight=Yt(s.maxHeight):i&&(n.maxHeight="")),s.maxWidth&&(r?n.maxWidth=Yt(s.maxWidth):i&&(n.maxWidth="")),js(this._pane.style,n)}_getExactOverlayY(e,t,n){let r={top:"",bottom:""},i=this._getOverlayPoint(t,this._overlayRect,e);if(this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;r.bottom=`${s-(i.y+this._overlayRect.height)}px`}else r.top=Yt(i.y);return r}_getExactOverlayX(e,t,n){let r={left:"",right:""},i=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let o=this._document.documentElement.clientWidth;r.right=`${o-(i.x+this._overlayRect.width)}px`}else r.left=Yt(i.x);return r}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Qx(e,n),isOriginOutsideView:kE(e,n),isOverlayClipped:Qx(t,n),isOverlayOutsideView:kE(t,n)}}_subtractOverflows(e,...t){return t.reduce((n,r)=>n-Math.max(r,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+e-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return t==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&yE(e).forEach(t=>{t!==""&&this._appliedPanelClasses.indexOf(t)===-1&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof yt)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let t=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+t,height:n,width:t}}};function js(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function nR(e){if(typeof e!="number"&&e!=null){let[t,n]=e.split(PU);return!n||n==="px"?parseFloat(t):null}return e||null}function rR(e){return{top:Math.floor(e.top),right:Math.floor(e.right),bottom:Math.floor(e.bottom),left:Math.floor(e.left),width:Math.floor(e.width),height:Math.floor(e.height)}}function kU(e,t){return e===t?!0:e.isOriginClipped===t.isOriginClipped&&e.isOriginOutsideView===t.isOriginOutsideView&&e.isOverlayClipped===t.isOverlayClipped&&e.isOverlayOutsideView===t.isOverlayOutsideView}var iR="cdk-global-overlay-wrapper",UE=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(e){let t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(iR),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:i,maxWidth:s,maxHeight:o}=n,a=(r==="100%"||r==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(i==="100%"||i==="100vh")&&(!o||o==="100%"||o==="100vh"),c=this._xPosition,h=this._xOffset,d=this._overlayRef.getConfig().direction==="rtl",f="",g="",m="";a?m="flex-start":c==="center"?(m="center",d?g=h:f=h):d?c==="left"||c==="end"?(m="flex-end",f=h):(c==="right"||c==="start")&&(m="flex-start",g=h):c==="left"||c==="start"?(m="flex-start",f=h):(c==="right"||c==="end")&&(m="flex-end",g=h),e.position=this._cssPosition,e.marginLeft=a?"0":f,e.marginTop=l?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=a?"0":g,t.justifyContent=m,t.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(iR),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},LU=(()=>{class e{_viewportRuler=O(nu);_document=O(Qe);_platform=O(Jn);_overlayContainer=O(Ah);constructor(){}global(){return new UE}flexibleConnectedTo(n){return new VE(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),HE=(()=>{class e{scrollStrategies=O(AU);_overlayContainer=O(Ah);_positionBuilder=O(LU);_keyboardDispatcher=O(MU);_injector=O(gt);_ngZone=O(Fe);_document=O(Qe);_directionality=O(Us);_location=O(Ly);_outsideClickDispatcher=O(OU);_animationsModuleType=O(zC,{optional:!0});_idGenerator=O(wh);_renderer=O(hn).createRenderer(null,null);_appRef;_styleLoader=O(Vs);constructor(){}create(n){this._styleLoader.load(sR);let r=this._createHostElement(),i=this._createPaneElement(r),s=this._createPortalOutlet(i),o=new cu(n);return o.direction=o.direction||this._directionality.value,new Tc(s,r,i,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(zn),this._renderer)}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=this._idGenerator.getId("cdk-overlay-"),r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(vr)),new Th(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function FU(e,t){}var xc=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext},BU=(()=>{class e extends Ic{_elementRef=O(yt);_focusTrapFactory=O(Zx);_config;_interactivityChecker=O(AE);_ngZone=O(Fe);_overlayRef=O(Tc);_focusMonitor=O(zx);_renderer=O(va);_platform=O(Jn);_document=O(Qe,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=O(ir);_injector=O(gt);_isDestroyed=!1;constructor(){super(),this._config=O(xc,{optional:!0})||new xc,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}attachDomPortal=n=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(n);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{s(),o(),n.removeAttribute("tabindex")},s=this._renderer.listen(n,"blur",i),o=this._renderer.listen(n,"mousedown",i)})),n.focus(r)}_focusByCssSelector(n,r){let i=this._elementRef.nativeElement.querySelector(n);i&&this._forceFocus(i,r)}_trapFocus(n){this._isDestroyed||ei(()=>{let r=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||r.focus(n);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(n)||this._focusDialogContainer(n);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',n);break;default:this._focusByCssSelector(this._config.autoFocus,n);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let i=yh(),s=this._elementRef.nativeElement;(!i||i===this._document.body||i===s||s.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(n){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(n)}_containsFocus(){let n=this._elementRef.nativeElement,r=yh();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=yh()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=st({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(n&1&&wa(xE,7),n&2){let i;ba(i=Ca())&&(r._portalOutlet=i.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){n&2&&Ea("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},features:[wr],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){n&1&&pt(0,FU,0,0,"ng-template",0)},dependencies:[xE],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
79
|
-
`],encapsulation:2})}return e})(),$s=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new ee;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(e,t){this.overlayRef=e,this.config=t,this.disableClose=t.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(n=>{n.keyCode===27&&!this.disableClose&&!Xx(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{t.closeOnOverlayDetachments!==!1&&this.close()})}close(e,t){if(this.containerInstance){let n=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(e),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",t=""){return this.overlayRef.updateSize({width:e,height:t}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},VU=new he("DialogScrollStrategy",{providedIn:"root",factory:()=>{let e=O(HE);return()=>e.scrollStrategies.block()}}),$E=new he("DialogData"),UU=new he("DefaultDialogConfig"),aR=(()=>{class e{_overlay=O(HE);_injector=O(gt);_defaultOptions=O(UU,{optional:!0});_parentDialog=O(e,{optional:!0,skipSelf:!0});_overlayContainer=O(Ah);_idGenerator=O(wh);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new ee;_afterOpenedAtThisLevel=new ee;_ariaHiddenElements=new Map;_scrollStrategy=O(VU);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=am(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ai(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new xc;r=w(w({},i),r),r.id=r.id||this._idGenerator.getId("cdk-dialog-"),r.id&&this.getDialogById(r.id);let s=this._getOverlayConfig(r),o=this._overlay.create(s),a=new $s(o,r),l=this._attachContainer(o,a,r);return a.containerInstance=l,this._attachDialogContent(n,a,l,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){jE(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){jE(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),jE(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new cu({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(r.backdropClass=n.backdropClass),r}_attachContainer(n,r,i){let s=i.injector||i.viewContainerRef?.injector,o=[{provide:xc,useValue:i},{provide:$s,useValue:r},{provide:Tc,useValue:n}],a;i.container?typeof i.container=="function"?a=i.container:(a=i.container.type,o.push(...i.container.providers(i))):a=BU;let l=new Sc(a,i.viewContainerRef,gt.create({parent:s||this._injector,providers:o}));return n.attach(l).instance}_attachDialogContent(n,r,i,s){if(n instanceof Br){let o=this._createInjector(s,r,i,void 0),a={$implicit:s.data,dialogRef:r};s.templateContext&&(a=w(w({},a),typeof s.templateContext=="function"?s.templateContext():s.templateContext)),i.attachTemplatePortal(new Dc(n,null,a,o))}else{let o=this._createInjector(s,r,i,this._injector),a=i.attachComponentPortal(new Sc(n,s.viewContainerRef,o));r.componentRef=a,r.componentInstance=a.instance}}_createInjector(n,r,i,s){let o=n.injector||n.viewContainerRef?.injector,a=[{provide:$E,useValue:n.data},{provide:$s,useValue:r}];return n.providers&&(typeof n.providers=="function"?a.push(...n.providers(r,n,i)):a.push(...n.providers)),n.direction&&(!o||!o.get(Us,null,{optional:!0}))&&a.push({provide:Us,useValue:{value:n.direction,change:$o()}}),gt.create({parent:o||s,providers:a})}_removeOpenDialog(n,r){let i=this.openDialogs.indexOf(n);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,o)=>{s?o.setAttribute("aria-hidden",s):o.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let r=n.parentElement.children;for(let i=r.length-1;i>-1;i--){let s=r[i];s!==n&&s.nodeName!=="SCRIPT"&&s.nodeName!=="STYLE"&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ie({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function jE(e,t){let n=e.length;for(;n--;)t(e[n])}var HU=kg;function jU(e){return!!e[HU]}var $U=Symbol("__destroy"),fR=Symbol("__decoratorApplied");function pR(e){return typeof e=="string"?Symbol(`__destroy__${e}`):$U}function WU(e){e.prototype[fR]=!0}function hR(e,t){e[t]||(e[t]=new ee)}function mR(e,t){e[t]&&(e[t].next(),e[t].complete(),e[t]=null)}function gR(e){e instanceof ot&&e.unsubscribe()}function GU(e){Array.isArray(e)&&e.forEach(gR)}function yR(e,t){return function(){if(e&&e.call(this),mR(this,pR()),t.arrayName&&GU(this[t.arrayName]),t.checkProperties)for(let n in this)t.blackList?.includes(n)||gR(this[n])}}function zU(e,t){e.prototype.ngOnDestroy=yR(e.prototype.ngOnDestroy,t)}function qU(e,t){let n=e.\u0275pipe;n.onDestroy=yR(n.onDestroy,t)}function vR(e={}){return t=>{jU(t)?qU(t,e):zU(t,e),WU(t)}}var lR=7,uR=Symbol("CheckerHasBeenSet");function YU(e,t){e[uR]||KU()||(dR(()=>xi(Promise.resolve()).pipe(Ri(()=>{let n;try{n=VC(e)}catch{n=null}let r=n?.lView;if(r==null)return Ho;let i=r[lR]||(r[lR]=[]),s=new ee;return i.push(function(){dR(()=>{s.next(),s.complete()})}),s}),Ri(()=>Promise.resolve())).subscribe(()=>{(t.observed??t.observers.length>0)&&console.warn(ZU(e))})),e[uR]=!0)}function KU(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"}function dR(e){let t=zo.Zone;return t&&typeof t.root?.run=="function"?t.root.run(e):e()}function ZU(e){return`
|
|
80
|
-
The ${e.constructor.name} still has subscriptions that haven't been unsubscribed.
|
|
1
|
+
"use strict";(()=>{var y0=Object.create,zs=Object.defineProperty,_0=Object.defineProperties,Pp=Object.getOwnPropertyDescriptor,b0=Object.getOwnPropertyDescriptors,w0=Object.getOwnPropertyNames,Gh=Object.getOwnPropertySymbols,E0=Object.getPrototypeOf,Lp=Object.prototype.hasOwnProperty,x0=Object.prototype.propertyIsEnumerable,Dl=(t,e,n)=>e in t?zs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,L=(t,e)=>{for(var n in e||={})Lp.call(e,n)&&Dl(t,n,e[n]);if(Gh)for(var n of Gh(e))x0.call(e,n)&&Dl(t,n,e[n]);return t},Qt=(t,e)=>_0(t,b0(e)),Po=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),yn=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),S0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of w0(e))!Lp.call(t,i)&&i!==n&&zs(t,i,{get:()=>e[i],enumerable:!(r=Pp(e,i))||r.enumerable});return t},an=(t,e,n)=>(n=t!=null?y0(E0(t)):{},S0(e||!t||!t.__esModule?zs(n,"default",{value:t,enumerable:!0}):n,t)),I0=(t,e,n,r)=>{for(var i=r>1?void 0:r?Pp(e,n):e,o=t.length-1,s;o>=0;o--)(s=t[o])&&(i=(r?s(e,n,i):s(i))||i);return r&&i&&zs(e,n,i),i},Zh=(t,e,n)=>Dl(t,typeof e!="symbol"?e+"":e,n),C0=yn((t,e)=>{"use strict";(function(n){"use strict";var r={};r.VERSION="1.6.1";var i,o={},s=function(f,p){return function(){return p.apply(f,arguments)}},a=function(){var f=arguments,p=f[0],g,m;for(m=1;m<f.length;m++)for(g in f[m])!(g in p)&&f[m].hasOwnProperty(g)&&(p[g]=f[m][g]);return p},l=function(f,p){return{value:f,name:p}};r.TRACE=l(1,"TRACE"),r.DEBUG=l(2,"DEBUG"),r.INFO=l(3,"INFO"),r.TIME=l(4,"TIME"),r.WARN=l(5,"WARN"),r.ERROR=l(8,"ERROR"),r.OFF=l(99,"OFF");var u=function(f){this.context=f,this.setLevel(f.filterLevel),this.log=this.info};u.prototype={setLevel:function(f){f&&"value"in f&&(this.context.filterLevel=f)},getLevel:function(){return this.context.filterLevel},enabledFor:function(f){var p=this.context.filterLevel;return f.value>=p.value},trace:function(){this.invoke(r.TRACE,arguments)},debug:function(){this.invoke(r.DEBUG,arguments)},info:function(){this.invoke(r.INFO,arguments)},warn:function(){this.invoke(r.WARN,arguments)},error:function(){this.invoke(r.ERROR,arguments)},time:function(f){typeof f=="string"&&f.length>0&&this.invoke(r.TIME,[f,"start"])},timeEnd:function(f){typeof f=="string"&&f.length>0&&this.invoke(r.TIME,[f,"end"])},invoke:function(f,p){i&&this.enabledFor(f)&&i(p,a({level:f},this.context))}};var d=new u({filterLevel:r.OFF});(function(){var f=r;f.enabledFor=s(d,d.enabledFor),f.trace=s(d,d.trace),f.debug=s(d,d.debug),f.time=s(d,d.time),f.timeEnd=s(d,d.timeEnd),f.info=s(d,d.info),f.warn=s(d,d.warn),f.error=s(d,d.error),f.log=f.info})(),r.setHandler=function(f){i=f},r.setLevel=function(f){d.setLevel(f);for(var p in o)o.hasOwnProperty(p)&&o[p].setLevel(f)},r.getLevel=function(){return d.getLevel()},r.get=function(f){return o[f]||(o[f]=new u(a({name:f},d.context)))},r.createDefaultHandler=function(f){f=f||{},f.formatter=f.formatter||function(m,b){b.name&&m.unshift("["+b.name+"]")};var p={},g=function(m,b){Function.prototype.apply.call(m,console,b)};return typeof console>"u"?function(){}:function(m,b){m=Array.prototype.slice.call(m);var I=console.log,A;b.level===r.TIME?(A=(b.name?"["+b.name+"] ":"")+m[0],m[1]==="start"?console.time?console.time(A):p[A]=new Date().getTime():console.timeEnd?console.timeEnd(A):g(I,[A+": "+(new Date().getTime()-p[A])+"ms"])):(b.level===r.WARN&&console.warn?I=console.warn:b.level===r.ERROR&&console.error?I=console.error:b.level===r.INFO&&console.info?I=console.info:b.level===r.DEBUG&&console.debug?I=console.debug:b.level===r.TRACE&&console.trace&&(I=console.trace),f.formatter(m,b),g(I,m))}},r.useDefaults=function(f){r.setLevel(f&&f.defaultLevel||r.DEBUG),r.setHandler(r.createDefaultHandler(f))},r.setDefaults=r.useDefaults,typeof define=="function"&&define.amd?define(r):typeof e<"u"&&e.exports?e.exports=r:(r._prevLogger=n.Logger,r.noConflict=function(){return n.Logger=r._prevLogger,r},n.Logger=r)})(t)}),ho=yn(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MilestoneRewardType=t.ProgressBarLayout=t.EngagementContentSource=t.EngagementObjective=t.OnsiteDeliveryType=t.ClickActionType=t.FrequencyGapUnit=t.FrequencyType=t.RedirectBehaviour=t.EngagementPlacementPosition=t.EngagementCollectionSource=t.PromotionType=t.CartFilterEnum=t.CartCurrencyOperator=t.CartCriteria=t.URLCriteria=t.UTMCriteria=t.CartItemSource=t.EngagementItemSource=t.PurchasedVisitor=t.LoggedInVisitor=t.SessionType=t.EngagementContentType=t.TriggerType=t.EngagementType=t.EngagementStatus=t.TimePreference=t.ScheduleFrequency=t.CriteriaFrequency=void 0;var e=function(_){return _[_.ONCE_PER_USER=1]="ONCE_PER_USER",_[_.ONCE_PER_SESSION=2]="ONCE_PER_SESSION",_[_.EVERY_TIME=3]="EVERY_TIME",_}(e||(t.CriteriaFrequency=e={})),n=function(_){return _[_.ONE_TIME=1]="ONE_TIME",_[_.MULTIPLE=2]="MULTIPLE",_[_.RECURRING=3]="RECURRING",_}(n||(t.ScheduleFrequency=n={})),r=function(_){return _[_.NOW=1]="NOW",_[_.LATER=2]="LATER",_[_.NEVER=3]="NEVER",_}(r||(t.TimePreference=r={})),i=function(_){return _[_.PUBLISHED=1]="PUBLISHED",_[_.DRAFT=2]="DRAFT",_[_.PAUSED=3]="PAUSED",_[_.STOPPED=5]="STOPPED",_[_.COMPLETED=6]="COMPLETED",_[_.UNINSTALLED=8]="UNINSTALLED",_}(i||(t.EngagementStatus=i={})),o=function(_){return _.CAMPAIGN="CAMPAIGN",_.NATIVE_AB="NATIVE_AB",_.CRO_COPILOT="CRO_COPILOT",_}(o||(t.EngagementType=o={})),s=function(_){return _[_.NONE=0]="NONE",_[_.RULE_BASED=1]="RULE_BASED",_[_.INTENT_BASED=2]="INTENT_BASED",_}(s||(t.TriggerType=s={})),a=function(_){return _[_.SINGLE=1]="SINGLE",_[_.EXCLUSION=2]="EXCLUSION",_[_.ABTESTING=3]="ABTESTING",_}(a||(t.EngagementContentType=a={})),l=function(_){return _[_.ALL=0]="ALL",_[_.NEW_ONLY=1]="NEW_ONLY",_[_.RETURNING_ONLY=2]="RETURNING_ONLY",_}(l||(t.SessionType=l={})),u=function(_){return _.ALL="ALL",_.LOGGED_IN="LOGGED_IN",_.NON_LOGGED_IN="NON_LOGGED_IN",_}(u||(t.LoggedInVisitor=u={})),d=function(_){return _.ALL="ALL",_.PURCHASED="PURCHASED",_.NON_PURCHASED="NON_PURCHASED",_}(d||(t.PurchasedVisitor=d={})),f=function(_){return _[_.NONE=0]="NONE",_[_.ITEM_RECOMMENDATION=1]="ITEM_RECOMMENDATION",_[_.MULTIPLE_ITEMS=2]="MULTIPLE_ITEMS",_[_.SINGLE_ITEM=3]="SINGLE_ITEM",_[_.TOP_SELLING=4]="TOP_SELLING",_[_.STOCK_CLEARANCE=5]="STOCK_CLEARANCE",_[_.NEW_ARRIVALS=6]="NEW_ARRIVALS",_[_.RECENTLY_VIEWED=7]="RECENTLY_VIEWED",_[_.EVENT_ITEM=8]="EVENT_ITEM",_[_.CART_ITEM=9]="CART_ITEM",_[_.BUNDLE=10]="BUNDLE",_[_.CURRENT_ITEM=11]="CURRENT_ITEM",_[_.PURCHASED_PREVIOUSLY=12]="PURCHASED_PREVIOUSLY",_[_.COLLECTION_ITEMS=13]="COLLECTION_ITEMS",_[_.TRENDING_ITEMS=14]="TRENDING_ITEMS",_}(f||(t.EngagementItemSource=f={})),p=function(_){return _[_.LAST_ADDED=1]="LAST_ADDED",_[_.FIRST_ADDED=2]="FIRST_ADDED",_[_.HIGHEST_PRICE=3]="HIGHEST_PRICE",_[_.LOWEST_PRICE=4]="LOWEST_PRICE",_[_.FIRST_MATCHING_TAG=5]="FIRST_MATCHING_TAG",_[_.ALL=6]="ALL",_}(p||(t.CartItemSource=p={})),g=function(_){return _[_.ALL=0]="ALL",_[_.ONLY_ORGANIC=1]="ONLY_ORGANIC",_[_.ONLY_NON_ORGANIC=2]="ONLY_NON_ORGANIC",_[_.INCLUDES=3]="INCLUDES",_[_.EXCLUDES=4]="EXCLUDES",_}(g||(t.UTMCriteria=g={})),m=function(_){return _[_.NONE=0]="NONE",_[_.LIKE=1]="LIKE",_[_.NOT_LIKE=2]="NOT_LIKE",_[_.EQUALS=3]="EQUALS",_[_.NOT_EQUALS=4]="NOT_EQUALS",_}(m||(t.URLCriteria=m={})),b=function(_){return _[_.NONE=0]="NONE",_[_.LESS_THAN=1]="LESS_THAN",_[_.GREATER_THAN=2]="GREATER_THAN",_[_.BETWEEN=3]="BETWEEN",_[_.EQUALS=4]="EQUALS",_}(b||(t.CartCriteria=b={})),I=function(_){return _[_.ALL=0]="ALL",_[_.INCLUDES=1]="INCLUDES",_[_.EXCLUDES=2]="EXCLUDES",_}(I||(t.CartCurrencyOperator=I={})),A=function(_){return _[_.NONE=0]="NONE",_[_.AMOUNT=1]="AMOUNT",_[_.TOTAL_PRODUCT=2]="TOTAL_PRODUCT",_[_.UNIQUE_PRODUCT=3]="UNIQUE_PRODUCT",_}(A||(t.CartFilterEnum=A={})),$=function(_){return _[_.NONE=0]="NONE",_[_.ITEM=1]="ITEM",_[_.COLLECTION=2]="COLLECTION",_}($||(t.PromotionType=$={})),j=function(_){return _[_.NONE=0]="NONE",_[_.SINGLE=1]="SINGLE",_[_.MULTIPLE=2]="MULTIPLE",_}(j||(t.EngagementCollectionSource=j={})),k=function(_){return _.BEFORE="before",_.AFTER="after",_.INSIDE_FIRST="insideFirst",_.INSIDE_LAST="insideLast",_}(k||(t.EngagementPlacementPosition=k={})),G=function(_){return _.SHOPIFY_CHECKOUT="shopify_checkout",_.THIRD_PARTY_CHECKOUT="third_party_checkout",_.CART_PAGE="cart_page",_.CART_DRAWER="cart_drawer",_}(G||(t.RedirectBehaviour=G={})),Pt=function(_){return _.ONCE_IN_SESSION="ONCE_IN_SESSION",_.ACROSS_SESSIONS="ACROSS_SESSIONS",_}(Pt||(t.FrequencyType=Pt={})),Wt=function(_){return _.DAYS="DAYS",_.HOURS="HOURS",_.MINUTES="MINUTES",_.SECONDS="SECONDS",_}(Wt||(t.FrequencyGapUnit=Wt={})),B=function(_){return _[_.NONE=0]="NONE",_[_.REJECT_POPUP=1]="REJECT_POPUP",_[_.ACCEPT_POPUP=2]="ACCEPT_POPUP",_[_.GO_TO_URL=4]="GO_TO_URL",_[_.SHARE=5]="SHARE",_[_.KEY_VALUE=100]="KEY_VALUE",_[_.GO_TO_PRODUCT=101]="GO_TO_PRODUCT",_[_.ADD_TO_CART=102]="ADD_TO_CART",_[_.COPY_COUPON_CODE=103]="COPY_COUPON_CODE",_[_.GO_TO_COLLECTION=104]="GO_TO_COLLECTION",_[_.OPEN_CART=105]="OPEN_CART",_[_.SUBMIT_FORM=106]="SUBMIT_FORM",_[_.INITIATE_CHECKOUT=107]="INITIATE_CHECKOUT",_[_.ADD_BUNDLE=108]="ADD_BUNDLE",_[_.UPGRADE_TO_SUBSCRIPTION=109]="UPGRADE_TO_SUBSCRIPTION",_}(B||(t.ClickActionType=B={})),lt=function(_){return _.POPUP="POPUP",_.PAGE_EMBED="PAGE_EMBED",_.CART_EMBED="CART_EMBED",_.ANNOUNCEMENT_BAR="ANNOUNCEMENT_BAR",_}(lt||(t.OnsiteDeliveryType=lt={})),nt=function(_){return _.PRODUCT_PROMOTION="PRODUCT_PROMOTION",_.BUNDLE_AND_UPSELL="BUNDLE_AND_UPSELL",_.CART_RECOVERY="CART_RECOVERY",_.ANNOUNCEMENT="ANNOUNCEMENT",_.LEAD_GENERATION="LEAD_GENERATION",_.DATA_COLLECTION="DATA_COLLECTION",_.SALE_PROMOTION="SALE_PROMOTION",_.SUBSCRIPTION_UPSELL="SUBSCRIPTION_UPSELL",_.SHOPPABLE_VIDEO="SHOPPABLE_VIDEO",_.BYOB="BYOB",_.PROGRESS_BAR="PROGRESS_BAR",_.BUY_NOW="BUY_NOW",_.STICKY_ATC="STICKY_ATC",_.EXPERIMENT="EXPERIMENT",_}(nt||(t.EngagementObjective=nt={})),vt=function(_){return _.COOEE="COOEE",_.KLAVIYO="KLAVIYO",_}(vt||(t.EngagementContentSource=vt={})),Vt=function(_){return _.ICONS="ICONS",_.TILES="TILES",_}(Vt||(t.ProgressBarLayout=Vt={})),Ut=function(_){return _.FREE_SHIPPING="FREE_SHIPPING",_.DISCOUNT="DISCOUNT",_.FREE_AUTO_GIFT="FREE_AUTO_GIFT",_.FREE_GIFT_SELECT="FREE_GIFT_SELECT",_}(Ut||(t.MilestoneRewardType=Ut={}))}),T0=yn(t=>{"use strict";var e=t&&t.__awaiter||function(r,i,o,s){function a(l){return l instanceof o?l:new o(function(u){u(l)})}return new(o||(o=Promise))(function(l,u){function d(g){try{p(s.next(g))}catch(m){u(m)}}function f(g){try{p(s.throw(g))}catch(m){u(m)}}function p(g){g.done?l(g.value):a(g.value).then(d,f)}p((s=s.apply(r,i||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.JSUtils=void 0;var n=class{static isObject(r){return typeof r=="object"&&!Array.isArray(r)&&r!==null}static parseToAny(r){try{return JSON.parse(r.toString())}catch{}return r.toString().match(this.ISO_WITHOUT_MS_REGEX)?new Date(r.toString()):r}static sleep(r){return e(this,void 0,void 0,function*(){return new Promise(i=>setTimeout(i,r))})}static hasKeys(r){return r?Object.keys(r).length>=1:!1}static convertObjectToArray(r,i){return i.reduce((o,s)=>(r.hasOwnProperty(s)&&r[s]!=null&&o.push({[s]:r[s]}),o),[])}static removeNullUndefinedKeys(r){return Object.keys(r).reduce((i,o)=>(r[o]!==null&&r[o]!==void 0&&(i[o]=r[o]),i),{})}static stringify(r){return JSON.stringify(r,function(i,o){return o===void 0?null:o})}};t.JSUtils=n,n.ISO_WITHOUT_MS_REGEX=new RegExp(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/)}),O0=yn((t,e)=>{"use strict";(function(n){if(typeof t=="object"&&typeof e<"u")e.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var r;typeof window<"u"?r=window:typeof global<"u"?r=global:typeof self<"u"?r=self:r=this,r.localforage=n()}})(function(){var n,r,i;return function o(s,a,l){function u(p,g){if(!a[p]){if(!s[p]){var m=typeof Po=="function"&&Po;if(!g&&m)return m(p,!0);if(d)return d(p,!0);var b=new Error("Cannot find module '"+p+"'");throw b.code="MODULE_NOT_FOUND",b}var I=a[p]={exports:{}};s[p][0].call(I.exports,function(A){var $=s[p][1][A];return u($||A)},I,I.exports,o,s,a,l)}return a[p].exports}for(var d=typeof Po=="function"&&Po,f=0;f<l.length;f++)u(l[f]);return u}({1:[function(o,s,a){(function(l){"use strict";var u=l.MutationObserver||l.WebKitMutationObserver,d;if(u){var f=0,p=new u(A),g=l.document.createTextNode("");p.observe(g,{characterData:!0}),d=function(){g.data=f=++f%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var m=new l.MessageChannel;m.port1.onmessage=A,d=function(){m.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?d=function(){var j=l.document.createElement("script");j.onreadystatechange=function(){A(),j.onreadystatechange=null,j.parentNode.removeChild(j),j=null},l.document.documentElement.appendChild(j)}:d=function(){setTimeout(A,0)};var b,I=[];function A(){b=!0;for(var j,k,G=I.length;G;){for(k=I,I=[],j=-1;++j<G;)k[j]();G=I.length}b=!1}s.exports=$;function $(j){I.push(j)===1&&!b&&d()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(o,s,a){"use strict";var l=o(1);function u(){}var d={},f=["REJECTED"],p=["FULFILLED"],g=["PENDING"];s.exports=m;function m(B){if(typeof B!="function")throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,B!==u&&$(this,B)}m.prototype.catch=function(B){return this.then(null,B)},m.prototype.then=function(B,lt){if(typeof B!="function"&&this.state===p||typeof lt!="function"&&this.state===f)return this;var nt=new this.constructor(u);if(this.state!==g){var vt=this.state===p?B:lt;I(nt,vt,this.outcome)}else this.queue.push(new b(nt,B,lt));return nt};function b(B,lt,nt){this.promise=B,typeof lt=="function"&&(this.onFulfilled=lt,this.callFulfilled=this.otherCallFulfilled),typeof nt=="function"&&(this.onRejected=nt,this.callRejected=this.otherCallRejected)}b.prototype.callFulfilled=function(B){d.resolve(this.promise,B)},b.prototype.otherCallFulfilled=function(B){I(this.promise,this.onFulfilled,B)},b.prototype.callRejected=function(B){d.reject(this.promise,B)},b.prototype.otherCallRejected=function(B){I(this.promise,this.onRejected,B)};function I(B,lt,nt){l(function(){var vt;try{vt=lt(nt)}catch(Vt){return d.reject(B,Vt)}vt===B?d.reject(B,new TypeError("Cannot resolve promise with itself")):d.resolve(B,vt)})}d.resolve=function(B,lt){var nt=j(A,lt);if(nt.status==="error")return d.reject(B,nt.value);var vt=nt.value;if(vt)$(B,vt);else{B.state=p,B.outcome=lt;for(var Vt=-1,Ut=B.queue.length;++Vt<Ut;)B.queue[Vt].callFulfilled(lt)}return B},d.reject=function(B,lt){B.state=f,B.outcome=lt;for(var nt=-1,vt=B.queue.length;++nt<vt;)B.queue[nt].callRejected(lt);return B};function A(B){var lt=B&&B.then;if(B&&(typeof B=="object"||typeof B=="function")&&typeof lt=="function")return function(){lt.apply(B,arguments)}}function $(B,lt){var nt=!1;function vt(re){nt||(nt=!0,d.reject(B,re))}function Vt(re){nt||(nt=!0,d.resolve(B,re))}function Ut(){lt(Vt,vt)}var _=j(Ut);_.status==="error"&&vt(_.value)}function j(B,lt){var nt={};try{nt.value=B(lt),nt.status="success"}catch(vt){nt.status="error",nt.value=vt}return nt}m.resolve=k;function k(B){return B instanceof this?B:d.resolve(new this(u),B)}m.reject=G;function G(B){var lt=new this(u);return d.reject(lt,B)}m.all=Pt;function Pt(B){var lt=this;if(Object.prototype.toString.call(B)!=="[object Array]")return this.reject(new TypeError("must be an array"));var nt=B.length,vt=!1;if(!nt)return this.resolve([]);for(var Vt=new Array(nt),Ut=0,_=-1,re=new this(u);++_<nt;)te(B[_],_);return re;function te(Tt,le){lt.resolve(Tt).then(ft,function(C){vt||(vt=!0,d.reject(re,C))});function ft(C){Vt[le]=C,++Ut===nt&&!vt&&(vt=!0,d.resolve(re,Vt))}}}m.race=Wt;function Wt(B){var lt=this;if(Object.prototype.toString.call(B)!=="[object Array]")return this.reject(new TypeError("must be an array"));var nt=B.length,vt=!1;if(!nt)return this.resolve([]);for(var Vt=-1,Ut=new this(u);++Vt<nt;)_(B[Vt]);return Ut;function _(re){lt.resolve(re).then(function(te){vt||(vt=!0,d.resolve(Ut,te))},function(te){vt||(vt=!0,d.reject(Ut,te))})}}},{1:1}],3:[function(o,s,a){(function(l){"use strict";typeof l.Promise!="function"&&(l.Promise=o(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(o,s,a){"use strict";var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y};function u(y,w){if(!(y instanceof w))throw new TypeError("Cannot call a class as a function")}function d(){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 f=d();function p(){try{if(!f||!f.open)return!1;var y=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),w=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!y||w)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function g(y,w){y=y||[],w=w||{};try{return new Blob(y,w)}catch(R){if(R.name!=="TypeError")throw R;for(var E=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,O=new E,T=0;T<y.length;T+=1)O.append(y[T]);return O.getBlob(w.type)}}typeof Promise>"u"&&o(3);var m=Promise;function b(y,w){w&&y.then(function(E){w(null,E)},function(E){w(E)})}function I(y,w,E){typeof w=="function"&&y.then(w),typeof E=="function"&&y.catch(E)}function A(y){return typeof y!="string"&&(console.warn(y+" used as a key, but it is not a string."),y=String(y)),y}function $(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var j="local-forage-detect-blob-support",k=void 0,G={},Pt=Object.prototype.toString,Wt="readonly",B="readwrite";function lt(y){for(var w=y.length,E=new ArrayBuffer(w),O=new Uint8Array(E),T=0;T<w;T++)O[T]=y.charCodeAt(T);return E}function nt(y){return new m(function(w){var E=y.transaction(j,B),O=g([""]);E.objectStore(j).put(O,"key"),E.onabort=function(T){T.preventDefault(),T.stopPropagation(),w(!1)},E.oncomplete=function(){var T=navigator.userAgent.match(/Chrome\/(\d+)/),R=navigator.userAgent.match(/Edge\//);w(R||!T||parseInt(T[1],10)>=43)}}).catch(function(){return!1})}function vt(y){return typeof k=="boolean"?m.resolve(k):nt(y).then(function(w){return k=w,k})}function Vt(y){var w=G[y.name],E={};E.promise=new m(function(O,T){E.resolve=O,E.reject=T}),w.deferredOperations.push(E),w.dbReady?w.dbReady=w.dbReady.then(function(){return E.promise}):w.dbReady=E.promise}function Ut(y){var w=G[y.name],E=w.deferredOperations.pop();if(E)return E.resolve(),E.promise}function _(y,w){var E=G[y.name],O=E.deferredOperations.pop();if(O)return O.reject(w),O.promise}function re(y,w){return new m(function(E,O){if(G[y.name]=G[y.name]||st(),y.db)if(w)Vt(y),y.db.close();else return E(y.db);var T=[y.name];w&&T.push(y.version);var R=f.open.apply(f,T);w&&(R.onupgradeneeded=function(P){var V=R.result;try{V.createObjectStore(y.storeName),P.oldVersion<=1&&V.createObjectStore(j)}catch(H){if(H.name==="ConstraintError")console.warn('The database "'+y.name+'" has been upgraded from version '+P.oldVersion+" to version "+P.newVersion+', but the storage "'+y.storeName+'" already exists.');else throw H}}),R.onerror=function(P){P.preventDefault(),O(R.error)},R.onsuccess=function(){var P=R.result;P.onversionchange=function(V){V.target.close()},E(P),Ut(y)}})}function te(y){return re(y,!1)}function Tt(y){return re(y,!0)}function le(y,w){if(!y.db)return!0;var E=!y.db.objectStoreNames.contains(y.storeName),O=y.version<y.db.version,T=y.version>y.db.version;if(O&&(y.version!==w&&console.warn('The database "'+y.name+`" can't be downgraded from version `+y.db.version+" to version "+y.version+"."),y.version=y.db.version),T||E){if(E){var R=y.db.version+1;R>y.version&&(y.version=R)}return!0}return!1}function ft(y){return new m(function(w,E){var O=new FileReader;O.onerror=E,O.onloadend=function(T){var R=btoa(T.target.result||"");w({__local_forage_encoded_blob:!0,data:R,type:y.type})},O.readAsBinaryString(y)})}function C(y){var w=lt(atob(y.data));return g([w],{type:y.type})}function S(y){return y&&y.__local_forage_encoded_blob}function q(y){var w=this,E=w._initReady().then(function(){var O=G[w._dbInfo.name];if(O&&O.dbReady)return O.dbReady});return I(E,y,y),E}function J(y){Vt(y);for(var w=G[y.name],E=w.forages,O=0;O<E.length;O++){var T=E[O];T._dbInfo.db&&(T._dbInfo.db.close(),T._dbInfo.db=null)}return y.db=null,te(y).then(function(R){return y.db=R,le(y)?Tt(y):R}).then(function(R){y.db=w.db=R;for(var P=0;P<E.length;P++)E[P]._dbInfo.db=R}).catch(function(R){throw _(y,R),R})}function Q(y,w,E,O){O===void 0&&(O=1);try{var T=y.db.transaction(y.storeName,w);E(null,T)}catch(R){if(O>0&&(!y.db||R.name==="InvalidStateError"||R.name==="NotFoundError"))return m.resolve().then(function(){if(!y.db||R.name==="NotFoundError"&&!y.db.objectStoreNames.contains(y.storeName)&&y.version<=y.db.version)return y.db&&(y.version=y.db.version+1),Tt(y)}).then(function(){return J(y).then(function(){Q(y,w,E,O-1)})}).catch(E);E(R)}}function st(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ot(y){var w=this,E={db:null};if(y)for(var O in y)E[O]=y[O];var T=G[E.name];T||(T=st(),G[E.name]=T),T.forages.push(w),w._initReady||(w._initReady=w.ready,w.ready=q);var R=[];function P(){return m.resolve()}for(var V=0;V<T.forages.length;V++){var H=T.forages[V];H!==w&&R.push(H._initReady().catch(P))}var U=T.forages.slice(0);return m.all(R).then(function(){return E.db=T.db,te(E)}).then(function(F){return E.db=F,le(E,w._defaultConfig.version)?Tt(E):F}).then(function(F){E.db=T.db=F,w._dbInfo=E;for(var tt=0;tt<U.length;tt++){var Ct=U[tt];Ct!==w&&(Ct._dbInfo.db=E.db,Ct._dbInfo.version=E.version)}})}function et(y,w){var E=this;y=A(y);var O=new m(function(T,R){E.ready().then(function(){Q(E._dbInfo,Wt,function(P,V){if(P)return R(P);try{var H=V.objectStore(E._dbInfo.storeName),U=H.get(y);U.onsuccess=function(){var F=U.result;F===void 0&&(F=null),S(F)&&(F=C(F)),T(F)},U.onerror=function(){R(U.error)}}catch(F){R(F)}})}).catch(R)});return b(O,w),O}function pt(y,w){var E=this,O=new m(function(T,R){E.ready().then(function(){Q(E._dbInfo,Wt,function(P,V){if(P)return R(P);try{var H=V.objectStore(E._dbInfo.storeName),U=H.openCursor(),F=1;U.onsuccess=function(){var tt=U.result;if(tt){var Ct=tt.value;S(Ct)&&(Ct=C(Ct));var Gt=y(Ct,tt.key,F++);Gt!==void 0?T(Gt):tt.continue()}else T()},U.onerror=function(){R(U.error)}}catch(tt){R(tt)}})}).catch(R)});return b(O,w),O}function xt(y,w,E){var O=this;y=A(y);var T=new m(function(R,P){var V;O.ready().then(function(){return V=O._dbInfo,Pt.call(w)==="[object Blob]"?vt(V.db).then(function(H){return H?w:ft(w)}):w}).then(function(H){Q(O._dbInfo,B,function(U,F){if(U)return P(U);try{var tt=F.objectStore(O._dbInfo.storeName);H===null&&(H=void 0);var Ct=tt.put(H,y);F.oncomplete=function(){H===void 0&&(H=null),R(H)},F.onabort=F.onerror=function(){var Gt=Ct.error?Ct.error:Ct.transaction.error;P(Gt)}}catch(Gt){P(Gt)}})}).catch(P)});return b(T,E),T}function Kt(y,w){var E=this;y=A(y);var O=new m(function(T,R){E.ready().then(function(){Q(E._dbInfo,B,function(P,V){if(P)return R(P);try{var H=V.objectStore(E._dbInfo.storeName),U=H.delete(y);V.oncomplete=function(){T()},V.onerror=function(){R(U.error)},V.onabort=function(){var F=U.error?U.error:U.transaction.error;R(F)}}catch(F){R(F)}})}).catch(R)});return b(O,w),O}function St(y){var w=this,E=new m(function(O,T){w.ready().then(function(){Q(w._dbInfo,B,function(R,P){if(R)return T(R);try{var V=P.objectStore(w._dbInfo.storeName),H=V.clear();P.oncomplete=function(){O()},P.onabort=P.onerror=function(){var U=H.error?H.error:H.transaction.error;T(U)}}catch(U){T(U)}})}).catch(T)});return b(E,y),E}function Dt(y){var w=this,E=new m(function(O,T){w.ready().then(function(){Q(w._dbInfo,Wt,function(R,P){if(R)return T(R);try{var V=P.objectStore(w._dbInfo.storeName),H=V.count();H.onsuccess=function(){O(H.result)},H.onerror=function(){T(H.error)}}catch(U){T(U)}})}).catch(T)});return b(E,y),E}function Jt(y,w){var E=this,O=new m(function(T,R){if(y<0){T(null);return}E.ready().then(function(){Q(E._dbInfo,Wt,function(P,V){if(P)return R(P);try{var H=V.objectStore(E._dbInfo.storeName),U=!1,F=H.openKeyCursor();F.onsuccess=function(){var tt=F.result;if(!tt){T(null);return}y===0||U?T(tt.key):(U=!0,tt.advance(y))},F.onerror=function(){R(F.error)}}catch(tt){R(tt)}})}).catch(R)});return b(O,w),O}function yt(y){var w=this,E=new m(function(O,T){w.ready().then(function(){Q(w._dbInfo,Wt,function(R,P){if(R)return T(R);try{var V=P.objectStore(w._dbInfo.storeName),H=V.openKeyCursor(),U=[];H.onsuccess=function(){var F=H.result;if(!F){O(U);return}U.push(F.key),F.continue()},H.onerror=function(){T(H.error)}}catch(F){T(F)}})}).catch(T)});return b(E,y),E}function c(y,w){w=$.apply(this,arguments);var E=this.config();y=typeof y!="function"&&y||{},y.name||(y.name=y.name||E.name,y.storeName=y.storeName||E.storeName);var O=this,T;if(!y.name)T=m.reject("Invalid arguments");else{var R=y.name===E.name&&O._dbInfo.db,P=R?m.resolve(O._dbInfo.db):te(y).then(function(V){var H=G[y.name],U=H.forages;H.db=V;for(var F=0;F<U.length;F++)U[F]._dbInfo.db=V;return V});y.storeName?T=P.then(function(V){if(V.objectStoreNames.contains(y.storeName)){var H=V.version+1;Vt(y);var U=G[y.name],F=U.forages;V.close();for(var tt=0;tt<F.length;tt++){var Ct=F[tt];Ct._dbInfo.db=null,Ct._dbInfo.version=H}var Gt=new m(function(zt,de){var ie=f.open(y.name,H);ie.onerror=function(Qe){var Ua=ie.result;Ua.close(),de(Qe)},ie.onupgradeneeded=function(){var Qe=ie.result;Qe.deleteObjectStore(y.storeName)},ie.onsuccess=function(){var Qe=ie.result;Qe.close(),zt(Qe)}});return Gt.then(function(zt){U.db=zt;for(var de=0;de<F.length;de++){var ie=F[de];ie._dbInfo.db=zt,Ut(ie._dbInfo)}}).catch(function(zt){throw(_(y,zt)||m.resolve()).catch(function(){}),zt})}}):T=P.then(function(V){Vt(y);var H=G[y.name],U=H.forages;V.close();for(var F=0;F<U.length;F++){var tt=U[F];tt._dbInfo.db=null}var Ct=new m(function(Gt,zt){var de=f.deleteDatabase(y.name);de.onerror=function(){var ie=de.result;ie&&ie.close(),zt(de.error)},de.onblocked=function(){console.warn('dropInstance blocked for database "'+y.name+'" until all open connections are closed')},de.onsuccess=function(){var ie=de.result;ie&&ie.close(),Gt(ie)}});return Ct.then(function(Gt){H.db=Gt;for(var zt=0;zt<U.length;zt++){var de=U[zt];Ut(de._dbInfo)}}).catch(function(Gt){throw(_(y,Gt)||m.resolve()).catch(function(){}),Gt})})}return b(T,w),T}var h={_driver:"asyncStorage",_initStorage:ot,_support:p(),iterate:pt,getItem:et,setItem:xt,removeItem:Kt,clear:St,length:Dt,key:Jt,keys:yt,dropInstance:c};function v(){return typeof openDatabase=="function"}var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D="~~local_forage_type~",M=/^~~local_forage_type~([^~]+)~/,W="__lfsc__:",Nt=W.length,It="arbf",bt="blob",Ht="si08",Z="ui08",gt="uic8",rt="si16",kt="si32",Ne="ur16",xe="ui32",At="fl32",it="fl64",Je=Nt+It.length,qr=Object.prototype.toString;function Ci(y){var w=y.length*.75,E=y.length,O,T=0,R,P,V,H;y[y.length-1]==="="&&(w--,y[y.length-2]==="="&&w--);var U=new ArrayBuffer(w),F=new Uint8Array(U);for(O=0;O<E;O+=4)R=x.indexOf(y[O]),P=x.indexOf(y[O+1]),V=x.indexOf(y[O+2]),H=x.indexOf(y[O+3]),F[T++]=R<<2|P>>4,F[T++]=(P&15)<<4|V>>2,F[T++]=(V&3)<<6|H&63;return U}function ja(y){var w=new Uint8Array(y),E="",O;for(O=0;O<w.length;O+=3)E+=x[w[O]>>2],E+=x[(w[O]&3)<<4|w[O+1]>>4],E+=x[(w[O+1]&15)<<2|w[O+2]>>6],E+=x[w[O+2]&63];return w.length%3===2?E=E.substring(0,E.length-1)+"=":w.length%3===1&&(E=E.substring(0,E.length-2)+"=="),E}function L_(y,w){var E="";if(y&&(E=qr.call(y)),y&&(E==="[object ArrayBuffer]"||y.buffer&&qr.call(y.buffer)==="[object ArrayBuffer]")){var O,T=W;y instanceof ArrayBuffer?(O=y,T+=It):(O=y.buffer,E==="[object Int8Array]"?T+=Ht:E==="[object Uint8Array]"?T+=Z:E==="[object Uint8ClampedArray]"?T+=gt:E==="[object Int16Array]"?T+=rt:E==="[object Uint16Array]"?T+=Ne:E==="[object Int32Array]"?T+=kt:E==="[object Uint32Array]"?T+=xe:E==="[object Float32Array]"?T+=At:E==="[object Float64Array]"?T+=it:w(new Error("Failed to get type for BinaryArray"))),w(T+ja(O))}else if(E==="[object Blob]"){var R=new FileReader;R.onload=function(){var P=D+y.type+"~"+ja(this.result);w(W+bt+P)},R.readAsArrayBuffer(y)}else try{w(JSON.stringify(y))}catch(P){console.error("Couldn't convert value into a JSON string: ",y),w(null,P)}}function M_(y){if(y.substring(0,Nt)!==W)return JSON.parse(y);var w=y.substring(Je),E=y.substring(Nt,Je),O;if(E===bt&&M.test(w)){var T=w.match(M);O=T[1],w=w.substring(T[0].length)}var R=Ci(w);switch(E){case It:return R;case bt:return g([R],{type:O});case Ht:return new Int8Array(R);case Z:return new Uint8Array(R);case gt:return new Uint8ClampedArray(R);case rt:return new Int16Array(R);case Ne:return new Uint16Array(R);case kt:return new Int32Array(R);case xe:return new Uint32Array(R);case At:return new Float32Array(R);case it:return new Float64Array(R);default:throw new Error("Unkown type: "+E)}}var Va={serialize:L_,deserialize:M_,stringToBuffer:Ci,bufferToString:ja};function Uh(y,w,E,O){y.executeSql("CREATE TABLE IF NOT EXISTS "+w.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],E,O)}function j_(y){var w=this,E={db:null};if(y)for(var O in y)E[O]=typeof y[O]!="string"?y[O].toString():y[O];var T=new m(function(R,P){try{E.db=openDatabase(E.name,String(E.version),E.description,E.size)}catch(V){return P(V)}E.db.transaction(function(V){Uh(V,E,function(){w._dbInfo=E,R()},function(H,U){P(U)})},P)});return E.serializer=Va,T}function Zn(y,w,E,O,T,R){y.executeSql(E,O,T,function(P,V){V.code===V.SYNTAX_ERR?P.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[w.storeName],function(H,U){U.rows.length?R(H,V):Uh(H,w,function(){H.executeSql(E,O,T,R)},R)},R):R(P,V)},R)}function V_(y,w){var E=this;y=A(y);var O=new m(function(T,R){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(V){Zn(V,P,"SELECT * FROM "+P.storeName+" WHERE key = ? LIMIT 1",[y],function(H,U){var F=U.rows.length?U.rows.item(0).value:null;F&&(F=P.serializer.deserialize(F)),T(F)},function(H,U){R(U)})})}).catch(R)});return b(O,w),O}function B_(y,w){var E=this,O=new m(function(T,R){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(V){Zn(V,P,"SELECT * FROM "+P.storeName,[],function(H,U){for(var F=U.rows,tt=F.length,Ct=0;Ct<tt;Ct++){var Gt=F.item(Ct),zt=Gt.value;if(zt&&(zt=P.serializer.deserialize(zt)),zt=y(zt,Gt.key,Ct+1),zt!==void 0){T(zt);return}}T()},function(H,U){R(U)})})}).catch(R)});return b(O,w),O}function Hh(y,w,E,O){var T=this;y=A(y);var R=new m(function(P,V){T.ready().then(function(){w===void 0&&(w=null);var H=w,U=T._dbInfo;U.serializer.serialize(w,function(F,tt){tt?V(tt):U.db.transaction(function(Ct){Zn(Ct,U,"INSERT OR REPLACE INTO "+U.storeName+" (key, value) VALUES (?, ?)",[y,F],function(){P(H)},function(Gt,zt){V(zt)})},function(Ct){if(Ct.code===Ct.QUOTA_ERR){if(O>0){P(Hh.apply(T,[y,H,E,O-1]));return}V(Ct)}})})}).catch(V)});return b(R,E),R}function F_(y,w,E){return Hh.apply(this,[y,w,E,1])}function U_(y,w){var E=this;y=A(y);var O=new m(function(T,R){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(V){Zn(V,P,"DELETE FROM "+P.storeName+" WHERE key = ?",[y],function(){T()},function(H,U){R(U)})})}).catch(R)});return b(O,w),O}function H_(y){var w=this,E=new m(function(O,T){w.ready().then(function(){var R=w._dbInfo;R.db.transaction(function(P){Zn(P,R,"DELETE FROM "+R.storeName,[],function(){O()},function(V,H){T(H)})})}).catch(T)});return b(E,y),E}function $_(y){var w=this,E=new m(function(O,T){w.ready().then(function(){var R=w._dbInfo;R.db.transaction(function(P){Zn(P,R,"SELECT COUNT(key) as c FROM "+R.storeName,[],function(V,H){var U=H.rows.item(0).c;O(U)},function(V,H){T(H)})})}).catch(T)});return b(E,y),E}function z_(y,w){var E=this,O=new m(function(T,R){E.ready().then(function(){var P=E._dbInfo;P.db.transaction(function(V){Zn(V,P,"SELECT key FROM "+P.storeName+" WHERE id = ? LIMIT 1",[y+1],function(H,U){var F=U.rows.length?U.rows.item(0).key:null;T(F)},function(H,U){R(U)})})}).catch(R)});return b(O,w),O}function q_(y){var w=this,E=new m(function(O,T){w.ready().then(function(){var R=w._dbInfo;R.db.transaction(function(P){Zn(P,R,"SELECT key FROM "+R.storeName,[],function(V,H){for(var U=[],F=0;F<H.rows.length;F++)U.push(H.rows.item(F).key);O(U)},function(V,H){T(H)})})}).catch(T)});return b(E,y),E}function W_(y){return new m(function(w,E){y.transaction(function(O){O.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(T,R){for(var P=[],V=0;V<R.rows.length;V++)P.push(R.rows.item(V).name);w({db:y,storeNames:P})},function(T,R){E(R)})},function(O){E(O)})})}function G_(y,w){w=$.apply(this,arguments);var E=this.config();y=typeof y!="function"&&y||{},y.name||(y.name=y.name||E.name,y.storeName=y.storeName||E.storeName);var O=this,T;return y.name?T=new m(function(R){var P;y.name===E.name?P=O._dbInfo.db:P=openDatabase(y.name,"","",0),y.storeName?R({db:P,storeNames:[y.storeName]}):R(W_(P))}).then(function(R){return new m(function(P,V){R.db.transaction(function(H){function U(Gt){return new m(function(zt,de){H.executeSql("DROP TABLE IF EXISTS "+Gt,[],function(){zt()},function(ie,Qe){de(Qe)})})}for(var F=[],tt=0,Ct=R.storeNames.length;tt<Ct;tt++)F.push(U(R.storeNames[tt]));m.all(F).then(function(){P()}).catch(function(Gt){V(Gt)})},function(H){V(H)})})}):T=m.reject("Invalid arguments"),b(T,w),T}var Z_={_driver:"webSQLStorage",_initStorage:j_,_support:v(),iterate:B_,getItem:V_,setItem:F_,removeItem:U_,clear:H_,length:$_,key:z_,keys:q_,dropInstance:G_};function Y_(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function $h(y,w){var E=y.name+"/";return y.storeName!==w.storeName&&(E+=y.storeName+"/"),E}function K_(){var y="_localforage_support_test";try{return localStorage.setItem(y,!0),localStorage.removeItem(y),!1}catch{return!0}}function J_(){return!K_()||localStorage.length>0}function Q_(y){var w=this,E={};if(y)for(var O in y)E[O]=y[O];return E.keyPrefix=$h(y,w._defaultConfig),J_()?(w._dbInfo=E,E.serializer=Va,m.resolve()):m.reject()}function X_(y){var w=this,E=w.ready().then(function(){for(var O=w._dbInfo.keyPrefix,T=localStorage.length-1;T>=0;T--){var R=localStorage.key(T);R.indexOf(O)===0&&localStorage.removeItem(R)}});return b(E,y),E}function t0(y,w){var E=this;y=A(y);var O=E.ready().then(function(){var T=E._dbInfo,R=localStorage.getItem(T.keyPrefix+y);return R&&(R=T.serializer.deserialize(R)),R});return b(O,w),O}function e0(y,w){var E=this,O=E.ready().then(function(){for(var T=E._dbInfo,R=T.keyPrefix,P=R.length,V=localStorage.length,H=1,U=0;U<V;U++){var F=localStorage.key(U);if(F.indexOf(R)===0){var tt=localStorage.getItem(F);if(tt&&(tt=T.serializer.deserialize(tt)),tt=y(tt,F.substring(P),H++),tt!==void 0)return tt}}});return b(O,w),O}function n0(y,w){var E=this,O=E.ready().then(function(){var T=E._dbInfo,R;try{R=localStorage.key(y)}catch{R=null}return R&&(R=R.substring(T.keyPrefix.length)),R});return b(O,w),O}function r0(y){var w=this,E=w.ready().then(function(){for(var O=w._dbInfo,T=localStorage.length,R=[],P=0;P<T;P++){var V=localStorage.key(P);V.indexOf(O.keyPrefix)===0&&R.push(V.substring(O.keyPrefix.length))}return R});return b(E,y),E}function i0(y){var w=this,E=w.keys().then(function(O){return O.length});return b(E,y),E}function o0(y,w){var E=this;y=A(y);var O=E.ready().then(function(){var T=E._dbInfo;localStorage.removeItem(T.keyPrefix+y)});return b(O,w),O}function s0(y,w,E){var O=this;y=A(y);var T=O.ready().then(function(){w===void 0&&(w=null);var R=w;return new m(function(P,V){var H=O._dbInfo;H.serializer.serialize(w,function(U,F){if(F)V(F);else try{localStorage.setItem(H.keyPrefix+y,U),P(R)}catch(tt){(tt.name==="QuotaExceededError"||tt.name==="NS_ERROR_DOM_QUOTA_REACHED")&&V(tt),V(tt)}})})});return b(T,E),T}function a0(y,w){if(w=$.apply(this,arguments),y=typeof y!="function"&&y||{},!y.name){var E=this.config();y.name=y.name||E.name,y.storeName=y.storeName||E.storeName}var O=this,T;return y.name?T=new m(function(R){y.storeName?R($h(y,O._defaultConfig)):R(y.name+"/")}).then(function(R){for(var P=localStorage.length-1;P>=0;P--){var V=localStorage.key(P);V.indexOf(R)===0&&localStorage.removeItem(V)}}):T=m.reject("Invalid arguments"),b(T,w),T}var l0={_driver:"localStorageWrapper",_initStorage:Q_,_support:Y_(),iterate:e0,getItem:t0,setItem:s0,removeItem:o0,clear:X_,length:i0,key:n0,keys:r0,dropInstance:a0},c0=function(y,w){return y===w||typeof y=="number"&&typeof w=="number"&&isNaN(y)&&isNaN(w)},u0=function(y,w){for(var E=y.length,O=0;O<E;){if(c0(y[O],w))return!0;O++}return!1},zh=Array.isArray||function(y){return Object.prototype.toString.call(y)==="[object Array]"},Ti={},qh={},Wr={INDEXEDDB:h,WEBSQL:Z_,LOCALSTORAGE:l0},h0=[Wr.INDEXEDDB._driver,Wr.WEBSQL._driver,Wr.LOCALSTORAGE._driver],Ao=["dropInstance"],Ba=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ao),d0={description:"",driver:h0.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function f0(y,w){y[w]=function(){var E=arguments;return y.ready().then(function(){return y[w].apply(y,E)})}}function Fa(){for(var y=1;y<arguments.length;y++){var w=arguments[y];if(w)for(var E in w)w.hasOwnProperty(E)&&(zh(w[E])?arguments[0][E]=w[E].slice():arguments[0][E]=w[E])}return arguments[0]}var p0=function(){function y(w){u(this,y);for(var E in Wr)if(Wr.hasOwnProperty(E)){var O=Wr[E],T=O._driver;this[E]=T,Ti[T]||this.defineDriver(O)}this._defaultConfig=Fa({},d0),this._config=Fa({},this._defaultConfig,w),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return y.prototype.config=function(w){if((typeof w>"u"?"undefined":l(w))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var E in w){if(E==="storeName"&&(w[E]=w[E].replace(/\W/g,"_")),E==="version"&&typeof w[E]!="number")return new Error("Database version must be a number.");this._config[E]=w[E]}return"driver"in w&&w.driver?this.setDriver(this._config.driver):!0}else return typeof w=="string"?this._config[w]:this._config},y.prototype.defineDriver=function(w,E,O){var T=new m(function(R,P){try{var V=w._driver,H=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!w._driver){P(H);return}for(var U=Ba.concat("_initStorage"),F=0,tt=U.length;F<tt;F++){var Ct=U[F],Gt=!u0(Ao,Ct);if((Gt||w[Ct])&&typeof w[Ct]!="function"){P(H);return}}var zt=function(){for(var ie=function(m0){return function(){var v0=new Error("Method "+m0+" is not implemented by the current driver"),Wh=m.reject(v0);return b(Wh,arguments[arguments.length-1]),Wh}},Qe=0,Ua=Ao.length;Qe<Ua;Qe++){var Ha=Ao[Qe];w[Ha]||(w[Ha]=ie(Ha))}};zt();var de=function(ie){Ti[V]&&console.info("Redefining LocalForage driver: "+V),Ti[V]=w,qh[V]=ie,R()};"_support"in w?w._support&&typeof w._support=="function"?w._support().then(de,P):de(!!w._support):de(!0)}catch(ie){P(ie)}});return I(T,E,O),T},y.prototype.driver=function(){return this._driver||null},y.prototype.getDriver=function(w,E,O){var T=Ti[w]?m.resolve(Ti[w]):m.reject(new Error("Driver not found."));return I(T,E,O),T},y.prototype.getSerializer=function(w){var E=m.resolve(Va);return I(E,w),E},y.prototype.ready=function(w){var E=this,O=E._driverSet.then(function(){return E._ready===null&&(E._ready=E._initDriver()),E._ready});return I(O,w,w),O},y.prototype.setDriver=function(w,E,O){var T=this;zh(w)||(w=[w]);var R=this._getSupportedDrivers(w);function P(){T._config.driver=T.driver()}function V(F){return T._extend(F),P(),T._ready=T._initStorage(T._config),T._ready}function H(F){return function(){var tt=0;function Ct(){for(;tt<F.length;){var Gt=F[tt];return tt++,T._dbInfo=null,T._ready=null,T.getDriver(Gt).then(V).catch(Ct)}P();var zt=new Error("No available storage method found.");return T._driverSet=m.reject(zt),T._driverSet}return Ct()}}var U=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=U.then(function(){var F=R[0];return T._dbInfo=null,T._ready=null,T.getDriver(F).then(function(tt){T._driver=tt._driver,P(),T._wrapLibraryMethodsWithReady(),T._initDriver=H(R)})}).catch(function(){P();var F=new Error("No available storage method found.");return T._driverSet=m.reject(F),T._driverSet}),I(this._driverSet,E,O),this._driverSet},y.prototype.supports=function(w){return!!qh[w]},y.prototype._extend=function(w){Fa(this,w)},y.prototype._getSupportedDrivers=function(w){for(var E=[],O=0,T=w.length;O<T;O++){var R=w[O];this.supports(R)&&E.push(R)}return E},y.prototype._wrapLibraryMethodsWithReady=function(){for(var w=0,E=Ba.length;w<E;w++)f0(this,Ba[w])},y.prototype.createInstance=function(w){return new y(w)},y}(),g0=new p0;s.exports=g0},{3:3}]},{},[4])(4)})}),R0=yn(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MustacheUtils=void 0;var e=class Mp{static escapeHtml(r){return String(r).replace(/"/g,i=>Mp.entityMap[i])}};t.MustacheUtils=e,e.entityMap={'"':"""}}),D0=yn(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StorageDestination=t.AssetType=void 0;var e=function(r){return r[r.IMAGE=1]="IMAGE",r[r.VIDEO=2]="VIDEO",r[r.GIF=3]="GIF",r[r.SCREENSHOT=4]="SCREENSHOT",r[r.THREE_D=5]="THREE_D",r[r.FONT=6]="FONT",r[r.TEXT=7]="TEXT",r[r.JSON=8]="JSON",r[r.SVG=9]="SVG",r[r.HTML=10]="HTML",r[r.LOGO=11]="LOGO",r[r.OTHERS=1e3]="OTHERS",r}(e||(t.AssetType=e={})),n=function(r){return r.AWS_S3="AWS_S3",r.SHOPIFY_FILES="SHOPIFY_FILES",r}(n||(t.StorageDestination=n={}))}),N0=yn(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateStatus=void 0;var e=function(n){return n[n.DRAFT=1]="DRAFT",n[n.PUBLISHED=2]="PUBLISHED",n[n.DISABLED=3]="DISABLED",n}(e||(t.TemplateStatus=e={}))}),k0=yn(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionType=void 0;var e=function(n){return n.VIEW_ITEM="VIEW_ITEM",n.ADD_TO_CART="ADD_TO_CART",n.VIEW_CATEGORY="VIEW_CATEGORY",n.VIEW_TAG="VIEW_TAG",n.SEARCH="SEARCH",n.APPLY_COUPON="APPLY_COUPON",n}(e||(t.ActionType=e={}))}),A0=yn(t=>{"use strict";var e=t&&t.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=t&&t.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,r,o)};Object.defineProperty(t,"__esModule",{value:!0}),n(D0(),t),n(N0(),t),n(ho(),t),n(k0(),t)}),jp=yn((t,e)=>{"use strict";(function(n,r){"use strict";var i="1.0.40",o="",s="?",a="function",l="undefined",u="object",d="string",f="major",p="model",g="name",m="type",b="vendor",I="version",A="architecture",$="console",j="mobile",k="tablet",G="smarttv",Pt="wearable",Wt="embedded",B=500,lt="Amazon",nt="Apple",vt="ASUS",Vt="BlackBerry",Ut="Browser",_="Chrome",re="Edge",te="Firefox",Tt="Google",le="Huawei",ft="LG",C="Microsoft",S="Motorola",q="Opera",J="Samsung",Q="Sharp",st="Sony",ot="Xiaomi",et="Zebra",pt="Facebook",xt="Chromium OS",Kt="Mac OS",St=" Browser",Dt=function(Z,gt){var rt={};for(var kt in Z)gt[kt]&>[kt].length%2===0?rt[kt]=gt[kt].concat(Z[kt]):rt[kt]=Z[kt];return rt},Jt=function(Z){for(var gt={},rt=0;rt<Z.length;rt++)gt[Z[rt].toUpperCase()]=Z[rt];return gt},yt=function(Z,gt){return typeof Z===d?c(gt).indexOf(c(Z))!==-1:!1},c=function(Z){return Z.toLowerCase()},h=function(Z){return typeof Z===d?Z.replace(/[^\d\.]/g,o).split(".")[0]:r},v=function(Z,gt){if(typeof Z===d)return Z=Z.replace(/^\s\s*/,o),typeof gt===l?Z:Z.substring(0,B)},x=function(Z,gt){for(var rt=0,kt,Ne,xe,At,it,Je;rt<gt.length&&!it;){var qr=gt[rt],Ci=gt[rt+1];for(kt=Ne=0;kt<qr.length&&!it&&qr[kt];)if(it=qr[kt++].exec(Z),it)for(xe=0;xe<Ci.length;xe++)Je=it[++Ne],At=Ci[xe],typeof At===u&&At.length>0?At.length===2?typeof At[1]==a?this[At[0]]=At[1].call(this,Je):this[At[0]]=At[1]:At.length===3?typeof At[1]===a&&!(At[1].exec&&At[1].test)?this[At[0]]=Je?At[1].call(this,Je,At[2]):r:this[At[0]]=Je?Je.replace(At[1],At[2]):r:At.length===4&&(this[At[0]]=Je?At[3].call(this,Je.replace(At[1],At[2])):r):this[At]=Je||r;rt+=2}},D=function(Z,gt){for(var rt in gt)if(typeof gt[rt]===u&>[rt].length>0){for(var kt=0;kt<gt[rt].length;kt++)if(yt(gt[rt][kt],Z))return rt===s?r:rt}else if(yt(gt[rt],Z))return rt===s?r:rt;return gt.hasOwnProperty("*")?gt["*"]:Z},M={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},W={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Nt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[I,[g,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[I,[g,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[g,I],[/opios[\/ ]+([\w\.]+)/i],[I,[g,q+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[I,[g,q+" GX"]],[/\bopr\/([\w\.]+)/i],[I,[g,q]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[I,[g,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[I,[g,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[g,I],[/quark(?:pc)?\/([-\w\.]+)/i],[I,[g,"Quark"]],[/\bddg\/([\w\.]+)/i],[I,[g,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[I,[g,"UC"+Ut]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[I,[g,"WeChat"]],[/konqueror\/([\w\.]+)/i],[I,[g,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[I,[g,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[I,[g,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[I,[g,"Smart Lenovo "+Ut]],[/(avast|avg)\/([\w\.]+)/i],[[g,/(.+)/,"$1 Secure "+Ut],I],[/\bfocus\/([\w\.]+)/i],[I,[g,te+" Focus"]],[/\bopt\/([\w\.]+)/i],[I,[g,q+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[I,[g,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[I,[g,"Dolphin"]],[/coast\/([\w\.]+)/i],[I,[g,q+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[I,[g,"MIUI"+St]],[/fxios\/([\w\.-]+)/i],[I,[g,te]],[/\bqihoobrowser\/?([\w\.]*)/i],[I,[g,"360"]],[/\b(qq)\/([\w\.]+)/i],[[g,/(.+)/,"$1Browser"],I],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[g,/(.+)/,"$1"+St],I],[/samsungbrowser\/([\w\.]+)/i],[I,[g,J+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[I,[g,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[g,"Sogou Mobile"],I],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[g,I],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[g],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[I,g],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[g,pt],I],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[g,I],[/\bgsa\/([\w\.]+) .*safari\//i],[I,[g,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[I,[g,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[I,[g,_+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[g,_+" WebView"],I],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[I,[g,"Android "+Ut]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[g,I],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[I,[g,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[I,g],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[g,[I,D,M]],[/(webkit|khtml)\/([\w\.]+)/i],[g,I],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[g,"Netscape"],I],[/(wolvic|librewolf)\/([\w\.]+)/i],[g,I],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[I,[g,te+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[g,[I,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[g,[I,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,c]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,o,c]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,c]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[b,J],[m,k]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[p,[b,J],[m,j]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[b,nt],[m,j]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[b,nt],[m,k]],[/(macintosh);/i],[p,[b,nt]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[b,Q],[m,j]],[/(?:honor)([-\w ]+)[;\)]/i],[p,[b,"Honor"],[m,j]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[b,le],[m,k]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[b,le],[m,j]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[p,/_/g," "],[b,ot],[m,j]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[b,ot],[m,k]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[b,"OPPO"],[m,j]],[/\b(opd2\d{3}a?) bui/i],[p,[b,"OPPO"],[m,k]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[b,"Vivo"],[m,j]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[p,[b,"Realme"],[m,j]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[b,S],[m,j]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[b,S],[m,k]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[b,ft],[m,k]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[b,ft],[m,j]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[b,"Lenovo"],[m,k]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[b,"Nokia"],[m,j]],[/(pixel c)\b/i],[p,[b,Tt],[m,k]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[b,Tt],[m,j]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[b,st],[m,j]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[b,st],[m,k]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[b,"OnePlus"],[m,j]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[b,lt],[m,k]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[b,lt],[m,j]],[/(playbook);[-\w\),; ]+(rim)/i],[p,b,[m,k]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[b,Vt],[m,j]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[b,vt],[m,k]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[b,vt],[m,j]],[/(nexus 9)/i],[p,[b,"HTC"],[m,k]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[p,/_/g," "],[m,j]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[p,[b,"TCL"],[m,k]],[/(itel) ((\w+))/i],[[b,c],p,[m,D,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[b,"Acer"],[m,k]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[b,"Meizu"],[m,j]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[p,[b,"Ulefone"],[m,j]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[p,[b,"Energizer"],[m,j]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[p,[b,"Cat"],[m,j]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[p,[b,"Smartfren"],[m,j]],[/droid.+; (a(?:015|06[35]|142p?))/i],[p,[b,"Nothing"],[m,j]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[b,p,[m,j]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[b,p,[m,k]],[/(surface duo)/i],[p,[b,C],[m,k]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[b,"Fairphone"],[m,j]],[/(u304aa)/i],[p,[b,"AT&T"],[m,j]],[/\bsie-(\w*)/i],[p,[b,"Siemens"],[m,j]],[/\b(rct\w+) b/i],[p,[b,"RCA"],[m,k]],[/\b(venue[\d ]{2,7}) b/i],[p,[b,"Dell"],[m,k]],[/\b(q(?:mv|ta)\w+) b/i],[p,[b,"Verizon"],[m,k]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[b,"Barnes & Noble"],[m,k]],[/\b(tm\d{3}\w+) b/i],[p,[b,"NuVision"],[m,k]],[/\b(k88) b/i],[p,[b,"ZTE"],[m,k]],[/\b(nx\d{3}j) b/i],[p,[b,"ZTE"],[m,j]],[/\b(gen\d{3}) b.+49h/i],[p,[b,"Swiss"],[m,j]],[/\b(zur\d{3}) b/i],[p,[b,"Swiss"],[m,k]],[/\b((zeki)?tb.*\b) b/i],[p,[b,"Zeki"],[m,k]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[b,"Dragon Touch"],p,[m,k]],[/\b(ns-?\w{0,9}) b/i],[p,[b,"Insignia"],[m,k]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[b,"NextBook"],[m,k]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[b,"Voice"],p,[m,j]],[/\b(lvtel\-)?(v1[12]) b/i],[[b,"LvTel"],p,[m,j]],[/\b(ph-1) /i],[p,[b,"Essential"],[m,j]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[b,"Envizen"],[m,k]],[/\b(trio[-\w\. ]+) b/i],[p,[b,"MachSpeed"],[m,k]],[/\btu_(1491) b/i],[p,[b,"Rotor"],[m,k]],[/(shield[\w ]+) b/i],[p,[b,"Nvidia"],[m,k]],[/(sprint) (\w+)/i],[b,p,[m,j]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[b,C],[m,j]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[b,et],[m,k]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[b,et],[m,j]],[/smart-tv.+(samsung)/i],[b,[m,G]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[b,J],[m,G]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,ft],[m,G]],[/(apple) ?tv/i],[b,[p,nt+" TV"],[m,G]],[/crkey/i],[[p,_+"cast"],[b,Tt],[m,G]],[/droid.+aft(\w+)( bui|\))/i],[p,[b,lt],[m,G]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[b,Q],[m,G]],[/(bravia[\w ]+)( bui|\))/i],[p,[b,st],[m,G]],[/(mitv-\w{5}) bui/i],[p,[b,ot],[m,G]],[/Hbbtv.*(technisat) (.*);/i],[b,p,[m,G]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,v],[p,v],[m,G]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,G]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[b,p,[m,$]],[/droid.+; (shield) bui/i],[p,[b,"Nvidia"],[m,$]],[/(playstation [345portablevi]+)/i],[p,[b,st],[m,$]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[b,C],[m,$]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[p,[b,J],[m,Pt]],[/((pebble))app/i],[b,p,[m,Pt]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[b,nt],[m,Pt]],[/droid.+; (glass) \d/i],[p,[b,Tt],[m,Pt]],[/droid.+; (wt63?0{2,3})\)/i],[p,[b,et],[m,Pt]],[/droid.+; (glass) \d/i],[p,[b,Tt],[m,Pt]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,p,[m,Pt]],[/; (quest( \d| pro)?)/i],[p,[b,pt],[m,Pt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[m,Wt]],[/(aeobc)\b/i],[p,[b,lt],[m,Wt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[p,[m,j]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[m,k]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,k]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,j]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[I,[g,re+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[g,I],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[I,[g,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[g,I],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[I,g]],os:[[/microsoft (windows) (vista|xp)/i],[g,I],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[g,[I,D,W]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[I,D,W],[g,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[I,/_/g,"."],[g,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[g,Kt],[I,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[I,g],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[g,I],[/\(bb(10);/i],[I,[g,Vt]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[I,[g,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[I,[g,te+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[I,[g,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[I,[g,"watchOS"]],[/crkey\/([\d\.]+)/i],[I,[g,_+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[g,xt],I],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[g,I],[/(sunos) ?([\w\.\d]*)/i],[[g,"Solaris"],I],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[g,I]]},It=function(Z,gt){if(typeof Z===u&&(gt=Z,Z=r),!(this instanceof It))return new It(Z,gt).getResult();var rt=typeof n!==l&&n.navigator?n.navigator:r,kt=Z||(rt&&rt.userAgent?rt.userAgent:o),Ne=rt&&rt.userAgentData?rt.userAgentData:r,xe=gt?Dt(Nt,gt):Nt,At=rt&&rt.userAgent==kt;return this.getBrowser=function(){var it={};return it[g]=r,it[I]=r,x.call(it,kt,xe.browser),it[f]=h(it[I]),At&&rt&&rt.brave&&typeof rt.brave.isBrave==a&&(it[g]="Brave"),it},this.getCPU=function(){var it={};return it[A]=r,x.call(it,kt,xe.cpu),it},this.getDevice=function(){var it={};return it[b]=r,it[p]=r,it[m]=r,x.call(it,kt,xe.device),At&&!it[m]&&Ne&&Ne.mobile&&(it[m]=j),At&&it[p]=="Macintosh"&&rt&&typeof rt.standalone!==l&&rt.maxTouchPoints&&rt.maxTouchPoints>2&&(it[p]="iPad",it[m]=k),it},this.getEngine=function(){var it={};return it[g]=r,it[I]=r,x.call(it,kt,xe.engine),it},this.getOS=function(){var it={};return it[g]=r,it[I]=r,x.call(it,kt,xe.os),At&&!it[g]&&Ne&&Ne.platform&&Ne.platform!="Unknown"&&(it[g]=Ne.platform.replace(/chrome os/i,xt).replace(/macos/i,Kt)),it},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return kt},this.setUA=function(it){return kt=typeof it===d&&it.length>B?v(it,B):it,this},this.setUA(kt),this};It.VERSION=i,It.BROWSER=Jt([g,I,f]),It.CPU=Jt([A]),It.DEVICE=Jt([p,b,m,$,j,G,k,Pt,Wt]),It.ENGINE=It.OS=Jt([g,I]),typeof t!==l?(typeof e!==l&&e.exports&&(t=e.exports=It),t.UAParser=It):typeof define===a&&define.amd?define(function(){return It}):typeof n!==l&&(n.UAParser=It);var bt=typeof n!==l&&(n.jQuery||n.Zepto);if(bt&&!bt.ua){var Ht=new It;bt.ua=Ht.getResult(),bt.ua.get=function(){return Ht.getUA()},bt.ua.set=function(Z){Ht.setUA(Z);var gt=Ht.getResult();for(var rt in gt)bt.ua[rt]=gt[rt]}}})(typeof window=="object"?window:t)}),P0=yn((t,e)=>{"use strict";(function(n,r){typeof t=="object"&&typeof e<"u"?e.exports=r():typeof define=="function"&&define.amd?define(r):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=r())})(t,function(){"use strict";var n=function(o,s){if(s=s||{},typeof o!="function")throw new i("fetch must be a function");if(typeof s!="object")throw new i("defaults must be an object");if(s.retries!==void 0&&!r(s.retries))throw new i("retries must be a positive integer");if(s.retryDelay!==void 0&&!r(s.retryDelay)&&typeof s.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(s.retryOn!==void 0&&!Array.isArray(s.retryOn)&&typeof s.retryOn!="function")throw new i("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return s=Object.assign(a,s),function(l,u){var d=s.retries,f=s.retryDelay,p=s.retryOn;if(u&&u.retries!==void 0)if(r(u.retries))d=u.retries;else throw new i("retries must be a positive integer");if(u&&u.retryDelay!==void 0)if(r(u.retryDelay)||typeof u.retryDelay=="function")f=u.retryDelay;else throw new i("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")p=u.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(g,m){var b=function(A){var $=typeof Request<"u"&&l instanceof Request?l.clone():l;o($,u).then(function(j){if(Array.isArray(p)&&p.indexOf(j.status)===-1)g(j);else if(typeof p=="function")try{return Promise.resolve(p(A,null,j)).then(function(k){k?I(A,null,j):g(j)}).catch(m)}catch(k){m(k)}else A<d?I(A,null,j):g(j)}).catch(function(j){if(typeof p=="function")try{Promise.resolve(p(A,j,null)).then(function(k){k?I(A,j,null):m(j)}).catch(function(k){m(k)})}catch(k){m(k)}else A<d?I(A,j,null):m(j)})};function I(A,$,j){var k=typeof f=="function"?f(A,$,j):f;setTimeout(function(){b(++A)},k)}b(0)})}};function r(o){return Number.isInteger(o)&&o>=0}function i(o){this.name="ArgumentError",this.message=o}return n})});function L0(t,e){return Object.is(t,e)}var me=null,Qo=!1,ru=1,er=Symbol("SIGNAL");function Ot(t){let e=me;return me=t,e}function M0(){return me}var iu={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function j0(t){if(Qo)throw new Error("");if(me===null)return;me.consumerOnSignalRead(t);let e=me.nextProducerIndex++;if(Ws(me),e<me.producerNode.length&&me.producerNode[e]!==t&&qi(me)){let n=me.producerNode[e];qs(n,me.producerIndexOfThis[e])}me.producerNode[e]!==t&&(me.producerNode[e]=t,me.producerIndexOfThis[e]=qi(me)?Hp(t,me,e):0),me.producerLastReadVersion[e]=t.version}function V0(){ru++}function B0(t){if(!(qi(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===ru)){if(!t.producerMustRecompute(t)&&!Fp(t)){Yh(t);return}t.producerRecomputeValue(t),Yh(t)}}function Vp(t){if(t.liveConsumerNode===void 0)return;let e=Qo;Qo=!0;try{for(let n of t.liveConsumerNode)n.dirty||F0(n)}finally{Qo=e}}function Bp(){return me?.consumerAllowSignalWrites!==!1}function F0(t){t.dirty=!0,Vp(t),t.consumerMarkedDirty?.(t)}function Yh(t){t.dirty=!1,t.lastCleanEpoch=ru}function Kh(t){return t&&(t.nextProducerIndex=0),Ot(t)}function U0(t,e){if(Ot(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(qi(t))for(let n=t.nextProducerIndex;n<t.producerNode.length;n++)qs(t.producerNode[n],t.producerIndexOfThis[n]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function Fp(t){Ws(t);for(let e=0;e<t.producerNode.length;e++){let n=t.producerNode[e],r=t.producerLastReadVersion[e];if(r!==n.version||(B0(n),r!==n.version))return!0}return!1}function Up(t){if(Ws(t),qi(t))for(let e=0;e<t.producerNode.length;e++)qs(t.producerNode[e],t.producerIndexOfThis[e]);t.producerNode.length=t.producerLastReadVersion.length=t.producerIndexOfThis.length=0,t.liveConsumerNode&&(t.liveConsumerNode.length=t.liveConsumerIndexOfThis.length=0)}function Hp(t,e,n){if($p(t),t.liveConsumerNode.length===0&&zp(t))for(let r=0;r<t.producerNode.length;r++)t.producerIndexOfThis[r]=Hp(t.producerNode[r],t,r);return t.liveConsumerIndexOfThis.push(n),t.liveConsumerNode.push(e)-1}function qs(t,e){if($p(t),t.liveConsumerNode.length===1&&zp(t))for(let r=0;r<t.producerNode.length;r++)qs(t.producerNode[r],t.producerIndexOfThis[r]);let n=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[n],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[n],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){let r=t.liveConsumerIndexOfThis[e],i=t.liveConsumerNode[e];Ws(i),i.producerIndexOfThis[r]=e}}function qi(t){return t.consumerIsAlwaysLive||(t?.liveConsumerNode?.length??0)>0}function Ws(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}function $p(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}function zp(t){return t.producerNode!==void 0}function H0(){throw new Error}var qp=H0;function Wp(t){qp(t)}function $0(t){qp=t}var z0=null;function q0(t){let e=Object.create(G0);e.value=t;let n=()=>(j0(e),e.value);return n[er]=e,n}function Gp(t,e){Bp()||Wp(t),t.equal(t.value,e)||(t.value=e,Z0(t))}function W0(t,e){Bp()||Wp(t),Gp(t,e(t.value))}var G0=Qt(L({},iu),{equal:L0,value:void 0,kind:"signal"});function Z0(t){t.version++,V0(),Vp(t),z0?.()}function Zt(t){return typeof t=="function"}function Zp(t){let e=t(n=>{Error.call(n),n.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var $a=Zp(t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription:
|
|
2
|
+
${e.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
|
|
3
|
+
`)}`:"",this.name="UnsubscriptionError",this.errors=e});function hs(t,e){if(t){let n=t.indexOf(e);0<=n&&t.splice(n,1)}}var ye=class Nl{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let o of n)o.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(Zt(r))try{r()}catch(o){e=o instanceof $a?o.errors:[o]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let o of i)try{Jh(o)}catch(s){e=e??[],s instanceof $a?e=[...e,...s.errors]:e.push(s)}}if(e)throw new $a(e)}}add(e){var n;if(e&&e!==this)if(this.closed)Jh(e);else{if(e instanceof Nl){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}}_hasParent(e){let{_parentage:n}=this;return n===e||Array.isArray(n)&&n.includes(e)}_addParent(e){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e}_removeParent(e){let{_parentage:n}=this;n===e?this._parentage=null:Array.isArray(n)&&hs(n,e)}remove(e){let{_finalizers:n}=this;n&&hs(n,e),e instanceof Nl&&e._removeParent(this)}};ye.EMPTY=(()=>{let t=new ye;return t.closed=!0,t})();var Yp=ye.EMPTY;function Kp(t){return t instanceof ye||t&&"closed"in t&&Zt(t.remove)&&Zt(t.add)&&Zt(t.unsubscribe)}function Jh(t){Zt(t)?t():t.unsubscribe()}var Br={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ds={setTimeout(t,e,...n){let{delegate:r}=ds;return r?.setTimeout?r.setTimeout(t,e,...n):setTimeout(t,e,...n)},clearTimeout(t){let{delegate:e}=ds;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function Jp(t){ds.setTimeout(()=>{let{onUnhandledError:e}=Br;if(e)e(t);else throw t})}function kl(){}var Y0=ou("C",void 0,void 0);function K0(t){return ou("E",void 0,t)}function J0(t){return ou("N",t,void 0)}function ou(t,e,n){return{kind:t,value:e,error:n}}var _r=null;function Xo(t){if(Br.useDeprecatedSynchronousErrorHandling){let e=!_r;if(e&&(_r={errorThrown:!1,error:null}),t(),e){let{errorThrown:n,error:r}=_r;if(_r=null,n)throw r}}else t()}function Q0(t){Br.useDeprecatedSynchronousErrorHandling&&_r&&(_r.errorThrown=!0,_r.error=t)}var su=class extends ye{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Kp(t)&&t.add(this)):this.destination=nb}static create(t,e,n){return new Al(t,e,n)}next(t){this.isStopped?qa(J0(t),this):this._next(t)}error(t){this.isStopped?qa(K0(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?qa(Y0,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},X0=Function.prototype.bind;function za(t,e){return X0.call(t,e)}var tb=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){Lo(n)}}error(t){let{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){Lo(n)}else Lo(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){Lo(e)}}},Al=class extends su{constructor(t,e,n){super();let r;if(Zt(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let i;this&&Br.useDeprecatedNextContext?(i=Object.create(t),i.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&za(t.next,i),error:t.error&&za(t.error,i),complete:t.complete&&za(t.complete,i)}):r=t}this.destination=new tb(r)}};function Lo(t){Br.useDeprecatedSynchronousErrorHandling?Q0(t):Jp(t)}function eb(t){throw t}function qa(t,e){let{onStoppedNotification:n}=Br;n&&ds.setTimeout(()=>n(t,e))}var nb={closed:!0,next:kl,error:eb,complete:kl},au=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Gs(t){return t}function rb(t){return t.length===0?Gs:t.length===1?t[0]:function(e){return t.reduce((n,r)=>r(n),e)}}var _e=(()=>{class t{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new t;return r.source=this,r.operator=n,r}subscribe(n,r,i){let o=ob(n)?n:new Al(n,r,i);return Xo(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=Qh(r),new r((i,o)=>{let s=new Al({next:a=>{try{n(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[au](){return this}pipe(...n){return rb(n)(this)}toPromise(n){return n=Qh(n),new n((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return t.create=e=>new t(e),t})();function Qh(t){var e;return(e=t??Br.Promise)!==null&&e!==void 0?e:Promise}function ib(t){return t&&Zt(t.next)&&Zt(t.error)&&Zt(t.complete)}function ob(t){return t&&t instanceof su||ib(t)&&Kp(t)}function sb(t){return Zt(t?.lift)}function ln(t){return e=>{if(sb(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function qe(t,e,n,r,i){return new ab(t,e,n,r,i)}var ab=class extends su{constructor(t,e,n,r,i,o){super(t),this.onFinalize=i,this.shouldUnsubscribe=o,this._next=e?function(s){try{e(s)}catch(a){t.error(a)}}:super._next,this._error=r?function(s){try{r(s)}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(s){t.error(s)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}},Vi={schedule(t){let e=requestAnimationFrame,n=cancelAnimationFrame,{delegate:r}=Vi;r&&(e=r.requestAnimationFrame,n=r.cancelAnimationFrame);let i=e(o=>{n=void 0,t(o)});return new ye(()=>n?.(i))},requestAnimationFrame(...t){let{delegate:e}=Vi;return(e?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){let{delegate:e}=Vi;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0},lb=Zp(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),dt=(()=>{class t extends _e{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new Xh(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new lb}next(n){Xo(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){Xo(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){Xo(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:r,isStopped:i,observers:o}=this;return r||i?Yp:(this.currentObservers=null,o.push(n),new ye(()=>{this.currentObservers=null,hs(o,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:i,isStopped:o}=this;r?n.error(i):o&&n.complete()}asObservable(){let n=new _e;return n.source=this,n}}return t.create=(e,n)=>new Xh(e,n),t})(),Xh=class extends dt{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.next)===null||n===void 0||n.call(e,t)}error(t){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.error)===null||n===void 0||n.call(e,t)}complete(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0||e.call(t)}_subscribe(t){var e,n;return(n=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&n!==void 0?n:Yp}},lu=class extends dt{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){let{hasError:t,thrownError:e,_value:n}=this;if(t)throw e;return this._throwIfClosed(),n}next(t){super.next(this._value=t)}},cu={now(){return(cu.delegate||Date).now()},delegate:void 0},cb=class extends dt{constructor(t=1/0,e=1/0,n=cu){super(),this._bufferSize=t,this._windowTime=e,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,e)}next(t){let{isStopped:e,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:i,_windowTime:o}=this;e||(n.push(t),!r&&n.push(i.now()+o)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(t),{_infiniteTimeWindow:n,_buffer:r}=this,i=r.slice();for(let o=0;o<i.length&&!t.closed;o+=n?1:2)t.next(i[o]);return this._checkFinalizedStatuses(t),e}_trimBuffer(){let{_bufferSize:t,_timestampProvider:e,_buffer:n,_infiniteTimeWindow:r}=this,i=(r?1:2)*t;if(t<1/0&&i<n.length&&n.splice(0,n.length-i),!r){let o=e.now(),s=0;for(let a=1;a<n.length&&n[a]<=o;a+=2)s=a;s&&n.splice(0,s+1)}}},ub=class extends ye{constructor(t,e){super()}schedule(t,e=0){return this}},fs={setInterval(t,e,...n){let{delegate:r}=fs;return r?.setInterval?r.setInterval(t,e,...n):setInterval(t,e,...n)},clearInterval(t){let{delegate:e}=fs;return(e?.clearInterval||clearInterval)(t)},delegate:void 0},Qp=class extends ub{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){var n;if(this.closed)return this;this.state=t;let r=this.id,i=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(i,r,e)),this.pending=!0,this.delay=e,this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(i,this.id,e),this}requestAsyncId(t,e,n=0){return fs.setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(n!=null&&this.delay===n&&this.pending===!1)return e;e!=null&&fs.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let n=this._execute(t,e);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n=!1,r;try{this.work(t)}catch(i){n=!0,r=i||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:t,scheduler:e}=this,{actions:n}=e;this.work=this.state=this.scheduler=null,this.pending=!1,hs(n,this),t!=null&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}},Pl=class Xp{constructor(e,n=Xp.now){this.schedulerActionCtor=e,this.now=n}schedule(e,n=0,r){return new this.schedulerActionCtor(this,e).schedule(r,n)}};Pl.now=cu.now;var tg=class extends Pl{constructor(t,e=Pl.now){super(t,e),this.actions=[],this._active=!1}flush(t){let{actions:e}=this;if(this._active){e.push(t);return}let n;this._active=!0;do if(n=t.execute(t.state,t.delay))break;while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},uu=new tg(Qp),hb=uu,db=class extends Qp{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,n=0){return n!==null&&n>0?super.requestAsyncId(t,e,n):(t.actions.push(this),t._scheduled||(t._scheduled=Vi.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,e,n=0){var r;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(t,e,n);let{actions:i}=t;e!=null&&((r=i[i.length-1])===null||r===void 0?void 0:r.id)!==e&&(Vi.cancelAnimationFrame(e),t._scheduled=void 0)}},fb=class extends tg{flush(t){this._active=!0;let e=this._scheduled;this._scheduled=void 0;let{actions:n}=this,r;t=t||n.shift();do if(r=t.execute(t.state,t.delay))break;while((t=n[0])&&t.id===e&&n.shift());if(this._active=!1,r){for(;(t=n[0])&&t.id===e&&n.shift();)t.unsubscribe();throw r}}},pb=new fb(db),hu=new _e(t=>t.complete());function eg(t){return t&&Zt(t.schedule)}function ng(t){return t[t.length-1]}function Zs(t){return eg(ng(t))?t.pop():void 0}function gb(t,e){return typeof ng(t)=="number"?t.pop():e}function mb(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(d){try{u(r.next(d))}catch(f){s(f)}}function l(d){try{u(r.throw(d))}catch(f){s(f)}}function u(d){d.done?o(d.value):i(d.value).then(a,l)}u((r=r.apply(t,e||[])).next())})}function td(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ni(t){return this instanceof ni?(this.v=t,this):new ni(t)}function vb(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(g){return function(m){return Promise.resolve(m).then(g,f)}}function a(g,m){r[g]&&(i[g]=function(b){return new Promise(function(I,A){o.push([g,b,I,A])>1||l(g,b)})},m&&(i[g]=m(i[g])))}function l(g,m){try{u(r[g](m))}catch(b){p(o[0][3],b)}}function u(g){g.value instanceof ni?Promise.resolve(g.value.v).then(d,f):p(o[0][2],g)}function d(g){l("next",g)}function f(g){l("throw",g)}function p(g,m){g(m),o.shift(),o.length&&l(o[0][0],o[0][1])}}function yb(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof td=="function"?td(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(s){return new Promise(function(a,l){s=t[o](s),i(a,l,s.done,s.value)})}}function i(o,s,a,l){Promise.resolve(l).then(function(u){o({value:u,done:a})},s)}}var du=t=>t&&typeof t.length=="number"&&typeof t!="function";function rg(t){return Zt(t?.then)}function ig(t){return Zt(t[au])}function og(t){return Symbol.asyncIterator&&Zt(t?.[Symbol.asyncIterator])}function sg(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function _b(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ag=_b();function lg(t){return Zt(t?.[ag])}function cg(t){return vb(this,arguments,function*(){let e=t.getReader();try{for(;;){let{value:n,done:r}=yield ni(e.read());if(r)return yield ni(void 0);yield yield ni(n)}}finally{e.releaseLock()}})}function ug(t){return Zt(t?.getReader)}function _n(t){if(t instanceof _e)return t;if(t!=null){if(ig(t))return bb(t);if(du(t))return wb(t);if(rg(t))return Eb(t);if(og(t))return hg(t);if(lg(t))return xb(t);if(ug(t))return Sb(t)}throw sg(t)}function bb(t){return new _e(e=>{let n=t[au]();if(Zt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function wb(t){return new _e(e=>{for(let n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Eb(t){return new _e(e=>{t.then(n=>{e.closed||(e.next(n),e.complete())},n=>e.error(n)).then(null,Jp)})}function xb(t){return new _e(e=>{for(let n of t)if(e.next(n),e.closed)return;e.complete()})}function hg(t){return new _e(e=>{Ib(t,e).catch(n=>e.error(n))})}function Sb(t){return hg(cg(t))}function Ib(t,e){var n,r,i,o;return mb(this,void 0,void 0,function*(){try{for(n=yb(t);r=yield n.next(),!r.done;){let s=r.value;if(e.next(s),e.closed)return}}catch(s){i={error:s}}finally{try{r&&!r.done&&(o=n.return)&&(yield o.call(n))}finally{if(i)throw i.error}}e.complete()})}function nr(t,e,n,r=0,i=!1){let o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function dg(t,e=0){return ln((n,r)=>{n.subscribe(qe(r,i=>nr(r,t,()=>r.next(i),e),()=>nr(r,t,()=>r.complete(),e),i=>nr(r,t,()=>r.error(i),e)))})}function fg(t,e=0){return ln((n,r)=>{r.add(t.schedule(()=>n.subscribe(r),e))})}function Cb(t,e){return _n(t).pipe(fg(e),dg(e))}function Tb(t,e){return _n(t).pipe(fg(e),dg(e))}function Ob(t,e){return new _e(n=>{let r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Rb(t,e){return new _e(n=>{let r;return nr(n,e,()=>{r=t[ag](),nr(n,e,()=>{let i,o;try{({value:i,done:o}=r.next())}catch(s){n.error(s);return}o?n.complete():n.next(i)},0,!0)}),()=>Zt(r?.return)&&r.return()})}function pg(t,e){if(!t)throw new Error("Iterable cannot be null");return new _e(n=>{nr(n,e,()=>{let r=t[Symbol.asyncIterator]();nr(n,e,()=>{r.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function Db(t,e){return pg(cg(t),e)}function Nb(t,e){if(t!=null){if(ig(t))return Cb(t,e);if(du(t))return Ob(t,e);if(rg(t))return Tb(t,e);if(og(t))return pg(t,e);if(lg(t))return Rb(t,e);if(ug(t))return Db(t,e)}throw sg(t)}function Ys(t,e){return e?Nb(t,e):_n(t)}function fu(...t){let e=Zs(t);return Ys(t,e)}function kb(t){return t instanceof Date&&!isNaN(t)}function Ks(t,e){return ln((n,r)=>{let i=0;n.subscribe(qe(r,o=>{r.next(t.call(e,o,i++))}))})}var{isArray:Ab}=Array;function Pb(t,e){return Ab(e)?t(...e):t(e)}function Lb(t){return Ks(e=>Pb(t,e))}function Mb(t,e,n,r,i,o,s,a){let l=[],u=0,d=0,f=!1,p=()=>{f&&!l.length&&!u&&e.complete()},g=b=>u<r?m(b):l.push(b),m=b=>{o&&e.next(b),u++;let I=!1;_n(n(b,d++)).subscribe(qe(e,A=>{i?.(A),o?g(A):e.next(A)},()=>{I=!0},void 0,()=>{if(I)try{for(u--;l.length&&u<r;){let A=l.shift();s?nr(e,s,()=>m(A)):m(A)}p()}catch(A){e.error(A)}}))};return t.subscribe(qe(e,g,()=>{f=!0,p()})),()=>{a?.()}}function Wi(t,e,n=1/0){return Zt(e)?Wi((r,i)=>Ks((o,s)=>e(r,o,i,s))(_n(t(r,i))),n):(typeof e=="number"&&(n=e),ln((r,i)=>Mb(r,i,t,n)))}function gg(t=1/0){return Wi(Gs,t)}function jb(){return gg(1)}function ed(...t){return jb()(Ys(t,Zs(t)))}function Vb(t){return new _e(e=>{_n(t()).subscribe(e)})}var Bb=["addListener","removeListener"],Fb=["addEventListener","removeEventListener"],Ub=["on","off"];function Ll(t,e,n,r){if(Zt(n)&&(r=n,n=void 0),r)return Ll(t,e,n).pipe(Lb(r));let[i,o]=zb(t)?Fb.map(s=>a=>t[s](e,a,n)):Hb(t)?Bb.map(nd(t,e)):$b(t)?Ub.map(nd(t,e)):[];if(!i&&du(t))return Wi(s=>Ll(s,e,n))(_n(t));if(!i)throw new TypeError("Invalid event target");return new _e(s=>{let a=(...l)=>s.next(1<l.length?l:l[0]);return i(a),()=>o(a)})}function nd(t,e){return n=>r=>t[n](e,r)}function Hb(t){return Zt(t.addListener)&&Zt(t.removeListener)}function $b(t){return Zt(t.on)&&Zt(t.off)}function zb(t){return Zt(t.addEventListener)&&Zt(t.removeEventListener)}function mg(t=0,e,n=hb){let r=-1;return e!=null&&(eg(e)?n=e:r=e),new _e(i=>{let o=kb(t)?+t-n.now():t;o<0&&(o=0);let s=0;return n.schedule(function(){i.closed||(i.next(s++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function qb(t=0,e=uu){return t<0&&(t=0),mg(t,t,e)}function Js(...t){let e=Zs(t),n=gb(t,1/0),r=t;return r.length?r.length===1?_n(r[0]):gg(n)(Ys(r,e)):hu}function pu(t,e){return ln((n,r)=>{let i=0;n.subscribe(qe(r,o=>t.call(e,o,i++)&&r.next(o)))})}function Wb(t){return ln((e,n)=>{let r=!1,i=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,r){r=!1;let u=i;i=null,n.next(u)}s&&n.complete()},l=()=>{o=null,s&&n.complete()};e.subscribe(qe(n,u=>{r=!0,i=u,o||_n(t(u)).subscribe(o=qe(n,a,l))},()=>{s=!0,(!r||!o||o.closed)&&n.complete()}))})}function vg(t,e=uu){return Wb(()=>mg(t,e))}function Gb(t){return t<=0?()=>hu:ln((e,n)=>{let r=0;e.subscribe(qe(n,i=>{++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function Zb(t,e=Gs){return t=t??Yb,ln((n,r)=>{let i,o=!0;n.subscribe(qe(r,s=>{let a=e(s);(o||!t(i,a))&&(o=!1,i=a,r.next(s))}))})}function Yb(t,e){return t===e}function Kb(t){return pu((e,n)=>t<=n)}function yg(...t){let e=Zs(t);return ln((n,r)=>{(e?ed(t,n,e):ed(t,n)).subscribe(r)})}function _g(t,e){return ln((n,r)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&r.complete();n.subscribe(qe(r,l=>{i?.unsubscribe();let u=0,d=o++;_n(t(l,d)).subscribe(i=qe(r,f=>r.next(e?e(l,f,d,u++):f),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function ai(t){return ln((e,n)=>{_n(t).subscribe(qe(n,()=>n.complete(),kl)),!n.closed&&e.subscribe(n)})}function Jb(t,e,n){let r=Zt(t)||e||n?{next:t,error:e,complete:n}:t;return r?ln((i,o)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;i.subscribe(qe(o,l=>{var u;(u=r.next)===null||u===void 0||u.call(r,l),o.next(l)},()=>{var l;a=!1,(l=r.complete)===null||l===void 0||l.call(r),o.complete()},l=>{var u;a=!1,(u=r.error)===null||u===void 0||u.call(r,l),o.error(l)},()=>{var l,u;a&&((l=r.unsubscribe)===null||l===void 0||l.call(r)),(u=r.finalize)===null||u===void 0||u.call(r)}))}):Gs}var bg="https://g.co/ng/security#xss",Lt=class extends Error{code;constructor(t,e){super(Qb(t,e)),this.code=t}};function Qb(t,e){return`${`NG0${Math.abs(t)}`}${e?": "+e:""}`}function gu(t){return{toString:t}.toString()}var Gi=globalThis;function Xt(t){for(let e in t)if(t[e]===Xt)return e;throw Error("Could not find renamed property on target object.")}function Xb(t,e){for(let n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function dn(t){if(typeof t=="string")return t;if(Array.isArray(t))return`[${t.map(dn).join(", ")}]`;if(t==null)return""+t;let e=t.overriddenName||t.name;if(e)return`${e}`;let n=t.toString();if(n==null)return""+n;let r=n.indexOf(`
|
|
4
|
+
`);return r>=0?n.slice(0,r):n}function rd(t,e){return t?e?`${t} ${e}`:t:e||""}var tw=Xt({__forward_ref__:Xt});function wg(t){return t.__forward_ref__=wg,t.toString=function(){return dn(this())},t}function Ae(t){return Eg(t)?t():t}function Eg(t){return typeof t=="function"&&t.hasOwnProperty(tw)&&t.__forward_ref__===wg}function ut(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function mu(t){return id(t,xg)||id(t,Sg)}function id(t,e){return t.hasOwnProperty(e)?t[e]:null}function ew(t){return t&&(t[xg]||t[Sg])||null}function od(t){return t&&(t.hasOwnProperty(sd)||t.hasOwnProperty(nw))?t[sd]:null}var xg=Xt({\u0275prov:Xt}),sd=Xt({\u0275inj:Xt}),Sg=Xt({ngInjectableDef:Xt}),nw=Xt({ngInjectorDef:Xt}),Et=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(t,e){this._desc=t,this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=ut({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Ig(t){return t&&!!t.\u0275providers}var rw=Xt({\u0275cmp:Xt}),iw=Xt({\u0275dir:Xt}),Cg=Xt({\u0275pipe:Xt}),ps=Xt({\u0275fac:Xt}),Bi=Xt({__NG_ELEMENT_ID__:Xt}),ad=Xt({__NG_ENV_ID__:Xt});function fo(t){return typeof t=="string"?t:t==null?"":String(t)}function ow(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():fo(t)}function sw(t,e){throw new Lt(-200,t)}function vu(t,e){throw new Lt(-201,!1)}var Rt=function(t){return 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}(Rt||{}),Ml;function Tg(){return Ml}function Be(t){let e=Ml;return Ml=t,e}function Og(t,e,n){let r=mu(t);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&Rt.Optional)return null;if(e!==void 0)return e;vu(t,"Injector")}var aw={},Zi=aw,lw="__NG_DI_FLAG__",gs="ngTempTokenPath",cw="ngTokenPath",uw=/\n/gm,hw="\u0275",ld="__source",ri;function dw(){return ri}function Yn(t){let e=ri;return ri=t,e}function fw(t,e=Rt.Default){if(ri===void 0)throw new Lt(-203,!1);return ri===null?Og(t,void 0,e):ri.get(t,e&Rt.Optional?null:void 0,e)}function Bt(t,e=Rt.Default){return(Tg()||fw)(Ae(t),e)}function N(t,e=Rt.Default){return Bt(t,Qs(e))}function Qs(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function jl(t){let e=[];for(let n=0;n<t.length;n++){let r=Ae(t[n]);if(Array.isArray(r)){if(r.length===0)throw new Lt(900,!1);let i,o=Rt.Default;for(let s=0;s<r.length;s++){let a=r[s],l=pw(a);typeof l=="number"?l===-1?i=a.token:o|=l:i=a}e.push(Bt(i,o))}else e.push(Bt(r))}return e}function pw(t){return t[lw]}function gw(t,e,n,r){let i=t[gs];throw e[ld]&&i.unshift(e[ld]),t.message=mw(`
|
|
5
|
+
`+t.message,i,n,r),t[cw]=i,t[gs]=null,t}function mw(t,e,n,r=null){t=t&&t.charAt(0)===`
|
|
6
|
+
`&&t.charAt(1)==hw?t.slice(2):t;let i=dn(e);if(Array.isArray(e))i=e.map(dn).join(" -> ");else if(typeof e=="object"){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):dn(a)))}i=`{${o.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${t.replace(uw,`
|
|
7
|
+
`)}`}function Cr(t,e){return t.hasOwnProperty(ps)?t[ps]:null}function vw(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){let i=t[r],o=e[r];if(n&&(i=n(i),o=n(o)),o!==i)return!1}return!0}function yw(t){return t.flat(Number.POSITIVE_INFINITY)}function yu(t,e){t.forEach(n=>Array.isArray(n)?yu(n,e):e(n))}function Rg(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function ms(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function _w(t,e,n,r){let i=t.length;if(i==e)t.push(n,r);else if(i===1)t.push(r,t[0]),t[0]=n;else{for(i--,t.push(t[i-1],t[i]);i>e;){let o=i-2;t[i]=t[o],i--}t[e]=n,t[e+1]=r}}function bw(t,e,n){let r=po(t,e);return r>=0?t[r|1]=n:(r=~r,_w(t,r,e,n)),r}function Wa(t,e){let n=po(t,e);if(n>=0)return t[n|1]}function po(t,e){return ww(t,e,1)}function ww(t,e,n){let r=0,i=t.length>>n;for(;i!==r;){let o=r+(i-r>>1),s=t[o<<n];if(e===s)return o<<n;s>e?i=o:r=o+1}return~(i<<n)}var Tr={},jn=[],vs=new Et(""),Dg=new Et("",-1),Ng=new Et(""),kg=class{get(t,e=Zi){if(e===Zi){let n=new Error(`NullInjectorError: No provider for ${dn(t)}!`);throw n.name="NullInjectorError",n}return e}};function Or(t){return t[rw]||null}function Ag(t){return t[iw]||null}function Pg(t){return t[Cg]||null}function Ew(t){let e=Or(t)||Ag(t)||Pg(t);return e!==null&&e.standalone}function xw(t){return{\u0275providers:t}}function Sw(...t){return{\u0275providers:Lg(!0,t),\u0275fromNgModule:!0}}function Lg(t,...e){let n=[],r=new Set,i,o=s=>{n.push(s)};return yu(e,s=>{let a=s;Vl(a,o,[],r)&&(i||=[],i.push(a))}),i!==void 0&&Mg(i,o),n}function Mg(t,e){for(let n=0;n<t.length;n++){let{ngModule:r,providers:i}=t[n];_u(i,o=>{e(o,r)})}}function Vl(t,e,n,r){if(t=Ae(t),!t)return!1;let i=null,o=od(t),s=!o&&Or(t);if(!o&&!s){let l=t.ngModule;if(o=od(l),o)i=l;else return!1}else{if(s&&!s.standalone)return!1;i=t}let a=r.has(i);if(s){if(a)return!1;if(r.add(i),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let u of l)Vl(u,e,n,r)}}else if(o){if(o.imports!=null&&!a){r.add(i);let u;try{yu(o.imports,d=>{Vl(d,e,n,r)&&(u||=[],u.push(d))})}finally{}u!==void 0&&Mg(u,e)}if(!a){let u=Cr(i)||(()=>new i);e({provide:i,useFactory:u,deps:jn},i),e({provide:Ng,useValue:i,multi:!0},i),e({provide:vs,useValue:()=>Bt(i),multi:!0},i)}let l=o.providers;if(l!=null&&!a){let u=t;_u(l,d=>{e(d,u)})}}else return!1;return i!==t&&t.providers!==void 0}function _u(t,e){for(let n of t)Ig(n)&&(n=n.\u0275providers),Array.isArray(n)?_u(n,e):e(n)}var Iw=Xt({provide:String,useValue:Xt});function jg(t){return t!==null&&typeof t=="object"&&Iw in t}function Cw(t){return!!(t&&t.useExisting)}function Tw(t){return!!(t&&t.useFactory)}function li(t){return typeof t=="function"}function Ow(t){return!!t.useClass}var bu=new Et(""),ts={},Rw={},Ga;function Xs(){return Ga===void 0&&(Ga=new kg),Ga}var Vn=class{},wu=class extends Vn{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,e,n,r){super(),this.parent=e,this.source=n,this.scopes=r,Fl(t,o=>this.processProvider(o)),this.records.set(Dg,Kr(void 0,this)),r.has("environment")&&this.records.set(Vn,Kr(void 0,this));let i=this.records.get(bu);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Ng,jn,Rt.Self))}destroy(){Pi(this),this._destroyed=!0;let t=Ot(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of e)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),Ot(t)}}onDestroy(t){return Pi(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){Pi(this);let e=Yn(this),n=Be(void 0),r;try{return t()}finally{Yn(e),Be(n)}}get(t,e=Zi,n=Rt.Default){if(Pi(this),t.hasOwnProperty(ad))return t[ad](this);n=Qs(n);let r,i=Yn(this),o=Be(void 0);try{if(!(n&Rt.SkipSelf)){let a=this.records.get(t);if(a===void 0){let l=Pw(t)&&mu(t);l&&this.injectableDefInScope(l)?a=Kr(Bl(t),ts):a=null,this.records.set(t,a)}if(a!=null)return this.hydrate(t,a)}let s=n&Rt.Self?Xs():this.parent;return e=n&Rt.Optional&&e===Zi?null:e,s.get(t,e)}catch(s){if(s.name==="NullInjectorError"){if((s[gs]=s[gs]||[]).unshift(dn(t)),i)throw s;return gw(s,t,"R3InjectorError",this.source)}else throw s}finally{Be(o),Yn(i)}}resolveInjectorInitializers(){let t=Ot(null),e=Yn(this),n=Be(void 0),r;try{let i=this.get(vs,jn,Rt.Self);for(let o of i)o()}finally{Yn(e),Be(n),Ot(t)}}toString(){let t=[],e=this.records;for(let n of e.keys())t.push(dn(n));return`R3Injector[${t.join(", ")}]`}processProvider(t){t=Ae(t);let e=li(t)?t:Ae(t&&t.provide),n=Nw(t);if(!li(t)&&t.multi===!0){let r=this.records.get(e);r||(r=Kr(void 0,ts,!0),r.factory=()=>jl(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){let n=Ot(null);try{return e.value===ts&&(e.value=Rw,e.value=e.factory()),typeof e.value=="object"&&e.value&&Aw(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{Ot(n)}}injectableDefInScope(t){if(!t.providedIn)return!1;let e=Ae(t.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(t){let e=this._onDestroyHooks.indexOf(t);e!==-1&&this._onDestroyHooks.splice(e,1)}};function Bl(t){let e=mu(t),n=e!==null?e.factory:Cr(t);if(n!==null)return n;if(t instanceof Et)throw new Lt(204,!1);if(t instanceof Function)return Dw(t);throw new Lt(204,!1)}function Dw(t){if(t.length>0)throw new Lt(204,!1);let e=ew(t);return e!==null?()=>e.factory(t):()=>new t}function Nw(t){if(jg(t))return Kr(void 0,t.useValue);{let e=Vg(t);return Kr(e,ts)}}function Vg(t,e,n){let r;if(li(t)){let i=Ae(t);return Cr(i)||Bl(i)}else if(jg(t))r=()=>Ae(t.useValue);else if(Tw(t))r=()=>t.useFactory(...jl(t.deps||[]));else if(Cw(t))r=()=>Bt(Ae(t.useExisting));else{let i=Ae(t&&(t.useClass||t.provide));if(kw(t))r=()=>new i(...jl(t.deps));else return Cr(i)||Bl(i)}return r}function Pi(t){if(t.destroyed)throw new Lt(205,!1)}function Kr(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function kw(t){return!!t.deps}function Aw(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function Pw(t){return typeof t=="function"||typeof t=="object"&&t instanceof Et}function Fl(t,e){for(let n of t)Array.isArray(n)?Fl(n,e):n&&Ig(n)?Fl(n.\u0275providers,e):e(n)}function Bg(t,e){t instanceof wu&&Pi(t);let n,r=Yn(t),i=Be(void 0);try{return e()}finally{Yn(r),Be(i)}}function Fg(){return Tg()!==void 0||dw()!=null}function Ug(t){if(!Fg())throw new Lt(-203,!1)}function Lw(t){return typeof t=="function"}var $n=0,ct=1,ht=2,De=3,fn=4,bn=5,Yi=6,ys=7,ce=8,Ki=9,Bn=10,be=11,Ji=12,cd=13,mi=14,vn=15,Rr=16,Jr=17,Fn=18,go=19,Hg=20,rr=21,Za=22,_s=23,ze=24,ii=25,ae=26,$g=1,Dr=7,bs=8,ci=9,Re=10;function Ln(t){return Array.isArray(t)&&typeof t[$g]=="object"}function zn(t){return Array.isArray(t)&&t[$g]===!0}function Eu(t){return(t.flags&4)!==0}function vi(t){return t.componentOffset>-1}function ta(t){return(t.flags&1)===1}function Tn(t){return!!t.template}function ws(t){return(t[ht]&512)!==0}function mo(t){return(t[ht]&256)===256}var Mw=class{previousValue;currentValue;firstChange;constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}};function zg(t,e,n,r){e!==null?e.applyValueToInputSignal(e,r):t[n]=r}var qg=(()=>{let t=()=>Wg;return t.ngInherit=!0,t})();function Wg(t){return t.type.prototype.ngOnChanges&&(t.setInput=Vw),jw}function jw(){let t=Zg(this),e=t?.current;if(e){let n=t.previous;if(n===Tr)t.previous=e;else for(let r in e)n[r]=e[r];t.current=null,this.ngOnChanges(e)}}function Vw(t,e,n,r,i){let o=this.declaredInputs[r],s=Zg(t)||Bw(t,{previous:Tr,current:null}),a=s.current||(s.current={}),l=s.previous,u=l[o];a[o]=new Mw(u&&u.currentValue,n,l===Tr),zg(t,e,i,n)}var Gg="__ngSimpleChanges__";function Zg(t){return t[Gg]||null}function Bw(t,e){return t[Gg]=e}var Fw=null,qt=function(t,e=null,n){Fw?.(t,e,n)},Yg="svg",Uw="math";function We(t){for(;Array.isArray(t);)t=t[$n];return t}function Kg(t,e){return We(e[t])}function Rn(t,e){return We(e[t.index])}function xu(t,e){return t.data[e]}function ea(t,e){return t[e]}function rn(t,e){let n=e[t];return Ln(n)?n:n[$n]}function Hw(t){return(t[ht]&4)===4}function Su(t){return(t[ht]&128)===128}function $w(t){return zn(t[De])}function sr(t,e){return e==null?null:t[e]}function Jg(t){t[Jr]=0}function Iu(t){t[ht]&1024||(t[ht]|=1024,Su(t)&&vo(t))}function zw(t,e){for(;t>0;)e=e[mi],t--;return e}function na(t){return!!(t[ht]&9216||t[ze]?.dirty)}function Ul(t){t[Bn].changeDetectionScheduler?.notify(8),t[ht]&64&&(t[ht]|=1024),na(t)&&vo(t)}function vo(t){t[Bn].changeDetectionScheduler?.notify(0);let e=Nr(t);for(;e!==null&&!(e[ht]&8192||(e[ht]|=8192,!Su(e)));)e=Nr(e)}function Qg(t,e){if(mo(t))throw new Lt(911,!1);t[rr]===null&&(t[rr]=[]),t[rr].push(e)}function qw(t,e){if(t[rr]===null)return;let n=t[rr].indexOf(e);n!==-1&&t[rr].splice(n,1)}function Nr(t){let e=t[De];return zn(e)?e[De]:e}function Xg(t){return t[ys]??=[]}function tm(t){return t.cleanup??=[]}function Ww(t,e,n,r){let i=Xg(e);i.push(n),t.firstCreatePass&&tm(t).push(r,i.length-1)}var mt={lFrame:lm(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Hl=!1;function Gw(){return mt.lFrame.elementDepthCount}function Zw(){mt.lFrame.elementDepthCount++}function Yw(){mt.lFrame.elementDepthCount--}function Cu(){return mt.bindingsEnabled}function Kw(){return mt.skipHydrationRootTNode!==null}function Jw(t){return mt.skipHydrationRootTNode===t}function Qw(){mt.skipHydrationRootTNode=null}function wt(){return mt.lFrame.lView}function ge(){return mt.lFrame.tView}function we(t){return mt.lFrame.contextLView=t,t[ce]}function Ee(t){return mt.lFrame.contextLView=null,t}function Ze(){let t=em();for(;t!==null&&t.type===64;)t=t.parent;return t}function em(){return mt.lFrame.currentTNode}function Xw(){let t=mt.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function ur(t,e){let n=mt.lFrame;n.currentTNode=t,n.isParent=e}function Tu(){return mt.lFrame.isParent}function nm(){mt.lFrame.isParent=!1}function rm(){return mt.lFrame.contextLView}function im(){return Hl}function ud(t){let e=Hl;return Hl=t,e}function Ou(){let t=mt.lFrame,e=t.bindingRootIndex;return e===-1&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function t1(t){return mt.lFrame.bindingIndex=t}function yo(){return mt.lFrame.bindingIndex++}function e1(t){let e=mt.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function n1(){return mt.lFrame.inI18n}function r1(t,e){let n=mt.lFrame;n.bindingIndex=n.bindingRootIndex=t,$l(e)}function i1(){return mt.lFrame.currentDirectiveIndex}function $l(t){mt.lFrame.currentDirectiveIndex=t}function o1(t){let e=mt.lFrame.currentDirectiveIndex;return e===-1?null:t[e]}function om(){return mt.lFrame.currentQueryIndex}function Ru(t){mt.lFrame.currentQueryIndex=t}function s1(t){let e=t[ct];return e.type===2?e.declTNode:e.type===1?t[bn]:null}function sm(t,e,n){if(n&Rt.SkipSelf){let i=e,o=t;for(;(i=i.parent,i===null&&!(n&Rt.Host))&&(i=s1(o),!(i===null||(o=o[mi],i.type&10))););if(i===null)return!1;e=i,t=o}let r=mt.lFrame=am();return r.currentTNode=e,r.lView=t,!0}function Du(t){let e=am(),n=t[ct];mt.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function am(){let t=mt.lFrame,e=t===null?null:t.child;return e===null?lm(t):e}function lm(t){let e={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:t,child:null,inI18n:!1};return t!==null&&(t.child=e),e}function cm(){let t=mt.lFrame;return mt.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var um=cm;function Nu(){let t=cm();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function a1(t){return(mt.lFrame.contextLView=zw(t,mt.lFrame.contextLView))[ce]}function hr(){return mt.lFrame.selectedIndex}function kr(t){mt.lFrame.selectedIndex=t}function ku(){let t=mt.lFrame;return xu(t.tView,t.selectedIndex)}function ar(){mt.lFrame.currentNamespace=Yg}function Es(){l1()}function l1(){mt.lFrame.currentNamespace=null}function c1(){return mt.lFrame.currentNamespace}var hm=!0;function ra(){return hm}function ia(t){hm=t}function u1(t,e,n){let{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=e.type.prototype;if(r){let s=Wg(e);(n.preOrderHooks??=[]).push(t,s),(n.preOrderCheckHooks??=[]).push(t,s)}i&&(n.preOrderHooks??=[]).push(0-t,i),o&&((n.preOrderHooks??=[]).push(t,o),(n.preOrderCheckHooks??=[]).push(t,o))}function Au(t,e){for(let n=e.directiveStart,r=e.directiveEnd;n<r;n++){let i=t.data[n].type.prototype,{ngAfterContentInit:o,ngAfterContentChecked:s,ngAfterViewInit:a,ngAfterViewChecked:l,ngOnDestroy:u}=i;o&&(t.contentHooks??=[]).push(-n,o),s&&((t.contentHooks??=[]).push(n,s),(t.contentCheckHooks??=[]).push(n,s)),a&&(t.viewHooks??=[]).push(-n,a),l&&((t.viewHooks??=[]).push(n,l),(t.viewCheckHooks??=[]).push(n,l)),u!=null&&(t.destroyHooks??=[]).push(n,u)}}function es(t,e,n){dm(t,e,3,n)}function ns(t,e,n,r){(t[ht]&3)===n&&dm(t,e,n,r)}function Ya(t,e){let n=t[ht];(n&3)===e&&(n&=16383,n+=1,t[ht]=n)}function dm(t,e,n,r){let i=r!==void 0?t[Jr]&65535:0,o=r??-1,s=e.length-1,a=0;for(let l=i;l<s;l++)if(typeof e[l+1]=="number"){if(a=e[l],r!=null&&a>=r)break}else e[l]<0&&(t[Jr]+=65536),(a<o||o==-1)&&(h1(t,n,e,l),t[Jr]=(t[Jr]&4294901760)+l+2),l++}function hd(t,e){qt(4,t,e);let n=Ot(null);try{e.call(t)}finally{Ot(n),qt(5,t,e)}}function h1(t,e,n,r){let i=n[r]<0,o=n[r+1],s=i?-n[r]:n[r],a=t[s];i?t[ht]>>14<t[Jr]>>16&&(t[ht]&3)===e&&(t[ht]+=16384,hd(a,o)):hd(a,o)}var oi=-1,_o=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(t,e,n){this.factory=t,this.canSeeViewProviders=e,this.injectImpl=n}};function d1(t){return t instanceof _o}function f1(t){return(t.flags&8)!==0}function p1(t){return(t.flags&16)!==0}function g1(t,e,n){let r=0;for(;r<n.length;){let i=n[r];if(typeof i=="number"){if(i!==0)break;r++;let o=n[r++],s=n[r++],a=n[r++];t.setAttribute(e,s,a,o)}else{let o=i,s=n[++r];v1(o)?t.setProperty(e,o,s):t.setAttribute(e,o,s),r++}}return r}function m1(t){return t===3||t===4||t===6}function v1(t){return t.charCodeAt(0)===64}function ui(t,e){if(!(e===null||e.length===0))if(t===null||t.length===0)t=e.slice();else{let n=-1;for(let r=0;r<e.length;r++){let i=e[r];typeof i=="number"?n=i:n===0||(n===-1||n===2?dd(t,n,i,null,e[++r]):dd(t,n,i,null,null))}}return t}function dd(t,e,n,r,i){let o=0,s=t.length;if(e===-1)s=-1;else for(;o<t.length;){let a=t[o++];if(typeof a=="number"){if(a===e){s=-1;break}else if(a>e){s=o-1;break}}}for(;o<t.length;){let a=t[o];if(typeof a=="number")break;if(a===n){if(r===null){i!==null&&(t[o+1]=i);return}else if(r===t[o+1]){t[o+2]=i;return}}o++,r!==null&&o++,i!==null&&o++}s!==-1&&(t.splice(s,0,e),o=s+1),t.splice(o++,0,n),r!==null&&t.splice(o++,0,r),i!==null&&t.splice(o++,0,i)}var Ka={},y1=class{injector;parentInjector;constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=Qs(n);let r=this.injector.get(t,Ka,n);return r!==Ka||e===Ka?r:this.parentInjector.get(t,e,n)}};function fm(t){return t!==oi}function xs(t){return t&32767}function _1(t){return t>>16}function Ss(t,e){let n=_1(t),r=e;for(;n>0;)r=r[mi],n--;return r}var zl=!0;function Is(t){let e=zl;return zl=t,e}var b1=256,pm=b1-1,gm=5,w1=0,In={};function E1(t,e,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(Bi)&&(r=n[Bi]),r==null&&(r=n[Bi]=w1++);let i=r&pm,o=1<<i;e.data[t+(i>>gm)]|=o}function Cs(t,e){let n=mm(t,e);if(n!==-1)return n;let r=e[ct];r.firstCreatePass&&(t.injectorIndex=e.length,Ja(r.data,t),Ja(e,null),Ja(r.blueprint,null));let i=Pu(t,e),o=t.injectorIndex;if(fm(i)){let s=xs(i),a=Ss(i,e),l=a[ct].data;for(let u=0;u<8;u++)e[o+u]=a[s+u]|l[s+u]}return e[o+8]=i,o}function Ja(t,e){t.push(0,0,0,0,0,0,0,0,e)}function mm(t,e){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||e[t.injectorIndex+8]===null?-1:t.injectorIndex}function Pu(t,e){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let n=0,r=null,i=e;for(;i!==null;){if(r=Em(i),r===null)return oi;if(n++,i=i[mi],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return oi}function ql(t,e,n){E1(t,e,n)}function vm(t,e,n){if(n&Rt.Optional||t!==void 0)return t;vu(e,"NodeInjector")}function ym(t,e,n,r){if(n&Rt.Optional&&r===void 0&&(r=null),(n&(Rt.Self|Rt.Host))===0){let i=t[Ki],o=Be(void 0);try{return i?i.get(e,r,n&Rt.Optional):Og(e,r,n&Rt.Optional)}finally{Be(o)}}return vm(r,e,n)}function _m(t,e,n,r=Rt.Default,i){if(t!==null){if(e[ht]&2048&&!(r&Rt.Self)){let s=C1(t,e,n,r,In);if(s!==In)return s}let o=bm(t,e,n,r,In);if(o!==In)return o}return ym(e,n,r,i)}function bm(t,e,n,r,i){let o=S1(n);if(typeof o=="function"){if(!sm(e,t,r))return r&Rt.Host?vm(i,n,r):ym(e,n,r,i);try{let s;if(s=o(r),s==null&&!(r&Rt.Optional))vu(n);else return s}finally{um()}}else if(typeof o=="number"){let s=null,a=mm(t,e),l=oi,u=r&Rt.Host?e[vn][bn]:null;for((a===-1||r&Rt.SkipSelf)&&(l=a===-1?Pu(t,e):e[a+8],l===oi||!pd(r,!1)?a=-1:(s=e[ct],a=xs(l),e=Ss(l,e)));a!==-1;){let d=e[ct];if(fd(o,a,d.data)){let f=x1(a,e,n,s,r,u);if(f!==In)return f}l=e[a+8],l!==oi&&pd(r,e[ct].data[a+8]===u)&&fd(o,a,e)?(s=d,a=xs(l),e=Ss(l,e)):a=-1}}return i}function x1(t,e,n,r,i,o){let s=e[ct],a=s.data[t+8],l=r==null?vi(a)&&zl:r!=s&&(a.type&3)!==0,u=i&Rt.Host&&o===a,d=rs(a,s,n,l,u);return d!==null?Qi(e,s,d,a):In}function rs(t,e,n,r,i){let o=t.providerIndexes,s=e.data,a=o&1048575,l=t.directiveStart,u=t.directiveEnd,d=o>>20,f=r?a:a+d,p=i?a+d:u;for(let g=f;g<p;g++){let m=s[g];if(g<l&&n===m||g>=l&&m.type===n)return g}if(i){let g=s[l];if(g&&Tn(g)&&g.type===n)return l}return null}function Qi(t,e,n,r){let i=t[n],o=e.data;if(d1(i)){let s=i;s.resolving&&sw(ow(o[n]));let a=Is(s.canSeeViewProviders);s.resolving=!0;let l,u=s.injectImpl?Be(s.injectImpl):null,d=sm(t,r,Rt.Default);try{i=t[n]=s.factory(void 0,o,t,r),e.firstCreatePass&&n>=r.directiveStart&&u1(n,o[n],e)}finally{u!==null&&Be(u),Is(a),s.resolving=!1,um()}}return i}function S1(t){if(typeof t=="string")return t.charCodeAt(0)||0;let e=t.hasOwnProperty(Bi)?t[Bi]:void 0;return typeof e=="number"?e>=0?e&pm:I1:e}function fd(t,e,n){let r=1<<t;return!!(n[e+(t>>gm)]&r)}function pd(t,e){return!(t&Rt.Self)&&!(t&Rt.Host&&e)}var Fi=class{_tNode;_lView;constructor(t,e){this._tNode=t,this._lView=e}get(t,e,n){return _m(this._tNode,this._lView,t,Qs(n),e)}};function I1(){return new Fi(Ze(),wt())}function wm(t){return gu(()=>{let e=t.prototype.constructor,n=e[ps]||Wl(e),r=Object.prototype,i=Object.getPrototypeOf(t.prototype).constructor;for(;i&&i!==r;){let o=i[ps]||Wl(i);if(o&&o!==n)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function Wl(t){return Eg(t)?()=>{let e=Wl(Ae(t));return e&&e()}:Cr(t)}function C1(t,e,n,r,i){let o=t,s=e;for(;o!==null&&s!==null&&s[ht]&2048&&!ws(s);){let a=bm(o,s,n,r|Rt.Self,In);if(a!==In)return a;let l=o.parent;if(!l){let u=s[Hg];if(u){let d=u.get(n,In,r);if(d!==In)return d}l=Em(s),s=s[mi]}o=l}return i}function Em(t){let e=t[ct],n=e.type;return n===2?e.declTNode:n===1?t[bn]:null}function gd(t,e=null,n=null,r){let i=T1(t,e,n,r);return i.resolveInjectorInitializers(),i}function T1(t,e=null,n=null,r,i=new Set){let o=[n||jn,Sw(t)];return r=r||(typeof t=="object"?void 0:dn(t)),new wu(o,e||Xs(),r||null,i)}var Pe=class xm{static THROW_IF_NOT_FOUND=Zi;static NULL=new kg;static create(e,n){if(Array.isArray(e))return gd({name:""},n,e,"");{let r=e.name??"";return gd({name:r},e.parent,e.providers,r)}}static \u0275prov=ut({token:xm,providedIn:"any",factory:()=>Bt(Dg)});static __NG_ELEMENT_ID__=-1},O1=new Et("");O1.__NG_ELEMENT_ID__=t=>{let e=Ze();if(e===null)throw new Lt(204,!1);if(e.type&2)return e.value;if(t&Rt.Optional)return null;throw new Lt(204,!1)};var Sm=!1,Lu=(()=>{class t{static __NG_ELEMENT_ID__=D1;static __NG_ENV_ID__=n=>n}return t})(),R1=class extends Lu{_lView;constructor(t){super(),this._lView=t}onDestroy(t){return Qg(this._lView,t),()=>qw(this._lView,t)}};function D1(){return new R1(wt())}var yi=class{},Mu=new Et("",{providedIn:"root",factory:()=>!1}),Im=new Et(""),ju=new Et(""),oa=(()=>{class t{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new lu(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=ut({token:t,providedIn:"root",factory:()=>new t})}return t})(),N1=class extends dt{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,Fg()&&(this.destroyRef=N(Lu,{optional:!0})??void 0,this.pendingTasks=N(oa,{optional:!0})??void 0)}emit(t){let e=Ot(null);try{super.next(t)}finally{Ot(e)}}subscribe(t,e,n){let r=t,i=e||(()=>null),o=n;if(t&&typeof t=="object"){let a=t;r=a.next?.bind(a),i=a.error?.bind(a),o=a.complete?.bind(a)}this.__isAsync&&(i=this.wrapInTimeout(i),r&&(r=this.wrapInTimeout(r)),o&&(o=this.wrapInTimeout(o)));let s=super.subscribe({next:r,error:i,complete:o});return t instanceof ye&&t.add(s),s}wrapInTimeout(t){return e=>{let n=this.pendingTasks?.add();setTimeout(()=>{t(e),n!==void 0&&this.pendingTasks?.remove(n)})}}},ee=N1;function Ts(...t){}function Cm(t){let e,n;function r(){t=Ts;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),e!==void 0&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{t(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{t(),r()})),()=>r()}function md(t){return queueMicrotask(()=>t()),()=>{t=Ts}}var Vu="isAngularZone",Os=Vu+"_ID",k1=0,Yt=class Gl{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new ee(!1);onMicrotaskEmpty=new ee(!1);onStable=new ee(!1);onError=new ee(!1);constructor(e){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:o=Sm}=e;if(typeof Zone>"u")throw new Lt(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!i&&r,s.shouldCoalesceRunChangeDetection=i,s.callbackScheduled=!1,s.scheduleInRootZone=o,L1(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Vu)===!0}static assertInAngularZone(){if(!Gl.isInAngularZone())throw new Lt(909,!1)}static assertNotInAngularZone(){if(Gl.isInAngularZone())throw new Lt(909,!1)}run(e,n,r){return this._inner.run(e,n,r)}runTask(e,n,r,i){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,e,A1,Ts,Ts);try{return o.runTask(s,n,r)}finally{o.cancelTask(s)}}runGuarded(e,n,r){return this._inner.runGuarded(e,n,r)}runOutsideAngular(e){return this._outer.run(e)}},A1={};function Bu(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function P1(t){if(t.isCheckStableRunning||t.callbackScheduled)return;t.callbackScheduled=!0;function e(){Cm(()=>{t.callbackScheduled=!1,Zl(t),t.isCheckStableRunning=!0,Bu(t),t.isCheckStableRunning=!1})}t.scheduleInRootZone?Zone.root.run(()=>{e()}):t._outer.run(()=>{e()}),Zl(t)}function L1(t){let e=()=>{P1(t)},n=k1++;t._inner=t._inner.fork({name:"angular",properties:{[Vu]:!0,[Os]:n,[Os+n]:!0},onInvokeTask:(r,i,o,s,a,l)=>{if(M1(l))return r.invokeTask(o,s,a,l);try{return vd(t),r.invokeTask(o,s,a,l)}finally{(t.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&e(),yd(t)}},onInvoke:(r,i,o,s,a,l,u)=>{try{return vd(t),r.invoke(o,s,a,l,u)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!j1(l)&&e(),yd(t)}},onHasTask:(r,i,o,s)=>{r.hasTask(o,s),i===o&&(s.change=="microTask"?(t._hasPendingMicrotasks=s.microTask,Zl(t),Bu(t)):s.change=="macroTask"&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,i,o,s)=>(r.handleError(o,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}function Zl(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function vd(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function yd(t){t._nesting--,Bu(t)}var Tm=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new ee;onMicrotaskEmpty=new ee;onStable=new ee;onError=new ee;run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,r){return t.apply(e,n)}};function M1(t){return Om(t,"__ignore_ng_zone__")}function j1(t){return Om(t,"__scheduler_tick__")}function Om(t,e){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[e]===!0}var _i=class{_console=console;handleError(t){this._console.error("ERROR",t)}},V1=new Et("",{providedIn:"root",factory:()=>{let t=N(Yt),e=N(_i);return n=>t.runOutsideAngular(()=>e.handleError(n))}});function B1(){return bi(Ze(),wt())}function bi(t,e){return new He(Rn(t,e))}var He=(()=>{class t{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=B1}return t})();function F1(t){return t instanceof He?t.nativeElement:t}function ir(t,e){let n=q0(t),r=n[er];return e?.equal&&(r.equal=e.equal),n.set=i=>Gp(r,i),n.update=i=>W0(r,i),n.asReadonly=U1.bind(n),n}function U1(){let t=this[er];if(t.readonlyFn===void 0){let e=()=>this();e[er]=t,t.readonlyFn=e}return t.readonlyFn}function H1(){return this._results[Symbol.iterator]()}var $1=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new dt}constructor(t=!1){this._emitDistinctChangesOnly=t}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,e){return this._results.reduce(t,e)}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,e){this.dirty=!1;let n=yw(t);(this._changesDetected=!vw(this._results,n,e))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=H1};function Rm(t){return(t.flags&128)===128}var Dm=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}(Dm||{}),Fu=new Map,z1=0;function q1(){return z1++}function W1(t){Fu.set(t[go],t)}function Nm(t){return Fu.get(t)||null}function Yl(t){Fu.delete(t[go])}var G1=class{lViewId;nodeIndex;native;component;directives;localRefs;get lView(){return Nm(this.lViewId)}constructor(t,e,n){this.lViewId=t,this.nodeIndex=e,this.native=n}};function Z1(t){let e=Qa(t);if(e){if(Ln(e)){let n=e,r,i,o;if(km(t)){if(r=J1(n,t),r==-1)throw new Error("The provided component was not found in the application");i=t}else if(Y1(t)){if(r=Q1(n,t),r==-1)throw new Error("The provided directive was not found in the application");o=X1(r,n)}else if(r=bd(n,t),r==-1)return null;let s=We(n[r]),a=Qa(s),l=a&&!Array.isArray(a)?a:_d(n,r,s);if(i&&l.component===void 0&&(l.component=i,Cn(l.component,l)),o&&l.directives===void 0){l.directives=o;for(let u=0;u<o.length;u++)Cn(o[u],l)}Cn(l.native,l),e=l}}else{let n=t,r=n;for(;r=r.parentNode;){let i=Qa(r);if(i){let o=Array.isArray(i)?i:i.lView;if(!o)return null;let s=bd(o,n);if(s>=0){let a=We(o[s]),l=_d(o,s,a);Cn(a,l),e=l;break}}}}return e||null}function _d(t,e,n){return new G1(t[go],e,n)}var Kl="__ngContext__";function Cn(t,e){Ln(e)?(t[Kl]=e[go],W1(e)):t[Kl]=e}function Qa(t){let e=t[Kl];return typeof e=="number"?Nm(e):e||null}function km(t){return t&&t.constructor&&t.constructor.\u0275cmp}function Y1(t){return t&&t.constructor&&t.constructor.\u0275dir}function bd(t,e){let n=t[ct];for(let r=ae;r<n.bindingStartIndex;r++)if(We(t[r])===e)return r;return-1}function K1(t){if(t.child)return t.child;if(t.next)return t.next;for(;t.parent&&!t.parent.next;)t=t.parent;return t.parent&&t.parent.next}function J1(t,e){let n=t[ct].components;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(rn(i,t)[ce]===e)return i}else if(rn(ae,t)[ce]===e)return ae;return-1}function Q1(t,e){let n=t[ct].firstChild;for(;n;){let r=n.directiveStart,i=n.directiveEnd;for(let o=r;o<i;o++)if(t[o]===e)return n.index;n=K1(n)}return-1}function X1(t,e){let n=e[ct].data[t];if(n.directiveStart===0)return jn;let r=[];for(let i=n.directiveStart;i<n.directiveEnd;i++){let o=e[i];km(o)||r.push(o)}return r}function Am(t){return Lm(t[Ji])}function Pm(t){return Lm(t[fn])}function Lm(t){for(;t!==null&&!zn(t);)t=t[fn];return t}var Jl;function tE(t){Jl=t}function Mm(){if(Jl!==void 0)return Jl;if(typeof document<"u")return document;throw new Lt(210,!1)}var Uu=new Et("",{providedIn:"root",factory:()=>eE}),eE="ng",jm=new Et(""),sa=new Et("",{providedIn:"platform",factory:()=>"unknown"}),nE=new Et(""),Vm=new Et("",{providedIn:"root",factory:()=>Mm().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),rE="h",iE="b",Bm=!1,oE=new Et("",{providedIn:"root",factory:()=>Bm}),Hu=function(t){return t[t.CHANGE_DETECTION=0]="CHANGE_DETECTION",t[t.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",t}(Hu||{}),bo=new Et(""),wd=new Set;function Fr(t){wd.has(t)||(wd.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}var Fm=(()=>{class t{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=sE}return t})();function sE(){return new Fm(wt(),Ze())}var Qr=function(t){return t[t.EarlyRead=0]="EarlyRead",t[t.Write=1]="Write",t[t.MixedReadWrite=2]="MixedReadWrite",t[t.Read=3]="Read",t}(Qr||{}),Um=(()=>{class t{impl=null;execute(){this.impl?.execute()}static \u0275prov=ut({token:t,providedIn:"root",factory:()=>new t})}return t})(),aE=[Qr.EarlyRead,Qr.Write,Qr.MixedReadWrite,Qr.Read],lE=(()=>{class t{ngZone=N(Yt);scheduler=N(yi);errorHandler=N(_i,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){N(bo,{optional:!0})}execute(){let n=this.sequences.size>0;n&&qt(16),this.executing=!0;for(let r of aE)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=i.hooks[r];return o(i.pipelinedValue)},i.snapshot))}catch(o){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&qt(17)}register(n){let{view:r}=n;r!==void 0?((r[ii]??=[]).push(n),vo(r),r[ht]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(n){this.sequences.add(n),this.scheduler.notify(7)}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,r){return r?r.run(Hu.AFTER_NEXT_RENDER,n):n()}static \u0275prov=ut({token:t,providedIn:"root",factory:()=>new t})}return t})(),cE=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,e,n,r,i,o=null){this.impl=t,this.hooks=e,this.view=n,this.once=r,this.snapshot=o,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let t=this.view?.[ii];t&&(this.view[ii]=t.filter(e=>e!==this))}};function Hm(t,e){!e?.injector&&Ug(Hm);let n=e?.injector??N(Pe);return Fr("NgAfterRender"),$m(t,n,e,!1)}function wo(t,e){!e?.injector&&Ug(wo);let n=e?.injector??N(Pe);return Fr("NgAfterNextRender"),$m(t,n,e,!0)}function uE(t,e){if(t instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[e]=t,n}else return[t.earlyRead,t.write,t.mixedReadWrite,t.read]}function $m(t,e,n,r){let i=e.get(Um);i.impl??=e.get(lE);let o=e.get(bo,null,{optional:!0}),s=n?.phase??Qr.MixedReadWrite,a=n?.manualCleanup!==!0?e.get(Lu):null,l=e.get(Fm,null,{optional:!0}),u=new cE(i.impl,uE(t,s),l?.view,r,a,o?.snapshot(null));return i.impl.register(u),u}var hE=()=>null;function zm(t,e,n=!1){return hE(t,e,n)}function qm(t,e){let n=t.contentQueries;if(n!==null){let r=Ot(null);try{for(let i=0;i<n.length;i+=2){let o=n[i],s=n[i+1];if(s!==-1){let a=t.data[s];Ru(o),a.contentQueries(2,e[s],s)}}}finally{Ot(r)}}}function Ql(t,e,n){Ru(0);let r=Ot(null);try{e(t,n)}finally{Ot(r)}}function $u(t,e,n){if(Eu(e)){let r=Ot(null);try{let i=e.directiveStart,o=e.directiveEnd;for(let s=i;s<o;s++){let a=t.data[s];if(a.contentQueries){let l=n[s];a.contentQueries(1,l,s)}}}finally{Ot(r)}}}var Pn=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}(Pn||{}),Mo;function dE(){if(Mo===void 0&&(Mo=null,Gi.trustedTypes))try{Mo=Gi.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Mo}function aa(t){return dE()?.createHTML(t)||t}var jo;function fE(){if(jo===void 0&&(jo=null,Gi.trustedTypes))try{jo=Gi.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return jo}function Ed(t){return fE()?.createHTML(t)||t}var Ur=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${bg})`}},pE=class extends Ur{getTypeName(){return"HTML"}},gE=class extends Ur{getTypeName(){return"Style"}},mE=class extends Ur{getTypeName(){return"Script"}},vE=class extends Ur{getTypeName(){return"URL"}},yE=class extends Ur{getTypeName(){return"ResourceURL"}};function Xn(t){return t instanceof Ur?t.changingThisBreaksApplicationSecurity:t}function yr(t,e){let n=_E(t);if(n!=null&&n!==e){if(n==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${n} (see ${bg})`)}return n===e}function _E(t){return t instanceof Ur&&t.getTypeName()||null}function bE(t){return new pE(t)}function wE(t){return new gE(t)}function EE(t){return new mE(t)}function xE(t){return new vE(t)}function SE(t){return new yE(t)}function IE(t){let e=new TE(t);return OE()?new CE(e):e}var CE=class{inertDocumentHelper;constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{let e=new window.DOMParser().parseFromString(aa(t),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(t):(e.firstChild?.remove(),e)}catch{return null}}},TE=class{defaultDoc;inertDocument;constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){let e=this.inertDocument.createElement("template");return e.innerHTML=aa(t),e}};function OE(){try{return!!new window.DOMParser().parseFromString(aa(""),"text/html")}catch{return!1}}var RE=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function zu(t){return t=String(t),t.match(RE)?t:"unsafe:"+t}function qn(t){let e={};for(let n of t.split(","))e[n]=!0;return e}function Eo(...t){let e={};for(let n of t)for(let r in n)n.hasOwnProperty(r)&&(e[r]=!0);return e}var Wm=qn("area,br,col,hr,img,wbr"),Gm=qn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Zm=qn("rp,rt"),DE=Eo(Zm,Gm),NE=Eo(Gm,qn("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")),kE=Eo(Zm,qn("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")),xd=Eo(Wm,NE,kE,DE),Ym=qn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),AE=qn("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,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),PE=qn("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"),LE=Eo(Ym,AE,PE),ME=qn("script,style,template"),jE=class{sanitizedSomething=!1;buf=[];sanitizeChildren(t){let e=t.firstChild,n=!0,r=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild){r.push(e),e=FE(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let i=BE(e);if(i){e=i;break}e=r.pop()}}return this.buf.join("")}startElement(t){let e=Sd(t).toLowerCase();if(!xd.hasOwnProperty(e))return this.sanitizedSomething=!0,!ME.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let n=t.attributes;for(let r=0;r<n.length;r++){let i=n.item(r),o=i.name,s=o.toLowerCase();if(!LE.hasOwnProperty(s)){this.sanitizedSomething=!0;continue}let a=i.value;Ym[s]&&(a=zu(a)),this.buf.push(" ",o,'="',Id(a),'"')}return this.buf.push(">"),!0}endElement(t){let e=Sd(t).toLowerCase();xd.hasOwnProperty(e)&&!Wm.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(Id(t))}};function VE(t,e){return(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function BE(t){let e=t.nextSibling;if(e&&t!==e.previousSibling)throw Km(e);return e}function FE(t){let e=t.firstChild;if(e&&VE(t,e))throw Km(e);return e}function Sd(t){let e=t.nodeName;return typeof e=="string"?e:"FORM"}function Km(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}var UE=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,HE=/([^\#-~ |!])/g;function Id(t){return t.replace(/&/g,"&").replace(UE,function(e){let n=e.charCodeAt(0),r=e.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(HE,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}var Vo;function Jm(t,e){let n=null;try{Vo=Vo||IE(t);let r=e?String(e):"";n=Vo.getInertBodyElement(r);let i=5,o=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=Vo.getInertBodyElement(r)}while(r!==o);let s=new jE().sanitizeChildren(Cd(n)||n);return aa(s)}finally{if(n){let r=Cd(n)||n;for(;r.firstChild;)r.firstChild.remove()}}}function Cd(t){return"content"in t&&$E(t)?t.content:null}function $E(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var An=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}(An||{});function Hr(t){let e=Qm();return e?Ed(e.sanitize(An.HTML,t)||""):yr(t,"HTML")?Ed(Xn(t)):Jm(Mm(),fo(t))}function Ye(t){let e=Qm();return e?e.sanitize(An.URL,t)||"":yr(t,"URL")?Xn(t):zu(fo(t))}function Qm(){let t=wt();return t&&t[Bn].sanitizer}var zE=/^>|^->|<!--|-->|--!>|<!-$/g,qE=/(<|>)/g,WE="\u200B$1\u200B";function GE(t){return t.replace(zE,e=>e.replace(qE,WE))}function ZE(t){return t.ownerDocument.defaultView}function YE(t,e,n){let r=t.length;for(;;){let i=t.indexOf(e,n);if(i===-1)return i;if(i===0||t.charCodeAt(i-1)<=32){let o=e.length;if(i+o===r||t.charCodeAt(i+o)<=32)return i}n=i+1}}var Xm="ng-template";function KE(t,e,n,r){let i=0;if(r){for(;i<e.length&&typeof e[i]=="string";i+=2)if(e[i]==="class"&&YE(e[i+1].toLowerCase(),n,0)!==-1)return!0}else if(qu(t))return!1;if(i=e.indexOf(1,i),i>-1){let o;for(;++i<e.length&&typeof(o=e[i])=="string";)if(o.toLowerCase()===n)return!0}return!1}function qu(t){return t.type===4&&t.value!==Xm}function JE(t,e,n){let r=t.type===4&&!n?Xm:t.value;return e===r}function QE(t,e,n){let r=4,i=t.attrs,o=i!==null?ex(i):0,s=!1;for(let a=0;a<e.length;a++){let l=e[a];if(typeof l=="number"){if(!s&&!cn(r)&&!cn(l))return!1;if(s&&cn(l))continue;s=!1,r=l|r&1;continue}if(!s)if(r&4){if(r=2|r&1,l!==""&&!JE(t,l,n)||l===""&&e.length===1){if(cn(r))return!1;s=!0}}else if(r&8){if(i===null||!KE(t,i,l,n)){if(cn(r))return!1;s=!0}}else{let u=e[++a],d=XE(l,i,qu(t),n);if(d===-1){if(cn(r))return!1;s=!0;continue}if(u!==""){let f;if(d>o?f="":f=i[d+1].toLowerCase(),r&2&&u!==f){if(cn(r))return!1;s=!0}}}}return cn(r)||s}function cn(t){return(t&1)===0}function XE(t,e,n,r){if(e===null)return-1;let i=0;if(r||!n){let o=!1;for(;i<e.length;){let s=e[i];if(s===t)return i;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=e[++i];for(;typeof a=="string";)a=e[++i];continue}else{if(s===4)break;if(s===0){i+=4;continue}}i+=o?1:2}return-1}else return nx(e,t)}function tx(t,e,n=!1){for(let r=0;r<e.length;r++)if(QE(t,e[r],n))return!0;return!1}function ex(t){for(let e=0;e<t.length;e++){let n=t[e];if(m1(n))return e}return t.length}function nx(t,e){let n=t.indexOf(4);if(n>-1)for(n++;n<t.length;){let r=t[n];if(typeof r=="number")return-1;if(r===e)return n;n++}return-1}function Td(t,e){return t?":not("+e.trim()+")":e}function rx(t){let e=t[0],n=1,r=2,i="",o=!1;for(;n<t.length;){let s=t[n];if(typeof s=="string")if(r&2){let a=t[++n];i+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else r&8?i+="."+s:r&4&&(i+=" "+s);else i!==""&&!cn(s)&&(e+=Td(o,i),i=""),r=s,o=o||!cn(r);n++}return i!==""&&(e+=Td(o,i)),e}function ix(t){return t.map(rx).join(",")}function ox(t){let e=[],n=[],r=1,i=2;for(;r<t.length;){let o=t[r];if(typeof o=="string")i===2?o!==""&&e.push(o,t[++r]):i===8&&n.push(o);else{if(!cn(i))break;i=o}r++}return n.length&&e.push(1,...n),e}var Wn={};function sx(t,e){return t.createText(e)}function ax(t,e,n){t.setValue(e,n)}function lx(t,e){return t.createComment(GE(e))}function tv(t,e,n){return t.createElement(e,n)}function Rs(t,e,n,r,i){t.insertBefore(e,n,r,i)}function ev(t,e,n){t.appendChild(e,n)}function Od(t,e,n,r,i){r!==null?Rs(t,e,n,r,i):ev(t,e,n)}function cx(t,e,n){t.removeChild(null,e,n)}function ux(t,e,n){t.setAttribute(e,"style",n)}function hx(t,e,n){n===""?t.removeAttribute(e,"class"):t.setAttribute(e,"class",n)}function nv(t,e,n){let{mergedAttrs:r,classes:i,styles:o}=n;r!==null&&g1(t,e,r),i!==null&&hx(t,e,i),o!==null&&ux(t,e,o)}function Wu(t,e,n,r,i,o,s,a,l,u,d){let f=ae+r,p=f+i,g=dx(f,p),m=typeof u=="function"?u():u;return g[ct]={type:t,blueprint:g,template:n,queries:null,viewQuery:a,declTNode:e,data:g.slice().fill(null,f),bindingStartIndex:f,expandoStartIndex:p,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:m,incompleteFirstPass:!1,ssrId:d}}function dx(t,e){let n=[];for(let r=0;r<e;r++)n.push(r<t?null:Wn);return n}function fx(t){let e=t.tView;return e===null||e.incompleteFirstPass?t.tView=Wu(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts,t.id):e}function Gu(t,e,n,r,i,o,s,a,l,u,d){let f=e.blueprint.slice();return f[$n]=i,f[ht]=r|4|128|8|64|1024,(u!==null||t&&t[ht]&2048)&&(f[ht]|=2048),Jg(f),f[De]=f[mi]=t,f[ce]=n,f[Bn]=s||t&&t[Bn],f[be]=a||t&&t[be],f[Ki]=l||t&&t[Ki]||null,f[bn]=o,f[go]=q1(),f[Yi]=d,f[Hg]=u,f[vn]=e.type==2?t[vn]:f,f}function px(t,e,n){let r=Rn(e,t),i=fx(n),o=t[Bn].rendererFactory,s=Zu(t,Gu(t,i,null,rv(n),r,e,null,o.createRenderer(r,n),null,null,null));return t[e.index]=s}function rv(t){let e=16;return t.signals?e=4096:t.onPush&&(e=64),e}function iv(t,e,n,r){if(n===0)return-1;let i=e.length;for(let o=0;o<n;o++)e.push(r),t.blueprint.push(r),t.data.push(null);return i}function Zu(t,e){return t[Ji]?t[cd][fn]=e:t[Ji]=e,t[cd]=e,e}function z(t=1){ov(ge(),wt(),hr()+t,!1)}function ov(t,e,n,r){if(!r)if((e[ht]&3)===3){let i=t.preOrderCheckHooks;i!==null&&es(e,i,n)}else{let i=t.preOrderHooks;i!==null&&ns(e,i,0,n)}kr(n)}var la=function(t){return t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",t}(la||{});function Xl(t,e,n,r){let i=Ot(null);try{let[o,s,a]=t.inputs[n],l=null;(s&la.SignalBased)!==0&&(l=e[o][er]),l!==null&&l.transformFn!==void 0?r=l.transformFn(r):a!==null&&(r=a.call(e,r)),t.setInput!==null?t.setInput(e,l,r,n,o):zg(e,l,o,r)}finally{Ot(i)}}function sv(t,e,n,r,i){let o=hr(),s=r&2;try{kr(-1),s&&e.length>ae&&ov(t,e,ae,!1),qt(s?2:0,i),n(r,i)}finally{kr(o),qt(s?3:1,i)}}function ca(t,e,n){bx(t,e,n),(n.flags&64)===64&&wx(t,e,n)}function Yu(t,e,n=Rn){let r=e.localNames;if(r!==null){let i=e.index+1;for(let o=0;o<r.length;o+=2){let s=r[o+1],a=s===-1?n(e,t):t[s];t[i++]=a}}}function gx(t,e,n,r){let i=r.get(oE,Bm)||n===Pn.ShadowDom,o=t.selectRootElement(e,i);return mx(o),o}function mx(t){vx(t)}var vx=()=>null;function yx(t){return t==="class"?"className":t==="for"?"htmlFor":t==="formaction"?"formAction":t==="innerHtml"?"innerHTML":t==="readonly"?"readOnly":t==="tabindex"?"tabIndex":t}function av(t,e,n,r,i,o,s,a){if(!a&&Ju(e,t,n,r,i)){vi(e)&&_x(n,e.index);return}if(e.type&3){let l=Rn(e,n);r=yx(r),i=s!=null?s(i,e.value||"",r):i,o.setProperty(l,r,i)}else e.type&12}function _x(t,e){let n=rn(e,t);n[ht]&16||(n[ht]|=64)}function bx(t,e,n){let r=n.directiveStart,i=n.directiveEnd;vi(n)&&px(e,n,t.data[r+n.componentOffset]),t.firstCreatePass||Cs(n,e);let o=n.initialInputs;for(let s=r;s<i;s++){let a=t.data[s],l=Qi(e,t,s,n);if(Cn(l,e),o!==null&&Ix(e,s-r,l,a,n,o),Tn(a)){let u=rn(n.index,e);u[ce]=Qi(e,t,s,n)}}}function wx(t,e,n){let r=n.directiveStart,i=n.directiveEnd,o=n.index,s=i1();try{kr(o);for(let a=r;a<i;a++){let l=t.data[a],u=e[a];$l(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&Ex(l,u)}}finally{kr(-1),$l(s)}}function Ex(t,e){t.hostBindings!==null&&t.hostBindings(1,e)}function Ku(t,e){let n=t.directiveRegistry,r=null;if(n)for(let i=0;i<n.length;i++){let o=n[i];tx(e,o.selectors,!1)&&(r??=[],Tn(o)?r.unshift(o):r.push(o))}return r}function xx(t,e,n,r,i,o){let s=Rn(t,e);Sx(e[be],s,o,t.value,n,r,i)}function Sx(t,e,n,r,i,o,s){if(o==null)t.removeAttribute(e,i,n);else{let a=s==null?fo(o):s(o,r||"",i);t.setAttribute(e,i,a,n)}}function Ix(t,e,n,r,i,o){let s=o[e];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],u=s[a+1];Xl(r,n,l,u)}}function lv(t,e){let n=t[Ki],r=n?n.get(_i,null):null;r&&r.handleError(e)}function Ju(t,e,n,r,i){let o=t.inputs?.[r],s=t.hostDirectiveInputs?.[r],a=!1;if(s)for(let l=0;l<s.length;l+=2){let u=s[l],d=s[l+1],f=e.data[u];Xl(f,n[u],d,i),a=!0}if(o)for(let l of o){let u=n[l],d=e.data[l];Xl(d,u,r,i),a=!0}return a}function Cx(t,e){let n=rn(e,t),r=n[ct];Tx(r,n);let i=n[$n];i!==null&&n[Yi]===null&&(n[Yi]=zm(i,n[Ki])),qt(18),Qu(r,n,n[ce]),qt(19,n[ce])}function Tx(t,e){for(let n=e.length;n<t.blueprint.length;n++)e.push(t.blueprint[n])}function Qu(t,e,n){Du(e);try{let r=t.viewQuery;r!==null&&Ql(1,r,n);let i=t.template;i!==null&&sv(t,e,i,1,n),t.firstCreatePass&&(t.firstCreatePass=!1),e[Fn]?.finishViewCreation(t),t.staticContentQueries&&qm(t,e),t.staticViewQueries&&Ql(2,t.viewQuery,n);let o=t.components;o!==null&&Ox(e,o)}catch(r){throw t.firstCreatePass&&(t.incompleteFirstPass=!0,t.firstCreatePass=!1),r}finally{e[ht]&=-5,Nu()}}function Ox(t,e){for(let n=0;n<e.length;n++)Cx(t,e[n])}function ua(t,e,n,r){let i=Ot(null);try{let o=e.tView,s=t[ht]&4096?4096:16,a=Gu(t,o,n,s,null,e,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=t[e.index];a[Rr]=l;let u=t[Fn];return u!==null&&(a[Fn]=u.createEmbeddedView(o)),Qu(o,a,n),a}finally{Ot(i)}}function Xi(t,e){return!e||e.firstChild===null||Rm(t)}var Rx;function Xu(t,e){return Rx(t,e)}var br=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}(br||{});function cv(t){return(t.flags&32)===32}function Xr(t,e,n,r,i){if(r!=null){let o,s=!1;zn(r)?o=r:Ln(r)&&(s=!0,r=r[$n]);let a=We(r);t===0&&n!==null?i==null?ev(e,n,a):Rs(e,n,a,i||null,!0):t===1&&n!==null?Rs(e,n,a,i||null,!0):t===2?cx(e,a,s):t===3&&e.destroyNode(a),o!=null&&Ux(e,t,o,n,i)}}function Dx(t,e){uv(t,e),e[$n]=null,e[bn]=null}function Nx(t,e,n,r,i,o){r[$n]=i,r[bn]=e,fa(t,r,n,1,i,o)}function uv(t,e){e[Bn].changeDetectionScheduler?.notify(9),fa(t,e,e[be],2,null,null)}function kx(t){let e=t[Ji];if(!e)return Xa(t[ct],t);for(;e;){let n=null;if(Ln(e))n=e[Ji];else{let r=e[Re];r&&(n=r)}if(!n){for(;e&&!e[fn]&&e!==t;)Ln(e)&&Xa(e[ct],e),e=e[De];e===null&&(e=t),Ln(e)&&Xa(e[ct],e),n=e&&e[fn]}e=n}}function th(t,e){let n=t[ci],r=n.indexOf(e);n.splice(r,1)}function ha(t,e){if(mo(e))return;let n=e[be];n.destroyNode&&fa(t,e,n,3,null,null),kx(e)}function Xa(t,e){if(mo(e))return;let n=Ot(null);try{e[ht]&=-129,e[ht]|=256,e[ze]&&Up(e[ze]),Px(t,e),Ax(t,e),e[ct].type===1&&e[be].destroy();let r=e[Rr];if(r!==null&&zn(e[De])){r!==e[De]&&th(r,e);let i=e[Fn];i!==null&&i.detachView(t)}Yl(e)}finally{Ot(n)}}function Ax(t,e){let n=t.cleanup,r=e[ys];if(n!==null)for(let s=0;s<n.length-1;s+=2)if(typeof n[s]=="string"){let a=n[s+3];a>=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(e[ys]=null);let i=e[rr];if(i!==null){e[rr]=null;for(let s=0;s<i.length;s++){let a=i[s];a()}}let o=e[_s];if(o!==null){e[_s]=null;for(let s of o)s.destroy()}}function Px(t,e){let n;if(t!=null&&(n=t.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let i=e[n[r]];if(!(i instanceof _o)){let o=n[r+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=i[o[s]],l=o[s+1];qt(4,a,l);try{l.call(a)}finally{qt(5,a,l)}}else{qt(4,i,o);try{o.call(i)}finally{qt(5,i,o)}}}}}function Lx(t,e,n){return Mx(t,e.parent,n)}function Mx(t,e,n){let r=e;for(;r!==null&&r.type&168;)e=r,r=e.parent;if(r===null)return n[$n];if(vi(r)){let{encapsulation:i}=t.data[r.directiveStart+r.componentOffset];if(i===Pn.None||i===Pn.Emulated)return null}return Rn(r,n)}function jx(t,e,n){return Bx(t,e,n)}function Vx(t,e,n){return t.type&40?Rn(t,n):null}var Bx=Vx,Rd;function da(t,e,n,r){let i=Lx(t,r,e),o=e[be],s=r.parent||e[bn],a=jx(s,r,e);if(i!=null)if(Array.isArray(n))for(let l=0;l<n.length;l++)Od(o,i,n[l],a,!1);else Od(o,i,n,a,!1);Rd!==void 0&&Rd(o,r,e,n,i)}function Li(t,e){if(e!==null){let n=e.type;if(n&3)return Rn(e,t);if(n&4)return tc(-1,t[e.index]);if(n&8){let r=e.child;if(r!==null)return Li(t,r);{let i=t[e.index];return zn(i)?tc(-1,i):We(i)}}else{if(n&128)return Li(t,e.next);if(n&32)return Xu(e,t)()||We(t[e.index]);{let r=hv(t,e);if(r!==null){if(Array.isArray(r))return r[0];let i=Nr(t[vn]);return Li(i,r)}else return Li(t,e.next)}}}return null}function hv(t,e){if(e!==null){let n=t[vn][bn],r=e.projection;return n.projection[r]}return null}function tc(t,e){let n=Re+t+1;if(n<e.length){let r=e[n],i=r[ct].firstChild;if(i!==null)return Li(r,i)}return e[Dr]}function eh(t,e,n,r,i,o,s){for(;n!=null;){if(n.type===128){n=n.next;continue}let a=r[n.index],l=n.type;if(s&&e===0&&(a&&Cn(We(a),r),n.flags|=2),!cv(n))if(l&8)eh(t,e,n.child,r,i,o,!1),Xr(e,t,i,a,o);else if(l&32){let u=Xu(n,r),d;for(;d=u();)Xr(e,t,i,d,o);Xr(e,t,i,a,o)}else l&16?Fx(t,e,r,n,i,o):Xr(e,t,i,a,o);n=s?n.projectionNext:n.next}}function fa(t,e,n,r,i,o){eh(n,r,t.firstChild,e,i,o,!1)}function Fx(t,e,n,r,i,o){let s=n[vn],a=s[bn].projection[r.projection];if(Array.isArray(a))for(let l=0;l<a.length;l++){let u=a[l];Xr(e,t,i,u,o)}else{let l=a,u=s[De];Rm(r)&&(l.flags|=128),eh(t,e,l,u,i,o,!0)}}function Ux(t,e,n,r,i){let o=n[Dr],s=We(n);o!==s&&Xr(e,t,r,o,i);for(let a=Re;a<n.length;a++){let l=n[a];fa(l[ct],l,t,e,r,o)}}function Hx(t,e,n,r,i){if(e)i?t.addClass(n,r):t.removeClass(n,r);else{let o=r.indexOf("-")===-1?void 0:br.DashCase;i==null?t.removeStyle(n,r,o):(typeof i=="string"&&i.endsWith("!important")&&(i=i.slice(0,-10),o|=br.Important),t.setStyle(n,r,i,o))}}function Ds(t,e,n,r,i=!1){for(;n!==null;){if(n.type===128){n=i?n.projectionNext:n.next;continue}let o=e[n.index];o!==null&&r.push(We(o)),zn(o)&&$x(o,r);let s=n.type;if(s&8)Ds(t,e,n.child,r);else if(s&32){let a=Xu(n,e),l;for(;l=a();)r.push(l)}else if(s&16){let a=hv(e,n);if(Array.isArray(a))r.push(...a);else{let l=Nr(e[vn]);Ds(l[ct],l,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function $x(t,e){for(let n=Re;n<t.length;n++){let r=t[n],i=r[ct].firstChild;i!==null&&Ds(r[ct],r,i,e)}t[Dr]!==t[$n]&&e.push(t[Dr])}function dv(t){if(t[ii]!==null){for(let e of t[ii])e.impl.addSequence(e);t[ii].length=0}}var fv=[];function zx(t){return t[ze]??qx(t)}function qx(t){let e=fv.pop()??Object.create(Gx);return e.lView=t,e}function Wx(t){t.lView[ze]!==t&&(t.lView=null,fv.push(t))}var Gx=Qt(L({},iu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{vo(t.lView)},consumerOnSignalRead(){this.lView[ze]=this}});function Zx(t){let e=t[ze]??Object.create(Yx);return e.lView=t,e}var Yx=Qt(L({},iu),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{let e=Nr(t.lView);for(;e&&!pv(e[ct]);)e=Nr(e);e&&Iu(e)},consumerOnSignalRead(){this.lView[ze]=this}});function pv(t){return t.type!==2}function gv(t){if(t[_s]===null)return;let e=!0;for(;e;){let n=!1;for(let r of t[_s])r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));e=n&&!!(t[ht]&8192)}}var Kx=100;function mv(t,e=!0,n=0){let r=t[Bn].rendererFactory,i=!1;i||r.begin?.();try{Jx(t,n)}catch(o){throw e&&lv(t,o),o}finally{i||r.end?.()}}function Jx(t,e){let n=im();try{ud(!0),ec(t,e);let r=0;for(;na(t);){if(r===Kx)throw new Lt(103,!1);r++,ec(t,1)}}finally{ud(n)}}function Qx(t,e,n,r){if(mo(e))return;let i=e[ht],o=!1,s=!1;Du(e);let a=!0,l=null,u=null;o||(pv(t)?(u=zx(e),l=Kh(u)):M0()===null?(a=!1,u=Zx(e),l=Kh(u)):e[ze]&&(Up(e[ze]),e[ze]=null));try{Jg(e),t1(t.bindingStartIndex),n!==null&&sv(t,e,n,2,r);let d=(i&3)===3;if(!o)if(d){let g=t.preOrderCheckHooks;g!==null&&es(e,g,null)}else{let g=t.preOrderHooks;g!==null&&ns(e,g,0,null),Ya(e,0)}if(s||Xx(e),gv(e),vv(e,0),t.contentQueries!==null&&qm(t,e),!o)if(d){let g=t.contentCheckHooks;g!==null&&es(e,g)}else{let g=t.contentHooks;g!==null&&ns(e,g,1),Ya(e,1)}eS(t,e);let f=t.components;f!==null&&_v(e,f,0);let p=t.viewQuery;if(p!==null&&Ql(2,p,r),!o)if(d){let g=t.viewCheckHooks;g!==null&&es(e,g)}else{let g=t.viewHooks;g!==null&&ns(e,g,2),Ya(e,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),e[Za]){for(let g of e[Za])g();e[Za]=null}o||(dv(e),e[ht]&=-73)}catch(d){throw o||vo(e),d}finally{u!==null&&(U0(u,l),a&&Wx(u)),Nu()}}function vv(t,e){for(let n=Am(t);n!==null;n=Pm(n))for(let r=Re;r<n.length;r++){let i=n[r];yv(i,e)}}function Xx(t){for(let e=Am(t);e!==null;e=Pm(e)){if(!(e[ht]&2))continue;let n=e[ci];for(let r=0;r<n.length;r++){let i=n[r];Iu(i)}}}function tS(t,e,n){qt(18);let r=rn(e,t);yv(r,n),qt(19,r[ce])}function yv(t,e){Su(t)&&ec(t,e)}function ec(t,e){let n=t[ct],r=t[ht],i=t[ze],o=!!(e===0&&r&16);if(o||=!!(r&64&&e===0),o||=!!(r&1024),o||=!!(i?.dirty&&Fp(i)),o||=!1,i&&(i.dirty=!1),t[ht]&=-9217,o)Qx(n,t,n.template,t[ce]);else if(r&8192){gv(t),vv(t,1);let s=n.components;s!==null&&_v(t,s,1),dv(t)}}function _v(t,e,n){for(let r=0;r<e.length;r++)tS(t,e[r],n)}function eS(t,e){let n=t.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let i=n[r];if(i<0)kr(~i);else{let o=i,s=n[++r],a=n[++r];r1(s,o);let l=e[o];qt(24,l),a(2,l),qt(25,l)}}}finally{kr(-1)}}function nh(t,e){let n=im()?64:1088;for(t[Bn].changeDetectionScheduler?.notify(e);t;){t[ht]|=n;let r=Nr(t);if(ws(t)&&!r)return t;t=r}return null}function bv(t,e,n,r){return[t,!0,0,e,null,r,null,n,null,null]}function wv(t,e){let n=Re+e;if(n<t.length)return t[n]}function pa(t,e,n,r=!0){let i=e[ct];if(nS(i,e,t,n),r){let s=tc(n,t),a=e[be],l=a.parentNode(t[Dr]);l!==null&&Nx(i,t[bn],a,e,l,s)}let o=e[Yi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function Ev(t,e){let n=to(t,e);return n!==void 0&&ha(n[ct],n),n}function to(t,e){if(t.length<=Re)return;let n=Re+e,r=t[n];if(r){let i=r[Rr];i!==null&&i!==t&&th(i,r),e>0&&(t[n-1][fn]=r[fn]);let o=ms(t,Re+e);Dx(r[ct],r);let s=o[Fn];s!==null&&s.detachView(o[ct]),r[De]=null,r[fn]=null,r[ht]&=-129}return r}function nS(t,e,n,r){let i=Re+r,o=n.length;r>0&&(n[i-1][fn]=e),r<o-Re?(e[fn]=n[i],Rg(n,Re+r,e)):(n.push(e),e[fn]=null),e[De]=n;let s=e[Rr];s!==null&&n!==s&&xv(s,e);let a=e[Fn];a!==null&&a.insertView(t),Ul(e),e[ht]|=128}function xv(t,e){let n=t[ci],r=e[De];if(Ln(r))t[ht]|=2;else{let i=r[De][vn];e[vn]!==i&&(t[ht]|=2)}n===null?t[ci]=[e]:n.push(e)}var eo=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let t=this._lView,e=t[ct];return Ds(e,t,e.firstChild,[])}constructor(t,e,n=!0){this._lView=t,this._cdRefInjectingView=e,this.notifyErrorHandler=n}get context(){return this._lView[ce]}get dirty(){return!!(this._lView[ht]&9280)||!!this._lView[ze]?.dirty}set context(t){this._lView[ce]=t}get destroyed(){return mo(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[De];if(zn(t)){let e=t[bs],n=e?e.indexOf(this):-1;n>-1&&(to(t,n),ms(e,n))}this._attachedToViewContainer=!1}ha(this._lView[ct],this._lView)}onDestroy(t){Qg(this._lView,t)}markForCheck(){nh(this._cdRefInjectingView||this._lView,4)}markForRefresh(){Iu(this._cdRefInjectingView||this._lView)}detach(){this._lView[ht]&=-129}reattach(){Ul(this._lView),this._lView[ht]|=128}detectChanges(){this._lView[ht]|=1024,mv(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Lt(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=ws(this._lView),e=this._lView[Rr];e!==null&&!t&&th(e,this._lView),uv(this._lView[ct],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Lt(902,!1);this._appRef=t;let e=ws(this._lView),n=this._lView[Rr];n!==null&&!e&&xv(n,this._lView),Ul(this._lView)}},no=(()=>{class t{static __NG_ELEMENT_ID__=oS}return t})(),rS=no,iS=class extends rS{_declarationLView;_declarationTContainer;elementRef;constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,e){return this.createEmbeddedViewImpl(t,e)}createEmbeddedViewImpl(t,e,n){let r=ua(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:e,dehydratedView:n});return new eo(r)}};function oS(){return ga(Ze(),wt())}function ga(t,e){return t.type&4?new iS(e,t,bi(t,e)):null}function xo(t,e,n,r,i){let o=t.data[e];if(o===null)o=sS(t,e,n,r,i),n1()&&(o.flags|=32);else if(o.type&64){o.type=n,o.value=r,o.attrs=i;let s=Xw();o.injectorIndex=s===null?-1:s.injectorIndex}return ur(o,!0),o}function sS(t,e,n,r,i){let o=em(),s=Tu(),a=s?o:o&&o.parent,l=t.data[e]=lS(t,a,n,e,r,i);return aS(t,l,o,s),l}function aS(t,e,n,r){t.firstChild===null&&(t.firstChild=e),n!==null&&(r?n.child==null&&e.parent!==null&&(n.child=e):n.next===null&&(n.next=e,e.prev=n))}function lS(t,e,n,r,i,o){let s=e?e.injectorIndex:-1,a=0;return Kw()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var zP=new RegExp(`^(\\d+)*(${iE}|${rE})*(.*)`),cS=()=>null;function ro(t,e){return cS(t,e)}var uS=class{},Sv=class{},hS=class{resolveComponentFactory(t){throw Error(`No component factory found for ${dn(t)}.`)}},So=class{static NULL=new hS},wn=class{},Iv=(()=>{class t{destroyNode=null;static __NG_ELEMENT_ID__=()=>dS()}return t})();function dS(){let t=wt(),e=Ze(),n=rn(e.index,t);return(Ln(n)?n:t)[be]}var fS=(()=>{class t{static \u0275prov=ut({token:t,providedIn:"root",factory:()=>null})}return t})();function nc(t,e,n){let r=n?t.styles:null,i=n?t.classes:null,o=0;if(e!==null)for(let s=0;s<e.length;s++){let a=e[s];if(typeof a=="number")o=a;else if(o==1)i=rd(i,a);else if(o==2){let l=a,u=e[++s];r=rd(r,l+": "+u+";")}}n?t.styles=r:t.stylesWithoutHost=r,n?t.classes=i:t.classesWithoutHost=i}function Ce(t,e=Rt.Default){let n=wt();if(n===null)return Bt(t,e);let r=Ze();return _m(r,n,Ae(t),e)}function rh(t,e,n,r,i){let o=r===null?null:{"":-1},s=i(t,n);if(s!==null){let a,l=null,u=null,d=gS(s);d===null?a=s:[a,l,u]=d,yS(t,e,n,a,o,l,u)}o!==null&&r!==null&&pS(n,r,o)}function pS(t,e,n){let r=t.localNames=[];for(let i=0;i<e.length;i+=2){let o=n[e[i+1]];if(o==null)throw new Lt(-301,!1);r.push(e[i],o)}}function gS(t){let e=null,n=!1;for(let s=0;s<t.length;s++){let a=t[s];if(s===0&&Tn(a)&&(e=a),a.findHostDirectiveDefs!==null){n=!0;break}}if(!n)return null;let r=null,i=null,o=null;for(let s of t)s.findHostDirectiveDefs!==null&&(r??=[],i??=new Map,o??=new Map,mS(s,r,o,i)),s===e&&(r??=[],r.push(s));return r!==null?(r.push(...e===null?t:t.slice(1)),[r,i,o]):null}function mS(t,e,n,r){let i=e.length;t.findHostDirectiveDefs(t,e,r),n.set(t,[i,e.length-1])}function vS(t,e,n){e.componentOffset=n,(t.components??=[]).push(e.index)}function yS(t,e,n,r,i,o,s){let a=r.length,l=!1;for(let p=0;p<a;p++){let g=r[p];!l&&Tn(g)&&(l=!0,vS(t,n,p)),ql(Cs(n,e),t,g.type)}SS(n,t.data.length,a);for(let p=0;p<a;p++){let g=r[p];g.providersResolver&&g.providersResolver(g)}let u=!1,d=!1,f=iv(t,e,a,null);a>0&&(n.directiveToIndex=new Map);for(let p=0;p<a;p++){let g=r[p];if(n.mergedAttrs=ui(n.mergedAttrs,g.hostAttrs),bS(t,n,e,f,g),xS(f,g,i),s!==null&&s.has(g)){let[b,I]=s.get(g);n.directiveToIndex.set(g.type,[f,b+n.directiveStart,I+n.directiveStart])}else(o===null||!o.has(g))&&n.directiveToIndex.set(g.type,f);g.contentQueries!==null&&(n.flags|=4),(g.hostBindings!==null||g.hostAttrs!==null||g.hostVars!==0)&&(n.flags|=64);let m=g.type.prototype;!u&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((t.preOrderHooks??=[]).push(n.index),u=!0),!d&&(m.ngOnChanges||m.ngDoCheck)&&((t.preOrderCheckHooks??=[]).push(n.index),d=!0),f++}_S(t,n,o)}function _S(t,e,n){for(let r=e.directiveStart;r<e.directiveEnd;r++){let i=t.data[r];if(n===null||!n.has(i))Dd(0,e,i,r),Dd(1,e,i,r),kd(e,r,!1);else{let o=n.get(i);Nd(0,e,o,r),Nd(1,e,o,r),kd(e,r,!0)}}}function Dd(t,e,n,r){let i=t===0?n.inputs:n.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s;t===0?s=e.inputs??={}:s=e.outputs??={},s[o]??=[],s[o].push(r),Cv(e,o)}}function Nd(t,e,n,r){let i=t===0?n.inputs:n.outputs;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o],a;t===0?a=e.hostDirectiveInputs??={}:a=e.hostDirectiveOutputs??={},a[s]??=[],a[s].push(r,o),Cv(e,s)}}function Cv(t,e){e==="class"?t.flags|=8:e==="style"&&(t.flags|=16)}function kd(t,e,n){let{attrs:r,inputs:i,hostDirectiveInputs:o}=t;if(r===null||!n&&i===null||n&&o===null||qu(t)){t.initialInputs??=[],t.initialInputs.push(null);return}let s=null,a=0;for(;a<r.length;){let l=r[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!n&&i.hasOwnProperty(l)){let u=i[l];for(let d of u)if(d===e){s??=[],s.push(l,r[a+1]);break}}else if(n&&o.hasOwnProperty(l)){let u=o[l];for(let d=0;d<u.length;d+=2)if(u[d]===e){s??=[],s.push(u[d+1],r[a+1]);break}}a+=2}t.initialInputs??=[],t.initialInputs.push(s)}function bS(t,e,n,r,i){t.data[r]=i;let o=i.factory||(i.factory=Cr(i.type,!0)),s=new _o(o,Tn(i),Ce);t.blueprint[r]=s,n[r]=s,wS(t,e,r,iv(t,n,i.hostVars,Wn),i)}function wS(t,e,n,r,i){let o=i.hostBindings;if(o){let s=t.hostBindingOpCodes;s===null&&(s=t.hostBindingOpCodes=[]);let a=~e.index;ES(s)!=a&&s.push(a),s.push(n,r,o)}}function ES(t){let e=t.length;for(;e>0;){let n=t[--e];if(typeof n=="number"&&n<0)return n}return 0}function xS(t,e,n){if(n){if(e.exportAs)for(let r=0;r<e.exportAs.length;r++)n[e.exportAs[r]]=t;Tn(e)&&(n[""]=t)}}function SS(t,e,n){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+n,t.providerIndexes=e}function Tv(t,e,n,r,i,o,s,a){let l=e.consts,u=sr(l,s),d=xo(e,t,2,r,u);return o&&rh(e,n,d,sr(l,a),i),d.mergedAttrs=ui(d.mergedAttrs,d.attrs),d.attrs!==null&&nc(d,d.attrs,!1),d.mergedAttrs!==null&&nc(d,d.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,d),d}function Ov(t,e){Au(t,e),Eu(e)&&t.queries.elementEnd(e)}var IS=class extends So{ngModule;constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){let e=Or(t);return new ih(e,this.ngModule)}};function CS(t){return Object.keys(t).map(e=>{let[n,r,i]=t[e],o={propName:n,templateName:e,isSignal:(r&la.SignalBased)!==0};return i&&(o.transform=i),o})}function TS(t){return Object.keys(t).map(e=>({propName:t[e],templateName:e}))}function OS(t,e,n){let r=e instanceof Vn?e:e?.injector;return r&&t.getStandaloneInjector!==null&&(r=t.getStandaloneInjector(r)||r),r?new y1(n,r):n}function RS(t){let e=t.get(wn,null);if(e===null)throw new Lt(407,!1);let n=t.get(fS,null),r=t.get(yi,null);return{rendererFactory:e,sanitizer:n,changeDetectionScheduler:r}}function DS(t,e){let n=(t.selectors[0][0]||"div").toLowerCase();return tv(e,n,n==="svg"?Yg:n==="math"?Uw:null)}var ih=class extends Sv{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){return CS(this.componentDef.inputs)}get outputs(){return TS(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=ix(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!e}create(t,e,n,r){qt(22);let i=Ot(null);try{let o=this.componentDef,s=n?["ng-version","19.2.0"]:ox(this.componentDef.selectors[0]),a=Wu(0,null,null,1,0,null,null,null,null,[s],null),l=OS(o,r||this.ngModule,t),u=RS(l),d=u.rendererFactory.createRenderer(null,o),f=n?gx(d,n,o.encapsulation,l):DS(o,d),p=Gu(null,a,null,512|rv(o),null,null,u,d,l,null,zm(f,l,!0));p[ae]=f,Du(p);let g=null;try{let m=Tv(ae,a,p,"#host",()=>[this.componentDef],!0,0);f&&(nv(d,f,m),Cn(f,p)),ca(a,p,m),$u(a,m,p),Ov(a,m),e!==void 0&&kS(m,this.ngContentSelectors,e),g=rn(m.index,p),p[ce]=g[ce],Qu(a,p,null)}catch(m){throw g!==null&&Yl(g),Yl(p),m}finally{qt(23),Nu()}return new NS(this.componentType,p)}finally{Ot(i)}}},NS=class extends uS{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(t,e){super(),this._rootLView=e,this._tNode=xu(e[ct],ae),this.location=bi(this._tNode,e),this.instance=rn(this._tNode.index,e)[ce],this.hostView=this.changeDetectorRef=new eo(e,void 0,!1),this.componentType=t}setInput(t,e){let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),e))return;let r=this._rootLView,i=Ju(n,r[ct],r,t,e);this.previousInputValues.set(t,e);let o=rn(n.index,r);nh(o,1)}get injector(){return new Fi(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function kS(t,e,n){let r=t.projection=[];for(let i=0;i<e.length;i++){let o=n[i];r.push(o!=null&&o.length?Array.from(o):null)}}var wi=(()=>{class t{static __NG_ELEMENT_ID__=AS}return t})();function AS(){let t=Ze();return Dv(t,wt())}var PS=wi,Rv=class extends PS{_lContainer;_hostTNode;_hostLView;constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return bi(this._hostTNode,this._hostLView)}get injector(){return new Fi(this._hostTNode,this._hostLView)}get parentInjector(){let t=Pu(this._hostTNode,this._hostLView);if(fm(t)){let e=Ss(t,this._hostLView),n=xs(t),r=e[ct].data[n+8];return new Fi(r,e)}else return new Fi(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let e=Ad(this._lContainer);return e!==null&&e[t]||null}get length(){return this._lContainer.length-Re}createEmbeddedView(t,e,n){let r,i;typeof n=="number"?r=n:n!=null&&(r=n.index,i=n.injector);let o=ro(this._lContainer,t.ssrId),s=t.createEmbeddedViewImpl(e||{},i,o);return this.insertImpl(s,r,Xi(this._hostTNode,o)),s}createComponent(t,e,n,r,i){let o=t&&!Lw(t),s;if(o)s=e;else{let g=e||{};s=g.index,n=g.injector,r=g.projectableNodes,i=g.environmentInjector||g.ngModuleRef}let a=o?t:new ih(Or(t)),l=n||this.parentInjector;if(!i&&a.ngModule==null){let g=(o?l:this.parentInjector).get(Vn,null);g&&(i=g)}let u=Or(a.componentType??{}),d=ro(this._lContainer,u?.id??null),f=d?.firstChild??null,p=a.create(l,r,f,i);return this.insertImpl(p.hostView,s,Xi(this._hostTNode,d)),p}insert(t,e){return this.insertImpl(t,e,!0)}insertImpl(t,e,n){let r=t._lView;if($w(r)){let s=this.indexOf(t);if(s!==-1)this.detach(s);else{let a=r[De],l=new Rv(a,a[bn],a[De]);l.detach(l.indexOf(t))}}let i=this._adjustIndex(e),o=this._lContainer;return pa(o,r,i,n),t.attachToViewContainerRef(),Rg(tl(o),i,t),t}move(t,e){return this.insert(t,e)}indexOf(t){let e=Ad(this._lContainer);return e!==null?e.indexOf(t):-1}remove(t){let e=this._adjustIndex(t,-1),n=to(this._lContainer,e);n&&(ms(tl(this._lContainer),e),ha(n[ct],n))}detach(t){let e=this._adjustIndex(t,-1),n=to(this._lContainer,e);return n&&ms(tl(this._lContainer),e)!=null?new eo(n):null}_adjustIndex(t,e=0){return t??this.length+e}};function Ad(t){return t[bs]}function tl(t){return t[bs]||(t[bs]=[])}function Dv(t,e){let n,r=e[t.index];return zn(r)?n=r:(n=bv(r,e,null,t),e[t.index]=n,Zu(e,n)),MS(n,e,t,r),new Rv(n,t,e)}function LS(t,e){let n=t[be],r=n.createComment(""),i=Rn(e,t),o=n.parentNode(i);return Rs(n,o,r,n.nextSibling(i),!1),r}var MS=BS,jS=()=>!1;function VS(t,e,n){return jS(t,e,n)}function BS(t,e,n,r){if(t[Dr])return;let i;n.type&8?i=We(r):i=LS(e,n),t[Dr]=i}var FS=class Nv{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new Nv(this.queryList)}setDirty(){this.queryList.setDirty()}},US=class kv{queries;constructor(e=[]){this.queries=e}createEmbeddedView(e){let n=e.queries;if(n!==null){let r=e.contentQueries!==null?e.contentQueries[0]:n.length,i=[];for(let o=0;o<r;o++){let s=n.getByIndex(o),a=this.queries[s.indexInDeclarationView];i.push(a.clone())}return new kv(i)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}finishViewCreation(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let n=0;n<this.queries.length;n++)oh(e,n).matches!==null&&this.queries[n].setDirty()}},HS=class{flags;read;predicate;constructor(t,e,n=null){this.flags=e,this.read=n,typeof t=="string"?this.predicate=QS(t):this.predicate=t}},$S=class Av{queries;constructor(e=[]){this.queries=e}elementStart(e,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(e,n)}elementEnd(e){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(e)}embeddedTView(e){let n=null;for(let r=0;r<this.length;r++){let i=n!==null?n.length:0,o=this.getByIndex(r).embeddedTView(e,i);o&&(o.indexInDeclarationView=r,n!==null?n.push(o):n=[o])}return n!==null?new Av(n):null}template(e,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(e,n)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},zS=class Pv{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(e,n=-1){this.metadata=e,this._declarationNodeIndex=n}elementStart(e,n){this.isApplyingToNode(n)&&this.matchTNode(e,n)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,n){this.elementStart(e,n)}embeddedTView(e,n){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,n),new Pv(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,r=e.parent;for(;r!==null&&r.type&8&&r.index!==n;)r=r.parent;return n===(r!==null?r.index:-1)}return this._appliesToNextNode}matchTNode(e,n){let r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){let o=r[i];this.matchTNodeWithReadOption(e,n,qS(n,o)),this.matchTNodeWithReadOption(e,n,rs(n,e,o,!1,!1))}else r===no?n.type&4&&this.matchTNodeWithReadOption(e,n,-1):this.matchTNodeWithReadOption(e,n,rs(n,e,r,!1,!1))}matchTNodeWithReadOption(e,n,r){if(r!==null){let i=this.metadata.read;if(i!==null)if(i===He||i===wi||i===no&&n.type&4)this.addMatch(n.index,-2);else{let o=rs(n,e,i,!1,!1);o!==null&&this.addMatch(n.index,o)}else this.addMatch(n.index,r)}}addMatch(e,n){this.matches===null?this.matches=[e,n]:this.matches.push(e,n)}};function qS(t,e){let n=t.localNames;if(n!==null){for(let r=0;r<n.length;r+=2)if(n[r]===e)return n[r+1]}return null}function WS(t,e){return t.type&11?bi(t,e):t.type&4?ga(t,e):null}function GS(t,e,n,r){return n===-1?WS(e,t):n===-2?ZS(t,e,r):Qi(t,t[ct],n,e)}function ZS(t,e,n){if(n===He)return bi(e,t);if(n===no)return ga(e,t);if(n===wi)return Dv(e,t)}function Lv(t,e,n,r){let i=e[Fn].queries[r];if(i.matches===null){let o=t.data,s=n.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let u=s[l];if(u<0)a.push(null);else{let d=o[u];a.push(GS(e,d,s[l+1],n.metadata.read))}}i.matches=a}return i.matches}function rc(t,e,n,r){let i=t.queries.getByIndex(n),o=i.matches;if(o!==null){let s=Lv(t,e,i,n);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)r.push(s[a/2]);else{let u=o[a+1],d=e[-l];for(let f=Re;f<d.length;f++){let p=d[f];p[Rr]===p[De]&&rc(p[ct],p,u,r)}if(d[ci]!==null){let f=d[ci];for(let p=0;p<f.length;p++){let g=f[p];rc(g[ct],g,u,r)}}}}}return r}function YS(t,e){return t[Fn].queries[e].queryList}function KS(t,e,n){let r=new $1((n&4)===4);return Ww(t,e,r,r.destroy),(e[Fn]??=new US).queries.push(new FS(r))-1}function JS(t,e,n){let r=ge();return r.firstCreatePass&&(XS(r,new HS(t,e,n),-1),(e&2)===2&&(r.staticViewQueries=!0)),KS(r,wt(),e)}function QS(t){return t.split(",").map(e=>e.trim())}function XS(t,e,n){t.queries===null&&(t.queries=new $S),t.queries.track(new zS(e,n))}function oh(t,e){return t.queries.getByIndex(e)}function tI(t,e){let n=t[ct],r=oh(n,e);return r.crossesNgTemplate?rc(n,t,e,[]):Lv(n,t,r,e)}var io=class{},Mv=class extends io{injector;componentFactoryResolver=new IS(this);instance=null;constructor(t){super();let e=new wu([...t.providers,{provide:io,useValue:this},{provide:So,useValue:this.componentFactoryResolver}],t.parent||Xs(),t.debugName,new Set(["environment"]));this.injector=e,t.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function eI(t,e,n=null){return new Mv({providers:t,parent:e,debugName:n,runEnvironmentInitializers:!0}).injector}var nI=(()=>{class t{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=Lg(!1,n.type),i=r.length>0?eI([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,i)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ut({token:t,providedIn:"environment",factory:()=>new t(Bt(Vn))})}return t})();function je(t){return gu(()=>{let e=jv(t),n=Qt(L({},e),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===Dm.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:e.standalone?i=>i.get(nI).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||Pn.Emulated,styles:t.styles||jn,_:null,schemas:t.schemas||null,tView:null,id:""});e.standalone&&Fr("NgStandalone"),Vv(n);let r=t.dependencies;return n.directiveDefs=Pd(r,!1),n.pipeDefs=Pd(r,!0),n.id=aI(n),n})}function rI(t){return Or(t)||Ag(t)}function iI(t){return t!==null}function oI(t,e){if(t==null)return Tr;let n={};for(let r in t)if(t.hasOwnProperty(r)){let i=t[r],o,s,a,l;Array.isArray(i)?(a=i[0],o=i[1],s=i[2]??o,l=i[3]||null):(o=i,s=i,a=la.None,l=null),n[o]=[r,a,l],e[o]=s}return n}function sI(t){if(t==null)return Tr;let e={};for(let n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function ma(t){return gu(()=>{let e=jv(t);return Vv(e),e})}function sh(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone??!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function jv(t){let e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputConfig:t.inputs||Tr,exportAs:t.exportAs||null,standalone:t.standalone??!0,signals:t.signals===!0,selectors:t.selectors||jn,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:oI(t.inputs,e),outputs:sI(t.outputs),debugInfo:null}}function Vv(t){t.features?.forEach(e=>e(t))}function Pd(t,e){if(!t)return null;let n=e?Pg:rI;return()=>(typeof t=="function"?t():t).map(r=>n(r)).filter(iI)}function aI(t){let e=0,n=typeof t.consts=="function"?"":t.consts,r=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,n,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery];for(let i of r.join("|"))e=Math.imul(31,e)+i.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function lI(t){return Object.getPrototypeOf(t.prototype).constructor}function Ei(t){let e=lI(t.type),n=!0,r=[t];for(;e;){let i;if(Tn(t))i=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Lt(903,!1);i=e.\u0275dir}if(i){if(n){r.push(i);let s=t;s.inputs=el(t.inputs),s.declaredInputs=el(t.declaredInputs),s.outputs=el(t.outputs);let a=i.hostBindings;a&&fI(t,a);let l=i.viewQuery,u=i.contentQueries;if(l&&hI(t,l),u&&dI(t,u),cI(t,i),Xb(t.outputs,i.outputs),Tn(i)&&i.data.animation){let d=t.data;d.animation=(d.animation||[]).concat(i.data.animation)}}let o=i.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(t),a===Ei&&(n=!1)}}e=Object.getPrototypeOf(e)}uI(r)}function cI(t,e){for(let n in e.inputs){if(!e.inputs.hasOwnProperty(n)||t.inputs.hasOwnProperty(n))continue;let r=e.inputs[n];r!==void 0&&(t.inputs[n]=r,t.declaredInputs[n]=e.declaredInputs[n])}}function uI(t){let e=0,n=null;for(let r=t.length-1;r>=0;r--){let i=t[r];i.hostVars=e+=i.hostVars,i.hostAttrs=ui(i.hostAttrs,n=ui(n,i.hostAttrs))}}function el(t){return t===Tr?{}:t===jn?[]:t}function hI(t,e){let n=t.viewQuery;n?t.viewQuery=(r,i)=>{e(r,i),n(r,i)}:t.viewQuery=e}function dI(t,e){let n=t.contentQueries;n?t.contentQueries=(r,i,o)=>{e(r,i,o),n(r,i,o)}:t.contentQueries=e}function fI(t,e){let n=t.hostBindings;n?t.hostBindings=(r,i)=>{e(r,i),n(r,i)}:t.hostBindings=e}function Bv(t,e,n){return t[e]=n}function Un(t,e,n){let r=t[e];return Object.is(r,n)?!1:(t[e]=n,!0)}function pI(t,e,n,r){let i=Un(t,e,n);return Un(t,e+1,r)||i}function gI(t,e,n,r,i,o,s,a,l){let u=e.consts,d=xo(e,t,4,s||null,a||null);Cu()&&rh(e,n,d,sr(u,l),Ku),d.mergedAttrs=ui(d.mergedAttrs,d.attrs),Au(e,d);let f=d.tView=Wu(2,d,r,i,o,e.directiveRegistry,e.pipeRegistry,null,e.schemas,u,null);return e.queries!==null&&(e.queries.template(e,d),f.queries=e.queries.embeddedTView(d)),d}function ic(t,e,n,r,i,o,s,a,l,u){let d=n+ae,f=e.firstCreatePass?gI(d,e,t,r,i,o,s,a,l):e.data[d];ur(f,!1);let p=mI(e,t,f,n);ra()&&da(e,t,p,f),Cn(p,t);let g=bv(p,t,p,f);return t[d]=g,Zu(t,g),VS(g,f,t),ta(f)&&ca(e,t,f),l!=null&&Yu(t,f,u),f}function pe(t,e,n,r,i,o,s,a){let l=wt(),u=ge(),d=sr(u.consts,o);return ic(l,u,t,e,n,r,i,d,s,a),pe}var mI=vI;function vI(t,e,n,r){return ia(!0),e[be].createComment("")}var yI=new Et(""),_I=(()=>{class t{static \u0275prov=ut({token:t,providedIn:"root",factory:()=>new bI})}return t})(),bI=class{queuedEffectCount=0;queues=new Map;schedule(t){this.enqueue(t)}remove(t){let e=t.zone,n=this.queues.get(e);n.has(t)&&(n.delete(t),this.queuedEffectCount--)}enqueue(t){let e=t.zone;this.queues.has(e)||this.queues.set(e,new Set);let n=this.queues.get(e);n.has(t)||(this.queuedEffectCount++,n.add(t))}flush(){for(;this.queuedEffectCount>0;)for(let[t,e]of this.queues)t===null?this.flushQueue(e):t.run(()=>this.flushQueue(e))}flushQueue(t){for(let e of t)t.delete(e),this.queuedEffectCount--,e.run()}};function Fv(t){return!!t&&typeof t.then=="function"}function wI(t){return!!t&&typeof t.subscribe=="function"}var EI=new Et(""),Uv=(()=>{class t{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=N(EI,{optional:!0})??[];injector=N(Pe);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let o=Bg(this.injector,i);if(Fv(o))n.push(o);else if(wI(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});n.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),xI=new Et("");function SI(){$0(()=>{throw new Lt(600,!1)})}function II(t){return t.isBoundToModule}var CI=10,lr=(()=>{class t{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=N(V1);afterRenderManager=N(Um);zonelessEnabled=N(Mu);rootEffectScheduler=N(_I);dirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new dt;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=N(oa).hasPendingTasks.pipe(Ks(n=>!n));constructor(){N(bo,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=N(Vn);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){qt(10);let i=n instanceof Sv;if(!this._injector.get(Uv).done){let f=!i&&Ew(n),p=!1;throw new Lt(405,p)}let o;i?o=n:o=this._injector.get(So).resolveComponentFactory(n),this.componentTypes.push(o.componentType);let s=II(o)?void 0:this._injector.get(io),a=r||o.selector,l=o.create(Pe.NULL,[],a,s),u=l.location.nativeElement,d=l.injector.get(yI,null);return d?.registerApplication(u),l.onDestroy(()=>{this.detachView(l.hostView),is(this.components,l),d?.unregisterApplication(u)}),this._loadComponent(l),qt(11,l),l}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){qt(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(Hu.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Lt(101,!1);let n=Ot(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,Ot(n),this.afterTick.next(),qt(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(wn,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<CI;)qt(14),this.synchronizeOnce(),qt(15)}synchronizeOnce(){if(this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r,notifyErrorHandler:i}of this.allViews)TI(r,i,n,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}else this._rendererFactory?.begin?.(),this._rendererFactory?.end?.();this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>na(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;is(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(xI,[]).forEach(r=>r(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>is(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new Lt(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function is(t,e){let n=t.indexOf(e);n>-1&&t.splice(n,1)}function TI(t,e,n,r){!n&&!na(t)||mv(t,e,n&&!r?0:1)}function va(t,e,n,r){let i=wt(),o=yo();if(Un(i,o,e)){let s=ge(),a=ku();xx(a,i,t,e,n,r)}return va}function Hv(t,e,n,r){return Un(t,yo(),n)?e+fo(n)+r:Wn}function Bo(t,e){return t<<17|e<<2}function Ar(t){return t>>17&32767}function OI(t){return(t&2)==2}function RI(t,e){return t&131071|e<<17}function oc(t){return t|2}function hi(t){return(t&131068)>>2}function nl(t,e){return t&-131069|e<<2}function DI(t){return(t&1)===1}function sc(t){return t|1}function NI(t,e,n,r,i,o){let s=o?e.classBindings:e.styleBindings,a=Ar(s),l=hi(s);t[r]=n;let u=!1,d;if(Array.isArray(n)){let f=n;d=f[1],(d===null||po(f,d)>0)&&(u=!0)}else d=n;if(i)if(l!==0){let f=Ar(t[a+1]);t[r+1]=Bo(f,a),f!==0&&(t[f+1]=nl(t[f+1],r)),t[a+1]=RI(t[a+1],r)}else t[r+1]=Bo(a,0),a!==0&&(t[a+1]=nl(t[a+1],r)),a=r;else t[r+1]=Bo(l,0),a===0?a=r:t[l+1]=nl(t[l+1],r),l=r;u&&(t[r+1]=oc(t[r+1])),Ld(t,d,r,!0),Ld(t,d,r,!1),kI(e,d,t,r,o),s=Bo(a,l),o?e.classBindings=s:e.styleBindings=s}function kI(t,e,n,r,i){let o=i?t.residualClasses:t.residualStyles;o!=null&&typeof e=="string"&&po(o,e)>=0&&(n[r+1]=sc(n[r+1]))}function Ld(t,e,n,r){let i=t[n+1],o=e===null,s=r?Ar(i):hi(i),a=!1;for(;s!==0&&(a===!1||o);){let l=t[s],u=t[s+1];AI(l,e)&&(a=!0,t[s+1]=r?sc(u):oc(u)),s=r?Ar(u):hi(u)}a&&(t[n+1]=r?oc(i):sc(i))}function AI(t,e){return t===null||e==null||(Array.isArray(t)?t[1]:t)===e?!0:Array.isArray(t)&&typeof e=="string"?po(t,e)>=0:!1}function Mt(t,e,n){let r=wt(),i=yo();if(Un(r,i,e)){let o=ge(),s=ku();av(o,s,r,t,e,r[be],n,!1)}return Mt}function Md(t,e,n,r,i){Ju(e,t,n,i?"class":"style",r)}function ya(t,e,n){return $v(t,e,n,!1),ya}function _a(t,e){return $v(t,e,null,!0),_a}function $v(t,e,n,r){let i=wt(),o=ge(),s=e1(2);if(o.firstUpdatePass&&LI(o,t,s,r),e!==Wn&&Un(i,s,e)){let a=o.data[hr()];FI(o,a,i,i[be],t,i[s+1]=UI(e,n),r,s)}}function PI(t,e){return e>=t.expandoStartIndex}function LI(t,e,n,r){let i=t.data;if(i[n+1]===null){let o=i[hr()],s=PI(t,n);HI(o,r)&&e===null&&!s&&(e=!1),e=MI(i,o,e,r),NI(i,o,e,n,s,r)}}function MI(t,e,n,r){let i=o1(t),o=r?e.residualClasses:e.residualStyles;if(i===null)(r?e.classBindings:e.styleBindings)===0&&(n=rl(null,t,e,n,r),n=oo(n,e.attrs,r),o=null);else{let s=e.directiveStylingLast;if(s===-1||t[s]!==i)if(n=rl(i,t,e,n,r),o===null){let a=jI(t,e,r);a!==void 0&&Array.isArray(a)&&(a=rl(null,t,e,a[1],r),a=oo(a,e.attrs,r),VI(t,e,r,a))}else o=BI(t,e,r)}return o!==void 0&&(r?e.residualClasses=o:e.residualStyles=o),n}function jI(t,e,n){let r=n?e.classBindings:e.styleBindings;if(hi(r)!==0)return t[Ar(r)]}function VI(t,e,n,r){let i=n?e.classBindings:e.styleBindings;t[Ar(i)]=r}function BI(t,e,n){let r,i=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<i;o++){let s=t[o].hostAttrs;r=oo(r,s,n)}return oo(r,e.attrs,n)}function rl(t,e,n,r,i){let o=null,s=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<s&&(o=e[a],r=oo(r,o.hostAttrs,i),o!==t);)a++;return t!==null&&(n.directiveStylingLast=a),r}function oo(t,e,n){let r=n?1:2,i=-1;if(e!==null)for(let o=0;o<e.length;o++){let s=e[o];typeof s=="number"?i=s:i===r&&(Array.isArray(t)||(t=t===void 0?[]:["",t]),bw(t,s,n?!0:e[++o]))}return t===void 0?null:t}function FI(t,e,n,r,i,o,s,a){if(!(e.type&3))return;let l=t.data,u=l[a+1],d=DI(u)?jd(l,e,n,i,hi(u),s):void 0;if(!Ns(d)){Ns(o)||OI(u)&&(o=jd(l,null,n,i,a,s));let f=Kg(hr(),n);Hx(r,s,f,i,o)}}function jd(t,e,n,r,i,o){let s=e===null,a;for(;i>0;){let l=t[i],u=Array.isArray(l),d=u?l[1]:l,f=d===null,p=n[i+1];p===Wn&&(p=f?jn:void 0);let g=f?Wa(p,r):d===r?p:void 0;if(u&&!Ns(g)&&(g=Wa(l,r)),Ns(g)&&(a=g,s))return a;let m=t[i+1];i=s?Ar(m):hi(m)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=Wa(l,r))}return a}function Ns(t){return t!==void 0}function UI(t,e){return t==null||t===""||(typeof e=="string"?t=t+e:typeof t=="object"&&(t=dn(Xn(t)))),t}function HI(t,e){return(t.flags&(e?8:16))!==0}var $I=class{destroy(t){}updateValue(t,e){}swap(t,e){let n=Math.min(t,e),r=Math.max(t,e),i=this.detach(r);if(r-n>1){let o=this.detach(n);this.attach(n,i),this.attach(r,o)}else this.attach(n,i)}move(t,e){this.attach(e,this.detach(t))}};function il(t,e,n,r,i){return t===n&&Object.is(e,r)?1:Object.is(i(t,e),i(n,r))?-1:0}function zI(t,e,n){let r,i,o=0,s=t.length-1,a;if(Array.isArray(e)){let l=e.length-1;for(;o<=s&&o<=l;){let u=t.at(o),d=e[o],f=il(o,u,o,d,n);if(f!==0){f<0&&t.updateValue(o,d),o++;continue}let p=t.at(s),g=e[l],m=il(s,p,l,g,n);if(m!==0){m<0&&t.updateValue(s,g),s--,l--;continue}let b=n(o,u),I=n(s,p),A=n(o,d);if(Object.is(A,I)){let $=n(l,g);Object.is($,b)?(t.swap(o,s),t.updateValue(s,g),l--,s--):t.move(s,o),t.updateValue(o,d),o++;continue}if(r??=new Fd,i??=Bd(t,o,s,n),ac(t,r,o,A))t.updateValue(o,d),o++,s++;else if(i.has(A))r.set(b,t.detach(o)),s--;else{let $=t.create(o,e[o]);t.attach(o,$),o++,s++}}for(;o<=l;)Vd(t,r,n,o,e[o]),o++}else if(e!=null){let l=e[Symbol.iterator](),u=l.next();for(;!u.done&&o<=s;){let d=t.at(o),f=u.value,p=il(o,d,o,f,n);if(p!==0)p<0&&t.updateValue(o,f),o++,u=l.next();else{r??=new Fd,i??=Bd(t,o,s,n);let g=n(o,f);if(ac(t,r,o,g))t.updateValue(o,f),o++,s++,u=l.next();else if(!i.has(g))t.attach(o,t.create(o,f)),o++,s++,u=l.next();else{let m=n(o,d);r.set(m,t.detach(o)),s--}}}for(;!u.done;)Vd(t,r,n,t.length,u.value),u=l.next()}for(;o<=s;)t.destroy(t.detach(s--));r?.forEach(l=>{t.destroy(l)})}function ac(t,e,n,r){return e!==void 0&&e.has(r)?(t.attach(n,e.get(r)),e.delete(r),!0):!1}function Vd(t,e,n,r,i){if(ac(t,e,r,n(r,i)))t.updateValue(r,i);else{let o=t.create(r,i);t.attach(r,o)}}function Bd(t,e,n,r){let i=new Set;for(let o=e;o<=n;o++)i.add(r(o,t.at(o)));return i}var Fd=class{kvMap=new Map;_vMap=void 0;has(t){return this.kvMap.has(t)}delete(t){if(!this.has(t))return!1;let e=this.kvMap.get(t);return this._vMap!==void 0&&this._vMap.has(e)?(this.kvMap.set(t,this._vMap.get(e)),this._vMap.delete(e)):this.kvMap.delete(t),!0}get(t){return this.kvMap.get(t)}set(t,e){if(this.kvMap.has(t)){let n=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,e)}else this.kvMap.set(t,e)}forEach(t){for(let[e,n]of this.kvMap)if(t(n,e),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),t(n,e)}}};function ve(t,e){Fr("NgControlFlow");let n=wt(),r=yo(),i=n[r]!==Wn?n[r]:-1,o=i!==-1?ks(n,ae+i):void 0,s=0;if(Un(n,r,t)){let a=Ot(null);try{if(o!==void 0&&Ev(o,s),t!==-1){let l=ae+t,u=ks(n,l),d=lc(n[ct],l),f=ro(u,d.tView.ssrId),p=ua(n,d,e,{dehydratedView:f});pa(u,p,s,Xi(d,f))}}finally{Ot(a)}}else if(o!==void 0){let a=wv(o,s);a!==void 0&&(a[ce]=e)}}var qI=class{lContainer;$implicit;$index;constructor(t,e,n){this.lContainer=t,this.$implicit=e,this.$index=n}get $count(){return this.lContainer.length-Re}};function ba(t,e){return e}var WI=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,e,n){this.hasEmptyBlock=t,this.trackByFn=e,this.liveCollection=n}};function Le(t,e,n,r,i,o,s,a,l,u,d,f,p){Fr("NgControlFlow");let g=wt(),m=ge(),b=l!==void 0,I=wt(),A=a?s.bind(I[vn][ce]):s,$=new WI(b,A);I[ae+t]=$,ic(g,m,t+1,e,n,r,i,sr(m.consts,o)),b&&ic(g,m,t+2,l,u,d,f,sr(m.consts,p))}var GI=class extends $I{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(t,e,n){super(),this.lContainer=t,this.hostLView=e,this.templateTNode=n}get length(){return this.lContainer.length-Re}at(t){return this.getLView(t)[ce].$implicit}attach(t,e){let n=e[Yi];this.needsIndexUpdate||=t!==this.length,pa(this.lContainer,e,t,Xi(this.templateTNode,n))}detach(t){return this.needsIndexUpdate||=t!==this.length-1,ZI(this.lContainer,t)}create(t,e){let n=ro(this.lContainer,this.templateTNode.tView.ssrId),r=ua(this.hostLView,this.templateTNode,new qI(this.lContainer,e,t),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(t){ha(t[ct],t),this.operationsCounter?.recordDestroy()}updateValue(t,e){this.getLView(t)[ce].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t<this.length;t++)this.getLView(t)[ce].$index=t}getLView(t){return YI(this.lContainer,t)}};function Me(t){let e=Ot(null),n=hr();try{let r=wt(),i=r[ct],o=r[n],s=n+1,a=ks(r,s);if(o.liveCollection===void 0){let u=lc(i,s);o.liveCollection=new GI(a,r,u)}else o.liveCollection.reset();let l=o.liveCollection;if(zI(l,t,o.trackByFn),l.updateIndexes(),o.hasEmptyBlock){let u=yo(),d=l.length===0;if(Un(r,u,d)){let f=n+2,p=ks(r,f);if(d){let g=lc(i,f),m=ro(p,g.tView.ssrId),b=ua(r,g,void 0,{dehydratedView:m});pa(p,b,0,Xi(g,m))}else Ev(p,0)}}}finally{Ot(e)}}function ks(t,e){return t[e]}function ZI(t,e){return to(t,e)}function YI(t,e){return wv(t,e)}function lc(t,e){return xu(t,e)}function Y(t,e,n,r){let i=wt(),o=ge(),s=ae+t,a=i[be],l=o.firstCreatePass?Tv(s,o,i,e,Ku,Cu(),n,r):o.data[s],u=KI(o,i,l,a,e,t);i[s]=u;let d=ta(l);return ur(l,!0),nv(a,u,l),!cv(l)&&ra()&&da(o,i,u,l),(Gw()===0||d)&&Cn(u,i),Zw(),d&&(ca(o,i,l),$u(o,l,i)),r!==null&&Yu(i,l),Y}function K(){let t=Ze();Tu()?nm():(t=t.parent,ur(t,!1));let e=t;Jw(e)&&Qw(),Yw();let n=ge();return n.firstCreatePass&&Ov(n,e),e.classesWithoutHost!=null&&f1(e)&&Md(n,e,wt(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&p1(e)&&Md(n,e,wt(),e.stylesWithoutHost,!1),K}function jt(t,e,n,r){return Y(t,e,n,r),K(),jt}var KI=(t,e,n,r,i,o)=>(ia(!0),tv(r,i,c1()));function JI(t,e,n,r,i){let o=e.consts,s=sr(o,r),a=xo(e,t,8,"ng-container",s);s!==null&&nc(a,s,!0);let l=sr(o,i);return Cu()&&rh(e,n,a,l,Ku),a.mergedAttrs=ui(a.mergedAttrs,a.attrs),e.queries!==null&&e.queries.elementStart(e,a),a}function zv(t,e,n){let r=wt(),i=ge(),o=t+ae,s=i.firstCreatePass?JI(o,i,r,e,n):i.data[o];ur(s,!0);let a=QI(i,r,s,t);return r[o]=a,ra()&&da(i,r,a,s),Cn(a,r),ta(s)&&(ca(i,r,s),$u(i,s,r)),n!=null&&Yu(r,s),zv}function qv(){let t=Ze(),e=ge();return Tu()?nm():(t=t.parent,ur(t,!1)),e.firstCreatePass&&(Au(e,t),Eu(t)&&e.queries.elementEnd(t)),qv}function ah(t,e,n){return zv(t,e,n),qv(),ah}var QI=(t,e,n,r)=>(ia(!0),lx(e[be],""));function Dn(){return wt()}var As="en-US",XI=As;function tC(t){typeof t=="string"&&(XI=t.toLowerCase().replace(/_/g,"-"))}var eC=(t,e,n)=>{};function ue(t,e,n,r){let i=wt(),o=ge(),s=Ze();return rC(o,i,i[be],s,t,e,r),ue}function nC(t,e,n,r){let i=t.cleanup;if(i!=null)for(let o=0;o<i.length-1;o+=2){let s=i[o];if(s===n&&i[o+1]===r){let a=e[ys],l=i[o+2];return a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function rC(t,e,n,r,i,o,s){let a=ta(r),l=t.firstCreatePass?tm(t):null,u=e[ce],d=Xg(e),f=!0;if(r.type&3||s){let p=Rn(r,e),g=s?s(p):p,m=d.length,b=s?A=>s(We(A[r.index])):r.index,I=null;if(!s&&a&&(I=nC(t,e,i,r.index)),I!==null){let A=I.__ngLastListenerFn__||I;A.__ngNextListenerFn__=o,I.__ngLastListenerFn__=o,f=!1}else{o=$d(r,e,u,o),eC(p,i,o);let A=n.listen(g,i,o);d.push(o,A),l&&l.push(i,b,m,m+1)}}else o=$d(r,e,u,o);if(f){let p=r.outputs?.[i],g=r.hostDirectiveOutputs?.[i];if(g&&g.length)for(let m=0;m<g.length;m+=2){let b=g[m],I=g[m+1];Ud(r,t,e,b,I,i,o,d,l)}if(p&&p.length)for(let m of p)Ud(r,t,e,m,i,i,o,d,l)}}function Ud(t,e,n,r,i,o,s,a,l){let u=n[r],d=e.data[r].outputs[i],f=u[d].subscribe(s),p=a.length;a.push(s,f),l&&l.push(o,t.index,p,-(p+1))}function Hd(t,e,n,r){let i=Ot(null);try{return qt(6,e,n),n(r)!==!1}catch(o){return lv(t,o),!1}finally{qt(7,e,n),Ot(i)}}function $d(t,e,n,r){return function i(o){if(o===Function)return r;let s=vi(t)?rn(t.index,e):e;nh(s,5);let a=Hd(e,n,r,o),l=i.__ngNextListenerFn__;for(;l;)a=Hd(e,n,l,o)&&a,l=l.__ngNextListenerFn__;return a}}function at(t=1){return a1(t)}function Nn(t,e,n){return xi(t,"",e,"",n),Nn}function xi(t,e,n,r,i){let o=wt(),s=Hv(o,e,n,r);if(s!==Wn){let a=ge(),l=ku();av(a,l,o,t,s,o[be],i,!1)}return xi}function cc(t,e,n){JS(t,e,n)}function uc(t){let e=wt(),n=ge(),r=om();Ru(r+1);let i=oh(n,r);if(t.dirty&&Hw(e)===((i.metadata.flags&2)===2)){if(i.matches===null)t.reset([]);else{let o=tI(e,r);t.reset(o,F1),t.notifyOnChanges()}return!0}return!1}function hc(){return YS(wt(),om())}function lh(t,e,n,r){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=r}function wr(t){let e=rm();return ea(e,ae+t)}function he(t,e=""){let n=wt(),r=ge(),i=t+ae,o=r.firstCreatePass?xo(r,i,1,e,null):r.data[i],s=iC(r,n,o,e,t);n[i]=s,ra()&&da(r,n,s,o),ur(o,!1)}var iC=(t,e,n,r,i)=>(ia(!0),sx(e[be],r));function wa(t){return On("",t,""),wa}function On(t,e,n){let r=wt(),i=Hv(r,t,e,n);return i!==Wn&&oC(r,hr(),i),On}function oC(t,e,n){let r=Kg(e,t);ax(t[be],r,n)}var Wv={};function Io(t){let e=ge(),n=wt(),r=t+ae,i=xo(e,r,128,null,null);return ur(i,!1),lh(e,n,r,Wv),Io}function Ui(t){Fr("NgLet");let e=ge(),n=wt(),r=hr();return lh(e,n,r,t),t}function tr(t){let e=rm(),n=ea(e,ae+t);if(n===Wv)throw new Lt(314,!1);return n}function sC(t,e,n){let r=ge();if(r.firstCreatePass){let i=Tn(t);dc(n,r.data,r.blueprint,i,!0),dc(e,r.data,r.blueprint,i,!1)}}function dc(t,e,n,r,i){if(t=Ae(t),Array.isArray(t))for(let o=0;o<t.length;o++)dc(t[o],e,n,r,i);else{let o=ge(),s=wt(),a=Ze(),l=li(t)?t:Ae(t.provide),u=Vg(t),d=a.providerIndexes&1048575,f=a.directiveStart,p=a.providerIndexes>>20;if(li(t)||!t.multi){let g=new _o(u,i,Ce),m=sl(l,e,i?d:d+p,f);m===-1?(ql(Cs(a,s),o,l),ol(o,t,e.length),e.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(g),s.push(g)):(n[m]=g,s[m]=g)}else{let g=sl(l,e,d+p,f),m=sl(l,e,d,d+p),b=g>=0&&n[g],I=m>=0&&n[m];if(i&&!I||!i&&!b){ql(Cs(a,s),o,l);let A=cC(i?lC:aC,n.length,i,r,u);!i&&I&&(n[m].providerFactory=A),ol(o,t,e.length,0),e.push(l),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(A),s.push(A)}else{let A=Gv(n[i?m:g],u,!i&&r);ol(o,t,g>-1?g:m,A)}!i&&r&&I&&n[m].componentProviders++}}}function ol(t,e,n,r){let i=li(e),o=Ow(e);if(i||o){let s=(o?Ae(e.useClass):e).prototype.ngOnDestroy;if(s){let a=t.destroyHooks||(t.destroyHooks=[]);if(!i&&e.multi){let l=a.indexOf(n);l===-1?a.push(n,[r,s]):a[l+1].push(r,s)}else a.push(n,s)}}}function Gv(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function sl(t,e,n,r){for(let i=n;i<r;i++)if(e[i]===t)return i;return-1}function aC(t,e,n,r){return fc(this.multi,[])}function lC(t,e,n,r){let i=this.multi,o;if(this.providerFactory){let s=this.providerFactory.componentProviders,a=Qi(n,n[ct],this.providerFactory.index,r);o=a.slice(0,s),fc(i,o);for(let l=s;l<a.length;l++)o.push(a[l])}else o=[],fc(i,o);return o}function fc(t,e){for(let n=0;n<t.length;n++){let r=t[n];e.push(r())}return e}function cC(t,e,n,r,i){let o=new _o(t,n,Ce);return o.multi=[],o.index=e,o.componentProviders=0,Gv(o,i,r&&!n),o}function uC(t,e=[]){return n=>{n.providersResolver=(r,i)=>sC(r,i?i(t):t,e)}}function hC(t,e,n,r){return Yv(wt(),Ou(),t,e,n,r)}function Zv(t,e){let n=t[e];return n===Wn?void 0:n}function Yv(t,e,n,r,i,o){let s=e+n;return Un(t,s,i)?Bv(t,s+1,o?r.call(o,i):r(i)):Zv(t,s+1)}function dC(t,e,n,r,i,o,s){let a=e+n;return pI(t,a,i,o)?Bv(t,a+2,s?r.call(s,i,o):r(i,o)):Zv(t,a+2)}function Ge(t,e){let n=ge(),r,i=t+ae;n.firstCreatePass?(r=fC(e,n.pipeRegistry),n.data[i]=r,r.onDestroy&&(n.destroyHooks??=[]).push(i,r.onDestroy)):r=n.data[i];let o=r.factory||(r.factory=Cr(r.type,!0)),s,a=Be(Ce);try{let l=Is(!1),u=o();return Is(l),lh(n,wt(),i,u),u}finally{Be(a)}}function fC(t,e){if(e)for(let n=e.length-1;n>=0;n--){let r=e[n];if(t===r.name)return r}}function on(t,e,n){let r=t+ae,i=wt(),o=ea(i,r);return Kv(i,r)?Yv(i,Ou(),e,o.transform,n,o):o.transform(n)}function pC(t,e,n,r){let i=t+ae,o=wt(),s=ea(o,i);return Kv(o,i)?dC(o,Ou(),e,s.transform,n,r,s):s.transform(n,r)}function Kv(t,e){return t[ct].data[e].pure}function gC(t,e){return ga(t,e)}var mC=class{full;major;minor;patch;constructor(t){this.full=t;let e=t.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")}},zd=new mC("19.2.0"),vC=(()=>{class t{zone=N(Yt);changeDetectionScheduler=N(yi);applicationRef=N(lr);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function yC({ngZoneFactory:t,ignoreChangesOutsideZone:e,scheduleInRootZone:n}){return t??=()=>new Yt(Qt(L({},_C()),{scheduleInRootZone:n})),[{provide:Yt,useFactory:t},{provide:vs,multi:!0,useFactory:()=>{let r=N(vC,{optional:!0});return()=>r.initialize()}},{provide:vs,multi:!0,useFactory:()=>{let r=N(bC);return()=>{r.initialize()}}},e===!0?{provide:Im,useValue:!0}:[],{provide:ju,useValue:n??Sm}]}function _C(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var bC=(()=>{class t{subscription=new ye;initialized=!1;zone=N(Yt);pendingTasks=N(oa);initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Yt.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Yt.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Jv=(()=>{class t{appRef=N(lr);taskService=N(oa);ngZone=N(Yt);zonelessEnabled=N(Mu);tracing=N(bo,{optional:!0});disableScheduling=N(Im,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new ye;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Os):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(N(ju,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof Tm||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;let r=!1;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,r=!0;break}case 12:{this.appRef.dirtyFlags|=16,r=!0;break}case 13:{this.appRef.dirtyFlags|=2,r=!0;break}case 11:{r=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(r))return;let i=this.useMicrotaskScheduler?md:Cm;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(n){return!(this.disableScheduling&&!n||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(Os+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(n),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,md(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function wC(){return Fr("NgZoneless"),xw([{provide:yi,useExisting:Jv},{provide:Yt,useClass:Tm},{provide:Mu,useValue:!0},{provide:ju,useValue:!1},[]])}function EC(){return typeof $localize<"u"&&$localize.locale||As}var Qv=new Et("",{providedIn:"root",factory:()=>N(Qv,Rt.Optional|Rt.SkipSelf)||EC()}),pc=new Et(""),xC=new Et("");function Oi(t){return!t.moduleRef}function SC(t){let e=Oi(t)?t.r3Injector:t.moduleRef.injector,n=e.get(Yt);return n.run(()=>{Oi(t)?t.r3Injector.resolveInjectorInitializers():t.moduleRef.resolveInjectorInitializers();let r=e.get(_i,null),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:o=>{r.handleError(o)}})}),Oi(t)){let o=()=>e.destroy(),s=t.platformInjector.get(pc);s.add(o),e.onDestroy(()=>{i.unsubscribe(),s.delete(o)})}else{let o=()=>t.moduleRef.destroy(),s=t.platformInjector.get(pc);s.add(o),t.moduleRef.onDestroy(()=>{is(t.allPlatformModules,t.moduleRef),i.unsubscribe(),s.delete(o)})}return CC(r,n,()=>{let o=e.get(Uv);return o.runInitializers(),o.donePromise.then(()=>{let s=e.get(Qv,As);if(tC(s||As),!e.get(xC,!0))return Oi(t)?e.get(lr):(t.allPlatformModules.push(t.moduleRef),t.moduleRef);if(Oi(t)){let a=e.get(lr);return t.rootComponent!==void 0&&a.bootstrap(t.rootComponent),a}else return IC(t.moduleRef,t.allPlatformModules),t.moduleRef})})})}function IC(t,e){let n=t.injector.get(lr);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(r=>n.bootstrap(r));else if(t.instance.ngDoBootstrap)t.instance.ngDoBootstrap(n);else throw new Lt(-403,!1);e.push(t)}function CC(t,e,n){try{let r=n();return Fv(r)?r.catch(i=>{throw e.runOutsideAngular(()=>t.handleError(i)),i}):r}catch(r){throw e.runOutsideAngular(()=>t.handleError(r)),r}}var os=null;function TC(t=[],e){return Pe.create({name:e,providers:[{provide:bu,useValue:"platform"},{provide:pc,useValue:new Set([()=>os=null])},...t]})}function OC(t=[]){if(os)return os;let e=TC(t);return os=e,SI(),RC(e),e}function RC(t){let e=t.get(jm,null);Bg(t,()=>{e?.forEach(n=>n())})}var Co=(()=>{class t{static __NG_ELEMENT_ID__=DC}return t})();function DC(t){return NC(Ze(),wt(),(t&16)===16)}function NC(t,e,n){if(vi(t)&&!n){let r=rn(t.index,e);return new eo(r,r)}else if(t.type&175){let r=e[vn];return new eo(r,e)}return null}function kC(t){qt(8);try{let{rootComponent:e,appProviders:n,platformProviders:r}=t,i=OC(r),o=[yC({}),{provide:yi,useExisting:Jv},...n||[]],s=new Mv({providers:o,parent:i,debugName:"",runEnvironmentInitializers:!1});return SC({r3Injector:s.injector,platformInjector:i,rootComponent:e})}catch(e){return Promise.reject(e)}finally{qt(9)}}function AC(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function PC(t,e=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):e}function LC(t){let e=Ot(null);try{return t()}finally{Ot(e)}}var qP=class{[er];constructor(t){this[er]=t}destroy(){this[er].destroy()}};function Xv(t,e){let n=Or(t),r=e.elementInjector||Xs();return new ih(n).create(r,e.projectableNodes,e.hostElement,e.environmentInjector)}var MC={schedule(t,e){let n=setTimeout(t,e);return()=>clearTimeout(n)}};function jC(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function VC(t){return!!t&&t.nodeType===Node.ELEMENT_NODE}var al;function BC(t,e){if(!al){let n=Element.prototype;al=n.matches||n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}return t.nodeType===Node.ELEMENT_NODE?al.call(t,e):!1}function FC(t){let e={};return t.forEach(({propName:n,templateName:r,transform:i})=>{e[jC(r)]=[n,i]}),e}function UC(t,e){return e.get(So).resolveComponentFactory(t).inputs}function HC(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 a=n[o],l=$C(a,e,i);l!==-1&&r[l].push(a)}return r}function $C(t,e,n){let r=n;return VC(t)&&e.some((i,o)=>i!=="*"&&BC(t,i)?(r=o,!0):!1),r}var zC=10,qC=class{componentFactory;inputMap=new Map;constructor(t,e){this.componentFactory=e.get(So).resolveComponentFactory(t);for(let n of this.componentFactory.inputs)this.inputMap.set(n.propName,n.templateName)}create(t){return new WC(this.componentFactory,t,this.inputMap)}},WC=class{componentFactory;injector;inputMap;eventEmitters=new cb(1);events=this.eventEmitters.pipe(_g(t=>Js(...t)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(t,e,n){this.componentFactory=t,this.injector=e,this.inputMap=n,this.ngZone=this.injector.get(Yt),this.appRef=this.injector.get(lr),this.cdScheduler=e.get(yi),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=MC.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},zC))})}getInputValue(t){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){if(this.componentRef===null){this.initialInputValues.set(t,e);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(t)??t,e),this.componentRef.hostView.dirty&&(this.componentRef.changeDetectorRef.markForRefresh(),this.cdScheduler.notify(6))})}initializeComponent(t){let e=Pe.create({providers:[],parent:this.injector}),n=HC(t,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(e,n,t),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[t,e]of this.initialInputValues)this.setInputValue(t,e);this.initialInputValues.clear()}initializeOutputs(t){let e=this.componentFactory.outputs.map(({propName:n,templateName:r})=>{let i=t.instance[n];return new _e(o=>{let s=i.subscribe(a=>o.next({name:r,value:a}));return()=>s.unsubscribe()})});this.eventEmitters.next(e)}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}},GC=class extends HTMLElement{ngElementEventsSubscription=null};function ZC(t,e){let n=UC(t,e.injector),r=e.strategyFactory||new qC(t,e.injector),i=FC(n);class o extends GC{injector;static observedAttributes=Object.keys(i);get ngElementStrategy(){if(!this._ngElementStrategy){let a=this._ngElementStrategy=r.create(this.injector||e.injector);n.forEach(({propName:l,transform:u})=>{if(!this.hasOwnProperty(l))return;let d=this[l];delete this[l],a.setInputValue(l,d,u)})}return this._ngElementStrategy}_ngElementStrategy;constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,u,d){let[f,p]=i[a];this.ngElementStrategy.setInputValue(f,u,p)}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=>{let l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return n.forEach(({propName:s,transform:a})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(l){this.ngElementStrategy.setInputValue(s,l,a)},configurable:!0,enumerable:!0})}),o}var ty=null;function Hi(){return ty}function YC(t){ty??=t}var KC=class{},ne=new Et(""),ey=(()=>{class t{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:()=>N(JC),providedIn:"platform"})}return t})(),JC=(()=>{class t extends ey{_location;_history;_doc=N(ne);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Hi().getBaseHref(this._doc)}onPopState(n){let r=Hi().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Hi().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,r,i){this._history.pushState(n,r,i)}replaceState(n,r,i){this._history.replaceState(n,r,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:()=>new t,providedIn:"platform"})}return t})();function ny(t,e){return t?e?t.endsWith("/")?e.startsWith("/")?t+e.slice(1):t+e:e.startsWith("/")?t+e:`${t}/${e}`:t:e}function qd(t){let e=t.search(/#|\?|$/);return t[e-1]==="/"?t.slice(0,e-1)+t.slice(e):t}function Er(t){return t&&t[0]!=="?"?`?${t}`:t}var ch=(()=>{class t{historyGo(n){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:()=>N(XC),providedIn:"root"})}return t})(),QC=new Et(""),XC=(()=>{class t extends ch{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,r){super(),this._platformLocation=n,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??N(ne).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return ny(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+Er(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${r}${i}`:r}pushState(n,r,i,o){let s=this.prepareExternalUrl(i+Er(o));this._platformLocation.pushState(n,r,s)}replaceState(n,r,i,o){let s=this.prepareExternalUrl(i+Er(o));this._platformLocation.replaceState(n,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(n){return new(n||t)(Bt(ey),Bt(QC,8))};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ry=(()=>{class t{_subject=new dt;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=nT(qd(Wd(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+Er(r))}normalize(n){return t.stripTrailingSlash(eT(this._basePath,Wd(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",i=null){this._locationStrategy.pushState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Er(r)),i)}replaceState(n,r="",i=null){this._locationStrategy.replaceState(i,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Er(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(i=>i(n,r))}subscribe(n,r,i){return this._subject.subscribe({next:n,error:r??void 0,complete:i??void 0})}static normalizeQueryParams=Er;static joinWithSlash=ny;static stripTrailingSlash=qd;static \u0275fac=function(n){return new(n||t)(Bt(ch))};static \u0275prov=ut({token:t,factory:()=>tT(),providedIn:"root"})}return t})();function tT(){return new ry(Bt(ch))}function eT(t,e){if(!t||!e.startsWith(t))return e;let n=e.substring(t.length);return n===""||["/",";","?","#"].includes(n[0])?n:e}function Wd(t){return t.replace(/\/index.html$/,"")}function nT(t){if(new RegExp("^(https?:)?//").test(t)){let[,e]=t.split(/\/\/[^\/]+/);return e}return t}function rT(t,e){e=encodeURIComponent(e);for(let n of t.split(";")){let r=n.indexOf("="),[i,o]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===e)return decodeURIComponent(o)}return null}var ll=/\s+/,Gd=[],iT=(()=>{class t{_ngEl;_renderer;initialClasses=Gd;rawClass;stateMap=new Map;constructor(n,r){this._ngEl=n,this._renderer=r}set klass(n){this.initialClasses=n!=null?n.trim().split(ll):Gd}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(ll):n}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let r of n)this._updateState(r,!0);else if(n!=null)for(let r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){let i=this.stateMap.get(n);i!==void 0?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let r=n[0],i=n[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(n,r){n=n.trim(),n.length>0&&n.split(ll).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(n){return new(n||t)(Ce(He),Ce(Iv))};static \u0275dir=ma({type:t,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return t})(),oT=(()=>{class t{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(n){this._viewContainerRef=n}ngOnChanges(n){if(this._shouldRecreateView(n)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,i):!1,get:(n,r,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,i)}})}static \u0275fac=function(n){return new(n||t)(Ce(wi))};static \u0275dir=ma({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[qg]})}return t})(),iy="browser",sT="server";function aT(t){return t===iy}function oy(t){return t===sT}var lT=class{},cT=class extends KC{supportsDOMEvents=!0},uT=class sy extends cT{static makeCurrent(){YC(new sy)}onAndCancel(e,n,r,i){return e.addEventListener(n,r,i),()=>{e.removeEventListener(n,r,i)}}dispatchEvent(e,n){e.dispatchEvent(n)}remove(e){e.remove()}createElement(e,n){return n=n||this.getDefaultDocument(),n.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,n){return n==="window"?window:n==="document"?e:n==="body"?e.body:null}getBaseHref(e){let n=hT();return n==null?null:dT(n)}resetBaseElement(){Mi=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return rT(document.cookie,e)}},Mi=null;function hT(){return Mi=Mi||document.querySelector("base"),Mi?Mi.getAttribute("href"):null}function dT(t){return new URL(t,document.baseURI).pathname}var fT=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac})}return t})(),gc=new Et(""),ay=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,i,o){return this._findPluginFor(r).addEventListener(n,r,i,o)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new Lt(5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(n){return new(n||t)(Bt(gc),Bt(Yt))};static \u0275prov=ut({token:t,factory:t.\u0275fac})}return t})(),ly=class{_doc;constructor(t){this._doc=t}manager},ss="ng-app-id";function Zd(t){for(let e of t)e.remove()}function Yd(t,e){let n=e.createElement("style");return n.textContent=t,n}function pT(t,e,n,r){let i=t.head?.querySelectorAll(`style[${ss}="${e}"],link[${ss}="${e}"]`);if(i)for(let o of i)o.removeAttribute(ss),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&n.set(o.textContent,{usage:0,elements:[o]})}function mc(t,e){let n=e.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",t),n}var cy=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,r,i,o={}){this.doc=n,this.appId=r,this.nonce=i,this.isServer=oy(o),pT(n,r,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,r){for(let i of n)this.addUsage(i,this.inline,Yd);r?.forEach(i=>this.addUsage(i,this.external,mc))}removeStyles(n,r){for(let i of n)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(n,r,i){let o=r.get(n);o?o.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(n,this.doc)))})}removeUsage(n,r){let i=r.get(n);i&&(i.usage--,i.usage<=0&&(Zd(i.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])Zd(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(n,Yd(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(n,mc(r,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute(ss,this.appId),n.appendChild(r)}static \u0275fac=function(n){return new(n||t)(Bt(ne),Bt(Uu),Bt(Vm,8),Bt(sa))};static \u0275prov=ut({token:t,factory:t.\u0275fac})}return t})(),cl={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/",math:"http://www.w3.org/1998/Math/MathML"},uh=/%COMP%/g,uy="%COMP%",gT=`_nghost-${uy}`,mT=`_ngcontent-${uy}`,vT=!0,yT=new Et("",{providedIn:"root",factory:()=>vT});function _T(t){return mT.replace(uh,t)}function bT(t){return gT.replace(uh,t)}function hy(t,e){return e.map(n=>n.replace(uh,t))}var Kd=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,r,i,o,s,a,l,u=null,d=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=l,this.nonce=u,this.tracingService=d,this.platformIsServer=oy(a),this.defaultRenderer=new hh(n,s,l,this.platformIsServer,this.tracingService)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Pn.ShadowDom&&(r=Qt(L({},r),{encapsulation:Pn.Emulated}));let i=this.getOrCreateRenderer(n,r);return i instanceof Qd?i.applyToHost(n):i instanceof vc&&i.applyStyles(),i}getOrCreateRenderer(n,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,u=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,f=this.platformIsServer,p=this.tracingService;switch(r.encapsulation){case Pn.Emulated:o=new Qd(l,u,r,this.appId,d,s,a,f,p);break;case Pn.ShadowDom:return new wT(l,u,n,r,s,a,this.nonce,f,p);default:o=new vc(l,u,r,d,s,a,f,p);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(n){return new(n||t)(Bt(ay),Bt(cy),Bt(Uu),Bt(yT),Bt(ne),Bt(sa),Bt(Yt),Bt(Vm),Bt(bo,8))};static \u0275prov=ut({token:t,factory:t.\u0275fac})}return t})(),hh=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,n,r,i){this.eventManager=t,this.doc=e,this.ngZone=n,this.platformIsServer=r,this.tracingService=i}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(cl[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(Jd(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(Jd(t)?t.content:t).insertBefore(e,n)}removeChild(t,e){e.remove()}selectRootElement(t,e){let n=typeof t=="string"?this.doc.querySelector(t):t;if(!n)throw new Lt(-5104,!1);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,r){if(r){e=r+":"+e;let i=cl[r];i?t.setAttributeNS(i,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){let r=cl[n];r?t.removeAttributeNS(r,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,r){r&(br.DashCase|br.Important)?t.style.setProperty(e,n,r&br.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&br.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t!=null&&(t[e]=n)}setValue(t,e){t.nodeValue=e}listen(t,e,n,r){if(typeof t=="string"&&(t=Hi().getGlobalEventTarget(this.doc,t),!t))throw new Error(`Unsupported event target ${t} for event ${e}`);let i=this.decoratePreventDefault(n);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(i=this.tracingService.wrapEventListener(t,e,i)),this.eventManager.addEventListener(t,e,i,r)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(e)):t(e))===!1&&e.preventDefault()}}};function Jd(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var wT=class extends hh{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,n,r,i,o,s,a,l){super(t,i,o,a,l),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=r.styles;u=hy(r.id,u);for(let f of u){let p=document.createElement("style");s&&p.setAttribute("nonce",s),p.textContent=f,this.shadowRoot.appendChild(p)}let d=r.getExternalStyles?.();if(d)for(let f of d){let p=mc(f,i);s&&p.setAttribute("nonce",s),this.shadowRoot.appendChild(p)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},vc=class extends hh{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,n,r,i,o,s,a,l){super(t,i,o,s,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r;let u=n.styles;this.styles=l?hy(l,u):u,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Qd=class extends vc{contentAttr;hostAttr;constructor(t,e,n,r,i,o,s,a,l){let u=r+"-"+n.id;super(t,e,n,i,o,s,a,l,u),this.contentAttr=_T(u),this.hostAttr=bT(u)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}},ET=(()=>{class t extends ly{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i,o){return n.addEventListener(r,i,o),()=>this.removeEventListener(n,r,i,o)}removeEventListener(n,r,i,o){return n.removeEventListener(r,i,o)}static \u0275fac=function(n){return new(n||t)(Bt(ne))};static \u0275prov=ut({token:t,factory:t.\u0275fac})}return t})(),Xd=["alt","control","meta","shift"],xT={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},ST={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},IT=(()=>{class t extends ly{constructor(n){super(n)}supports(n){return t.parseEventName(n)!=null}addEventListener(n,r,i,o){let s=t.parseEventName(r),a=t.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Hi().onAndCancel(n,s.domEventName,a,o))}static parseEventName(n){let r=n.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=t._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),Xd.forEach(u=>{let d=r.indexOf(u);d>-1&&(r.splice(d,1),s+=u+".")}),s+=o,r.length!=0||o.length===0)return null;let l={};return l.domEventName=i,l.fullKey=s,l}static matchEventFullKeyCode(n,r){let i=xT[n.key]||n.key,o="";return r.indexOf("code.")>-1&&(i=n.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),Xd.forEach(s=>{if(s!==i){let a=ST[s];a(n)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(n,r,i){return o=>{t.matchEventFullKeyCode(o,n)&&i.runGuarded(()=>r(o))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(n){return new(n||t)(Bt(ne))};static \u0275prov=ut({token:t,factory:t.\u0275fac})}return t})();function CT(t){return kC(TT(t))}function TT(t){return{appProviders:[...kT,...t?.providers??[]],platformProviders:NT}}function OT(){uT.makeCurrent()}function RT(){return new _i}function DT(){return tE(document),document}var NT=[{provide:sa,useValue:iy},{provide:jm,useValue:OT,multi:!0},{provide:ne,useFactory:DT,deps:[]}],kT=[{provide:bu,useValue:"root"},{provide:_i,useFactory:RT,deps:[]},{provide:gc,useClass:ET,multi:!0,deps:[ne]},{provide:gc,useClass:IT,multi:!0,deps:[ne]},Kd,cy,ay,{provide:wn,useExisting:Kd},{provide:lT,useClass:fT,deps:[]},[]],dy=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:function(n){let r=null;return n?r=new(n||t):r=Bt(AT),r},providedIn:"root"})}return t})(),AT=(()=>{class t extends dy{_doc;constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case An.NONE:return r;case An.HTML:return yr(r,"HTML")?Xn(r):Jm(this._doc,String(r)).toString();case An.STYLE:return yr(r,"Style")?Xn(r):r;case An.SCRIPT:if(yr(r,"Script"))return Xn(r);throw new Lt(5200,!1);case An.URL:return yr(r,"URL")?Xn(r):zu(String(r));case An.RESOURCE_URL:if(yr(r,"ResourceURL"))return Xn(r);throw new Lt(5201,!1);default:throw new Lt(5202,!1)}}bypassSecurityTrustHtml(n){return bE(n)}bypassSecurityTrustStyle(n){return wE(n)}bypassSecurityTrustScript(n){return EE(n)}bypassSecurityTrustUrl(n){return xE(n)}bypassSecurityTrustResourceUrl(n){return SE(n)}static \u0275fac=function(n){return new(n||t)(Bt(ne))};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),PT="9.9.2",Se=class yc{static SDK_VERSION=PT;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_EXPERIMENT_START="CE Experiment Start";static EVENT_VIDEO_DIALOG_CLOSED="CE Video Dialog Closed";static EVENT_VIDEO_DIALOG_OPENED="CE Video Dialog Opened";static EVENT_VIDEO_CHANGE="CE Video Changed";static EVENT_LAST_VIDEO_ENDED="CE Last Video Ended";static EVENT_VIDEO_MUTED="CE Video Muted";static EVENT_VIDEO_UNMUTED="CE Video Unmuted";static EVENT_ADD_TO_CART_CLICKED="CE Add To Cart Clicked";static EVENT_VIEW_ITEM_CLICKED="CE View Item Clicked";static EVENT_MORE_ITEM_INFO_CLICKED="CE More Item Info Clicked";static EVENT_OPEN_CART_CLICKED="CE Open Cart Clicked";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static CTA_AFTER_REFRESH_UI="letscooee:outbound:refresh-ui";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static PAYMENT_MODAL_DETAILS=[{identifier:"#flo-checkout-wrapper",gateway:"Shopflow"},{identifier:"#fastrr-main-container",gateway:"Shiprocket"},{identifier:"#gokwik-modal-wrapper",gateway:"Gokwik"},{identifier:"#zecpe",gateway:"Ecom 360"}];static{let e=yc.SDK_VERSION.split(".").map(n=>n.padStart(2,"0")).join("");yc.SDK_VERSION_CODE=parseInt(e,10)}},so={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Se.SDK_VERSION}/dist/widget.min.css`,widgetURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${Se.SDK_VERSION}/dist/widget.min.js`},en=an(C0()),$e=class{static log(...t){en.default.info(...t)}static debug(...t){en.default.debug(...t)}static error(...t){en.default.error(...t)}static warn(...t){en.default.warn(...t)}static info(...t){en.default.info(...t)}static trace(...t){en.default.trace(...t)}};function LT(t=Se.LOG_PREFIX){en.default.useDefaults({formatter:function(n){n.unshift(`${t} (v${Se.SDK_VERSION}):`)}});let e=MT();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?en.default.setLevel(en.default[localStorage.cooeeLogLevel]):en.default.setLevel(so.debug?en.default.TRACE:en.default.OFF)}function MT(){return new URL(location.href).searchParams?.get("cooee-debug")}var jT={providers:[wC()]},ul=an(ho()),WP=an(T0()),fy=class{gaEnabled;gaMeasurementID;pixelPush;website;currencyCount;money;storefrontToken;skipItemAttribute;currency;static get(){return window.CooeeSDK.config}update(t){return t??={},this.gaEnabled=t.gaEnabled,this.gaMeasurementID=t.gaMeasurementID,this.pixelPush=t.pixelPush,this.website=t.website??{},this.currencyCount=t.currencyCount??0,this.money=t.money,this.currency=t.currency,this.storefrontToken=t.storefrontToken,this.skipItemAttribute=t.skipItemAttribute,this}},py=Object.prototype.toString;function dh(t){switch(py.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Pr(t,Error)}}function Si(t,e){return py.call(t)===`[object ${e}]`}function gy(t){return Si(t,"ErrorEvent")}function tf(t){return Si(t,"DOMError")}function VT(t){return Si(t,"DOMException")}function Mn(t){return Si(t,"String")}function fh(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function ph(t){return t===null||fh(t)||typeof t!="object"&&typeof t!="function"}function di(t){return Si(t,"Object")}function Ea(t){return typeof Event<"u"&&Pr(t,Event)}function BT(t){return typeof Element<"u"&&Pr(t,Element)}function FT(t){return Si(t,"RegExp")}function xa(t){return!!(t&&t.then&&typeof t.then=="function")}function UT(t){return di(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Pr(t,e){try{return t instanceof e}catch{return!1}}function my(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function si(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function ef(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r<t.length;r++){let i=t[r];try{my(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function HT(t,e,n=!1){return Mn(t)?FT(e)?e.test(t):Mn(e)?n?t===e:t.includes(e):!1:!1}function Sa(t,e=[],n=!1){return e.some(r=>HT(t,r,n))}function $T(t,e,n=250,r,i,o,s){if(!o.exception||!o.exception.values||!s||!Pr(s.originalException,Error))return;let a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=zT(_c(t,e,i,s.originalException,r,o.exception.values,a,0),n))}function _c(t,e,n,r,i,o,s,a){if(o.length>=n+1)return o;let l=[...o];if(Pr(r[i],Error)){nf(s,a);let u=t(e,r[i]),d=l.length;rf(u,i,d,a),l=_c(t,e,n,r[i],i,[u,...l],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(Pr(u,Error)){nf(s,a);let f=t(e,u),p=l.length;rf(f,`errors[${d}]`,p,a),l=_c(t,e,n,u,i,[f,...l],f,p)}}),l}function nf(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Qt(L(L({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function rf(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Qt(L({},t.mechanism),{type:"chained",source:e,exception_id:n,parent_id:r})}function zT(t,e){return t.map(n=>(n.value&&(n.value=si(n.value,e)),n))}var xr="8.18.0",$t=globalThis;function gh(t,e,n){let r=n||$t,i=r.__SENTRY__=r.__SENTRY__||{},o=i[xr]=i[xr]||{};return o[t]||(o[t]=e())}var mh=$t,qT=80;function vy(t,e={}){if(!t)return"<unknown>";try{let n=t,r=5,i=[],o=0,s=0,a=" > ",l=a.length,u,d=Array.isArray(e)?e:e.keyAttrs,f=!Array.isArray(e)&&e.maxStringLength||qT;for(;n&&o++<r&&(u=WT(n,d),!(u==="html"||o>1&&s+i.length*l+u.length>=f));)i.push(u),s+=u.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function WT(t,e){let n=t,r=[];if(!n||!n.tagName)return"";if(mh.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=e&&e.length?e.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i&&i.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&Mn(s)){let a=s.split(/\s+/);for(let l of a)r.push(`.${l}`)}}let o=["aria-label","type","name","title","alt"];for(let s of o){let a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function GT(){try{return mh.document.location.href}catch{return""}}function ZT(t){if(!mh.HTMLElement)return null;let e=t,n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}var To=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,YT="Sentry Logger ",bc=["debug","info","warn","error","log","assert","trace"],Ps={};function vh(t){if(!("console"in $t))return t();let e=$t.console,n={},r=Object.keys(Ps);r.forEach(i=>{let o=Ps[i];n[i]=e[i],e[i]=o});try{return t()}finally{r.forEach(i=>{e[i]=n[i]})}}function KT(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return To?bc.forEach(n=>{e[n]=(...r)=>{t&&vh(()=>{$t.console[n](`${YT}[${n}]:`,...r)})}}):bc.forEach(n=>{e[n]=()=>{}}),e}var _t=KT(),JT=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function QT(t){return t==="http"||t==="https"}function Ia(t,e=!1){let{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:l}=t;return`${a}://${l}${e&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function XT(t){let e=JT.exec(t);if(!e){vh(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}let[n,r,i="",o="",s="",a=""]=e.slice(1),l="",u=a,d=u.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),u=d.pop()),u){let f=u.match(/^\d+/);f&&(u=f[0])}return yy({host:o,pass:i,path:l,projectId:u,port:s,protocol:n,publicKey:r})}function yy(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function tO(t){if(!To)return!0;let{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(i=>t[i]?!1:(_t.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?QT(r)?e&&isNaN(parseInt(e,10))?(_t.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(_t.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(_t.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function eO(t){let e=typeof t=="string"?XT(t):yy(t);if(!(!e||!tO(e)))return e}var xn=class extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}};function Te(t,e,n){if(!(e in t))return;let r=t[e],i=n(r);typeof i=="function"&&_y(i,r),t[e]=i}function Lr(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{To&&_t.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function _y(t,e){try{let n=e.prototype||{};t.prototype=e.prototype=n,Lr(t,"__sentry_original__",e)}catch{}}function yh(t){return t.__sentry_original__}function nO(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function by(t){if(dh(t))return L({message:t.message,name:t.name,stack:t.stack},sf(t));if(Ea(t)){let e=L({type:t.type,target:of(t.target),currentTarget:of(t.currentTarget)},sf(t));return typeof CustomEvent<"u"&&Pr(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function of(t){try{return BT(t)?vy(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function sf(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function rO(t,e=40){let n=Object.keys(by(t));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return si(r,e);for(let i=n.length;i>0;i--){let o=n.slice(0,i).join(", ");if(!(o.length>e))return i===n.length?o:si(o,e)}return""}function un(t){return wc(t,new Map)}function wc(t,e){if(iO(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let i of Object.keys(t))typeof t[i]<"u"&&(r[i]=wc(t[i],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(i=>{r.push(wc(i,e))}),r}return t}function iO(t){if(!di(t))return!1;try{let e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}var Mr="?",af=/\(error: (.*)\)/,lf=/captureMessage|captureException/;function oO(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],s=n.split(`
|
|
8
|
+
`);for(let a=r;a<s.length;a++){let l=s[a];if(l.length>1024)continue;let u=af.test(l)?l.replace(af,"$1"):l;if(!u.match(/\S*Error: /)){for(let d of e){let f=d(u);if(f){o.push(f);break}}if(o.length>=50+i)break}}return sO(o.slice(i))}}function sO(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(Fo(e).function||"")&&e.pop(),e.reverse(),lf.test(Fo(e).function||"")&&(e.pop(),lf.test(Fo(e).function||"")&&e.pop()),e.slice(0,50).map(n=>Qt(L({},n),{filename:n.filename||Fo(e).filename,function:n.function||Mr}))}function Fo(t){return t[t.length-1]||{}}var hl="<anonymous>";function cr(t){try{return!t||typeof t!="function"?hl:t.name||hl}catch{return hl}}function cf(t){let e=t.exception;if(e){let n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var as={},uf={};function $r(t,e){as[t]=as[t]||[],as[t].push(e)}function zr(t,e){uf[t]||(e(),uf[t]=!0)}function pn(t,e){let n=t&&as[t];if(n)for(let r of n)try{r(e)}catch(i){To&&_t.error(`Error while triggering instrumentation handler.
|
|
9
|
+
Type: ${t}
|
|
10
|
+
Name: ${cr(r)}
|
|
11
|
+
Error:`,i)}}function aO(t){let e="console";$r(e,t),zr(e,lO)}function lO(){"console"in $t&&bc.forEach(function(t){t in $t.console&&Te($t.console,t,function(e){return Ps[t]=e,function(...n){pn("console",{args:n,level:t});let r=Ps[t];r&&r.apply($t.console,n)}})})}var Ec=$t;function cO(){if(!("fetch"in Ec))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function xc(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function uO(){if(typeof EdgeRuntime=="string")return!0;if(!cO())return!1;if(xc(Ec.fetch))return!0;let t=!1,e=Ec.document;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=xc(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){To&&_t.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}var wy=1e3;function Oo(){return Date.now()/wy}function hO(){let{performance:t}=$t;if(!t||!t.now)return Oo;let e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/wy}var or=hO(),Uo,GP=(()=>{let{performance:t}=$t;if(!t||!t.now){Uo="none";return}let e=3600*1e3,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,o=i<e,s=t.timing&&t.timing.navigationStart,a=typeof s=="number"?Math.abs(s+n-r):e,l=a<e;return o||l?i<=a?(Uo="timeOrigin",t.timeOrigin):(Uo="navigationStart",s):(Uo="dateNow",r)})();function dO(t){let e="fetch";$r(e,t),zr(e,fO)}function fO(){uO()&&Te($t,"fetch",function(t){return function(...e){let{method:n,url:r}=pO(e),i={args:e,fetchData:{method:n,url:r},startTimestamp:or()*1e3};pn("fetch",L({},i));let o=new Error().stack;return t.apply($t,e).then(s=>{let a=Qt(L({},i),{endTimestamp:or()*1e3,response:s});return pn("fetch",a),s},s=>{let a=Qt(L({},i),{endTimestamp:or()*1e3,error:s});throw pn("fetch",a),dh(s)&&s.stack===void 0&&(s.stack=o,Lr(s,"framesToPop",1)),s})}})}function Sc(t,e){return!!t&&typeof t=="object"&&!!t[e]}function hf(t){return typeof t=="string"?t:t?Sc(t,"url")?t.url:t.toString?t.toString():"":""}function pO(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[n,r]=t;return{url:hf(n),method:Sc(r,"method")?String(r.method).toUpperCase():"GET"}}let e=t[0];return{url:hf(e),method:Sc(e,"method")?String(e.method).toUpperCase():"GET"}}var Ho=null;function gO(t){let e="error";$r(e,t),zr(e,mO)}function mO(){Ho=$t.onerror,$t.onerror=function(t,e,n,r,i){return pn("error",{column:r,error:i,line:n,msg:t,url:e}),Ho&&!Ho.__SENTRY_LOADER__?Ho.apply(this,arguments):!1},$t.onerror.__SENTRY_INSTRUMENTED__=!0}var $o=null;function vO(t){let e="unhandledrejection";$r(e,t),zr(e,yO)}function yO(){$o=$t.onunhandledrejection,$t.onunhandledrejection=function(t){return pn("unhandledrejection",t),$o&&!$o.__SENTRY_LOADER__?$o.apply(this,arguments):!0},$t.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function _O(){return"npm"}function bO(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(i){if(t)return e.has(i)?!0:(e.add(i),!1);for(let o=0;o<e.length;o++)if(e[o]===i)return!0;return e.push(i),!1}function r(i){if(t)e.delete(i);else for(let o=0;o<e.length;o++)if(e[o]===i){e.splice(o,1);break}}return[n,r]}function gn(){let t=$t,e=t.crypto||t.msCrypto,n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function Ey(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Kn(t){let{message:e,event_id:n}=t;if(e)return e;let r=Ey(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Ic(t,e,n){let r=t.exception=t.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=e||""),o.type||(o.type=n||"Error")}function ao(t,e){let n=Ey(t);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=L(L(L({},r),i),e),e&&"data"in e){let o=L(L({},i&&i.data),e.data);n.mechanism.data=o}}function df(t){if(t&&t.__sentry_captured__)return!0;try{Lr(t,"__sentry_captured__",!0)}catch{}return!1}function wO(t){return Array.isArray(t)?t:[t]}function Jn(t,e=100,n=1/0){try{return Cc("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function xy(t,e=3,n=100*1024){let r=Jn(t,e);return IO(r)>n?xy(t,e-1,n):r}function Cc(t,e,n=1/0,r=1/0,i=bO()){let[o,s]=i;if(e==null||["number","boolean","string"].includes(typeof e)&&!Number.isNaN(e))return e;let a=EO(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;let l=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(o(e))return"[Circular ~]";let u=e;if(u&&typeof u.toJSON=="function")try{let g=u.toJSON();return Cc("",g,l-1,r,i)}catch{}let d=Array.isArray(e)?[]:{},f=0,p=by(e);for(let g in p){if(!Object.prototype.hasOwnProperty.call(p,g))continue;if(f>=r){d[g]="[MaxProperties ~]";break}let m=p[g];d[g]=Cc(g,m,l-1,r,i),f++}return s(e),d}function EO(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(my(e))return"[VueViewModel]";if(UT(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${cr(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let n=xO(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function xO(t){let e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function SO(t){return~-encodeURI(t).split(/%..|./).length}function IO(t){return SO(JSON.stringify(t))}var kn;(function(t){t[t.PENDING=0]="PENDING";let e=1;t[t.RESOLVED=e]="RESOLVED";let n=2;t[t.REJECTED=n]="REJECTED"})(kn||(kn={}));function jr(t){return new Ro(e=>{e(t)})}function Ls(t){return new Ro((e,n)=>{n(t)})}var Ro=class mr{constructor(e){mr.prototype.__init.call(this),mr.prototype.__init2.call(this),mr.prototype.__init3.call(this),mr.prototype.__init4.call(this),this._state=kn.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new mr((r,i)=>{this._handlers.push([!1,o=>{if(!e)r(o);else try{r(e(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new mr((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,e&&e()},s=>{o=!0,i=s,e&&e()}).then(()=>{if(o){r(i);return}n(i)})})}__init(){this._resolve=e=>{this._setResult(kn.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(kn.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===kn.PENDING){if(xa(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===kn.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===kn.RESOLVED&&n[1](this._value),this._state===kn.REJECTED&&n[2](this._value),n[0]=!0)})}}};function CO(t){let e=[];function n(){return t===void 0||e.length<t}function r(s){return e.splice(e.indexOf(s),1)[0]||Promise.resolve(void 0)}function i(s){if(!n())return Ls(new xn("Not adding Promise because buffer limit was reached."));let a=s();return e.indexOf(a)===-1&&e.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(s){return new Ro((a,l)=>{let u=e.length;if(!u)return a(!0);let d=setTimeout(()=>{s&&s>0&&a(!1)},s);e.forEach(f=>{jr(f).then(()=>{--u||(clearTimeout(d),a(!0))},l)})})}return{$:e,add:i,drain:o}}function dl(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}var TO=["fatal","error","warning","log","info","debug"];function OO(t){return t==="warn"?"warning":TO.includes(t)?t:"log"}var RO="sentry-",DO=/^sentry-/;function NO(t){let e=kO(t);if(!e)return;let n=Object.entries(e).reduce((r,[i,o])=>{if(i.match(DO)){let s=i.slice(RO.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function kO(t){if(!(!t||!Mn(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{let r=ff(n);return Object.entries(r).forEach(([i,o])=>{e[i]=o}),e},{}):ff(t)}function ff(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function Do(t,e=[]){return[t,e]}function AO(t,e){let[n,r]=t;return[n,[...r,e]]}function pf(t,e){let n=t[1];for(let r of n){let i=r[0].type;if(e(r,i))return!0}return!1}function Tc(t){return $t.__SENTRY__&&$t.__SENTRY__.encodePolyfill?$t.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function PO(t){let[e,n]=t,r=JSON.stringify(e);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[Tc(r),o]:r.push(typeof o=="string"?Tc(o):o)}for(let o of n){let[s,a]=o;if(i(`
|
|
12
|
+
${JSON.stringify(s)}
|
|
13
|
+
`),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(Jn(a))}i(l)}}return typeof r=="string"?r:LO(r)}function LO(t){let e=t.reduce((i,o)=>i+o.length,0),n=new Uint8Array(e),r=0;for(let i of t)n.set(i,r),r+=i.length;return n}function MO(t){let e=typeof t.data=="string"?Tc(t.data):t.data;return[un({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}var jO={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function gf(t){return jO[t]}function Sy(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function VO(t,e,n,r){let i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return L(L(L({event_id:t.event_id,sent_at:new Date().toISOString()},e&&{sdk:e}),!!n&&r&&{dsn:Ia(r)}),i&&{trace:un(L({},i))})}function BO(t,e,n){let r=[{type:"client_report"},{timestamp:n||Oo(),discarded_events:t}];return Do(e?{dsn:e}:{},[r])}function FO(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}function UO(t,e){return t[e]||t.all||0}function HO(t,e,n=Date.now()){return UO(t,e)>n}function $O(t,{statusCode:e,headers:n},r=Date.now()){let i=L({},t),o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(let a of o.trim().split(",")){let[l,u,,,d]=a.split(":",5),f=parseInt(l,10),p=(isNaN(f)?60:f)*1e3;if(!u)i.all=r+p;else for(let g of u.split(";"))g==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(i[g]=r+p):i[g]=r+p}else s?i.all=r+FO(s,r):e===429&&(i.all=r+60*1e3);return i}function mf(){return{traceId:gn(),spanId:gn().substring(16)}}var zo=$t;function zO(){let t=zo.chrome,e=t&&t.app&&t.app.runtime,n="history"in zo&&!!zo.history.pushState&&!!zo.history.replaceState;return!e&&n}var oe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Ca(){return _h($t),$t}function _h(t){let e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||xr,e[xr]=e[xr]||{}}function Oc(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||or(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:gn()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}var Rc="_sentrySpan";function vf(t,e){e?Lr(t,Rc,e):delete t[Rc]}function yf(t){return t[Rc]}var qO=100,WO=class Iy{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=mf()}clone(){let e=new Iy;return e._breadcrumbs=[...this._breadcrumbs],e._tags=L({},this._tags),e._extra=L({},this._extra),e._contexts=L({},this._contexts),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata=L({},this._sdkProcessingMetadata),e._propagationContext=L({},this._propagationContext),e._client=this._client,e._lastEventId=this._lastEventId,vf(e,yf(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Oc(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags=L(L({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,n){return this._tags=Qt(L({},this._tags),{[e]:n}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=L(L({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,n){return this._extra=Qt(L({},this._extra),{[e]:n}),this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let n=typeof e=="function"?e(this):e,[r,i]=n instanceof Hn?[n.getScopeData(),n.getRequestSession()]:di(n)?[e,e.requestSession]:[],{tags:o,extra:s,user:a,contexts:l,level:u,fingerprint:d=[],propagationContext:f}=r||{};return this._tags=L(L({},this._tags),o),this._extra=L(L({},this._extra),s),this._contexts=L(L({},this._contexts),l),a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),d.length&&(this._fingerprint=d),f&&(this._propagationContext=f),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,vf(this,void 0),this._attachments=[],this._propagationContext=mf(),this._notifyScopeListeners(),this}addBreadcrumb(e,n){let r=typeof n=="number"?n:qO;if(r<=0)return this;let i=L({timestamp:Oo()},e),o=this._breadcrumbs;return o.push(i),this._breadcrumbs=o.length>r?o.slice(-r):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:yf(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=L(L({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n&&n.event_id?n.event_id:gn();if(!this._client)return _t.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(e,Qt(L({originalException:e,syntheticException:i},n),{event_id:r}),this),r}captureMessage(e,n,r){let i=r&&r.event_id?r.event_id:gn();if(!this._client)return _t.warn("No client configured on scope - will not capture message!"),i;let o=new Error(e);return this._client.captureMessage(e,n,Qt(L({originalException:e,syntheticException:o},r),{event_id:i}),this),i}captureEvent(e,n){let r=n&&n.event_id?n.event_id:gn();return this._client?(this._client.captureEvent(e,Qt(L({},n),{event_id:r}),this),r):(_t.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}},Hn=WO;function GO(){return gh("defaultCurrentScope",()=>new Hn)}function ZO(){return gh("defaultIsolationScope",()=>new Hn)}var YO=class{constructor(t,e){let n;t?n=t:n=new Hn;let r;e?r=e:r=new Hn,this._stack=[{scope:n}],this._isolationScope=r}withScope(t){let e=this._pushScope(),n;try{n=t(e)}catch(r){throw this._popScope(),r}return xa(n)?n.then(r=>(this._popScope(),r),r=>{throw this._popScope(),r}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function fi(){let t=Ca(),e=_h(t);return e.stack=e.stack||new YO(GO(),ZO())}function KO(t){return fi().withScope(t)}function JO(t,e){let n=fi();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function _f(t){return fi().withScope(()=>t(fi().getIsolationScope()))}function QO(){return{withIsolationScope:_f,withScope:KO,withSetScope:JO,withSetIsolationScope:(t,e)=>_f(e),getCurrentScope:()=>fi().getScope(),getIsolationScope:()=>fi().getIsolationScope()}}function bh(t){let e=_h(t);return e.acs?e.acs:QO()}function wh(){let t=Ca();return bh(t).getCurrentScope()}function Cy(){let t=Ca();return bh(t).getIsolationScope()}function XO(){return gh("globalScope",()=>new Hn)}function t2(...t){let e=Ca(),n=bh(e);if(t.length===2){let[r,i]=t;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(t[0])}function Ke(){return wh().getClient()}var e2="_sentryMetrics";function n2(t){let e=t[e2];if(!e)return;let n={};for(let[,[r,i]]of e)(n[r]||(n[r]=[])).push(un(i));return n}var r2="sentry.source",i2="sentry.sample_rate",o2="sentry.op",s2="sentry.origin",a2=1;function l2(t){let{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:r}=Ms(t);return un({parent_span_id:r,span_id:e,trace_id:n})}function bf(t){return typeof t=="number"?wf(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?wf(t.getTime()):or()}function wf(t){return t>9999999999?t/1e3:t}function Ms(t){if(u2(t))return t.getSpanJSON();try{let{spanId:e,traceId:n}=t.spanContext();if(c2(t)){let{attributes:r,startTime:i,name:o,endTime:s,parentSpanId:a,status:l}=t;return un({span_id:e,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:bf(i),timestamp:bf(s)||void 0,status:d2(l),op:r[o2],origin:r[s2],_metrics_summary:n2(t)})}return{span_id:e,trace_id:n}}catch{return{}}}function c2(t){let e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function u2(t){return typeof t.getSpanJSON=="function"}function h2(t){let{traceFlags:e}=t.spanContext();return e===a2}function d2(t){if(!(!t||t.code===0))return t.code===1?"ok":t.message||"unknown_error"}var f2="_sentryRootSpan";function Ty(t){return t[f2]||t}var Oy="production",p2="_frozenDsc";function Ry(t,e){let n=e.getOptions(),{publicKey:r}=e.getDsn()||{},i=un({environment:n.environment||Oy,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",i),i}function g2(t){let e=Ke();if(!e)return{};let n=Ry(Ms(t).trace_id||"",e),r=Ty(t),i=r[p2];if(i)return i;let o=r.spanContext().traceState,s=o&&o.get("sentry.dsc"),a=s&&NO(s);if(a)return a;let l=Ms(r),u=l.data||{},d=u[i2];d!=null&&(n.sample_rate=`${d}`);let f=u[r2],p=l.description;return f!=="url"&&p&&(n.transaction=p),n.sampled=String(h2(r)),e.emit("createDsc",n,r),n}function m2(t){if(typeof t=="boolean")return Number(t);let e=typeof t=="string"?parseFloat(t):t;if(typeof e!="number"||isNaN(e)||e<0||e>1){oe&&_t.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return}return e}function v2(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function y2(t,e,n,r){let i=Sy(n),o=L(L({sent_at:new Date().toISOString()},i&&{sdk:i}),!!r&&e&&{dsn:Ia(e)}),s="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Do(o,[s])}function _2(t,e,n,r){let i=Sy(n),o=t.type&&t.type!=="replay_event"?t.type:"event";v2(t,n&&n.sdk);let s=VO(t,i,r,e);return delete t.sdkProcessingMetadata,Do(s,[[{type:o},t]])}function Dc(t,e,n,r=0){return new Ro((i,o)=>{let s=t[r];if(e===null||typeof s!="function")i(e);else{let a=s(L({},e),n);oe&&s.id&&a===null&&_t.log(`Event processor "${s.id}" dropped event`),xa(a)?a.then(l=>Dc(t,l,n,r+1).then(i)).then(null,o):Dc(t,a,n,r+1).then(i).then(null,o)}})}function b2(t,e){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=e;w2(t,e),r&&S2(t,r),I2(t,n),E2(t,i),x2(t,o)}function Ef(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:g,span:m}=e;Ri(t,"extra",n),Ri(t,"tags",r),Ri(t,"user",i),Ri(t,"contexts",o),Ri(t,"sdkProcessingMetadata",a),s&&(t.level=s),g&&(t.transactionName=g),m&&(t.span=m),l.length&&(t.breadcrumbs=[...t.breadcrumbs,...l]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),d.length&&(t.eventProcessors=[...t.eventProcessors,...d]),f.length&&(t.attachments=[...t.attachments,...f]),t.propagationContext=L(L({},t.propagationContext),p)}function Ri(t,e,n){if(n&&Object.keys(n).length){t[e]=L({},t[e]);for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}function w2(t,e){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=e,l=un(n);l&&Object.keys(l).length&&(t.extra=L(L({},l),t.extra));let u=un(r);u&&Object.keys(u).length&&(t.tags=L(L({},u),t.tags));let d=un(i);d&&Object.keys(d).length&&(t.user=L(L({},d),t.user));let f=un(o);f&&Object.keys(f).length&&(t.contexts=L(L({},f),t.contexts)),s&&(t.level=s),a&&t.type!=="transaction"&&(t.transaction=a)}function E2(t,e){let n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function x2(t,e){t.sdkProcessingMetadata=L(L({},t.sdkProcessingMetadata),e)}function S2(t,e){t.contexts=L({trace:l2(e)},t.contexts),t.sdkProcessingMetadata=L({dynamicSamplingContext:g2(e)},t.sdkProcessingMetadata);let n=Ty(e),r=Ms(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function I2(t,e){t.fingerprint=t.fingerprint?wO(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}function C2(t,e,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=t,l=Qt(L({},e),{event_id:e.event_id||n.event_id||gn(),timestamp:e.timestamp||Oo()}),u=n.integrations||t.integrations.map(b=>b.name);T2(l,t),D2(l,u),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&O2(l,t.stackParser);let d=k2(r,n.captureContext);n.mechanism&&ao(l,n.mechanism);let f=i?i.getEventProcessors():[],p=XO().getScopeData();if(o){let b=o.getScopeData();Ef(p,b)}if(d){let b=d.getScopeData();Ef(p,b)}let g=[...n.attachments||[],...p.attachments];g.length&&(n.attachments=g),b2(l,p);let m=[...f,...p.eventProcessors];return Dc(m,l,n).then(b=>(b&&R2(b),typeof s=="number"&&s>0?N2(b,s,a):b))}function T2(t,e){let{environment:n,release:r,dist:i,maxValueLength:o=250}=e;"environment"in t||(t.environment="environment"in e?n:Oy),t.release===void 0&&r!==void 0&&(t.release=r),t.dist===void 0&&i!==void 0&&(t.dist=i),t.message&&(t.message=si(t.message,o));let s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=si(s.value,o));let a=t.request;a&&a.url&&(a.url=si(a.url,o))}var xf=new WeakMap;function O2(t,e){let n=$t._sentryDebugIds;if(!n)return;let r,i=xf.get(e);i?r=i:(r=new Map,xf.set(e,r));let o=Object.entries(n).reduce((s,[a,l])=>{let u,d=r.get(a);d?u=d:(u=e(a),r.set(a,u));for(let f=u.length-1;f>=0;f--){let p=u[f];if(p.filename){s[p.filename]=l;break}}return s},{});try{t.exception.values.forEach(s=>{s.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=o[a.filename])})})}catch{}}function R2(t){let e={};try{t.exception.values.forEach(r=>{r.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?e[i.abs_path]=i.debug_id:i.filename&&(e[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let n=t.debug_meta.images;Object.entries(e).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function D2(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function N2(t,e,n){if(!t)return null;let r=L(L(L(L(L({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>L(L({},i),i.data&&{data:Jn(i.data,e,n)}))}),t.user&&{user:Jn(t.user,e,n)}),t.contexts&&{contexts:Jn(t.contexts,e,n)}),t.extra&&{extra:Jn(t.extra,e,n)});return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Jn(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>L(L({},i),i.data&&{data:Jn(i.data,e,n)}))),r}function k2(t,e){if(!e)return t;let n=t?t.clone():new Hn;return n.update(e),n}function A2(t){if(t)return P2(t)?{captureContext:t}:M2(t)?{captureContext:t}:t}function P2(t){return t instanceof Hn||typeof t=="function"}var L2=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function M2(t){return Object.keys(t).some(e=>L2.includes(e))}function j2(t,e){return wh().captureException(t,A2(e))}function Dy(t,e){return wh().captureEvent(t,e)}var V2="7";function B2(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function F2(t){return`${B2(t)}${t.projectId}/envelope/`}function U2(t,e){return nO(L({sentry_key:t.publicKey,sentry_version:V2},e&&{sentry_client:`${e.name}/${e.version}`}))}function H2(t,e,n){return e||`${F2(t)}?${U2(t,n)}`}var Sf=[];function $2(t,e){let n={};return e.forEach(r=>{r&&Ny(t,r,n)}),n}function If(t,e){for(let n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Ny(t,e,n){if(n[e.name]){oe&&_t.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,Sf.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),Sf.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){let r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(i,o)=>r(i,o,t))}if(typeof e.processEvent=="function"){let r=e.processEvent.bind(e),i=Object.assign((o,s)=>r(o,s,t),{id:e.name});t.addEventProcessor(i)}oe&&_t.log(`Integration installed: ${e.name}`)}var Cf="Not capturing exception because it's already been captured.",z2=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=eO(t.dsn):oe&&_t.warn("No DSN provided, client will not send events."),this._dsn){let e=H2(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport(Qt(L({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{url:e}))}}captureException(t,e,n){let r=gn();if(df(t))return oe&&_t.log(Cf),r;let i=L({event_id:r},e);return this._process(this.eventFromException(t,i).then(o=>this._captureEvent(o,i,n))),i.event_id}captureMessage(t,e,n,r){let i=L({event_id:gn()},n),o=fh(t)?t:String(t),s=ph(t)?this.eventFromMessage(o,e,i):this.eventFromException(t,i);return this._process(s.then(a=>this._captureEvent(a,i,r))),i.event_id}captureEvent(t,e,n){let r=gn();if(e&&e.originalException&&df(e.originalException))return oe&&_t.log(Cf),r;let i=L({event_id:r},e),o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,i,o||n)),i.event_id}captureSession(t){typeof t.release!="string"?oe&&_t.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Oc(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){let e=this._transport;return e?(this.emit("flush"),this._isClientDoneProcessing(t).then(n=>e.flush(t).then(r=>n&&r))):jr(!0)}close(t){return this.flush(t).then(e=>(this.getOptions().enabled=!1,this.emit("close"),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){let e=this._integrations[t.name];Ny(this,t,this._integrations),e||If(this,[t])}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=_2(t,this._dsn,this._options._metadata,this._options.tunnel);for(let i of e.attachments||[])n=AO(n,MO(i));let r=this.sendEnvelope(n);r&&r.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){let e=y2(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(e)}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){let r=`${t}:${e}`;oe&&_t.log(`Adding outcome: "${r}"`),this._outcomes[r]=(this._outcomes[r]||0)+1}}on(t,e){let n=this._hooks[t]=this._hooks[t]||[];return n.push(e),()=>{let r=n.indexOf(e);r>-1&&n.splice(r,1)}}emit(t,...e){let n=this._hooks[t];n&&n.forEach(r=>r(...e))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,e=>(oe&&_t.error("Error while sending event:",e),e)):(oe&&_t.error("Transport disabled"),jr({}))}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=$2(this,t),If(this,t)}_updateSessionFromEvent(t,e){let n=!1,r=!1,i=e.exception&&e.exception.values;if(i){r=!0;for(let s of i){let a=s.mechanism;if(a&&a.handled===!1){n=!0;break}}}let o=t.status==="ok";(o&&t.errors===0||o&&n)&&(Oc(t,Qt(L({},n&&{status:"crashed"}),{errors:t.errors||Number(r||n)})),this.captureSession(t))}_isClientDoneProcessing(t){return new Ro(e=>{let n=0,r=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),e(!0)):(n+=r,t&&n>=t&&(clearInterval(i),e(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,e,n,r=Cy()){let i=this.getOptions(),o=Object.keys(this._integrations);return!e.integrations&&o.length>0&&(e.integrations=o),this.emit("preprocessEvent",t,e),t.type||r.setLastEventId(t.event_id||e.event_id),C2(i,t,e,n,this,r).then(s=>{if(s===null)return s;let a=L(L({},r.getPropagationContext()),n?n.getPropagationContext():void 0);if(!(s.contexts&&s.contexts.trace)&&a){let{traceId:l,spanId:u,parentSpanId:d,dsc:f}=a;s.contexts=L({trace:un({trace_id:l,span_id:u,parent_span_id:d})},s.contexts);let p=f||Ry(l,this);s.sdkProcessingMetadata=L({dynamicSamplingContext:p},s.sdkProcessingMetadata)}return s})}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then(r=>r.event_id,r=>{if(oe){let i=r;i.logLevel==="log"?_t.log(i.message):_t.warn(i)}})}_processEvent(t,e,n){let r=this.getOptions(),{sampleRate:i}=r,o=Nc(t),s=ky(t),a=t.type||"error",l=`before send for type \`${a}\``,u=typeof i>"u"?void 0:m2(i);if(s&&typeof u=="number"&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error",t),Ls(new xn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let d=a==="replay_event"?"replay":a,f=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,e,n,f).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",d,t),new xn("An event processor returned `null`, will not send event.","log");if(e.data&&e.data.__sentry__===!0)return p;let g=W2(this,r,p,e);return q2(g,l)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",d,t),Nc(t)){let b=1+(t.spans||[]).length;this._outcomes.span=(this._outcomes.span||0)+b}throw new xn(`${l} returned \`null\`, will not send event.`,"log")}let g=n&&n.getSession();!o&&g&&this._updateSessionFromEvent(g,p);let m=p.transaction_info;if(o&&m&&p.transaction!==t.transaction){let b="custom";p.transaction_info=Qt(L({},m),{source:b})}return this.sendEvent(p,e),p}).then(null,p=>{throw p instanceof xn?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new xn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
14
|
+
Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.entries(t).map(([e,n])=>{let[r,i]=e.split(":");return{reason:r,category:i,quantity:n}})}};function q2(t,e){let n=`${e} must return \`null\` or a valid event.`;if(xa(t))return t.then(r=>{if(!di(r)&&r!==null)throw new xn(n);return r},r=>{throw new xn(`${e} rejected with ${r}`)});if(!di(t)&&t!==null)throw new xn(n);return t}function W2(t,e,n,r){let{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=e;if(ky(n)&&i)return i(n,r);if(Nc(n)){if(n.spans&&s){let a=[];for(let l of n.spans){let u=s(l);u?a.push(u):t.recordDroppedEvent("before_send","span")}n.spans=a}if(o)return o(n,r)}return n}function ky(t){return t.type===void 0}function Nc(t){return t.type==="transaction"}var G2=64;function Z2(t,e,n=CO(t.bufferSize||G2)){let r={},i=s=>n.drain(s);function o(s){let a=[];if(pf(s,(f,p)=>{let g=gf(p);if(HO(r,g)){let m=Tf(f,p);t.recordDroppedEvent("ratelimit_backoff",g,m)}else a.push(f)}),a.length===0)return jr({});let l=Do(s[0],a),u=f=>{pf(l,(p,g)=>{let m=Tf(p,g);t.recordDroppedEvent(f,gf(g),m)})},d=()=>e({body:PO(l)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&oe&&_t.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),r=$O(r,f),f),f=>{throw u("network_error"),f});return n.add(d).then(f=>f,f=>{if(f instanceof xn)return oe&&_t.error("Skipped sending event because buffer is full."),u("queue_overflow"),jr({});throw f})}return{send:o,flush:i}}function Tf(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function Y2(t,e,n=[e],r="npm"){let i=t._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${e}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:xr})),version:xr}),t._metadata=i}var K2=100;function Vr(t,e){let n=Ke(),r=Cy();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=K2}=n.getOptions();if(o<=0)return;let s=Oo(),a=L({timestamp:s},t),l=i?vh(()=>i(a,e)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,e),r.addBreadcrumb(l,o))}var Of,J2="FunctionToString",Rf=new WeakMap,Q2=()=>({name:J2,setupOnce(){Of=Function.prototype.toString;try{Function.prototype.toString=function(...t){let e=yh(this),n=Rf.has(Ke())&&e!==void 0?e:this;return Of.apply(n,t)}}catch{}},setup(t){Rf.set(t,!0)}}),X2=Q2,tR=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],eR="InboundFilters",nR=(t={})=>({name:eR,processEvent(e,n,r){let i=r.getOptions(),o=iR(t,i);return oR(e,o)?null:e}}),rR=nR;function iR(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:tR],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function oR(t,e){return e.ignoreInternal&&hR(t)?(oe&&_t.warn(`Event dropped due to being internal Sentry Error.
|
|
15
|
+
Event: ${Kn(t)}`),!0):sR(t,e.ignoreErrors)?(oe&&_t.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
16
|
+
Event: ${Kn(t)}`),!0):fR(t)?(oe&&_t.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
17
|
+
Event: ${Kn(t)}`),!0):aR(t,e.ignoreTransactions)?(oe&&_t.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
18
|
+
Event: ${Kn(t)}`),!0):lR(t,e.denyUrls)?(oe&&_t.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
19
|
+
Event: ${Kn(t)}.
|
|
20
|
+
Url: ${js(t)}`),!0):cR(t,e.allowUrls)?!1:(oe&&_t.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
21
|
+
Event: ${Kn(t)}.
|
|
22
|
+
Url: ${js(t)}`),!0)}function sR(t,e){return t.type||!e||!e.length?!1:uR(t).some(n=>Sa(n,e))}function aR(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let n=t.transaction;return n?Sa(n,e):!1}function lR(t,e){if(!e||!e.length)return!1;let n=js(t);return n?Sa(n,e):!1}function cR(t,e){if(!e||!e.length)return!0;let n=js(t);return n?Sa(n,e):!0}function uR(t){let e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch{}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),e}function hR(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function dR(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function js(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?dR(e):null}catch{return oe&&_t.error(`Cannot extract url for event ${Kn(t)}`),null}}function fR(t){return t.type||!t.exception||!t.exception.values||t.exception.values.length===0?!1:!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value)}var pR="Dedupe",gR=()=>{let t;return{name:pR,processEvent(e){if(e.type)return e;try{if(vR(e,t))return oe&&_t.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},mR=gR;function vR(t,e){return e?!!(yR(t,e)||_R(t,e)):!1}function yR(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Py(t,e)||!Ay(t,e))}function _R(t,e){let n=Df(e),r=Df(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Py(t,e)||!Ay(t,e))}function Ay(t,e){let n=cf(t),r=cf(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function Py(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Df(t){return t.exception&&t.exception.values&&t.exception.values[0]}var Ie=$t,kc=0;function Ly(){return kc>0}function bR(){kc++,setTimeout(()=>{kc--})}function pi(t,e={},n){if(typeof t!="function")return t;try{let i=t.__sentry_wrapped__;if(i)return i;if(yh(t))return t}catch{return t}let r=function(){let i=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=i.map(s=>pi(s,e));return t.apply(this,o)}catch(o){throw bR(),t2(s=>{s.addEventProcessor(a=>(e.mechanism&&(Ic(a,void 0,void 0),ao(a,e.mechanism)),a.extra=Qt(L({},a.extra),{arguments:i}),a)),j2(o)}),o}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}catch{}_y(r,t),Lr(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var ti=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Eh(t,e){let n=xh(t,e),r={type:e&&e.name,value:IR(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function wR(t,e,n,r){let i=Ke(),o=i&&i.getOptions().normalizeDepth,s=DR(e),a={__serialized__:xy(e,o)};if(s)return{exception:{values:[Eh(t,s)]},extra:a};let l={exception:{values:[{type:Ea(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:OR(e,{isUnhandledRejection:r})}]},extra:a};if(n){let u=xh(t,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function fl(t,e){return{exception:{values:[Eh(t,e)]}}}function xh(t,e){let n=e.stacktrace||e.stack||"",r=xR(e),i=SR(e);try{return t(n,r,i)}catch{}return[]}var ER=/Minified React error #\d+;/i;function xR(t){return t&&ER.test(t.message)?1:0}function SR(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function IR(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function CR(t,e,n,r){let i=n&&n.syntheticException||void 0,o=Sh(t,e,i,r);return ao(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),jr(o)}function TR(t,e,n="info",r,i){let o=r&&r.syntheticException||void 0,s=Ac(t,e,o,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),jr(s)}function Sh(t,e,n,r,i){let o;if(gy(e)&&e.error)return fl(t,e.error);if(tf(e)||VT(e)){let s=e;if("stack"in e)o=fl(t,e);else{let a=s.name||(tf(s)?"DOMError":"DOMException"),l=s.message?`${a}: ${s.message}`:a;o=Ac(t,l,n,r),Ic(o,l)}return"code"in s&&(o.tags=Qt(L({},o.tags),{"DOMException.code":`${s.code}`})),o}return dh(e)?fl(t,e):di(e)||Ea(e)?(o=wR(t,e,n,i),ao(o,{synthetic:!0}),o):(o=Ac(t,e,n,r),Ic(o,`${e}`,void 0),ao(o,{synthetic:!0}),o)}function Ac(t,e,n,r){let i={};if(r&&n){let o=xh(t,n);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]})}if(fh(e)){let{__sentry_template_string__:o,__sentry_template_values__:s}=e;return i.logentry={message:o,params:s},i}return i.message=e,i}function OR(t,{isUnhandledRejection:e}){let n=rO(t),r=e?"promise rejection":"exception";return gy(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:Ea(t)?`Event \`${RR(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function RR(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function DR(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let n=t[e];if(n instanceof Error)return n}}function NR(t,{metadata:e,tunnel:n,dsn:r}){let i=L(L({event_id:t.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!n&&!!r&&{dsn:Ia(r)}),o=kR(t);return Do(i,[o])}function kR(t){return[{type:"user_report"},t]}var AR=class extends z2{constructor(t){let e=L({parentSpanIsAlwaysRootSpan:!0},t),n=Ie.SENTRY_SDK_SOURCE||_O();Y2(e,"browser",["browser"],n),super(e),e.sendClientReports&&Ie.document&&Ie.document.addEventListener("visibilitychange",()=>{Ie.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,e){return CR(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return TR(this._options.stackParser,t,e,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){ti&&_t.warn("SDK not enabled, will not capture user feedback.");return}let e=NR(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(e)}_prepareEvent(t,e,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n)}_flushOutcomes(){let t=this._clearOutcomes();if(t.length===0){ti&&_t.log("No outcomes to send");return}if(!this._dsn){ti&&_t.log("No dsn provided, will not send outcomes");return}ti&&_t.log("Sending outcomes:",t);let e=BO(t,this._options.tunnel&&Ia(this._dsn));this.sendEnvelope(e)}},PR=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Oe=$t,LR=1e3,Nf,Pc,Lc;function MR(t){let e="dom";$r(e,t),zr(e,jR)}function jR(){if(!Oe.document)return;let t=pn.bind(null,"dom"),e=kf(t,!0);Oe.document.addEventListener("click",e,!1),Oe.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{let r=Oe[n]&&Oe[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Te(r,"addEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{let l=this,u=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},d=u[o]=u[o]||{refCount:0};if(!d.handler){let f=kf(t);d.handler=f,i.call(this,o,f,a)}d.refCount++}catch{}return i.call(this,o,s,a)}}),Te(r,"removeEventListener",function(i){return function(o,s,a){if(o==="click"||o=="keypress")try{let l=this,u=l.__sentry_instrumentation_handlers__||{},d=u[o];d&&(d.refCount--,d.refCount<=0&&(i.call(this,o,d.handler,a),d.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,s,a)}}))})}function VR(t){if(t.type!==Pc)return!1;try{if(!t.target||t.target._sentryId!==Lc)return!1}catch{}return!0}function BR(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function kf(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;let r=FR(n);if(BR(n.type,r))return;Lr(n,"_sentryCaptured",!0),r&&!r._sentryId&&Lr(r,"_sentryId",gn());let i=n.type==="keypress"?"input":n.type;VR(n)||(t({event:n,name:i,global:e}),Pc=n.type,Lc=r?r._sentryId:void 0),clearTimeout(Nf),Nf=Oe.setTimeout(()=>{Lc=void 0,Pc=void 0},LR)}}function FR(t){try{return t.target}catch{return null}}var qo;function UR(t){let e="history";$r(e,t),zr(e,HR)}function HR(){if(!zO())return;let t=Oe.onpopstate;Oe.onpopstate=function(...n){let r=Oe.location.href,i=qo;if(qo=r,pn("history",{from:i,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){let i=r.length>2?r[2]:void 0;if(i){let o=qo,s=String(i);qo=s,pn("history",{from:o,to:s})}return n.apply(this,r)}}Te(Oe.history,"pushState",e),Te(Oe.history,"replaceState",e)}var ls={};function $R(t){let e=ls[t];if(e)return e;let n=Oe[t];if(xc(n))return ls[t]=n.bind(Oe);let r=Oe.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let o=i.contentWindow;o&&o[t]&&(n=o[t]),r.head.removeChild(i)}catch(i){PR&&_t.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,i)}return n&&(ls[t]=n.bind(Oe))}function Af(t){ls[t]=void 0}var ji="__sentry_xhr_v3__";function zR(t){let e="xhr";$r(e,t),zr(e,qR)}function qR(){if(!Oe.XMLHttpRequest)return;let t=XMLHttpRequest.prototype;Te(t,"open",function(e){return function(...n){let r=or()*1e3,i=Mn(n[0])?n[0].toUpperCase():void 0,o=WR(n[1]);if(!i||!o)return e.apply(this,n);this[ji]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let a=this[ji];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let l={endTimestamp:or()*1e3,startTimestamp:r,xhr:this};pn("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Te(this,"onreadystatechange",function(a){return function(...l){return s(),a.apply(this,l)}}):this.addEventListener("readystatechange",s),Te(this,"setRequestHeader",function(a){return function(...l){let[u,d]=l,f=this[ji];return f&&Mn(u)&&Mn(d)&&(f.request_headers[u.toLowerCase()]=d),a.apply(this,l)}}),e.apply(this,n)}}),Te(t,"send",function(e){return function(...n){let r=this[ji];if(!r)return e.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let i={startTimestamp:or()*1e3,xhr:this};return pn("xhr",i),e.apply(this,n)}})}function WR(t){if(Mn(t))return t;try{return t.toString()}catch{}}function GR(t,e=$R("fetch")){let n=0,r=0;function i(o){let s=o.body.length;n+=s,r++;let a=L({body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);if(!e)return Af("fetch"),Ls("No fetch implementation available");try{return e(t.url,a).then(l=>(n-=s,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return Af("fetch"),n-=s,r--,Ls(l)}}return Z2(t,i)}var ZR=30,YR=50;function Mc(t,e,n,r){let i={filename:t,function:e==="<anonymous>"?Mr:e,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var KR=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,JR=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,QR=/\((\S*)(?::(\d+))(?::(\d+))\)/,XR=t=>{let e=KR.exec(t);if(e){let[,r,i,o]=e;return Mc(r,Mr,+i,+o)}let n=JR.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let o=QR.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}let[r,i]=My(n[1]||Mr,n[2]);return Mc(i,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},tD=[ZR,XR],eD=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,nD=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,rD=t=>{let e=eD.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=nD.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let n=e[3],r=e[1]||Mr;return[r,n]=My(r,n),Mc(n,r,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},iD=[YR,rD],oD=[tD,iD],sD=oO(...oD),My=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:Mr,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},Wo=1024,aD="Breadcrumbs",lD=(t={})=>{let e=L({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:aD,setup(n){e.console&&aO(dD(n)),e.dom&&MR(hD(n,e.dom)),e.xhr&&zR(fD(n)),e.fetch&&dO(pD(n)),e.history&&UR(gD(n)),e.sentry&&n.on("beforeSendEvent",uD(n))}}},cD=lD;function uD(t){return function(e){Ke()===t&&Vr({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Kn(e)},{event:e})}}function hD(t,e){return function(n){if(Ke()!==t)return;let r,i,o=typeof e=="object"?e.serializeAttribute:void 0,s=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;s&&s>Wo&&(ti&&_t.warn(`\`dom.maxStringLength\` cannot exceed ${Wo}, but a value of ${s} was configured. Sentry will use ${Wo} instead.`),s=Wo),typeof o=="string"&&(o=[o]);try{let l=n.event,u=mD(l)?l.target:l;r=vy(u,{keyAttrs:o,maxStringLength:s}),i=ZT(u)}catch{r="<unknown>"}if(r.length===0)return;let a={category:`ui.${n.name}`,message:r};i&&(a.data={"ui.component_name":i}),Vr(a,{event:n.event,name:n.name,global:n.global})}}function dD(t){return function(e){if(Ke()!==t)return;let n={category:"console",data:{arguments:e.args,logger:"console"},level:OO(e.level),message:ef(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)n.message=`Assertion failed: ${ef(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1);else return;Vr(n,{input:e.args,level:e.level})}}function fD(t){return function(e){if(Ke()!==t)return;let{startTimestamp:n,endTimestamp:r}=e,i=e.xhr[ji];if(!n||!r||!i)return;let{method:o,url:s,status_code:a,body:l}=i,u={method:o,url:s,status_code:a},d={xhr:e.xhr,input:l,startTimestamp:n,endTimestamp:r};Vr({category:"xhr",data:u,type:"http"},d)}}function pD(t){return function(e){if(Ke()!==t)return;let{startTimestamp:n,endTimestamp:r}=e;if(r&&!(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"))if(e.error){let i=e.fetchData,o={data:e.error,input:e.args,startTimestamp:n,endTimestamp:r};Vr({category:"fetch",data:i,level:"error",type:"http"},o)}else{let i=e.response,o=Qt(L({},e.fetchData),{status_code:i&&i.status}),s={input:e.args,response:i,startTimestamp:n,endTimestamp:r};Vr({category:"fetch",data:o,type:"http"},s)}}}function gD(t){return function(e){if(Ke()!==t)return;let n=e.from,r=e.to,i=dl(Ie.location.href),o=n?dl(n):void 0,s=dl(r);(!o||!o.path)&&(o=i),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),Vr({category:"navigation",data:{from:n,to:r}})}}function mD(t){return!!t&&!!t.target}var vD=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],yD="BrowserApiErrors",_D=(t={})=>{let e=L({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t);return{name:yD,setupOnce(){e.setTimeout&&Te(Ie,"setTimeout",Pf),e.setInterval&&Te(Ie,"setInterval",Pf),e.requestAnimationFrame&&Te(Ie,"requestAnimationFrame",wD),e.XMLHttpRequest&&"XMLHttpRequest"in Ie&&Te(XMLHttpRequest.prototype,"send",ED);let n=e.eventTarget;n&&(Array.isArray(n)?n:vD).forEach(xD)}}},bD=_D;function Pf(t){return function(...e){let n=e[0];return e[0]=pi(n,{mechanism:{data:{function:cr(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function wD(t){return function(e){return t.apply(this,[pi(e,{mechanism:{data:{function:"requestAnimationFrame",handler:cr(t)},handled:!1,type:"instrument"}})])}}function ED(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&Te(n,r,function(i){let o={mechanism:{data:{function:r,handler:cr(i)},handled:!1,type:"instrument"}},s=yh(i);return s&&(o.mechanism.data.handler=cr(s)),pi(i,o)})}),t.apply(this,e)}}function xD(t){let e=Ie,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Te(n,"addEventListener",function(r){return function(i,o,s){try{typeof o.handleEvent=="function"&&(o.handleEvent=pi(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:cr(o),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,pi(o,{mechanism:{data:{function:"addEventListener",handler:cr(o),target:t},handled:!1,type:"instrument"}}),s])}}),Te(n,"removeEventListener",function(r){return function(i,o,s){let a=o;try{let l=a&&a.__sentry_wrapped__;l&&r.call(this,i,l,s)}catch{}return r.call(this,i,a,s)}}))}var SD="GlobalHandlers",ID=(t={})=>{let e=L({onerror:!0,onunhandledrejection:!0},t);return{name:SD,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(TD(n),Lf("onerror")),e.onunhandledrejection&&(OD(n),Lf("onunhandledrejection"))}}},CD=ID;function TD(t){gO(e=>{let{stackParser:n,attachStacktrace:r}=jy();if(Ke()!==t||Ly())return;let{msg:i,url:o,line:s,column:a,error:l}=e,u=ND(Sh(n,l||i,void 0,r,!1),o,s,a);u.level="error",Dy(u,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function OD(t){vO(e=>{let{stackParser:n,attachStacktrace:r}=jy();if(Ke()!==t||Ly())return;let i=RD(e),o=ph(i)?DD(i):Sh(n,i,void 0,r,!0);o.level="error",Dy(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function RD(t){if(ph(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function DD(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function ND(t,e,n,r){let i=t.exception=t.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,f=Mn(e)&&e.length>0?e:GT();return l.length===0&&l.push({colno:u,filename:f,function:Mr,in_app:!0,lineno:d}),t}function Lf(t){ti&&_t.log(`Global Handler attached: ${t}`)}function jy(){let t=Ke();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var kD=()=>({name:"HttpContext",preprocessEvent(t){if(!Ie.navigator&&!Ie.location&&!Ie.document)return;let e=t.request&&t.request.url||Ie.location&&Ie.location.href,{referrer:n}=Ie.document||{},{userAgent:r}=Ie.navigator||{},i=L(L(L({},t.request&&t.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),o=Qt(L(L({},t.request),e&&{url:e}),{headers:i});t.request=o}}),AD="cause",PD=5,LD="LinkedErrors",MD=(t={})=>{let e=t.limit||PD,n=t.key||AD;return{name:LD,preprocessEvent(r,i,o){let s=o.getOptions();$T(Eh,s.stackParser,s.maxValueLength,n,e,r,i)}}},jD=MD;function VD(t){return[rR(),X2(),bD(),cD(),CD(),jD(),mR(),kD()]}var BD=class extends Error{cause;constructor(t,e){super(t),this.cause=e}},Vy=class By{static INSTANCE;contexts={};tags;client;user;constructor(){this.init()}static getInstance(){return this.INSTANCE||(this.INSTANCE=new By),this.INSTANCE}captureException(e,n,r){$e.error(e),this.getNewScope(n,r).captureException(e)}captureMessage(e,n,r,i){this.getNewScope(r,i).captureMessage(e,n??"error")}captureError(e,n,r,i){$e.error(e,n);let o=this.getNewScope(r,i),s=new BD(e,n);o.captureException(s)}setGlobalContext(e,n){this.contexts[e]=L({context:n},this.contexts[e])}setUser(e){this.user=e}setTags(e){this.tags=e}getNewScope(e,n){let r=new Hn;if(r.setClient(this.client),r.setUser(this.user),e?.triggerContext){let i=e.triggerContext;r.setExtras(i.triggerData.sentryContext()),delete e.triggerContext}return e&&r.setExtras(e),this.tags&&r.setTags(this.tags),n&&r.setTags(n),Object.keys(this.contexts).forEach(i=>{r.setContext(i,this.contexts[i])}),r.setTag("language",navigator.language),r.setTag("timezone",zD()),r}init(){let e=VD({}).filter(n=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(n.name));this.client=new AR({dsn:"https://1bc3dda4c861f60cd6be1b67584f4bc6@o559187.ingest.us.sentry.io/4507626484203520",transport:GR,stackParser:sD,integrations:e,environment:so.mode,release:`web-sdk@${Se.SDK_VERSION}`,debug:so.debug}),this.client.init()}},Mf=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart";static MUTED="muted"},jf=an(O0());function Fy(t){return jf.default.createInstance({name:"lc",storeName:t,driver:jf.default.LOCALSTORAGE})}var Uy=class{static storage;static async get(t,e){return await this.storage?.getItem(t)??e}static set(t,e){return this.storage?.setItem(t,e)}static remove(t){return this.storage?.removeItem(t)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}},ZP=class extends Uy{static storeName="ses";static{this.storage=Fy(this.storeName)}},Vf=class extends Uy{static storeName="usr";static{this.storage=Fy(this.storeName)}},FD=class{static format(t,e){let n=/{{\s*(\w+)\s*}}/;return e.replace(n,(r,i)=>{switch(i){case"amount":return this.formatWithDelimiters(t,2);case"amount_no_decimals":return this.formatWithDelimiters(t,0);case"amount_with_comma_separator":return this.formatWithDelimiters(t,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(t,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(t,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(t,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(t,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(t,2," ",".");default:return r}})}static formatWithDelimiters(t,e=2,n=",",r="."){if(isNaN(t)||t==null)return"0";let i=(t/100).toFixed(e).split("."),o=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),s=i[1]?r+i[1]:"";return o+s}},UD=class{id;mID;vID;vName;imageURL;name;link;quantity;price;constructor(t){this.id=t.id,this.mID=t.mID,this.vID=t.vID,this.vName=t.vName,this.imageURL=t.imageURL,this.name=t.name,this.link=t.link,this.quantity=t.quantity,this.price=t.price}},HD=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;locale;activeExperiment;inInactive=!1;lastEnterActive=new Date;lastEnterInactive=null;currentItem;_currencyCode;get currencyCode(){return this._currencyCode}set currencyCode(t){this._currencyCode=t}static get(){return window.CooeeSDK.runtimeData}isInactive(){return this.inInactive}async setInactive(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))}setActive(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0}isFirstActive(){return this.lastEnterInactive==null}getCurrentItem(){return this.currentItem}setCurrentItem(t){this.currentItem=new UD(t)}};function Ih(t,e){if(t==0&&e)return"Free";let n=HD.get(),r=fy.get(),i=n.shopCurrencyCode||r.currency,o=n.currencyCode;o||$e.warn("Currency code is not set in RuntimeData");let s=r.money?.format??n.moneyFormat,a;if(s&&i===o)a=FD.format(t*100,s);else{let l;try{l=new Intl.NumberFormat($D(),{style:"currency",currency:o||i,minimumFractionDigits:0,maximumFractionDigits:2})}catch(u){return Vy.getInstance().captureException(u,{currentCurrency:o,shopCurrency:i}),""}a=l.format(t),a=a.replace("\u20B9","Rs. "),r.money?.showCurrency&&o!=="INR"&&(a=a.concat(` ${o}`))}return a}function $D(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}var Go;function zD(){if(Go)return Go;try{return Go=Intl.DateTimeFormat().resolvedOptions().timeZone,Go}catch{return""}}var Ta=class jc{transform(e){return e==null?null:Ih(e)}static \u0275fac=function(e){return new(e||jc)};static \u0275pipe=sh({name:"cooeeCurrency",type:jc,pure:!0})},qD=an(R0()),WD=Object.prototype.toString,Ii=Array.isArray||function(t){return WD.call(t)==="[object Array]"};function Ch(t){return typeof t=="function"}function GD(t){return Ii(t)?"array":typeof t}function pl(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Bf(t,e){return t!=null&&typeof t=="object"&&e in t}function ZD(t,e){return t!=null&&typeof t!="object"&&t.hasOwnProperty&&t.hasOwnProperty(e)}var YD=RegExp.prototype.test;function KD(t,e){return YD.call(t,e)}var JD=/\S/;function QD(t){return!KD(JD,t)}var XD={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function tN(t){return String(t).replace(/[&<>"'`=\/]/g,function(e){return XD[e]})}var eN=/\s*/,nN=/\s+/,Ff=/\s*=/,rN=/\s*\}/,iN=/#|\^|\/|>|\{|&|=|!/;function oN(t,e){if(!t)return[];var n=!1,r=[],i=[],o=[],s=!1,a=!1,l="",u=0;function d(){if(s&&!a)for(;o.length;)delete i[o.pop()];else o=[];s=!1,a=!1}var f,p,g;function m(B){if(typeof B=="string"&&(B=B.split(nN,2)),!Ii(B)||B.length!==2)throw new Error("Invalid tags: "+B);f=new RegExp(pl(B[0])+"\\s*"),p=new RegExp("\\s*"+pl(B[1])),g=new RegExp("\\s*"+pl("}"+B[1]))}m(e||sn.tags);for(var b=new No(t),I,A,$,j,k,G;!b.eos();){if(I=b.pos,$=b.scanUntil(f),$)for(var Pt=0,Wt=$.length;Pt<Wt;++Pt)j=$.charAt(Pt),QD(j)?(o.push(i.length),l+=j):(a=!0,n=!0,l+=" "),i.push(["text",j,I,I+1]),I+=1,j===`
|
|
23
|
+
`&&(d(),l="",u=0,n=!1);if(!b.scan(f))break;if(s=!0,A=b.scan(iN)||"name",b.scan(eN),A==="="?($=b.scanUntil(Ff),b.scan(Ff),b.scanUntil(p)):A==="{"?($=b.scanUntil(g),b.scan(rN),b.scanUntil(p),A="&"):$=b.scanUntil(p),!b.scan(p))throw new Error("Unclosed tag at "+b.pos);if(A==">"?k=[A,$,I,b.pos,l,u,n]:k=[A,$,I,b.pos],u++,i.push(k),A==="#"||A==="^")r.push(k);else if(A==="/"){if(G=r.pop(),!G)throw new Error('Unopened section "'+$+'" at '+I);if(G[1]!==$)throw new Error('Unclosed section "'+G[1]+'" at '+I)}else A==="name"||A==="{"||A==="&"?a=!0:A==="="&&m($)}if(d(),G=r.pop(),G)throw new Error('Unclosed section "'+G[1]+'" at '+b.pos);return aN(sN(i))}function sN(t){for(var e=[],n,r,i=0,o=t.length;i<o;++i)n=t[i],n&&(n[0]==="text"&&r&&r[0]==="text"?(r[1]+=n[1],r[3]=n[3]):(e.push(n),r=n));return e}function aN(t){for(var e=[],n=e,r=[],i,o,s=0,a=t.length;s<a;++s)switch(i=t[s],i[0]){case"#":case"^":n.push(i),r.push(i),n=i[4]=[];break;case"/":o=r.pop(),o[5]=i[2],n=r.length>0?r[r.length-1][4]:e;break;default:n.push(i)}return e}function No(t){this.string=t,this.tail=t,this.pos=0}No.prototype.eos=function(){return this.tail===""};No.prototype.scan=function(t){var e=this.tail.match(t);if(!e||e.index!==0)return"";var n=e[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};No.prototype.scanUntil=function(t){var e=this.tail.search(t),n;switch(e){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,e),this.tail=this.tail.substring(e)}return this.pos+=n.length,n};function gi(t,e){this.view=t,this.cache={".":this.view},this.parent=e}gi.prototype.push=function(t){return new gi(t,this)};gi.prototype.lookup=function(t){var e=this.cache,n;if(e.hasOwnProperty(t))n=e[t];else{for(var r=this,i,o,s,a=!1;r;){if(t.indexOf(".")>0)for(i=r.view,o=t.split("."),s=0;i!=null&&s<o.length;)s===o.length-1&&(a=Bf(i,o[s])||ZD(i,o[s])),i=i[o[s++]];else i=r.view[t],a=Bf(r.view,t);if(a){n=i;break}r=r.parent}e[t]=n}return Ch(n)&&(n=n.call(this.view)),n};function Ve(){this.templateCache={_cache:{},set:function(t,e){this._cache[t]=e},get:function(t){return this._cache[t]},clear:function(){this._cache={}}}}Ve.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Ve.prototype.parse=function(t,e){var n=this.templateCache,r=t+":"+(e||sn.tags).join(":"),i=typeof n<"u",o=i?n.get(r):void 0;return o==null&&(o=oN(t,e),i&&n.set(r,o)),o};Ve.prototype.render=function(t,e,n,r){var i=this.getConfigTags(r),o=this.parse(t,i),s=e instanceof gi?e:new gi(e,void 0);return this.renderTokens(o,s,n,t,r)};Ve.prototype.renderTokens=function(t,e,n,r,i){for(var o="",s,a,l,u=0,d=t.length;u<d;++u)l=void 0,s=t[u],a=s[0],a==="#"?l=this.renderSection(s,e,n,r,i):a==="^"?l=this.renderInverted(s,e,n,r,i):a===">"?l=this.renderPartial(s,e,n,i):a==="&"?l=this.unescapedValue(s,e):a==="name"?l=this.escapedValue(s,e,i):a==="text"&&(l=this.rawValue(s)),l!==void 0&&(o+=l);return o};Ve.prototype.renderSection=function(t,e,n,r,i){var o=this,s="",a=e.lookup(t[1]);function l(f){return o.render(f,e,n,i)}if(a){if(Ii(a))for(var u=0,d=a.length;u<d;++u)s+=this.renderTokens(t[4],e.push(a[u]),n,r,i);else if(typeof a=="object"||typeof a=="string"||typeof a=="number")s+=this.renderTokens(t[4],e.push(a),n,r,i);else if(Ch(a)){if(typeof r!="string")throw new Error("Cannot use higher-order sections without the original template");a=a.call(e.view,r.slice(t[3],t[5]),l),a!=null&&(s+=a)}else s+=this.renderTokens(t[4],e,n,r,i);return s}};Ve.prototype.renderInverted=function(t,e,n,r,i){var o=e.lookup(t[1]);if(!o||Ii(o)&&o.length===0)return this.renderTokens(t[4],e,n,r,i)};Ve.prototype.indentPartial=function(t,e,n){for(var r=e.replace(/[^ \t]/g,""),i=t.split(`
|
|
24
|
+
`),o=0;o<i.length;o++)i[o].length&&(o>0||!n)&&(i[o]=r+i[o]);return i.join(`
|
|
25
|
+
`)};Ve.prototype.renderPartial=function(t,e,n,r){if(n){var i=this.getConfigTags(r),o=Ch(n)?n(t[1]):n[t[1]];if(o!=null){var s=t[6],a=t[5],l=t[4],u=o;a==0&&l&&(u=this.indentPartial(o,l,s));var d=this.parse(u,i);return this.renderTokens(d,e,n,u,r)}}};Ve.prototype.unescapedValue=function(t,e){var n=e.lookup(t[1]);if(n!=null)return n};Ve.prototype.escapedValue=function(t,e,n){var r=this.getConfigEscape(n)||sn.escape,i=e.lookup(t[1]);if(i!=null)return typeof i=="number"&&r===sn.escape?String(i):r(i)};Ve.prototype.rawValue=function(t){return t[1]};Ve.prototype.getConfigTags=function(t){return Ii(t)?t:t&&typeof t=="object"?t.tags:void 0};Ve.prototype.getConfigEscape=function(t){if(t&&typeof t=="object"&&!Ii(t))return t.escape};var sn={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){lo.templateCache=t},get templateCache(){return lo.templateCache}},lo=new Ve;sn.clearCache=function(){return lo.clearCache()};sn.parse=function(t,e){return lo.parse(t,e)};sn.render=function(t,e,n,r){if(typeof t!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+GD(t)+'" was given as the first argument for mustache#render(template, view, partials)');return lo.render(t,e,n,r)};sn.escape=tN;sn.Scanner=No;sn.Context=gi;sn.Writer=Ve;var Hy=sn;Hy.escape=qD.MustacheUtils.escapeHtml;var lN=class Vc{transform(e,n){return e?Hy.render(e,L({},n)):null}static \u0275fac=function(e){return new(e||Vc)};static \u0275pipe=sh({name:"cooeeDynamicVariables",type:Vc,pure:!0})},Oa=class Bc{constructor(e){this.sanitizer=e}transform(e){return e?this.sanitizer.bypassSecurityTrustHtml(e):""}static \u0275fac=function(e){return new(e||Bc)(Ce(dy,16))};static \u0275pipe=sh({name:"safeHtml",type:Bc,pure:!0})},Th={};(function t(e,n,r,i){var o=!!(e.Worker&&e.Blob&&e.Promise&&e.OffscreenCanvas&&e.OffscreenCanvasRenderingContext2D&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.transferControlToOffscreen&&e.URL&&e.URL.createObjectURL),s=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!e.OffscreenCanvas)return!1;var C=new OffscreenCanvas(1,1),S=C.getContext("2d");S.fillRect(0,0,1,1);var q=C.transferToImageBitmap();try{S.createPattern(q,"no-repeat")}catch{return!1}return!0}();function l(){}function u(C){var S=n.exports.Promise,q=S!==void 0?S:e.Promise;return typeof q=="function"?new q(C):(C(l,l),null)}var d=function(C,S){return{transform:function(q){if(C)return q;if(S.has(q))return S.get(q);var J=new OffscreenCanvas(q.width,q.height),Q=J.getContext("2d");return Q.drawImage(q,0,0),S.set(q,J),J},clear:function(){S.clear()}}}(a,new Map),f=function(){var C=Math.floor(16.666666666666668),S,q,J={},Q=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(S=function(st){var ot=Math.random();return J[ot]=requestAnimationFrame(function et(pt){Q===pt||Q+C-1<pt?(Q=pt,delete J[ot],st()):J[ot]=requestAnimationFrame(et)}),ot},q=function(st){J[st]&&cancelAnimationFrame(J[st])}):(S=function(st){return setTimeout(st,C)},q=function(st){return clearTimeout(st)}),{frame:S,cancel:q}}(),p=function(){var C,S,q={};function J(Q){function st(ot,et){Q.postMessage({options:ot||{},callback:et})}Q.init=function(ot){var et=ot.transferControlToOffscreen();Q.postMessage({canvas:et},[et])},Q.fire=function(ot,et,pt){if(S)return st(ot,null),S;var xt=Math.random().toString(36).slice(2);return S=u(function(Kt){function St(Dt){Dt.data.callback===xt&&(delete q[xt],Q.removeEventListener("message",St),S=null,d.clear(),pt(),Kt())}Q.addEventListener("message",St),st(ot,xt),q[xt]=St.bind(null,{data:{callback:xt}})}),S},Q.reset=function(){Q.postMessage({reset:!0});for(var ot in q)q[ot](),delete q[ot]}}return function(){if(C)return C;if(!r&&o){var Q=["var CONFETTI, SIZE = {}, module = {};","("+t.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(`
|
|
26
|
+
`);try{C=new Worker(URL.createObjectURL(new Blob([Q])))}catch(st){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",st),null}J(C)}return C}}(),g={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function m(C,S){return S?S(C):C}function b(C){return C!=null}function I(C,S,q){return m(C&&b(C[S])?C[S]:g[S],q)}function A(C){return C<0?0:Math.floor(C)}function $(C,S){return Math.floor(Math.random()*(S-C))+C}function j(C){return parseInt(C,16)}function k(C){return C.map(G)}function G(C){var S=String(C).replace(/[^0-9a-f]/gi,"");return S.length<6&&(S=S[0]+S[0]+S[1]+S[1]+S[2]+S[2]),{r:j(S.substring(0,2)),g:j(S.substring(2,4)),b:j(S.substring(4,6))}}function Pt(C){var S=I(C,"origin",Object);return S.x=I(S,"x",Number),S.y=I(S,"y",Number),S}function Wt(C){C.width=document.documentElement.clientWidth,C.height=document.documentElement.clientHeight}function B(C){var S=C.getBoundingClientRect();C.width=S.width,C.height=S.height}function lt(C){var S=document.createElement("canvas");return S.style.position="fixed",S.style.top="0px",S.style.left="0px",S.style.pointerEvents="none",S.style.zIndex=C,S}function nt(C,S,q,J,Q,st,ot,et,pt){C.save(),C.translate(S,q),C.rotate(st),C.scale(J,Q),C.arc(0,0,1,ot,et,pt),C.restore()}function vt(C){var S=C.angle*(Math.PI/180),q=C.spread*(Math.PI/180);return{x:C.x,y:C.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:C.startVelocity*.5+Math.random()*C.startVelocity,angle2D:-S+(.5*q-Math.random()*q),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:C.color,shape:C.shape,tick:0,totalTicks:C.ticks,decay:C.decay,drift:C.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:C.gravity*3,ovalScalar:.6,scalar:C.scalar,flat:C.flat}}function Vt(C,S){S.x+=Math.cos(S.angle2D)*S.velocity+S.drift,S.y+=Math.sin(S.angle2D)*S.velocity+S.gravity,S.velocity*=S.decay,S.flat?(S.wobble=0,S.wobbleX=S.x+10*S.scalar,S.wobbleY=S.y+10*S.scalar,S.tiltSin=0,S.tiltCos=0,S.random=1):(S.wobble+=S.wobbleSpeed,S.wobbleX=S.x+10*S.scalar*Math.cos(S.wobble),S.wobbleY=S.y+10*S.scalar*Math.sin(S.wobble),S.tiltAngle+=.1,S.tiltSin=Math.sin(S.tiltAngle),S.tiltCos=Math.cos(S.tiltAngle),S.random=Math.random()+2);var q=S.tick++/S.totalTicks,J=S.x+S.random*S.tiltCos,Q=S.y+S.random*S.tiltSin,st=S.wobbleX+S.random*S.tiltCos,ot=S.wobbleY+S.random*S.tiltSin;if(C.fillStyle="rgba("+S.color.r+", "+S.color.g+", "+S.color.b+", "+(1-q)+")",C.beginPath(),s&&S.shape.type==="path"&&typeof S.shape.path=="string"&&Array.isArray(S.shape.matrix))C.fill(Tt(S.shape.path,S.shape.matrix,S.x,S.y,Math.abs(st-J)*.1,Math.abs(ot-Q)*.1,Math.PI/10*S.wobble));else if(S.shape.type==="bitmap"){var et=Math.PI/10*S.wobble,pt=Math.abs(st-J)*.1,xt=Math.abs(ot-Q)*.1,Kt=S.shape.bitmap.width*S.scalar,St=S.shape.bitmap.height*S.scalar,Dt=new DOMMatrix([Math.cos(et)*pt,Math.sin(et)*pt,-Math.sin(et)*xt,Math.cos(et)*xt,S.x,S.y]);Dt.multiplySelf(new DOMMatrix(S.shape.matrix));var Jt=C.createPattern(d.transform(S.shape.bitmap),"no-repeat");Jt.setTransform(Dt),C.globalAlpha=1-q,C.fillStyle=Jt,C.fillRect(S.x-Kt/2,S.y-St/2,Kt,St),C.globalAlpha=1}else if(S.shape==="circle")C.ellipse?C.ellipse(S.x,S.y,Math.abs(st-J)*S.ovalScalar,Math.abs(ot-Q)*S.ovalScalar,Math.PI/10*S.wobble,0,2*Math.PI):nt(C,S.x,S.y,Math.abs(st-J)*S.ovalScalar,Math.abs(ot-Q)*S.ovalScalar,Math.PI/10*S.wobble,0,2*Math.PI);else if(S.shape==="star")for(var yt=Math.PI/2*3,c=4*S.scalar,h=8*S.scalar,v=S.x,x=S.y,D=5,M=Math.PI/D;D--;)v=S.x+Math.cos(yt)*h,x=S.y+Math.sin(yt)*h,C.lineTo(v,x),yt+=M,v=S.x+Math.cos(yt)*c,x=S.y+Math.sin(yt)*c,C.lineTo(v,x),yt+=M;else C.moveTo(Math.floor(S.x),Math.floor(S.y)),C.lineTo(Math.floor(S.wobbleX),Math.floor(Q)),C.lineTo(Math.floor(st),Math.floor(ot)),C.lineTo(Math.floor(J),Math.floor(S.wobbleY));return C.closePath(),C.fill(),S.tick<S.totalTicks}function Ut(C,S,q,J,Q){var st=S.slice(),ot=C.getContext("2d"),et,pt,xt=u(function(Kt){function St(){et=pt=null,ot.clearRect(0,0,J.width,J.height),d.clear(),Q(),Kt()}function Dt(){r&&!(J.width===i.width&&J.height===i.height)&&(J.width=C.width=i.width,J.height=C.height=i.height),!J.width&&!J.height&&(q(C),J.width=C.width,J.height=C.height),ot.clearRect(0,0,J.width,J.height),st=st.filter(function(Jt){return Vt(ot,Jt)}),st.length?et=f.frame(Dt):St()}et=f.frame(Dt),pt=St});return{addFettis:function(Kt){return st=st.concat(Kt),xt},canvas:C,promise:xt,reset:function(){et&&f.cancel(et),pt&&pt()}}}function _(C,S){var q=!C,J=!!I(S||{},"resize"),Q=!1,st=I(S,"disableForReducedMotion",Boolean),ot=o&&!!I(S||{},"useWorker"),et=ot?p():null,pt=q?Wt:B,xt=C&&et?!!C.__confetti_initialized:!1,Kt=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,St;function Dt(yt,c,h){for(var v=I(yt,"particleCount",A),x=I(yt,"angle",Number),D=I(yt,"spread",Number),M=I(yt,"startVelocity",Number),W=I(yt,"decay",Number),Nt=I(yt,"gravity",Number),It=I(yt,"drift",Number),bt=I(yt,"colors",k),Ht=I(yt,"ticks",Number),Z=I(yt,"shapes"),gt=I(yt,"scalar"),rt=!!I(yt,"flat"),kt=Pt(yt),Ne=v,xe=[],At=C.width*kt.x,it=C.height*kt.y;Ne--;)xe.push(vt({x:At,y:it,angle:x,spread:D,startVelocity:M,color:bt[Ne%bt.length],shape:Z[$(0,Z.length)],ticks:Ht,decay:W,gravity:Nt,drift:It,scalar:gt,flat:rt}));return St?St.addFettis(xe):(St=Ut(C,xe,pt,c,h),St.promise)}function Jt(yt){var c=st||I(yt,"disableForReducedMotion",Boolean),h=I(yt,"zIndex",Number);if(c&&Kt)return u(function(M){M()});q&&St?C=St.canvas:q&&!C&&(C=lt(h),document.body.appendChild(C)),J&&!xt&&pt(C);var v={width:C.width,height:C.height};et&&!xt&&et.init(C),xt=!0,et&&(C.__confetti_initialized=!0);function x(){if(et){var M={getBoundingClientRect:function(){if(!q)return C.getBoundingClientRect()}};pt(M),et.postMessage({resize:{width:M.width,height:M.height}});return}v.width=v.height=null}function D(){St=null,J&&(Q=!1,e.removeEventListener("resize",x)),q&&C&&(document.body.contains(C)&&document.body.removeChild(C),C=null,xt=!1)}return J&&!Q&&(Q=!0,e.addEventListener("resize",x,!1)),et?et.fire(yt,v,D):Dt(yt,v,D)}return Jt.reset=function(){et&&et.reset(),St&&St.reset()},Jt}var re;function te(){return re||(re=_(null,{useWorker:!0,resize:!0})),re}function Tt(C,S,q,J,Q,st,ot){var et=new Path2D(C),pt=new Path2D;pt.addPath(et,new DOMMatrix(S));var xt=new Path2D;return xt.addPath(pt,new DOMMatrix([Math.cos(ot)*Q,Math.sin(ot)*Q,-Math.sin(ot)*st,Math.cos(ot)*st,q,J])),xt}function le(C){if(!s)throw new Error("path confetti are not supported in this browser");var S,q;typeof C=="string"?S=C:(S=C.path,q=C.matrix);var J=new Path2D(S),Q=document.createElement("canvas"),st=Q.getContext("2d");if(!q){for(var ot=1e3,et=ot,pt=ot,xt=0,Kt=0,St,Dt,Jt=0;Jt<ot;Jt+=2)for(var yt=0;yt<ot;yt+=2)st.isPointInPath(J,Jt,yt,"nonzero")&&(et=Math.min(et,Jt),pt=Math.min(pt,yt),xt=Math.max(xt,Jt),Kt=Math.max(Kt,yt));St=xt-et,Dt=Kt-pt;var c=10,h=Math.min(c/St,c/Dt);q=[h,0,0,h,-Math.round(St/2+et)*h,-Math.round(Dt/2+pt)*h]}return{type:"path",path:S,matrix:q}}function ft(C){var S,q=1,J="#000000",Q='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof C=="string"?S=C:(S=C.text,q="scalar"in C?C.scalar:q,Q="fontFamily"in C?C.fontFamily:Q,J="color"in C?C.color:J);var st=10*q,ot=""+st+"px "+Q,et=new OffscreenCanvas(st,st),pt=et.getContext("2d");pt.font=ot;var xt=pt.measureText(S),Kt=Math.ceil(xt.actualBoundingBoxRight+xt.actualBoundingBoxLeft),St=Math.ceil(xt.actualBoundingBoxAscent+xt.actualBoundingBoxDescent),Dt=2,Jt=xt.actualBoundingBoxLeft+Dt,yt=xt.actualBoundingBoxAscent+Dt;Kt+=Dt+Dt,St+=Dt+Dt,et=new OffscreenCanvas(Kt,St),pt=et.getContext("2d"),pt.font=ot,pt.fillStyle=J,pt.fillText(S,Jt,yt);var c=1/q;return{type:"bitmap",bitmap:et.transferToImageBitmap(),matrix:[c,0,0,c,-Kt*c/2,-St*c/2]}}n.exports=function(){return te().apply(this,arguments)},n.exports.reset=function(){te().reset()},n.exports.create=_,n.exports.shapeFromPath=le,n.exports.shapeFromText=ft})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),Th,!1);var cN=Th.exports,YP=Th.exports.create,uN=class{static DEFAULTS={scalar:1.4,zIndex:1e4,shapes:["circle","circle","square"],colors:["#f51c8f","#2179e2","#d52dc8","#01a9d9","#78ff44","#fdff6a"]};static async basic(){await this.fire({particleCount:100,spread:70,origin:{y:.6}})}static async leftRight(t=100){let e=[],n=Date.now()+2e3,r=()=>{e.push(this.fire({angle:60,spread:55,origin:{x:0}}),this.fire({angle:120,spread:55,origin:{x:1}})),Date.now()<n&&t>0&&(requestAnimationFrame(r),t--)};r(),await Promise.all(e)}static async realistic(){await Promise.all([this.realisticFire(.25,{spread:26,startVelocity:55}),this.realisticFire(.2,{spread:60}),this.realisticFire(.35,{spread:100,decay:.91,scalar:.8}),this.realisticFire(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),this.realisticFire(.1,{spread:120,startVelocity:45})])}static async fire(t){Object.assign(t,this.DEFAULTS,t),t.particleCount=t.particleCount??this.DEFAULTS.colors.length,await cN(t)}static async realisticFire(t,e){let n={origin:{y:.7}};await this.fire(Object.assign({},n,e,{particleCount:Math.floor(200*t)}))}},hN=(t,e)=>e.minValue;function dN(t,e){if(t&1&&(Y(0,"li",6)(1,"div",7),jt(2,"div",8),Ge(3,"cooeeCurrency"),Ge(4,"safeHtml"),jt(5,"img",9),Y(6,"div",10),he(7),K()()()),t&2){let n=e.$implicit,r=at(2);ya("left",n.calculatedAlignment+"%"),z(2),Mt("innerHTML",on(4,7,on(3,5,n.minValue)),Hr),z(3),Mt("src",r.getIconURL(n),Ye),z(2),wa(n.label)}}function fN(t,e){if(t&1&&(Io(0)(1),jt(2,"div",0),Ge(3,"cooeeDynamicVariables"),Ge(4,"safeHtml"),Y(5,"div",1)(6,"ul",2)(7,"div",3),jt(8,"div",4),K(),Le(9,dN,8,9,"li",5,hN),K()()),t&2){let n=at(),r=n.calculatedState(),i=r.nextMilestone?r.nextMilestone.reachingText:r.lastMilestone.reachedText;z(2),Mt("innerHTML",on(4,6,pC(3,3,i,n.localDynamicVariables())),Hr),z(6),ya("width",r.cartValuePercentage+"%"),z(),Me(r.milestones)}}var pN=class Fc{constructor(e){this.elementRef=e,this.elementRef.nativeElement.update=this.update.bind(this)}cart;localDynamicVariables=ir({});calculatedState=ir({});_engagementTrigger=ir(null);progressBarConfig;set engagementTrigger(e){this._engagementTrigger.set(e),this.progressBarConfig=e.progressBarConfig}ngOnInit(){$e.debug("Init progressbar"),this.calculateMilestonesSilently()}ngOnDestroy(){$e.debug("Destroying progressbar")}update(){this.calculateMilestonesSilently()}getIconURL(e){return e.rewardType===ul.MilestoneRewardType.FREE_SHIPPING?"https://img.icons8.com/ios-filled/50/FFFFFF/free-shipping.png":e.rewardType===ul.MilestoneRewardType.DISCOUNT?"https://img.icons8.com/ios-glyphs/30/FFFFFF/sale-price-tag.png":e.rewardType===ul.MilestoneRewardType.FREE_AUTO_GIFT?"https://img.icons8.com/ios-filled/50/FFFFFF/gift--v1.png":""}calculateMilestonesSilently(){this.calculateMilestones().catch(e=>$e.error(e))}async calculateMilestones(){let e=this._engagementTrigger();if(!e?.progressBarConfig?.milestones?.length){$e.warn("Milestones not available in progress bar config",e);return}let n=await this.cart.getNormalisedCart(),r=e.progressBarConfig,i=r.milestones.at(-1),o=i.minValue+Math.floor(i.minValue*5/100),s=n.originalAmount,a=Math.min(s,o),l=100/r.milestones.length,u=l;for(let g of r.milestones)g.calculatedAlignment=u,u+=l;let d=this.calculateTrackedProgress(a,r.milestones);$e.debug("Cart value:",s,`, percentage: ${d}%`),this.celebrate(e,s);let f={milestonesReady:!0,cartValuePercentage:d,milestones:r.milestones},p=r.milestones.find(g=>g.minValue>s);if(p){this.localDynamicVariables.set({amount_left:Ih(p.minValue-s)}),f.nextMilestone=p,this.calculatedState.set(f);return}f.lastMilestone=i,this.calculatedState.set(f)}celebrate(e,n){let r=[...e.progressBarConfig.milestones].reverse().find(o=>o.minValue<n);if(!r)return;let i=`lc/en/${e.shortID}/${r.minValue}`;sessionStorage.getItem(i)||(sessionStorage.setItem(i,"1"),this.progressBarConfig?.noConfetti||uN.realistic())}calculateTrackedProgress(e,n){if(e<=n[0].minValue)return e/n[0].minValue*n[0].calculatedAlignment;if(e>=n[n.length-1].minValue)return 100;for(let r=0;r<n.length-1;r++){let i=n[r].minValue,o=n[r+1].minValue,s=n[r].calculatedAlignment,a=n[r+1].calculatedAlignment;if(e>=i&&e<=o)return(e-i)/(o-i)*(a-s)+s}return 0}static \u0275fac=function(e){return new(e||Fc)(Ce(He))};static \u0275cmp=je({type:Fc,selectors:[["cooee-progressbar"]],inputs:{cart:"cart",engagementTrigger:"engagementTrigger"},decls:1,vars:1,consts:[["id","lc-heading",1,"lc:font-medium","lc:text-center","lc:text-[12px]","lc-primary-text",3,"innerHTML"],[1,"lc:mt-4","lc:w-[95%]"],["id","lc-milestone-list",1,"lc:flex","lc:items-center","lc:relative","lc:text-[10px]","lc:font-medium"],["id","lc-untracked-path",1,"lc:w-full","lc:bg-gray-200","lc:h-1","lc:absolute","lc-progress-rail"],["id","lc-tracked-path",1,"lc:bg-green-700","lc:h-full","lc:block!"],["id","lc-milestone-list-item",1,"lc:relative","lc:flex","lc:flex-col","lc:items-center","lc:h-[75px]",3,"left"],["id","lc-milestone-list-item",1,"lc:relative","lc:flex","lc:flex-col","lc:items-center","lc:h-[75px]"],[1,"lc:flex","lc:flex-col","lc:items-center","lc:justify-between","lc:absolute","lc:h-full","lc:w-[100px]"],["id","lc-milestone-value",1,"lc-milestone-value",3,"innerHTML"],["width","20","height","20","id","lc-milestone-icon","alt","milestone icon",1,"lc-milestone-icon","lc:bg-green-700",3,"src"],["id","lc-milestone-label",1,"lc="]],template:function(e,n){e&1&&pe(0,fN,11,8),e&2&&ve(n.calculatedState().milestonesReady?0:-1)},dependencies:[lN,Oa,Ta],styles:["[_nghost-%COMP%]{display:block;padding:10px;background:linear-gradient(0deg,rgba(44,135,74,.1) 0%,transparent 100%)}.lc-milestone-icon[_ngcontent-%COMP%]{padding:5px;border-radius:1000px}.lc-progress-rail[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{transition:width .5s ease-in-out}"]})},$y=class Uc{cooeeEvent=new ee;cooeeCTA=new ee;elementRef=N(He);_engagementTrigger=ir(null);_triggerContext=ir(null);constructor(){this.elementRef.nativeElement.update=this.update.bind(this)}get triggerContext(){return this._triggerContext()}set triggerContext(e){this._triggerContext.set(e),this._engagementTrigger.set(e.triggerData),this.engagementTriggerReceived(e.triggerData)}get engagementTrigger(){return this._engagementTrigger()}ngOnInit(){$e.debug("Init",this.constructor.name)}ngOnDestroy(){$e.debug("Destroying",this.constructor.name)}sendEventToRenderer(e){this.cooeeEvent.emit(e)}executeCTAViaRenderer(e){this.cooeeCTA.emit(e)}static \u0275fac=function(e){return new(e||Uc)};static \u0275cmp=je({type:Uc,selectors:[["ng-component"]],inputs:{triggerContext:"triggerContext"},outputs:{cooeeEvent:"cooeeEvent",cooeeCTA:"cooeeCTA"},decls:0,vars:0,template:function(e,n){},encapsulation:2})};function gN(t,e){if(t&1&&(Y(0,"div",6),he(1),K(),Y(2,"div",7),he(3),K()),t&2){let n=at(2);z(),On(" ",n.getCurrency(n.selectedVariant().price.cmp)," "),z(2),On(" ",n.getDiscountPercentage(n.selectedVariant().price),"% off ")}}function mN(t,e){if(t&1&&(Y(0,"div",4),he(1),K()),t&2){let n=at(2);z(),On(" ",n.stickyATCConfig.leftText," ")}}function vN(t,e){if(t&1&&(Y(0,"div",1)(1,"div",5),he(2),K(),pe(3,gN,4,2)(4,mN,2,1,"div",4),K()),t&2){let n=at();z(2),On(" ",n.getCurrency(n.selectedVariant().price.d)," "),z(),ve(n.selectedVariant().price.cmp?3:-1),z(),ve(n.stickyATCConfig!=null&&n.stickyATCConfig.leftText?4:-1)}}function yN(t,e){if(t&1&&(Y(0,"div",4),he(1),K()),t&2){let n=at();z(),On(" ",n.stickyATCConfig.rightText," ")}}var _N=class Hc extends $y{currentItem;stickyATCConfig;selectedVariant=ir(void 0);constructor(){super()}engagementTriggerReceived(e){this.stickyATCConfig=e.stickyATCConfig,this.currentItem=e.items[0],this.selectedVariant.set(this.currentItem.vars[0])}update(){}getCurrency(e){return Ih(e)}getDiscountPercentage(e){return((e.cmp-e.d)/e.cmp*100).toFixed(0)}async addToCart(){this.executeCTAViaRenderer({clickAction:{at:102},item:this.currentItem})}static \u0275fac=function(e){return new(e||Hc)};static \u0275cmp=je({type:Hc,selectors:[["cooee-sticky-atc"]],features:[Ei],decls:6,vars:2,consts:[[1,"lc-wrapper"],[1,"lc-prices"],[1,"lc-button-wrapper"],["type","button",1,"lc-button","lc-button-atc",3,"click"],[1,"lc-additional-text"],[1,"lc-sale-price"],[1,"lc-compare-price"],[1,"lc-discount-label"]],template:function(e,n){e&1&&(Y(0,"div",0),pe(1,vN,5,3,"div",1),Y(2,"div",2)(3,"button",3),ue("click",function(){return n.addToCart()}),he(4,"Add To Cart"),K(),pe(5,yN,2,1,"div",4),K()()),e&2&&(z(),ve(n.selectedVariant()&&n.stickyATCConfig!=null&&n.stickyATCConfig.showProductInfo?1:-1),z(4),ve(n.stickyATCConfig!=null&&n.stickyATCConfig.rightText?5:-1))},styles:["[_nghost-%COMP%]{display:flex;justify-content:center;padding:10px;background-color:#fff;width:100%;box-shadow:4px 0 10px #0006;line-height:normal}.lc-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:8px;max-width:1100px;width:100%}.lc-prices[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px}@media (min-width: 768px){.lc-prices[_ngcontent-%COMP%]{gap:8px}}.lc-sale-price[_ngcontent-%COMP%]{font-size:24px;font-weight:600}.lc-compare-price[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:red;text-decoration:line-through}.lc-discount-label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:green}.lc-button-wrapper[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;flex-direction:column;align-items:center}@media (min-width: 768px){.lc-button-wrapper[_ngcontent-%COMP%]{flex-direction:row;gap:8px}}.lc-button[_ngcontent-%COMP%]{background-color:#000;color:#fff;opacity:1;cursor:pointer;pointer-events:auto;border-radius:4px;min-width:150px;width:100%;padding:8px}.lc-additional-text[_ngcontent-%COMP%]{font-size:12px;color:#666}"]})},Zo=an(A0()),bN=an(ho()),zy=(t=>(t.GALLERY="GALLERY",t.CURRENT_PRODUCT="CURRENT_PRODUCT",t))(zy||{}),qy=(t=>(t.SIMPLE="SIMPLE",t.SWIPER="SWIPER",t.STORY="STORY",t.FLOATING_POPUP="FLOATING_POPUP",t))(qy||{}),Wy=(t=>(t.ON="ON",t.OFF="OFF",t.ON_HOVER="ON_HOVER",t))(Wy||{}),Gy=(t=>(t.FIRST_ITEM="FIRST_ITEM",t.BADGE="BADGE",t.NONE="NONE",t))(Gy||{});function wN(t,e){return e={exports:{}},t(e,e.exports),e.exports}var EN=CN,xN=ON,SN=NN,Sn=[],tn=[],IN=typeof Uint8Array<"u"?Uint8Array:Array,gl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(dr=0,Uf=gl.length;dr<Uf;++dr)Sn[dr]=gl[dr],tn[gl.charCodeAt(dr)]=dr;var dr,Uf;tn[45]=62;tn[95]=63;function Zy(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function CN(t){var e=Zy(t),n=e[0],r=e[1];return(n+r)*3/4-r}function TN(t,e,n){return(e+n)*3/4-n}function ON(t){var e,n=Zy(t),r=n[0],i=n[1],o=new IN(TN(t,r,i)),s=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)e=tn[t.charCodeAt(l)]<<18|tn[t.charCodeAt(l+1)]<<12|tn[t.charCodeAt(l+2)]<<6|tn[t.charCodeAt(l+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=tn[t.charCodeAt(l)]<<2|tn[t.charCodeAt(l+1)]>>4,o[s++]=e&255),i===1&&(e=tn[t.charCodeAt(l)]<<10|tn[t.charCodeAt(l+1)]<<4|tn[t.charCodeAt(l+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function RN(t){return Sn[t>>18&63]+Sn[t>>12&63]+Sn[t>>6&63]+Sn[t&63]}function DN(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(RN(r));return i.join("")}function NN(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(DN(t,s,s+o>a?a:s+o));return r===1?(e=t[n-1],i.push(Sn[e>>2]+Sn[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(Sn[e>>10]+Sn[e>>4&63]+Sn[e<<2&63]+"=")),i.join("")}var ml={byteLength:EN,toByteArray:xN,fromByteArray:SN},kN=function(t,e,n,r,i){var o,s,a=i*8-r-1,l=(1<<a)-1,u=l>>1,d=-7,f=n?i-1:0,p=n?-1:1,g=t[e+f];for(f+=p,o=g&(1<<-d)-1,g>>=-d,d+=a;d>0;o=o*256+t[e+f],f+=p,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=r;d>0;s=s*256+t[e+f],f+=p,d-=8);if(o===0)o=1-u;else{if(o===l)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-u}return(g?-1:1)*s*Math.pow(2,o-r)},AN=function(t,e,n,r,i,o){var s,a,l,u=o*8-i-1,d=(1<<u)-1,f=d>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:o-1,m=r?1:-1,b=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=d):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+f>=1?e+=p/l:e+=p*Math.pow(2,1-f),e*l>=2&&(s++,l/=2),s+f>=d?(a=0,s=d):s+f>=1?(a=(e*l-1)*Math.pow(2,i),s=s+f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+g]=a&255,g+=m,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[n+g]=s&255,g+=m,s/=256,u-=8);t[n+g-m]|=b*128},Gr={read:kN,write:AN},Ra=wN(function(t,e){var n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=A,e.INSPECT_MAX_BYTES=50;var r=2147483647;e.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var c=new Uint8Array(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,Uint8Array.prototype),Object.setPrototypeOf(c,h),c.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(c){if(c>r)throw new RangeError('The value "'+c+'" is invalid for option "size"');var h=new Uint8Array(c);return Object.setPrototypeOf(h,s.prototype),h}function s(c,h,v){if(typeof c=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(c)}return a(c,h,v)}s.poolSize=8192;function a(c,h,v){if(typeof c=="string")return f(c,h);if(ArrayBuffer.isView(c))return g(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(c));if(Dt(c,ArrayBuffer)||c&&Dt(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Dt(c,SharedArrayBuffer)||c&&Dt(c.buffer,SharedArrayBuffer)))return m(c,h,v);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var x=c.valueOf&&c.valueOf();if(x!=null&&x!==c)return s.from(x,h,v);var D=b(c);if(D)return D;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return s.from(c[Symbol.toPrimitive]("string"),h,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(c))}s.from=function(c,h,v){return a(c,h,v)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function u(c,h,v){return l(c),c<=0?o(c):h!==void 0?typeof v=="string"?o(c).fill(h,v):o(c).fill(h):o(c)}s.alloc=function(c,h,v){return u(c,h,v)};function d(c){return l(c),o(c<0?0:I(c)|0)}s.allocUnsafe=function(c){return d(c)},s.allocUnsafeSlow=function(c){return d(c)};function f(c,h){if((typeof h!="string"||h==="")&&(h="utf8"),!s.isEncoding(h))throw new TypeError("Unknown encoding: "+h);var v=$(c,h)|0,x=o(v),D=x.write(c,h);return D!==v&&(x=x.slice(0,D)),x}function p(c){for(var h=c.length<0?0:I(c.length)|0,v=o(h),x=0;x<h;x+=1)v[x]=c[x]&255;return v}function g(c){if(Dt(c,Uint8Array)){var h=new Uint8Array(c);return m(h.buffer,h.byteOffset,h.byteLength)}return p(c)}function m(c,h,v){if(h<0||c.byteLength<h)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<h+(v||0))throw new RangeError('"length" is outside of buffer bounds');var x;return h===void 0&&v===void 0?x=new Uint8Array(c):v===void 0?x=new Uint8Array(c,h):x=new Uint8Array(c,h,v),Object.setPrototypeOf(x,s.prototype),x}function b(c){if(s.isBuffer(c)){var h=I(c.length)|0,v=o(h);return v.length===0||c.copy(v,0,0,h),v}if(c.length!==void 0)return typeof c.length!="number"||Jt(c.length)?o(0):p(c);if(c.type==="Buffer"&&Array.isArray(c.data))return p(c.data)}function I(c){if(c>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return c|0}function A(c){return+c!=c&&(c=0),s.alloc(+c)}s.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==s.prototype},s.compare=function(c,h){if(Dt(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),Dt(h,Uint8Array)&&(h=s.from(h,h.offset,h.byteLength)),!s.isBuffer(c)||!s.isBuffer(h))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===h)return 0;for(var v=c.length,x=h.length,D=0,M=Math.min(v,x);D<M;++D)if(c[D]!==h[D]){v=c[D],x=h[D];break}return v<x?-1:x<v?1:0},s.isEncoding=function(c){switch(String(c).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(c,h){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return s.alloc(0);var v;if(h===void 0)for(h=0,v=0;v<c.length;++v)h+=c[v].length;var x=s.allocUnsafe(h),D=0;for(v=0;v<c.length;++v){var M=c[v];if(Dt(M,Uint8Array))D+M.length>x.length?s.from(M).copy(x,D):Uint8Array.prototype.set.call(x,M,D);else if(s.isBuffer(M))M.copy(x,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=M.length}return x};function $(c,h){if(s.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||Dt(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(c));var v=c.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&v===0)return 0;for(var D=!1;;)switch(h){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return et(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return Kt(c).length;default:if(D)return x?-1:et(c).length;h=(""+h).toLowerCase(),D=!0}}s.byteLength=$;function j(c,h,v){var x=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,h>>>=0,v<=h))return"";for(c||(c="utf8");;)switch(c){case"hex":return le(this,h,v);case"utf8":case"utf-8":return Ut(this,h,v);case"ascii":return te(this,h,v);case"latin1":case"binary":return Tt(this,h,v);case"base64":return Vt(this,h,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ft(this,h,v);default:if(x)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),x=!0}}s.prototype._isBuffer=!0;function k(c,h,v){var x=c[h];c[h]=c[v],c[v]=x}s.prototype.swap16=function(){var c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var h=0;h<c;h+=2)k(this,h,h+1);return this},s.prototype.swap32=function(){var c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var h=0;h<c;h+=4)k(this,h,h+3),k(this,h+1,h+2);return this},s.prototype.swap64=function(){var c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var h=0;h<c;h+=8)k(this,h,h+7),k(this,h+1,h+6),k(this,h+2,h+5),k(this,h+3,h+4);return this},s.prototype.toString=function(){var c=this.length;return c===0?"":arguments.length===0?Ut(this,0,c):j.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(c){if(!s.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:s.compare(this,c)===0},s.prototype.inspect=function(){var c="",h=e.INSPECT_MAX_BYTES;return c=this.toString("hex",0,h).replace(/(.{2})/g,"$1 ").trim(),this.length>h&&(c+=" ... "),"<Buffer "+c+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(c,h,v,x,D){if(Dt(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),!s.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(c));if(h===void 0&&(h=0),v===void 0&&(v=c?c.length:0),x===void 0&&(x=0),D===void 0&&(D=this.length),h<0||v>c.length||x<0||D>this.length)throw new RangeError("out of range index");if(x>=D&&h>=v)return 0;if(x>=D)return-1;if(h>=v)return 1;if(h>>>=0,v>>>=0,x>>>=0,D>>>=0,this===c)return 0;for(var M=D-x,W=v-h,Nt=Math.min(M,W),It=this.slice(x,D),bt=c.slice(h,v),Ht=0;Ht<Nt;++Ht)if(It[Ht]!==bt[Ht]){M=It[Ht],W=bt[Ht];break}return M<W?-1:W<M?1:0};function G(c,h,v,x,D){if(c.length===0)return-1;if(typeof v=="string"?(x=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,Jt(v)&&(v=D?0:c.length-1),v<0&&(v=c.length+v),v>=c.length){if(D)return-1;v=c.length-1}else if(v<0)if(D)v=0;else return-1;if(typeof h=="string"&&(h=s.from(h,x)),s.isBuffer(h))return h.length===0?-1:Pt(c,h,v,x,D);if(typeof h=="number")return h=h&255,typeof Uint8Array.prototype.indexOf=="function"?D?Uint8Array.prototype.indexOf.call(c,h,v):Uint8Array.prototype.lastIndexOf.call(c,h,v):Pt(c,[h],v,x,D);throw new TypeError("val must be string, number or Buffer")}function Pt(c,h,v,x,D){var M=1,W=c.length,Nt=h.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(c.length<2||h.length<2)return-1;M=2,W/=2,Nt/=2,v/=2}function It(rt,kt){return M===1?rt[kt]:rt.readUInt16BE(kt*M)}var bt;if(D){var Ht=-1;for(bt=v;bt<W;bt++)if(It(c,bt)===It(h,Ht===-1?0:bt-Ht)){if(Ht===-1&&(Ht=bt),bt-Ht+1===Nt)return Ht*M}else Ht!==-1&&(bt-=bt-Ht),Ht=-1}else for(v+Nt>W&&(v=W-Nt),bt=v;bt>=0;bt--){for(var Z=!0,gt=0;gt<Nt;gt++)if(It(c,bt+gt)!==It(h,gt)){Z=!1;break}if(Z)return bt}return-1}s.prototype.includes=function(c,h,v){return this.indexOf(c,h,v)!==-1},s.prototype.indexOf=function(c,h,v){return G(this,c,h,v,!0)},s.prototype.lastIndexOf=function(c,h,v){return G(this,c,h,v,!1)};function Wt(c,h,v,x){v=Number(v)||0;var D=c.length-v;x?(x=Number(x),x>D&&(x=D)):x=D;var M=h.length;x>M/2&&(x=M/2);for(var W=0;W<x;++W){var Nt=parseInt(h.substr(W*2,2),16);if(Jt(Nt))return W;c[v+W]=Nt}return W}function B(c,h,v,x){return St(et(h,c.length-v),c,v,x)}function lt(c,h,v,x){return St(pt(h),c,v,x)}function nt(c,h,v,x){return St(Kt(h),c,v,x)}function vt(c,h,v,x){return St(xt(h,c.length-v),c,v,x)}s.prototype.write=function(c,h,v,x){if(h===void 0)x="utf8",v=this.length,h=0;else if(v===void 0&&typeof h=="string")x=h,v=this.length,h=0;else if(isFinite(h))h=h>>>0,isFinite(v)?(v=v>>>0,x===void 0&&(x="utf8")):(x=v,v=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var D=this.length-h;if((v===void 0||v>D)&&(v=D),c.length>0&&(v<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");for(var M=!1;;)switch(x){case"hex":return Wt(this,c,h,v);case"utf8":case"utf-8":return B(this,c,h,v);case"ascii":case"latin1":case"binary":return lt(this,c,h,v);case"base64":return nt(this,c,h,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,c,h,v);default:if(M)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),M=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Vt(c,h,v){return h===0&&v===c.length?ml.fromByteArray(c):ml.fromByteArray(c.slice(h,v))}function Ut(c,h,v){v=Math.min(c.length,v);for(var x=[],D=h;D<v;){var M=c[D],W=null,Nt=M>239?4:M>223?3:M>191?2:1;if(D+Nt<=v){var It,bt,Ht,Z;switch(Nt){case 1:M<128&&(W=M);break;case 2:It=c[D+1],(It&192)===128&&(Z=(M&31)<<6|It&63,Z>127&&(W=Z));break;case 3:It=c[D+1],bt=c[D+2],(It&192)===128&&(bt&192)===128&&(Z=(M&15)<<12|(It&63)<<6|bt&63,Z>2047&&(Z<55296||Z>57343)&&(W=Z));break;case 4:It=c[D+1],bt=c[D+2],Ht=c[D+3],(It&192)===128&&(bt&192)===128&&(Ht&192)===128&&(Z=(M&15)<<18|(It&63)<<12|(bt&63)<<6|Ht&63,Z>65535&&Z<1114112&&(W=Z))}}W===null?(W=65533,Nt=1):W>65535&&(W-=65536,x.push(W>>>10&1023|55296),W=56320|W&1023),x.push(W),D+=Nt}return re(x)}var _=4096;function re(c){var h=c.length;if(h<=_)return String.fromCharCode.apply(String,c);for(var v="",x=0;x<h;)v+=String.fromCharCode.apply(String,c.slice(x,x+=_));return v}function te(c,h,v){var x="";v=Math.min(c.length,v);for(var D=h;D<v;++D)x+=String.fromCharCode(c[D]&127);return x}function Tt(c,h,v){var x="";v=Math.min(c.length,v);for(var D=h;D<v;++D)x+=String.fromCharCode(c[D]);return x}function le(c,h,v){var x=c.length;(!h||h<0)&&(h=0),(!v||v<0||v>x)&&(v=x);for(var D="",M=h;M<v;++M)D+=yt[c[M]];return D}function ft(c,h,v){for(var x=c.slice(h,v),D="",M=0;M<x.length-1;M+=2)D+=String.fromCharCode(x[M]+x[M+1]*256);return D}s.prototype.slice=function(c,h){var v=this.length;c=~~c,h=h===void 0?v:~~h,c<0?(c+=v,c<0&&(c=0)):c>v&&(c=v),h<0?(h+=v,h<0&&(h=0)):h>v&&(h=v),h<c&&(h=c);var x=this.subarray(c,h);return Object.setPrototypeOf(x,s.prototype),x};function C(c,h,v){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+h>v)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(c,h,v){c=c>>>0,h=h>>>0,v||C(c,h,this.length);for(var x=this[c],D=1,M=0;++M<h&&(D*=256);)x+=this[c+M]*D;return x},s.prototype.readUintBE=s.prototype.readUIntBE=function(c,h,v){c=c>>>0,h=h>>>0,v||C(c,h,this.length);for(var x=this[c+--h],D=1;h>0&&(D*=256);)x+=this[c+--h]*D;return x},s.prototype.readUint8=s.prototype.readUInt8=function(c,h){return c=c>>>0,h||C(c,1,this.length),this[c]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(c,h){return c=c>>>0,h||C(c,2,this.length),this[c]|this[c+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(c,h){return c=c>>>0,h||C(c,2,this.length),this[c]<<8|this[c+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(c,h){return c=c>>>0,h||C(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(c,h){return c=c>>>0,h||C(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},s.prototype.readIntLE=function(c,h,v){c=c>>>0,h=h>>>0,v||C(c,h,this.length);for(var x=this[c],D=1,M=0;++M<h&&(D*=256);)x+=this[c+M]*D;return D*=128,x>=D&&(x-=Math.pow(2,8*h)),x},s.prototype.readIntBE=function(c,h,v){c=c>>>0,h=h>>>0,v||C(c,h,this.length);for(var x=h,D=1,M=this[c+--x];x>0&&(D*=256);)M+=this[c+--x]*D;return D*=128,M>=D&&(M-=Math.pow(2,8*h)),M},s.prototype.readInt8=function(c,h){return c=c>>>0,h||C(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},s.prototype.readInt16LE=function(c,h){c=c>>>0,h||C(c,2,this.length);var v=this[c]|this[c+1]<<8;return v&32768?v|4294901760:v},s.prototype.readInt16BE=function(c,h){c=c>>>0,h||C(c,2,this.length);var v=this[c+1]|this[c]<<8;return v&32768?v|4294901760:v},s.prototype.readInt32LE=function(c,h){return c=c>>>0,h||C(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},s.prototype.readInt32BE=function(c,h){return c=c>>>0,h||C(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},s.prototype.readFloatLE=function(c,h){return c=c>>>0,h||C(c,4,this.length),Gr.read(this,c,!0,23,4)},s.prototype.readFloatBE=function(c,h){return c=c>>>0,h||C(c,4,this.length),Gr.read(this,c,!1,23,4)},s.prototype.readDoubleLE=function(c,h){return c=c>>>0,h||C(c,8,this.length),Gr.read(this,c,!0,52,8)},s.prototype.readDoubleBE=function(c,h){return c=c>>>0,h||C(c,8,this.length),Gr.read(this,c,!1,52,8)};function S(c,h,v,x,D,M){if(!s.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>D||h<M)throw new RangeError('"value" argument is out of bounds');if(v+x>c.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(c,h,v,x){if(c=+c,h=h>>>0,v=v>>>0,!x){var D=Math.pow(2,8*v)-1;S(this,c,h,v,D,0)}var M=1,W=0;for(this[h]=c&255;++W<v&&(M*=256);)this[h+W]=c/M&255;return h+v},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(c,h,v,x){if(c=+c,h=h>>>0,v=v>>>0,!x){var D=Math.pow(2,8*v)-1;S(this,c,h,v,D,0)}var M=v-1,W=1;for(this[h+M]=c&255;--M>=0&&(W*=256);)this[h+M]=c/W&255;return h+v},s.prototype.writeUint8=s.prototype.writeUInt8=function(c,h,v){return c=+c,h=h>>>0,v||S(this,c,h,1,255,0),this[h]=c&255,h+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(c,h,v){return c=+c,h=h>>>0,v||S(this,c,h,2,65535,0),this[h]=c&255,this[h+1]=c>>>8,h+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(c,h,v){return c=+c,h=h>>>0,v||S(this,c,h,2,65535,0),this[h]=c>>>8,this[h+1]=c&255,h+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(c,h,v){return c=+c,h=h>>>0,v||S(this,c,h,4,4294967295,0),this[h+3]=c>>>24,this[h+2]=c>>>16,this[h+1]=c>>>8,this[h]=c&255,h+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(c,h,v){return c=+c,h=h>>>0,v||S(this,c,h,4,4294967295,0),this[h]=c>>>24,this[h+1]=c>>>16,this[h+2]=c>>>8,this[h+3]=c&255,h+4},s.prototype.writeIntLE=function(c,h,v,x){if(c=+c,h=h>>>0,!x){var D=Math.pow(2,8*v-1);S(this,c,h,v,D-1,-D)}var M=0,W=1,Nt=0;for(this[h]=c&255;++M<v&&(W*=256);)c<0&&Nt===0&&this[h+M-1]!==0&&(Nt=1),this[h+M]=(c/W>>0)-Nt&255;return h+v},s.prototype.writeIntBE=function(c,h,v,x){if(c=+c,h=h>>>0,!x){var D=Math.pow(2,8*v-1);S(this,c,h,v,D-1,-D)}var M=v-1,W=1,Nt=0;for(this[h+M]=c&255;--M>=0&&(W*=256);)c<0&&Nt===0&&this[h+M+1]!==0&&(Nt=1),this[h+M]=(c/W>>0)-Nt&255;return h+v},s.prototype.writeInt8=function(c,h,v){return c=+c,h=h>>>0,v||S(this,c,h,1,127,-128),c<0&&(c=255+c+1),this[h]=c&255,h+1},s.prototype.writeInt16LE=function(c,h,v){return c=+c,h=h>>>0,v||S(this,c,h,2,32767,-32768),this[h]=c&255,this[h+1]=c>>>8,h+2},s.prototype.writeInt16BE=function(c,h,v){return c=+c,h=h>>>0,v||S(this,c,h,2,32767,-32768),this[h]=c>>>8,this[h+1]=c&255,h+2},s.prototype.writeInt32LE=function(c,h,v){return c=+c,h=h>>>0,v||S(this,c,h,4,2147483647,-2147483648),this[h]=c&255,this[h+1]=c>>>8,this[h+2]=c>>>16,this[h+3]=c>>>24,h+4},s.prototype.writeInt32BE=function(c,h,v){return c=+c,h=h>>>0,v||S(this,c,h,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[h]=c>>>24,this[h+1]=c>>>16,this[h+2]=c>>>8,this[h+3]=c&255,h+4};function q(c,h,v,x,D,M){if(v+x>c.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function J(c,h,v,x,D){return h=+h,v=v>>>0,D||q(c,h,v,4),Gr.write(c,h,v,x,23,4),v+4}s.prototype.writeFloatLE=function(c,h,v){return J(this,c,h,!0,v)},s.prototype.writeFloatBE=function(c,h,v){return J(this,c,h,!1,v)};function Q(c,h,v,x,D){return h=+h,v=v>>>0,D||q(c,h,v,8),Gr.write(c,h,v,x,52,8),v+8}s.prototype.writeDoubleLE=function(c,h,v){return Q(this,c,h,!0,v)},s.prototype.writeDoubleBE=function(c,h,v){return Q(this,c,h,!1,v)},s.prototype.copy=function(c,h,v,x){if(!s.isBuffer(c))throw new TypeError("argument should be a Buffer");if(v||(v=0),!x&&x!==0&&(x=this.length),h>=c.length&&(h=c.length),h||(h=0),x>0&&x<v&&(x=v),x===v||c.length===0||this.length===0)return 0;if(h<0)throw new RangeError("targetStart out of bounds");if(v<0||v>=this.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),c.length-h<x-v&&(x=c.length-h+v);var D=x-v;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(h,v,x):Uint8Array.prototype.set.call(c,this.subarray(v,x),h),D},s.prototype.fill=function(c,h,v,x){if(typeof c=="string"){if(typeof h=="string"?(x=h,h=0,v=this.length):typeof v=="string"&&(x=v,v=this.length),x!==void 0&&typeof x!="string")throw new TypeError("encoding must be a string");if(typeof x=="string"&&!s.isEncoding(x))throw new TypeError("Unknown encoding: "+x);if(c.length===1){var D=c.charCodeAt(0);(x==="utf8"&&D<128||x==="latin1")&&(c=D)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(h<0||this.length<h||this.length<v)throw new RangeError("Out of range index");if(v<=h)return this;h=h>>>0,v=v===void 0?this.length:v>>>0,c||(c=0);var M;if(typeof c=="number")for(M=h;M<v;++M)this[M]=c;else{var W=s.isBuffer(c)?c:s.from(c,x),Nt=W.length;if(Nt===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(M=0;M<v-h;++M)this[M+h]=W[M%Nt]}return this};var st=/[^+/0-9A-Za-z-_]/g;function ot(c){if(c=c.split("=")[0],c=c.trim().replace(st,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function et(c,h){h=h||1/0;for(var v,x=c.length,D=null,M=[],W=0;W<x;++W){if(v=c.charCodeAt(W),v>55295&&v<57344){if(!D){if(v>56319){(h-=3)>-1&&M.push(239,191,189);continue}else if(W+1===x){(h-=3)>-1&&M.push(239,191,189);continue}D=v;continue}if(v<56320){(h-=3)>-1&&M.push(239,191,189),D=v;continue}v=(D-55296<<10|v-56320)+65536}else D&&(h-=3)>-1&&M.push(239,191,189);if(D=null,v<128){if((h-=1)<0)break;M.push(v)}else if(v<2048){if((h-=2)<0)break;M.push(v>>6|192,v&63|128)}else if(v<65536){if((h-=3)<0)break;M.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((h-=4)<0)break;M.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return M}function pt(c){for(var h=[],v=0;v<c.length;++v)h.push(c.charCodeAt(v)&255);return h}function xt(c,h){for(var v,x,D,M=[],W=0;W<c.length&&!((h-=2)<0);++W)v=c.charCodeAt(W),x=v>>8,D=v%256,M.push(D),M.push(x);return M}function Kt(c){return ml.toByteArray(ot(c))}function St(c,h,v,x){for(var D=0;D<x&&!(D+v>=h.length||D>=c.length);++D)h[D+v]=c[D];return D}function Dt(c,h){return c instanceof h||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===h.name}function Jt(c){return c!==c}var yt=function(){for(var c="0123456789abcdef",h=new Array(256),v=0;v<16;++v)for(var x=v*16,D=0;D<16;++D)h[x+D]=c[v]+c[D];return h}()}),Ft=Ra.Buffer;Ra.SlowBuffer;Ra.INSPECT_MAX_BYTES;Ra.kMaxLength;var $c=function(t,e){return $c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},$c(t,e)};function Da(t,e){$c(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Sr=function(t){Da(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),e}(Error),se=function(t){Da(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),e}(TypeError);function Yo(t){return t&&t.Math==Math&&t}function Yy(){return Yo(typeof globalThis=="object"&&globalThis)||Yo(typeof window=="object"&&window)||Yo(typeof self=="object"&&self)||Yo(typeof global=="object"&&global)||Function("return this")()}function PN(){var t=Yy();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var LN=function(t){var e=PN()?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(e);for(var n=Ft.alloc(t),r=0;r<t;++r)n[r]=Math.floor(Math.random()*256);return n},MN=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(Ft.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(Ft.alloc(e))}:LN}},Ky=MN();function jN(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function Oh(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function VN(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function BN(t){return ko(t)&&Object.prototype.toString.call(t)==="[object Date]"}function ko(t){return typeof t=="object"&&t!==null}function Na(t,e){var n=!1;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return n||(console.warn(e),n=!0),t.apply(this,i)}return r}function Vs(t){if(ArrayBuffer.isView(t))return Ft.from(t.buffer,t.byteOffset,t.byteLength);if(jN(t))return Ft.from(t);throw new se("Must use either Buffer or TypedArray")}var FN=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,Jy=function(t){return typeof t=="string"&&FN.test(t)},zc=function(t){if(!Jy(t))throw new se('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var e=t.replace(/-/g,"");return Ft.from(e,"hex")},Hf=function(t,e){return e===void 0&&(e=!0),e?t.toString("hex",0,4)+"-"+t.toString("hex",4,6)+"-"+t.toString("hex",6,8)+"-"+t.toString("hex",8,10)+"-"+t.toString("hex",10,16):t.toString("hex")},KP=Math.pow(2,63)-1,JP=-Math.pow(2,63),UN=Math.pow(2,53),HN=-Math.pow(2,53),Qy=4,Ir=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(e!=null&&typeof e!="string"&&!ArrayBuffer.isView(e)&&!(e instanceof ArrayBuffer)&&!Array.isArray(e))throw new se("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=n??t.BSON_BINARY_SUBTYPE_DEFAULT,e==null?(this.buffer=Ft.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=Ft.from(e,"binary"):Array.isArray(e)?this.buffer=Ft.from(e):this.buffer=Vs(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new se("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new se("only accepts single character Uint8Array or Array");var n;if(typeof e=="string"?n=e.charCodeAt(0):typeof e=="number"?n=e:n=e[0],n<0||n>255)throw new se("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=Ft.alloc(t.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},t.prototype.write=function(e,n){if(n=typeof n=="number"?n:this.position,this.buffer.length<n+e.length){var r=Ft.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(Vs(e),n),this.position=n+e.byteLength>this.position?n+e.length:this.position):typeof e=="string"&&(this.buffer.write(e,n,e.length,"binary"),this.position=n+e.length>this.position?n+e.length:this.position)},t.prototype.read=function(e,n){return n=n&&n>0?n:this.position,this.buffer.slice(e,e+n)},t.prototype.value=function(e){return e=!!e,e&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},t.prototype.length=function(){return this.position},t.prototype.toJSON=function(){return this.buffer.toString("base64")},t.prototype.toString=function(e){return this.buffer.toString(e)},t.prototype.toExtendedJSON=function(e){e=e||{};var n=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}},t.prototype.toUUID=function(){if(this.sub_type===t.SUBTYPE_UUID)return new $f(this.buffer.slice(0,this.position));throw new Sr('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(t.SUBTYPE_UUID,'" is currently supported.'))},t.fromExtendedJSON=function(e,n){n=n||{};var r,i;if("$binary"in e?n.legacy&&typeof e.$binary=="string"&&"$type"in e?(i=e.$type?parseInt(e.$type,16):0,r=Ft.from(e.$binary,"base64")):typeof e.$binary!="string"&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,r=Ft.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,r=zc(e.$uuid)),!r)throw new se("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===Qy?new $f(r):new t(r,i)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},t.BSON_BINARY_SUBTYPE_DEFAULT=0,t.BUFFER_SIZE=256,t.SUBTYPE_DEFAULT=0,t.SUBTYPE_FUNCTION=1,t.SUBTYPE_BYTE_ARRAY=2,t.SUBTYPE_UUID_OLD=3,t.SUBTYPE_UUID=4,t.SUBTYPE_MD5=5,t.SUBTYPE_ENCRYPTED=6,t.SUBTYPE_COLUMN=7,t.SUBTYPE_USER_DEFINED=128,t}();Object.defineProperty(Ir.prototype,"_bsontype",{value:"Binary"});var vl=16,$f=function(t){Da(e,t);function e(n){var r=this,i,o;if(n==null)i=e.generate();else if(n instanceof e)i=Ft.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&n.byteLength===vl)i=Vs(n);else if(typeof n=="string")i=zc(n);else throw new se("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");return r=t.call(this,i,Qy)||this,r.__id=o,r}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(n){this.buffer=n,e.cacheHexString&&(this.__id=Hf(n))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(n){if(n===void 0&&(n=!0),e.cacheHexString&&this.__id)return this.__id;var r=Hf(this.id,n);return e.cacheHexString&&(this.__id=r),r},e.prototype.toString=function(n){return n?this.id.toString(n):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(n){if(!n)return!1;if(n instanceof e)return n.id.equals(this.id);try{return new e(n).id.equals(this.id)}catch{return!1}},e.prototype.toBinary=function(){return new Ir(this.id,Ir.SUBTYPE_UUID)},e.generate=function(){var n=Ky(vl);return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Ft.from(n)},e.isValid=function(n){return n?n instanceof e?!0:typeof n=="string"?Jy(n):Oh(n)?n.length!==vl?!1:(n[6]&240)===64&&(n[8]&128)===128:!1:!1},e.createFromHexString=function(n){var r=zc(n);return new e(r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},e}(Ir),ka=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);this.code=e,this.scope=n}return t.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},t.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},t.fromExtendedJSON=function(e){return new t(e.$code,e.$scope)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},t}();Object.defineProperty(ka.prototype,"_bsontype",{value:"Code"});function $N(t){return ko(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var co=function(){function t(e,n,r,i){if(!(this instanceof t))return new t(e,n,r,i);var o=e.split(".");o.length===2&&(r=o.shift(),e=o.shift()),this.collection=e,this.oid=n,this.db=r,this.fields=i||{}}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(e.$db=this.db),e},t.prototype.toExtendedJSON=function(e){e=e||{};var n={$ref:this.collection,$id:this.oid};return e.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n},t.fromExtendedJSON=function(e){var n=Object.assign({},e);return delete n.$ref,delete n.$id,delete n.$db,new t(e.$ref,e.$id,e.$db,n)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},t}();Object.defineProperty(co.prototype,"_bsontype",{value:"DBRef"});var Xe=void 0;try{Xe=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}var zf=65536,zN=1<<24,ei=zf*zf,Xy=ei*ei,qf=Xy/2,Wf={},Gf={},X=function(){function t(e,n,r){if(e===void 0&&(e=0),!(this instanceof t))return new t(e,n,r);typeof e=="bigint"?Object.assign(this,t.fromBigInt(e,!!n)):typeof e=="string"?Object.assign(this,t.fromString(e,!!n)):(this.low=e|0,this.high=n|0,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return t.fromBits=function(e,n,r){return new t(e,n,r)},t.fromInt=function(e,n){var r,i,o;return n?(e>>>=0,(o=0<=e&&e<256)&&(i=Gf[e],i)?i:(r=t.fromBits(e,(e|0)<0?-1:0,!0),o&&(Gf[e]=r),r)):(e|=0,(o=-128<=e&&e<128)&&(i=Wf[e],i)?i:(r=t.fromBits(e,e<0?-1:0,!1),o&&(Wf[e]=r),r))},t.fromNumber=function(e,n){if(isNaN(e))return n?t.UZERO:t.ZERO;if(n){if(e<0)return t.UZERO;if(e>=Xy)return t.MAX_UNSIGNED_VALUE}else{if(e<=-qf)return t.MIN_VALUE;if(e+1>=qf)return t.MAX_VALUE}return e<0?t.fromNumber(-e,n).neg():t.fromBits(e%ei|0,e/ei|0,n)},t.fromBigInt=function(e,n){return t.fromString(e.toString(),n)},t.fromString=function(e,n,r){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t.ZERO;if(typeof n=="number"?(r=n,n=!1):n=!!n,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return t.fromString(e.substring(1),n,r).neg();for(var o=t.fromNumber(Math.pow(r,8)),s=t.ZERO,a=0;a<e.length;a+=8){var l=Math.min(8,e.length-a),u=parseInt(e.substring(a,a+l),r);if(l<8){var d=t.fromNumber(Math.pow(r,l));s=s.mul(d).add(t.fromNumber(u))}else s=s.mul(o),s=s.add(t.fromNumber(u))}return s.unsigned=n,s},t.fromBytes=function(e,n,r){return r?t.fromBytesLE(e,n):t.fromBytesBE(e,n)},t.fromBytesLE=function(e,n){return new t(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)},t.fromBytesBE=function(e,n){return new t(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)},t.isLong=function(e){return ko(e)&&e.__isLong__===!0},t.fromValue=function(e,n){return typeof e=="number"?t.fromNumber(e,n):typeof e=="string"?t.fromString(e,n):t.fromBits(e.low,e.high,typeof n=="boolean"?n:e.unsigned)},t.prototype.add=function(e){t.isLong(e)||(e=t.fromValue(e));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,o=this.low&65535,s=e.high>>>16,a=e.high&65535,l=e.low>>>16,u=e.low&65535,d=0,f=0,p=0,g=0;return g+=o+u,p+=g>>>16,g&=65535,p+=i+l,f+=p>>>16,p&=65535,f+=r+a,d+=f>>>16,f&=65535,d+=n+s,d&=65535,t.fromBits(p<<16|g,d<<16|f,this.unsigned)},t.prototype.and=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low&e.low,this.high&e.high,this.unsigned)},t.prototype.compare=function(e){if(t.isLong(e)||(e=t.fromValue(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},t.prototype.comp=function(e){return this.compare(e)},t.prototype.divide=function(e){if(t.isLong(e)||(e=t.fromValue(e)),e.isZero())throw Error("division by zero");if(Xe){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var n=(this.unsigned?Xe.div_u:Xe.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Xe.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var r,i,o;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;o=t.UZERO}else{if(this.eq(t.MIN_VALUE)){if(e.eq(t.ONE)||e.eq(t.NEG_ONE))return t.MIN_VALUE;if(e.eq(t.MIN_VALUE))return t.ONE;var s=this.shr(1);return r=s.div(e).shl(1),r.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(i=this.sub(e.mul(r)),o=r.add(i.div(e)),o)}else if(e.eq(t.MIN_VALUE))return this.unsigned?t.UZERO:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=t.ZERO}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),l=a<=48?1:Math.pow(2,a-48),u=t.fromNumber(r),d=u.mul(e);d.isNegative()||d.gt(i);)r-=l,u=t.fromNumber(r,this.unsigned),d=u.mul(e);u.isZero()&&(u=t.ONE),o=o.add(u),i=i.sub(d)}return o},t.prototype.div=function(e){return this.divide(e)},t.prototype.equals=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low},t.prototype.eq=function(e){return this.equals(e)},t.prototype.getHighBits=function(){return this.high},t.prototype.getHighBitsUnsigned=function(){return this.high>>>0},t.prototype.getLowBits=function(){return this.low},t.prototype.getLowBitsUnsigned=function(){return this.low>>>0},t.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(t.MIN_VALUE)?64:this.neg().getNumBitsAbs();var e=this.high!==0?this.high:this.low,n;for(n=31;n>0&&(e&1<<n)===0;n--);return this.high!==0?n+33:n+1},t.prototype.greaterThan=function(e){return this.comp(e)>0},t.prototype.gt=function(e){return this.greaterThan(e)},t.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},t.prototype.gte=function(e){return this.greaterThanOrEqual(e)},t.prototype.ge=function(e){return this.greaterThanOrEqual(e)},t.prototype.isEven=function(){return(this.low&1)===0},t.prototype.isNegative=function(){return!this.unsigned&&this.high<0},t.prototype.isOdd=function(){return(this.low&1)===1},t.prototype.isPositive=function(){return this.unsigned||this.high>=0},t.prototype.isZero=function(){return this.high===0&&this.low===0},t.prototype.lessThan=function(e){return this.comp(e)<0},t.prototype.lt=function(e){return this.lessThan(e)},t.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},t.prototype.lte=function(e){return this.lessThanOrEqual(e)},t.prototype.modulo=function(e){if(t.isLong(e)||(e=t.fromValue(e)),Xe){var n=(this.unsigned?Xe.rem_u:Xe.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(n,Xe.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))},t.prototype.mod=function(e){return this.modulo(e)},t.prototype.rem=function(e){return this.modulo(e)},t.prototype.multiply=function(e){if(this.isZero())return t.ZERO;if(t.isLong(e)||(e=t.fromValue(e)),Xe){var n=Xe.mul(this.low,this.high,e.low,e.high);return t.fromBits(n,Xe.get_high(),this.unsigned)}if(e.isZero())return t.ZERO;if(this.eq(t.MIN_VALUE))return e.isOdd()?t.MIN_VALUE:t.ZERO;if(e.eq(t.MIN_VALUE))return this.isOdd()?t.MIN_VALUE:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(t.TWO_PWR_24)&&e.lt(t.TWO_PWR_24))return t.fromNumber(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,o=this.low>>>16,s=this.low&65535,a=e.high>>>16,l=e.high&65535,u=e.low>>>16,d=e.low&65535,f=0,p=0,g=0,m=0;return m+=s*d,g+=m>>>16,m&=65535,g+=o*d,p+=g>>>16,g&=65535,g+=s*u,p+=g>>>16,g&=65535,p+=i*d,f+=p>>>16,p&=65535,p+=o*u,f+=p>>>16,p&=65535,p+=s*l,f+=p>>>16,p&=65535,f+=r*d+i*u+o*l+s*a,f&=65535,t.fromBits(g<<16|m,f<<16|p,this.unsigned)},t.prototype.mul=function(e){return this.multiply(e)},t.prototype.negate=function(){return!this.unsigned&&this.eq(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)},t.prototype.neg=function(){return this.negate()},t.prototype.not=function(){return t.fromBits(~this.low,~this.high,this.unsigned)},t.prototype.notEquals=function(e){return!this.equals(e)},t.prototype.neq=function(e){return this.notEquals(e)},t.prototype.ne=function(e){return this.notEquals(e)},t.prototype.or=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low|e.low,this.high|e.high,this.unsigned)},t.prototype.shiftLeft=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):t.fromBits(0,this.low<<e-32,this.unsigned)},t.prototype.shl=function(e){return this.shiftLeft(e)},t.prototype.shiftRight=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):t.fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},t.prototype.shr=function(e){return this.shiftRight(e)},t.prototype.shiftRightUnsigned=function(e){if(t.isLong(e)&&(e=e.toInt()),e&=63,e===0)return this;var n=this.high;if(e<32){var r=this.low;return t.fromBits(r>>>e|n<<32-e,n>>>e,this.unsigned)}else return e===32?t.fromBits(n,0,this.unsigned):t.fromBits(n>>>e-32,0,this.unsigned)},t.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},t.prototype.shru=function(e){return this.shiftRightUnsigned(e)},t.prototype.subtract=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.add(e.neg())},t.prototype.sub=function(e){return this.subtract(e)},t.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},t.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*ei+(this.low>>>0):this.high*ei+(this.low>>>0)},t.prototype.toBigInt=function(){return BigInt(this.toString())},t.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},t.prototype.toBytesLE=function(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},t.prototype.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},t.prototype.toSigned=function(){return this.unsigned?t.fromBits(this.low,this.high,!1):this},t.prototype.toString=function(e){if(e=e||10,e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(t.MIN_VALUE)){var n=t.fromNumber(e),r=this.div(n),i=r.mul(n).sub(this);return r.toString(e)+i.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var o=t.fromNumber(Math.pow(e,6),this.unsigned),s=this,a="";;){var l=s.div(o),u=s.sub(l.mul(o)).toInt()>>>0,d=u.toString(e);if(s=l,s.isZero())return d+a;for(;d.length<6;)d="0"+d;a=""+d+a}},t.prototype.toUnsigned=function(){return this.unsigned?this:t.fromBits(this.low,this.high,!0)},t.prototype.xor=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low^e.low,this.high^e.high,this.unsigned)},t.prototype.eqz=function(){return this.isZero()},t.prototype.le=function(e){return this.lessThanOrEqual(e)},t.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},t.fromExtendedJSON=function(e,n){var r=t.fromString(e.$numberLong);return n&&n.relaxed?r.toNumber():r},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},t.TWO_PWR_24=t.fromInt(zN),t.MAX_UNSIGNED_VALUE=t.fromBits(-1,-1,!0),t.ZERO=t.fromInt(0),t.UZERO=t.fromInt(0,!0),t.ONE=t.fromInt(1),t.UONE=t.fromInt(1,!0),t.NEG_ONE=t.fromInt(-1),t.MAX_VALUE=t.fromBits(-1,2147483647,!1),t.MIN_VALUE=t.fromBits(0,-2147483648,!1),t}();Object.defineProperty(X.prototype,"__isLong__",{value:!0});Object.defineProperty(X.prototype,"_bsontype",{value:"Long"});var qN=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,WN=/^(\+|-)?(Infinity|inf)$/i,GN=/^(\+|-)?NaN$/i,Di=6111,yl=-6176,Zf=6176,ZN=34,_l=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Yf=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Kf=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),YN=/^([-+])?(\d+)?$/,KN=31,Jf=16383,JN=30,QN=31;function Qf(t){return!isNaN(parseInt(t,10))}function XN(t){var e=X.fromNumber(1e9),n=X.fromNumber(0);if(!t.parts[0]&&!t.parts[1]&&!t.parts[2]&&!t.parts[3])return{quotient:t,rem:n};for(var r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new X(t.parts[r],0)),t.parts[r]=n.div(e).low,n=n.modulo(e);return{quotient:t,rem:n}}function tk(t,e){if(!t&&!e)return{high:X.fromNumber(0),low:X.fromNumber(0)};var n=t.shiftRightUnsigned(32),r=new X(t.getLowBits(),0),i=e.shiftRightUnsigned(32),o=new X(e.getLowBits(),0),s=n.multiply(i),a=n.multiply(o),l=r.multiply(i),u=r.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new X(a.getLowBits(),0).add(l).add(u.shiftRightUnsigned(32)),s=s.add(a.shiftRightUnsigned(32)),u=a.shiftLeft(32).add(new X(u.getLowBits(),0)),{high:s,low:u}}function ek(t,e){var n=t.high>>>0,r=e.high>>>0;if(n<r)return!0;if(n===r){var i=t.low>>>0,o=e.low>>>0;if(i<o)return!0}return!1}function Zr(t,e){throw new se('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var Rh=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(Oh(e)){if(e.byteLength!==16)throw new se("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new se("Decimal128 must take a Buffer or string")}return t.fromString=function(e){var n=!1,r=!1,i=!1,o=0,s=0,a=0,l=0,u=0,d=[0],f=0,p=0,g=0,m=0,b=0,I=0,A=new X(0,0),$=new X(0,0),j=0,k=0;if(e.length>=7e3)throw new se(""+e+" not a valid Decimal128 string");var G=e.match(qN),Pt=e.match(WN),Wt=e.match(GN);if(!G&&!Pt&&!Wt||e.length===0)throw new se(""+e+" not a valid Decimal128 string");if(G){var B=G[2],lt=G[4],nt=G[5],vt=G[6];lt&&vt===void 0&&Zr(e,"missing exponent power"),lt&&B===void 0&&Zr(e,"missing exponent base"),lt===void 0&&(nt||vt)&&Zr(e,"missing e before exponent")}if((e[k]==="+"||e[k]==="-")&&(n=e[k++]==="-"),!Qf(e[k])&&e[k]!=="."){if(e[k]==="i"||e[k]==="I")return new t(Ft.from(n?Yf:Kf));if(e[k]==="N")return new t(Ft.from(_l))}for(;Qf(e[k])||e[k]===".";){if(e[k]==="."){r&&Zr(e,"contains multiple periods"),r=!0,k=k+1;continue}f<34&&(e[k]!=="0"||i)&&(i||(u=s),i=!0,d[p++]=parseInt(e[k],10),f=f+1),i&&(a=a+1),r&&(l=l+1),s=s+1,k=k+1}if(r&&!s)throw new se(""+e+" not a valid Decimal128 string");if(e[k]==="e"||e[k]==="E"){var Vt=e.substr(++k).match(YN);if(!Vt||!Vt[2])return new t(Ft.from(_l));b=parseInt(Vt[0],10),k=k+Vt[0].length}if(e[k])return new t(Ft.from(_l));if(g=0,!f)g=0,m=0,d[0]=0,a=1,f=1,o=0;else if(m=f-1,o=a,o!==1)for(;d[u+o-1]===0;)o=o-1;for(b<=l&&l-b>16384?b=yl:b=b-l;b>Di;){if(m=m+1,m-g>ZN){var Ut=d.join("");if(Ut.match(/^0+$/)){b=Di;break}Zr(e,"overflow")}b=b-1}for(;b<yl||f<a;){if(m===0&&o<f){b=yl,o=0;break}if(f<a?a=a-1:m=m-1,b<Di)b=b+1;else{var Ut=d.join("");if(Ut.match(/^0+$/)){b=Di;break}Zr(e,"overflow")}}if(m-g+1<o){var _=s;r&&(u=u+1,_=_+1),n&&(u=u+1,_=_+1);var re=parseInt(e[u+m+1],10),te=0;if(re>=5&&(te=1,re===5)){for(te=d[m]%2===1?1:0,I=u+m+2;I<_;I++)if(parseInt(e[I],10)){te=1;break}}if(te){for(var Tt=m;Tt>=0;Tt--)if(++d[Tt]>9&&(d[Tt]=0,Tt===0))if(b<Di)b=b+1,d[Tt]=1;else return new t(Ft.from(n?Yf:Kf))}}if(A=X.fromNumber(0),$=X.fromNumber(0),o===0)A=X.fromNumber(0),$=X.fromNumber(0);else if(m-g<17){var Tt=g;for($=X.fromNumber(d[Tt++]),A=new X(0,0);Tt<=m;Tt++)$=$.multiply(X.fromNumber(10)),$=$.add(X.fromNumber(d[Tt]))}else{var Tt=g;for(A=X.fromNumber(d[Tt++]);Tt<=m-17;Tt++)A=A.multiply(X.fromNumber(10)),A=A.add(X.fromNumber(d[Tt]));for($=X.fromNumber(d[Tt++]);Tt<=m;Tt++)$=$.multiply(X.fromNumber(10)),$=$.add(X.fromNumber(d[Tt]))}var le=tk(A,X.fromString("100000000000000000"));le.low=le.low.add($),ek(le.low,$)&&(le.high=le.high.add(X.fromNumber(1))),j=b+Zf;var ft={low:X.fromNumber(0),high:X.fromNumber(0)};le.high.shiftRightUnsigned(49).and(X.fromNumber(1)).equals(X.fromNumber(1))?(ft.high=ft.high.or(X.fromNumber(3).shiftLeft(61)),ft.high=ft.high.or(X.fromNumber(j).and(X.fromNumber(16383).shiftLeft(47))),ft.high=ft.high.or(le.high.and(X.fromNumber(0x7fffffffffff)))):(ft.high=ft.high.or(X.fromNumber(j&16383).shiftLeft(49)),ft.high=ft.high.or(le.high.and(X.fromNumber(562949953421311)))),ft.low=le.low,n&&(ft.high=ft.high.or(X.fromString("9223372036854775808")));var C=Ft.alloc(16);return k=0,C[k++]=ft.low.low&255,C[k++]=ft.low.low>>8&255,C[k++]=ft.low.low>>16&255,C[k++]=ft.low.low>>24&255,C[k++]=ft.low.high&255,C[k++]=ft.low.high>>8&255,C[k++]=ft.low.high>>16&255,C[k++]=ft.low.high>>24&255,C[k++]=ft.high.low&255,C[k++]=ft.high.low>>8&255,C[k++]=ft.high.low>>16&255,C[k++]=ft.high.low>>24&255,C[k++]=ft.high.high&255,C[k++]=ft.high.high>>8&255,C[k++]=ft.high.high>>16&255,C[k++]=ft.high.high>>24&255,new t(C)},t.prototype.toString=function(){for(var e,n=0,r=new Array(36),i=0;i<r.length;i++)r[i]=0;var o=0,s=!1,a,l={parts:[0,0,0,0]},u,d,f=[];o=0;var p=this.bytes,g=p[o++]|p[o++]<<8|p[o++]<<16|p[o++]<<24,m=p[o++]|p[o++]<<8|p[o++]<<16|p[o++]<<24,b=p[o++]|p[o++]<<8|p[o++]<<16|p[o++]<<24,I=p[o++]|p[o++]<<8|p[o++]<<16|p[o++]<<24;o=0;var A={low:new X(g,m),high:new X(b,I)};A.high.lessThan(X.ZERO)&&f.push("-");var $=I>>26&KN;if($>>3===3){if($===JN)return f.join("")+"Infinity";if($===QN)return"NaN";e=I>>15&Jf,a=8+(I>>14&1)}else a=I>>14&7,e=I>>17&Jf;var j=e-Zf;if(l.parts[0]=(I&16383)+((a&15)<<14),l.parts[1]=b,l.parts[2]=m,l.parts[3]=g,l.parts[0]===0&&l.parts[1]===0&&l.parts[2]===0&&l.parts[3]===0)s=!0;else for(d=3;d>=0;d--){var k=0,G=XN(l);if(l=G.quotient,k=G.rem.low,!!k)for(u=8;u>=0;u--)r[d*9+u]=k%10,k=Math.floor(k/10)}if(s)n=1,r[o]=0;else for(n=36;!r[o];)n=n-1,o=o+1;var Pt=n-1+j;if(Pt>=34||Pt<=-7||j>0){if(n>34)return f.push("".concat(0)),j>0?f.push("E+".concat(j)):j<0&&f.push("E".concat(j)),f.join("");f.push("".concat(r[o++])),n=n-1,n&&f.push(".");for(var i=0;i<n;i++)f.push("".concat(r[o++]));f.push("E"),Pt>0?f.push("+".concat(Pt)):f.push("".concat(Pt))}else if(j>=0)for(var i=0;i<n;i++)f.push("".concat(r[o++]));else{var Wt=n+j;if(Wt>0)for(var i=0;i<Wt;i++)f.push("".concat(r[o++]));else f.push("0");for(f.push(".");Wt++<0;)f.push("0");for(var i=0;i<n-Math.max(Wt-1,0);i++)f.push("".concat(r[o++]))}return f.join("")},t.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},t.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},t.fromExtendedJSON=function(e){return t.fromString(e.$numberDecimal)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},t}();Object.defineProperty(Rh.prototype,"_bsontype",{value:"Decimal128"});var Aa=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e}return t.prototype.valueOf=function(){return this.value},t.prototype.toJSON=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},t.fromExtendedJSON=function(e,n){var r=parseFloat(e.$numberDouble);return n&&n.relaxed?r:new t(r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},t}();Object.defineProperty(Aa.prototype,"_bsontype",{value:"Double"});var Pa=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e|0}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},t.fromExtendedJSON=function(e,n){return n&&n.relaxed?parseInt(e.$numberInt,10):new t(e.$numberInt)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},t}();Object.defineProperty(Pa.prototype,"_bsontype",{value:"Int32"});var Dh=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$maxKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MaxKey()"},t}();Object.defineProperty(Dh.prototype,"_bsontype",{value:"MaxKey"});var Nh=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$minKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MinKey()"},t}();Object.defineProperty(Nh.prototype,"_bsontype",{value:"MinKey"});var nk=new RegExp("^[0-9a-fA-F]{24}$"),fr=null,En=Symbol("id"),Ue=function(){function t(e){if(!(this instanceof t))return new t(e);var n;if(typeof e=="object"&&e&&"id"in e){if(typeof e.id!="string"&&!ArrayBuffer.isView(e.id))throw new se("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?n=Ft.from(e.toHexString(),"hex"):n=e.id}else n=e;if(n==null||typeof n=="number")this[En]=t.generate(typeof n=="number"?n:void 0);else if(ArrayBuffer.isView(n)&&n.byteLength===12)this[En]=n instanceof Ft?n:Vs(n);else if(typeof n=="string")if(n.length===12){var r=Ft.from(n);if(r.byteLength===12)this[En]=r;else throw new se("Argument passed in must be a string of 12 bytes")}else if(n.length===24&&nk.test(n))this[En]=Ft.from(n,"hex");else throw new se("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new se("Argument passed in does not match the accepted types");t.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(t.prototype,"id",{get:function(){return this[En]},set:function(e){this[En]=e,t.cacheHexString&&(this.__id=e.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(){if(t.cacheHexString&&this.__id)return this.__id;var e=this.id.toString("hex");return t.cacheHexString&&!this.__id&&(this.__id=e),e},t.getInc=function(){return t.index=(t.index+1)%16777215},t.generate=function(e){typeof e!="number"&&(e=Math.floor(Date.now()/1e3));var n=t.getInc(),r=Ft.alloc(12);return r.writeUInt32BE(e,0),fr===null&&(fr=Ky(5)),r[4]=fr[0],r[5]=fr[1],r[6]=fr[2],r[7]=fr[3],r[8]=fr[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(e==null)return!1;if(e instanceof t)return this[En][11]===e[En][11]&&this[En].equals(e[En]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&Oh(this.id))return e===Ft.prototype.toString.call(this.id,"latin1");if(typeof e=="string"&&t.isValid(e)&&e.length===24)return e.toLowerCase()===this.toHexString();if(typeof e=="string"&&t.isValid(e)&&e.length===12)return Ft.from(e).equals(this.id);if(typeof e=="object"&&"toHexString"in e&&typeof e.toHexString=="function"){var n=e.toHexString(),r=this.toHexString().toLowerCase();return typeof n=="string"&&n.toLowerCase()===r}return!1},t.prototype.getTimestamp=function(){var e=new Date,n=this.id.readUInt32BE(0);return e.setTime(Math.floor(n)*1e3),e},t.createPk=function(){return new t},t.createFromTime=function(e){var n=Ft.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(e,0),new t(n)},t.createFromHexString=function(e){if(typeof e>"u"||e!=null&&e.length!==24)throw new se("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(Ft.from(e,"hex"))},t.isValid=function(e){if(e==null)return!1;try{return new t(e),!0}catch{return!1}},t.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},t.fromExtendedJSON=function(e){return new t(e.$oid)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},t.index=Math.floor(Math.random()*16777215),t}();Object.defineProperty(Ue.prototype,"generate",{value:Na(function(t){return Ue.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Ue.prototype,"getInc",{value:Na(function(){return Ue.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Ue.prototype,"get_inc",{value:Na(function(){return Ue.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Ue,"get_inc",{value:Na(function(){return Ue.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Ue.prototype,"_bsontype",{value:"ObjectID"});function rk(t){return t.split("").sort().join("")}var uo=function(){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this.pattern=e,this.options=rk(n??""),this.pattern.indexOf("\0")!==-1)throw new Sr("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new Sr("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r<this.options.length;r++)if(!(this.options[r]==="i"||this.options[r]==="m"||this.options[r]==="x"||this.options[r]==="l"||this.options[r]==="s"||this.options[r]==="u"))throw new Sr("The regular expression option [".concat(this.options[r],"] is not supported"))}return t.parseOptions=function(e){return e?e.split("").sort().join(""):""},t.prototype.toExtendedJSON=function(e){return e=e||{},e.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},t.fromExtendedJSON=function(e){if("$regex"in e)if(typeof e.$regex!="string"){if(e.$regex._bsontype==="BSONRegExp")return e}else return new t(e.$regex,t.parseOptions(e.$options));if("$regularExpression"in e)return new t(e.$regularExpression.pattern,t.parseOptions(e.$regularExpression.options));throw new se("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(uo.prototype,"_bsontype",{value:"BSONRegExp"});var kh=function(){function t(e){if(!(this instanceof t))return new t(e);this.value=e}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(){return this.value},t.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(){return{$symbol:this.value}},t.fromExtendedJSON=function(e){return new t(e.$symbol)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t}();Object.defineProperty(kh.prototype,"_bsontype",{value:"Symbol"});var ik=X,t_=function(t){Da(e,t);function e(n,r){var i=this;return i instanceof e?(X.isLong(n)?i=t.call(this,n.low,n.high,!0)||this:ko(n)&&typeof n.t<"u"&&typeof n.i<"u"?i=t.call(this,n.i,n.t,!0)||this:i=t.call(this,n,r,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new e(n,r)}return e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(n){return new e(X.fromInt(n,!0))},e.fromNumber=function(n){return new e(X.fromNumber(n,!0))},e.fromBits=function(n,r){return new e(n,r)},e.fromString=function(n,r){return new e(X.fromString(n,!0,r))},e.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},e.fromExtendedJSON=function(n){return new e(n.$timestamp)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},e.MAX_VALUE=X.MAX_UNSIGNED_VALUE,e}(ik);function ok(t){return ko(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var e_=2147483647,n_=-2147483648,r_=9223372036854776e3,i_=-9223372036854776e3,sk={$oid:Ue,$binary:Ir,$uuid:Ir,$symbol:kh,$numberInt:Pa,$numberDecimal:Rh,$numberDouble:Aa,$numberLong:X,$minKey:Nh,$maxKey:Dh,$regex:uo,$regularExpression:uo,$timestamp:t_};function o_(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=n_&&t<=e_)return new Pa(t);if(t>=i_&&t<=r_)return X.fromNumber(t)}return new Aa(t)}if(t==null||typeof t!="object")return t;if(t.$undefined)return null;for(var n=Object.keys(t).filter(function(f){return f.startsWith("$")&&t[f]!=null}),r=0;r<n.length;r++){var i=sk[n[r]];if(i)return i.fromExtendedJSON(t,e)}if(t.$date!=null){var o=t.$date,s=new Date;return e.legacy?typeof o=="number"?s.setTime(o):typeof o=="string"&&s.setTime(Date.parse(o)):typeof o=="string"?s.setTime(Date.parse(o)):X.isLong(o)?s.setTime(o.toNumber()):typeof o=="number"&&e.relaxed&&s.setTime(o),s}if(t.$code!=null){var a=Object.assign({},t);return t.$scope&&(a.$scope=o_(t.$scope)),ka.fromExtendedJSON(t)}if($N(t)||t.$dbPointer){var l=t.$ref?t:t.$dbPointer;if(l instanceof co)return l;var u=Object.keys(l).filter(function(f){return f.startsWith("$")}),d=!0;if(u.forEach(function(f){["$ref","$id","$db"].indexOf(f)===-1&&(d=!1)}),d)return co.fromExtendedJSON(l)}return t}function ak(t,e){return t.map(function(n,r){e.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return Qn(n,e)}finally{e.seenObjects.pop()}})}function Xf(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function Qn(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var n=e.seenObjects.findIndex(function(A){return A.obj===t});if(n!==-1){var r=e.seenObjects.map(function(A){return A.propertyName}),i=r.slice(0,n).map(function(A){return"".concat(A," -> ")}).join(""),o=r[n],s=" -> "+r.slice(n+1,r.length-1).map(function(A){return"".concat(A," -> ")}).join(""),a=r[r.length-1],l=" ".repeat(i.length+o.length/2),u="-".repeat(s.length+(o.length+a.length)/2-1);throw new se(`Converting circular structure to EJSON:
|
|
27
|
+
`+" ".concat(i).concat(o).concat(s).concat(a,`
|
|
28
|
+
`)+" ".concat(l,"\\").concat(u,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return ak(t,e);if(t===void 0)return null;if(t instanceof Date||BN(t)){var d=t.getTime(),f=d>-1&&d<2534023188e5;return e.legacy?e.relaxed&&f?{$date:t.getTime()}:{$date:Xf(t)}:e.relaxed&&f?{$date:Xf(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var p=t>=n_&&t<=e_,g=t>=i_&&t<=r_;if(p)return{$numberInt:t.toString()};if(g)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||VN(t)){var m=t.flags;if(m===void 0){var b=t.toString().match(/[gimuy]*$/);b&&(m=b[0])}var I=new uo(t.source,m);return I.toExtendedJSON(e)}return t!=null&&typeof t=="object"?ck(t,e):t}var lk={Binary:function(t){return new Ir(t.value(),t.sub_type)},Code:function(t){return new ka(t.code,t.scope)},DBRef:function(t){return new co(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new Rh(t.bytes)},Double:function(t){return new Aa(t.value)},Int32:function(t){return new Pa(t.value)},Long:function(t){return X.fromBits(t.low!=null?t.low:t.low_,t.low!=null?t.high:t.high_,t.low!=null?t.unsigned:t.unsigned_)},MaxKey:function(){return new Dh},MinKey:function(){return new Nh},ObjectID:function(t){return new Ue(t)},ObjectId:function(t){return new Ue(t)},BSONRegExp:function(t){return new uo(t.pattern,t.options)},Symbol:function(t){return new kh(t.value)},Timestamp:function(t){return t_.fromBits(t.low,t.high)}};function ck(t,e){if(t==null||typeof t!="object")throw new Sr("not an object instance");var n=t._bsontype;if(typeof n>"u"){var r={};for(var i in t){e.seenObjects.push({propertyName:i,obj:null});try{var o=Qn(t[i],e);i==="__proto__"?Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):r[i]=o}finally{e.seenObjects.pop()}}return r}else if(ok(t)){var s=t;if(typeof s.toExtendedJSON!="function"){var a=lk[t._bsontype];if(!a)throw new se("Unrecognized or invalid _bsontype: "+t._bsontype);s=a(s)}return n==="Code"&&s.scope?s=new ka(s.code,Qn(s.scope,e)):n==="DBRef"&&s.oid&&(s=new co(Qn(s.collection,e),Qn(s.oid,e),Qn(s.db,e),Qn(s.fields,e))),s.toExtendedJSON(e)}else throw new Sr("_bsontype must be a string, but was: "+typeof n)}var tp;(function(t){function e(o,s){var a=Object.assign({},{relaxed:!0,legacy:!1},s);return typeof a.relaxed=="boolean"&&(a.strict=!a.relaxed),typeof a.strict=="boolean"&&(a.relaxed=!a.strict),JSON.parse(o,function(l,u){if(l.indexOf("\0")!==-1)throw new Sr("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(l)));return o_(u,a)})}t.parse=e;function n(o,s,a,l){a!=null&&typeof a=="object"&&(l=a,a=0),s!=null&&typeof s=="object"&&!Array.isArray(s)&&(l=s,s=void 0,a=0);var u=Object.assign({relaxed:!0,legacy:!1},l,{seenObjects:[{propertyName:"(root)",obj:null}]}),d=Qn(o,u);return JSON.stringify(d,s,a)}t.stringify=n;function r(o,s){return s=s||{},JSON.parse(n(o,s))}t.serialize=r;function i(o,s){return s=s||{},e(JSON.stringify(o),s)}t.deserialize=i})(tp||(tp={}));var ep,np=Yy();np.Map?ep=np.Map:ep=function(){function t(e){e===void 0&&(e=[]),this._keys=[],this._values={};for(var n=0;n<e.length;n++)if(e[n]!=null){var r=e[n],i=r[0],o=r[1];this._keys.push(i),this._values[i]={v:o,i:this._keys.length-1}}}return t.prototype.clear=function(){this._keys=[],this._values={}},t.prototype.delete=function(e){var n=this._values[e];return n==null?!1:(delete this._values[e],this._keys.splice(n.i,1),!0)},t.prototype.entries=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?[r,e._values[r].v]:void 0,done:r===void 0}}}},t.prototype.forEach=function(e,n){n=n||this;for(var r=0;r<this._keys.length;r++){var i=this._keys[r];e.call(n,this._values[i].v,i,n)}},t.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},t.prototype.has=function(e){return this._values[e]!=null},t.prototype.keys=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?r:void 0,done:r===void 0}}}},t.prototype.set=function(e,n){return this._values[e]?(this._values[e].v=n,this):(this._keys.push(e),this._values[e]={v:n,i:this._keys.length-1},this)},t.prototype.values=function(){var e=this,n=0;return{next:function(){var r=e._keys[n++];return{value:r!==void 0?e._values[r].v:void 0,done:r===void 0}}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),t}();var QP=X.fromNumber(UN),XP=X.fromNumber(HN),bl=new Uint8Array(8),tL=new DataView(bl.buffer,bl.byteOffset,bl.byteLength),uk=1024*1024*17,eL=Ft.alloc(uk),hk=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(t){t=t||{},this.triggerID=t.id||t.triggerID,this.nudgeID=t.nudgeID,this.shortID=t.shortID,this.contentType=t.contentType,this.engagementID=t.engagementID,this.contentID=t.contentID,this.variation=t.variation,this.props=t.props,this.objective=t.objective,this.onsiteDeliveryType=t.onsiteDeliveryType,this.holdout=t.holdout}},wl=class{constructor(t,e={},n,r){this.name=t,this.properties=e,this.id=r?new Ue(r):new Ue,this.occurred=new Date,n&&(this.trigger=new hk(n)),this.newEvent=!r}trigger;items;videos;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber;locale},$i=class{static SWIPER_CSS="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css";static injectScriptURL(t,e){if(!t)return;let n=document.createElement("script");n.id=e??"",n.src=t,so.mode==="local"&&(n.type="module"),document.head.appendChild(n)}static injectRawScript(t){if(!t)return;let e=document.createElement("script");e.id="cooee-app-script",e.innerHTML=t,document.head.appendChild(e)}static injectRawCSS(t,e=document.head){if(!t)return;let n=document.createElement("style");n.textContent=t,e.appendChild(n)}static injectSwiperCSS(t=document.head){this.injectStylesheet(this.SWIPER_CSS,t)}static injectStylesheet(t,e=document.head){if(!t)return;let n=document.createElement("link");n.rel="stylesheet",n.href=t,t===this.SWIPER_CSS&&(n.crossOrigin="anonymous",n.onload=r=>{let i=r.currentTarget?.sheet?.cssRules;if(i){for(let o of i)if(o.type==CSSRule.FONT_FACE_RULE){let s=t.split("/"),a=s.slice(0,s.length-1).join("/"),l=o.cssText;l=l.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${a}/$4")`);let u=document.createElement("style");u.appendChild(document.createTextNode(l)),document.head.appendChild(u)}}}),e.appendChild(n)}static loadSwiperScript(){let t="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js";return new Promise(e=>{if(window.Swiper){e();return}if(Array.from(document.scripts).some(r=>r.src.includes(t))){let r=setInterval(()=>{window.Swiper&&(clearInterval(r),e())},50)}let n=document.createElement("script");n.src=t,n.onload=()=>{e()},n.onerror=()=>{n.remove()},document.body.appendChild(n)})}},Ah=class{static getBestSources(t){if(!t)return[];let e=[],n=t.filter(i=>i.format==="mp4").sort((i,o)=>o.width-i.width)[0];n&&e.push(n);let r=t.filter(i=>i.format==="m3u8").sort((i,o)=>o.width-i.width)[0];return r&&e.push(r),e}};function dk(t,e){t&1&&(ar(),jt(0,"path",3))}function fk(t,e){t&1&&(ar(),jt(0,"path",4))}var s_=class qc{muted;videoEl;toggled=new ee;toggleMute(e){e.stopPropagation(),e.preventDefault(),this.muted=!this.muted,this.videoEl.muted=this.muted,this.toggled.emit(),this.muted||this.videoEl.play()}static \u0275fac=function(e){return new(e||qc)};static \u0275cmp=je({type:qc,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted",videoEl:"videoEl"},outputs:{toggled:"toggled"},decls:5,vars:1,consts:[["type","button",1,"lc:bg-black/50",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M4.34 2.93L2.93 4.34 7.29 8.7 7 9H3v6h4l5 5v-6.59l4.18 4.18c-.65.49-1.38.88-2.18 1.11v2.06c1.34-.3 2.57-.92 3.61-1.75l2.05 2.05 1.41-1.41L4.34 2.93zM10 15.17L7.83 13H5v-2h2.83l.88-.88L10 11.41v3.76zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zm-7-8l-1.88 1.88L12 7.76zm4.5 8c0-1.77-1.02-3.29-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24z"],["d","M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-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.77 0-4.28-2.99-7.86-7-8.77z"]],template:function(e,n){e&1&&(Y(0,"button",0),ue("click",function(r){return n.toggleMute(r)}),ar(),Y(1,"svg",1),jt(2,"path",2),pe(3,dk,1,0,":svg:path",3)(4,fk,1,0,":svg:path",4),K()()),e&2&&(z(3),ve(n.muted?3:4))},styles:["button[_ngcontent-%COMP%]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border:none;cursor:pointer;border-radius:100%}"]})},El;function pk(){if(El==null){let t=typeof document<"u"?document.head:null;El=!!(t&&(t.createShadowRoot||t.attachShadow))}return El}function La(t){if(pk()){let e=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function xl(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}function mn(t){return t.composedPath?t.composedPath()[0]:t.target}function a_(t){return t.buttons===0||t.detail===0}function l_(t){let e=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!e&&e.identifier===-1&&(e.radiusX==null||e.radiusX===1)&&(e.radiusY==null||e.radiusY===1)}function gk(t,e=0){return mk(t)?Number(t):arguments.length===2?e:0}function mk(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function hn(t){return t instanceof He?t.nativeElement:t}function Fe(t,e,n,r,i){let o=parseInt(zd.major),s=parseInt(zd.minor);return o>19||o===19&&s>0||o===0&&s===0?t.listen(e,n,r,i):(e.addEventListener(n,r,i),()=>{e.removeEventListener(n,r,i)})}var Ko=new WeakMap,Ma=(()=>{class t{_appRef;_injector=N(Pe);_environmentInjector=N(Vn);load(n){let r=this._appRef=this._appRef||this._injector.get(lr),i=Ko.get(r);i||(i={loaders:new Set,refs:[]},Ko.set(r,i),r.onDestroy(()=>{Ko.get(r)?.refs.forEach(o=>o.destroy()),Ko.delete(r)})),i.loaders.has(n)||(i.loaders.add(n),i.refs.push(Xv(n,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Wc;try{Wc=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Wc=!1}var Gn=(()=>{class t{_platformId=N(sa);isBrowser=this._platformId?aT(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Wc)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),vk=new Et("cdk-dir-doc",{providedIn:"root",factory:yk});function yk(){return N(ne)}var _k=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function bk(t){let e=t?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?_k.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var Bs=(()=>{class t{value="ltr";change=new ee;constructor(){let n=N(vk,{optional:!0});if(n){let r=n.body?n.body.dir:null,i=n.documentElement?n.documentElement.dir:null;this.value=bk(r||i||"ltr")}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),pr;function wk(){if(pr==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return pr=!1,pr;if("scrollBehavior"in document.documentElement.style)pr=!0;else{let t=Element.prototype.scrollTo;t?pr=!/\{\s*\[native code\]\s*\}/.test(t.toString()):pr=!1}}return pr}var Ek=20,xk=(()=>{class t{_ngZone=N(Yt);_platform=N(Gn);_renderer=N(wn).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new dt;_scrolledCount=0;scrollContainers=new Map;register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let r=this.scrollContainers.get(n);r&&(r.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=Ek){return this._platform.isBrowser?new _e(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=n>0?this._scrolled.pipe(vg(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):fu()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((n,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(n,r){let i=this.getAncestorScrollContainers(n);return this.scrolled(r).pipe(pu(o=>!o||i.indexOf(o)>-1))}getAncestorScrollContainers(n){let r=[];return this.scrollContainers.forEach((i,o)=>{this._scrollableContainsElement(o,n)&&r.push(o)}),r}_scrollableContainsElement(n,r){let i=hn(r),o=n.getElementRef().nativeElement;do if(i==o)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Sk=20,Ph=(()=>{class t{_platform=N(Gn);_listeners;_viewportSize;_change=new dt;_document=N(ne,{optional:!0});constructor(){let n=N(Yt),r=N(wn).createRenderer(null,null);n.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=o=>this._change.next(o);this._listeners=[r.listen("window","resize",i),r.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(n=>n()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+i,right:n.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,r=this._getWindow(),i=n.documentElement,o=i.getBoundingClientRect(),s=-o.top||n.body.scrollTop||r.scrollY||i.scrollTop||0,a=-o.left||n.body.scrollLeft||r.scrollX||i.scrollLeft||0;return{top:s,left:a}}change(n=Sk){return n>0?this._change.pipe(vg(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Sl={},c_=(()=>{class t{_appId=N(Uu);getId(n){return this._appId!=="ng"&&(n+=this._appId),Sl.hasOwnProperty(n)||(Sl[n]=0),`${n}${Sl[n]++}`}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function u_(t){return Array.isArray(t)?t:[t]}function h_(t){let e=t.cloneNode(!0),n=e.querySelectorAll("[id]"),r=t.nodeName.toLowerCase();e.removeAttribute("id");for(let i=0;i<n.length;i++)n[i].removeAttribute("id");return r==="canvas"?op(t,e):(r==="input"||r==="select"||r==="textarea")&&ip(t,e),rp("canvas",t,e,op),rp("input, textarea, select",t,e,ip),e}function rp(t,e,n,r){let i=e.querySelectorAll(t);if(i.length){let o=n.querySelectorAll(t);for(let s=0;s<i.length;s++)r(i[s],o[s])}}var Ik=0;function ip(t,e){e.type!=="file"&&(e.value=t.value),e.type==="radio"&&e.name&&(e.name=`mat-clone-${e.name}-${Ik++}`)}function op(t,e){let n=e.getContext("2d");if(n)try{n.drawImage(t,0,0)}catch{}}function Lh(t){let e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function Gc(t,e,n){let{top:r,bottom:i,left:o,right:s}=t;return n>=r&&n<=i&&e>=o&&e<=s}function zi(t,e,n){t.top+=e,t.bottom=t.top+t.height,t.left+=n,t.right=t.left+t.width}function sp(t,e,n,r){let{top:i,right:o,bottom:s,left:a,width:l,height:u}=t,d=l*e,f=u*e;return r>i-f&&r<s+f&&n>a-d&&n<o+d}var d_=class{_document;positions=new Map;constructor(t){this._document=t}clear(){this.positions.clear()}cache(t){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),t.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:Lh(e)})})}handleScroll(t){let e=mn(t),n=this.positions.get(e);if(!n)return null;let r=n.scrollPosition,i,o;if(e===this._document){let l=this.getViewportScrollPosition();i=l.top,o=l.left}else i=e.scrollTop,o=e.scrollLeft;let s=r.top-i,a=r.left-o;return this.positions.forEach((l,u)=>{l.clientRect&&e!==u&&e.contains(u)&&zi(l.clientRect,s,a)}),r.top=i,r.left=o,{top:s,left:a}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function f_(t,e){let n=t.rootNodes;if(n.length===1&&n[0].nodeType===e.ELEMENT_NODE)return n[0];let r=e.createElement("div");return n.forEach(i=>r.appendChild(i)),r}function Mh(t,e,n){for(let r in e)if(e.hasOwnProperty(r)){let i=e[r];i?t.setProperty(r,i,n?.has(r)?"important":""):t.removeProperty(r)}return t}function Yr(t,e){let n=e?"":"none";Mh(t.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":n,"-ms-user-select":n,"-webkit-user-select":n,"-moz-user-select":n})}function ap(t,e,n){Mh(t.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},n)}function Fs(t,e){return e&&e!="none"?t+" "+e:t}function lp(t,e){t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.transform=Us(e.left,e.top)}function Us(t,e){return`translate3d(${Math.round(t)}px, ${Math.round(e)}px, 0)`}function cp(t){let e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function Ck(t){let e=getComputedStyle(t),n=Il(e,"transition-property"),r=n.find(a=>a==="transform"||a==="all");if(!r)return 0;let i=n.indexOf(r),o=Il(e,"transition-duration"),s=Il(e,"transition-delay");return cp(o[i])+cp(s[i])}function Il(t,e){return t.getPropertyValue(e).split(",").map(n=>n.trim())}var Tk=new Set(["position"]),Ok=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(t,e,n,r,i,o,s,a,l,u){this._document=t,this._rootElement=e,this._direction=n,this._initialDomRect=r,this._previewTemplate=i,this._previewClass=o,this._pickupPositionOnPage=s,this._initialTransform=a,this._zIndex=l,this._renderer=u}attach(t){this._preview=this._createPreview(),t.appendChild(this._preview),up(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(t){this._preview.style.transform=t}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(t){this._preview.classList.add(t)}getTransitionDuration(){return Ck(this._preview)}addEventListener(t,e){return this._renderer.listen(this._preview,t,e)}_createPreview(){let t=this._previewTemplate,e=this._previewClass,n=t?t.template:null,r;if(n&&t){let i=t.matchSize?this._initialDomRect:null,o=t.viewContainer.createEmbeddedView(n,t.context);o.detectChanges(),r=f_(o,this._document),this._previewEmbeddedView=o,t.matchSize?lp(r,i):r.style.transform=Us(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=h_(this._rootElement),lp(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return Mh(r.style,{"pointer-events":"none",margin:up(r)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Tk),Yr(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(i=>r.classList.add(i)):r.classList.add(e)),r}};function up(t){return"showPopover"in t}var Rk={passive:!0},hp={passive:!1},Dk={passive:!1,capture:!0},Nk=800,dp=new Set(["position"]),kk=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=ir(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new dt;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=ye.EMPTY;_pointerUpSubscription=ye.EMPTY;_scrollSubscription=ye.EMPTY;_resizeSubscription=ye.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(t){t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEach(e=>Yr(e,t)))}_disabled=!1;beforeStarted=new dt;started=new dt;released=new dt;ended=new dt;entered=new dt;exited=new dt;dropped=new dt;moved=this._moveEvents;data;constrainPosition;constructor(t,e,n,r,i,o,s){this._config=e,this._document=n,this._ngZone=r,this._viewportRuler=i,this._dragDropRegistry=o,this._renderer=s,this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new d_(n),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(n=>hn(n)),this._handles.forEach(n=>Yr(n,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&e.add(n)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){let e=hn(t);return e!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[Fe(this._renderer,e,"mousedown",this._pointerDown,hp),Fe(this._renderer,e,"touchstart",this._pointerDown,Rk),Fe(this._renderer,e,"dragstart",this._nativeDragStart,hp)]),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?hn(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),Yr(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),Yr(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){let t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){let t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=t=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(t);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,t)}else this.disabled||this._initializeDragSequence(this._rootElement,t)};_pointerMove=t=>{let e=this._getPointerPositionOnPage(t);if(!this._hasStartedDragging()){let r=Math.abs(e.x-this._pickupPositionOnPage.x),i=Math.abs(e.y-this._pickupPositionOnPage.y);if(r+i>=this._config.dragStartThreshold){let o=Date.now()>=this._dragStartTime+this._getDragStartDelay(t),s=this._dropContainer;if(!o){this._endDragSequence(t);return}(!s||!s.isDragging()&&!s.isReceiving())&&(t.cancelable&&t.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(t)))}return}t.cancelable&&t.preventDefault();let n=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(n),this._dropContainer)this._updateActiveDropContainer(n,e);else{let r=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,i=this._activeTransform;i.x=n.x-r.x+this._passiveTransform.x,i.y=n.y-r.y+this._passiveTransform.y,this._applyRootElementTransform(i.x,i.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:n,event:t,distance:this._getDragDistance(n),delta:this._pointerDirectionDelta})})};_pointerUp=t=>{this._endDragSequence(t)};_endDragSequence(t){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(t){Ni(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),n=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=Fe(this._renderer,e,"selectstart",Ak,Dk)}),n){let r=this._rootElement,i=r.parentNode,o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment("");i.insertBefore(s,r),this._initialTransform=r.style.transform||"",this._preview=new Ok(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(i,e)),ap(r,!1,dp),this._document.body.appendChild(i.replaceChild(o,r)),this.started.next({source:this,event:t}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();let n=this.isDragging(),r=Ni(e),i=!r&&e.button!==0,o=this._rootElement,s=mn(e),a=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+Nk>Date.now(),l=r?l_(e):a_(e);if(s&&s.draggable&&e.type==="mousedown"&&e.preventDefault(),n||i||a||l)return;if(this._handles.length){let f=o.style;this._rootElementTapHighlight=f.webkitTapHighlightColor||"",f.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(f=>this._updateOnScroll(f)),this._boundaryElement&&(this._boundaryRect=Lh(this._boundaryElement));let u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,t,e);let d=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:d.x,y:d.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){ap(this._rootElement,!0,dp),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,n=e.getItemIndex(this),r=this._getPointerPositionOnPage(t),i=this._getDragDistance(r),o=e._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:i,dropPoint:r,event:t}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:i,dropPoint:r,event:t}),e.drop(this,n,this._initialIndex,this._initialContainer,o,i,r,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:n,y:r}){let i=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!i&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(i=this._initialContainer),i&&i!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=i,this._dropContainer.enter(this,t,e,i===this._initialContainer&&i.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:i,currentIndex:i.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(t,e):this._applyPreviewTransform(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let t=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let r=s=>{(!s||this._preview&&mn(s)===this._preview.element&&s.propertyName==="transform")&&(o(),n(),clearTimeout(i))},i=setTimeout(r,e*1.5),o=this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){let t=this._placeholderTemplate,e=t?t.template:null,n;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),n=f_(this._placeholderRef,this._document)):n=h_(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(t,e,n){let r=e===this._rootElement?null:e,i=r?r.getBoundingClientRect():t,o=Ni(n)?n.targetTouches[0]:n,s=this._getViewportScrollPosition(),a=o.pageX-i.left-s.left,l=o.pageY-i.top-s.top;return{x:i.left-t.left+a,y:i.top-t.top+l}}_getPointerPositionOnPage(t){let e=this._getViewportScrollPosition(),n=Ni(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,r=n.pageX-e.left,i=n.pageY-e.top;if(this._ownerSVGElement){let o=this._ownerSVGElement.getScreenCTM();if(o){let s=this._ownerSVGElement.createSVGPoint();return s.x=r,s.y=i,s.matrixTransform(o.inverse())}}return{x:r,y:i}}_getConstrainedPointerPosition(t){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:r}=this.constrainPosition?this.constrainPosition(t,this,this._initialDomRect,this._pickupPositionInElement):t;if(this.lockAxis==="x"||e==="x"?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:i,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,s=this._boundaryRect,{width:a,height:l}=this._getPreviewRect(),u=s.top+o,d=s.bottom-(l-o),f=s.left+i,p=s.right-(a-i);n=fp(n,f,p),r=fp(r,u,d)}return{x:n,y:r}}_updatePointerDirectionDelta(t){let{x:e,y:n}=t,r=this._pointerDirectionDelta,i=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-i.x),s=Math.abs(n-i.y);return o>this._config.pointerDirectionChangeThreshold&&(r.x=e>i.x?1:-1,i.x=e),s>this._config.pointerDirectionChangeThreshold&&(r.y=n>i.y?1:-1,i.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,Yr(this._rootElement,t))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(t=>t()),this._rootElementCleanups=void 0}_applyRootElementTransform(t,e){let n=1/this.scale,r=Us(t*n,e*n),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=Fs(r,this._initialTransform)}_applyPreviewTransform(t,e){let n=this._previewTemplate?.template?void 0:this._initialTransform,r=Us(t,e);this._preview.setTransform(Fs(r,n))}_getDragDistance(t){let e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(t===0&&e===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(r.width===0&&r.height===0||n.width===0&&n.height===0)return;let i=r.left-n.left,o=n.right-r.right,s=r.top-n.top,a=n.bottom-r.bottom;r.width>n.width?(i>0&&(t+=i),o>0&&(t-=o)):t=0,r.height>n.height?(s>0&&(e+=s),a>0&&(e-=a)):e=0,(t!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){let e=this.dragStartDelay;return typeof e=="number"?e:Ni(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){let e=this._parentPositions.handleScroll(t);if(e){let n=mn(t);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&zi(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=La(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){let n=this._previewContainer||"global";if(n==="parent")return t;if(n==="global"){let r=this._document;return e||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return hn(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=t=>{if(this._handles.length){let e=this._getTargetHandle(t);e&&!this._disabledHandles.has(e)&&!this.disabled&&t.preventDefault()}else this.disabled||t.preventDefault()};_getTargetHandle(t){return this._handles.find(e=>t.target&&(t.target===e||e.contains(t.target)))}};function fp(t,e,n){return Math.max(e,Math.min(n,t))}function Ni(t){return t.type[0]==="t"}function Ak(t){t.preventDefault()}function p_(t,e,n){let r=pp(e,t.length-1),i=pp(n,t.length-1);if(r===i)return;let o=t[r],s=i<r?-1:1;for(let a=r;a!==i;a+=s)t[a]=t[a+s];t[i]=o}function pp(t,e){return Math.max(0,Math.min(e,t))}var gp=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(t){this._dragDropRegistry=t}_previousSwap={drag:null,delta:0,overlaps:!1};start(t){this.withItems(t)}sort(t,e,n,r){let i=this._itemPositions,o=this._getItemIndexFromPointerPosition(t,e,n,r);if(o===-1&&i.length>0)return null;let s=this.orientation==="horizontal",a=i.findIndex(b=>b.drag===t),l=i[o],u=i[a].clientRect,d=l.clientRect,f=a>o?1:-1,p=this._getItemOffsetPx(u,d,f),g=this._getSiblingOffsetPx(a,i,f),m=i.slice();return p_(i,a,o),i.forEach((b,I)=>{if(m[I]===b)return;let A=b.drag===t,$=A?p:g,j=A?t.getPlaceholderElement():b.drag.getRootElement();b.offset+=$;let k=Math.round(b.offset*(1/b.drag.scale));s?(j.style.transform=Fs(`translate3d(${k}px, 0, 0)`,b.initialTransform),zi(b.clientRect,0,$)):(j.style.transform=Fs(`translate3d(0, ${k}px, 0)`,b.initialTransform),zi(b.clientRect,$,0))}),this._previousSwap.overlaps=Gc(d,e,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=s?r.x:r.y,{previousIndex:a,currentIndex:o}}enter(t,e,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(t,e,n):r,o=this._activeDraggables,s=o.indexOf(t),a=t.getPlaceholderElement(),l=o[i];if(l===t&&(l=o[i+1]),!l&&(i==null||i===-1||i<o.length-1)&&this._shouldEnterAsFirstChild(e,n)&&(l=o[0]),s>-1&&o.splice(s,1),l&&!this._dragDropRegistry.isDragging(l)){let u=l.getRootElement();u.parentElement.insertBefore(a,u),o.splice(i,0,t)}else this._element.appendChild(a),o.push(t);a.style.transform="",this._cacheItemPositions()}withItems(t){this._activeDraggables=t.slice(),this._cacheItemPositions()}withSortPredicate(t){this._sortPredicate=t}reset(){this._activeDraggables?.forEach(t=>{let e=t.getRootElement();if(e){let n=this._itemPositions.find(r=>r.drag===t)?.initialTransform;e.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(t){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(e=>e.drag===t)}updateOnScroll(t,e){this._itemPositions.forEach(({clientRect:n})=>{zi(n,t,e)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(t){this._element=t}_cacheItemPositions(){let t=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let n=e.getVisibleElement();return{drag:e,offset:0,initialTransform:n.style.transform||"",clientRect:Lh(n)}}).sort((e,n)=>t?e.clientRect.left-n.clientRect.left:e.clientRect.top-n.clientRect.top)}_getItemOffsetPx(t,e,n){let r=this.orientation==="horizontal",i=r?e.left-t.left:e.top-t.top;return n===-1&&(i+=r?e.width-t.width:e.height-t.height),i}_getSiblingOffsetPx(t,e,n){let r=this.orientation==="horizontal",i=e[t].clientRect,o=e[t+n*-1],s=i[r?"width":"height"]*n;if(o){let a=r?"left":"top",l=r?"right":"bottom";n===-1?s-=o.clientRect[a]-i[l]:s+=i[a]-o.clientRect[l]}return s}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,r=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let i=n[n.length-1].clientRect;return r?t>=i.right:e>=i.bottom}else{let i=n[0].clientRect;return r?t<=i.left:e<=i.top}}_getItemIndexFromPointerPosition(t,e,n,r){let i=this.orientation==="horizontal",o=this._itemPositions.findIndex(({drag:s,clientRect:a})=>{if(s===t)return!1;if(r){let l=i?r.x:r.y;if(s===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return i?e>=Math.floor(a.left)&&e<Math.floor(a.right):n>=Math.floor(a.top)&&n<Math.floor(a.bottom)});return o===-1||!this._sortPredicate(o,t)?-1:o}},Pk=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(t,e){this._document=t,this._dragDropRegistry=e}start(t){let e=this._element.childNodes;this._relatedNodes=[];for(let n=0;n<e.length;n++){let r=e[n];this._relatedNodes.push([r,r.nextSibling])}this.withItems(t)}sort(t,e,n,r){let i=this._getItemIndexFromPointerPosition(t,e,n),o=this._previousSwap;if(i===-1||this._activeItems[i]===t)return null;let s=this._activeItems[i];if(o.drag===s&&o.overlaps&&o.deltaX===r.x&&o.deltaY===r.y)return null;let a=this.getItemIndex(t),l=t.getPlaceholderElement(),u=s.getRootElement();i>a?u.after(l):u.before(l),p_(this._activeItems,a,i);let d=this._getRootNode().elementFromPoint(e,n);return o.deltaX=r.x,o.deltaY=r.y,o.drag=s,o.overlaps=u===d||u.contains(d),{previousIndex:a,currentIndex:i}}enter(t,e,n,r){let i=r==null||r<0?this._getItemIndexFromPointerPosition(t,e,n):r;i===-1&&(i=this._getClosestItemIndexToPointer(t,e,n));let o=this._activeItems[i],s=this._activeItems.indexOf(t);s>-1&&this._activeItems.splice(s,1),o&&!this._dragDropRegistry.isDragging(o)?(this._activeItems.splice(i,0,t),o.getRootElement().before(t.getPlaceholderElement())):(this._activeItems.push(t),this._element.appendChild(t.getPlaceholderElement()))}withItems(t){this._activeItems=t.slice()}withSortPredicate(t){this._sortPredicate=t}reset(){let t=this._element,e=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){let[r,i]=this._relatedNodes[n];r.parentNode===t&&r.nextSibling!==i&&(i===null?t.appendChild(r):i.parentNode===t&&t.insertBefore(r,i))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(t){return this._activeItems.indexOf(t)}updateOnScroll(){this._activeItems.forEach(t=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(t){t!==this._element&&(this._element=t,this._rootNode=void 0)}_getItemIndexFromPointerPosition(t,e,n){let r=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(n)),i=r?this._activeItems.findIndex(o=>{let s=o.getRootElement();return r===s||s.contains(r)}):-1;return i===-1||!this._sortPredicate(i,t)?-1:i}_getRootNode(){return this._rootNode||(this._rootNode=La(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(t,e,n){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let r=1/0,i=-1;for(let o=0;o<this._activeItems.length;o++){let s=this._activeItems[o];if(s!==t){let{x:a,y:l}=s.getRootElement().getBoundingClientRect(),u=Math.hypot(e-a,n-l);u<r&&(r=u,i=o)}}return i}},mp=.05,g_=.05,nn=function(t){return t[t.NONE=0]="NONE",t[t.UP=1]="UP",t[t.DOWN=2]="DOWN",t}(nn||{}),ke=function(t){return t[t.NONE=0]="NONE",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t}(ke||{}),Lk=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new dt;entered=new dt;exited=new dt;dropped=new dt;sorted=new dt;receivingStarted=new dt;receivingStopped=new dt;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=ye.EMPTY;_verticalScrollDirection=nn.NONE;_horizontalScrollDirection=ke.NONE;_scrollNode;_stopScrollTimers=new dt;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(t,e,n,r,i){this._dragDropRegistry=e,this._ngZone=r,this._viewportRuler=i;let o=this.element=hn(t);this._document=n,this.withOrientation("vertical").withElementContainer(o),e.registerDropContainer(this),this._parentPositions=new d_(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(t,e,n,r){this._draggingStarted(),r==null&&this.sortingDisabled&&(r=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,n,r,i,o,s,a={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:i,distance:o,dropPoint:s,event:a})}withItems(t){let e=this._draggables;return this._draggables=t,t.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(e.filter(n=>n.isDragging()).every(n=>t.indexOf(n)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._direction=t,this._sortStrategy instanceof gp&&(this._sortStrategy.direction=t),this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){if(t==="mixed")this._sortStrategy=new Pk(this._document,this._dragDropRegistry);else{let e=new gp(this._dragDropRegistry);e.direction=this._direction,e.orientation=t,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,n)=>this.sortPredicate(e,n,this)),this}withScrollableParents(t){let e=this._container;return this._scrollableElements=t.indexOf(e)===-1?[e,...t]:t.slice(),this}withElementContainer(t){if(t===this._container)return this;let e=hn(this.element),n=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(t);return n>-1&&this._scrollableElements.splice(n,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(t),this._cachedShadowRoot=null,this._scrollableElements.unshift(t),this._container=t,this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?this._sortStrategy.getItemIndex(t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,n,r){if(this.sortingDisabled||!this._domRect||!sp(this._domRect,mp,e,n))return;let i=this._sortStrategy.sort(t,e,n,r);i&&this.sorted.next({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let n,r=nn.NONE,i=ke.NONE;if(this._parentPositions.positions.forEach((o,s)=>{s===this._document||!o.clientRect||n||sp(o.clientRect,mp,t,e)&&([r,i]=Mk(s,o.clientRect,this._direction,t,e),(r||i)&&(n=s))}),!r&&!i){let{width:o,height:s}=this._viewportRuler.getViewportSize(),a={width:o,height:s,top:0,right:o,bottom:s,left:0};r=m_(a,e),i=v_(a,t),n=window}n&&(r!==this._verticalScrollDirection||i!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=i,this._scrollNode=n,(r||i)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let t=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let t=this._container.style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),qb(0,pb).pipe(ai(this._stopScrollTimers)).subscribe(()=>{let t=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===nn.UP?t.scrollBy(0,-e):this._verticalScrollDirection===nn.DOWN&&t.scrollBy(0,e),this._horizontalScrollDirection===ke.LEFT?t.scrollBy(-e,0):this._horizontalScrollDirection===ke.RIGHT&&t.scrollBy(e,0)})};_isOverContainer(t,e){return this._domRect!=null&&Gc(this._domRect,t,e)}_getSiblingContainerFromPosition(t,e,n){return this._siblings.find(r=>r._canReceive(t,e,n))}_canReceive(t,e,n){if(!this._domRect||!Gc(this._domRect,e,n)||!this.enterPredicate(t,this))return!1;let r=this._getShadowRoot().elementFromPoint(e,n);return r?r===this._container||this._container.contains(r):!1}_startReceiving(t,e){let n=this._activeSiblings;!n.has(t)&&e.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(t),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:t,receiver:this,items:e}))}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:t,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(t);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let t=La(this._container);this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let t=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}};function m_(t,e){let{top:n,bottom:r,height:i}=t,o=i*g_;return e>=n-o&&e<=n+o?nn.UP:e>=r-o&&e<=r+o?nn.DOWN:nn.NONE}function v_(t,e){let{left:n,right:r,width:i}=t,o=i*g_;return e>=n-o&&e<=n+o?ke.LEFT:e>=r-o&&e<=r+o?ke.RIGHT:ke.NONE}function Mk(t,e,n,r,i){let o=m_(e,i),s=v_(e,r),a=nn.NONE,l=ke.NONE;if(o){let u=t.scrollTop;o===nn.UP?u>0&&(a=nn.UP):t.scrollHeight-u>t.clientHeight&&(a=nn.DOWN)}if(s){let u=t.scrollLeft;n==="rtl"?s===ke.RIGHT?u<0&&(l=ke.RIGHT):t.scrollWidth+u>t.clientWidth&&(l=ke.LEFT):s===ke.LEFT?u>0&&(l=ke.LEFT):t.scrollWidth-u>t.clientWidth&&(l=ke.RIGHT)}return[a,l]}var ki={capture:!0},Cl={passive:!1,capture:!0},jk=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=je({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(n,r){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
|
|
29
|
+
`],encapsulation:2,changeDetection:0})}return t})(),y_=(()=>{class t{_ngZone=N(Yt);_document=N(ne);_styleLoader=N(Ma);_renderer=N(wn).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=ir([]);_globalListeners;_draggingPredicate=n=>n.isDragging();_domNodesToDirectives=null;pointerMove=new dt;pointerUp=new dt;scroll=new dt;constructor(){}registerDropContainer(n){this._dropInstances.has(n)||this._dropInstances.add(n)}registerDragItem(n){this._dragInstances.add(n),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=Fe(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,Cl)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(n,r){if(!(this._activeDragInstances().indexOf(n)>-1)&&(this._styleLoader.load(jk),this._activeDragInstances.update(i=>[...i,n]),this._activeDragInstances().length===1)){let i=r.type.startsWith("touch"),o=a=>this.pointerUp.next(a),s=[["scroll",a=>this.scroll.next(a),ki],["selectstart",this._preventDefaultWhileDragging,Cl]];i?s.push(["touchend",o,ki],["touchcancel",o,ki]):s.push(["mouseup",o,ki]),i||s.push(["mousemove",a=>this.pointerMove.next(a),Cl]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=s.map(([a,l,u])=>Fe(this._renderer,this._document,a,l,u))})}}stopDragging(n){this._activeDragInstances.update(r=>{let i=r.indexOf(n);return i>-1?(r.splice(i,1),[...r]):r}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(n){return this._activeDragInstances().indexOf(n)>-1}scrolled(n){let r=[this.scroll];return n&&n!==this._document&&r.push(new _e(i=>this._ngZone.runOutsideAngular(()=>{let o=Fe(this._renderer,n,"scroll",s=>{this._activeDragInstances().length&&i.next(s)},ki);return()=>{o()}}))),Js(...r)}registerDirectiveNode(n,r){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(n,r)}removeDirectiveNode(n){this._domNodesToDirectives?.delete(n)}getDragDirectiveForNode(n){return this._domNodesToDirectives?.get(n)||null}ngOnDestroy(){this._dragInstances.forEach(n=>this.removeDragItem(n)),this._dropInstances.forEach(n=>this.removeDropContainer(n)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=n=>{this._activeDragInstances().length>0&&n.preventDefault()};_persistentTouchmoveListener=n=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&n.preventDefault(),this.pointerMove.next(n))};_clearGlobalListeners(){this._globalListeners?.forEach(n=>n()),this._globalListeners=void 0}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Vk={dragStartThreshold:5,pointerDirectionChangeThreshold:5},Bk=(()=>{class t{_document=N(ne);_ngZone=N(Yt);_viewportRuler=N(Ph);_dragDropRegistry=N(y_);_renderer=N(wn).createRenderer(null,null);constructor(){}createDrag(n,r=Vk){return new kk(n,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(n){return new Lk(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),vp=new Et("CDK_DRAG_PARENT"),Fk=new Et("CdkDragHandle"),Uk=new Et("CDK_DRAG_CONFIG"),Hk=new Et("CdkDropList"),$k=(()=>{class t{element=N(He);dropContainer=N(Hk,{optional:!0,skipSelf:!0});_ngZone=N(Yt);_viewContainerRef=N(wi);_dir=N(Bs,{optional:!0});_changeDetectorRef=N(Co);_selfHandle=N(Fk,{optional:!0,self:!0});_parentDrag=N(vp,{optional:!0,skipSelf:!0});_dragDropRegistry=N(y_);_destroyed=new dt;_handles=new lu([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(n){this._disabled=n,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new ee;released=new ee;ended=new ee;entered=new ee;exited=new ee;dropped=new ee;moved=new _e(n=>{let r=this._dragRef.moved.pipe(Ks(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(n);return()=>{r.unsubscribe()}});_injector=N(Pe);constructor(){let n=this.dropContainer,r=N(Uk,{optional:!0}),i=N(Bk);this._dragRef=i.createDrag(this.element,{dragStartThreshold:r&&r.dragStartThreshold!=null?r.dragStartThreshold:5,pointerDirectionChangeThreshold:r&&r.pointerDirectionChangeThreshold!=null?r.pointerDirectionChangeThreshold:5,zIndex:r?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),r&&this._assignDefaults(r),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this),n._dropListRef.beforeStarted.pipe(ai(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(n){this._dragRef.setFreeDragPosition(n)}ngAfterViewInit(){wo(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(n){let r=n.rootElementSelector,i=n.freeDragPosition;r&&!r.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(n){let r=this._handles.getValue();r.push(n),this._handles.next(r)}_removeHandle(n){let r=this._handles.getValue(),i=r.indexOf(n);i>-1&&(r.splice(i,1),this._handles.next(r))}_setPreviewTemplate(n){this._previewTemplate=n}_resetPreviewTemplate(n){n===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(n){this._placeholderTemplate=n}_resetPlaceholderTemplate(n){n===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let n=this.element.nativeElement,r=n;this.rootElementSelector&&(r=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(r||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):hn(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let r=this._dir,i=this.dragStartDelay,o=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;n.disabled=this.disabled,n.lockAxis=this.lockAxis,n.scale=this.scale,n.dragStartDelay=typeof i=="object"&&i?i:gk(i),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(o).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),r&&n.withDirection(r.value)}}),n.beforeStarted.pipe(Gb(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let r=this.element.nativeElement.parentElement;for(;r;){let i=this._dragDropRegistry.getDragDirectiveForNode(r);if(i){n.withParent(i._dragRef);break}r=r.parentElement}})}_handleEvents(n){n.started.subscribe(r=>{this.started.emit({source:this,event:r.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(r=>{this.released.emit({source:this,event:r.event})}),n.ended.subscribe(r=>{this.ended.emit({source:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(r=>{this.entered.emit({container:r.container.data,item:this,currentIndex:r.currentIndex})}),n.exited.subscribe(r=>{this.exited.emit({container:r.container.data,item:this})}),n.dropped.subscribe(r=>{this.dropped.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,previousContainer:r.previousContainer.data,container:r.container.data,isPointerOverContainer:r.isPointerOverContainer,item:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event})})}_assignDefaults(n){let{lockAxis:r,dragStartDelay:i,constrainPosition:o,previewClass:s,boundaryElement:a,draggingDisabled:l,rootElementSelector:u,previewContainer:d}=n;this.disabled=l??!1,this.dragStartDelay=i||0,r&&(this.lockAxis=r),o&&(this.constrainPosition=o),s&&(this.previewClass=s),a&&(this.boundaryElement=a),u&&(this.rootElementSelector=u),d&&(this.previewContainer=d)}_setupHandlesListener(){this._handles.pipe(Jb(n=>{let r=n.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),_g(n=>Js(...n.map(r=>r._stateChanges.pipe(yg(r))))),ai(this._destroyed)).subscribe(n=>{let r=this._dragRef,i=n.element.nativeElement;n.disabled?r.disableHandle(i):r.enableHandle(i)})}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ma({type:t,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,r){n&2&&_a("cdk-drag-disabled",r.disabled)("cdk-drag-dragging",r._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",AC],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",PC]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[uC([{provide:vp,useExisting:t}]),qg]})}return t})(),zk=t=>({"lc:cursor-grab":t}),yp=(t,e)=>e.url;function qk(t,e){if(t&1&&jt(0,"source",11),t&2){let n=e.$implicit;Nn("type",n.mimeType),xi("media","(max-width: ",n.width,"px)"),Mt("src",n.url,Ye)}}function Wk(t,e){if(t&1&&jt(0,"source",12),t&2){let n=e.$implicit;Nn("type",n.mimeType),Mt("src",n.url,Ye)}}var Gk=class Zc{constructor(e){this.elementRef=e}video;closeClicked=new ee;videoClicked=new ee;isDragging=!1;VideoUtils=Ah;ngOnInit(){let e=this.elementRef.nativeElement.parentElement.parentElement;e.style.zIndex="2147483647"}close(){this.closeClicked.emit()}onVideoClick(){if(this.isDragging){this.isDragging=!1;return}this.videoClicked.emit()}static \u0275fac=function(e){return new(e||Zc)(Ce(He))};static \u0275cmp=je({type:Zc,selectors:[["cooee-draggable-video-popup"]],inputs:{video:"video"},outputs:{closeClicked:"closeClicked",videoClicked:"videoClicked"},decls:16,vars:5,consts:[["role","button","tabindex","0","cdkDrag","",1,"lc-popup-inner","lc:shadow-2xl","lc:rounded-lg","lc:flex","lc:justify-center","lc:items-center",3,"click","keyup","cdkDragMoved","ngClass","cdkDragBoundary"],[1,"lc-close-button","lc:absolute","lc:-top-3.5","lc:-right-3.5","lc:bg-black/50","lc:rounded-full","lc:w-8","lc:h-8","lc:border-none","lc:z-10","lc:flex","lc:justify-center","lc:items-center",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","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 12 19 6.41z"],[1,"lc-play-button"],[1,"lc-icon"],["viewBox","0 0 28.31 30"],["d","M19.15,1.29A1.24,1.24,0,0,0,17.82.15a1.36,1.36,0,0,0-.35.07,3.2,3.2,0,0,0-.65.46l-5.06,4.6a1.24,1.24,0,0,0,0,1.75l0,0a1.22,1.22,0,0,0,.89.39,1.25,1.25,0,0,0,.85-.32l3-2.78.17-.13v8l2.44,2.62ZM26.79,26.6l-7.64-7.93-2.5-2.58-6-6.34L8.9,8,5.23,4.15a1.17,1.17,0,0,0-1.66,0h0a1.18,1.18,0,0,0,0,1.66h0L6.1,8.47H3.32a2.94,2.94,0,0,0-2.45,3v7.16a3,3,0,0,0,2.86,3.08H8.07a.44.44,0,0,1,.33.13C9.7,23,11,24.19,12.26,25.36L17,29.7a1.24,1.24,0,0,0,2.17-1V22.21l5.95,6.15a1.2,1.2,0,0,0,1.67,0,1.17,1.17,0,0,0,.08-1.66Zm-10.14-.67-.18-.11L9.75,19.67a1.72,1.72,0,0,0-1.16-.45H4c-.48,0-.59-.11-.59-.61V11.55c0-.49,0-.6.59-.6H8.29l8.29,8.55ZM29.09,15.07A9.9,9.9,0,0,1,26.33,22l-.11.13a1.24,1.24,0,0,1-2-.28,1.29,1.29,0,0,1,.24-1.52h0a6.77,6.77,0,0,0,1.32-1.89,7.41,7.41,0,0,0-1.37-8.55,1.24,1.24,0,0,1-.08-1.75,1.33,1.33,0,0,1,.41-.29,1.19,1.19,0,0,1,1.34.2A8.88,8.88,0,0,1,28,10.36a10,10,0,0,1,1.17,4.17A3.35,3.35,0,0,1,29.09,15.07Z","transform","translate(-0.86 -0.14)","fill","#191919"],[1,"lc-text"],["loop","","preload","auto","playsinline","","autoplay","",1,"lc:rounded-lg","lc:w-full",3,"muted"],[3,"src","type","media"],[3,"src","type"]],template:function(e,n){e&1&&(Y(0,"div",0),ue("click",function(){return n.onVideoClick()})("keyup",function(){return n.onVideoClick()})("cdkDragMoved",function(){return n.isDragging=!0}),Y(1,"button",1),ue("click",function(r){return r.stopPropagation(),n.close()}),ar(),Y(2,"svg",2),jt(3,"path",3)(4,"path",4),K()(),Es(),Y(5,"div",5)(6,"div",6),ar(),Y(7,"svg",7),jt(8,"path",8),K()(),Es(),Y(9,"div",9),he(10,"Tap to unmute"),K()(),Y(11,"video",10),Le(12,qk,1,4,"source",11,yp),Le(14,Wk,1,2,"source",12,yp),K()()),e&2&&(Mt("ngClass",hC(3,zk,n.isDragging))("cdkDragBoundary","body"),z(11),Mt("muted",!0),z(),Me(n.video.sources),z(2),Me(n.VideoUtils.getBestSources(n.video.sources)))},dependencies:[iT,$k],styles:["[_nghost-%COMP%]{position:fixed;display:block;right:24px;bottom:24px;max-width:150px}.lc-play-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);transition:all .1s ease-in-out;z-index:999;flex-wrap:wrap;width:100%;max-width:130px;border-radius:5px;padding:5px 10px;background-color:#97979761;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.lc-play-button[_ngcontent-%COMP%] .lc-icon[_ngcontent-%COMP%]{width:14px;height:14px}.lc-play-button[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#fff}.lc-play-button[_ngcontent-%COMP%] .lc-text[_ngcontent-%COMP%]{font-size:11px;line-height:1;color:#fff;font-weight:400;margin-left:5px;text-align:center}"]})},jh=class{_attachedHost;attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;t!=null&&(this._attachedHost=null,t.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(t){this._attachedHost=t}},Yc=class extends jh{component;viewContainerRef;injector;componentFactoryResolver;projectableNodes;constructor(t,e,n,r,i){super(),this.component=t,this.viewContainerRef=e,this.injector=n,this.projectableNodes=i}},__=class extends jh{templateRef;viewContainerRef;context;injector;constructor(t,e,n,r){super(),this.templateRef=t,this.viewContainerRef=e,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}},Zk=class extends jh{element;constructor(t){super(),this.element=t instanceof He?t.nativeElement:t}},Vh=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(t){if(t instanceof Yc)return this._attachedPortal=t,this.attachComponentPortal(t);if(t instanceof __)return this._attachedPortal=t,this.attachTemplatePortal(t);if(this.attachDomPortal&&t instanceof Zk)return this._attachedPortal=t,this.attachDomPortal(t)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},Yk=class extends Vh{outletElement;_appRef;_defaultInjector;_document;constructor(t,e,n,r,i){super(),this.outletElement=t,this._appRef=n,this._defaultInjector=r,this._document=i}attachComponentPortal(t){let e;if(t.viewContainerRef){let n=t.injector||t.viewContainerRef.injector,r=n.get(io,null,{optional:!0})||void 0;e=t.viewContainerRef.createComponent(t.component,{index:t.viewContainerRef.length,injector:n,ngModuleRef:r,projectableNodes:t.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else{let n=this._appRef,r=t.injector||this._defaultInjector||Pe.NULL,i=r.get(Vn,n.injector);e=Xv(t.component,{elementInjector:r,environmentInjector:i,projectableNodes:t.projectableNodes||void 0}),n.attachView(e.hostView),this.setDisposeFn(()=>{n.viewCount>0&&n.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=t,e}attachTemplatePortal(t){let e=t.viewContainerRef,n=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(n);r!==-1&&e.remove(r)}),this._attachedPortal=t,n}attachDomPortal=t=>{let e=t.element;e.parentNode;let n=this._document.createComment("dom-portal");e.parentNode.insertBefore(n,e),this.outletElement.appendChild(e),this._attachedPortal=t,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(e,n)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}},_p=(()=>{class t extends Vh{_moduleRef=N(io,{optional:!0});_document=N(ne);_viewContainerRef=N(wi);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}attached=new ee;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,i=r.createComponent(n.component,{index:r.length,injector:n.injector||r.injector,projectableNodes:n.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=n=>{let r=n.element;r.parentNode;let i=this._document.createComment("dom-portal");n.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}static \u0275fac=function(n){return new(n||t)};static \u0275dir=ma({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Ei]})}return t})(),Ai;function Kk(){if(Ai==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Ai=!0}))}finally{Ai=Ai||!1}return Ai}function Jk(t){return Kk()?t:!!t.capture}var Qk=new Et("cdk-input-modality-detector-options"),Xk={ignoreKeys:[18,17,224,91,16]},b_=650,Tl={passive:!0,capture:!0},tA=(()=>{class t{_platform=N(Gn);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new lu(null);_options;_lastTouchMs=0;_onKeydown=n=>{this._options?.ignoreKeys?.some(r=>r===n.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=mn(n))};_onMousedown=n=>{Date.now()-this._lastTouchMs<b_||(this._modality.next(a_(n)?"keyboard":"mouse"),this._mostRecentTarget=mn(n))};_onTouchstart=n=>{if(l_(n)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=mn(n)};constructor(){let n=N(Yt),r=N(ne),i=N(Qk,{optional:!0});if(this._options=L(L({},Xk),i),this.modalityDetected=this._modality.pipe(Kb(1)),this.modalityChanged=this.modalityDetected.pipe(Zb()),this._platform.isBrowser){let o=N(wn).createRenderer(null,null);this._listenerCleanups=n.runOutsideAngular(()=>[Fe(o,r,"keydown",this._onKeydown,Tl),Fe(o,r,"mousedown",this._onMousedown,Tl),Fe(o,r,"touchstart",this._onTouchstart,Tl)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(n=>n())}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),cs=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(cs||{}),eA=new Et("cdk-focus-monitor-default-options"),Jo=Jk({passive:!0,capture:!0}),nA=(()=>{class t{_ngZone=N(Yt);_platform=N(Gn);_inputModalityDetector=N(tA);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=N(ne,{optional:!0});_stopInputModalityDetector=new dt;constructor(){let n=N(eA,{optional:!0});this._detectionMode=n?.detectionMode||cs.IMMEDIATE}_rootNodeFocusAndBlurListener=n=>{let r=mn(n);for(let i=r;i;i=i.parentElement)n.type==="focus"?this._onFocus(n,i):this._onBlur(n,i)};monitor(n,r=!1){let i=hn(n);if(!this._platform.isBrowser||i.nodeType!==1)return fu();let o=La(i)||this._getDocument(),s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let a={checkChildren:r,subject:new dt,rootNode:o};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(n){let r=hn(n),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(n,r,i){let o=hn(n),s=this._getDocument().activeElement;o===s?this._getClosestElementsInfo(o).forEach(([a,l])=>this._originChanged(a,r,l)):(this._setOrigin(r),typeof o.focus=="function"&&o.focus(i))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===cs.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===cs.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?b_:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(n,r){let i=this._elementInfo.get(r),o=mn(n);!i||!i.checkChildren&&r!==o||this._originChanged(r,this._getFocusOrigin(o),i)}_onBlur(n,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,Jo),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,Jo)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ai(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Jo),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Jo),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,i){this._setClasses(n,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((i,o)=>{(o===n||i.checkChildren&&o.contains(n))&&r.push([o,i])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let o=n.labels;if(o){for(let s=0;s<o.length;s++)if(o[s].contains(r))return!0}return!1}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),rA=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=je({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,r){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
|
|
30
|
+
`],encapsulation:2,changeDetection:0})}return t})(),w_=(()=>{class t{_platform=N(Gn);constructor(){}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return oA(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=iA(fA(n));if(r&&(bp(r)===-1||!this.isVisible(r)))return!1;let i=n.nodeName.toLowerCase(),o=bp(n);return n.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!hA(n)?!1:i==="audio"?n.hasAttribute("controls")?o!==-1:!1:i==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return dA(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function iA(t){try{return t.frameElement}catch{return null}}function oA(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function sA(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function aA(t){return cA(t)&&t.type=="hidden"}function lA(t){return uA(t)&&t.hasAttribute("href")}function cA(t){return t.nodeName.toLowerCase()=="input"}function uA(t){return t.nodeName.toLowerCase()=="a"}function E_(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function bp(t){if(!E_(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function hA(t){let e=t.nodeName.toLowerCase(),n=e==="input"&&t.type;return n==="text"||n==="password"||e==="select"||e==="textarea"}function dA(t){return aA(t)?!1:sA(t)||lA(t)||t.hasAttribute("contenteditable")||E_(t)}function fA(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var pA=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_enabled=!0;constructor(t,e,n,r,i=!1,o){this._element=t,this._checker=e,this._ngZone=n,this._document=r,this._injector=o,i||this.attachAnchors()}destroy(){let t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(t)))})}focusFirstTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(t)))})}focusLastTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(t)))})}_getRegionBoundary(t){let e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);return t=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(t){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let n=this._getFirstTabbableElement(e);return n?.focus(t),!!n}return e.focus(t),!0}return this.focusFirstTabbableElement(t)}focusFirstTabbableElement(t){let e=this._getRegionBoundary("start");return e&&e.focus(t),!!e}focusLastTabbableElement(t){let e=this._getRegionBoundary("end");return e&&e.focus(t),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children;for(let n=0;n<e.length;n++){let r=e[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[n]):null;if(r)return r}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children;for(let n=e.length-1;n>=0;n--){let r=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(r)return r}return null}_createAnchor(){let t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._injector?wo(t,{injector:this._injector}):setTimeout(t)}},gA=(()=>{class t{_checker=N(w_);_ngZone=N(Yt);_document=N(ne);_injector=N(Pe);constructor(){N(Ma).load(rA)}create(n,r=!1){return new pA(n,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function wp(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function fe(t){return t==null?"":typeof t=="string"?t:`${t}px`}function mA(t,...e){return e.length?e.some(n=>t[n]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var Ep=wk(),vA=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(t,e){this._viewportRuler=t,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=fe(-this._previousScrollPosition.left),t.style.top=fe(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let t=this._document.documentElement,e=this._document.body,n=t.style,r=e.style,i=n.scrollBehavior||"",o=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),Ep&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Ep&&(n.scrollBehavior=i,r.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let t=this._document.documentElement,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width}},yA=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(t,e,n,r){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=n,this._config=r}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(this._scrollSubscription)return;let t=this._scrollDispatcher.scrolled(0).pipe(pu(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}},x_=class{enable(){}disable(){}attach(){}};function Kc(t,e){return e.some(n=>{let r=t.bottom<n.top,i=t.top>n.bottom,o=t.right<n.left,s=t.left>n.right;return r||i||o||s})}function xp(t,e){return e.some(n=>{let r=t.top<n.top,i=t.bottom>n.bottom,o=t.left<n.left,s=t.right>n.right;return r||i||o||s})}var _A=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(t,e,n,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this._config=r}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(!this._scrollSubscription){let t=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(t).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();Kc(e,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},bA=(()=>{class t{_scrollDispatcher=N(xk);_viewportRuler=N(Ph);_ngZone=N(Yt);_document=N(ne);constructor(){}noop=()=>new x_;close=n=>new yA(this._scrollDispatcher,this._ngZone,this._viewportRuler,n);block=()=>new vA(this._viewportRuler,this._document);reposition=n=>new _A(this._scrollDispatcher,this._viewportRuler,this._ngZone,n);static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),S_=class{positionStrategy;scrollStrategy=new x_;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(t){if(t){let e=Object.keys(t);for(let n of e)t[n]!==void 0&&(this[n]=t[n])}}},wA=class{connectionPair;scrollableViewProperties;constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}},I_=(()=>{class t{_attachedOverlays=[];_document=N(ne);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),EA=(()=>{class t extends I_{_ngZone=N(Yt);_renderer=N(wn).createRenderer(null,null);_cleanupKeydown;add(n){super.add(n),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=n=>{let r=this._attachedOverlays;for(let i=r.length-1;i>-1;i--)if(r[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>r[i]._keydownEvents.next(n));break}};static \u0275fac=(()=>{let n;return function(r){return(n||(n=wm(t)))(r||t)}})();static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),xA=(()=>{class t extends I_{_platform=N(Gn);_ngZone=N(Yt);_renderer=N(wn).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(n){if(super.add(n),!this._isAttached){let r=this._document.body,i={capture:!0};this._cleanups=this._ngZone.runOutsideAngular(()=>[Fe(this._renderer,r,"pointerdown",this._pointerDownListener,i),Fe(this._renderer,r,"click",this._clickListener,i),Fe(this._renderer,r,"auxclick",this._clickListener,i),Fe(this._renderer,r,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(n=>n()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=n=>{this._pointerDownEventTarget=mn(n)};_clickListener=n=>{let r=mn(n),i=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let s=o.length-1;s>-1;s--){let a=o[s];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(Sp(a.overlayElement,r)||Sp(a.overlayElement,i))break;let l=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>l.next(n)):l.next(n)}};static \u0275fac=(()=>{let n;return function(r){return(n||(n=wm(t)))(r||t)}})();static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Sp(t,e){let n=typeof ShadowRoot<"u"&&ShadowRoot,r=e;for(;r;){if(r===t)return!0;r=n&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var C_=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=je({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(n,r){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
|
|
31
|
+
`],encapsulation:2,changeDetection:0})}return t})(),Bh=(()=>{class t{_platform=N(Gn);_containerElement;_document=N(ne);_styleLoader=N(Ma);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||wp()){let i=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let o=0;o<i.length;o++)i[o].remove()}let r=this._document.createElement("div");r.classList.add(n),wp()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}_loadStyles(){this._styleLoader.load(C_)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),SA=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(t,e,n,r){this._renderer=e,this._ngZone=n,this.element=t.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=e.listen(this.element,"click",r)}detach(){this._ngZone.runOutsideAngular(()=>{let t=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(t,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),t.style.pointerEvents="none",t.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},Fh=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new dt;_attachments=new dt;_detachments=new dt;_positionStrategy;_scrollStrategy;_locationChanges=ye.EMPTY;_backdropRef=null;_previousHostParent;_keydownEvents=new dt;_outsidePointerEvents=new dt;_renders=new dt;_afterRenderRef;_afterNextRenderRef;constructor(t,e,n,r,i,o,s,a,l,u=!1,d,f){this._portalOutlet=t,this._host=e,this._pane=n,this._config=r,this._ngZone=i,this._keyboardDispatcher=o,this._document=s,this._location=a,this._outsideClickDispatcher=l,this._animationsDisabled=u,this._injector=d,this._renderer=f,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=LC(()=>Hm(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(t){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=wo(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){let t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,t&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=L(L({},this._config),t),this._updateElementSize()}setDirection(t){this._config=Qt(L({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){let t=this._config.direction;return t?typeof t=="string"?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let t=this._pane.style;t.width=fe(this._config.width),t.height=fe(this._config.height),t.minWidth=fe(this._config.minWidth),t.minHeight=fe(this._config.minHeight),t.maxWidth=fe(this._config.maxWidth),t.maxHeight=fe(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){let t="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new SA(this._document,this._renderer,this._ngZone,e=>{this._backdropClick.next(e)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(t))}):this._backdropRef.element.classList.add(t)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(t,e,n){let r=u_(e||[]).filter(i=>!!i);r.length&&(n?t.classList.add(...r):t.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let t=this._renders.pipe(ai(Js(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),t.unsubscribe())})})}_disposeScrollStrategy(){let t=this._scrollStrategy;t?.disable(),t?.detach?.()}},Ip="cdk-overlay-connected-position-bounding-box",IA=/([A-Za-z%]+)$/,CA=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new dt;_resizeSubscription=ye.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(t,e,n,r,i){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=i,this.setOrigin(t)}attach(t){this._overlayRef&&this._overlayRef,this._validatePositions(),t.hostElement.classList.add(Ip),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._originRect,e=this._overlayRect,n=this._viewportRect,r=this._containerRect,i=[],o;for(let s of this._preferredPositions){let a=this._getOriginPoint(t,r,s),l=this._getOverlayPoint(a,e,s),u=this._getOverlayFit(l,e,n,s);if(u.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(s,a);return}if(this._canFitWithFlexibleDimensions(u,l,n)){i.push({position:s,origin:a,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(a,s)});continue}(!o||o.overlayFit.visibleArea<u.visibleArea)&&(o={overlayFit:u,overlayPoint:l,originPoint:a,position:s,overlayRect:e})}if(i.length){let s=null,a=-1;for(let l of i){let u=l.boundingBoxRect.width*l.boundingBoxRect.height*(l.position.weight||1);u>a&&(a=u,s=l)}this._isPushed=!1,this._applyPosition(s.position,s.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(o.position,o.originPoint);return}this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&gr(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Ip),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let t=this._lastPosition;if(t){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._getOriginPoint(this._originRect,this._containerRect,t);this._applyPosition(t,e)}else this.apply()}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,t.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e,n){let r;if(n.originX=="center")r=t.left+t.width/2;else{let o=this._isRtl()?t.right:t.left,s=this._isRtl()?t.left:t.right;r=n.originX=="start"?o:s}e.left<0&&(r-=e.left);let i;return n.originY=="center"?i=t.top+t.height/2:i=n.originY=="top"?t.top:t.bottom,e.top<0&&(i-=e.top),{x:r,y:i}}_getOverlayPoint(t,e,n){let r;n.overlayX=="center"?r=-e.width/2:n.overlayX==="start"?r=this._isRtl()?-e.width:0:r=this._isRtl()?0:-e.width;let i;return n.overlayY=="center"?i=-e.height/2:i=n.overlayY=="top"?0:-e.height,{x:t.x+r,y:t.y+i}}_getOverlayFit(t,e,n,r){let i=Tp(e),{x:o,y:s}=t,a=this._getOffset(r,"x"),l=this._getOffset(r,"y");a&&(o+=a),l&&(s+=l);let u=0-o,d=o+i.width-n.width,f=0-s,p=s+i.height-n.height,g=this._subtractOverflows(i.width,u,d),m=this._subtractOverflows(i.height,f,p),b=g*m;return{visibleArea:b,isCompletelyWithinViewport:i.width*i.height===b,fitsInViewportVertically:m===i.height,fitsInViewportHorizontally:g==i.width}}_canFitWithFlexibleDimensions(t,e,n){if(this._hasFlexibleDimensions){let r=n.bottom-e.y,i=n.right-e.x,o=Cp(this._overlayRef.getConfig().minHeight),s=Cp(this._overlayRef.getConfig().minWidth),a=t.fitsInViewportVertically||o!=null&&o<=r,l=t.fitsInViewportHorizontally||s!=null&&s<=i;return a&&l}return!1}_pushOverlayOnScreen(t,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};let r=Tp(e),i=this._viewportRect,o=Math.max(t.x+r.width-i.width,0),s=Math.max(t.y+r.height-i.height,0),a=Math.max(i.top-n.top-t.y,0),l=Math.max(i.left-n.left-t.x,0),u=0,d=0;return r.width<=i.width?u=l||-o:u=t.x<this._viewportMargin?i.left-n.left-t.x:0,r.height<=i.height?d=a||-s:d=t.y<this._viewportMargin?i.top-n.top-t.y:0,this._previousPushAmount={x:u,y:d},{x:t.x+u,y:t.y+d}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._positionChanges.observers.length){let n=this._getScrollVisibility();if(t!==this._lastPosition||!this._lastScrollVisibility||!TA(this._lastScrollVisibility,n)){let r=new wA(t,n);this._positionChanges.next(r)}this._lastScrollVisibility=n}this._lastPosition=t,this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),n,r=t.overlayY;t.overlayX==="center"?n="center":this._isRtl()?n=t.overlayX==="start"?"right":"left":n=t.overlayX==="start"?"left":"right";for(let i=0;i<e.length;i++)e[i].style.transformOrigin=`${n} ${r}`}_calculateBoundingBoxRect(t,e){let n=this._viewportRect,r=this._isRtl(),i,o,s;if(e.overlayY==="top")o=t.y,i=n.height-o+this._viewportMargin;else if(e.overlayY==="bottom")s=n.height-t.y+this._viewportMargin*2,i=n.height-s+this._viewportMargin;else{let p=Math.min(n.bottom-t.y+n.top,t.y),g=this._lastBoundingBoxSize.height;i=p*2,o=t.y-p,i>g&&!this._isInitialRender&&!this._growAfterOpen&&(o=t.y-g/2)}let a=e.overlayX==="start"&&!r||e.overlayX==="end"&&r,l=e.overlayX==="end"&&!r||e.overlayX==="start"&&r,u,d,f;if(l)f=n.width-t.x+this._viewportMargin*2,u=t.x-this._viewportMargin;else if(a)d=t.x,u=n.right-t.x;else{let p=Math.min(n.right-t.x+n.left,t.x),g=this._lastBoundingBoxSize.width;u=p*2,d=t.x-p,u>g&&!this._isInitialRender&&!this._growAfterOpen&&(d=t.x-g/2)}return{top:o,left:d,bottom:s,right:f,width:u,height:i}}_setBoundingBoxStyles(t,e){let n=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let i=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=fe(n.height),r.top=fe(n.top),r.bottom=fe(n.bottom),r.width=fe(n.width),r.left=fe(n.left),r.right=fe(n.right),e.overlayX==="center"?r.alignItems="center":r.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?r.justifyContent="center":r.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",i&&(r.maxHeight=fe(i)),o&&(r.maxWidth=fe(o))}this._lastBoundingBoxSize=n,gr(this._boundingBox.style,r)}_resetBoundingBoxStyles(){gr(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){gr(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){let n={},r=this._hasExactPosition(),i=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){let u=this._viewportRuler.getViewportScrollPosition();gr(n,this._getExactOverlayY(e,t,u)),gr(n,this._getExactOverlayX(e,t,u))}else n.position="static";let s="",a=this._getOffset(e,"x"),l=this._getOffset(e,"y");a&&(s+=`translateX(${a}px) `),l&&(s+=`translateY(${l}px)`),n.transform=s.trim(),o.maxHeight&&(r?n.maxHeight=fe(o.maxHeight):i&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=fe(o.maxWidth):i&&(n.maxWidth="")),gr(this._pane.style,n)}_getExactOverlayY(t,e,n){let r={top:"",bottom:""},i=this._getOverlayPoint(e,this._overlayRect,t);if(this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n)),t.overlayY==="bottom"){let o=this._document.documentElement.clientHeight;r.bottom=`${o-(i.y+this._overlayRect.height)}px`}else r.top=fe(i.y);return r}_getExactOverlayX(t,e,n){let r={left:"",right:""},i=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n));let o;if(this._isRtl()?o=t.overlayX==="end"?"left":"right":o=t.overlayX==="end"?"right":"left",o==="right"){let s=this._document.documentElement.clientWidth;r.right=`${s-(i.x+this._overlayRect.width)}px`}else r.left=fe(i.x);return r}_getScrollVisibility(){let t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:xp(t,n),isOriginOutsideView:Kc(t,n),isOverlayClipped:xp(e,n),isOverlayOutsideView:Kc(e,n)}}_subtractOverflows(t,...e){return e.reduce((n,r)=>n-Math.max(r,0),t)}_getNarrowedViewportRect(){let t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+t-this._viewportMargin,bottom:n.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return e==="x"?t.offsetX==null?this._offsetX:t.offsetX:t.offsetY==null?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&u_(t).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){let t=this._origin;if(t instanceof He)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();let e=t.width||0,n=t.height||0;return{top:t.y,bottom:t.y+n,left:t.x,right:t.x+e,height:n,width:e}}};function gr(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Cp(t){if(typeof t!="number"&&t!=null){let[e,n]=t.split(IA);return!n||n==="px"?parseFloat(e):null}return t||null}function Tp(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}function TA(t,e){return t===e?!0:t.isOriginClipped===e.isOriginClipped&&t.isOriginOutsideView===e.isOriginOutsideView&&t.isOverlayClipped===e.isOverlayClipped&&t.isOverlayOutsideView===e.isOverlayOutsideView}var Op="cdk-global-overlay-wrapper",OA=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(t){let e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(Op),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._xOffset=t,this._xPosition="left",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._xOffset=t,this._xPosition="right",this}start(t=""){return this._xOffset=t,this._xPosition="start",this}end(t=""){return this._xOffset=t,this._xPosition="end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._xPosition="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:i,maxWidth:o,maxHeight:s}=n,a=(r==="100%"||r==="100vw")&&(!o||o==="100%"||o==="100vw"),l=(i==="100%"||i==="100vh")&&(!s||s==="100%"||s==="100vh"),u=this._xPosition,d=this._xOffset,f=this._overlayRef.getConfig().direction==="rtl",p="",g="",m="";a?m="flex-start":u==="center"?(m="center",f?g=d:p=d):f?u==="left"||u==="end"?(m="flex-end",p=d):(u==="right"||u==="start")&&(m="flex-start",g=d):u==="left"||u==="start"?(m="flex-start",p=d):(u==="right"||u==="end")&&(m="flex-end",g=d),t.position=this._cssPosition,t.marginLeft=a?"0":p,t.marginTop=l?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=a?"0":g,e.justifyContent=m,e.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,n=e.style;e.classList.remove(Op),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}},RA=(()=>{class t{_viewportRuler=N(Ph);_document=N(ne);_platform=N(Gn);_overlayContainer=N(Bh);constructor(){}global(){return new OA}flexibleConnectedTo(n){return new CA(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),T_=(()=>{class t{scrollStrategies=N(bA);_overlayContainer=N(Bh);_positionBuilder=N(RA);_keyboardDispatcher=N(EA);_injector=N(Pe);_ngZone=N(Yt);_document=N(ne);_directionality=N(Bs);_location=N(ry);_outsideClickDispatcher=N(xA);_animationsModuleType=N(nE,{optional:!0});_idGenerator=N(c_);_renderer=N(wn).createRenderer(null,null);_appRef;_styleLoader=N(Ma);constructor(){}create(n){this._styleLoader.load(C_);let r=this._createHostElement(),i=this._createPaneElement(r),o=this._createPortalOutlet(i),s=new S_(n);return s.direction=s.direction||this._directionality.value,new Fh(o,r,i,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Vn),this._renderer)}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=this._idGenerator.getId("cdk-overlay-"),r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(lr)),new Yk(n,null,this._appRef,this._injector,this._document)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function DA(t,e){}var Hs=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;componentFactoryResolver;providers;container;templateContext},NA=(()=>{class t extends Vh{_elementRef=N(He);_focusTrapFactory=N(gA);_config;_interactivityChecker=N(w_);_ngZone=N(Yt);_overlayRef=N(Fh);_focusMonitor=N(nA);_renderer=N(Iv);_platform=N(Gn);_document=N(ne,{optional:!0});_portalOutlet;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_changeDetectorRef=N(Co);_injector=N(Pe);_isDestroyed=!1;constructor(){super(),this._config=N(Hs,{optional:!0})||new Hs,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}attachDomPortal=n=>{this._portalOutlet.hasAttached();let r=this._portalOutlet.attachDomPortal(n);return this._contentAttached(),r};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{o(),s(),n.removeAttribute("tabindex")},o=this._renderer.listen(n,"blur",i),s=this._renderer.listen(n,"mousedown",i)})),n.focus(r)}_focusByCssSelector(n,r){let i=this._elementRef.nativeElement.querySelector(n);i&&this._forceFocus(i,r)}_trapFocus(n){this._isDestroyed||wo(()=>{let r=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||r.focus(n);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(n)||this._focusDialogContainer(n);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',n);break;default:this._focusByCssSelector(this._config.autoFocus,n);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let i=xl(),o=this._elementRef.nativeElement;(!i||i===this._document.body||i===o||o.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(n){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus(n)}_containsFocus(){let n=this._elementRef.nativeElement,r=xl();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=xl()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=je({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(n&1&&cc(_p,7),n&2){let i;uc(i=hc())&&(r._portalOutlet=i.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){n&2&&va("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},features:[Ei],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){n&1&&pe(0,DA,0,0,"ng-template",0)},dependencies:[_p],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
|
|
32
|
+
`],encapsulation:2})}return t})(),us=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new dt;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(t,e){this.overlayRef=t,this.config=e,this.disableClose=e.disableClose,this.backdropClick=t.backdropClick(),this.keydownEvents=t.keydownEvents(),this.outsidePointerEvents=t.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(n=>{n.keyCode===27&&!this.disableClose&&!mA(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=t.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(t,e){if(this.containerInstance){let n=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(t),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(t="",e=""){return this.overlayRef.updateSize({width:t,height:e}),this}addPanelClass(t){return this.overlayRef.addPanelClass(t),this}removePanelClass(t){return this.overlayRef.removePanelClass(t),this}},kA=new Et("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=N(T_);return()=>t.scrollStrategies.block()}}),O_=new Et("DialogData"),AA=new Et("DefaultDialogConfig"),PA=(()=>{class t{_overlay=N(T_);_injector=N(Pe);_defaultOptions=N(AA,{optional:!0});_parentDialog=N(t,{optional:!0,skipSelf:!0});_overlayContainer=N(Bh);_idGenerator=N(c_);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new dt;_afterOpenedAtThisLevel=new dt;_ariaHiddenElements=new Map;_scrollStrategy=N(kA);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=Vb(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(yg(void 0)));constructor(){}open(n,r){let i=this._defaultOptions||new Hs;r=L(L({},i),r),r.id=r.id||this._idGenerator.getId("cdk-dialog-"),r.id&&this.getDialogById(r.id);let o=this._getOverlayConfig(r),s=this._overlay.create(o),a=new us(s,r),l=this._attachContainer(s,a,r);return a.containerInstance=l,this._attachDialogContent(n,a,l,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){Ol(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){Ol(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),Ol(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new S_({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(r.backdropClass=n.backdropClass),r}_attachContainer(n,r,i){let o=i.injector||i.viewContainerRef?.injector,s=[{provide:Hs,useValue:i},{provide:us,useValue:r},{provide:Fh,useValue:n}],a;i.container?typeof i.container=="function"?a=i.container:(a=i.container.type,s.push(...i.container.providers(i))):a=NA;let l=new Yc(a,i.viewContainerRef,Pe.create({parent:o||this._injector,providers:s}));return n.attach(l).instance}_attachDialogContent(n,r,i,o){if(n instanceof no){let s=this._createInjector(o,r,i,void 0),a={$implicit:o.data,dialogRef:r};o.templateContext&&(a=L(L({},a),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),i.attachTemplatePortal(new __(n,null,a,s))}else{let s=this._createInjector(o,r,i,this._injector),a=i.attachComponentPortal(new Yc(n,o.viewContainerRef,s));r.componentRef=a,r.componentInstance=a.instance}}_createInjector(n,r,i,o){let s=n.injector||n.viewContainerRef?.injector,a=[{provide:O_,useValue:n.data},{provide:us,useValue:r}];return n.providers&&(typeof n.providers=="function"?a.push(...n.providers(r,n,i)):a.push(...n.providers)),n.direction&&(!s||!s.get(Bs,null,{optional:!0}))&&a.push({provide:Bs,useValue:{value:n.direction,change:fu()}}),Pe.create({parent:s||o,providers:a})}_removeOpenDialog(n,r){let i=this.openDialogs.indexOf(n);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let r=n.parentElement.children;for(let i=r.length-1;i>-1;i--){let o=r[i];o!==n&&o.nodeName!=="SCRIPT"&&o.nodeName!=="STYLE"&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ol(t,e){let n=t.length;for(;n--;)e(t[n])}var LA=Cg;function MA(t){return!!t[LA]}var jA=Symbol("__destroy"),R_=Symbol("__decoratorApplied");function D_(t){return typeof t=="string"?Symbol(`__destroy__${t}`):jA}function VA(t){t.prototype[R_]=!0}function N_(t,e){t[e]||(t[e]=new dt)}function k_(t,e){t[e]&&(t[e].next(),t[e].complete(),t[e]=null)}function A_(t){t instanceof ye&&t.unsubscribe()}function BA(t){Array.isArray(t)&&t.forEach(A_)}function P_(t,e){return function(){if(t&&t.call(this),k_(this,D_()),e.arrayName&&BA(this[e.arrayName]),e.checkProperties)for(let n in this)e.blackList?.includes(n)||A_(this[n])}}function FA(t,e){t.prototype.ngOnDestroy=P_(t.prototype.ngOnDestroy,e)}function UA(t,e){let n=t.\u0275pipe;n.onDestroy=P_(n.onDestroy,e)}function HA(t={}){return e=>{MA(e)?UA(e,t):FA(e,t),VA(e)}}var Rp=7,Dp=Symbol("CheckerHasBeenSet");function $A(t,e){t[Dp]||zA()||(Np(()=>Ys(Promise.resolve()).pipe(Wi(()=>{let n;try{n=Z1(t)}catch{n=null}let r=n?.lView;if(r==null)return hu;let i=r[Rp]||(r[Rp]=[]),o=new dt;return i.push(function(){Np(()=>{o.next(),o.complete()})}),o}),Wi(()=>Promise.resolve())).subscribe(()=>{(e.observed??e.observers.length>0)&&console.warn(qA(t))})),t[Dp]=!0)}function zA(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"}function Np(t){let e=Gi.Zone;return e&&typeof e.root?.run=="function"?e.root.run(t):t()}function qA(t){return`
|
|
33
|
+
The ${t.constructor.name} still has subscriptions that haven't been unsubscribed.
|
|
81
34
|
This may happen if the class extends another class decorated with @UntilDestroy().
|
|
82
35
|
The child class implements its own ngOnDestroy() method but doesn't call super.ngOnDestroy().
|
|
83
36
|
Let's look at the following example:
|
|
@@ -113,5 +66,5 @@ mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
|
|
|
113
66
|
super.ngOnDestroy();
|
|
114
67
|
}
|
|
115
68
|
}
|
|
116
|
-
`}var WE=!1;function XU(e,t,n){let r=e[t];if(WE&&typeof r!="function")throw new Error(`${e.constructor.name} is using untilDestroyed but doesn't implement ${t}`);hR(e,n),e[t]=function(){r.apply(this,arguments),mR(this,n),e[t]=r}}function _R(e,t){return n=>{let r=pR(t);typeof t=="string"?XU(e,t,r):(WE&&JU(e),hR(e,r));let i=e[r];return WE&&YU(e,i),n.pipe(mr(i))}}function JU(e){let t=Object.getPrototypeOf(e);if(!(fR in t))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var CR=Re(Jf()),ER=Re(Jf()),Mh=class S_{engagementTrigger;isMobile;ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData,this.isMobile=new ER.default().getDevice().type==="mobile"}static \u0275fac=function(t){return new(t||S_)};static \u0275cmp=st({type:S_,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(t,n){},encapsulation:2})},GE=Re(Yn());function QU(e,t){e&1&&bt(0," Open Cart ")}function eH(e,t){e&1&&bt(0," Add To Cart ")}var Oh=class C_{item;performCTA=new Je;atcClicked=!1;clickAddToCart(t){t.stopPropagation(),this.performCTA.emit({item:this.item,cta:this.atcClicked?GE.ClickActionType.OPEN_CART:GE.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(t){return new(t||C_)};static \u0275cmp=st({type:C_,selectors:[["cooee-product-card"]],inputs:{item:"item"},outputs:{performCTA:"performCTA"},decls:12,vars:11,consts:[[1,"lc-item-card"],[1,"lc-card-content"],[1,"lc-item-image",3,"alt","src"],[1,"lc-product-details"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-cta-button",3,"click"]],template:function(t,n){t&1&&(Z(0,"div",0)(1,"div",1),Ne(2,"img",2),Z(3,"div",3)(4,"div",4),bt(5),X(),Ne(6,"div",5),Dn(7,"cooeeCurrency"),Dn(8,"safeHtml"),X()(),Z(9,"button",6),wt("click",function(r){return n.clickAddToCart(r)}),pt(10,QU,1,0)(11,eH,1,0),X()()),t&2&&(q(2),qn("alt",n.item.name),Ve("src",n.item.imageURL,an),q(3),rr(" ",n.item.name," "),q(),Ve("innerHTML",Nn(8,9,Nn(7,7,n.item.price)),Ur),q(3),vo("atc-clicked",n.atcClicked),q(),xt(n.atcClicked?10:11))},dependencies:[fi,pi],styles:["[_nghost-%COMP%]{display:block;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:#ffffff80;border-radius:7px;cursor:pointer}.lc-item-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px}.lc-card-content[_ngcontent-%COMP%]{display:flex;gap:8px;width:100%;align-items:start}.lc-item-image[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:cover;box-sizing:border-box;border-radius:7px}.lc-product-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.5px;font-size:10.5px}.lc-item-name[_ngcontent-%COMP%]{font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;line-height:normal}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal}.lc-cta-button[_ngcontent-%COMP%]{padding:12px 8px;border:none;border-radius:8px;width:100%;background:#f6339a;text-align:center;font-weight:500;cursor:pointer;color:#fff;font-size:16px}.lc-cta-button.atc-clicked[_ngcontent-%COMP%]{background:#000}"]})},kh=Re(Yn()),wR=Re(D_()),tH=(0,wR.default)(fetch),Ph=class{static async getAjaxItem(e){let t=this.getItemSlug(e);if(!t)return;let n,r=Rt.getRootPrefix()+`products/${t}.js`;try{n=await(await tH(r)).json()}catch(i){b.error(`Failed to fetch ${r}`,i);let s=St.getInstance();i instanceof Response?s.captureMessage(`Shopify product fetch failed ${i.status}`,"error",{mID:e.mID,path:r}):s.captureException(i,{mID:e.mID,path:r});return}if(!n){b.error("Item not found after AJAX call for:",e.mID);return}return n}static getItemSlug(e){if(e.link)try{let t=new URL(e.link).pathname.match(/\/products\/([^/]+?)(?:\.html)?$/);return t?t[1]:void 0}catch{return}}},nH=(e,t)=>t.id;function rH(e,t){if(e&1&&Ne(0,"img",9),e&2){let n=t.$implicit,r=de(2);Ve("src",n,an)("alt",r.item.name)}}function iH(e,t){if(e&1&&en(0,rH,1,2,"img",9,as),e&2){let n=de();tn(n.ajaxItem.images)}}function oH(e,t){if(e&1&&Ne(0,"img",9),e&2){let n=de();Ve("src",n.item.imageURL,an)("alt",n.item.name)}}function sH(e,t){if(e&1&&(Ne(0,"span",12),Dn(1,"cooeeCurrency"),Dn(2,"safeHtml")),e&2){let n=de();Ve("innerHTML",Nn(2,3,Nn(1,1,(n.selectedVariant==null?null:n.selectedVariant.price)/100)),Ur)}}function aH(e,t){if(e&1&&(Ne(0,"span",12),Dn(1,"cooeeCurrency"),Dn(2,"safeHtml")),e&2){let n=de();Ve("innerHTML",Nn(2,3,Nn(1,1,n.item.price)),Ur)}}function cH(e,t){if(e&1){let n=nr();Z(0,"div",18),wt("click",function(){let r=Jt(n).$implicit,i=de(2);return Qt(i.selectedVariant=r)})("keydown",function(){let r=Jt(n).$implicit,i=de(2);return Qt(i.selectedVariant=r)}),Z(1,"span",19),bt(2),X()()}if(e&2){let n=t.$implicit,r=de(2);vo("lc-selected-variant",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id),q(2),Sa(n.title)}}function lH(e,t){if(e&1&&(Z(0,"div",13),en(1,cH,3,3,"div",17,nH),X()),e&2){let n=de();q(),tn(n.availableVariants)}}function uH(e,t){if(e&1&&(Z(0,"div",20),bt(1,"Description"),X(),Ne(2,"div",21),Dn(3,"safeHtml")),e&2){let n=de();q(2),Ve("innerHTML",Nn(3,1,n.ajaxItem==null?null:n.ajaxItem.description),Ur)}}function dH(e,t){e&1&&bt(0," Open Cart ")}function fH(e,t){e&1&&bt(0," Add To Cart ")}var Lh=class N_{constructor(t){this.cd=t}item;closeModel=new Je;performCTA=new Je;atcClicked=!1;selectedVariant=null;availableVariants=[];ajaxItem;ClickActionType=kh.ClickActionType;async ngOnInit(){this.ajaxItem=await Ph.getAjaxItem(this.item),this.processVariants(),this.cd.markForCheck()}closeDialog(){this.closeModel.emit()}clickAddToCart(t){t.vID=this.selectedVariant?.id,t.vName=this.selectedVariant?.public_title,this.performCTA.emit({item:t,cta:this.atcClicked?kh.ClickActionType.OPEN_CART:kh.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}processVariants(){this.availableVariants=this.ajaxItem?.variants??[],this.selectedVariant=this.availableVariants[0]}static \u0275fac=function(t){return new(t||N_)(kt(ir))};static \u0275cmp=st({type:N_,selectors:[["cooee-product-modal"]],inputs:{item:"item"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:25,vars:6,consts:[[1,"lc-card-wrapper"],[1,"lc-card-header"],[1,"lc-header"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","fill","#000"],["d","M0 0h24v24H0V0z","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 12 19 6.41z"],[1,"lc-card-content"],[1,"lc-image-strip"],[1,"w-28","h-28","object-contain",3,"src","alt"],[1,"lc-inner-body"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-variant-list"],[1,"lc-card-footer"],[1,"lc-cta-button",3,"click"],[1,"lc-more-info-button",3,"click"],["tabindex","{0}",1,"lc-variant",3,"lc-selected-variant"],["tabindex","{0}",1,"lc-variant",3,"click","keydown"],[1,"truncate","max-w-[200px]"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(t,n){t&1&&(Z(0,"div",0)(1,"div",1)(2,"div",2),bt(3,"Shop Now"),X(),Z(4,"button",3),wt("click",function(){return n.closeDialog()}),_r(),Z(5,"svg",4),Ne(6,"path",5)(7,"path",6),X()()(),is(),Z(8,"div",7)(9,"div",8),pt(10,iH,2,0)(11,oH,1,2,"img",9),X(),Z(12,"div",10)(13,"div",11),bt(14),X(),pt(15,sH,3,5,"span",12)(16,aH,3,5,"span",12)(17,lH,3,0,"div",13)(18,uH,4,3),X()(),Z(19,"div",14)(20,"button",15),wt("click",function(){return n.clickAddToCart(n.item)}),pt(21,dH,1,0)(22,fH,1,0),X(),Z(23,"button",16),wt("click",function(){return n.performCTA.emit({item:n.item,cta:n.ClickActionType.GO_TO_PRODUCT})}),bt(24," More Info "),X()()()),t&2&&(q(10),xt(!(n.ajaxItem==null||n.ajaxItem.images==null)&&n.ajaxItem.images.length?10:11),q(4),Sa(n.item.name),q(),xt(n.selectedVariant!=null&&n.selectedVariant.price?15:16),q(2),xt(n.availableVariants[0]!=null&&n.availableVariants[0].title!=="Default Title"?17:-1),q(),xt(n.ajaxItem!=null&&n.ajaxItem.description?18:-1),q(3),xt(n.atcClicked?21:22))},dependencies:[pi,fi],styles:["[_nghost-%COMP%]{display:block;background:#fff;height:70vh;border-top-left-radius:16px;border-top-right-radius:16px}.lc-card-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%}.lc-card-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:8px 16px;border-bottom:1px solid var(--lc-color-gray-300)}.lc-header[_ngcontent-%COMP%]{font-size:24px;font-weight:500}.lc-close-button[_ngcontent-%COMP%]{background:transparent;border:none;width:36px;height:36px}.lc-close-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#000000b3}.lc-card-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}.lc-inner-body[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:8px}.lc-image-strip[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:auto;gap:.5rem;flex-wrap:nowrap}.lc-image-strip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto;height:200px}.lc-item-name[_ngcontent-%COMP%]{font-size:20px;font-weight:500;line-height:normal}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500}.lc-variant-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;padding-top:.5rem;width:100%}.lc-variant[_ngcontent-%COMP%]{padding:4px 8px;border-radius:4px;background-color:#f3f4f6;color:#1f2937;font-size:12px;cursor:pointer;border:1px solid #e5e7eb;display:flex;align-items:center;gap:4px}.lc-selected-variant[_ngcontent-%COMP%]{background-color:#fce8f3;border:1px solid #F8B4D9;color:#db2777}.lc-description-title[_ngcontent-%COMP%]{font-size:18px;font-weight:500;margin-top:8px;line-height:normal}.lc-description[_ngcontent-%COMP%]{line-height:normal}.lc-card-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:12px;background-color:#0000004d;box-shadow:0 4px 6px #52525b4d;gap:12px}.lc-cta-button[_ngcontent-%COMP%], .lc-more-info-button[_ngcontent-%COMP%]{width:50%;padding:12px;border:none;border-radius:.5rem;font-weight:600;display:flex;justify-content:center;cursor:pointer;font-size:16px}.lc-cta-button[_ngcontent-%COMP%]{background-color:#000;color:#fff}.lc-more-info-button[_ngcontent-%COMP%]{background-color:#ffe4e6;color:#db2777}"]})};function pH(e,t){e&1&&(_r(),Z(0,"svg",1),Ne(1,"path",2)(2,"path",3),X())}function hH(e,t){e&1&&(_r(),Z(0,"svg",1),Ne(1,"path",2)(2,"path",4),X())}var Fh=class zE{muted;buttonClicked=new Je;static \u0275fac=function(t){return new(t||zE)};static \u0275cmp=st({type:zE,selectors:[["cooee-mute-toggle"]],inputs:{muted:"muted"},outputs:{buttonClicked:"buttonClicked"},decls:3,vars:1,consts:[[1,"lc-mute-button","lc:bg-black/50",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#fff"],["d","M0 0h24v24H0V0z","fill","none"],["d","M4.34 2.93L2.93 4.34 7.29 8.7 7 9H3v6h4l5 5v-6.59l4.18 4.18c-.65.49-1.38.88-2.18 1.11v2.06c1.34-.3 2.57-.92 3.61-1.75l2.05 2.05 1.41-1.41L4.34 2.93zM10 15.17L7.83 13H5v-2h2.83l.88-.88L10 11.41v3.76zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zm-7-8l-1.88 1.88L12 7.76zm4.5 8c0-1.77-1.02-3.29-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24z"],["d","M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12c0-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.77 0-4.28-2.99-7.86-7-8.77z"]],template:function(t,n){t&1&&(Z(0,"button",0),wt("click",function(){return n.buttonClicked.emit()}),pt(1,pH,3,0,":svg:svg",1)(2,hH,3,0,":svg:svg",1),X()),t&2&&(q(),xt(n.muted?1:2))},styles:["button[_ngcontent-%COMP%]{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border:none;cursor:pointer;border-radius:100%}"]})},Bh=class qE{width;static \u0275fac=function(t){return new(t||qE)};static \u0275cmp=st({type:qE,selectors:[["cooee-video-progress-bar"]],inputs:{width:"width"},decls:5,vars:2,consts:[[1,"lc:absolute","lc:top-1","lc:w-full","lc:z-10"],[1,"lc:px-2"],[1,"lc:h-1","lc:w-full","lc:bg-gray-700","lc:mb-2"],[1,"lc:h-1","lc:bg-pink-500"]],template:function(t,n){t&1&&(Z(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Ne(4,"div"),X()()()()),t&2&&(q(3),yo("width",n.width,"%"))},encapsulation:2})},mH=["swiperContainer"],gH=["videoPlayers"],bR=(e,t)=>t.url,yH=(e,t)=>t.mID;function vH(e,t){if(e&1&&Ne(0,"source",12),e&2){let n=t.$implicit;qn("type",n.mimeType),zi("media","(max-width: ",n.width,"px)"),Ve("src",n.url,an)}}function _H(e,t){if(e&1&&Ne(0,"source",13),e&2){let n=t.$implicit;qn("type",n.mimeType),Ve("src",n.url,an)}}function EH(e,t){e&1&&Hd(0)}function wH(e,t){if(e&1){let n=nr();Z(0,"cooee-product-modal",21),wt("performCTA",function(r){Jt(n);let i=de(3);return Qt(i.performClickToAction(r,i.selectedVideo))})("closeModel",function(){Jt(n);let r=de(3);return Qt(r.productModalClosed())}),X()}if(e&2){let n=de(3);Ve("item",n.selectedItem)}}function bH(e,t){if(e&1){let n=nr();Z(0,"cooee-product-card",22),wt("performCTA",function(r){Jt(n);let i=de(2).$implicit,s=de();return Qt(s.performClickToAction(r,i))})("click",function(){let r=Jt(n).$implicit,i=de(2).$implicit,s=de();return Qt(s.productCardClicked(r,i))}),X()}if(e&2){let n=t.$implicit;Ve("item",n)}}function CH(e,t){if(e&1){let n=nr();Ne(0,"cooee-video-progress-bar",14),Z(1,"div",15)(2,"cooee-mute-toggle",16),wt("buttonClicked",function(){Jt(n);let r=de(2);return Qt(r.toggleMute())}),X(),pt(3,EH,1,0,"ng-container",10),X(),pt(4,wH,1,1,"cooee-product-modal",17),Z(5,"div",18)(6,"div",19),en(7,bH,1,1,"cooee-product-card",20,yH),X()()}if(e&2){let n=de(),r=n.$implicit,i=n.$index,s=de(),o=Dy(11);Ve("width",s.videoProgress[i]||0),q(2),Ve("muted",s.muted),q(),Ve("ngTemplateOutlet",o),q(),xt(s.selectedItem?4:-1),q(3),tn(r.items)}}function SH(e,t){if(e&1){let n=nr();Z(0,"div",6)(1,"video",11,2),wt("timeupdate",function(r){let i=Jt(n).$index,s=de();return Qt(s.updateProgress(r,i))})("click",function(){let r=Jt(n).$index,i=de();return Qt(i.currentIndex===r&&i.toggleMute())})("ended",function(){Jt(n);let r=de();return Qt(r.onVideoEnded())}),en(3,vH,1,4,"source",12,bR),en(5,_H,1,2,"source",13,bR),X(),pt(7,CH,9,4),X()}if(e&2){let n=t.$implicit,r=t.$index,i=de();q(),Ve("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,an),Ea("data-video-id",n.id),q(2),tn(n.sources),q(2),tn(i.VideoUtils.getBestSources(n.sources)),q(2),xt(i.currentIndex===r?7:-1)}}function DH(e,t){e&1&&Hd(0)}function IH(e,t){if(e&1){let n=nr();Z(0,"button",23),wt("click",function(){Jt(n);let r=de();return Qt(r.close())}),_r(),Z(1,"svg",24),Ne(2,"path",25)(3,"path",26),X()()}}var Yr=class extends Mh{constructor(e,t,n,r){super(),this.cdr=e,this.elementRef=t,this.dialogRef=n,this.data=r,this.videos=r.videos,this.currentIndex=r.currentIndex,this.triggerContext=r.triggerContext}videos=[];currentIndex=0;swiperContainerRef;videoPlayers;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;VideoUtils=ko;onResize(){this.isMobile=new CR.default().getDevice().type==="mobile",this.swiperInstance?.destroy?.(),this.initSwiper()}ngOnInit(){super.ngOnInit();let e=this.elementRef.nativeElement.shadowRoot,t=Ct.get().website.commonCSS;Ot.injectRawCSS(t,e),Ot.injectStylesheet(mn.styleURL,e),Ot.injectSwiperCSS(e)}ngAfterViewInit(){Ni(this.getCurrentVideoElement(),"loadeddata").pipe(_R(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(e=this.videos[this.currentIndex],t=this.currentIndex){let n=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:e,lastVideoIndex:t,lastVideoDuration:n?.currentTime})}performClickToAction(e,t){this.data.onCTAPerformed({cta:e.cta,item:e.item,video:t})}getCurrentVideoElement(){return this.videoPlayers.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0,this.swiperInstance.enable()}pauseAll(){this.videoPlayers.forEach(e=>e.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoPlayers.forEach(t=>t.nativeElement.muted=this.muted);let e=[this.muted?k.EVENT_VIDEO_MUTED:k.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(e),await rt.set(ge.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let e=this.getCurrentVideoElement();e&&(e.currentTime=1,e.play().then(async()=>{this.muted=await rt.get(ge.MUTED,!1),e.muted=this.muted}))}onVideoEnded(){if(this.currentIndex<this.videos.length-1)if(this.selectedItem){let e=this.getCurrentVideoElement();e.currentTime=0,e.play()}else this.moveToNextVideo();else{let e=this.videoPlayers.last;if(e){let t=this.getPreviousVideoDataForEvent(),n=[k.EVENT_LAST_VIDEO_ENDED,{previous:t},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),e.nativeElement.currentTime=0,e.nativeElement.play()}}}updateProgress(e,t){let n=e.target;this.videoProgress[t]=n.currentTime/n.duration*100,this.cdr.detectChanges()}onSlideChange(e){let t=this.getPreviousVideoDataForEvent();this.currentIndex=e.realIndex,this.cdr.detectChanges(),this.playActiveVideo(),this.selectedItem=null,delete this.selectedVideo;let n=this.currentVideoProps(),r={previous:t,current:n},i=[k.EVENT_VIDEO_CHANGE,r,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i)}productCardClicked(e,t){let n={videoID:t.id,videoIndex:this.currentIndex},r=[k.EVENT_MORE_ITEM_INFO_CLICKED,{current:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),this.selectedItem=e,this.selectedVideo=t,this.swiperInstance.disable()}initSwiper(){this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:1,initialSlide:this.currentIndex,centeredSlides:!0,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!0},breakpoints:{1280:{slidesPerView:3}},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperInstance.on("slideChange",e=>{this.onSlideChange(e)}),this.playActiveVideo()}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let e=this.currentVideoProps(),t=this.videoPlayers.find(r=>r.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;e.playedTillMS=Math.ceil(t?.currentTime*1e3);let n=t?.duration*1e3;return e.playedTillPercent=+(e.playedTillMS/n).toFixed(4),e}};Yh(Yr,"\u0275fac",function(e){return new(e||Yr)(kt(ir),kt(yt),kt($s),kt($E))}),Yh(Yr,"\u0275cmp",st({type:Yr,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(e,t){if(e&1&&(wa(mH,5),wa(gH,5)),e&2){let n;ba(n=Ca())&&(t.swiperContainerRef=n.first),ba(n=Ca())&&(t.videoPlayers=n)}},hostBindings:function(e,t){e&1&&wt("resize",function(){return t.onResize()},!1,u0)},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[wr],decls:12,vars:1,consts:[["swiperContainer",""],["closeButtonTemplate",""],["videoPlayers",""],[1,"lc-shadow-inner"],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],[1,"swiper-button-prev"],[1,"swiper-button-next"],[1,"lc-desktop-controls"],[4,"ngTemplateOutlet"],["playsinline","","preload","metadata",3,"timeupdate","click","ended","autoplay","muted","poster"],[3,"src","type","media"],[3,"src","type"],[3,"width"],[1,"lc-video-controls"],[3,"buttonClicked","muted"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full",3,"item"],[1,"lc-card-container"],[1,"lc-card-scroll"],[3,"item"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full",3,"performCTA","closeModel","item"],[3,"performCTA","click","item"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","#fff"],["d","M0 0h24v24H0V0z","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 12 19 6.41z"]],template:function(e,t){if(e&1&&(Z(0,"div",3)(1,"div",4,0)(3,"div",5),en(4,SH,8,5,"div",6,as),X(),Ne(6,"div",7)(7,"div",8),X(),Z(8,"div",9),pt(9,DH,1,0,"ng-container",10),X()(),pt(10,IH,4,0,"ng-template",null,1,oS)),e&2){let n=Dy(11);q(4),tn(t.videos),q(5),Ve("ngTemplateOutlet",n)}},dependencies:[Oh,Lh,Fh,Bh,_S],styles:[`.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media (min-width: 768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.swiper-container{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}@media (min-width: 768px){.swiper-container{width:100%;height:100%;max-width:90vw;max-height:90vh}}.swiper-wrapper{max-height:100%}@media (max-width: 768px){.swiper-button-prev,.swiper-button-next{display:none!important}}.swiper-slide{position:relative;display:flex;align-items:center;visibility:hidden}@media (min-width: 768px){.swiper-slide{border-radius:12px;overflow:hidden}}.swiper-slide.swiper-slide-active,.swiper-slide.swiper-slide-prev,.swiper-slide.swiper-slide-next{visibility:visible}video{width:100%;height:100%;object-fit:cover;z-index:-1}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media (max-width: 768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}.lc-video-controls .lc-close-button{display:block}@media (min-width: 768px){.lc-video-controls .lc-close-button{display:none}}.lc-close-button{border:none;display:flex;justify-content:center;align-items:center;width:40px;height:40px;background:#00000080;border-radius:100%}.lc-close-button svg{width:100%;height:100%}@media (min-width: 768px){.lc-close-button{width:48px;height:48px}}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-card-scroll{display:flex;overflow-x:auto;gap:12px;width:100%;scrollbar-width:none}.lc-card-scroll::-webkit-scrollbar{display:none}.lc-card-scroll cooee-product-card{flex:0 0 auto;width:80%;max-width:300px}.lc-card-scroll:has(>cooee-product-card:only-child) cooee-product-card{width:100%;max-width:none}
|
|
117
|
-
`],encapsulation:3})),
|
|
69
|
+
`}var Jc=!1;function WA(t,e,n){let r=t[e];if(Jc&&typeof r!="function")throw new Error(`${t.constructor.name} is using untilDestroyed but doesn't implement ${e}`);N_(t,n),t[e]=function(){r.apply(this,arguments),k_(this,n),t[e]=r}}function GA(t,e){return n=>{let r=D_(e);typeof e=="string"?WA(t,e,r):(Jc&&ZA(t),N_(t,r));let i=t[r];return Jc&&$A(t,i),n.pipe(ai(i))}}function ZA(t){let e=Object.getPrototypeOf(t);if(!(R_ in e))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}var YA=an(jp()),KA=an(jp()),JA=class Qc{engagementTrigger;isMobile;ngOnInit(){this.engagementTrigger=this.triggerContext?.triggerData,this.isMobile=new KA.default().getDevice().type==="mobile"}static \u0275fac=function(e){return new(e||Qc)};static \u0275cmp=je({type:Qc,selectors:[["cooee-base-video"]],inputs:{triggerContext:"triggerContext"},decls:0,vars:0,template:function(e,n){},encapsulation:2})},kp=an(ho());function QA(t,e){t&1&&he(0," Open Cart ")}function XA(t,e){t&1&&he(0," Add To Cart ")}var tP=class Xc{item;performCTA=new ee;atcClicked=!1;clickAddToCart(e){e.stopPropagation(),this.performCTA.emit({item:this.item,cta:this.atcClicked?kp.ClickActionType.OPEN_CART:kp.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}static \u0275fac=function(e){return new(e||Xc)};static \u0275cmp=je({type:Xc,selectors:[["cooee-product-card"]],inputs:{item:"item"},outputs:{performCTA:"performCTA"},decls:12,vars:11,consts:[[1,"lc-item-card"],[1,"lc-card-content"],[1,"lc-item-image",3,"alt","src"],[1,"lc-product-details"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-cta-button",3,"click"]],template:function(e,n){e&1&&(Y(0,"div",0)(1,"div",1),jt(2,"img",2),Y(3,"div",3)(4,"div",4),he(5),K(),jt(6,"div",5),Ge(7,"cooeeCurrency"),Ge(8,"safeHtml"),K()(),Y(9,"button",6),ue("click",function(r){return n.clickAddToCart(r)}),pe(10,QA,1,0)(11,XA,1,0),K()()),e&2&&(z(2),Nn("alt",n.item.name),Mt("src",n.item.imageURL,Ye),z(3),On(" ",n.item.name," "),z(),Mt("innerHTML",on(8,9,on(7,7,n.item.price)),Hr),z(3),_a("atc-clicked",n.atcClicked),z(),ve(n.atcClicked?10:11))},dependencies:[Ta,Oa],styles:["[_nghost-%COMP%]{display:block;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:#ffffff80;border-radius:7px;cursor:pointer}.lc-item-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px}.lc-card-content[_ngcontent-%COMP%]{display:flex;gap:8px;width:100%;align-items:start}.lc-item-image[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:cover;box-sizing:border-box;border-radius:7px}.lc-product-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3.5px;font-size:10.5px}.lc-item-name[_ngcontent-%COMP%]{font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;line-height:normal}.lc-item-price[_ngcontent-%COMP%]{font-size:16px;line-height:normal}.lc-cta-button[_ngcontent-%COMP%]{padding:12px 8px;border:none;border-radius:8px;width:100%;background:#f6339a;text-align:center;font-weight:500;cursor:pointer;color:#fff;font-size:16px}.lc-cta-button.atc-clicked[_ngcontent-%COMP%]{background:#000}"]})},Rl=an(ho());function eP(){return window.Shopify?.routes?.root??"/"}var nP=an(P0()),rP=(0,nP.default)(fetch),iP=class{static async getAjaxItem(t){let e=this.getItemSlug(t);if(!e)return;let n,r=eP()+`products/${e}.js`;try{n=await(await rP(r)).json()}catch(i){$e.error(`Failed to fetch ${r}`,i);let o=Vy.getInstance();i instanceof Response?o.captureMessage(`Shopify product fetch failed ${i.status}`,"error",{mID:t.mID,path:r}):o.captureException(i,{mID:t.mID,path:r});return}if(!n){$e.error("Item not found after AJAX call for:",t.mID);return}return n}static getItemSlug(t){if(t.link)try{let e=new URL(t.link).pathname.match(/\/products\/([^/]+?)(?:\.html)?$/);return e?e[1]:void 0}catch{return}}},oP=(t,e)=>e.id;function sP(t,e){if(t&1&&jt(0,"img",9),t&2){let n=e.$implicit,r=at(2);Mt("src",n,Ye)("alt",r.item.name)}}function aP(t,e){if(t&1&&Le(0,sP,1,2,"img",9,ba),t&2){let n=at();Me(n.ajaxItem.images)}}function lP(t,e){if(t&1&&jt(0,"img",9),t&2){let n=at();Mt("src",n.item.imageURL,Ye)("alt",n.item.name)}}function cP(t,e){if(t&1&&(jt(0,"span",12),Ge(1,"cooeeCurrency"),Ge(2,"safeHtml")),t&2){let n=at();Mt("innerHTML",on(2,3,on(1,1,(n.selectedVariant==null?null:n.selectedVariant.price)/100)),Hr)}}function uP(t,e){if(t&1&&(jt(0,"span",12),Ge(1,"cooeeCurrency"),Ge(2,"safeHtml")),t&2){let n=at();Mt("innerHTML",on(2,3,on(1,1,n.item.price)),Hr)}}function hP(t,e){if(t&1){let n=Dn();Y(0,"div",18),ue("click",function(){let r=we(n).$implicit,i=at(2);return Ee(i.selectedVariant=r)})("keydown",function(){let r=we(n).$implicit,i=at(2);return Ee(i.selectedVariant=r)}),Y(1,"span",19),he(2),K()()}if(t&2){let n=e.$implicit,r=at(2);_a("lc-selected-variant",(r.selectedVariant==null?null:r.selectedVariant.id)===n.id),z(2),wa(n.title)}}function dP(t,e){if(t&1&&(Y(0,"div",13),Le(1,hP,3,3,"div",17,oP),K()),t&2){let n=at();z(),Me(n.availableVariants)}}function fP(t,e){if(t&1&&(Y(0,"div",20),he(1,"Description"),K(),jt(2,"div",21),Ge(3,"safeHtml")),t&2){let n=at();z(2),Mt("innerHTML",on(3,1,n.ajaxItem==null?null:n.ajaxItem.description),Hr)}}function pP(t,e){t&1&&he(0," Open Cart ")}function gP(t,e){t&1&&he(0," Add To Cart ")}var mP=class tu{constructor(e){this.cd=e}item;closeModel=new ee;performCTA=new ee;atcClicked=!1;selectedVariant=null;availableVariants=[];ajaxItem;ClickActionType=Rl.ClickActionType;async ngOnInit(){this.ajaxItem=await iP.getAjaxItem(this.item),this.processVariants(),this.cd.markForCheck()}closeDialog(){this.closeModel.emit()}clickAddToCart(e){e.vID=this.selectedVariant?.id,e.vName=this.selectedVariant?.public_title,this.performCTA.emit({item:e,cta:this.atcClicked?Rl.ClickActionType.OPEN_CART:Rl.ClickActionType.ADD_TO_CART}),this.atcClicked=!0}processVariants(){this.availableVariants=this.ajaxItem?.variants??[],this.selectedVariant=this.availableVariants[0]}static \u0275fac=function(e){return new(e||tu)(Ce(Co))};static \u0275cmp=je({type:tu,selectors:[["cooee-product-modal"]],inputs:{item:"item"},outputs:{closeModel:"closeModel",performCTA:"performCTA"},decls:25,vars:6,consts:[[1,"lc-card-wrapper"],[1,"lc-card-header"],[1,"lc-header"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","fill","#000"],["d","M0 0h24v24H0V0z","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 12 19 6.41z"],[1,"lc-card-content"],[1,"lc-image-strip"],[1,"w-28","h-28","object-contain",3,"src","alt"],[1,"lc-inner-body"],[1,"lc-item-name"],[1,"lc-item-price",3,"innerHTML"],[1,"lc-variant-list"],[1,"lc-card-footer"],[1,"lc-cta-button",3,"click"],[1,"lc-more-info-button",3,"click"],["tabindex","{0}",1,"lc-variant",3,"lc-selected-variant"],["tabindex","{0}",1,"lc-variant",3,"click","keydown"],[1,"truncate","max-w-[200px]"],[1,"lc-description-title"],[1,"lc-description",3,"innerHTML"]],template:function(e,n){e&1&&(Y(0,"div",0)(1,"div",1)(2,"div",2),he(3,"Shop Now"),K(),Y(4,"button",3),ue("click",function(){return n.closeDialog()}),ar(),Y(5,"svg",4),jt(6,"path",5)(7,"path",6),K()()(),Es(),Y(8,"div",7)(9,"div",8),pe(10,aP,2,0)(11,lP,1,2,"img",9),K(),Y(12,"div",10)(13,"div",11),he(14),K(),pe(15,cP,3,5,"span",12)(16,uP,3,5,"span",12)(17,dP,3,0,"div",13)(18,fP,4,3),K()(),Y(19,"div",14)(20,"button",15),ue("click",function(){return n.clickAddToCart(n.item)}),pe(21,pP,1,0)(22,gP,1,0),K(),Y(23,"button",16),ue("click",function(){return n.performCTA.emit({item:n.item,cta:n.ClickActionType.GO_TO_PRODUCT})}),he(24," More Info "),K()()()),e&2&&(z(10),ve(!(n.ajaxItem==null||n.ajaxItem.images==null)&&n.ajaxItem.images.length?10:11),z(4),wa(n.item.name),z(),ve(n.selectedVariant!=null&&n.selectedVariant.price?15:16),z(2),ve(n.availableVariants[0]!=null&&n.availableVariants[0].title!=="Default Title"?17:-1),z(),ve(n.ajaxItem!=null&&n.ajaxItem.description?18:-1),z(3),ve(n.atcClicked?21:22))},dependencies:[Oa,Ta],styles:["[_nghost-%COMP%]{display:block;background:#fff;height:70vh;border-top-left-radius:16px;border-top-right-radius:16px}.lc-card-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%}.lc-card-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:8px 16px;border-bottom:1px solid var(--lc-color-gray-300)}.lc-header[_ngcontent-%COMP%]{font-size:24px;font-weight:500}.lc-close-button[_ngcontent-%COMP%]{background:transparent;border:none;width:36px;height:36px}.lc-close-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#000000b3}.lc-card-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}.lc-inner-body[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;gap:8px}.lc-image-strip[_ngcontent-%COMP%]{width:100%;display:flex;overflow-x:auto;gap:.5rem;flex-wrap:nowrap}.lc-image-strip[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:auto;height:200px}.lc-item-name[_ngcontent-%COMP%]{font-size:20px;font-weight:500;line-height:normal}.lc-item-price[_ngcontent-%COMP%]{font-size:18px;font-weight:500}.lc-variant-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;padding-top:.5rem;width:100%}.lc-variant[_ngcontent-%COMP%]{padding:4px 8px;border-radius:4px;background-color:#f3f4f6;color:#1f2937;font-size:12px;cursor:pointer;border:1px solid #e5e7eb;display:flex;align-items:center;gap:4px}.lc-selected-variant[_ngcontent-%COMP%]{background-color:#fce8f3;border:1px solid #F8B4D9;color:#db2777}.lc-description-title[_ngcontent-%COMP%]{font-size:18px;font-weight:500;margin-top:8px;line-height:normal}.lc-description[_ngcontent-%COMP%]{line-height:normal}.lc-card-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:12px;background-color:#0000004d;box-shadow:0 4px 6px #52525b4d;gap:12px}.lc-cta-button[_ngcontent-%COMP%], .lc-more-info-button[_ngcontent-%COMP%]{width:50%;padding:12px;border:none;border-radius:.5rem;font-weight:600;display:flex;justify-content:center;cursor:pointer;font-size:16px}.lc-cta-button[_ngcontent-%COMP%]{background-color:#000;color:#fff}.lc-more-info-button[_ngcontent-%COMP%]{background-color:#ffe4e6;color:#db2777}"]})},vP=class eu{width;static \u0275fac=function(e){return new(e||eu)};static \u0275cmp=je({type:eu,selectors:[["cooee-video-progress-bar"]],inputs:{width:"width"},decls:5,vars:2,consts:[[1,"lc:absolute","lc:top-1","lc:w-full","lc:z-10"],[1,"lc:px-2"],[1,"lc:h-1","lc:w-full","lc:bg-gray-700","lc:mb-2"],[1,"lc:h-1","lc:bg-pink-500"]],template:function(e,n){e&1&&(Y(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),jt(4,"div"),K()()()()),e&2&&(z(3),ya("width",n.width,"%"))},encapsulation:2})},yP=["swiperContainer"],_P=["videoEl"],Ap=(t,e)=>e.url,bP=(t,e)=>e.mID;function wP(t,e){if(t&1&&jt(0,"source",12),t&2){let n=e.$implicit;Nn("type",n.mimeType),xi("media","(max-width: ",n.width,"px)"),Mt("src",n.url,Ye)}}function EP(t,e){if(t&1&&jt(0,"source",13),t&2){let n=e.$implicit;Nn("type",n.mimeType),Mt("src",n.url,Ye)}}function xP(t,e){t&1&&ah(0)}function SP(t,e){if(t&1){let n=Dn();Y(0,"cooee-product-modal",21),ue("performCTA",function(r){we(n);let i=at(3);return Ee(i.performClickToAction(r,i.selectedVideo))})("closeModel",function(){we(n);let r=at(3);return Ee(r.productModalClosed())}),K()}if(t&2){let n=at(3);Mt("item",n.selectedItem)}}function IP(t,e){if(t&1){let n=Dn();Y(0,"cooee-product-card",22),ue("performCTA",function(r){we(n);let i=at(2).$implicit,o=at();return Ee(o.performClickToAction(r,i))})("click",function(){let r=we(n).$implicit,i=at(2).$implicit,o=at();return Ee(o.productCardClicked(r,i))}),K()}if(t&2){let n=e.$implicit;Mt("item",n)}}function CP(t,e){if(t&1){let n=Dn();jt(0,"cooee-video-progress-bar",14),Y(1,"div",15)(2,"cooee-mute-toggle",16),ue("toggled",function(){we(n);let r=at(2);return Ee(r.toggleMute())}),K(),pe(3,xP,1,0,"ng-container",10),K(),pe(4,SP,1,1,"cooee-product-modal",17),Y(5,"div",18)(6,"div",19),Le(7,IP,1,1,"cooee-product-card",20,bP),K()()}if(t&2){let n=at(),r=n.$implicit,i=n.$index,o=wr(2),s=at(),a=wr(11);Mt("width",s.videoProgress[i]||0),z(2),Mt("muted",s.muted)("videoEl",o),z(),Mt("ngTemplateOutlet",a),z(),ve(s.selectedItem?4:-1),z(3),Me(r.items)}}function TP(t,e){if(t&1){let n=Dn();Y(0,"div",6)(1,"video",11,2),ue("timeupdate",function(r){let i=we(n).$index,o=at();return Ee(o.updateProgress(r,i))})("click",function(){let r=we(n).$index,i=at();return Ee(i.currentIndex===r&&i.toggleMute())})("ended",function(){we(n);let r=at();return Ee(r.onVideoEnded())}),Le(3,wP,1,4,"source",12,Ap),Le(5,EP,1,2,"source",13,Ap),K(),pe(7,CP,9,5),K()}if(t&2){let n=e.$implicit,r=e.$index,i=at();z(),Mt("autoplay",i.currentIndex===r)("muted",i.muted)("poster",n.thumbnail,Ye),va("data-video-id",n.id),z(2),Me(n.sources),z(2),Me(i.VideoUtils.getBestSources(n.sources)),z(2),ve(i.currentIndex===r?7:-1)}}function OP(t,e){t&1&&ah(0)}function RP(t,e){if(t&1){let n=Dn();Y(0,"button",23),ue("click",function(){we(n);let r=at();return Ee(r.close())}),ar(),Y(1,"svg",24),jt(2,"path",25)(3,"path",26),K()()}}var vr=class extends JA{constructor(t,e,n,r){super(),this.cdr=t,this.elementRef=e,this.dialogRef=n,this.data=r,this.videos=r.videos,this.currentIndex=r.currentIndex,this.triggerContext=r.triggerContext}videos=[];currentIndex=0;swiperContainerRef;videoElements;muted=!1;videoProgress=[];selectedItem=null;selectedVideo;swiperInstance;VideoUtils=Ah;onResize(){this.isMobile=new YA.default().getDevice().type==="mobile",this.swiperInstance?.destroy?.(),this.initSwiper()}ngOnInit(){super.ngOnInit();let t=this.elementRef.nativeElement.shadowRoot,e=fy.get().website.commonCSS;$i.injectRawCSS(e,t),$i.injectStylesheet(so.styleURL,t),$i.injectSwiperCSS(t)}ngAfterViewInit(){Ll(this.getCurrentVideoElement(),"loadeddata").pipe(GA(this)).subscribe(()=>{this.initSwiper()})}ngOnDestroy(){this.swiperInstance?.destroy?.()}close(t=this.videos[this.currentIndex],e=this.currentIndex){let n=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:t,lastVideoIndex:e,lastVideoDuration:n?.currentTime})}performClickToAction(t,e){this.data.onCTAPerformed({cta:t.cta,item:t.item,video:e})}getCurrentVideoElement(){return this.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperInstance.slideTo(this.currentIndex+1)}productModalClosed(){this.selectedItem=null,this.selectedVideo=void 0,this.swiperInstance.enable()}pauseAll(){this.videoElements.forEach(t=>t.nativeElement.pause())}async toggleMute(){this.muted=!this.muted,this.videoElements.forEach(e=>e.nativeElement.muted=this.muted);let t=[this.muted?Se.EVENT_VIDEO_MUTED:Se.EVENT_VIDEO_UNMUTED,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(t),await Vf.set(Mf.MUTED,this.muted),this.cdr.detectChanges()}playActiveVideo(){this.pauseAll();let t=this.getCurrentVideoElement();t&&(t.currentTime=1,t.play().then(async()=>{this.muted=await Vf.get(Mf.MUTED,!1),t.muted=this.muted}))}onVideoEnded(){if(this.currentIndex<this.videos.length-1)if(this.selectedItem){let t=this.getCurrentVideoElement();t.currentTime=0,t.play()}else this.moveToNextVideo();else{let t=this.videoElements.last;if(t){let e=this.getPreviousVideoDataForEvent(),n=[Se.EVENT_LAST_VIDEO_ENDED,{previous:e},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(n),t.nativeElement.currentTime=0,t.nativeElement.play()}}}updateProgress(t,e){let n=t.target;this.videoProgress[e]=n.currentTime/n.duration*100,this.cdr.detectChanges()}onSlideChange(t){let e=this.getPreviousVideoDataForEvent();this.currentIndex=t.realIndex,this.cdr.detectChanges(),this.playActiveVideo(),this.selectedItem=null,delete this.selectedVideo;let n=this.currentVideoProps(),r={previous:e,current:n},i=[Se.EVENT_VIDEO_CHANGE,r,{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(i)}productCardClicked(t,e){let n={videoID:e.id,videoIndex:this.currentIndex},r=[Se.EVENT_MORE_ITEM_INFO_CLICKED,{current:n},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(r),this.selectedItem=t,this.selectedVideo=e,this.swiperInstance.disable()}initSwiper(){this.swiperInstance=new window.Swiper(this.swiperContainerRef.nativeElement,{direction:this.isMobile?"vertical":"horizontal",effect:this.isMobile?"slide":"coverflow",slidesPerView:1,initialSlide:this.currentIndex,centeredSlides:!0,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:!0},breakpoints:{1280:{slidesPerView:3}},navigation:{nextEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-next"),prevEl:this.swiperContainerRef.nativeElement.querySelector(".swiper-button-prev")}}),this.swiperInstance.on("slideChange",t=>{this.onSlideChange(t)}),this.playActiveVideo()}currentVideoProps(){return{videoID:this.videos[this.currentIndex].id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let t=this.currentVideoProps(),e=this.videoElements.find(r=>r.nativeElement.dataset.videoId===this.videos[this.currentIndex].id)?.nativeElement;t.playedTillMS=Math.ceil(e?.currentTime*1e3);let n=e?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/n).toFixed(4),t}};Zh(vr,"\u0275fac",function(t){return new(t||vr)(Ce(Co),Ce(He),Ce(us),Ce(O_))}),Zh(vr,"\u0275cmp",je({type:vr,selectors:[["cooee-video-swiper-dialog"]],viewQuery:function(t,e){if(t&1&&(cc(yP,5),cc(_P,5)),t&2){let n;uc(n=hc())&&(e.swiperContainerRef=n.first),uc(n=hc())&&(e.videoElements=n)}},hostBindings:function(t,e){t&1&&ue("resize",function(){return e.onResize()},!1,ZE)},inputs:{videos:"videos",currentIndex:"currentIndex"},features:[Ei],decls:12,vars:1,consts:[["swiperContainer",""],["closeButtonTemplate",""],["videoEl",""],[1,"lc-shadow-inner"],[1,"swiper-container"],[1,"swiper-wrapper"],[1,"swiper-slide"],[1,"swiper-button-prev"],[1,"swiper-button-next"],[1,"lc-desktop-controls"],[4,"ngTemplateOutlet"],["playsinline","","preload","metadata",3,"timeupdate","click","ended","autoplay","muted","poster"],[3,"src","type","media"],[3,"src","type"],[3,"width"],[1,"lc-video-controls"],[3,"toggled","muted","videoEl"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full",3,"item"],[1,"lc-card-container"],[1,"lc-card-scroll"],[3,"item"],[1,"lc:absolute","lc:bottom-0","lc:z-2147483646","lc:w-full",3,"performCTA","closeModel","item"],[3,"performCTA","click","item"],[1,"lc-close-button",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","#fff"],["d","M0 0h24v24H0V0z","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 12 19 6.41z"]],template:function(t,e){if(t&1&&(Y(0,"div",3)(1,"div",4,0)(3,"div",5),Le(4,TP,8,5,"div",6,ba),K(),jt(6,"div",7)(7,"div",8),K(),Y(8,"div",9),pe(9,OP,1,0,"ng-container",10),K()(),pe(10,RP,4,0,"ng-template",null,1,gC)),t&2){let n=wr(11);z(4),Me(e.videos),z(5),Mt("ngTemplateOutlet",n)}},dependencies:[tP,mP,s_,vP,oT],styles:[`.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media (min-width: 768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.swiper-container{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}@media (min-width: 768px){.swiper-container{width:100%;height:100%;max-width:90vw;max-height:90vh}}.swiper-wrapper{max-height:100%}@media (max-width: 768px){.swiper-button-prev,.swiper-button-next{display:none!important}}.swiper-slide{position:relative;display:flex;align-items:center;visibility:hidden}@media (min-width: 768px){.swiper-slide{border-radius:12px;overflow:hidden}}.swiper-slide.swiper-slide-active,.swiper-slide.swiper-slide-prev,.swiper-slide.swiper-slide-next{visibility:visible}video{width:100%;height:100%;object-fit:cover;z-index:-1}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media (max-width: 768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}.lc-video-controls .lc-close-button{display:block}@media (min-width: 768px){.lc-video-controls .lc-close-button{display:none}}.lc-close-button{border:none;display:flex;justify-content:center;align-items:center;width:40px;height:40px;background:#00000080;border-radius:100%}.lc-close-button svg{width:100%;height:100%}@media (min-width: 768px){.lc-close-button{width:48px;height:48px}}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-card-scroll{display:flex;overflow-x:auto;gap:12px;width:100%;scrollbar-width:none}.lc-card-scroll::-webkit-scrollbar{display:none}.lc-card-scroll cooee-product-card{flex:0 0 auto;width:80%;max-width:300px}.lc-card-scroll:has(>cooee-product-card:only-child) cooee-product-card{width:100%;max-width:none}
|
|
70
|
+
`],encapsulation:3})),vr=I0([HA()],vr);var $s=(t,e)=>e.url;function DP(t,e){if(t&1&&(Y(0,"div",1),he(1),K()),t&2){let n=at();z(),On(" ",n.videoConfig.heading," ")}}function NP(t,e){if(t&1&&jt(0,"source",7),t&2){let n=e.$implicit;Nn("type",n.mimeType),xi("media","(max-width: ",n.width,"px)"),Mt("src",n.url,Ye)}}function kP(t,e){if(t&1&&jt(0,"source",8),t&2){let n=e.$implicit;Nn("type",n.mimeType),Mt("src",n.url,Ye)}}function AP(t,e){if(t&1&&(Y(0,"div",11)(1,"span",13),he(2),K(),jt(3,"span",14),Ge(4,"cooeeCurrency"),Ge(5,"safeHtml"),K()),t&2){at();let n=tr(0);z(2),On(" ",n.name," "),z(),Mt("innerHTML",on(5,4,on(4,2,n.price)),Hr)}}function PP(t,e){if(t&1){let n=Dn();Y(0,"button",15),ue("click",function(){we(n);let r=at().$implicit,i=tr(0),o=at(2);return Ee(o.addToCartClicked(r,i))}),he(1," Add to cart "),K()}}function LP(t,e){if(t&1){let n=Dn();Io(0)(1),Y(2,"div",4)(3,"a",5),ue("click",function(r){let i=we(n),o=i.$implicit,s=i.$index,a=wr(5),l=at(2);return Ee(l.injectScriptAndOpenDialog(r,o,s,a))}),Y(4,"video",6,0),ue("mouseenter",function(){we(n);let r=wr(5);at(2);let i=tr(3);return Ee(i&&r.play())})("mouseleave",function(){we(n);let r=wr(5);at(2);let i=tr(3);return Ee(i&&r.pause())}),Le(6,NP,1,4,"source",7,$s),Le(8,kP,1,2,"source",8,$s),K(),Y(10,"div",9),jt(11,"cooee-mute-toggle",10),K(),pe(12,AP,6,6,"div",11),K(),pe(13,PP,2,0,"button",12),K()}if(t&2){let n=e.$implicit,r=wr(5),i=at(2),o=tr(2),s=tr(4),a=Ui(n.items==null?null:n.items[0])&&i.videoConfig.footerContent==i.VideoConfigFooterContent.FIRST_ITEM;z(4),Mt("muted",!0),va("autoplay",o||null),z(2),Me(n.sources),z(2),Me(i.VideoUtils.getBestSources(n.sources)),z(3),Mt("muted",!0)("videoEl",r),z(),ve(s&&a?12:-1),z(),ve(s&&a?13:-1)}}function MP(t,e){if(t&1&&(Y(0,"div",2),Le(1,LP,14,7,"div",4,ba),K()),t&2){let n=at();z(),Me(n.videos)}}function jP(t,e){if(t&1&&jt(0,"source",7),t&2){let n=e.$implicit;Nn("type",n.mimeType),xi("media","(max-width: ",n.width,"px)"),Mt("src",n.url,Ye)}}function VP(t,e){if(t&1&&jt(0,"source",8),t&2){let n=e.$implicit;Nn("type",n.mimeType),Mt("src",n.url,Ye)}}function BP(t,e){if(t&1){let n=Dn();Y(0,"div",16),ar(),Y(1,"svg",17),jt(2,"circle",18)(3,"circle",19),K(),Es(),Y(4,"div",20)(5,"video",21),ue("click",function(r){let i=we(n),o=i.$implicit,s=i.$index,a=at(2);return Ee(a.injectScriptAndOpenDialog(r,o,s))}),Le(6,jP,1,4,"source",7,$s),Le(8,VP,1,2,"source",8,$s),K()()()}if(t&2){let n=e.$implicit,r=at(2);z(5),Mt("muted",!0),z(),Me(n.sources),z(2),Me(r.VideoUtils.getBestSources(n.sources))}}function FP(t,e){if(t&1&&(Y(0,"div",3),Le(1,BP,10,1,"div",16,ba),K()),t&2){let n=at();z(),Me(n.videos)}}function UP(t,e){if(t&1){let n=Dn();Y(0,"cooee-draggable-video-popup",23),ue("videoClicked",function(){we(n),at();let r=tr(0),i=at();return Ee(i.onPopupVideoClicked(r,0))})("closeClicked",function(){we(n);let r=at(2);return Ee(r.onPopupVideoClosed())}),K()}if(t&2){at();let n=tr(0);Mt("video",n)}}function HP(t,e){if(t&1&&(Io(0),pe(1,UP,1,1,"cooee-draggable-video-popup",22)),t&2){let n=at();Ui(n.videos[0]),z(),ve(n.hidePopupVideo?-1:1)}}var $P=class nu extends $y{constructor(e,n){super(),this.dialog=e,this.cdr=n}videos;VideoUtils=Ah;VideoConfigSource=zy;VideoConfigTemplate=qy;VideoConfigFooterContent=Gy;VideoConfigAutoPlay=Wy;hidePopupVideo;videoConfig;dialogRef=null;ngOnInit(){super.ngOnInit(),$i.loadSwiperScript()}engagementTriggerReceived(e){this.videos=e.content?.videoConfig?.videos,this.videoConfig=e.content?.videoConfig}sendTriggerClicked(e,n){let r=new wl(Se.EVENT_TRIGGER_CLICKED,{},this.triggerContext?.triggerData);r.videos=[e.id],n&&(r.items=[n]),this.sendEventToRenderer(r)}injectScriptAndOpenDialog(e,n,r,i){if(e?.stopPropagation(),e?.preventDefault(),this.videoConfig.footerContent!=="FIRST_ITEM"){i?.play();return}let o=n.items?.[0];this.sendTriggerClicked(n,o),$i.loadSwiperScript().then(()=>this.openDialog(n,r))}async performCTA(e){let n,r=this.triggerContext;if(e.cta===Zo.ClickActionType.ADD_TO_CART)n=Se.EVENT_ADD_TO_CART_CLICKED;else if(e.cta===Zo.ClickActionType.GO_TO_PRODUCT)n=Se.EVENT_VIEW_ITEM_CLICKED;else if(e.cta===Zo.ClickActionType.OPEN_CART)n=Se.EVENT_OPEN_CART_CLICKED,r.triggerData.redirectBehaviour=bN.RedirectBehaviour.CART_DRAWER;else{$e.warn(`Unsupported CTA type: ${e.cta}`);return}let i={at:e.cta},o={videoID:e.video.id};this.sendEvent(n,{current:o},e.video,e.item),this.executeCTAViaRenderer({clickAction:i,embeddedItem:e.item})}addToCartClicked(e,n){this.performCTA({cta:Zo.ClickActionType.ADD_TO_CART,item:n,video:e})}onPopupVideoClicked(e,n){this.hidePopupVideo=!0,this.injectScriptAndOpenDialog(null,e,n),this.dialogRef?.closed.subscribe(()=>{this.hidePopupVideo=!1,this.cdr.detectChanges()})}onPopupVideoClosed(){this.hidePopupVideo=!0;let e=(new Date().getTime()-this.triggerContext.startTime.getTime())/1e3;this.sendEvent(Se.EVENT_TRIGGER_CLOSED,{duration:e})}update(){}sendEvent(e,n,r,i){let o=new wl(e,n,this.engagementTrigger);r&&(o.videos=[r.id]),i&&(o.items=[i]),this.sendEventToRenderer(o)}openDialog(e,n){let r={videos:this.videos,currentIndex:n,triggerContext:this.triggerContext,onCTAPerformed:o=>this.performCTA(o)};this.dialogRef&&this.dialogRef.close(),this.dialogRef=this.dialog.open(vr,{width:"100vw",height:"100vh",data:r});let i={videoID:e.id,videoIndex:n};this.sendEvent(Se.EVENT_VIDEO_DIALOG_OPENED,{current:i},e),this.dialogRef.closed.subscribe(o=>{if(!o)return;let s=o.lastVideoDuration*1e3,a={videoID:o.lastVideo.id,videoIndex:o.lastVideoIndex,playedTillMS:s,playedTillPercent:s/e.durationMS},l=new wl(Se.EVENT_VIDEO_DIALOG_CLOSED,{current:a},this.triggerContext?.triggerData);l.videos=[o.lastVideo.id],this.sendEventToRenderer(l),this.dialogRef=null})}static \u0275fac=function(e){return new(e||nu)(Ce(PA),Ce(Co))};static \u0275cmp=je({type:nu,selectors:[["cooee-shoppable-videos"]],features:[Ei],decls:9,vars:5,consts:[["videoEl",""],["id","lc-heading-text",1,"lc-heading-text","lc:mb-2","lc:text-lg","lc:text-center","lc:font-bold"],[1,"lc-video-list","lc:flex","lc:overflow-auto","lc:m-3","lc:gap-10","lc:justify-center","lc:items-center"],[1,"lc-video-stories","lc:flex","lc:overflow-auto","lc:m-3","lc:gap-3","lc:justify-center","lc:items-center"],[1,"lc-video-card","lc:flex","lc:flex-col","lc:gap-1"],["href","",1,"lc-video-wrapper","lc:rounded-lg",3,"click"],["width","100%","playsinline","","loop","",1,"sa","lc:rounded-lg","lc:transition-transform","lc:duration-300",3,"mouseenter","mouseleave","muted"],[3,"src","type","media"],[3,"src","type"],[1,"lc-video-controls"],[3,"muted","videoEl"],["id","lc-single-product",1,"lc-single-product","lc:w-full","lc:flex","lc:flex-col","lc:gap-1","lc:text-sm","lc:mt-1","lc:mb-1"],["id","lc-cta-button","type","button",1,"lc-cta-button","lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:text-white","lc:z-4","lc:p-4","lc:text-xl"],["id","lc-item-name",1,"lc-item-name","lc:font-semibold","lc:line-clamp-1","lc:text-xl"],["id","lc-item-price",1,"lc-item-price","lc:text-xl",3,"innerHTML"],["id","lc-cta-button","type","button",1,"lc-cta-button","lc:rounded","lc:w-full","lc:h-auto","lc:text-center","lc:font-normal","lc:cursor-pointer","lc:bg-black","lc:text-white","lc:z-4","lc:p-4","lc:text-xl",3,"click"],[1,"lc-video-story","lc:relative","lc:w-20","lc:h-20","lc:cursor-pointer"],["viewBox","0 0 100 100",1,"lc:absolute","lc:top-0","lc:left-0","lc:w-full","lc:h-full"],["cx","50","cy","50","r","48","fill","none","stroke-width","4",1,"lc:stroke-gray-300"],["id","lc-video-story-circle","cx","50","cy","50","r","48","fill","none","stroke-width","4","stroke-linecap","round","stroke-dasharray","301.6","stroke-dashoffset","301.6",1,"lc:stroke-blue-500"],[1,"lc:w-full","lc:h-full","lc:rounded-full","lc:overflow-hidden"],["autoplay","","loop","",1,"lc:w-full","lc:h-full","lc:object-cover","lc:rounded-full",3,"click","muted"],[3,"video"],[3,"videoClicked","closeClicked","video"]],template:function(e,n){if(e&1&&(Io(0)(1)(2)(3)(4),pe(5,DP,2,1,"div",1)(6,MP,3,0,"div",2)(7,FP,3,0,"div",3)(8,HP,2,2)),e&2){let r=n.videoConfig.source,i=n.videoConfig.template;z(2),Ui(!n.videoConfig.autoPlay||n.videoConfig.autoPlay===n.VideoConfigAutoPlay.ON),z(),Ui(n.videoConfig.autoPlay===n.VideoConfigAutoPlay.ON_HOVER),z(),Ui(r===n.VideoConfigSource.GALLERY),z(),ve(n.videoConfig.heading?5:-1),z(),ve(i===n.VideoConfigTemplate.SIMPLE||i===n.VideoConfigTemplate.SWIPER?6:i===n.VideoConfigTemplate.STORY?7:i===n.VideoConfigTemplate.FLOATING_POPUP?8:-1)}},dependencies:[Ta,Gk,Oa,s_],styles:["[_nghost-%COMP%]{display:block}.lc-video-wrapper[_ngcontent-%COMP%]{position:relative}.lc-video-card[_ngcontent-%COMP%]{min-width:200px;max-width:300px}.lc-video-card[_ngcontent-%COMP%] video[_ngcontent-%COMP%]:hover{scale:1.1}.lc-video-controls[_ngcontent-%COMP%]{position:absolute;bottom:8px;z-index:10;right:8px;display:none;gap:8px}"]})};LT("CooeeWidgetSDK");(async()=>{let t=await CT(jT),e=(n,r)=>{let i=ZC(n,{injector:t.injector});customElements.define(r,i)};e(_N,"cooee-sticky-atc"),e(pN,"cooee-progressbar"),e($P,"cooee-shoppable-videos")})();})();
|