@ordergroove/offers 2.27.9 → 2.27.10
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/CHANGELOG.md +11 -0
- package/dist/bundle-report.html +2 -2
- package/dist/offers.js +1 -1
- package/dist/offers.js.map +2 -2
- package/package.json +2 -2
- package/src/core/__tests__/api.spec.js +3 -1
- package/src/core/api.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.27.10](https://github.com/ordergroove/plush-toys/compare/@ordergroove/offers@2.27.9...@ordergroove/offers@2.27.10) (2022-08-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **offers:** filters prepaid orders on IU call ([f044397](https://github.com/ordergroove/plush-toys/commit/f044397322da6495dca3eb1c3685fe9f4bdcb160))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [2.27.9](https://github.com/ordergroove/plush-toys/compare/@ordergroove/offers@2.27.8...@ordergroove/offers@2.27.9) (2022-08-22)
|
|
7
18
|
|
|
8
19
|
|
package/dist/bundle-report.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
│ └ examples/index.js
|
|
5
5
|
└ examples/index.js ───────────────────────────────────────── 8.4kb ─── 3.3%
|
|
6
6
|
|
|
7
|
-
dist/offers.js ───────────────────────────────────────────── 121.
|
|
7
|
+
dist/offers.js ───────────────────────────────────────────── 121.4kb ─ 100.0%
|
|
8
8
|
├ src/components/Offer.js ─────────────────────────────────── 8.1kb ─── 6.7%
|
|
9
9
|
│ └ src/make-api.js
|
|
10
10
|
│ └ src/index.js
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
│ └ src/index.js
|
|
48
48
|
├ src/make-api.js ─────────────────────────────────────────── 2.6kb ─── 2.1%
|
|
49
49
|
│ └ src/index.js
|
|
50
|
-
├ src/core/api.js ─────────────────────────────────────────── 2.
|
|
50
|
+
├ src/core/api.js ─────────────────────────────────────────── 2.6kb ─── 2.1%
|
|
51
51
|
│ └ src/core/reducer.js
|
|
52
52
|
│ └ src/index.js
|
|
53
53
|
├ src/components/UpsellModal.js ───────────────────────────── 2.4kb ─── 2.0%
|
package/dist/offers.js
CHANGED
|
@@ -8,7 +8,7 @@ else {
|
|
|
8
8
|
window.og['offers'] = factory();
|
|
9
9
|
}
|
|
10
10
|
})(()=>{
|
|
11
|
-
var lib=(()=>{var Vi=Object.create;var Be=Object.defineProperty;var $i=Object.getOwnPropertyDescriptor;var Hi=Object.getOwnPropertyNames;var Gi=Object.getPrototypeOf,Bi=Object.prototype.hasOwnProperty;var tn=t=>Be(t,"__esModule",{value:!0}),n=(t,e)=>Be(t,"name",{value:e,configurable:!0});var S=(t,e)=>()=>(t&&(e=t(t=0)),e);var de=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),xr=(t,e)=>{tn(t);for(var r in e)Be(t,r,{get:e[r],enumerable:!0})},zi=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Hi(e))!Bi.call(t,o)&&o!=="default"&&Be(t,o,{get:()=>e[o],enumerable:!(r=$i(e,o))||r.enumerable});return t},ee=t=>zi(tn(Be(t!=null?Vi(Gi(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var Et=de((_t,un)=>{(function(t,e){typeof _t=="object"&&typeof un!="undefined"?e(_t):typeof define=="function"&&define.amd?define(["exports"],e):(t=t||self,e(t.throttleDebounce={}))})(_t,function(t){"use strict";function e(o,s,i,c){var a,l=!1,d=0;function h(){a&&clearTimeout(a)}n(h,"clearExistingTimeout");function u(){h(),l=!0}n(u,"cancel"),typeof s!="boolean"&&(c=i,i=s,s=void 0);function m(){for(var _=arguments.length,b=new Array(_),f=0;f<_;f++)b[f]=arguments[f];var x=this,w=Date.now()-d;if(l)return;function y(){d=Date.now(),i.apply(x,b)}n(y,"exec");function C(){a=void 0}n(C,"clear"),c&&!a&&y(),h(),c===void 0&&w>o?y():s!==!0&&(a=setTimeout(c?C:y,c===void 0?o-w:o))}return n(m,"wrapper"),m.cancel=u,m}n(e,"throttle");function r(o,s,i){return i===void 0?e(o,s,!1):e(o,i,s!==!1)}n(r,"debounce"),t.debounce=r,t.throttle=e,Object.defineProperty(t,"__esModule",{value:!0})})});function dn(){return typeof window.og_auth!="undefined"?xt(window.og_auth):null}async function ra(t=100){return new Promise(e=>{setTimeout(()=>e(dn()),t)})}async function fn(t,e=Xi,r=ea){let o;if(o=xt(dn())||xt(e()),o)return o;if(t&&typeof t=="string"){let s=await fetch(t);s.status>=200&&s.status<300&&(o=e()||await(ta(s)?s.json():Promise.resolve(r(t)).then(e)))}else o||(o=await ra());if(o=xt(o),o)return o;throw new Error("Unauthorized")}var pn,Xi,xt,ea,ta,hn=S(()=>{pn=/^og_auth=/,Xi=n((t=pn)=>(document.cookie.split(/;\s*/).find(e=>e.match(t))||"").replace(pn,""),"c"),xt=n(t=>{if(typeof t=="object")return t;let e=String(t||"").split("|");return e.length===3?{sig_field:e[0],ts:parseInt(e[1],10),sig:e[2]}:null},"r"),ea=n(t=>new Promise((e,r)=>{let o=document.createElement("iframe");o.style.setProperty("display","none","important"),document.body.appendChild(o),o.onload=e,o.onerror=r,o.src=t}),"p"),ta=n(t=>(t.headers.get("content-type")||"").indexOf("application/json")!==-1,"d");n(dn,"a");n(ra,"f");n(fn,"u")});var I,q,U,St,we,P,We,Tt,vt,mn,Ot,Ce,gn,wt,Ct,yn,Pt,Rt,At,bn,_n,Nt,En,kt,Pe,xn,It,qt,Ye,Je,Ut,Dt,fe,te,Ft,Lt,Y,J,re,he,jt,me,Re,Cr,Pr,Sn,V=S(()=>{I="OPTIN_PRODUCT",q="OPTOUT_PRODUCT",U="PRODUCT_CHANGE_FREQUENCY",St="SET_MERCHANT_ID",we="REQUEST_OFFER",P="RECEIVE_OFFER",We="PRODUCT_HAS_CHANGED",Tt="CREATED_SESSION_ID",vt="SET_AUTH_URL",mn="REQUEST_AUTH",Ot="AUTHORIZE",Ce="UNAUTHORIZED",gn="REQUEST_ORDERS",wt="RECEIVE_ORDERS",Ct="RECEIVE_ORDER_ITEMS",yn="FETCH_RESPONSE_ERROR",Pt="SET_ENVIRONMENT_STAGING",Rt="SET_ENVIRONMENT_DEV",At="SET_ENVIRONMENT_PROD",bn="CONCLUDE_UPSELL",_n="REQUEST_CREATE_IU_ORDER",Nt="CREATE_ONE_TIME",En="REQUEST_CONVERT_ONE_TIME",kt="CONVERT_ONE_TIME",Pe="CHECKOUT",xn="RECEIVE_FETCH",It="SET_LOCALE",qt="SET_CONFIG",Ye="SET_PREVIEW_STANDARD_OFFER",Je="SET_PREVIEW_UPSELL_OFFER",Ut="ADD_TEMPLATE",Dt="SET_TEMPLATES",fe="LOCAL_STORAGE_CHANGE",te="LOCAL_STORAGE_CLEAR",Ft="SET_FIRST_ORDER_PLACE_DATE",Lt="SET_PRODUCT_TO_SUBSCRIBE",Y="RECEIVE_PRODUCT_PLANS",J="SETUP_PRODUCT",re="SETUP_CART",he="pdp",jt="dev",me="staging",Re="prod",Cr="static.ordergroove.com",Pr="staging.static.ordergroove.com",Sn="og-cart-updated"});var Ke=de((gu,An)=>{var oa="Expected a function",Tn="__lodash_hash_undefined__",na="[object Function]",sa="[object GeneratorFunction]",ia=/[\\^$.*+?()[\]{}|]/g,aa=/^\[object .+?Constructor\]$/,ca=typeof window=="object"&&window&&window.Object===Object&&window,la=typeof self=="object"&&self&&self.Object===Object&&self,vn=ca||la||Function("return this")();function ua(t,e){return t==null?void 0:t[e]}n(ua,"getValue");function pa(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}n(pa,"isHostObject");var da=Array.prototype,fa=Function.prototype,On=Object.prototype,Rr=vn["__core-js_shared__"],wn=function(){var t=/[^.]+$/.exec(Rr&&Rr.keys&&Rr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Cn=fa.toString,Ar=On.hasOwnProperty,ha=On.toString,ma=RegExp("^"+Cn.call(Ar).replace(ia,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ga=da.splice,ya=Pn(vn,"Map"),Qe=Pn(Object,"create");function ge(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}n(ge,"Hash");function ba(){this.__data__=Qe?Qe(null):{}}n(ba,"hashClear");function _a(t){return this.has(t)&&delete this.__data__[t]}n(_a,"hashDelete");function Ea(t){var e=this.__data__;if(Qe){var r=e[t];return r===Tn?void 0:r}return Ar.call(e,t)?e[t]:void 0}n(Ea,"hashGet");function xa(t){var e=this.__data__;return Qe?e[t]!==void 0:Ar.call(e,t)}n(xa,"hashHas");function Sa(t,e){var r=this.__data__;return r[t]=Qe&&e===void 0?Tn:e,this}n(Sa,"hashSet");ge.prototype.clear=ba;ge.prototype.delete=_a;ge.prototype.get=Ea;ge.prototype.has=xa;ge.prototype.set=Sa;function Ae(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}n(Ae,"ListCache");function Ta(){this.__data__=[]}n(Ta,"listCacheClear");function va(t){var e=this.__data__,r=Mt(e,t);if(r<0)return!1;var o=e.length-1;return r==o?e.pop():ga.call(e,r,1),!0}n(va,"listCacheDelete");function Oa(t){var e=this.__data__,r=Mt(e,t);return r<0?void 0:e[r][1]}n(Oa,"listCacheGet");function wa(t){return Mt(this.__data__,t)>-1}n(wa,"listCacheHas");function Ca(t,e){var r=this.__data__,o=Mt(r,t);return o<0?r.push([t,e]):r[o][1]=e,this}n(Ca,"listCacheSet");Ae.prototype.clear=Ta;Ae.prototype.delete=va;Ae.prototype.get=Oa;Ae.prototype.has=wa;Ae.prototype.set=Ca;function ye(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}n(ye,"MapCache");function Pa(){this.__data__={hash:new ge,map:new(ya||Ae),string:new ge}}n(Pa,"mapCacheClear");function Ra(t){return Vt(this,t).delete(t)}n(Ra,"mapCacheDelete");function Aa(t){return Vt(this,t).get(t)}n(Aa,"mapCacheGet");function Na(t){return Vt(this,t).has(t)}n(Na,"mapCacheHas");function ka(t,e){return Vt(this,t).set(t,e),this}n(ka,"mapCacheSet");ye.prototype.clear=Pa;ye.prototype.delete=Ra;ye.prototype.get=Aa;ye.prototype.has=Na;ye.prototype.set=ka;function Mt(t,e){for(var r=t.length;r--;)if(Fa(t[r][0],e))return r;return-1}n(Mt,"assocIndexOf");function Ia(t){if(!Rn(t)||Ua(t))return!1;var e=La(t)||pa(t)?ma:aa;return e.test(Da(t))}n(Ia,"baseIsNative");function Vt(t,e){var r=t.__data__;return qa(e)?r[typeof e=="string"?"string":"hash"]:r.map}n(Vt,"getMapData");function Pn(t,e){var r=ua(t,e);return Ia(r)?r:void 0}n(Pn,"getNative");function qa(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}n(qa,"isKeyable");function Ua(t){return!!wn&&wn in t}n(Ua,"isMasked");function Da(t){if(t!=null){try{return Cn.call(t)}catch{}try{return t+""}catch{}}return""}n(Da,"toSource");function Nr(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(oa);var r=n(function(){var o=arguments,s=e?e.apply(this,o):o[0],i=r.cache;if(i.has(s))return i.get(s);var c=t.apply(this,o);return r.cache=i.set(s,c),c},"memoized");return r.cache=new(Nr.Cache||ye),r}n(Nr,"memoize");Nr.Cache=ye;function Fa(t,e){return t===e||t!==t&&e!==e}n(Fa,"eq");function La(t){var e=Rn(t)?ha.call(t):"";return e==na||e==sa}n(La,"isFunction");function Rn(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}n(Rn,"isObject");An.exports=Nr});var $t,kr,Ze,Xe,Ht,Nn,kn,ja,Ma,Va,$a,Ha,et,Ir,Ga,In,tt,Ba,oe,ne=S(()=>{$t=ee(Ke()),kr=n((...t)=>JSON.stringify(t),"memoizeKey"),Ze=n(t=>(...e)=>fetch(...t(...e)).then(r=>r.json()),"withFetchJson"),Xe=n(t=>(e,...r)=>{if(!e)throw Error("host required");let[o,s={}]=t(...r);return[`${e.replace(/\/+$/,"")}${o}`,s]},"withHost"),Ht=n(t=>(e,...r)=>{if(!e)throw Error("auth required");let[o,s={}]=t(...r);return[o,{...s,headers:{Authorization:JSON.stringify(e),...s.headers}}]},"withAuth"),Nn=n(t=>(...e)=>{let[r,o={}]=t(...e);return[r,{method:"POST",...o,body:JSON.stringify(o.body),headers:{"Content-type":"application/json",...o.headers}}]},"withJsonBody"),kn=n((t=[])=>(Array.isArray(t)?t:Object.entries(t)).map(([e,r])=>[e,encodeURIComponent(r)].join("=")).join("&"),"toQuery"),ja=n(t=>JSON.stringify([].concat(t).map(e=>typeof e=="object"?e.id:e).filter(e=>e)),"toProductId"),Ma=(0,$t.default)(Ze(Xe((t,e,r,o="pdp")=>{if(!t)throw Error("merchantId required");if(!e)throw Error("sessionId required");if(!r)throw Error("product required");let s=kn([["session_id",e],["page_type",1],["p",ja(r)],["module_view",JSON.stringify(["regular"])]]);return[`/offer/${t}/${o}?${s}`]})),kr),Va=(0,$t.default)(Ze(Xe(Ht((t=1,e="place")=>[`/orders/?${kn([["status",t],["ordering",e]])}`]))),kr),$a=(0,$t.default)(Ze(Xe(Ht(t=>{if(!t)throw Error("orderId required");return[`/items/?order=${t}`]}))),kr),Ha=Ze(Xe(Ht(Nn((t,e,r,o)=>{if(!t)throw Error("product required");if(!e)throw Error("order required");if(!r)throw Error("quantity required");if(r<=0)throw Error("quantity must be greater or equal than one");if(!o)throw Error("offer required");return["/items/iu/",{body:{product:t,order:e,quantity:r,offer:o}}]})))),et=n(t=>{if(typeof t=="object")return{...t};let[e,r]=(t||"").split(/_/).map(o=>parseInt(o,10));return e&&r&&{every:e,every_period:r}},"parseFrequency"),Ir=n(t=>t.match(/^\d+_\d$/),"isFrequencyValid"),Ga=n((t,e)=>String.prototype.localeCompare.call(t&&t.split("_").reverse().join("_"),e&&e.split("_").reverse().join("_")),"compareFrequencies"),In=n(t=>[...new Set(t&&t.split(/\s+/))].filter(Ir).sort(Ga),"parseFrequenciesList"),tt=n(t=>{if(typeof t=="object"){let{every:e,period:r,every_period:o}=t;return`${e}_${r||o}`}return typeof t=="string"?t:""},"stringifyFrequency"),Ba=Ze(Xe(Ht(Nn((t,e,r)=>{if(!t)throw Error("item required");if(!e)throw Error("frequency required");let o=et(e);if(!o)throw Error("invalid frequency");return["/subscriptions/create_from_item/",{body:{item:t.public_id,offer:r,...o}}]})))),oe={fetchOffer:Ma,fetchOrders:Va,fetchItems:$a,createOneTime:Ha,convertOneTimeToSubscription:Ba}});function rt(t){document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t()}function ot(){return document.querySelector([`script[src^="https://${Cr}"]`,`script[src^="https://${Pr}"]`,`script[src^="http://${Cr}"]`,`script[src^="http://${Pr}"]`].join(","))}function qr(){let t=ot();if(!t)return[];let e=new URL(t.src),r=e.host.startsWith(me)?me:Re,o=e.pathname.split("/")[1];return!r&&!o?[]:[o,r,t]}function qn(t){if(t.isReady())return;let[e,r]=qr();!r&&!e||t.initialize(e,r)}function Dn(t){let e=document.cookie.match(`(^|;) ?${t}=([^;]*)(;|$)`);return e?e[2]:null}var R,Un,$=S(()=>{Gt();V();n(rt,"onReady");n(ot,"getMainJs");n(qr,"resolveEnvAndMerchant");R=n(t=>{var r;let e=`${t.id||t}`;return((r=Ne)==null?void 0:r.shopify_selling_plans)&&(e=e.split(":")[0]),e},"safeProductId");n(qn,"autoInitializeOffers");Un=n(t=>{document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:01 GMT;`},"clearCookie");n(Dn,"getCookieValue")});var ke,Ne,Gt=S(()=>{$();ke=ot(),Ne={shopify:typeof(ke==null?void 0:ke.dataset.shopifySellingPlans)!="undefined",shopify_selling_plans:typeof(ke==null?void 0:ke.dataset.shopifySellingPlans)!="undefined"}});var se,Ie,Fn,Bt,Ln,jn,za,Wa,nt,ie,Mn,zt,Vn,Ya,Ur,Dr,Wt,Fr,Yt,qe,Lr,Ja,$n,Hn,Qa,Ka,Za,Xa,Gn,Bn,zn,Wn,Yn,Jn,Qn,N=S(()=>{hn();V();ne();Gt();$();se=n((t,e,r)=>({type:I,payload:{product:t,frequency:e,offer:r}}),"optinProduct"),Ie=n((t,e)=>({type:q,payload:{product:t,offer:e}}),"optoutProduct"),Fn=n((t,e)=>({type:We,payload:{newProduct:t,product:e}}),"productHasChangedComponents"),Bt=n((t,e,r)=>({type:U,payload:{product:t,frequency:e,offer:r}}),"productChangeFrequency"),Ln=n(t=>({type:bn,payload:{product:t}}),"concludeUpsell"),jn=n(t=>({type:St,payload:t}),"setMerchantId"),za=n(t=>({type:Tt,payload:`${t}.${Math.floor(Math.random()*999999)}.${Math.round(new Date().getTime()/1e3)}`}),"createSessionId"),Wa=n(t=>({type:mn,payload:t}),"requestAuth"),nt=n((t,e,r,o)=>({type:Ot,payload:{public_id:t,sig_field:e,ts:r,sig:o}}),"authorize"),ie=n(t=>({type:Ce,payload:t}),"unauthorized"),Mn=n(t=>({type:vt,payload:t}),"setAuthUrl"),zt=n(t=>({type:xn,payload:t}),"fetchDone"),Vn=n((t=fn)=>n(function(r,o){if(window.og&&window.og.previewMode)return r(ie({message:"Offers are running in preview mode"}));let{merchantId:s,authUrl:i}=o(),c=Wa(i);return r(c),t(i).then(({sig_field:a,ts:l,sig:d})=>r(nt(s,a,l,d)),a=>r(ie(a))).finally(()=>r(zt(c)))},"fetchAuthThunk"),"fetchAuth"),Ya=n((t,e)=>({type:gn,payload:{status:t,ordering:e}}),"requestOrders"),Ur=n(t=>({type:wt,payload:t}),"receiveOrders"),Dr=n(t=>({type:Ct,payload:t}),"receiveItems"),Wt=n((t=1,e="place")=>n(function(o,s){let{environment:{legoUrl:i},auth:c}=s();if(!c)return o(ie("No auth set."));let a=Ya(t,e);return o(a),oe.fetchOrders(i,c,t,e).then(l=>{if(l.results){o(Ur(l));let d=(l.results[0]||{}).public_id;if(d)return oe.fetchItems(i,c,d).then(h=>o(Dr(h)))}return o(ie(l.detail)),null},l=>o(ie(l))).finally(()=>o(zt(a)))},"fetchOrdersThunk"),"fetchOrders"),Fr=n(t=>{switch(t){case jt:return{type:Rt,payload:t};case me:return{type:Pt,payload:t};case Re:return{type:At,payload:t};default:throw new Error(`${t} is not a supported environment`)}},"setEnvironment"),Yt=n(()=>(t,e)=>{let{merchantId:r,sessionId:o}=e();return(!o||r&&!o.startsWith(r))&&t(za(r)),o},"requestSessionId"),qe=n((t,e)=>({type:P,payload:{...t,offer:e}}),"receiveOffer"),Lr=n(t=>({type:yn,payload:t}),"fetchResponseError"),Ja=n((t,e=he,r)=>({type:we,payload:{product:t,module:e,offer:r}}),"requestOffer"),$n=n((t,e=he,r)=>n(function(s,i){let{merchantId:c,sessionId:a,environment:{apiUrl:l}}=i(),d=Ja(t,e,r);s(d);let h=R(t);return oe.fetchOffer(l,c,a,h,e).then(u=>s(qe(u,r)),u=>s(Lr(u))).finally(()=>s(zt(d)))},"fetchOfferThunk"),"fetchOffer"),Hn=n(()=>({type:Pe}),"checkout"),Qa=n((t,e,r,o)=>({type:_n,payload:{product:t,order:e,quantity:r,offerId:o}}),"requestCreateOneTime"),Ka=n(t=>({type:Nt,payload:t}),"receiveCreateOneTime"),Za=n((t,e)=>({type:En,payload:{item:t,frequency:e}}),"requestConvertOneTimeToSubscription"),Xa=n((t,e)=>({type:kt,payload:{response:t,product:e}}),"receiveConvertOneTime"),Gn=n((t,e,r,o=!1,s=null)=>n(function(c,a){let{auth:l,environment:{legoUrl:d},previewUpsellOffer:h,offerId:u}=a();if(!l)return c(ie("No auth set."));let m=Qa(t,e,r,u);return c(m),(h?Promise.resolve({legoUrl:d,product:t,order:e,quantity:r,offer:u}):oe.createOneTime(d,l,t.id,e,r,u)).then(_=>(c(Ka(_)),o?(c(Za(_,s)),(h?Promise.resolve({item:_,frequency:s}):oe.convertOneTimeToSubscription(d,l,_,s,u)).then(b=>c(Xa(b,t)),b=>c(Lr(b)))):_),_=>c(Lr(_))).finally(()=>c(zt(m)))},"createIuThunk"),"createIu"),Bn=n(t=>({type:It,payload:t}),"setLocale"),zn=n(t=>({type:qt,payload:t}),"setConfig"),Wn=n((t,e,r)=>({type:Ut,payload:{selector:t,markup:e,config:r}}),"addTemplate"),Yn=n(t=>({type:Dt,payload:t}),"setTemplates"),Jn=n((t,e)=>({type:Ft,payload:{product:t,firstOrderPlaceDate:e}}),"setFirstOrderPlaceDate"),Qn=n((t,e)=>({type:Lt,payload:{product:t,productToSubscribe:e}}),"setProductToSubscribe")});var Gr,_e,Ee=S(()=>{Gr=typeof window!="undefined"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,_e=n((t,e,r=null)=>{for(;e!==r;){let o=e.nextSibling;t.removeChild(e),e=o}},"removeNodes")});var j,Br,fs,Fe,xe,hs,it,W,tr,ae=S(()=>{j=`{{lit-${String(Math.random()).slice(2)}}}`,Br=`<!--${j}-->`,fs=new RegExp(`${j}|${Br}`),Fe="$lit$",xe=class{constructor(e,r){this.parts=[],this.element=r;let o=[],s=[],i=document.createTreeWalker(r.content,133,null,!1),c=0,a=-1,l=0,{strings:d,values:{length:h}}=e;for(;l<h;){let u=i.nextNode();if(u===null){i.currentNode=s.pop();continue}if(a++,u.nodeType===1){if(u.hasAttributes()){let m=u.attributes,{length:_}=m,b=0;for(let f=0;f<_;f++)hs(m[f].name,Fe)&&b++;for(;b-- >0;){let f=d[l],x=tr.exec(f)[2],w=x.toLowerCase()+Fe,y=u.getAttribute(w);u.removeAttribute(w);let C=y.split(fs);this.parts.push({type:"attribute",index:a,name:x,strings:C}),l+=C.length-1}}u.tagName==="TEMPLATE"&&(s.push(u),i.currentNode=u.content)}else if(u.nodeType===3){let m=u.data;if(m.indexOf(j)>=0){let _=u.parentNode,b=m.split(fs),f=b.length-1;for(let x=0;x<f;x++){let w,y=b[x];if(y==="")w=W();else{let C=tr.exec(y);C!==null&&hs(C[2],Fe)&&(y=y.slice(0,C.index)+C[1]+C[2].slice(0,-Fe.length)+C[3]),w=document.createTextNode(y)}_.insertBefore(w,u),this.parts.push({type:"node",index:++a})}b[f]===""?(_.insertBefore(W(),u),o.push(u)):u.data=b[f],l+=f}}else if(u.nodeType===8)if(u.data===j){let m=u.parentNode;(u.previousSibling===null||a===c)&&(a++,m.insertBefore(W(),u)),c=a,this.parts.push({type:"node",index:a}),u.nextSibling===null?u.data="":(o.push(u),a--),l++}else{let m=-1;for(;(m=u.data.indexOf(j,m+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(let u of o)u.parentNode.removeChild(u)}};n(xe,"Template");hs=n((t,e)=>{let r=t.length-e.length;return r>=0&&t.slice(r)===e},"endsWith"),it=n(t=>t.index!==-1,"isTemplatePartActive"),W=n(()=>document.createComment(""),"createMarker"),tr=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/});function Wr(t,e){let{element:{content:r},parts:o}=t,s=document.createTreeWalker(r,zr,null,!1),i=at(o),c=o[i],a=-1,l=0,d=[],h=null;for(;s.nextNode();){a++;let u=s.currentNode;for(u.previousSibling===h&&(h=null),e.has(u)&&(d.push(u),h===null&&(h=u)),h!==null&&l++;c!==void 0&&c.index===a;)c.index=h!==null?-1:c.index-l,i=at(o,i),c=o[i]}d.forEach(u=>u.parentNode.removeChild(u))}function ms(t,e,r=null){let{element:{content:o},parts:s}=t;if(r==null){o.appendChild(e);return}let i=document.createTreeWalker(o,zr,null,!1),c=at(s),a=0,l=-1;for(;i.nextNode();)for(l++,i.currentNode===r&&(a=hc(e),r.parentNode.insertBefore(e,r));c!==-1&&s[c].index===l;){if(a>0){for(;c!==-1;)s[c].index+=a,c=at(s,c);return}c=at(s,c)}}var zr,hc,at,gs=S(()=>{ae();zr=133;n(Wr,"removeNodesFromTemplate");hc=n(t=>{let e=t.nodeType===11?0:1,r=document.createTreeWalker(t,zr,null,!1);for(;r.nextNode();)e++;return e},"countNodes"),at=n((t,e=-1)=>{for(let r=e+1;r<t.length;r++){let o=t[r];if(it(o))return r}return-1},"nextActiveIndexInTemplateParts");n(ms,"insertNodeIntoTemplate")});var mc,Se,Yr=S(()=>{mc=new WeakMap,Se=n(t=>typeof t=="function"&&mc.has(t),"isDirective")});var D,rr,Jr=S(()=>{D={},rr={}});var ce,or=S(()=>{Ee();ae();ce=class{constructor(e,r,o){this.__parts=[],this.template=e,this.processor=r,this.options=o}update(e){let r=0;for(let o of this.__parts)o!==void 0&&o.setValue(e[r]),r++;for(let o of this.__parts)o!==void 0&&o.commit()}_clone(){let e=Gr?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),r=[],o=this.template.parts,s=document.createTreeWalker(e,133,null,!1),i=0,c=0,a,l=s.nextNode();for(;i<o.length;){if(a=o[i],!it(a)){this.__parts.push(void 0),i++;continue}for(;c<a.index;)c++,l.nodeName==="TEMPLATE"&&(r.push(l),s.currentNode=l.content),(l=s.nextNode())===null&&(s.currentNode=r.pop(),l=s.nextNode());if(a.type==="node"){let d=this.processor.handleTextExpression(this.options);d.insertAfterNode(l.previousSibling),this.__parts.push(d)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,a.name,a.strings,this.options));i++}return Gr&&(document.adoptNode(e),customElements.upgrade(e)),e}};n(ce,"TemplateInstance")});var ys,yc,K,nr=S(()=>{Ee();ae();ys=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t}),yc=` ${j} `,K=class{constructor(e,r,o,s){this.strings=e,this.values=r,this.type=o,this.processor=s}getHTML(){let e=this.strings.length-1,r="",o=!1;for(let s=0;s<e;s++){let i=this.strings[s],c=i.lastIndexOf("<!--");o=(c>-1||o)&&i.indexOf("-->",c+1)===-1;let a=tr.exec(i);a===null?r+=i+(o?yc:Br):r+=i.substr(0,a.index)+a[1]+a[2]+Fe+a[3]+j}return r+=this.strings[e],r}getTemplateElement(){let e=document.createElement("template"),r=this.getHTML();return ys!==void 0&&(r=ys.createHTML(r)),e.innerHTML=r,e}};n(K,"TemplateResult")});var sr,ir,Le,ct,Z,lt,ut,ar,bs,pt,bc,cr=S(()=>{Yr();Ee();Jr();or();nr();ae();sr=n(t=>t===null||!(typeof t=="object"||typeof t=="function"),"isPrimitive"),ir=n(t=>Array.isArray(t)||!!(t&&t[Symbol.iterator]),"isIterable"),Le=class{constructor(e,r,o){this.dirty=!0,this.element=e,this.name=r,this.strings=o,this.parts=[];for(let s=0;s<o.length-1;s++)this.parts[s]=this._createPart()}_createPart(){return new ct(this)}_getValue(){let e=this.strings,r=e.length-1,o=this.parts;if(r===1&&e[0]===""&&e[1]===""){let i=o[0].value;if(typeof i=="symbol")return String(i);if(typeof i=="string"||!ir(i))return i}let s="";for(let i=0;i<r;i++){s+=e[i];let c=o[i];if(c!==void 0){let a=c.value;if(sr(a)||!ir(a))s+=typeof a=="string"?a:String(a);else for(let l of a)s+=typeof l=="string"?l:String(l)}}return s+=e[r],s}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}};n(Le,"AttributeCommitter");ct=class{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==D&&(!sr(e)||e!==this.value)&&(this.value=e,Se(e)||(this.committer.dirty=!0))}commit(){for(;Se(this.value);){let e=this.value;this.value=D,e(this)}this.value!==D&&this.committer.commit()}};n(ct,"AttributePart");Z=class{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(W()),this.endNode=e.appendChild(W())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=W()),e.__insert(this.endNode=W())}insertAfterPart(e){e.__insert(this.startNode=W()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(this.startNode.parentNode===null)return;for(;Se(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=D,r(this)}let e=this.__pendingValue;e!==D&&(sr(e)?e!==this.value&&this.__commitText(e):e instanceof K?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):ir(e)?this.__commitIterable(e):e===rr?(this.value=rr,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){let r=this.startNode.nextSibling;e=e??"";let o=typeof e=="string"?e:String(e);r===this.endNode.previousSibling&&r.nodeType===3?r.data=o:this.__commitNode(document.createTextNode(o)),this.value=e}__commitTemplateResult(e){let r=this.options.templateFactory(e);if(this.value instanceof ce&&this.value.template===r)this.value.update(e.values);else{let o=new ce(r,e.processor,this.options),s=o._clone();o.update(e.values),this.__commitNode(s),this.value=o}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());let r=this.value,o=0,s;for(let i of e)s=r[o],s===void 0&&(s=new Z(this.options),r.push(s),o===0?s.appendIntoPart(this):s.insertAfterPart(r[o-1])),s.setValue(i),s.commit(),o++;o<r.length&&(r.length=o,this.clear(s&&s.endNode))}clear(e=this.startNode){_e(this.startNode.parentNode,e.nextSibling,this.endNode)}};n(Z,"NodePart");lt=class{constructor(e,r,o){if(this.value=void 0,this.__pendingValue=void 0,o.length!==2||o[0]!==""||o[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=r,this.strings=o}setValue(e){this.__pendingValue=e}commit(){for(;Se(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=D,r(this)}if(this.__pendingValue===D)return;let e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=D}};n(lt,"BooleanAttributePart");ut=class extends Le{constructor(e,r,o){super(e,r,o);this.single=o.length===2&&o[0]===""&&o[1]===""}_createPart(){return new ar(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}};n(ut,"PropertyCommitter");ar=class extends ct{};n(ar,"PropertyPart");bs=!1;(()=>{try{let t={get capture(){return bs=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch{}})();pt=class{constructor(e,r,o){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=r,this.eventContext=o,this.__boundHandleEvent=s=>this.handleEvent(s)}setValue(e){this.__pendingValue=e}commit(){for(;Se(this.__pendingValue);){let i=this.__pendingValue;this.__pendingValue=D,i(this)}if(this.__pendingValue===D)return;let e=this.__pendingValue,r=this.value,o=e==null||r!=null&&(e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive),s=e!=null&&(r==null||o);o&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=bc(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=D}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}};n(pt,"EventPart");bc=n(t=>t&&(bs?{capture:t.capture,passive:t.passive,once:t.once}:t.capture),"getOptions")});function Qr(t){let e=Te.get(t.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},Te.set(t.type,e));let r=e.stringsArray.get(t.strings);if(r!==void 0)return r;let o=t.strings.join(j);return r=e.keyString.get(o),r===void 0&&(r=new xe(t,t.getTemplateElement()),e.keyString.set(o,r)),e.stringsArray.set(t.strings,r),r}var Te,lr=S(()=>{ae();n(Qr,"templateFactory");Te=new Map});var le,Kr,Zr=S(()=>{Ee();cr();lr();le=new WeakMap,Kr=n((t,e,r)=>{let o=le.get(e);o===void 0&&(_e(e,e.firstChild),le.set(e,o=new Z(Object.assign({templateFactory:Qr},r))),o.appendInto(e)),o.setValue(t),o.commit()},"render")});var ur,Xr,eo=S(()=>{cr();ur=class{handleAttributeExpressions(e,r,o,s){let i=r[0];return i==="."?new ut(e,r.slice(1),o).parts:i==="@"?[new pt(e,r.slice(1),s.eventContext)]:i==="?"?[new lt(e,r.slice(1),o)]:new Le(e,r,o).parts}handleTextExpression(e){return new Z(e)}};n(ur,"DefaultTemplateProcessor");Xr=new ur});var p,to=S(()=>{eo();nr();eo();Yr();Ee();Jr();cr();Zr();lr();or();nr();ae();typeof window!="undefined"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.3.0");p=n((t,...e)=>new K(t,e,"html",Xr),"html")});var Es,pr,Ec,xc,Sc,xs,Tc,Ss,Ts=S(()=>{Ee();gs();Zr();lr();or();ae();to();Es=n((t,e)=>`${t}--${e}`,"getTemplateCacheKey"),pr=!0;typeof window.ShadyCSS=="undefined"?pr=!1:typeof window.ShadyCSS.prepareTemplateDom=="undefined"&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),pr=!1);Ec=n(t=>e=>{let r=Es(e.type,t),o=Te.get(r);o===void 0&&(o={stringsArray:new WeakMap,keyString:new Map},Te.set(r,o));let s=o.stringsArray.get(e.strings);if(s!==void 0)return s;let i=e.strings.join(j);if(s=o.keyString.get(i),s===void 0){let c=e.getTemplateElement();pr&&window.ShadyCSS.prepareTemplateDom(c,t),s=new xe(e,c),o.keyString.set(i,s)}return o.stringsArray.set(e.strings,s),s},"shadyTemplateFactory"),xc=["html","svg"],Sc=n(t=>{xc.forEach(e=>{let r=Te.get(Es(e,t));r!==void 0&&r.keyString.forEach(o=>{let{element:{content:s}}=o,i=new Set;Array.from(s.querySelectorAll("style")).forEach(c=>{i.add(c)}),Wr(o,i)})})},"removeStylesFromLitTemplates"),xs=new Set,Tc=n((t,e,r)=>{xs.add(t);let o=r?r.element:document.createElement("template"),s=e.querySelectorAll("style"),{length:i}=s;if(i===0){window.ShadyCSS.prepareTemplateStyles(o,t);return}let c=document.createElement("style");for(let d=0;d<i;d++){let h=s[d];h.parentNode.removeChild(h),c.textContent+=h.textContent}Sc(t);let a=o.content;r?ms(r,c,a.firstChild):a.insertBefore(c,a.firstChild),window.ShadyCSS.prepareTemplateStyles(o,t);let l=a.querySelector("style");if(window.ShadyCSS.nativeShadow&&l!==null)e.insertBefore(l.cloneNode(!0),e.firstChild);else if(r){a.insertBefore(c,a.firstChild);let d=new Set;d.add(c),Wr(r,d)}},"prepareTemplateStyles"),Ss=n((t,e,r)=>{if(!r||typeof r!="object"||!r.scopeName)throw new Error("The `scopeName` option is required.");let o=r.scopeName,s=le.has(e),i=pr&&e.nodeType===11&&!!e.host,c=i&&!xs.has(o),a=c?document.createDocumentFragment():e;if(Kr(t,a,Object.assign({templateFactory:Ec(o)},r)),c){let l=le.get(a);le.delete(a);let d=l.value instanceof ce?l.value.template:void 0;Tc(o,a,d),_e(e,e.firstChild),e.appendChild(a),le.set(e,l)}!s&&i&&window.ShadyCSS.styleElement(e.host)},"render")});var vs,ro,Os,oo,no,so,io,ao,co,dt,lo=S(()=>{window.JSCompiler_renameProperty=(t,e)=>t;ro={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){switch(e){case Boolean:return t!==null;case Number:return t===null?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},Os=n((t,e)=>e!==t&&(e===e||t===t),"notEqual"),oo={attribute:!0,type:String,converter:ro,reflect:!1,hasChanged:Os},no=1,so=1<<2,io=1<<3,ao=1<<4,co="finalized",dt=class extends HTMLElement{constructor(){super();this.initialize()}static get observedAttributes(){this.finalize();let e=[];return this._classProperties.forEach((r,o)=>{let s=this._attributeNameForProperty(o,r);s!==void 0&&(this._attributeToPropertyMap.set(s,o),e.push(s))}),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;let e=Object.getPrototypeOf(this)._classProperties;e!==void 0&&e.forEach((r,o)=>this._classProperties.set(o,r))}}static createProperty(e,r=oo){if(this._ensureClassProperties(),this._classProperties.set(e,r),r.noAccessor||this.prototype.hasOwnProperty(e))return;let o=typeof e=="symbol"?Symbol():`__${e}`,s=this.getPropertyDescriptor(e,o,r);s!==void 0&&Object.defineProperty(this.prototype,e,s)}static getPropertyDescriptor(e,r,o){return{get(){return this[r]},set(s){let i=this[e];this[r]=s,this.requestUpdateInternal(e,i,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||oo}static finalize(){let e=Object.getPrototypeOf(this);if(e.hasOwnProperty(co)||e.finalize(),this[co]=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){let r=this.properties,o=[...Object.getOwnPropertyNames(r),...typeof Object.getOwnPropertySymbols=="function"?Object.getOwnPropertySymbols(r):[]];for(let s of o)this.createProperty(s,r[s])}}static _attributeNameForProperty(e,r){let o=r.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}static _valueHasChanged(e,r,o=Os){return o(e,r)}static _propertyValueFromAttribute(e,r){let o=r.type,s=r.converter||ro,i=typeof s=="function"?s:s.fromAttribute;return i?i(e,o):e}static _propertyValueToAttribute(e,r){if(r.reflect===void 0)return;let o=r.type,s=r.converter;return(s&&s.toAttribute||ro.toAttribute)(e,o)}initialize(){this._updateState=0,this._updatePromise=new Promise(e=>this._enableUpdatingResolver=e),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach((e,r)=>{if(this.hasOwnProperty(r)){let o=this[r];delete this[r],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(r,o)}})}_applyInstanceProperties(){this._instanceProperties.forEach((e,r)=>this[r]=e),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){this._enableUpdatingResolver!==void 0&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,r,o){r!==o&&this._attributeToProperty(e,o)}_propertyToAttribute(e,r,o=oo){let s=this.constructor,i=s._attributeNameForProperty(e,o);if(i!==void 0){let c=s._propertyValueToAttribute(r,o);if(c===void 0)return;this._updateState=this._updateState|io,c==null?this.removeAttribute(i):this.setAttribute(i,c),this._updateState=this._updateState&~io}}_attributeToProperty(e,r){if(this._updateState&io)return;let o=this.constructor,s=o._attributeToPropertyMap.get(e);if(s!==void 0){let i=o.getPropertyOptions(s);this._updateState=this._updateState|ao,this[s]=o._propertyValueFromAttribute(r,i),this._updateState=this._updateState&~ao}}requestUpdateInternal(e,r,o){let s=!0;if(e!==void 0){let i=this.constructor;o=o||i.getPropertyOptions(e),i._valueHasChanged(this[e],r,o.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,r),o.reflect===!0&&!(this._updateState&ao)&&(this._reflectingProperties===void 0&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,o))):s=!1}!this._hasRequestedUpdate&&s&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,r){return this.requestUpdateInternal(e,r),this.updateComplete}async _enqueueUpdate(){this._updateState=this._updateState|so;try{await this._updatePromise}catch{}let e=this.performUpdate();return e!=null&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return this._updateState&so}get hasUpdated(){return this._updateState&no}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let e=!1,r=this._changedProperties;try{e=this.shouldUpdate(r),e?this.update(r):this._markUpdated()}catch(o){throw e=!1,this._markUpdated(),o}e&&(this._updateState&no||(this._updateState=this._updateState|no,this.firstUpdated(r)),this.updated(r))}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~so}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){this._reflectingProperties!==void 0&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((r,o)=>this._propertyToAttribute(o,this[o],r)),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}};n(dt,"UpdatingElement");vs=co;dt[vs]=!0});var ws,Jp,Cs=S(()=>{ws=Element.prototype,Jp=ws.msMatchesSelector||ws.webkitMatchesSelector});var dr,uo,ft,Ps,vc,v,po=S(()=>{dr=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,uo=Symbol(),ft=class{constructor(e,r){if(r!==uo)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return this._styleSheet===void 0&&(dr?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}};n(ft,"CSSResult");Ps=n(t=>new ft(String(t),uo),"unsafeCSS"),vc=n(t=>{if(t instanceof ft)return t.cssText;if(typeof t=="number")return t;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but
|
|
11
|
+
var lib=(()=>{var Vi=Object.create;var Be=Object.defineProperty;var $i=Object.getOwnPropertyDescriptor;var Hi=Object.getOwnPropertyNames;var Gi=Object.getPrototypeOf,Bi=Object.prototype.hasOwnProperty;var tn=t=>Be(t,"__esModule",{value:!0}),n=(t,e)=>Be(t,"name",{value:e,configurable:!0});var S=(t,e)=>()=>(t&&(e=t(t=0)),e);var de=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),xr=(t,e)=>{tn(t);for(var r in e)Be(t,r,{get:e[r],enumerable:!0})},zi=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Hi(e))!Bi.call(t,o)&&o!=="default"&&Be(t,o,{get:()=>e[o],enumerable:!(r=$i(e,o))||r.enumerable});return t},ee=t=>zi(tn(Be(t!=null?Vi(Gi(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var Et=de((_t,un)=>{(function(t,e){typeof _t=="object"&&typeof un!="undefined"?e(_t):typeof define=="function"&&define.amd?define(["exports"],e):(t=t||self,e(t.throttleDebounce={}))})(_t,function(t){"use strict";function e(o,s,i,c){var a,l=!1,d=0;function h(){a&&clearTimeout(a)}n(h,"clearExistingTimeout");function u(){h(),l=!0}n(u,"cancel"),typeof s!="boolean"&&(c=i,i=s,s=void 0);function m(){for(var _=arguments.length,b=new Array(_),f=0;f<_;f++)b[f]=arguments[f];var x=this,w=Date.now()-d;if(l)return;function y(){d=Date.now(),i.apply(x,b)}n(y,"exec");function C(){a=void 0}n(C,"clear"),c&&!a&&y(),h(),c===void 0&&w>o?y():s!==!0&&(a=setTimeout(c?C:y,c===void 0?o-w:o))}return n(m,"wrapper"),m.cancel=u,m}n(e,"throttle");function r(o,s,i){return i===void 0?e(o,s,!1):e(o,i,s!==!1)}n(r,"debounce"),t.debounce=r,t.throttle=e,Object.defineProperty(t,"__esModule",{value:!0})})});function dn(){return typeof window.og_auth!="undefined"?xt(window.og_auth):null}async function ra(t=100){return new Promise(e=>{setTimeout(()=>e(dn()),t)})}async function fn(t,e=Xi,r=ea){let o;if(o=xt(dn())||xt(e()),o)return o;if(t&&typeof t=="string"){let s=await fetch(t);s.status>=200&&s.status<300&&(o=e()||await(ta(s)?s.json():Promise.resolve(r(t)).then(e)))}else o||(o=await ra());if(o=xt(o),o)return o;throw new Error("Unauthorized")}var pn,Xi,xt,ea,ta,hn=S(()=>{pn=/^og_auth=/,Xi=n((t=pn)=>(document.cookie.split(/;\s*/).find(e=>e.match(t))||"").replace(pn,""),"c"),xt=n(t=>{if(typeof t=="object")return t;let e=String(t||"").split("|");return e.length===3?{sig_field:e[0],ts:parseInt(e[1],10),sig:e[2]}:null},"r"),ea=n(t=>new Promise((e,r)=>{let o=document.createElement("iframe");o.style.setProperty("display","none","important"),document.body.appendChild(o),o.onload=e,o.onerror=r,o.src=t}),"p"),ta=n(t=>(t.headers.get("content-type")||"").indexOf("application/json")!==-1,"d");n(dn,"a");n(ra,"f");n(fn,"u")});var I,q,U,St,we,P,We,Tt,vt,mn,Ot,Ce,gn,wt,Ct,yn,Pt,Rt,At,bn,_n,Nt,En,kt,Pe,xn,It,qt,Ye,Je,Ut,Dt,fe,te,Ft,Lt,Y,J,re,he,jt,me,Re,Cr,Pr,Sn,V=S(()=>{I="OPTIN_PRODUCT",q="OPTOUT_PRODUCT",U="PRODUCT_CHANGE_FREQUENCY",St="SET_MERCHANT_ID",we="REQUEST_OFFER",P="RECEIVE_OFFER",We="PRODUCT_HAS_CHANGED",Tt="CREATED_SESSION_ID",vt="SET_AUTH_URL",mn="REQUEST_AUTH",Ot="AUTHORIZE",Ce="UNAUTHORIZED",gn="REQUEST_ORDERS",wt="RECEIVE_ORDERS",Ct="RECEIVE_ORDER_ITEMS",yn="FETCH_RESPONSE_ERROR",Pt="SET_ENVIRONMENT_STAGING",Rt="SET_ENVIRONMENT_DEV",At="SET_ENVIRONMENT_PROD",bn="CONCLUDE_UPSELL",_n="REQUEST_CREATE_IU_ORDER",Nt="CREATE_ONE_TIME",En="REQUEST_CONVERT_ONE_TIME",kt="CONVERT_ONE_TIME",Pe="CHECKOUT",xn="RECEIVE_FETCH",It="SET_LOCALE",qt="SET_CONFIG",Ye="SET_PREVIEW_STANDARD_OFFER",Je="SET_PREVIEW_UPSELL_OFFER",Ut="ADD_TEMPLATE",Dt="SET_TEMPLATES",fe="LOCAL_STORAGE_CHANGE",te="LOCAL_STORAGE_CLEAR",Ft="SET_FIRST_ORDER_PLACE_DATE",Lt="SET_PRODUCT_TO_SUBSCRIBE",Y="RECEIVE_PRODUCT_PLANS",J="SETUP_PRODUCT",re="SETUP_CART",he="pdp",jt="dev",me="staging",Re="prod",Cr="static.ordergroove.com",Pr="staging.static.ordergroove.com",Sn="og-cart-updated"});var Ke=de((gu,An)=>{var oa="Expected a function",Tn="__lodash_hash_undefined__",na="[object Function]",sa="[object GeneratorFunction]",ia=/[\\^$.*+?()[\]{}|]/g,aa=/^\[object .+?Constructor\]$/,ca=typeof window=="object"&&window&&window.Object===Object&&window,la=typeof self=="object"&&self&&self.Object===Object&&self,vn=ca||la||Function("return this")();function ua(t,e){return t==null?void 0:t[e]}n(ua,"getValue");function pa(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}n(pa,"isHostObject");var da=Array.prototype,fa=Function.prototype,On=Object.prototype,Rr=vn["__core-js_shared__"],wn=function(){var t=/[^.]+$/.exec(Rr&&Rr.keys&&Rr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Cn=fa.toString,Ar=On.hasOwnProperty,ha=On.toString,ma=RegExp("^"+Cn.call(Ar).replace(ia,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ga=da.splice,ya=Pn(vn,"Map"),Qe=Pn(Object,"create");function ge(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}n(ge,"Hash");function ba(){this.__data__=Qe?Qe(null):{}}n(ba,"hashClear");function _a(t){return this.has(t)&&delete this.__data__[t]}n(_a,"hashDelete");function Ea(t){var e=this.__data__;if(Qe){var r=e[t];return r===Tn?void 0:r}return Ar.call(e,t)?e[t]:void 0}n(Ea,"hashGet");function xa(t){var e=this.__data__;return Qe?e[t]!==void 0:Ar.call(e,t)}n(xa,"hashHas");function Sa(t,e){var r=this.__data__;return r[t]=Qe&&e===void 0?Tn:e,this}n(Sa,"hashSet");ge.prototype.clear=ba;ge.prototype.delete=_a;ge.prototype.get=Ea;ge.prototype.has=xa;ge.prototype.set=Sa;function Ae(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}n(Ae,"ListCache");function Ta(){this.__data__=[]}n(Ta,"listCacheClear");function va(t){var e=this.__data__,r=Mt(e,t);if(r<0)return!1;var o=e.length-1;return r==o?e.pop():ga.call(e,r,1),!0}n(va,"listCacheDelete");function Oa(t){var e=this.__data__,r=Mt(e,t);return r<0?void 0:e[r][1]}n(Oa,"listCacheGet");function wa(t){return Mt(this.__data__,t)>-1}n(wa,"listCacheHas");function Ca(t,e){var r=this.__data__,o=Mt(r,t);return o<0?r.push([t,e]):r[o][1]=e,this}n(Ca,"listCacheSet");Ae.prototype.clear=Ta;Ae.prototype.delete=va;Ae.prototype.get=Oa;Ae.prototype.has=wa;Ae.prototype.set=Ca;function ye(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}n(ye,"MapCache");function Pa(){this.__data__={hash:new ge,map:new(ya||Ae),string:new ge}}n(Pa,"mapCacheClear");function Ra(t){return Vt(this,t).delete(t)}n(Ra,"mapCacheDelete");function Aa(t){return Vt(this,t).get(t)}n(Aa,"mapCacheGet");function Na(t){return Vt(this,t).has(t)}n(Na,"mapCacheHas");function ka(t,e){return Vt(this,t).set(t,e),this}n(ka,"mapCacheSet");ye.prototype.clear=Pa;ye.prototype.delete=Ra;ye.prototype.get=Aa;ye.prototype.has=Na;ye.prototype.set=ka;function Mt(t,e){for(var r=t.length;r--;)if(Fa(t[r][0],e))return r;return-1}n(Mt,"assocIndexOf");function Ia(t){if(!Rn(t)||Ua(t))return!1;var e=La(t)||pa(t)?ma:aa;return e.test(Da(t))}n(Ia,"baseIsNative");function Vt(t,e){var r=t.__data__;return qa(e)?r[typeof e=="string"?"string":"hash"]:r.map}n(Vt,"getMapData");function Pn(t,e){var r=ua(t,e);return Ia(r)?r:void 0}n(Pn,"getNative");function qa(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}n(qa,"isKeyable");function Ua(t){return!!wn&&wn in t}n(Ua,"isMasked");function Da(t){if(t!=null){try{return Cn.call(t)}catch{}try{return t+""}catch{}}return""}n(Da,"toSource");function Nr(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(oa);var r=n(function(){var o=arguments,s=e?e.apply(this,o):o[0],i=r.cache;if(i.has(s))return i.get(s);var c=t.apply(this,o);return r.cache=i.set(s,c),c},"memoized");return r.cache=new(Nr.Cache||ye),r}n(Nr,"memoize");Nr.Cache=ye;function Fa(t,e){return t===e||t!==t&&e!==e}n(Fa,"eq");function La(t){var e=Rn(t)?ha.call(t):"";return e==na||e==sa}n(La,"isFunction");function Rn(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}n(Rn,"isObject");An.exports=Nr});var $t,kr,Ze,Xe,Ht,Nn,kn,ja,Ma,Va,$a,Ha,et,Ir,Ga,In,tt,Ba,oe,ne=S(()=>{$t=ee(Ke()),kr=n((...t)=>JSON.stringify(t),"memoizeKey"),Ze=n(t=>(...e)=>fetch(...t(...e)).then(r=>r.json()),"withFetchJson"),Xe=n(t=>(e,...r)=>{if(!e)throw Error("host required");let[o,s={}]=t(...r);return[`${e.replace(/\/+$/,"")}${o}`,s]},"withHost"),Ht=n(t=>(e,...r)=>{if(!e)throw Error("auth required");let[o,s={}]=t(...r);return[o,{...s,headers:{Authorization:JSON.stringify(e),...s.headers}}]},"withAuth"),Nn=n(t=>(...e)=>{let[r,o={}]=t(...e);return[r,{method:"POST",...o,body:JSON.stringify(o.body),headers:{"Content-type":"application/json",...o.headers}}]},"withJsonBody"),kn=n((t=[])=>(Array.isArray(t)?t:Object.entries(t)).map(([e,r])=>[e,encodeURIComponent(r)].join("=")).join("&"),"toQuery"),ja=n(t=>JSON.stringify([].concat(t).map(e=>typeof e=="object"?e.id:e).filter(e=>e)),"toProductId"),Ma=(0,$t.default)(Ze(Xe((t,e,r,o="pdp")=>{if(!t)throw Error("merchantId required");if(!e)throw Error("sessionId required");if(!r)throw Error("product required");let s=kn([["session_id",e],["page_type",1],["p",ja(r)],["module_view",JSON.stringify(["regular"])]]);return[`/offer/${t}/${o}?${s}`]})),kr),Va=(0,$t.default)(Ze(Xe(Ht((t=1,e="place")=>[`/orders/?${kn([["status",t],["ordering",e],["exclude_prepaid_orders","true"]])}`]))),kr),$a=(0,$t.default)(Ze(Xe(Ht(t=>{if(!t)throw Error("orderId required");return[`/items/?order=${t}`]}))),kr),Ha=Ze(Xe(Ht(Nn((t,e,r,o)=>{if(!t)throw Error("product required");if(!e)throw Error("order required");if(!r)throw Error("quantity required");if(r<=0)throw Error("quantity must be greater or equal than one");if(!o)throw Error("offer required");return["/items/iu/",{body:{product:t,order:e,quantity:r,offer:o}}]})))),et=n(t=>{if(typeof t=="object")return{...t};let[e,r]=(t||"").split(/_/).map(o=>parseInt(o,10));return e&&r&&{every:e,every_period:r}},"parseFrequency"),Ir=n(t=>t.match(/^\d+_\d$/),"isFrequencyValid"),Ga=n((t,e)=>String.prototype.localeCompare.call(t&&t.split("_").reverse().join("_"),e&&e.split("_").reverse().join("_")),"compareFrequencies"),In=n(t=>[...new Set(t&&t.split(/\s+/))].filter(Ir).sort(Ga),"parseFrequenciesList"),tt=n(t=>{if(typeof t=="object"){let{every:e,period:r,every_period:o}=t;return`${e}_${r||o}`}return typeof t=="string"?t:""},"stringifyFrequency"),Ba=Ze(Xe(Ht(Nn((t,e,r)=>{if(!t)throw Error("item required");if(!e)throw Error("frequency required");let o=et(e);if(!o)throw Error("invalid frequency");return["/subscriptions/create_from_item/",{body:{item:t.public_id,offer:r,...o}}]})))),oe={fetchOffer:Ma,fetchOrders:Va,fetchItems:$a,createOneTime:Ha,convertOneTimeToSubscription:Ba}});function rt(t){document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t()}function ot(){return document.querySelector([`script[src^="https://${Cr}"]`,`script[src^="https://${Pr}"]`,`script[src^="http://${Cr}"]`,`script[src^="http://${Pr}"]`].join(","))}function qr(){let t=ot();if(!t)return[];let e=new URL(t.src),r=e.host.startsWith(me)?me:Re,o=e.pathname.split("/")[1];return!r&&!o?[]:[o,r,t]}function qn(t){if(t.isReady())return;let[e,r]=qr();!r&&!e||t.initialize(e,r)}function Dn(t){let e=document.cookie.match(`(^|;) ?${t}=([^;]*)(;|$)`);return e?e[2]:null}var R,Un,$=S(()=>{Gt();V();n(rt,"onReady");n(ot,"getMainJs");n(qr,"resolveEnvAndMerchant");R=n(t=>{var r;let e=`${t.id||t}`;return((r=Ne)==null?void 0:r.shopify_selling_plans)&&(e=e.split(":")[0]),e},"safeProductId");n(qn,"autoInitializeOffers");Un=n(t=>{document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:01 GMT;`},"clearCookie");n(Dn,"getCookieValue")});var ke,Ne,Gt=S(()=>{$();ke=ot(),Ne={shopify:typeof(ke==null?void 0:ke.dataset.shopifySellingPlans)!="undefined",shopify_selling_plans:typeof(ke==null?void 0:ke.dataset.shopifySellingPlans)!="undefined"}});var se,Ie,Fn,Bt,Ln,jn,za,Wa,nt,ie,Mn,zt,Vn,Ya,Ur,Dr,Wt,Fr,Yt,qe,Lr,Ja,$n,Hn,Qa,Ka,Za,Xa,Gn,Bn,zn,Wn,Yn,Jn,Qn,N=S(()=>{hn();V();ne();Gt();$();se=n((t,e,r)=>({type:I,payload:{product:t,frequency:e,offer:r}}),"optinProduct"),Ie=n((t,e)=>({type:q,payload:{product:t,offer:e}}),"optoutProduct"),Fn=n((t,e)=>({type:We,payload:{newProduct:t,product:e}}),"productHasChangedComponents"),Bt=n((t,e,r)=>({type:U,payload:{product:t,frequency:e,offer:r}}),"productChangeFrequency"),Ln=n(t=>({type:bn,payload:{product:t}}),"concludeUpsell"),jn=n(t=>({type:St,payload:t}),"setMerchantId"),za=n(t=>({type:Tt,payload:`${t}.${Math.floor(Math.random()*999999)}.${Math.round(new Date().getTime()/1e3)}`}),"createSessionId"),Wa=n(t=>({type:mn,payload:t}),"requestAuth"),nt=n((t,e,r,o)=>({type:Ot,payload:{public_id:t,sig_field:e,ts:r,sig:o}}),"authorize"),ie=n(t=>({type:Ce,payload:t}),"unauthorized"),Mn=n(t=>({type:vt,payload:t}),"setAuthUrl"),zt=n(t=>({type:xn,payload:t}),"fetchDone"),Vn=n((t=fn)=>n(function(r,o){if(window.og&&window.og.previewMode)return r(ie({message:"Offers are running in preview mode"}));let{merchantId:s,authUrl:i}=o(),c=Wa(i);return r(c),t(i).then(({sig_field:a,ts:l,sig:d})=>r(nt(s,a,l,d)),a=>r(ie(a))).finally(()=>r(zt(c)))},"fetchAuthThunk"),"fetchAuth"),Ya=n((t,e)=>({type:gn,payload:{status:t,ordering:e}}),"requestOrders"),Ur=n(t=>({type:wt,payload:t}),"receiveOrders"),Dr=n(t=>({type:Ct,payload:t}),"receiveItems"),Wt=n((t=1,e="place")=>n(function(o,s){let{environment:{legoUrl:i},auth:c}=s();if(!c)return o(ie("No auth set."));let a=Ya(t,e);return o(a),oe.fetchOrders(i,c,t,e).then(l=>{if(l.results){o(Ur(l));let d=(l.results[0]||{}).public_id;if(d)return oe.fetchItems(i,c,d).then(h=>o(Dr(h)))}return o(ie(l.detail)),null},l=>o(ie(l))).finally(()=>o(zt(a)))},"fetchOrdersThunk"),"fetchOrders"),Fr=n(t=>{switch(t){case jt:return{type:Rt,payload:t};case me:return{type:Pt,payload:t};case Re:return{type:At,payload:t};default:throw new Error(`${t} is not a supported environment`)}},"setEnvironment"),Yt=n(()=>(t,e)=>{let{merchantId:r,sessionId:o}=e();return(!o||r&&!o.startsWith(r))&&t(za(r)),o},"requestSessionId"),qe=n((t,e)=>({type:P,payload:{...t,offer:e}}),"receiveOffer"),Lr=n(t=>({type:yn,payload:t}),"fetchResponseError"),Ja=n((t,e=he,r)=>({type:we,payload:{product:t,module:e,offer:r}}),"requestOffer"),$n=n((t,e=he,r)=>n(function(s,i){let{merchantId:c,sessionId:a,environment:{apiUrl:l}}=i(),d=Ja(t,e,r);s(d);let h=R(t);return oe.fetchOffer(l,c,a,h,e).then(u=>s(qe(u,r)),u=>s(Lr(u))).finally(()=>s(zt(d)))},"fetchOfferThunk"),"fetchOffer"),Hn=n(()=>({type:Pe}),"checkout"),Qa=n((t,e,r,o)=>({type:_n,payload:{product:t,order:e,quantity:r,offerId:o}}),"requestCreateOneTime"),Ka=n(t=>({type:Nt,payload:t}),"receiveCreateOneTime"),Za=n((t,e)=>({type:En,payload:{item:t,frequency:e}}),"requestConvertOneTimeToSubscription"),Xa=n((t,e)=>({type:kt,payload:{response:t,product:e}}),"receiveConvertOneTime"),Gn=n((t,e,r,o=!1,s=null)=>n(function(c,a){let{auth:l,environment:{legoUrl:d},previewUpsellOffer:h,offerId:u}=a();if(!l)return c(ie("No auth set."));let m=Qa(t,e,r,u);return c(m),(h?Promise.resolve({legoUrl:d,product:t,order:e,quantity:r,offer:u}):oe.createOneTime(d,l,t.id,e,r,u)).then(_=>(c(Ka(_)),o?(c(Za(_,s)),(h?Promise.resolve({item:_,frequency:s}):oe.convertOneTimeToSubscription(d,l,_,s,u)).then(b=>c(Xa(b,t)),b=>c(Lr(b)))):_),_=>c(Lr(_))).finally(()=>c(zt(m)))},"createIuThunk"),"createIu"),Bn=n(t=>({type:It,payload:t}),"setLocale"),zn=n(t=>({type:qt,payload:t}),"setConfig"),Wn=n((t,e,r)=>({type:Ut,payload:{selector:t,markup:e,config:r}}),"addTemplate"),Yn=n(t=>({type:Dt,payload:t}),"setTemplates"),Jn=n((t,e)=>({type:Ft,payload:{product:t,firstOrderPlaceDate:e}}),"setFirstOrderPlaceDate"),Qn=n((t,e)=>({type:Lt,payload:{product:t,productToSubscribe:e}}),"setProductToSubscribe")});var Gr,_e,Ee=S(()=>{Gr=typeof window!="undefined"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,_e=n((t,e,r=null)=>{for(;e!==r;){let o=e.nextSibling;t.removeChild(e),e=o}},"removeNodes")});var j,Br,fs,Fe,xe,hs,it,W,tr,ae=S(()=>{j=`{{lit-${String(Math.random()).slice(2)}}}`,Br=`<!--${j}-->`,fs=new RegExp(`${j}|${Br}`),Fe="$lit$",xe=class{constructor(e,r){this.parts=[],this.element=r;let o=[],s=[],i=document.createTreeWalker(r.content,133,null,!1),c=0,a=-1,l=0,{strings:d,values:{length:h}}=e;for(;l<h;){let u=i.nextNode();if(u===null){i.currentNode=s.pop();continue}if(a++,u.nodeType===1){if(u.hasAttributes()){let m=u.attributes,{length:_}=m,b=0;for(let f=0;f<_;f++)hs(m[f].name,Fe)&&b++;for(;b-- >0;){let f=d[l],x=tr.exec(f)[2],w=x.toLowerCase()+Fe,y=u.getAttribute(w);u.removeAttribute(w);let C=y.split(fs);this.parts.push({type:"attribute",index:a,name:x,strings:C}),l+=C.length-1}}u.tagName==="TEMPLATE"&&(s.push(u),i.currentNode=u.content)}else if(u.nodeType===3){let m=u.data;if(m.indexOf(j)>=0){let _=u.parentNode,b=m.split(fs),f=b.length-1;for(let x=0;x<f;x++){let w,y=b[x];if(y==="")w=W();else{let C=tr.exec(y);C!==null&&hs(C[2],Fe)&&(y=y.slice(0,C.index)+C[1]+C[2].slice(0,-Fe.length)+C[3]),w=document.createTextNode(y)}_.insertBefore(w,u),this.parts.push({type:"node",index:++a})}b[f]===""?(_.insertBefore(W(),u),o.push(u)):u.data=b[f],l+=f}}else if(u.nodeType===8)if(u.data===j){let m=u.parentNode;(u.previousSibling===null||a===c)&&(a++,m.insertBefore(W(),u)),c=a,this.parts.push({type:"node",index:a}),u.nextSibling===null?u.data="":(o.push(u),a--),l++}else{let m=-1;for(;(m=u.data.indexOf(j,m+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(let u of o)u.parentNode.removeChild(u)}};n(xe,"Template");hs=n((t,e)=>{let r=t.length-e.length;return r>=0&&t.slice(r)===e},"endsWith"),it=n(t=>t.index!==-1,"isTemplatePartActive"),W=n(()=>document.createComment(""),"createMarker"),tr=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/});function Wr(t,e){let{element:{content:r},parts:o}=t,s=document.createTreeWalker(r,zr,null,!1),i=at(o),c=o[i],a=-1,l=0,d=[],h=null;for(;s.nextNode();){a++;let u=s.currentNode;for(u.previousSibling===h&&(h=null),e.has(u)&&(d.push(u),h===null&&(h=u)),h!==null&&l++;c!==void 0&&c.index===a;)c.index=h!==null?-1:c.index-l,i=at(o,i),c=o[i]}d.forEach(u=>u.parentNode.removeChild(u))}function ms(t,e,r=null){let{element:{content:o},parts:s}=t;if(r==null){o.appendChild(e);return}let i=document.createTreeWalker(o,zr,null,!1),c=at(s),a=0,l=-1;for(;i.nextNode();)for(l++,i.currentNode===r&&(a=hc(e),r.parentNode.insertBefore(e,r));c!==-1&&s[c].index===l;){if(a>0){for(;c!==-1;)s[c].index+=a,c=at(s,c);return}c=at(s,c)}}var zr,hc,at,gs=S(()=>{ae();zr=133;n(Wr,"removeNodesFromTemplate");hc=n(t=>{let e=t.nodeType===11?0:1,r=document.createTreeWalker(t,zr,null,!1);for(;r.nextNode();)e++;return e},"countNodes"),at=n((t,e=-1)=>{for(let r=e+1;r<t.length;r++){let o=t[r];if(it(o))return r}return-1},"nextActiveIndexInTemplateParts");n(ms,"insertNodeIntoTemplate")});var mc,Se,Yr=S(()=>{mc=new WeakMap,Se=n(t=>typeof t=="function"&&mc.has(t),"isDirective")});var D,rr,Jr=S(()=>{D={},rr={}});var ce,or=S(()=>{Ee();ae();ce=class{constructor(e,r,o){this.__parts=[],this.template=e,this.processor=r,this.options=o}update(e){let r=0;for(let o of this.__parts)o!==void 0&&o.setValue(e[r]),r++;for(let o of this.__parts)o!==void 0&&o.commit()}_clone(){let e=Gr?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),r=[],o=this.template.parts,s=document.createTreeWalker(e,133,null,!1),i=0,c=0,a,l=s.nextNode();for(;i<o.length;){if(a=o[i],!it(a)){this.__parts.push(void 0),i++;continue}for(;c<a.index;)c++,l.nodeName==="TEMPLATE"&&(r.push(l),s.currentNode=l.content),(l=s.nextNode())===null&&(s.currentNode=r.pop(),l=s.nextNode());if(a.type==="node"){let d=this.processor.handleTextExpression(this.options);d.insertAfterNode(l.previousSibling),this.__parts.push(d)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,a.name,a.strings,this.options));i++}return Gr&&(document.adoptNode(e),customElements.upgrade(e)),e}};n(ce,"TemplateInstance")});var ys,yc,K,nr=S(()=>{Ee();ae();ys=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t}),yc=` ${j} `,K=class{constructor(e,r,o,s){this.strings=e,this.values=r,this.type=o,this.processor=s}getHTML(){let e=this.strings.length-1,r="",o=!1;for(let s=0;s<e;s++){let i=this.strings[s],c=i.lastIndexOf("<!--");o=(c>-1||o)&&i.indexOf("-->",c+1)===-1;let a=tr.exec(i);a===null?r+=i+(o?yc:Br):r+=i.substr(0,a.index)+a[1]+a[2]+Fe+a[3]+j}return r+=this.strings[e],r}getTemplateElement(){let e=document.createElement("template"),r=this.getHTML();return ys!==void 0&&(r=ys.createHTML(r)),e.innerHTML=r,e}};n(K,"TemplateResult")});var sr,ir,Le,ct,Z,lt,ut,ar,bs,pt,bc,cr=S(()=>{Yr();Ee();Jr();or();nr();ae();sr=n(t=>t===null||!(typeof t=="object"||typeof t=="function"),"isPrimitive"),ir=n(t=>Array.isArray(t)||!!(t&&t[Symbol.iterator]),"isIterable"),Le=class{constructor(e,r,o){this.dirty=!0,this.element=e,this.name=r,this.strings=o,this.parts=[];for(let s=0;s<o.length-1;s++)this.parts[s]=this._createPart()}_createPart(){return new ct(this)}_getValue(){let e=this.strings,r=e.length-1,o=this.parts;if(r===1&&e[0]===""&&e[1]===""){let i=o[0].value;if(typeof i=="symbol")return String(i);if(typeof i=="string"||!ir(i))return i}let s="";for(let i=0;i<r;i++){s+=e[i];let c=o[i];if(c!==void 0){let a=c.value;if(sr(a)||!ir(a))s+=typeof a=="string"?a:String(a);else for(let l of a)s+=typeof l=="string"?l:String(l)}}return s+=e[r],s}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}};n(Le,"AttributeCommitter");ct=class{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==D&&(!sr(e)||e!==this.value)&&(this.value=e,Se(e)||(this.committer.dirty=!0))}commit(){for(;Se(this.value);){let e=this.value;this.value=D,e(this)}this.value!==D&&this.committer.commit()}};n(ct,"AttributePart");Z=class{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(W()),this.endNode=e.appendChild(W())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=W()),e.__insert(this.endNode=W())}insertAfterPart(e){e.__insert(this.startNode=W()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(this.startNode.parentNode===null)return;for(;Se(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=D,r(this)}let e=this.__pendingValue;e!==D&&(sr(e)?e!==this.value&&this.__commitText(e):e instanceof K?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):ir(e)?this.__commitIterable(e):e===rr?(this.value=rr,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){let r=this.startNode.nextSibling;e=e??"";let o=typeof e=="string"?e:String(e);r===this.endNode.previousSibling&&r.nodeType===3?r.data=o:this.__commitNode(document.createTextNode(o)),this.value=e}__commitTemplateResult(e){let r=this.options.templateFactory(e);if(this.value instanceof ce&&this.value.template===r)this.value.update(e.values);else{let o=new ce(r,e.processor,this.options),s=o._clone();o.update(e.values),this.__commitNode(s),this.value=o}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());let r=this.value,o=0,s;for(let i of e)s=r[o],s===void 0&&(s=new Z(this.options),r.push(s),o===0?s.appendIntoPart(this):s.insertAfterPart(r[o-1])),s.setValue(i),s.commit(),o++;o<r.length&&(r.length=o,this.clear(s&&s.endNode))}clear(e=this.startNode){_e(this.startNode.parentNode,e.nextSibling,this.endNode)}};n(Z,"NodePart");lt=class{constructor(e,r,o){if(this.value=void 0,this.__pendingValue=void 0,o.length!==2||o[0]!==""||o[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=r,this.strings=o}setValue(e){this.__pendingValue=e}commit(){for(;Se(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=D,r(this)}if(this.__pendingValue===D)return;let e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=D}};n(lt,"BooleanAttributePart");ut=class extends Le{constructor(e,r,o){super(e,r,o);this.single=o.length===2&&o[0]===""&&o[1]===""}_createPart(){return new ar(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}};n(ut,"PropertyCommitter");ar=class extends ct{};n(ar,"PropertyPart");bs=!1;(()=>{try{let t={get capture(){return bs=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch{}})();pt=class{constructor(e,r,o){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=r,this.eventContext=o,this.__boundHandleEvent=s=>this.handleEvent(s)}setValue(e){this.__pendingValue=e}commit(){for(;Se(this.__pendingValue);){let i=this.__pendingValue;this.__pendingValue=D,i(this)}if(this.__pendingValue===D)return;let e=this.__pendingValue,r=this.value,o=e==null||r!=null&&(e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive),s=e!=null&&(r==null||o);o&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=bc(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=D}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}};n(pt,"EventPart");bc=n(t=>t&&(bs?{capture:t.capture,passive:t.passive,once:t.once}:t.capture),"getOptions")});function Qr(t){let e=Te.get(t.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},Te.set(t.type,e));let r=e.stringsArray.get(t.strings);if(r!==void 0)return r;let o=t.strings.join(j);return r=e.keyString.get(o),r===void 0&&(r=new xe(t,t.getTemplateElement()),e.keyString.set(o,r)),e.stringsArray.set(t.strings,r),r}var Te,lr=S(()=>{ae();n(Qr,"templateFactory");Te=new Map});var le,Kr,Zr=S(()=>{Ee();cr();lr();le=new WeakMap,Kr=n((t,e,r)=>{let o=le.get(e);o===void 0&&(_e(e,e.firstChild),le.set(e,o=new Z(Object.assign({templateFactory:Qr},r))),o.appendInto(e)),o.setValue(t),o.commit()},"render")});var ur,Xr,eo=S(()=>{cr();ur=class{handleAttributeExpressions(e,r,o,s){let i=r[0];return i==="."?new ut(e,r.slice(1),o).parts:i==="@"?[new pt(e,r.slice(1),s.eventContext)]:i==="?"?[new lt(e,r.slice(1),o)]:new Le(e,r,o).parts}handleTextExpression(e){return new Z(e)}};n(ur,"DefaultTemplateProcessor");Xr=new ur});var p,to=S(()=>{eo();nr();eo();Yr();Ee();Jr();cr();Zr();lr();or();nr();ae();typeof window!="undefined"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.3.0");p=n((t,...e)=>new K(t,e,"html",Xr),"html")});var Es,pr,Ec,xc,Sc,xs,Tc,Ss,Ts=S(()=>{Ee();gs();Zr();lr();or();ae();to();Es=n((t,e)=>`${t}--${e}`,"getTemplateCacheKey"),pr=!0;typeof window.ShadyCSS=="undefined"?pr=!1:typeof window.ShadyCSS.prepareTemplateDom=="undefined"&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),pr=!1);Ec=n(t=>e=>{let r=Es(e.type,t),o=Te.get(r);o===void 0&&(o={stringsArray:new WeakMap,keyString:new Map},Te.set(r,o));let s=o.stringsArray.get(e.strings);if(s!==void 0)return s;let i=e.strings.join(j);if(s=o.keyString.get(i),s===void 0){let c=e.getTemplateElement();pr&&window.ShadyCSS.prepareTemplateDom(c,t),s=new xe(e,c),o.keyString.set(i,s)}return o.stringsArray.set(e.strings,s),s},"shadyTemplateFactory"),xc=["html","svg"],Sc=n(t=>{xc.forEach(e=>{let r=Te.get(Es(e,t));r!==void 0&&r.keyString.forEach(o=>{let{element:{content:s}}=o,i=new Set;Array.from(s.querySelectorAll("style")).forEach(c=>{i.add(c)}),Wr(o,i)})})},"removeStylesFromLitTemplates"),xs=new Set,Tc=n((t,e,r)=>{xs.add(t);let o=r?r.element:document.createElement("template"),s=e.querySelectorAll("style"),{length:i}=s;if(i===0){window.ShadyCSS.prepareTemplateStyles(o,t);return}let c=document.createElement("style");for(let d=0;d<i;d++){let h=s[d];h.parentNode.removeChild(h),c.textContent+=h.textContent}Sc(t);let a=o.content;r?ms(r,c,a.firstChild):a.insertBefore(c,a.firstChild),window.ShadyCSS.prepareTemplateStyles(o,t);let l=a.querySelector("style");if(window.ShadyCSS.nativeShadow&&l!==null)e.insertBefore(l.cloneNode(!0),e.firstChild);else if(r){a.insertBefore(c,a.firstChild);let d=new Set;d.add(c),Wr(r,d)}},"prepareTemplateStyles"),Ss=n((t,e,r)=>{if(!r||typeof r!="object"||!r.scopeName)throw new Error("The `scopeName` option is required.");let o=r.scopeName,s=le.has(e),i=pr&&e.nodeType===11&&!!e.host,c=i&&!xs.has(o),a=c?document.createDocumentFragment():e;if(Kr(t,a,Object.assign({templateFactory:Ec(o)},r)),c){let l=le.get(a);le.delete(a);let d=l.value instanceof ce?l.value.template:void 0;Tc(o,a,d),_e(e,e.firstChild),e.appendChild(a),le.set(e,l)}!s&&i&&window.ShadyCSS.styleElement(e.host)},"render")});var vs,ro,Os,oo,no,so,io,ao,co,dt,lo=S(()=>{window.JSCompiler_renameProperty=(t,e)=>t;ro={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){switch(e){case Boolean:return t!==null;case Number:return t===null?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},Os=n((t,e)=>e!==t&&(e===e||t===t),"notEqual"),oo={attribute:!0,type:String,converter:ro,reflect:!1,hasChanged:Os},no=1,so=1<<2,io=1<<3,ao=1<<4,co="finalized",dt=class extends HTMLElement{constructor(){super();this.initialize()}static get observedAttributes(){this.finalize();let e=[];return this._classProperties.forEach((r,o)=>{let s=this._attributeNameForProperty(o,r);s!==void 0&&(this._attributeToPropertyMap.set(s,o),e.push(s))}),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;let e=Object.getPrototypeOf(this)._classProperties;e!==void 0&&e.forEach((r,o)=>this._classProperties.set(o,r))}}static createProperty(e,r=oo){if(this._ensureClassProperties(),this._classProperties.set(e,r),r.noAccessor||this.prototype.hasOwnProperty(e))return;let o=typeof e=="symbol"?Symbol():`__${e}`,s=this.getPropertyDescriptor(e,o,r);s!==void 0&&Object.defineProperty(this.prototype,e,s)}static getPropertyDescriptor(e,r,o){return{get(){return this[r]},set(s){let i=this[e];this[r]=s,this.requestUpdateInternal(e,i,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||oo}static finalize(){let e=Object.getPrototypeOf(this);if(e.hasOwnProperty(co)||e.finalize(),this[co]=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){let r=this.properties,o=[...Object.getOwnPropertyNames(r),...typeof Object.getOwnPropertySymbols=="function"?Object.getOwnPropertySymbols(r):[]];for(let s of o)this.createProperty(s,r[s])}}static _attributeNameForProperty(e,r){let o=r.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}static _valueHasChanged(e,r,o=Os){return o(e,r)}static _propertyValueFromAttribute(e,r){let o=r.type,s=r.converter||ro,i=typeof s=="function"?s:s.fromAttribute;return i?i(e,o):e}static _propertyValueToAttribute(e,r){if(r.reflect===void 0)return;let o=r.type,s=r.converter;return(s&&s.toAttribute||ro.toAttribute)(e,o)}initialize(){this._updateState=0,this._updatePromise=new Promise(e=>this._enableUpdatingResolver=e),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach((e,r)=>{if(this.hasOwnProperty(r)){let o=this[r];delete this[r],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(r,o)}})}_applyInstanceProperties(){this._instanceProperties.forEach((e,r)=>this[r]=e),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){this._enableUpdatingResolver!==void 0&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,r,o){r!==o&&this._attributeToProperty(e,o)}_propertyToAttribute(e,r,o=oo){let s=this.constructor,i=s._attributeNameForProperty(e,o);if(i!==void 0){let c=s._propertyValueToAttribute(r,o);if(c===void 0)return;this._updateState=this._updateState|io,c==null?this.removeAttribute(i):this.setAttribute(i,c),this._updateState=this._updateState&~io}}_attributeToProperty(e,r){if(this._updateState&io)return;let o=this.constructor,s=o._attributeToPropertyMap.get(e);if(s!==void 0){let i=o.getPropertyOptions(s);this._updateState=this._updateState|ao,this[s]=o._propertyValueFromAttribute(r,i),this._updateState=this._updateState&~ao}}requestUpdateInternal(e,r,o){let s=!0;if(e!==void 0){let i=this.constructor;o=o||i.getPropertyOptions(e),i._valueHasChanged(this[e],r,o.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,r),o.reflect===!0&&!(this._updateState&ao)&&(this._reflectingProperties===void 0&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,o))):s=!1}!this._hasRequestedUpdate&&s&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,r){return this.requestUpdateInternal(e,r),this.updateComplete}async _enqueueUpdate(){this._updateState=this._updateState|so;try{await this._updatePromise}catch{}let e=this.performUpdate();return e!=null&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return this._updateState&so}get hasUpdated(){return this._updateState&no}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let e=!1,r=this._changedProperties;try{e=this.shouldUpdate(r),e?this.update(r):this._markUpdated()}catch(o){throw e=!1,this._markUpdated(),o}e&&(this._updateState&no||(this._updateState=this._updateState|no,this.firstUpdated(r)),this.updated(r))}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~so}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){this._reflectingProperties!==void 0&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((r,o)=>this._propertyToAttribute(o,this[o],r)),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}};n(dt,"UpdatingElement");vs=co;dt[vs]=!0});var ws,Jp,Cs=S(()=>{ws=Element.prototype,Jp=ws.msMatchesSelector||ws.webkitMatchesSelector});var dr,uo,ft,Ps,vc,v,po=S(()=>{dr=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,uo=Symbol(),ft=class{constructor(e,r){if(r!==uo)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return this._styleSheet===void 0&&(dr?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}};n(ft,"CSSResult");Ps=n(t=>new ft(String(t),uo),"unsafeCSS"),vc=n(t=>{if(t instanceof ft)return t.cssText;if(typeof t=="number")return t;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but
|
|
12
12
|
take care to ensure page security.`)},"textFromCSSResult"),v=n((t,...e)=>{let r=e.reduce((o,s,i)=>o+vc(s)+t[i+1],t[0]);return new ft(r,uo)},"css")});var Rs,T,O=S(()=>{Ts();lo();lo();Cs();to();po();po();(window.litElementVersions||(window.litElementVersions=[])).push("2.4.0");Rs={},T=class extends dt{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;let e=this.getStyles();if(Array.isArray(e)){let r=n((i,c)=>i.reduceRight((a,l)=>Array.isArray(l)?r(l,a):(a.add(l),a),c),"addStyles"),o=r(e,new Set),s=[];o.forEach(i=>s.unshift(i)),this._styles=s}else this._styles=e===void 0?[]:[e];this._styles=this._styles.map(r=>{if(r instanceof CSSStyleSheet&&!dr){let o=Array.prototype.slice.call(r.cssRules).reduce((s,i)=>s+i.cssText,"");return Ps(o)}return r})}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){let e=this.constructor._styles;e.length!==0&&(window.ShadyCSS!==void 0&&!window.ShadyCSS.nativeShadow?window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(r=>r.cssText),this.localName):dr?this.renderRoot.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):this._needsShimAdoptedStyleSheets=!0)}connectedCallback(){super.connectedCallback(),this.hasUpdated&&window.ShadyCSS!==void 0&&window.ShadyCSS.styleElement(this)}update(e){let r=this.render();super.update(e),r!==Rs&&this.constructor.render(r,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(o=>{let s=document.createElement("style");s.textContent=o.cssText,this.renderRoot.appendChild(s)}))}render(){return Rs}};n(T,"LitElement");T.finalized=!0;T.render=Ss});var fr=de((id,As)=>{var Oc={PAR_OPEN:"(".charCodeAt(0),PAR_CLOSE:")".charCodeAt(0),OP_NOT:"!".charCodeAt(0),BINARY_AND:"&".charCodeAt(0),BINARY_OR:"|".charCodeAt(0),LITERAL:"LITERAL",END:"END",LEAF:"LEAF",ATOMIC:"ATOMIC"};As.exports=Oc});var ks=de((ad,Ns)=>{var ve=fr(),wc=n(t=>{let e="",r=[];for(let o of t){let s=o.charCodeAt(0);switch(s){case ve.PAR_OPEN:case ve.PAR_CLOSE:case ve.OP_NOT:case ve.BINARY_AND:case ve.BINARY_OR:e&&(r.push({type:ve.LITERAL,value:e}),e=""),r.push({type:s,value:o});break;default:e+=o}}return e&&r.push({type:ve.LITERAL,value:e}),r},"Tokenizer");Ns.exports=wc});var qs=de((cd,Is)=>{var ue=fr(),Cc=n(t=>{let e=[],r=[];return t.forEach(s=>{switch(s.type){case ue.LITERAL:e.unshift(s);break;case ue.BINARY_AND:case ue.BINARY_OR:case ue.OP_NOT:case ue.PAR_OPEN:r.push(s);break;case ue.PAR_CLOSE:for(;r.length&&r[r.length-1].type!==ue.PAR_OPEN;)e.unshift(r.pop());r.pop(),r.length&&r[r.length-1].type===ue.OP_NOT&&e.unshift(r.pop());break;default:break}}),r.length&&[...r.reverse(),...e]||e},"PolishNotation"),Pc=n(function*(t){for(let e=0;e<t.length-1;e++)yield t[e];return t[t.length-1]},"PolishGenerator");Is.exports={PolishNotation:Cc,PolishGenerator:Pc}});var Ds=de((ld,Us)=>{var F=fr(),G=class{constructor(e,r,o,s){this.op=e,this.left=r,this.right=o,this.literal=s}isLeaf(){return this.op===F.LEAF}isAtomic(){return this.isLeaf()||this.op===F.OP_NOT&&this.left.isLeaf()}getLiteralValue(){return this.literal}static CreateAnd(e,r){return new G(F.BINARY_AND,e,r)}static CreateNot(e){return new G(F.OP_NOT,e)}static CreateOr(e,r){return new G(F.BINARY_OR,e,r)}static CreateLiteral(e){return new G(F.LEAF,null,null,e)}};n(G,"ExpNode");var je=n(t=>{let e=t.next().value;switch(e.type){case F.LITERAL:return G.CreateLiteral(e.value);case F.OP_NOT:return G.CreateNot(je(t));case F.BINARY_AND:{let r=je(t),o=je(t);return G.CreateAnd(r,o)}case F.BINARY_OR:{let r=je(t),o=je(t);return G.CreateOr(r,o)}}return null},"make"),Me=n((t,e)=>{if(t.isLeaf())return e(t.getLiteralValue());if(t.op===F.OP_NOT)return!Me(t.left,e);if(t.op===F.BINARY_OR)return Me(t.left,e)||Me(t.right,e);if(t.op===F.BINARY_AND)return Me(t.left,e)&&Me(t.right,e)},"nodeEvaluator");Us.exports={make:je,nodeEvaluator:Me}});var Ms=de((ud,js)=>{var Rc=ks(),Fs=qs(),Ls=Ds(),Ac=n((t,e)=>{let r=Rc(t),o=Fs.PolishNotation(r),s=Fs.PolishGenerator(o),i=Ls.make(s);return Ls.nodeEvaluator(i,e)},"parse");js.exports={parse:Ac}});var yi={};xr(yi,{TestWizard:()=>Er,default:()=>Xc});var Er,Xc,bi=S(()=>{O();N();Er=class extends T{static get styles(){return v`
|
|
13
13
|
:host {
|
|
14
14
|
position: fixed;
|