@ordergroove/offers 2.25.2-alpha-PR-576-3.7 → 2.25.2-alpha-PR-576-6.8

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/offers.js CHANGED
@@ -8,7 +8,7 @@ else {
8
8
  window.og['offers'] = factory();
9
9
  }
10
10
  })(()=>{
11
- var lib=(()=>{var ui=Object.create;var xe=Object.defineProperty,pi=Object.defineProperties,di=Object.getOwnPropertyDescriptor,fi=Object.getOwnPropertyDescriptors,hi=Object.getOwnPropertyNames,xo=Object.getOwnPropertySymbols,mi=Object.getPrototypeOf,Eo=Object.prototype.hasOwnProperty,gi=Object.prototype.propertyIsEnumerable;var So=(t,e,r)=>e in t?xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l=(t,e)=>{for(var r in e||(e={}))Eo.call(e,r)&&So(t,r,e[r]);if(xo)for(var r of xo(e))gi.call(e,r)&&So(t,r,e[r]);return t},h=(t,e)=>pi(t,fi(e)),vo=t=>xe(t,"__esModule",{value:!0}),n=(t,e)=>xe(t,"name",{value:e,configurable:!0}),ne=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var w=(t,e)=>()=>(t&&(e=t(t=0)),e);var se=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),nr=(t,e)=>{vo(t);for(var r in e)xe(t,r,{get:e[r],enumerable:!0})},yi=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of hi(e))!Eo.call(t,o)&&o!=="default"&&xe(t,o,{get:()=>e[o],enumerable:!(r=di(e,o))||r.enumerable});return t},Ee=t=>yi(vo(xe(t!=null?ui(mi(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var ie,ae,ce,at,jo,D,Le,ct,lt,Mo,ut,ve,Vo,pt,dt,$o,ft,ht,mt,Bo,Ho,gt,zo,yt,we,Go,bt,_t,je,Me,xt,Et,le,Y,St,vt,wt,ue=w(()=>{ie="OPTIN_PRODUCT",ae="OPTOUT_PRODUCT",ce="PRODUCT_CHANGE_FREQUENCY",at="SET_MERCHANT_ID",jo="REQUEST_OFFER",D="RECEIVE_OFFER",Le="PRODUCT_HAS_CHANGED",ct="CREATED_SESSION_ID",lt="SET_AUTH_URL",Mo="REQUEST_AUTH",ut="AUTHORIZE",ve="UNAUTHORIZED",Vo="REQUEST_ORDERS",pt="RECEIVE_ORDERS",dt="RECEIVE_ORDER_ITEMS",$o="FETCH_RESPONSE_ERROR",ft="SET_ENVIRONMENT_STAGING",ht="SET_ENVIRONMENT_DEV",mt="SET_ENVIRONMENT_PROD",Bo="CONCLUDE_UPSELL",Ho="REQUEST_CREATE_IU_ORDER",gt="CREATE_ONE_TIME",zo="REQUEST_CONVERT_ONE_TIME",yt="CONVERT_ONE_TIME",we="CHECKOUT",Go="RECEIVE_FETCH",bt="SET_LOCALE",_t="SET_CONFIG",je="SET_PREVIEW_STANDARD_OFFER",Me="SET_PREVIEW_UPSELL_OFFER",xt="ADD_TEMPLATE",Et="SET_TEMPLATES",le="LOCAL_STORAGE_CHANGE",Y="LOCAL_STORAGE_CLEAR",St="SET_FIRST_ORDER_PLACE_DATE",vt="SET_PRODUCT_TO_SUBSCRIBE",wt="RECEIVE_PRODUCT_PLANS"});var Ct=se((bl,en)=>{var $i="Expected a function",Wo="__lodash_hash_undefined__",Bi="[object Function]",Hi="[object GeneratorFunction]",zi=/[\\^$.*+?()[\]{}|]/g,Gi=/^\[object .+?Constructor\]$/,Wi=typeof window=="object"&&window&&window.Object===Object&&window,Yi=typeof self=="object"&&self&&self.Object===Object&&self,Yo=Wi||Yi||Function("return this")();function Qi(t,e){return t==null?void 0:t[e]}n(Qi,"getValue");function Ji(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}n(Ji,"isHostObject");var Ki=Array.prototype,Zi=Function.prototype,Qo=Object.prototype,dr=Yo["__core-js_shared__"],Jo=function(){var t=/[^.]+$/.exec(dr&&dr.keys&&dr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ko=Zi.toString,fr=Qo.hasOwnProperty,Xi=Qo.toString,ea=RegExp("^"+Ko.call(fr).replace(zi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ta=Ki.splice,ra=Zo(Yo,"Map"),Ve=Zo(Object,"create");function pe(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(pe,"Hash");function oa(){this.__data__=Ve?Ve(null):{}}n(oa,"hashClear");function na(t){return this.has(t)&&delete this.__data__[t]}n(na,"hashDelete");function sa(t){var e=this.__data__;if(Ve){var r=e[t];return r===Wo?void 0:r}return fr.call(e,t)?e[t]:void 0}n(sa,"hashGet");function ia(t){var e=this.__data__;return Ve?e[t]!==void 0:fr.call(e,t)}n(ia,"hashHas");function aa(t,e){var r=this.__data__;return r[t]=Ve&&e===void 0?Wo:e,this}n(aa,"hashSet");pe.prototype.clear=oa;pe.prototype.delete=na;pe.prototype.get=sa;pe.prototype.has=ia;pe.prototype.set=aa;function Te(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(Te,"ListCache");function ca(){this.__data__=[]}n(ca,"listCacheClear");function la(t){var e=this.__data__,r=Ot(e,t);if(r<0)return!1;var o=e.length-1;return r==o?e.pop():ta.call(e,r,1),!0}n(la,"listCacheDelete");function ua(t){var e=this.__data__,r=Ot(e,t);return r<0?void 0:e[r][1]}n(ua,"listCacheGet");function pa(t){return Ot(this.__data__,t)>-1}n(pa,"listCacheHas");function da(t,e){var r=this.__data__,o=Ot(r,t);return o<0?r.push([t,e]):r[o][1]=e,this}n(da,"listCacheSet");Te.prototype.clear=ca;Te.prototype.delete=la;Te.prototype.get=ua;Te.prototype.has=pa;Te.prototype.set=da;function de(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(de,"MapCache");function fa(){this.__data__={hash:new pe,map:new(ra||Te),string:new pe}}n(fa,"mapCacheClear");function ha(t){return Tt(this,t).delete(t)}n(ha,"mapCacheDelete");function ma(t){return Tt(this,t).get(t)}n(ma,"mapCacheGet");function ga(t){return Tt(this,t).has(t)}n(ga,"mapCacheHas");function ya(t,e){return Tt(this,t).set(t,e),this}n(ya,"mapCacheSet");de.prototype.clear=fa;de.prototype.delete=ha;de.prototype.get=ma;de.prototype.has=ga;de.prototype.set=ya;function Ot(t,e){for(var r=t.length;r--;)if(Sa(t[r][0],e))return r;return-1}n(Ot,"assocIndexOf");function ba(t){if(!Xo(t)||xa(t))return!1;var e=va(t)||Ji(t)?ea:Gi;return e.test(Ea(t))}n(ba,"baseIsNative");function Tt(t,e){var r=t.__data__;return _a(e)?r[typeof e=="string"?"string":"hash"]:r.map}n(Tt,"getMapData");function Zo(t,e){var r=Qi(t,e);return ba(r)?r:void 0}n(Zo,"getNative");function _a(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}n(_a,"isKeyable");function xa(t){return!!Jo&&Jo in t}n(xa,"isMasked");function Ea(t){if(t!=null){try{return Ko.call(t)}catch(e){}try{return t+""}catch(e){}}return""}n(Ea,"toSource");function hr(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError($i);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 a=t.apply(this,o);return r.cache=i.set(s,a),a},"memoized");return r.cache=new(hr.Cache||de),r}n(hr,"memoize");hr.Cache=de;function Sa(t,e){return t===e||t!==t&&e!==e}n(Sa,"eq");function va(t){var e=Xo(t)?Xi.call(t):"";return e==Bi||e==Hi}n(va,"isFunction");function Xo(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}n(Xo,"isObject");en.exports=hr});var Pt,mr,$e,Be,Rt,tn,rn,wa,Oa,Ta,Ca,Pa,He,gr,Ra,on,ze,Aa,Q,J=w(()=>{Pt=Ee(Ct()),mr=n((...t)=>JSON.stringify(t),"memoizeKey"),$e=n(t=>(...e)=>fetch(...t(...e)).then(r=>r.json()),"withFetchJson"),Be=n(t=>(e,...r)=>{if(!e)throw Error("host required");let[o,s={}]=t(...r);return[`${e.replace(/\/+$/,"")}${o}`,s]},"withHost"),Rt=n(t=>(e,...r)=>{if(!e)throw Error("auth required");let[o,s={}]=t(...r);return[o,h(l({},s),{headers:l({Authorization:JSON.stringify(e)},s.headers)})]},"withAuth"),tn=n(t=>(...e)=>{let[r,o={}]=t(...e);return[r,h(l({method:"POST"},o),{body:JSON.stringify(o.body),headers:l({"Content-type":"application/json"},o.headers)})]},"withJsonBody"),rn=n((t=[])=>(Array.isArray(t)?t:Object.entries(t)).map(([e,r])=>[e,encodeURIComponent(r)].join("=")).join("&"),"toQuery"),wa=n(t=>JSON.stringify([].concat(t).map(e=>typeof e=="object"?e.id:e).filter(e=>e)),"toProductId"),Oa=(0,Pt.default)($e(Be((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=rn([["session_id",e],["page_type",1],["p",wa(r)],["module_view",JSON.stringify(["regular"])]]);return[`/offer/${t}/${o}?${s}`]})),mr),Ta=(0,Pt.default)($e(Be(Rt((t=1,e="place")=>[`/orders/?${rn([["status",t],["ordering",e]])}`]))),mr),Ca=(0,Pt.default)($e(Be(Rt(t=>{if(!t)throw Error("orderId required");return[`/items/?order=${t}`]}))),mr),Pa=$e(Be(Rt(tn((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}}]})))),He=n(t=>{if(typeof t=="object")return l({},t);let[e,r]=(t||"").split(/_/).map(o=>parseInt(o,10));return e&&r&&{every:e,every_period:r}},"parseFrequency"),gr=n(t=>t.match(/^\d+_\d$/),"isFrequencyValid"),Ra=n((t,e)=>String.prototype.localeCompare.call(t&&t.split("_").reverse().join("_"),e&&e.split("_").reverse().join("_")),"compareFrequencies"),on=n(t=>[...new Set(t&&t.split(/\s+/))].filter(gr).sort(Ra),"parseFrequenciesList"),ze=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"),Aa=$e(Be(Rt(tn((t,e,r)=>{if(!t)throw Error("item required");if(!e)throw Error("frequency required");let o=He(e);if(!o)throw Error("invalid frequency");return["/subscriptions/create_from_item/",{body:l({item:t.public_id,offer:r},o)}]})))),Q={fetchOffer:Oa,fetchOrders:Ta,fetchItems:Ca,createOneTime:Pa,convertOneTimeToSubscription:Aa}});var xr=se((kt,un)=>{(function(t,e){typeof kt=="object"&&typeof un!="undefined"?e(kt):typeof define=="function"&&define.amd?define(["exports"],e):(t=t||self,e(t.throttleDebounce={}))})(kt,function(t){"use strict";function e(o,s,i,a){var c,u=!1,f=0;function b(){c&&clearTimeout(c)}n(b,"clearExistingTimeout");function d(){b(),u=!0}n(d,"cancel"),typeof s!="boolean"&&(a=i,i=s,s=void 0);function y(){for(var v=arguments.length,_=new Array(v),m=0;m<v;m++)_[m]=arguments[m];var C=this,P=Date.now()-f;if(u)return;function x(){f=Date.now(),i.apply(C,_)}n(x,"exec");function A(){c=void 0}n(A,"clear"),a&&!c&&x(),b(),a===void 0&&P>o?x():s!==!0&&(c=setTimeout(a?A:x,a===void 0?o-P:o))}return n(y,"wrapper"),y.cancel=d,y}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"?It(window.og_auth):null}async function ic(t=100){return new Promise(e=>{setTimeout(()=>e(dn()),t)})}async function fn(t,e=oc,r=nc){let o;if(o=It(e())||It(dn()),o)return o;if(t&&typeof t=="string"){let s=await fetch(t);s.status>=200&&s.status<300&&(o=e()||await(sc(s)?s.json():Promise.resolve(r(t)).then(e)))}else o||(o=await ic());if(o=It(o),o)return o;throw new Error("Unauthorized")}var pn,oc,It,nc,sc,hn=w(()=>{pn=/^og_auth=/,oc=n((t=pn)=>(document.cookie.split(/;\s*/).find(e=>e.match(t))||"").replace(pn,""),"c"),It=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"),nc=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"),sc=n(t=>(t.headers.get("content-type")||"").indexOf("application/json")!==-1,"d");n(dn,"a");n(ic,"f");n(fn,"u")});var K,Pe,mn,qt,gn,yn,ac,cc,Er,Z,bn,Ut,_n,lc,Sr,vr,Dt,wr,Ft,Re,Or,uc,xn,En,pc,dc,fc,hc,Sn,vn,wn,On,Tn,Cn,Pn,I=w(()=>{hn();ue();J();K=n((t,e)=>({type:ie,payload:{product:t,frequency:e}}),"optinProduct"),Pe=n(t=>({type:ae,payload:{product:t}}),"optoutProduct"),mn=n((t,e)=>({type:Le,payload:{newProduct:t,product:e}}),"productHasChangedComponents"),qt=n((t,e)=>({type:ce,payload:{product:t,frequency:e}}),"productChangeFrequency"),gn=n(t=>({type:Bo,payload:{product:t}}),"concludeUpsell"),yn=n(t=>({type:at,payload:t}),"setMerchantId"),ac=n(t=>({type:ct,payload:`${t}.${Math.floor(Math.random()*999999)}.${Math.round(new Date().getTime()/1e3)}`}),"createSessionId"),cc=n(t=>({type:Mo,payload:t}),"requestAuth"),Er=n((t,e,r,o)=>({type:ut,payload:{public_id:t,sig_field:e,ts:r,sig:o}}),"authorize"),Z=n(t=>({type:ve,payload:t}),"unauthorized"),bn=n(t=>({type:lt,payload:t}),"setAuthUrl"),Ut=n(t=>({type:Go,payload:t}),"fetchDone"),_n=n((t=fn)=>n(function(r,o){if(window.og&&window.og.previewMode)return r(Z({message:"Offers are running in preview mode"}));let{merchantId:s,authUrl:i}=o(),a=cc(i);return r(a),t(i).then(({sig_field:c,ts:u,sig:f})=>r(Er(s,c,u,f)),c=>r(Z(c))).finally(()=>r(Ut(a)))},"fetchAuthThunk"),"fetchAuth"),lc=n((t,e)=>({type:Vo,payload:{status:t,ordering:e}}),"requestOrders"),Sr=n(t=>({type:pt,payload:t}),"receiveOrders"),vr=n(t=>({type:dt,payload:t}),"receiveItems"),Dt=n((t=1,e="place")=>n(function(o,s){let{environment:{legoUrl:i},auth:a}=s();if(!a)return o(Z("No auth set."));let c=lc(t,e);return o(c),Q.fetchOrders(i,a,t,e).then(u=>{if(u.results){o(Sr(u));let f=(u.results[0]||{}).public_id;if(f)return Q.fetchItems(i,a,f).then(b=>o(vr(b)))}return o(Z(u.detail)),null},u=>o(Z(u))).finally(()=>o(Ut(c)))},"fetchOrdersThunk"),"fetchOrders"),wr=n(t=>{switch(t){case"dev":return{type:ht,payload:t};case"staging":return{type:ft,payload:t};case"prod":return{type:mt,payload:t};default:throw new Error(`${t} is not a supported environment`)}},"setEnvironment"),Ft=n(()=>(t,e)=>{let{merchantId:r,sessionId:o}=e();return(!o||r&&!o.startsWith(r))&&t(ac(r)),o},"requestSessionId"),Re=n(t=>({type:D,payload:t}),"receiveOffer"),Or=n(t=>({type:$o,payload:t}),"fetchResponseError"),uc=n((t,e="pdp")=>({type:jo,payload:{product:t,module:e}}),"requestOffer"),xn=n((t,e="pdp")=>n(function(o,s){let{merchantId:i,sessionId:a,environment:{apiUrl:c}}=s(),u=uc(t,e);return o(u),Q.fetchOffer(c,i,a,t,e).then(f=>o(Re(f)),f=>o(Or(f))).finally(()=>o(Ut(u)))},"fetchOfferThunk"),"fetchOffer"),En=n(()=>({type:we}),"checkout"),pc=n((t,e,r,o)=>({type:Ho,payload:{product:t,order:e,quantity:r,offerId:o}}),"requestCreateOneTime"),dc=n(t=>({type:gt,payload:t}),"receiveCreateOneTime"),fc=n((t,e)=>({type:zo,payload:{item:t,frequency:e}}),"requestConvertOneTimeToSubscription"),hc=n((t,e)=>({type:yt,payload:{response:t,product:e}}),"receiveConvertOneTime"),Sn=n((t,e,r,o=!1,s=null)=>n(function(a,c){let{auth:u,environment:{legoUrl:f},previewUpsellOffer:b,offerId:d}=c();if(!u)return a(Z("No auth set."));let y=pc(t,e,r,d);return a(y),(b?Promise.resolve({legoUrl:f,product:t,order:e,quantity:r,offer:d}):Q.createOneTime(f,u,t.id,e,r,d)).then(v=>(a(dc(v)),o?(a(fc(v,s)),(b?Promise.resolve({item:v,frequency:s}):Q.convertOneTimeToSubscription(f,u,v,s,d)).then(_=>a(hc(_,t)),_=>a(Or(_)))):v),v=>a(Or(v))).finally(()=>a(Ut(y)))},"createIuThunk"),"createIu"),vn=n(t=>({type:bt,payload:t}),"setLocale"),wn=n(t=>({type:_t,payload:t}),"setConfig"),On=n((t,e,r)=>({type:xt,payload:{selector:t,markup:e,config:r}}),"addTemplate"),Tn=n(t=>({type:Et,payload:t}),"setTemplates"),Cn=n((t,e)=>({type:St,payload:{product:t,firstOrderPlaceDate:e}}),"setFirstOrderPlaceDate"),Pn=n((t,e)=>({type:vt,payload:{product:t,productToSubscribe:e}}),"setProductToSubscribe")});var Pr,he,me=w(()=>{Pr=typeof window!="undefined"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,he=n((t,e,r=null)=>{for(;e!==r;){let o=e.nextSibling;t.removeChild(e),e=o}},"removeNodes")});var F,Rr,jn,Ae,ge,Mn,We,$,Lt,X=w(()=>{F=`{{lit-${String(Math.random()).slice(2)}}}`,Rr=`<!--${F}-->`,jn=new RegExp(`${F}|${Rr}`),Ae="$lit$",ge=class{constructor(e,r){this.parts=[],this.element=r;let o=[],s=[],i=document.createTreeWalker(r.content,133,null,!1),a=0,c=-1,u=0,{strings:f,values:{length:b}}=e;for(;u<b;){let d=i.nextNode();if(d===null){i.currentNode=s.pop();continue}if(c++,d.nodeType===1){if(d.hasAttributes()){let y=d.attributes,{length:v}=y,_=0;for(let m=0;m<v;m++)Mn(y[m].name,Ae)&&_++;for(;_-- >0;){let m=f[u],C=Lt.exec(m)[2],P=C.toLowerCase()+Ae,x=d.getAttribute(P);d.removeAttribute(P);let A=x.split(jn);this.parts.push({type:"attribute",index:c,name:C,strings:A}),u+=A.length-1}}d.tagName==="TEMPLATE"&&(s.push(d),i.currentNode=d.content)}else if(d.nodeType===3){let y=d.data;if(y.indexOf(F)>=0){let v=d.parentNode,_=y.split(jn),m=_.length-1;for(let C=0;C<m;C++){let P,x=_[C];if(x==="")P=$();else{let A=Lt.exec(x);A!==null&&Mn(A[2],Ae)&&(x=x.slice(0,A.index)+A[1]+A[2].slice(0,-Ae.length)+A[3]),P=document.createTextNode(x)}v.insertBefore(P,d),this.parts.push({type:"node",index:++c})}_[m]===""?(v.insertBefore($(),d),o.push(d)):d.data=_[m],u+=m}}else if(d.nodeType===8)if(d.data===F){let y=d.parentNode;(d.previousSibling===null||c===a)&&(c++,y.insertBefore($(),d)),a=c,this.parts.push({type:"node",index:c}),d.nextSibling===null?d.data="":(o.push(d),c--),u++}else{let y=-1;for(;(y=d.data.indexOf(F,y+1))!==-1;)this.parts.push({type:"node",index:-1}),u++}}for(let d of o)d.parentNode.removeChild(d)}};n(ge,"Template");Mn=n((t,e)=>{let r=t.length-e.length;return r>=0&&t.slice(r)===e},"endsWith"),We=n(t=>t.index!==-1,"isTemplatePartActive"),$=n(()=>document.createComment(""),"createMarker"),Lt=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/});function Nr(t,e){let{element:{content:r},parts:o}=t,s=document.createTreeWalker(r,Ar,null,!1),i=Ye(o),a=o[i],c=-1,u=0,f=[],b=null;for(;s.nextNode();){c++;let d=s.currentNode;for(d.previousSibling===b&&(b=null),e.has(d)&&(f.push(d),b===null&&(b=d)),b!==null&&u++;a!==void 0&&a.index===c;)a.index=b!==null?-1:a.index-u,i=Ye(o,i),a=o[i]}f.forEach(d=>d.parentNode.removeChild(d))}function Vn(t,e,r=null){let{element:{content:o},parts:s}=t;if(r==null){o.appendChild(e);return}let i=document.createTreeWalker(o,Ar,null,!1),a=Ye(s),c=0,u=-1;for(;i.nextNode();)for(u++,i.currentNode===r&&(c=bc(e),r.parentNode.insertBefore(e,r));a!==-1&&s[a].index===u;){if(c>0){for(;a!==-1;)s[a].index+=c,a=Ye(s,a);return}a=Ye(s,a)}}var Ar,bc,Ye,$n=w(()=>{X();Ar=133;n(Nr,"removeNodesFromTemplate");bc=n(t=>{let e=t.nodeType===11?0:1,r=document.createTreeWalker(t,Ar,null,!1);for(;r.nextNode();)e++;return e},"countNodes"),Ye=n((t,e=-1)=>{for(let r=e+1;r<t.length;r++){let o=t[r];if(We(o))return r}return-1},"nextActiveIndexInTemplateParts");n(Vn,"insertNodeIntoTemplate")});var _c,ye,kr=w(()=>{_c=new WeakMap,ye=n(t=>typeof t=="function"&&_c.has(t),"isDirective")});var q,jt,Ir=w(()=>{q={},jt={}});var ee,Mt=w(()=>{me();X();ee=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=Pr?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,a=0,c,u=s.nextNode();for(;i<o.length;){if(c=o[i],!We(c)){this.__parts.push(void 0),i++;continue}for(;a<c.index;)a++,u.nodeName==="TEMPLATE"&&(r.push(u),s.currentNode=u.content),(u=s.nextNode())===null&&(s.currentNode=r.pop(),u=s.nextNode());if(c.type==="node"){let f=this.processor.handleTextExpression(this.options);f.insertAfterNode(u.previousSibling),this.__parts.push(f)}else this.__parts.push(...this.processor.handleAttributeExpressions(u,c.name,c.strings,this.options));i++}return Pr&&(document.adoptNode(e),customElements.upgrade(e)),e}};n(ee,"TemplateInstance")});var Bn,Ec,z,Vt=w(()=>{me();X();Bn=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t}),Ec=` ${F} `,z=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],a=i.lastIndexOf("<!--");o=(a>-1||o)&&i.indexOf("-->",a+1)===-1;let c=Lt.exec(i);c===null?r+=i+(o?Ec:Rr):r+=i.substr(0,c.index)+c[1]+c[2]+Ae+c[3]+F}return r+=this.strings[e],r}getTemplateElement(){let e=document.createElement("template"),r=this.getHTML();return Bn!==void 0&&(r=Bn.createHTML(r)),e.innerHTML=r,e}};n(z,"TemplateResult")});var $t,Bt,Ne,Qe,G,Je,Ke,Ht,Hn,Ze,Sc,zt=w(()=>{kr();me();Ir();Mt();Vt();X();$t=n(t=>t===null||!(typeof t=="object"||typeof t=="function"),"isPrimitive"),Bt=n(t=>Array.isArray(t)||!!(t&&t[Symbol.iterator]),"isIterable"),Ne=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 Qe(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"||!Bt(i))return i}let s="";for(let i=0;i<r;i++){s+=e[i];let a=o[i];if(a!==void 0){let c=a.value;if($t(c)||!Bt(c))s+=typeof c=="string"?c:String(c);else for(let u of c)s+=typeof u=="string"?u:String(u)}}return s+=e[r],s}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}};n(Ne,"AttributeCommitter");Qe=class{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==q&&(!$t(e)||e!==this.value)&&(this.value=e,ye(e)||(this.committer.dirty=!0))}commit(){for(;ye(this.value);){let e=this.value;this.value=q,e(this)}this.value!==q&&this.committer.commit()}};n(Qe,"AttributePart");G=class{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild($()),this.endNode=e.appendChild($())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=$()),e.__insert(this.endNode=$())}insertAfterPart(e){e.__insert(this.startNode=$()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(this.startNode.parentNode===null)return;for(;ye(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=q,r(this)}let e=this.__pendingValue;e!==q&&($t(e)?e!==this.value&&this.__commitText(e):e instanceof z?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):Bt(e)?this.__commitIterable(e):e===jt?(this.value=jt,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==null?"":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 ee&&this.value.template===r)this.value.update(e.values);else{let o=new ee(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 G(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){he(this.startNode.parentNode,e.nextSibling,this.endNode)}};n(G,"NodePart");Je=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(;ye(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=q,r(this)}if(this.__pendingValue===q)return;let e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=q}};n(Je,"BooleanAttributePart");Ke=class extends Ne{constructor(e,r,o){super(e,r,o);this.single=o.length===2&&o[0]===""&&o[1]===""}_createPart(){return new Ht(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}};n(Ke,"PropertyCommitter");Ht=class extends Qe{};n(Ht,"PropertyPart");Hn=!1;(()=>{try{let t={get capture(){return Hn=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})();Ze=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(;ye(this.__pendingValue);){let i=this.__pendingValue;this.__pendingValue=q,i(this)}if(this.__pendingValue===q)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=Sc(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=q}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}};n(Ze,"EventPart");Sc=n(t=>t&&(Hn?{capture:t.capture,passive:t.passive,once:t.once}:t.capture),"getOptions")});function qr(t){let e=be.get(t.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},be.set(t.type,e));let r=e.stringsArray.get(t.strings);if(r!==void 0)return r;let o=t.strings.join(F);return r=e.keyString.get(o),r===void 0&&(r=new ge(t,t.getTemplateElement()),e.keyString.set(o,r)),e.stringsArray.set(t.strings,r),r}var be,Gt=w(()=>{X();n(qr,"templateFactory");be=new Map});var te,Ur,Dr=w(()=>{me();zt();Gt();te=new WeakMap,Ur=n((t,e,r)=>{let o=te.get(e);o===void 0&&(he(e,e.firstChild),te.set(e,o=new G(Object.assign({templateFactory:qr},r))),o.appendInto(e)),o.setValue(t),o.commit()},"render")});var Wt,Fr,Lr=w(()=>{zt();Wt=class{handleAttributeExpressions(e,r,o,s){let i=r[0];return i==="."?new Ke(e,r.slice(1),o).parts:i==="@"?[new Ze(e,r.slice(1),s.eventContext)]:i==="?"?[new Je(e,r.slice(1),o)]:new Ne(e,r,o).parts}handleTextExpression(e){return new G(e)}};n(Wt,"DefaultTemplateProcessor");Fr=new Wt});var p,jr=w(()=>{Lr();Vt();Lr();kr();me();Ir();zt();Dr();Gt();Mt();Vt();X();typeof window!="undefined"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.3.0");p=n((t,...e)=>new z(t,e,"html",Fr),"html")});var Gn,Yt,wc,Oc,Tc,Wn,Cc,Yn,Qn=w(()=>{me();$n();Dr();Gt();Mt();X();jr();Gn=n((t,e)=>`${t}--${e}`,"getTemplateCacheKey"),Yt=!0;typeof window.ShadyCSS=="undefined"?Yt=!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."),Yt=!1);wc=n(t=>e=>{let r=Gn(e.type,t),o=be.get(r);o===void 0&&(o={stringsArray:new WeakMap,keyString:new Map},be.set(r,o));let s=o.stringsArray.get(e.strings);if(s!==void 0)return s;let i=e.strings.join(F);if(s=o.keyString.get(i),s===void 0){let a=e.getTemplateElement();Yt&&window.ShadyCSS.prepareTemplateDom(a,t),s=new ge(e,a),o.keyString.set(i,s)}return o.stringsArray.set(e.strings,s),s},"shadyTemplateFactory"),Oc=["html","svg"],Tc=n(t=>{Oc.forEach(e=>{let r=be.get(Gn(e,t));r!==void 0&&r.keyString.forEach(o=>{let{element:{content:s}}=o,i=new Set;Array.from(s.querySelectorAll("style")).forEach(a=>{i.add(a)}),Nr(o,i)})})},"removeStylesFromLitTemplates"),Wn=new Set,Cc=n((t,e,r)=>{Wn.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 a=document.createElement("style");for(let f=0;f<i;f++){let b=s[f];b.parentNode.removeChild(b),a.textContent+=b.textContent}Tc(t);let c=o.content;r?Vn(r,a,c.firstChild):c.insertBefore(a,c.firstChild),window.ShadyCSS.prepareTemplateStyles(o,t);let u=c.querySelector("style");if(window.ShadyCSS.nativeShadow&&u!==null)e.insertBefore(u.cloneNode(!0),e.firstChild);else if(r){c.insertBefore(a,c.firstChild);let f=new Set;f.add(a),Nr(r,f)}},"prepareTemplateStyles"),Yn=n((t,e,r)=>{if(!r||typeof r!="object"||!r.scopeName)throw new Error("The `scopeName` option is required.");let o=r.scopeName,s=te.has(e),i=Yt&&e.nodeType===11&&!!e.host,a=i&&!Wn.has(o),c=a?document.createDocumentFragment():e;if(Ur(t,c,Object.assign({templateFactory:wc(o)},r)),a){let u=te.get(c);te.delete(c);let f=u.value instanceof ee?u.value.template:void 0;Cc(o,c,f),he(e,e.firstChild),e.appendChild(c),te.set(e,u)}!s&&i&&window.ShadyCSS.styleElement(e.host)},"render")});var Jn,Mr,Kn,Vr,$r,Br,Hr,zr,Gr,Xe,Wr=w(()=>{window.JSCompiler_renameProperty=(t,e)=>t;Mr={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}},Kn=n((t,e)=>e!==t&&(e===e||t===t),"notEqual"),Vr={attribute:!0,type:String,converter:Mr,reflect:!1,hasChanged:Kn},$r=1,Br=1<<2,Hr=1<<3,zr=1<<4,Gr="finalized",Xe=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=Vr){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)||Vr}static finalize(){let e=Object.getPrototypeOf(this);if(e.hasOwnProperty(Gr)||e.finalize(),this[Gr]=!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=Kn){return o(e,r)}static _propertyValueFromAttribute(e,r){let o=r.type,s=r.converter||Mr,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||Mr.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=Vr){let s=this.constructor,i=s._attributeNameForProperty(e,o);if(i!==void 0){let a=s._propertyValueToAttribute(r,o);if(a===void 0)return;this._updateState=this._updateState|Hr,a==null?this.removeAttribute(i):this.setAttribute(i,a),this._updateState=this._updateState&~Hr}}_attributeToProperty(e,r){if(this._updateState&Hr)return;let o=this.constructor,s=o._attributeToPropertyMap.get(e);if(s!==void 0){let i=o.getPropertyOptions(s);this._updateState=this._updateState|zr,this[s]=o._propertyValueFromAttribute(r,i),this._updateState=this._updateState&~zr}}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&zr)&&(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|Br;try{await this._updatePromise}catch(r){}let e=this.performUpdate();return e!=null&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return this._updateState&Br}get hasUpdated(){return this._updateState&$r}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&$r||(this._updateState=this._updateState|$r,this.firstUpdated(r)),this.updated(r))}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~Br}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(Xe,"UpdatingElement");Jn=Gr;Xe[Jn]=!0});var Zn,Gu,Xn=w(()=>{Zn=Element.prototype,Gu=Zn.msMatchesSelector||Zn.webkitMatchesSelector});var Qt,Yr,et,es,Pc,T,Qr=w(()=>{Qt=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Yr=Symbol(),et=class{constructor(e,r){if(r!==Yr)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return this._styleSheet===void 0&&(Qt?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}};n(et,"CSSResult");es=n(t=>new et(String(t),Yr),"unsafeCSS"),Pc=n(t=>{if(t instanceof et)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 ui=Object.create;var xe=Object.defineProperty,pi=Object.defineProperties,di=Object.getOwnPropertyDescriptor,fi=Object.getOwnPropertyDescriptors,hi=Object.getOwnPropertyNames,xo=Object.getOwnPropertySymbols,mi=Object.getPrototypeOf,Eo=Object.prototype.hasOwnProperty,gi=Object.prototype.propertyIsEnumerable;var So=(t,e,r)=>e in t?xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l=(t,e)=>{for(var r in e||(e={}))Eo.call(e,r)&&So(t,r,e[r]);if(xo)for(var r of xo(e))gi.call(e,r)&&So(t,r,e[r]);return t},h=(t,e)=>pi(t,fi(e)),vo=t=>xe(t,"__esModule",{value:!0}),n=(t,e)=>xe(t,"name",{value:e,configurable:!0}),ne=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var w=(t,e)=>()=>(t&&(e=t(t=0)),e);var se=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),nr=(t,e)=>{vo(t);for(var r in e)xe(t,r,{get:e[r],enumerable:!0})},yi=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of hi(e))!Eo.call(t,o)&&o!=="default"&&xe(t,o,{get:()=>e[o],enumerable:!(r=di(e,o))||r.enumerable});return t},Ee=t=>yi(vo(xe(t!=null?ui(mi(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var ie,ae,ce,at,jo,D,Le,ct,lt,Mo,ut,ve,Vo,pt,dt,$o,ft,ht,mt,Bo,Ho,gt,zo,yt,we,Go,bt,_t,je,Me,xt,Et,le,Y,St,vt,wt,ue=w(()=>{ie="OPTIN_PRODUCT",ae="OPTOUT_PRODUCT",ce="PRODUCT_CHANGE_FREQUENCY",at="SET_MERCHANT_ID",jo="REQUEST_OFFER",D="RECEIVE_OFFER",Le="PRODUCT_HAS_CHANGED",ct="CREATED_SESSION_ID",lt="SET_AUTH_URL",Mo="REQUEST_AUTH",ut="AUTHORIZE",ve="UNAUTHORIZED",Vo="REQUEST_ORDERS",pt="RECEIVE_ORDERS",dt="RECEIVE_ORDER_ITEMS",$o="FETCH_RESPONSE_ERROR",ft="SET_ENVIRONMENT_STAGING",ht="SET_ENVIRONMENT_DEV",mt="SET_ENVIRONMENT_PROD",Bo="CONCLUDE_UPSELL",Ho="REQUEST_CREATE_IU_ORDER",gt="CREATE_ONE_TIME",zo="REQUEST_CONVERT_ONE_TIME",yt="CONVERT_ONE_TIME",we="CHECKOUT",Go="RECEIVE_FETCH",bt="SET_LOCALE",_t="SET_CONFIG",je="SET_PREVIEW_STANDARD_OFFER",Me="SET_PREVIEW_UPSELL_OFFER",xt="ADD_TEMPLATE",Et="SET_TEMPLATES",le="LOCAL_STORAGE_CHANGE",Y="LOCAL_STORAGE_CLEAR",St="SET_FIRST_ORDER_PLACE_DATE",vt="SET_PRODUCT_TO_SUBSCRIBE",wt="RECEIVE_PRODUCT_PLANS"});var Ct=se((bl,en)=>{var $i="Expected a function",Wo="__lodash_hash_undefined__",Bi="[object Function]",Hi="[object GeneratorFunction]",zi=/[\\^$.*+?()[\]{}|]/g,Gi=/^\[object .+?Constructor\]$/,Wi=typeof window=="object"&&window&&window.Object===Object&&window,Yi=typeof self=="object"&&self&&self.Object===Object&&self,Yo=Wi||Yi||Function("return this")();function Qi(t,e){return t==null?void 0:t[e]}n(Qi,"getValue");function Ji(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}n(Ji,"isHostObject");var Ki=Array.prototype,Zi=Function.prototype,Qo=Object.prototype,dr=Yo["__core-js_shared__"],Jo=function(){var t=/[^.]+$/.exec(dr&&dr.keys&&dr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ko=Zi.toString,fr=Qo.hasOwnProperty,Xi=Qo.toString,ea=RegExp("^"+Ko.call(fr).replace(zi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ta=Ki.splice,ra=Zo(Yo,"Map"),Ve=Zo(Object,"create");function pe(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(pe,"Hash");function oa(){this.__data__=Ve?Ve(null):{}}n(oa,"hashClear");function na(t){return this.has(t)&&delete this.__data__[t]}n(na,"hashDelete");function sa(t){var e=this.__data__;if(Ve){var r=e[t];return r===Wo?void 0:r}return fr.call(e,t)?e[t]:void 0}n(sa,"hashGet");function ia(t){var e=this.__data__;return Ve?e[t]!==void 0:fr.call(e,t)}n(ia,"hashHas");function aa(t,e){var r=this.__data__;return r[t]=Ve&&e===void 0?Wo:e,this}n(aa,"hashSet");pe.prototype.clear=oa;pe.prototype.delete=na;pe.prototype.get=sa;pe.prototype.has=ia;pe.prototype.set=aa;function Te(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(Te,"ListCache");function ca(){this.__data__=[]}n(ca,"listCacheClear");function la(t){var e=this.__data__,r=Ot(e,t);if(r<0)return!1;var o=e.length-1;return r==o?e.pop():ta.call(e,r,1),!0}n(la,"listCacheDelete");function ua(t){var e=this.__data__,r=Ot(e,t);return r<0?void 0:e[r][1]}n(ua,"listCacheGet");function pa(t){return Ot(this.__data__,t)>-1}n(pa,"listCacheHas");function da(t,e){var r=this.__data__,o=Ot(r,t);return o<0?r.push([t,e]):r[o][1]=e,this}n(da,"listCacheSet");Te.prototype.clear=ca;Te.prototype.delete=la;Te.prototype.get=ua;Te.prototype.has=pa;Te.prototype.set=da;function de(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(de,"MapCache");function fa(){this.__data__={hash:new pe,map:new(ra||Te),string:new pe}}n(fa,"mapCacheClear");function ha(t){return Tt(this,t).delete(t)}n(ha,"mapCacheDelete");function ma(t){return Tt(this,t).get(t)}n(ma,"mapCacheGet");function ga(t){return Tt(this,t).has(t)}n(ga,"mapCacheHas");function ya(t,e){return Tt(this,t).set(t,e),this}n(ya,"mapCacheSet");de.prototype.clear=fa;de.prototype.delete=ha;de.prototype.get=ma;de.prototype.has=ga;de.prototype.set=ya;function Ot(t,e){for(var r=t.length;r--;)if(Sa(t[r][0],e))return r;return-1}n(Ot,"assocIndexOf");function ba(t){if(!Xo(t)||xa(t))return!1;var e=va(t)||Ji(t)?ea:Gi;return e.test(Ea(t))}n(ba,"baseIsNative");function Tt(t,e){var r=t.__data__;return _a(e)?r[typeof e=="string"?"string":"hash"]:r.map}n(Tt,"getMapData");function Zo(t,e){var r=Qi(t,e);return ba(r)?r:void 0}n(Zo,"getNative");function _a(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}n(_a,"isKeyable");function xa(t){return!!Jo&&Jo in t}n(xa,"isMasked");function Ea(t){if(t!=null){try{return Ko.call(t)}catch(e){}try{return t+""}catch(e){}}return""}n(Ea,"toSource");function hr(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError($i);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 a=t.apply(this,o);return r.cache=i.set(s,a),a},"memoized");return r.cache=new(hr.Cache||de),r}n(hr,"memoize");hr.Cache=de;function Sa(t,e){return t===e||t!==t&&e!==e}n(Sa,"eq");function va(t){var e=Xo(t)?Xi.call(t):"";return e==Bi||e==Hi}n(va,"isFunction");function Xo(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}n(Xo,"isObject");en.exports=hr});var Pt,mr,$e,Be,Rt,tn,rn,wa,Oa,Ta,Ca,Pa,He,gr,Ra,on,ze,Aa,Q,J=w(()=>{Pt=Ee(Ct()),mr=n((...t)=>JSON.stringify(t),"memoizeKey"),$e=n(t=>(...e)=>fetch(...t(...e)).then(r=>r.json()),"withFetchJson"),Be=n(t=>(e,...r)=>{if(!e)throw Error("host required");let[o,s={}]=t(...r);return[`${e.replace(/\/+$/,"")}${o}`,s]},"withHost"),Rt=n(t=>(e,...r)=>{if(!e)throw Error("auth required");let[o,s={}]=t(...r);return[o,h(l({},s),{headers:l({Authorization:JSON.stringify(e)},s.headers)})]},"withAuth"),tn=n(t=>(...e)=>{let[r,o={}]=t(...e);return[r,h(l({method:"POST"},o),{body:JSON.stringify(o.body),headers:l({"Content-type":"application/json"},o.headers)})]},"withJsonBody"),rn=n((t=[])=>(Array.isArray(t)?t:Object.entries(t)).map(([e,r])=>[e,encodeURIComponent(r)].join("=")).join("&"),"toQuery"),wa=n(t=>JSON.stringify([].concat(t).map(e=>typeof e=="object"?e.id:e).filter(e=>e)),"toProductId"),Oa=(0,Pt.default)($e(Be((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=rn([["session_id",e],["page_type",1],["p",wa(r)],["module_view",JSON.stringify(["regular"])]]);return[`/offer/${t}/${o}?${s}`]})),mr),Ta=(0,Pt.default)($e(Be(Rt((t=1,e="place")=>[`/orders/?${rn([["status",t],["ordering",e]])}`]))),mr),Ca=(0,Pt.default)($e(Be(Rt(t=>{if(!t)throw Error("orderId required");return[`/items/?order=${t}`]}))),mr),Pa=$e(Be(Rt(tn((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}}]})))),He=n(t=>{if(typeof t=="object")return l({},t);let[e,r]=(t||"").split(/_/).map(o=>parseInt(o,10));return e&&r&&{every:e,every_period:r}},"parseFrequency"),gr=n(t=>t.match(/^\d+_\d$/),"isFrequencyValid"),Ra=n((t,e)=>String.prototype.localeCompare.call(t&&t.split("_").reverse().join("_"),e&&e.split("_").reverse().join("_")),"compareFrequencies"),on=n(t=>[...new Set(t&&t.split(/\s+/))].filter(gr).sort(Ra),"parseFrequenciesList"),ze=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"),Aa=$e(Be(Rt(tn((t,e,r)=>{if(!t)throw Error("item required");if(!e)throw Error("frequency required");let o=He(e);if(!o)throw Error("invalid frequency");return["/subscriptions/create_from_item/",{body:l({item:t.public_id,offer:r},o)}]})))),Q={fetchOffer:Oa,fetchOrders:Ta,fetchItems:Ca,createOneTime:Pa,convertOneTimeToSubscription:Aa}});var xr=se((kt,un)=>{(function(t,e){typeof kt=="object"&&typeof un!="undefined"?e(kt):typeof define=="function"&&define.amd?define(["exports"],e):(t=t||self,e(t.throttleDebounce={}))})(kt,function(t){"use strict";function e(o,s,i,a){var c,u=!1,f=0;function b(){c&&clearTimeout(c)}n(b,"clearExistingTimeout");function d(){b(),u=!0}n(d,"cancel"),typeof s!="boolean"&&(a=i,i=s,s=void 0);function y(){for(var v=arguments.length,_=new Array(v),m=0;m<v;m++)_[m]=arguments[m];var C=this,P=Date.now()-f;if(u)return;function x(){f=Date.now(),i.apply(C,_)}n(x,"exec");function A(){c=void 0}n(A,"clear"),a&&!c&&x(),b(),a===void 0&&P>o?x():s!==!0&&(c=setTimeout(a?A:x,a===void 0?o-P:o))}return n(y,"wrapper"),y.cancel=d,y}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"?It(window.og_auth):null}async function ic(t=100){return new Promise(e=>{setTimeout(()=>e(dn()),t)})}async function fn(t,e=oc,r=nc){let o;if(o=It(It(dn()||e())),o)return o;if(t&&typeof t=="string"){let s=await fetch(t);s.status>=200&&s.status<300&&(o=e()||await(sc(s)?s.json():Promise.resolve(r(t)).then(e)))}else o||(o=await ic());if(o=It(o),o)return o;throw new Error("Unauthorized")}var pn,oc,It,nc,sc,hn=w(()=>{pn=/^og_auth=/,oc=n((t=pn)=>(document.cookie.split(/;\s*/).find(e=>e.match(t))||"").replace(pn,""),"c"),It=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"),nc=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"),sc=n(t=>(t.headers.get("content-type")||"").indexOf("application/json")!==-1,"d");n(dn,"a");n(ic,"f");n(fn,"u")});var K,Pe,mn,qt,gn,yn,ac,cc,Er,Z,bn,Ut,_n,lc,Sr,vr,Dt,wr,Ft,Re,Or,uc,xn,En,pc,dc,fc,hc,Sn,vn,wn,On,Tn,Cn,Pn,I=w(()=>{hn();ue();J();K=n((t,e)=>({type:ie,payload:{product:t,frequency:e}}),"optinProduct"),Pe=n(t=>({type:ae,payload:{product:t}}),"optoutProduct"),mn=n((t,e)=>({type:Le,payload:{newProduct:t,product:e}}),"productHasChangedComponents"),qt=n((t,e)=>({type:ce,payload:{product:t,frequency:e}}),"productChangeFrequency"),gn=n(t=>({type:Bo,payload:{product:t}}),"concludeUpsell"),yn=n(t=>({type:at,payload:t}),"setMerchantId"),ac=n(t=>({type:ct,payload:`${t}.${Math.floor(Math.random()*999999)}.${Math.round(new Date().getTime()/1e3)}`}),"createSessionId"),cc=n(t=>({type:Mo,payload:t}),"requestAuth"),Er=n((t,e,r,o)=>({type:ut,payload:{public_id:t,sig_field:e,ts:r,sig:o}}),"authorize"),Z=n(t=>({type:ve,payload:t}),"unauthorized"),bn=n(t=>({type:lt,payload:t}),"setAuthUrl"),Ut=n(t=>({type:Go,payload:t}),"fetchDone"),_n=n((t=fn)=>n(function(r,o){if(window.og&&window.og.previewMode)return r(Z({message:"Offers are running in preview mode"}));let{merchantId:s,authUrl:i}=o(),a=cc(i);return r(a),t(i).then(({sig_field:c,ts:u,sig:f})=>r(Er(s,c,u,f)),c=>r(Z(c))).finally(()=>r(Ut(a)))},"fetchAuthThunk"),"fetchAuth"),lc=n((t,e)=>({type:Vo,payload:{status:t,ordering:e}}),"requestOrders"),Sr=n(t=>({type:pt,payload:t}),"receiveOrders"),vr=n(t=>({type:dt,payload:t}),"receiveItems"),Dt=n((t=1,e="place")=>n(function(o,s){let{environment:{legoUrl:i},auth:a}=s();if(!a)return o(Z("No auth set."));let c=lc(t,e);return o(c),Q.fetchOrders(i,a,t,e).then(u=>{if(u.results){o(Sr(u));let f=(u.results[0]||{}).public_id;if(f)return Q.fetchItems(i,a,f).then(b=>o(vr(b)))}return o(Z(u.detail)),null},u=>o(Z(u))).finally(()=>o(Ut(c)))},"fetchOrdersThunk"),"fetchOrders"),wr=n(t=>{switch(t){case"dev":return{type:ht,payload:t};case"staging":return{type:ft,payload:t};case"prod":return{type:mt,payload:t};default:throw new Error(`${t} is not a supported environment`)}},"setEnvironment"),Ft=n(()=>(t,e)=>{let{merchantId:r,sessionId:o}=e();return(!o||r&&!o.startsWith(r))&&t(ac(r)),o},"requestSessionId"),Re=n(t=>({type:D,payload:t}),"receiveOffer"),Or=n(t=>({type:$o,payload:t}),"fetchResponseError"),uc=n((t,e="pdp")=>({type:jo,payload:{product:t,module:e}}),"requestOffer"),xn=n((t,e="pdp")=>n(function(o,s){let{merchantId:i,sessionId:a,environment:{apiUrl:c}}=s(),u=uc(t,e);return o(u),Q.fetchOffer(c,i,a,t,e).then(f=>o(Re(f)),f=>o(Or(f))).finally(()=>o(Ut(u)))},"fetchOfferThunk"),"fetchOffer"),En=n(()=>({type:we}),"checkout"),pc=n((t,e,r,o)=>({type:Ho,payload:{product:t,order:e,quantity:r,offerId:o}}),"requestCreateOneTime"),dc=n(t=>({type:gt,payload:t}),"receiveCreateOneTime"),fc=n((t,e)=>({type:zo,payload:{item:t,frequency:e}}),"requestConvertOneTimeToSubscription"),hc=n((t,e)=>({type:yt,payload:{response:t,product:e}}),"receiveConvertOneTime"),Sn=n((t,e,r,o=!1,s=null)=>n(function(a,c){let{auth:u,environment:{legoUrl:f},previewUpsellOffer:b,offerId:d}=c();if(!u)return a(Z("No auth set."));let y=pc(t,e,r,d);return a(y),(b?Promise.resolve({legoUrl:f,product:t,order:e,quantity:r,offer:d}):Q.createOneTime(f,u,t.id,e,r,d)).then(v=>(a(dc(v)),o?(a(fc(v,s)),(b?Promise.resolve({item:v,frequency:s}):Q.convertOneTimeToSubscription(f,u,v,s,d)).then(_=>a(hc(_,t)),_=>a(Or(_)))):v),v=>a(Or(v))).finally(()=>a(Ut(y)))},"createIuThunk"),"createIu"),vn=n(t=>({type:bt,payload:t}),"setLocale"),wn=n(t=>({type:_t,payload:t}),"setConfig"),On=n((t,e,r)=>({type:xt,payload:{selector:t,markup:e,config:r}}),"addTemplate"),Tn=n(t=>({type:Et,payload:t}),"setTemplates"),Cn=n((t,e)=>({type:St,payload:{product:t,firstOrderPlaceDate:e}}),"setFirstOrderPlaceDate"),Pn=n((t,e)=>({type:vt,payload:{product:t,productToSubscribe:e}}),"setProductToSubscribe")});var Pr,he,me=w(()=>{Pr=typeof window!="undefined"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,he=n((t,e,r=null)=>{for(;e!==r;){let o=e.nextSibling;t.removeChild(e),e=o}},"removeNodes")});var F,Rr,jn,Ae,ge,Mn,We,$,Lt,X=w(()=>{F=`{{lit-${String(Math.random()).slice(2)}}}`,Rr=`<!--${F}-->`,jn=new RegExp(`${F}|${Rr}`),Ae="$lit$",ge=class{constructor(e,r){this.parts=[],this.element=r;let o=[],s=[],i=document.createTreeWalker(r.content,133,null,!1),a=0,c=-1,u=0,{strings:f,values:{length:b}}=e;for(;u<b;){let d=i.nextNode();if(d===null){i.currentNode=s.pop();continue}if(c++,d.nodeType===1){if(d.hasAttributes()){let y=d.attributes,{length:v}=y,_=0;for(let m=0;m<v;m++)Mn(y[m].name,Ae)&&_++;for(;_-- >0;){let m=f[u],C=Lt.exec(m)[2],P=C.toLowerCase()+Ae,x=d.getAttribute(P);d.removeAttribute(P);let A=x.split(jn);this.parts.push({type:"attribute",index:c,name:C,strings:A}),u+=A.length-1}}d.tagName==="TEMPLATE"&&(s.push(d),i.currentNode=d.content)}else if(d.nodeType===3){let y=d.data;if(y.indexOf(F)>=0){let v=d.parentNode,_=y.split(jn),m=_.length-1;for(let C=0;C<m;C++){let P,x=_[C];if(x==="")P=$();else{let A=Lt.exec(x);A!==null&&Mn(A[2],Ae)&&(x=x.slice(0,A.index)+A[1]+A[2].slice(0,-Ae.length)+A[3]),P=document.createTextNode(x)}v.insertBefore(P,d),this.parts.push({type:"node",index:++c})}_[m]===""?(v.insertBefore($(),d),o.push(d)):d.data=_[m],u+=m}}else if(d.nodeType===8)if(d.data===F){let y=d.parentNode;(d.previousSibling===null||c===a)&&(c++,y.insertBefore($(),d)),a=c,this.parts.push({type:"node",index:c}),d.nextSibling===null?d.data="":(o.push(d),c--),u++}else{let y=-1;for(;(y=d.data.indexOf(F,y+1))!==-1;)this.parts.push({type:"node",index:-1}),u++}}for(let d of o)d.parentNode.removeChild(d)}};n(ge,"Template");Mn=n((t,e)=>{let r=t.length-e.length;return r>=0&&t.slice(r)===e},"endsWith"),We=n(t=>t.index!==-1,"isTemplatePartActive"),$=n(()=>document.createComment(""),"createMarker"),Lt=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/});function Nr(t,e){let{element:{content:r},parts:o}=t,s=document.createTreeWalker(r,Ar,null,!1),i=Ye(o),a=o[i],c=-1,u=0,f=[],b=null;for(;s.nextNode();){c++;let d=s.currentNode;for(d.previousSibling===b&&(b=null),e.has(d)&&(f.push(d),b===null&&(b=d)),b!==null&&u++;a!==void 0&&a.index===c;)a.index=b!==null?-1:a.index-u,i=Ye(o,i),a=o[i]}f.forEach(d=>d.parentNode.removeChild(d))}function Vn(t,e,r=null){let{element:{content:o},parts:s}=t;if(r==null){o.appendChild(e);return}let i=document.createTreeWalker(o,Ar,null,!1),a=Ye(s),c=0,u=-1;for(;i.nextNode();)for(u++,i.currentNode===r&&(c=bc(e),r.parentNode.insertBefore(e,r));a!==-1&&s[a].index===u;){if(c>0){for(;a!==-1;)s[a].index+=c,a=Ye(s,a);return}a=Ye(s,a)}}var Ar,bc,Ye,$n=w(()=>{X();Ar=133;n(Nr,"removeNodesFromTemplate");bc=n(t=>{let e=t.nodeType===11?0:1,r=document.createTreeWalker(t,Ar,null,!1);for(;r.nextNode();)e++;return e},"countNodes"),Ye=n((t,e=-1)=>{for(let r=e+1;r<t.length;r++){let o=t[r];if(We(o))return r}return-1},"nextActiveIndexInTemplateParts");n(Vn,"insertNodeIntoTemplate")});var _c,ye,kr=w(()=>{_c=new WeakMap,ye=n(t=>typeof t=="function"&&_c.has(t),"isDirective")});var q,jt,Ir=w(()=>{q={},jt={}});var ee,Mt=w(()=>{me();X();ee=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=Pr?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,a=0,c,u=s.nextNode();for(;i<o.length;){if(c=o[i],!We(c)){this.__parts.push(void 0),i++;continue}for(;a<c.index;)a++,u.nodeName==="TEMPLATE"&&(r.push(u),s.currentNode=u.content),(u=s.nextNode())===null&&(s.currentNode=r.pop(),u=s.nextNode());if(c.type==="node"){let f=this.processor.handleTextExpression(this.options);f.insertAfterNode(u.previousSibling),this.__parts.push(f)}else this.__parts.push(...this.processor.handleAttributeExpressions(u,c.name,c.strings,this.options));i++}return Pr&&(document.adoptNode(e),customElements.upgrade(e)),e}};n(ee,"TemplateInstance")});var Bn,Ec,z,Vt=w(()=>{me();X();Bn=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t}),Ec=` ${F} `,z=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],a=i.lastIndexOf("<!--");o=(a>-1||o)&&i.indexOf("-->",a+1)===-1;let c=Lt.exec(i);c===null?r+=i+(o?Ec:Rr):r+=i.substr(0,c.index)+c[1]+c[2]+Ae+c[3]+F}return r+=this.strings[e],r}getTemplateElement(){let e=document.createElement("template"),r=this.getHTML();return Bn!==void 0&&(r=Bn.createHTML(r)),e.innerHTML=r,e}};n(z,"TemplateResult")});var $t,Bt,Ne,Qe,G,Je,Ke,Ht,Hn,Ze,Sc,zt=w(()=>{kr();me();Ir();Mt();Vt();X();$t=n(t=>t===null||!(typeof t=="object"||typeof t=="function"),"isPrimitive"),Bt=n(t=>Array.isArray(t)||!!(t&&t[Symbol.iterator]),"isIterable"),Ne=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 Qe(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"||!Bt(i))return i}let s="";for(let i=0;i<r;i++){s+=e[i];let a=o[i];if(a!==void 0){let c=a.value;if($t(c)||!Bt(c))s+=typeof c=="string"?c:String(c);else for(let u of c)s+=typeof u=="string"?u:String(u)}}return s+=e[r],s}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}};n(Ne,"AttributeCommitter");Qe=class{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==q&&(!$t(e)||e!==this.value)&&(this.value=e,ye(e)||(this.committer.dirty=!0))}commit(){for(;ye(this.value);){let e=this.value;this.value=q,e(this)}this.value!==q&&this.committer.commit()}};n(Qe,"AttributePart");G=class{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild($()),this.endNode=e.appendChild($())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=$()),e.__insert(this.endNode=$())}insertAfterPart(e){e.__insert(this.startNode=$()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(this.startNode.parentNode===null)return;for(;ye(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=q,r(this)}let e=this.__pendingValue;e!==q&&($t(e)?e!==this.value&&this.__commitText(e):e instanceof z?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):Bt(e)?this.__commitIterable(e):e===jt?(this.value=jt,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==null?"":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 ee&&this.value.template===r)this.value.update(e.values);else{let o=new ee(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 G(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){he(this.startNode.parentNode,e.nextSibling,this.endNode)}};n(G,"NodePart");Je=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(;ye(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=q,r(this)}if(this.__pendingValue===q)return;let e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=q}};n(Je,"BooleanAttributePart");Ke=class extends Ne{constructor(e,r,o){super(e,r,o);this.single=o.length===2&&o[0]===""&&o[1]===""}_createPart(){return new Ht(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}};n(Ke,"PropertyCommitter");Ht=class extends Qe{};n(Ht,"PropertyPart");Hn=!1;(()=>{try{let t={get capture(){return Hn=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})();Ze=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(;ye(this.__pendingValue);){let i=this.__pendingValue;this.__pendingValue=q,i(this)}if(this.__pendingValue===q)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=Sc(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=q}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}};n(Ze,"EventPart");Sc=n(t=>t&&(Hn?{capture:t.capture,passive:t.passive,once:t.once}:t.capture),"getOptions")});function qr(t){let e=be.get(t.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},be.set(t.type,e));let r=e.stringsArray.get(t.strings);if(r!==void 0)return r;let o=t.strings.join(F);return r=e.keyString.get(o),r===void 0&&(r=new ge(t,t.getTemplateElement()),e.keyString.set(o,r)),e.stringsArray.set(t.strings,r),r}var be,Gt=w(()=>{X();n(qr,"templateFactory");be=new Map});var te,Ur,Dr=w(()=>{me();zt();Gt();te=new WeakMap,Ur=n((t,e,r)=>{let o=te.get(e);o===void 0&&(he(e,e.firstChild),te.set(e,o=new G(Object.assign({templateFactory:qr},r))),o.appendInto(e)),o.setValue(t),o.commit()},"render")});var Wt,Fr,Lr=w(()=>{zt();Wt=class{handleAttributeExpressions(e,r,o,s){let i=r[0];return i==="."?new Ke(e,r.slice(1),o).parts:i==="@"?[new Ze(e,r.slice(1),s.eventContext)]:i==="?"?[new Je(e,r.slice(1),o)]:new Ne(e,r,o).parts}handleTextExpression(e){return new G(e)}};n(Wt,"DefaultTemplateProcessor");Fr=new Wt});var p,jr=w(()=>{Lr();Vt();Lr();kr();me();Ir();zt();Dr();Gt();Mt();Vt();X();typeof window!="undefined"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.3.0");p=n((t,...e)=>new z(t,e,"html",Fr),"html")});var Gn,Yt,wc,Oc,Tc,Wn,Cc,Yn,Qn=w(()=>{me();$n();Dr();Gt();Mt();X();jr();Gn=n((t,e)=>`${t}--${e}`,"getTemplateCacheKey"),Yt=!0;typeof window.ShadyCSS=="undefined"?Yt=!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."),Yt=!1);wc=n(t=>e=>{let r=Gn(e.type,t),o=be.get(r);o===void 0&&(o={stringsArray:new WeakMap,keyString:new Map},be.set(r,o));let s=o.stringsArray.get(e.strings);if(s!==void 0)return s;let i=e.strings.join(F);if(s=o.keyString.get(i),s===void 0){let a=e.getTemplateElement();Yt&&window.ShadyCSS.prepareTemplateDom(a,t),s=new ge(e,a),o.keyString.set(i,s)}return o.stringsArray.set(e.strings,s),s},"shadyTemplateFactory"),Oc=["html","svg"],Tc=n(t=>{Oc.forEach(e=>{let r=be.get(Gn(e,t));r!==void 0&&r.keyString.forEach(o=>{let{element:{content:s}}=o,i=new Set;Array.from(s.querySelectorAll("style")).forEach(a=>{i.add(a)}),Nr(o,i)})})},"removeStylesFromLitTemplates"),Wn=new Set,Cc=n((t,e,r)=>{Wn.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 a=document.createElement("style");for(let f=0;f<i;f++){let b=s[f];b.parentNode.removeChild(b),a.textContent+=b.textContent}Tc(t);let c=o.content;r?Vn(r,a,c.firstChild):c.insertBefore(a,c.firstChild),window.ShadyCSS.prepareTemplateStyles(o,t);let u=c.querySelector("style");if(window.ShadyCSS.nativeShadow&&u!==null)e.insertBefore(u.cloneNode(!0),e.firstChild);else if(r){c.insertBefore(a,c.firstChild);let f=new Set;f.add(a),Nr(r,f)}},"prepareTemplateStyles"),Yn=n((t,e,r)=>{if(!r||typeof r!="object"||!r.scopeName)throw new Error("The `scopeName` option is required.");let o=r.scopeName,s=te.has(e),i=Yt&&e.nodeType===11&&!!e.host,a=i&&!Wn.has(o),c=a?document.createDocumentFragment():e;if(Ur(t,c,Object.assign({templateFactory:wc(o)},r)),a){let u=te.get(c);te.delete(c);let f=u.value instanceof ee?u.value.template:void 0;Cc(o,c,f),he(e,e.firstChild),e.appendChild(c),te.set(e,u)}!s&&i&&window.ShadyCSS.styleElement(e.host)},"render")});var Jn,Mr,Kn,Vr,$r,Br,Hr,zr,Gr,Xe,Wr=w(()=>{window.JSCompiler_renameProperty=(t,e)=>t;Mr={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}},Kn=n((t,e)=>e!==t&&(e===e||t===t),"notEqual"),Vr={attribute:!0,type:String,converter:Mr,reflect:!1,hasChanged:Kn},$r=1,Br=1<<2,Hr=1<<3,zr=1<<4,Gr="finalized",Xe=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=Vr){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)||Vr}static finalize(){let e=Object.getPrototypeOf(this);if(e.hasOwnProperty(Gr)||e.finalize(),this[Gr]=!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=Kn){return o(e,r)}static _propertyValueFromAttribute(e,r){let o=r.type,s=r.converter||Mr,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||Mr.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=Vr){let s=this.constructor,i=s._attributeNameForProperty(e,o);if(i!==void 0){let a=s._propertyValueToAttribute(r,o);if(a===void 0)return;this._updateState=this._updateState|Hr,a==null?this.removeAttribute(i):this.setAttribute(i,a),this._updateState=this._updateState&~Hr}}_attributeToProperty(e,r){if(this._updateState&Hr)return;let o=this.constructor,s=o._attributeToPropertyMap.get(e);if(s!==void 0){let i=o.getPropertyOptions(s);this._updateState=this._updateState|zr,this[s]=o._propertyValueFromAttribute(r,i),this._updateState=this._updateState&~zr}}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&zr)&&(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|Br;try{await this._updatePromise}catch(r){}let e=this.performUpdate();return e!=null&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return this._updateState&Br}get hasUpdated(){return this._updateState&$r}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&$r||(this._updateState=this._updateState|$r,this.firstUpdated(r)),this.updated(r))}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~Br}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(Xe,"UpdatingElement");Jn=Gr;Xe[Jn]=!0});var Zn,Gu,Xn=w(()=>{Zn=Element.prototype,Gu=Zn.msMatchesSelector||Zn.webkitMatchesSelector});var Qt,Yr,et,es,Pc,T,Qr=w(()=>{Qt=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Yr=Symbol(),et=class{constructor(e,r){if(r!==Yr)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return this._styleSheet===void 0&&(Qt?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}};n(et,"CSSResult");es=n(t=>new et(String(t),Yr),"unsafeCSS"),Pc=n(t=>{if(t instanceof et)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"),T=n((t,...e)=>{let r=e.reduce((o,s,i)=>o+Pc(s)+t[i+1],t[0]);return new et(r,Yr)},"css")});var ts,S,O=w(()=>{Qn();Wr();Wr();Xn();jr();Qr();Qr();(window.litElementVersions||(window.litElementVersions=[])).push("2.4.0");ts={},S=class extends Xe{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,a)=>i.reduceRight((c,u)=>Array.isArray(u)?r(u,c):(c.add(u),c),a),"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&&!Qt){let o=Array.prototype.slice.call(r.cssRules).reduce((s,i)=>s+i.cssText,"");return es(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):Qt?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!==ts&&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 ts}};n(S,"LitElement");S.finalized=!0;S.render=Yn});var Jt=se((op,rs)=>{var Rc={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"};rs.exports=Rc});var ns=se((np,os)=>{var _e=Jt(),Ac=n(t=>{let e="",r=[];for(let o of t){let s=o.charCodeAt(0);switch(s){case _e.PAR_OPEN:case _e.PAR_CLOSE:case _e.OP_NOT:case _e.BINARY_AND:case _e.BINARY_OR:e&&(r.push({type:_e.LITERAL,value:e}),e=""),r.push({type:s,value:o});break;default:e+=o}}return e&&r.push({type:_e.LITERAL,value:e}),r},"Tokenizer");os.exports=Ac});var is=se((sp,ss)=>{var re=Jt(),Nc=n(t=>{let e=[],r=[];return t.forEach(s=>{switch(s.type){case re.LITERAL:e.unshift(s);break;case re.BINARY_AND:case re.BINARY_OR:case re.OP_NOT:case re.PAR_OPEN:r.push(s);break;case re.PAR_CLOSE:for(;r.length&&r[r.length-1].type!==re.PAR_OPEN;)e.unshift(r.pop());r.pop(),r.length&&r[r.length-1].type===re.OP_NOT&&e.unshift(r.pop());break;default:break}}),r.length&&[...r.reverse(),...e]||e},"PolishNotation"),kc=n(function*(t){for(let e=0;e<t.length-1;e++)yield t[e];return t[t.length-1]},"PolishGenerator");ss.exports={PolishNotation:Nc,PolishGenerator:kc}});var cs=se((ip,as)=>{var U=Jt(),j=class{constructor(e,r,o,s){this.op=e,this.left=r,this.right=o,this.literal=s}isLeaf(){return this.op===U.LEAF}isAtomic(){return this.isLeaf()||this.op===U.OP_NOT&&this.left.isLeaf()}getLiteralValue(){return this.literal}static CreateAnd(e,r){return new j(U.BINARY_AND,e,r)}static CreateNot(e){return new j(U.OP_NOT,e)}static CreateOr(e,r){return new j(U.BINARY_OR,e,r)}static CreateLiteral(e){return new j(U.LEAF,null,null,e)}};n(j,"ExpNode");var ke=n(t=>{let e=t.next().value;switch(e.type){case U.LITERAL:return j.CreateLiteral(e.value);case U.OP_NOT:return j.CreateNot(ke(t));case U.BINARY_AND:{let r=ke(t),o=ke(t);return j.CreateAnd(r,o)}case U.BINARY_OR:{let r=ke(t),o=ke(t);return j.CreateOr(r,o)}}return null},"make"),Ie=n((t,e)=>{if(t.isLeaf())return e(t.getLiteralValue());if(t.op===U.OP_NOT)return!Ie(t.left,e);if(t.op===U.BINARY_OR)return Ie(t.left,e)||Ie(t.right,e);if(t.op===U.BINARY_AND)return Ie(t.left,e)&&Ie(t.right,e)},"nodeEvaluator");as.exports={make:ke,nodeEvaluator:Ie}});var ds=se((ap,ps)=>{var Ic=ns(),ls=is(),us=cs(),qc=n((t,e)=>{let r=Ic(t),o=ls.PolishNotation(r),s=ls.PolishGenerator(o),i=us.make(s);return us.nodeEvaluator(i,e)},"parse");ps.exports={parse:qc}});var Bs={};nr(Bs,{TestWizard:()=>or,default:()=>tl});var or,tl,Hs=w(()=>{O();I();or=class extends S{static get styles(){return T`
13
13
  :host {
14
14
  position: fixed;