@molin.ai/shop-ai 0.9.6 → 0.9.7
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/molin-shop-ai.min.js +250 -419
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDescriptor;var Fp=Object.getOwnPropertyNames;var Hp=Object.getPrototypeOf,zp=Object.prototype.hasOwnProperty;var Ka=t=>{throw TypeError(t)};var qp=(t,e,r)=>e in t?Fs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Hr=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Wp=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Fp(e))!zp.call(t,i)&&i!==r&&Fs(t,i,{get:()=>e[i],enumerable:!(n=Np(e,i))||n.enumerable});return t};var Gp=(t,e,r)=>(r=t!=null?Vp(Hp(t)):{},Wp(e||!t||!t.__esModule?Fs(r,"default",{value:t,enumerable:!0}):r,t));var w=(t,e,r)=>qp(t,typeof e!="symbol"?e+"":e,r),Hs=(t,e,r)=>e.has(t)||Ka("Cannot "+r);var a=(t,e,r)=>(Hs(t,e,"read from private field"),r?r.call(t):e.get(t)),f=(t,e,r)=>e.has(t)?Ka("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),g=(t,e,r,n)=>(Hs(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),m=(t,e,r)=>(Hs(t,e,"access private method"),r);var Ja=(t,e,r,n)=>({set _(i){g(t,e,i,r)},get _(){return a(t,e,n)}});var Jc=Hr(Et=>{"use strict";var wd=Et&&Et.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(p){try{c(n.next(p))}catch(d){o(d)}}function l(p){try{c(n.throw(p))}catch(d){o(d)}}function c(p){p.done?s(p.value):i(p.value).then(u,l)}c((n=n.apply(t,e||[])).next())})},yd=Et&&Et.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(c){return function(p){return l([c,p])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(p){c=[6,p],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Et,"__esModule",{value:!0});Et.base64ToBlob=vd;function vd(t){return wd(this,void 0,void 0,function(){var e,r,n;return yd(this,function(i){switch(i.label){case 0:return[4,fetch(t)];case 1:return e=i.sent(),[4,e.blob()];case 2:return r=i.sent(),n=xd(t),n&&(r=r.slice(0,r.size,n)),[2,r]}})})}var bd=/^data:(.+);base64,/;function xd(t){var e;return(e=t.match(bd))===null||e===void 0?void 0:e.slice(1,2).pop()}});var Xc=Hr(_t=>{"use strict";var kd=_t&&_t.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(p){try{c(n.next(p))}catch(d){o(d)}}function l(p){try{c(n.throw(p))}catch(d){o(d)}}function c(p){p.done?s(p.value):i(p.value).then(u,l)}c((n=n.apply(t,e||[])).next())})},Cd=_t&&_t.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(c){return function(p){return l([c,p])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(p){c=[6,p],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(_t,"__esModule",{value:!0});_t.base64ToFile=Sd;function Sd(t,e,r){return kd(this,void 0,void 0,function(){var n,i;return Cd(this,function(s){switch(s.label){case 0:return[4,fetch(t)];case 1:return n=s.sent(),[4,n.blob()];case 2:return i=s.sent(),[2,new File([i],e,r)]}})})}});var Qo=Hr(At=>{"use strict";var Xo=At&&At.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(p){try{c(n.next(p))}catch(d){o(d)}}function l(p){try{c(n.throw(p))}catch(d){o(d)}}function c(p){p.done?s(p.value):i(p.value).then(u,l)}c((n=n.apply(t,e||[])).next())})},Yo=At&&At.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(c){return function(p){return l([c,p])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(p){c=[6,p],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(At,"__esModule",{value:!0});At.blobToBase64=$d;function $d(t){return Xo(this,void 0,void 0,function(){return Yo(this,function(e){return[2,typeof FileReader=="function"?Ed(t):Ad(t)]})})}var pr;(function(t){t.error="error",t.loadend="loadend"})(pr||(pr={}));function Ed(t){return Xo(this,void 0,void 0,function(){return Yo(this,function(e){return[2,new Promise(function(r,n){try{var i=new FileReader,s=function(){r(i.result),i.removeEventListener(pr.loadend,s)};i.addEventListener(pr.loadend,s);var o=function(){n(i.error),i.removeEventListener(pr.error,o)};i.addEventListener(pr.error,o),i.readAsDataURL(t)}catch(u){n(u)}})]})})}var _d="application/octet-stream";function Ad(t){return Xo(this,void 0,void 0,function(){var e,r,n,i;return Yo(this,function(s){switch(s.label){case 0:return n=(r=Buffer).from,[4,t.text()];case 1:return e=n.apply(r,[s.sent()]),i=t.type||_d,[2,"data:".concat(i,";base64,").concat(e.toString("base64"))]}})})}});var Yc=Hr(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.fileToBase64=void 0;var Md=Qo();Object.defineProperty(ji,"fileToBase64",{enumerable:!0,get:function(){return Md.blobToBase64}})});var Qc=Hr(je=>{"use strict";var Id=je&&je.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Di=je&&je.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Id(e,t,r)};Object.defineProperty(je,"__esModule",{value:!0});Di(Jc(),je);Di(Xc(),je);Di(Qo(),je);Di(Yc(),je)});var ti=globalThis,ri=ti.ShadowRoot&&(ti.ShadyCSS===void 0||ti.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,zs=Symbol(),Xa=new WeakMap,zr=class{constructor(e,r,n){if(this._$cssResult$=!0,n!==zs)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(ri&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=Xa.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Xa.set(r,e))}return e}toString(){return this.cssText}},Ya=t=>new zr(typeof t=="string"?t:t+"",void 0,zs),ae=(t,...e)=>{let r=t.length===1?t[0]:e.reduce(((n,i,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new zr(r,t,zs)},Qa=(t,e)=>{if(ri)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let n=document.createElement("style"),i=ti.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},qs=ri?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let n of e.cssRules)r+=n.cssText;return Ya(r)})(t):t;var{is:Zp,defineProperty:Kp,getOwnPropertyDescriptor:Jp,getOwnPropertyNames:Xp,getOwnPropertySymbols:Yp,getPrototypeOf:Qp}=Object,ni=globalThis,el=ni.trustedTypes,eh=el?el.emptyScript:"",th=ni.reactiveElementPolyfillSupport,qr=(t,e)=>t,Ws={toAttribute(t,e){switch(e){case Boolean:t=t?eh:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},rl=(t,e)=>!Zp(t,e),tl={attribute:!0,type:String,converter:Ws,reflect:!1,useDefault:!1,hasChanged:rl};Symbol.metadata??=Symbol("metadata"),ni.litPropertyMetadata??=new WeakMap;var Be=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=tl){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){let n=Symbol(),i=this.getPropertyDescriptor(e,n,r);i!==void 0&&Kp(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:s}=Jp(this.prototype,e)??{get(){return this[r]},set(o){this[r]=o}};return{get:i,set(o){let u=i?.call(this);s?.call(this,o),this.requestUpdate(e,u,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??tl}static _$Ei(){if(this.hasOwnProperty(qr("elementProperties")))return;let e=Qp(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(qr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(qr("properties"))){let r=this.properties,n=[...Xp(r),...Yp(r)];for(let i of n)this.createProperty(i,r[i])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let i of n)r.unshift(qs(i))}else e!==void 0&&r.push(qs(e));return r}static _$Eu(e,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Qa(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,r,n){this._$AK(e,n)}_$ET(e,r){let n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:Ws).toAttribute(r,n.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,r){let n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let s=n.getPropertyOptions(i),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:Ws;this._$Em=i;let u=o.fromAttribute(r,s.type);this[i]=u??this._$Ej?.get(i)??u,this._$Em=null}}requestUpdate(e,r,n){if(e!==void 0){let i=this.constructor,s=this[e];if(n??=i.getPropertyOptions(e),!((n.hasChanged??rl)(s,r)||n.useDefault&&n.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,n))))return;this.C(e,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:n,reflect:i,wrapped:s},o){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??r??this[e]),s!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(r=void 0),this._$AL.set(e,r)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,s]of n){let{wrapped:o}=s,u=this[i];o!==!0||this._$AL.has(i)||u===void 0||this.C(i,void 0,s,u)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach((n=>n.hostUpdate?.())),this.update(r)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach((r=>r.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((r=>this._$ET(r,this[r]))),this._$EM()}updated(e){}firstUpdated(e){}};Be.elementStyles=[],Be.shadowRootOptions={mode:"open"},Be[qr("elementProperties")]=new Map,Be[qr("finalized")]=new Map,th?.({ReactiveElement:Be}),(ni.reactiveElementVersions??=[]).push("2.1.1");var Zs=globalThis,ii=Zs.trustedTypes,nl=ii?ii.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ks="$lit$",Ve=`lit$${Math.random().toFixed(9).slice(2)}$`,Js="?"+Ve,rh=`<${Js}>`,mt=document,Gr=()=>mt.createComment(""),Zr=t=>t===null||typeof t!="object"&&typeof t!="function",Xs=Array.isArray,cl=t=>Xs(t)||typeof t?.[Symbol.iterator]=="function",Gs=`[
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
1
|
+
var Mu=Object.defineProperty;var ra=e=>{throw TypeError(e)};var Iu=(e,t,r)=>t in e?Mu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var y=(e,t,r)=>Iu(e,typeof t!="symbol"?t+"":t,r),os=(e,t,r)=>t.has(e)||ra("Cannot "+r);var a=(e,t,r)=>(os(e,t,"read from private field"),r?r.call(e):t.get(e)),f=(e,t,r)=>t.has(e)?ra("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),m=(e,t,r,n)=>(os(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),g=(e,t,r)=>(os(e,t,"access private method"),r);var na=(e,t,r,n)=>({set _(i){m(e,t,i,r)},get _(){return a(e,t,n)}});var Mn=globalThis,In=Mn.ShadowRoot&&(Mn.ShadyCSS===void 0||Mn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,as=Symbol(),ia=new WeakMap,xr=class{constructor(t,r,n){if(this._$cssResult$=!0,n!==as)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o,r=this.t;if(In&&t===void 0){let n=r!==void 0&&r.length===1;n&&(t=ia.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&ia.set(r,t))}return t}toString(){return this.cssText}},sa=e=>new xr(typeof e=="string"?e:e+"",void 0,as),ie=(e,...t)=>{let r=e.length===1?e[0]:t.reduce(((n,i,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[s+1]),e[0]);return new xr(r,e,as)},oa=(e,t)=>{if(In)e.adoptedStyleSheets=t.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of t){let n=document.createElement("style"),i=Mn.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}},ls=In?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(let n of t.cssRules)r+=n.cssText;return sa(r)})(e):e;var{is:Ou,defineProperty:Tu,getOwnPropertyDescriptor:ju,getOwnPropertyNames:Lu,getOwnPropertySymbols:Du,getPrototypeOf:Pu}=Object,On=globalThis,aa=On.trustedTypes,Ru=aa?aa.emptyScript:"",Uu=On.reactiveElementPolyfillSupport,br=(e,t)=>e,cs={toAttribute(e,t){switch(t){case Boolean:e=e?Ru:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},ca=(e,t)=>!Ou(e,t),la={attribute:!0,type:String,converter:cs,reflect:!1,useDefault:!1,hasChanged:ca};Symbol.metadata??=Symbol("metadata"),On.litPropertyMetadata??=new WeakMap;var Te=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=la){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){let n=Symbol(),i=this.getPropertyDescriptor(t,n,r);i!==void 0&&Tu(this.prototype,t,i)}}static getPropertyDescriptor(t,r,n){let{get:i,set:s}=ju(this.prototype,t)??{get(){return this[r]},set(o){this[r]=o}};return{get:i,set(o){let c=i?.call(this);s?.call(this,o),this.requestUpdate(t,c,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??la}static _$Ei(){if(this.hasOwnProperty(br("elementProperties")))return;let t=Pu(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(br("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(br("properties"))){let r=this.properties,n=[...Lu(r),...Du(r)];for(let i of n)this.createProperty(i,r[i])}let t=this[Symbol.metadata];if(t!==null){let r=litPropertyMetadata.get(t);if(r!==void 0)for(let[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let r=[];if(Array.isArray(t)){let n=new Set(t.flat(1/0).reverse());for(let i of n)r.unshift(ls(i))}else t!==void 0&&r.push(ls(t));return r}static _$Eu(t,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return oa(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,r,n){this._$AK(t,n)}_$ET(t,r){let n=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,n);if(i!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:cs).toAttribute(r,n.type);this._$Em=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,r){let n=this.constructor,i=n._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let s=n.getPropertyOptions(i),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:cs;this._$Em=i;let c=o.fromAttribute(r,s.type);this[i]=c??this._$Ej?.get(i)??c,this._$Em=null}}requestUpdate(t,r,n){if(t!==void 0){let i=this.constructor,s=this[t];if(n??=i.getPropertyOptions(t),!((n.hasChanged??ca)(s,r)||n.useDefault&&n.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,n))))return;this.C(t,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:n,reflect:i,wrapped:s},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??r??this[t]),s!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(r=void 0),this._$AL.set(t,r)),i===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,s]of n){let{wrapped:o}=s,c=this[i];o!==!0||this._$AL.has(i)||c===void 0||this.C(i,void 0,s,c)}}let t=!1,r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),this._$EO?.forEach((n=>n.hostUpdate?.())),this.update(r)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(r)}willUpdate(t){}_$AE(t){this._$EO?.forEach((r=>r.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((r=>this._$ET(r,this[r]))),this._$EM()}updated(t){}firstUpdated(t){}};Te.elementStyles=[],Te.shadowRootOptions={mode:"open"},Te[br("elementProperties")]=new Map,Te[br("finalized")]=new Map,Uu?.({ReactiveElement:Te}),(On.reactiveElementVersions??=[]).push("2.1.1");var ps=globalThis,Tn=ps.trustedTypes,ua=Tn?Tn.createPolicy("lit-html",{createHTML:e=>e}):void 0,hs="$lit$",je=`lit$${Math.random().toFixed(9).slice(2)}$`,ds="?"+je,Vu=`<${ds}>`,it=document,Cr=()=>it.createComment(""),Sr=e=>e===null||typeof e!="object"&&typeof e!="function",fs=Array.isArray,ga=e=>fs(e)||typeof e?.[Symbol.iterator]=="function",us=`[
|
|
2
|
+
\f\r]`,kr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pa=/-->/g,ha=/>/g,rt=RegExp(`>|${us}(?:([^\\s"'>=/]+)(${us}*=${us}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),da=/'/g,fa=/"/g,ya=/^(?:script|style|textarea|title)$/i,ms=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),d=ms(1),rh=ms(2),nh=ms(3),xe=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),ma=new WeakMap,nt=it.createTreeWalker(it,129);function wa(e,t){if(!fs(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return ua!==void 0?ua.createHTML(t):t}var va=(e,t)=>{let r=e.length-1,n=[],i,s=t===2?"<svg>":t===3?"<math>":"",o=kr;for(let c=0;c<r;c++){let l=e[c],u,p,h=-1,v=0;for(;v<l.length&&(o.lastIndex=v,p=o.exec(l),p!==null);)v=o.lastIndex,o===kr?p[1]==="!--"?o=pa:p[1]!==void 0?o=ha:p[2]!==void 0?(ya.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=rt):p[3]!==void 0&&(o=rt):o===rt?p[0]===">"?(o=i??kr,h=-1):p[1]===void 0?h=-2:(h=o.lastIndex-p[2].length,u=p[1],o=p[3]===void 0?rt:p[3]==='"'?fa:da):o===fa||o===da?o=rt:o===pa||o===ha?o=kr:(o=rt,i=void 0);let b=o===rt&&e[c+1].startsWith("/>")?" ":"";s+=o===kr?l+Vu:h>=0?(n.push(u),l.slice(0,h)+hs+l.slice(h)+je+b):l+je+(h===-2?c:b)}return[wa(e,s+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},$r=class e{constructor({strings:t,_$litType$:r},n){let i;this.parts=[];let s=0,o=0,c=t.length-1,l=this.parts,[u,p]=va(t,r);if(this.el=e.createElement(u,n),nt.currentNode=this.el.content,r===2||r===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=nt.nextNode())!==null&&l.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith(hs)){let v=p[o++],b=i.getAttribute(h).split(je),S=/([.?@])?(.*)/.exec(v);l.push({type:1,index:s,name:S[2],strings:b,ctor:S[1]==="."?Ln:S[1]==="?"?Dn:S[1]==="@"?Pn:ot}),i.removeAttribute(h)}else h.startsWith(je)&&(l.push({type:6,index:s}),i.removeAttribute(h));if(ya.test(i.tagName)){let h=i.textContent.split(je),v=h.length-1;if(v>0){i.textContent=Tn?Tn.emptyScript:"";for(let b=0;b<v;b++)i.append(h[b],Cr()),nt.nextNode(),l.push({type:2,index:++s});i.append(h[v],Cr())}}}else if(i.nodeType===8)if(i.data===ds)l.push({type:2,index:s});else{let h=-1;for(;(h=i.data.indexOf(je,h+1))!==-1;)l.push({type:7,index:s}),h+=je.length-1}s++}}static createElement(t,r){let n=it.createElement("template");return n.innerHTML=t,n}};function st(e,t,r=e,n){if(t===xe)return t;let i=n!==void 0?r._$Co?.[n]:r._$Cl,s=Sr(t)?void 0:t._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),s===void 0?i=void 0:(i=new s(e),i._$AT(e,r,n)),n!==void 0?(r._$Co??=[])[n]=i:r._$Cl=i),i!==void 0&&(t=st(e,i._$AS(e,t.values),i,n)),t}var jn=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:n}=this._$AD,i=(t?.creationScope??it).importNode(r,!0);nt.currentNode=i;let s=nt.nextNode(),o=0,c=0,l=n[0];for(;l!==void 0;){if(o===l.index){let u;l.type===2?u=new Mt(s,s.nextSibling,this,t):l.type===1?u=new l.ctor(s,l.name,l.strings,this,t):l.type===6&&(u=new Rn(s,this,t)),this._$AV.push(u),l=n[++c]}o!==l?.index&&(s=nt.nextNode(),o++)}return nt.currentNode=it,i}p(t){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}},Mt=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,n,i){this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=st(this,t,r),Sr(t)?t===H||t==null||t===""?(this._$AH!==H&&this._$AR(),this._$AH=H):t!==this._$AH&&t!==xe&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ga(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==H&&Sr(this._$AH)?this._$AA.nextSibling.data=t:this.T(it.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:n}=t,i=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=$r.createElement(wa(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let s=new jn(i,this),o=s.u(this.options);s.p(r),this.T(o),this._$AH=s}}_$AC(t){let r=ma.get(t.strings);return r===void 0&&ma.set(t.strings,r=new $r(t)),r}k(t){fs(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let s of t)i===r.length?r.push(n=new e(this.O(Cr()),this.O(Cr()),this,this.options)):n=r[i],n._$AI(s),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let n=t.nextSibling;t.remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},ot=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,i,s){this.type=1,this._$AH=H,this._$AN=void 0,this.element=t,this.name=r,this._$AM=i,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=H}_$AI(t,r=this,n,i){let s=this.strings,o=!1;if(s===void 0)t=st(this,t,r,0),o=!Sr(t)||t!==this._$AH&&t!==xe,o&&(this._$AH=t);else{let c=t,l,u;for(t=s[0],l=0;l<s.length-1;l++)u=st(this,c[n+l],r,l),u===xe&&(u=this._$AH[l]),o||=!Sr(u)||u!==this._$AH[l],u===H?t=H:t!==H&&(t+=(u??"")+s[l+1]),this._$AH[l]=u}o&&!i&&this.j(t)}j(t){t===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Ln=class extends ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===H?void 0:t}},Dn=class extends ot{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==H)}},Pn=class extends ot{constructor(t,r,n,i,s){super(t,r,n,i,s),this.type=5}_$AI(t,r=this){if((t=st(this,t,r,0)??H)===xe)return;let n=this._$AH,i=t===H&&n!==H||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==H&&(n===H||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},Rn=class{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){st(this,t)}},xa={M:hs,P:je,A:ds,C:1,L:va,R:jn,D:ga,V:st,I:Mt,H:ot,N:Dn,U:Pn,B:Ln,F:Rn},Bu=ps.litHtmlPolyfillSupport;Bu?.($r,Mt),(ps.litHtmlVersions??=[]).push("3.3.1");var ba=(e,t,r)=>{let n=r?.renderBefore??t,i=n._$litPart$;if(i===void 0){let s=r?.renderBefore??null;n._$litPart$=i=new Mt(t.insertBefore(Cr(),s),s,void 0,r??{})}return i._$AI(e),i};var gs=globalThis,_=class extends Te{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ba(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return xe}};_._$litElement$=!0,_.finalized=!0,gs.litElementHydrateSupport?.({LitElement:_});var Nu=gs.litElementPolyfillSupport;Nu?.({LitElement:_});(gs.litElementVersions??=[]).push("4.2.1");var Er=class Er extends HTMLElement{constructor(){super();y(this,"name","");this.attachShadow({mode:"open"})}attributeChangedCallback(r,n,i){if(n!==i&&Er.observedAttributes.includes(r)){switch(r){case"name":this.name=i||"";break}this.render()}}resolveIcon(r){throw new Error("Not implemented")}render(){let r=document.createElement("style");for(r.textContent=`
|
|
4
4
|
:host {
|
|
5
5
|
display: inline-block;
|
|
6
6
|
line-height: 0;
|
|
7
7
|
}
|
|
8
|
-
`;this.shadowRoot?.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild),this.shadowRoot.appendChild(r);if(!this.name)return;let n=this.resolveIcon(this.name);if(!n){console.warn(`'${this.name}' not found, please add it to ${
|
|
8
|
+
`;this.shadowRoot?.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild),this.shadowRoot.appendChild(r);if(!this.name)return;let n=this.resolveIcon(this.name);if(!n){console.warn(`'${this.name}' not found, please add it to ${Er.name}`);return}let o=new DOMParser().parseFromString(n,"image/svg+xml").documentElement;o.setAttribute("fill","currentColor"),o.style.width="100%",o.style.height="100%",this.shadowRoot?.appendChild(o)}};y(Er,"observedAttributes",["name"]);var Un=Er;var ka={clock:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9
9
|
<path d="M12 6V12H16.5M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
10
10
|
</svg>`,"arrow-path":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
11
11
|
<path d="M16.0228 9.34841H21.0154V9.34663M2.98413 19.6444V14.6517M2.98413 14.6517L7.97677 14.6517M2.98413 14.6517L6.16502 17.8347C7.15555 18.8271 8.41261 19.58 9.86436 19.969C14.2654 21.1483 18.7892 18.5364 19.9685 14.1353M4.03073 9.86484C5.21 5.46374 9.73377 2.85194 14.1349 4.03121C15.5866 4.4202 16.8437 5.17312 17.8342 6.1655L21.0154 9.34663M21.0154 4.3558V9.34663" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -121,7 +121,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
121
121
|
<path d="M3.75 6.75H20.25M3.75 12H20.25M3.75 17.25H20.25" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
122
122
|
</svg>`,phone:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
123
123
|
<path d="M2.25 6.75C2.25 15.0343 8.96573 21.75 17.25 21.75H19.5C20.7426 21.75 21.75 20.7426 21.75 19.5V18.1284C21.75 17.6121 21.3987 17.1622 20.8979 17.037L16.4747 15.9312C16.0355 15.8214 15.5734 15.9855 15.3018 16.3476L14.3316 17.6412C14.05 18.0166 13.563 18.1827 13.1223 18.0212C9.81539 16.8098 7.19015 14.1846 5.97876 10.8777C5.81734 10.437 5.98336 9.94998 6.3588 9.6684L7.65242 8.69818C8.01453 8.4266 8.17861 7.96445 8.06883 7.52533L6.96304 3.10215C6.83783 2.60133 6.38785 2.25 5.87163 2.25H4.5C3.25736 2.25 2.25 3.25736 2.25 4.5V6.75Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
124
|
-
</svg>`};var sh=ml,eo=class extends ui{resolveIcon(e){let r=sh[e];if(!r)throw console.warn("hi-outline: icon not found",e),new Error(`Icon ${e} not found`);return r}render(){super.render();let e=this.shadowRoot?.querySelector("svg");if(!e)throw new Error("svgEl not found "+this.name);e.setAttribute("fill","none"),e.querySelectorAll("[stroke]").forEach(r=>{r.setAttribute("stroke","currentColor")})}};customElements.get("hi-outline")||customElements.define("hi-outline",eo);var Xr,de,_e,Yr,to,pi=class{constructor(e,r){f(this,Yr);f(this,Xr);f(this,de);f(this,_e);if(!e)throw new Error("host is required");if(!r)throw new Error("config is required");g(this,Xr,e),a(this,Xr).addController(this),g(this,de,r)}connect(e){g(this,de,e),g(this,_e,m(this,Yr,to).call(this))}hostConnected(){setTimeout(()=>{g(this,_e,m(this,Yr,to).call(this))},0)}hostDisconnected(){a(this,_e)?.close(1e3,"lit_host_disconnected"),g(this,_e,void 0)}send(e){a(this,_e)?.send(e)}close(e,r){a(this,_e)?.close(e,r)}get isConnected(){return a(this,_e)?.readyState===WebSocket.OPEN}get isConnecting(){return a(this,_e)?.readyState===WebSocket.CONNECTING}};Xr=new WeakMap,de=new WeakMap,_e=new WeakMap,Yr=new WeakSet,to=function(){let e=new WebSocket(a(this,de).url());return a(this,de).onClose&&(e.onclose=a(this,de).onClose),a(this,de).onOpen&&(e.onopen=a(this,de).onOpen),a(this,de).onError&&(e.onerror=a(this,de).onError),a(this,de).onMessage&&(e.onmessage=a(this,de).onMessage),e};var gl=Array.isArray;var ro=t=>!!(t&&t.constructor&&t.call&&t.apply);var wl=t=>!(!t||!t.then||!ro(t.then));var yl=(t,e,r=!1)=>{if(!t)return[];let n=(s,o)=>e(s)-e(o),i=(s,o)=>e(o)-e(s);return t.slice().sort(r===!0?i:n)};function*no(t,e,r=i=>i,n=1){let i=ro(r)?r:()=>r,s=e?t:0,o=e??t;for(let u=s;u<=o&&(yield i(u),!(u+n>o));u+=n);}var vl=(t,e,r,n)=>Array.from(no(t,e,r,n));var bl=(t,e)=>t?t.reduce((r,n)=>{let[i,s]=r;return e(n)?[[...i,n],s]:[i,[...s,n]]},[[],[]]):[[],[]];var io=class extends Error{constructor(e=[]){super();let r=e.find(n=>n.name)?.name??"";this.name=`AggregateError(${r}...)`,this.message=`AggregateError with ${e.length} errors`,this.stack=e.find(n=>n.stack)?.stack??this.stack,this.errors=e}},oo=async(t,e,r)=>{let n=e.map((c,p)=>({index:p,item:c})),i=async c=>{let p=[];for(;;){let d=n.pop();if(!d)return c(p);let[y,x]=await hi(r)(d.item);p.push({error:y,result:x,index:d.index})}},s=vl(1,t).map(()=>new Promise(i)),o=await Promise.all(s),[u,l]=bl(yl(o.flat(),c=>c.index),c=>!!c.error);if(u.length>0)throw new io(u.map(c=>c.error));return l.map(c=>c.result)};var ao=async(t,e)=>{let r=t?.times??3,n=t?.delay,i=t?.backoff??null;for(let s of no(1,r)){let[o,u]=await hi(e)(l=>{throw{_exited:l}});if(!o)return u;if(o._exited)throw o._exited;if(s===r)throw o;n&&await so(n),i&&await so(i(s))}},so=t=>new Promise(e=>setTimeout(e,t)),hi=t=>(...e)=>{try{let r=t(...e);return wl(r)?r.then(n=>[void 0,n]).catch(n=>[n,void 0]):[void 0,r]}catch(r){return[r,void 0]}};var oh=!0,lo="Invariant failed";function Ne(t,e){if(!t){if(oh)throw new Error(lo);var r=typeof e=="function"?e():e,n=r?"".concat(lo,": ").concat(r):lo;throw new Error(n)}}var K,ee,G,zt,qt,be,J,Ae,xl,kl,Cl,Sl,di=class{constructor(e,r){f(this,J);f(this,K);f(this,ee);f(this,G,null);w(this,"isStreaming",!1);w(this,"typingIndicator");w(this,"ranOutOfCredits",!1);w(this,"messages",[]);w(this,"conversationId","");f(this,zt,0);f(this,qt);w(this,"isLiveMode",!1);f(this,be,[]);g(this,K,e),g(this,ee,r),a(this,ee).autoConnect!==!1&&g(this,G,this.initWS()),e.addController(this)}get hasQueuedMessages(){return a(this,be).length>0}async enqueueMessage(e,{expectStreaming:r=!1}={}){if(a(this,be).length>0){let n=a(this,be)[a(this,be).length-1];if(e.type==="USER_INPUT"&&n.message.type==="USER_INPUT"&&e.value===n.message.value)return!0}return a(this,G)||this.connect(),a(this,G)?.isConnected?m(this,J,Ae).call(this,e,{expectStreaming:r}):(a(this,be).push({message:e,options:{expectStreaming:r}}),a(this,K).requestUpdate(),a(this,G)&&!a(this,G).isConnecting&&!a(this,G).isConnected&&this.retry(),await ao({times:5,delay:2e3},async()=>{if(a(this,G)?.isConnected){let n=[...a(this,be)];g(this,be,[]),a(this,K).requestUpdate();let i=!1;for(let{message:s,options:o}of n){let u=m(this,J,Ae).call(this,s,o);s===e&&(i=u)}return i}else throw new Error("WebSocket not connected yet")}).catch(()=>(console.warn("Failed to send message after retries",e),g(this,be,[]),a(this,K).requestUpdate(),!1)))}sendUserInput(e,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1}={}){return m(this,J,Ae).call(this,{type:"USER_INPUT",value:e,role:i,xUserData:r,xCustomInstructions:n},{expectStreaming:s})}async enqueueUserInput(e,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1}={}){return this.enqueueMessage({type:"USER_INPUT",value:e,role:i,xUserData:r,xCustomInstructions:n},{expectStreaming:s})}sendImageDelete(e){return Ne(e,"imageId is required"),m(this,J,Ae).call(this,{type:"USER_FILE_DELETE",imageId:e})}sendUserCancel(){return m(this,J,Ae).call(this,{type:"USER_CANCEL"})}sendUserTypingStart(){return m(this,J,Ae).call(this,{type:"USER_TYPING_START"})}sendUserTypingStop(){return m(this,J,Ae).call(this,{type:"USER_TYPING_STOP"})}sendUserMeta(e){return m(this,J,Ae).call(this,{type:"USER_META",metadata:e})}reloadConfig(){m(this,J,Ae).call(this,{type:"RELOAD_CONFIG"})}close(){a(this,G)?.close(1e3,"closed by user")}retry(){clearTimeout(a(this,qt)),g(this,qt,setTimeout(()=>{a(this,ee).onReconnect?.(),g(this,G,this.initWS())},1e3*a(this,zt))),Ja(this,zt)._++}initWS(){return new pi(a(this,K),{url:()=>a(this,ee).url(this.conversationId,{}),onOpen:e=>m(this,J,xl).call(this,e),onMessage:e=>m(this,J,kl).call(this,JSON.parse(e.data)),onError:e=>m(this,J,Cl).call(this,e),onClose:e=>m(this,J,Sl).call(this,e)})}hostConnected(){this.conversationId=a(this,ee).restoreConversationState?.()?.conversationId||"",this.messages=a(this,ee).restoreConversationState?.()?.messages||[]}reset(){m(this,J,Ae).call(this,{type:"NEW_CHAT"}),a(this,ee).onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,g(this,be,[]),a(this,K).requestUpdate()}hostDisconnected(){clearTimeout(a(this,qt))}connect(){a(this,G)||g(this,G,this.initWS())}reconnectSocket(){a(this,G)?.close(1e3,"destroy"),g(this,G,this.initWS())}get lastMsg(){if(this.messages.length>0)return this.messages[this.messages.length-1]}};K=new WeakMap,ee=new WeakMap,G=new WeakMap,zt=new WeakMap,qt=new WeakMap,be=new WeakMap,J=new WeakSet,Ae=function(e,{expectStreaming:r=!1}={}){return this.ranOutOfCredits?!1:a(this,G)?a(this,G).isConnecting?(console.warn("WebSocket is connecting, message not sent",e),!1):a(this,G).isConnected?(r&&!this.isLiveMode&&(this.isStreaming=!0,a(this,K).requestUpdate()),a(this,G).send(JSON.stringify(e)),!0):(console.warn("WebSocket is not connected, message not sent",e),this.retry(),!1):(console.warn("WebSocket not initialized, message not sent",e),this.connect(),!1)},xl=function(e){g(this,zt,0)},kl=function(e){switch(e.type){case"NEW_MESSAGE":{this.messages=[...this.messages,{...e.message,streaming:!0}].filter((r,n,i)=>n===i.findIndex(s=>s.id===r.id)),this.typingIndicator=void 0,a(this,K).requestUpdate(),a(this,ee).onNewMessage?.(e.message);break}case"APPEND_MESSAGE":{let r=this.messages.find(n=>n.id===e.message.id);if(r){switch(e.message.content_type){case"text":{let{part:n,delta:i,position:s}=e.message;r.content=r.content.slice(0,s)+i,r.parts||=[],r.parts[n]={text:r.parts[n]&&"text"in r.parts[n]?(r.parts[n].text||"").slice(0,s)+i:i};break}case"html":{let{part:n,delta:i,position:s}=e.message;r.parts||=[],r.parts[n]={html:r.parts[n]&&"html"in r.parts[n]?(r.parts[n].html||"").slice(0,s)+i:i};break}case"data":{let{part:n}=e.message;r.parts||=[],r.parts[n]={tag:e.message.tag,data:r.parts[n]&&"data"in r.parts[n]?Object.assign(r.parts[n].data||{},e.message.data):e.message.data};break}}e.metadata&&(r.metadata=e.metadata),a(this,ee).onMessageAppend?.(e),a(this,K).requestUpdate()}else throw new Error(`Message with id ${e.message.id} not found`);break}case"MESSAGE_DONE":{let r=this.messages.find(n=>n.id===e.message.id);if(r)Object.assign(r,e.message),r.streaming=!1;else throw new Error(`Message with id ${e.message.id} not found`);this.isStreaming=!1,a(this,K).requestUpdate(),a(this,ee).onMessageDone?.(e,r),a(this,ee).persistConversationState?.(this.conversationId,this.messages);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,a(this,K).requestUpdate();break}case"ERROR":{a(this,ee).onMessageError?.(e);break}case"CONNECTED":{this.conversationId=e.conversationId,this.messages=e.messages,a(this,ee).onConnect?.(e.conversationId,e.metadata),a(this,ee).persistConversationState?.(e.conversationId,e.messages),this.isLiveMode=e.metadata?.isLiveMode,a(this,K).requestUpdate();break}case"TYPING_START":{e.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:e.role,metadata:e.metadata},a(this,K).requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,a(this,K).requestUpdate();break}case"RAN_OUT_OF_CREDITS":{this.ranOutOfCredits=!0,a(this,K).requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),a(this,K).requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}},Cl=function(e){console.error("onError",e),a(this,ee).onError?.(e)},Sl=function(e){a(this,K).isConnected&&a(this,G)&&!a(this,G).isConnected&&e.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,a(this,K).requestUpdate(),a(this,ee).onClose?.()};var S0=Symbol(),ah=Symbol();var $l=Object.getPrototypeOf,co=new WeakMap,lh=t=>t&&(co.has(t)?co.get(t):$l(t)===Object.prototype||$l(t)===Array.prototype);var El=t=>lh(t)&&t[ah]||null,uo=(t,e=!0)=>{co.set(t,e)};var ho=t=>typeof t=="object"&&t!==null,ch=t=>ho(t)&&!fo.has(t)&&(Array.isArray(t)||!(Symbol.iterator in t))&&!(t instanceof WeakMap)&&!(t instanceof WeakSet)&&!(t instanceof Error)&&!(t instanceof Number)&&!(t instanceof Date)&&!(t instanceof String)&&!(t instanceof RegExp)&&!(t instanceof ArrayBuffer)&&!(t instanceof Promise),Ml=(t,e)=>{let r=_l.get(t);if(r?.[0]===e)return r[1];let n=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return uo(n,!0),_l.set(t,[e,n]),Reflect.ownKeys(t).forEach(i=>{if(Object.getOwnPropertyDescriptor(n,i))return;let s=Reflect.get(t,i),{enumerable:o}=Reflect.getOwnPropertyDescriptor(t,i),u={value:s,enumerable:o,configurable:!0};if(fo.has(s))uo(s,!1);else if(yt.has(s)){let[l,c]=yt.get(s);u.value=Ml(l,c())}Object.defineProperty(n,i,u)}),Object.preventExtensions(n)},uh=(t,e,r,n)=>({deleteProperty(i,s){let o=Reflect.get(i,s);r(s);let u=Reflect.deleteProperty(i,s);return u&&n(["delete",[s],o]),u},set(i,s,o,u){let l=!t()&&Reflect.has(i,s),c=Reflect.get(i,s,u);if(l&&(Al(c,o)||fi.has(o)&&Al(c,fi.get(o))))return!0;r(s),ho(o)&&(o=El(o)||o);let p=!yt.has(o)&&hh(o)?mo(o):o;return e(s,p),Reflect.set(i,s,p,u),n(["set",[s],o,c]),!0}}),yt=new WeakMap,fo=new WeakSet,_l=new WeakMap,po=[1],fi=new WeakMap,Al=Object.is,ph=(t,e)=>new Proxy(t,e),hh=ch,dh=Ml,fh=uh;function mo(t={}){if(!ho(t))throw new Error("object required");let e=fi.get(t);if(e)return e;let r=po[0],n=new Set,i=(C,I=++po[0])=>{r!==I&&(s=r=I,n.forEach(k=>k(C,I)))},s=r,o=(C=po[0])=>(s!==C&&(s=C,l.forEach(([I])=>{let k=I[1](C);k>r&&(r=k)})),r),u=C=>(I,k)=>{let _=[...I];_[1]=[C,..._[1]],i(_,k)},l=new Map,c=(C,I)=>{let k=!fo.has(I)&&yt.get(I);if(k){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&l.has(C))throw new Error("prop listener already exists");if(n.size){let _=k[2](u(C));l.set(C,[k,_])}else l.set(C,[k])}},p=C=>{var I;let k=l.get(C);k&&(l.delete(C),(I=k[1])==null||I.call(k))},d=C=>(n.add(C),n.size===1&&l.forEach(([k,_],O)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&_)throw new Error("remove already exists");let H=k[2](u(O));l.set(O,[k,H])}),()=>{n.delete(C),n.size===0&&l.forEach(([k,_],O)=>{_&&(_(),l.set(O,[k]))})}),y=!0,x=fh(()=>y,c,p,i),S=ph(t,x);fi.set(t,S);let M=[t,o,d];return yt.set(S,M),Reflect.ownKeys(t).forEach(C=>{let I=Object.getOwnPropertyDescriptor(t,C);"value"in I&&I.writable&&(S[C]=t[C])}),y=!1,S}function mi(t,e,r){let n=yt.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!n&&console.warn("Please use proxy object");let i,s=[],o=n[2],u=!1,c=o(p=>{if(s.push(p),r){e(s.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,u&&e(s.splice(0))}))});return u=!0,()=>{u=!1,c()}}function Wt(t){let e=yt.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!e&&console.warn("Please use proxy object");let[r,n]=e;return dh(r,n())}var Qr,Gt,vt,Zt,Kt=class{constructor(e,r){f(this,Qr);f(this,Gt);f(this,vt);f(this,Zt,()=>{});g(this,Qr,e),g(this,Gt,r),g(this,vt,Wt(r)),e.addController(this)}get state(){return a(this,vt)}get value(){return a(this,vt)}hostConnected(){a(this,Zt).call(this),g(this,Zt,mi(a(this,Gt),()=>{g(this,vt,Wt(a(this,Gt))),a(this,Qr).requestUpdate()}))}hostDisconnected(){a(this,Zt).call(this)}};Qr=new WeakMap,Gt=new WeakMap,vt=new WeakMap,Zt=new WeakMap;var en,tn,bt,Jt,Je=class{constructor(e,r,n){f(this,en);f(this,tn);w(this,"proxyObject");f(this,bt);f(this,Jt,()=>{});g(this,en,e),g(this,tn,n),this.proxyObject=mo(r),g(this,bt,Wt(this.proxyObject)),e.addController(this)}get state(){return a(this,bt)}get value(){return a(this,bt)}hostConnected(){a(this,Jt).call(this),a(this,tn)?.subscribe&&g(this,Jt,mi(this.proxyObject,()=>{g(this,bt,Wt(this.proxyObject)),a(this,en).requestUpdate()}))}hostDisconnected(){a(this,Jt).call(this)}};en=new WeakMap,tn=new WeakMap,bt=new WeakMap,Jt=new WeakMap;var Xt,rn,Yt,xt,kt,gi=class{constructor(e,{provider:r,tag:n,key:i}){f(this,Xt);f(this,rn);f(this,Yt);f(this,xt,null);f(this,kt,null);g(this,Xt,e),g(this,rn,n),g(this,Yt,i),e.addController(this)}get value(){return a(this,kt)?a(this,kt).value:null}hostConnected(){if(a(this,kt)||(g(this,xt,mh(a(this,Xt),a(this,rn))),!a(this,xt)))return;let e=a(this,xt)[a(this,Yt)]instanceof Je?a(this,xt)[a(this,Yt)]:null;e&&g(this,kt,new Kt(a(this,Xt),e.proxyObject))}hostDisconnected(){}};Xt=new WeakMap,rn=new WeakMap,Yt=new WeakMap,xt=new WeakMap,kt=new WeakMap;function mh(t,e){let r=t;for(;r;){let n=r.closest(e);if(n)return n;let i=r.getRootNode();if(i instanceof ShadowRoot)r=i.host;else break}return null}var Il=()=>{if(window.Shopify)try{return{customerId:gh()}}catch{return null}return null},gh=()=>{try{let t=[()=>window.ShopifyAnalytics?.meta?.page?.customerId,()=>window.meta?.page?.customerId,()=>window._st?.cid,()=>window.ShopifyAnalytics?.lib?.user()?.traits()?.uniqToken];for(let e of t)try{let r=e();if(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i.test(r))continue;if(r)return r}catch{}}catch{return null}return null},Tl=async()=>{try{return(await(await fetch(window.Shopify.routes.root+"cart.js")).json()).items.map(n=>({id:n.id,name:n.title,quantity:n.quantity,price:n.price,variantId:n.variant_id,sku:n.sku,url:n.url,description:n.product_description,image:n.featured_image?.url}))}catch{return[]}};function Ol(t,e="http"){return t.startsWith("http://")||t.startsWith("https://")?t:`${e}://${t}`}function go(t){return new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+!*'();@&=,$]*)*(\\?[-a-z\\d%_.~+!*'();@&=,$]*)?(\\#[-a-z\\d%_.~+!*'();@&=,$]*)?$","i").test(t)}function Ll(t,e){let r=t instanceof URL?t:new URL(t);if(e)for(let[n,i]of e)r.searchParams.set(n,i);return r}var jl=()=>{if(window.ShopRenter)try{let t=yh();return{customerEmail:t?.customerEmail,customerId:t?.customerId,customerName:t?.customerName}}catch{return null}return null},yh=()=>{try{if(window.ShopRenter){let t=window.ShopRenter.customer;return{customerEmail:t?.email,customerId:t?.userId,customerName:[t?.name?.firstName,t?.name?.lastName].filter(Boolean).join(" ")}}return{customerEmail:null,customerId:null,customerName:null}}catch{return{customerEmail:null,customerId:null,customerName:null}}},Dl=async()=>{try{let t=window.ShopRenter.shop?.domain;if(!t)return[];let e=Ol(t,"https")+"/cart.json";return(await(await fetch(e)).json()).items.map(s=>({id:s.id,name:s.name,quantity:s.quantity,price:s.price,sku:s.sku,image:s.image,url:s.href}))}catch{return[]}};var Ul=()=>{if(window.UNAS)try{let t=window.UNAS.customer;return{customerEmail:t?.email,customerId:t?.id}}catch(t){return console.error("Error fetching customer information:",t),null}return null},Pl=async()=>new Promise((t,e)=>{try{window.UNAS.getCart(r=>{let i=r.items.map(s=>({id:s.id,name:s.name,quantity:s.quantity,price:s.price,sku:s.sku}));t(i)})}catch(r){console.error("Error fetching cart information:",r),e(r)}});var wo;function yo(t){return{lang:t?.lang??wo?.lang,message:t?.message,abortEarly:t?.abortEarly??wo?.abortEarly,abortPipeEarly:t?.abortPipeEarly??wo?.abortPipeEarly}}var xh;function kh(t){return xh?.get(t)}var Ch;function Sh(t){return Ch?.get(t)}var $h;function Eh(t,e){return $h?.get(t)?.get(e)}function Bl(t){let e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function me(t,e,r,n,i){let s=i&&"input"in i?i.input:r.value,o=i?.expected??t.expects??null,u=i?.received??Bl(s),l={kind:t.kind,type:t.type,input:s,expected:o,received:u,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${u}`,requirement:t.requirement,path:i?.path,issues:i?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=t.kind==="schema",p=i?.message??t.message??Eh(t.reference,l.lang)??(c?Sh(l.lang):null)??n.message??kh(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),c&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function ge(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},yo())}}}function _h(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Vl(t,e){let r=[...new Set(t)];return r.length>1?`(${r.join(` ${e} `)})`:r[0]??"never"}var Ah=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function vo(t,e){return{kind:"validation",type:"max_length",reference:vo,async:!1,expects:`<=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&me(this,"length",r,n,{received:`${r.value.length}`}),r}}}function bo(t,e){return{kind:"validation",type:"min_length",reference:bo,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&me(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Mh(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function Nl(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function xo(){return{kind:"schema",type:"any",reference:xo,expects:"any",async:!1,get"~standard"(){return ge(this)},"~run"(t){return t.typed=!0,t}}}function Qt(t,e){return{kind:"schema",type:"array",reference:Qt,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return ge(this)},"~run"(r,n){let i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let s=0;s<i.length;s++){let o=i[s],u=this.item["~run"]({value:o},n);if(u.issues){let l={type:"array",origin:"value",input:i,key:s,value:o};for(let c of u.issues)c.path?c.path.unshift(l):c.path=[l],r.issues?.push(c);if(r.issues||(r.issues=u.issues),n.abortEarly){r.typed=!1;break}}u.typed||(r.typed=!1),r.value.push(u.value)}}else me(this,"type",r,n);return r}}}function ko(t){return{kind:"schema",type:"boolean",reference:ko,expects:"boolean",async:!1,message:t,get"~standard"(){return ge(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:me(this,"type",e,r),e}}}function Co(t){return{kind:"schema",type:"null",reference:Co,expects:"null",async:!1,message:t,get"~standard"(){return ge(this)},"~run"(e,r){return e.value===null?e.typed=!0:me(this,"type",e,r),e}}}function wi(t){return{kind:"schema",type:"number",reference:wi,expects:"number",async:!1,message:t,get"~standard"(){return ge(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:me(this,"type",e,r),e}}}function Fe(t,e){return{kind:"schema",type:"object",reference:Fe,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return ge(this)},"~run"(r,n){let i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(let s in this.entries){let o=this.entries[s];if(s in i||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){let u=s in i?i[s]:Nl(o),l=o["~run"]({value:u},n);if(l.issues){let c={type:"object",origin:"value",input:i,key:s,value:u};for(let p of l.issues)p.path?p.path.unshift(c):p.path=[c],r.issues?.push(p);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value[s]=l.value}else if(o.fallback!==void 0)r.value[s]=Mh(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(me(this,"key",r,n,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:i,key:s,value:i[s]}]}),n.abortEarly))break}}else me(this,"type",r,n);return r}}}function er(t,e){return{kind:"schema",type:"optional",reference:er,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return ge(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Nl(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function So(t,e){return{kind:"schema",type:"picklist",reference:So,expects:Vl(t.map(Bl),"|"),async:!1,options:t,message:e,get"~standard"(){return ge(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:me(this,"type",r,n),r}}}function yi(t,e,r){return{kind:"schema",type:"record",reference:yi,expects:"Object",async:!1,key:t,value:e,message:r,get"~standard"(){return ge(this)},"~run"(n,i){let s=n.value;if(s&&typeof s=="object"){n.typed=!0,n.value={};for(let o in s)if(_h(s,o)){let u=s[o],l=this.key["~run"]({value:o},i);if(l.issues){let p={type:"object",origin:"key",input:s,key:o,value:u};for(let d of l.issues)d.path=[p],n.issues?.push(d);if(n.issues||(n.issues=l.issues),i.abortEarly){n.typed=!1;break}}let c=this.value["~run"]({value:u},i);if(c.issues){let p={type:"object",origin:"value",input:s,key:o,value:u};for(let d of c.issues)d.path?d.path.unshift(p):d.path=[p],n.issues?.push(d);if(n.issues||(n.issues=c.issues),i.abortEarly){n.typed=!1;break}}(!l.typed||!c.typed)&&(n.typed=!1),l.typed&&(n.value[l.value]=c.value)}}else me(this,"type",n,i);return n}}}function X(t){return{kind:"schema",type:"string",reference:X,expects:"string",async:!1,message:t,get"~standard"(){return ge(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:me(this,"type",e,r),e}}}function Rl(t){let e;if(t)for(let r of t)e?e.push(...r.issues):e=r.issues;return e}function tr(t,e){return{kind:"schema",type:"union",reference:tr,expects:Vl(t.map(r=>r.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return ge(this)},"~run"(r,n){let i,s,o;for(let u of this.options){let l=u["~run"]({value:r.value},n);if(l.typed)if(l.issues)s?s.push(l):s=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(s){if(s.length===1)return s[0];me(this,"type",r,n,{issues:Rl(s)}),r.typed=!0}else{if(o?.length===1)return o[0];me(this,"type",r,n,{issues:Rl(o)})}return r}}}function Fl(t,e,r){let n=t["~run"]({value:e},yo(r));if(n.issues)throw new Ah(n.issues);return n.value}function Hl(t,e){let r={};for(let n in t.entries)r[n]=!e||e.includes(n)?er(t.entries[n]):t.entries[n];return{...t,entries:r,get"~standard"(){return ge(this)}}}function zl(...t){return{...t[0],pipe:t,get"~standard"(){return ge(this)},"~run"(e,r){for(let n of t)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=n["~run"](e,r))}return e}}}function nn(t,e,r){let n=t["~run"]({value:e},yo(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var ql=yi(X(),tr([X(),wi(),ko(),Co()])),Wl=zl(X(),bo(1),vo(5e3)),Gl=()=>{try{return window.UNAS?Ul():window.Shopify?Il():window.ShopRenter?jl():null}catch{return null}},Zl=async()=>{try{return window.UNAS?await Pl():window.Shopify?await Tl():window.ShopRenter?await Dl():[]}catch{return[]}},rr={schema:Fe({conversationId:er(X()),messages:er(Qt(Fe({id:X(),timestamp:wi(),role:So(["user","assistant","support"]),content:X(),parts:er(Qt(tr([Fe({text:X()}),Fe({html:X()}),Fe({tag:X(),data:yi(X(),xo())})])))})))}),getStorageKey(t){if(!t)throw new Error("widgetId is not set");return`_molin_${t}`},persist(t,e,r){let n=this.getStorageKey(t);localStorage.setItem(n,JSON.stringify({conversationId:e,messages:r}))},restore(t){try{let e=this.getStorageKey(t),r=JSON.parse(localStorage.getItem(e)||"{}"),n=Fl(this.schema,r);return{conversationId:n.conversationId||"",messages:n.messages||[]}}catch(e){return console.error("Failed to restore conversation state:",e),{conversationId:"",messages:[]}}},reset(t){let e=this.getStorageKey(t);localStorage.removeItem(e)}};var D,Kl,sn,on,nr,R,Jl,bi=class bi extends ${constructor(){super();f(this,D);w(this,"contextCtrl");f(this,sn);f(this,on);f(this,nr,null);this.widgetId="",this.config={},this.callbacks={},this.xUserData=void 0,this.xCustomInstructions=void 0,this.autoConnect=!0,this.contextCtrl=new Je(this,{config:this.config,callbacks:this.callbacks,xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,widgetId:this.widgetId,conversationId:"",messages:[],isStreaming:!1,typingIndicator:void 0,ranOutOfCredits:!1,isLiveMode:!1,lastMsg:void 0,hasQueuedMessages:!1,sendUserInput:this.sendUserInput.bind(this),sendUserCancel:this.sendUserCancel.bind(this),sendUserTypingStart:this.sendUserTypingStart.bind(this),sendUserTypingStop:this.sendUserTypingStop.bind(this),reset:this.reset.bind(this),reloadConfig:this.reloadConfig.bind(this),enqueueUserInput:this.enqueueUserInput.bind(this),connect:this.connect.bind(this),sendImageDelete:a(this,D,R).sendImageDelete.bind(a(this,D,R))})}connectedCallback(){super.connectedCallback(),this.updated()}updated(){this.autoConnect&&a(this,D,R).connect(),Object.assign(this.contextCtrl.proxyObject,{widgetId:this.widgetId,config:this.config,callbacks:this.callbacks,xUserData:a(this,sn),xCustomInstructions:a(this,on),conversationId:a(this,D,R).conversationId,messages:a(this,D,Kl),isStreaming:a(this,D,R).isStreaming,typingIndicator:a(this,D,R).typingIndicator,ranOutOfCredits:a(this,D,R).ranOutOfCredits,isLiveMode:a(this,D,R).isLiveMode,lastMsg:a(this,D,R).lastMsg,hasQueuedMessages:a(this,D,R).hasQueuedMessages,sendUserInput:this.sendUserInput.bind(this),sendUserCancel:this.sendUserCancel.bind(this),sendUserTypingStart:this.sendUserTypingStart.bind(this),sendUserTypingStop:this.sendUserTypingStop.bind(this),reset:this.reset.bind(this),reloadConfig:this.reloadConfig.bind(this),enqueueUserInput:this.enqueueUserInput.bind(this),connect:this.connect.bind(this),sendImageDelete:a(this,D,R).sendImageDelete.bind(a(this,D,R))}),m(this,D,Jl).call(this)}sendUserInput(r,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,...n},s=a(this,D,R).sendUserInput(r,i);return s&&this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:r,example:!1,conversationId:a(this,D,R).conversationId}),s}async enqueueUserInput(r,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,role:"user",expectStreaming:!0,...n};return a(this,D,R).enqueueUserInput(r,i)}sendUserCancel(){a(this,D,R).sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}sendUserTypingStart(){a(this,D,R).sendUserTypingStart()}sendUserTypingStop(){a(this,D,R).sendUserTypingStop()}reset(){a(this,D,R).reset()}reloadConfig(){a(this,D,R).reloadConfig()}connect(){a(this,D,R).connect()}render(){return h`<slot></slot>`}};D=new WeakSet,Kl=function(){return a(this,D,R)?.ranOutOfCredits?[{id:crypto.randomUUID(),role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}]:a(this,D,R)?.messages||[]},sn=new WeakMap,on=new WeakMap,nr=new WeakMap,R=function(){return a(this,nr)||g(this,nr,new di(this,{autoConnect:this.autoConnect,url:r=>{let n=new URL(this.config.wsApiUrl);return n.searchParams.set("widgetId",this.widgetId),n.searchParams.set("conversationId",r),n.searchParams.set("pageUrl",window.location.href),n},onReconnect:()=>{},onError:r=>{console.error("ws error",r)},onClose:()=>{},onNewMessage:r=>{r.role==="assistant"&&this.callbacks.onNewMessageStartedStreaming?.({widgetId:this.widgetId,message:r,conversationId:a(this,D,R).conversationId})},onMessageAppend:r=>{},onMessageDone:(r,n)=>{n.role==="assistant"&&this.callbacks.onMessageEndedStreaming?.({widgetId:this.widgetId,text:n.content??"",message:n,usage_TOKENS_COMPLETION:r.message.usage.TOKENS_COMPLETION,conversationId:a(this,D,R).conversationId})},onMessageError:r=>{console.error("ws message error",r),r.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+r.message})},onReset:()=>{rr.reset(this.widgetId)},onConnect:(r,n)=>{let i=Gl();a(this,D,R).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:i,language:window.navigator.language,cart:[]}),Zl().then(s=>{s?.length>0&&a(this,D,R).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:i,cart:s,language:window.navigator.language})}).catch(s=>{console.error(s)}),this.dispatchEvent(new bi.ConnectedEvent({conversationId:r,metadata:n,widgetId:this.widgetId,pendingImages:n?.pendingImages||[]}))},persistConversationState:(r,n)=>{rr.persist(this.widgetId,r,n)},restoreConversationState:()=>rr.restore(this.widgetId)})),a(this,nr)},Jl=function(){function r(i){if(!i)return;let s;try{s=typeof i=="object"?i:JSON.parse(i)}catch(u){console.error("Molin: user-data is not valid JSON",u);return}if(!s||typeof s!="object"||Object.keys(s).length===0)return;let o=nn(ql,s);if(!o.success){console.error("Molin: user-data does not pass schema validation",o.issues);return}return o.output}function n(i){if(!i)return;let s=nn(Wl,i);if(!s.success){console.error("Molin: custom-instructions does not pass schema validation",s.issues);return}return s.output}g(this,sn,r(this.xUserData)),g(this,on,n(this.xCustomInstructions))},w(bi,"properties",{widgetId:{type:String},config:{type:Object},callbacks:{type:Object},xUserData:{type:Object},xCustomInstructions:{type:Object},autoConnect:{type:Boolean}});var ir=bi;function Xl(t){let e=new gi(t,{provider:ir,tag:"mw-context-widget",key:"contextCtrl"});return new Proxy({value:null},{get(r,n){if(n==="value")return e.value}})}var $o;ir.ConnectedEvent=($o=class extends CustomEvent{constructor(e,r={}){super(ir.ConnectedEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}},w($o,"type","mw-context-widget:connected"),$o);customElements.get("mw-context-widget")||customElements.define("mw-context-widget",ir);function Do(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function Ih(t,e=","){return t.map(Do).join(e)}var ic=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function xi(t){for(var e=9,r=t.length;r--;)e=Math.imul(e^t.charCodeAt(r),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function Si(t,e="@media "){return e+B(t).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(n=>`(${n}-width:${r[n]})`).join(" and "))).join(",")}function B(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function Yl(t){return t}function $i(){}var te={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function sc(t){return t.match(/[-=:;]/g)?.length||0}function Io(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(sc(t),15)<<18}var Th=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function Uo({n:t,i:e,v:r=[]},n,i,s){t&&(t=Do({n:t,i:e,v:r})),s=[...B(s)];for(let u of r){let l=n.theme("screens",u);for(let c of B(l&&Si(l)||n.v(u))){var o;s.push(c),i|=l?67108864|Io(c):u=="dark"?1073741824:c[0]=="@"?Io(c):(o=c,1<<~(/:([a-z-]+)/.test(o)&&~Th.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:i,r:s,i:e}}var oc=new Map;function To(t){if(t.d){let e=[],r=Eo(t.r.reduce((n,i)=>i[0]=="@"?(e.push(i),n):i?Eo(n,s=>Eo(i,o=>{let u=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(u){let l=s.indexOf(u[1]);return~l?s.slice(0,l)+u[0]+s.slice(l+u[1].length):_o(s,o)}return _o(o,s)})):n,"&"),n=>_o(n,t.n?"."+ic(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((n,i)=>i+"{"+n+"}",t.d)}}function Eo(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,n,i)=>e(n)+i)}function _o(t,e){return t.replace(/&/g,e)}var Ql=new Intl.Collator("en",{numeric:!0});function ac(t,e){for(var r=0,n=t.length;r<n;){let i=n+r>>1;0>=lc(t[i],e)?r=i+1:n=i}return n}function lc(t,e){let r=t.p&te.o;return r==(e.p&te.o)&&(r==te.b||r==te.o)?0:t.p-e.p||t.o-e.o||Ql.compare(ec(t.n),ec(e.n))||Ql.compare(tc(t.n),tc(e.n))}function ec(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function tc(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function Ao(t,e){return Math.round(parseInt(t,16)*e)}function xe(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:r="1",opacityVariable:n}=e,i=n?`var(${n})`:r;if(t.includes("<alpha-value>"))return t.replace("<alpha-value>",i);if(t[0]=="#"&&(t.length==4||t.length==7)){let s=(t.length-1)/3,o=[17,1,.062272][s-1];return`rgba(${[Ao(t.substr(1,s),o),Ao(t.substr(1+s,s),o),Ao(t.substr(1+2*s,s),o),i]})`}return i=="1"?t:i=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function cc(t,e,r,n,i=[]){return(function s(o,{n:u,p:l,r:c=[],i:p},d){let y=[],x="",S=0,M=0;for(let k in o||{}){var C,I;let _=o[k];if(k[0]=="@"){if(!_)continue;if(k[1]=="a"){y.push(...Ro(u,l,Ci(""+_),d,l,c,p,!0));continue}if(k[1]=="l"){for(let O of B(_))y.push(...s(O,{n:u,p:(C=te[k[7]],l&~te.o|C),r:k[7]=="d"?[]:c,i:p},d));continue}if(k[1]=="i"){y.push(...B(_).map(O=>({p:-1,o:0,r:[],d:k+" "+O})));continue}if(k[1]=="k"){y.push({p:te.d,o:0,r:[k],d:s(_,{p:te.d},d).map(To).join("")});continue}if(k[1]=="f"){y.push(...B(_).map(O=>({p:te.d,o:0,r:[k],d:s(O,{p:te.d},d).map(To).join("")})));continue}}if(typeof _!="object"||Array.isArray(_))k=="label"&&_?u=_+xi(JSON.stringify([l,p,o])):(_||_===0)&&(k=k.replace(/[A-Z]/g,O=>"-"+O.toLowerCase()),M+=1,S=Math.max(S,(I=k)[0]=="-"?0:sc(I)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(I)?+!!RegExp.$1||-!!RegExp.$2:0)+1),x+=(x?";":"")+B(_).map(O=>d.s(k,Po(""+O,d.theme)+(p?" !important":""))).join(";"));else if(k[0]=="@"||k.includes("&")){let O=l;k[0]=="@"&&(k=k.replace(/\bscreen\(([^)]+)\)/g,(H,Q)=>{let ne=d.theme("screens",Q);return ne?(O|=67108864,Si(ne,"")):H}),O|=Io(k)),y.push(...s(_,{n:u,p:O,r:[...c,k],i:p},d))}else y.push(...s(_,{p:l,r:[...c,k]},d))}return y.unshift({n:u,p:l,o:Math.max(0,15-M)+1.5*Math.min(S||15,15),r:c,d:x}),y.sort(lc)})(t,Uo(e,r,n,i),r)}function Po(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,n,i,s,o="")=>{let u=e(i,o);return typeof u=="function"&&/color|fill|stroke/i.test(i)?xe(u):""+B(u).filter(l=>Object(l)!==l)})}function uc(t,e){let r,n=[];for(let i of t)i.d&&i.n?r?.p==i.p&&""+r.r==""+i.r?(r.c=[r.c,i.c].filter(Boolean).join(" "),r.d=r.d+";"+i.d):n.push(r={...i,n:i.n&&e}):n.push({...i,n:i.n&&e});return n}function ki(t,e,r=te.u,n,i){let s=[];for(let o of t)for(let u of(function(l,c,p,d,y){l={...l,i:l.i||y};let x=(function(S,M){let C=oc.get(S.n);return C?C(S,M):M.r(S.n,S.v[0]=="dark")})(l,c);return x?typeof x=="string"?({r:d,p}=Uo(l,c,p,d),uc(ki(Ci(x),c,p,d,l.i),l.n)):Array.isArray(x)?x.map(S=>{var M,C;return{o:0,...S,r:[...B(d),...B(S.r)],p:(M=p,C=S.p??p,M&~te.o|C)}}):cc(x,l,c,p,d):[{c:Do(l),p:0,o:0,r:[]}]})(o,e,r,n,i))s.splice(ac(s,u),0,u);return s}function Ro(t,e,r,n,i,s,o,u){return uc((u?r.flatMap(l=>ki([l],n,i,s,o)):ki(r,n,i,s,o)).map(l=>l.p&te.o&&(l.n||e==te.b)?{...l,p:l.p&~te.o|e,o:0}:l),t)}function Oh(t,e,r,n){var i;return i=(s,o)=>{let{n:u,p:l,r:c,i:p}=Uo(s,o,e);return r&&Ro(u,e,r,o,l,c,p,n)},oc.set(t,i),t}function Mo(t,e,r){if(t[t.length-1]!="("){let n=[],i=!1,s=!1,o="";for(let u of t)if(!(u=="("||/[~@]$/.test(u))){if(u[0]=="!"&&(u=u.slice(1),i=!i),u.endsWith(":")){n[u=="dark:"?"unshift":"push"](u.slice(0,-1));continue}u[0]=="-"&&(u=u.slice(1),s=!s),u.endsWith("-")&&(u=u.slice(0,-1)),u&&u!="&"&&(o+=(o&&"-")+u)}o&&(s&&(o="-"+o),e[0].push({n:o,v:n.filter(Lh),i}))}}function Lh(t,e,r){return r.indexOf(t)==e}var rc=new Map;function Ci(t){let e=rc.get(t);if(!e){let r=[],n=[[]],i=0,s=0,o=null,u=0,l=(c,p=0)=>{i!=u&&(r.push(t.slice(i,u+p)),c&&Mo(r,n)),i=u+1};for(;u<t.length;u++){let c=t[u];if(s)t[u-1]!="\\"&&(s+=+(c=="[")||-(c=="]"));else if(c=="[")s+=1;else if(o)t[u-1]!="\\"&&o.test(t.slice(u))&&(o=null,i=u+RegExp.lastMatch.length);else if(c=="/"&&t[u-1]!="\\"&&(t[u+1]=="*"||t[u+1]=="/"))o=t[u+1]=="*"?/^\*\//:/^[\r\n]/;else if(c=="(")l(),r.push(c);else if(c==":")t[u+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(c)){l(!0);let p=r.lastIndexOf("(");if(c==")"){let d=r[p-1];if(/[~@]$/.test(d)){let y=n.shift();r.length=p,Mo([...r,"#"],n);let{v:x}=n[0].pop();for(let S of y)S.v.splice(+(S.v[0]=="dark")-+(x[0]=="dark"),x.length);Mo([...r,Oh(d.length>1?d.slice(0,-1)+xi(JSON.stringify([d,y])):d+"("+Ih(y)+")",te.a,y,/@$/.test(d))],n)}p=r.lastIndexOf("(",p-1)}r.length=p+1}else/[~@]/.test(c)&&t[u+1]=="("&&n.unshift([])}l(!0),rc.set(t,e=n[0])}return e}function v(t,e,r){return[t,Oo(e,r)]}function Oo(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,n)=>({[t]:e?e(r,n):Lo(r,1)}):r=>t||{[r[1]]:Lo(r,2)}}function Lo(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function b(t,e,r,n){return[t,Bo(e,r,n)]}function Bo(t,e,r){let n=typeof e=="string"?(i,s)=>({[e]:r?r(i,s):i._}):e||(({1:i,_:s},o,u)=>({[i||u]:s}));return(i,s)=>{let o=pc(t||i[1]),u=s.theme(o,i.$$)??Le(i.$$,o,s);if(u!=null)return i._=Lo(i,0,u),n(i,s,o)}}function re(t,e={},r){return[t,jh(e,r)]}function jh(t={},e){return(r,n)=>{let{section:i=pc(r[0]).replace("-","")+"Color"}=t,[s,o]=Dh(r.$$);if(!s)return;let u=n.theme(i,s)||Le(s,i,n);if(!u||typeof u=="object")return;let{opacityVariable:l=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:c=i.replace("Color","Opacity"),property:p=i,selector:d}=t,y=n.theme(c,o||"DEFAULT")||o&&Le(o,c,n),x=e||(({_:M})=>{let C=an(p,M);return d?{[d]:C}:C});r._={value:xe(u,{opacityVariable:l||void 0,opacityValue:y||void 0}),color:M=>xe(u,M),opacityVariable:l||void 0,opacityValue:y||void 0};let S=x(r,n);if(!r.dark){let M=n.d(i,s,u);M&&M!==u&&(r._={value:xe(M,{opacityVariable:l||void 0,opacityValue:y||"1"}),color:C=>xe(M,C),opacityVariable:l||void 0,opacityValue:y||void 0},S={"&":S,[n.v("dark")]:x(r,n)})}return S}}function Dh(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function an(t,e){let r={};return typeof e=="string"?r[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(r[e.opacityVariable]=e.opacityValue||"1"),r[t]=e.value),r}function Le(t,e,r){if(t[0]=="["&&t.slice(-1)=="]"){if(t=sr(Po(t.slice(1,-1),r.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function pc(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function sr(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",n,i="")=>sr(r)+n+sr(i)):t.replace(/(^|[^\\])_+/g,(e,r)=>r+" ".repeat(e.length-r.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function Vo({presets:t=[],...e}){let r={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:B(e.variants),rules:B(e.rules),ignorelist:B(e.ignorelist),hash:void 0,stringify:(n,i)=>n+":"+i,finalize:[]};for(let n of B([...t,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&B(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:i,darkMode:s=r.darkMode,darkColor:o=r.darkColor,theme:u,variants:l,rules:c,ignorelist:p,hash:d=r.hash,stringify:y=r.stringify,finalize:x}=typeof n=="function"?n(r):n;r={preflight:r.preflight!==!1&&i!==!1&&[...r.preflight,...B(i)],darkMode:s,darkColor:o,theme:{...r.theme,...u,extend:{...r.theme.extend,...u?.extend}},variants:[...r.variants,...B(l)],rules:[...r.rules,...B(c)],ignorelist:[...r.ignorelist,...B(p)],hash:d,stringify:y,finalize:[...r.finalize,...B(x)]}}return r}function nc(t,e,r,n,i,s){for(let o of e){let u=r.get(o);u||r.set(o,u=n(o));let l=u(t,i,s);if(l)return l}}function Uh(t){var e;return jo(t[0],typeof(e=t[1])=="function"?e:()=>e)}function Ph(t){var e,r;return Array.isArray(t)?jo(t[0],Oo(t[1],t[2])):jo(t,Oo(e,r))}function jo(t,e){return hc(t,(r,n,i,s)=>{let o=n.exec(r);if(o)return o.$$=r.slice(o[0].length),o.dark=s,e(o,i)})}function hc(t,e){let r=B(t).map(Rh);return(n,i,s)=>{for(let o of r){let u=e(n,o,i,s);if(u)return u}}}function Rh(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function dc(t,e){let r=Vo(t),n=(function({theme:l,darkMode:c,darkColor:p=$i,variants:d,rules:y,hash:x,stringify:S,ignorelist:M,finalize:C}){let I=new Map,k=new Map,_=new Map,O=new Map,H=hc(M,(P,ie)=>ie.test(P));d.push(["dark",Array.isArray(c)||c=="class"?`${B(c)[1]||".dark"} &`:typeof c=="string"&&c!="media"?c:"@media (prefers-color-scheme:dark)"]);let Q=typeof x=="function"?P=>x(P,xi):x?xi:Yl;Q!==Yl&&C.push(P=>({...P,n:P.n&&Q(P.n),d:P.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(ie,he)=>"--"+Q(he).replace("#",""))}));let ne={theme:(function({extend:P={},...ie}){let he={},Ns={get colors(){return ut("colors")},theme:ut,negative(){return{}},breakpoints(Z){let se={};for(let fe in Z)typeof Z[fe]=="string"&&(se["screen-"+fe]=Z[fe]);return se}};return ut;function ut(Z,se,fe,Vr){if(Z){if({1:Z,2:Vr}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(Z)||[,Z],/[.[]/.test(Z)){let Re=[];Z.replace(/\[([^\]]+)\]|([^.[]+)/g,(ht,Fr,Bp=Fr)=>Re.push(Bp)),Z=Re.shift(),fe=se,se=Re.join("-")}let Oe=he[Z]||Object.assign(Object.assign(he[Z]={},ei(ie,Z)),ei(P,Z));if(se==null)return Oe;se||(se="DEFAULT");let pt=Oe[se]??se.split("-").reduce((Re,ht)=>Re?.[ht],Oe)??fe;return Vr?xe(pt,{opacityValue:Po(Vr,ut)}):pt}let Nr={};for(let Oe of[...Object.keys(ie),...Object.keys(P)])Nr[Oe]=ut(Oe);return Nr}function ei(Z,se){let fe=Z[se];return typeof fe=="function"&&(fe=fe(Ns)),fe&&/color|fill|stroke/i.test(se)?(function Vr(Nr,Oe=[]){let pt={};for(let Re in Nr){let ht=Nr[Re],Fr=[...Oe,Re];pt[Fr.join("-")]=ht,Re=="DEFAULT"&&(Fr=Oe,pt[Oe.join("-")]=ht),typeof ht=="object"&&Object.assign(pt,Vr(ht,Fr))}return pt})(fe):fe}})(l),e:ic,h:Q,s(P,ie){return S(P,ie,ne)},d(P,ie,he){return p(P,ie,ne,he)},v(P){return I.has(P)||I.set(P,nc(P,d,k,Uh,ne)||"&:"+P),I.get(P)},r(P,ie){let he=JSON.stringify([P,ie]);return _.has(he)||_.set(he,!H(P,ne)&&nc(P,y,O,Ph,ne,ie)),_.get(he)},f(P){return C.reduce((ie,he)=>he(ie,ne),P)}};return ne})(r),i=new Map,s=[],o=new Set;e.resume(l=>i.set(l,l),(l,c)=>{e.insert(l,s.length,c),s.push(c),o.add(l)});function u(l){let c=n.f(l),p=To(c);if(p&&!o.has(p)){o.add(p);let d=ac(s,l);e.insert(p,d,l),s.splice(d,0,l)}return c.n}return Object.defineProperties(function(c){if(!i.size)for(let d of B(r.preflight))typeof d=="function"&&(d=d(n)),d&&(typeof d=="string"?Ro("",te.b,Ci(d),n,te.b,[],!1,!0):cc(d,{},n,te.b)).forEach(u);c=""+c;let p=i.get(c);if(!p){let d=new Set;for(let y of ki(Ci(c),n))d.add(y.c).add(u(y));p=[...d].filter(Boolean).join(" "),i.set(c,p).set(p,p)}return p},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:n.theme,config:r,snapshot(){let l=e.snapshot(),c=new Set(o),p=new Map(i),d=[...s];return()=>{l(),o=c,i=p,s=d}},clear(){e.clear(),o=new Set,i=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function Bh(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function fc(t){let e=new MutationObserver(r);return{observe(i){e.observe(i,{attributeFilter:["class"],subtree:!0,childList:!0}),n(i),r([{target:i,type:""}])},disconnect(){e.disconnect()}};function r(i){for(let{type:s,target:o}of i)if(s[0]=="a")n(o);else for(let u of o.querySelectorAll("[class]"))n(u);e.takeRecords()}function n(i){let s,o=i.getAttribute?.("class");o&&Bh(o,s=t(o))&&i.setAttribute("class",s)}}function Vh(t){let e=document.querySelector(t||'style[data-twind=""]');return(!e||e.tagName!="STYLE")&&(e=document.createElement("style"),document.head.prepend(e)),e.dataset.twind="claimed",e}function Ei(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:Vh(t)).sheet;return{target:e,snapshot(){let r=Array.from(e.cssRules,n=>n.cssText);return()=>{this.clear(),r.forEach(this.insert)}},clear(){for(let r=e.cssRules.length;r--;)e.deleteRule(r)},destroy(){e.ownerNode?.remove()},insert(r,n){try{e.insertRule(r,n)}catch{e.insertRule(":root{}",n)}},resume:$i}}var Nh=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function mc(t){return Nh.get(t)}function gc(t){var e=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(t);return e?e[1]?1:e[2]?2:e[3]?3:5:0}function wc(t,e){var r=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(t);return r?r[1]?/^sti/i.test(e)?1:0:r[2]?/^pat/i.test(e)?1:0:r[3]?/^image-/i.test(e)?1:0:r[4]?e[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(e)?4:0:0}var Fh=[["-webkit-",1],["-moz-",2],["-ms-",4]];function yc(){return({stringify:t})=>({stringify(e,r,n){let i="",s=mc(e);s&&(i+=t(s,r,n)+";");let o=gc(e),u=wc(e,r);for(let l of Fh)o&l[1]&&(i+=t(l[0]+e,r,n)+";"),u&l[1]&&(i+=t(e,l[0]+r,n)+";");return i+t(e,r,n)}})}function bc(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",Bo("lineClamp",({_:t})=>vc(t))],["line-clamp-(\\d+)",({1:t})=>vc(t)]]}}function vc(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var cn={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...we(4,"rem",4,.5,.5),...we(12,"rem",4,5),14:"3.5rem",...we(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:U("blur"),backdropBrightness:U("brightness"),backdropContrast:U("contrast"),backdropGrayscale:U("grayscale"),backdropHueRotate:U("hueRotate"),backdropInvert:U("invert"),backdropOpacity:U("opacity"),backdropSaturate:U("saturate"),backdropSepia:U("sepia"),backgroundColor:U("colors"),backgroundImage:{none:"none"},backgroundOpacity:U("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...we(200,"",100,0,50),...we(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:U("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:U("spacing"),borderWidth:{DEFAULT:"1px",...ke(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:U("colors"),caretColor:U("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...we(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:U("borderColor"),divideOpacity:U("borderOpacity"),divideWidth:U("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:t})=>({...t("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({...t("spacing"),...ln(2,6),...ln(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:U("spacing"),gradientColorStops:U("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:t})=>({...t("spacing"),...ln(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...ln(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...we(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...we(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:U("spacing"),placeholderColor:U("colors"),placeholderOpacity:U("opacity"),outlineColor:U("colors"),outlineOffset:ke(8,"px"),outlineWidth:ke(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:U("colors"),ringOffsetWidth:ke(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...ke(8,"px")},rotate:{...ke(2,"deg"),...ke(12,"deg",3),...ke(180,"deg",45)},saturate:we(200,"",100,0,50),scale:{...we(150,"",100,0,50),...we(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:U("spacing"),scrollPadding:U("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...ke(2,"deg"),...ke(12,"deg",3)},space:U("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:we(2),textColor:U("colors"),textDecorationColor:U("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...ke(8,"px")},textUnderlineOffset:{auto:"auto",...ke(8,"px")},textIndent:U("spacing"),textOpacity:U("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:U("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:t})=>({...t("spacing"),...ln(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...we(50,"",1,0,10),auto:"auto"}};function ln(t,e){let r={};do for(var n=1;n<t;n++)r[`${n}/${t}`]=Number((n/t*100).toFixed(6))+"%";while(++t<=e);return r}function ke(t,e,r=0){let n={};for(;r<=t;r=2*r||1)n[r]=r+e;return n}function we(t,e="",r=1,n=0,i=1,s={}){for(;n<=t;n+=i)s[n]=n/r+e;return s}function U(t){return({theme:e})=>e(t)}var xc={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${cn.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${cn.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}};var _c=[v("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:Le(`[${e}]`,"",r)}}})),v("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),b("aspect-","aspectRatio"),v("container",(t,{theme:e})=>{let{screens:r=e("screens"),center:n,padding:i}=e("container"),s={width:"100%",marginRight:n&&"auto",marginLeft:n&&"auto",...o("xs")};for(let u in r){let l=r[u];typeof l=="string"&&(s[Si(l)]={"&":{maxWidth:l,...o(u)}})}return s;function o(u){let l=i&&(typeof i=="string"?i:i[u]||i.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),b("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),v("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),v("box-(border|content)","boxSizing",({1:t})=>t+"-box"),v("hidden",{display:"none"}),v("table-(auto|fixed)","tableLayout"),v(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",v("isolate","isolation"),v("object-(contain|cover|fill|none|scale-down)","objectFit"),b("object-","objectPosition"),v("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",_i),v("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),v("(static|fixed|absolute|relative|sticky)","position"),b("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),b("-?(top|bottom|left|right)(?:$|-)","inset"),v("(visible|collapse)","visibility"),v("invisible",{visibility:"hidden"}),b("-?z-","zIndex"),v("flex-((row|col)(-reverse)?)","flexDirection",kc),v("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),b("(flex-(?:grow|shrink))(?:$|-)"),b("(flex)-"),b("grow(?:$|-)","flexGrow"),b("shrink(?:$|-)","flexShrink"),b("basis-","flexBasis"),b("-?(order)-"),"-?(order)-(\\d+)",b("grid-cols-","gridTemplateColumns"),v("grid-cols-(\\d+)","gridTemplateColumns",Ec),b("col-","gridColumn"),v("col-(span)-(\\d+)","gridColumn",$c),b("col-start-","gridColumnStart"),v("col-start-(auto|\\d+)","gridColumnStart"),b("col-end-","gridColumnEnd"),v("col-end-(auto|\\d+)","gridColumnEnd"),b("grid-rows-","gridTemplateRows"),v("grid-rows-(\\d+)","gridTemplateRows",Ec),b("row-","gridRow"),v("row-(span)-(\\d+)","gridRow",$c),b("row-start-","gridRowStart"),v("row-start-(auto|\\d+)","gridRowStart"),b("row-end-","gridRowEnd"),v("row-end-(auto|\\d+)","gridRowEnd"),v("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>_i(kc(t))),v("grid-flow-(dense)","gridAutoFlow"),b("auto-cols-","gridAutoColumns"),b("auto-rows-","gridAutoRows"),b("gap-x(?:$|-)","gap","columnGap"),b("gap-y(?:$|-)","gap","rowGap"),b("gap(?:$|-)","gap"),"(justify-(?:items|self))-",v("justify-","justifyContent",Cc),v("(content|items|self)-",t=>({["align-"+t[1]]:Cc(t)})),v("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),b("p([xytrbl])?(?:$|-)","padding",or("padding")),b("-?m([xytrbl])?(?:$|-)","margin",or("margin")),b("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),v("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),b("w-","width"),b("min-w-","minWidth"),b("max-w-","maxWidth"),b("h-","height"),b("min-h-","minHeight"),b("max-h-","maxHeight"),b("font-","fontWeight"),b("font-","fontFamily",({_:t})=>typeof(t=B(t))[1]=="string"?{fontFamily:Me(t)}:{fontFamily:Me(t[0]),...t[1]}),v("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),v("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),v("italic","fontStyle"),v("not-italic",{fontStyle:"normal"}),v("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:r})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(r?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...Xe({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),b("tracking-","letterSpacing"),b("leading-","lineHeight"),v("list-(inside|outside)","listStylePosition"),b("list-","listStyleType"),v("list-","listStyleType"),b("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),re("placeholder-",{property:"color",selector:"&::placeholder"}),v("text-(left|center|right|justify|start|end)","textAlign"),v("text-(ellipsis|clip)","textOverflow"),b("text-opacity-","textOpacity","--tw-text-opacity"),re("text-",{property:"color"}),b("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),b("indent-","textIndent"),v("(overline|underline|line-through)","textDecorationLine"),v("no-underline",{textDecorationLine:"none"}),b("underline-offset-","textUnderlineOffset"),re("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),b("decoration-","textDecorationThickness"),v("decoration-","textDecorationStyle"),v("(uppercase|lowercase|capitalize)","textTransform"),v("normal-case",{textTransform:"none"}),v("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),v("align-","verticalAlign"),v("whitespace-","whiteSpace"),v("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),v("break-words",{overflowWrap:"break-word"}),v("break-all",{wordBreak:"break-all"}),v("break-keep",{wordBreak:"keep-all"}),re("caret-",{opacityVariable:!1,opacitySection:"opacity"}),re("accent-",{opacityVariable:!1,opacitySection:"opacity"}),v("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${Ct(t," ")},var(--tw-gradient-stops))`),re("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),re("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),re("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),v("bg-(fixed|local|scroll)","backgroundAttachment"),v("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),v(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),v("bg-blend-","backgroundBlendMode"),v("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),b("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),re("bg-",{section:"backgroundColor"}),b("bg-","backgroundImage"),b("bg-","backgroundPosition"),v("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",_i),b("bg-","backgroundSize"),b("rounded(?:$|-)","borderRadius"),b("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let r={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${Ct(r[0])}-radius`]:e,[`border-${Ct(r[1])}-radius`]:e}}),v("border-(collapse|separate)","borderCollapse"),b("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),v("border-(solid|dashed|dotted|double|none)","borderStyle"),b("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...Xe({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),re("border-([xytrbl])-",{section:"borderColor"},or("border","Color")),re("border-"),b("border-([xytrbl])(?:$|-)","borderWidth",or("border","Width")),b("border(?:$|-)","borderWidth"),b("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),v("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),v("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),b("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${Ct(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${Ct(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),re("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),b("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),re("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),b("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),v("ring-inset",{"--tw-ring-inset":"inset"}),re("ring-",{property:"--tw-ring-color"}),b("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...Xe({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":xe(e("ringOffsetColor","","#fff")),"--tw-ring-color":xe(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),re("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),b("shadow(?:$|-)","boxShadow",({_:t})=>({...Xe({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":Me(t),"--tw-shadow-colored":Me(t).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),b("(opacity)-"),v("mix-blend-","mixBlendMode"),...Sc(),...Sc("backdrop-"),b("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:Me(t),transitionTimingFunction:t._=="none"?void 0:Me(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:Me(e("transitionDuration",""))})),b("duration(?:$|-)","transitionDuration","transitionDuration",Me),b("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",Me),b("delay(?:$|-)","transitionDelay","transitionDelay",Me),b("animate(?:$|-)","animation",(t,{theme:e,h:r,e:n})=>{let i=Me(t),s=i.split(" "),o=e("keyframes",s[0]);return o?{["@keyframes "+(s[0]=n(r(s[0])))]:o,animation:s.join(" ")}:{animation:i}}),"(transform)-(none)",v("transform",Fo),v("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":Ac(t=="gpu")})),b("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...Fo()})),b("-?(rotate)-","rotate",No),b("-?(translate-[xy])-","translate",No),b("-?(skew-[xy])-","skew",No),v("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",_i),"(appearance)-",b("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",b("(cursor)-"),"(cursor)-",v("snap-(none)","scroll-snap-type"),v("snap-(x|y|both)",({1:t})=>({...Xe({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),v("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),v("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),v("snap-(normal|always)","scroll-snap-stop"),v("scroll-(auto|smooth)","scroll-behavior"),b("scroll-p([xytrbl])?(?:$|-)","padding",or("scroll-padding")),b("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",or("scroll-margin")),v("touch-(auto|none|manipulation)","touch-action"),v("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:r})=>({...Xe({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":r?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),v("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),v("outline",{outlineStyle:"solid"}),v("outline-(dashed|dotted|double)","outlineStyle"),b("-?(outline-offset)-"),re("outline-",{opacityVariable:!1,opacitySection:"opacity"}),b("outline-","outlineWidth"),"(pointer-events)-",b("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],v("select-(none|text|all|auto)","userSelect"),re("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),re("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),b("stroke-","strokeWidth"),v("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),v("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function _i(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function kc(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function Ct(t,e="-"){let r=[];for(let n of t)r.push({t:"top",r:"right",b:"bottom",l:"left"}[n]);return r.join(e)}function Me(t){return t&&""+(t._||t)}function Cc({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function or(t,e=""){return({1:r,_:n})=>{let i={x:"lr",y:"tb"}[r]||r+r;return i?{...an(t+"-"+Ct(i[0])+e,n),...an(t+"-"+Ct(i[1])+e,n)}:an(t+e,n)}}function Sc(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),r={};for(let n of e)r[`--tw-${t}${n}`]="var(--tw-empty,/*!*/ /*!*/)";return r={...Xe(r),[`${t}filter`]:e.map(n=>`var(--tw-${t}${n})`).join(" ")},[`(${t}filter)-(none)`,v(`${t}filter`,r),...e.map(n=>b(`${n[0]=="h"?"-?":""}(${t}${n})(?:$|-)`,n,({1:i,_:s})=>({[`--tw-${i}`]:B(s).map(o=>`${n}(${o})`).join(" "),...r})))]}function No({1:t,_:e}){return{["--tw-"+t]:e,...Fo()}}function Fo(){return{...Xe({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":Ac()}),transform:"var(--tw-transform)"}}function Ac(t){return[t?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function $c({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function Ec({1:t}){return`repeat(${t},minmax(0,1fr))`}function Xe(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var Mc=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:t})=>`@media (orientation:${t})`],["contrast-(more|less)",({1:t})=>`@media (prefers-contrast:${t})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:t})=>`&::${t}`],["(marker|selection)",({1:t})=>`& *::${t},&::${t}`],["file","&::file-selector-button"],["(first|last|only)",({1:t})=>`&:${t}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:t,$$:e},r)=>e&&`&[${t}-${r.theme(t,e)||Le(e,"",r)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:t,3:e="",4:r,5:n="",6:i=e},{e:s,h:o,v:u})=>{let l=sr(n)||(r[0]=="["?r:u(r.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(o(t+i))})`)}${t[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:t})=>`[dir="${t}"] &`],["supports-",({$$:t},e)=>{if(t&&(t=e.theme("supports",t)||Le(t,"",e)),t)return t.includes(":")||(t+=":var(--tw)"),/^\w*\s*\(/.test(t)||(t=`(${t})`),`@supports ${t.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:t},e)=>{if(t&&(t=e.theme("screens",t)||Le(t,"",e)),typeof t=="string")return`@media not all and (min-width:${t})`}],["min-",({$$:t},e)=>(t&&(t=Le(t,"",e)),t&&`@media (min-width:${t})`)],[/^\[(.+)]$/,({1:t})=>/[&@]/.test(t)&&sr(t).replace(/[}]+$/,"").split("{")]];function Ic({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:xc,theme:{...cn,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:Mc,rules:_c,finalize(r){return r.n&&r.d&&r.r.some(n=>/^&::(before|after)$/.test(n))&&!/(^|;)content:/.test(r.d)?{...r,d:"content:var(--tw-content);"+r.d}:r}}}var Hh={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},zh={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},qh={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Wh={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},Gh={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},Zh={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},Kh={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},Jh={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},Xh={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},Yh={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},Qh={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},ed={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},td={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},rd={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},nd={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},id={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},sd={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},od={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},ad={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},ld={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},cd={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},ud={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},Tc={__proto__:null,slate:Hh,gray:zh,zinc:qh,neutral:Wh,stone:Gh,red:Zh,orange:Kh,amber:Jh,yellow:Xh,lime:Yh,green:Qh,emerald:ed,teal:td,cyan:rd,sky:nd,blue:id,indigo:sd,violet:od,purple:ad,fuchsia:ld,pink:cd,rose:ud};function Oc({disablePreflight:t}={}){return Ic({colors:Tc,disablePreflight:t})}function Dc({className:t="prose",defaultColor:e="gray",extend:r={},colors:n={}}={}){return n={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...n,dark:n.dark===null?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...n.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([s,o=s])=>[`${t}-${s}`,(u,l)=>Uc(t,o[0]=="."?"."+l.e(l.h(o.slice(1))):o,l,c=>`& :is(${c.trim()})`)]),rules:[[`(lead|not-${t})`,({1:s},{h:o})=>[{c:o(s)}]],[`${t}-invert`,{"@layer base":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[t+"-",({$$:s},o)=>{let u=jc(o.theme("fontSize",s));return u&&{"@layer components":u}}],[t+"-",({$$:s},o)=>i(s,o)],[t,(s,o)=>({...i(e,o),"@layer base":[Lc(t,o,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong,blockquote strong,thead th strong":{color:"inherit"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:E(20,16),marginBottom:E(20,16),paddingLeft:E(26,16)},li:{marginTop:E(8,16),marginBottom:E(8,16)},"ol>li,ul>li":{paddingLeft:E(6,16)},">ul>li p":{marginTop:E(12,16),marginBottom:E(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:E(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:E(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:E(12,16),marginBottom:E(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:E(48,16),marginBottom:E(48,16)},blockquote:{marginTop:E(32,20),marginBottom:E(32,20),paddingLeft:E(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:E(20,16),marginBottom:E(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:E(36,16),marginTop:"0",marginBottom:E(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:E(24,16),marginTop:E(48,24),marginBottom:E(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:E(20,16),marginTop:E(32,20),marginBottom:E(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:E(24,16),marginBottom:E(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:E(32,16),marginBottom:E(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:E(14,16),lineHeight:"1.4",marginTop:E(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:E(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:E(21,24)},"h3 code":{fontSize:E(18,20)},"a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:E(14,16),lineHeight:"1.7",marginTop:E(24,14),marginBottom:E(24,14),borderRadius:"0.375rem",paddingTop:E(12,14),paddingRight:E(16,14),paddingBottom:E(12,14),paddingLeft:E(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:E(32,16),marginBottom:E(32,16),fontSize:E(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:E(8,14),paddingBottom:E(8,14),paddingLeft:E(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td,tfoot td":{verticalAlign:"baseline",paddingTop:E(8,14),paddingRight:E(8,14),paddingBottom:E(8,14),paddingLeft:E(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${o.e(o.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:E(20,16),lineHeight:"1.6",marginTop:E(24,20),marginBottom:E(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),Lc(t,o,r)],"@layer components":{...jc(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function i(s,o){let u={},l={},c=(p,d,y)=>{let x=o.theme(`colors.${s}.${d}`,d);y["--tw-prose-"+p]=xe(x);let S=y!=l&&o.d("colors",`${s}-${d}`,x);S&&(l["--tw-prose-"+p]=xe(S))};for(let p in n){let d=n[p];p!="dark"&&d&&c(p,d,u)}for(let p in n.dark||{}){let d=n.dark[p];d&&(n.dark?c("invert-"+p,d,u):c(p,d,l))}return Object.keys(u).length?{"@layer defaults":{"&":u,[o.v("dark")]:l}}:void 0}}function Lc(t,e,r){let n={};for(let i in r)n[Uc(t,i,e,s=>`.${e.e(e.h(t))}${s}`)]=r[i];return n}function Uc(t,e,{e:r,h:n},i){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,o=" ",u=s,l="")=>i(`${o}:where(${u}):not(:where(.${r(n("not-"+t))} *))${l}`))}function jc(t){return t?typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}:void 0}function E(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var Ho=Vo({hash:!1,darkMode:"class",theme:{extend:{colors:{violet:{DEFAULT:"#601feb",50:"#f3f2ff",100:"#eae7ff",200:"#d7d2ff",300:"#baaeff",400:"#9980ff",500:"#784dff",600:"#6829fe",700:"#601feb",800:"#4b12c5",900:"#3f11a1",950:"#25086d"},pink:{DEFAULT:"#ff0bbb",50:"#fff0fc",100:"#ffe3fc",200:"#ffc6f9",300:"#ff98f2",400:"#ff58e5",500:"#ff27d5",600:"#ff0bbb",700:"#df0095",800:"#b8007b",900:"#980368",950:"#5f003b"},lime:{DEFAULT:"#b9e901",50:"#fdffe4",100:"#f9ffc5",200:"#f1ff92",300:"#e2ff54",400:"#d1fa21",500:"#b9e901",600:"#8ab400",700:"#688902",800:"#526b09",900:"#465a0d",950:"#243300"}},spacing:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},padding:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},lineHeight:{3:"12px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px"},maxWidth:{xs:"320px",sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px","3xl":"768px","4xl":"896px","5xl":"1024px","6xl":"1152px","7xl":"1280px"},maxHeight:{.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},borderRadius:{sm:"2px",DEFAULT:"4px",md:"6px",lg:"8px",xl:"12px","2xl":"16px","3xl":"24px"},fontSize:{xs:["12px","16px"],sm:["14px","20px"],base:["16px","24px"],lg:["18px","28px"],xl:["20px","28px"],"2xl":["24px","32px"],"3xl":["30px","36px"],"4xl":["36px","40px"],"5xl":["48px","1"],"6xl":["60px","1"],"7xl":["72px","1"],"8xl":["96px","1"],"9xl":["128px","1"]}}},presets:[Oc(),yc(),bc(),Dc()]});function Pc(t,e=!0){let r=(function(){if(pd)try{let l=Ei(new CSSStyleSheet);return l.connect=c=>{let p=zo(c);p.adoptedStyleSheets=[...p.adoptedStyleSheets,l.target]},l.disconnect=$i,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let o=[Ei(s)],u=new WeakMap;return{get target(){return o[0].target},snapshot(){let l=o.map(c=>c.snapshot());return()=>l.forEach(c=>c())},clear(){o.forEach(l=>l.clear())},destroy(){o.forEach(l=>l.destroy())},insert(l,c,p){o[0].insert(l,c,p);let d=this.target.cssRules[c];o.forEach((y,x)=>x&&y.target.insertRule(d.cssText,c))},resume(l,c){return o[0].resume(l,c)},connect(l){let c=document.createElement("style");zo(l).appendChild(c);let p=Ei(c),{cssRules:d}=this.target;for(let y=0;y<d.length;y++)p.target.insertRule(d[y].cssText,y);o.push(p),u.set(l,p)},disconnect(l){let c=o.indexOf(u.get(l));c>=0&&o.splice(c,1)}}})(),n=dc({...t,hash:t.hash??e},r),i=fc(n);return function(o){return class extends o{connectedCallback(){super.connectedCallback?.(),r.connect(this),i.observe(zo(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=n}}}}var pd=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function zo(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var A=t=>Pc(Ho)(t);var un=class extends A($){constructor(){super(),this.color="#601feb",this.radius="16.8576px",this.size="320px",this.border="#d1d5db"}render(){return h`
|
|
124
|
+
</svg>`};var Hu=ka,ys=class extends Un{resolveIcon(t){let r=Hu[t];if(!r)throw console.warn("hi-outline: icon not found",t),new Error(`Icon ${t} not found`);return r}render(){super.render();let t=this.shadowRoot?.querySelector("svg");if(!t)throw new Error("svgEl not found "+this.name);t.setAttribute("fill","none"),t.querySelectorAll("[stroke]").forEach(r=>{r.setAttribute("stroke","currentColor")})}};customElements.get("hi-outline")||customElements.define("hi-outline",ys);var _r,le,be,Ar,ws,Vn=class{constructor(t,r){f(this,Ar);f(this,_r);f(this,le);f(this,be);if(!t)throw new Error("host is required");if(!r)throw new Error("config is required");m(this,_r,t),a(this,_r).addController(this),m(this,le,r)}connect(t){m(this,le,t),m(this,be,g(this,Ar,ws).call(this))}hostConnected(){setTimeout(()=>{m(this,be,g(this,Ar,ws).call(this))},0)}hostDisconnected(){a(this,be)?.close(1e3,"lit_host_disconnected"),m(this,be,void 0)}send(t){a(this,be)?.send(t)}close(t,r){a(this,be)?.close(t,r)}get isConnected(){return a(this,be)?.readyState===WebSocket.OPEN}get isConnecting(){return a(this,be)?.readyState===WebSocket.CONNECTING}};_r=new WeakMap,le=new WeakMap,be=new WeakMap,Ar=new WeakSet,ws=function(){let t=new WebSocket(a(this,le).url());return a(this,le).onClose&&(t.onclose=a(this,le).onClose),a(this,le).onOpen&&(t.onopen=a(this,le).onOpen),a(this,le).onError&&(t.onerror=a(this,le).onError),a(this,le).onMessage&&(t.onmessage=a(this,le).onMessage),t};var Ca=Array.isArray;var vs=e=>!!(e&&e.constructor&&e.call&&e.apply);var Sa=e=>!(!e||!e.then||!vs(e.then));function*$a(e,t,r=i=>i,n=1){let i=vs(r)?r:()=>r,s=t?e:0,o=t??e;for(let c=s;c<=o&&(yield i(c),!(c+n>o));c+=n);}var bs=async(e,t)=>{let r=e?.times??3,n=e?.delay,i=e?.backoff??null;for(let s of $a(1,r)){let[o,c]=await ks(t)(l=>{throw{_exited:l}});if(!o)return c;if(o._exited)throw o._exited;if(s===r)throw o;n&&await xs(n),i&&await xs(i(s))}},xs=e=>new Promise(t=>setTimeout(t,e)),ks=e=>(...t)=>{try{let r=e(...t);return Sa(r)?r.then(n=>[void 0,n]).catch(n=>[n,void 0]):[void 0,r]}catch(r){return[r,void 0]}};var Z,X,z,It,Ot,me,G,_e,Ea,_a,Aa,Ma,Bn=class{constructor(t,r){f(this,G);f(this,Z);f(this,X);f(this,z,null);y(this,"isStreaming",!1);y(this,"typingIndicator");y(this,"ranOutOfCredits",!1);y(this,"messages",[]);y(this,"conversationId","");f(this,It,0);f(this,Ot);y(this,"isLiveMode",!1);f(this,me,[]);m(this,Z,t),m(this,X,r),a(this,X).autoConnect!==!1&&m(this,z,this.initWS()),t.addController(this)}get hasQueuedMessages(){return a(this,me).length>0}async enqueueMessage(t,{expectStreaming:r=!1}={}){if(a(this,me).length>0){let n=a(this,me)[a(this,me).length-1];if(t.type==="USER_INPUT"&&n.message.type==="USER_INPUT"&&t.value===n.message.value)return!0}return a(this,z)||this.connect(),a(this,z)?.isConnected?g(this,G,_e).call(this,t,{expectStreaming:r}):(a(this,me).push({message:t,options:{expectStreaming:r}}),a(this,Z).requestUpdate(),a(this,z)&&!a(this,z).isConnecting&&!a(this,z).isConnected&&this.retry(),await bs({times:5,delay:2e3},async()=>{if(a(this,z)?.isConnected){let n=[...a(this,me)];m(this,me,[]),a(this,Z).requestUpdate();let i=!1;for(let{message:s,options:o}of n){let c=g(this,G,_e).call(this,s,o);s===t&&(i=c)}return i}else throw new Error("WebSocket not connected yet")}).catch(()=>(console.warn("Failed to send message after retries",t),m(this,me,[]),a(this,Z).requestUpdate(),!1)))}sendUserInput(t,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1}={}){return g(this,G,_e).call(this,{type:"USER_INPUT",value:t,role:i,xUserData:r,xCustomInstructions:n},{expectStreaming:s})}async enqueueUserInput(t,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1}={}){return this.enqueueMessage({type:"USER_INPUT",value:t,role:i,xUserData:r,xCustomInstructions:n},{expectStreaming:s})}sendUserCancel(){return g(this,G,_e).call(this,{type:"USER_CANCEL"})}sendUserTypingStart(){return g(this,G,_e).call(this,{type:"USER_TYPING_START"})}sendUserTypingStop(){return g(this,G,_e).call(this,{type:"USER_TYPING_STOP"})}sendUserMeta(t){return g(this,G,_e).call(this,{type:"USER_META",metadata:t})}reloadConfig(){g(this,G,_e).call(this,{type:"RELOAD_CONFIG"})}close(){a(this,z)?.close(1e3,"closed by user")}retry(){clearTimeout(a(this,Ot)),m(this,Ot,setTimeout(()=>{a(this,X).onReconnect?.(),m(this,z,this.initWS())},1e3*a(this,It))),na(this,It)._++}initWS(){return new Vn(a(this,Z),{url:()=>a(this,X).url(this.conversationId,{}),onOpen:t=>g(this,G,Ea).call(this,t),onMessage:t=>g(this,G,_a).call(this,JSON.parse(t.data)),onError:t=>g(this,G,Aa).call(this,t),onClose:t=>g(this,G,Ma).call(this,t)})}hostConnected(){this.conversationId=a(this,X).restoreConversationState?.()?.conversationId||"",this.messages=a(this,X).restoreConversationState?.()?.messages||[]}reset(){g(this,G,_e).call(this,{type:"NEW_CHAT"}),a(this,X).onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,m(this,me,[]),a(this,Z).requestUpdate()}hostDisconnected(){clearTimeout(a(this,Ot))}connect(){a(this,z)||m(this,z,this.initWS())}reconnectSocket(){a(this,z)?.close(1e3,"destroy"),m(this,z,this.initWS())}get lastMsg(){if(this.messages.length>0)return this.messages[this.messages.length-1]}};Z=new WeakMap,X=new WeakMap,z=new WeakMap,It=new WeakMap,Ot=new WeakMap,me=new WeakMap,G=new WeakSet,_e=function(t,{expectStreaming:r=!1}={}){return this.ranOutOfCredits?!1:a(this,z)?a(this,z).isConnecting?(console.warn("WebSocket is connecting, message not sent",t),!1):a(this,z).isConnected?(r&&!this.isLiveMode&&(this.isStreaming=!0,a(this,Z).requestUpdate()),a(this,z).send(JSON.stringify(t)),!0):(console.warn("WebSocket is not connected, message not sent",t),this.retry(),!1):(console.warn("WebSocket not initialized, message not sent",t),this.connect(),!1)},Ea=function(t){m(this,It,0)},_a=function(t){switch(t.type){case"NEW_MESSAGE":{this.messages=[...this.messages,{...t.message,streaming:!0}].filter((r,n,i)=>n===i.findIndex(s=>s.id===r.id)),this.typingIndicator=void 0,a(this,Z).requestUpdate(),a(this,X).onNewMessage?.(t.message);break}case"APPEND_MESSAGE":{let r=this.messages.find(n=>n.id===t.message.id);if(r){switch(t.message.content_type){case"text":{let{part:n,delta:i,position:s}=t.message;r.content=r.content.slice(0,s)+i,r.parts||=[],r.parts[n]={text:r.parts[n]&&"text"in r.parts[n]?(r.parts[n].text||"").slice(0,s)+i:i};break}case"html":{let{part:n,delta:i,position:s}=t.message;r.parts||=[],r.parts[n]={html:r.parts[n]&&"html"in r.parts[n]?(r.parts[n].html||"").slice(0,s)+i:i};break}case"data":{let{part:n}=t.message;r.parts||=[],r.parts[n]={tag:t.message.tag,data:r.parts[n]&&"data"in r.parts[n]?Object.assign(r.parts[n].data||{},t.message.data):t.message.data};break}}t.metadata&&(r.metadata=t.metadata),a(this,X).onMessageAppend?.(t),a(this,Z).requestUpdate()}else throw new Error(`Message with id ${t.message.id} not found`);break}case"MESSAGE_DONE":{let r=this.messages.find(n=>n.id===t.message.id);if(r)Object.assign(r,t.message),r.streaming=!1;else throw new Error(`Message with id ${t.message.id} not found`);this.isStreaming=!1,a(this,Z).requestUpdate(),a(this,X).onMessageDone?.(t,r),a(this,X).persistConversationState?.(this.conversationId,this.messages);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,a(this,Z).requestUpdate();break}case"ERROR":{a(this,X).onMessageError?.(t);break}case"CONNECTED":{this.conversationId=t.conversationId,this.messages=t.messages,a(this,X).onConnect?.(t.conversationId),a(this,X).persistConversationState?.(t.conversationId,t.messages),this.isLiveMode=t.metadata?.isLiveMode,a(this,Z).requestUpdate();break}case"TYPING_START":{t.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:t.role,metadata:t.metadata},a(this,Z).requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,a(this,Z).requestUpdate();break}case"RAN_OUT_OF_CREDITS":{this.ranOutOfCredits=!0,a(this,Z).requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),a(this,Z).requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(t)}`)}},Aa=function(t){console.error("onError",t),a(this,X).onError?.(t)},Ma=function(t){a(this,Z).isConnected&&a(this,z)&&!a(this,z).isConnected&&t.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,a(this,Z).requestUpdate(),a(this,X).onClose?.()};var Kh=Symbol(),Fu=Symbol();var Ia=Object.getPrototypeOf,Cs=new WeakMap,zu=e=>e&&(Cs.has(e)?Cs.get(e):Ia(e)===Object.prototype||Ia(e)===Array.prototype);var Oa=e=>zu(e)&&e[Fu]||null,Ss=(e,t=!0)=>{Cs.set(e,t)};var Es=e=>typeof e=="object"&&e!==null,qu=e=>Es(e)&&!_s.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)&&!(e instanceof Promise),La=(e,t)=>{let r=Ta.get(e);if(r?.[0]===t)return r[1];let n=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return Ss(n,!0),Ta.set(e,[t,n]),Reflect.ownKeys(e).forEach(i=>{if(Object.getOwnPropertyDescriptor(n,i))return;let s=Reflect.get(e,i),{enumerable:o}=Reflect.getOwnPropertyDescriptor(e,i),c={value:s,enumerable:o,configurable:!0};if(_s.has(s))Ss(s,!1);else if(at.has(s)){let[l,u]=at.get(s);c.value=La(l,u())}Object.defineProperty(n,i,c)}),Object.preventExtensions(n)},Wu=(e,t,r,n)=>({deleteProperty(i,s){let o=Reflect.get(i,s);r(s);let c=Reflect.deleteProperty(i,s);return c&&n(["delete",[s],o]),c},set(i,s,o,c){let l=!e()&&Reflect.has(i,s),u=Reflect.get(i,s,c);if(l&&(ja(u,o)||Nn.has(o)&&ja(u,Nn.get(o))))return!0;r(s),Es(o)&&(o=Oa(o)||o);let p=!at.has(o)&&Gu(o)?As(o):o;return t(s,p),Reflect.set(i,s,p,c),n(["set",[s],o,u]),!0}}),at=new WeakMap,_s=new WeakSet,Ta=new WeakMap,$s=[1],Nn=new WeakMap,ja=Object.is,Zu=(e,t)=>new Proxy(e,t),Gu=qu,Ku=La,Ju=Wu;function As(e={}){if(!Es(e))throw new Error("object required");let t=Nn.get(e);if(t)return t;let r=$s[0],n=new Set,i=(C,A=++$s[0])=>{r!==A&&(s=r=A,n.forEach(k=>k(C,A)))},s=r,o=(C=$s[0])=>(s!==C&&(s=C,l.forEach(([A])=>{let k=A[1](C);k>r&&(r=k)})),r),c=C=>(A,k)=>{let E=[...A];E[1]=[C,...E[1]],i(E,k)},l=new Map,u=(C,A)=>{let k=!_s.has(A)&&at.get(A);if(k){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&l.has(C))throw new Error("prop listener already exists");if(n.size){let E=k[2](c(C));l.set(C,[k,E])}else l.set(C,[k])}},p=C=>{var A;let k=l.get(C);k&&(l.delete(C),(A=k[1])==null||A.call(k))},h=C=>(n.add(C),n.size===1&&l.forEach(([k,E],T)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&E)throw new Error("remove already exists");let N=k[2](c(T));l.set(T,[k,N])}),()=>{n.delete(C),n.size===0&&l.forEach(([k,E],T)=>{E&&(E(),l.set(T,[k]))})}),v=!0,b=Ju(()=>v,u,p,i),S=Zu(e,b);Nn.set(e,S);let O=[e,o,h];return at.set(S,O),Reflect.ownKeys(e).forEach(C=>{let A=Object.getOwnPropertyDescriptor(e,C);"value"in A&&A.writable&&(S[C]=e[C])}),v=!1,S}function Hn(e,t,r){let n=at.get(e);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!n&&console.warn("Please use proxy object");let i,s=[],o=n[2],c=!1,u=o(p=>{if(s.push(p),r){t(s.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,c&&t(s.splice(0))}))});return c=!0,()=>{c=!1,u()}}function Tt(e){let t=at.get(e);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!t&&console.warn("Please use proxy object");let[r,n]=t;return Ku(r,n())}var Mr,jt,lt,Lt,Dt=class{constructor(t,r){f(this,Mr);f(this,jt);f(this,lt);f(this,Lt,()=>{});m(this,Mr,t),m(this,jt,r),m(this,lt,Tt(r)),t.addController(this)}get state(){return a(this,lt)}get value(){return a(this,lt)}hostConnected(){a(this,Lt).call(this),m(this,Lt,Hn(a(this,jt),()=>{m(this,lt,Tt(a(this,jt))),a(this,Mr).requestUpdate()}))}hostDisconnected(){a(this,Lt).call(this)}};Mr=new WeakMap,jt=new WeakMap,lt=new WeakMap,Lt=new WeakMap;var Ir,Or,ct,Pt,He=class{constructor(t,r,n){f(this,Ir);f(this,Or);y(this,"proxyObject");f(this,ct);f(this,Pt,()=>{});m(this,Ir,t),m(this,Or,n),this.proxyObject=As(r),m(this,ct,Tt(this.proxyObject)),t.addController(this)}get state(){return a(this,ct)}get value(){return a(this,ct)}hostConnected(){a(this,Pt).call(this),a(this,Or)?.subscribe&&m(this,Pt,Hn(this.proxyObject,()=>{m(this,ct,Tt(this.proxyObject)),a(this,Ir).requestUpdate()}))}hostDisconnected(){a(this,Pt).call(this)}};Ir=new WeakMap,Or=new WeakMap,ct=new WeakMap,Pt=new WeakMap;var Rt,Tr,Ut,ut,pt,Fn=class{constructor(t,{provider:r,tag:n,key:i}){f(this,Rt);f(this,Tr);f(this,Ut);f(this,ut,null);f(this,pt,null);m(this,Rt,t),m(this,Tr,n),m(this,Ut,i),t.addController(this)}get value(){return a(this,pt)?a(this,pt).value:null}hostConnected(){if(a(this,pt)||(m(this,ut,Xu(a(this,Rt),a(this,Tr))),!a(this,ut)))return;let t=a(this,ut)[a(this,Ut)]instanceof He?a(this,ut)[a(this,Ut)]:null;t&&m(this,pt,new Dt(a(this,Rt),t.proxyObject))}hostDisconnected(){}};Rt=new WeakMap,Tr=new WeakMap,Ut=new WeakMap,ut=new WeakMap,pt=new WeakMap;function Xu(e,t){let r=e;for(;r;){let n=r.closest(t);if(n)return n;let i=r.getRootNode();if(i instanceof ShadowRoot)r=i.host;else break}return null}var Da=()=>{if(window.Shopify)try{return{customerId:Yu()}}catch{return null}return null},Yu=()=>{try{let e=[()=>window.ShopifyAnalytics?.meta?.page?.customerId,()=>window.meta?.page?.customerId,()=>window._st?.cid,()=>window.ShopifyAnalytics?.lib?.user()?.traits()?.uniqToken];for(let t of e)try{let r=t();if(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i.test(r))continue;if(r)return r}catch{}}catch{return null}return null},Pa=async()=>{try{return(await(await fetch(window.Shopify.routes.root+"cart.js")).json()).items.map(n=>({id:n.id,name:n.title,quantity:n.quantity,price:n.price,variantId:n.variant_id,sku:n.sku,url:n.url,description:n.product_description,image:n.featured_image?.url}))}catch{return[]}};function Ra(e,t="http"){return e.startsWith("http://")||e.startsWith("https://")?e:`${t}://${e}`}function Ms(e){return new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+!*'();@&=,$]*)*(\\?[-a-z\\d%_.~+!*'();@&=,$]*)?(\\#[-a-z\\d%_.~+!*'();@&=,$]*)?$","i").test(e)}function Ua(e,t){let r=e instanceof URL?e:new URL(e);if(t)for(let[n,i]of t)r.searchParams.set(n,i);return r}var Va=()=>{if(window.ShopRenter)try{let e=ep();return{customerEmail:e?.customerEmail,customerId:e?.customerId,customerName:e?.customerName}}catch{return null}return null},ep=()=>{try{if(window.ShopRenter){let e=window.ShopRenter.customer;return{customerEmail:e?.email,customerId:e?.userId,customerName:[e?.name?.firstName,e?.name?.lastName].filter(Boolean).join(" ")}}return{customerEmail:null,customerId:null,customerName:null}}catch{return{customerEmail:null,customerId:null,customerName:null}}},Ba=async()=>{try{let e=window.ShopRenter.shop?.domain;if(!e)return[];let t=Ra(e,"https")+"/cart.json";return(await(await fetch(t)).json()).items.map(s=>({id:s.id,name:s.name,quantity:s.quantity,price:s.price,sku:s.sku,image:s.image,url:s.href}))}catch{return[]}};var Na=()=>{if(window.UNAS)try{let e=window.UNAS.customer;return{customerEmail:e?.email,customerId:e?.id}}catch(e){return console.error("Error fetching customer information:",e),null}return null},Ha=async()=>new Promise((e,t)=>{try{window.UNAS.getCart(r=>{let i=r.items.map(s=>({id:s.id,name:s.name,quantity:s.quantity,price:s.price,sku:s.sku}));e(i)})}catch(r){console.error("Error fetching cart information:",r),t(r)}});var Is;function Os(e){return{lang:e?.lang??Is?.lang,message:e?.message,abortEarly:e?.abortEarly??Is?.abortEarly,abortPipeEarly:e?.abortPipeEarly??Is?.abortPipeEarly}}var np;function ip(e){return np?.get(e)}var sp;function op(e){return sp?.get(e)}var ap;function lp(e,t){return ap?.get(e)?.get(t)}function za(e){let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&Object.getPrototypeOf(e)?.constructor?.name)??"null":t}function ue(e,t,r,n,i){let s=i&&"input"in i?i.input:r.value,o=i?.expected??e.expects??null,c=i?.received??za(s),l={kind:e.kind,type:e.type,input:s,expected:o,received:c,message:`Invalid ${t}: ${o?`Expected ${o} but r`:"R"}eceived ${c}`,requirement:e.requirement,path:i?.path,issues:i?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},u=e.kind==="schema",p=i?.message??e.message??lp(e.reference,l.lang)??(u?op(l.lang):null)??n.message??ip(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),u&&(r.typed=!1),r.issues?r.issues.push(l):r.issues=[l]}function pe(e){return{version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Os())}}}function cp(e,t){return Object.hasOwn(e,t)&&t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function qa(e,t){let r=[...new Set(e)];return r.length>1?`(${r.join(` ${t} `)})`:r[0]??"never"}var up=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};function Ts(e,t){return{kind:"validation",type:"max_length",reference:Ts,async:!1,expects:`<=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&ue(this,"length",r,n,{received:`${r.value.length}`}),r}}}function js(e,t){return{kind:"validation",type:"min_length",reference:js,async:!1,expects:`>=${e}`,requirement:e,message:t,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&ue(this,"length",r,n,{received:`${r.value.length}`}),r}}}function pp(e,t,r){return typeof e.fallback=="function"?e.fallback(t,r):e.fallback}function Wa(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Ls(){return{kind:"schema",type:"any",reference:Ls,expects:"any",async:!1,get"~standard"(){return pe(this)},"~run"(e){return e.typed=!0,e}}}function Vt(e,t){return{kind:"schema",type:"array",reference:Vt,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return pe(this)},"~run"(r,n){let i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let s=0;s<i.length;s++){let o=i[s],c=this.item["~run"]({value:o},n);if(c.issues){let l={type:"array",origin:"value",input:i,key:s,value:o};for(let u of c.issues)u.path?u.path.unshift(l):u.path=[l],r.issues?.push(u);if(r.issues||(r.issues=c.issues),n.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),r.value.push(c.value)}}else ue(this,"type",r,n);return r}}}function Ds(e){return{kind:"schema",type:"boolean",reference:Ds,expects:"boolean",async:!1,message:e,get"~standard"(){return pe(this)},"~run"(t,r){return typeof t.value=="boolean"?t.typed=!0:ue(this,"type",t,r),t}}}function Ps(e){return{kind:"schema",type:"null",reference:Ps,expects:"null",async:!1,message:e,get"~standard"(){return pe(this)},"~run"(t,r){return t.value===null?t.typed=!0:ue(this,"type",t,r),t}}}function zn(e){return{kind:"schema",type:"number",reference:zn,expects:"number",async:!1,message:e,get"~standard"(){return pe(this)},"~run"(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:ue(this,"type",t,r),t}}}function Le(e,t){return{kind:"schema",type:"object",reference:Le,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return pe(this)},"~run"(r,n){let i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(let s in this.entries){let o=this.entries[s];if(s in i||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){let c=s in i?i[s]:Wa(o),l=o["~run"]({value:c},n);if(l.issues){let u={type:"object",origin:"value",input:i,key:s,value:c};for(let p of l.issues)p.path?p.path.unshift(u):p.path=[u],r.issues?.push(p);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value[s]=l.value}else if(o.fallback!==void 0)r.value[s]=pp(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(ue(this,"key",r,n,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:i,key:s,value:i[s]}]}),n.abortEarly))break}}else ue(this,"type",r,n);return r}}}function Bt(e,t){return{kind:"schema",type:"optional",reference:Bt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return pe(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Wa(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function Rs(e,t){return{kind:"schema",type:"picklist",reference:Rs,expects:qa(e.map(za),"|"),async:!1,options:e,message:t,get"~standard"(){return pe(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:ue(this,"type",r,n),r}}}function qn(e,t,r){return{kind:"schema",type:"record",reference:qn,expects:"Object",async:!1,key:e,value:t,message:r,get"~standard"(){return pe(this)},"~run"(n,i){let s=n.value;if(s&&typeof s=="object"){n.typed=!0,n.value={};for(let o in s)if(cp(s,o)){let c=s[o],l=this.key["~run"]({value:o},i);if(l.issues){let p={type:"object",origin:"key",input:s,key:o,value:c};for(let h of l.issues)h.path=[p],n.issues?.push(h);if(n.issues||(n.issues=l.issues),i.abortEarly){n.typed=!1;break}}let u=this.value["~run"]({value:c},i);if(u.issues){let p={type:"object",origin:"value",input:s,key:o,value:c};for(let h of u.issues)h.path?h.path.unshift(p):h.path=[p],n.issues?.push(h);if(n.issues||(n.issues=u.issues),i.abortEarly){n.typed=!1;break}}(!l.typed||!u.typed)&&(n.typed=!1),l.typed&&(n.value[l.value]=u.value)}}else ue(this,"type",n,i);return n}}}function K(e){return{kind:"schema",type:"string",reference:K,expects:"string",async:!1,message:e,get"~standard"(){return pe(this)},"~run"(t,r){return typeof t.value=="string"?t.typed=!0:ue(this,"type",t,r),t}}}function Fa(e){let t;if(e)for(let r of e)t?t.push(...r.issues):t=r.issues;return t}function Nt(e,t){return{kind:"schema",type:"union",reference:Nt,expects:qa(e.map(r=>r.expects),"|"),async:!1,options:e,message:t,get"~standard"(){return pe(this)},"~run"(r,n){let i,s,o;for(let c of this.options){let l=c["~run"]({value:r.value},n);if(l.typed)if(l.issues)s?s.push(l):s=[l];else{i=l;break}else o?o.push(l):o=[l]}if(i)return i;if(s){if(s.length===1)return s[0];ue(this,"type",r,n,{issues:Fa(s)}),r.typed=!0}else{if(o?.length===1)return o[0];ue(this,"type",r,n,{issues:Fa(o)})}return r}}}function Za(e,t,r){let n=e["~run"]({value:t},Os(r));if(n.issues)throw new up(n.issues);return n.value}function Ga(e,t){let r={};for(let n in e.entries)r[n]=!t||t.includes(n)?Bt(e.entries[n]):e.entries[n];return{...e,entries:r,get"~standard"(){return pe(this)}}}function Ka(...e){return{...e[0],pipe:e,get"~standard"(){return pe(this)},"~run"(t,r){for(let n of e)if(n.kind!=="metadata"){if(t.issues&&(n.kind==="schema"||n.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=n["~run"](t,r))}return t}}}function jr(e,t,r){let n=e["~run"]({value:t},Os(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var Ja=qn(K(),Nt([K(),zn(),Ds(),Ps()])),Xa=Ka(K(),js(1),Ts(5e3)),Ya=()=>{try{return window.UNAS?Na():window.Shopify?Da():window.ShopRenter?Va():null}catch{return null}},Qa=async()=>{try{return window.UNAS?await Ha():window.Shopify?await Pa():window.ShopRenter?await Ba():[]}catch{return[]}},Ht={schema:Le({conversationId:Bt(K()),messages:Bt(Vt(Le({id:K(),timestamp:zn(),role:Rs(["user","assistant","support"]),content:K(),parts:Bt(Vt(Nt([Le({text:K()}),Le({html:K()}),Le({tag:K(),data:qn(K(),Ls())})])))})))}),getStorageKey(e){if(!e)throw new Error("widgetId is not set");return`_molin_${e}`},persist(e,t,r){let n=this.getStorageKey(e);localStorage.setItem(n,JSON.stringify({conversationId:t,messages:r}))},restore(e){try{let t=this.getStorageKey(e),r=JSON.parse(localStorage.getItem(t)||"{}"),n=Za(this.schema,r);return{conversationId:n.conversationId||"",messages:n.messages||[]}}catch(t){return console.error("Failed to restore conversation state:",t),{conversationId:"",messages:[]}}},reset(e){let t=this.getStorageKey(e);localStorage.removeItem(t)}};var P,el,Dr,Pr,Ft,V,tl,Lr=class extends _{constructor(){super();f(this,P);y(this,"contextCtrl");f(this,Dr);f(this,Pr);f(this,Ft,null);this.widgetId="",this.config={},this.callbacks={},this.xUserData=void 0,this.xCustomInstructions=void 0,this.autoConnect=!0,this.contextCtrl=new He(this,{config:this.config,callbacks:this.callbacks,xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,widgetId:this.widgetId,conversationId:"",messages:[],isStreaming:!1,typingIndicator:void 0,ranOutOfCredits:!1,isLiveMode:!1,lastMsg:void 0,hasQueuedMessages:!1,sendUserInput:this.sendUserInput.bind(this),sendUserCancel:this.sendUserCancel.bind(this),sendUserTypingStart:this.sendUserTypingStart.bind(this),sendUserTypingStop:this.sendUserTypingStop.bind(this),reset:this.reset.bind(this),reloadConfig:this.reloadConfig.bind(this),enqueueUserInput:this.enqueueUserInput.bind(this),connect:this.connect.bind(this)})}connectedCallback(){super.connectedCallback(),this.updated()}updated(){this.autoConnect&&a(this,P,V).connect(),Object.assign(this.contextCtrl.proxyObject,{widgetId:this.widgetId,config:this.config,callbacks:this.callbacks,xUserData:a(this,Dr),xCustomInstructions:a(this,Pr),conversationId:a(this,P,V).conversationId,messages:a(this,P,el),isStreaming:a(this,P,V).isStreaming,typingIndicator:a(this,P,V).typingIndicator,ranOutOfCredits:a(this,P,V).ranOutOfCredits,isLiveMode:a(this,P,V).isLiveMode,lastMsg:a(this,P,V).lastMsg,hasQueuedMessages:a(this,P,V).hasQueuedMessages,sendUserInput:this.sendUserInput.bind(this),sendUserCancel:this.sendUserCancel.bind(this),sendUserTypingStart:this.sendUserTypingStart.bind(this),sendUserTypingStop:this.sendUserTypingStop.bind(this),reset:this.reset.bind(this),reloadConfig:this.reloadConfig.bind(this),enqueueUserInput:this.enqueueUserInput.bind(this),connect:this.connect.bind(this)}),g(this,P,tl).call(this)}sendUserInput(r,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,...n},s=a(this,P,V).sendUserInput(r,i);return s&&this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:r,example:!1,conversationId:a(this,P,V).conversationId}),s}async enqueueUserInput(r,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,role:"user",expectStreaming:!0,...n};return a(this,P,V).enqueueUserInput(r,i)}sendUserCancel(){a(this,P,V).sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}sendUserTypingStart(){a(this,P,V).sendUserTypingStart()}sendUserTypingStop(){a(this,P,V).sendUserTypingStop()}reset(){a(this,P,V).reset()}reloadConfig(){a(this,P,V).reloadConfig()}connect(){a(this,P,V).connect()}render(){return d`<slot></slot>`}};P=new WeakSet,el=function(){return a(this,P,V)?.ranOutOfCredits?[{id:crypto.randomUUID(),role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}]:a(this,P,V)?.messages||[]},Dr=new WeakMap,Pr=new WeakMap,Ft=new WeakMap,V=function(){return a(this,Ft)||m(this,Ft,new Bn(this,{autoConnect:this.autoConnect,url:r=>{let n=new URL(this.config.wsApiUrl);return n.searchParams.set("widgetId",this.widgetId),n.searchParams.set("conversationId",r),n.searchParams.set("pageUrl",window.location.href),n},onReconnect:()=>{},onError:r=>{console.error("ws error",r)},onClose:()=>{},onNewMessage:r=>{r.role==="assistant"&&this.callbacks.onNewMessageStartedStreaming?.({widgetId:this.widgetId,message:r,conversationId:a(this,P,V).conversationId})},onMessageAppend:r=>{},onMessageDone:(r,n)=>{n.role==="assistant"&&this.callbacks.onMessageEndedStreaming?.({widgetId:this.widgetId,text:n.content??"",message:n,usage_TOKENS_COMPLETION:r.message.usage.TOKENS_COMPLETION,conversationId:a(this,P,V).conversationId})},onMessageError:r=>{console.error("ws message error",r),r.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+r.message})},onReset:()=>{Ht.reset(this.widgetId)},onConnect:r=>{let n=Ya();a(this,P,V).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:n,language:window.navigator.language,cart:[]}),Qa().then(i=>{i?.length>0&&a(this,P,V).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:n,cart:i,language:window.navigator.language})}).catch(i=>{console.error(i)})},persistConversationState:(r,n)=>{Ht.persist(this.widgetId,r,n)},restoreConversationState:()=>Ht.restore(this.widgetId)})),a(this,Ft)},tl=function(){function r(i){if(!i)return;let s;try{s=typeof i=="object"?i:JSON.parse(i)}catch(c){console.error("Molin: user-data is not valid JSON",c);return}if(!s||typeof s!="object"||Object.keys(s).length===0)return;let o=jr(Ja,s);if(!o.success){console.error("Molin: user-data does not pass schema validation",o.issues);return}return o.output}function n(i){if(!i)return;let s=jr(Xa,i);if(!s.success){console.error("Molin: custom-instructions does not pass schema validation",s.issues);return}return s.output}m(this,Dr,r(this.xUserData)),m(this,Pr,n(this.xCustomInstructions))},y(Lr,"properties",{widgetId:{type:String},config:{type:Object},callbacks:{type:Object},xUserData:{type:Object},xCustomInstructions:{type:Object},autoConnect:{type:Boolean}});function rl(e){let t=new Fn(e,{provider:Lr,tag:"mw-context-widget",key:"contextCtrl"});return new Proxy({value:null},{get(r,n){if(n==="value")return t.value}})}customElements.get("mw-context-widget")||customElements.define("mw-context-widget",Lr);function Zs(e){return[...e.v,(e.i?"!":"")+e.n].join(":")}function hp(e,t=","){return e.map(Zs).join(t)}var cl=typeof CSS<"u"&&CSS.escape||(e=>e.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Zn(e){for(var t=9,r=e.length;r--;)t=Math.imul(t^e.charCodeAt(r),1597334677);return"#"+((t^t>>>9)>>>0).toString(36)}function Jn(e,t="@media "){return t+R(e).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(n=>`(${n}-width:${r[n]})`).join(" and "))).join(",")}function R(e=[]){return Array.isArray(e)?e:e==null?[]:[e]}function nl(e){return e}function Xn(){}var Y={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function ul(e){return e.match(/[-=:;]/g)?.length||0}function Hs(e){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(e)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(ul(e),15)<<18}var dp=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function Gs({n:e,i:t,v:r=[]},n,i,s){e&&(e=Zs({n:e,i:t,v:r})),s=[...R(s)];for(let c of r){let l=n.theme("screens",c);for(let u of R(l&&Jn(l)||n.v(c))){var o;s.push(u),i|=l?67108864|Hs(u):c=="dark"?1073741824:u[0]=="@"?Hs(u):(o=u,1<<~(/:([a-z-]+)/.test(o)&&~dp.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:e,p:i,r:s,i:t}}var pl=new Map;function Fs(e){if(e.d){let t=[],r=Us(e.r.reduce((n,i)=>i[0]=="@"?(t.push(i),n):i?Us(n,s=>Us(i,o=>{let c=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(c){let l=s.indexOf(c[1]);return~l?s.slice(0,l)+c[0]+s.slice(l+c[1].length):Vs(s,o)}return Vs(o,s)})):n,"&"),n=>Vs(n,e.n?"."+cl(e.n):""));return r&&t.push(r.replace(/:merge\((.+?)\)/g,"$1")),t.reduceRight((n,i)=>i+"{"+n+"}",e.d)}}function Us(e,t){return e.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,n,i)=>t(n)+i)}function Vs(e,t){return e.replace(/&/g,t)}var il=new Intl.Collator("en",{numeric:!0});function hl(e,t){for(var r=0,n=e.length;r<n;){let i=n+r>>1;0>=dl(e[i],t)?r=i+1:n=i}return n}function dl(e,t){let r=e.p&Y.o;return r==(t.p&Y.o)&&(r==Y.b||r==Y.o)?0:e.p-t.p||e.o-t.o||il.compare(sl(e.n),sl(t.n))||il.compare(ol(e.n),ol(t.n))}function sl(e){return(e||"").split(/:/).pop().split("/").pop()||"\0"}function ol(e){return(e||"").replace(/\W/g,t=>String.fromCharCode(127+t.charCodeAt(0)))+"\0"}function Bs(e,t){return Math.round(parseInt(e,16)*t)}function ge(e,t={}){if(typeof e=="function")return e(t);let{opacityValue:r="1",opacityVariable:n}=t,i=n?`var(${n})`:r;if(e.includes("<alpha-value>"))return e.replace("<alpha-value>",i);if(e[0]=="#"&&(e.length==4||e.length==7)){let s=(e.length-1)/3,o=[17,1,.062272][s-1];return`rgba(${[Bs(e.substr(1,s),o),Bs(e.substr(1+s,s),o),Bs(e.substr(1+2*s,s),o),i]})`}return i=="1"?e:i=="0"?"#0000":e.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function fl(e,t,r,n,i=[]){return(function s(o,{n:c,p:l,r:u=[],i:p},h){let v=[],b="",S=0,O=0;for(let k in o||{}){var C,A;let E=o[k];if(k[0]=="@"){if(!E)continue;if(k[1]=="a"){v.push(...Js(c,l,Kn(""+E),h,l,u,p,!0));continue}if(k[1]=="l"){for(let T of R(E))v.push(...s(T,{n:c,p:(C=Y[k[7]],l&~Y.o|C),r:k[7]=="d"?[]:u,i:p},h));continue}if(k[1]=="i"){v.push(...R(E).map(T=>({p:-1,o:0,r:[],d:k+" "+T})));continue}if(k[1]=="k"){v.push({p:Y.d,o:0,r:[k],d:s(E,{p:Y.d},h).map(Fs).join("")});continue}if(k[1]=="f"){v.push(...R(E).map(T=>({p:Y.d,o:0,r:[k],d:s(T,{p:Y.d},h).map(Fs).join("")})));continue}}if(typeof E!="object"||Array.isArray(E))k=="label"&&E?c=E+Zn(JSON.stringify([l,p,o])):(E||E===0)&&(k=k.replace(/[A-Z]/g,T=>"-"+T.toLowerCase()),O+=1,S=Math.max(S,(A=k)[0]=="-"?0:ul(A)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(A)?+!!RegExp.$1||-!!RegExp.$2:0)+1),b+=(b?";":"")+R(E).map(T=>h.s(k,Ks(""+T,h.theme)+(p?" !important":""))).join(";"));else if(k[0]=="@"||k.includes("&")){let T=l;k[0]=="@"&&(k=k.replace(/\bscreen\(([^)]+)\)/g,(N,J)=>{let te=h.theme("screens",J);return te?(T|=67108864,Jn(te,"")):N}),T|=Hs(k)),v.push(...s(E,{n:c,p:T,r:[...u,k],i:p},h))}else v.push(...s(E,{p:l,r:[...u,k]},h))}return v.unshift({n:c,p:l,o:Math.max(0,15-O)+1.5*Math.min(S||15,15),r:u,d:b}),v.sort(dl)})(e,Gs(t,r,n,i),r)}function Ks(e,t){return e.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,n,i,s,o="")=>{let c=t(i,o);return typeof c=="function"&&/color|fill|stroke/i.test(i)?ge(c):""+R(c).filter(l=>Object(l)!==l)})}function ml(e,t){let r,n=[];for(let i of e)i.d&&i.n?r?.p==i.p&&""+r.r==""+i.r?(r.c=[r.c,i.c].filter(Boolean).join(" "),r.d=r.d+";"+i.d):n.push(r={...i,n:i.n&&t}):n.push({...i,n:i.n&&t});return n}function Gn(e,t,r=Y.u,n,i){let s=[];for(let o of e)for(let c of(function(l,u,p,h,v){l={...l,i:l.i||v};let b=(function(S,O){let C=pl.get(S.n);return C?C(S,O):O.r(S.n,S.v[0]=="dark")})(l,u);return b?typeof b=="string"?({r:h,p}=Gs(l,u,p,h),ml(Gn(Kn(b),u,p,h,l.i),l.n)):Array.isArray(b)?b.map(S=>{var O,C;return{o:0,...S,r:[...R(h),...R(S.r)],p:(O=p,C=S.p??p,O&~Y.o|C)}}):fl(b,l,u,p,h):[{c:Zs(l),p:0,o:0,r:[]}]})(o,t,r,n,i))s.splice(hl(s,c),0,c);return s}function Js(e,t,r,n,i,s,o,c){return ml((c?r.flatMap(l=>Gn([l],n,i,s,o)):Gn(r,n,i,s,o)).map(l=>l.p&Y.o&&(l.n||t==Y.b)?{...l,p:l.p&~Y.o|t,o:0}:l),e)}function fp(e,t,r,n){var i;return i=(s,o)=>{let{n:c,p:l,r:u,i:p}=Gs(s,o,t);return r&&Js(c,t,r,o,l,u,p,n)},pl.set(e,i),e}function Ns(e,t,r){if(e[e.length-1]!="("){let n=[],i=!1,s=!1,o="";for(let c of e)if(!(c=="("||/[~@]$/.test(c))){if(c[0]=="!"&&(c=c.slice(1),i=!i),c.endsWith(":")){n[c=="dark:"?"unshift":"push"](c.slice(0,-1));continue}c[0]=="-"&&(c=c.slice(1),s=!s),c.endsWith("-")&&(c=c.slice(0,-1)),c&&c!="&"&&(o+=(o&&"-")+c)}o&&(s&&(o="-"+o),t[0].push({n:o,v:n.filter(mp),i}))}}function mp(e,t,r){return r.indexOf(e)==t}var al=new Map;function Kn(e){let t=al.get(e);if(!t){let r=[],n=[[]],i=0,s=0,o=null,c=0,l=(u,p=0)=>{i!=c&&(r.push(e.slice(i,c+p)),u&&Ns(r,n)),i=c+1};for(;c<e.length;c++){let u=e[c];if(s)e[c-1]!="\\"&&(s+=+(u=="[")||-(u=="]"));else if(u=="[")s+=1;else if(o)e[c-1]!="\\"&&o.test(e.slice(c))&&(o=null,i=c+RegExp.lastMatch.length);else if(u=="/"&&e[c-1]!="\\"&&(e[c+1]=="*"||e[c+1]=="/"))o=e[c+1]=="*"?/^\*\//:/^[\r\n]/;else if(u=="(")l(),r.push(u);else if(u==":")e[c+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(u)){l(!0);let p=r.lastIndexOf("(");if(u==")"){let h=r[p-1];if(/[~@]$/.test(h)){let v=n.shift();r.length=p,Ns([...r,"#"],n);let{v:b}=n[0].pop();for(let S of v)S.v.splice(+(S.v[0]=="dark")-+(b[0]=="dark"),b.length);Ns([...r,fp(h.length>1?h.slice(0,-1)+Zn(JSON.stringify([h,v])):h+"("+hp(v)+")",Y.a,v,/@$/.test(h))],n)}p=r.lastIndexOf("(",p-1)}r.length=p+1}else/[~@]/.test(u)&&e[c+1]=="("&&n.unshift([])}l(!0),al.set(e,t=n[0])}return t}function w(e,t,r){return[e,zs(t,r)]}function zs(e,t){return typeof e=="function"?e:typeof e=="string"&&/^[\w-]+$/.test(e)?(r,n)=>({[e]:t?t(r,n):qs(r,1)}):r=>e||{[r[1]]:qs(r,2)}}function qs(e,t,r=e.slice(t).find(Boolean)||e.$$||e.input){return e.input[0]=="-"?`calc(${r} * -1)`:r}function x(e,t,r,n){return[e,Xs(t,r,n)]}function Xs(e,t,r){let n=typeof t=="string"?(i,s)=>({[t]:r?r(i,s):i._}):t||(({1:i,_:s},o,c)=>({[i||c]:s}));return(i,s)=>{let o=gl(e||i[1]),c=s.theme(o,i.$$)??Ae(i.$$,o,s);if(c!=null)return i._=qs(i,0,c),n(i,s,o)}}function Q(e,t={},r){return[e,gp(t,r)]}function gp(e={},t){return(r,n)=>{let{section:i=gl(r[0]).replace("-","")+"Color"}=e,[s,o]=yp(r.$$);if(!s)return;let c=n.theme(i,s)||Ae(s,i,n);if(!c||typeof c=="object")return;let{opacityVariable:l=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:u=i.replace("Color","Opacity"),property:p=i,selector:h}=e,v=n.theme(u,o||"DEFAULT")||o&&Ae(o,u,n),b=t||(({_:O})=>{let C=Rr(p,O);return h?{[h]:C}:C});r._={value:ge(c,{opacityVariable:l||void 0,opacityValue:v||void 0}),color:O=>ge(c,O),opacityVariable:l||void 0,opacityValue:v||void 0};let S=b(r,n);if(!r.dark){let O=n.d(i,s,c);O&&O!==c&&(r._={value:ge(O,{opacityVariable:l||void 0,opacityValue:v||"1"}),color:C=>ge(O,C),opacityVariable:l||void 0,opacityValue:v||void 0},S={"&":S,[n.v("dark")]:b(r,n)})}return S}}function yp(e){return(e.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Rr(e,t){let r={};return typeof t=="string"?r[e]=t:(t.opacityVariable&&t.value.includes(t.opacityVariable)&&(r[t.opacityVariable]=t.opacityValue||"1"),r[e]=t.value),r}function Ae(e,t,r){if(e[0]=="["&&e.slice(-1)=="]"){if(e=zt(Ks(e.slice(1,-1),r.theme)),!t)return e;if(!(/color|fill|stroke/i.test(t)&&!(/^color:/.test(e)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(e))||/image/i.test(t)&&!(/^image:/.test(e)||/^[a-z-]+\(/.test(e))||/weight/i.test(t)&&!(/^(number|any):/.test(e)||/^\d+$/.test(e))||/position/i.test(t)&&/^(length|size):/.test(e)))return e.replace(/^[a-z-]+:/,"")}}function gl(e){return e.replace(/-./g,t=>t[1].toUpperCase())}function zt(e){return e.includes("url(")?e.replace(/(.*?)(url\(.*?\))(.*?)/g,(t,r="",n,i="")=>zt(r)+n+zt(i)):e.replace(/(^|[^\\])_+/g,(t,r)=>r+" ".repeat(t.length-r.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,t=>t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function Ys({presets:e=[],...t}){let r={darkMode:void 0,darkColor:void 0,preflight:t.preflight!==!1&&[],theme:{},variants:R(t.variants),rules:R(t.rules),ignorelist:R(t.ignorelist),hash:void 0,stringify:(n,i)=>n+":"+i,finalize:[]};for(let n of R([...e,{darkMode:t.darkMode,darkColor:t.darkColor,preflight:t.preflight!==!1&&R(t.preflight),theme:t.theme,hash:t.hash,stringify:t.stringify,finalize:t.finalize}])){let{preflight:i,darkMode:s=r.darkMode,darkColor:o=r.darkColor,theme:c,variants:l,rules:u,ignorelist:p,hash:h=r.hash,stringify:v=r.stringify,finalize:b}=typeof n=="function"?n(r):n;r={preflight:r.preflight!==!1&&i!==!1&&[...r.preflight,...R(i)],darkMode:s,darkColor:o,theme:{...r.theme,...c,extend:{...r.theme.extend,...c?.extend}},variants:[...r.variants,...R(l)],rules:[...r.rules,...R(u)],ignorelist:[...r.ignorelist,...R(p)],hash:h,stringify:v,finalize:[...r.finalize,...R(b)]}}return r}function ll(e,t,r,n,i,s){for(let o of t){let c=r.get(o);c||r.set(o,c=n(o));let l=c(e,i,s);if(l)return l}}function wp(e){var t;return Ws(e[0],typeof(t=e[1])=="function"?t:()=>t)}function vp(e){var t,r;return Array.isArray(e)?Ws(e[0],zs(e[1],e[2])):Ws(e,zs(t,r))}function Ws(e,t){return yl(e,(r,n,i,s)=>{let o=n.exec(r);if(o)return o.$$=r.slice(o[0].length),o.dark=s,t(o,i)})}function yl(e,t){let r=R(e).map(xp);return(n,i,s)=>{for(let o of r){let c=t(n,o,i,s);if(c)return c}}}function xp(e){return typeof e=="string"?RegExp("^"+e+(e.includes("$")||e.slice(-1)=="-"?"":"$")):e}function wl(e,t){let r=Ys(e),n=(function({theme:l,darkMode:u,darkColor:p=Xn,variants:h,rules:v,hash:b,stringify:S,ignorelist:O,finalize:C}){let A=new Map,k=new Map,E=new Map,T=new Map,N=yl(O,(D,re)=>re.test(D));h.push(["dark",Array.isArray(u)||u=="class"?`${R(u)[1]||".dark"} &`:typeof u=="string"&&u!="media"?u:"@media (prefers-color-scheme:dark)"]);let J=typeof b=="function"?D=>b(D,Zn):b?Zn:nl;J!==nl&&C.push(D=>({...D,n:D.n&&J(D.n),d:D.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(re,ae)=>"--"+J(ae).replace("#",""))}));let te={theme:(function({extend:D={},...re}){let ae={},ss={get colors(){return Qe("colors")},theme:Qe,negative(){return{}},breakpoints(W){let ne={};for(let ce in W)typeof W[ce]=="string"&&(ne["screen-"+ce]=W[ce]);return ne}};return Qe;function Qe(W,ne,ce,yr){if(W){if({1:W,2:yr}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(W)||[,W],/[.[]/.test(W)){let Oe=[];W.replace(/\[([^\]]+)\]|([^.[]+)/g,(tt,vr,Au=vr)=>Oe.push(Au)),W=Oe.shift(),ce=ne,ne=Oe.join("-")}let Ee=ae[W]||Object.assign(Object.assign(ae[W]={},An(re,W)),An(D,W));if(ne==null)return Ee;ne||(ne="DEFAULT");let et=Ee[ne]??ne.split("-").reduce((Oe,tt)=>Oe?.[tt],Ee)??ce;return yr?ge(et,{opacityValue:Ks(yr,Qe)}):et}let wr={};for(let Ee of[...Object.keys(re),...Object.keys(D)])wr[Ee]=Qe(Ee);return wr}function An(W,ne){let ce=W[ne];return typeof ce=="function"&&(ce=ce(ss)),ce&&/color|fill|stroke/i.test(ne)?(function yr(wr,Ee=[]){let et={};for(let Oe in wr){let tt=wr[Oe],vr=[...Ee,Oe];et[vr.join("-")]=tt,Oe=="DEFAULT"&&(vr=Ee,et[Ee.join("-")]=tt),typeof tt=="object"&&Object.assign(et,yr(tt,vr))}return et})(ce):ce}})(l),e:cl,h:J,s(D,re){return S(D,re,te)},d(D,re,ae){return p(D,re,te,ae)},v(D){return A.has(D)||A.set(D,ll(D,h,k,wp,te)||"&:"+D),A.get(D)},r(D,re){let ae=JSON.stringify([D,re]);return E.has(ae)||E.set(ae,!N(D,te)&&ll(D,v,T,vp,te,re)),E.get(ae)},f(D){return C.reduce((re,ae)=>ae(re,te),D)}};return te})(r),i=new Map,s=[],o=new Set;t.resume(l=>i.set(l,l),(l,u)=>{t.insert(l,s.length,u),s.push(u),o.add(l)});function c(l){let u=n.f(l),p=Fs(u);if(p&&!o.has(p)){o.add(p);let h=hl(s,l);t.insert(p,h,l),s.splice(h,0,l)}return u.n}return Object.defineProperties(function(u){if(!i.size)for(let h of R(r.preflight))typeof h=="function"&&(h=h(n)),h&&(typeof h=="string"?Js("",Y.b,Kn(h),n,Y.b,[],!1,!0):fl(h,{},n,Y.b)).forEach(c);u=""+u;let p=i.get(u);if(!p){let h=new Set;for(let v of Gn(Kn(u),n))h.add(v.c).add(c(v));p=[...h].filter(Boolean).join(" "),i.set(u,p).set(p,p)}return p},Object.getOwnPropertyDescriptors({get target(){return t.target},theme:n.theme,config:r,snapshot(){let l=t.snapshot(),u=new Set(o),p=new Map(i),h=[...s];return()=>{l(),o=u,i=p,s=h}},clear(){t.clear(),o=new Set,i=new Map,s=[]},destroy(){this.clear(),t.destroy()}}))}function bp(e,t){return e!=t&&""+e.split(" ").sort()!=""+t.split(" ").sort()}function vl(e){let t=new MutationObserver(r);return{observe(i){t.observe(i,{attributeFilter:["class"],subtree:!0,childList:!0}),n(i),r([{target:i,type:""}])},disconnect(){t.disconnect()}};function r(i){for(let{type:s,target:o}of i)if(s[0]=="a")n(o);else for(let c of o.querySelectorAll("[class]"))n(c);t.takeRecords()}function n(i){let s,o=i.getAttribute?.("class");o&&bp(o,s=e(o))&&i.setAttribute("class",s)}}function kp(e){let t=document.querySelector(e||'style[data-twind=""]');return(!t||t.tagName!="STYLE")&&(t=document.createElement("style"),document.head.prepend(t)),t.dataset.twind="claimed",t}function Yn(e){let t=e?.cssRules?e:(e&&typeof e!="string"?e:kp(e)).sheet;return{target:t,snapshot(){let r=Array.from(t.cssRules,n=>n.cssText);return()=>{this.clear(),r.forEach(this.insert)}},clear(){for(let r=t.cssRules.length;r--;)t.deleteRule(r)},destroy(){t.ownerNode?.remove()},insert(r,n){try{t.insertRule(r,n)}catch{t.insertRule(":root{}",n)}},resume:Xn}}var Cp=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function xl(e){return Cp.get(e)}function bl(e){var t=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(e);return t?t[1]?1:t[2]?2:t[3]?3:5:0}function kl(e,t){var r=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(e);return r?r[1]?/^sti/i.test(t)?1:0:r[2]?/^pat/i.test(t)?1:0:r[3]?/^image-/i.test(t)?1:0:r[4]?t[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(t)?4:0:0}var Sp=[["-webkit-",1],["-moz-",2],["-ms-",4]];function Cl(){return({stringify:e})=>({stringify(t,r,n){let i="",s=xl(t);s&&(i+=e(s,r,n)+";");let o=bl(t),c=kl(t,r);for(let l of Sp)o&l[1]&&(i+=e(l[0]+t,r,n)+";"),c&l[1]&&(i+=e(t,l[0]+r,n)+";");return i+e(t,r,n)}})}function $l(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",Xs("lineClamp",({_:e})=>Sl(e))],["line-clamp-(\\d+)",({1:e})=>Sl(e)]]}}function Sl(e){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${e}`}}var Vr={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...he(4,"rem",4,.5,.5),...he(12,"rem",4,5),14:"3.5rem",...he(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:L("blur"),backdropBrightness:L("brightness"),backdropContrast:L("contrast"),backdropGrayscale:L("grayscale"),backdropHueRotate:L("hueRotate"),backdropInvert:L("invert"),backdropOpacity:L("opacity"),backdropSaturate:L("saturate"),backdropSepia:L("sepia"),backgroundColor:L("colors"),backgroundImage:{none:"none"},backgroundOpacity:L("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...he(200,"",100,0,50),...he(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:e})=>({DEFAULT:e("colors.gray.200","currentColor"),...e("colors")}),borderOpacity:L("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:L("spacing"),borderWidth:{DEFAULT:"1px",...ye(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:L("colors"),caretColor:L("colors"),accentColor:({theme:e})=>({auto:"auto",...e("colors")}),contrast:{...he(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:L("borderColor"),divideOpacity:L("borderOpacity"),divideWidth:L("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:e})=>({...e("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({...e("spacing"),...Ur(2,6),...Ur(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:L("spacing"),gradientColorStops:L("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:e})=>({...e("spacing"),...Ur(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:e})=>({...e("spacing"),...Ur(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...he(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),maxHeight:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...e("spacing")}),maxWidth:({theme:e,breakpoints:t})=>({...t(e("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...he(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:L("spacing"),placeholderColor:L("colors"),placeholderOpacity:L("opacity"),outlineColor:L("colors"),outlineOffset:ye(8,"px"),outlineWidth:ye(8,"px"),ringColor:({theme:e})=>({...e("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:L("colors"),ringOffsetWidth:ye(8,"px"),ringOpacity:({theme:e})=>({...e("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...ye(8,"px")},rotate:{...ye(2,"deg"),...ye(12,"deg",3),...ye(180,"deg",45)},saturate:he(200,"",100,0,50),scale:{...he(150,"",100,0,50),...he(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:L("spacing"),scrollPadding:L("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...ye(2,"deg"),...ye(12,"deg",3)},space:L("spacing"),stroke:({theme:e})=>({...e("colors"),none:"none"}),strokeWidth:he(2),textColor:L("colors"),textDecorationColor:L("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...ye(8,"px")},textUnderlineOffset:{auto:"auto",...ye(8,"px")},textIndent:L("spacing"),textOpacity:L("opacity"),transitionDuration:({theme:e})=>({...e("durations"),DEFAULT:"150ms"}),transitionDelay:L("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:e})=>({...e("spacing"),...Ur(2,4),full:"100%"}),width:({theme:e})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...e("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...he(50,"",1,0,10),auto:"auto"}};function Ur(e,t){let r={};do for(var n=1;n<e;n++)r[`${n}/${e}`]=Number((n/e*100).toFixed(6))+"%";while(++e<=t);return r}function ye(e,t,r=0){let n={};for(;r<=e;r=2*r||1)n[r]=r+t;return n}function he(e,t="",r=1,n=0,i=1,s={}){for(;n<=e;n+=i)s[n]=n/r+t;return s}function L(e){return({theme:t})=>t(e)}var El={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${Vr.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${Vr.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}};var Tl=[w("\\[([-\\w]+):(.+)]",({1:e,2:t},r)=>({"@layer overrides":{"&":{[e]:Ae(`[${t}]`,"",r)}}})),w("(group|peer)([~/][^-[]+)?",({input:e},{h:t})=>[{c:t(e)}]),x("aspect-","aspectRatio"),w("container",(e,{theme:t})=>{let{screens:r=t("screens"),center:n,padding:i}=t("container"),s={width:"100%",marginRight:n&&"auto",marginLeft:n&&"auto",...o("xs")};for(let c in r){let l=r[c];typeof l=="string"&&(s[Jn(l)]={"&":{maxWidth:l,...o(c)}})}return s;function o(c){let l=i&&(typeof i=="string"?i:i[c]||i.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),x("content-","content",({_:e})=>({"--tw-content":e,content:"var(--tw-content)"})),w("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),w("box-(border|content)","boxSizing",({1:e})=>e+"-box"),w("hidden",{display:"none"}),w("table-(auto|fixed)","tableLayout"),w(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",w("isolate","isolation"),w("object-(contain|cover|fill|none|scale-down)","objectFit"),x("object-","objectPosition"),w("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Qn),w("overscroll(-[xy])?-(auto|contain|none)",({1:e="",2:t})=>({["overscroll-behavior"+e]:t})),w("(static|fixed|absolute|relative|sticky)","position"),x("-?inset(-[xy])?(?:$|-)","inset",({1:e,_:t})=>({top:e!="-x"&&t,right:e!="-y"&&t,bottom:e!="-x"&&t,left:e!="-y"&&t})),x("-?(top|bottom|left|right)(?:$|-)","inset"),w("(visible|collapse)","visibility"),w("invisible",{visibility:"hidden"}),x("-?z-","zIndex"),w("flex-((row|col)(-reverse)?)","flexDirection",_l),w("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),x("(flex-(?:grow|shrink))(?:$|-)"),x("(flex)-"),x("grow(?:$|-)","flexGrow"),x("shrink(?:$|-)","flexShrink"),x("basis-","flexBasis"),x("-?(order)-"),"-?(order)-(\\d+)",x("grid-cols-","gridTemplateColumns"),w("grid-cols-(\\d+)","gridTemplateColumns",Ol),x("col-","gridColumn"),w("col-(span)-(\\d+)","gridColumn",Il),x("col-start-","gridColumnStart"),w("col-start-(auto|\\d+)","gridColumnStart"),x("col-end-","gridColumnEnd"),w("col-end-(auto|\\d+)","gridColumnEnd"),x("grid-rows-","gridTemplateRows"),w("grid-rows-(\\d+)","gridTemplateRows",Ol),x("row-","gridRow"),w("row-(span)-(\\d+)","gridRow",Il),x("row-start-","gridRowStart"),w("row-start-(auto|\\d+)","gridRowStart"),x("row-end-","gridRowEnd"),w("row-end-(auto|\\d+)","gridRowEnd"),w("grid-flow-((row|col)(-dense)?)","gridAutoFlow",e=>Qn(_l(e))),w("grid-flow-(dense)","gridAutoFlow"),x("auto-cols-","gridAutoColumns"),x("auto-rows-","gridAutoRows"),x("gap-x(?:$|-)","gap","columnGap"),x("gap-y(?:$|-)","gap","rowGap"),x("gap(?:$|-)","gap"),"(justify-(?:items|self))-",w("justify-","justifyContent",Al),w("(content|items|self)-",e=>({["align-"+e[1]]:Al(e)})),w("(place-(content|items|self))-",({1:e,$$:t})=>({[e]:("wun".includes(t[3])?"space-":"")+t})),x("p([xytrbl])?(?:$|-)","padding",qt("padding")),x("-?m([xytrbl])?(?:$|-)","margin",qt("margin")),x("-?space-(x|y)(?:$|-)","space",({1:e,_:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[e]]:`calc(${t} * calc(1 - var(--tw-space-${e}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[e]]:`calc(${t} * var(--tw-space-${e}-reverse))`}})),w("space-(x|y)-reverse",({1:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"1"}})),x("w-","width"),x("min-w-","minWidth"),x("max-w-","maxWidth"),x("h-","height"),x("min-h-","minHeight"),x("max-h-","maxHeight"),x("font-","fontWeight"),x("font-","fontFamily",({_:e})=>typeof(e=R(e))[1]=="string"?{fontFamily:ke(e)}:{fontFamily:ke(e[0]),...e[1]}),w("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),w("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),w("italic","fontStyle"),w("not-italic",{fontStyle:"normal"}),w("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:e,2:t="",3:r})=>t=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(r?"numeric-fraction":"pt".includes(t[0])?"numeric-spacing":t?"numeric-figure":e)]:e,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...Fe({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),x("tracking-","letterSpacing"),x("leading-","lineHeight"),w("list-(inside|outside)","listStylePosition"),x("list-","listStyleType"),w("list-","listStyleType"),x("placeholder-opacity-","placeholderOpacity",({_:e})=>({"&::placeholder":{"--tw-placeholder-opacity":e}})),Q("placeholder-",{property:"color",selector:"&::placeholder"}),w("text-(left|center|right|justify|start|end)","textAlign"),w("text-(ellipsis|clip)","textOverflow"),x("text-opacity-","textOpacity","--tw-text-opacity"),Q("text-",{property:"color"}),x("text-","fontSize",({_:e})=>typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}),x("indent-","textIndent"),w("(overline|underline|line-through)","textDecorationLine"),w("no-underline",{textDecorationLine:"none"}),x("underline-offset-","textUnderlineOffset"),Q("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),x("decoration-","textDecorationThickness"),w("decoration-","textDecorationStyle"),w("(uppercase|lowercase|capitalize)","textTransform"),w("normal-case",{textTransform:"none"}),w("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),w("align-","verticalAlign"),w("whitespace-","whiteSpace"),w("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),w("break-words",{overflowWrap:"break-word"}),w("break-all",{wordBreak:"break-all"}),w("break-keep",{wordBreak:"keep-all"}),Q("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Q("accent-",{opacityVariable:!1,opacitySection:"opacity"}),w("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:e})=>`linear-gradient(to ${ht(e," ")},var(--tw-gradient-stops))`),Q("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-from":e.value,"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Q("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${e.value},var(--tw-gradient-to)`})),Q("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),w("bg-(fixed|local|scroll)","backgroundAttachment"),w("bg-origin-(border|padding|content)","backgroundOrigin",({1:e})=>e+"-box"),w(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),w("bg-blend-","backgroundBlendMode"),w("bg-clip-(border|padding|content|text)","backgroundClip",({1:e})=>e+(e=="text"?"":"-box")),x("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Q("bg-",{section:"backgroundColor"}),x("bg-","backgroundImage"),x("bg-","backgroundPosition"),w("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Qn),x("bg-","backgroundSize"),x("rounded(?:$|-)","borderRadius"),x("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:e,_:t})=>{let r={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[e]||[e,e];return{[`border-${ht(r[0])}-radius`]:t,[`border-${ht(r[1])}-radius`]:t}}),w("border-(collapse|separate)","borderCollapse"),x("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),w("border-(solid|dashed|dotted|double|none)","borderStyle"),x("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:e,_:t})=>({...Fe({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(e||"-x")]:t,["--tw-border-spacing"+(e||"-y")]:t,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Q("border-([xytrbl])-",{section:"borderColor"},qt("border","Color")),Q("border-"),x("border-([xytrbl])(?:$|-)","borderWidth",qt("border","Width")),x("border(?:$|-)","borderWidth"),x("divide-opacity(?:$|-)","divideOpacity",({_:e})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":e}})),w("divide-(solid|dashed|dotted|double|none)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:e}})),w("divide-([xy]-reverse)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+e]:"1"}})),x("divide-([xy])(?:$|-)","divideWidth",({1:e,_:t})=>{let r={x:"lr",y:"tb"}[e];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${e}-reverse`]:"0",[`border-${ht(r[0])}Width`]:`calc(${t} * calc(1 - var(--tw-divide-${e}-reverse)))`,[`border-${ht(r[1])}Width`]:`calc(${t} * var(--tw-divide-${e}-reverse))`}}}),Q("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),x("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Q("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),x("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),w("ring-inset",{"--tw-ring-inset":"inset"}),Q("ring-",{property:"--tw-ring-color"}),x("ring(?:$|-)","ringWidth",({_:e},{theme:t})=>({...Fe({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":ge(t("ringOffsetColor","","#fff")),"--tw-ring-color":ge(t("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":t("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${e} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Q("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-shadow-color":e.value,"--tw-shadow":"var(--tw-shadow-colored)"})),x("shadow(?:$|-)","boxShadow",({_:e})=>({...Fe({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":ke(e),"--tw-shadow-colored":ke(e).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),x("(opacity)-"),w("mix-blend-","mixBlendMode"),...Ml(),...Ml("backdrop-"),x("transition(?:$|-)","transitionProperty",(e,{theme:t})=>({transitionProperty:ke(e),transitionTimingFunction:e._=="none"?void 0:ke(t("transitionTimingFunction","")),transitionDuration:e._=="none"?void 0:ke(t("transitionDuration",""))})),x("duration(?:$|-)","transitionDuration","transitionDuration",ke),x("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",ke),x("delay(?:$|-)","transitionDelay","transitionDelay",ke),x("animate(?:$|-)","animation",(e,{theme:t,h:r,e:n})=>{let i=ke(e),s=i.split(" "),o=t("keyframes",s[0]);return o?{["@keyframes "+(s[0]=n(r(s[0])))]:o,animation:s.join(" ")}:{animation:i}}),"(transform)-(none)",w("transform",eo),w("transform-(cpu|gpu)",({1:e})=>({"--tw-transform":jl(e=="gpu")})),x("scale(-[xy])?-","scale",({1:e,_:t})=>({["--tw-scale"+(e||"-x")]:t,["--tw-scale"+(e||"-y")]:t,...eo()})),x("-?(rotate)-","rotate",Qs),x("-?(translate-[xy])-","translate",Qs),x("-?(skew-[xy])-","skew",Qs),w("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Qn),"(appearance)-",x("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",x("(cursor)-"),"(cursor)-",w("snap-(none)","scroll-snap-type"),w("snap-(x|y|both)",({1:e})=>({...Fe({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":e+" var(--tw-scroll-snap-strictness)"})),w("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),w("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),w("snap-(normal|always)","scroll-snap-stop"),w("scroll-(auto|smooth)","scroll-behavior"),x("scroll-p([xytrbl])?(?:$|-)","padding",qt("scroll-padding")),x("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",qt("scroll-margin")),w("touch-(auto|none|manipulation)","touch-action"),w("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:e,2:t,3:r})=>({...Fe({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${t?"pan-x":r?"pan-y":e}`]:e,"touch-action":"var(--tw-touch-action)"})),w("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),w("outline",{outlineStyle:"solid"}),w("outline-(dashed|dotted|double)","outlineStyle"),x("-?(outline-offset)-"),Q("outline-",{opacityVariable:!1,opacitySection:"opacity"}),x("outline-","outlineWidth"),"(pointer-events)-",x("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:e})=>({x:"horizontal",y:"vertical"})[e]||e||"both"],w("select-(none|text|all|auto)","userSelect"),Q("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Q("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),x("stroke-","strokeWidth"),w("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),w("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Qn(e){return(typeof e=="string"?e:e[1]).replace(/-/g," ").trim()}function _l(e){return(typeof e=="string"?e:e[1]).replace("col","column")}function ht(e,t="-"){let r=[];for(let n of e)r.push({t:"top",r:"right",b:"bottom",l:"left"}[n]);return r.join(t)}function ke(e){return e&&""+(e._||e)}function Al({$$:e}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[e[3]||""]||"")+e}function qt(e,t=""){return({1:r,_:n})=>{let i={x:"lr",y:"tb"}[r]||r+r;return i?{...Rr(e+"-"+ht(i[0])+t,n),...Rr(e+"-"+ht(i[1])+t,n)}:Rr(e+t,n)}}function Ml(e=""){let t=["blur","brightness","contrast","grayscale","hue-rotate","invert",e&&"opacity","saturate","sepia",!e&&"drop-shadow"].filter(Boolean),r={};for(let n of t)r[`--tw-${e}${n}`]="var(--tw-empty,/*!*/ /*!*/)";return r={...Fe(r),[`${e}filter`]:t.map(n=>`var(--tw-${e}${n})`).join(" ")},[`(${e}filter)-(none)`,w(`${e}filter`,r),...t.map(n=>x(`${n[0]=="h"?"-?":""}(${e}${n})(?:$|-)`,n,({1:i,_:s})=>({[`--tw-${i}`]:R(s).map(o=>`${n}(${o})`).join(" "),...r})))]}function Qs({1:e,_:t}){return{["--tw-"+e]:t,...eo()}}function eo(){return{...Fe({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":jl()}),transform:"var(--tw-transform)"}}function jl(e){return[e?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function Il({1:e,2:t}){return`${e} ${t} / ${e} ${t}`}function Ol({1:e}){return`repeat(${e},minmax(0,1fr))`}function Fe(e){return{"@layer defaults":{"*,::before,::after":e,"::backdrop":e}}}var Ll=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:e})=>`@media (orientation:${e})`],["contrast-(more|less)",({1:e})=>`@media (prefers-contrast:${e})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:e})=>`&::${e}`],["(marker|selection)",({1:e})=>`& *::${e},&::${e}`],["file","&::file-selector-button"],["(first|last|only)",({1:e})=>`&:${e}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:e,$$:t},r)=>t&&`&[${e}-${r.theme(e,t)||Ae(t,"",r)||`${t}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:e,3:t="",4:r,5:n="",6:i=t},{e:s,h:o,v:c})=>{let l=zt(n)||(r[0]=="["?r:c(r.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(o(e+i))})`)}${e[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:e})=>`[dir="${e}"] &`],["supports-",({$$:e},t)=>{if(e&&(e=t.theme("supports",e)||Ae(e,"",t)),e)return e.includes(":")||(e+=":var(--tw)"),/^\w*\s*\(/.test(e)||(e=`(${e})`),`@supports ${e.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:e},t)=>{if(e&&(e=t.theme("screens",e)||Ae(e,"",t)),typeof e=="string")return`@media not all and (min-width:${e})`}],["min-",({$$:e},t)=>(e&&(e=Ae(e,"",t)),e&&`@media (min-width:${e})`)],[/^\[(.+)]$/,({1:e})=>/[&@]/.test(e)&&zt(e).replace(/[}]+$/,"").split("{")]];function Dl({colors:e,disablePreflight:t}={}){return{preflight:t?void 0:El,theme:{...Vr,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...e}},variants:Ll,rules:Tl,finalize(r){return r.n&&r.d&&r.r.some(n=>/^&::(before|after)$/.test(n))&&!/(^|;)content:/.test(r.d)?{...r,d:"content:var(--tw-content);"+r.d}:r}}}var $p={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},Ep={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},_p={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Ap={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},Mp={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},Ip={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},Op={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},Tp={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},jp={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},Lp={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},Dp={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},Pp={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},Rp={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},Up={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},Vp={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},Bp={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},Np={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},Hp={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},Fp={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},zp={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},qp={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},Wp={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},Pl={__proto__:null,slate:$p,gray:Ep,zinc:_p,neutral:Ap,stone:Mp,red:Ip,orange:Op,amber:Tp,yellow:jp,lime:Lp,green:Dp,emerald:Pp,teal:Rp,cyan:Up,sky:Vp,blue:Bp,indigo:Np,violet:Hp,purple:Fp,fuchsia:zp,pink:qp,rose:Wp};function Rl({disablePreflight:e}={}){return Dl({colors:Pl,disablePreflight:e})}function Bl({className:e="prose",defaultColor:t="gray",extend:r={},colors:n={}}={}){return n={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...n,dark:n.dark===null?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...n.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([s,o=s])=>[`${e}-${s}`,(c,l)=>Nl(e,o[0]=="."?"."+l.e(l.h(o.slice(1))):o,l,u=>`& :is(${u.trim()})`)]),rules:[[`(lead|not-${e})`,({1:s},{h:o})=>[{c:o(s)}]],[`${e}-invert`,{"@layer base":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[e+"-",({$$:s},o)=>{let c=Vl(o.theme("fontSize",s));return c&&{"@layer components":c}}],[e+"-",({$$:s},o)=>i(s,o)],[e,(s,o)=>({...i(t,o),"@layer base":[Ul(e,o,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong,blockquote strong,thead th strong":{color:"inherit"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:$(20,16),marginBottom:$(20,16),paddingLeft:$(26,16)},li:{marginTop:$(8,16),marginBottom:$(8,16)},"ol>li,ul>li":{paddingLeft:$(6,16)},">ul>li p":{marginTop:$(12,16),marginBottom:$(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:$(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:$(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:$(12,16),marginBottom:$(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:$(48,16),marginBottom:$(48,16)},blockquote:{marginTop:$(32,20),marginBottom:$(32,20),paddingLeft:$(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:$(20,16),marginBottom:$(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:$(36,16),marginTop:"0",marginBottom:$(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:$(24,16),marginTop:$(48,24),marginBottom:$(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:$(20,16),marginTop:$(32,20),marginBottom:$(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:$(24,16),marginBottom:$(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:$(32,16),marginBottom:$(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:$(14,16),lineHeight:"1.4",marginTop:$(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:$(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:$(21,24)},"h3 code":{fontSize:$(18,20)},"a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:$(14,16),lineHeight:"1.7",marginTop:$(24,14),marginBottom:$(24,14),borderRadius:"0.375rem",paddingTop:$(12,14),paddingRight:$(16,14),paddingBottom:$(12,14),paddingLeft:$(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:$(32,16),marginBottom:$(32,16),fontSize:$(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:$(8,14),paddingBottom:$(8,14),paddingLeft:$(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td,tfoot td":{verticalAlign:"baseline",paddingTop:$(8,14),paddingRight:$(8,14),paddingBottom:$(8,14),paddingLeft:$(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${o.e(o.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:$(20,16),lineHeight:"1.6",marginTop:$(24,20),marginBottom:$(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),Ul(e,o,r)],"@layer components":{...Vl(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function i(s,o){let c={},l={},u=(p,h,v)=>{let b=o.theme(`colors.${s}.${h}`,h);v["--tw-prose-"+p]=ge(b);let S=v!=l&&o.d("colors",`${s}-${h}`,b);S&&(l["--tw-prose-"+p]=ge(S))};for(let p in n){let h=n[p];p!="dark"&&h&&u(p,h,c)}for(let p in n.dark||{}){let h=n.dark[p];h&&(n.dark?u("invert-"+p,h,c):u(p,h,l))}return Object.keys(c).length?{"@layer defaults":{"&":c,[o.v("dark")]:l}}:void 0}}function Ul(e,t,r){let n={};for(let i in r)n[Nl(e,i,t,s=>`.${t.e(t.h(e))}${s}`)]=r[i];return n}function Nl(e,t,{e:r,h:n},i){return t.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,o=" ",c=s,l="")=>i(`${o}:where(${c}):not(:where(.${r(n("not-"+e))} *))${l}`))}function Vl(e){return e?typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}:void 0}function $(e,t){return`${(e/t).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var to=Ys({hash:!1,darkMode:"class",theme:{extend:{colors:{violet:{DEFAULT:"#601feb",50:"#f3f2ff",100:"#eae7ff",200:"#d7d2ff",300:"#baaeff",400:"#9980ff",500:"#784dff",600:"#6829fe",700:"#601feb",800:"#4b12c5",900:"#3f11a1",950:"#25086d"},pink:{DEFAULT:"#ff0bbb",50:"#fff0fc",100:"#ffe3fc",200:"#ffc6f9",300:"#ff98f2",400:"#ff58e5",500:"#ff27d5",600:"#ff0bbb",700:"#df0095",800:"#b8007b",900:"#980368",950:"#5f003b"},lime:{DEFAULT:"#b9e901",50:"#fdffe4",100:"#f9ffc5",200:"#f1ff92",300:"#e2ff54",400:"#d1fa21",500:"#b9e901",600:"#8ab400",700:"#688902",800:"#526b09",900:"#465a0d",950:"#243300"}},spacing:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},padding:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},lineHeight:{3:"12px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px"},maxWidth:{xs:"320px",sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px","3xl":"768px","4xl":"896px","5xl":"1024px","6xl":"1152px","7xl":"1280px"},maxHeight:{.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},borderRadius:{sm:"2px",DEFAULT:"4px",md:"6px",lg:"8px",xl:"12px","2xl":"16px","3xl":"24px"},fontSize:{xs:["12px","16px"],sm:["14px","20px"],base:["16px","24px"],lg:["18px","28px"],xl:["20px","28px"],"2xl":["24px","32px"],"3xl":["30px","36px"],"4xl":["36px","40px"],"5xl":["48px","1"],"6xl":["60px","1"],"7xl":["72px","1"],"8xl":["96px","1"],"9xl":["128px","1"]}}},presets:[Rl(),Cl(),$l(),Bl()]});function Hl(e,t=!0){let r=(function(){if(Zp)try{let l=Yn(new CSSStyleSheet);return l.connect=u=>{let p=ro(u);p.adoptedStyleSheets=[...p.adoptedStyleSheets,l.target]},l.disconnect=Xn,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let o=[Yn(s)],c=new WeakMap;return{get target(){return o[0].target},snapshot(){let l=o.map(u=>u.snapshot());return()=>l.forEach(u=>u())},clear(){o.forEach(l=>l.clear())},destroy(){o.forEach(l=>l.destroy())},insert(l,u,p){o[0].insert(l,u,p);let h=this.target.cssRules[u];o.forEach((v,b)=>b&&v.target.insertRule(h.cssText,u))},resume(l,u){return o[0].resume(l,u)},connect(l){let u=document.createElement("style");ro(l).appendChild(u);let p=Yn(u),{cssRules:h}=this.target;for(let v=0;v<h.length;v++)p.target.insertRule(h[v].cssText,v);o.push(p),c.set(l,p)},disconnect(l){let u=o.indexOf(c.get(l));u>=0&&o.splice(u,1)}}})(),n=wl({...e,hash:e.hash??t},r),i=vl(n);return function(o){return class extends o{connectedCallback(){super.connectedCallback?.(),r.connect(this),i.observe(ro(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=n}}}}var Zp=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function ro(e){return e.shadowRoot||e.attachShadow({mode:"open"})}var M=e=>Hl(to)(e);var Br=class extends M(_){constructor(){super(),this.color="#601feb",this.radius="16.8576px",this.size="320px",this.border="#d1d5db"}render(){return d`
|
|
125
125
|
<div class="flex flex-row flex-wrap gap-0">
|
|
126
126
|
<div class="relative z-0 flex min-h-9 items-center justify-center overflow-hidden" style="border-radius: ${this.radius};">
|
|
127
127
|
<!-- Spinning gradient background -->
|
|
@@ -133,7 +133,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
133
133
|
<slot></slot>
|
|
134
134
|
</div>
|
|
135
135
|
</div>
|
|
136
|
-
`}};
|
|
136
|
+
`}};y(Br,"properties",{color:{type:String},radius:{type:String},size:{type:String},border:{type:String}}),y(Br,"styles",ie`
|
|
137
137
|
:host {
|
|
138
138
|
display: block;
|
|
139
139
|
}
|
|
@@ -148,7 +148,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
148
148
|
transform: rotate(360deg);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
`);customElements.get("mw-spinning-border")||customElements.define("mw-spinning-border",
|
|
151
|
+
`);customElements.get("mw-spinning-border")||customElements.define("mw-spinning-border",Br);var Nr=class extends M(_){constructor(){super();y(this,"render",()=>d`
|
|
152
152
|
<div class="shadow-button inline-block transition-transform hover:scale-105 active:scale-90" style="border-radius: ${this.dynamicRadius};">
|
|
153
153
|
<mw-spinning-border .color="${this.color}" .border="${"#f9fafb"}" .radius="${this.dynamicRadius}">
|
|
154
154
|
<!-- we want the transform transition on the root element so that both the transform transition and state switch transition are continuous and fluid -->
|
|
@@ -159,14 +159,14 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
159
159
|
aria-label="Open Molin AI chat window">
|
|
160
160
|
<!-- the 'open' state invites the user to open (e.g. the chat window) -->
|
|
161
161
|
<div class="${this.state==="open"?"visible opacity-100":"invisible opacity-0"} absolute top-[1px] right-0 bottom-0 left-[1px] transition-[opacity,visibility]">
|
|
162
|
-
${this.src?
|
|
162
|
+
${this.src?d`
|
|
163
163
|
<!-- load given source -->
|
|
164
164
|
<img
|
|
165
165
|
class="flex items-center justify-center bg-white"
|
|
166
166
|
style="width: calc(${this.width} - 2px); height: calc(${this.height} - 2px); border-radius: ${this.dynamicRadius};"
|
|
167
167
|
src="${this.src}"
|
|
168
168
|
alt="Molin AI chat" />
|
|
169
|
-
`:
|
|
169
|
+
`:d`
|
|
170
170
|
<!-- the solid background with AI text -->
|
|
171
171
|
<div
|
|
172
172
|
class="flex items-center justify-center bg-[${this.backgroundColor}]"
|
|
@@ -205,7 +205,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
205
205
|
</button>
|
|
206
206
|
</mw-spinning-border>
|
|
207
207
|
</div>
|
|
208
|
-
`);this.state="open",this.color="#601feb",this.bubbleStyle="solid",this.src="",this.width="64px",this.height="64px"}get iconColor(){return this.bubbleStyle==="solid"?"#ffffff":this.color}get backgroundColor(){return this.bubbleStyle==="solid"?this.color:"#ffffff"}get svgSize(){let r=parseFloat(this.width),n=parseFloat(this.height),s=Math.min(r,n)*.55,o=s,
|
|
208
|
+
`);this.state="open",this.color="#601feb",this.bubbleStyle="solid",this.src="",this.width="64px",this.height="64px"}get iconColor(){return this.bubbleStyle==="solid"?"#ffffff":this.color}get backgroundColor(){return this.bubbleStyle==="solid"?this.color:"#ffffff"}get svgSize(){let r=parseFloat(this.width),n=parseFloat(this.height),s=Math.min(r,n)*.55,o=s,c=s/1.65;return{width:o,height:c}}get dynamicRadius(){let r=parseFloat(this.width),n=parseFloat(this.height);return`${Math.min(r,n)*.265}px`}};y(Nr,"properties",{state:{type:String},color:{type:String},bubbleStyle:{type:String},src:{type:String},width:{type:String},height:{type:String}}),y(Nr,"styles",ie`
|
|
209
209
|
.shadow-button {
|
|
210
210
|
box-shadow:
|
|
211
211
|
-58.9194px 74.8436px 38.218px rgba(0, 0, 0, 0.01),
|
|
@@ -213,7 +213,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
213
213
|
-14.3318px 19.109px 23.8863px rgba(0, 0, 0, 0.09),
|
|
214
214
|
-3.18483px 4.77725px 12.7393px rgba(0, 0, 0, 0.1);
|
|
215
215
|
}
|
|
216
|
-
`);customElements.get("mw-bubble")||customElements.define("mw-bubble",
|
|
216
|
+
`);customElements.get("mw-bubble")||customElements.define("mw-bubble",Nr);var Fl={airplay:`<svg
|
|
217
217
|
xmlns="http://www.w3.org/2000/svg"
|
|
218
218
|
width="24"
|
|
219
219
|
height="24"
|
|
@@ -226,20 +226,6 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
226
226
|
>
|
|
227
227
|
<path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1" />
|
|
228
228
|
<path d="m12 15 5 6H7Z" />
|
|
229
|
-
</svg>`,"badge-alert":`<svg
|
|
230
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
231
|
-
width="24"
|
|
232
|
-
height="24"
|
|
233
|
-
viewBox="0 0 24 24"
|
|
234
|
-
fill="none"
|
|
235
|
-
stroke="currentColor"
|
|
236
|
-
stroke-width="2"
|
|
237
|
-
stroke-linecap="round"
|
|
238
|
-
stroke-linejoin="round"
|
|
239
|
-
>
|
|
240
|
-
<path d="M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" />
|
|
241
|
-
<line x1="12" x2="12" y1="8" y2="12" />
|
|
242
|
-
<line x1="12" x2="12.01" y1="16" y2="16" />
|
|
243
229
|
</svg>`,phone:`<svg
|
|
244
230
|
xmlns="http://www.w3.org/2000/svg"
|
|
245
231
|
width="24"
|
|
@@ -278,7 +264,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
278
264
|
stroke-linecap="round"
|
|
279
265
|
stroke-linejoin="round"
|
|
280
266
|
>
|
|
281
|
-
<path d="
|
|
267
|
+
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />
|
|
282
268
|
</svg>`,info:`<svg
|
|
283
269
|
xmlns="http://www.w3.org/2000/svg"
|
|
284
270
|
width="24"
|
|
@@ -621,8 +607,8 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
621
607
|
stroke-linecap="round"
|
|
622
608
|
stroke-linejoin="round"
|
|
623
609
|
>
|
|
624
|
-
<
|
|
625
|
-
<
|
|
610
|
+
<polygon points="5 4 15 12 5 20 5 4" />
|
|
611
|
+
<line x1="19" x2="19" y1="5" y2="19" />
|
|
626
612
|
</svg>`,"skip-back":`<svg
|
|
627
613
|
xmlns="http://www.w3.org/2000/svg"
|
|
628
614
|
width="24"
|
|
@@ -634,8 +620,8 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
634
620
|
stroke-linecap="round"
|
|
635
621
|
stroke-linejoin="round"
|
|
636
622
|
>
|
|
637
|
-
<
|
|
638
|
-
<
|
|
623
|
+
<polygon points="19 20 9 12 19 4 19 20" />
|
|
624
|
+
<line x1="5" x2="5" y1="19" y2="5" />
|
|
639
625
|
</svg>`,"mouse-pointer-click":`<svg
|
|
640
626
|
xmlns="http://www.w3.org/2000/svg"
|
|
641
627
|
width="24"
|
|
@@ -677,7 +663,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
677
663
|
stroke-linecap="round"
|
|
678
664
|
stroke-linejoin="round"
|
|
679
665
|
>
|
|
680
|
-
<
|
|
666
|
+
<polygon points="6 3 20 12 6 21 6 3" />
|
|
681
667
|
</svg>`,pause:`<svg
|
|
682
668
|
xmlns="http://www.w3.org/2000/svg"
|
|
683
669
|
width="24"
|
|
@@ -689,8 +675,8 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
689
675
|
stroke-linecap="round"
|
|
690
676
|
stroke-linejoin="round"
|
|
691
677
|
>
|
|
692
|
-
<rect x="14" y="
|
|
693
|
-
<rect x="
|
|
678
|
+
<rect x="14" y="4" width="4" height="16" rx="1" />
|
|
679
|
+
<rect x="6" y="4" width="4" height="16" rx="1" />
|
|
694
680
|
</svg>`,"volume-off":`<svg
|
|
695
681
|
xmlns="http://www.w3.org/2000/svg"
|
|
696
682
|
width="24"
|
|
@@ -787,7 +773,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
787
773
|
stroke-linecap="round"
|
|
788
774
|
stroke-linejoin="round"
|
|
789
775
|
>
|
|
790
|
-
<path d="
|
|
776
|
+
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
|
|
791
777
|
<circle cx="12" cy="12" r="3" />
|
|
792
778
|
</svg>`,"dollar-sign":`<svg
|
|
793
779
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -875,7 +861,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
875
861
|
stroke-linecap="round"
|
|
876
862
|
stroke-linejoin="round"
|
|
877
863
|
>
|
|
878
|
-
<path d="
|
|
864
|
+
<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" />
|
|
879
865
|
</svg>`,"log-out":`<svg
|
|
880
866
|
xmlns="http://www.w3.org/2000/svg"
|
|
881
867
|
width="24"
|
|
@@ -1048,26 +1034,11 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1048
1034
|
stroke-linecap="round"
|
|
1049
1035
|
stroke-linejoin="round"
|
|
1050
1036
|
>
|
|
1051
|
-
<path d="
|
|
1052
|
-
<path d="M20
|
|
1053
|
-
<path d="M22
|
|
1054
|
-
<
|
|
1055
|
-
|
|
1056
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
1057
|
-
width="24"
|
|
1058
|
-
height="24"
|
|
1059
|
-
viewBox="0 0 24 24"
|
|
1060
|
-
fill="none"
|
|
1061
|
-
stroke="currentColor"
|
|
1062
|
-
stroke-width="2"
|
|
1063
|
-
stroke-linecap="round"
|
|
1064
|
-
stroke-linejoin="round"
|
|
1065
|
-
>
|
|
1066
|
-
<path d="M16 5h6" />
|
|
1067
|
-
<path d="M19 2v6" />
|
|
1068
|
-
<path d="M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5" />
|
|
1069
|
-
<path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" />
|
|
1070
|
-
<circle cx="9" cy="9" r="2" />
|
|
1037
|
+
<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z" />
|
|
1038
|
+
<path d="M20 3v4" />
|
|
1039
|
+
<path d="M22 5h-4" />
|
|
1040
|
+
<path d="M4 17v2" />
|
|
1041
|
+
<path d="M5 18H3" />
|
|
1071
1042
|
</svg>`,"external-link":`<svg
|
|
1072
1043
|
xmlns="http://www.w3.org/2000/svg"
|
|
1073
1044
|
width="24"
|
|
@@ -1140,26 +1111,26 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1140
1111
|
>
|
|
1141
1112
|
<rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
|
|
1142
1113
|
<path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
|
|
1143
|
-
</svg>`};var
|
|
1114
|
+
</svg>`};var Hr=class Hr extends HTMLElement{constructor(){super();y(this,"name","");y(this,"fill","none");y(this,"stroke","currentColor");this.attachShadow({mode:"open"})}attributeChangedCallback(r,n,i){if(n!==i&&Hr.observedAttributes.includes(r)){switch(r){case"name":this.name=i||"";break;case"fill":this.fill=i||"none";break;case"stroke":this.stroke=i||"currentColor";break}this.render()}}resolveIcon(r){throw new Error("Not implemented")}render(){let r=document.createElement("style");if(r.textContent=`
|
|
1144
1115
|
:host {
|
|
1145
1116
|
display: inline-block;
|
|
1146
1117
|
line-height: 0;
|
|
1147
1118
|
}
|
|
1148
|
-
`,this.shadowRoot){for(;this.shadowRoot.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild);this.shadowRoot.appendChild(r)}if(!this.name)return;let n=this.resolveIcon(this.name);if(!n){console.warn(`'${this.name}' not found, please add it to ${
|
|
1119
|
+
`,this.shadowRoot){for(;this.shadowRoot.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild);this.shadowRoot.appendChild(r)}if(!this.name)return;let n=this.resolveIcon(this.name);if(!n){console.warn(`'${this.name}' not found, please add it to ${Hr.name}`);return}let o=new DOMParser().parseFromString(n,"image/svg+xml").documentElement;o.setAttribute("fill",this.fill),o.setAttribute("stroke",this.stroke),o.style.width="100%",o.style.height="100%",this.shadowRoot?.appendChild(o)}};y(Hr,"observedAttributes",["name","fill","stroke"]);var ei=Hr;var Gp=Fl,no=class extends ei{resolveIcon(t){return Gp[t]}};customElements.get("lucide-icon")||customElements.define("lucide-icon",no);var zr,Ce,zl,ql,Kp,Wl,Zl,Fr=class Fr extends M(_){constructor(){super();f(this,Ce);f(this,zr,new Date);this.color="#8B5CF6",this.disabled=!1,this.placeholder="Ask AI...",this.dark=!1,this._inputValue=""}render(){return d`
|
|
1149
1120
|
<mw-spinning-border
|
|
1150
1121
|
.size=${"420px"}
|
|
1151
1122
|
.color=${this.color||"#8B5CF6"}
|
|
1152
1123
|
.radius=${"24px"}
|
|
1153
1124
|
class="${this.dark?"dark":""} rounded-[24px] font-sans text-sm shadow-lg transition-transform duration-500 hover:scale-105">
|
|
1154
1125
|
<form
|
|
1155
|
-
@submit="${
|
|
1126
|
+
@submit="${g(this,Ce,ql)}"
|
|
1156
1127
|
class="m-[1px] flex w-[250px] items-center rounded-[24px] bg-white px-2 py-2 text-gray-800 transition-all duration-500 focus-within:w-[calc(100vw-2rem)] focus-within:scale-100 active:w-[calc(100vw-2rem)] md:focus-within:w-[350px] md:active:w-[350px] dark:bg-gray-900 dark:text-white">
|
|
1157
1128
|
<lucide-icon class="h-5 w-5 flex-none text-[${this.color||"#8B5CF6"}]" name="${"sparkles"}"></lucide-icon>
|
|
1158
1129
|
|
|
1159
1130
|
<input
|
|
1160
1131
|
?disabled="${this.disabled}"
|
|
1161
|
-
@keydown="${
|
|
1162
|
-
@input="${
|
|
1132
|
+
@keydown="${g(this,Ce,Zl)}"
|
|
1133
|
+
@input="${g(this,Ce,zl)}"
|
|
1163
1134
|
.value="${this._inputValue}"
|
|
1164
1135
|
placeholder="${this.placeholder}"
|
|
1165
1136
|
autocomplete="off"
|
|
@@ -1177,9 +1148,9 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1177
1148
|
</button>
|
|
1178
1149
|
</form>
|
|
1179
1150
|
</mw-spinning-border>
|
|
1180
|
-
`}};
|
|
1151
|
+
`}};zr=new WeakMap,Ce=new WeakSet,zl=function(r){let n=r.target;this._inputValue=n.value,this.dispatchEvent(new Fr.ChangeEvent({value:this._inputValue}))},ql=function(r){r.preventDefault();let n=new Date;if(n.getTime()-a(this,zr).getTime()<500)return;m(this,zr,n);let s=this._inputValue.trim();s&&this.dispatchEvent(new Fr.SubmitInputEvent({text:s}))&&(this._inputValue="")},Kp=function(){return this.renderRoot.querySelector('input[name="input"]')??null},Wl=function(){return this.renderRoot.querySelector('button[type="submit"]')??null},Zl=function(r){Jp(r)&&(r.preventDefault(),this.disabled||a(this,Ce,Wl)?.click())},y(Fr,"properties",{color:{type:String},disabled:{type:Boolean},placeholder:{type:String},dark:{type:Boolean},_inputValue:{type:String,state:!0}});var dt=Fr,io;dt.SubmitInputEvent=(io=class extends CustomEvent{constructor(t,r={}){super(dt.SubmitInputEvent.type,{detail:t,bubbles:!0,composed:!0,...r})}},y(io,"type","mw-floating-ask-ai:submit"),io);var so;dt.ChangeEvent=(so=class extends CustomEvent{constructor(t,r={}){super(dt.ChangeEvent.type,{detail:t,bubbles:!0,composed:!0,...r})}},y(so,"type","mw-floating-ask-ai:change"),so);function Jp(e){return(e.code==="Enter"||e.code==="NumpadEnter")&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey}customElements.get("mw-floating-ask-ai")||customElements.define("mw-floating-ask-ai",dt);var ti={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ri=e=>(...t)=>({_$litDirective$:e,values:t}),Wt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,n){this._$Ct=t,this._$AM=r,this._$Ci=n}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}};var{I:Xp}=xa;var Gl=()=>document.createComment(""),Zt=(e,t,r)=>{let n=e._$AA.parentNode,i=t===void 0?e._$AB:t._$AA;if(r===void 0){let s=n.insertBefore(Gl(),i),o=n.insertBefore(Gl(),i);r=new Xp(s,o,e,e.options)}else{let s=r._$AB.nextSibling,o=r._$AM,c=o!==e;if(c){let l;r._$AQ?.(e),r._$AM=e,r._$AP!==void 0&&(l=e._$AU)!==o._$AU&&r._$AP(l)}if(s!==i||c){let l=r._$AA;for(;l!==s;){let u=l.nextSibling;n.insertBefore(l,i),l=u}}}return r},ze=(e,t,r=e)=>(e._$AI(t,r),e),Yp={},Kl=(e,t=Yp)=>e._$AH=t,Jl=e=>e._$AH,ni=e=>{e._$AR(),e._$AA.remove()};var Xl=(e,t,r)=>{let n=new Map;for(let i=t;i<=r;i++)n.set(e[i],i);return n},Se=ri(class extends Wt{constructor(e){if(super(e),e.type!==ti.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,r){let n;r===void 0?r=t:t!==void 0&&(n=t);let i=[],s=[],o=0;for(let c of e)i[o]=n?n(c,o):o,s[o]=r(c,o),o++;return{values:s,keys:i}}render(e,t,r){return this.dt(e,t,r).values}update(e,[t,r,n]){let i=Jl(e),{values:s,keys:o}=this.dt(t,r,n);if(!Array.isArray(i))return this.ut=o,s;let c=this.ut??=[],l=[],u,p,h=0,v=i.length-1,b=0,S=s.length-1;for(;h<=v&&b<=S;)if(i[h]===null)h++;else if(i[v]===null)v--;else if(c[h]===o[b])l[b]=ze(i[h],s[b]),h++,b++;else if(c[v]===o[S])l[S]=ze(i[v],s[S]),v--,S--;else if(c[h]===o[S])l[S]=ze(i[h],s[S]),Zt(e,l[S+1],i[h]),h++,S--;else if(c[v]===o[b])l[b]=ze(i[v],s[b]),Zt(e,i[h],i[v]),v--,b++;else if(u===void 0&&(u=Xl(o,b,S),p=Xl(c,h,v)),u.has(c[h]))if(u.has(c[v])){let O=p.get(o[b]),C=O!==void 0?i[O]:null;if(C===null){let A=Zt(e,i[h]);ze(A,s[b]),l[b]=A}else l[b]=ze(C,s[b]),Zt(e,i[h],C),i[O]=null;b++}else ni(i[v]),v--;else ni(i[h]),h++;for(;b<=S;){let O=Zt(e,l[S+1]);ze(O,s[b]),l[b++]=O}for(;h<=v;){let O=i[h++];O!==null&&ni(O)}return this.ut=o,Kl(e,l),xe}});var ii,Yl,si=class si extends M(_){constructor(){super();f(this,ii);this.examples={title:"",items:[]},this.color=""}render(){return!this.examples?.title&&!this.examples?.items?.length?null:d`
|
|
1181
1152
|
<div class="flex h-full w-full flex-1 flex-col overflow-y-auto px-4 pt-6 pb-2">
|
|
1182
|
-
${this.examples.title?
|
|
1153
|
+
${this.examples.title?d`
|
|
1183
1154
|
<h2 class="mt-14 px-2 pt-9 pb-2 text-left text-3xl leading-tight font-bold tracking-tight">
|
|
1184
1155
|
<span>${this.examples.title}</span>
|
|
1185
1156
|
<svg class="inline-block h-9 w-9 align-middle" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 58 61">
|
|
@@ -1189,19 +1160,19 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1189
1160
|
</svg>
|
|
1190
1161
|
</h2>
|
|
1191
1162
|
`:null}
|
|
1192
|
-
${this.examples?.items?.length?
|
|
1193
|
-
<ul class="mt-auto flex flex-wrap justify-end gap-2.5 text-sm
|
|
1194
|
-
${
|
|
1163
|
+
${this.examples?.items?.length?d`
|
|
1164
|
+
<ul class="mt-auto flex flex-wrap justify-end gap-2.5 text-sm/6 text-black select-none">
|
|
1165
|
+
${Se(this.examples.items,r=>r,r=>d`
|
|
1195
1166
|
<li
|
|
1196
|
-
class="my-auto inline-block cursor-pointer rounded-2xl border-1
|
|
1197
|
-
@click="${()=>
|
|
1167
|
+
class="border-gray my-auto inline-block cursor-pointer rounded-2xl border-1 px-4 py-2 text-left transition-all duration-200 hover:-translate-y-0.5 hover:bg-[${this.color}]/[0.08] hover:opacity-80 hover:shadow"
|
|
1168
|
+
@click="${()=>g(this,ii,Yl).call(this,r)}">
|
|
1198
1169
|
<span>${r.trim()}</span>
|
|
1199
1170
|
</li>
|
|
1200
1171
|
`)}
|
|
1201
1172
|
</ul>
|
|
1202
1173
|
`:null}
|
|
1203
1174
|
</div>
|
|
1204
|
-
`}};
|
|
1175
|
+
`}};ii=new WeakSet,Yl=function(r){this.dispatchEvent(new si.ExampleClickEvent({example:r}))},y(si,"properties",{examples:{type:Object},color:{type:String}});var qr=si,oo;qr.ExampleClickEvent=(oo=class extends CustomEvent{constructor(t,r={}){super(qr.ExampleClickEvent.type,{detail:t,...r})}},y(oo,"type","mw:example-click"),oo);customElements.get("mw-chat-background")||customElements.define("mw-chat-background",qr);var Kt,Ql,ec,Gt=class Gt extends M(_){constructor(){super();f(this,Kt);this.content={logoUrl:"",title:"",color:""},this.showNewChat=!1,this.showClose=!1}render(){return d`
|
|
1205
1176
|
<div class="relative z-10 h-12">
|
|
1206
1177
|
<div class="gradient-blur absolute inset-x-0.5 mt-2 h-12"></div>
|
|
1207
1178
|
|
|
@@ -1224,7 +1195,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1224
1195
|
<div class="flex-grow"></div>
|
|
1225
1196
|
|
|
1226
1197
|
<!-- new chat btn -->
|
|
1227
|
-
<button @click=${
|
|
1198
|
+
<button @click=${g(this,Kt,Ql)} type="button" class="${this.showNewChat?"inline-flex":"hidden"} shrink-0">
|
|
1228
1199
|
<!-- svg icon of a bubble with a plus -->
|
|
1229
1200
|
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 37 36">
|
|
1230
1201
|
<path
|
|
@@ -1236,7 +1207,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1236
1207
|
</button>
|
|
1237
1208
|
|
|
1238
1209
|
<!-- close chat btn -->
|
|
1239
|
-
<button @click=${
|
|
1210
|
+
<button @click=${g(this,Kt,ec)} class="${this.showClose?"inline-flex":"hidden"} shrink-0">
|
|
1240
1211
|
<!-- svg icon of an X -->
|
|
1241
1212
|
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="white">
|
|
1242
1213
|
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
|
|
@@ -1251,7 +1222,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1251
1222
|
</div>
|
|
1252
1223
|
</div>
|
|
1253
1224
|
</div>
|
|
1254
|
-
`}};
|
|
1225
|
+
`}};Kt=new WeakSet,Ql=function(){this.dispatchEvent(new Gt.NewChatClickEvent)},ec=function(){this.dispatchEvent(new Gt.CloseClickEvent)},y(Gt,"properties",{content:{type:Object},showNewChat:{type:Boolean,attribute:"show-new-chat"},showClose:{type:Boolean,attribute:"show-close"}}),y(Gt,"styles",ie`
|
|
1255
1226
|
/* blurred background */
|
|
1256
1227
|
|
|
1257
1228
|
.gradient-blur {
|
|
@@ -1263,39 +1234,46 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1263
1234
|
/* bg-color gradient */
|
|
1264
1235
|
background-image: linear-gradient(to bottom, white 20%, transparent);
|
|
1265
1236
|
}
|
|
1266
|
-
`);var
|
|
1267
|
-
<
|
|
1268
|
-
<
|
|
1269
|
-
|
|
1270
|
-
${
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1237
|
+
`);var ft=Gt,ao;ft.NewChatClickEvent=(ao=class extends CustomEvent{constructor(t={}){super(ft.NewChatClickEvent.type,{...t})}},y(ao,"type","mw:new-chat-click"),ao);var lo;ft.CloseClickEvent=(lo=class extends CustomEvent{constructor(t={}){super(ft.CloseClickEvent.type,{...t})}},y(lo,"type","mw:close-click"),lo);customElements.get("mw-chat-header")||customElements.define("mw-chat-header",ft);var co={maxHeight:120,initialHeight:32,paddingY:12},Wr,ee,oi,tc,rc,nc,ic,ai,mt=class mt extends M(_){constructor(){super();f(this,ee);f(this,Wr,new Date);this.disabled=!1,this.streaming=!1,this.loading=!1,this.placeholder="Type a message..."}render(){return d`
|
|
1238
|
+
<form @submit="${g(this,ee,nc)}" class="flex w-full items-center overflow-hidden rounded-[18px] bg-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.2)]">
|
|
1239
|
+
<textarea
|
|
1240
|
+
name="input"
|
|
1241
|
+
@input="${g(this,ee,ic)}"
|
|
1242
|
+
@keydown="${g(this,ee,rc)}"
|
|
1243
|
+
autofocus
|
|
1244
|
+
?disabled="${this.disabled}"
|
|
1245
|
+
placeholder="${this.placeholder}"
|
|
1246
|
+
class="box-content h-[${co.initialHeight}px] w-full resize-none place-content-center rounded bg-white px-3 py-[${co.paddingY}px] text-base text-gray-800 outline-none disabled:place-content-baseline"></textarea>
|
|
1247
|
+
|
|
1248
|
+
<button type="submit" ?disabled="${this.disabled||this.loading}" class="mx-1 px-2 transition-opacity duration-200 hover:opacity-80">
|
|
1249
|
+
${this.streaming?d`
|
|
1250
|
+
<!-- x -->
|
|
1251
|
+
<svg class="h-6 w-6 fill-current" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="#312E30">
|
|
1252
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
|
|
1253
|
+
</svg>
|
|
1254
|
+
`:this.loading?d`
|
|
1255
|
+
<!-- loading spinner -->
|
|
1256
|
+
<svg class="h-6 w-6 animate-spin" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
1257
|
+
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="#312E30" stroke-width="4"></circle>
|
|
1258
|
+
<path class="opacity-75" fill="#312E30" d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
|
1259
|
+
</svg>
|
|
1260
|
+
`:d`
|
|
1261
|
+
<!-- airplane -->
|
|
1262
|
+
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 35 34">
|
|
1263
|
+
<path
|
|
1264
|
+
stroke="#312E30"
|
|
1265
|
+
stroke-linecap="round"
|
|
1266
|
+
stroke-linejoin="round"
|
|
1267
|
+
stroke-width="2.5"
|
|
1268
|
+
d="M33 16.99a1.07 1.07 0 0 0-.589-.955L5.107 2.22a2.162 2.162 0 0 0-2.515.447 2.141 2.141 0 0 0-.318 2.524L9.537 16.99 2.274 28.808a2.138 2.138 0 0 0 .318 2.524 2.157 2.157 0 0 0 2.515.447l27.304-13.832A1.075 1.075 0 0 0 33 16.99Zm0 0H9.53" />
|
|
1269
|
+
</svg>
|
|
1270
|
+
`}
|
|
1271
|
+
</button>
|
|
1272
|
+
</form>
|
|
1273
|
+
<slot>
|
|
1274
|
+
<div class="h-5 w-full"></div>
|
|
1275
|
+
</slot>
|
|
1276
|
+
`}setValue(r){let n=a(this,ee,oi);if(!n){console.warn("input element not found, cannot set value");return}n.value=r,g(this,ee,ai).call(this),this.dispatchEvent(new mt.ChangeEvent({delta:null,full:r}))}};Wr=new WeakMap,ee=new WeakSet,oi=function(){return this.renderRoot.querySelector('textarea[name="input"]')??null},tc=function(){return this.renderRoot.querySelector('button[type="submit"]')??null},rc=function(r){Qp(r)&&(r.preventDefault(),this.streaming||a(this,ee,tc)?.click())},nc=function(r){r.preventDefault();let n=new Date;if(n.getTime()-a(this,Wr).getTime()<500)return;if(m(this,Wr,n),this.streaming){this.dispatchEvent(new mt.CancelEvent);return}let s=a(this,ee,oi);if(!s)throw new Error("Expected input element to be present");let o=s.value.trim();o&&this.dispatchEvent(new mt.SubmitEvent(o))&&(s.value=""),g(this,ee,ai).call(this)},ic=function(r){this.dispatchEvent(new mt.ChangeEvent({delta:r.data,full:r.target instanceof HTMLTextAreaElement?r.target.value:""})),g(this,ee,ai).call(this)},ai=function(){let r=a(this,ee,oi);if(!r)return;let{maxHeight:n,initialHeight:i,paddingY:s}=co;r.style.height=`${i}px`;let o=r.scrollHeight,c=s*2,l=Math.min(o-c,n);r.style.height=`${l}px`},y(mt,"properties",{disabled:{type:Boolean},streaming:{type:Boolean},loading:{type:Boolean},placeholder:{type:String}});var De=mt,uo;De.ChangeEvent=(uo=class extends CustomEvent{constructor(t,r={}){super(De.ChangeEvent.type,{detail:t,...r})}},y(uo,"type","mw:change"),uo);var po;De.SubmitEvent=(po=class extends CustomEvent{constructor(t,r={}){super(De.SubmitEvent.type,{detail:t,...r,cancelable:!0})}},y(po,"type","mw:submit"),po);var ho;De.CancelEvent=(ho=class extends CustomEvent{constructor(t={}){super(De.CancelEvent.type,{...t})}},y(ho,"type","mw:cancel"),ho);function Qp(e){return(e.code==="Enter"||e.code==="NumpadEnter")&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey}customElements.get("mw-chat-input")||customElements.define("mw-chat-input",De);var li=class extends M(_){constructor(){super(),this.side="assistant",this.status="",this.color="",this.logoUrl="",this.position="single"}render(){let r=this.side==="user"&&this.position==="single"?"rounded-2xl":this.side==="user"&&["single-current","first"].includes(this.position)?"rounded-2xl rounded-br-[4px]":this.side==="user"&&["middle","last-current"].includes(this.position)?"rounded-2xl rounded-r-[4px]":this.side==="user"&&this.position==="last"?"rounded-2xl rounded-tr-[4px]":["support","assistant"].includes(this.side)&&["single","single-current"].includes(this.position)?"rounded-2xl":["support","assistant"].includes(this.side)&&this.position==="first"?"rounded-2xl rounded-bl-[4px]":["support","assistant"].includes(this.side)&&this.position==="middle"?"rounded-2xl rounded-l-[4px]":["support","assistant"].includes(this.side)&&["last","last-current"].includes(this.position)?"rounded-2xl rounded-tl-[4px]":"rounded-2xl";switch(this.side){case"user":return d`
|
|
1299
1277
|
<div class="ml-20 flex justify-end font-sans text-base">
|
|
1300
1278
|
<div class="max-w-full">
|
|
1301
1279
|
<!-- include an invisible border (same color as background) so that this message is the same height as the bot message -->
|
|
@@ -1304,7 +1282,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1304
1282
|
</div>
|
|
1305
1283
|
|
|
1306
1284
|
<!-- render status (if any) -->
|
|
1307
|
-
${this.status==="sent"?
|
|
1285
|
+
${this.status==="sent"?d`
|
|
1308
1286
|
<!-- tick mark -->
|
|
1309
1287
|
<svg class="ml-auto h-3 w-3 text-gray-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
|
1310
1288
|
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" />
|
|
@@ -1312,7 +1290,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1312
1290
|
`:null}
|
|
1313
1291
|
</div>
|
|
1314
1292
|
</div>
|
|
1315
|
-
`;case"assistant":case"support":return
|
|
1293
|
+
`;case"assistant":case"support":return d`
|
|
1316
1294
|
<div class="mr-8 flex justify-start font-sans text-base">
|
|
1317
1295
|
<div class="flex max-w-full space-x-2">
|
|
1318
1296
|
<!--
|
|
@@ -1331,58 +1309,19 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1331
1309
|
</div>
|
|
1332
1310
|
</div>
|
|
1333
1311
|
</div>
|
|
1334
|
-
`;default:throw new Error(`Unknown side: ${this.side}`)}}};
|
|
1312
|
+
`;default:throw new Error(`Unknown side: ${this.side}`)}}};y(li,"properties",{side:{type:String},status:{type:String},color:{type:String},logoUrl:{type:String,attribute:"logo"},position:{type:String}});customElements.get("mw-chat-message")||customElements.define("mw-chat-message",li);var se=e=>e??H;var e1=["javascript:","data:text/html","vbscript:","data:text/javascript","data:text/vbscript","data:text/css","data:text/plain","data:text/xml"],Pe,mo,sc,ci,oc,ui,pi=class pi extends M(_){constructor(){super();f(this,Pe);f(this,ci,r=>{r.preventDefault(),this._dismissed=!0,this.storageKey&&g(this,Pe,sc).call(this),this.dispatchEvent(new pi.DismissEvent)});f(this,ui,r=>{r.stopPropagation()});this.text="By chatting with us, you agree to the monitoring and recording of this chat to deliver our services and processing of your personal data in accordance with our [Privacy Policy](https://docs.molin.ai/legal/privacy-policy).",this.color="#3b82f6",this.dismissible=!1,this.storageKey="mw-disclaimer-dismissed",this._dismissed=!1}updated(r){super.updated(r),r.has("storageKey")&&this.storageKey&&this.dismissible&&(this._dismissed=g(this,Pe,mo).call(this))}connectedCallback(){super.connectedCallback(),this.storageKey&&this.dismissible&&(this._dismissed=g(this,Pe,mo).call(this))}render(){if(this._dismissed)return null;let r=g(this,Pe,oc).call(this,this.text);return d`
|
|
1335
1313
|
<div class="flex items-center justify-between">
|
|
1336
1314
|
<div class="flex flex-1 items-center justify-center">
|
|
1337
1315
|
<span class="text-xs text-gray-600"> ${r} </span>
|
|
1338
1316
|
</div>
|
|
1339
1317
|
|
|
1340
|
-
${this.dismissible?
|
|
1341
|
-
<button type="button" aria-label="Dismiss" class="ml-2 flex h-4 w-4 flex-shrink-0 cursor-pointer items-center justify-center rounded hover:bg-gray-200" @click="${a(this,
|
|
1318
|
+
${this.dismissible?d`
|
|
1319
|
+
<button type="button" aria-label="Dismiss" class="ml-2 flex h-4 w-4 flex-shrink-0 cursor-pointer items-center justify-center rounded hover:bg-gray-200" @click="${a(this,ci)}">
|
|
1342
1320
|
<lucide-icon name="x" class="h-3 w-3 text-gray-500"></lucide-icon>
|
|
1343
1321
|
</button>
|
|
1344
1322
|
`:null}
|
|
1345
1323
|
</div>
|
|
1346
|
-
`}};
|
|
1347
|
-
<div
|
|
1348
|
-
class="${this._isVisible?"opacity-100 translate-y-0":"opacity-0 translate-y-[50px] pointer-events-none mt-[-40px]"} flex justify-center transition-all transition-discrete duration-[1s] ease-in-out">
|
|
1349
|
-
<div class="${r.bg} mb-2 flex max-w-[70%] items-center justify-center rounded-full px-3 py-2 select-none">
|
|
1350
|
-
<!-- Icon based on variant -->
|
|
1351
|
-
${this.variant==="info"?h`
|
|
1352
|
-
<!-- (i) symbol for info -->
|
|
1353
|
-
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4">
|
|
1354
|
-
<path
|
|
1355
|
-
fill-rule="evenodd"
|
|
1356
|
-
clip-rule="evenodd"
|
|
1357
|
-
d="M2.25 12C2.25 6.61522 6.61522 2.25 12 2.25C17.3848 2.25 21.75 6.61522 21.75 12C21.75 17.3848 17.3848 21.75 12 21.75C6.61522 21.75 2.25 17.3848 2.25 12ZM10.9562 10.5584C12.1025 9.98533 13.3931 11.0206 13.0823 12.2639L12.3733 15.0999L12.4148 15.0792C12.7852 14.894 13.2357 15.0441 13.421 15.4146C13.6062 15.7851 13.4561 16.2356 13.0856 16.4208L13.0441 16.4416C11.8979 17.0147 10.6072 15.9794 10.9181 14.7361L11.6271 11.9001L11.5856 11.9208C11.2151 12.1061 10.7646 11.9559 10.5793 11.5854C10.3941 11.2149 10.5443 10.7644 10.9148 10.5792L10.9562 10.5584ZM12 9C12.4142 9 12.75 8.66421 12.75 8.25C12.75 7.83579 12.4142 7.5 12 7.5C11.5858 7.5 11.25 7.83579 11.25 8.25C11.25 8.66421 11.5858 9 12 9Z"
|
|
1358
|
-
fill="white" />
|
|
1359
|
-
</svg>
|
|
1360
|
-
`:this.variant==="error"?h`
|
|
1361
|
-
<!-- Alert circle for error -->
|
|
1362
|
-
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4">
|
|
1363
|
-
<circle cx="12" cy="12" r="10" stroke="white" stroke-width="2" />
|
|
1364
|
-
<line x1="15" y1="9" x2="9" y2="15" stroke="white" stroke-width="2" />
|
|
1365
|
-
<line x1="9" y1="9" x2="15" y2="15" stroke="white" stroke-width="2" />
|
|
1366
|
-
</svg>
|
|
1367
|
-
`:this.variant==="warning"?h`
|
|
1368
|
-
<!-- Alert triangle for warning -->
|
|
1369
|
-
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4">
|
|
1370
|
-
<path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
1371
|
-
<line x1="12" y1="9" x2="12" y2="13" stroke="white" stroke-width="2" stroke-linecap="round" />
|
|
1372
|
-
<path d="M12 17h.01" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
1373
|
-
</svg>
|
|
1374
|
-
`:h`
|
|
1375
|
-
<!-- Check circle for success -->
|
|
1376
|
-
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4">
|
|
1377
|
-
<path d="M22 11.08V12a10 10 0 11-5.93-9.14" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
1378
|
-
<polyline points="22,4 12,14.01 9,11.01" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
1379
|
-
</svg>
|
|
1380
|
-
`}
|
|
1381
|
-
|
|
1382
|
-
<span class="${r.text} ml-1 text-xs">${this.text}</span>
|
|
1383
|
-
</div>
|
|
1384
|
-
</div>
|
|
1385
|
-
`}};fr=new WeakSet,su=function(){setTimeout(()=>{this._isVisible=!1,this.requestUpdate()},this.dismissDelay)},ou=function(){switch(this.variant){case"error":return{bg:"bg-red-600",text:"text-white",icon:"badge-alert"};case"warning":return{bg:"bg-yellow-600",text:"text-white",icon:"alert-triangle"};case"success":return{bg:"bg-green-600",text:"text-white",icon:"check-circle"};case"info":default:return{bg:"bg-black",text:"text-white",icon:"info"}}},w(zi,"properties",{text:{type:String},variant:{type:String},autoDismissable:{type:Boolean,attribute:"auto-dismissable"},dismissDelay:{type:Number,attribute:"dismiss-delay"},_isVisible:{type:Boolean,state:!0}});customElements.get("mw-info-banner")||customElements.define("mw-info-banner",zi);var oa=class extends A($){constructor(){super(...arguments);w(this,"render",()=>h`
|
|
1324
|
+
`}};Pe=new WeakSet,mo=function(){try{return localStorage.getItem(this.storageKey)==="true"}catch{return!1}},sc=function(){try{localStorage.setItem(this.storageKey,"true")}catch(r){console.warn("Could not save disclaimer dismissed state to localStorage:",r)}},ci=new WeakMap,oc=function(r){let i=/\[([^\]]+)\]\(([^)]+)\)/g.exec(r);if(i){let s=i[0],o=i[1],c=i[2],l=i.index;return e1.some(u=>c.toLowerCase().startsWith(u))||!c||!o?r:d`${r.slice(0,l)}<a href="${se(c)}" @click="${a(this,ui)}" class="underline" style="color: ${this.color}">${o}</a>${r.slice(l+s.length)}`}return r},ui=new WeakMap,y(pi,"properties",{text:{type:String},color:{type:String},dismissible:{type:Boolean},storageKey:{type:String,attribute:"storage-key"},_dismissed:{type:Boolean,state:!0}});var Zr=pi,fo;Zr.DismissEvent=(fo=class extends CustomEvent{constructor(t={}){super(Zr.DismissEvent.type,{...t})}},y(fo,"type","mw-disclaimer:dismiss"),fo);customElements.get("mw-disclaimer")||customElements.define("mw-disclaimer",Zr);var go=class extends M(_){constructor(){super(...arguments);y(this,"render",()=>d`
|
|
1386
1325
|
<svg class="inline-block h-full w-full leading-0" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" xml:space="preserve">
|
|
1387
1326
|
<circle fill="currentFill" stroke="none" cx="27" cy="50" r="6">
|
|
1388
1327
|
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.1" />
|
|
@@ -1394,11 +1333,11 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1394
1333
|
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.3" />
|
|
1395
1334
|
</circle>
|
|
1396
1335
|
</svg>
|
|
1397
|
-
`)}};customElements.get("mw-loading")||customElements.define("mw-loading",
|
|
1336
|
+
`)}};customElements.get("mw-loading")||customElements.define("mw-loading",go);var t1="https://molin.ai/?utm_source=molin-shop-ai&utm_medium=widget&utm_campaign=poweredby",yo=class extends M(_){constructor(){super(...arguments);y(this,"render",()=>d`
|
|
1398
1337
|
<p class="flex items-center justify-center text-xs whitespace-nowrap">
|
|
1399
1338
|
<span>Powered by</span>
|
|
1400
1339
|
|
|
1401
|
-
<a href="${
|
|
1340
|
+
<a href="${t1}" target="_blank" class="inline-flex items-center underline">
|
|
1402
1341
|
<svg class="mx-1 inline-block h-4 w-4" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1403
1342
|
<circle cx="10.0361" cy="10.0361" r="10.0361" fill="#242038" />
|
|
1404
1343
|
<path
|
|
@@ -1417,33 +1356,33 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1417
1356
|
<span>Molin AI</span>
|
|
1418
1357
|
</a>
|
|
1419
1358
|
</p>
|
|
1420
|
-
`)}};customElements.get("mw-powered-by")||customElements.define("mw-powered-by",
|
|
1359
|
+
`)}};customElements.get("mw-powered-by")||customElements.define("mw-powered-by",yo);var hi=class extends M(_){constructor(){super(),this.product=void 0,this.streaming=!1,this.linksNewTab=!1,this.searchParams=void 0,this.imagesByProductUrl={}}get trackedProductUrl(){let t=this.product?.url,r=this.searchParams;try{if(t&&r)return Ua(t,r).href}catch{}return t}render(){let{name:t,description:r,price:n,url:i}=this.product||{},s=i?this.imagesByProductUrl?.[i]:void 0;return d`
|
|
1421
1360
|
<a
|
|
1422
|
-
href="${
|
|
1423
|
-
title="${
|
|
1361
|
+
href="${se(this.trackedProductUrl)}"
|
|
1362
|
+
title="${se(t)}"
|
|
1424
1363
|
class="group flex w-full max-w-md cursor-pointer gap-[10px] overflow-hidden rounded-lg"
|
|
1425
1364
|
target="${this.linksNewTab?"_blank":"_self"}"
|
|
1426
1365
|
?disabled="${this.streaming}">
|
|
1427
|
-
${this.streaming?
|
|
1366
|
+
${this.streaming?d`
|
|
1428
1367
|
<!-- shimmer -->
|
|
1429
1368
|
<div class="h-[70px] w-[70px] animate-pulse overflow-hidden rounded-lg bg-gray-200"></div>
|
|
1430
|
-
`:
|
|
1369
|
+
`:d`<img src="${se(s)}" class="block h-[70px] w-[70px] rounded-lg bg-gray-100 object-contain" loading="lazy" />`}
|
|
1431
1370
|
|
|
1432
1371
|
<div class="flex flex-1 flex-col justify-between">
|
|
1433
1372
|
<div>
|
|
1434
|
-
${
|
|
1373
|
+
${t||!this.streaming?d`<h3 class="line-clamp-1 text-sm font-medium group-hover:underline">${t}</h3>`:d`<div class="h-5 w-32 animate-pulse rounded bg-gray-200"></div>`}
|
|
1435
1374
|
|
|
1436
1375
|
<!-- no margin here -->
|
|
1437
1376
|
|
|
1438
|
-
${r||!this.streaming?
|
|
1377
|
+
${r||!this.streaming?d`<p class="line-clamp-2 text-xs text-gray-500">${r}</p>`:d`<div class="my-1 h-6 w-3/4 animate-pulse rounded bg-gray-200"></div>`}
|
|
1439
1378
|
</div>
|
|
1440
1379
|
|
|
1441
1380
|
<!-- flexbox filled space -->
|
|
1442
1381
|
|
|
1443
|
-
${n||!this.streaming?
|
|
1382
|
+
${n||!this.streaming?d`<span class="text-xs text-gray-900">${n}</span>`:d`<div class="h-4 w-14 animate-pulse rounded bg-gray-200"></div>`}
|
|
1444
1383
|
</div>
|
|
1445
1384
|
</a>
|
|
1446
|
-
`}};w(qi,"properties",{product:{type:Object},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"},searchParams:{type:Object},imagesByProductUrl:{type:Object}});customElements.get("mw-product-card-horizontal")||customElements.define("mw-product-card-horizontal",qi);function Wi(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}var Gi=function(){},mr=function(){};var vn=(t,e,r)=>Math.min(Math.max(r,t),e);var la=.001,Ld=.01,au=10,jd=.05,Dd=1;function lu({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;Gi(t<=au*1e3,"Spring duration must be 10 seconds or less");let o=1-e;o=vn(jd,Dd,o),t=vn(Ld,au,t/1e3),o<1?(i=c=>{let p=c*o,d=p*t,y=p-r,x=Zi(c,o),S=Math.exp(-d);return la-y/x*S},s=c=>{let d=c*o*t,y=d*r+r,x=Math.pow(o,2)*Math.pow(c,2)*t,S=Math.exp(-d),M=Zi(Math.pow(c,2),o);return(-i(c)+la>0?-1:1)*((y-x)*S)/M}):(i=c=>{let p=Math.exp(-c*t),d=(c-r)*t+1;return-la+p*d},s=c=>{let p=Math.exp(-c*t),d=(r-c)*(t*t);return p*d});let u=5/t,l=Pd(i,s,u);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}var Ud=12;function Pd(t,e,r){let n=r;for(let i=1;i<Ud;i++)n=n-t(n)/e(n);return n}function Zi(t,e){return t*Math.sqrt(1-e*e)}var Rd=["duration","bounce"],Bd=["stiffness","damping","mass"];function cu(t,e){return e.some(r=>t[r]!==void 0)}function Vd(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!cu(t,Bd)&&cu(t,Rd)){let r=lu(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Ki(t){var{from:e=0,to:r=1,restSpeed:n=2,restDelta:i}=t,s=Wi(t,["from","to","restSpeed","restDelta"]);let o={done:!1,value:e},{stiffness:u,damping:l,mass:c,velocity:p,duration:d,isResolvedFromDuration:y}=Vd(s),x=uu,S=uu;function M(){let C=p?-(p/1e3):0,I=r-e,k=l/(2*Math.sqrt(u*c)),_=Math.sqrt(u/c)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-e)/100,.4)),k<1){let O=Zi(_,k);x=H=>{let Q=Math.exp(-k*_*H);return r-Q*((C+k*_*I)/O*Math.sin(O*H)+I*Math.cos(O*H))},S=H=>{let Q=Math.exp(-k*_*H);return k*_*Q*(Math.sin(O*H)*(C+k*_*I)/O+I*Math.cos(O*H))-Q*(Math.cos(O*H)*(C+k*_*I)-O*I*Math.sin(O*H))}}else if(k===1)x=O=>r-Math.exp(-_*O)*(I+(C+_*I)*O);else{let O=_*Math.sqrt(k*k-1);x=H=>{let Q=Math.exp(-k*_*H),ne=Math.min(O*H,300);return r-Q*((C+k*_*I)*Math.sinh(ne)+O*I*Math.cosh(ne))/O}}}return M(),{next:C=>{let I=x(C);if(y)o.done=C>=d;else{let k=S(C)*1e3,_=Math.abs(k)<=n,O=Math.abs(r-I)<=i;o.done=_&&O}return o.value=o.done?r:I,o},flipTarget:()=>{p=-p,[e,r]=[r,e],M()}}}Ki.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";var uu=t=>0;var ca=(t,e,r)=>{let n=e-t;return n===0?1:(r-t)/n};var gr=(t,e,r)=>-r*t+r*e+t;var Ji=(t,e)=>r=>Math.max(Math.min(r,e),t),rt=t=>t%1?Number(t.toFixed(5)):t,wr=/(-)?([\d]*\.?[\d])+/g,Xi=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,pu=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ze(t){return typeof t=="string"}var yr={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Yi=Object.assign(Object.assign({},yr),{transform:Ji(0,1)}),rg=Object.assign(Object.assign({},yr),{default:1});var bn=t=>({test:e=>ze(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),sg=bn("deg"),vr=bn("%"),og=bn("px"),ag=bn("vh"),lg=bn("vw"),cg=Object.assign(Object.assign({},vr),{parse:t=>vr.parse(t)/100,transform:t=>vr.transform(t*100)});var br=(t,e)=>r=>!!(ze(r)&&pu.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),Qi=(t,e,r)=>n=>{if(!ze(n))return n;let[i,s,o,u]=n.match(wr);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:u!==void 0?parseFloat(u):1}};var Ue={test:br("hsl","hue"),parse:Qi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+vr.transform(rt(e))+", "+vr.transform(rt(r))+", "+rt(Yi.transform(n))+")"};var Nd=Ji(0,255),es=Object.assign(Object.assign({},yr),{transform:t=>Math.round(Nd(t))}),Se={test:br("rgb","red"),parse:Qi("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+es.transform(t)+", "+es.transform(e)+", "+es.transform(r)+", "+rt(Yi.transform(n))+")"};function Fd(t){let e="",r="",n="",i="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),i=t.substr(4,1),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}var xr={test:br("#"),parse:Fd,transform:Se.transform};var nt={test:t=>Se.test(t)||xr.test(t)||Ue.test(t),parse:t=>Se.test(t)?Se.parse(t):Ue.test(t)?Ue.parse(t):xr.parse(t),transform:t=>ze(t)?t:t.hasOwnProperty("red")?Se.transform(t):Ue.transform(t)};var hu="${c}",du="${n}";function Hd(t){var e,r,n,i;return isNaN(t)&&ze(t)&&((r=(e=t.match(wr))===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)+((i=(n=t.match(Xi))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function fu(t){typeof t=="number"&&(t=`${t}`);let e=[],r=0,n=t.match(Xi);n&&(r=n.length,t=t.replace(Xi,hu),e.push(...n.map(nt.parse)));let i=t.match(wr);return i&&(t=t.replace(wr,du),e.push(...i.map(yr.parse))),{values:e,numColors:r,tokenised:t}}function mu(t){return fu(t).values}function gu(t){let{values:e,numColors:r,tokenised:n}=fu(t),i=e.length;return s=>{let o=n;for(let u=0;u<i;u++)o=o.replace(u<r?hu:du,u<r?nt.transform(s[u]):rt(s[u]));return o}}var zd=t=>typeof t=="number"?0:t;function qd(t){let e=mu(t);return gu(t)(e.map(zd))}var ts={test:Hd,parse:mu,createTransformer:gu,getAnimatableNone:qd};function ua(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function pa({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,o=0;if(!e)i=s=o=r;else{let u=r<.5?r*(1+e):r+e-r*e,l=2*r-u;i=ua(l,u,t+1/3),s=ua(l,u,t),o=ua(l,u,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}var Wd=(t,e,r)=>{let n=t*t,i=e*e;return Math.sqrt(Math.max(0,r*(i-n)+n))},Gd=[xr,Se,Ue],wu=t=>Gd.find(e=>e.test(t)),yu=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,rs=(t,e)=>{let r=wu(t),n=wu(e);mr(!!r,yu(t)),mr(!!n,yu(e));let i=r.parse(t),s=n.parse(e);r===Ue&&(i=pa(i),r=Se),n===Ue&&(s=pa(s),n=Se);let o=Object.assign({},i);return u=>{for(let l in o)l!=="alpha"&&(o[l]=Wd(i[l],s[l],u));return o.alpha=gr(i.alpha,s.alpha,u),r.transform(o)}};var vu=t=>typeof t=="number";var Zd=(t,e)=>r=>e(t(r)),ns=(...t)=>t.reduce(Zd);function xu(t,e){return vu(t)?r=>gr(t,e,r):nt.test(t)?rs(t,e):da(t,e)}var ha=(t,e)=>{let r=[...t],n=r.length,i=t.map((s,o)=>xu(s,e[o]));return s=>{for(let o=0;o<n;o++)r[o]=i[o](s);return r}},ku=(t,e)=>{let r=Object.assign(Object.assign({},t),e),n={};for(let i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=xu(t[i],e[i]));return i=>{for(let s in n)r[s]=n[s](i);return r}};function bu(t){let e=ts.parse(t),r=e.length,n=0,i=0,s=0;for(let o=0;o<r;o++)n||typeof e[o]=="number"?n++:e[o].hue!==void 0?s++:i++;return{parsed:e,numNumbers:n,numRGB:i,numHSL:s}}var da=(t,e)=>{let r=ts.createTransformer(e),n=bu(t),i=bu(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?ns(ha(n.parsed,i.parsed),r):(Gi(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),o=>`${o>0?e:t}`)};var Kd=(t,e)=>r=>gr(t,e,r);function Jd(t){if(typeof t=="number")return Kd;if(typeof t=="string")return nt.test(t)?rs:da;if(Array.isArray(t))return ha;if(typeof t=="object")return ku}function Xd(t,e,r){let n=[],i=r||Jd(t[0]),s=t.length-1;for(let o=0;o<s;o++){let u=i(t[o],t[o+1]);if(e){let l=Array.isArray(e)?e[o]:e;u=ns(l,u)}n.push(u)}return n}function Yd([t,e],[r]){return n=>r(ca(t,e,n))}function Qd(t,e){let r=t.length,n=r-1;return i=>{let s=0,o=!1;if(i<=t[0]?o=!0:i>=t[n]&&(s=n-1,o=!0),!o){let l=1;for(;l<r&&!(t[l]>i||l===n);l++);s=l-1}let u=ca(t[s],t[s+1],i);return e[s](u)}}function is(t,e,{clamp:r=!0,ease:n,mixer:i}={}){let s=t.length;mr(s===e.length,"Both input and output ranges must be the same length"),mr(!n||!Array.isArray(n)||n.length===s-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[s-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());let o=Xd(e,n,i),u=s===2?Yd(t,o):Qd(t,o);return r?l=>u(vn(t[0],t[s-1],l)):u}var xn=t=>e=>1-t(1-e),ss=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Cu=t=>e=>Math.pow(e,t),fa=t=>e=>e*e*((t+1)*e-t),Su=t=>{let e=fa(t);return r=>(r*=2)<1?.5*e(r):.5*(2-Math.pow(2,-10*(r-1)))};var $u=1.525,e1=4/11,t1=8/11,r1=9/10;var Eu=Cu(2),h5=xn(Eu),_u=ss(Eu),n1=t=>1-Math.sin(Math.acos(t)),i1=xn(n1),d5=ss(i1),Au=fa($u),f5=xn(Au),m5=ss(Au),g5=Su($u),s1=4356/361,o1=35442/1805,a1=16061/1805,l1=t=>{if(t===1||t===0)return t;let e=t*t;return t<e1?7.5625*e:t<t1?9.075*e-9.9*t+3.4:t<r1?s1*e-o1*t+a1:10.8*t*t-20.52*t+10.72},w5=xn(l1);function c1(t,e){return t.map(()=>e||_u).splice(0,t.length-1)}function u1(t){let e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function p1(t,e){return t.map(r=>r*e)}function kn({from:t=0,to:e=1,ease:r,offset:n,duration:i=300}){let s={done:!1,value:t},o=Array.isArray(e)?e:[t,e],u=p1(n&&n.length===o.length?n:u1(o),i);function l(){return is(u,o,{ease:Array.isArray(r)?r:c1(o,r)})}let c=l();return{next:p=>(s.value=c(p),s.done=p>=i,s),flipTarget:()=>{o.reverse(),c=l()}}}function Mu({velocity:t=0,from:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){let o={done:!1,value:e},u=r*t,l=e+u,c=s===void 0?l:s(l);return c!==l&&(u=c-e),{next:p=>{let d=-u*Math.exp(-p/n);return o.done=!(d>i||d<-i),o.value=o.done?c:c+d,o},flipTarget:()=>{}}}var Iu={keyframes:kn,spring:Ki,decay:Mu};function Tu(t){if(Array.isArray(t.to))return kn;if(Iu[t.type])return Iu[t.type];let e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?kn:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Ki:kn}var ma=16.666666666666668,h1=typeof performance<"u"?()=>performance.now():()=>Date.now(),ga=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(h1()),ma);function Ou(t){let e=[],r=[],n=0,i=!1,s=!1,o=new WeakSet,u={schedule:(l,c=!1,p=!1)=>{let d=p&&i,y=d?e:r;return c&&o.add(l),y.indexOf(l)===-1&&(y.push(l),d&&i&&(n=e.length)),l},cancel:l=>{let c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c<n;c++){let p=e[c];p(l),o.has(p)&&(u.schedule(p),t())}i=!1,s&&(s=!1,u.process(l))}};return u}var d1=40,wa=!0,Sn=!1,ya=!1,Cn={delta:0,timestamp:0},$n=["read","update","preRender","render","postRender"],os=$n.reduce((t,e)=>(t[e]=Ou(()=>Sn=!0),t),{}),f1=$n.reduce((t,e)=>{let r=os[e];return t[e]=(n,i=!1,s=!1)=>(Sn||g1(),r.schedule(n,i,s)),t},{}),Lu=$n.reduce((t,e)=>(t[e]=os[e].cancel,t),{}),T5=$n.reduce((t,e)=>(t[e]=()=>os[e].process(Cn),t),{}),m1=t=>os[t].process(Cn),ju=t=>{Sn=!1,Cn.delta=wa?ma:Math.max(Math.min(t-Cn.timestamp,d1),1),Cn.timestamp=t,ya=!0,$n.forEach(m1),ya=!1,Sn&&(wa=!1,ga(ju))},g1=()=>{Sn=!0,wa=!0,ya||ga(ju)};var Du=f1;function va(t,e,r=0){return t-e-r}function Uu(t,e,r=0,n=!0){return n?va(e+-t,e,r):e-(t-e)+r}function Pu(t,e,r,n){return n?t>=e+r:t<=-r}var w1=t=>{let e=({delta:r})=>t(r);return{start:()=>Du.update(e,!0),stop:()=>Lu.update(e)}};function ba(t){var e,r,{from:n,autoplay:i=!0,driver:s=w1,elapsed:o=0,repeat:u=0,repeatType:l="loop",repeatDelay:c=0,onPlay:p,onStop:d,onComplete:y,onRepeat:x,onUpdate:S}=t,M=Wi(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:C}=M,I,k=0,_=M.duration,O,H=!1,Q=!0,ne,P=Tu(M);!((r=(e=P).needsInterpolation)===null||r===void 0)&&r.call(e,n,C)&&(ne=is([0,100],[n,C],{clamp:!1}),n=0,C=100);let ie=P(Object.assign(Object.assign({},M),{from:n,to:C}));function he(){k++,l==="reverse"?(Q=k%2===0,o=Uu(o,_,c,Q)):(o=va(o,_,c),l==="mirror"&&ie.flipTarget()),H=!1,x&&x()}function Ns(){I.stop(),y&&y()}function ut(Z){if(Q||(Z=-Z),o+=Z,!H){let se=ie.next(Math.max(0,o));O=se.value,ne&&(O=ne(O)),H=Q?se.done:o<=0}S?.(O),H&&(k===0&&(_??(_=o)),k<u?Pu(o,_,c,Q)&&he():Ns())}function ei(){p?.(),I=s(ut),I.start()}return i&&ei(),{stop:()=>{d?.(),I.stop()}}}var N,Ru,as,Bu,ls,Vu,Nu,Fu,cs,us=class us extends A($){constructor(){super();f(this,N);this.product=void 0,this.labels={addToCart:"Add to cart",color:"Color",size:"Size"},this._currentImageIndex=0,this._isValidUrl=!1}willUpdate(r){r.has("product")&&m(this,N,Ru).call(this)}get images(){return this.product?.images||[]}render(){if(!this.product)return h`
|
|
1385
|
+
`}};y(hi,"properties",{product:{type:Object},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"},searchParams:{type:Object},imagesByProductUrl:{type:Object}});customElements.get("mw-product-card-horizontal")||customElements.define("mw-product-card-horizontal",hi);function di(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}var fi=function(){},Jt=function(){};var Gr=(e,t,r)=>Math.min(Math.max(r,e),t);var wo=.001,r1=.01,ac=10,n1=.05,i1=1;function lc({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let i,s;fi(e<=ac*1e3,"Spring duration must be 10 seconds or less");let o=1-t;o=Gr(n1,i1,o),e=Gr(r1,ac,e/1e3),o<1?(i=u=>{let p=u*o,h=p*e,v=p-r,b=mi(u,o),S=Math.exp(-h);return wo-v/b*S},s=u=>{let h=u*o*e,v=h*r+r,b=Math.pow(o,2)*Math.pow(u,2)*e,S=Math.exp(-h),O=mi(Math.pow(u,2),o);return(-i(u)+wo>0?-1:1)*((v-b)*S)/O}):(i=u=>{let p=Math.exp(-u*e),h=(u-r)*e+1;return-wo+p*h},s=u=>{let p=Math.exp(-u*e),h=(r-u)*(e*e);return p*h});let c=5/e,l=o1(i,s,c);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{let u=Math.pow(l,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}var s1=12;function o1(e,t,r){let n=r;for(let i=1;i<s1;i++)n=n-e(n)/t(n);return n}function mi(e,t){return e*Math.sqrt(1-t*t)}var a1=["duration","bounce"],l1=["stiffness","damping","mass"];function cc(e,t){return t.some(r=>e[r]!==void 0)}function c1(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!cc(e,l1)&&cc(e,a1)){let r=lc(e);t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function gi(e){var{from:t=0,to:r=1,restSpeed:n=2,restDelta:i}=e,s=di(e,["from","to","restSpeed","restDelta"]);let o={done:!1,value:t},{stiffness:c,damping:l,mass:u,velocity:p,duration:h,isResolvedFromDuration:v}=c1(s),b=uc,S=uc;function O(){let C=p?-(p/1e3):0,A=r-t,k=l/(2*Math.sqrt(c*u)),E=Math.sqrt(c/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-t)/100,.4)),k<1){let T=mi(E,k);b=N=>{let J=Math.exp(-k*E*N);return r-J*((C+k*E*A)/T*Math.sin(T*N)+A*Math.cos(T*N))},S=N=>{let J=Math.exp(-k*E*N);return k*E*J*(Math.sin(T*N)*(C+k*E*A)/T+A*Math.cos(T*N))-J*(Math.cos(T*N)*(C+k*E*A)-T*A*Math.sin(T*N))}}else if(k===1)b=T=>r-Math.exp(-E*T)*(A+(C+E*A)*T);else{let T=E*Math.sqrt(k*k-1);b=N=>{let J=Math.exp(-k*E*N),te=Math.min(T*N,300);return r-J*((C+k*E*A)*Math.sinh(te)+T*A*Math.cosh(te))/T}}}return O(),{next:C=>{let A=b(C);if(v)o.done=C>=h;else{let k=S(C)*1e3,E=Math.abs(k)<=n,T=Math.abs(r-A)<=i;o.done=E&&T}return o.value=o.done?r:A,o},flipTarget:()=>{p=-p,[t,r]=[r,t],O()}}}gi.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";var uc=e=>0;var vo=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var Xt=(e,t,r)=>-r*e+r*t+e;var yi=(e,t)=>r=>Math.max(Math.min(r,t),e),qe=e=>e%1?Number(e.toFixed(5)):e,Yt=/(-)?([\d]*\.?[\d])+/g,wi=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,pc=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Re(e){return typeof e=="string"}var Qt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},vi=Object.assign(Object.assign({},Qt),{transform:yi(0,1)}),h2=Object.assign(Object.assign({},Qt),{default:1});var Kr=e=>({test:t=>Re(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),m2=Kr("deg"),er=Kr("%"),g2=Kr("px"),y2=Kr("vh"),w2=Kr("vw"),v2=Object.assign(Object.assign({},er),{parse:e=>er.parse(e)/100,transform:e=>er.transform(e*100)});var tr=(e,t)=>r=>!!(Re(r)&&pc.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),xi=(e,t,r)=>n=>{if(!Re(n))return n;let[i,s,o,c]=n.match(Yt);return{[e]:parseFloat(i),[t]:parseFloat(s),[r]:parseFloat(o),alpha:c!==void 0?parseFloat(c):1}};var Me={test:tr("hsl","hue"),parse:xi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+er.transform(qe(t))+", "+er.transform(qe(r))+", "+qe(vi.transform(n))+")"};var u1=yi(0,255),bi=Object.assign(Object.assign({},Qt),{transform:e=>Math.round(u1(e))}),we={test:tr("rgb","red"),parse:xi("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+bi.transform(e)+", "+bi.transform(t)+", "+bi.transform(r)+", "+qe(vi.transform(n))+")"};function p1(e){let t="",r="",n="",i="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),i=e.substr(4,1),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}var rr={test:tr("#"),parse:p1,transform:we.transform};var We={test:e=>we.test(e)||rr.test(e)||Me.test(e),parse:e=>we.test(e)?we.parse(e):Me.test(e)?Me.parse(e):rr.parse(e),transform:e=>Re(e)?e:e.hasOwnProperty("red")?we.transform(e):Me.transform(e)};var hc="${c}",dc="${n}";function h1(e){var t,r,n,i;return isNaN(e)&&Re(e)&&((r=(t=e.match(Yt))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((i=(n=e.match(wi))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function fc(e){typeof e=="number"&&(e=`${e}`);let t=[],r=0,n=e.match(wi);n&&(r=n.length,e=e.replace(wi,hc),t.push(...n.map(We.parse)));let i=e.match(Yt);return i&&(e=e.replace(Yt,dc),t.push(...i.map(Qt.parse))),{values:t,numColors:r,tokenised:e}}function mc(e){return fc(e).values}function gc(e){let{values:t,numColors:r,tokenised:n}=fc(e),i=t.length;return s=>{let o=n;for(let c=0;c<i;c++)o=o.replace(c<r?hc:dc,c<r?We.transform(s[c]):qe(s[c]));return o}}var d1=e=>typeof e=="number"?0:e;function f1(e){let t=mc(e);return gc(e)(t.map(d1))}var ki={test:h1,parse:mc,createTransformer:gc,getAnimatableNone:f1};function xo(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function bo({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,s=0,o=0;if(!t)i=s=o=r;else{let c=r<.5?r*(1+t):r+t-r*t,l=2*r-c;i=xo(l,c,e+1/3),s=xo(l,c,e),o=xo(l,c,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}var m1=(e,t,r)=>{let n=e*e,i=t*t;return Math.sqrt(Math.max(0,r*(i-n)+n))},g1=[rr,we,Me],yc=e=>g1.find(t=>t.test(e)),wc=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,Ci=(e,t)=>{let r=yc(e),n=yc(t);Jt(!!r,wc(e)),Jt(!!n,wc(t));let i=r.parse(e),s=n.parse(t);r===Me&&(i=bo(i),r=we),n===Me&&(s=bo(s),n=we);let o=Object.assign({},i);return c=>{for(let l in o)l!=="alpha"&&(o[l]=m1(i[l],s[l],c));return o.alpha=Xt(i.alpha,s.alpha,c),r.transform(o)}};var vc=e=>typeof e=="number";var y1=(e,t)=>r=>t(e(r)),Si=(...e)=>e.reduce(y1);function bc(e,t){return vc(e)?r=>Xt(e,t,r):We.test(e)?Ci(e,t):Co(e,t)}var ko=(e,t)=>{let r=[...e],n=r.length,i=e.map((s,o)=>bc(s,t[o]));return s=>{for(let o=0;o<n;o++)r[o]=i[o](s);return r}},kc=(e,t)=>{let r=Object.assign(Object.assign({},e),t),n={};for(let i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=bc(e[i],t[i]));return i=>{for(let s in n)r[s]=n[s](i);return r}};function xc(e){let t=ki.parse(e),r=t.length,n=0,i=0,s=0;for(let o=0;o<r;o++)n||typeof t[o]=="number"?n++:t[o].hue!==void 0?s++:i++;return{parsed:t,numNumbers:n,numRGB:i,numHSL:s}}var Co=(e,t)=>{let r=ki.createTransformer(t),n=xc(e),i=xc(t);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?Si(ko(n.parsed,i.parsed),r):(fi(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),o=>`${o>0?t:e}`)};var w1=(e,t)=>r=>Xt(e,t,r);function v1(e){if(typeof e=="number")return w1;if(typeof e=="string")return We.test(e)?Ci:Co;if(Array.isArray(e))return ko;if(typeof e=="object")return kc}function x1(e,t,r){let n=[],i=r||v1(e[0]),s=e.length-1;for(let o=0;o<s;o++){let c=i(e[o],e[o+1]);if(t){let l=Array.isArray(t)?t[o]:t;c=Si(l,c)}n.push(c)}return n}function b1([e,t],[r]){return n=>r(vo(e,t,n))}function k1(e,t){let r=e.length,n=r-1;return i=>{let s=0,o=!1;if(i<=e[0]?o=!0:i>=e[n]&&(s=n-1,o=!0),!o){let l=1;for(;l<r&&!(e[l]>i||l===n);l++);s=l-1}let c=vo(e[s],e[s+1],i);return t[s](c)}}function $i(e,t,{clamp:r=!0,ease:n,mixer:i}={}){let s=e.length;Jt(s===t.length,"Both input and output ranges must be the same length"),Jt(!n||!Array.isArray(n)||n.length===s-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[s-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let o=x1(t,n,i),c=s===2?b1(e,o):k1(e,o);return r?l=>c(Gr(e[0],e[s-1],l)):c}var Jr=e=>t=>1-e(1-t),Ei=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Cc=e=>t=>Math.pow(t,e),So=e=>t=>t*t*((e+1)*t-e),Sc=e=>{let t=So(e);return r=>(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))};var $c=1.525,C1=4/11,S1=8/11,$1=9/10;var Ec=Cc(2),km=Jr(Ec),_c=Ei(Ec),E1=e=>1-Math.sin(Math.acos(e)),_1=Jr(E1),Cm=Ei(_1),Ac=So($c),Sm=Jr(Ac),$m=Ei(Ac),Em=Sc($c),A1=4356/361,M1=35442/1805,I1=16061/1805,O1=e=>{if(e===1||e===0)return e;let t=e*e;return e<C1?7.5625*t:e<S1?9.075*t-9.9*e+3.4:e<$1?A1*t-M1*e+I1:10.8*e*e-20.52*e+10.72},_m=Jr(O1);function T1(e,t){return e.map(()=>t||_c).splice(0,e.length-1)}function j1(e){let t=e.length;return e.map((r,n)=>n!==0?n/(t-1):0)}function L1(e,t){return e.map(r=>r*t)}function Xr({from:e=0,to:t=1,ease:r,offset:n,duration:i=300}){let s={done:!1,value:e},o=Array.isArray(t)?t:[e,t],c=L1(n&&n.length===o.length?n:j1(o),i);function l(){return $i(c,o,{ease:Array.isArray(r)?r:T1(o,r)})}let u=l();return{next:p=>(s.value=u(p),s.done=p>=i,s),flipTarget:()=>{o.reverse(),u=l()}}}function Mc({velocity:e=0,from:t=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){let o={done:!1,value:t},c=r*e,l=t+c,u=s===void 0?l:s(l);return u!==l&&(c=u-t),{next:p=>{let h=-c*Math.exp(-p/n);return o.done=!(h>i||h<-i),o.value=o.done?u:u+h,o},flipTarget:()=>{}}}var Ic={keyframes:Xr,spring:gi,decay:Mc};function Oc(e){if(Array.isArray(e.to))return Xr;if(Ic[e.type])return Ic[e.type];let t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?Xr:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?gi:Xr}var $o=16.666666666666668,D1=typeof performance<"u"?()=>performance.now():()=>Date.now(),Eo=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(D1()),$o);function Tc(e){let t=[],r=[],n=0,i=!1,s=!1,o=new WeakSet,c={schedule:(l,u=!1,p=!1)=>{let h=p&&i,v=h?t:r;return u&&o.add(l),v.indexOf(l)===-1&&(v.push(l),h&&i&&(n=t.length)),l},cancel:l=>{let u=r.indexOf(l);u!==-1&&r.splice(u,1),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let u=0;u<n;u++){let p=t[u];p(l),o.has(p)&&(c.schedule(p),e())}i=!1,s&&(s=!1,c.process(l))}};return c}var P1=40,_o=!0,Qr=!1,Ao=!1,Yr={delta:0,timestamp:0},en=["read","update","preRender","render","postRender"],_i=en.reduce((e,t)=>(e[t]=Tc(()=>Qr=!0),e),{}),R1=en.reduce((e,t)=>{let r=_i[t];return e[t]=(n,i=!1,s=!1)=>(Qr||V1(),r.schedule(n,i,s)),e},{}),jc=en.reduce((e,t)=>(e[t]=_i[t].cancel,e),{}),Nm=en.reduce((e,t)=>(e[t]=()=>_i[t].process(Yr),e),{}),U1=e=>_i[e].process(Yr),Lc=e=>{Qr=!1,Yr.delta=_o?$o:Math.max(Math.min(e-Yr.timestamp,P1),1),Yr.timestamp=e,Ao=!0,en.forEach(U1),Ao=!1,Qr&&(_o=!1,Eo(Lc))},V1=()=>{Qr=!0,_o=!0,Ao||Eo(Lc)};var Dc=R1;function Mo(e,t,r=0){return e-t-r}function Pc(e,t,r=0,n=!0){return n?Mo(t+-e,t,r):t-(e-t)+r}function Rc(e,t,r,n){return n?e>=t+r:e<=-r}var B1=e=>{let t=({delta:r})=>e(r);return{start:()=>Dc.update(t,!0),stop:()=>jc.update(t)}};function Io(e){var t,r,{from:n,autoplay:i=!0,driver:s=B1,elapsed:o=0,repeat:c=0,repeatType:l="loop",repeatDelay:u=0,onPlay:p,onStop:h,onComplete:v,onRepeat:b,onUpdate:S}=e,O=di(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:C}=O,A,k=0,E=O.duration,T,N=!1,J=!0,te,D=Oc(O);!((r=(t=D).needsInterpolation)===null||r===void 0)&&r.call(t,n,C)&&(te=$i([0,100],[n,C],{clamp:!1}),n=0,C=100);let re=D(Object.assign(Object.assign({},O),{from:n,to:C}));function ae(){k++,l==="reverse"?(J=k%2===0,o=Pc(o,E,u,J)):(o=Mo(o,E,u),l==="mirror"&&re.flipTarget()),N=!1,b&&b()}function ss(){A.stop(),v&&v()}function Qe(W){if(J||(W=-W),o+=W,!N){let ne=re.next(Math.max(0,o));T=ne.value,te&&(T=te(T)),N=J?ne.done:o<=0}S?.(T),N&&(k===0&&(E??(E=o)),k<c?Rc(o,E,u,J)&&ae():ss())}function An(){p?.(),A=s(Qe),A.start()}return i&&An(),{stop:()=>{h?.(),A.stop()}}}var B,Uc,Ai,Vc,Mi,Bc,Nc,Hc,Ii,Oi=class Oi extends M(_){constructor(){super();f(this,B);this.product=void 0,this.labels={addToCart:"Add to cart",color:"Color",size:"Size"},this._currentImageIndex=0,this._isValidUrl=!1}willUpdate(r){r.has("product")&&g(this,B,Uc).call(this)}get images(){return this.product?.images||[]}render(){if(!this.product)return d`
|
|
1447
1386
|
<div class="my-2 w-full rounded-3xl border bg-white p-4">
|
|
1448
1387
|
<div class="relative mx-auto mb-4 max-w-[240px]">
|
|
1449
1388
|
<div class="h-[180px] w-full animate-pulse rounded-2xl bg-gray-200"></div>
|
|
@@ -1462,15 +1401,15 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1462
1401
|
<div class="h-8 flex-auto animate-pulse rounded-xl bg-gray-200"></div>
|
|
1463
1402
|
</div>
|
|
1464
1403
|
</div>
|
|
1465
|
-
`;if(this.product.layout==="horizontal")return
|
|
1404
|
+
`;if(this.product.layout==="horizontal")return d` <mw-product-card-horizontal product="${JSON.stringify(this.product)}"></mw-product-card-horizontal> `;let{name:r,description:n,price:i,category:s}=this.product;return d`
|
|
1466
1405
|
<div class="my-2 w-full rounded-3xl border-[0.5px] border-[#5e5d59]/25 bg-white p-4 hover:shadow-sm">
|
|
1467
1406
|
<div class="pointer-events-auto mx-auto mb-4">
|
|
1468
1407
|
<div class="group relative overflow-hidden rounded-2xl">
|
|
1469
1408
|
<div class="image-slider z-0 flex transition-transform duration-300 ease-in-out" style="transform: translateX(-${this._currentImageIndex*100}%)">
|
|
1470
|
-
${this.images.length>0?
|
|
1409
|
+
${this.images.length>0?Se(this.images,o=>o,(o,c)=>d`
|
|
1471
1410
|
<!-- TODO: add srcset with 1x/2x variants for high DPI displays -->
|
|
1472
|
-
<img src="${o}" alt="image ${
|
|
1473
|
-
`):
|
|
1411
|
+
<img src="${o}" alt="image ${c+1}: ${r}" class="h-auto w-full flex-shrink-0 object-scale-down" loading="lazy" />
|
|
1412
|
+
`):d`
|
|
1474
1413
|
<div class="h-full w-full flex-shrink-0 object-scale-down"></div>
|
|
1475
1414
|
<svg class="rounded-lg" height="144" viewBox="0 0 100 133" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1476
1415
|
<rect width="100" height="133" rx="2" fill="#EEEEEE" style="" transform="matrix(0.9999999999999999, 0, 0, 0.9999999999999999, 0, -7.105427357601002e-15)" />
|
|
@@ -1482,67 +1421,67 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1482
1421
|
</svg>
|
|
1483
1422
|
`}
|
|
1484
1423
|
</div>
|
|
1485
|
-
${this.images.length>1?
|
|
1424
|
+
${this.images.length>1?d`
|
|
1486
1425
|
<div class="absolute inset-0 flex items-center justify-between px-4">
|
|
1487
1426
|
<button
|
|
1488
|
-
@click="${
|
|
1427
|
+
@click="${g(this,B,Nc)}"
|
|
1489
1428
|
class="bg-opacity-80 hover:bg-opacity-100 absolute top-1/2 left-2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-full bg-white shadow transition-all">
|
|
1490
1429
|
<hi-outline class="block h-6 w-3" name="chevron-left"></hi-outline>
|
|
1491
1430
|
</button>
|
|
1492
1431
|
<button
|
|
1493
|
-
@click="${
|
|
1432
|
+
@click="${g(this,B,Bc)}"
|
|
1494
1433
|
class="bg-opacity-80 hover:bg-opacity-100 absolute top-1/2 right-2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-full bg-white shadow transition-all">
|
|
1495
1434
|
<hi-outline class="block h-6 w-3" name="chevron-right"></hi-outline>
|
|
1496
1435
|
</button>
|
|
1497
1436
|
</div>
|
|
1498
1437
|
`:null}
|
|
1499
|
-
${this.images?.length>1?
|
|
1438
|
+
${this.images?.length>1?d`
|
|
1500
1439
|
<div class="slider-dots absolute bottom-3 left-1/2 flex -translate-x-1/2 gap-2">
|
|
1501
|
-
${this.images.map((o,
|
|
1440
|
+
${this.images.map((o,c)=>d`
|
|
1502
1441
|
<button
|
|
1503
|
-
@click="${()=>
|
|
1504
|
-
class="${
|
|
1442
|
+
@click="${()=>g(this,B,Hc).call(this,c)}"
|
|
1443
|
+
class="${c===this._currentImageIndex?"bg-opacity-100":"bg-opacity-60"} hover:bg-opacity-80 h-1.5 w-1.5 rounded-full bg-white transition-all"></button>
|
|
1505
1444
|
`)}
|
|
1506
1445
|
</div>
|
|
1507
1446
|
`:null}
|
|
1508
1447
|
</div>
|
|
1509
1448
|
</div>
|
|
1510
|
-
<div @click="${
|
|
1511
|
-
${s?
|
|
1449
|
+
<div @click="${g(this,B,Ai)}" class="cursor-pointer">
|
|
1450
|
+
${s?d`<a @click="${g(this,B,Ai)}" class="${this._isValidUrl?"":"pointer-events-none"} line-clamp-1 text-xs text-gray-600 hover:underline"> ${s} </a>`:null}
|
|
1512
1451
|
|
|
1513
1452
|
<h3
|
|
1514
|
-
@click="${
|
|
1453
|
+
@click="${g(this,B,Ai)}"
|
|
1515
1454
|
class="${this._isValidUrl?"":"pointer-events-none cursor-default"} mb-1 line-clamp-2 cursor-pointer text-lg font-semibold transition-all hover:underline">
|
|
1516
|
-
${r||
|
|
1455
|
+
${r||d`<span class="inline-block h-6 w-32 animate-pulse rounded bg-gray-200"></span>`}
|
|
1517
1456
|
</h3>
|
|
1518
|
-
${n?
|
|
1519
|
-
<span class="text-lg font-bold"> ${i||
|
|
1457
|
+
${n?d`<p class="mb-2 line-clamp-2 text-sm text-gray-600">${n}</p>`:d`<div class="mb-2 h-4 w-3/4 animate-pulse rounded bg-gray-200"></div>`}
|
|
1458
|
+
<span class="text-lg font-bold"> ${i||d`<span class="inline-block h-6 w-16 animate-pulse rounded bg-gray-200"></span>`} </span>
|
|
1520
1459
|
|
|
1521
1460
|
<!-- <div class="my-4 border-t border-gray-200"></div> -->
|
|
1522
1461
|
|
|
1523
1462
|
<!-- <button
|
|
1524
|
-
@click="${
|
|
1463
|
+
@click="${g(this,B,Vc)}"
|
|
1525
1464
|
?disabled="${!this._isValidUrl}"
|
|
1526
1465
|
class="${this._isValidUrl?"bg-gray-900 hover:bg-gray-800":"bg-gray-900/80 cursor-default"} w-full rounded-xl px-4 py-1.5 text-sm text-white">
|
|
1527
1466
|
${this.labels.addToCart}
|
|
1528
1467
|
</button> -->
|
|
1529
1468
|
</div>
|
|
1530
1469
|
</div>
|
|
1531
|
-
`}};
|
|
1470
|
+
`}};B=new WeakSet,Uc=function(){if(!this.product?.url){this._isValidUrl=!1;return}try{let r=new URL(this.product.url);this._isValidUrl=r.protocol==="http:"||r.protocol==="https:"}catch{this._isValidUrl=!1}},Ai=function(r){r.preventDefault(),!(!this.product?.url||!this._isValidUrl)&&window.open(this.product.url,"_blank")},Vc=function(r){!this.product?.url||!this._isValidUrl||(window.open(this.product.url,"_blank"),this.dispatchEvent(new Oi.AddToCartEvent(this.product)))},Mi=function(r,n){a(this,B,Ii)&&Io({from:r,to:n,duration:300,onUpdate:i=>{a(this,B,Ii)&&(a(this,B,Ii).style.transform=`translateX(${i}%)`)}})},Bc=function(){if(!this.product?.images?.length)return;let r=this._currentImageIndex,n=(r+1)%this.product.images.length,i=-(r*100),s=-(n*100);g(this,B,Mi).call(this,i,s),this._currentImageIndex=n},Nc=function(){if(!this.product?.images?.length)return;let r=this._currentImageIndex,n=(r-1+this.product.images.length)%this.product.images.length,i=-(r*100),s=-(n*100);g(this,B,Mi).call(this,i,s),this._currentImageIndex=n},Hc=function(r){if(!this.product?.images?.length)return;let n=this._currentImageIndex,i=Math.max(0,Math.min(r,this.product.images.length-1)),s=-(n*100),o=-(i*100);g(this,B,Mi).call(this,s,o),this._currentImageIndex=i},Ii=function(){return this.renderRoot.querySelector(".image-slider")},y(Oi,"properties",{product:{type:Object},labels:{type:Object},_currentImageIndex:{type:Number,state:!0},_isValidUrl:{type:Boolean,state:!0}});var tn=Oi,Oo;tn.AddToCartEvent=(Oo=class extends CustomEvent{constructor(t,r={}){super(tn.AddToCartEvent.type,{detail:{product:t},...r})}},y(Oo,"type","mw-product-card:add-to-cart"),Oo);customElements.get("mw-product-card")||customElements.define("mw-product-card",tn);function nr(e){return Array.isArray(e)?e:e?[e]:[]}function Fc(e,t){let r=new Map;for(let n of e){let i=t(n);r.has(i)||r.set(i,[]),(r.get(i)||[]).push(n)}return r}var zc=(e,t,r)=>{for(let n of t)if(n[0]===e)return(0,n[1])();return r?.()};var Ti=class extends M(_){constructor(){super(),this.orderDetails=null,this.streaming=!1,this.linksNewTab=!1}render(){let t=nr(this.orderDetails?.order_status?.step||[]),r=nr(this.orderDetails?.items?.item||[]),n=nr(this.orderDetails?.actions||[]);return d`
|
|
1532
1471
|
<div class="flex w-full max-w-md flex-col rounded-3xl border bg-white p-4">
|
|
1533
1472
|
<!-- Header with order ID -->
|
|
1534
1473
|
<div class="mb-2">
|
|
1535
|
-
${this.orderDetails?.order_id?.label||!this.streaming?
|
|
1474
|
+
${this.orderDetails?.order_id?.label||!this.streaming?d`<h2 class="text-lg font-semibold">${this.orderDetails?.order_id?.label} ${this.orderDetails?.order_id?.value}</h2>`:d`<div class="h-7 w-full animate-pulse rounded bg-gray-200"></div>`}
|
|
1536
1475
|
</div>
|
|
1537
1476
|
|
|
1538
1477
|
<!-- Progress Timeline -->
|
|
1539
1478
|
<div>
|
|
1540
1479
|
<ol role="list" class="w-full overflow-hidden">
|
|
1541
|
-
${this.streaming&&!this.orderDetails?
|
|
1480
|
+
${this.streaming&&!this.orderDetails?d`
|
|
1542
1481
|
<!-- Loading for status timeline -->
|
|
1543
|
-
${[1,2,3].map((i,s)=>
|
|
1482
|
+
${[1,2,3].map((i,s)=>d`
|
|
1544
1483
|
<li class="w-full pb-8">
|
|
1545
|
-
${s<2?
|
|
1484
|
+
${s<2?d`<div class="absolute top-2 left-2 mt-0.5 -ml-px h-full w-0.5 animate-pulse bg-gray-200" aria-hidden="true"></div>`:""}
|
|
1546
1485
|
<div class="group relative flex items-start">
|
|
1547
1486
|
<span class="flex h-6 items-center">
|
|
1548
1487
|
<span class="h-4 w-4 animate-pulse rounded-full bg-gray-200"></span>
|
|
@@ -1553,32 +1492,32 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1553
1492
|
</div>
|
|
1554
1493
|
</li>
|
|
1555
1494
|
`)}
|
|
1556
|
-
`:
|
|
1557
|
-
${l?"":
|
|
1495
|
+
`:Se(t,i=>i.label,(i,s)=>{let o=i.status==="completed",c=i.status==="in_progress",l=s===t.length-1;return d`<li class="relative pb-4">
|
|
1496
|
+
${l?"":d`<div class="${`absolute left-2 top-2 -ml-px mt-0.5 h-full w-0.5 ${o?"bg-[#601feb]":"bg-gray-300"}`}" aria-hidden="true"></div>`}
|
|
1558
1497
|
|
|
1559
1498
|
<div class="group relative flex items-start">
|
|
1560
|
-
${
|
|
1499
|
+
${zc(i.status,[["pending",()=>d` <span class="flex h-6 items-center">
|
|
1561
1500
|
<span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-gray-300 bg-white">
|
|
1562
1501
|
<span class="h-1.5 w-1.5 rounded-full bg-transparent"></span>
|
|
1563
1502
|
</span>
|
|
1564
|
-
</span>`],["in_progress",()=>
|
|
1503
|
+
</span>`],["in_progress",()=>d`<span class="flex h-6 items-center">
|
|
1565
1504
|
<span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-[#601feb] bg-white">
|
|
1566
1505
|
<span class="h-1.5 w-1.5 rounded-full bg-[#601feb]"></span>
|
|
1567
1506
|
</span>
|
|
1568
|
-
</span>`],["completed",()=>
|
|
1507
|
+
</span>`],["completed",()=>d`
|
|
1569
1508
|
<span class="flex h-6 items-center">
|
|
1570
1509
|
<span class="flex h-4 w-4 items-center justify-center rounded-full bg-[#601feb]">
|
|
1571
1510
|
<hi-outline class="mb-3 block h-3 w-3 text-white" name="check"></hi-outline>
|
|
1572
1511
|
</span>
|
|
1573
1512
|
</span>
|
|
1574
|
-
`]],()=>
|
|
1513
|
+
`]],()=>d`<span class="flex h-6 items-center">
|
|
1575
1514
|
<span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-[#601feb] bg-white">
|
|
1576
1515
|
<span class="h-1.5 w-1.5 rounded-full bg-[#601feb]"></span>
|
|
1577
1516
|
</span>
|
|
1578
1517
|
</span>`)}
|
|
1579
1518
|
|
|
1580
1519
|
<span class="ml-3 flex min-w-0 flex-col">
|
|
1581
|
-
<span class="${`text-sm font-medium ${
|
|
1520
|
+
<span class="${`text-sm font-medium ${c?"text-[#601feb]":o?"text-gray-900":"text-gray-500"}`}"> ${i.label} </span>
|
|
1582
1521
|
</span>
|
|
1583
1522
|
</div>
|
|
1584
1523
|
</li>`})}
|
|
@@ -1587,7 +1526,7 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1587
1526
|
|
|
1588
1527
|
<!-- Products list with order items -->
|
|
1589
1528
|
<div class="mb-2 w-full">
|
|
1590
|
-
${r.length===0&&!this.orderDetails?.total?.amount&&this.streaming?
|
|
1529
|
+
${r.length===0&&!this.orderDetails?.total?.amount&&this.streaming?d`
|
|
1591
1530
|
<!-- Loading shimmer for products -->
|
|
1592
1531
|
<div class="w-full space-y-4">
|
|
1593
1532
|
<div class="flex items-center gap-2">
|
|
@@ -1602,11 +1541,11 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1602
1541
|
<div class="h-4 w-10 animate-pulse rounded bg-gray-200"></div>
|
|
1603
1542
|
</div>
|
|
1604
1543
|
</div>
|
|
1605
|
-
`:
|
|
1544
|
+
`:d`
|
|
1606
1545
|
<div class="divide-y divide-gray-100">
|
|
1607
|
-
${this.streaming&&!r.length?
|
|
1546
|
+
${this.streaming&&!r.length?d`
|
|
1608
1547
|
<!-- Loading shimmer for individual products -->
|
|
1609
|
-
${[1,2].map(()=>
|
|
1548
|
+
${[1,2].map(()=>d`
|
|
1610
1549
|
<div class="flex items-center gap-2 py-1.5">
|
|
1611
1550
|
<div class="h-12 w-12 animate-pulse rounded-lg bg-gray-200"></div>
|
|
1612
1551
|
<div class="min-w-0 flex-1">
|
|
@@ -1615,14 +1554,14 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1615
1554
|
<div class="h-4 w-24 animate-pulse rounded bg-gray-200"></div>
|
|
1616
1555
|
</div>
|
|
1617
1556
|
`)}
|
|
1618
|
-
`:r?.map(i=>{let s=i?.image_url;return
|
|
1557
|
+
`:r?.map(i=>{let s=i?.image_url;return d`
|
|
1619
1558
|
<div class="flex items-center gap-2 py-1.5">
|
|
1620
|
-
<img src="${
|
|
1559
|
+
<img src="${se(s)}" class="block h-12 w-12 rounded-lg bg-gray-100 object-contain" loading="lazy" />
|
|
1621
1560
|
|
|
1622
1561
|
<div class="min-w-0 flex-1">
|
|
1623
|
-
${!i?.name&&this.streaming?
|
|
1562
|
+
${!i?.name&&this.streaming?d`<div class="h-4 w-32 animate-pulse rounded bg-gray-200"></div>`:d`<h3 class="truncate text-sm font-medium">${i?.name}</h3>`}
|
|
1624
1563
|
</div>
|
|
1625
|
-
${!i?.price&&this.streaming?
|
|
1564
|
+
${!i?.price&&this.streaming?d`<div class="h-4 w-24 animate-pulse rounded bg-gray-200"></div>`:d`<span class="text-sm text-gray-500">${i?.quantity&&Number(i.quantity)>1?"x":""} ${i?.price}</span>`}
|
|
1626
1565
|
</div>
|
|
1627
1566
|
`})}
|
|
1628
1567
|
</div>
|
|
@@ -1638,9 +1577,9 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1638
1577
|
|
|
1639
1578
|
<!-- Shipping and payment information -->
|
|
1640
1579
|
<div class="mb-2 flex w-full flex-col gap-2 overflow-hidden">
|
|
1641
|
-
${this.streaming&&!this.orderDetails?
|
|
1580
|
+
${this.streaming&&!this.orderDetails?d`
|
|
1642
1581
|
<!-- Loading shimmer template -->
|
|
1643
|
-
${[1,2].map(()=>
|
|
1582
|
+
${[1,2].map(()=>d`
|
|
1644
1583
|
<div>
|
|
1645
1584
|
<div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200"></div>
|
|
1646
1585
|
<div class="space-y-2 overflow-hidden">
|
|
@@ -1649,10 +1588,10 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1649
1588
|
</div>
|
|
1650
1589
|
</div>
|
|
1651
1590
|
`)}
|
|
1652
|
-
`:
|
|
1591
|
+
`:d`
|
|
1653
1592
|
<!-- Shipping Section -->
|
|
1654
1593
|
<div>
|
|
1655
|
-
${this.streaming&&!this.orderDetails?.shipping?
|
|
1594
|
+
${this.streaming&&!this.orderDetails?.shipping?d`
|
|
1656
1595
|
<div>
|
|
1657
1596
|
<div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200"></div>
|
|
1658
1597
|
<div class="space-y-2 overflow-hidden">
|
|
@@ -1660,18 +1599,18 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1660
1599
|
<div class="h-4 w-36 animate-pulse rounded bg-gray-200"></div>
|
|
1661
1600
|
</div>
|
|
1662
1601
|
</div>
|
|
1663
|
-
`:this.orderDetails?.shipping?.method||this.orderDetails?.customer?.name?
|
|
1602
|
+
`:this.orderDetails?.shipping?.method||this.orderDetails?.customer?.name?d`
|
|
1664
1603
|
<h3 class="mb-1 text-sm font-medium">${this.orderDetails?.shipping?.label}</h3>
|
|
1665
1604
|
<div class="space-y-1">
|
|
1666
|
-
${this.orderDetails.customer?.name?
|
|
1667
|
-
${this.orderDetails.shipping?.method?
|
|
1605
|
+
${this.orderDetails.customer?.name?d`<p class="text-xs text-gray-600">${this.orderDetails.customer.name}</p>`:""}
|
|
1606
|
+
${this.orderDetails.shipping?.method?d`<p class="text-xs text-gray-600">${this.orderDetails.shipping.method}</p>`:""}
|
|
1668
1607
|
</div>
|
|
1669
1608
|
`:""}
|
|
1670
1609
|
</div>
|
|
1671
1610
|
|
|
1672
1611
|
<!-- Payment Section -->
|
|
1673
1612
|
<div>
|
|
1674
|
-
${this.streaming&&!this.orderDetails?.payment?
|
|
1613
|
+
${this.streaming&&!this.orderDetails?.payment?d`
|
|
1675
1614
|
<div>
|
|
1676
1615
|
<div class="mb-2 h-5 w-32 animate-pulse rounded bg-gray-200"></div>
|
|
1677
1616
|
<div class="space-y-2 overflow-hidden">
|
|
@@ -1679,15 +1618,15 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1679
1618
|
<div class="h-4 w-36 animate-pulse rounded bg-gray-200"></div>
|
|
1680
1619
|
</div>
|
|
1681
1620
|
</div>
|
|
1682
|
-
`:this.orderDetails?.payment?
|
|
1621
|
+
`:this.orderDetails?.payment?d`
|
|
1683
1622
|
<h3 class="mb-1 text-sm font-medium">${this.orderDetails.payment.label}</h3>
|
|
1684
|
-
${this.orderDetails.payment?.method?.value?
|
|
1623
|
+
${this.orderDetails.payment?.method?.value?d`
|
|
1685
1624
|
<p class="text-xs text-gray-600">
|
|
1686
1625
|
<span class="font-medium">${this.orderDetails.payment.method.label}:</span>
|
|
1687
1626
|
${this.orderDetails.payment.method.value}
|
|
1688
1627
|
</p>
|
|
1689
1628
|
`:""}
|
|
1690
|
-
${this.orderDetails.payment.status?.value?
|
|
1629
|
+
${this.orderDetails.payment.status?.value?d`
|
|
1691
1630
|
<p class="text-xs text-gray-600">
|
|
1692
1631
|
<span class="font-medium">${this.orderDetails.payment.status.label}:</span>
|
|
1693
1632
|
<span>${this.orderDetails.payment.status.value}</span>
|
|
@@ -1700,11 +1639,11 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1700
1639
|
|
|
1701
1640
|
<!-- Action buttons section -->
|
|
1702
1641
|
<div class="flex w-full flex-col gap-2 overflow-hidden">
|
|
1703
|
-
${this.streaming&&!n[0]?.track_order?.label&&!
|
|
1642
|
+
${this.streaming&&!n[0]?.track_order?.label&&!Ms(n[0]?.track_order?.tracking_url||"")?d`
|
|
1704
1643
|
<!-- Loading shimmer for buttons -->
|
|
1705
1644
|
<div class="h-10 w-full min-w-[250px] animate-pulse overflow-hidden rounded-xl bg-gray-200"></div>
|
|
1706
|
-
`:
|
|
1707
|
-
${
|
|
1645
|
+
`:Se(n,(i,s)=>`action-${s}`,i=>{if(i?.track_order?.label)return d`
|
|
1646
|
+
${Ms(i.track_order?.tracking_url||"")?d` <a
|
|
1708
1647
|
target="${this.linksNewTab?"_blank":"_self"}"
|
|
1709
1648
|
href="${i.track_order?.tracking_url}"
|
|
1710
1649
|
class="mt-1 w-full rounded-xl bg-[#601feb] px-4 py-2 text-center text-sm font-medium text-white hover:opacity-90"
|
|
@@ -1713,15 +1652,15 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1713
1652
|
`})}
|
|
1714
1653
|
</div>
|
|
1715
1654
|
</div>
|
|
1716
|
-
`}};
|
|
1717
|
-
${
|
|
1655
|
+
`}};y(Ti,"properties",{orderDetails:{type:Object,attribute:"order-details"},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"}});customElements.get("mw-product-order-status-card")||customElements.define("mw-product-order-status-card",Ti);var rn=class extends Wt{constructor(t){if(super(t),this.it=H,t.type!==ti.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===H||t==null)return this._t=void 0,this.it=t;if(t===xe)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let r=[t];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};rn.directiveName="unsafeHTML",rn.resultType=1;var qc=ri(rn);var Wc=Ga(Le({name:K(),description:K(),price:K(),image_url:Nt([K(),Vt(K())]),category:K(),url:K()}));function Zc(e,t,r,{imagesByProductUrl:n,linksNewTab:i=!0,searchParams:s,messageIsStreaming:o=!1}){if(!e)return d``;let c=t>0&&r[t-1]&&"data"in r[t-1],l=t<r.length-1||!o;if("text"in e)return d`<p>${e.text}</p>`;if("html"in e)return d`${qc(e.html)}`;if("data"in e)switch(e.tag){case"product-card":case"product-card-v1":case"product-card-horizontal":{let u=jr(Wc,e.data);if(u.success){let p={...u.output,images:[]};return p.images=nr(p.image_url),d`
|
|
1656
|
+
${c?d`<div class="my-3 w-full border-t border-gray-200/50"></div>`:null}
|
|
1718
1657
|
<mw-product-card-horizontal
|
|
1719
1658
|
product="${JSON.stringify(p)}"
|
|
1720
1659
|
?streaming="${!l}"
|
|
1721
1660
|
?links-new-tab="${i}"
|
|
1722
1661
|
.searchParams="${s}"
|
|
1723
1662
|
.imagesByProductUrl="${n}"></mw-product-card-horizontal>
|
|
1724
|
-
`}console.warn(
|
|
1663
|
+
`}console.warn(u.issues);break}case"order-status-card-v1":return d`<mw-product-order-status-card order-details="${JSON.stringify(e.data)}" ?streaming="${!l}" ?links-new-tab="${i}"></mw-product-order-status-card> `}return console.warn("could not render part:",e),d`<p><i>data type not supported</i></p>`}var nn,ir,Ze,gt,Li,Gc,ji=class{constructor(t,r,{timeoutMs:n=2e3}={}){f(this,Li);f(this,nn);f(this,ir);f(this,Ze);f(this,gt,!1);y(this,"timeoutMs");m(this,nn,t),m(this,ir,r),this.timeoutMs=n,t.addController(this)}get isTyping(){return a(this,gt)}hostDisconnected(){clearTimeout(a(this,Ze)),m(this,Ze,void 0)}onInput(t){if(a(this,nn).isConnected){if(!t.trim()){this.typingStopped();return}clearTimeout(a(this,Ze)),m(this,Ze,setTimeout(()=>this.typingStopped(),this.timeoutMs)),a(this,gt)||g(this,Li,Gc).call(this)}}typingStopped(){clearTimeout(a(this,Ze)),m(this,gt,!1),a(this,ir).typingStopped()}};nn=new WeakMap,ir=new WeakMap,Ze=new WeakMap,gt=new WeakMap,Li=new WeakSet,Gc=function(){m(this,gt,!0),a(this,ir).typingStarted()};function Kc(e,t="en-US"){let r=new Intl.DateTimeFormat(t,{hour:"numeric",minute:"numeric"}).format(e);return`${e.toLocaleDateString(t,{year:"numeric",month:"short",day:"numeric"})}, ${r}`}var N1=!0,To="Invariant failed";function yt(e,t){if(!e){if(N1)throw new Error(To);var r=typeof t=="function"?t():t,n=r?"".concat(To,": ").concat(r):To;throw new Error(n)}}var H1="\xB7 \xB7 \xB7",j,an,ln,q,Jc,Xc,Yc,Qc,eu,tu,ru,F1,sn,Di=class Di extends M(_){constructor(){super();f(this,q);f(this,j,rl(this));f(this,an,new ji(this,{typingStarted:()=>a(this,j).value?.sendUserTypingStart(),typingStopped:()=>a(this,j).value?.sendUserTypingStop()}));f(this,ln,"single");this.showClose=!1}get conversationId(){return a(this,j).value?.conversationId||""}get messages(){return a(this,j).value?.messages||[]}get config(){return a(this,j).value?.config}get callbacks(){return a(this,j).value?.callbacks||{}}get widgetId(){return a(this,j).value?.widgetId||""}get typingIndicator(){return a(this,j).value?.typingIndicator}get isStreaming(){return a(this,j).value?.isStreaming}get ranOutOfCredits(){return a(this,j).value?.ranOutOfCredits}get isLiveMode(){return a(this,j).value?.isLiveMode}get lastMsg(){return a(this,j).value?.lastMsg}get hasQueuedMessages(){return a(this,j).value?.hasQueuedMessages}render(){yt(this.config,"config is required");let r=Fc(this.messages,n=>{try{let i=new Date(n.timestamp),s=Math.floor(i.getUTCMinutes()/5)*5;return i.setUTCMinutes(s,0,0),i.valueOf().toString()}catch(i){console.error(i)}});return d`
|
|
1725
1664
|
<div class="relative mx-auto h-full bg-[#FDFDFD] font-sans text-base before:absolute before:inset-0 before:bg-[#8d8d8d] before:opacity-10 sm:rounded-[36px] sm:p-1.5 sm:before:rounded-[36px]">
|
|
1726
1665
|
<div
|
|
1727
1666
|
class="relative flex h-full flex-col bg-white shadow-[0px_4px_4px_0px_rgba(0,0,0,0.25),-116px_177px_59px_0px_rgba(0,0,0,0.00),-74px_113px_54px_0px_rgba(0,0,0,0.01),-42px_64px_46px_0px_rgba(0,0,0,0.03),-19px_28px_34px_0px_rgba(0,0,0,0.06)] sm:rounded-[30px]">
|
|
@@ -1730,8 +1669,8 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1730
1669
|
.content="${{logoUrl:this.config.logoUrl,title:this.config.title,color:this.config.color}}"
|
|
1731
1670
|
?show-new-chat="${!this.isLiveMode&&this.messages.length>0}"
|
|
1732
1671
|
?show-close="${this.showClose}"
|
|
1733
|
-
@mw:new-chat-click="${
|
|
1734
|
-
@mw:close-click="${
|
|
1672
|
+
@mw:new-chat-click="${g(this,q,tu)}"
|
|
1673
|
+
@mw:close-click="${g(this,q,ru)}">
|
|
1735
1674
|
</mw-chat-header>
|
|
1736
1675
|
|
|
1737
1676
|
<!-- used by the dashboard to inject content -->
|
|
@@ -1739,21 +1678,24 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1739
1678
|
<slot name="banner"> </slot>
|
|
1740
1679
|
</div>
|
|
1741
1680
|
|
|
1742
|
-
<!-- drag overlay -->
|
|
1743
|
-
${this.config.enableImageUpload&&a(this,ce).isDragging?h`
|
|
1744
|
-
<div class="bg-opacity-90 absolute inset-0 z-50 flex items-center justify-center bg-white sm:rounded-[30px]">
|
|
1745
|
-
<div class="p-8 text-center">
|
|
1746
|
-
<lucide-icon name="image-plus" class="mx-auto mb-4 h-12 w-12 text-blue-500"></lucide-icon>
|
|
1747
|
-
<p class="mb-2 text-lg font-semibold text-black">Add images</p>
|
|
1748
|
-
<p class="text-opacity-80 text-sm text-black">JPEG, PNG, GIF, WebP, SVG, HEIC supported. Max size: 10MB.</p>
|
|
1749
|
-
</div>
|
|
1750
|
-
</div>
|
|
1751
|
-
`:null}
|
|
1752
|
-
|
|
1753
1681
|
<!-- this structure of 2 divs is required for the browser native stick/scroll to bottom -->
|
|
1754
1682
|
<div id="scrollable-content" class="mt-6 flex h-full flex-shrink flex-grow flex-col-reverse overflow-auto">
|
|
1755
|
-
${this.config
|
|
1756
|
-
|
|
1683
|
+
${this.config?.showStillLearningBanner?d`
|
|
1684
|
+
<div class="flex justify-center">
|
|
1685
|
+
<div class="mb-2 flex max-w-[70%] items-center justify-center rounded-full bg-black px-3 py-2 select-none">
|
|
1686
|
+
<!-- (i) symbol -->
|
|
1687
|
+
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4">
|
|
1688
|
+
<path
|
|
1689
|
+
fill-rule="evenodd"
|
|
1690
|
+
clip-rule="evenodd"
|
|
1691
|
+
d="M2.25 12C2.25 6.61522 6.61522 2.25 12 2.25C17.3848 2.25 21.75 6.61522 21.75 12C21.75 17.3848 17.3848 21.75 12 21.75C6.61522 21.75 2.25 17.3848 2.25 12ZM10.9562 10.5584C12.1025 9.98533 13.3931 11.0206 13.0823 12.2639L12.3733 15.0999L12.4148 15.0792C12.7852 14.894 13.2357 15.0441 13.421 15.4146C13.6062 15.7851 13.4561 16.2356 13.0856 16.4208L13.0441 16.4416C11.8979 17.0147 10.6072 15.9794 10.9181 14.7361L11.6271 11.9001L11.5856 11.9208C11.2151 12.1061 10.7646 11.9559 10.5793 11.5854C10.3941 11.2149 10.5443 10.7644 10.9148 10.5792L10.9562 10.5584ZM12 9C12.4142 9 12.75 8.66421 12.75 8.25C12.75 7.83579 12.4142 7.5 12 7.5C11.5858 7.5 11.25 7.83579 11.25 8.25C11.25 8.66421 11.5858 9 12 9Z"
|
|
1692
|
+
fill="white" />
|
|
1693
|
+
</svg>
|
|
1694
|
+
|
|
1695
|
+
<span class="ml-1 text-xs text-white">I'm still learning!</span>
|
|
1696
|
+
</div>
|
|
1697
|
+
</div>
|
|
1698
|
+
`:d`
|
|
1757
1699
|
<!-- this makes the chat stick to bottom when the banner is hidden -->
|
|
1758
1700
|
<div class="flex p-1"></div>
|
|
1759
1701
|
`}
|
|
@@ -1761,33 +1703,28 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1761
1703
|
<!-- the padding at the top makes empty room at the top when scrolling and content is hidden behind header -->
|
|
1762
1704
|
<!-- this is the 2nd (inner) div that will natively stick/scroll to bottom -->
|
|
1763
1705
|
<div class="${this.messages.length>0?"pt-20":""}">
|
|
1764
|
-
${
|
|
1765
|
-
<div class="my-2 text-center text-xs text-gray-500">${
|
|
1766
|
-
${
|
|
1767
|
-
${s.
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
class="prose prose-h1:first:mt-0 prose-h2:first:mt-0 prose-h3:first:mt-0 prose-h4:first:mt-0 prose-h1:last:mb-0 prose-h2:last:mb-0 prose-h3:last:mb-0 prose-h4:last:mb-0 prose-h1:mt-5 prose-h2:mt-5 prose-h3:mt-5 prose-h4:mt-5 prose-h1:mb-2 prose-h2:mb-2 prose-h3:mb-2 prose-h4:mb-2 prose-h1:text-xl prose-h1:text-bold prose-h2:text-lg prose-h2:text-bold prose-h3:text-base prose-h3:text-bold prose-h4:text-sm prose-h4:text-bold break-words text-inherit">
|
|
1782
|
-
${s.content===y1?h`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config?.color}]"></mw-loading>`:s.parts?Ce(s.parts,(M,C)=>C,(M,C)=>Gu(M,C,s.parts??[],{imagesByProductUrl:s.metadata?.imagesByProductUrl,linksNewTab:this.config?.linksNewTab??!0,searchParams:this.config?.disableUtmInjection?void 0:new URLSearchParams({utm_source:"molin.ai",utm_medium:"chat",utm_campaign:"general"}),messageIsStreaming:s.streaming})):h`<p>${s.content}</p>`}
|
|
1783
|
-
</div>
|
|
1784
|
-
</mw-chat-message>
|
|
1785
|
-
</div>`:null}
|
|
1706
|
+
${Se(Array.from(r),([n])=>n,([n,i])=>d`
|
|
1707
|
+
<div class="my-2 text-center text-xs text-gray-500">${Kc(new Date(Number(n)),window.navigator.language)}</div>
|
|
1708
|
+
${Se(i??[],s=>s.id,(s,o)=>{let l=i[o+1]?.role===s.role,p=(o>0?i[o-1]:void 0)?.role===s.role,v=(i.length>0?i[i.length-1]:void 0)?.id===s.id;m(this,ln,v&&!p&&!l?"single-current":!p&&!l?"single":!p&&l?"first":v&&p&&!l?"last-current":p&&!l?"last":p&&l?"middle":"single");let S=this.isLiveMode&&s.role==="user"&&s.id===this.lastMsg?.id?"sent":"";return d`
|
|
1709
|
+
<div data-id="${s.id}" class="${l?"mb-[2px]":"mb-3"} mx-2 flex-row">
|
|
1710
|
+
<mw-chat-message
|
|
1711
|
+
.color="${this.config?.color}"
|
|
1712
|
+
status="${S}"
|
|
1713
|
+
logo="${s.metadata?.avatar||this.config?.logoUrl}"
|
|
1714
|
+
side="${s.role}"
|
|
1715
|
+
position=${a(this,ln)}
|
|
1716
|
+
@click="${g(this,q,Jc)}">
|
|
1717
|
+
<div
|
|
1718
|
+
class="prose prose-h1:first:mt-0 prose-h2:first:mt-0 prose-h3:first:mt-0 prose-h4:first:mt-0 prose-h1:last:mb-0 prose-h2:last:mb-0 prose-h3:last:mb-0 prose-h4:last:mb-0 prose-h1:mt-5 prose-h2:mt-5 prose-h3:mt-5 prose-h4:mt-5 prose-h1:mb-2 prose-h2:mb-2 prose-h3:mb-2 prose-h4:mb-2 prose-h1:text-xl prose-h1:text-bold prose-h2:text-lg prose-h2:text-bold prose-h3:text-base prose-h3:text-bold prose-h4:text-sm prose-h4:text-bold break-words text-inherit">
|
|
1719
|
+
${s.content===H1?d`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config?.color}]"></mw-loading>`:s.parts?Se(s.parts,(O,C)=>C,(O,C)=>Zc(O,C,s.parts??[],{imagesByProductUrl:s.metadata?.imagesByProductUrl,linksNewTab:this.config?.linksNewTab??!0,searchParams:this.config?.disableUtmInjection?void 0:new URLSearchParams({utm_source:"molin.ai",utm_medium:"chat",utm_campaign:"general"}),messageIsStreaming:s.streaming})):d`<p>${s.content}</p>`}
|
|
1720
|
+
</div>
|
|
1721
|
+
</mw-chat-message>
|
|
1722
|
+
</div>
|
|
1786
1723
|
`})}
|
|
1787
1724
|
`)}
|
|
1788
1725
|
|
|
1789
1726
|
<!-- show typing indicator if the non-user side is typing -->
|
|
1790
|
-
${["assistant","support"].includes(this.typingIndicator?.role??"")&&this.typingIndicator?.role?
|
|
1727
|
+
${["assistant","support"].includes(this.typingIndicator?.role??"")&&this.typingIndicator?.role?d`
|
|
1791
1728
|
<mw-chat-message class="mx-2 mb-3 block" color="${this.config?.color}" logo="${this.typingIndicator?.metadata?.avatar||this.config?.logoUrl}" side="${this.typingIndicator.role}">
|
|
1792
1729
|
<div
|
|
1793
1730
|
class="prose prose-h1:first:mt-0 prose-h2:first:mt-0 prose-h3:first:mt-0 prose-h4:first:mt-0 prose-h1:last:mb-0 prose-h2:last:mb-0 prose-h3:last:mb-0 prose-h4:last:mb-0 prose-h1:mt-5 prose-h2:mt-5 prose-h3:mt-5 prose-h4:mt-5 prose-h1:mb-2 prose-h2:mb-2 prose-h3:mb-2 prose-h4:mb-2 prose-h1:text-xl prose-h1:text-bold prose-h2:text-lg prose-h2:text-bold prose-h3:text-base prose-h3:text-bold prose-h4:text-sm prose-h4:text-bold break-words text-inherit">
|
|
@@ -1801,11 +1738,11 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1801
1738
|
class="flex-grow"
|
|
1802
1739
|
.examples="${this.messages.length>0?[]:this.config.examples}"
|
|
1803
1740
|
color="${this.config.color}"
|
|
1804
|
-
@mw:example-click="${
|
|
1741
|
+
@mw:example-click="${g(this,q,Xc)}"></mw-chat-background>
|
|
1805
1742
|
</div>
|
|
1806
1743
|
|
|
1807
1744
|
<div class="m-1.5 flex-shrink-0 flex-grow-0 space-y-2 rounded-3xl bg-[#eeedf1] p-1.5">
|
|
1808
|
-
${this.config.disclaimer&&!this.config.removePoweredBy?
|
|
1745
|
+
${this.config.disclaimer&&!this.config.removePoweredBy?d`
|
|
1809
1746
|
<!-- spacing between input box and disclaimer or bottom -->
|
|
1810
1747
|
<div class="mb-1.5">
|
|
1811
1748
|
<mw-disclaimer .text="${this.config.disclaimer}" .color="${this.config.color}"></mw-disclaimer>
|
|
@@ -1813,26 +1750,21 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1813
1750
|
`:null}
|
|
1814
1751
|
|
|
1815
1752
|
<mw-chat-input
|
|
1816
|
-
@mw:change="${
|
|
1817
|
-
@mw:submit="${
|
|
1818
|
-
@mw:cancel="${
|
|
1753
|
+
@mw:change="${g(this,q,Qc)}"
|
|
1754
|
+
@mw:submit="${g(this,q,Yc)}"
|
|
1755
|
+
@mw:cancel="${g(this,q,eu)}"
|
|
1819
1756
|
placeholder="${this.config.input?.placeholder}"
|
|
1820
|
-
?disabled="${this.ranOutOfCredits||this.hasQueuedMessages
|
|
1757
|
+
?disabled="${this.ranOutOfCredits||this.hasQueuedMessages}"
|
|
1821
1758
|
?streaming="${this.isStreaming??!0}"
|
|
1822
|
-
?loading="${this.hasQueuedMessages
|
|
1823
|
-
?enableImageUpload="${this.config.enableImageUpload}"
|
|
1824
|
-
color="${this.config.color}"
|
|
1825
|
-
.onImageUploadClick="${this.config.enableImageUpload?a(this,ce).openImagePicker:void 0}"
|
|
1826
|
-
.images="${this.config.enableImageUpload?a(this,ce).selectedImages:[]}"
|
|
1827
|
-
.onImageDelete="${this.config.enableImageUpload?a(this,ce).onImageDelete:void 0}">
|
|
1759
|
+
?loading="${this.hasQueuedMessages}">
|
|
1828
1760
|
</mw-chat-input>
|
|
1829
1761
|
|
|
1830
|
-
${this.config.removePoweredBy?this.config.disclaimer?
|
|
1762
|
+
${this.config.removePoweredBy?this.config.disclaimer?d`
|
|
1831
1763
|
<!-- spacing between input box and disclaimer or bottom -->
|
|
1832
1764
|
<div class="mt-1.5">
|
|
1833
1765
|
<mw-disclaimer .text="${this.config.disclaimer}" .color="${this.config.color}"></mw-disclaimer>
|
|
1834
1766
|
</div>
|
|
1835
|
-
`:null:
|
|
1767
|
+
`:null:d`
|
|
1836
1768
|
<!-- spacing between input box and powered-by or bottom -->
|
|
1837
1769
|
<div class="h-4">
|
|
1838
1770
|
<mw-powered-by></mw-powered-by>
|
|
@@ -1841,125 +1773,13 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1841
1773
|
</div>
|
|
1842
1774
|
</div>
|
|
1843
1775
|
</div>
|
|
1844
|
-
`}reloadConfig(){a(this,
|
|
1845
|
-
<mw-context-widget .widgetId="${this.widgetId}" .config="${this.config}" .callbacks="${a(this,vs)}" .xUserData="${this.xUserData}" .xCustomInstructions="${this.xCustomInstructions}">
|
|
1846
|
-
<!-- embed our chat component forwarding props -->
|
|
1847
|
-
<mw-chat ?show-close="${this.showClose}" @mw:close-click="${m(this,We,cp)}">
|
|
1848
|
-
<slot name="banner" slot="banner"></slot>
|
|
1849
|
-
</mw-chat>
|
|
1850
|
-
</mw-context-widget>
|
|
1851
|
-
`:null}injectConfig(r){g(this,jn,r),this.requestUpdate()}reloadConfig(){a(this,We,On)?.reloadConfig()}reset(){this.xUserData={},this.xCustomInstructions="",a(this,We,On)?.reset(),this.requestUpdate()}get conversationId(){return a(this,We,On)?.conversationId??""}get messages(){return a(this,We,On)?.messages??[]}};ys=new WeakMap,jn=new WeakMap,vs=new WeakMap,We=new WeakSet,cp=function(){this.dispatchEvent(new Ln.CloseClickEvent)},On=function(){return this.renderRoot.querySelector("mw-chat")},w(Ln,"styles",ae`
|
|
1852
|
-
:host {
|
|
1853
|
-
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
1854
|
-
}
|
|
1855
|
-
`),w(Ln,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},showClose:{type:Boolean,attribute:"show-close"},xUserData:{type:Object,attribute:!1},xCustomInstructions:{type:String,attribute:!1}});var jt=Ln;customElements.get("molin-shop-ai-chat")||customElements.define("molin-shop-ai-chat",jt);var Sa;jt.CloseClickEvent=(Sa=class extends CustomEvent{constructor(e={}){super(jt.CloseClickEvent.type,{...e})}},w(Sa,"type","mw:close-click"),Sa);var $a=class{constructor({hidden:e=!1}){w(this,"hidden");this.hidden=e}setUserData(e){for(let r of document.querySelectorAll("molin-shop-ai"))e?r.setAttribute("user-data",JSON.stringify(e)):r.removeAttribute("user-data");for(let r of document.querySelectorAll("molin-shop-ai-chat"))e?r.setAttribute("user-data",JSON.stringify(e)):r.removeAttribute("user-data")}setCustomInstructions(e){for(let r of document.querySelectorAll("molin-shop-ai"))e?r.setAttribute("custom-instructions",e):r.removeAttribute("custom-instructions");for(let r of document.querySelectorAll("molin-shop-ai-chat"))e?r.setAttribute("custom-instructions",e):r.removeAttribute("custom-instructions")}showLauncher(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof Te&&e.showLauncher()}hideLauncher(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof Te&&e.hideLauncher()}openChat(e){let{message:r,autoSend:n}=e||{};for(let i of document.querySelectorAll("molin-shop-ai"))i instanceof Te&&i.openChat({message:r,autoSend:n})}closeChat(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof Te&&e.closeChat()}reset(){ye.resetWidgetData();for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof Te&&e.reset();for(let e of document.querySelectorAll("molin-shop-ai-chat"))e instanceof jt&&e.reset()}};function up({hidden:t}){let e=new $a({hidden:t});return window.Molin=e,e}function bs(){let t=window.Molin;if(!t)throw new Error("window.Molin global not initialized");return t}window.__INIT_MOLIN_SHOP_AI=function(e){C1(e);let r=st(),n=typeof r?.hidden=="boolean"?r.hidden:window.self!==window.top;if(up({hidden:n}),e.auto){let i=document.createElement("molin-shop-ai");i.setAttribute("cdn",e.cdn),i.setAttribute("widget",e.widgetId),document.body.appendChild(i)}};function C1(t){window.__INIT_MOLIN_SHOP_AI_OPTIONS=t}function pp(){return window.__INIT_MOLIN_SHOP_AI_OPTIONS}var $e,Dn,Er,_r,ot=class{constructor(e,r){f(this,$e);f(this,Dn);f(this,Er);f(this,_r);g(this,$e,e),g(this,Dn,r),e.addController(this)}get data(){return a(this,_r)||a(this,Er)?.data}hostConnected(){if(a(this,Er)||a(this,_r))return;let e=pp();e&&e.widgetId===a(this,$e).widgetId?g(this,_r,e.config):g(this,Er,new Ui(a(this,$e),()=>{if(a(this,$e).cdn&&a(this,$e).widgetId)return`${a(this,$e).cdn}/config?w=${a(this,$e).widgetId}`;throw new Error("missing cdn or widgetId")},{fetchWhenConnected:!0,transform:async r=>{let n=await r.json();return n&&!e&&window.__INIT_MOLIN_SHOP_AI({cdn:a(this,$e).cdn,widgetId:a(this,$e).widgetId,config:n}),n},onError:a(this,Dn)?.onError}))}};$e=new WeakMap,Dn=new WeakMap,Er=new WeakMap,_r=new WeakMap;function hp(){let t=new URL(import.meta.url).hostname;return{localhost:"http://uploads.molin.localhost:8787","molin.localhost":"http://uploads.molin.localhost:8787","widget.molin.foo":"https://uploads.molin.foo","widget.molin.ai":"https://uploads.molin.ai","molin.ai":"https://uploads.molin.ai","molin.foo":"https://uploads.molin.foo"}[t]||"https://uploads.molin.ai"}var Pe=Object.freeze({PENDING:"pending",READY:"ready",ERROR:"error"}),V,W,oe,Ar,Mr,pe,j,fp,Ea,mp,ks,Pn,Rn,Bn,Vn,gp,xs,at,Un,_a,wp,yp,vp,gs=class{constructor(e,r={}){f(this,j);f(this,V);f(this,W);f(this,oe,null);f(this,Ar,!1);f(this,Mr,null);f(this,pe,[]);f(this,ks,e=>{let r=e.target,n=Array.from(r.files||[]);m(this,j,_a).call(this,n),r.value=""});f(this,Pn,e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")});f(this,Rn,e=>{e.preventDefault(),e.dataTransfer&&m(this,j,gp).call(this,e.dataTransfer)&&m(this,j,xs).call(this,!0)});f(this,Bn,e=>{e.preventDefault();let r=e.relatedTarget;a(this,V).contains(r)||m(this,j,xs).call(this,!1)});f(this,Vn,e=>{if(e.preventDefault(),m(this,j,xs).call(this,!1),e.dataTransfer){let r=Array.from(e.dataTransfer.files||[]);m(this,j,_a).call(this,r)}});w(this,"openImagePicker",()=>{a(this,oe)&&a(this,oe).click()});w(this,"onImageDelete",e=>{g(this,pe,a(this,pe).filter(r=>r.id!==e)),m(this,j,Un).call(this),a(this,V).requestUpdate(),a(this,W).onImageDelete&&a(this,W).onImageDelete(e)});g(this,V,e),g(this,W,{acceptedTypes:["image/jpeg","image/png","image/gif","image/webp","image/svg+xml","image/heic"],maxFileSize:10*1024*1024,maxFiles:3,onError:()=>{},uploadUrl:new URL("/v1/uploads",hp()).href,enabled:!0,...r}),e.addController(this),m(this,j,mp).call(this)}hostConnected(){m(this,j,fp).call(this)}hostDisconnected(){m(this,j,Ea).call(this),a(this,oe)&&a(this,oe).parentNode&&a(this,oe).parentNode.removeChild(a(this,oe))}get isDragging(){return a(this,Ar)}get error(){return a(this,Mr)}get selectedImages(){return a(this,pe)}get hasPendingImages(){return a(this,pe).some(e=>e.processingState===Pe.PENDING)}clearError(){m(this,j,Un).call(this)}updateUploadOptions(e){e.conversationId!==void 0&&(a(this,W).conversationId=e.conversationId),e.widgetId!==void 0&&(a(this,W).widgetId=e.widgetId),a(this,W).enabled=!!e.enabled,e.enabled||m(this,j,Ea).call(this)}restoreImages(e){if(!Array.isArray(e)||e.length===0){g(this,pe,[]),a(this,V).requestUpdate();return}let r=e.map(n=>{let i=new File([],n.name,{type:n.type});return{id:n.id,name:n.name,type:n.type,size:n.size,dataUrl:n.url,file:i,uploadProgress:100,processingState:Pe.READY,imageUrl:n.url}});g(this,pe,r),a(this,V).requestUpdate()}clearImages(){g(this,pe,[]),this.clearError(),a(this,V).requestUpdate()}};V=new WeakMap,W=new WeakMap,oe=new WeakMap,Ar=new WeakMap,Mr=new WeakMap,pe=new WeakMap,j=new WeakSet,fp=function(){a(this,W).enabled&&(a(this,V).addEventListener("dragover",a(this,Pn)),a(this,V).addEventListener("dragenter",a(this,Rn)),a(this,V).addEventListener("dragleave",a(this,Bn)),a(this,V).addEventListener("drop",a(this,Vn)))},Ea=function(){a(this,V).removeEventListener("dragover",a(this,Pn)),a(this,V).removeEventListener("dragenter",a(this,Rn)),a(this,V).removeEventListener("dragleave",a(this,Bn)),a(this,V).removeEventListener("drop",a(this,Vn))},mp=function(){g(this,oe,document.createElement("input")),a(this,oe).type="file",a(this,oe).accept=a(this,W).acceptedTypes.join(","),a(this,oe).multiple=a(this,W).maxFiles>1,a(this,oe).style.display="none",a(this,oe).addEventListener("change",a(this,ks)),document.body.appendChild(a(this,oe))},ks=new WeakMap,Pn=new WeakMap,Rn=new WeakMap,Bn=new WeakMap,Vn=new WeakMap,gp=function(e){return e.types&&e.types.includes("Files")},xs=function(e){a(this,Ar)!==e&&(g(this,Ar,e),a(this,V).requestUpdate())},at=function(e){g(this,Mr,e),a(this,W).onError(e),a(this,V).requestUpdate(),setTimeout(()=>{m(this,j,Un).call(this)},6e3)},Un=function(){g(this,Mr,null),a(this,V).requestUpdate()},_a=async function(e){if(e.length===0)return;m(this,j,Un).call(this);let r=e.filter(o=>m(this,j,wp).call(this,o));if(r.length===0)return;let n=a(this,pe).length,i=a(this,W).maxFiles??1/0,s=r.length;if(n+s>i){m(this,j,at).call(this,`You can upload a maximum of ${i} files`);return}try{let u=(await Promise.all(r.map(l=>m(this,j,yp).call(this,l)))).filter(l=>!a(this,pe).some(c=>c.dataUrl===l.dataUrl));g(this,pe,[...a(this,pe),...u]),await oo(3,u,async l=>{await m(this,j,vp).call(this,l)}),a(this,V).requestUpdate()}catch(o){let u=o instanceof Error?o:new Error(String(o));m(this,j,at).call(this,"Upload failed")}},wp=function(e){return a(this,W).acceptedTypes.includes(e.type)?e.size>a(this,W).maxFileSize?(m(this,j,at).call(this,`Max file size: ${a(this,W).maxFileSize/(1024*1024)}MB`),!1):!0:(m(this,j,at).call(this,"Invalid file type"),!1)},yp=async function(e){try{let r=await(0,dp.fileToBase64)(e);return{id:crypto.randomUUID(),name:e.name,type:e.type,size:e.size,dataUrl:r,file:e,uploadProgress:0,processingState:Pe.PENDING}}catch(r){let n=r instanceof Error?r:new Error(String(r));throw new Error(`Failed to read file: ${e.name} - ${n.message}`)}},vp=async function(e){if(!e){console.error("No image provided to upload"),m(this,j,at).call(this,"No image provided");return}if(!a(this,W)?.uploadUrl){console.error("Missing uploadUrl in options"),m(this,j,at).call(this,"Upload URL not configured");return}e.processingState=Pe.PENDING,e.uploadProgress=0,a(this,V).requestUpdate();let r=new FormData;r.append("dataUrl",e.dataUrl),r.append("filename",e.name),r.append("fileType",e.type),r.append("fileSize",String(e.size)),a(this,W).conversationId&&r.append("conversationId",a(this,W).conversationId),a(this,W).widgetId&&r.append("widgetId",a(this,W).widgetId);let n=new XMLHttpRequest,i=(s,o)=>{o&&console.error(o),m(this,j,at).call(this,s),e.processingState=Pe.ERROR,e.uploadProgress=0,a(this,V).requestUpdate()};n.upload.addEventListener("progress",s=>{if(!s.lengthComputable)return;let o=Math.round(s.loaded/s.total*100),u=a(this,pe).find(l=>l.id===e.id);u&&(u.uploadProgress=Math.min(o,95),a(this,V).requestUpdate())}),n.addEventListener("load",()=>{if(n.status<200||n.status>=300){i("Upload failed",`Upload failed with status: ${n.status}`);return}let s;try{s=JSON.parse(n.responseText)}catch(u){i("Upload failed",`Upload response parsing error: ${u instanceof Error?u.message:String(u)}`);return}if(!!!s?.success){let u=s?.error||"Upload failed";i(u,`Server reported failure: ${u}`);return}e.uploadProgress=100,s.imageUrl&&s.imageId?(e.imageUrl=s.imageUrl,e.id=s.imageId,e.processingState=Pe.READY):e.processingState=Pe.PENDING,a(this,V).requestUpdate()}),n.addEventListener("error",()=>{i("Network error while uploading","Upload network error")}),n.addEventListener("timeout",()=>{i("Upload timed out","Upload timeout")});try{n.open("POST",a(this,W).uploadUrl),n.send(r)}catch(s){i("Unable to initiate upload",`Upload setup error: ${s instanceof Error?s.message:String(s)}`)}};var Aa={maxHeight:120,initialHeight:32,paddingY:12},Nn,Y,Ir,bp,xp,kp,Cp,Cs,Dt=class Dt extends A($){constructor(){super();f(this,Y);f(this,Nn,new Date);this.disabled=!1,this.streaming=!1,this.loading=!1,this.placeholder="Type a message...",this.enableImageUpload=!1,this.onImageUploadClick=void 0,this.images=[],this.onImageDelete=void 0,this.color="#8B5CF6"}get value(){return a(this,Y,Ir)?.value?.trim()??""}render(){return h`
|
|
1856
|
-
<div
|
|
1857
|
-
class="focus-within:ring-opacity-50 ${this.enableImageUpload&&this.images.length>0?`ring-2 ring-[${this.color}] ring-opacity-50`:""} w-full overflow-hidden rounded-[18px] bg-white shadow-[0px_3px_20px_0px_rgba(0,0,0,0.2)] transition-all duration-200 focus-within:ring-2 focus-within:ring-[${this.color}]">
|
|
1858
|
-
<!-- Image preview area -->
|
|
1859
|
-
${this.enableImageUpload&&this.images&&this.images.length>0?h`
|
|
1860
|
-
<div class="mb-2 flex flex-wrap gap-2 rounded-t-[18px] bg-white p-2">
|
|
1861
|
-
${this.images.map(r=>h`
|
|
1862
|
-
<div class="relative inline-block">
|
|
1863
|
-
<img src="${r.dataUrl}" alt="${r.name}" class="h-[60px] w-[60px] rounded-xl object-cover" />
|
|
1864
|
-
|
|
1865
|
-
<!-- Progress/Status overlay -->
|
|
1866
|
-
${r.processingState===Pe.PENDING?h`
|
|
1867
|
-
<div class="absolute inset-0 flex items-center justify-center rounded-xl bg-black/40">
|
|
1868
|
-
${r.uploadProgress<100?h`
|
|
1869
|
-
<!-- Upload progress circle -->
|
|
1870
|
-
<div class="relative h-8 w-8">
|
|
1871
|
-
<svg class="h-8 w-8 -rotate-90 transform" viewBox="0 0 32 32">
|
|
1872
|
-
<circle cx="16" cy="16" r="14" stroke="white" stroke-width="2" fill="none" opacity="0.3" />
|
|
1873
|
-
<circle
|
|
1874
|
-
cx="16"
|
|
1875
|
-
cy="16"
|
|
1876
|
-
r="14"
|
|
1877
|
-
stroke="white"
|
|
1878
|
-
stroke-width="2"
|
|
1879
|
-
fill="none"
|
|
1880
|
-
stroke-dasharray="87.96"
|
|
1881
|
-
stroke-dashoffset="${87.96*(1-r.uploadProgress/100)}"
|
|
1882
|
-
class="transition-all duration-300" />
|
|
1883
|
-
</svg>
|
|
1884
|
-
</div>
|
|
1885
|
-
`:h`
|
|
1886
|
-
<!-- Processing spinner -->
|
|
1887
|
-
<div class="relative h-8 w-8">
|
|
1888
|
-
<svg class="h-8 w-8 animate-spin" viewBox="0 0 24 24">
|
|
1889
|
-
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="white" stroke-width="4" fill="none"></circle>
|
|
1890
|
-
<path
|
|
1891
|
-
class="opacity-75"
|
|
1892
|
-
fill="white"
|
|
1893
|
-
d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
|
1894
|
-
</svg>
|
|
1895
|
-
</div>
|
|
1896
|
-
`}
|
|
1897
|
-
</div>
|
|
1898
|
-
`:r.processingState===Pe.ERROR?h`
|
|
1899
|
-
<div class="absolute inset-0 flex items-center justify-center rounded-xl bg-red-500/60">
|
|
1900
|
-
<lucide-icon name="badge-alert" class="h-6 w-6 text-white"></lucide-icon>
|
|
1901
|
-
</div>
|
|
1902
|
-
`:null}
|
|
1903
|
-
|
|
1904
|
-
<!-- Delete button -->
|
|
1905
|
-
<button
|
|
1906
|
-
data-testid="image-delete-btn"
|
|
1907
|
-
type="button"
|
|
1908
|
-
@click="${()=>this.onImageDelete?.(r.id)}"
|
|
1909
|
-
class="absolute -top-1 -right-1 flex h-5 w-5 items-center justify-center rounded-full bg-[#eeedf1] text-white hover:bg-[#eeedf195]">
|
|
1910
|
-
<lucide-icon name="x" class="h-3 w-3 text-[#14161a]"></lucide-icon>
|
|
1911
|
-
</button>
|
|
1912
|
-
</div>
|
|
1913
|
-
`)}
|
|
1914
|
-
</div>
|
|
1915
|
-
`:null}
|
|
1916
|
-
|
|
1917
|
-
<!-- Input form -->
|
|
1918
|
-
<form @submit="${m(this,Y,kp)}" class="flex w-full items-center">
|
|
1919
|
-
${this.enableImageUpload?h`
|
|
1920
|
-
<button
|
|
1921
|
-
data-testid="image-upload-btn"
|
|
1922
|
-
type="button"
|
|
1923
|
-
@click="${this.onImageUploadClick}"
|
|
1924
|
-
?disabled="${this.disabled||this.loading}"
|
|
1925
|
-
class="mx-1 px-2 transition-opacity duration-200 hover:opacity-80">
|
|
1926
|
-
<lucide-icon name="image-plus" class="block h-6 w-6 text-[#312E30]"></lucide-icon>
|
|
1927
|
-
</button>
|
|
1928
|
-
`:null}
|
|
1929
|
-
|
|
1930
|
-
<textarea
|
|
1931
|
-
data-testid="mw-chat-input-textarea"
|
|
1932
|
-
name="input"
|
|
1933
|
-
@input="${m(this,Y,Cp)}"
|
|
1934
|
-
@keydown="${m(this,Y,xp)}"
|
|
1935
|
-
autofocus
|
|
1936
|
-
?disabled="${this.disabled}"
|
|
1937
|
-
placeholder="${this.placeholder}"
|
|
1938
|
-
class="${this.enableImageUpload?"px-1":"pl-3 pr-1"} box-content h-[${Aa.initialHeight}px] w-full resize-none place-content-center rounded bg-white py-[${Aa.paddingY}px] text-base text-gray-800 outline-none placeholder:text-[14px] placeholder:font-light disabled:place-content-baseline"></textarea>
|
|
1939
|
-
|
|
1940
|
-
<button
|
|
1941
|
-
type="submit"
|
|
1942
|
-
data-testid="mw-chat-input-submit-btn"
|
|
1943
|
-
?disabled="${this.disabled||this.loading}"
|
|
1944
|
-
class="mx-1 rounded-full px-2 transition-all duration-150 ease-out disabled:cursor-not-allowed disabled:opacity-50">
|
|
1945
|
-
<div
|
|
1946
|
-
class="${this.streaming||this.loading||!this.value&&(!this.enableImageUpload||this.images.length===0)?"bg-gray-400":""} ${this.streaming||this.loading?"scale-100":"scale-95"} flex h-8 w-8 flex-row items-center justify-center rounded-full bg-[${this.color}] p-1.5 transition-all transition-colors duration-200">
|
|
1947
|
-
${this.loading?h`<lucide-icon name="loader-circle" class="inline-flex animate-spin text-white transition-all"></lucide-icon>`:this.streaming?h`<lucide-icon name="x" class="inline-flex h-4 w-4 text-white transition-colors"></lucide-icon>`:h`<lucide-icon name="arrow-up" class="inline-flex h-4 w-4 text-white transition-colors"></lucide-icon>`}
|
|
1948
|
-
</div>
|
|
1949
|
-
</button>
|
|
1950
|
-
</form>
|
|
1951
|
-
</div>
|
|
1952
|
-
|
|
1953
|
-
<slot>
|
|
1954
|
-
<div class="h-5 w-full"></div>
|
|
1955
|
-
</slot>
|
|
1956
|
-
`}setValue(r){let n=a(this,Y,Ir);if(!n){console.warn("input element not found, cannot set value");return}n.value=r,m(this,Y,Cs).call(this),this.dispatchEvent(new Dt.ChangeEvent({delta:null,full:r}))}focus(){a(this,Y,Ir)?.focus()}};Nn=new WeakMap,Y=new WeakSet,Ir=function(){return this.renderRoot.querySelector('textarea[name="input"]')??null},bp=function(){return this.renderRoot.querySelector('button[type="submit"]')??null},xp=function(r){S1(r)&&(r.preventDefault(),!this.streaming&&!this.disabled&&!this.loading&&a(this,Y,bp)?.click())},kp=function(r){r.preventDefault();let n=new Date;if(n.getTime()-a(this,Nn).getTime()<500)return;if(g(this,Nn,n),this.streaming){this.dispatchEvent(new Dt.CancelEvent);return}let s=a(this,Y,Ir);if(!s)throw new Error("Expected input element to be present");let o=s.value.trim();(o||this.enableImageUpload&&this.images.length>0)&&this.dispatchEvent(new Dt.SubmitEvent(o))&&(s.value=""),m(this,Y,Cs).call(this)},Cp=function(r){this.dispatchEvent(new Dt.ChangeEvent({delta:r.data,full:r.target instanceof HTMLTextAreaElement?r.target.value:""})),m(this,Y,Cs).call(this)},Cs=function(){let r=a(this,Y,Ir);if(!r)return;let{maxHeight:n,initialHeight:i,paddingY:s}=Aa;r.style.height=`${i}px`;let o=r.scrollHeight,u=s*2,l=Math.min(o-u,n);r.style.height=`${l}px`,this.requestUpdate()},w(Dt,"properties",{disabled:{type:Boolean},streaming:{type:Boolean},loading:{type:Boolean},placeholder:{type:String},color:{type:String},enableImageUpload:{type:Boolean},onImageUploadClick:{type:Function},images:{type:Array},onImageDelete:{type:Function}});var Ge=Dt,Ma;Ge.ChangeEvent=(Ma=class extends CustomEvent{constructor(e,r={}){super(Ge.ChangeEvent.type,{detail:e,...r})}},w(Ma,"type","mw:change"),Ma);var Ia;Ge.SubmitEvent=(Ia=class extends CustomEvent{constructor(e,r={}){super(Ge.SubmitEvent.type,{detail:e,...r,cancelable:!0})}},w(Ia,"type","mw:submit"),Ia);var Ta;Ge.CancelEvent=(Ta=class extends CustomEvent{constructor(e={}){super(Ge.CancelEvent.type,{...e})}},w(Ta,"type","mw:cancel"),Ta);function S1(t){return(t.code==="Enter"||t.code==="NumpadEnter")&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey}customElements.get("mw-chat-input")||customElements.define("mw-chat-input",Ge);var Or,Sp,$p,Tr=class Tr extends A($){constructor(){super();f(this,Or);w(this,"render",()=>h`
|
|
1776
|
+
`}reloadConfig(){a(this,j).value?.reloadConfig(),this.requestUpdate()}async sendMessage(r){if(yt(a(this,j).value,"widget context is required"),!r||typeof r!="string")return console.warn("sendMessage requires a valid string message"),!1;let n=await a(this,j).value.enqueueUserInput(r,{xUserData:a(this,j).value?.xUserData,xCustomInstructions:a(this,j).value?.xCustomInstructions,role:"user",expectStreaming:!0});return n&&a(this,q,sn)?.setValue(""),n??!1}setInputValue(r){if(!r||typeof r!="string"){console.warn("setInputValue requires a valid string value");return}let n=a(this,q,sn);if(!n){console.warn("input element not found, cannot set value");return}n.setValue?n.setValue(r):console.warn("input element does not have setValue method")}reset(){a(this,j).value?.reset()}};j=new WeakMap,an=new WeakMap,ln=new WeakMap,q=new WeakSet,Jc=function(r){let i=r.composedPath().find(s=>s instanceof HTMLAnchorElement);if(i){if(r.preventDefault(),this.callbacks.onUserClickedLink?.({widgetId:this.widgetId,url:i.href,conversationId:this.conversationId}),window.self!==window.top){window.open(i.href,"_blank");return}let o=this.config?.linksNewTab?"_blank":"_self";window.open(i.href,i.target||o)}},Xc=function(r){yt(a(this,j).value,"widget context is required"),r.preventDefault();let n=r.detail.example;a(this,j).value.enqueueUserInput(n,{xUserData:a(this,j).value?.xUserData,xCustomInstructions:a(this,j).value?.xCustomInstructions}).then(i=>{i&&(a(this,q,sn)?.setValue(""),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:n,example:!0,conversationId:this.conversationId}))}).catch(console.warn)},Yc=function(r){yt(a(this,j).value,"widget context is required"),r.preventDefault();let n=r.detail;a(this,j).value.enqueueUserInput(n,{xUserData:a(this,j).value?.xUserData,xCustomInstructions:a(this,j).value?.xCustomInstructions}).then(i=>{i&&(a(this,q,sn)?.setValue(""),a(this,an).typingStopped(),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:n,example:!1,conversationId:this.conversationId}))}).catch(console.warn)},Qc=function(r){a(this,an).onInput(r.detail.full)},eu=function(){yt(a(this,j).value,"widget context is required"),a(this,j).value.sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})},tu=function(){yt(a(this,j).value,"widget context is required"),a(this,j).value.reset()},ru=function(){this.dispatchEvent(new Di.CloseClickEvent)},F1=function(){return this.renderRoot.querySelector("#scrollable-content")},sn=function(){return this.renderRoot.querySelector("mw-chat-input")},y(Di,"properties",{showClose:{type:Boolean,attribute:"show-close"}});var on=Di,jo;on.CloseClickEvent=(jo=class extends CustomEvent{constructor(t={}){super(on.CloseClickEvent.type,{...t})}},y(jo,"type","mw:close-click"),jo);customElements.get("mw-chat")||customElements.define("mw-chat",on);var or,nu,iu,sr=class sr extends M(_){constructor(){super();f(this,or);y(this,"render",()=>d`
|
|
1957
1777
|
<div class="popup-desktop group relative w-[300px] cursor-pointer rounded-[17px] shadow-2xl select-none">
|
|
1958
1778
|
<mw-spinning-border .color="${this.color}" .border="${"transparent"}" .radius="${"17px"}">
|
|
1959
1779
|
<!-- wrapper -->
|
|
1960
1780
|
<div class="relative z-[2147483647] m-[1px] w-[300px] rounded-2xl bg-white font-sans text-base leading-normal">
|
|
1961
1781
|
<!-- content -->
|
|
1962
|
-
<div class="p-4 text-left text-gray-800" @click="${
|
|
1782
|
+
<div class="p-4 text-left text-gray-800" @click="${g(this,or,iu)}">
|
|
1963
1783
|
<p>${this.text}</p>
|
|
1964
1784
|
</div>
|
|
1965
1785
|
</div>
|
|
@@ -1968,12 +1788,12 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1968
1788
|
<!-- close button -->
|
|
1969
1789
|
<button
|
|
1970
1790
|
class="bg-opacity-50 absolute -top-8 right-0 inline-flex h-6 w-6 items-center justify-center rounded-full bg-gray-300 pb-[2px] text-center text-gray-700 opacity-0 shadow transition-opacity duration-300 ease-in-out group-hover:opacity-100"
|
|
1971
|
-
@click="${
|
|
1791
|
+
@click="${g(this,or,nu)}"
|
|
1972
1792
|
aria-label="Close">
|
|
1973
1793
|
×
|
|
1974
1794
|
</button>
|
|
1975
1795
|
</div>
|
|
1976
|
-
`);this.text="Hello there. How can we help?",this.color="#601feb"}};
|
|
1796
|
+
`);this.text="Hello there. How can we help?",this.color="#601feb"}};or=new WeakSet,nu=function(){this.dispatchEvent(new sr.CloseEvent)},iu=function(){this.dispatchEvent(new sr.ClickEvent)},y(sr,"properties",{text:{type:String},color:{type:String}}),y(sr,"styles",ie`
|
|
1977
1797
|
.popup-desktop:hover button {
|
|
1978
1798
|
transition-delay: 0s !important;
|
|
1979
1799
|
}
|
|
@@ -1981,23 +1801,23 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
1981
1801
|
.popup-desktop button {
|
|
1982
1802
|
transition-delay: 1s;
|
|
1983
1803
|
}
|
|
1984
|
-
`);var
|
|
1804
|
+
`);var wt=sr,Lo;wt.CloseEvent=(Lo=class extends CustomEvent{constructor(t={}){super(wt.CloseEvent.type,{...t})}},y(Lo,"type","mw:close"),Lo);var Do;wt.ClickEvent=(Do=class extends CustomEvent{constructor(t={}){super(wt.ClickEvent.type,{...t})}},y(Do,"type","mw:click"),Do);customElements.get("mw-popup-desktop")||customElements.define("mw-popup-desktop",wt);var ar,su,ou,cn=class cn extends M(_){constructor(){super();f(this,ar);y(this,"render",()=>d`
|
|
1985
1805
|
<!-- wrapper -->
|
|
1986
1806
|
<div class="group relative z-[2147483647] rounded-t-2xl bg-white text-left font-sans text-base text-[16px] leading-normal text-gray-800 shadow-2xl transition-all select-none">
|
|
1987
1807
|
<!-- close button -->
|
|
1988
1808
|
<button
|
|
1989
1809
|
class="bg-opacity-50 absolute top-[28px] right-4 inline-flex h-7 w-7 items-center justify-center rounded-full bg-gray-300 pb-[2px] text-center text-xl shadow-none duration-300 ease-in-out focus:outline-none"
|
|
1990
|
-
@click="${
|
|
1810
|
+
@click="${g(this,ar,su)}"
|
|
1991
1811
|
aria-label="Close">
|
|
1992
1812
|
×
|
|
1993
1813
|
</button>
|
|
1994
1814
|
|
|
1995
1815
|
<!-- content -->
|
|
1996
|
-
<div class="p-4 text-gray-800" @click="${
|
|
1816
|
+
<div class="p-4 text-gray-800" @click="${g(this,ar,ou)}">
|
|
1997
1817
|
<h1 class="font-display mr-8 py-2.5 text-left text-lg font-bold">${this.title}</h1>
|
|
1998
1818
|
<p class="py-2.5 text-left">${this.text}</p>
|
|
1999
1819
|
<div class="h-4"></div>
|
|
2000
|
-
${this.button&&this.color?
|
|
1820
|
+
${this.button&&this.color?d`
|
|
2001
1821
|
<!-- only visible if button text and color are given -->
|
|
2002
1822
|
<button class="w-full rounded-full bg-[${this.color}] px-5 py-2.5 text-center text-sm font-medium text-white" type="button">${this.button}</button>
|
|
2003
1823
|
`:null}
|
|
@@ -2006,30 +1826,30 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
2006
1826
|
<!-- can append any other content -->
|
|
2007
1827
|
<slot name="footer"></slot>
|
|
2008
1828
|
</div>
|
|
2009
|
-
`);this.title="Chat with Molin AI",this.text="Hello there. How can we help?",this.button="Chat now",this.color="#601feb"}};
|
|
1829
|
+
`);this.title="Chat with Molin AI",this.text="Hello there. How can we help?",this.button="Chat now",this.color="#601feb"}};ar=new WeakSet,su=function(){this.dispatchEvent(new cn.CloseEvent)},ou=function(){this.dispatchEvent(new cn.ClickEvent)},y(cn,"properties",{title:{type:String},text:{type:String},button:{type:String},color:{type:String}});var vt=cn,Po;vt.CloseEvent=(Po=class extends CustomEvent{constructor(t={}){super(vt.CloseEvent.type,{...t})}},y(Po,"type","mw:close"),Po);var Ro;vt.ClickEvent=(Ro=class extends CustomEvent{constructor(t={}){super(vt.ClickEvent.type,{...t})}},y(Ro,"type","mw:click"),Ro);customElements.get("mw-popup-mobile")||customElements.define("mw-popup-mobile",vt);var lr,un,xt,Pi=class{constructor(t,r){f(this,lr);f(this,un,!1);f(this,xt,()=>{a(this,un)||(a(this,lr).userFirstInteracted?.(),m(this,un,!0)),a(this,lr).userInteracted?.()});m(this,lr,r),t.addController(this)}hostConnected(){this.startListening()}hostDisconnected(){this.stopListening()}startListening(){window.addEventListener("click",a(this,xt)),window.addEventListener("keydown",a(this,xt))}stopListening(){window.removeEventListener("click",a(this,xt)),window.removeEventListener("keydown",a(this,xt))}};lr=new WeakMap,un=new WeakMap,xt=new WeakMap;var z1=1440*60*1e3,cr,de,bt,pn,kt,hn,Ui,au,Ri=class{constructor(t,r,n=Date){f(this,Ui);f(this,cr);f(this,de);f(this,bt);f(this,pn);f(this,kt,!1);f(this,hn,!1);m(this,cr,t),m(this,de,r),m(this,bt,n),t.addController(this)}get showing(){return a(this,kt)}hostDisconnected(){this.abortAutoShowTimer()}show({sound:t}={}){if(this.abortAutoShowTimer(),!a(this,kt)&&(m(this,kt,!0),a(this,cr).requestUpdate(),t)){a(this,de).playPopupSound();let r=a(this,de).getPersistedState();a(this,de).setPersistedState({...r,playedSoundOnce:!0})}}hide(){m(this,hn,!0),this.abortAutoShowTimer(),m(this,kt,!1),a(this,cr).requestUpdate()}abortAutoShowTimer(){clearTimeout(a(this,pn))}onCloseClick(){let t=a(this,de).getPersistedState();a(this,de).setPersistedState({...t,userDismissedAt:a(this,bt).now()}),this.hide()}onContentClick(){let t=a(this,de).getPersistedState();a(this,de).setPersistedState({...t,userDismissedAt:a(this,bt).now()}),this.hide()}userFirstInteracted(){this.abortAutoShowTimer(),a(this,hn)||m(this,pn,setTimeout(()=>g(this,Ui,au).call(this),a(this,de).getDelayMs()))}};cr=new WeakMap,de=new WeakMap,bt=new WeakMap,pn=new WeakMap,kt=new WeakMap,hn=new WeakMap,Ui=new WeakSet,au=function(){let t=a(this,de).getPersistedState(),r=!!t?.playedSoundOnce;t?.userDismissedAt&&a(this,bt).now()-t.userDismissedAt<z1||this.show({sound:!r})};var Ge,Bo,Ue,Vi,Vo,Bi=class Bi extends M(_){constructor(){super();f(this,Ue);f(this,Ge,new Ri(this,{getDelayMs:()=>this.delayMs,playPopupSound:()=>{this.soundUrl&&new Audio(this.soundUrl).play().then(()=>{}).catch(r=>{console.error("Error playing audio:",r,{})})},setPersistedState:r=>{r?localStorage.setItem("_molin_popup",JSON.stringify(r)):localStorage.removeItem("_molin_popup")},getPersistedState:()=>{let r=localStorage.getItem("_molin_popup");try{return r?JSON.parse(r):null}catch{return null}}}));f(this,Bo,new Pi(this,a(this,Ge)));this.positionClasses="",this.delayMs=0,this.soundUrl="",this.content={desktop:{text:"",color:""},mobile:{title:"",text:"",button:"",color:"",poweredBy:!0}}}render(){let r=a(this,Ge).showing?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3",n=this.content;return d`
|
|
2010
1830
|
<!-- mobile shadow backdrop -->
|
|
2011
|
-
<div @click="${
|
|
1831
|
+
<div @click="${g(this,Ue,Vi)}" class="${r} fixed inset-0 z-[2147483647] bg-black/50 transition-[opacity,visibility] sm:hidden"></div>
|
|
2012
1832
|
|
|
2013
1833
|
<!-- mobile overlay -->
|
|
2014
1834
|
<div class="${r} fixed right-0 bottom-0 left-0 z-[2147483647] sm:hidden">
|
|
2015
|
-
<mw-popup-mobile title="${n.mobile.title}" text="${n.mobile.text}" button="${n.mobile.button}" color="${n.mobile.color}" @mw:click="${
|
|
2016
|
-
${n.mobile.poweredBy?
|
|
1835
|
+
<mw-popup-mobile title="${n.mobile.title}" text="${n.mobile.text}" button="${n.mobile.button}" color="${n.mobile.color}" @mw:click="${g(this,Ue,Vo)}" @mw:close="${g(this,Ue,Vi)}">
|
|
1836
|
+
${n.mobile.poweredBy?d`<mw-powered-by class="block p-4" slot="footer"></mw-powered-by>`:null}
|
|
2017
1837
|
</mw-popup-mobile>
|
|
2018
1838
|
</div>
|
|
2019
1839
|
|
|
2020
1840
|
<!-- desktop -->
|
|
2021
1841
|
<div class="${r} ${this.positionClasses} fixed z-[2147483647] transition-[opacity,translate,visibility] max-sm:hidden">
|
|
2022
|
-
<mw-popup-desktop color="${n.desktop.color}" text="${n.desktop.text}" @mw:click="${
|
|
1842
|
+
<mw-popup-desktop color="${n.desktop.color}" text="${n.desktop.text}" @mw:click="${g(this,Ue,Vo)}" @mw:close="${g(this,Ue,Vi)}"></mw-popup-desktop>
|
|
2023
1843
|
</div>
|
|
2024
|
-
`}hide(){a(this,
|
|
1844
|
+
`}hide(){a(this,Ge).hide()}};Ge=new WeakMap,Bo=new WeakMap,Ue=new WeakSet,Vi=function(){a(this,Ge).onCloseClick()},Vo=function(){this.dispatchEvent(new Bi.ClickEvent),a(this,Ge).onContentClick()},y(Bi,"properties",{positionClasses:{type:String,attribute:"position"},delayMs:{type:Number,attribute:"delay"},soundUrl:{type:String,attribute:"sound"},content:{type:Object}});var dn=Bi,Uo;dn.ClickEvent=(Uo=class extends CustomEvent{constructor(t={}){super(dn.ClickEvent.type,{...t})}},y(Uo,"type","mw:click"),Uo);customElements.get("mw-popup")||customElements.define("mw-popup",dn);var Hi,lu,Ni=class extends M(_){constructor(){super();f(this,Hi);y(this,"render",()=>d`
|
|
2025
1845
|
<span class="relative inline-flex">
|
|
2026
1846
|
<slot></slot>
|
|
2027
|
-
<span class="${a(this,
|
|
1847
|
+
<span class="${a(this,Hi,lu)} pointer-events-none absolute z-10 flex h-3 w-3">
|
|
2028
1848
|
<span class="bg-${this.color} absolute inline-flex h-3 w-3 animate-ping rounded-full opacity-75"></span>
|
|
2029
1849
|
<span class="bg-${this.color} relative inline-flex h-3 w-3 rounded-full"></span>
|
|
2030
1850
|
</span>
|
|
2031
1851
|
</span>
|
|
2032
|
-
`);this.color="sky-500",this.position="top-right"}};
|
|
1852
|
+
`);this.color="sky-500",this.position="top-right"}};Hi=new WeakSet,lu=function(){switch(this.position){case"top-left":return"top-0 left-0 -mt-1 -ml-1";case"top-right":return"top-0 right-0 -mt-1 -mr-1";case"bottom-left":return"bottom-0 left-0 -mb-1 -ml-1";case"bottom-right":return"bottom-0 right-0 -mb-1 -mr-1";default:throw new Error(`Invalid position: ${this.position}`)}},y(Ni,"properties",{color:{type:String,attribute:"color"},position:{type:String,attribute:"position"}});customElements.get("mw-pulse-dot")||customElements.define("mw-pulse-dot",Ni);var Fi=class extends M(_){constructor(){super();y(this,"render",()=>d`
|
|
2033
1853
|
<div class="${this.positionClasses} fixed right-6 bottom-24 z-10 flex animate-bounce flex-col items-center justify-center font-sans text-base">
|
|
2034
1854
|
<p class="mb-2 -translate-x-4 -rotate-12 transform text-lg leading-normal font-bold text-gray-800">${this.text}</p>
|
|
2035
1855
|
|
|
@@ -2042,7 +1862,18 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
2042
1862
|
stroke-linecap="round"></path>
|
|
2043
1863
|
</svg>
|
|
2044
1864
|
</div>
|
|
2045
|
-
`);this.positionClasses="",this.text="Try it out"}};
|
|
1865
|
+
`);this.positionClasses="",this.text="Try it out"}};y(Fi,"properties",{positionClasses:{type:String,attribute:"position"},text:{type:String}});customElements.get("mw-try-it-out")||customElements.define("mw-try-it-out",Fi);var Ke,Ie,Ho,fn,No=class{constructor(t=window.localStorage){f(this,Ie);f(this,Ke);m(this,Ke,t)}setex(t,r,n){return a(this,Ke).setItem(t,g(this,Ie,fn).call(this,{value:g(this,Ie,fn).call(this,r),expiresAt:Date.now()+n*1e3})||"")}set(t,r){return a(this,Ke).setItem(t,g(this,Ie,fn).call(this,{value:g(this,Ie,fn).call(this,r)})||"")}get(t){let r=a(this,Ke).getItem(t);if(!r)return;let n=g(this,Ie,Ho).call(this,r);if(n){if(n.expiresAt&&n.expiresAt<Date.now()){a(this,Ke).removeItem(t);return}return g(this,Ie,Ho).call(this,n.value)}}get molin_shop_assistant_distinct_id(){return localStorage.getItem("molin_shop_assistant_distinct_id")}set molin_shop_assistant_distinct_id(t){t===null?localStorage.removeItem("molin_shop_assistant_distinct_id"):localStorage.setItem("molin_shop_assistant_distinct_id",t)}get molin_widget_open_state(){return fe.get("molin-shop-ai-widget-open")??null}set molin_widget_open_state(t){fe.set("molin-shop-ai-widget-open",t)}resetWidgetData(){fe.molin_shop_assistant_distinct_id=null,fe.molin_widget_open_state=null}};Ke=new WeakMap,Ie=new WeakSet,Ho=function(t){if(!(typeof t!="string"||t===""))try{return JSON.parse(t)}catch{return}},fn=function(t){if(t!==void 0)try{return JSON.stringify(t)}catch{return}};var fe=new No;function cu(e){e?.body?.cancel().catch(console.warn)}var oe,Ve,zi,mn,ur,Fo=class{constructor(){f(this,oe,[]);f(this,Ve);f(this,zi,10);f(this,mn,5e3);f(this,ur,!1)}async add(t,r){if(a(this,oe).push(hu(t,r)),a(this,oe).length>=a(this,zi))return this.flush();a(this,Ve)||m(this,Ve,setTimeout(()=>{this.flush().catch(console.error)},a(this,mn)))}async flush(){if(a(this,ur)||a(this,oe).length===0)return;let t=[...a(this,oe)];try{m(this,ur,!0),clearTimeout(a(this,Ve)),m(this,Ve,void 0),m(this,oe,[]);let r=new AbortController,n=setTimeout(()=>r.abort(),5e3);await pu(t,{signal:r.signal}),clearTimeout(n)}catch(r){if(r.name==="AbortError")console.error("Request timed out, retrying events"),m(this,oe,[...t,...a(this,oe)]);else{console.error("Failed to send events to backend:",r);let n=t.filter(i=>i.event.includes("error"));m(this,oe,[...n,...a(this,oe)])}}finally{m(this,ur,!1),a(this,oe).length>0&&!a(this,Ve)&&m(this,Ve,setTimeout(()=>{this.flush().catch(console.error)},a(this,mn)))}}async flushBeforeUnload(){if(a(this,oe).length>0)try{let t=new FormData;t.set("events",JSON.stringify(a(this,oe))),navigator.sendBeacon(new URL("/widgets/data/collect",du()).href,t)}catch(t){console.error("Failed to send final events:",t)}}};oe=new WeakMap,Ve=new WeakMap,zi=new WeakMap,mn=new WeakMap,ur=new WeakMap;var uu=new Fo;window.addEventListener("beforeunload",()=>{uu.flushBeforeUnload().catch(console.error)});async function F(e,t,r){if(typeof e!="string")throw new TypeError("Event name must be a string");if(typeof t!="object"||t===null)throw new TypeError("Properties must be an object");try{if(e==="ShopAssistant: user clicked link"&&Z1("molin_link_click",t),r?.immediate){await pu([hu(e,t)]);return}else return uu.add(e,t)}catch(n){console.error("Failed to send event:",n)}}async function pu(e,{signal:t}={}){let r=new FormData;r.set("events",JSON.stringify(e));let n=await fetch(new URL("/widgets/data/collect",du()),{method:"POST",body:r,signal:t});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);cu(n)}function hu(e,t){return{event:e,widget_id:t.widgetId,properties:Object.assign({},t,W1()),distinct_id:q1(),timestamp:new Date().toISOString()}}function q1(){try{let e=fe.molin_shop_assistant_distinct_id;return e||(e=crypto.randomUUID(),fe.molin_shop_assistant_distinct_id=e),e}catch(e){console.error("Failed to deserialize distinct_id:",e);let t=crypto.randomUUID();try{fe.molin_shop_assistant_distinct_id=t}catch(r){console.error("Failed to store new distinct_id:",r)}return t}}function W1(){return{referrer:document.referrer,userAgent:navigator.userAgent,language:navigator.language,screenWidth:window.innerWidth,screenHeight:window.innerHeight,timestamp:new Date().toISOString(),timezoneOffset:new Date().getTimezoneOffset(),doNotTrack:navigator.doNotTrack??void 0}}function du(){let e=new URL(import.meta.url).hostname;return{localhost:"http://localhost:8787","molin.localhost":"http://molin.localhost:8787","widget.molin.foo":"https://molin.foo","widget.molin.ai":"https://molin.ai","molin.ai":"https://molin.ai","molin.foo":"https://molin.foo"}[e]||"https://molin.ai"}function Z1(e,t){try{window.dataLayer=window.dataLayer||[];let r={event:e,link_url:t.url};window.dataLayer.push(r)}catch(r){console.error("Failed to send event to dataLayer:",r)}}var Ct,gn,Je,St,Wi,mu,qi=class{constructor(t,r,n){f(this,Wi);f(this,Ct);f(this,gn);f(this,Je);f(this,St);y(this,"isLoading",!1);y(this,"data");m(this,Ct,t),m(this,gn,r),m(this,Je,n),t.addController(this)}fetch(){if(this.isLoading)return;a(this,St)?.abort();let t=new AbortController;m(this,St,t),this.isLoading=!0,this.data=void 0,a(this,Ct).requestUpdate(),(async()=>{let r=g(this,Wi,mu).call(this);return r.signal?.addEventListener("abort",()=>t.abort(),{signal:t.signal}),fetch(r,{signal:t.signal})})().then(async r=>{if(!r.ok)throw new Error(`${r.statusText}: ${await r.text()}`);this.isLoading=!1,this.data=typeof a(this,Je)?.transform=="function"?await a(this,Je).transform(r):r,a(this,Ct).requestUpdate()}).catch(r=>{a(this,Je)?.onError?.(r),this.isLoading=!1,this.data=void 0,a(this,Ct).requestUpdate()}).finally(()=>{t.abort()})}hostConnected(){this.isLoading||a(this,Je)?.fetchWhenConnected&&this.fetch()}hostDisconnected(){a(this,St)?.abort(),m(this,St,void 0)}};Ct=new WeakMap,gn=new WeakMap,Je=new WeakMap,St=new WeakMap,Wi=new WeakSet,mu=function(){let t=a(this,gn);if(typeof t=="function"&&(t=t()),!t)throw new Error("missing request");return new Request(t)};var ve,yn,pr,hr,Xe=class{constructor(t,r){f(this,ve);f(this,yn);f(this,pr);f(this,hr);m(this,ve,t),m(this,yn,r),t.addController(this)}get data(){return a(this,hr)||a(this,pr)?.data}hostConnected(){if(a(this,pr)||a(this,hr))return;let t=gu();t&&t.widgetId===a(this,ve).widgetId?m(this,hr,t.config):m(this,pr,new qi(a(this,ve),()=>{if(a(this,ve).cdn&&a(this,ve).widgetId)return`${a(this,ve).cdn}/config?w=${a(this,ve).widgetId}`;throw new Error("missing cdn or widgetId")},{fetchWhenConnected:!0,transform:async r=>{let n=await r.json();return n&&!t&&window.__INIT_MOLIN_SHOP_AI({cdn:a(this,ve).cdn,widgetId:a(this,ve).widgetId,config:n}),n},onError:a(this,yn)?.onError}))}};ve=new WeakMap,yn=new WeakMap,pr=new WeakMap,hr=new WeakMap;function Ye(){return window.molinSettings&&typeof window.molinSettings=="object"?window.molinSettings:null}var Zi,xn,Gi,Be,yu,wn,vn=class vn extends M(_){constructor(){super();f(this,Be);f(this,Zi,new Xe(this,{onError:console.error}));f(this,xn);f(this,Gi,{onError:r=>{alert(r.error),console.error(r.widgetId,r.error),F("ShopAssistant: error",{...r},{immediate:!0})},onNewMessageStartedStreaming:r=>{F("ShopAssistant: user received bot message (streaming started)",r)},onMessageEndedStreaming:r=>{F("ShopAssistant: user received bot message (streaming ended)",r)},onUserCanceledStreaming:r=>{F("ShopAssistant: user canceled streaming",r)},onUserClickedLink:r=>{F("ShopAssistant: user clicked link",r)},onUserSentInput:r=>{F("ShopAssistant: user sent input",r)}});this.cdn="https://widget.molin.ai",this.widgetId="",this.showClose=!1,this.xUserData=Ye()?.userData,this.xCustomInstructions=Ye()?.customInstructions}get config(){return a(this,xn)||a(this,Zi).data}render(){return this.config?d`
|
|
1866
|
+
<mw-context-widget .widgetId="${this.widgetId}" .config="${this.config}" .callbacks="${a(this,Gi)}" .xUserData="${this.xUserData}" .xCustomInstructions="${this.xCustomInstructions}">
|
|
1867
|
+
<!-- embed our chat component forwarding props -->
|
|
1868
|
+
<mw-chat ?show-close="${this.showClose}" @mw:close-click="${g(this,Be,yu)}">
|
|
1869
|
+
<slot name="banner" slot="banner"></slot>
|
|
1870
|
+
</mw-chat>
|
|
1871
|
+
</mw-context-widget>
|
|
1872
|
+
`:null}injectConfig(r){m(this,xn,r),this.requestUpdate()}reloadConfig(){a(this,Be,wn)?.reloadConfig()}reset(){this.xUserData={},this.xCustomInstructions="",a(this,Be,wn)?.reset(),this.requestUpdate()}get conversationId(){return a(this,Be,wn)?.conversationId??""}get messages(){return a(this,Be,wn)?.messages??[]}};Zi=new WeakMap,xn=new WeakMap,Gi=new WeakMap,Be=new WeakSet,yu=function(){this.dispatchEvent(new vn.CloseClickEvent)},wn=function(){return this.renderRoot.querySelector("mw-chat")},y(vn,"styles",ie`
|
|
1873
|
+
:host {
|
|
1874
|
+
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
1875
|
+
}
|
|
1876
|
+
`),y(vn,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},showClose:{type:Boolean,attribute:"show-close"},xUserData:{type:Object,attribute:!1},xCustomInstructions:{type:String,attribute:!1}});var $t=vn;customElements.get("molin-shop-ai-chat")||customElements.define("molin-shop-ai-chat",$t);var zo;$t.CloseClickEvent=(zo=class extends CustomEvent{constructor(t={}){super($t.CloseClickEvent.type,{...t})}},y(zo,"type","mw:close-click"),zo);var qo=class{constructor({hidden:t=!1}){y(this,"hidden");this.hidden=t}setUserData(t){for(let r of document.querySelectorAll("molin-shop-ai"))t?r.setAttribute("user-data",JSON.stringify(t)):r.removeAttribute("user-data");for(let r of document.querySelectorAll("molin-shop-ai-chat"))t?r.setAttribute("user-data",JSON.stringify(t)):r.removeAttribute("user-data")}setCustomInstructions(t){for(let r of document.querySelectorAll("molin-shop-ai"))t?r.setAttribute("custom-instructions",t):r.removeAttribute("custom-instructions");for(let r of document.querySelectorAll("molin-shop-ai-chat"))t?r.setAttribute("custom-instructions",t):r.removeAttribute("custom-instructions")}showLauncher(){for(let t of document.querySelectorAll("molin-shop-ai"))t instanceof $e&&t.showLauncher()}hideLauncher(){for(let t of document.querySelectorAll("molin-shop-ai"))t instanceof $e&&t.hideLauncher()}openChat(t){let{message:r,autoSend:n}=t||{};for(let i of document.querySelectorAll("molin-shop-ai"))i instanceof $e&&i.openChat({message:r,autoSend:n})}closeChat(){for(let t of document.querySelectorAll("molin-shop-ai"))t instanceof $e&&t.closeChat()}reset(){fe.resetWidgetData();for(let t of document.querySelectorAll("molin-shop-ai"))t instanceof $e&&t.reset();for(let t of document.querySelectorAll("molin-shop-ai-chat"))t instanceof $t&&t.reset()}};function wu({hidden:e}){let t=new qo({hidden:e});return window.Molin=t,t}function Ki(){let e=window.Molin;if(!e)throw new Error("window.Molin global not initialized");return e}window.__INIT_MOLIN_SHOP_AI=function(t){G1(t);let r=Ye(),n=typeof r?.hidden=="boolean"?r.hidden:window.self!==window.top;if(wu({hidden:n}),t.auto){let i=document.createElement("molin-shop-ai");i.setAttribute("cdn",t.cdn),i.setAttribute("widget",t.widgetId),document.body.appendChild(i)}};function G1(e){window.__INIT_MOLIN_SHOP_AI_OPTIONS=e}function gu(){return window.__INIT_MOLIN_SHOP_AI_OPTIONS}var Ji,bn=class extends M(_){constructor(){super();f(this,Ji,new Xe(this,{onError:console.error}));this.cdn="https://widget.molin.ai",this.widgetId="",this.state="open"}get config(){return a(this,Ji).data}render(){return this.config?d`
|
|
2046
1877
|
<!-- embed our bubble component forwarding props -->
|
|
2047
1878
|
<!-- these props are never internally updated by mw-bubble so we pass them down only one way -->
|
|
2048
1879
|
<mw-bubble
|
|
@@ -2050,70 +1881,70 @@ var Vp=Object.create;var Fs=Object.defineProperty;var Np=Object.getOwnPropertyDe
|
|
|
2050
1881
|
.color="${this.config?.bubble?.color||this.config?.color}"
|
|
2051
1882
|
.bubbleStyle="${this.config?.bubble?.style}"
|
|
2052
1883
|
.src="${this.config?.bubble?.bubbleUrl}"
|
|
2053
|
-
width="${
|
|
2054
|
-
height="${
|
|
2055
|
-
`:null}};
|
|
1884
|
+
width="${se(this.config?.bubble?.size?.width)}"
|
|
1885
|
+
height="${se(this.config?.bubble?.size?.height)}"></mw-bubble>
|
|
1886
|
+
`:null}};Ji=new WeakMap,y(bn,"styles",ie`
|
|
2056
1887
|
:host {
|
|
2057
1888
|
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
2058
1889
|
}
|
|
2059
|
-
`),
|
|
1890
|
+
`),y(bn,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},state:{type:String}});customElements.get("molin-shop-ai-launcher")||customElements.define("molin-shop-ai-launcher",bn);var ay="navigator"in globalThis&&/Mobi|Android|iPhone/i.test(navigator.userAgent),ly="navigator"in globalThis&&"share"in navigator,K1=Object.freeze({sm:640,md:768,lg:1024,xl:1280,"2xl":1536});function J1(e){if(typeof window>"u")return!1;let t=K1[e];return typeof t!="number"?(console.warn(`Invalid breakpoint: ${e}`),!1):window.matchMedia(`(min-width: ${t}px)`).matches}function Wo(){return J1("sm")}var Yi,dr,fr,Et,kn,Qi,Xi=class{constructor(t,r,n,i=window.history){f(this,Yi);f(this,dr);f(this,fr);f(this,Et);f(this,kn,!1);f(this,Qi,()=>{a(this,dr).test(window.location.pathname)&&a(this,fr).navigated()});m(this,Yi,t),m(this,dr,r),m(this,fr,n),m(this,Et,i),t.addController(this)}hostConnected(){a(this,Qi).call(this);let t=a(this,Et).pushState;a(this,Et).pushState=(...r)=>{if(t.call(a(this,Et),...r),!a(this,kn))try{let n=new URL(r[2],window.location.origin);a(this,dr).test(n.pathname)&&a(this,fr).navigated()}catch{}}}hostDisconnected(){m(this,kn,!0)}};Yi=new WeakMap,dr=new WeakMap,fr=new WeakMap,Et=new WeakMap,kn=new WeakMap,Qi=new WeakMap;function vu({minMs:e,maxMs:t}){return Math.random()*(t-e)+e}function es(e,t=""){return Object.entries(e).filter(([r,n])=>n).map(([r,n])=>`${t}${r}-[${n}]`).join(" ")}function xu(e,t={}){return[es(e),es(t,"max-sm:")].join(" ")}function bu(e){return es(e)}function ku(e){return Object.entries(e).filter(([t,r])=>r).filter(([t])=>t==="left"||t==="right").map(([t,r])=>{let n=`sm:${t}-[${r}]`;return t==="left"&&(n+=" sm:right-auto"),t==="right"&&(n+=" sm:left-auto"),n}).join(" ")}function Cu(e){let t=es(e),n=`sm:bottom-[${e.bottom?`calc(${e.bottom}+72px)`:"72px"}]`;return[t,n].filter(Boolean).join(" ")}var mr,gr,Cn,Sn,$n,ts,Zo=class{constructor(t,r,{threshold:n=5}={}){f(this,mr,0);f(this,gr,!1);f(this,Cn);f(this,Sn);f(this,$n,()=>{a(this,gr)||(requestAnimationFrame(a(this,ts)),m(this,gr,!0))});f(this,ts,()=>{let t=window.scrollY,r=t-a(this,mr);if(Math.abs(r)>=a(this,Sn)){let n=r>0?"down":"up";a(this,Cn).call(this,{scrollY:t,direction:n,deltaY:Math.abs(r)}),m(this,mr,t)}m(this,gr,!1)});m(this,Cn,r),m(this,Sn,n),t.addController(this)}hostConnected(){m(this,mr,window.scrollY),window.addEventListener("scroll",a(this,$n),{passive:!0})}hostDisconnected(){window.removeEventListener("scroll",a(this,$n))}};mr=new WeakMap,gr=new WeakMap,Cn=new WeakMap,Sn=new WeakMap,$n=new WeakMap,ts=new WeakMap;function Su(e,t,r){return new Zo(e,t,r)}var rs,ea,_n,ta,U,Ne,ns,I,Go,Ko,En,_t,Jo,$u,Eu,_u,is,Xo,Yo,Qo,At,$e=class extends M(_){constructor(){super();f(this,I);f(this,rs,new Xe(this,{onError:console.error}));f(this,ea,Su(this,r=>{a(this,I,Ko)&&!a(this,U)&&(r.direction==="down"?this._floatingInputVisible=!1:r.direction==="up"&&(this._floatingInputVisible=!0),this.requestUpdate())},{threshold:20}));f(this,_n);f(this,ta,new Xi(this,/.*/i,{navigated:()=>{if(!this.widgetId){console.warn("No widgetId set, cannot track page view");return}let r=a(this,I,_t)?.conversationId,n=Ht.restore(this.widgetId)?.conversationId,i=r||n;i&&F("ShopAssistant: pageview",{widgetId:this.widgetId,conversationId:i,url:document.location.href,title:document.title,hidden:this.config?this.config.hidden||!1:void 0})}}));f(this,U,!1);f(this,Ne,!1);f(this,ns,{onError:r=>{alert(r.error),console.error(r.widgetId,r.error),F("ShopAssistant: error",{...r},{immediate:!0})},onNewMessageStartedStreaming:r=>{F("ShopAssistant: user received bot message (streaming started)",r)},onMessageEndedStreaming:r=>{F("ShopAssistant: user received bot message (streaming ended)",r)},onUserCanceledStreaming:r=>{F("ShopAssistant: user canceled streaming",r)},onUserClickedLink:r=>{F("ShopAssistant: user clicked link",r)},onUserSentInput:r=>{F("ShopAssistant: user sent input",r)}});f(this,is,r=>{let n=r.detail.text,i=a(this,I,Jo);i&&typeof i.connect=="function"&&i.connect(),m(this,U,!0),m(this,Ne,!0),this.requestUpdate(),g(this,I,At).call(this,!0),setTimeout(()=>{g(this,I,Qo).call(this,n),g(this,I,Yo).call(this,n).catch(console.warn)},100),F("ShopAssistant: user sent input",{widgetId:this.widgetId,text:n,example:!1,conversationId:a(this,I,_t)?.conversationId||"",source:"ask-ai"})});this.cdn="https://widget.molin.ai",this.widgetId="",this._floatingInputVisible=!0,this.xUserData=Ye()?.userData,this.xCustomInstructions=Ye()?.customInstructions}get config(){return a(this,_n)||a(this,rs).data}render(){if(!this.config)return null;let r=xu(this.config.bubble.position,this.config.bubble.mobilePosition),n=bu(this.config.bubble.position),i=ku(this.config.bubble.position),s=Cu(this.config.bubble.position);return this.config.hidden||Ki().hidden?null:d`
|
|
2060
1891
|
<mw-context-widget
|
|
2061
1892
|
.widgetId="${this.widgetId}"
|
|
2062
1893
|
.config="${this.config}"
|
|
2063
|
-
.callbacks="${a(this,
|
|
1894
|
+
.callbacks="${a(this,ns)}"
|
|
2064
1895
|
.xUserData="${this.xUserData}"
|
|
2065
1896
|
.xCustomInstructions="${this.xCustomInstructions}"
|
|
2066
|
-
.autoConnect="${a(this,
|
|
1897
|
+
.autoConnect="${a(this,Ne)}">
|
|
2067
1898
|
<mw-bubble
|
|
2068
|
-
class="${r} ${this
|
|
2069
|
-
@click="${
|
|
2070
|
-
state="${this
|
|
1899
|
+
class="${r} ${a(this,U)?"opacity-0":"opacity-100"} fixed z-[${a(this,I,Go)}] transition-opacity"
|
|
1900
|
+
@click="${g(this,I,Eu)}"
|
|
1901
|
+
state="${a(this,U)?"close":"open"}"
|
|
2071
1902
|
.color="${this.config?.bubble?.color||this.config?.color}"
|
|
2072
1903
|
.bubbleStyle="${this.config?.bubble?.style}"
|
|
2073
1904
|
.src="${this.config?.bubble?.bubbleUrl}"
|
|
2074
|
-
width="${
|
|
2075
|
-
height="${
|
|
1905
|
+
width="${se(this.config?.bubble?.size?.width)}"
|
|
1906
|
+
height="${se(this.config?.bubble?.size?.height)}"></mw-bubble>
|
|
2076
1907
|
|
|
2077
1908
|
<!-- only load the component if enabled on any platform -->
|
|
2078
|
-
${this.isPopupEnabled?
|
|
1909
|
+
${this.isPopupEnabled?d`
|
|
2079
1910
|
<mw-popup
|
|
2080
1911
|
position="${s}"
|
|
2081
|
-
delay="${this.config.popup?.delayMs||
|
|
1912
|
+
delay="${this.config.popup?.delayMs||vu({minMs:2e3,maxMs:5e3})}"
|
|
2082
1913
|
sound="${this.config.popup?.muteSounds?"":this.config.popup?.soundUrl||""}"
|
|
2083
1914
|
.content="${{desktop:{text:this.config.popup?.text||"Hello there. How can we help?",color:this.config?.bubble?.color||this.config.color},mobile:{title:this.config.popup?.mobileTitleText||`Chat with ${this.config.title}`,text:this.config.popup?.text||"Hello there. How can we help?",button:this.config.popup?.mobileButtonText||`Chat with ${this.config.title}`,color:this.config.color,poweredBy:!this.config.removePoweredBy}}}"
|
|
2084
|
-
@mw:click="${
|
|
1915
|
+
@mw:click="${g(this,I,$u)}"></mw-popup>
|
|
2085
1916
|
`:null}
|
|
2086
1917
|
|
|
2087
1918
|
<!-- show "Try it out" if enabled (even if the chat window is showing) -->
|
|
2088
|
-
${this.config?.tryItOut?.mobileEnabled||this.config?.tryItOut?.desktopEnabled?
|
|
1919
|
+
${this.config?.tryItOut?.mobileEnabled||this.config?.tryItOut?.desktopEnabled?d`<mw-try-it-out
|
|
2089
1920
|
class="${this.config?.tryItOut?.mobileEnabled?"visible":"invisible"} ${this.config?.tryItOut?.desktopEnabled?"sm:visible":"sm:invisible"}"
|
|
2090
1921
|
position="${n}"
|
|
2091
1922
|
text="${this.config.tryItOut?.text||""}"></mw-try-it-out>`:null}
|
|
2092
1923
|
|
|
2093
1924
|
<!-- On first render, do not render the dialog, so it does not connect to backend. Once it's rendered once, it's never removed from the DOM. -->
|
|
2094
1925
|
<div
|
|
2095
|
-
class="${this
|
|
2096
|
-
<mw-chat ?show-close="${!0}" @mw:close-click="${
|
|
1926
|
+
class="${a(this,U)?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3"} ${i} fixed inset-0 z-[2147483647] bg-white font-sans text-[16px] leading-normal text-gray-800 shadow-2xl transition-all sm:top-auto sm:bottom-[1.5rem] sm:h-[92%] sm:max-h-[800px] sm:w-[calc(100dvh*0.50)] sm:max-w-[400px] sm:min-w-[300px] sm:rounded-[36px] 2xl:max-w-[420px]">
|
|
1927
|
+
<mw-chat ?show-close="${!0}" @mw:close-click="${g(this,I,_u)}">
|
|
2097
1928
|
<slot name="banner" slot="banner"></slot>
|
|
2098
1929
|
</mw-chat>
|
|
2099
1930
|
</div>
|
|
2100
1931
|
|
|
2101
1932
|
<!-- Floating input only visible when enabled, in center, on desktop only -->
|
|
2102
|
-
${this.config?.floatingAskAI?.enabled&&a(this,
|
|
1933
|
+
${this.config?.floatingAskAI?.enabled&&a(this,I,Ko)?d`
|
|
2103
1934
|
<mw-floating-ask-ai
|
|
2104
1935
|
?dark="${this.config?.floatingAskAI?.darkMode}"
|
|
2105
1936
|
.color="${this.config.color||this.config?.bubble?.color}"
|
|
2106
|
-
placeholder="${
|
|
2107
|
-
class="${!this
|
|
1937
|
+
placeholder="${se(this.config?.floatingAskAI?.placeholder)}"
|
|
1938
|
+
class="${!a(this,U)&&this._floatingInputVisible?"opacity-100 translate-y-0":"opacity-0 translate-y-full"} fixed left-1/2 z-[${a(this,I,Go)}] hidden -translate-x-1/2 transition-all duration-300 ease-in-out max-md:hidden sm:block"
|
|
2108
1939
|
style="bottom: ${this.config.bubble.position.bottom||"1.5rem"}"
|
|
2109
|
-
@mw-floating-ask-ai:submit="${a(this,
|
|
1940
|
+
@mw-floating-ask-ai:submit="${a(this,is)}"></mw-floating-ask-ai>
|
|
2110
1941
|
`:null}
|
|
2111
1942
|
</mw-context-widget>
|
|
2112
|
-
`}get isPopupEnabled(){return
|
|
1943
|
+
`}get isPopupEnabled(){return Wo()?!!this.config?.popup?.desktopEnabled:!!this.config?.popup?.mobileEnabled}updated(){a(this,U)&&a(this,I,En)?.hide()}firstUpdated(){Wo()&&fe.molin_widget_open_state?.isOpen&&!a(this,U)&&(m(this,U,!0),m(this,Ne,!0),this.requestUpdate())}openChat(r){let{message:n,autoSend:i}=r||{};if(a(this,U)){g(this,I,Xo).call(this,{message:n,autoSend:i});return}let s=a(this,I,Jo);s&&typeof s.connect=="function"&&s.connect(),m(this,U,!0),m(this,Ne,!0),this.requestUpdate(),g(this,I,At).call(this,!0),a(this,I,En)?.hide(),setTimeout(()=>{g(this,I,Xo).call(this,{message:n,autoSend:i})},200),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:a(this,U)?"open":"close"})}closeChat(){a(this,U)&&(m(this,U,!1),this._floatingInputVisible=!0,this.requestUpdate(),g(this,I,At).call(this,!1),a(this,I,En)?.hide(),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:a(this,U)?"open":"close"}))}showLauncher(){let r=Ki();r.hidden=!1,this.requestUpdate(),F("ShopAssistant: called show launcher",{widgetId:this.widgetId,source:"programmatic-method"})}hideLauncher(){let r=Ki();r.hidden=!0,this.requestUpdate(),F("ShopAssistant: called hide launcher",{widgetId:this.widgetId,source:"programmatic-method"})}injectConfig(r){m(this,_n,r),this.requestUpdate()}reset(){this.xUserData={},this.xCustomInstructions="",a(this,I,_t)?.reset(),this.requestUpdate()}};rs=new WeakMap,ea=new WeakMap,_n=new WeakMap,ta=new WeakMap,U=new WeakMap,Ne=new WeakMap,ns=new WeakMap,I=new WeakSet,Go=function(){return typeof this.config?.bubble?.zIndex=="number"?this.config.bubble.zIndex:2147483647},Ko=function(){return this.config?.floatingAskAI?.enabled||!0},En=function(){return this.renderRoot.querySelector("mw-popup")},_t=function(){return this.renderRoot.querySelector("mw-chat")},Jo=function(){return this.renderRoot.querySelector("mw-context-widget")},$u=function(){m(this,U,!0),m(this,Ne,!0),this.requestUpdate(),g(this,I,At).call(this,!0),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"popup-click",state:a(this,U)?"open":"close"})},Eu=function(){m(this,U,!a(this,U)),m(this,Ne,!0),this.requestUpdate(),g(this,I,At).call(this,a(this,U)),a(this,I,En)?.hide(),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"bubble-toggle",state:a(this,U)?"open":"close"})},_u=function(){m(this,U,!1),this._floatingInputVisible=!0,this.requestUpdate(),g(this,I,At).call(this,!1),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"top-right-close-button",state:a(this,U)?"open":"close"})},is=new WeakMap,Xo=function({message:r,autoSend:n=!1}={}){if(!r)return;g(this,I,Qo).call(this,r);let i=a(this,I,_t)?.isLiveMode;i||this.reset(),n&&!i&&g(this,I,Yo).call(this,r).catch(console.warn)},Yo=async function(r){let n=a(this,I,_t);if(!n){console.warn("Chat element not found, cannot send message");return}n.sendMessage?await n.sendMessage(r):console.warn("Chat element does not have sendMessage method")},Qo=function(r){let n=a(this,I,_t);if(!n){console.warn("Chat element not found, cannot set input value");return}n.setInputValue?n.setInputValue(r):console.warn("Chat element does not have setInputValue method")},At=function(r){fe.molin_widget_open_state={isOpen:r}},y($e,"styles",ie`
|
|
2113
1944
|
:host {
|
|
2114
1945
|
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
2115
1946
|
}
|
|
2116
|
-
`),
|
|
1947
|
+
`),y($e,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},xUserData:{type:Object,attribute:!1},xCustomInstructions:{type:String,attribute:!1},_floatingInputVisible:{type:Boolean,state:!0}});customElements.get("molin-shop-ai")||customElements.define("molin-shop-ai",$e);export{$e as MolinShopAI};
|
|
2117
1948
|
/*! Bundled license information:
|
|
2118
1949
|
|
|
2119
1950
|
@lit/reactive-element/css-tag.js:
|