@molin.ai/shop-ai 0.9.22 → 0.9.24
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 +253 -646
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDescriptor;var Yu=Object.getOwnPropertyNames;var Xu=Object.getPrototypeOf,Qu=Object.prototype.hasOwnProperty;var Fl=t=>{throw TypeError(t)};var e2=(t,e,r)=>e in t?Ao(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var sn=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var t2=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Yu(e))!Qu.call(t,i)&&i!==r&&Ao(t,i,{get:()=>e[i],enumerable:!(n=Ku(e,i))||n.enumerable});return t};var r2=(t,e,r)=>(r=t!=null?Ju(Xu(t)):{},t2(e||!t||!t.__esModule?Ao(r,"default",{value:t,enumerable:!0}):r,t));var w=(t,e,r)=>e2(t,typeof e!="symbol"?e+"":e,r),Io=(t,e,r)=>e.has(t)||Fl("Cannot "+r);var o=(t,e,r)=>(Io(t,e,"read from private field"),r?r.call(t):e.get(t)),d=(t,e,r)=>e.has(t)?Fl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),g=(t,e,r,n)=>(Io(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),f=(t,e,r)=>(Io(t,e,"access private method"),r);var Nl=(t,e,r,n)=>({set _(i){g(t,e,i,r)},get _(){return o(t,e,n)}});var R0=sn(jt=>{"use strict";var Eh=jt&&jt.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function u(p){try{c(n.next(p))}catch(m){a(m)}}function l(p){try{c(n.throw(p))}catch(m){a(m)}}function c(p){p.done?s(p.value):i(p.value).then(u,l)}c((n=n.apply(t,e||[])).next())})},_h=jt&&jt.__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,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(p){return l([c,p])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=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(jt,"__esModule",{value:!0});jt.base64ToBlob=Mh;function Mh(t){return Eh(this,void 0,void 0,function(){var e,r,n;return _h(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=Ih(t),n&&(r=r.slice(0,r.size,n)),[2,r]}})})}var Ah=/^data:(.+);base64,/;function Ih(t){var e;return(e=t.match(Ah))===null||e===void 0?void 0:e.slice(1,2).pop()}});var V0=sn(Tt=>{"use strict";var Lh=Tt&&Tt.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function u(p){try{c(n.next(p))}catch(m){a(m)}}function l(p){try{c(n.throw(p))}catch(m){a(m)}}function c(p){p.done?s(p.value):i(p.value).then(u,l)}c((n=n.apply(t,e||[])).next())})},jh=Tt&&Tt.__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,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(p){return l([c,p])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=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(Tt,"__esModule",{value:!0});Tt.base64ToFile=Th;function Th(t,e,r){return Lh(this,void 0,void 0,function(){var n,i;return jh(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 Ra=sn(Dt=>{"use strict";var Pa=Dt&&Dt.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function u(p){try{c(n.next(p))}catch(m){a(m)}}function l(p){try{c(n.throw(p))}catch(m){a(m)}}function c(p){p.done?s(p.value):i(p.value).then(u,l)}c((n=n.apply(t,e||[])).next())})},Ua=Dt&&Dt.__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,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(p){return l([c,p])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=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(Dt,"__esModule",{value:!0});Dt.blobToBase64=Dh;function Dh(t){return Pa(this,void 0,void 0,function(){return Ua(this,function(e){return[2,typeof FileReader=="function"?Oh(t):Uh(t)]})})}var kr;(function(t){t.error="error",t.loadend="loadend"})(kr||(kr={}));function Oh(t){return Pa(this,void 0,void 0,function(){return Ua(this,function(e){return[2,new Promise(function(r,n){try{var i=new FileReader,s=function(){r(i.result),i.removeEventListener(kr.loadend,s)};i.addEventListener(kr.loadend,s);var a=function(){n(i.error),i.removeEventListener(kr.error,a)};i.addEventListener(kr.error,a),i.readAsDataURL(t)}catch(u){n(u)}})]})})}var Ph="application/octet-stream";function Uh(t){return Pa(this,void 0,void 0,function(){var e,r,n,i;return Ua(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||Ph,[2,"data:".concat(i,";base64,").concat(e.toString("base64"))]}})})}});var B0=sn(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.fileToBase64=void 0;var Rh=Ra();Object.defineProperty(cs,"fileToBase64",{enumerable:!0,get:function(){return Rh.blobToBase64}})});var H0=sn(Re=>{"use strict";var Vh=Re&&Re.__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]})),us=Re&&Re.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Vh(e,t,r)};Object.defineProperty(Re,"__esModule",{value:!0});us(R0(),Re);us(V0(),Re);us(Ra(),Re);us(B0(),Re)});var Ei=globalThis,_i=Ei.ShadowRoot&&(Ei.ShadyCSS===void 0||Ei.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Lo=Symbol(),Zl=new WeakMap,on=class{constructor(e,r,n){if(this._$cssResult$=!0,n!==Lo)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(_i&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=Zl.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Zl.set(r,e))}return e}toString(){return this.cssText}},Wl=t=>new on(typeof t=="string"?t:t+"",void 0,Lo),H=(t,...e)=>{let r=t.length===1?t[0]:e.reduce(((n,i,s)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new on(r,t,Lo)},Gl=(t,e)=>{if(_i)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let n=document.createElement("style"),i=Ei.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},jo=_i?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let n of e.cssRules)r+=n.cssText;return Wl(r)})(t):t;var{is:n2,defineProperty:i2,getOwnPropertyDescriptor:s2,getOwnPropertyNames:o2,getOwnPropertySymbols:a2,getPrototypeOf:l2}=Object,Mi=globalThis,Jl=Mi.trustedTypes,c2=Jl?Jl.emptyScript:"",u2=Mi.reactiveElementPolyfillSupport,an=(t,e)=>t,To={toAttribute(t,e){switch(e){case Boolean:t=t?c2: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}},Yl=(t,e)=>!n2(t,e),Kl={attribute:!0,type:String,converter:To,reflect:!1,useDefault:!1,hasChanged:Yl};Symbol.metadata??=Symbol("metadata"),Mi.litPropertyMetadata??=new WeakMap;var Fe=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=Kl){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&&i2(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:s}=s2(this.prototype,e)??{get(){return this[r]},set(a){this[r]=a}};return{get:i,set(a){let u=i?.call(this);s?.call(this,a),this.requestUpdate(e,u,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Kl}static _$Ei(){if(this.hasOwnProperty(an("elementProperties")))return;let e=l2(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(an("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(an("properties"))){let r=this.properties,n=[...o2(r),...a2(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(jo(i))}else e!==void 0&&r.push(jo(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 Gl(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:To).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),a=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:To;this._$Em=i;let u=a.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??Yl)(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},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??r??this[e]),s!==!0||a!==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:a}=s,u=this[i];a!==!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){}};Fe.elementStyles=[],Fe.shadowRootOptions={mode:"open"},Fe[an("elementProperties")]=new Map,Fe[an("finalized")]=new Map,u2?.({ReactiveElement:Fe}),(Mi.reactiveElementVersions??=[]).push("2.1.1");var Oo=globalThis,Ai=Oo.trustedTypes,Xl=Ai?Ai.createPolicy("lit-html",{createHTML:t=>t}):void 0,Po="$lit$",Ne=`lit$${Math.random().toFixed(9).slice(2)}$`,Uo="?"+Ne,h2=`<${Uo}>`,bt=document,cn=()=>bt.createComment(""),un=t=>t===null||typeof t!="object"&&typeof t!="function",Ro=Array.isArray,i1=t=>Ro(t)||typeof t?.[Symbol.iterator]=="function",Do=`[
|
|
2
|
-
\f\r]`,ln=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
1
|
+
var Wd=Object.create;var _o=Object.defineProperty;var Gd=Object.getOwnPropertyDescriptor;var Zd=Object.getOwnPropertyNames;var Jd=Object.getPrototypeOf,Kd=Object.prototype.hasOwnProperty;var Wl=r=>{throw TypeError(r)};var Yd=(r,e,t)=>e in r?_o(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var sn=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Xd=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Zd(e))!Kd.call(r,i)&&i!==t&&_o(r,i,{get:()=>e[i],enumerable:!(n=Gd(e,i))||n.enumerable});return r};var Qd=(r,e,t)=>(t=r!=null?Wd(Jd(r)):{},Xd(e||!r||!r.__esModule?_o(t,"default",{value:r,enumerable:!0}):t,r));var w=(r,e,t)=>Yd(r,typeof e!="symbol"?e+"":e,t),Io=(r,e,t)=>e.has(r)||Wl("Cannot "+t);var o=(r,e,t)=>(Io(r,e,"read from private field"),t?t.call(r):e.get(r)),p=(r,e,t)=>e.has(r)?Wl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),g=(r,e,t,n)=>(Io(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),m=(r,e,t)=>(Io(r,e,"access private method"),t);var Gl=(r,e,t,n)=>({set _(i){g(r,e,i,t)},get _(){return o(r,e,n)}});var qu=sn(Lt=>{"use strict";var C1=Lt&&Lt.__awaiter||function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function u(d){try{c(n.next(d))}catch(f){a(f)}}function l(d){try{c(n.throw(d))}catch(f){a(f)}}function c(d){d.done?s(d.value):i(d.value).then(u,l)}c((n=n.apply(r,e||[])).next())})},$1=Lt&&Lt.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(d){return l([c,d])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)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 t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(d){c=[6,d],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(Lt,"__esModule",{value:!0});Lt.base64ToBlob=S1;function S1(r){return C1(this,void 0,void 0,function(){var e,t,n;return $1(this,function(i){switch(i.label){case 0:return[4,fetch(r)];case 1:return e=i.sent(),[4,e.blob()];case 2:return t=i.sent(),n=_1(r),n&&(t=t.slice(0,t.size,n)),[2,t]}})})}var E1=/^data:(.+);base64,/;function _1(r){var e;return(e=r.match(E1))===null||e===void 0?void 0:e.slice(1,2).pop()}});var Vu=sn(jt=>{"use strict";var I1=jt&&jt.__awaiter||function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function u(d){try{c(n.next(d))}catch(f){a(f)}}function l(d){try{c(n.throw(d))}catch(f){a(f)}}function c(d){d.done?s(d.value):i(d.value).then(u,l)}c((n=n.apply(r,e||[])).next())})},M1=jt&&jt.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(d){return l([c,d])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)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 t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(d){c=[6,d],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(jt,"__esModule",{value:!0});jt.base64ToFile=A1;function A1(r,e,t){return I1(this,void 0,void 0,function(){var n,i;return M1(this,function(s){switch(s.label){case 0:return[4,fetch(r)];case 1:return n=s.sent(),[4,n.blob()];case 2:return i=s.sent(),[2,new File([i],e,t)]}})})}});var Pa=sn(Dt=>{"use strict";var Oa=Dt&&Dt.__awaiter||function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function u(d){try{c(n.next(d))}catch(f){a(f)}}function l(d){try{c(n.throw(d))}catch(f){a(f)}}function c(d){d.done?s(d.value):i(d.value).then(u,l)}c((n=n.apply(r,e||[])).next())})},Ua=Dt&&Dt.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(c){return function(d){return l([c,d])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(t=0)),t;)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 t.label++,{value:c[1],done:!1};case 5:t.label++,i=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(d){c=[6,d],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(Dt,"__esModule",{value:!0});Dt.blobToBase64=T1;function T1(r){return Oa(this,void 0,void 0,function(){return Ua(this,function(e){return[2,typeof FileReader=="function"?L1(r):D1(r)]})})}var $r;(function(r){r.error="error",r.loadend="loadend"})($r||($r={}));function L1(r){return Oa(this,void 0,void 0,function(){return Ua(this,function(e){return[2,new Promise(function(t,n){try{var i=new FileReader,s=function(){t(i.result),i.removeEventListener($r.loadend,s)};i.addEventListener($r.loadend,s);var a=function(){n(i.error),i.removeEventListener($r.error,a)};i.addEventListener($r.error,a),i.readAsDataURL(r)}catch(u){n(u)}})]})})}var j1="application/octet-stream";function D1(r){return Oa(this,void 0,void 0,function(){var e,t,n,i;return Ua(this,function(s){switch(s.label){case 0:return n=(t=Buffer).from,[4,r.text()];case 1:return e=n.apply(t,[s.sent()]),i=r.type||j1,[2,"data:".concat(i,";base64,").concat(e.toString("base64"))]}})})}});var Fu=sn(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.fileToBase64=void 0;var O1=Pa();Object.defineProperty(us,"fileToBase64",{enumerable:!0,get:function(){return O1.blobToBase64}})});var Nu=sn(Pe=>{"use strict";var U1=Pe&&Pe.__createBinding||(Object.create?(function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}):(function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]})),hs=Pe&&Pe.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&U1(e,r,t)};Object.defineProperty(Pe,"__esModule",{value:!0});hs(qu(),Pe);hs(Vu(),Pe);hs(Pa(),Pe);hs(Fu(),Pe)});var Ei=globalThis,_i=Ei.ShadowRoot&&(Ei.ShadyCSS===void 0||Ei.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Mo=Symbol(),Zl=new WeakMap,on=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==Mo)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(_i&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=Zl.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Zl.set(t,e))}return e}toString(){return this.cssText}},Jl=r=>new on(typeof r=="string"?r:r+"",void 0,Mo),J=(r,...e)=>{let t=r.length===1?r[0]:e.reduce(((n,i,s)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[s+1]),r[0]);return new on(t,r,Mo)},Kl=(r,e)=>{if(_i)r.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(let t of e){let n=document.createElement("style"),i=Ei.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=t.cssText,r.appendChild(n)}},Ao=_i?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(let n of e.cssRules)t+=n.cssText;return Jl(t)})(r):r;var{is:ep,defineProperty:tp,getOwnPropertyDescriptor:rp,getOwnPropertyNames:np,getOwnPropertySymbols:ip,getPrototypeOf:sp}=Object,Ii=globalThis,Yl=Ii.trustedTypes,op=Yl?Yl.emptyScript:"",ap=Ii.reactiveElementPolyfillSupport,an=(r,e)=>r,To={toAttribute(r,e){switch(e){case Boolean:r=r?op:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},Ql=(r,e)=>!ep(r,e),Xl={attribute:!0,type:String,converter:To,reflect:!1,useDefault:!1,hasChanged:Ql};Symbol.metadata??=Symbol("metadata"),Ii.litPropertyMetadata??=new WeakMap;var Ne=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,t=Xl){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),i=this.getPropertyDescriptor(e,n,t);i!==void 0&&tp(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){let{get:i,set:s}=rp(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get:i,set(a){let u=i?.call(this);s?.call(this,a),this.requestUpdate(e,u,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Xl}static _$Ei(){if(this.hasOwnProperty(an("elementProperties")))return;let e=sp(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(an("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(an("properties"))){let t=this.properties,n=[...np(t),...ip(t)];for(let i of n)this.createProperty(i,t[i])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[n,i]of t)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[t,n]of this.elementProperties){let i=this._$Eu(t,n);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let i of n)t.unshift(Ao(i))}else e!==void 0&&t.push(Ao(e));return t}static _$Eu(e,t){let n=t.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,t=this.constructor.elementProperties;for(let n of t.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 Kl(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,t,n){this._$AK(e,n)}_$ET(e,t){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:To).toAttribute(t,n.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,t){let n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let s=n.getPropertyOptions(i),a=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:To;this._$Em=i;let u=a.fromAttribute(t,s.type);this[i]=u??this._$Ej?.get(i)??u,this._$Em=null}}requestUpdate(e,t,n){if(e!==void 0){let i=this.constructor,s=this[e];if(n??=i.getPropertyOptions(e),!((n.hasChanged??Ql)(s,t)||n.useDefault&&n.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,n))))return;this.C(e,t,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:i,wrapped:s},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),s!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}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:a}=s,u=this[i];a!==!0||this._$AL.has(i)||u===void 0||this.C(i,void 0,s,u)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((n=>n.hostUpdate?.())),this.update(t)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((t=>t.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((t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};Ne.elementStyles=[],Ne.shadowRootOptions={mode:"open"},Ne[an("elementProperties")]=new Map,Ne[an("finalized")]=new Map,ap?.({ReactiveElement:Ne}),(Ii.reactiveElementVersions??=[]).push("2.1.1");var jo=globalThis,Mi=jo.trustedTypes,ec=Mi?Mi.createPolicy("lit-html",{createHTML:r=>r}):void 0,Do="$lit$",He=`lit$${Math.random().toFixed(9).slice(2)}$`,Oo="?"+He,lp=`<${Oo}>`,xt=document,cn=()=>xt.createComment(""),un=r=>r===null||typeof r!="object"&&typeof r!="function",Uo=Array.isArray,oc=r=>Uo(r)||typeof r?.[Symbol.iterator]=="function",Lo=`[
|
|
2
|
+
\f\r]`,ln=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,tc=/-->/g,rc=/>/g,vt=RegExp(`>|${Lo}(?:([^\\s"'>=/]+)(${Lo}*=${Lo}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),nc=/'/g,ic=/"/g,ac=/^(?:script|style|textarea|title)$/i,Po=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),h=Po(1),z0=Po(2),W0=Po(3),Ae=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),sc=new WeakMap,bt=xt.createTreeWalker(xt,129);function lc(r,e){if(!Uo(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return ec!==void 0?ec.createHTML(e):e}var cc=(r,e)=>{let t=r.length-1,n=[],i,s=e===2?"<svg>":e===3?"<math>":"",a=ln;for(let u=0;u<t;u++){let l=r[u],c,d,f=-1,y=0;for(;y<l.length&&(a.lastIndex=y,d=a.exec(l),d!==null);)y=a.lastIndex,a===ln?d[1]==="!--"?a=tc:d[1]!==void 0?a=rc:d[2]!==void 0?(ac.test(d[2])&&(i=RegExp("</"+d[2],"g")),a=vt):d[3]!==void 0&&(a=vt):a===vt?d[0]===">"?(a=i??ln,f=-1):d[1]===void 0?f=-2:(f=a.lastIndex-d[2].length,c=d[1],a=d[3]===void 0?vt:d[3]==='"'?ic:nc):a===ic||a===nc?a=vt:a===tc||a===rc?a=ln:(a=vt,i=void 0);let x=a===vt&&r[u+1].startsWith("/>")?" ":"";s+=a===ln?l+lp:f>=0?(n.push(c),l.slice(0,f)+Do+l.slice(f)+He+x):l+He+(f===-2?u:x)}return[lc(r,s+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},hn=class r{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let s=0,a=0,u=e.length-1,l=this.parts,[c,d]=cc(e,t);if(this.el=r.createElement(c,n),bt.currentNode=this.el.content,t===2||t===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(i=bt.nextNode())!==null&&l.length<u;){if(i.nodeType===1){if(i.hasAttributes())for(let f of i.getAttributeNames())if(f.endsWith(Do)){let y=d[a++],x=i.getAttribute(f).split(He),S=/([.?@])?(.*)/.exec(y);l.push({type:1,index:s,name:S[2],strings:x,ctor:S[1]==="."?Ti:S[1]==="?"?Li:S[1]==="@"?ji:Ct}),i.removeAttribute(f)}else f.startsWith(He)&&(l.push({type:6,index:s}),i.removeAttribute(f));if(ac.test(i.tagName)){let f=i.textContent.split(He),y=f.length-1;if(y>0){i.textContent=Mi?Mi.emptyScript:"";for(let x=0;x<y;x++)i.append(f[x],cn()),bt.nextNode(),l.push({type:2,index:++s});i.append(f[y],cn())}}}else if(i.nodeType===8)if(i.data===Oo)l.push({type:2,index:s});else{let f=-1;for(;(f=i.data.indexOf(He,f+1))!==-1;)l.push({type:7,index:s}),f+=He.length-1}s++}}static createElement(e,t){let n=xt.createElement("template");return n.innerHTML=e,n}};function kt(r,e,t=r,n){if(e===Ae)return e;let i=n!==void 0?t._$Co?.[n]:t._$Cl,s=un(e)?void 0:e._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),s===void 0?i=void 0:(i=new s(r),i._$AT(r,t,n)),n!==void 0?(t._$Co??=[])[n]=i:t._$Cl=i),i!==void 0&&(e=kt(r,i._$AS(r,e.values),i,n)),e}var Ai=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,i=(e?.creationScope??xt).importNode(t,!0);bt.currentNode=i;let s=bt.nextNode(),a=0,u=0,l=n[0];for(;l!==void 0;){if(a===l.index){let c;l.type===2?c=new Xt(s,s.nextSibling,this,e):l.type===1?c=new l.ctor(s,l.name,l.strings,this,e):l.type===6&&(c=new Di(s,this,e)),this._$AV.push(c),l=n[++u]}a!==l?.index&&(s=bt.nextNode(),a++)}return bt.currentNode=xt,i}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}},Xt=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,i){this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=kt(this,e,t),un(e)?e===W||e==null||e===""?(this._$AH!==W&&this._$AR(),this._$AH=W):e!==this._$AH&&e!==Ae&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):oc(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==W&&un(this._$AH)?this._$AA.nextSibling.data=e:this.T(xt.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=hn.createElement(lc(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(t);else{let s=new Ai(i,this),a=s.u(this.options);s.p(t),this.T(a),this._$AH=s}}_$AC(e){let t=sc.get(e.strings);return t===void 0&&sc.set(e.strings,t=new hn(e)),t}k(e){Uo(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,n,i=0;for(let s of e)i===t.length?t.push(n=new r(this.O(cn()),this.O(cn()),this,this.options)):n=t[i],n._$AI(s),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Ct=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,i,s){this.type=1,this._$AH=W,this._$AN=void 0,this.element=e,this.name=t,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=W}_$AI(e,t=this,n,i){let s=this.strings,a=!1;if(s===void 0)e=kt(this,e,t,0),a=!un(e)||e!==this._$AH&&e!==Ae,a&&(this._$AH=e);else{let u=e,l,c;for(e=s[0],l=0;l<s.length-1;l++)c=kt(this,u[n+l],t,l),c===Ae&&(c=this._$AH[l]),a||=!un(c)||c!==this._$AH[l],c===W?e=W:e!==W&&(e+=(c??"")+s[l+1]),this._$AH[l]=c}a&&!i&&this.j(e)}j(e){e===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Ti=class extends Ct{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===W?void 0:e}},Li=class extends Ct{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==W)}},ji=class extends Ct{constructor(e,t,n,i,s){super(e,t,n,i,s),this.type=5}_$AI(e,t=this){if((e=kt(this,e,t,0)??W)===Ae)return;let n=this._$AH,i=e===W&&n!==W||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==W&&(n===W||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Di=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){kt(this,e)}},uc={M:Do,P:He,A:Oo,C:1,L:cc,R:Ai,D:oc,V:kt,I:Xt,H:Ct,N:Li,U:ji,B:Ti,F:Di},cp=jo.litHtmlPolyfillSupport;cp?.(hn,Xt),(jo.litHtmlVersions??=[]).push("3.3.1");var hc=(r,e,t)=>{let n=t?.renderBefore??e,i=n._$litPart$;if(i===void 0){let s=t?.renderBefore??null;n._$litPart$=i=new Xt(e.insertBefore(cn(),s),s,void 0,t??{})}return i._$AI(r),i};var Ro=globalThis,$=class extends Ne{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=hc(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Ae}};$._$litElement$=!0,$.finalized=!0,Ro.litElementHydrateSupport?.({LitElement:$});var up=Ro.litElementPolyfillSupport;up?.({LitElement:$});(Ro.litElementVersions??=[]).push("4.2.1");var dn=class dn extends HTMLElement{constructor(){super();w(this,"name","");this.attachShadow({mode:"open"})}attributeChangedCallback(t,n,i){if(n!==i&&dn.observedAttributes.includes(t)){switch(t){case"name":this.name=i||"";break}this.render()}}resolveIcon(t){throw new Error("Not implemented")}render(){let t=document.createElement("style");for(t.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(
|
|
8
|
+
`;this.shadowRoot?.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild),this.shadowRoot.appendChild(t);if(!this.name)return;let n=this.resolveIcon(this.name);if(!n){console.warn(`'${this.name}' not found, please add it to ${dn.name}`);return}let a=new DOMParser().parseFromString(n,"image/svg+xml").documentElement;a.setAttribute("fill","currentColor"),a.style.width="100%",a.style.height="100%",this.shadowRoot?.appendChild(a)}};w(dn,"observedAttributes",["name"]);var Oi=dn;var dc={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"/>
|
|
@@ -62,6 +62,8 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
62
62
|
<path d="M2.25 8.25H21.75M2.25 9H21.75M5.25 14.25H11.25M5.25 16.5H8.25M4.5 19.5H19.5C20.7426 19.5 21.75 18.4926 21.75 17.25V6.75C21.75 5.50736 20.7426 4.5 19.5 4.5H4.5C3.25736 4.5 2.25 5.50736 2.25 6.75V17.25C2.25 18.4926 3.25736 19.5 4.5 19.5Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
63
63
|
</svg>`,users:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
64
64
|
<path d="M15 19.1276C15.8329 19.37 16.7138 19.5 17.625 19.5C19.1037 19.5 20.5025 19.1576 21.7464 18.5478C21.7488 18.4905 21.75 18.4329 21.75 18.375C21.75 16.0968 19.9031 14.25 17.625 14.25C16.2069 14.25 14.956 14.9655 14.2136 16.0552M15 19.1276V19.125C15 18.0121 14.7148 16.9658 14.2136 16.0552M15 19.1276C15 19.1632 14.9997 19.1988 14.9991 19.2343C13.1374 20.3552 10.9565 21 8.625 21C6.29353 21 4.11264 20.3552 2.25092 19.2343C2.25031 19.198 2.25 19.1615 2.25 19.125C2.25 15.6042 5.10418 12.75 8.625 12.75C11.0329 12.75 13.129 14.085 14.2136 16.0552M12 6.375C12 8.23896 10.489 9.75 8.625 9.75C6.76104 9.75 5.25 8.23896 5.25 6.375C5.25 4.51104 6.76104 3 8.625 3C10.489 3 12 4.51104 12 6.375ZM20.25 8.625C20.25 10.0747 19.0747 11.25 17.625 11.25C16.1753 11.25 15 10.0747 15 8.625C15 7.17525 16.1753 6 17.625 6C19.0747 6 20.25 7.17525 20.25 8.625Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
65
|
+
</svg>`,"user-group":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
66
|
+
<path d="M17.9999 18.7191C18.2474 18.7396 18.4978 18.75 18.7506 18.75C19.7989 18.75 20.8054 18.5708 21.741 18.2413C21.7473 18.1617 21.7506 18.0812 21.7506 18C21.7506 16.3431 20.4074 15 18.7506 15C18.123 15 17.5403 15.1927 17.0587 15.5222M17.9999 18.7191C18 18.7294 18 18.7397 18 18.75C18 18.975 17.9876 19.1971 17.9635 19.4156C16.2067 20.4237 14.1707 21 12 21C9.82933 21 7.79327 20.4237 6.03651 19.4156C6.01238 19.1971 6 18.975 6 18.75C6 18.7397 6.00003 18.7295 6.00008 18.7192M17.9999 18.7191C17.994 17.5426 17.6494 16.4461 17.0587 15.5222M17.0587 15.5222C15.9928 13.8552 14.1255 12.75 12 12.75C9.87479 12.75 8.00765 13.8549 6.94169 15.5216M6.94169 15.5216C6.46023 15.1925 5.87796 15 5.25073 15C3.59388 15 2.25073 16.3431 2.25073 18C2.25073 18.0812 2.25396 18.1617 2.26029 18.2413C3.19593 18.5708 4.2024 18.75 5.25073 18.75C5.50307 18.75 5.75299 18.7396 6.00008 18.7192M6.94169 15.5216C6.35071 16.4457 6.00598 17.5424 6.00008 18.7192M15 6.75C15 8.40685 13.6569 9.75 12 9.75C10.3431 9.75 9 8.40685 9 6.75C9 5.09315 10.3431 3.75 12 3.75C13.6569 3.75 15 5.09315 15 6.75ZM21 9.75C21 10.9926 19.9926 12 18.75 12C17.5074 12 16.5 10.9926 16.5 9.75C16.5 8.50736 17.5074 7.5 18.75 7.5C19.9926 7.5 21 8.50736 21 9.75ZM7.5 9.75C7.5 10.9926 6.49264 12 5.25 12C4.00736 12 3 10.9926 3 9.75C3 8.50736 4.00736 7.5 5.25 7.5C6.49264 7.5 7.5 8.50736 7.5 9.75Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
65
67
|
</svg>`,"chart-bar":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
66
68
|
<path d="M3 13.125C3 12.5037 3.50368 12 4.125 12H6.375C6.99632 12 7.5 12.5037 7.5 13.125V19.875C7.5 20.4963 6.99632 21 6.375 21H4.125C3.50368 21 3 20.4963 3 19.875V13.125Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
67
69
|
<path d="M9.75 8.625C9.75 8.00368 10.2537 7.5 10.875 7.5H13.125C13.7463 7.5 14.25 8.00368 14.25 8.625V19.875C14.25 20.4963 13.7463 21 13.125 21H10.875C10.2537 21 9.75 20.4963 9.75 19.875V8.625Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -123,7 +125,9 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
123
125
|
<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
126
|
</svg>`,"eye-slash":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
125
127
|
<path d="M3.97993 8.22257C3.05683 9.31382 2.35242 10.596 1.93436 12.0015C3.22565 16.338 7.24311 19.5 11.9991 19.5C12.9917 19.5 13.9521 19.3623 14.8623 19.1049M6.22763 6.22763C7.88389 5.13558 9.86771 4.5 12 4.5C16.756 4.5 20.7734 7.66205 22.0647 11.9985C21.3528 14.3919 19.8106 16.4277 17.772 17.772M6.22763 6.22763L3 3M6.22763 6.22763L9.87868 9.87868M17.772 17.772L21 21M17.772 17.772L14.1213 14.1213M14.1213 14.1213C14.6642 13.5784 15 12.8284 15 12C15 10.3431 13.6569 9 12 9C11.1716 9 10.4216 9.33579 9.87868 9.87868M14.1213 14.1213L9.87868 9.87868" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
126
|
-
</svg>`};var f2=u1,Ho=class extends Oi{resolveIcon(e){let r=f2[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",Ho);var dn,fe,ve,fn,qo,Pi=class{constructor(e,r){d(this,fn);d(this,dn);d(this,fe);d(this,ve);if(!e)throw new Error("host is required");if(!r)throw new Error("config is required");g(this,dn,e),o(this,dn).addController(this),g(this,fe,r)}connect(e){g(this,fe,e),g(this,ve,f(this,fn,qo).call(this))}hostConnected(){o(this,ve)||setTimeout(()=>{o(this,ve)||g(this,ve,f(this,fn,qo).call(this))},0)}hostDisconnected(){o(this,ve)?.close(1e3,"lit_host_disconnected"),g(this,ve,void 0)}send(e){o(this,ve)?.send(e)}close(e,r){o(this,ve)?.close(e,r)}get isConnected(){return o(this,ve)?.readyState===WebSocket.OPEN}get isConnecting(){return o(this,ve)?.readyState===WebSocket.CONNECTING}};dn=new WeakMap,fe=new WeakMap,ve=new WeakMap,fn=new WeakSet,qo=function(){let e=new WebSocket(o(this,fe).url());return o(this,fe).onClose&&(e.onclose=o(this,fe).onClose),o(this,fe).onOpen&&(e.onopen=o(this,fe).onOpen),o(this,fe).onError&&(e.onerror=o(this,fe).onError),o(this,fe).onMessage&&(e.onmessage=o(this,fe).onMessage),e};var h1=Array.isArray;var zo=t=>!!(t&&t.constructor&&t.call&&t.apply);var p1=t=>!(!t||!t.then||!zo(t.then));var Fo=(t,e,r=!1)=>{if(!t)return[];let n=(s,a)=>e(s)-e(a),i=(s,a)=>e(a)-e(s);return t.slice().sort(r===!0?i:n)};function*mn(t,e,r=i=>i,n=1){let i=zo(r)?r:()=>r,s=e?t:0,a=e??t;for(let u=s;u<=a&&(yield i(u),!(u+n>a));u+=n);}var No=(t,e,r,n)=>Array.from(mn(t,e,r,n));var Zo=(t,e)=>t?t.reduce((r,n)=>{let[i,s]=r;return e(n)?[[...i,n],s]:[i,[...s,n]]},[[],[]]):[[],[]];var Wo=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}},Go=async(t,e,r)=>{let n=e.map((c,p)=>({index:p,item:c})),i=async c=>{let p=[];for(;;){let m=n.pop();if(!m)return c(p);let[v,b]=await gn(r)(m.item);p.push({error:v,result:b,index:m.index})}},s=No(1,t).map(()=>new Promise(i)),a=await Promise.all(s),[u,l]=Zo(Fo(a.flat(),c=>c.index),c=>!!c.error);if(u.length>0)throw new Wo(u.map(c=>c.error));return l.map(c=>c.result)};var Ui=t=>new Promise(e=>setTimeout(e,t)),gn=t=>(...e)=>{try{let r=t(...e);return p1(r)?r.then(n=>[void 0,n]).catch(n=>[n,void 0]):[void 0,r]}catch(r){return[r,void 0]}};async function d1(t,e){let r=t?.times??3,n=t?.delay,i=t?.backoff??null;for(let s of mn(1,r)){let[a,u]=await gn(e)(l=>{throw{_exited:l}});if(!a)return u;if(a._exited)throw a._exited;if(s===r)throw a;n&&await Ui(n),i&&await Ui(i(s))}throw new Error("unreachable")}var m2=!0,Jo="Invariant failed";function me(t,e){if(!t){if(m2)throw new Error(Jo);var r=typeof e=="function"?e():e,n=r?"".concat(Jo,": ").concat(r):Jo;throw new Error(n)}}var K,te,G,er,tr,$e,Y,Le,f1,m1,g1,w1,Ri=class{constructor(e,r){d(this,Y);d(this,K);d(this,te);d(this,G,null);w(this,"isStreaming",!1);w(this,"typingIndicator");w(this,"ranOutOfCredits",!1);w(this,"messages",[]);w(this,"conversationId","");d(this,er,0);d(this,tr);w(this,"isLiveMode",!1);d(this,$e,[]);g(this,K,e),g(this,te,r),o(this,te).autoConnect!==!1&&g(this,G,this.initWS()),e.addController(this)}get hasQueuedMessages(){return o(this,$e).length>0}async enqueueMessage(e,{expectStreaming:r=!1}={}){if(o(this,$e).length>0){let n=o(this,$e)[o(this,$e).length-1];if(e.type==="USER_INPUT"&&n.message.type==="USER_INPUT"&&e.value===n.message.value)return!0}return o(this,G)||this.connect(),o(this,G)?.isConnected?f(this,Y,Le).call(this,e,{expectStreaming:r}):(o(this,$e).push({message:e,options:{expectStreaming:r}}),o(this,K).requestUpdate(),o(this,G)&&!o(this,G).isConnecting&&!o(this,G).isConnected&&this.retry(),await d1({times:5,delay:2e3},async()=>{if(o(this,G)?.isConnected){let n=[...o(this,$e)];g(this,$e,[]),o(this,K).requestUpdate();let i=!1;for(let{message:s,options:a}of n){let u=f(this,Y,Le).call(this,s,a);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,$e,[]),o(this,K).requestUpdate(),!1)))}sendUserInput(e,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1,requestInputResponse:a}={}){return f(this,Y,Le).call(this,{type:"USER_INPUT",value:e,role:i,xUserData:r,xCustomInstructions:n,requestInputResponse:a},{expectStreaming:s})}async enqueueUserInput(e,{xUserData:r,xCustomInstructions:n,role:i="user",expectStreaming:s=!1,requestInputResponse:a}={}){return this.enqueueMessage({type:"USER_INPUT",value:e,role:i,xUserData:r,xCustomInstructions:n,requestInputResponse:a},{expectStreaming:s})}sendImageDelete(e){return me(e,"imageId is required"),f(this,Y,Le).call(this,{type:"USER_FILE_DELETE",imageId:e})}sendUserCancel(){return f(this,Y,Le).call(this,{type:"USER_CANCEL"})}sendUserTypingStart(){return f(this,Y,Le).call(this,{type:"USER_TYPING_START"})}sendUserTypingStop(){return f(this,Y,Le).call(this,{type:"USER_TYPING_STOP"})}sendUserMeta(e){return f(this,Y,Le).call(this,{type:"USER_META",metadata:e})}reloadConfig(){f(this,Y,Le).call(this,{type:"RELOAD_CONFIG"})}close(){o(this,G)?.close(1e3,"closed by user")}retry(){clearTimeout(o(this,tr)),g(this,tr,setTimeout(()=>{o(this,te).onReconnect?.(),g(this,G,this.initWS())},1e3*o(this,er))),Nl(this,er)._++}initWS(){return new Pi(o(this,K),{url:()=>o(this,te).url(this.conversationId,{}),onOpen:e=>f(this,Y,f1).call(this,e),onMessage:e=>f(this,Y,m1).call(this,JSON.parse(e.data)),onError:e=>f(this,Y,g1).call(this,e),onClose:e=>f(this,Y,w1).call(this,e)})}hostConnected(){this.conversationId=o(this,te).restoreConversationState?.()?.conversationId||"",this.messages=o(this,te).restoreConversationState?.()?.messages||[]}reset(){f(this,Y,Le).call(this,{type:"NEW_CHAT"}),o(this,te).onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,g(this,$e,[]),o(this,K).requestUpdate()}hostDisconnected(){clearTimeout(o(this,tr))}connect(){o(this,G)||g(this,G,this.initWS())}reconnectSocket(){o(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,te=new WeakMap,G=new WeakMap,er=new WeakMap,tr=new WeakMap,$e=new WeakMap,Y=new WeakSet,Le=function(e,{expectStreaming:r=!1}={}){return this.ranOutOfCredits?!1:o(this,G)?o(this,G).isConnecting?(console.warn("WebSocket is connecting, message not sent",e),!1):o(this,G).isConnected?(r&&!this.isLiveMode&&(this.isStreaming=!0,o(this,K).requestUpdate()),o(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)},f1=function(e){g(this,er,0)},m1=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,o(this,K).requestUpdate(),o(this,te).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),o(this,te).onMessageAppend?.(e),o(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,o(this,K).requestUpdate(),o(this,te).onMessageDone?.(e,r),o(this,te).persistConversationState?.(this.conversationId,this.messages);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,o(this,K).requestUpdate();break}case"ERROR":{o(this,te).onMessageError?.(e);break}case"CONNECTED":{this.conversationId=e.conversationId,this.messages=e.messages,o(this,te).onConnect?.(e.conversationId,e.metadata),o(this,te).persistConversationState?.(e.conversationId,e.messages),this.isLiveMode=e.metadata.isLiveMode,o(this,K).requestUpdate();break}case"TYPING_START":{e.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:e.role,metadata:e.metadata},o(this,K).requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,o(this,K).requestUpdate();break}case"RAN_OUT_OF_CREDITS":{this.ranOutOfCredits=!0,o(this,K).requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),o(this,K).requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}},g1=function(e){console.error("onError",e),o(this,te).onError?.(e)},w1=function(e){o(this,K).isConnected&&o(this,G)&&!o(this,G).isConnected&&e.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,o(this,K).requestUpdate(),o(this,te).onClose?.()};var g5=Symbol(),g2=Symbol();var v1=Object.getPrototypeOf,Ko=new WeakMap,w2=t=>t&&(Ko.has(t)?Ko.get(t):v1(t)===Object.prototype||v1(t)===Array.prototype);var y1=t=>w2(t)&&t[g2]||null,Yo=(t,e=!0)=>{Ko.set(t,e)};var Qo=t=>typeof t=="object"&&t!==null,v2=t=>Qo(t)&&!ea.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),k1=(t,e)=>{let r=x1.get(t);if(r?.[0]===e)return r[1];let n=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return Yo(n,!0),x1.set(t,[e,n]),Reflect.ownKeys(t).forEach(i=>{if(Object.getOwnPropertyDescriptor(n,i))return;let s=Reflect.get(t,i),{enumerable:a}=Reflect.getOwnPropertyDescriptor(t,i),u={value:s,enumerable:a,configurable:!0};if(ea.has(s))Yo(s,!1);else if($t.has(s)){let[l,c]=$t.get(s);u.value=k1(l,c())}Object.defineProperty(n,i,u)}),Object.preventExtensions(n)},y2=(t,e,r,n)=>({deleteProperty(i,s){let a=Reflect.get(i,s);r(s);let u=Reflect.deleteProperty(i,s);return u&&n(["delete",[s],a]),u},set(i,s,a,u){let l=!t()&&Reflect.has(i,s),c=Reflect.get(i,s,u);if(l&&(b1(c,a)||Vi.has(a)&&b1(c,Vi.get(a))))return!0;r(s),Qo(a)&&(a=y1(a)||a);let p=!$t.has(a)&&b2(a)?ta(a):a;return e(s,p),Reflect.set(i,s,p,u),n(["set",[s],a,c]),!0}}),$t=new WeakMap,ea=new WeakSet,x1=new WeakMap,Xo=[1],Vi=new WeakMap,b1=Object.is,x2=(t,e)=>new Proxy(t,e),b2=v2,k2=k1,C2=y2;function ta(t={}){if(!Qo(t))throw new Error("object required");let e=Vi.get(t);if(e)return e;let r=Xo[0],n=new Set,i=(k,A=++Xo[0])=>{r!==A&&(s=r=A,n.forEach(C=>C(k,A)))},s=r,a=(k=Xo[0])=>(s!==k&&(s=k,l.forEach(([A])=>{let C=A[1](k);C>r&&(r=C)})),r),u=k=>(A,C)=>{let M=[...A];M[1]=[k,...M[1]],i(M,C)},l=new Map,c=(k,A)=>{let C=!ea.has(A)&&$t.get(A);if(C){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&l.has(k))throw new Error("prop listener already exists");if(n.size){let M=C[2](u(k));l.set(k,[C,M])}else l.set(k,[C])}},p=k=>{var A;let C=l.get(k);C&&(l.delete(k),(A=C[1])==null||A.call(C))},m=k=>(n.add(k),n.size===1&&l.forEach(([C,M],L)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&M)throw new Error("remove already exists");let N=C[2](u(L));l.set(L,[C,N])}),()=>{n.delete(k),n.size===0&&l.forEach(([C,M],L)=>{M&&(M(),l.set(L,[C]))})}),v=!0,b=C2(()=>v,c,p,i),S=x2(t,b);Vi.set(t,S);let T=[t,a,m];return $t.set(S,T),Reflect.ownKeys(t).forEach(k=>{let A=Object.getOwnPropertyDescriptor(t,k);"value"in A&&A.writable&&(S[k]=t[k])}),v=!1,S}function Bi(t,e,r){let n=$t.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!n&&console.warn("Please use proxy object");let i,s=[],a=n[2],u=!1,c=a(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 rr(t){let e=$t.get(t);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!e&&console.warn("Please use proxy object");let[r,n]=e;return k2(r,n())}var wn,nr,St,ir,sr=class{constructor(e,r){d(this,wn);d(this,nr);d(this,St);d(this,ir,()=>{});g(this,wn,e),g(this,nr,r),g(this,St,rr(r)),e.addController(this)}get state(){return o(this,St)}get value(){return o(this,St)}hostConnected(){o(this,ir).call(this),g(this,ir,Bi(o(this,nr),()=>{g(this,St,rr(o(this,nr))),o(this,wn).requestUpdate()}))}hostDisconnected(){o(this,ir).call(this)}};wn=new WeakMap,nr=new WeakMap,St=new WeakMap,ir=new WeakMap;var vn,yn,Et,or,tt=class{constructor(e,r,n){d(this,vn);d(this,yn);w(this,"proxyObject");d(this,Et);d(this,or,()=>{});g(this,vn,e),g(this,yn,n),this.proxyObject=ta(r),g(this,Et,rr(this.proxyObject)),e.addController(this)}get state(){return o(this,Et)}get value(){return o(this,Et)}hostConnected(){o(this,or).call(this),o(this,yn)?.subscribe&&g(this,or,Bi(this.proxyObject,()=>{g(this,Et,rr(this.proxyObject)),o(this,vn).requestUpdate()}))}hostDisconnected(){o(this,or).call(this)}};vn=new WeakMap,yn=new WeakMap,Et=new WeakMap,or=new WeakMap;var ar,xn,lr,_t,Mt,Hi=class{constructor(e,{provider:r,tag:n,key:i}){d(this,ar);d(this,xn);d(this,lr);d(this,_t,null);d(this,Mt,null);g(this,ar,e),g(this,xn,n),g(this,lr,i),e.addController(this)}get value(){return o(this,Mt)?o(this,Mt).value:null}hostConnected(){if(o(this,Mt)||(g(this,_t,$2(o(this,ar),o(this,xn))),!o(this,_t)))return;let e=o(this,_t)[o(this,lr)]instanceof tt?o(this,_t)[o(this,lr)]:null;e&&g(this,Mt,new sr(o(this,ar),e.proxyObject))}hostDisconnected(){}};ar=new WeakMap,xn=new WeakMap,lr=new WeakMap,_t=new WeakMap,Mt=new WeakMap;function $2(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 C1=()=>{if(window.Shopify)try{return{customerId:S2()}}catch{return null}return null},S2=()=>{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},$1=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 S1(t,e="http"){return t.startsWith("http://")||t.startsWith("https://")?t:`${e}://${t}`}function ra(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 E1(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 _1=()=>{if(window.ShopRenter)try{let t=_2();return{customerEmail:t?.customerEmail,customerId:t?.customerId,customerName:t?.customerName}}catch{return null}return null},_2=()=>{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}}},M1=async()=>{try{let t=window.ShopRenter.shop?.domain;if(!t)return[];let e=S1(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 A1=()=>{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},I1=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 na;function ia(t){return{lang:t?.lang??na?.lang,message:t?.message,abortEarly:t?.abortEarly??na?.abortEarly,abortPipeEarly:t?.abortPipeEarly??na?.abortPipeEarly}}var I2;function L2(t){return I2?.get(t)}var j2;function T2(t){return j2?.get(t)}var D2;function O2(t,e){return D2?.get(t)?.get(e)}function j1(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 ye(t,e,r,n,i){let s=i&&"input"in i?i.input:r.value,a=i?.expected??t.expects??null,u=i?.received??j1(s),l={kind:t.kind,type:t.type,input:s,expected:a,received:u,message:`Invalid ${e}: ${a?`Expected ${a} 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??O2(t.reference,l.lang)??(c?T2(l.lang):null)??n.message??L2(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 xe(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},ia())}}}function P2(t,e){return Object.hasOwn(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function T1(t,e){let r=[...new Set(t)];return r.length>1?`(${r.join(` ${e} `)})`:r[0]??"never"}var U2=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function sa(t,e){return{kind:"validation",type:"max_length",reference:sa,async:!1,expects:`<=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length>this.requirement&&ye(this,"length",r,n,{received:`${r.value.length}`}),r}}}function oa(t,e){return{kind:"validation",type:"min_length",reference:oa,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&ye(this,"length",r,n,{received:`${r.value.length}`}),r}}}function R2(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function D1(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function aa(){return{kind:"schema",type:"any",reference:aa,expects:"any",async:!1,get"~standard"(){return xe(this)},"~run"(t){return t.typed=!0,t}}}function cr(t,e){return{kind:"schema",type:"array",reference:cr,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return xe(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 a=i[s],u=this.item["~run"]({value:a},n);if(u.issues){let l={type:"array",origin:"value",input:i,key:s,value:a};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 ye(this,"type",r,n);return r}}}function la(t){return{kind:"schema",type:"boolean",reference:la,expects:"boolean",async:!1,message:t,get"~standard"(){return xe(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:ye(this,"type",e,r),e}}}function ca(t){return{kind:"schema",type:"null",reference:ca,expects:"null",async:!1,message:t,get"~standard"(){return xe(this)},"~run"(e,r){return e.value===null?e.typed=!0:ye(this,"type",e,r),e}}}function qi(t){return{kind:"schema",type:"number",reference:qi,expects:"number",async:!1,message:t,get"~standard"(){return xe(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:ye(this,"type",e,r),e}}}function Ze(t,e){return{kind:"schema",type:"object",reference:Ze,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return xe(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 a=this.entries[s];if(s in i||(a.type==="exact_optional"||a.type==="optional"||a.type==="nullish")&&a.default!==void 0){let u=s in i?i[s]:D1(a),l=a["~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(a.fallback!==void 0)r.value[s]=R2(a);else if(a.type!=="exact_optional"&&a.type!=="optional"&&a.type!=="nullish"&&(ye(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 ye(this,"type",r,n);return r}}}function ur(t,e){return{kind:"schema",type:"optional",reference:ur,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return xe(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=D1(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function ua(t,e){return{kind:"schema",type:"picklist",reference:ua,expects:T1(t.map(j1),"|"),async:!1,options:t,message:e,get"~standard"(){return xe(this)},"~run"(r,n){return this.options.includes(r.value)?r.typed=!0:ye(this,"type",r,n),r}}}function zi(t,e,r){return{kind:"schema",type:"record",reference:zi,expects:"Object",async:!1,key:t,value:e,message:r,get"~standard"(){return xe(this)},"~run"(n,i){let s=n.value;if(s&&typeof s=="object"){n.typed=!0,n.value={};for(let a in s)if(P2(s,a)){let u=s[a],l=this.key["~run"]({value:a},i);if(l.issues){let p={type:"object",origin:"key",input:s,key:a,value:u};for(let m of l.issues)m.path=[p],n.issues?.push(m);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:a,value:u};for(let m of c.issues)m.path?m.path.unshift(p):m.path=[p],n.issues?.push(m);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 ye(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 xe(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:ye(this,"type",e,r),e}}}function L1(t){let e;if(t)for(let r of t)e?e.push(...r.issues):e=r.issues;return e}function hr(t,e){return{kind:"schema",type:"union",reference:hr,expects:T1(t.map(r=>r.expects),"|"),async:!1,options:t,message:e,get"~standard"(){return xe(this)},"~run"(r,n){let i,s,a;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 a?a.push(l):a=[l]}if(i)return i;if(s){if(s.length===1)return s[0];ye(this,"type",r,n,{issues:L1(s)}),r.typed=!0}else{if(a?.length===1)return a[0];ye(this,"type",r,n,{issues:L1(a)})}return r}}}function O1(t,e,r){let n=t["~run"]({value:e},ia(r));if(n.issues)throw new U2(n.issues);return n.value}function P1(t,e){let r={};for(let n in t.entries)r[n]=!e||e.includes(n)?ur(t.entries[n]):t.entries[n];return{...t,entries:r,get"~standard"(){return xe(this)}}}function U1(...t){return{...t[0],pipe:t,get"~standard"(){return xe(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 bn(t,e,r){let n=t["~run"]({value:e},ia(r));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var R1=zi(X(),hr([X(),qi(),la(),ca()])),V1=U1(X(),oa(1),sa(5e3)),B1=()=>{try{return window.UNAS?A1():window.Shopify?C1():window.ShopRenter?_1():null}catch{return null}},H1=async()=>{try{return window.UNAS?await I1():window.Shopify?await $1():window.ShopRenter?await M1():[]}catch{return[]}},pr={schema:Ze({conversationId:ur(X()),messages:ur(cr(Ze({id:X(),timestamp:qi(),role:ua(["user","assistant","support"]),content:X(),parts:ur(cr(hr([Ze({text:X()}),Ze({html:X()}),Ze({tag:X(),data:zi(X(),aa())})])))})))}),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=O1(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 P,q1,kn,Cn,dr,V,z1,Ni=class Ni extends ${constructor(){super();d(this,P);w(this,"contextCtrl");d(this,kn);d(this,Cn);d(this,dr,null);this.widgetId="",this.config={},this.callbacks={},this.xUserData=void 0,this.xCustomInstructions=void 0,this.autoConnect=!1,this.contextCtrl=new tt(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:o(this,P,V).sendImageDelete.bind(o(this,P,V))})}connectedCallback(){super.connectedCallback(),this.updated()}updated(){this.autoConnect&&o(this,P,V).connect(),Object.assign(this.contextCtrl.proxyObject,{widgetId:this.widgetId,config:this.config,callbacks:this.callbacks,xUserData:o(this,kn),xCustomInstructions:o(this,Cn),conversationId:o(this,P,V).conversationId,messages:o(this,P,q1),isStreaming:o(this,P,V).isStreaming,typingIndicator:o(this,P,V).typingIndicator,ranOutOfCredits:o(this,P,V).ranOutOfCredits,isLiveMode:o(this,P,V).isLiveMode,lastMsg:o(this,P,V).lastMsg,hasQueuedMessages:o(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),sendImageDelete:o(this,P,V).sendImageDelete.bind(o(this,P,V))}),f(this,P,z1).call(this)}sendUserInput(r,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,...n},s=o(this,P,V).sendUserInput(r,i);return s&&this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:r,example:!1,conversationId:o(this,P,V).conversationId}),s}async enqueueUserInput(r,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,role:"user",expectStreaming:!0,...n};return o(this,P,V).enqueueUserInput(r,i)}sendUserCancel(){o(this,P,V).sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}sendUserTypingStart(){o(this,P,V).sendUserTypingStart()}sendUserTypingStop(){o(this,P,V).sendUserTypingStop()}reset(){o(this,P,V).reset()}reloadConfig(){o(this,P,V).reloadConfig()}connect(){o(this,P,V).connect()}render(){return h`<slot></slot>`}};P=new WeakSet,q1=function(){return o(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()}]:o(this,P,V)?.messages||[]},kn=new WeakMap,Cn=new WeakMap,dr=new WeakMap,V=function(){return o(this,dr)||g(this,dr,new Ri(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:o(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:o(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:()=>{pr.reset(this.widgetId)},onConnect:(r,n)=>{let i=B1();o(this,P,V).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:i,language:window.navigator.language,cart:[]}),H1().then(s=>{s?.length>0&&o(this,P,V).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:i,cart:s,language:window.navigator.language})}).catch(s=>{console.error(s)}),this.dispatchEvent(new Ni.ConnectedEvent({conversationId:r,metadata:n,widgetId:this.widgetId,pendingImages:n?.pendingImages||[]}))},persistConversationState:(r,n)=>{pr.persist(this.widgetId,r,n)},restoreConversationState:()=>pr.restore(this.widgetId)})),o(this,dr)},z1=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 a=bn(R1,s);if(!a.success){console.error("Molin: user-data does not pass schema validation",a.issues);return}return a.output}function n(i){if(!i)return;let s=bn(V1,i);if(!s.success){console.error("Molin: custom-instructions does not pass schema validation",s.issues);return}return s.output}g(this,kn,r(this.xUserData)),g(this,Cn,n(this.xCustomInstructions))},w(Ni,"properties",{widgetId:{type:String},config:{type:Object},callbacks:{type:Object},xUserData:{type:Object},xCustomInstructions:{type:Object},autoConnect:{type:Boolean}});var fr=Ni;function F1(t){let e=new Hi(t,{provider:fr,tag:"mw-context-widget",key:"contextCtrl"});return new Proxy({value:null},{get(r,n){if(n==="value")return e.value}})}var ha;fr.ConnectedEvent=(ha=class extends CustomEvent{constructor(e,r={}){super(fr.ConnectedEvent.type,{detail:e,bubbles:!0,composed:!0,...r})}},w(ha,"type","mw-context-widget:connected"),ha);customElements.get("mw-context-widget")||customElements.define("mw-context-widget",fr);function ba(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function V2(t,e=","){return t.map(ba).join(e)}var Y1=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Zi(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 Ji(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 N1(t){return t}function Ki(){}var re={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function X1(t){return t.match(/[-=:;]/g)?.length||0}function ga(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(X1(t),15)<<18}var B2=["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 ka({n:t,i:e,v:r=[]},n,i,s){t&&(t=ba({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&&Ji(l)||n.v(u))){var a;s.push(c),i|=l?67108864|ga(c):u=="dark"?1073741824:c[0]=="@"?ga(c):(a=c,1<<~(/:([a-z-]+)/.test(a)&&~B2.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:i,r:s,i:e}}var Q1=new Map;function wa(t){if(t.d){let e=[],r=pa(t.r.reduce((n,i)=>i[0]=="@"?(e.push(i),n):i?pa(n,s=>pa(i,a=>{let u=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(a);if(u){let l=s.indexOf(u[1]);return~l?s.slice(0,l)+u[0]+s.slice(l+u[1].length):da(s,a)}return da(a,s)})):n,"&"),n=>da(n,t.n?"."+Y1(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((n,i)=>i+"{"+n+"}",t.d)}}function pa(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,n,i)=>e(n)+i)}function da(t,e){return t.replace(/&/g,e)}var Z1=new Intl.Collator("en",{numeric:!0});function e0(t,e){for(var r=0,n=t.length;r<n;){let i=n+r>>1;0>=t0(t[i],e)?r=i+1:n=i}return n}function t0(t,e){let r=t.p&re.o;return r==(e.p&re.o)&&(r==re.b||r==re.o)?0:t.p-e.p||t.o-e.o||Z1.compare(W1(t.n),W1(e.n))||Z1.compare(G1(t.n),G1(e.n))}function W1(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function G1(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function fa(t,e){return Math.round(parseInt(t,16)*e)}function Se(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,a=[17,1,.062272][s-1];return`rgba(${[fa(t.substr(1,s),a),fa(t.substr(1+s,s),a),fa(t.substr(1+2*s,s),a),i]})`}return i=="1"?t:i=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function r0(t,e,r,n,i=[]){return(function s(a,{n:u,p:l,r:c=[],i:p},m){let v=[],b="",S=0,T=0;for(let C in a||{}){var k,A;let M=a[C];if(C[0]=="@"){if(!M)continue;if(C[1]=="a"){v.push(...$a(u,l,Gi(""+M),m,l,c,p,!0));continue}if(C[1]=="l"){for(let L of B(M))v.push(...s(L,{n:u,p:(k=re[C[7]],l&~re.o|k),r:C[7]=="d"?[]:c,i:p},m));continue}if(C[1]=="i"){v.push(...B(M).map(L=>({p:-1,o:0,r:[],d:C+" "+L})));continue}if(C[1]=="k"){v.push({p:re.d,o:0,r:[C],d:s(M,{p:re.d},m).map(wa).join("")});continue}if(C[1]=="f"){v.push(...B(M).map(L=>({p:re.d,o:0,r:[C],d:s(L,{p:re.d},m).map(wa).join("")})));continue}}if(typeof M!="object"||Array.isArray(M))C=="label"&&M?u=M+Zi(JSON.stringify([l,p,a])):(M||M===0)&&(C=C.replace(/[A-Z]/g,L=>"-"+L.toLowerCase()),T+=1,S=Math.max(S,(A=C)[0]=="-"?0:X1(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?";":"")+B(M).map(L=>m.s(C,Ca(""+L,m.theme)+(p?" !important":""))).join(";"));else if(C[0]=="@"||C.includes("&")){let L=l;C[0]=="@"&&(C=C.replace(/\bscreen\(([^)]+)\)/g,(N,ee)=>{let se=m.theme("screens",ee);return se?(L|=67108864,Ji(se,"")):N}),L|=ga(C)),v.push(...s(M,{n:u,p:L,r:[...c,C],i:p},m))}else v.push(...s(M,{p:l,r:[...c,C]},m))}return v.unshift({n:u,p:l,o:Math.max(0,15-T)+1.5*Math.min(S||15,15),r:c,d:b}),v.sort(t0)})(t,ka(e,r,n,i),r)}function Ca(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,n,i,s,a="")=>{let u=e(i,a);return typeof u=="function"&&/color|fill|stroke/i.test(i)?Se(u):""+B(u).filter(l=>Object(l)!==l)})}function n0(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 Wi(t,e,r=re.u,n,i){let s=[];for(let a of t)for(let u of(function(l,c,p,m,v){l={...l,i:l.i||v};let b=(function(S,T){let k=Q1.get(S.n);return k?k(S,T):T.r(S.n,S.v[0]=="dark")})(l,c);return b?typeof b=="string"?({r:m,p}=ka(l,c,p,m),n0(Wi(Gi(b),c,p,m,l.i),l.n)):Array.isArray(b)?b.map(S=>{var T,k;return{o:0,...S,r:[...B(m),...B(S.r)],p:(T=p,k=S.p??p,T&~re.o|k)}}):r0(b,l,c,p,m):[{c:ba(l),p:0,o:0,r:[]}]})(a,e,r,n,i))s.splice(e0(s,u),0,u);return s}function $a(t,e,r,n,i,s,a,u){return n0((u?r.flatMap(l=>Wi([l],n,i,s,a)):Wi(r,n,i,s,a)).map(l=>l.p&re.o&&(l.n||e==re.b)?{...l,p:l.p&~re.o|e,o:0}:l),t)}function H2(t,e,r,n){var i;return i=(s,a)=>{let{n:u,p:l,r:c,i:p}=ka(s,a,e);return r&&$a(u,e,r,a,l,c,p,n)},Q1.set(t,i),t}function ma(t,e,r){if(t[t.length-1]!="("){let n=[],i=!1,s=!1,a="";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!="&"&&(a+=(a&&"-")+u)}a&&(s&&(a="-"+a),e[0].push({n:a,v:n.filter(q2),i}))}}function q2(t,e,r){return r.indexOf(t)==e}var J1=new Map;function Gi(t){let e=J1.get(t);if(!e){let r=[],n=[[]],i=0,s=0,a=null,u=0,l=(c,p=0)=>{i!=u&&(r.push(t.slice(i,u+p)),c&&ma(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(a)t[u-1]!="\\"&&a.test(t.slice(u))&&(a=null,i=u+RegExp.lastMatch.length);else if(c=="/"&&t[u-1]!="\\"&&(t[u+1]=="*"||t[u+1]=="/"))a=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 m=r[p-1];if(/[~@]$/.test(m)){let v=n.shift();r.length=p,ma([...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);ma([...r,H2(m.length>1?m.slice(0,-1)+Zi(JSON.stringify([m,v])):m+"("+V2(v)+")",re.a,v,/@$/.test(m))],n)}p=r.lastIndexOf("(",p-1)}r.length=p+1}else/[~@]/.test(c)&&t[u+1]=="("&&n.unshift([])}l(!0),J1.set(t,e=n[0])}return e}function y(t,e,r){return[t,va(e,r)]}function va(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,n)=>({[t]:e?e(r,n):ya(r,1)}):r=>t||{[r[1]]:ya(r,2)}}function ya(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function x(t,e,r,n){return[t,Sa(e,r,n)]}function Sa(t,e,r){let n=typeof e=="string"?(i,s)=>({[e]:r?r(i,s):i._}):e||(({1:i,_:s},a,u)=>({[i||u]:s}));return(i,s)=>{let a=i0(t||i[1]),u=s.theme(a,i.$$)??Ue(i.$$,a,s);if(u!=null)return i._=ya(i,0,u),n(i,s,a)}}function ne(t,e={},r){return[t,z2(e,r)]}function z2(t={},e){return(r,n)=>{let{section:i=i0(r[0]).replace("-","")+"Color"}=t,[s,a]=F2(r.$$);if(!s)return;let u=n.theme(i,s)||Ue(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:m}=t,v=n.theme(c,a||"DEFAULT")||a&&Ue(a,c,n),b=e||(({_:T})=>{let k=$n(p,T);return m?{[m]:k}:k});r._={value:Se(u,{opacityVariable:l||void 0,opacityValue:v||void 0}),color:T=>Se(u,T),opacityVariable:l||void 0,opacityValue:v||void 0};let S=b(r,n);if(!r.dark){let T=n.d(i,s,u);T&&T!==u&&(r._={value:Se(T,{opacityVariable:l||void 0,opacityValue:v||"1"}),color:k=>Se(T,k),opacityVariable:l||void 0,opacityValue:v||void 0},S={"&":S,[n.v("dark")]:b(r,n)})}return S}}function F2(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function $n(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 Ue(t,e,r){if(t[0]=="["&&t.slice(-1)=="]"){if(t=mr(Ca(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 i0(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function mr(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",n,i="")=>mr(r)+n+mr(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 Sn({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:a=r.darkColor,theme:u,variants:l,rules:c,ignorelist:p,hash:m=r.hash,stringify:v=r.stringify,finalize:b}=typeof n=="function"?n(r):n;r={preflight:r.preflight!==!1&&i!==!1&&[...r.preflight,...B(i)],darkMode:s,darkColor:a,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:m,stringify:v,finalize:[...r.finalize,...B(b)]}}return r}function K1(t,e,r,n,i,s){for(let a of e){let u=r.get(a);u||r.set(a,u=n(a));let l=u(t,i,s);if(l)return l}}function N2(t){var e;return xa(t[0],typeof(e=t[1])=="function"?e:()=>e)}function Z2(t){var e,r;return Array.isArray(t)?xa(t[0],va(t[1],t[2])):xa(t,va(e,r))}function xa(t,e){return s0(t,(r,n,i,s)=>{let a=n.exec(r);if(a)return a.$$=r.slice(a[0].length),a.dark=s,e(a,i)})}function s0(t,e){let r=B(t).map(W2);return(n,i,s)=>{for(let a of r){let u=e(n,a,i,s);if(u)return u}}}function W2(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function o0(t,e){let r=Sn(t),n=(function({theme:l,darkMode:c,darkColor:p=Ki,variants:m,rules:v,hash:b,stringify:S,ignorelist:T,finalize:k}){let A=new Map,C=new Map,M=new Map,L=new Map,N=s0(T,(R,oe)=>oe.test(R));m.push(["dark",Array.isArray(c)||c=="class"?`${B(c)[1]||".dark"} &`:typeof c=="string"&&c!="media"?c:"@media (prefers-color-scheme:dark)"]);let ee=typeof b=="function"?R=>b(R,Zi):b?Zi:N1;ee!==N1&&k.push(R=>({...R,n:R.n&&ee(R.n),d:R.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(oe,de)=>"--"+ee(de).replace("#",""))}));let se={theme:(function({extend:R={},...oe}){let de={},Mo={get colors(){return gt("colors")},theme:gt,negative(){return{}},breakpoints(J){let le={};for(let we in J)typeof J[we]=="string"&&(le["screen-"+we]=J[we]);return le}};return gt;function gt(J,le,we,tn){if(J){if({1:J,2:tn}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(J)||[,J],/[.[]/.test(J)){let ze=[];J.replace(/\[([^\]]+)\]|([^.[]+)/g,(vt,nn,Gu=nn)=>ze.push(Gu)),J=ze.shift(),we=le,le=ze.join("-")}let Pe=de[J]||Object.assign(Object.assign(de[J]={},Si(oe,J)),Si(R,J));if(le==null)return Pe;le||(le="DEFAULT");let wt=Pe[le]??le.split("-").reduce((ze,vt)=>ze?.[vt],Pe)??we;return tn?Se(wt,{opacityValue:Ca(tn,gt)}):wt}let rn={};for(let Pe of[...Object.keys(oe),...Object.keys(R)])rn[Pe]=gt(Pe);return rn}function Si(J,le){let we=J[le];return typeof we=="function"&&(we=we(Mo)),we&&/color|fill|stroke/i.test(le)?(function tn(rn,Pe=[]){let wt={};for(let ze in rn){let vt=rn[ze],nn=[...Pe,ze];wt[nn.join("-")]=vt,ze=="DEFAULT"&&(nn=Pe,wt[Pe.join("-")]=vt),typeof vt=="object"&&Object.assign(wt,tn(vt,nn))}return wt})(we):we}})(l),e:Y1,h:ee,s(R,oe){return S(R,oe,se)},d(R,oe,de){return p(R,oe,se,de)},v(R){return A.has(R)||A.set(R,K1(R,m,C,N2,se)||"&:"+R),A.get(R)},r(R,oe){let de=JSON.stringify([R,oe]);return M.has(de)||M.set(de,!N(R,se)&&K1(R,v,L,Z2,se,oe)),M.get(de)},f(R){return k.reduce((oe,de)=>de(oe,se),R)}};return se})(r),i=new Map,s=[],a=new Set;e.resume(l=>i.set(l,l),(l,c)=>{e.insert(l,s.length,c),s.push(c),a.add(l)});function u(l){let c=n.f(l),p=wa(c);if(p&&!a.has(p)){a.add(p);let m=e0(s,l);e.insert(p,m,l),s.splice(m,0,l)}return c.n}return Object.defineProperties(function(c){if(!i.size)for(let m of B(r.preflight))typeof m=="function"&&(m=m(n)),m&&(typeof m=="string"?$a("",re.b,Gi(m),n,re.b,[],!1,!0):r0(m,{},n,re.b)).forEach(u);c=""+c;let p=i.get(c);if(!p){let m=new Set;for(let v of Wi(Gi(c),n))m.add(v.c).add(u(v));p=[...m].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(a),p=new Map(i),m=[...s];return()=>{l(),a=c,i=p,s=m}},clear(){e.clear(),a=new Set,i=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function G2(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function a0(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:a}of i)if(s[0]=="a")n(a);else for(let u of a.querySelectorAll("[class]"))n(u);e.takeRecords()}function n(i){let s,a=i.getAttribute?.("class");a&&G2(a,s=t(a))&&i.setAttribute("class",s)}}function J2(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 Yi(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:J2(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:Ki}}var K2=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 l0(t){return K2.get(t)}function c0(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 u0(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 Y2=[["-webkit-",1],["-moz-",2],["-ms-",4]];function Xi(){return({stringify:t})=>({stringify(e,r,n){let i="",s=l0(e);s&&(i+=t(s,r,n)+";");let a=c0(e),u=u0(e,r);for(let l of Y2)a&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 Qi(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",Sa("lineClamp",({_:t})=>h0(t))],["line-clamp-(\\d+)",({1:t})=>h0(t)]]}}function h0(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var _n={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",...be(4,"rem",4,.5,.5),...be(12,"rem",4,5),14:"3.5rem",...be(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:{...be(200,"",100,0,50),...be(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",...Ee(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:{...be(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"),...En(2,6),...En(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"),...En(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...En(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:{...be(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:{...be(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:Ee(8,"px"),outlineWidth:Ee(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:U("colors"),ringOffsetWidth:Ee(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Ee(8,"px")},rotate:{...Ee(2,"deg"),...Ee(12,"deg",3),...Ee(180,"deg",45)},saturate:be(200,"",100,0,50),scale:{...be(150,"",100,0,50),...be(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:U("spacing"),scrollPadding:U("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Ee(2,"deg"),...Ee(12,"deg",3)},space:U("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:be(2),textColor:U("colors"),textDecorationColor:U("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Ee(8,"px")},textUnderlineOffset:{auto:"auto",...Ee(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"),...En(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:{...be(50,"",1,0,10),auto:"auto"}};function En(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 Ee(t,e,r=0){let n={};for(;r<=t;r=2*r||1)n[r]=r+e;return n}function be(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 p0={"*,::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, ${_n.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, ${_n.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 v0=[y("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:Ue(`[${e}]`,"",r)}}})),y("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),x("aspect-","aspectRatio"),y("container",(t,{theme:e})=>{let{screens:r=e("screens"),center:n,padding:i}=e("container"),s={width:"100%",marginRight:n&&"auto",marginLeft:n&&"auto",...a("xs")};for(let u in r){let l=r[u];typeof l=="string"&&(s[Ji(l)]={"&":{maxWidth:l,...a(u)}})}return s;function a(u){let l=i&&(typeof i=="string"?i:i[u]||i.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),x("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),y("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),y("box-(border|content)","boxSizing",({1:t})=>t+"-box"),y("hidden",{display:"none"}),y("table-(auto|fixed)","tableLayout"),y(["(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)",y("isolate","isolation"),y("object-(contain|cover|fill|none|scale-down)","objectFit"),x("object-","objectPosition"),y("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",es),y("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),y("(static|fixed|absolute|relative|sticky)","position"),x("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),x("-?(top|bottom|left|right)(?:$|-)","inset"),y("(visible|collapse)","visibility"),y("invisible",{visibility:"hidden"}),x("-?z-","zIndex"),y("flex-((row|col)(-reverse)?)","flexDirection",d0),y("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"),y("grid-cols-(\\d+)","gridTemplateColumns",w0),x("col-","gridColumn"),y("col-(span)-(\\d+)","gridColumn",g0),x("col-start-","gridColumnStart"),y("col-start-(auto|\\d+)","gridColumnStart"),x("col-end-","gridColumnEnd"),y("col-end-(auto|\\d+)","gridColumnEnd"),x("grid-rows-","gridTemplateRows"),y("grid-rows-(\\d+)","gridTemplateRows",w0),x("row-","gridRow"),y("row-(span)-(\\d+)","gridRow",g0),x("row-start-","gridRowStart"),y("row-start-(auto|\\d+)","gridRowStart"),x("row-end-","gridRowEnd"),y("row-end-(auto|\\d+)","gridRowEnd"),y("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>es(d0(t))),y("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))-",y("justify-","justifyContent",f0),y("(content|items|self)-",t=>({["align-"+t[1]]:f0(t)})),y("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),x("p([xytrbl])?(?:$|-)","padding",gr("padding")),x("-?m([xytrbl])?(?:$|-)","margin",gr("margin")),x("-?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))`}})),y("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-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",({_:t})=>typeof(t=B(t))[1]=="string"?{fontFamily:je(t)}:{fontFamily:je(t[0]),...t[1]}),y("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),y("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),y("italic","fontStyle"),y("not-italic",{fontStyle:"normal"}),y("(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)",...rt({"--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"),y("list-(inside|outside)","listStylePosition"),x("list-","listStyleType"),y("list-","listStyleType"),x("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),ne("placeholder-",{property:"color",selector:"&::placeholder"}),y("text-(left|center|right|justify|start|end)","textAlign"),y("text-(ellipsis|clip)","textOverflow"),x("text-opacity-","textOpacity","--tw-text-opacity"),ne("text-",{property:"color"}),x("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),x("indent-","textIndent"),y("(overline|underline|line-through)","textDecorationLine"),y("no-underline",{textDecorationLine:"none"}),x("underline-offset-","textUnderlineOffset"),ne("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),x("decoration-","textDecorationThickness"),y("decoration-","textDecorationStyle"),y("(uppercase|lowercase|capitalize)","textTransform"),y("normal-case",{textTransform:"none"}),y("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),y("align-","verticalAlign"),y("whitespace-","whiteSpace"),y("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),y("break-words",{overflowWrap:"break-word"}),y("break-all",{wordBreak:"break-all"}),y("break-keep",{wordBreak:"keep-all"}),ne("caret-",{opacityVariable:!1,opacitySection:"opacity"}),ne("accent-",{opacityVariable:!1,opacitySection:"opacity"}),y("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${At(t," ")},var(--tw-gradient-stops))`),ne("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)"})),ne("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)`})),ne("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),y("bg-(fixed|local|scroll)","backgroundAttachment"),y("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),y(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),y("bg-blend-","backgroundBlendMode"),y("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),x("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),ne("bg-",{section:"backgroundColor"}),x("bg-","backgroundImage"),x("bg-","backgroundPosition"),y("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",es),x("bg-","backgroundSize"),x("rounded(?:$|-)","borderRadius"),x("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-${At(r[0])}-radius`]:e,[`border-${At(r[1])}-radius`]:e}}),y("border-(collapse|separate)","borderCollapse"),x("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),y("border-(solid|dashed|dotted|double|none)","borderStyle"),x("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...rt({"--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)"})),ne("border-([xytrbl])-",{section:"borderColor"},gr("border","Color")),ne("border-"),x("border-([xytrbl])(?:$|-)","borderWidth",gr("border","Width")),x("border(?:$|-)","borderWidth"),x("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),y("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),y("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),x("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${At(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${At(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),ne("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),x("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),ne("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),x("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),y("ring-inset",{"--tw-ring-inset":"inset"}),ne("ring-",{property:"--tw-ring-color"}),x("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...rt({"--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":Se(e("ringOffsetColor","","#fff")),"--tw-ring-color":Se(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)"})),ne("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),x("shadow(?:$|-)","boxShadow",({_:t})=>({...rt({"--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":je(t),"--tw-shadow-colored":je(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)"})),x("(opacity)-"),y("mix-blend-","mixBlendMode"),...m0(),...m0("backdrop-"),x("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:je(t),transitionTimingFunction:t._=="none"?void 0:je(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:je(e("transitionDuration",""))})),x("duration(?:$|-)","transitionDuration","transitionDuration",je),x("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",je),x("delay(?:$|-)","transitionDelay","transitionDelay",je),x("animate(?:$|-)","animation",(t,{theme:e,h:r,e:n})=>{let i=je(t),s=i.split(" "),a=e("keyframes",s[0]);return a?{["@keyframes "+(s[0]=n(r(s[0])))]:a,animation:s.join(" ")}:{animation:i}}),"(transform)-(none)",y("transform",_a),y("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":y0(t=="gpu")})),x("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,..._a()})),x("-?(rotate)-","rotate",Ea),x("-?(translate-[xy])-","translate",Ea),x("-?(skew-[xy])-","skew",Ea),y("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",es),"(appearance)-",x("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",x("(cursor)-"),"(cursor)-",y("snap-(none)","scroll-snap-type"),y("snap-(x|y|both)",({1:t})=>({...rt({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),y("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),y("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),y("snap-(normal|always)","scroll-snap-stop"),y("scroll-(auto|smooth)","scroll-behavior"),x("scroll-p([xytrbl])?(?:$|-)","padding",gr("scroll-padding")),x("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",gr("scroll-margin")),y("touch-(auto|none|manipulation)","touch-action"),y("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:r})=>({...rt({"--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)"})),y("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),y("outline",{outlineStyle:"solid"}),y("outline-(dashed|dotted|double)","outlineStyle"),x("-?(outline-offset)-"),ne("outline-",{opacityVariable:!1,opacitySection:"opacity"}),x("outline-","outlineWidth"),"(pointer-events)-",x("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],y("select-(none|text|all|auto)","userSelect"),ne("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),ne("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),x("stroke-","strokeWidth"),y("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),y("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function es(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function d0(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function At(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 je(t){return t&&""+(t._||t)}function f0({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function gr(t,e=""){return({1:r,_:n})=>{let i={x:"lr",y:"tb"}[r]||r+r;return i?{...$n(t+"-"+At(i[0])+e,n),...$n(t+"-"+At(i[1])+e,n)}:$n(t+e,n)}}function m0(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={...rt(r),[`${t}filter`]:e.map(n=>`var(--tw-${t}${n})`).join(" ")},[`(${t}filter)-(none)`,y(`${t}filter`,r),...e.map(n=>x(`${n[0]=="h"?"-?":""}(${t}${n})(?:$|-)`,n,({1:i,_:s})=>({[`--tw-${i}`]:B(s).map(a=>`${n}(${a})`).join(" "),...r})))]}function Ea({1:t,_:e}){return{["--tw-"+t]:e,..._a()}}function _a(){return{...rt({"--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":y0()}),transform:"var(--tw-transform)"}}function y0(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 g0({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function w0({1:t}){return`repeat(${t},minmax(0,1fr))`}function rt(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var x0=[["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)||Ue(e,"",r)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:t,3:e="",4:r,5:n="",6:i=e},{e:s,h:a,v:u})=>{let l=mr(n)||(r[0]=="["?r:u(r.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(a(t+i))})`)}${t[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:t})=>`[dir="${t}"] &`],["supports-",({$$:t},e)=>{if(t&&(t=e.theme("supports",t)||Ue(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)||Ue(t,"",e)),typeof t=="string")return`@media not all and (min-width:${t})`}],["min-",({$$:t},e)=>(t&&(t=Ue(t,"",e)),t&&`@media (min-width:${t})`)],[/^\[(.+)]$/,({1:t})=>/[&@]/.test(t)&&mr(t).replace(/[}]+$/,"").split("{")]];function b0({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:p0,theme:{..._n,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:x0,rules:v0,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 X2={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},Q2={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},eh={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},th={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},rh={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},nh={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},ih={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},sh={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},oh={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},ah={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},lh={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},ch={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},uh={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},hh={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},ph={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},dh={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},fh={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},mh={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},gh={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},wh={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},vh={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},yh={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},k0={__proto__:null,slate:X2,gray:Q2,zinc:eh,neutral:th,stone:rh,red:nh,orange:ih,amber:sh,yellow:oh,lime:ah,green:lh,emerald:ch,teal:uh,cyan:hh,sky:ph,blue:dh,indigo:fh,violet:mh,purple:gh,fuchsia:wh,pink:vh,rose:yh};function ts({disablePreflight:t}={}){return b0({colors:k0,disablePreflight:t})}function rs({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,a=s])=>[`${t}-${s}`,(u,l)=>S0(t,a[0]=="."?"."+l.e(l.h(a.slice(1))):a,l,c=>`& :is(${c.trim()})`)]),rules:[[`(lead|not-${t})`,({1:s},{h:a})=>[{c:a(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},a)=>{let u=$0(a.theme("fontSize",s));return u&&{"@layer components":u}}],[t+"-",({$$:s},a)=>i(s,a)],[t,(s,a)=>({...i(e,a),"@layer base":[C0(t,a,{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"},[`.${a.e(a.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"}}),C0(t,a,r)],"@layer components":{...$0(a.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function i(s,a){let u={},l={},c=(p,m,v)=>{let b=a.theme(`colors.${s}.${m}`,m);v["--tw-prose-"+p]=Se(b);let S=v!=l&&a.d("colors",`${s}-${m}`,b);S&&(l["--tw-prose-"+p]=Se(S))};for(let p in n){let m=n[p];p!="dark"&&m&&c(p,m,u)}for(let p in n.dark||{}){let m=n.dark[p];m&&(n.dark?c("invert-"+p,m,u):c(p,m,l))}return Object.keys(u).length?{"@layer defaults":{"&":u,[a.v("dark")]:l}}:void 0}}function C0(t,e,r){let n={};for(let i in r)n[S0(t,i,e,s=>`.${e.e(e.h(t))}${s}`)]=r[i];return n}function S0(t,e,{e:r,h:n},i){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,a=" ",u=s,l="")=>i(`${a}:where(${u}):not(:where(.${r(n("not-"+t))} *))${l}`))}function $0(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 Ma=Sn({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:[ts(),Xi(),Qi(),rs()]});function ns(t,e=!0){let r=(function(){if(xh)try{let l=Yi(new CSSStyleSheet);return l.connect=c=>{let p=Aa(c);p.adoptedStyleSheets=[...p.adoptedStyleSheets,l.target]},l.disconnect=Ki,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let a=[Yi(s)],u=new WeakMap;return{get target(){return a[0].target},snapshot(){let l=a.map(c=>c.snapshot());return()=>l.forEach(c=>c())},clear(){a.forEach(l=>l.clear())},destroy(){a.forEach(l=>l.destroy())},insert(l,c,p){a[0].insert(l,c,p);let m=this.target.cssRules[c];a.forEach((v,b)=>b&&v.target.insertRule(m.cssText,c))},resume(l,c){return a[0].resume(l,c)},connect(l){let c=document.createElement("style");Aa(l).appendChild(c);let p=Yi(c),{cssRules:m}=this.target;for(let v=0;v<m.length;v++)p.target.insertRule(m[v].cssText,v);a.push(p),u.set(l,p)},disconnect(l){let c=a.indexOf(u.get(l));c>=0&&a.splice(c,1)}}})(),n=o0({...t,hash:t.hash??e},r),i=a0(n);return function(a){return class extends a{connectedCallback(){super.connectedCallback?.(),r.connect(this),i.observe(Aa(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=n}}}}var xh=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function Aa(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var _=t=>ns(Ma)(t);var Mn=class extends _($){constructor(){super(),this.color="#601feb",this.radius="16.8576px",this.size="320px",this.border="#d1d5db"}render(){return h`
|
|
128
|
+
</svg>`,star:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
129
|
+
<path d="M11.4806 3.4987C11.6728 3.03673 12.3272 3.03673 12.5193 3.4987L14.6453 8.61016C14.7263 8.80492 14.9095 8.93799 15.1197 8.95485L20.638 9.39724C21.1367 9.43722 21.339 10.0596 20.959 10.3851L16.7546 13.9866C16.5945 14.1238 16.5245 14.3391 16.5734 14.5443L17.8579 19.9292C17.974 20.4159 17.4446 20.8005 17.0176 20.5397L12.2932 17.6541C12.1132 17.5441 11.8868 17.5441 11.7068 17.6541L6.98238 20.5397C6.55539 20.8005 6.02594 20.4159 6.14203 19.9292L7.42652 14.5443C7.47546 14.3391 7.4055 14.1238 7.24531 13.9866L3.04099 10.3851C2.661 10.0596 2.86323 9.43722 3.36197 9.39724L8.88022 8.95485C9.09048 8.93799 9.27363 8.80492 9.35464 8.61016L11.4806 3.4987Z" stroke="#0F172A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
130
|
+
</svg>`};var hp=dc,Bo=class extends Oi{resolveIcon(e){let t=hp[e];if(!t)throw console.warn("hi-outline: icon not found",e),new Error(`Icon ${e} not found`);return t}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(t=>{t.setAttribute("stroke","currentColor")})}};customElements.get("hi-outline")||customElements.define("hi-outline",Bo);var pn,pe,we,fn,qo,Ui=class{constructor(e,t){p(this,fn);p(this,pn);p(this,pe);p(this,we);if(!e)throw new Error("host is required");if(!t)throw new Error("config is required");g(this,pn,e),o(this,pn).addController(this),g(this,pe,t)}connect(e){g(this,pe,e),g(this,we,m(this,fn,qo).call(this))}hostConnected(){o(this,we)||setTimeout(()=>{o(this,we)||g(this,we,m(this,fn,qo).call(this))},0)}hostDisconnected(){o(this,we)?.close(1e3,"lit_host_disconnected"),g(this,we,void 0)}send(e){o(this,we)?.send(e)}close(e,t){o(this,we)?.close(e,t)}get isConnected(){return o(this,we)?.readyState===WebSocket.OPEN}get isConnecting(){return o(this,we)?.readyState===WebSocket.CONNECTING}};pn=new WeakMap,pe=new WeakMap,we=new WeakMap,fn=new WeakSet,qo=function(){let e=new WebSocket(o(this,pe).url());return o(this,pe).onClose&&(e.onclose=o(this,pe).onClose),o(this,pe).onOpen&&(e.onopen=o(this,pe).onOpen),o(this,pe).onError&&(e.onerror=o(this,pe).onError),o(this,pe).onMessage&&(e.onmessage=o(this,pe).onMessage),e};var pc=Array.isArray;var Vo=r=>!!(r&&r.constructor&&r.call&&r.apply);var fc=r=>!(!r||!r.then||!Vo(r.then));var Fo=(r,e,t=!1)=>{if(!r)return[];let n=(s,a)=>e(s)-e(a),i=(s,a)=>e(a)-e(s);return r.slice().sort(t===!0?i:n)};function*Qt(r,e,t=i=>i,n=1){let i=Vo(t)?t:()=>t,s=e?r:0,a=e??r;for(let u=s;u<=a&&(yield i(u),!(u+n>a));u+=n);}var No=(r,e,t,n)=>Array.from(Qt(r,e,t,n));var Ho=(r,e)=>r?r.reduce((t,n)=>{let[i,s]=t;return e(n)?[[...i,n],s]:[i,[...s,n]]},[[],[]]):[[],[]];var zo=class extends Error{constructor(e=[]){super();let t=e.find(n=>n.name)?.name??"";this.name=`AggregateError(${t}...)`,this.message=`AggregateError with ${e.length} errors`,this.stack=e.find(n=>n.stack)?.stack??this.stack,this.errors=e}},Wo=async(r,e,t)=>{let n=e.map((c,d)=>({index:d,item:c})),i=async c=>{let d=[];for(;;){let f=n.pop();if(!f)return c(d);let[y,x]=await tr(t)(f.item);d.push({error:y,result:x,index:f.index})}},s=No(1,r).map(()=>new Promise(i)),a=await Promise.all(s),[u,l]=Ho(Fo(a.flat(),c=>c.index),c=>!!c.error);if(u.length>0)throw new zo(u.map(c=>c.error));return l.map(c=>c.result)};var Go=async(r,e)=>{let t=r?.times??3,n=r?.delay,i=r?.backoff??null;for(let s of Qt(1,t)){let[a,u]=await tr(e)(l=>{throw{_exited:l}});if(!a)return u;if(a._exited)throw a._exited;if(s===t)throw a;n&&await er(n),i&&await er(i(s))}},er=r=>new Promise(e=>setTimeout(e,r)),tr=r=>(...e)=>{try{let t=r(...e);return fc(t)?t.then(n=>[void 0,n]).catch(n=>[n,void 0]):[void 0,t]}catch(t){return[t,void 0]}};var rr=({interval:r},e)=>{let t=!0,n,i=(...s)=>{t&&(e(...s),t=!1,n=setTimeout(()=>{t=!0,n=void 0},r))};return i.isThrottled=()=>n!==void 0,i};async function mc(r,e){let t=r?.times??3,n=r?.delay,i=r?.backoff??null;for(let s of Qt(1,t)){let[a,u]=await tr(e)(l=>{throw{_exited:l}});if(!a)return u;if(a._exited)throw a._exited;if(s===t)throw a;n&&await er(n),i&&await er(i(s))}throw new Error("unreachable")}var dp=!0,Zo="Invariant failed";function Ce(r,e){if(!r){if(dp)throw new Error(Zo);var t=typeof e=="function"?e():e,n=t?"".concat(Zo,": ").concat(t):Zo;throw new Error(n)}}var K,Y,G,nr,ir,$e,fe,Pi,gc,wc,yc,vc,Ri=class{constructor(e,t){p(this,fe);p(this,K);p(this,Y);p(this,G,null);w(this,"isStreaming",!1);w(this,"typingIndicator");w(this,"ranOutOfCredits",!1);w(this,"messages",[]);w(this,"conversationId","");p(this,nr,0);p(this,ir);w(this,"isLiveMode",!1);p(this,$e,[]);g(this,K,e),g(this,Y,t),o(this,Y).autoConnect!==!1&&g(this,G,this.initWS()),e.addController(this)}get hasQueuedMessages(){return o(this,$e).length>0}async enqueueMessage(e,{expectStreaming:t=!1}={}){if(o(this,$e).length>0){let n=o(this,$e)[o(this,$e).length-1];if(e.type==="USER_INPUT"&&n.message.type==="USER_INPUT"&&e.value===n.message.value)return!0}return o(this,G)||this.connect(),o(this,G)?.isConnected?m(this,fe,Pi).call(this,e,{expectStreaming:t}):(o(this,$e).push({message:e,options:{expectStreaming:t}}),o(this,K).requestUpdate(),o(this,G)&&!o(this,G).isConnecting&&!o(this,G).isConnected&&this.retry(),await mc({times:5,delay:2e3},async()=>{if(o(this,G)?.isConnected){let n=[...o(this,$e)];g(this,$e,[]),o(this,K).requestUpdate();let i=!1;for(let{message:s,options:a}of n){let u=m(this,fe,Pi).call(this,s,a);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,$e,[]),o(this,K).requestUpdate(),!1)))}async sendUserInput(e,{xUserData:t,xCustomInstructions:n,role:i="user",expectStreaming:s=!1,requestInputResponse:a}={}){return this.enqueueMessage({type:"USER_INPUT",value:e,role:i,xUserData:t,xCustomInstructions:n,requestInputResponse:a},{expectStreaming:s})}async enqueueUserInput(e,{xUserData:t,xCustomInstructions:n,role:i="user",expectStreaming:s=!1,requestInputResponse:a}={}){return this.enqueueMessage({type:"USER_INPUT",value:e,role:i,xUserData:t,xCustomInstructions:n,requestInputResponse:a},{expectStreaming:s})}sendImageDelete(e){Ce(e,"imageId is required"),this.enqueueMessage({type:"USER_FILE_DELETE",imageId:e}).catch(console.warn)}sendUserCancel(){this.enqueueMessage({type:"USER_CANCEL"}).catch(console.warn)}sendUserTypingStart(){m(this,fe,Pi).call(this,{type:"USER_TYPING_START"})}sendUserTypingStop(){this.enqueueMessage({type:"USER_TYPING_STOP"}).catch(console.warn)}sendNewChat(){this.enqueueMessage({type:"NEW_CHAT"})}sendUserMeta(e){this.enqueueMessage({type:"USER_META",metadata:e}).catch(console.warn)}reloadConfig(){this.enqueueMessage({type:"RELOAD_CONFIG"}).catch(console.warn)}close(){o(this,G)?.close(1e3,"closed by user")}retry(){clearTimeout(o(this,ir)),g(this,ir,setTimeout(()=>{o(this,Y).onReconnect?.(),g(this,G,this.initWS())},1e3*o(this,nr))),Gl(this,nr)._++}initWS(){return new Ui(o(this,K),{url:()=>o(this,Y).url(this.conversationId,{}),onOpen:e=>m(this,fe,gc).call(this,e),onMessage:e=>m(this,fe,wc).call(this,JSON.parse(e.data)),onError:e=>m(this,fe,yc).call(this,e),onClose:e=>m(this,fe,vc).call(this,e)})}hostConnected(){this.conversationId=o(this,Y).restoreConversationState?.()?.conversationId||"",this.messages=o(this,Y).restoreConversationState?.()?.messages||[]}reset(){o(this,Y).onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,g(this,$e,[]),o(this,K).requestUpdate()}hostDisconnected(){clearTimeout(o(this,ir))}connect(){o(this,G)||g(this,G,this.initWS())}reconnectSocket(){o(this,G)?.close(1e3,"destroy"),g(this,G,this.initWS())}get lastMsg(){if(this.messages.length>0)return this.messages[this.messages.length-1]}get isConnected(){return o(this,G)?.isConnected??!1}};K=new WeakMap,Y=new WeakMap,G=new WeakMap,nr=new WeakMap,ir=new WeakMap,$e=new WeakMap,fe=new WeakSet,Pi=function(e,{expectStreaming:t=!1}={}){return this.ranOutOfCredits?!1:o(this,G)?o(this,G).isConnecting?(console.warn("WebSocket is connecting, message not sent",e),!1):o(this,G).isConnected?(t&&!this.isLiveMode&&(this.isStreaming=!0,o(this,K).requestUpdate()),o(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)},gc=function(e){g(this,nr,0)},wc=function(e){switch(e.type){case"NEW_MESSAGE":{this.messages=[...this.messages,{...e.message,streaming:!0}].filter((t,n,i)=>n===i.findIndex(s=>s.id===t.id)),this.typingIndicator=void 0,o(this,K).requestUpdate(),o(this,Y).onNewMessage?.(e.message),o(this,Y).persistConversationState?.(this.conversationId,this.messages);break}case"APPEND_MESSAGE":{let t=this.messages.find(n=>n.id===e.message.id);if(t){switch(e.message.content_type){case"text":{let{part:n,delta:i,position:s}=e.message;t.content=t.content.slice(0,s)+i,t.parts||=[],t.parts[n]={text:t.parts[n]&&"text"in t.parts[n]?(t.parts[n].text||"").slice(0,s)+i:i};break}case"html":{let{part:n,delta:i,position:s}=e.message;t.parts||=[],t.parts[n]={html:t.parts[n]&&"html"in t.parts[n]?(t.parts[n].html||"").slice(0,s)+i:i};break}case"data":{let{part:n}=e.message;t.parts||=[],t.parts[n]={tag:e.message.tag,data:t.parts[n]&&"data"in t.parts[n]?Object.assign(t.parts[n].data||{},e.message.data):e.message.data};break}}e.metadata&&(t.metadata=e.metadata),o(this,Y).onMessageAppend?.(e),o(this,K).requestUpdate()}else throw new Error(`Message with id ${e.message.id} not found`);break}case"MESSAGE_DONE":{let t=this.messages.find(n=>n.id===e.message.id);if(t)Object.assign(t,e.message),t.streaming=!1;else throw new Error(`Message with id ${e.message.id} not found`);this.isStreaming=!1,o(this,K).requestUpdate(),o(this,Y).onMessageDone?.(e,t),o(this,Y).persistConversationState?.(this.conversationId,this.messages);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,o(this,K).requestUpdate();break}case"ERROR":{o(this,Y).onMessageError?.(e);break}case"CONNECTED":{this.conversationId=e.conversationId,this.messages=e.messages,o(this,Y).onConnect?.(e.conversationId,e.metadata),o(this,Y).persistConversationState?.(e.conversationId,e.messages),this.isLiveMode=e.metadata.isLiveMode,o(this,K).requestUpdate();break}case"TYPING_START":{e.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:e.role,metadata:e.metadata},o(this,K).requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,o(this,K).requestUpdate();break}case"RAN_OUT_OF_CREDITS":{this.ranOutOfCredits=!0,o(this,K).requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),o(this,K).requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}},yc=function(e){console.error("onError",e),o(this,Y).onError?.(e)},vc=function(e){o(this,K).isConnected&&o(this,G)&&!o(this,G).isConnected&&e.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,o(this,K).requestUpdate(),o(this,Y).onClose?.()};var x2=Symbol(),pp=Symbol();var bc=Object.getPrototypeOf,Jo=new WeakMap,fp=r=>r&&(Jo.has(r)?Jo.get(r):bc(r)===Object.prototype||bc(r)===Array.prototype);var xc=r=>fp(r)&&r[pp]||null,Ko=(r,e=!0)=>{Jo.set(r,e)};var Xo=r=>typeof r=="object"&&r!==null,mp=r=>Xo(r)&&!Qo.has(r)&&(Array.isArray(r)||!(Symbol.iterator in r))&&!(r instanceof WeakMap)&&!(r instanceof WeakSet)&&!(r instanceof Error)&&!(r instanceof Number)&&!(r instanceof Date)&&!(r instanceof String)&&!(r instanceof RegExp)&&!(r instanceof ArrayBuffer)&&!(r instanceof Promise),$c=(r,e)=>{let t=kc.get(r);if(t?.[0]===e)return t[1];let n=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r));return Ko(n,!0),kc.set(r,[e,n]),Reflect.ownKeys(r).forEach(i=>{if(Object.getOwnPropertyDescriptor(n,i))return;let s=Reflect.get(r,i),{enumerable:a}=Reflect.getOwnPropertyDescriptor(r,i),u={value:s,enumerable:a,configurable:!0};if(Qo.has(s))Ko(s,!1);else if($t.has(s)){let[l,c]=$t.get(s);u.value=$c(l,c())}Object.defineProperty(n,i,u)}),Object.preventExtensions(n)},gp=(r,e,t,n)=>({deleteProperty(i,s){let a=Reflect.get(i,s);t(s);let u=Reflect.deleteProperty(i,s);return u&&n(["delete",[s],a]),u},set(i,s,a,u){let l=!r()&&Reflect.has(i,s),c=Reflect.get(i,s,u);if(l&&(Cc(c,a)||Bi.has(a)&&Cc(c,Bi.get(a))))return!0;t(s),Xo(a)&&(a=xc(a)||a);let d=!$t.has(a)&&yp(a)?ea(a):a;return e(s,d),Reflect.set(i,s,d,u),n(["set",[s],a,c]),!0}}),$t=new WeakMap,Qo=new WeakSet,kc=new WeakMap,Yo=[1],Bi=new WeakMap,Cc=Object.is,wp=(r,e)=>new Proxy(r,e),yp=mp,vp=$c,bp=gp;function ea(r={}){if(!Xo(r))throw new Error("object required");let e=Bi.get(r);if(e)return e;let t=Yo[0],n=new Set,i=(k,M=++Yo[0])=>{t!==M&&(s=t=M,n.forEach(C=>C(k,M)))},s=t,a=(k=Yo[0])=>(s!==k&&(s=k,l.forEach(([M])=>{let C=M[1](k);C>t&&(t=C)})),t),u=k=>(M,C)=>{let I=[...M];I[1]=[k,...I[1]],i(I,C)},l=new Map,c=(k,M)=>{let C=!Qo.has(M)&&$t.get(M);if(C){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&l.has(k))throw new Error("prop listener already exists");if(n.size){let I=C[2](u(k));l.set(k,[C,I])}else l.set(k,[C])}},d=k=>{var M;let C=l.get(k);C&&(l.delete(k),(M=C[1])==null||M.call(C))},f=k=>(n.add(k),n.size===1&&l.forEach(([C,I],L)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&I)throw new Error("remove already exists");let z=C[2](u(L));l.set(L,[C,z])}),()=>{n.delete(k),n.size===0&&l.forEach(([C,I],L)=>{I&&(I(),l.set(L,[C]))})}),y=!0,x=bp(()=>y,c,d,i),S=wp(r,x);Bi.set(r,S);let j=[r,a,f];return $t.set(S,j),Reflect.ownKeys(r).forEach(k=>{let M=Object.getOwnPropertyDescriptor(r,k);"value"in M&&M.writable&&(S[k]=r[k])}),y=!1,S}function qi(r,e,t){let n=$t.get(r);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!n&&console.warn("Please use proxy object");let i,s=[],a=n[2],u=!1,c=a(d=>{if(s.push(d),t){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 sr(r){let e=$t.get(r);(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!e&&console.warn("Please use proxy object");let[t,n]=e;return vp(t,n())}var mn,or,St,ar,lr=class{constructor(e,t){p(this,mn);p(this,or);p(this,St);p(this,ar,()=>{});g(this,mn,e),g(this,or,t),g(this,St,sr(t)),e.addController(this)}get state(){return o(this,St)}get value(){return o(this,St)}hostConnected(){o(this,ar).call(this),g(this,ar,qi(o(this,or),()=>{g(this,St,sr(o(this,or))),o(this,mn).requestUpdate()}))}hostDisconnected(){o(this,ar).call(this)}};mn=new WeakMap,or=new WeakMap,St=new WeakMap,ar=new WeakMap;var gn,wn,Et,cr,et=class{constructor(e,t,n){p(this,gn);p(this,wn);w(this,"proxyObject");p(this,Et);p(this,cr,()=>{});g(this,gn,e),g(this,wn,n),this.proxyObject=ea(t),g(this,Et,sr(this.proxyObject)),e.addController(this)}get state(){return o(this,Et)}get value(){return o(this,Et)}hostConnected(){o(this,cr).call(this),o(this,wn)?.subscribe&&g(this,cr,qi(this.proxyObject,()=>{g(this,Et,sr(this.proxyObject)),o(this,gn).requestUpdate()}))}hostDisconnected(){o(this,cr).call(this)}};gn=new WeakMap,wn=new WeakMap,Et=new WeakMap,cr=new WeakMap;var ur,yn,hr,_t,It,Vi=class{constructor(e,{provider:t,tag:n,key:i}){p(this,ur);p(this,yn);p(this,hr);p(this,_t,null);p(this,It,null);g(this,ur,e),g(this,yn,n),g(this,hr,i),e.addController(this)}get value(){return o(this,It)?o(this,It).value:null}hostConnected(){if(o(this,It)||(g(this,_t,xp(o(this,ur),o(this,yn))),!o(this,_t)))return;let e=o(this,_t)[o(this,hr)]instanceof et?o(this,_t)[o(this,hr)]:null;e&&g(this,It,new lr(o(this,ur),e.proxyObject))}hostDisconnected(){}};ur=new WeakMap,yn=new WeakMap,hr=new WeakMap,_t=new WeakMap,It=new WeakMap;function xp(r,e){let t=r;for(;t;){let n=t.closest(e);if(n)return n;let i=t.getRootNode();if(i instanceof ShadowRoot)t=i.host;else break}return null}var Sc=()=>{if(window.Shopify)try{return{customerId:kp()}}catch{return null}return null},kp=()=>{try{let r=[()=>window.ShopifyAnalytics?.meta?.page?.customerId,()=>window.meta?.page?.customerId,()=>window._st?.cid,()=>window.ShopifyAnalytics?.lib?.user()?.traits()?.uniqToken];for(let e of r)try{let t=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(t))continue;if(t)return t}catch{}}catch{return null}return null},Ec=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 _c(r,e="http"){return r.startsWith("http://")||r.startsWith("https://")?r:`${e}://${r}`}function ta(r){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(r)}function Ic(r,e){let t=r instanceof URL?r:new URL(r);if(e)for(let[n,i]of e)t.searchParams.set(n,i);return t}var Mc=()=>{if(window.ShopRenter)try{let r=$p();return{customerEmail:r?.customerEmail,customerId:r?.customerId,customerName:r?.customerName}}catch{return null}return null},$p=()=>{try{if(window.ShopRenter){let r=window.ShopRenter.customer;return{customerEmail:r?.email,customerId:r?.userId,customerName:[r?.name?.firstName,r?.name?.lastName].filter(Boolean).join(" ")}}return{customerEmail:null,customerId:null,customerName:null}}catch{return{customerEmail:null,customerId:null,customerName:null}}},Ac=async()=>{try{let r=window.ShopRenter.shop?.domain;if(!r)return[];let e=_c(r,"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 Tc=()=>{if(window.UNAS)try{let r=window.UNAS.customer;return{customerEmail:r?.email,customerId:r?.id}}catch(r){return console.error("Error fetching customer information:",r),null}return null},Lc=async()=>new Promise((r,e)=>{try{window.UNAS.getCart(t=>{let i=t.items.map(s=>({id:s.id,name:s.name,quantity:s.quantity,price:s.price,sku:s.sku}));r(i)})}catch(t){console.error("Error fetching cart information:",t),e(t)}});var ra;function na(r){return{lang:r?.lang??ra?.lang,message:r?.message,abortEarly:r?.abortEarly??ra?.abortEarly,abortPipeEarly:r?.abortPipeEarly??ra?.abortPipeEarly}}var _p;function Ip(r){return _p?.get(r)}var Mp;function Ap(r){return Mp?.get(r)}var Tp;function Lp(r,e){return Tp?.get(r)?.get(e)}function Dc(r){let e=typeof r;return e==="string"?`"${r}"`:e==="number"||e==="bigint"||e==="boolean"?`${r}`:e==="object"||e==="function"?(r&&Object.getPrototypeOf(r)?.constructor?.name)??"null":e}function ye(r,e,t,n,i){let s=i&&"input"in i?i.input:t.value,a=i?.expected??r.expects??null,u=i?.received??Dc(s),l={kind:r.kind,type:r.type,input:s,expected:a,received:u,message:`Invalid ${e}: ${a?`Expected ${a} but r`:"R"}eceived ${u}`,requirement:r.requirement,path:i?.path,issues:i?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=r.kind==="schema",d=i?.message??r.message??Lp(r.reference,l.lang)??(c?Ap(l.lang):null)??n.message??Ip(l.lang);d!==void 0&&(l.message=typeof d=="function"?d(l):d),c&&(t.typed=!1),t.issues?t.issues.push(l):t.issues=[l]}function ve(r){return{version:1,vendor:"valibot",validate(e){return r["~run"]({value:e},na())}}}function jp(r,e){return Object.hasOwn(r,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Oc(r,e){let t=[...new Set(r)];return t.length>1?`(${t.join(` ${e} `)})`:t[0]??"never"}var Dp=class extends Error{constructor(r){super(r[0].message),this.name="ValiError",this.issues=r}};function ia(r,e){return{kind:"validation",type:"max_length",reference:ia,async:!1,expects:`<=${r}`,requirement:r,message:e,"~run"(t,n){return t.typed&&t.value.length>this.requirement&&ye(this,"length",t,n,{received:`${t.value.length}`}),t}}}function sa(r,e){return{kind:"validation",type:"min_length",reference:sa,async:!1,expects:`>=${r}`,requirement:r,message:e,"~run"(t,n){return t.typed&&t.value.length<this.requirement&&ye(this,"length",t,n,{received:`${t.value.length}`}),t}}}function Op(r,e,t){return typeof r.fallback=="function"?r.fallback(e,t):r.fallback}function Uc(r,e,t){return typeof r.default=="function"?r.default(e,t):r.default}function oa(){return{kind:"schema",type:"any",reference:oa,expects:"any",async:!1,get"~standard"(){return ve(this)},"~run"(r){return r.typed=!0,r}}}function dr(r,e){return{kind:"schema",type:"array",reference:dr,expects:"Array",async:!1,item:r,message:e,get"~standard"(){return ve(this)},"~run"(t,n){let i=t.value;if(Array.isArray(i)){t.typed=!0,t.value=[];for(let s=0;s<i.length;s++){let a=i[s],u=this.item["~run"]({value:a},n);if(u.issues){let l={type:"array",origin:"value",input:i,key:s,value:a};for(let c of u.issues)c.path?c.path.unshift(l):c.path=[l],t.issues?.push(c);if(t.issues||(t.issues=u.issues),n.abortEarly){t.typed=!1;break}}u.typed||(t.typed=!1),t.value.push(u.value)}}else ye(this,"type",t,n);return t}}}function aa(r){return{kind:"schema",type:"boolean",reference:aa,expects:"boolean",async:!1,message:r,get"~standard"(){return ve(this)},"~run"(e,t){return typeof e.value=="boolean"?e.typed=!0:ye(this,"type",e,t),e}}}function la(r){return{kind:"schema",type:"null",reference:la,expects:"null",async:!1,message:r,get"~standard"(){return ve(this)},"~run"(e,t){return e.value===null?e.typed=!0:ye(this,"type",e,t),e}}}function Fi(r){return{kind:"schema",type:"number",reference:Fi,expects:"number",async:!1,message:r,get"~standard"(){return ve(this)},"~run"(e,t){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:ye(this,"type",e,t),e}}}function ze(r,e){return{kind:"schema",type:"object",reference:ze,expects:"Object",async:!1,entries:r,message:e,get"~standard"(){return ve(this)},"~run"(t,n){let i=t.value;if(i&&typeof i=="object"){t.typed=!0,t.value={};for(let s in this.entries){let a=this.entries[s];if(s in i||(a.type==="exact_optional"||a.type==="optional"||a.type==="nullish")&&a.default!==void 0){let u=s in i?i[s]:Uc(a),l=a["~run"]({value:u},n);if(l.issues){let c={type:"object",origin:"value",input:i,key:s,value:u};for(let d of l.issues)d.path?d.path.unshift(c):d.path=[c],t.issues?.push(d);if(t.issues||(t.issues=l.issues),n.abortEarly){t.typed=!1;break}}l.typed||(t.typed=!1),t.value[s]=l.value}else if(a.fallback!==void 0)t.value[s]=Op(a);else if(a.type!=="exact_optional"&&a.type!=="optional"&&a.type!=="nullish"&&(ye(this,"key",t,n,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:i,key:s,value:i[s]}]}),n.abortEarly))break}}else ye(this,"type",t,n);return t}}}function pr(r,e){return{kind:"schema",type:"optional",reference:pr,expects:`(${r.expects} | undefined)`,async:!1,wrapped:r,default:e,get"~standard"(){return ve(this)},"~run"(t,n){return t.value===void 0&&(this.default!==void 0&&(t.value=Uc(this,t,n)),t.value===void 0)?(t.typed=!0,t):this.wrapped["~run"](t,n)}}}function ca(r,e){return{kind:"schema",type:"picklist",reference:ca,expects:Oc(r.map(Dc),"|"),async:!1,options:r,message:e,get"~standard"(){return ve(this)},"~run"(t,n){return this.options.includes(t.value)?t.typed=!0:ye(this,"type",t,n),t}}}function Ni(r,e,t){return{kind:"schema",type:"record",reference:Ni,expects:"Object",async:!1,key:r,value:e,message:t,get"~standard"(){return ve(this)},"~run"(n,i){let s=n.value;if(s&&typeof s=="object"){n.typed=!0,n.value={};for(let a in s)if(jp(s,a)){let u=s[a],l=this.key["~run"]({value:a},i);if(l.issues){let d={type:"object",origin:"key",input:s,key:a,value:u};for(let f of l.issues)f.path=[d],n.issues?.push(f);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 d={type:"object",origin:"value",input:s,key:a,value:u};for(let f of c.issues)f.path?f.path.unshift(d):f.path=[d],n.issues?.push(f);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 ye(this,"type",n,i);return n}}}function X(r){return{kind:"schema",type:"string",reference:X,expects:"string",async:!1,message:r,get"~standard"(){return ve(this)},"~run"(e,t){return typeof e.value=="string"?e.typed=!0:ye(this,"type",e,t),e}}}function jc(r){let e;if(r)for(let t of r)e?e.push(...t.issues):e=t.issues;return e}function fr(r,e){return{kind:"schema",type:"union",reference:fr,expects:Oc(r.map(t=>t.expects),"|"),async:!1,options:r,message:e,get"~standard"(){return ve(this)},"~run"(t,n){let i,s,a;for(let u of this.options){let l=u["~run"]({value:t.value},n);if(l.typed)if(l.issues)s?s.push(l):s=[l];else{i=l;break}else a?a.push(l):a=[l]}if(i)return i;if(s){if(s.length===1)return s[0];ye(this,"type",t,n,{issues:jc(s)}),t.typed=!0}else{if(a?.length===1)return a[0];ye(this,"type",t,n,{issues:jc(a)})}return t}}}function Pc(r,e,t){let n=r["~run"]({value:e},na(t));if(n.issues)throw new Dp(n.issues);return n.value}function Rc(r,e){let t={};for(let n in r.entries)t[n]=!e||e.includes(n)?pr(r.entries[n]):r.entries[n];return{...r,entries:t,get"~standard"(){return ve(this)}}}function Bc(...r){return{...r[0],pipe:r,get"~standard"(){return ve(this)},"~run"(e,t){for(let n of r)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!t.abortEarly&&!t.abortPipeEarly)&&(e=n["~run"](e,t))}return e}}}function vn(r,e,t){let n=r["~run"]({value:e},na(t));return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}var qc=Ni(X(),fr([X(),Fi(),aa(),la()])),Vc=Bc(X(),sa(1),ia(5e3)),Fc=()=>{try{return window.UNAS?Tc():window.Shopify?Sc():window.ShopRenter?Mc():null}catch{return null}},Nc=async()=>{try{return window.UNAS?await Lc():window.Shopify?await Ec():window.ShopRenter?await Ac():[]}catch{return[]}},mr={schema:ze({conversationId:pr(X()),messages:pr(dr(ze({id:X(),timestamp:Fi(),role:ca(["user","assistant","support"]),content:X(),parts:pr(dr(fr([ze({text:X()}),ze({html:X()}),ze({tag:X(),data:Ni(X(),oa())})])))})))}),getStorageKey(r){if(!r)throw new Error("widgetId is not set");return`_molin_${r}`},persist(r,e,t){let n=this.getStorageKey(r);localStorage.setItem(n,JSON.stringify({conversationId:e,messages:t}))},restore(r){try{let e=this.getStorageKey(r),t=JSON.parse(localStorage.getItem(e)||"{}"),n=Pc(this.schema,t);return{conversationId:n.conversationId||"",messages:n.messages||[]}}catch(e){return console.error("Failed to restore conversation state:",e),{conversationId:"",messages:[]}}},reset(r){let e=this.getStorageKey(r);localStorage.removeItem(e)}};var U,Hc,bn,xn,gr,q,zc,zi=class zi extends ${constructor(){super();p(this,U);w(this,"contextCtrl");p(this,bn);p(this,xn);p(this,gr,null);this.widgetId="",this.config={},this.callbacks={},this.xUserData=void 0,this.xCustomInstructions=void 0,this.autoConnect=!1,this.contextCtrl=new et(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,isConnected:()=>o(this,U,q).isConnected,sendUserInput:this.sendUserInput.bind(this),sendUserCancel:this.sendUserCancel.bind(this),sendUserTypingStart:this.sendUserTypingStart.bind(this),sendUserTypingStop:this.sendUserTypingStop.bind(this),sendNewChat:this.sendNewChat.bind(this),reset:this.reset.bind(this),reloadConfig:this.reloadConfig.bind(this),enqueueUserInput:this.enqueueUserInput.bind(this),connect:this.connect.bind(this),sendImageDelete:o(this,U,q).sendImageDelete.bind(o(this,U,q))})}connectedCallback(){super.connectedCallback(),this.updated()}updated(){this.autoConnect&&o(this,U,q).connect(),Object.assign(this.contextCtrl.proxyObject,{widgetId:this.widgetId,config:this.config,callbacks:this.callbacks,xUserData:o(this,bn),xCustomInstructions:o(this,xn),conversationId:o(this,U,q).conversationId,messages:o(this,U,Hc),isStreaming:o(this,U,q).isStreaming,typingIndicator:o(this,U,q).typingIndicator,ranOutOfCredits:o(this,U,q).ranOutOfCredits,isLiveMode:o(this,U,q).isLiveMode,lastMsg:o(this,U,q).lastMsg,hasQueuedMessages:o(this,U,q).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:o(this,U,q).sendImageDelete.bind(o(this,U,q))}),m(this,U,zc).call(this)}async sendUserInput(t,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,...n},s=await o(this,U,q).sendUserInput(t,i);return s&&this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:t,example:!1,conversationId:o(this,U,q).conversationId}),s}async enqueueUserInput(t,n={}){let i={xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,role:"user",expectStreaming:!0,...n};return o(this,U,q).enqueueUserInput(t,i)}sendUserCancel(){o(this,U,q).sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})}sendUserTypingStart(){o(this,U,q).sendUserTypingStart()}sendUserTypingStop(){o(this,U,q).sendUserTypingStop()}sendNewChat(){o(this,U,q).sendNewChat()}reset(){o(this,U,q).reset()}reloadConfig(){o(this,U,q).reloadConfig()}connect(){o(this,U,q).connect()}render(){return h`<slot></slot>`}};U=new WeakSet,Hc=function(){return o(this,U,q)?.ranOutOfCredits?[{id:crypto.randomUUID(),role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}]:o(this,U,q)?.messages||[]},bn=new WeakMap,xn=new WeakMap,gr=new WeakMap,q=function(){return o(this,gr)||g(this,gr,new Ri(this,{autoConnect:this.autoConnect,url:t=>{let n=new URL(this.config.wsApiUrl);return n.searchParams.set("widgetId",this.widgetId),n.searchParams.set("conversationId",t),n.searchParams.set("pageUrl",window.location.href),n},onReconnect:()=>{},onError:t=>{console.error("ws error",t)},onClose:()=>{},onNewMessage:t=>{t.role==="assistant"&&this.callbacks.onNewMessageStartedStreaming?.({widgetId:this.widgetId,message:t,conversationId:o(this,U,q).conversationId})},onMessageAppend:t=>{},onMessageDone:(t,n)=>{n.role==="assistant"&&this.callbacks.onMessageEndedStreaming?.({widgetId:this.widgetId,text:n.content??"",message:n,usage_TOKENS_COMPLETION:t.message.usage.TOKENS_COMPLETION,conversationId:o(this,U,q).conversationId})},onMessageError:t=>{console.error("ws message error",t),t.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+t.message})},onReset:()=>{mr.reset(this.widgetId)},onConnect:(t,n)=>{let i=Fc();o(this,U,q).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:i,language:window.navigator.language,cart:[]}),Nc().then(s=>{s?.length>0&&o(this,U,q).sendUserMeta({xUserData:this.xUserData,xCustomInstructions:this.xCustomInstructions,customerInformation:i,cart:s,language:window.navigator.language})}).catch(s=>{console.error(s)}),this.dispatchEvent(new zi.ConnectedEvent({conversationId:t,metadata:n,widgetId:this.widgetId,pendingImages:n?.pendingImages||[]}))},persistConversationState:(t,n)=>{mr.persist(this.widgetId,t,n)},restoreConversationState:()=>mr.restore(this.widgetId)})),o(this,gr)},zc=function(){function t(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 a=vn(qc,s);if(!a.success){console.error("Molin: user-data does not pass schema validation",a.issues);return}return a.output}function n(i){if(!i)return;let s=vn(Vc,i);if(!s.success){console.error("Molin: custom-instructions does not pass schema validation",s.issues);return}return s.output}g(this,bn,t(this.xUserData)),g(this,xn,n(this.xCustomInstructions))},w(zi,"properties",{widgetId:{type:String},config:{type:Object},callbacks:{type:Object},xUserData:{type:Object},xCustomInstructions:{type:Object},autoConnect:{type:Boolean}});var wr=zi;function Wc(r){let e=new Vi(r,{provider:wr,tag:"mw-context-widget",key:"contextCtrl"});return new Proxy({value:null},{get(t,n){if(n==="value")return e.value}})}var ua;wr.ConnectedEvent=(ua=class extends CustomEvent{constructor(e,t={}){super(wr.ConnectedEvent.type,{detail:e,bubbles:!0,composed:!0,...t})}},w(ua,"type","mw-context-widget:connected"),ua);customElements.get("mw-context-widget")||customElements.define("mw-context-widget",wr);function ba(r){return[...r.v,(r.i?"!":"")+r.n].join(":")}function Up(r,e=","){return r.map(ba).join(e)}var Qc=typeof CSS<"u"&&CSS.escape||(r=>r.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Wi(r){for(var e=9,t=r.length;t--;)e=Math.imul(e^r.charCodeAt(t),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function Ji(r,e="@media "){return e+V(r).map(t=>(typeof t=="string"&&(t={min:t}),t.raw||Object.keys(t).map(n=>`(${n}-width:${t[n]})`).join(" and "))).join(",")}function V(r=[]){return Array.isArray(r)?r:r==null?[]:[r]}function Gc(r){return r}function Ki(){}var te={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function eu(r){return r.match(/[-=:;]/g)?.length||0}function ma(r){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(r)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(eu(r),15)<<18}var Pp=["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 xa({n:r,i:e,v:t=[]},n,i,s){r&&(r=ba({n:r,i:e,v:t})),s=[...V(s)];for(let u of t){let l=n.theme("screens",u);for(let c of V(l&&Ji(l)||n.v(u))){var a;s.push(c),i|=l?67108864|ma(c):u=="dark"?1073741824:c[0]=="@"?ma(c):(a=c,1<<~(/:([a-z-]+)/.test(a)&&~Pp.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:r,p:i,r:s,i:e}}var tu=new Map;function ga(r){if(r.d){let e=[],t=ha(r.r.reduce((n,i)=>i[0]=="@"?(e.push(i),n):i?ha(n,s=>ha(i,a=>{let u=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(a);if(u){let l=s.indexOf(u[1]);return~l?s.slice(0,l)+u[0]+s.slice(l+u[1].length):da(s,a)}return da(a,s)})):n,"&"),n=>da(n,r.n?"."+Qc(r.n):""));return t&&e.push(t.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((n,i)=>i+"{"+n+"}",r.d)}}function ha(r,e){return r.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(t,n,i)=>e(n)+i)}function da(r,e){return r.replace(/&/g,e)}var Zc=new Intl.Collator("en",{numeric:!0});function ru(r,e){for(var t=0,n=r.length;t<n;){let i=n+t>>1;0>=nu(r[i],e)?t=i+1:n=i}return n}function nu(r,e){let t=r.p&te.o;return t==(e.p&te.o)&&(t==te.b||t==te.o)?0:r.p-e.p||r.o-e.o||Zc.compare(Jc(r.n),Jc(e.n))||Zc.compare(Kc(r.n),Kc(e.n))}function Jc(r){return(r||"").split(/:/).pop().split("/").pop()||"\0"}function Kc(r){return(r||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function pa(r,e){return Math.round(parseInt(r,16)*e)}function Se(r,e={}){if(typeof r=="function")return r(e);let{opacityValue:t="1",opacityVariable:n}=e,i=n?`var(${n})`:t;if(r.includes("<alpha-value>"))return r.replace("<alpha-value>",i);if(r[0]=="#"&&(r.length==4||r.length==7)){let s=(r.length-1)/3,a=[17,1,.062272][s-1];return`rgba(${[pa(r.substr(1,s),a),pa(r.substr(1+s,s),a),pa(r.substr(1+2*s,s),a),i]})`}return i=="1"?r:i=="0"?"#0000":r.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function iu(r,e,t,n,i=[]){return(function s(a,{n:u,p:l,r:c=[],i:d},f){let y=[],x="",S=0,j=0;for(let C in a||{}){var k,M;let I=a[C];if(C[0]=="@"){if(!I)continue;if(C[1]=="a"){y.push(...Ca(u,l,Zi(""+I),f,l,c,d,!0));continue}if(C[1]=="l"){for(let L of V(I))y.push(...s(L,{n:u,p:(k=te[C[7]],l&~te.o|k),r:C[7]=="d"?[]:c,i:d},f));continue}if(C[1]=="i"){y.push(...V(I).map(L=>({p:-1,o:0,r:[],d:C+" "+L})));continue}if(C[1]=="k"){y.push({p:te.d,o:0,r:[C],d:s(I,{p:te.d},f).map(ga).join("")});continue}if(C[1]=="f"){y.push(...V(I).map(L=>({p:te.d,o:0,r:[C],d:s(L,{p:te.d},f).map(ga).join("")})));continue}}if(typeof I!="object"||Array.isArray(I))C=="label"&&I?u=I+Wi(JSON.stringify([l,d,a])):(I||I===0)&&(C=C.replace(/[A-Z]/g,L=>"-"+L.toLowerCase()),j+=1,S=Math.max(S,(M=C)[0]=="-"?0:eu(M)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(M)?+!!RegExp.$1||-!!RegExp.$2:0)+1),x+=(x?";":"")+V(I).map(L=>f.s(C,ka(""+L,f.theme)+(d?" !important":""))).join(";"));else if(C[0]=="@"||C.includes("&")){let L=l;C[0]=="@"&&(C=C.replace(/\bscreen\(([^)]+)\)/g,(z,ee)=>{let ie=f.theme("screens",ee);return ie?(L|=67108864,Ji(ie,"")):z}),L|=ma(C)),y.push(...s(I,{n:u,p:L,r:[...c,C],i:d},f))}else y.push(...s(I,{p:l,r:[...c,C]},f))}return y.unshift({n:u,p:l,o:Math.max(0,15-j)+1.5*Math.min(S||15,15),r:c,d:x}),y.sort(nu)})(r,xa(e,t,n,i),t)}function ka(r,e){return r.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(t,n,i,s,a="")=>{let u=e(i,a);return typeof u=="function"&&/color|fill|stroke/i.test(i)?Se(u):""+V(u).filter(l=>Object(l)!==l)})}function su(r,e){let t,n=[];for(let i of r)i.d&&i.n?t?.p==i.p&&""+t.r==""+i.r?(t.c=[t.c,i.c].filter(Boolean).join(" "),t.d=t.d+";"+i.d):n.push(t={...i,n:i.n&&e}):n.push({...i,n:i.n&&e});return n}function Gi(r,e,t=te.u,n,i){let s=[];for(let a of r)for(let u of(function(l,c,d,f,y){l={...l,i:l.i||y};let x=(function(S,j){let k=tu.get(S.n);return k?k(S,j):j.r(S.n,S.v[0]=="dark")})(l,c);return x?typeof x=="string"?({r:f,p:d}=xa(l,c,d,f),su(Gi(Zi(x),c,d,f,l.i),l.n)):Array.isArray(x)?x.map(S=>{var j,k;return{o:0,...S,r:[...V(f),...V(S.r)],p:(j=d,k=S.p??d,j&~te.o|k)}}):iu(x,l,c,d,f):[{c:ba(l),p:0,o:0,r:[]}]})(a,e,t,n,i))s.splice(ru(s,u),0,u);return s}function Ca(r,e,t,n,i,s,a,u){return su((u?t.flatMap(l=>Gi([l],n,i,s,a)):Gi(t,n,i,s,a)).map(l=>l.p&te.o&&(l.n||e==te.b)?{...l,p:l.p&~te.o|e,o:0}:l),r)}function Rp(r,e,t,n){var i;return i=(s,a)=>{let{n:u,p:l,r:c,i:d}=xa(s,a,e);return t&&Ca(u,e,t,a,l,c,d,n)},tu.set(r,i),r}function fa(r,e,t){if(r[r.length-1]!="("){let n=[],i=!1,s=!1,a="";for(let u of r)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!="&"&&(a+=(a&&"-")+u)}a&&(s&&(a="-"+a),e[0].push({n:a,v:n.filter(Bp),i}))}}function Bp(r,e,t){return t.indexOf(r)==e}var Yc=new Map;function Zi(r){let e=Yc.get(r);if(!e){let t=[],n=[[]],i=0,s=0,a=null,u=0,l=(c,d=0)=>{i!=u&&(t.push(r.slice(i,u+d)),c&&fa(t,n)),i=u+1};for(;u<r.length;u++){let c=r[u];if(s)r[u-1]!="\\"&&(s+=+(c=="[")||-(c=="]"));else if(c=="[")s+=1;else if(a)r[u-1]!="\\"&&a.test(r.slice(u))&&(a=null,i=u+RegExp.lastMatch.length);else if(c=="/"&&r[u-1]!="\\"&&(r[u+1]=="*"||r[u+1]=="/"))a=r[u+1]=="*"?/^\*\//:/^[\r\n]/;else if(c=="(")l(),t.push(c);else if(c==":")r[u+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(c)){l(!0);let d=t.lastIndexOf("(");if(c==")"){let f=t[d-1];if(/[~@]$/.test(f)){let y=n.shift();t.length=d,fa([...t,"#"],n);let{v:x}=n[0].pop();for(let S of y)S.v.splice(+(S.v[0]=="dark")-+(x[0]=="dark"),x.length);fa([...t,Rp(f.length>1?f.slice(0,-1)+Wi(JSON.stringify([f,y])):f+"("+Up(y)+")",te.a,y,/@$/.test(f))],n)}d=t.lastIndexOf("(",d-1)}t.length=d+1}else/[~@]/.test(c)&&r[u+1]=="("&&n.unshift([])}l(!0),Yc.set(r,e=n[0])}return e}function v(r,e,t){return[r,wa(e,t)]}function wa(r,e){return typeof r=="function"?r:typeof r=="string"&&/^[\w-]+$/.test(r)?(t,n)=>({[r]:e?e(t,n):ya(t,1)}):t=>r||{[t[1]]:ya(t,2)}}function ya(r,e,t=r.slice(e).find(Boolean)||r.$$||r.input){return r.input[0]=="-"?`calc(${t} * -1)`:t}function b(r,e,t,n){return[r,$a(e,t,n)]}function $a(r,e,t){let n=typeof e=="string"?(i,s)=>({[e]:t?t(i,s):i._}):e||(({1:i,_:s},a,u)=>({[i||u]:s}));return(i,s)=>{let a=ou(r||i[1]),u=s.theme(a,i.$$)??Ue(i.$$,a,s);if(u!=null)return i._=ya(i,0,u),n(i,s,a)}}function re(r,e={},t){return[r,qp(e,t)]}function qp(r={},e){return(t,n)=>{let{section:i=ou(t[0]).replace("-","")+"Color"}=r,[s,a]=Vp(t.$$);if(!s)return;let u=n.theme(i,s)||Ue(s,i,n);if(!u||typeof u=="object")return;let{opacityVariable:l=`--tw-${t[0].replace(/-$/,"")}-opacity`,opacitySection:c=i.replace("Color","Opacity"),property:d=i,selector:f}=r,y=n.theme(c,a||"DEFAULT")||a&&Ue(a,c,n),x=e||(({_:j})=>{let k=kn(d,j);return f?{[f]:k}:k});t._={value:Se(u,{opacityVariable:l||void 0,opacityValue:y||void 0}),color:j=>Se(u,j),opacityVariable:l||void 0,opacityValue:y||void 0};let S=x(t,n);if(!t.dark){let j=n.d(i,s,u);j&&j!==u&&(t._={value:Se(j,{opacityVariable:l||void 0,opacityValue:y||"1"}),color:k=>Se(j,k),opacityVariable:l||void 0,opacityValue:y||void 0},S={"&":S,[n.v("dark")]:x(t,n)})}return S}}function Vp(r){return(r.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function kn(r,e){let t={};return typeof e=="string"?t[r]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(t[e.opacityVariable]=e.opacityValue||"1"),t[r]=e.value),t}function Ue(r,e,t){if(r[0]=="["&&r.slice(-1)=="]"){if(r=yr(ka(r.slice(1,-1),t.theme)),!e)return r;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(r)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(r))||/image/i.test(e)&&!(/^image:/.test(r)||/^[a-z-]+\(/.test(r))||/weight/i.test(e)&&!(/^(number|any):/.test(r)||/^\d+$/.test(r))||/position/i.test(e)&&/^(length|size):/.test(r)))return r.replace(/^[a-z-]+:/,"")}}function ou(r){return r.replace(/-./g,e=>e[1].toUpperCase())}function yr(r){return r.includes("url(")?r.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,t="",n,i="")=>yr(t)+n+yr(i)):r.replace(/(^|[^\\])_+/g,(e,t)=>t+" ".repeat(e.length-t.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function Cn({presets:r=[],...e}){let t={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:V(e.variants),rules:V(e.rules),ignorelist:V(e.ignorelist),hash:void 0,stringify:(n,i)=>n+":"+i,finalize:[]};for(let n of V([...r,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&V(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:i,darkMode:s=t.darkMode,darkColor:a=t.darkColor,theme:u,variants:l,rules:c,ignorelist:d,hash:f=t.hash,stringify:y=t.stringify,finalize:x}=typeof n=="function"?n(t):n;t={preflight:t.preflight!==!1&&i!==!1&&[...t.preflight,...V(i)],darkMode:s,darkColor:a,theme:{...t.theme,...u,extend:{...t.theme.extend,...u?.extend}},variants:[...t.variants,...V(l)],rules:[...t.rules,...V(c)],ignorelist:[...t.ignorelist,...V(d)],hash:f,stringify:y,finalize:[...t.finalize,...V(x)]}}return t}function Xc(r,e,t,n,i,s){for(let a of e){let u=t.get(a);u||t.set(a,u=n(a));let l=u(r,i,s);if(l)return l}}function Fp(r){var e;return va(r[0],typeof(e=r[1])=="function"?e:()=>e)}function Np(r){var e,t;return Array.isArray(r)?va(r[0],wa(r[1],r[2])):va(r,wa(e,t))}function va(r,e){return au(r,(t,n,i,s)=>{let a=n.exec(t);if(a)return a.$$=t.slice(a[0].length),a.dark=s,e(a,i)})}function au(r,e){let t=V(r).map(Hp);return(n,i,s)=>{for(let a of t){let u=e(n,a,i,s);if(u)return u}}}function Hp(r){return typeof r=="string"?RegExp("^"+r+(r.includes("$")||r.slice(-1)=="-"?"":"$")):r}function lu(r,e){let t=Cn(r),n=(function({theme:l,darkMode:c,darkColor:d=Ki,variants:f,rules:y,hash:x,stringify:S,ignorelist:j,finalize:k}){let M=new Map,C=new Map,I=new Map,L=new Map,z=au(j,(B,se)=>se.test(B));f.push(["dark",Array.isArray(c)||c=="class"?`${V(c)[1]||".dark"} &`:typeof c=="string"&&c!="media"?c:"@media (prefers-color-scheme:dark)"]);let ee=typeof x=="function"?B=>x(B,Wi):x?Wi:Gc;ee!==Gc&&k.push(B=>({...B,n:B.n&&ee(B.n),d:B.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(se,de)=>"--"+ee(de).replace("#",""))}));let ie={theme:(function({extend:B={},...se}){let de={},Eo={get colors(){return gt("colors")},theme:gt,negative(){return{}},breakpoints(Z){let oe={};for(let ge in Z)typeof Z[ge]=="string"&&(oe["screen-"+ge]=Z[ge]);return oe}};return gt;function gt(Z,oe,ge,tn){if(Z){if({1:Z,2:tn}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(Z)||[,Z],/[.[]/.test(Z)){let Fe=[];Z.replace(/\[([^\]]+)\]|([^.[]+)/g,(yt,nn,zd=nn)=>Fe.push(zd)),Z=Fe.shift(),ge=oe,oe=Fe.join("-")}let Oe=de[Z]||Object.assign(Object.assign(de[Z]={},Si(se,Z)),Si(B,Z));if(oe==null)return Oe;oe||(oe="DEFAULT");let wt=Oe[oe]??oe.split("-").reduce((Fe,yt)=>Fe?.[yt],Oe)??ge;return tn?Se(wt,{opacityValue:ka(tn,gt)}):wt}let rn={};for(let Oe of[...Object.keys(se),...Object.keys(B)])rn[Oe]=gt(Oe);return rn}function Si(Z,oe){let ge=Z[oe];return typeof ge=="function"&&(ge=ge(Eo)),ge&&/color|fill|stroke/i.test(oe)?(function tn(rn,Oe=[]){let wt={};for(let Fe in rn){let yt=rn[Fe],nn=[...Oe,Fe];wt[nn.join("-")]=yt,Fe=="DEFAULT"&&(nn=Oe,wt[Oe.join("-")]=yt),typeof yt=="object"&&Object.assign(wt,tn(yt,nn))}return wt})(ge):ge}})(l),e:Qc,h:ee,s(B,se){return S(B,se,ie)},d(B,se,de){return d(B,se,ie,de)},v(B){return M.has(B)||M.set(B,Xc(B,f,C,Fp,ie)||"&:"+B),M.get(B)},r(B,se){let de=JSON.stringify([B,se]);return I.has(de)||I.set(de,!z(B,ie)&&Xc(B,y,L,Np,ie,se)),I.get(de)},f(B){return k.reduce((se,de)=>de(se,ie),B)}};return ie})(t),i=new Map,s=[],a=new Set;e.resume(l=>i.set(l,l),(l,c)=>{e.insert(l,s.length,c),s.push(c),a.add(l)});function u(l){let c=n.f(l),d=ga(c);if(d&&!a.has(d)){a.add(d);let f=ru(s,l);e.insert(d,f,l),s.splice(f,0,l)}return c.n}return Object.defineProperties(function(c){if(!i.size)for(let f of V(t.preflight))typeof f=="function"&&(f=f(n)),f&&(typeof f=="string"?Ca("",te.b,Zi(f),n,te.b,[],!1,!0):iu(f,{},n,te.b)).forEach(u);c=""+c;let d=i.get(c);if(!d){let f=new Set;for(let y of Gi(Zi(c),n))f.add(y.c).add(u(y));d=[...f].filter(Boolean).join(" "),i.set(c,d).set(d,d)}return d},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:n.theme,config:t,snapshot(){let l=e.snapshot(),c=new Set(a),d=new Map(i),f=[...s];return()=>{l(),a=c,i=d,s=f}},clear(){e.clear(),a=new Set,i=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function zp(r,e){return r!=e&&""+r.split(" ").sort()!=""+e.split(" ").sort()}function cu(r){let e=new MutationObserver(t);return{observe(i){e.observe(i,{attributeFilter:["class"],subtree:!0,childList:!0}),n(i),t([{target:i,type:""}])},disconnect(){e.disconnect()}};function t(i){for(let{type:s,target:a}of i)if(s[0]=="a")n(a);else for(let u of a.querySelectorAll("[class]"))n(u);e.takeRecords()}function n(i){let s,a=i.getAttribute?.("class");a&&zp(a,s=r(a))&&i.setAttribute("class",s)}}function Wp(r){let e=document.querySelector(r||'style[data-twind=""]');return(!e||e.tagName!="STYLE")&&(e=document.createElement("style"),document.head.prepend(e)),e.dataset.twind="claimed",e}function Yi(r){let e=r?.cssRules?r:(r&&typeof r!="string"?r:Wp(r)).sheet;return{target:e,snapshot(){let t=Array.from(e.cssRules,n=>n.cssText);return()=>{this.clear(),t.forEach(this.insert)}},clear(){for(let t=e.cssRules.length;t--;)e.deleteRule(t)},destroy(){e.ownerNode?.remove()},insert(t,n){try{e.insertRule(t,n)}catch{e.insertRule(":root{}",n)}},resume:Ki}}var Gp=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 uu(r){return Gp.get(r)}function hu(r){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(r);return e?e[1]?1:e[2]?2:e[3]?3:5:0}function du(r,e){var t=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(r);return t?t[1]?/^sti/i.test(e)?1:0:t[2]?/^pat/i.test(e)?1:0:t[3]?/^image-/i.test(e)?1:0:t[4]?e[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(e)?4:0:0}var Zp=[["-webkit-",1],["-moz-",2],["-ms-",4]];function Xi(){return({stringify:r})=>({stringify(e,t,n){let i="",s=uu(e);s&&(i+=r(s,t,n)+";");let a=hu(e),u=du(e,t);for(let l of Zp)a&l[1]&&(i+=r(l[0]+e,t,n)+";"),u&l[1]&&(i+=r(e,l[0]+t,n)+";");return i+r(e,t,n)}})}function Qi(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",$a("lineClamp",({_:r})=>pu(r))],["line-clamp-(\\d+)",({1:r})=>pu(r)]]}}function pu(r){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${r}`}}var Sn={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",...be(4,"rem",4,.5,.5),...be(12,"rem",4,5),14:"3.5rem",...be(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:R("blur"),backdropBrightness:R("brightness"),backdropContrast:R("contrast"),backdropGrayscale:R("grayscale"),backdropHueRotate:R("hueRotate"),backdropInvert:R("invert"),backdropOpacity:R("opacity"),backdropSaturate:R("saturate"),backdropSepia:R("sepia"),backgroundColor:R("colors"),backgroundImage:{none:"none"},backgroundOpacity:R("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:{...be(200,"",100,0,50),...be(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:r})=>({DEFAULT:r("colors.gray.200","currentColor"),...r("colors")}),borderOpacity:R("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:R("spacing"),borderWidth:{DEFAULT:"1px",...Ee(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:R("colors"),caretColor:R("colors"),accentColor:({theme:r})=>({auto:"auto",...r("colors")}),contrast:{...be(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:R("borderColor"),divideOpacity:R("borderOpacity"),divideWidth:R("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:r})=>({...r("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:r})=>({...r("spacing"),...$n(2,6),...$n(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:R("spacing"),gradientColorStops:R("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:r})=>({...r("spacing"),...$n(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:r})=>({...r("spacing"),...$n(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:{...be(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:r})=>({auto:"auto",...r("spacing")}),maxHeight:({theme:r})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...r("spacing")}),maxWidth:({theme:r,breakpoints:e})=>({...e(r("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:{...be(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:R("spacing"),placeholderColor:R("colors"),placeholderOpacity:R("opacity"),outlineColor:R("colors"),outlineOffset:Ee(8,"px"),outlineWidth:Ee(8,"px"),ringColor:({theme:r})=>({...r("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:R("colors"),ringOffsetWidth:Ee(8,"px"),ringOpacity:({theme:r})=>({...r("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Ee(8,"px")},rotate:{...Ee(2,"deg"),...Ee(12,"deg",3),...Ee(180,"deg",45)},saturate:be(200,"",100,0,50),scale:{...be(150,"",100,0,50),...be(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:R("spacing"),scrollPadding:R("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Ee(2,"deg"),...Ee(12,"deg",3)},space:R("spacing"),stroke:({theme:r})=>({...r("colors"),none:"none"}),strokeWidth:be(2),textColor:R("colors"),textDecorationColor:R("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Ee(8,"px")},textUnderlineOffset:{auto:"auto",...Ee(8,"px")},textIndent:R("spacing"),textOpacity:R("opacity"),transitionDuration:({theme:r})=>({...r("durations"),DEFAULT:"150ms"}),transitionDelay:R("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:r})=>({...r("spacing"),...$n(2,4),full:"100%"}),width:({theme:r})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...r("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...be(50,"",1,0,10),auto:"auto"}};function $n(r,e){let t={};do for(var n=1;n<r;n++)t[`${n}/${r}`]=Number((n/r*100).toFixed(6))+"%";while(++r<=e);return t}function Ee(r,e,t=0){let n={};for(;t<=r;t=2*t||1)n[t]=t+e;return n}function be(r,e="",t=1,n=0,i=1,s={}){for(;n<=r;n+=i)s[n]=n/t+e;return s}function R(r){return({theme:e})=>e(r)}var fu={"*,::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, ${Sn.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, ${Sn.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 bu=[v("\\[([-\\w]+):(.+)]",({1:r,2:e},t)=>({"@layer overrides":{"&":{[r]:Ue(`[${e}]`,"",t)}}})),v("(group|peer)([~/][^-[]+)?",({input:r},{h:e})=>[{c:e(r)}]),b("aspect-","aspectRatio"),v("container",(r,{theme:e})=>{let{screens:t=e("screens"),center:n,padding:i}=e("container"),s={width:"100%",marginRight:n&&"auto",marginLeft:n&&"auto",...a("xs")};for(let u in t){let l=t[u];typeof l=="string"&&(s[Ji(l)]={"&":{maxWidth:l,...a(u)}})}return s;function a(u){let l=i&&(typeof i=="string"?i:i[u]||i.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),b("content-","content",({_:r})=>({"--tw-content":r,content:"var(--tw-content)"})),v("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),v("box-(border|content)","boxSizing",({1:r})=>r+"-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",es),v("overscroll(-[xy])?-(auto|contain|none)",({1:r="",2:e})=>({["overscroll-behavior"+r]:e})),v("(static|fixed|absolute|relative|sticky)","position"),b("-?inset(-[xy])?(?:$|-)","inset",({1:r,_:e})=>({top:r!="-x"&&e,right:r!="-y"&&e,bottom:r!="-x"&&e,left:r!="-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",mu),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",vu),b("col-","gridColumn"),v("col-(span)-(\\d+)","gridColumn",yu),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",vu),b("row-","gridRow"),v("row-(span)-(\\d+)","gridRow",yu),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",r=>es(mu(r))),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",gu),v("(content|items|self)-",r=>({["align-"+r[1]]:gu(r)})),v("(place-(content|items|self))-",({1:r,$$:e})=>({[r]:("wun".includes(e[3])?"space-":"")+e})),b("p([xytrbl])?(?:$|-)","padding",vr("padding")),b("-?m([xytrbl])?(?:$|-)","margin",vr("margin")),b("-?space-(x|y)(?:$|-)","space",({1:r,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${r}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[r]]:`calc(${e} * calc(1 - var(--tw-space-${r}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[r]]:`calc(${e} * var(--tw-space-${r}-reverse))`}})),v("space-(x|y)-reverse",({1:r})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${r}-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",({_:r})=>typeof(r=V(r))[1]=="string"?{fontFamily:Te(r)}:{fontFamily:Te(r[0]),...r[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:r,2:e="",3:t})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(t?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":r)]:r,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...tt({"--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",({_:r})=>({"&::placeholder":{"--tw-placeholder-opacity":r}})),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",({_:r})=>typeof r=="string"?{fontSize:r}:{fontSize:r[0],...typeof r[1]=="string"?{lineHeight:r[1]}:r[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:r})=>`linear-gradient(to ${Mt(r," ")},var(--tw-gradient-stops))`),re("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:r})=>({"--tw-gradient-from":r.value,"--tw-gradient-to":r.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),re("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:r})=>({"--tw-gradient-to":r.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${r.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:r})=>r+"-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:r})=>r+(r=="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",es),b("bg-","backgroundSize"),b("rounded(?:$|-)","borderRadius"),b("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:r,_:e})=>{let t={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[r]||[r,r];return{[`border-${Mt(t[0])}-radius`]:e,[`border-${Mt(t[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:r,_:e})=>({...tt({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(r||"-x")]:e,["--tw-border-spacing"+(r||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),re("border-([xytrbl])-",{section:"borderColor"},vr("border","Color")),re("border-"),b("border-([xytrbl])(?:$|-)","borderWidth",vr("border","Width")),b("border(?:$|-)","borderWidth"),b("divide-opacity(?:$|-)","divideOpacity",({_:r})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":r}})),v("divide-(solid|dashed|dotted|double|none)",({1:r})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:r}})),v("divide-([xy]-reverse)",({1:r})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+r]:"1"}})),b("divide-([xy])(?:$|-)","divideWidth",({1:r,_:e})=>{let t={x:"lr",y:"tb"}[r];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${r}-reverse`]:"0",[`border-${Mt(t[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${r}-reverse)))`,[`border-${Mt(t[1])}Width`]:`calc(${e} * var(--tw-divide-${r}-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",({_:r},{theme:e})=>({...tt({"--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":Se(e("ringOffsetColor","","#fff")),"--tw-ring-color":Se(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(${r} + 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"},({_:r})=>({"--tw-shadow-color":r.value,"--tw-shadow":"var(--tw-shadow-colored)"})),b("shadow(?:$|-)","boxShadow",({_:r})=>({...tt({"--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":Te(r),"--tw-shadow-colored":Te(r).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"),...wu(),...wu("backdrop-"),b("transition(?:$|-)","transitionProperty",(r,{theme:e})=>({transitionProperty:Te(r),transitionTimingFunction:r._=="none"?void 0:Te(e("transitionTimingFunction","")),transitionDuration:r._=="none"?void 0:Te(e("transitionDuration",""))})),b("duration(?:$|-)","transitionDuration","transitionDuration",Te),b("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",Te),b("delay(?:$|-)","transitionDelay","transitionDelay",Te),b("animate(?:$|-)","animation",(r,{theme:e,h:t,e:n})=>{let i=Te(r),s=i.split(" "),a=e("keyframes",s[0]);return a?{["@keyframes "+(s[0]=n(t(s[0])))]:a,animation:s.join(" ")}:{animation:i}}),"(transform)-(none)",v("transform",Ea),v("transform-(cpu|gpu)",({1:r})=>({"--tw-transform":xu(r=="gpu")})),b("scale(-[xy])?-","scale",({1:r,_:e})=>({["--tw-scale"+(r||"-x")]:e,["--tw-scale"+(r||"-y")]:e,...Ea()})),b("-?(rotate)-","rotate",Sa),b("-?(translate-[xy])-","translate",Sa),b("-?(skew-[xy])-","skew",Sa),v("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",es),"(appearance)-",b("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",b("(cursor)-"),"(cursor)-",v("snap-(none)","scroll-snap-type"),v("snap-(x|y|both)",({1:r})=>({...tt({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":r+" 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",vr("scroll-padding")),b("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",vr("scroll-margin")),v("touch-(auto|none|manipulation)","touch-action"),v("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:r,2:e,3:t})=>({...tt({"--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":t?"pan-y":r}`]:r,"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:r})=>({x:"horizontal",y:"vertical"})[r]||r||"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 es(r){return(typeof r=="string"?r:r[1]).replace(/-/g," ").trim()}function mu(r){return(typeof r=="string"?r:r[1]).replace("col","column")}function Mt(r,e="-"){let t=[];for(let n of r)t.push({t:"top",r:"right",b:"bottom",l:"left"}[n]);return t.join(e)}function Te(r){return r&&""+(r._||r)}function gu({$$:r}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[r[3]||""]||"")+r}function vr(r,e=""){return({1:t,_:n})=>{let i={x:"lr",y:"tb"}[t]||t+t;return i?{...kn(r+"-"+Mt(i[0])+e,n),...kn(r+"-"+Mt(i[1])+e,n)}:kn(r+e,n)}}function wu(r=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",r&&"opacity","saturate","sepia",!r&&"drop-shadow"].filter(Boolean),t={};for(let n of e)t[`--tw-${r}${n}`]="var(--tw-empty,/*!*/ /*!*/)";return t={...tt(t),[`${r}filter`]:e.map(n=>`var(--tw-${r}${n})`).join(" ")},[`(${r}filter)-(none)`,v(`${r}filter`,t),...e.map(n=>b(`${n[0]=="h"?"-?":""}(${r}${n})(?:$|-)`,n,({1:i,_:s})=>({[`--tw-${i}`]:V(s).map(a=>`${n}(${a})`).join(" "),...t})))]}function Sa({1:r,_:e}){return{["--tw-"+r]:e,...Ea()}}function Ea(){return{...tt({"--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":xu()}),transform:"var(--tw-transform)"}}function xu(r){return[r?"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 yu({1:r,2:e}){return`${r} ${e} / ${r} ${e}`}function vu({1:r}){return`repeat(${r},minmax(0,1fr))`}function tt(r){return{"@layer defaults":{"*,::before,::after":r,"::backdrop":r}}}var ku=[["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:r})=>`@media (orientation:${r})`],["contrast-(more|less)",({1:r})=>`@media (prefers-contrast:${r})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:r})=>`&::${r}`],["(marker|selection)",({1:r})=>`& *::${r},&::${r}`],["file","&::file-selector-button"],["(first|last|only)",({1:r})=>`&:${r}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:r,$$:e},t)=>e&&`&[${r}-${t.theme(r,e)||Ue(e,"",t)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:r,3:e="",4:t,5:n="",6:i=e},{e:s,h:a,v:u})=>{let l=yr(n)||(t[0]=="["?t:u(t.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(a(r+i))})`)}${r[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:r})=>`[dir="${r}"] &`],["supports-",({$$:r},e)=>{if(r&&(r=e.theme("supports",r)||Ue(r,"",e)),r)return r.includes(":")||(r+=":var(--tw)"),/^\w*\s*\(/.test(r)||(r=`(${r})`),`@supports ${r.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:r},e)=>{if(r&&(r=e.theme("screens",r)||Ue(r,"",e)),typeof r=="string")return`@media not all and (min-width:${r})`}],["min-",({$$:r},e)=>(r&&(r=Ue(r,"",e)),r&&`@media (min-width:${r})`)],[/^\[(.+)]$/,({1:r})=>/[&@]/.test(r)&&yr(r).replace(/[}]+$/,"").split("{")]];function Cu({colors:r,disablePreflight:e}={}){return{preflight:e?void 0:fu,theme:{...Sn,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...r}},variants:ku,rules:bu,finalize(t){return t.n&&t.d&&t.r.some(n=>/^&::(before|after)$/.test(n))&&!/(^|;)content:/.test(t.d)?{...t,d:"content:var(--tw-content);"+t.d}:t}}}var Jp={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},Kp={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},Yp={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Xp={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},Qp={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},e1={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},t1={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},r1={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},n1={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},i1={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},s1={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},o1={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},a1={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},l1={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},c1={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},u1={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},h1={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},d1={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},p1={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},f1={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},m1={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},g1={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},$u={__proto__:null,slate:Jp,gray:Kp,zinc:Yp,neutral:Xp,stone:Qp,red:e1,orange:t1,amber:r1,yellow:n1,lime:i1,green:s1,emerald:o1,teal:a1,cyan:l1,sky:c1,blue:u1,indigo:h1,violet:d1,purple:p1,fuchsia:f1,pink:m1,rose:g1};function ts({disablePreflight:r}={}){return Cu({colors:$u,disablePreflight:r})}function rs({className:r="prose",defaultColor:e="gray",extend:t={},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,a=s])=>[`${r}-${s}`,(u,l)=>_u(r,a[0]=="."?"."+l.e(l.h(a.slice(1))):a,l,c=>`& :is(${c.trim()})`)]),rules:[[`(lead|not-${r})`,({1:s},{h:a})=>[{c:a(s)}]],[`${r}-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)"}}],[r+"-",({$$:s},a)=>{let u=Eu(a.theme("fontSize",s));return u&&{"@layer components":u}}],[r+"-",({$$:s},a)=>i(s,a)],[r,(s,a)=>({...i(e,a),"@layer base":[Su(r,a,{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"},[`.${a.e(a.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"}}),Su(r,a,t)],"@layer components":{...Eu(a.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function i(s,a){let u={},l={},c=(d,f,y)=>{let x=a.theme(`colors.${s}.${f}`,f);y["--tw-prose-"+d]=Se(x);let S=y!=l&&a.d("colors",`${s}-${f}`,x);S&&(l["--tw-prose-"+d]=Se(S))};for(let d in n){let f=n[d];d!="dark"&&f&&c(d,f,u)}for(let d in n.dark||{}){let f=n.dark[d];f&&(n.dark?c("invert-"+d,f,u):c(d,f,l))}return Object.keys(u).length?{"@layer defaults":{"&":u,[a.v("dark")]:l}}:void 0}}function Su(r,e,t){let n={};for(let i in t)n[_u(r,i,e,s=>`.${e.e(e.h(r))}${s}`)]=t[i];return n}function _u(r,e,{e:t,h:n},i){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,a=" ",u=s,l="")=>i(`${a}:where(${u}):not(:where(.${t(n("not-"+r))} *))${l}`))}function Eu(r){return r?typeof r=="string"?{fontSize:r}:{fontSize:r[0],...typeof r[1]=="string"?{lineHeight:r[1]}:r[1]}:void 0}function E(r,e){return`${(r/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var _a=Cn({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:[ts(),Xi(),Qi(),rs()]});function ns(r,e=!0){let t=(function(){if(w1)try{let l=Yi(new CSSStyleSheet);return l.connect=c=>{let d=Ia(c);d.adoptedStyleSheets=[...d.adoptedStyleSheets,l.target]},l.disconnect=Ki,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let a=[Yi(s)],u=new WeakMap;return{get target(){return a[0].target},snapshot(){let l=a.map(c=>c.snapshot());return()=>l.forEach(c=>c())},clear(){a.forEach(l=>l.clear())},destroy(){a.forEach(l=>l.destroy())},insert(l,c,d){a[0].insert(l,c,d);let f=this.target.cssRules[c];a.forEach((y,x)=>x&&y.target.insertRule(f.cssText,c))},resume(l,c){return a[0].resume(l,c)},connect(l){let c=document.createElement("style");Ia(l).appendChild(c);let d=Yi(c),{cssRules:f}=this.target;for(let y=0;y<f.length;y++)d.target.insertRule(f[y].cssText,y);a.push(d),u.set(l,d)},disconnect(l){let c=a.indexOf(u.get(l));c>=0&&a.splice(c,1)}}})(),n=lu({...r,hash:r.hash??e},t),i=cu(n);return function(a){return class extends a{connectedCallback(){super.connectedCallback?.(),t.connect(this),i.observe(Ia(this))}disconnectedCallback(){t.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=n}}}}var w1=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function Ia(r){return r.shadowRoot||r.attachShadow({mode:"open"})}var _=r=>ns(_a)(r);var En=class extends _($){constructor(){super(),this.color="#601feb",this.radius="16.8576px",this.size="320px",this.border="#d1d5db"}render(){return h`
|
|
127
131
|
<div class="flex flex-row flex-wrap gap-0">
|
|
128
132
|
<div class="relative z-0 flex min-h-9 items-center justify-center overflow-hidden" style="border-radius: ${this.radius};">
|
|
129
133
|
<!-- Spinning gradient background -->
|
|
@@ -135,7 +139,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
135
139
|
<slot></slot>
|
|
136
140
|
</div>
|
|
137
141
|
</div>
|
|
138
|
-
`}};w(
|
|
142
|
+
`}};w(En,"properties",{color:{type:String},radius:{type:String},size:{type:String},border:{type:String}}),w(En,"styles",J`
|
|
139
143
|
:host {
|
|
140
144
|
display: block;
|
|
141
145
|
}
|
|
@@ -150,7 +154,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
150
154
|
transform: rotate(360deg);
|
|
151
155
|
}
|
|
152
156
|
}
|
|
153
|
-
`);customElements.get("mw-spinning-border")||customElements.define("mw-spinning-border",
|
|
157
|
+
`);customElements.get("mw-spinning-border")||customElements.define("mw-spinning-border",En);var _n=class extends _($){constructor(){super();w(this,"render",()=>h`
|
|
154
158
|
<div class="shadow-button inline-block transition-transform hover:scale-105 active:scale-90" style="border-radius: ${this.dynamicRadius};">
|
|
155
159
|
<mw-spinning-border .color="${this.color}" .border="${"#f9fafb"}" .radius="${this.dynamicRadius}">
|
|
156
160
|
<!-- we want the transform transition on the root element so that both the transform transition and state switch transition are continuous and fluid -->
|
|
@@ -207,7 +211,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
207
211
|
</button>
|
|
208
212
|
</mw-spinning-border>
|
|
209
213
|
</div>
|
|
210
|
-
`);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
|
|
214
|
+
`);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 t=parseFloat(this.width),n=parseFloat(this.height),s=Math.min(t,n)*.55,a=s,u=s/1.65;return{width:a,height:u}}get dynamicRadius(){let t=parseFloat(this.width),n=parseFloat(this.height);return`${Math.min(t,n)*.265}px`}};w(_n,"properties",{state:{type:String},color:{type:String},bubbleStyle:{type:String},src:{type:String},width:{type:String},height:{type:String}}),w(_n,"styles",J`
|
|
211
215
|
.shadow-button {
|
|
212
216
|
box-shadow:
|
|
213
217
|
-58.9194px 74.8436px 38.218px rgba(0, 0, 0, 0.01),
|
|
@@ -215,7 +219,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
215
219
|
-14.3318px 19.109px 23.8863px rgba(0, 0, 0, 0.09),
|
|
216
220
|
-3.18483px 4.77725px 12.7393px rgba(0, 0, 0, 0.1);
|
|
217
221
|
}
|
|
218
|
-
`);customElements.get("mw-bubble")||customElements.define("mw-bubble",
|
|
222
|
+
`);customElements.get("mw-bubble")||customElements.define("mw-bubble",_n);var Iu={airplay:`<svg
|
|
219
223
|
xmlns="http://www.w3.org/2000/svg"
|
|
220
224
|
width="24"
|
|
221
225
|
height="24"
|
|
@@ -1142,26 +1146,26 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1142
1146
|
>
|
|
1143
1147
|
<rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
|
|
1144
1148
|
<path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
|
|
1145
|
-
</svg>`};var In=class In extends HTMLElement{constructor(){super();w(this,"name","");w(this,"fill","none");w(this,"stroke","currentColor");this.attachShadow({mode:"open"})}attributeChangedCallback(
|
|
1149
|
+
</svg>`};var In=class In extends HTMLElement{constructor(){super();w(this,"name","");w(this,"fill","none");w(this,"stroke","currentColor");this.attachShadow({mode:"open"})}attributeChangedCallback(t,n,i){if(n!==i&&In.observedAttributes.includes(t)){switch(t){case"name":this.name=i||"";break;case"fill":this.fill=i||"none";break;case"stroke":this.stroke=i||"currentColor";break}this.render()}}resolveIcon(t){throw new Error("Not implemented")}render(){let t=document.createElement("style");if(t.textContent=`
|
|
1146
1150
|
:host {
|
|
1147
1151
|
display: inline-block;
|
|
1148
1152
|
line-height: 0;
|
|
1149
1153
|
}
|
|
1150
|
-
`,this.shadowRoot){for(;this.shadowRoot.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild);this.shadowRoot.appendChild(
|
|
1154
|
+
`,this.shadowRoot){for(;this.shadowRoot.firstChild;)this.shadowRoot.removeChild(this.shadowRoot.firstChild);this.shadowRoot.appendChild(t)}if(!this.name)return;let n=this.resolveIcon(this.name);if(!n){console.warn(`'${this.name}' not found, please add it to ${In.name}`);return}let a=new DOMParser().parseFromString(n,"image/svg+xml").documentElement;a.setAttribute("fill",this.fill),a.setAttribute("stroke",this.stroke),a.style.width="100%",a.style.height="100%",this.shadowRoot?.appendChild(a)}};w(In,"observedAttributes",["name","fill","stroke"]);var is=In;var y1=Iu,Ma=class extends is{resolveIcon(e){return y1[e]}};customElements.get("lucide-icon")||customElements.define("lucide-icon",Ma);var An,Le,Mu,Au,v1,Tu,Lu,Mn=class Mn extends _($){constructor(){super();p(this,Le);p(this,An,new Date);this.color="#8B5CF6",this.disabled=!1,this.placeholder="Ask AI...",this.dark=!1,this._inputValue=""}render(){return h`
|
|
1151
1155
|
<mw-spinning-border
|
|
1152
1156
|
.size=${"420px"}
|
|
1153
1157
|
.color=${this.color||"#8B5CF6"}
|
|
1154
1158
|
.radius=${"24px"}
|
|
1155
1159
|
class="${this.dark?"dark":""} rounded-[24px] font-sans text-sm shadow-lg transition-transform duration-500 hover:scale-105">
|
|
1156
1160
|
<form
|
|
1157
|
-
@submit="${
|
|
1161
|
+
@submit="${m(this,Le,Au)}"
|
|
1158
1162
|
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">
|
|
1159
1163
|
<lucide-icon class="h-5 w-5 flex-none text-[${this.color||"#8B5CF6"}]" name="${"sparkles"}"></lucide-icon>
|
|
1160
1164
|
|
|
1161
1165
|
<input
|
|
1162
1166
|
?disabled="${this.disabled}"
|
|
1163
|
-
@keydown="${
|
|
1164
|
-
@input="${
|
|
1167
|
+
@keydown="${m(this,Le,Lu)}"
|
|
1168
|
+
@input="${m(this,Le,Mu)}"
|
|
1165
1169
|
.value="${this._inputValue}"
|
|
1166
1170
|
placeholder="${this.placeholder}"
|
|
1167
1171
|
autocomplete="off"
|
|
@@ -1179,7 +1183,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1179
1183
|
</button>
|
|
1180
1184
|
</form>
|
|
1181
1185
|
</mw-spinning-border>
|
|
1182
|
-
`}};
|
|
1186
|
+
`}};An=new WeakMap,Le=new WeakSet,Mu=function(t){let n=t.target;this._inputValue=n.value,this.dispatchEvent(new Mn.ChangeEvent({value:this._inputValue}))},Au=function(t){t.preventDefault();let n=new Date;if(n.getTime()-o(this,An).getTime()<500)return;g(this,An,n);let s=this._inputValue.trim();s&&this.dispatchEvent(new Mn.SubmitInputEvent({text:s}))&&(this._inputValue="")},v1=function(){return this.renderRoot.querySelector('input[name="input"]')??null},Tu=function(){return this.renderRoot.querySelector('button[type="submit"]')??null},Lu=function(t){b1(t)&&(t.preventDefault(),this.disabled||o(this,Le,Tu)?.click())},w(Mn,"properties",{color:{type:String},disabled:{type:Boolean},placeholder:{type:String},dark:{type:Boolean},_inputValue:{type:String,state:!0}});var At=Mn,Aa;At.SubmitInputEvent=(Aa=class extends CustomEvent{constructor(e,t={}){super(At.SubmitInputEvent.type,{detail:e,bubbles:!0,composed:!0,...t})}},w(Aa,"type","mw-floating-ask-ai:submit"),Aa);var Ta;At.ChangeEvent=(Ta=class extends CustomEvent{constructor(e,t={}){super(At.ChangeEvent.type,{detail:e,bubbles:!0,composed:!0,...t})}},w(Ta,"type","mw-floating-ask-ai:change"),Ta);function b1(r){return(r.code==="Enter"||r.code==="NumpadEnter")&&!r.ctrlKey&&!r.metaKey&&!r.shiftKey}customElements.get("mw-floating-ask-ai")||customElements.define("mw-floating-ask-ai",At);var ss={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},os=r=>(...e)=>({_$litDirective$:r,values:e}),br=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var{I:x1}=uc;var ju=()=>document.createComment(""),xr=(r,e,t)=>{let n=r._$AA.parentNode,i=e===void 0?r._$AB:e._$AA;if(t===void 0){let s=n.insertBefore(ju(),i),a=n.insertBefore(ju(),i);t=new x1(s,a,r,r.options)}else{let s=t._$AB.nextSibling,a=t._$AM,u=a!==r;if(u){let l;t._$AQ?.(r),t._$AM=r,t._$AP!==void 0&&(l=r._$AU)!==a._$AU&&t._$AP(l)}if(s!==i||u){let l=t._$AA;for(;l!==s;){let c=l.nextSibling;n.insertBefore(l,i),l=c}}}return t},rt=(r,e,t=r)=>(r._$AI(e,t),r),k1={},Du=(r,e=k1)=>r._$AH=e,Ou=r=>r._$AH,as=r=>{r._$AR(),r._$AA.remove()};var Uu=(r,e,t)=>{let n=new Map;for(let i=e;i<=t;i++)n.set(r[i],i);return n},_e=os(class extends br{constructor(r){if(super(r),r.type!==ss.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let n;t===void 0?t=e:e!==void 0&&(n=e);let i=[],s=[],a=0;for(let u of r)i[a]=n?n(u,a):a,s[a]=t(u,a),a++;return{values:s,keys:i}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,n]){let i=Ou(r),{values:s,keys:a}=this.dt(e,t,n);if(!Array.isArray(i))return this.ut=a,s;let u=this.ut??=[],l=[],c,d,f=0,y=i.length-1,x=0,S=s.length-1;for(;f<=y&&x<=S;)if(i[f]===null)f++;else if(i[y]===null)y--;else if(u[f]===a[x])l[x]=rt(i[f],s[x]),f++,x++;else if(u[y]===a[S])l[S]=rt(i[y],s[S]),y--,S--;else if(u[f]===a[S])l[S]=rt(i[f],s[S]),xr(r,l[S+1],i[f]),f++,S--;else if(u[y]===a[x])l[x]=rt(i[y],s[x]),xr(r,i[f],i[y]),y--,x++;else if(c===void 0&&(c=Uu(a,x,S),d=Uu(u,f,y)),c.has(u[f]))if(c.has(u[y])){let j=d.get(a[x]),k=j!==void 0?i[j]:null;if(k===null){let M=xr(r,i[f]);rt(M,s[x]),l[x]=M}else l[x]=rt(k,s[x]),xr(r,i[f],k),i[j]=null;x++}else as(i[y]),y--;else as(i[f]),f++;for(;x<=S;){let j=xr(r,l[S+1]);rt(j,s[x]),l[x++]=j}for(;f<=y;){let j=i[f++];j!==null&&as(j)}return this.ut=a,Du(r,l),Ae}});var ls,Pu,cs=class cs extends _($){constructor(){super();p(this,ls);this.examples={title:"",items:[]},this.color=""}render(){return!this.examples?.title&&!this.examples?.items?.length?null:h`
|
|
1183
1187
|
<div class="flex h-full w-full flex-1 flex-col overflow-y-auto px-4 pt-6 pb-2">
|
|
1184
1188
|
${this.examples.title?h`
|
|
1185
1189
|
<h2 class="mt-14 px-2 pt-9 pb-2 text-left text-3xl leading-tight font-bold tracking-tight">
|
|
@@ -1193,17 +1197,17 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1193
1197
|
`:null}
|
|
1194
1198
|
${this.examples?.items?.length?h`
|
|
1195
1199
|
<ul class="mt-auto flex flex-wrap justify-end gap-2.5 text-sm leading-6 text-black select-none">
|
|
1196
|
-
${_e(this.examples.items,
|
|
1200
|
+
${_e(this.examples.items,t=>t,t=>h`
|
|
1197
1201
|
<li
|
|
1198
1202
|
class="my-auto inline-block cursor-pointer rounded-2xl border-1 border-gray-300 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"
|
|
1199
|
-
@click="${()=>
|
|
1200
|
-
<span>${
|
|
1203
|
+
@click="${()=>m(this,ls,Pu).call(this,t)}">
|
|
1204
|
+
<span>${t.trim()}</span>
|
|
1201
1205
|
</li>
|
|
1202
1206
|
`)}
|
|
1203
1207
|
</ul>
|
|
1204
1208
|
`:null}
|
|
1205
1209
|
</div>
|
|
1206
|
-
`}};
|
|
1210
|
+
`}};ls=new WeakSet,Pu=function(t){this.dispatchEvent(new cs.ExampleClickEvent({example:t}))},w(cs,"properties",{examples:{type:Object},color:{type:String}});var Tn=cs,La;Tn.ExampleClickEvent=(La=class extends CustomEvent{constructor(e,t={}){super(Tn.ExampleClickEvent.type,{detail:e,...t})}},w(La,"type","mw:example-click"),La);customElements.get("mw-chat-background")||customElements.define("mw-chat-background",Tn);var Cr,Ru,Bu,kr=class kr extends _($){constructor(){super();p(this,Cr);this.content={logoUrl:"",title:"",color:""},this.showNewChat=!1,this.showClose=!1}render(){return h`
|
|
1207
1211
|
<div class="relative z-10 h-12">
|
|
1208
1212
|
<div class="gradient-blur absolute inset-x-0.5 mt-2 h-12"></div>
|
|
1209
1213
|
|
|
@@ -1226,7 +1230,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1226
1230
|
<div class="flex-grow"></div>
|
|
1227
1231
|
|
|
1228
1232
|
<!-- new chat btn -->
|
|
1229
|
-
<button @click=${
|
|
1233
|
+
<button @click=${m(this,Cr,Ru)} type="button" class="${this.showNewChat?"inline-flex":"hidden"} shrink-0">
|
|
1230
1234
|
<!-- svg icon of a bubble with a plus -->
|
|
1231
1235
|
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 37 36">
|
|
1232
1236
|
<path
|
|
@@ -1238,7 +1242,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1238
1242
|
</button>
|
|
1239
1243
|
|
|
1240
1244
|
<!-- close chat btn -->
|
|
1241
|
-
<button @click=${
|
|
1245
|
+
<button @click=${m(this,Cr,Bu)} class="${this.showClose?"inline-flex":"hidden"} shrink-0">
|
|
1242
1246
|
<!-- svg icon of an X -->
|
|
1243
1247
|
<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">
|
|
1244
1248
|
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
|
|
@@ -1253,7 +1257,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1253
1257
|
</div>
|
|
1254
1258
|
</div>
|
|
1255
1259
|
</div>
|
|
1256
|
-
`}};
|
|
1260
|
+
`}};Cr=new WeakSet,Ru=function(){this.dispatchEvent(new kr.NewChatClickEvent)},Bu=function(){this.dispatchEvent(new kr.CloseClickEvent)},w(kr,"properties",{content:{type:Object},showNewChat:{type:Boolean,attribute:"show-new-chat"},showClose:{type:Boolean,attribute:"show-close"}}),w(kr,"styles",J`
|
|
1257
1261
|
/* blurred background */
|
|
1258
1262
|
|
|
1259
1263
|
.gradient-blur {
|
|
@@ -1265,22 +1269,22 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1265
1269
|
/* bg-color gradient */
|
|
1266
1270
|
background-image: linear-gradient(to bottom, white 20%, transparent);
|
|
1267
1271
|
}
|
|
1268
|
-
`);var
|
|
1272
|
+
`);var Tt=kr,ja;Tt.NewChatClickEvent=(ja=class extends CustomEvent{constructor(e={}){super(Tt.NewChatClickEvent.type,{...e})}},w(ja,"type","mw:new-chat-click"),ja);var Da;Tt.CloseClickEvent=(Da=class extends CustomEvent{constructor(e={}){super(Tt.CloseClickEvent.type,{...e})}},w(Da,"type","mw:close-click"),Da);customElements.get("mw-chat-header")||customElements.define("mw-chat-header",Tt);var Hu=Qd(Nu(),1);var Re=Object.freeze({PENDING:"pending",READY:"ready",ERROR:"error"}),N,P,ae,Sr,Er,me,O,Ra,Ba,zu,fs,jn,Dn,On,Un,Wu,ds,nt,Ln,qa,Gu,Zu,Ju,ps=class{constructor(e,t){p(this,O);p(this,N);p(this,P);p(this,ae,null);p(this,Sr,!1);p(this,Er,null);p(this,me,[]);p(this,fs,e=>{let t=e.target,n=Array.from(t.files||[]);o(this,P).isConnected()||o(this,P).onConnect?.(),m(this,O,qa).call(this,n),t.value=""});p(this,jn,e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")});p(this,Dn,e=>{e.preventDefault(),e.dataTransfer&&m(this,O,Wu).call(this,e.dataTransfer)&&m(this,O,ds).call(this,!0)});p(this,On,e=>{e.preventDefault();let t=e.relatedTarget;o(this,N).contains(t)||m(this,O,ds).call(this,!1)});p(this,Un,e=>{if(e.preventDefault(),m(this,O,ds).call(this,!1),e.dataTransfer){let t=Array.from(e.dataTransfer.files||[]);m(this,O,qa).call(this,t)}});w(this,"openImagePicker",()=>{if(!o(this,P).enabled||!o(this,P).widgetId){console.warn("Image uploads are disabled");return}o(this,ae)&&o(this,ae).click()});w(this,"onImageDelete",e=>{o(this,P).onImageDelete&&o(this,P).onImageDelete(e),g(this,me,o(this,me).filter(t=>t.id!==e)),m(this,O,Ln).call(this),o(this,N).requestUpdate()});g(this,N,e),g(this,P,{acceptedTypes:["image/jpeg","image/png","image/gif","image/webp","image/svg+xml","image/heic"],maxFileSize:10*1024*1024,maxFiles:3,onError:()=>{},enabled:!0,isConnected:()=>!1,onConnect:()=>{},...t}),e.addController(this),m(this,O,zu).call(this)}hostConnected(){m(this,O,Ra).call(this)}hostDisconnected(){m(this,O,Ba).call(this),o(this,ae)&&o(this,ae).parentNode&&o(this,ae).parentNode.removeChild(o(this,ae))}get isDragging(){return o(this,Sr)}get error(){return o(this,Er)}get selectedImages(){return o(this,me)}get hasPendingImages(){return o(this,me).some(e=>e.processingState===Re.PENDING)}clearError(){m(this,O,Ln).call(this)}updateUploadOptions(e){let t=o(this,P).isConnected();e.conversationId!==void 0&&(o(this,P).conversationId=e.conversationId),e.widgetId!==void 0&&(o(this,P).widgetId=e.widgetId),e.enabled!==void 0&&(o(this,P).enabled=!!e.enabled),e.isConnected!==void 0&&(o(this,P).isConnected=e.isConnected),e.onConnect!==void 0&&(o(this,P).onConnect=e.onConnect),!o(this,P).enabled||!o(this,P).isConnected()?m(this,O,Ba).call(this):!t&&o(this,P).isConnected()&&m(this,O,Ra).call(this)}restoreImages(e){if(!Array.isArray(e)||e.length===0){g(this,me,[]),o(this,N).requestUpdate();return}let t=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,processingState:Re.READY,imageUrl:n.url}});g(this,me,t),o(this,N).requestUpdate()}clearImages(){g(this,me,[]),this.clearError(),o(this,N).requestUpdate()}};N=new WeakMap,P=new WeakMap,ae=new WeakMap,Sr=new WeakMap,Er=new WeakMap,me=new WeakMap,O=new WeakSet,Ra=function(){o(this,P).enabled&&o(this,P).isConnected()&&(o(this,N).addEventListener("dragover",o(this,jn)),o(this,N).addEventListener("dragenter",o(this,Dn)),o(this,N).addEventListener("dragleave",o(this,On)),o(this,N).addEventListener("drop",o(this,Un)))},Ba=function(){o(this,N).removeEventListener("dragover",o(this,jn)),o(this,N).removeEventListener("dragenter",o(this,Dn)),o(this,N).removeEventListener("dragleave",o(this,On)),o(this,N).removeEventListener("drop",o(this,Un))},zu=function(){g(this,ae,document.createElement("input")),o(this,ae).type="file",o(this,ae).accept=o(this,P).acceptedTypes.join(","),o(this,ae).multiple=o(this,P).maxFiles>1,o(this,ae).style.display="none",o(this,ae).addEventListener("change",o(this,fs)),document.body.appendChild(o(this,ae))},fs=new WeakMap,jn=new WeakMap,Dn=new WeakMap,On=new WeakMap,Un=new WeakMap,Wu=function(e){return e.types&&e.types.includes("Files")},ds=function(e){o(this,Sr)!==e&&(g(this,Sr,e),o(this,N).requestUpdate())},nt=function(e){g(this,Er,e),o(this,P).onError(e),o(this,N).requestUpdate(),setTimeout(()=>{m(this,O,Ln).call(this)},6e3)},Ln=function(){g(this,Er,null),o(this,N).requestUpdate()},qa=async function(e){if(e.length===0)return;m(this,O,Ln).call(this);let t=e.filter(a=>m(this,O,Gu).call(this,a));if(t.length===0)return;let n=o(this,me).length,i=o(this,P).maxFiles??1/0,s=t.length;if(n+s>i){m(this,O,nt).call(this,`You can upload a maximum of ${i} files`);return}try{let u=(await Promise.all(t.map(l=>m(this,O,Zu).call(this,l)))).filter(l=>!o(this,me).some(c=>c.dataUrl===l.dataUrl));g(this,me,[...o(this,me),...u]),o(this,N).requestUpdate(),await Go({times:5,delay:2e3},async()=>{if(o(this,P).isConnected())await Wo(3,u,async l=>{await m(this,O,Ju).call(this,l)});else throw new Error("Not connected yet")}),o(this,N).requestUpdate()}catch(a){console.error("Failed to process and upload images:",a),m(this,O,nt).call(this,"Upload failed")}},Gu=function(e){return o(this,P).acceptedTypes.includes(e.type)?e.size>o(this,P).maxFileSize?(m(this,O,nt).call(this,`Max file size: ${o(this,P).maxFileSize/(1024*1024)}MB`),!1):!0:(m(this,O,nt).call(this,"Invalid file type"),!1)},Zu=async function(e){try{let t=await(0,Hu.fileToBase64)(e);return{id:crypto.randomUUID(),name:e.name,type:e.type,size:e.size,dataUrl:t,file:e,processingState:Re.PENDING}}catch(t){let n=t instanceof Error?t:new Error(String(t));throw new Error(`Failed to read file: ${e.name} - ${n.message}`)}},Ju=async function(e){if(!e){console.error("No image provided to upload"),m(this,O,nt).call(this,"No image provided");return}if(!o(this,P)?.uploadUrl){console.error("Missing uploadUrl in options"),m(this,O,nt).call(this,"Upload URL not configured");return}e.processingState=Re.PENDING,o(this,N).requestUpdate();let t=new FormData;t.append("file",e.file),t.append("imageId",e.id),o(this,P).conversationId&&t.append("conversationId",o(this,P).conversationId),o(this,P).widgetId&&t.append("widgetId",o(this,P).widgetId);try{let n=await fetch(o(this,P).uploadUrl,{method:"POST",body:t});if(!n.ok)throw new Error(`Upload failed with status: ${n.status}`);let i=await n.json();if(!!!i?.success){let a=i?.error||"Upload failed";throw new Error(a)}i.imageUrl&&i.imageId?(e.imageUrl=i.imageUrl,e.id=i.imageId,e.processingState=Re.READY):e.processingState=Re.PENDING,o(this,N).requestUpdate()}catch(n){let i=n instanceof Error?n:new Error(String(n));console.error("Upload error:",i.message),m(this,O,nt).call(this,i.message),e.processingState=Re.ERROR,o(this,N).requestUpdate()}};var Va={maxHeight:120,initialHeight:32,paddingY:12},Pn,Q,_r,Ku,Yu,Xu,Qu,ms,Ot=class Ot extends _($){constructor(){super();p(this,Q);p(this,Pn,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 o(this,Q,_r)?.value?.trim()??""}render(){return h`
|
|
1269
1273
|
<div
|
|
1270
1274
|
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}]">
|
|
1271
1275
|
<!-- Image preview area -->
|
|
1272
1276
|
${this.enableImageUpload&&this.images&&this.images.length>0?h`
|
|
1273
1277
|
<div class="mb-2 flex flex-wrap gap-2 rounded-t-[18px] bg-white p-2">
|
|
1274
|
-
${this.images.map(
|
|
1278
|
+
${this.images.map(t=>h`
|
|
1275
1279
|
<div class="relative inline-block">
|
|
1276
|
-
<img src="${
|
|
1280
|
+
<img src="${t.dataUrl}" alt="${t.name}" class="h-[60px] w-[60px] rounded-xl object-cover" />
|
|
1277
1281
|
|
|
1278
1282
|
<!-- Progress/Status overlay -->
|
|
1279
|
-
${
|
|
1283
|
+
${t.processingState===Re.PENDING?h`
|
|
1280
1284
|
<div class="absolute inset-0 flex items-center justify-center rounded-xl bg-black/40">
|
|
1281
1285
|
<lucide-icon name="loader-circle" class="inline-flex animate-spin text-white transition-all duration-1000"></lucide-icon>
|
|
1282
1286
|
</div>
|
|
1283
|
-
`:
|
|
1287
|
+
`:t.processingState===Re.ERROR?h`
|
|
1284
1288
|
<div class="absolute inset-0 flex items-center justify-center rounded-xl bg-red-500/60">
|
|
1285
1289
|
<lucide-icon name="badge-alert" class="h-6 w-6 text-white"></lucide-icon>
|
|
1286
1290
|
</div>
|
|
@@ -1290,7 +1294,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1290
1294
|
<button
|
|
1291
1295
|
data-testid="image-delete-btn"
|
|
1292
1296
|
type="button"
|
|
1293
|
-
@click="${()=>this.onImageDelete?.(
|
|
1297
|
+
@click="${()=>this.onImageDelete?.(t.id)}"
|
|
1294
1298
|
class="absolute -top-1 -right-1 flex h-5 w-5 items-center justify-center rounded-full bg-[#eeedf1] text-white hover:bg-[#eeedf195]">
|
|
1295
1299
|
<lucide-icon name="x" class="h-3 w-3 text-[#14161a]"></lucide-icon>
|
|
1296
1300
|
</button>
|
|
@@ -1300,7 +1304,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1300
1304
|
`:null}
|
|
1301
1305
|
|
|
1302
1306
|
<!-- Input form -->
|
|
1303
|
-
<form @submit="${
|
|
1307
|
+
<form @submit="${m(this,Q,Xu)}" class="flex w-full items-center">
|
|
1304
1308
|
${this.enableImageUpload?h`
|
|
1305
1309
|
<button
|
|
1306
1310
|
data-testid="image-upload-btn"
|
|
@@ -1315,12 +1319,12 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1315
1319
|
<textarea
|
|
1316
1320
|
data-testid="mw-chat-input-textarea"
|
|
1317
1321
|
name="input"
|
|
1318
|
-
@input="${
|
|
1319
|
-
@keydown="${
|
|
1322
|
+
@input="${m(this,Q,Qu)}"
|
|
1323
|
+
@keydown="${m(this,Q,Yu)}"
|
|
1320
1324
|
autofocus
|
|
1321
1325
|
?disabled="${this.disabled}"
|
|
1322
1326
|
placeholder="${this.placeholder}"
|
|
1323
|
-
class="${this.enableImageUpload?"px-1":"pl-3 pr-1"} box-content h-[${
|
|
1327
|
+
class="${this.enableImageUpload?"px-1":"pl-3 pr-1"} box-content h-[${Va.initialHeight}px] w-full resize-none place-content-center rounded bg-white py-[${Va.paddingY}px] text-base text-gray-800 outline-none placeholder:text-[14px] placeholder:font-light disabled:place-content-baseline"></textarea>
|
|
1324
1328
|
|
|
1325
1329
|
<button
|
|
1326
1330
|
type="submit"
|
|
@@ -1338,11 +1342,11 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1338
1342
|
<slot>
|
|
1339
1343
|
<div class="h-5 w-full"></div>
|
|
1340
1344
|
</slot>
|
|
1341
|
-
`}setValue(
|
|
1345
|
+
`}setValue(t){let n=o(this,Q,_r);if(!n){console.warn("input element not found, cannot set value");return}n.value=t,m(this,Q,ms).call(this),this.dispatchEvent(new Ot.ChangeEvent({delta:null,full:t}))}focus(){o(this,Q,_r)?.focus()}};Pn=new WeakMap,Q=new WeakSet,_r=function(){return this.renderRoot.querySelector('textarea[name="input"]')??null},Ku=function(){return this.renderRoot.querySelector('button[type="submit"]')??null},Yu=function(t){P1(t)&&(t.preventDefault(),!this.streaming&&!this.disabled&&!this.loading&&o(this,Q,Ku)?.click())},Xu=function(t){t.preventDefault();let n=new Date;if(n.getTime()-o(this,Pn).getTime()<500)return;if(g(this,Pn,n),this.streaming){this.dispatchEvent(new Ot.CancelEvent);return}let s=o(this,Q,_r);if(!s)throw new Error("Expected input element to be present");let a=s.value.trim();(a||this.enableImageUpload&&this.images.length>0)&&this.dispatchEvent(new Ot.SubmitEvent(a))&&(s.value=""),m(this,Q,ms).call(this),window.requestAnimationFrame(()=>{this.focus()})},Qu=function(t){this.dispatchEvent(new Ot.ChangeEvent({delta:t.data,full:t.target instanceof HTMLTextAreaElement?t.target.value:""})),m(this,Q,ms).call(this)},ms=function(){let t=o(this,Q,_r);if(!t)return;let{maxHeight:n,initialHeight:i,paddingY:s}=Va;t.style.height=`${i}px`;let a=t.scrollHeight,u=s*2,l=Math.min(a-u,n);t.style.height=`${l}px`,this.requestUpdate()},w(Ot,"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 We=Ot,Fa;We.ChangeEvent=(Fa=class extends CustomEvent{constructor(e,t={}){super(We.ChangeEvent.type,{detail:e,...t})}},w(Fa,"type","mw:change"),Fa);var Na;We.SubmitEvent=(Na=class extends CustomEvent{constructor(e,t={}){super(We.SubmitEvent.type,{detail:e,...t,cancelable:!0})}},w(Na,"type","mw:submit"),Na);var Ha;We.CancelEvent=(Ha=class extends CustomEvent{constructor(e={}){super(We.CancelEvent.type,{...e})}},w(Ha,"type","mw:cancel"),Ha);function P1(r){return(r.code==="Enter"||r.code==="NumpadEnter")&&!r.ctrlKey&&!r.metaKey&&!r.shiftKey}customElements.get("mw-chat-input")||customElements.define("mw-chat-input",We);var gs=class extends _($){constructor(){super(),this.side="assistant",this.status="",this.color="",this.logoUrl="",this.position="single"}render(){let t=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 h`
|
|
1342
1346
|
<div class="ml-20 flex justify-end font-sans text-base">
|
|
1343
1347
|
<div class="max-w-full">
|
|
1344
1348
|
<!-- include an invisible border (same color as background) so that this message is the same height as the bot message -->
|
|
1345
|
-
<div class="${
|
|
1349
|
+
<div class="${t} border border-[${this.color}] bg-[${this.color}] px-4 py-3 text-left text-white">
|
|
1346
1350
|
<slot></slot>
|
|
1347
1351
|
</div>
|
|
1348
1352
|
|
|
@@ -1369,18 +1373,18 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1369
1373
|
min-h-[50px] because when we start streaming we sometimes start with an empty paragraph
|
|
1370
1374
|
-->
|
|
1371
1375
|
<!-- TODO: maybe add back border? border border-gray-100 -->
|
|
1372
|
-
<div class="${
|
|
1376
|
+
<div class="${t} min-h-[50px] max-w-full overflow-hidden bg-gray-50 px-4 py-3 text-left text-gray-800">
|
|
1373
1377
|
<slot></slot>
|
|
1374
1378
|
</div>
|
|
1375
1379
|
</div>
|
|
1376
1380
|
</div>
|
|
1377
|
-
`;default:throw new Error(`Unknown side: ${this.side}`)}}};w(
|
|
1378
|
-
<div class="${o(this,
|
|
1379
|
-
<div class="${o(this,
|
|
1381
|
+
`;default:throw new Error(`Unknown side: ${this.side}`)}}};w(gs,"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",gs);var Ut,Ir,Mr,it,st,eh,th,rh,ws,ys,vs,Rn,bs,Be=class extends _($){constructor(){super();p(this,st);p(this,Ut,!1);p(this,Ir,!1);p(this,Mr,!1);p(this,it,!1);p(this,ws,t=>{console.error("Failed to load chat image:",this.src),g(this,Ir,!0),this.requestUpdate(),this.dispatchEvent(new CustomEvent("mw-chat-image:error",{detail:{src:this.src,event:t},bubbles:!0}))});p(this,ys,t=>{g(this,Ut,!0),this.requestUpdate(),this.dispatchEvent(new CustomEvent("mw-chat-image:load",{detail:{src:this.src,event:t},bubbles:!0}))});p(this,vs,t=>{this.clickable&&(t.preventDefault(),t.stopPropagation(),g(this,Mr,!0),this.requestUpdate(),g(this,it,!0),this.requestUpdate(),setTimeout(()=>{g(this,it,!1),this.requestUpdate()},500),this.dispatchEvent(new CustomEvent("mw-chat-image:click",{detail:{src:this.src,event:t},bubbles:!0})))});p(this,Rn,t=>{t.preventDefault(),t.stopPropagation(),g(this,Mr,!1),this.requestUpdate()});p(this,bs,t=>{t.preventDefault(),t.stopPropagation()});this.src="",this.alt="",this.side="right",this.position="single",this.width="300px",this.height="auto",this.clickable=!1}updated(t){t.has("src")&&(g(this,Ut,!1),g(this,Ir,!1))}render(){return this.src?h`
|
|
1382
|
+
<div class="${o(this,st,eh)} mb-2 min-h-[100px]">
|
|
1383
|
+
<div class="${o(this,st,th)} relative">
|
|
1380
1384
|
<!-- Placeholder background that's only shown when loading or error -->
|
|
1381
|
-
${o(this,
|
|
1385
|
+
${o(this,Ut)?null:h`
|
|
1382
1386
|
<div class="flex items-center justify-center bg-gray-100" style="width: ${this.width}; height: 200px;">
|
|
1383
|
-
${o(this,
|
|
1387
|
+
${o(this,Ir)?h`
|
|
1384
1388
|
<!-- Error icon -->
|
|
1385
1389
|
<svg class="h-8 w-8 text-gray-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1386
1390
|
<path
|
|
@@ -1400,24 +1404,24 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1400
1404
|
src="${this.src}"
|
|
1401
1405
|
alt="${this.alt}"
|
|
1402
1406
|
style="width: ${this.width}; height: ${this.height}; display: block;"
|
|
1403
|
-
class="${o(this,
|
|
1404
|
-
@error="${o(this,
|
|
1405
|
-
@load="${o(this,
|
|
1407
|
+
class="${o(this,Ut)?"opacity-100":"opacity-0 hidden"} ${this.clickable?"cursor-pointer hover:scale-[105%]":""} h-full w-full max-w-full transition-all duration-200"
|
|
1408
|
+
@error="${o(this,ws)}"
|
|
1409
|
+
@load="${o(this,ys)}"
|
|
1406
1410
|
@click="${this.clickable?o(this,vs):void 0}"
|
|
1407
1411
|
loading="lazy" />
|
|
1408
1412
|
</div>
|
|
1409
1413
|
</div>
|
|
1410
1414
|
|
|
1411
1415
|
<!-- Full image modal -->
|
|
1412
|
-
${o(this,
|
|
1416
|
+
${o(this,Mr)?h`
|
|
1413
1417
|
<div
|
|
1414
|
-
class="${o(this,
|
|
1415
|
-
@click="${o(this,
|
|
1418
|
+
class="${o(this,it)?"bg-opacity-0":"bg-opacity-75"} fixed inset-0 z-50 flex items-center justify-center bg-black p-4 transition-opacity duration-300"
|
|
1419
|
+
@click="${o(this,Rn)}">
|
|
1416
1420
|
<!-- Close button -->
|
|
1417
1421
|
<button
|
|
1418
1422
|
type="button"
|
|
1419
|
-
class="bg-opacity-50 ${o(this,
|
|
1420
|
-
@click="${o(this,
|
|
1423
|
+
class="bg-opacity-50 ${o(this,it)?"opacity-0":"opacity-75"} hover:bg-opacity-75 absolute top-8 right-8 z-10 rounded-full bg-black p-2 text-white transition-[colors,opacity] delay-300 focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-transparent focus:outline-none"
|
|
1424
|
+
@click="${o(this,Rn)}"
|
|
1421
1425
|
aria-label="Close full image">
|
|
1422
1426
|
<!-- X mark icon -->
|
|
1423
1427
|
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
@@ -1426,17 +1430,17 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1426
1430
|
</button>
|
|
1427
1431
|
<div class="relative max-h-full max-w-full">
|
|
1428
1432
|
<img
|
|
1429
|
-
src="${
|
|
1433
|
+
src="${m(this,st,rh).call(this)}"
|
|
1430
1434
|
alt="${this.alt}"
|
|
1431
|
-
class="${o(this,
|
|
1432
|
-
@click="${o(this,
|
|
1435
|
+
class="${o(this,it)?"scale-75 opacity-0":"scale-100 opacity-100"} max-h-full max-w-full transform rounded-lg shadow-2xl transition-all duration-100 ease-out"
|
|
1436
|
+
@click="${o(this,bs)}" />
|
|
1433
1437
|
</div>
|
|
1434
1438
|
</div>
|
|
1435
1439
|
`:null}
|
|
1436
|
-
`:(console.warn("MwChatImage: No src provided"),null)}};
|
|
1440
|
+
`:(console.warn("MwChatImage: No src provided"),null)}};Ut=new WeakMap,Ir=new WeakMap,Mr=new WeakMap,it=new WeakMap,st=new WeakSet,eh=function(){return this.side==="left"||this.side==="assistant"?"flex justify-start ml-[25px]":"flex justify-end"},th=function(){let t="inline-block overflow-hidden shadow-sm";if(this.side==="right"||this.side==="user")switch(this.position){case"first":t+=" rounded-2xl rounded-br-[4px]";break;case"middle":t+=" rounded-2xl rounded-r-[4px]";break;case"last":case"last-current":t+=" rounded-2xl rounded-tr-[4px]";break;default:t+=" rounded-2xl";break}else switch(this.position){case"first":t+=" rounded-2xl rounded-bl-[4px]";break;case"middle":t+=" rounded-2xl rounded-l-[4px]";break;case"last":case"last-current":t+=" rounded-2xl rounded-tl-[4px]";break;default:t+=" rounded-2xl";break}return t},rh=function(){if(!this.src)return"";try{let t=new URL(this.src);return t.searchParams.set("for","full"),t.href}catch{return this.src}},ws=new WeakMap,ys=new WeakMap,vs=new WeakMap,Rn=new WeakMap,bs=new WeakMap,w(Be,"properties",{src:{type:String},alt:{type:String},side:{type:String},position:{type:String},width:{type:String},height:{type:String},clickable:{type:Boolean}});var za;Be.ErrorEvent=(za=class extends CustomEvent{constructor(e,t={}){super(Be.ErrorEvent.type,{detail:e,...t})}},w(za,"type","mw-chat-image:error"),za);var Wa;Be.LoadEvent=(Wa=class extends CustomEvent{constructor(e,t={}){super(Be.LoadEvent.type,{detail:e,...t})}},w(Wa,"type","mw-chat-image:load"),Wa);var Ga;Be.ClickEvent=(Ga=class extends CustomEvent{constructor(e,t={}){super(Be.ClickEvent.type,{detail:e,...t})}},w(Ga,"type","mw-chat-image:click"),Ga);customElements.get("mw-chat-image")||customElements.define("mw-chat-image",Be);var ue=r=>r??W;var R1=["javascript:","data:text/html","vbscript:","data:text/javascript","data:text/vbscript","data:text/css","data:text/plain","data:text/xml"],Ge,Ja,nh,xs,ih,ks,Cs=class Cs extends _($){constructor(){super();p(this,Ge);p(this,xs,t=>{t.preventDefault(),this._dismissed=!0,this.storageKey&&m(this,Ge,nh).call(this),this.dispatchEvent(new Cs.DismissEvent)});p(this,ks,t=>{t.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(t){super.updated(t),t.has("storageKey")&&this.storageKey&&this.dismissible&&(this._dismissed=m(this,Ge,Ja).call(this))}connectedCallback(){super.connectedCallback(),this.storageKey&&this.dismissible&&(this._dismissed=m(this,Ge,Ja).call(this))}render(){if(this._dismissed)return null;let t=m(this,Ge,ih).call(this,this.text);return h`
|
|
1437
1441
|
<div class="flex items-center justify-between">
|
|
1438
1442
|
<div class="flex flex-1 items-center justify-center">
|
|
1439
|
-
<span class="text-xs text-gray-
|
|
1443
|
+
<span class="px-3 text-center text-xs font-light text-gray-500">${t}</span>
|
|
1440
1444
|
</div>
|
|
1441
1445
|
|
|
1442
1446
|
${this.dismissible?h`
|
|
@@ -1445,12 +1449,12 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1445
1449
|
</button>
|
|
1446
1450
|
`:null}
|
|
1447
1451
|
</div>
|
|
1448
|
-
`}};Ge=new WeakSet,Ja=function(){try{return localStorage.getItem(this.storageKey)==="true"}catch{return!1}},
|
|
1452
|
+
`}};Ge=new WeakSet,Ja=function(){try{return localStorage.getItem(this.storageKey)==="true"}catch{return!1}},nh=function(){try{localStorage.setItem(this.storageKey,"true")}catch(t){console.warn("Could not save disclaimer dismissed state to localStorage:",t)}},xs=new WeakMap,ih=function(t){let i=/\[([^\]]+)\]\(([^)]+)\)/g.exec(t);if(i){let s=i[0],a=i[1],u=i[2],l=i.index;return R1.some(c=>u.toLowerCase().startsWith(c))||!u||!a?t:h`${t.slice(0,l)}<a href="${ue(u)}" target="_blank" rel="noopener noreferrer" @click="${o(this,ks)}" class="underline" style="color: ${this.color}"
|
|
1449
1453
|
>${a}</a
|
|
1450
|
-
>${
|
|
1454
|
+
>${t.slice(l+s.length)}`}return t},ks=new WeakMap,w(Cs,"properties",{text:{type:String},color:{type:String},dismissible:{type:Boolean},storageKey:{type:String,attribute:"storage-key"},_dismissed:{type:Boolean,state:!0}});var Bn=Cs,Za;Bn.DismissEvent=(Za=class extends CustomEvent{constructor(e={}){super(Bn.DismissEvent.type,{...e})}},w(Za,"type","mw-disclaimer:dismiss"),Za);customElements.get("mw-disclaimer")||customElements.define("mw-disclaimer",Bn);var Ar,sh,oh,$s=class extends _($){constructor(){super();p(this,Ar);this.text="I'm still learning!",this.variant="info",this.autoDismissable=!1,this.dismissDelay=5e3,this._isVisible=!0}connectedCallback(){super.connectedCallback(),this.autoDismissable&&m(this,Ar,sh).call(this)}render(){let t=m(this,Ar,oh).call(this);return h`
|
|
1451
1455
|
<div
|
|
1452
1456
|
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">
|
|
1453
|
-
<div class="${
|
|
1457
|
+
<div class="${t.bg} mb-2 flex max-w-[70%] items-center justify-center rounded-full px-3 py-2 select-none">
|
|
1454
1458
|
<!-- Icon based on variant -->
|
|
1455
1459
|
${this.variant==="info"?h`
|
|
1456
1460
|
<!-- (i) symbol for info -->
|
|
@@ -1483,10 +1487,10 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1483
1487
|
</svg>
|
|
1484
1488
|
`}
|
|
1485
1489
|
|
|
1486
|
-
<span class="${
|
|
1490
|
+
<span class="${t.text} ml-1 text-xs">${this.text}</span>
|
|
1487
1491
|
</div>
|
|
1488
1492
|
</div>
|
|
1489
|
-
`}};
|
|
1493
|
+
`}};Ar=new WeakSet,sh=function(){setTimeout(()=>{this._isVisible=!1,this.requestUpdate()},this.dismissDelay)},oh=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($s,"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",$s);var Ka=class extends _($){constructor(){super(...arguments);w(this,"render",()=>h`
|
|
1490
1494
|
<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">
|
|
1491
1495
|
<circle fill="currentFill" stroke="none" cx="27" cy="50" r="6">
|
|
1492
1496
|
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.1" />
|
|
@@ -1498,11 +1502,11 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1498
1502
|
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.3" />
|
|
1499
1503
|
</circle>
|
|
1500
1504
|
</svg>
|
|
1501
|
-
`)}};customElements.get("mw-loading")||customElements.define("mw-loading",Ka);var
|
|
1505
|
+
`)}};customElements.get("mw-loading")||customElements.define("mw-loading",Ka);var B1="https://molin.ai/?utm_source=molin-shop-ai&utm_medium=widget&utm_campaign=poweredby",Ya=class extends _($){constructor(){super(...arguments);w(this,"render",()=>h`
|
|
1502
1506
|
<p class="flex items-center justify-center text-xs whitespace-nowrap">
|
|
1503
1507
|
<span>Powered by</span>
|
|
1504
1508
|
|
|
1505
|
-
<a href="${
|
|
1509
|
+
<a href="${B1}" target="_blank" class="inline-flex items-center underline">
|
|
1506
1510
|
<svg class="mx-1 inline-block h-4 w-4" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1507
1511
|
<circle cx="10.0361" cy="10.0361" r="10.0361" fill="#242038" />
|
|
1508
1512
|
<path
|
|
@@ -1521,17 +1525,39 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1521
1525
|
<span>Molin AI</span>
|
|
1522
1526
|
</a>
|
|
1523
1527
|
</p>
|
|
1524
|
-
`)}};customElements.get("mw-powered-by")||customElements.define("mw-powered-by",Ya);var
|
|
1528
|
+
`)}};customElements.get("mw-powered-by")||customElements.define("mw-powered-by",Ya);var q1=Math.pow(10,8)*24*60*60*1e3,F5=-q1;var V1=3600;var ah=V1*24,N5=ah*7,F1=ah*365.2425,N1=F1/12,H5=N1*3,Xa=Symbol.for("constructDateFrom");function lh(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&Xa in r?r[Xa](e):r instanceof Date?new r.constructor(e):new Date(e)}function Qa(r,e){return lh(e||r,r)}function ch(r){return e=>{let n=(r?Math[r]:Math.trunc)(e);return n===0?0:n}}function uh(r,e){return+Qa(r)-+Qa(e)}function el(r,e,t){let n=uh(r,e)/1e3;return ch(t?.roundingMethod)(n)}var Pt,Rt,tl,Ss,Vn,hh,qn=class extends _($){constructor(){super();p(this,Rt);p(this,Pt,7);p(this,Ss,async t=>{this._loadingAnswer=t,this._questionHistory.push({question:this._currentQuestion,answer:t}),this._currentAttemptQuestionCount++,this.dispatchEvent(new CustomEvent("mw-chat-wait-game:question-answered",{bubbles:!0,composed:!0,detail:{questionIndex:this._questionHistory.length-1,question:this._currentQuestion,answer:t,totalQuestions:o(this,Pt),allAnswers:this._questionHistory.map(i=>i.answer)}}));let n=await m(this,Rt,tl).call(this);n&&(n.isComplete&&n.guessedJob?(this._guessedJob=n.guessedJob,this.dispatchEvent(new CustomEvent("mw-chat-wait-game:game-completed",{bubbles:!0,composed:!0,detail:{guessedProfession:this._guessedJob,questionCount:this._questionHistory.length,allAnswers:this._questionHistory.map(i=>i.answer)}}))):n.nextQuestion&&(this._currentQuestion=n.nextQuestion)),this._loadingAnswer=""});p(this,Vn,async t=>{if(this._validatingButton=t?"correct":"wrong",this.dispatchEvent(new CustomEvent("mw-chat-wait-game:guess-validated",{bubbles:!0,composed:!0,detail:{guessedProfession:this._guessedJob,isCorrect:t,questionCount:this._questionHistory.length,allAnswers:this._questionHistory.map(n=>n.answer)}})),t)this._guessValidated=!0,this._validatingButton="";else{let n=await m(this,Rt,tl).call(this);n?.nextQuestion&&(this._currentQuestion=n.nextQuestion),this._guessedJob="",this._currentAttemptQuestionCount=0,this._validatingButton=""}});this.question="",this.options=["No","Yes"],this.heading="",this.gameTitle="",this.resultPrefix="",this.correctButtonText="Correct",this.wrongButtonText="Wrong",this.color="#601feb",this.apiBaseUrl="",this.minutes="00",this.seconds="00",this._questionHistory=[],this._currentQuestion="",this._guessedJob="",this._isLoadingNextQuestion=!1,this._loadingAnswer="",this._guessValidated=!1,this._validatingButton="",this._currentAttemptQuestionCount=0}connectedCallback(){super.connectedCallback(),this._currentQuestion=this.question}render(){let t=m(this,Rt,hh).call(this),n=this.heading||"Agent joining in",i=this.gameTitle||"\u{1F9E0} I'll guess your job",s=this.resultPrefix||"I'm pretty confident:";return this._guessedJob?h`
|
|
1525
1529
|
<div class="mx-auto w-full max-w-xs rounded-2xl bg-white/70 p-4 shadow-sm ring-1 ring-black/10 backdrop-blur">
|
|
1526
1530
|
<div class="flex items-center justify-between">
|
|
1527
1531
|
<div class="text-[13px] text-black/60">${n}</div>
|
|
1528
1532
|
<span class="h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"></span>
|
|
1529
1533
|
</div>
|
|
1530
1534
|
|
|
1535
|
+
<!-- Timer -->
|
|
1536
|
+
<div class="mt-2 font-[ui-monospace,Menlo,Monaco,Consolas] text-2xl tracking-tight text-black tabular-nums" aria-live="polite">
|
|
1537
|
+
${this.minutes}<span class="text-black/30">:</span>${this.seconds}
|
|
1538
|
+
</div>
|
|
1539
|
+
|
|
1531
1540
|
<div class="mt-3 space-y-1.5 text-[13px] text-black/80">
|
|
1532
1541
|
<div class="rounded-xl bg-black/[0.04] px-3 py-2">${s} ${this._guessedJob}.</div>
|
|
1533
1542
|
</div>
|
|
1534
1543
|
|
|
1544
|
+
${this._guessValidated?"":h`
|
|
1545
|
+
<div class="mt-3 grid grid-cols-2 gap-2">
|
|
1546
|
+
<button
|
|
1547
|
+
@click="${()=>o(this,Vn).call(this,!1)}"
|
|
1548
|
+
?disabled="${!!this._validatingButton}"
|
|
1549
|
+
class="flex items-center justify-center gap-1 rounded-xl border border-[${this.color}] bg-white px-4 py-2 text-sm font-medium text-black transition-colors hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50">
|
|
1550
|
+
${this._validatingButton==="wrong"?h`<lucide-icon class="h-4 w-4 animate-spin" name="loader-circle"></lucide-icon>`:this.wrongButtonText}
|
|
1551
|
+
</button>
|
|
1552
|
+
<button
|
|
1553
|
+
@click="${()=>o(this,Vn).call(this,!0)}"
|
|
1554
|
+
?disabled="${!!this._validatingButton}"
|
|
1555
|
+
class="flex items-center justify-center gap-1 rounded-xl bg-[${this.color}] px-4 py-2 text-sm font-medium text-white transition-colors hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50">
|
|
1556
|
+
${this._validatingButton==="correct"?h`<lucide-icon class="h-4 w-4 animate-spin" name="loader-circle"></lucide-icon>`:this.correctButtonText}
|
|
1557
|
+
</button>
|
|
1558
|
+
</div>
|
|
1559
|
+
`}
|
|
1560
|
+
|
|
1535
1561
|
<div class="mt-3 h-1.5 overflow-hidden rounded-full bg-black/5">
|
|
1536
1562
|
<div class="h-full rounded-full bg-[${this.color}] transition-[width] duration-300" style="width: 100%"></div>
|
|
1537
1563
|
</div>
|
|
@@ -1543,45 +1569,54 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1543
1569
|
<span class="h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"></span>
|
|
1544
1570
|
</div>
|
|
1545
1571
|
|
|
1572
|
+
<!-- Timer -->
|
|
1573
|
+
<div class="mt-2 font-[ui-monospace,Menlo,Monaco,Consolas] text-2xl tracking-tight text-black tabular-nums" aria-live="polite">
|
|
1574
|
+
${this.minutes}<span class="text-black/30">:</span>${this.seconds}
|
|
1575
|
+
</div>
|
|
1576
|
+
|
|
1546
1577
|
<div class="mt-2 flex items-center justify-between">
|
|
1547
1578
|
<h3 class="text-sm font-semibold text-black">${i}</h3>
|
|
1548
|
-
<div class="text-xs text-black/40"><span>${this.
|
|
1579
|
+
<div class="text-xs text-black/40"><span>${this._currentAttemptQuestionCount}</span>/${o(this,Pt)}</div>
|
|
1549
1580
|
</div>
|
|
1550
1581
|
|
|
1551
1582
|
<div class="mt-3 rounded-xl bg-black/[0.04] px-3 py-2 text-[14px] font-medium text-black">${this._currentQuestion}</div>
|
|
1552
1583
|
|
|
1553
|
-
<div class="mt-3 grid grid-cols-
|
|
1584
|
+
<div class="mt-3 grid grid-cols-2 gap-1">
|
|
1554
1585
|
${this.options.map((a,u)=>{let l=this._loadingAnswer===a;return h`
|
|
1555
1586
|
<button
|
|
1556
|
-
@click="${()=>o(this
|
|
1587
|
+
@click="${()=>o(this,Ss).call(this,a)}"
|
|
1557
1588
|
?disabled="${this._isLoadingNextQuestion}"
|
|
1558
|
-
class="${u===0?`flex items-center justify-center gap-1 rounded-xl
|
|
1589
|
+
class="${u===0?`flex items-center justify-center gap-1 rounded-xl border border-[${this.color}] bg-white text-black px-1 py-1.5 max-h-[35px] text-sm transition-colors hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50`:`flex items-center justify-center gap-1 rounded-xl bg-[${this.color}] py-1.5 max-h-[35px] px-1 text-sm text-white transition-colors hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50`}">
|
|
1559
1590
|
${l?h`<lucide-icon class="h-3.5 w-3.5 animate-spin" name="loader-circle"></lucide-icon>`:a}
|
|
1560
1591
|
</button>
|
|
1561
1592
|
`})}
|
|
1562
1593
|
</div>
|
|
1563
1594
|
|
|
1564
1595
|
<div class="mt-3 h-1.5 overflow-hidden rounded-full bg-black/5">
|
|
1565
|
-
<div class="h-full rounded-full bg-[${this.color}] transition-[width] duration-300" style="width: ${
|
|
1596
|
+
<div class="h-full rounded-full bg-[${this.color}] transition-[width] duration-300" style="width: ${t}%"></div>
|
|
1566
1597
|
</div>
|
|
1567
1598
|
</div>
|
|
1568
|
-
`:h`<div class="mx-auto w-full max-w-xs rounded-2xl bg-white/70 p-4 text-center text-sm text-black/60">Loading game...</div>`}};
|
|
1599
|
+
`:h`<div class="mx-auto w-full max-w-xs rounded-2xl bg-white/70 p-4 text-center text-sm text-black/60">Loading game...</div>`}};Pt=new WeakMap,Rt=new WeakSet,tl=async function(){if(!this.apiBaseUrl)return console.warn("API base URL not configured, cannot fetch next question"),null;this._isLoadingNextQuestion=!0;try{let t=await fetch(`${this.apiBaseUrl}/preview/wait-game/next-question`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({questionAnswers:this._questionHistory,takeGuess:this._currentAttemptQuestionCount>=o(this,Pt)})});return t.ok?await t.json():(console.error("failed to fetch next question",t.status),null)}catch(t){return console.error("error fetching next question",t),null}finally{this._isLoadingNextQuestion=!1}},Ss=new WeakMap,Vn=new WeakMap,hh=function(){return Math.round(this._currentAttemptQuestionCount/o(this,Pt)*100)},w(qn,"properties",{question:{type:String},options:{type:Array},heading:{type:String},gameTitle:{type:String},resultPrefix:{type:String},correctButtonText:{type:String},wrongButtonText:{type:String},color:{type:String},apiBaseUrl:{type:String},minutes:{type:String},seconds:{type:String},_currentQuestion:{type:String,state:!0},_questionHistory:{type:Array,state:!0},_guessedJob:{type:String,state:!0},_isLoadingNextQuestion:{type:Boolean,state:!0},_loadingAnswer:{type:String,state:!0},_guessValidated:{type:Boolean,state:!0},_validatingButton:{type:String,state:!0},_currentAttemptQuestionCount:{type:Number,state:!0}}),w(qn,"styles",J`
|
|
1569
1600
|
:host {
|
|
1570
1601
|
display: block;
|
|
1571
1602
|
}
|
|
1572
|
-
`);customElements.define("mw-chat-wait-game",qn);var
|
|
1603
|
+
`);customElements.get("mw-chat-wait-game")||customElements.define("mw-chat-wait-game",qn);var Bt,Ze,Tr,le,dh,rl,ph,nl,Es,fh,mh,Fn=class extends _($){constructor(){super();p(this,le);p(this,Bt,null);p(this,Ze,null);p(this,Tr,0);p(this,Es,()=>{this._showGame=!0,this.dispatchEvent(new CustomEvent("mw-chat-wait-timer:game-click",{bubbles:!0,composed:!0}))});this.heading="",this.message="",this.completeMessage="",this.gameButton="",this.question="",this.options="",this.gameTitle="",this.resultPrefix="",this.correctButtonText="Correct",this.wrongButtonText="Wrong",this.targetEndTime="",this.color="#601feb",this.apiBaseUrl="",this._remainingSeconds=480,this._isComplete=!1,this._showGame=!1}connectedCallback(){super.connectedCallback(),m(this,le,dh).call(this),m(this,le,ph).call(this)}disconnectedCallback(){super.disconnectedCallback(),m(this,le,nl).call(this)}render(){let{minutes:t,seconds:n}=m(this,le,fh).call(this);if(this._showGame)return h`
|
|
1573
1604
|
<mw-chat-wait-game
|
|
1574
1605
|
.question="${this.question}"
|
|
1575
|
-
.options="${this.options}"
|
|
1606
|
+
.options="${this.options||["No","Yes"]}"
|
|
1576
1607
|
.gameTitle="${this.gameTitle}"
|
|
1577
1608
|
.resultPrefix="${this.resultPrefix}"
|
|
1578
|
-
.
|
|
1609
|
+
.correctButtonText="${this.correctButtonText}"
|
|
1610
|
+
.wrongButtonText="${this.wrongButtonText}"
|
|
1611
|
+
.heading="${this.heading}"
|
|
1579
1612
|
.color="${this.color}"
|
|
1580
|
-
.apiBaseUrl="${this.apiBaseUrl}"
|
|
1581
|
-
|
|
1613
|
+
.apiBaseUrl="${this.apiBaseUrl}"
|
|
1614
|
+
.minutes="${t}"
|
|
1615
|
+
.seconds="${n}"></mw-chat-wait-game>
|
|
1616
|
+
`;let i=m(this,le,mh).call(this);return h`
|
|
1582
1617
|
<div class="mx-auto w-full max-w-xs rounded-2xl bg-white/70 p-4 shadow-sm ring-1 ring-black/10 backdrop-blur">
|
|
1583
1618
|
<!-- Time -->
|
|
1584
|
-
<div class="font-[ui-monospace,Menlo,Monaco,Consolas] text-4xl tracking-tight text-black tabular-nums" aria-live="polite">${
|
|
1619
|
+
<div class="font-[ui-monospace,Menlo,Monaco,Consolas] text-4xl tracking-tight text-black tabular-nums" aria-live="polite">${t}<span class="text-black/30">:</span>${n}</div>
|
|
1585
1620
|
|
|
1586
1621
|
<!-- Progress bar -->
|
|
1587
1622
|
<div class="mt-3 h-1.5 overflow-hidden rounded-full bg-black/5">
|
|
@@ -1589,18 +1624,18 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1589
1624
|
</div>
|
|
1590
1625
|
|
|
1591
1626
|
<!-- Message -->
|
|
1592
|
-
<div class="mt-2 text-[12px] text-black/50">${this._isComplete?this.completeMessage:this.message}</div>
|
|
1627
|
+
<div class="mt-2 text-[12px] leading-tight text-black/50">${this._isComplete?this.completeMessage:this.message}</div>
|
|
1593
1628
|
|
|
1594
1629
|
<!-- Play a Game Button -->
|
|
1595
1630
|
<div class="mt-4">
|
|
1596
1631
|
<button @click="${o(this,Es)}" class="w-full rounded-xl bg-[${this.color}] px-4 py-2 text-sm font-medium text-white transition hover:opacity-90">${this.gameButton}</button>
|
|
1597
1632
|
</div>
|
|
1598
1633
|
</div>
|
|
1599
|
-
`}};
|
|
1634
|
+
`}};Bt=new WeakMap,Ze=new WeakMap,Tr=new WeakMap,le=new WeakSet,dh=function(){this.targetEndTime?g(this,Ze,new Date(this.targetEndTime)):g(this,Ze,new Date(Date.now()+this._remainingSeconds*1e3)),g(this,Tr,Math.max(el(o(this,Ze),new Date),0)),m(this,le,rl).call(this)},rl=function(){if(o(this,Ze)===null)return;let t=new Date,n=el(o(this,Ze),t);n>=0?(this._remainingSeconds=n,this._isComplete=!1):(this._remainingSeconds=Math.abs(n),this._isComplete=!0)},ph=function(){m(this,le,nl).call(this),g(this,Bt,setInterval(()=>{m(this,le,rl).call(this)},1e3))},nl=function(){o(this,Bt)!==null&&(clearInterval(o(this,Bt)),g(this,Bt,null))},Es=new WeakMap,fh=function(){let t=Math.floor(this._remainingSeconds/60),n=this._remainingSeconds%60,i=s=>String(s).padStart(2,"0");return{minutes:i(t),seconds:i(n)}},mh=function(){return this._isComplete?0:o(this,Ze)===null||o(this,Tr)===0?100:Math.round(this._remainingSeconds/o(this,Tr)*100)},w(Fn,"properties",{totalSeconds:{type:Number},heading:{type:String},message:{type:String},completeMessage:{type:String},gameButton:{type:String},question:{type:String},options:{type:String},gameTitle:{type:String,attribute:"game-title"},resultPrefix:{type:String,attribute:"result-prefix"},correctButtonText:{type:String,attribute:"correct-button-text"},wrongButtonText:{type:String,attribute:"wrong-button-text"},targetEndTime:{type:String,attribute:"target-end-time"},color:{type:String},apiBaseUrl:{type:String},_remainingSeconds:{type:Number,state:!0},_isComplete:{type:Boolean,state:!0},_showGame:{type:Boolean,state:!0}}),w(Fn,"styles",J`
|
|
1600
1635
|
:host {
|
|
1601
1636
|
display: block;
|
|
1602
1637
|
}
|
|
1603
|
-
`);customElements.define("mw-chat-wait-timer",
|
|
1638
|
+
`);customElements.get("mw-chat-wait-timer")||customElements.define("mw-chat-wait-timer",Fn);var _s=class extends _($){constructor(){super(),this.product=void 0,this.streaming=!1,this.linksNewTab=!1,this.searchParams=void 0,this.imagesByProductUrl={}}get trackedProductUrl(){let e=this.product?.url,t=this.searchParams;try{if(e&&t)return Ic(e,t).href}catch{}return e}render(){let{name:e,description:t,price:n,url:i}=this.product||{},s=i?this.imagesByProductUrl?.[i]:void 0;return h`
|
|
1604
1639
|
<a
|
|
1605
1640
|
href="${ue(this.trackedProductUrl)}"
|
|
1606
1641
|
title="${ue(e)}"
|
|
@@ -1618,7 +1653,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1618
1653
|
|
|
1619
1654
|
<!-- no margin here -->
|
|
1620
1655
|
|
|
1621
|
-
${
|
|
1656
|
+
${t||!this.streaming?h`<p class="line-clamp-2 text-xs text-gray-500">${t}</p>`:h`<div class="my-1 h-6 w-3/4 animate-pulse rounded bg-gray-200"></div>`}
|
|
1622
1657
|
</div>
|
|
1623
1658
|
|
|
1624
1659
|
<!-- flexbox filled space -->
|
|
@@ -1626,7 +1661,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1626
1661
|
${n||!this.streaming?h`<span class="text-xs text-gray-900">${n}</span>`:h`<div class="h-4 w-14 animate-pulse rounded bg-gray-200"></div>`}
|
|
1627
1662
|
</div>
|
|
1628
1663
|
</a>
|
|
1629
|
-
`}};w(_s,"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",_s);function Ms(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 As=function(){},Lr=function(){};var Fn=(t,e,r)=>Math.min(Math.max(r,t),e);var rl=.001,Wh=.01,gc=10,Gh=.05,Jh=1;function wc({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;As(t<=gc*1e3,"Spring duration must be 10 seconds or less");let a=1-e;a=Fn(Gh,Jh,a),t=Fn(Wh,gc,t/1e3),a<1?(i=c=>{let p=c*a,m=p*t,v=p-r,b=Is(c,a),S=Math.exp(-m);return rl-v/b*S},s=c=>{let m=c*a*t,v=m*r+r,b=Math.pow(a,2)*Math.pow(c,2)*t,S=Math.exp(-m),T=Is(Math.pow(c,2),a);return(-i(c)+rl>0?-1:1)*((v-b)*S)/T}):(i=c=>{let p=Math.exp(-c*t),m=(c-r)*t+1;return-rl+p*m},s=c=>{let p=Math.exp(-c*t),m=(r-c)*(t*t);return p*m});let u=5/t,l=Yh(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:a*2*Math.sqrt(n*c),duration:t}}}var Kh=12;function Yh(t,e,r){let n=r;for(let i=1;i<Kh;i++)n=n-t(n)/e(n);return n}function Is(t,e){return t*Math.sqrt(1-e*e)}var Xh=["duration","bounce"],Qh=["stiffness","damping","mass"];function vc(t,e){return e.some(r=>t[r]!==void 0)}function ep(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!vc(t,Qh)&&vc(t,Xh)){let r=wc(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Ls(t){var{from:e=0,to:r=1,restSpeed:n=2,restDelta:i}=t,s=Ms(t,["from","to","restSpeed","restDelta"]);let a={done:!1,value:e},{stiffness:u,damping:l,mass:c,velocity:p,duration:m,isResolvedFromDuration:v}=ep(s),b=yc,S=yc;function T(){let k=p?-(p/1e3):0,A=r-e,C=l/(2*Math.sqrt(u*c)),M=Math.sqrt(u/c)/1e3;if(i===void 0&&(i=Math.min(Math.abs(r-e)/100,.4)),C<1){let L=Is(M,C);b=N=>{let ee=Math.exp(-C*M*N);return r-ee*((k+C*M*A)/L*Math.sin(L*N)+A*Math.cos(L*N))},S=N=>{let ee=Math.exp(-C*M*N);return C*M*ee*(Math.sin(L*N)*(k+C*M*A)/L+A*Math.cos(L*N))-ee*(Math.cos(L*N)*(k+C*M*A)-L*A*Math.sin(L*N))}}else if(C===1)b=L=>r-Math.exp(-M*L)*(A+(k+M*A)*L);else{let L=M*Math.sqrt(C*C-1);b=N=>{let ee=Math.exp(-C*M*N),se=Math.min(L*N,300);return r-ee*((k+C*M*A)*Math.sinh(se)+L*A*Math.cosh(se))/L}}}return T(),{next:k=>{let A=b(k);if(v)a.done=k>=m;else{let C=S(k)*1e3,M=Math.abs(C)<=n,L=Math.abs(r-A)<=i;a.done=M&&L}return a.value=a.done?r:A,a},flipTarget:()=>{p=-p,[e,r]=[r,e],T()}}}Ls.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";var yc=t=>0;var nl=(t,e,r)=>{let n=e-t;return n===0?1:(r-t)/n};var jr=(t,e,r)=>-r*t+r*e+t;var js=(t,e)=>r=>Math.max(Math.min(r,e),t),at=t=>t%1?Number(t.toFixed(5)):t,Tr=/(-)?([\d]*\.?[\d])+/g,Ts=/(#[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,xc=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Ke(t){return typeof t=="string"}var Dr={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ds=Object.assign(Object.assign({},Dr),{transform:js(0,1)}),Mm=Object.assign(Object.assign({},Dr),{default:1});var Nn=t=>({test:e=>Ke(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Lm=Nn("deg"),Or=Nn("%"),jm=Nn("px"),Tm=Nn("vh"),Dm=Nn("vw"),Om=Object.assign(Object.assign({},Or),{parse:t=>Or.parse(t)/100,transform:t=>Or.transform(t*100)});var Pr=(t,e)=>r=>!!(Ke(r)&&xc.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),Os=(t,e,r)=>n=>{if(!Ke(n))return n;let[i,s,a,u]=n.match(Tr);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(a),alpha:u!==void 0?parseFloat(u):1}};var He={test:Pr("hsl","hue"),parse:Os("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Or.transform(at(e))+", "+Or.transform(at(r))+", "+at(Ds.transform(n))+")"};var tp=js(0,255),Ps=Object.assign(Object.assign({},Dr),{transform:t=>Math.round(tp(t))}),Me={test:Pr("rgb","red"),parse:Os("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+Ps.transform(t)+", "+Ps.transform(e)+", "+Ps.transform(r)+", "+at(Ds.transform(n))+")"};function rp(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 Ur={test:Pr("#"),parse:rp,transform:Me.transform};var lt={test:t=>Me.test(t)||Ur.test(t)||He.test(t),parse:t=>Me.test(t)?Me.parse(t):He.test(t)?He.parse(t):Ur.parse(t),transform:t=>Ke(t)?t:t.hasOwnProperty("red")?Me.transform(t):He.transform(t)};var bc="${c}",kc="${n}";function np(t){var e,r,n,i;return isNaN(t)&&Ke(t)&&((r=(e=t.match(Tr))===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)+((i=(n=t.match(Ts))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function Cc(t){typeof t=="number"&&(t=`${t}`);let e=[],r=0,n=t.match(Ts);n&&(r=n.length,t=t.replace(Ts,bc),e.push(...n.map(lt.parse)));let i=t.match(Tr);return i&&(t=t.replace(Tr,kc),e.push(...i.map(Dr.parse))),{values:e,numColors:r,tokenised:t}}function $c(t){return Cc(t).values}function Sc(t){let{values:e,numColors:r,tokenised:n}=Cc(t),i=e.length;return s=>{let a=n;for(let u=0;u<i;u++)a=a.replace(u<r?bc:kc,u<r?lt.transform(s[u]):at(s[u]));return a}}var ip=t=>typeof t=="number"?0:t;function sp(t){let e=$c(t);return Sc(t)(e.map(ip))}var Us={test:np,parse:$c,createTransformer:Sc,getAnimatableNone:sp};function il(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 sl({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,a=0;if(!e)i=s=a=r;else{let u=r<.5?r*(1+e):r+e-r*e,l=2*r-u;i=il(l,u,t+1/3),s=il(l,u,t),a=il(l,u,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:n}}var op=(t,e,r)=>{let n=t*t,i=e*e;return Math.sqrt(Math.max(0,r*(i-n)+n))},ap=[Ur,Me,He],Ec=t=>ap.find(e=>e.test(t)),_c=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,Rs=(t,e)=>{let r=Ec(t),n=Ec(e);Lr(!!r,_c(t)),Lr(!!n,_c(e));let i=r.parse(t),s=n.parse(e);r===He&&(i=sl(i),r=Me),n===He&&(s=sl(s),n=Me);let a=Object.assign({},i);return u=>{for(let l in a)l!=="alpha"&&(a[l]=op(i[l],s[l],u));return a.alpha=jr(i.alpha,s.alpha,u),r.transform(a)}};var Mc=t=>typeof t=="number";var lp=(t,e)=>r=>e(t(r)),Vs=(...t)=>t.reduce(lp);function Ic(t,e){return Mc(t)?r=>jr(t,e,r):lt.test(t)?Rs(t,e):al(t,e)}var ol=(t,e)=>{let r=[...t],n=r.length,i=t.map((s,a)=>Ic(s,e[a]));return s=>{for(let a=0;a<n;a++)r[a]=i[a](s);return r}},Lc=(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]=Ic(t[i],e[i]));return i=>{for(let s in n)r[s]=n[s](i);return r}};function Ac(t){let e=Us.parse(t),r=e.length,n=0,i=0,s=0;for(let a=0;a<r;a++)n||typeof e[a]=="number"?n++:e[a].hue!==void 0?s++:i++;return{parsed:e,numNumbers:n,numRGB:i,numHSL:s}}var al=(t,e)=>{let r=Us.createTransformer(e),n=Ac(t),i=Ac(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?Vs(ol(n.parsed,i.parsed),r):(As(!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.`),a=>`${a>0?e:t}`)};var cp=(t,e)=>r=>jr(t,e,r);function up(t){if(typeof t=="number")return cp;if(typeof t=="string")return lt.test(t)?Rs:al;if(Array.isArray(t))return ol;if(typeof t=="object")return Lc}function hp(t,e,r){let n=[],i=r||up(t[0]),s=t.length-1;for(let a=0;a<s;a++){let u=i(t[a],t[a+1]);if(e){let l=Array.isArray(e)?e[a]:e;u=Vs(l,u)}n.push(u)}return n}function pp([t,e],[r]){return n=>r(nl(t,e,n))}function dp(t,e){let r=t.length,n=r-1;return i=>{let s=0,a=!1;if(i<=t[0]?a=!0:i>=t[n]&&(s=n-1,a=!0),!a){let l=1;for(;l<r&&!(t[l]>i||l===n);l++);s=l-1}let u=nl(t[s],t[s+1],i);return e[s](u)}}function Bs(t,e,{clamp:r=!0,ease:n,mixer:i}={}){let s=t.length;Lr(s===e.length,"Both input and output ranges must be the same length"),Lr(!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 a=hp(e,n,i),u=s===2?pp(t,a):dp(t,a);return r?l=>u(Fn(t[0],t[s-1],l)):u}var Zn=t=>e=>1-t(1-e),Hs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,jc=t=>e=>Math.pow(e,t),ll=t=>e=>e*e*((t+1)*e-t),Tc=t=>{let e=ll(t);return r=>(r*=2)<1?.5*e(r):.5*(2-Math.pow(2,-10*(r-1)))};var Dc=1.525,fp=4/11,mp=8/11,gp=9/10;var Oc=jc(2),R7=Zn(Oc),Pc=Hs(Oc),wp=t=>1-Math.sin(Math.acos(t)),vp=Zn(wp),V7=Hs(vp),Uc=ll(Dc),B7=Zn(Uc),H7=Hs(Uc),q7=Tc(Dc),yp=4356/361,xp=35442/1805,bp=16061/1805,kp=t=>{if(t===1||t===0)return t;let e=t*t;return t<fp?7.5625*e:t<mp?9.075*e-9.9*t+3.4:t<gp?yp*e-xp*t+bp:10.8*t*t-20.52*t+10.72},z7=Zn(kp);function Cp(t,e){return t.map(()=>e||Pc).splice(0,t.length-1)}function $p(t){let e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function Sp(t,e){return t.map(r=>r*e)}function Wn({from:t=0,to:e=1,ease:r,offset:n,duration:i=300}){let s={done:!1,value:t},a=Array.isArray(e)?e:[t,e],u=Sp(n&&n.length===a.length?n:$p(a),i);function l(){return Bs(u,a,{ease:Array.isArray(r)?r:Cp(a,r)})}let c=l();return{next:p=>(s.value=c(p),s.done=p>=i,s),flipTarget:()=>{a.reverse(),c=l()}}}function Rc({velocity:t=0,from:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){let a={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 m=-u*Math.exp(-p/n);return a.done=!(m>i||m<-i),a.value=a.done?c:c+m,a},flipTarget:()=>{}}}var Vc={keyframes:Wn,spring:Ls,decay:Rc};function Bc(t){if(Array.isArray(t.to))return Wn;if(Vc[t.type])return Vc[t.type];let e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Wn:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Ls:Wn}var cl=16.666666666666668,Ep=typeof performance<"u"?()=>performance.now():()=>Date.now(),ul=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Ep()),cl);function Hc(t){let e=[],r=[],n=0,i=!1,s=!1,a=new WeakSet,u={schedule:(l,c=!1,p=!1)=>{let m=p&&i,v=m?e:r;return c&&a.add(l),v.indexOf(l)===-1&&(v.push(l),m&&i&&(n=e.length)),l},cancel:l=>{let c=r.indexOf(l);c!==-1&&r.splice(c,1),a.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),a.has(p)&&(u.schedule(p),t())}i=!1,s&&(s=!1,u.process(l))}};return u}var _p=40,hl=!0,Jn=!1,pl=!1,Gn={delta:0,timestamp:0},Kn=["read","update","preRender","render","postRender"],qs=Kn.reduce((t,e)=>(t[e]=Hc(()=>Jn=!0),t),{}),Mp=Kn.reduce((t,e)=>{let r=qs[e];return t[e]=(n,i=!1,s=!1)=>(Jn||Ip(),r.schedule(n,i,s)),t},{}),qc=Kn.reduce((t,e)=>(t[e]=qs[e].cancel,t),{}),ng=Kn.reduce((t,e)=>(t[e]=()=>qs[e].process(Gn),t),{}),Ap=t=>qs[t].process(Gn),zc=t=>{Jn=!1,Gn.delta=hl?cl:Math.max(Math.min(t-Gn.timestamp,_p),1),Gn.timestamp=t,pl=!0,Kn.forEach(Ap),pl=!1,Jn&&(hl=!1,ul(zc))},Ip=()=>{Jn=!0,hl=!0,pl||ul(zc)};var Fc=Mp;function dl(t,e,r=0){return t-e-r}function Nc(t,e,r=0,n=!0){return n?dl(e+-t,e,r):e-(t-e)+r}function Zc(t,e,r,n){return n?t>=e+r:t<=-r}var Lp=t=>{let e=({delta:r})=>t(r);return{start:()=>Fc.update(e,!0),stop:()=>qc.update(e)}};function fl(t){var e,r,{from:n,autoplay:i=!0,driver:s=Lp,elapsed:a=0,repeat:u=0,repeatType:l="loop",repeatDelay:c=0,onPlay:p,onStop:m,onComplete:v,onRepeat:b,onUpdate:S}=t,T=Ms(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:k}=T,A,C=0,M=T.duration,L,N=!1,ee=!0,se,R=Bc(T);!((r=(e=R).needsInterpolation)===null||r===void 0)&&r.call(e,n,k)&&(se=Bs([0,100],[n,k],{clamp:!1}),n=0,k=100);let oe=R(Object.assign(Object.assign({},T),{from:n,to:k}));function de(){C++,l==="reverse"?(ee=C%2===0,a=Nc(a,M,c,ee)):(a=dl(a,M,c),l==="mirror"&&oe.flipTarget()),N=!1,b&&b()}function Mo(){A.stop(),v&&v()}function gt(J){if(ee||(J=-J),a+=J,!N){let le=oe.next(Math.max(0,a));L=le.value,se&&(L=se(L)),N=ee?le.done:a<=0}S?.(L),N&&(C===0&&(M??(M=a)),C<u?Zc(a,M,c,ee)&&de():Mo())}function Si(){p?.(),A=s(gt),A.start()}return i&&Si(),{stop:()=>{m?.(),A.stop()}}}var F,Wc,zs,Gc,Fs,Jc,Kc,Yc,Ns,Zs=class Zs extends _($){constructor(){super();d(this,F);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")&&f(this,F,Wc).call(this)}get images(){return this.product?.images||[]}render(){if(!this.product)return h`
|
|
1664
|
+
`}};w(_s,"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",_s);function Is(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t}var Ms=function(){},Lr=function(){};var Nn=(r,e,t)=>Math.min(Math.max(t,r),e);var il=.001,H1=.01,gh=10,z1=.05,W1=1;function wh({duration:r=800,bounce:e=.25,velocity:t=0,mass:n=1}){let i,s;Ms(r<=gh*1e3,"Spring duration must be 10 seconds or less");let a=1-e;a=Nn(z1,W1,a),r=Nn(H1,gh,r/1e3),a<1?(i=c=>{let d=c*a,f=d*r,y=d-t,x=As(c,a),S=Math.exp(-f);return il-y/x*S},s=c=>{let f=c*a*r,y=f*t+t,x=Math.pow(a,2)*Math.pow(c,2)*r,S=Math.exp(-f),j=As(Math.pow(c,2),a);return(-i(c)+il>0?-1:1)*((y-x)*S)/j}):(i=c=>{let d=Math.exp(-c*r),f=(c-t)*r+1;return-il+d*f},s=c=>{let d=Math.exp(-c*r),f=(t-c)*(r*r);return d*f});let u=5/r,l=Z1(i,s,u);if(r=r*1e3,isNaN(l))return{stiffness:100,damping:10,duration:r};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:a*2*Math.sqrt(n*c),duration:r}}}var G1=12;function Z1(r,e,t){let n=t;for(let i=1;i<G1;i++)n=n-r(n)/e(n);return n}function As(r,e){return r*Math.sqrt(1-e*e)}var J1=["duration","bounce"],K1=["stiffness","damping","mass"];function yh(r,e){return e.some(t=>r[t]!==void 0)}function Y1(r){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},r);if(!yh(r,K1)&&yh(r,J1)){let t=wh(r);e=Object.assign(Object.assign(Object.assign({},e),t),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function Ts(r){var{from:e=0,to:t=1,restSpeed:n=2,restDelta:i}=r,s=Is(r,["from","to","restSpeed","restDelta"]);let a={done:!1,value:e},{stiffness:u,damping:l,mass:c,velocity:d,duration:f,isResolvedFromDuration:y}=Y1(s),x=vh,S=vh;function j(){let k=d?-(d/1e3):0,M=t-e,C=l/(2*Math.sqrt(u*c)),I=Math.sqrt(u/c)/1e3;if(i===void 0&&(i=Math.min(Math.abs(t-e)/100,.4)),C<1){let L=As(I,C);x=z=>{let ee=Math.exp(-C*I*z);return t-ee*((k+C*I*M)/L*Math.sin(L*z)+M*Math.cos(L*z))},S=z=>{let ee=Math.exp(-C*I*z);return C*I*ee*(Math.sin(L*z)*(k+C*I*M)/L+M*Math.cos(L*z))-ee*(Math.cos(L*z)*(k+C*I*M)-L*M*Math.sin(L*z))}}else if(C===1)x=L=>t-Math.exp(-I*L)*(M+(k+I*M)*L);else{let L=I*Math.sqrt(C*C-1);x=z=>{let ee=Math.exp(-C*I*z),ie=Math.min(L*z,300);return t-ee*((k+C*I*M)*Math.sinh(ie)+L*M*Math.cosh(ie))/L}}}return j(),{next:k=>{let M=x(k);if(y)a.done=k>=f;else{let C=S(k)*1e3,I=Math.abs(C)<=n,L=Math.abs(t-M)<=i;a.done=I&&L}return a.value=a.done?t:M,a},flipTarget:()=>{d=-d,[e,t]=[t,e],j()}}}Ts.needsInterpolation=(r,e)=>typeof r=="string"||typeof e=="string";var vh=r=>0;var sl=(r,e,t)=>{let n=e-r;return n===0?1:(t-r)/n};var jr=(r,e,t)=>-t*r+t*e+r;var Ls=(r,e)=>t=>Math.max(Math.min(t,e),r),ot=r=>r%1?Number(r.toFixed(5)):r,Dr=/(-)?([\d]*\.?[\d])+/g,js=/(#[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,bh=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Je(r){return typeof r=="string"}var Or={test:r=>typeof r=="number",parse:parseFloat,transform:r=>r},Ds=Object.assign(Object.assign({},Or),{transform:Ls(0,1)}),Lw=Object.assign(Object.assign({},Or),{default:1});var Hn=r=>({test:e=>Je(e)&&e.endsWith(r)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${r}`}),Ow=Hn("deg"),Ur=Hn("%"),Uw=Hn("px"),Pw=Hn("vh"),Rw=Hn("vw"),Bw=Object.assign(Object.assign({},Ur),{parse:r=>Ur.parse(r)/100,transform:r=>Ur.transform(r*100)});var Pr=(r,e)=>t=>!!(Je(t)&&bh.test(t)&&t.startsWith(r)||e&&Object.prototype.hasOwnProperty.call(t,e)),Os=(r,e,t)=>n=>{if(!Je(n))return n;let[i,s,a,u]=n.match(Dr);return{[r]:parseFloat(i),[e]:parseFloat(s),[t]:parseFloat(a),alpha:u!==void 0?parseFloat(u):1}};var qe={test:Pr("hsl","hue"),parse:Os("hue","saturation","lightness"),transform:({hue:r,saturation:e,lightness:t,alpha:n=1})=>"hsla("+Math.round(r)+", "+Ur.transform(ot(e))+", "+Ur.transform(ot(t))+", "+ot(Ds.transform(n))+")"};var X1=Ls(0,255),Us=Object.assign(Object.assign({},Or),{transform:r=>Math.round(X1(r))}),Ie={test:Pr("rgb","red"),parse:Os("red","green","blue"),transform:({red:r,green:e,blue:t,alpha:n=1})=>"rgba("+Us.transform(r)+", "+Us.transform(e)+", "+Us.transform(t)+", "+ot(Ds.transform(n))+")"};function Q1(r){let e="",t="",n="",i="";return r.length>5?(e=r.substr(1,2),t=r.substr(3,2),n=r.substr(5,2),i=r.substr(7,2)):(e=r.substr(1,1),t=r.substr(2,1),n=r.substr(3,1),i=r.substr(4,1),e+=e,t+=t,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}var Rr={test:Pr("#"),parse:Q1,transform:Ie.transform};var at={test:r=>Ie.test(r)||Rr.test(r)||qe.test(r),parse:r=>Ie.test(r)?Ie.parse(r):qe.test(r)?qe.parse(r):Rr.parse(r),transform:r=>Je(r)?r:r.hasOwnProperty("red")?Ie.transform(r):qe.transform(r)};var xh="${c}",kh="${n}";function e0(r){var e,t,n,i;return isNaN(r)&&Je(r)&&((t=(e=r.match(Dr))===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)+((i=(n=r.match(js))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0)>0}function Ch(r){typeof r=="number"&&(r=`${r}`);let e=[],t=0,n=r.match(js);n&&(t=n.length,r=r.replace(js,xh),e.push(...n.map(at.parse)));let i=r.match(Dr);return i&&(r=r.replace(Dr,kh),e.push(...i.map(Or.parse))),{values:e,numColors:t,tokenised:r}}function $h(r){return Ch(r).values}function Sh(r){let{values:e,numColors:t,tokenised:n}=Ch(r),i=e.length;return s=>{let a=n;for(let u=0;u<i;u++)a=a.replace(u<t?xh:kh,u<t?at.transform(s[u]):ot(s[u]));return a}}var t0=r=>typeof r=="number"?0:r;function r0(r){let e=$h(r);return Sh(r)(e.map(t0))}var Ps={test:e0,parse:$h,createTransformer:Sh,getAnimatableNone:r0};function ol(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*(2/3-t)*6:r}function al({hue:r,saturation:e,lightness:t,alpha:n}){r/=360,e/=100,t/=100;let i=0,s=0,a=0;if(!e)i=s=a=t;else{let u=t<.5?t*(1+e):t+e-t*e,l=2*t-u;i=ol(l,u,r+1/3),s=ol(l,u,r),a=ol(l,u,r-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:n}}var n0=(r,e,t)=>{let n=r*r,i=e*e;return Math.sqrt(Math.max(0,t*(i-n)+n))},i0=[Rr,Ie,qe],Eh=r=>i0.find(e=>e.test(r)),_h=r=>`'${r}' is not an animatable color. Use the equivalent color code instead.`,Rs=(r,e)=>{let t=Eh(r),n=Eh(e);Lr(!!t,_h(r)),Lr(!!n,_h(e));let i=t.parse(r),s=n.parse(e);t===qe&&(i=al(i),t=Ie),n===qe&&(s=al(s),n=Ie);let a=Object.assign({},i);return u=>{for(let l in a)l!=="alpha"&&(a[l]=n0(i[l],s[l],u));return a.alpha=jr(i.alpha,s.alpha,u),t.transform(a)}};var Ih=r=>typeof r=="number";var s0=(r,e)=>t=>e(r(t)),Bs=(...r)=>r.reduce(s0);function Ah(r,e){return Ih(r)?t=>jr(r,e,t):at.test(r)?Rs(r,e):cl(r,e)}var ll=(r,e)=>{let t=[...r],n=t.length,i=r.map((s,a)=>Ah(s,e[a]));return s=>{for(let a=0;a<n;a++)t[a]=i[a](s);return t}},Th=(r,e)=>{let t=Object.assign(Object.assign({},r),e),n={};for(let i in t)r[i]!==void 0&&e[i]!==void 0&&(n[i]=Ah(r[i],e[i]));return i=>{for(let s in n)t[s]=n[s](i);return t}};function Mh(r){let e=Ps.parse(r),t=e.length,n=0,i=0,s=0;for(let a=0;a<t;a++)n||typeof e[a]=="number"?n++:e[a].hue!==void 0?s++:i++;return{parsed:e,numNumbers:n,numRGB:i,numHSL:s}}var cl=(r,e)=>{let t=Ps.createTransformer(e),n=Mh(r),i=Mh(e);return n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers?Bs(ll(n.parsed,i.parsed),t):(Ms(!0,`Complex values '${r}' 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.`),a=>`${a>0?e:r}`)};var o0=(r,e)=>t=>jr(r,e,t);function a0(r){if(typeof r=="number")return o0;if(typeof r=="string")return at.test(r)?Rs:cl;if(Array.isArray(r))return ll;if(typeof r=="object")return Th}function l0(r,e,t){let n=[],i=t||a0(r[0]),s=r.length-1;for(let a=0;a<s;a++){let u=i(r[a],r[a+1]);if(e){let l=Array.isArray(e)?e[a]:e;u=Bs(l,u)}n.push(u)}return n}function c0([r,e],[t]){return n=>t(sl(r,e,n))}function u0(r,e){let t=r.length,n=t-1;return i=>{let s=0,a=!1;if(i<=r[0]?a=!0:i>=r[n]&&(s=n-1,a=!0),!a){let l=1;for(;l<t&&!(r[l]>i||l===n);l++);s=l-1}let u=sl(r[s],r[s+1],i);return e[s](u)}}function qs(r,e,{clamp:t=!0,ease:n,mixer:i}={}){let s=r.length;Lr(s===e.length,"Both input and output ranges must be the same length"),Lr(!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."),r[0]>r[s-1]&&(r=[].concat(r),e=[].concat(e),r.reverse(),e.reverse());let a=l0(e,n,i),u=s===2?c0(r,a):u0(r,a);return t?l=>u(Nn(r[0],r[s-1],l)):u}var zn=r=>e=>1-r(1-e),Vs=r=>e=>e<=.5?r(2*e)/2:(2-r(2*(1-e)))/2,Lh=r=>e=>Math.pow(e,r),ul=r=>e=>e*e*((r+1)*e-r),jh=r=>{let e=ul(r);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))};var Dh=1.525,h0=4/11,d0=8/11,p0=9/10;var Oh=Lh(2),F4=zn(Oh),Uh=Vs(Oh),f0=r=>1-Math.sin(Math.acos(r)),m0=zn(f0),N4=Vs(m0),Ph=ul(Dh),H4=zn(Ph),z4=Vs(Ph),W4=jh(Dh),g0=4356/361,w0=35442/1805,y0=16061/1805,v0=r=>{if(r===1||r===0)return r;let e=r*r;return r<h0?7.5625*e:r<d0?9.075*e-9.9*r+3.4:r<p0?g0*e-w0*r+y0:10.8*r*r-20.52*r+10.72},G4=zn(v0);function b0(r,e){return r.map(()=>e||Uh).splice(0,r.length-1)}function x0(r){let e=r.length;return r.map((t,n)=>n!==0?n/(e-1):0)}function k0(r,e){return r.map(t=>t*e)}function Wn({from:r=0,to:e=1,ease:t,offset:n,duration:i=300}){let s={done:!1,value:r},a=Array.isArray(e)?e:[r,e],u=k0(n&&n.length===a.length?n:x0(a),i);function l(){return qs(u,a,{ease:Array.isArray(t)?t:b0(a,t)})}let c=l();return{next:d=>(s.value=c(d),s.done=d>=i,s),flipTarget:()=>{a.reverse(),c=l()}}}function Rh({velocity:r=0,from:e=0,power:t=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){let a={done:!1,value:e},u=t*r,l=e+u,c=s===void 0?l:s(l);return c!==l&&(u=c-e),{next:d=>{let f=-u*Math.exp(-d/n);return a.done=!(f>i||f<-i),a.value=a.done?c:c+f,a},flipTarget:()=>{}}}var Bh={keyframes:Wn,spring:Ts,decay:Rh};function qh(r){if(Array.isArray(r.to))return Wn;if(Bh[r.type])return Bh[r.type];let e=new Set(Object.keys(r));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Wn:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Ts:Wn}var hl=16.666666666666668,C0=typeof performance<"u"?()=>performance.now():()=>Date.now(),dl=typeof window<"u"?r=>window.requestAnimationFrame(r):r=>setTimeout(()=>r(C0()),hl);function Vh(r){let e=[],t=[],n=0,i=!1,s=!1,a=new WeakSet,u={schedule:(l,c=!1,d=!1)=>{let f=d&&i,y=f?e:t;return c&&a.add(l),y.indexOf(l)===-1&&(y.push(l),f&&i&&(n=e.length)),l},cancel:l=>{let c=t.indexOf(l);c!==-1&&t.splice(c,1),a.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[e,t]=[t,e],t.length=0,n=e.length,n)for(let c=0;c<n;c++){let d=e[c];d(l),a.has(d)&&(u.schedule(d),r())}i=!1,s&&(s=!1,u.process(l))}};return u}var $0=40,pl=!0,Zn=!1,fl=!1,Gn={delta:0,timestamp:0},Jn=["read","update","preRender","render","postRender"],Fs=Jn.reduce((r,e)=>(r[e]=Vh(()=>Zn=!0),r),{}),S0=Jn.reduce((r,e)=>{let t=Fs[e];return r[e]=(n,i=!1,s=!1)=>(Zn||_0(),t.schedule(n,i,s)),r},{}),Fh=Jn.reduce((r,e)=>(r[e]=Fs[e].cancel,r),{}),ay=Jn.reduce((r,e)=>(r[e]=()=>Fs[e].process(Gn),r),{}),E0=r=>Fs[r].process(Gn),Nh=r=>{Zn=!1,Gn.delta=pl?hl:Math.max(Math.min(r-Gn.timestamp,$0),1),Gn.timestamp=r,fl=!0,Jn.forEach(E0),fl=!1,Zn&&(pl=!1,dl(Nh))},_0=()=>{Zn=!0,pl=!0,fl||dl(Nh)};var Hh=S0;function ml(r,e,t=0){return r-e-t}function zh(r,e,t=0,n=!0){return n?ml(e+-r,e,t):e-(r-e)+t}function Wh(r,e,t,n){return n?r>=e+t:r<=-t}var I0=r=>{let e=({delta:t})=>r(t);return{start:()=>Hh.update(e,!0),stop:()=>Fh.update(e)}};function gl(r){var e,t,{from:n,autoplay:i=!0,driver:s=I0,elapsed:a=0,repeat:u=0,repeatType:l="loop",repeatDelay:c=0,onPlay:d,onStop:f,onComplete:y,onRepeat:x,onUpdate:S}=r,j=Is(r,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:k}=j,M,C=0,I=j.duration,L,z=!1,ee=!0,ie,B=qh(j);!((t=(e=B).needsInterpolation)===null||t===void 0)&&t.call(e,n,k)&&(ie=qs([0,100],[n,k],{clamp:!1}),n=0,k=100);let se=B(Object.assign(Object.assign({},j),{from:n,to:k}));function de(){C++,l==="reverse"?(ee=C%2===0,a=zh(a,I,c,ee)):(a=ml(a,I,c),l==="mirror"&&se.flipTarget()),z=!1,x&&x()}function Eo(){M.stop(),y&&y()}function gt(Z){if(ee||(Z=-Z),a+=Z,!z){let oe=se.next(Math.max(0,a));L=oe.value,ie&&(L=ie(L)),z=ee?oe.done:a<=0}S?.(L),z&&(C===0&&(I??(I=a)),C<u?Wh(a,I,c,ee)&&de():Eo())}function Si(){d?.(),M=s(gt),M.start()}return i&&Si(),{stop:()=>{f?.(),M.stop()}}}var H,Gh,Ns,Zh,Hs,Jh,Kh,Yh,zs,Ws=class Ws extends _($){constructor(){super();p(this,H);this.product=void 0,this.labels={addToCart:"Add to cart",color:"Color",size:"Size"},this._currentImageIndex=0,this._isValidUrl=!1}willUpdate(t){t.has("product")&&m(this,H,Gh).call(this)}get images(){return this.product?.images||[]}render(){if(!this.product)return h`
|
|
1630
1665
|
<div class="my-2 w-full rounded-3xl border bg-white p-4">
|
|
1631
1666
|
<div class="relative mx-auto mb-4 max-w-[240px]">
|
|
1632
1667
|
<div class="h-[180px] w-full animate-pulse rounded-2xl bg-gray-200"></div>
|
|
@@ -1645,14 +1680,14 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1645
1680
|
<div class="h-8 flex-auto animate-pulse rounded-xl bg-gray-200"></div>
|
|
1646
1681
|
</div>
|
|
1647
1682
|
</div>
|
|
1648
|
-
`;if(this.product.layout==="horizontal")return h` <mw-product-card-horizontal product="${JSON.stringify(this.product)}"></mw-product-card-horizontal> `;let{name:
|
|
1683
|
+
`;if(this.product.layout==="horizontal")return h` <mw-product-card-horizontal product="${JSON.stringify(this.product)}"></mw-product-card-horizontal> `;let{name:t,description:n,price:i,category:s}=this.product;return h`
|
|
1649
1684
|
<div class="my-2 w-full rounded-3xl border-[0.5px] border-[#5e5d59]/25 bg-white p-4 hover:shadow-sm">
|
|
1650
1685
|
<div class="pointer-events-auto mx-auto mb-4">
|
|
1651
1686
|
<div class="group relative overflow-hidden rounded-2xl">
|
|
1652
1687
|
<div class="image-slider z-0 flex transition-transform duration-300 ease-in-out" style="transform: translateX(-${this._currentImageIndex*100}%)">
|
|
1653
1688
|
${this.images.length>0?_e(this.images,a=>a,(a,u)=>h`
|
|
1654
1689
|
<!-- TODO: add srcset with 1x/2x variants for high DPI displays -->
|
|
1655
|
-
<img src="${a}" alt="image ${u+1}: ${
|
|
1690
|
+
<img src="${a}" alt="image ${u+1}: ${t}" class="h-auto w-full flex-shrink-0 object-scale-down" loading="lazy" />
|
|
1656
1691
|
`):h`
|
|
1657
1692
|
<div class="h-full w-full flex-shrink-0 object-scale-down"></div>
|
|
1658
1693
|
<svg class="rounded-lg" height="144" viewBox="0 0 100 133" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -1668,12 +1703,12 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1668
1703
|
${this.images.length>1?h`
|
|
1669
1704
|
<div class="absolute inset-0 flex items-center justify-between px-4">
|
|
1670
1705
|
<button
|
|
1671
|
-
@click="${
|
|
1706
|
+
@click="${m(this,H,Kh)}"
|
|
1672
1707
|
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">
|
|
1673
1708
|
<hi-outline class="block h-6 w-3" name="chevron-left"></hi-outline>
|
|
1674
1709
|
</button>
|
|
1675
1710
|
<button
|
|
1676
|
-
@click="${
|
|
1711
|
+
@click="${m(this,H,Jh)}"
|
|
1677
1712
|
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">
|
|
1678
1713
|
<hi-outline class="block h-6 w-3" name="chevron-right"></hi-outline>
|
|
1679
1714
|
</button>
|
|
@@ -1683,20 +1718,20 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1683
1718
|
<div class="slider-dots absolute bottom-3 left-1/2 flex -translate-x-1/2 gap-2">
|
|
1684
1719
|
${this.images.map((a,u)=>h`
|
|
1685
1720
|
<button
|
|
1686
|
-
@click="${()=>
|
|
1721
|
+
@click="${()=>m(this,H,Yh).call(this,u)}"
|
|
1687
1722
|
class="${u===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>
|
|
1688
1723
|
`)}
|
|
1689
1724
|
</div>
|
|
1690
1725
|
`:null}
|
|
1691
1726
|
</div>
|
|
1692
1727
|
</div>
|
|
1693
|
-
<div @click="${
|
|
1694
|
-
${s?h`<a @click="${
|
|
1728
|
+
<div @click="${m(this,H,Ns)}" class="cursor-pointer">
|
|
1729
|
+
${s?h`<a @click="${m(this,H,Ns)}" class="${this._isValidUrl?"":"pointer-events-none"} line-clamp-1 text-xs text-gray-600 hover:underline"> ${s} </a>`:null}
|
|
1695
1730
|
|
|
1696
1731
|
<h3
|
|
1697
|
-
@click="${
|
|
1732
|
+
@click="${m(this,H,Ns)}"
|
|
1698
1733
|
class="${this._isValidUrl?"":"pointer-events-none cursor-default"} mb-1 line-clamp-2 cursor-pointer text-lg font-semibold transition-all hover:underline">
|
|
1699
|
-
${
|
|
1734
|
+
${t||h`<span class="inline-block h-6 w-32 animate-pulse rounded bg-gray-200"></span>`}
|
|
1700
1735
|
</h3>
|
|
1701
1736
|
${n?h`<p class="mb-2 line-clamp-2 text-sm text-gray-600">${n}</p>`:h`<div class="mb-2 h-4 w-3/4 animate-pulse rounded bg-gray-200"></div>`}
|
|
1702
1737
|
<span class="text-lg font-bold"> ${i||h`<span class="inline-block h-6 w-16 animate-pulse rounded bg-gray-200"></span>`} </span>
|
|
@@ -1704,14 +1739,14 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1704
1739
|
<!-- <div class="my-4 border-t border-gray-200"></div> -->
|
|
1705
1740
|
|
|
1706
1741
|
<!-- <button
|
|
1707
|
-
@click="${
|
|
1742
|
+
@click="${m(this,H,Zh)}"
|
|
1708
1743
|
?disabled="${!this._isValidUrl}"
|
|
1709
1744
|
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">
|
|
1710
1745
|
${this.labels.addToCart}
|
|
1711
1746
|
</button> -->
|
|
1712
1747
|
</div>
|
|
1713
1748
|
</div>
|
|
1714
|
-
`}};
|
|
1749
|
+
`}};H=new WeakSet,Gh=function(){if(!this.product?.url){this._isValidUrl=!1;return}try{let t=new URL(this.product.url);this._isValidUrl=t.protocol==="http:"||t.protocol==="https:"}catch{this._isValidUrl=!1}},Ns=function(t){t.preventDefault(),!(!this.product?.url||!this._isValidUrl)&&window.open(this.product.url,"_blank")},Zh=function(t){!this.product?.url||!this._isValidUrl||(window.open(this.product.url,"_blank"),this.dispatchEvent(new Ws.AddToCartEvent(this.product)))},Hs=function(t,n){o(this,H,zs)&&gl({from:t,to:n,duration:300,onUpdate:i=>{o(this,H,zs)&&(o(this,H,zs).style.transform=`translateX(${i}%)`)}})},Jh=function(){if(!this.product?.images?.length)return;let t=this._currentImageIndex,n=(t+1)%this.product.images.length,i=-(t*100),s=-(n*100);m(this,H,Hs).call(this,i,s),this._currentImageIndex=n},Kh=function(){if(!this.product?.images?.length)return;let t=this._currentImageIndex,n=(t-1+this.product.images.length)%this.product.images.length,i=-(t*100),s=-(n*100);m(this,H,Hs).call(this,i,s),this._currentImageIndex=n},Yh=function(t){if(!this.product?.images?.length)return;let n=this._currentImageIndex,i=Math.max(0,Math.min(t,this.product.images.length-1)),s=-(n*100),a=-(i*100);m(this,H,Hs).call(this,s,a),this._currentImageIndex=i},zs=function(){return this.renderRoot.querySelector(".image-slider")},w(Ws,"properties",{product:{type:Object},labels:{type:Object},_currentImageIndex:{type:Number,state:!0},_isValidUrl:{type:Boolean,state:!0}});var Kn=Ws,wl;Kn.AddToCartEvent=(wl=class extends CustomEvent{constructor(e,t={}){super(Kn.AddToCartEvent.type,{detail:{product:e},...t})}},w(wl,"type","mw-product-card:add-to-cart"),wl);customElements.get("mw-product-card")||customElements.define("mw-product-card",Kn);function Br(r){return Array.isArray(r)?r:r?[r]:[]}function Xh(r,e){let t=new Map;for(let n of r){let i=e(n);t.has(i)||t.set(i,[]),(t.get(i)||[]).push(n)}return t}var Gs=(r,e,t)=>{for(let n of e)if(n[0]===r)return(0,n[1])();return t?.()};var Zs=class extends _($){constructor(){super(),this.orderDetails=null,this.streaming=!1,this.linksNewTab=!1,this.color="#601feb"}render(){let e=Br(this.orderDetails?.order_status?.step||[]),t=Br(this.orderDetails?.items?.item||[]),n=Br(this.orderDetails?.actions||[]);return h`
|
|
1715
1750
|
<div class="flex w-full max-w-md flex-col rounded-3xl border bg-white p-4">
|
|
1716
1751
|
<!-- Header with order ID -->
|
|
1717
1752
|
<div class="mb-2">
|
|
@@ -1740,7 +1775,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1740
1775
|
${l?"":h`<div class="${`absolute left-2 top-2 -ml-px mt-0.5 h-full w-0.5 ${a?`bg-[${this.color}]`:"bg-gray-300"}`}" aria-hidden="true"></div>`}
|
|
1741
1776
|
|
|
1742
1777
|
<div class="group relative flex items-start">
|
|
1743
|
-
${
|
|
1778
|
+
${Gs(i.status,[["pending",()=>h` <span class="flex h-6 items-center">
|
|
1744
1779
|
<span class="flex h-4 w-4 items-center justify-center rounded-full border-2 border-gray-300 bg-white">
|
|
1745
1780
|
<span class="h-1.5 w-1.5 rounded-full bg-transparent"></span>
|
|
1746
1781
|
</span>
|
|
@@ -1770,7 +1805,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1770
1805
|
|
|
1771
1806
|
<!-- Products list with order items -->
|
|
1772
1807
|
<div class="mb-2 w-full">
|
|
1773
|
-
${
|
|
1808
|
+
${t.length===0&&!this.orderDetails?.total?.amount&&this.streaming?h`
|
|
1774
1809
|
<!-- Loading shimmer for products -->
|
|
1775
1810
|
<div class="w-full space-y-4">
|
|
1776
1811
|
<div class="flex items-center gap-2">
|
|
@@ -1787,7 +1822,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1787
1822
|
</div>
|
|
1788
1823
|
`:h`
|
|
1789
1824
|
<div class="divide-y divide-gray-100">
|
|
1790
|
-
${this.streaming&&!
|
|
1825
|
+
${this.streaming&&!t.length?h`
|
|
1791
1826
|
<!-- Loading shimmer for individual products -->
|
|
1792
1827
|
${[1,2].map(()=>h`
|
|
1793
1828
|
<div class="flex items-center gap-2 py-1.5">
|
|
@@ -1798,7 +1833,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1798
1833
|
<div class="h-4 w-24 animate-pulse rounded bg-gray-200"></div>
|
|
1799
1834
|
</div>
|
|
1800
1835
|
`)}
|
|
1801
|
-
`:
|
|
1836
|
+
`:t?.map(i=>{let s=i?.image_url;return h`
|
|
1802
1837
|
<div class="flex items-center gap-2 py-1.5">
|
|
1803
1838
|
<img src="${ue(s)}" class="block h-12 w-12 rounded-lg bg-gray-100 object-contain" loading="lazy" />
|
|
1804
1839
|
|
|
@@ -1883,11 +1918,11 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1883
1918
|
|
|
1884
1919
|
<!-- Action buttons section -->
|
|
1885
1920
|
<div class="flex w-full flex-col gap-2 overflow-hidden">
|
|
1886
|
-
${this.streaming&&!n[0]?.track_order?.label&&!
|
|
1921
|
+
${this.streaming&&!n[0]?.track_order?.label&&!ta(n[0]?.track_order?.tracking_url||"")?h`
|
|
1887
1922
|
<!-- Loading shimmer for buttons -->
|
|
1888
1923
|
<div class="h-10 w-full min-w-[250px] animate-pulse overflow-hidden rounded-xl bg-gray-200"></div>
|
|
1889
1924
|
`:_e(n,(i,s)=>`action-${s}`,i=>{if(i?.track_order?.label)return h`
|
|
1890
|
-
${
|
|
1925
|
+
${ta(i.track_order?.tracking_url||"")?h` <a
|
|
1891
1926
|
target="${this.linksNewTab?"_blank":"_self"}"
|
|
1892
1927
|
href="${i.track_order?.tracking_url}"
|
|
1893
1928
|
class="mt-1 w-full rounded-xl bg-[${this.color}] px-4 py-2 text-center text-sm font-medium text-white hover:opacity-90"
|
|
@@ -1896,271 +1931,14 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
1896
1931
|
`})}
|
|
1897
1932
|
</div>
|
|
1898
1933
|
</div>
|
|
1899
|
-
`}};w(
|
|
1900
|
-
<g clip-path="url(#clip0_72_99)">
|
|
1901
|
-
<path d="M4.05111 17.7979C3.3811 17.609 2.88528 16.8228 3.02311 16.1679C3.08754 15.8613 3.62488 14.8916 5.66696 11.3969C7.31253 8.58086 7.16807 8.79614 7.5579 8.57693C8.1651 8.23577 8.85729 8.35944 9.3574 8.89876C9.57406 9.13227 12.7138 14.5138 13.2446 15.5611C13.7013 16.4624 13.4779 17.2918 12.6683 17.7008C12.3026 17.8856 12.1445 17.9027 10.807 17.9027H9.34544V16.7853V15.668L9.90628 15.6413C10.3909 15.6177 10.4707 15.5894 10.4932 15.4321C10.5327 15.1567 8.50761 11.6728 8.28829 11.6389C8.1454 11.6169 7.90872 11.9632 7.01429 13.5023C5.77516 15.6347 5.77068 15.6592 6.61953 15.6592H7.10209V16.7809V17.9026L5.73364 17.8869C4.98099 17.8869 4.22386 17.8397 4.05111 17.7894V17.7979ZM16.1369 16.4297C15.9485 16.3605 15.7151 16.2328 15.6182 16.1451C15.4392 15.9829 13.9709 13.5122 14.0263 13.4663C14.1601 13.3547 15.8055 12.4296 15.8647 12.4316C15.9066 12.4331 16.0522 12.6179 16.1881 12.8416C16.5946 13.5112 16.6682 13.4466 17.8815 11.3525C18.4675 10.3409 18.947 9.46699 18.947 9.41041C18.947 9.22184 18.6781 9.19843 16.514 9.19843C14.0428 9.19843 14.0805 9.18271 14.4881 9.94894C14.6196 10.1953 14.7176 10.4028 14.7059 10.4095C13.2307 11.2587 12.9019 11.4418 12.8521 11.4418C12.819 11.4418 12.4606 10.8657 12.0557 10.1617C11.3983 9.0185 11.3196 8.83291 11.3196 8.42529C11.3196 7.92054 11.5349 7.51511 11.9768 7.18779C12.2256 7.0033 12.3073 7 16.5532 7C20.5886 7 20.8942 7.01571 21.1455 7.16469C21.7124 7.51134 21.9754 8.15783 21.8067 8.79033C21.7221 9.1076 18.1774 15.3666 17.7607 15.9344C17.3974 16.4295 16.7103 16.639 16.1369 16.4297Z" fill="currentColor"/>
|
|
1902
|
-
</g>
|
|
1903
|
-
<defs>
|
|
1904
|
-
<clipPath id="clip0_72_99">
|
|
1905
|
-
<rect width="24" height="24" fill="white"/>
|
|
1906
|
-
</clipPath>
|
|
1907
|
-
</defs>
|
|
1908
|
-
</svg>`,alipay:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1909
|
-
<g clip-path="url(#clip0_72_123)">
|
|
1910
|
-
<path d="M7.4235 12.7583C6.978 12.8033 6.13875 12.999 5.682 13.4018C4.3095 14.5942 5.13075 16.7768 7.9095 16.7768C9.525 16.7768 11.1383 15.7485 12.405 14.0992C10.6005 13.224 9.07275 12.5963 7.4235 12.7583ZM20.28 3H3.72C3.32175 3 3 3.32175 3 3.72V20.28C3 20.6783 3.32175 21 3.72 21H20.28C20.6783 21 21 20.6783 21 20.28V3.72C21 3.32175 20.6783 3 20.28 3ZM20.9415 17.922C20.9415 17.922 16.2975 15.9915 13.9508 14.8688C12.378 16.797 10.3485 17.9693 8.2425 17.9693C4.6785 17.9693 3.47025 14.862 5.1555 12.8168C5.52225 12.3713 6.15 11.946 7.11975 11.7052C8.6385 11.334 11.0573 11.937 13.323 12.6818C13.7303 11.9325 14.0745 11.109 14.3288 10.2315H7.34475V9.525H10.9448V8.2605H6.58425V7.55625H10.9448V5.754C10.9448 5.754 10.9447 5.45025 11.253 5.45025H13.0125V7.55625H17.3258V8.2605H13.0147V9.525H16.5338C16.1963 10.8998 15.6855 12.1665 15.0443 13.278C16.113 13.6628 17.0715 14.0273 17.7847 14.2658C20.3565 15.1253 20.9393 15.1703 20.9393 15.1703V17.922H20.9415Z" fill="currentColor"/>
|
|
1911
|
-
</g>
|
|
1912
|
-
<defs>
|
|
1913
|
-
<clipPath id="clip0_72_123">
|
|
1914
|
-
<rect width="24" height="24" fill="white"/>
|
|
1915
|
-
</clipPath>
|
|
1916
|
-
</defs>
|
|
1917
|
-
</svg>`,"apple-pay":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1918
|
-
<path d="M22.4 20H1.6C0.716667 20 0 19.2833 0 18.4V5.6C0 4.71667 0.716667 4 1.6 4H22.4C23.2833 4 24 4.71667 24 5.6V18.4C24 19.2833 23.2833 20 22.4 20ZM18.5287 15.26V16C18.6347 16.0147 18.7567 16.0233 18.8807 16.0233H18.8913C19.8207 16.0233 20.2613 15.662 20.6413 14.592L22.3173 9.892H21.348L20.224 13.5227H20.204L19.08 9.892H18.0827L19.6993 14.3673L19.6127 14.6393C19.554 15.0053 19.24 15.2813 18.8627 15.2813C18.844 15.2813 18.8253 15.2807 18.8067 15.2793H18.8093C18.7347 15.276 18.5873 15.2673 18.5287 15.26ZM3.80867 9.36933H3.79133C3.20067 9.386 2.69067 9.71533 2.41933 10.1967L2.41533 10.2047C1.85267 11.1727 2.21067 12.654 2.83333 13.556C3.12533 13.9827 3.44533 14.4 3.86733 14.4H3.89C4.06667 14.3887 4.23 14.3427 4.37733 14.2687L4.37 14.272C4.548 14.1827 4.75733 14.13 4.97867 14.128C5.19267 14.1293 5.39533 14.1813 5.57333 14.272L5.566 14.2687C5.70933 14.3433 5.878 14.3887 6.05733 14.3927H6.05867H6.07667C6.54667 14.384 6.84133 13.9527 7.102 13.5727C7.288 13.3033 7.442 12.9933 7.55 12.662L7.55733 12.6367V12.63L7.54533 12.6247C7.02533 12.388 6.67 11.8747 6.66667 11.2773C6.672 10.7467 6.95133 10.282 7.37 10.0187L7.376 10.0153L7.388 10.0073C7.11533 9.61533 6.672 9.358 6.168 9.34467H6.166C6.14267 9.34467 6.11867 9.34467 6.09533 9.34467C5.798 9.36067 5.52067 9.432 5.26933 9.54933L5.28333 9.54333C5.16867 9.59933 5.03533 9.64 4.89467 9.65733L4.88867 9.658C4.73667 9.64133 4.598 9.6 4.47133 9.53733L4.47867 9.54067C4.28333 9.446 4.05467 9.384 3.814 9.368H3.80867V9.36933ZM15.884 10.58C16.4707 10.58 16.7947 10.8547 16.7947 11.3527V11.692L15.604 11.7627C14.4873 11.83 13.8973 12.2827 13.8973 13.0713C13.9053 13.81 14.5053 14.4053 15.2453 14.4053C15.3013 14.4053 15.356 14.402 15.41 14.3953L15.4033 14.396C15.416 14.3967 15.4313 14.3967 15.4467 14.3967C16.026 14.3967 16.5327 14.0847 16.8073 13.6187L16.8113 13.6113H16.8313V14.346H17.7147V11.2887C17.7147 10.402 17.0073 9.83 15.9127 9.83C14.9033 9.83 14.1527 10.4087 14.1227 11.2053H14.9827C15.0787 10.8393 15.406 10.574 15.7953 10.574C15.8267 10.574 15.858 10.576 15.8887 10.5793L15.8847 10.5787L15.884 10.58ZM9.33333 8.20267V14.3467H10.2873V12.2453H11.6053C11.636 12.2473 11.6727 12.248 11.7087 12.248C12.7873 12.248 13.6613 11.374 13.6613 10.2953C13.6613 10.268 13.6607 10.2413 13.66 10.2147V10.2187C13.6613 10.1933 13.662 10.164 13.662 10.134C13.662 9.066 12.7967 8.20067 11.7287 8.20067C11.6967 8.20067 11.6647 8.20133 11.6333 8.20267H11.638H9.33333ZM6.16867 7.73333C5.77267 7.772 5.42733 7.96 5.184 8.24L5.18267 8.242C4.96067 8.49067 4.82533 8.82067 4.82533 9.182C4.82533 9.21333 4.82667 9.24467 4.82867 9.27533V9.27133C4.85133 9.27133 4.87533 9.274 4.902 9.274C5.27533 9.25267 5.60267 9.074 5.82067 8.80267L5.82267 8.8C6.04067 8.542 6.17333 8.206 6.17333 7.838C6.17333 7.80133 6.172 7.76467 6.16933 7.728V7.73267L6.16867 7.73333ZM15.6593 13.6673C15.154 13.6673 14.8267 13.424 14.8267 13.048C14.8267 12.66 15.14 12.4367 15.7333 12.4013L16.7933 12.3347V12.682C16.77 13.234 16.3167 13.672 15.7613 13.672C15.7253 13.672 15.69 13.67 15.6547 13.6667L15.6593 13.6673ZM11.3807 11.4473H10.2847V9.00667H11.3847C11.4313 9 11.4853 8.996 11.5407 8.996C12.1747 8.996 12.6887 9.51 12.6887 10.144C12.6887 10.172 12.6873 10.2007 12.6853 10.228V10.224C12.6873 10.248 12.688 10.2767 12.688 10.3053C12.688 10.9413 12.172 11.4573 11.536 11.4573C11.4813 11.4573 11.4267 11.4533 11.374 11.446L11.38 11.4467L11.3807 11.4473Z" fill="currentColor"/>
|
|
1919
|
-
</svg>`,"arrow-left-start-on-rectangle-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" >
|
|
1920
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15m-3 0-3-3m0 0 3-3m-3 3H15" />
|
|
1921
|
-
</svg>`,"arrow-up-circle":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1922
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="m15 11.25-3-3m0 0-3 3m3-3v7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
|
|
1923
|
-
</svg>`,"bank-transfer":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1924
|
-
<g clip-path="url(#clip0_72_63)">
|
|
1925
|
-
<path d="M3.75 21H20.25M4.5 3H19.5M5.25 3V21M18.75 3V21M9 6.75H10.5M9 9.75H10.5M9 12.75H10.5M13.5 6.75H15M13.5 9.75H15M13.5 12.75H15M9 21V17.625C9 17.004 9.504 16.5 10.125 16.5H13.875C14.496 16.5 15 17.004 15 17.625V21" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1926
|
-
</g>
|
|
1927
|
-
<defs>
|
|
1928
|
-
<clipPath id="clip0_72_63">
|
|
1929
|
-
<rect width="24" height="24" fill="white"/>
|
|
1930
|
-
</clipPath>
|
|
1931
|
-
</defs>
|
|
1932
|
-
</svg>`,bitcoin:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1933
|
-
<path d="M13.513 13.6932C13.1584 15.1245 10.7555 14.3498 9.96759 14.1528L10.5979 11.6185C11.3857 11.8155 13.8807 12.1963 13.513 13.6932ZM11.4645 8.15198L10.8868 10.4499C11.5433 10.6074 13.5524 11.2771 13.8807 9.97716C14.2089 8.6247 12.1211 8.30955 11.4645 8.15198ZM21.7068 14.0347C20.3017 19.6548 14.6029 23.082 8.96963 21.6901C3.34953 20.285 -0.0908073 14.5862 1.31422 8.96606C2.71924 3.33288 8.41813 -0.0812019 14.0514 1.31069C19.6715 2.71572 23.1118 8.4146 21.7068 14.0347ZM8.06359 13.2599C8.01106 13.4044 7.86662 13.6145 7.53834 13.5357C7.48582 13.5357 6.69796 13.3256 6.69796 13.3256L6.12019 14.6387L7.61713 15.0064C7.90601 15.0851 8.16864 15.1508 8.44439 15.2296L7.97167 17.1336L9.11407 17.4225L9.58679 15.5316C9.90194 15.6235 10.204 15.6892 10.506 15.768L10.0332 17.6457L11.1888 17.9346L11.6615 16.0306C13.6312 16.3982 15.115 16.2538 15.7321 14.468C16.2311 13.0367 15.7059 12.2094 14.6685 11.6711C15.417 11.5004 15.9816 11.0014 16.1392 9.97716C16.3493 8.5853 15.2857 7.8237 13.8281 7.33785L14.3008 5.43385L13.1453 5.14496L12.6857 6.98331C12.3837 6.90453 12.0686 6.83887 11.7534 6.76008L12.213 4.9086L11.0706 4.61972L10.5979 6.51059C10.3484 6.45807 10.0989 6.39241 9.86254 6.33989L8.27368 5.93283L7.97167 7.16715C7.97167 7.16715 8.81206 7.36411 8.81206 7.37724C9.27164 7.49542 9.35043 7.79744 9.35043 8.04693L8.05046 13.2337L8.06359 13.2599Z" fill="currentColor"/>
|
|
1934
|
-
</svg>`,"card-payment":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1935
|
-
<path d="M2.25 8.25H21.75M2.25 9H21.75M5.25 14.25H11.25M5.25 16.5H8.25M4.5 19.5H19.5C20.0967 19.5 20.669 19.2629 21.091 18.841C21.5129 18.419 21.75 17.8467 21.75 17.25V6.75C21.75 6.15326 21.5129 5.58097 21.091 5.15901C20.669 4.73705 20.0967 4.5 19.5 4.5H4.5C3.90326 4.5 3.33097 4.73705 2.90901 5.15901C2.48705 5.58097 2.25 6.15326 2.25 6.75V17.25C2.25 17.8467 2.48705 18.419 2.90901 18.841C3.33097 19.2629 3.90326 19.5 4.5 19.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1936
|
-
</svg>`,"cash-on-delivery":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1937
|
-
<g clip-path="url(#clip0_72_58)">
|
|
1938
|
-
<path d="M2.25 18.75C7.58561 18.7457 12.898 19.4522 18.047 20.851C18.774 21.049 19.5 20.509 19.5 19.755V18.75M3.75 4.5V5.25C3.75 5.44891 3.67098 5.63968 3.53033 5.78033C3.38968 5.92098 3.19891 6 3 6H2.25M2.25 6V5.625C2.25 5.004 2.754 4.5 3.375 4.5H20.25M2.25 6V15M20.25 4.5V5.25C20.25 5.664 20.586 6 21 6H21.75M20.25 4.5H20.625C21.246 4.5 21.75 5.004 21.75 5.625V15.375C21.75 15.996 21.246 16.5 20.625 16.5H20.25M2.25 15V15.375C2.25 15.6734 2.36853 15.9595 2.5795 16.1705C2.79048 16.3815 3.07663 16.5 3.375 16.5H3.75M2.25 15H3C3.19891 15 3.38968 15.079 3.53033 15.2197C3.67098 15.3603 3.75 15.5511 3.75 15.75V16.5M20.25 16.5V15.75C20.25 15.5511 20.329 15.3603 20.4697 15.2197C20.6103 15.079 20.8011 15 21 15H21.75M20.25 16.5H3.75M15 10.5C15 11.2956 14.6839 12.0587 14.1213 12.6213C13.5587 13.1839 12.7956 13.5 12 13.5C11.2044 13.5 10.4413 13.1839 9.87868 12.6213C9.31607 12.0587 9 11.2956 9 10.5C9 9.70435 9.31607 8.94129 9.87868 8.37868C10.4413 7.81607 11.2044 7.5 12 7.5C12.7956 7.5 13.5587 7.81607 14.1213 8.37868C14.6839 8.94129 15 9.70435 15 10.5ZM18 10.5H18.008V10.508H18V10.5ZM6 10.5H6.008V10.508H6V10.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1939
|
-
</g>
|
|
1940
|
-
<defs>
|
|
1941
|
-
<clipPath id="clip0_72_58">
|
|
1942
|
-
<rect width="24" height="24" fill="white"/>
|
|
1943
|
-
</clipPath>
|
|
1944
|
-
</defs>
|
|
1945
|
-
</svg>`,"chart-bar-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" >
|
|
1946
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
|
|
1947
|
-
</svg>`,"chart-bar":`<!-- https://heroicons.com/ chart-bar -->
|
|
1948
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
1949
|
-
<path d="M18.375 2.25c-1.035 0-1.875.84-1.875 1.875v15.75c0 1.035.84 1.875 1.875 1.875h.75c1.035 0 1.875-.84 1.875-1.875V4.125c0-1.036-.84-1.875-1.875-1.875h-.75zM9.75 8.625c0-1.036.84-1.875 1.875-1.875h.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-.75a1.875 1.875 0 01-1.875-1.875V8.625zM3 13.125c0-1.036.84-1.875 1.875-1.875h.75c1.036 0 1.875.84 1.875 1.875v6.75c0 1.035-.84 1.875-1.875 1.875h-.75A1.875 1.875 0 013 19.875v-6.75z" />
|
|
1950
|
-
</svg>`,"chat-bubble-bottom-center-text":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
1951
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" />
|
|
1952
|
-
</svg>`,"chat-bubble-left-right-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
1953
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 01-.825-.242m9.345-8.334a2.126 2.126 0 00-.476-.095 48.64 48.64 0 00-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0011.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155" />
|
|
1954
|
-
</svg>`,"chat-bubble-left-right":`<!-- https://heroicons.com/ chat-bubble-left-right -->
|
|
1955
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" >
|
|
1956
|
-
<path d="M3.505 2.365A41.369 41.369 0 019 2c1.863 0 3.697.124 5.495.365 1.247.167 2.18 1.108 2.435 2.268a4.45 4.45 0 00-.577-.069 43.141 43.141 0 00-4.706 0C9.229 4.696 7.5 6.727 7.5 8.998v2.24c0 1.413.67 2.735 1.76 3.562l-2.98 2.98A.75.75 0 015 17.25v-3.443c-.501-.048-1-.106-1.495-.172C2.033 13.438 1 12.162 1 10.72V5.28c0-1.441 1.033-2.717 2.505-2.914z" />
|
|
1957
|
-
<path d="M14 6c-.762 0-1.52.02-2.271.062C10.157 6.148 9 7.472 9 8.998v2.24c0 1.519 1.147 2.839 2.71 2.935.214.013.428.024.642.034.2.009.385.09.518.224l2.35 2.35a.75.75 0 001.28-.531v-2.07c1.453-.195 2.5-1.463 2.5-2.915V8.998c0-1.526-1.157-2.85-2.729-2.936A41.645 41.645 0 0014 6z" />
|
|
1958
|
-
</svg>`,"chat-bubble-oval-left-ellipsis":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
1959
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M8.625 12a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0zm0 0h-.375M21 12c0 4.556-4.03 8.25-9 8.25a9.764 9.764 0 0 1-2.555-.337A5.972 5.972 0 0 1 5.41 20.97a5.969 5.969 0 0 1-.474-.065 4.48 4.48 0 0 0 .978-2.025c.09-.457-.133-.901-.467-1.226C3.93 16.178 3 14.189 3 12c0-4.556 4.03-8.25 9-8.25s9 3.694 9 8.25z"/>
|
|
1960
|
-
</svg>`,"chat-bubble-oval-left":`<!-- https://heroicons.com/ chat-bubble-oval-left -->
|
|
1961
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" >
|
|
1962
|
-
<path fill-rule="evenodd" d="M2 10c0-3.967 3.69-7 8-7 4.31 0 8 3.033 8 7s-3.69 7-8 7a9.165 9.165 0 01-1.504-.123 5.976 5.976 0 01-3.935 1.107.75.75 0 01-.584-1.143 3.478 3.478 0 00.522-1.756C2.979 13.825 2 12.025 2 10z" clip-rule="evenodd" />
|
|
1963
|
-
</svg>`,"check-circle":`<!-- https://heroicons.com/ -->
|
|
1964
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
|
|
1965
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
|
|
1966
|
-
</svg>`,"cog-wheel":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1967
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
|
|
1968
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
1969
|
-
</svg>`,"cog-wheel-solid":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
1970
|
-
<path fill-rule="evenodd" d="M11.078 2.25c-.917 0-1.699.663-1.85 1.567L9.05 4.889c-.02.12-.115.26-.297.348a7.493 7.493 0 0 0-.986.57c-.166.115-.334.126-.45.083L6.3 5.508a1.875 1.875 0 0 0-2.282.819l-.922 1.597a1.875 1.875 0 0 0 .432 2.385l.84.692c.095.078.17.229.154.43a7.598 7.598 0 0 0 0 1.139c.015.2-.059.352-.153.43l-.841.692a1.875 1.875 0 0 0-.432 2.385l.922 1.597a1.875 1.875 0 0 0 2.282.818l1.019-.382c.115-.043.283-.031.45.082.312.214.641.405.985.57.182.088.277.228.297.35l.178 1.071c.151.904.933 1.567 1.85 1.567h1.844c.916 0 1.699-.663 1.85-1.567l.178-1.072c.02-.12.114-.26.297-.349.344-.165.673-.356.985-.57.167-.114.335-.125.45-.082l1.02.382a1.875 1.875 0 0 0 2.28-.819l.923-1.597a1.875 1.875 0 0 0-.432-2.385l-.84-.692c-.095-.078-.17-.229-.154-.43a7.614 7.614 0 0 0 0-1.139c-.016-.2.059-.352.153-.43l.84-.692c.708-.582.891-1.59.433-2.385l-.922-1.597a1.875 1.875 0 0 0-2.282-.818l-1.02.382c-.114.043-.282.031-.449-.083a7.49 7.49 0 0 0-.985-.57c-.183-.087-.277-.227-.297-.348l-.179-1.072a1.875 1.875 0 0 0-1.85-1.567h-1.843ZM12 15.75a3.75 3.75 0 1 0 0-7.5 3.75 3.75 0 0 0 0 7.5Z" clip-rule="evenodd" />
|
|
1971
|
-
</svg>
|
|
1972
|
-
`,"computer-desktop":`<!-- https://heroicons.com/ -->
|
|
1973
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"/></svg>`,"credit-card-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" >
|
|
1974
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z" />
|
|
1975
|
-
</svg>`,details:`<!-- https://www.svgrepo.com/svg/372349/details -->
|
|
1976
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">
|
|
1977
|
-
<path d="M32 6H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h28a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2Zm0 22H4V8h28Z"/>
|
|
1978
|
-
<path d="M9 14h18a1 1 0 0 0 0-2H9a1 1 0 0 0 0 2Z"/>
|
|
1979
|
-
<path d="M9 18h18a1 1 0 0 0 0-2H9a1 1 0 0 0 0 2Z"/>
|
|
1980
|
-
<path d="M9 22h10a1 1 0 0 0 0-2H9a1 1 0 0 0 0 2Z"/>
|
|
1981
|
-
<path fill="none" d="M0 0h36v36H0z"/>
|
|
1982
|
-
</svg>`,"document-magnifying-glass":`<!-- heroicons -->
|
|
1983
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1984
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m5.231 13.481L15 17.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v16.5c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Zm3.75 11.625a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z" />
|
|
1985
|
-
</svg>`,"document-minus":`<!-- heroicons -->
|
|
1986
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
1987
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m6.75 12H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />
|
|
1988
|
-
</svg>`,"document-text":`<!-- https://heroicons.com/ document-text -->
|
|
1989
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" >
|
|
1990
|
-
<path fill-rule="evenodd" d="M4.5 2A1.5 1.5 0 003 3.5v13A1.5 1.5 0 004.5 18h11a1.5 1.5 0 001.5-1.5V7.621a1.5 1.5 0 00-.44-1.06l-4.12-4.122A1.5 1.5 0 0011.378 2H4.5zm2.25 8.5a.75.75 0 000 1.5h6.5a.75.75 0 000-1.5h-6.5zm0 3a.75.75 0 000 1.5h6.5a.75.75 0 000-1.5h-6.5z" clip-rule="evenodd" />
|
|
1991
|
-
</svg>`,"e-checks":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1992
|
-
<g clip-path="url(#clip0_72_130)">
|
|
1993
|
-
<g clip-path="url(#clip1_72_130)">
|
|
1994
|
-
<path d="M16.862 4.487L18.549 2.799C18.9007 2.44733 19.3777 2.24976 19.875 2.24976C20.3723 2.24976 20.8493 2.44733 21.201 2.799C21.5527 3.15068 21.7502 3.62766 21.7502 4.125C21.7502 4.62235 21.5527 5.09933 21.201 5.451L10.582 16.07C10.0533 16.5984 9.40137 16.9867 8.685 17.2L6 18L6.8 15.315C7.01328 14.5986 7.40163 13.9467 7.93 13.418L16.862 4.487ZM16.862 4.487L19.5 7.125M18 14V18.75C18 19.3467 17.7629 19.919 17.341 20.341C16.919 20.763 16.3467 21 15.75 21H5.25C4.65326 21 4.08097 20.763 3.65901 20.341C3.23705 19.919 3 19.3467 3 18.75V8.25C3 7.65327 3.23705 7.08097 3.65901 6.65901C4.08097 6.23706 4.65326 6 5.25 6H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1995
|
-
</g>
|
|
1996
|
-
</g>
|
|
1997
|
-
<defs>
|
|
1998
|
-
<clipPath id="clip0_72_130">
|
|
1999
|
-
<rect width="24" height="24" fill="white"/>
|
|
2000
|
-
</clipPath>
|
|
2001
|
-
<clipPath id="clip1_72_130">
|
|
2002
|
-
<rect width="24" height="24" fill="white"/>
|
|
2003
|
-
</clipPath>
|
|
2004
|
-
</defs>
|
|
2005
|
-
</svg>`,"eye-slash":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
2006
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88" />
|
|
2007
|
-
</svg>`,facebook:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="1 1 14 14">
|
|
2008
|
-
<path fill="currentColor" d="M15 8a7 7 0 0 0-7-7 7 7 0 0 0-1.094 13.915v-4.892H5.13V8h1.777V6.458c0-1.754 1.045-2.724 2.644-2.724.766 0 1.567.137 1.567.137v1.723h-.883c-.87 0-1.14.54-1.14 1.093V8h1.941l-.31 2.023H9.094v4.892A7.001 7.001 0 0 0 15 8z"/>
|
|
2009
|
-
<path fill="#fff" d="M10.725 10.023 11.035 8H9.094V6.687c0-.553.27-1.093 1.14-1.093h.883V3.87s-.801-.137-1.567-.137c-1.6 0-2.644.97-2.644 2.724V8H5.13v2.023h1.777v4.892a7.037 7.037 0 0 0 2.188 0v-4.892h1.63z"/>
|
|
2010
|
-
</svg>`,"gift-cards":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2011
|
-
<g clip-path="url(#clip0_72_117)">
|
|
2012
|
-
<g clip-path="url(#clip1_72_117)">
|
|
2013
|
-
<path d="M21 11.25V19.5C21 19.8978 20.842 20.2794 20.5607 20.5607C20.2794 20.842 19.8978 21 19.5 21H5.25C4.85218 21 4.47064 20.842 4.18934 20.5607C3.90804 20.2794 3.75 19.8978 3.75 19.5V11.25M12 4.875C12 4.35582 11.846 3.84831 11.5576 3.41663C11.2692 2.98495 10.8592 2.6485 10.3795 2.44982C9.89989 2.25114 9.37209 2.19915 8.86289 2.30044C8.35369 2.40172 7.88596 2.65173 7.51884 3.01884C7.15173 3.38596 6.90172 3.85369 6.80044 4.36289C6.69915 4.87209 6.75114 5.39989 6.94982 5.87954C7.1485 6.3592 7.48495 6.76917 7.91663 7.05761C8.34831 7.34605 8.85582 7.5 9.375 7.5H12M12 4.875V7.5M12 4.875C12 4.35582 12.154 3.84831 12.4424 3.41663C12.7308 2.98495 13.1408 2.6485 13.6205 2.44982C14.1001 2.25114 14.6279 2.19915 15.1371 2.30044C15.6463 2.40172 16.114 2.65173 16.4812 3.01884C16.8483 3.38596 17.0983 3.85369 17.1996 4.36289C17.3008 4.87209 17.2489 5.39989 17.0502 5.87954C16.8515 6.3592 16.5151 6.76917 16.0834 7.05761C15.6517 7.34605 15.1442 7.5 14.625 7.5H12M12 7.5V21M3.375 11.25H21.375C21.996 11.25 22.5 10.746 22.5 10.125V8.625C22.5 8.004 21.996 7.5 21.375 7.5H3.375C2.754 7.5 2.25 8.004 2.25 8.625V10.125C2.25 10.746 2.754 11.25 3.375 11.25Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2014
|
-
</g>
|
|
2015
|
-
</g>
|
|
2016
|
-
<defs>
|
|
2017
|
-
<clipPath id="clip0_72_117">
|
|
2018
|
-
<rect width="24" height="24" fill="white"/>
|
|
2019
|
-
</clipPath>
|
|
2020
|
-
<clipPath id="clip1_72_117">
|
|
2021
|
-
<rect width="24" height="24" fill="white"/>
|
|
2022
|
-
</clipPath>
|
|
2023
|
-
</defs>
|
|
2024
|
-
</svg>`,"identification-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
2025
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z" />
|
|
2026
|
-
</svg>`,identification:`<!-- heroicons -->
|
|
2027
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
2028
|
-
<path fill-rule="evenodd" d="M4.5 3.75a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V6.75a3 3 0 0 0-3-3h-15Zm4.125 3a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Zm-3.873 8.703a4.126 4.126 0 0 1 7.746 0 .75.75 0 0 1-.351.92 7.47 7.47 0 0 1-3.522.877 7.47 7.47 0 0 1-3.522-.877.75.75 0 0 1-.351-.92ZM15 8.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15ZM14.25 12a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H15a.75.75 0 0 1-.75-.75Zm.75 2.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15Z" clip-rule="evenodd" />
|
|
2029
|
-
</svg>`,"in-store-payment":`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2030
|
-
<g clip-path="url(#clip0_72_86)">
|
|
2031
|
-
<path d="M13.5 21V13.5C13.5 13.3011 13.579 13.1103 13.7197 12.9697C13.8603 12.829 14.0511 12.75 14.25 12.75H17.25C17.4489 12.75 17.6397 12.829 17.7803 12.9697C17.921 13.1103 18 13.3011 18 13.5V21M13.5 21H2.35999M13.5 21H18M18 21H21.64M20.25 21V9.349M20.25 9.349C19.6501 9.6951 18.9489 9.82304 18.2654 9.71113C17.5819 9.59922 16.9582 9.25435 16.5 8.735C15.95 9.357 15.146 9.75 14.25 9.75C13.8243 9.75041 13.4034 9.66 13.0154 9.48479C12.6274 9.30959 12.2812 9.05363 12 8.734C11.45 9.357 10.646 9.75 9.74999 9.75C9.32427 9.75041 8.90336 9.66 8.51536 9.48479C8.12736 9.30959 7.7812 9.05363 7.49999 8.734C7.04191 9.25351 6.41823 9.59858 5.73473 9.71067C5.05124 9.82276 4.35001 9.69498 3.74999 9.349M20.25 9.349C20.6486 9.11891 20.9889 8.80019 21.2446 8.41751C21.5003 8.03484 21.6645 7.59846 21.7245 7.14215C21.7846 6.68584 21.7388 6.22184 21.5908 5.78605C21.4428 5.35026 21.1965 4.95436 20.871 4.629L19.681 3.44C19.4 3.15862 19.0187 3.00035 18.621 3H5.37799C4.98044 3.00008 4.59919 3.15798 4.31799 3.439L3.12899 4.629C2.80423 4.95474 2.5586 5.3507 2.41106 5.78637C2.26351 6.22204 2.21799 6.68577 2.27799 7.14182C2.33799 7.59786 2.50191 8.03403 2.75713 8.41671C3.01234 8.79939 3.35202 9.11835 3.74999 9.349M3.74999 21V9.349M6.74999 18H10.5C10.6989 18 10.8897 17.921 11.0303 17.7803C11.171 17.6397 11.25 17.4489 11.25 17.25V13.5C11.25 13.3011 11.171 13.1103 11.0303 12.9697C10.8897 12.829 10.6989 12.75 10.5 12.75H6.74999C6.55108 12.75 6.36031 12.829 6.21966 12.9697C6.07901 13.1103 5.99999 13.3011 5.99999 13.5V17.25C5.99999 17.664 6.33599 18 6.74999 18Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2032
|
-
</g>
|
|
2033
|
-
<defs>
|
|
2034
|
-
<clipPath id="clip0_72_86">
|
|
2035
|
-
<rect width="24" height="24" fill="white"/>
|
|
2036
|
-
</clipPath>
|
|
2037
|
-
</defs>
|
|
2038
|
-
</svg>`,instagram:`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16">
|
|
2039
|
-
<path d="M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z" />
|
|
2040
|
-
</svg>`,instructions:`<!-- https://www.svgrepo.com/svg/453613/readme -->
|
|
2041
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26">
|
|
2042
|
-
<g fill="none" fill-rule="evenodd">
|
|
2043
|
-
<path stroke="currentColor" d="M20 20h4c.553 0 1-.445 1-.995V1.995A1 1 0 0 0 24 1H2c-.553 0-1 .445-1 .995v17.01c0 .544.448.995 1 .995h12.167l5.07 4.346c.425.365.763.21.763-.337V20z"/>
|
|
2044
|
-
<path fill="currentColor" d="M6 7h13v1H6zm0 3h13v1H6zm0 3h9v1H6z"/>
|
|
2045
|
-
</g>
|
|
2046
|
-
</svg>`,klarna:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2047
|
-
<path d="M4.40067 2V21.1667H0V2H4.40067ZM15.3832 2C15.3832 6.01925 13.8661 9.76729 11.1521 12.6068L10.8857 12.878L16.9644 21.1667H11.5326L4.92679 12.1583L6.63167 10.8818C9.37058 8.831 10.9777 5.72792 11.0755 2.32967L11.0802 2H15.3832ZM20.6042 16.375C21.2396 16.375 21.849 16.6274 22.2983 17.0767C22.7476 17.526 23 18.1354 23 18.7708C23 19.4062 22.7476 20.0156 22.2983 20.4649C21.849 20.9143 21.2396 21.1667 20.6042 21.1667C19.9688 21.1667 19.3594 20.9143 18.9101 20.4649C18.4608 20.0156 18.2083 19.4062 18.2083 18.7708C18.2083 18.1354 18.4608 17.526 18.9101 17.0767C19.3594 16.6274 19.9688 16.375 20.6042 16.375Z" fill="currentColor"/>
|
|
2048
|
-
</svg>`,knowledge:`<!-- https://www.svgrepo.com/svg/426146/info -->
|
|
2049
|
-
|
|
2050
|
-
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 48.296 48.257">
|
|
2051
|
-
<path d="M24.149 0C10.812 0 0 10.8 0 24.125c0 13.326 10.812 24.132 24.149 24.132 13.334 0 24.147-10.807 24.147-24.132C48.296 10.8 37.483 0 24.149 0zm2.022 35.919a2.023 2.023 0 0 1-4.047 0V22.507a2.024 2.024 0 0 1 4.047 0v13.412zm0-20.818a2.022 2.022 0 0 1-2.022 2.022 2.021 2.021 0 0 1-2.025-2.022v-.633c0-1.119.905-2.022 2.025-2.022 1.115 0 2.022.903 2.022 2.022v.633z"/>
|
|
2052
|
-
</svg>`,loader:'<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.84998 7.49998C1.84998 4.66458 4.05979 1.84998 7.49998 1.84998C10.2783 1.84998 11.6515 3.9064 12.2367 5H10.5C10.2239 5 10 5.22386 10 5.5C10 5.77614 10.2239 6 10.5 6H13.5C13.7761 6 14 5.77614 14 5.5V2.5C14 2.22386 13.7761 2 13.5 2C13.2239 2 13 2.22386 13 2.5V4.31318C12.2955 3.07126 10.6659 0.849976 7.49998 0.849976C3.43716 0.849976 0.849976 4.18537 0.849976 7.49998C0.849976 10.8146 3.43716 14.15 7.49998 14.15C9.44382 14.15 11.0622 13.3808 12.2145 12.2084C12.8315 11.5806 13.3133 10.839 13.6418 10.0407C13.7469 9.78536 13.6251 9.49315 13.3698 9.38806C13.1144 9.28296 12.8222 9.40478 12.7171 9.66014C12.4363 10.3425 12.0251 10.9745 11.5013 11.5074C10.5295 12.4963 9.16504 13.15 7.49998 13.15C4.05979 13.15 1.84998 10.3354 1.84998 7.49998Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>',loading:`<svg aria-hidden="true" role="status" class="animate-spin" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2053
|
-
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
|
|
2054
|
-
<path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="#784dff"/>
|
|
2055
|
-
</svg>`,"molin-logo":`<svg viewBox="0 0 1600 1600" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2056
|
-
<g clip-path="url(#clip0_1347_2815)">
|
|
2057
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M800 1600C1241.83 1600 1600 1241.83 1600 800C1600 358.172 1241.83 0 800 0C358.172 0 0 358.172 0 800C0 1241.83 358.172 1600 800 1600ZM1053.93 1204.94C1004.11 1233.7 944.905 1241.5 889.338 1226.61C833.772 1211.72 786.395 1175.37 757.632 1125.55C757.546 1125.4 757.46 1125.25 757.375 1125.1C757.312 1124.99 757.248 1124.88 757.185 1124.77L757.051 1124.53C756.97 1124.4 756.89 1124.26 756.81 1124.12C756.729 1123.98 756.648 1123.85 756.567 1123.71L520.274 714.434C516.674 706.633 512.851 698.527 508.828 690.171V690.175C500.263 672.388 490.791 653.467 480.628 633.946C430.934 538.484 383.555 464.79 374.805 469.345C366.054 473.901 399.245 554.98 448.939 650.442C470.289 691.455 491.212 728.45 508.828 756.948V793.508H508.83V1010.2V1226.89C451.303 1226.89 396.132 1204.06 355.455 1163.43C314.777 1122.79 291.925 1067.67 291.925 1010.2C291.925 1009.83 291.925 1009.45 291.927 1009.08C291.924 1008.71 291.922 1008.34 291.922 1007.97V471.125C291.922 423.461 322.67 382.979 365.413 368.431C406.508 353.902 452.128 352.113 494.791 363.544C550.357 378.433 597.734 414.786 626.497 464.606C626.705 464.966 626.911 465.326 627.117 465.687C627.194 465.819 627.272 465.951 627.349 466.083C627.42 466.205 627.49 466.326 627.561 466.448L837.024 829.249L837.025 829.249L945.478 1017.09L1053.93 1204.94ZM813.776 363.545C758.21 348.656 699.004 356.451 649.184 385.214L757.637 573.06L758.402 574.384C758.5 574.557 758.599 574.729 758.698 574.901L1075.55 1123.71C1075.71 1123.98 1075.87 1124.26 1076.03 1124.53L1076.16 1124.76C1076.31 1125.02 1076.46 1125.28 1076.62 1125.55C1105.38 1175.37 1152.75 1211.72 1208.32 1226.61C1263.89 1241.5 1323.09 1233.7 1372.91 1204.94L1264.46 1017.09L1156.01 829.249L1156.01 829.249L946.544 466.448C946.416 466.227 946.288 466.006 946.158 465.785C946.074 465.637 945.99 465.489 945.905 465.341C945.765 465.096 945.624 464.852 945.483 464.607C916.719 414.787 869.343 378.434 813.776 363.545Z" fill="currentColor" />
|
|
2058
|
-
</g>
|
|
2059
|
-
<defs>
|
|
2060
|
-
<clipPath id="clip0_1347_2815">
|
|
2061
|
-
<rect width="1600" height="1600" fill="white" />
|
|
2062
|
-
</clipPath>
|
|
2063
|
-
</defs>
|
|
2064
|
-
</svg>`,"paint-brush-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" >
|
|
2065
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M9.53 16.122a3 3 0 0 0-5.78 1.128 2.25 2.25 0 0 1-2.4 2.245 4.5 4.5 0 0 0 8.4-2.245c0-.399-.078-.78-.22-1.128Zm0 0a15.998 15.998 0 0 0 3.388-1.62m-5.043-.025a15.994 15.994 0 0 1 1.622-3.395m3.42 3.42a15.995 15.995 0 0 0 4.764-4.648l3.876-5.814a1.151 1.151 0 0 0-1.597-1.597L14.146 6.32a15.996 15.996 0 0 0-4.649 4.763m3.42 3.42a6.776 6.776 0 0 0-3.42-3.42" />
|
|
2066
|
-
</svg>`,"paint-brush":`<!-- https://heroicons.com/ paint-brush -->
|
|
2067
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" >
|
|
2068
|
-
<path d="M15.993 1.385a1.87 1.87 0 012.623 2.622l-4.03 5.27a12.749 12.749 0 01-4.237 3.562 4.508 4.508 0 00-3.188-3.188 12.75 12.75 0 013.562-4.236l5.27-4.03zM6 11a3 3 0 00-3 3 .5.5 0 01-.72.45.75.75 0 00-1.035.931A4.001 4.001 0 009 14.004V14a3.01 3.01 0 00-1.66-2.685A2.99 2.99 0 006 11z" />
|
|
2069
|
-
</svg>`,paypal:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2070
|
-
<g clip-path="url(#clip0_72_74)">
|
|
2071
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.4755 7.8999C19.2608 13.1169 15.5556 14 10.5787 14L9.07814 22H11.8254C12.3259 22 12.5355 21.6592 12.6278 21.1792C13.3129 16.8482 13.2166 17.5569 13.2788 16.8789C13.338 16.5009 13.6649 16 14.0491 16C17.6981 16 20.1184 14.9452 20.8576 11.1582C21.1204 9.8112 21.0341 8.7719 20.4755 7.8999ZM9.13431 13.8599L8.01193 20H4.53546C4.20647 20 3.95471 19.5979 4.00686 19.2739L6.60267 2.75098C6.67088 2.31898 7.04502 2 7.48434 2H13.7181C17.4092 2 19.8947 3.4012 19.32 7.0542C18.3139 13.5602 12.7371 13 10.1995 13C9.76018 13 9.20351 13.4279 9.13431 13.8599Z" fill="currentColor"/>
|
|
2072
|
-
</g>
|
|
2073
|
-
<defs>
|
|
2074
|
-
<clipPath id="clip0_72_74">
|
|
2075
|
-
<rect width="24" height="24" fill="white"/>
|
|
2076
|
-
</clipPath>
|
|
2077
|
-
</defs>
|
|
2078
|
-
</svg>`,"pencil-square":`<!-- https://heroicons.com/ pencil-square -->
|
|
2079
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" >
|
|
2080
|
-
<path d="M5.433 13.917l1.262-3.155A4 4 0 017.58 9.42l6.92-6.918a2.121 2.121 0 013 3l-6.92 6.918c-.383.383-.84.685-1.343.886l-3.154 1.262a.5.5 0 01-.65-.65z" />
|
|
2081
|
-
<path d="M3.5 5.75c0-.69.56-1.25 1.25-1.25H10A.75.75 0 0010 3H4.75A2.75 2.75 0 002 5.75v9.5A2.75 2.75 0 004.75 18h9.5A2.75 2.75 0 0017 15.25V10a.75.75 0 00-1.5 0v5.25c0 .69-.56 1.25-1.25 1.25h-9.5c-.69 0-1.25-.56-1.25-1.25v-9.5z" />
|
|
2082
|
-
</svg>`,personality:`<!-- https://www.svgrepo.com/svg/501320/quiz-instructions -->
|
|
2083
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1920">
|
|
2084
|
-
<path fill-rule="evenodd" d="M1920 332v1257H0V332h1920Zm-689 797H409v113h822v-113Zm275-226H409v113h1097V903Zm-275-226H409v113h822V677Z"/>
|
|
2085
|
-
</svg>`,"phone-arrow-down-left":`<!-- https://heroicons.com/ phone-arrow-down-left -->
|
|
2086
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5">
|
|
2087
|
-
<path d="M3.5 2A1.5 1.5 0 0 0 2 3.5V5c0 1.149.15 2.263.43 3.326a13.022 13.022 0 0 0 9.244 9.244c1.063.28 2.177.43 3.326.43h1.5a1.5 1.5 0 0 0 1.5-1.5v-1.148a1.5 1.5 0 0 0-1.175-1.465l-3.223-.716a1.5 1.5 0 0 0-1.767 1.052l-.267.933c-.117.41-.555.643-.95.48a11.542 11.542 0 0 1-6.254-6.254c-.163-.395.07-.833.48-.95l.933-.267a1.5 1.5 0 0 0 1.052-1.767l-.716-3.223A1.5 1.5 0 0 0 4.648 2H3.5ZM16.72 2.22a.75.75 0 1 1 1.06 1.06L14.56 6.5h2.69a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 1 1.5 0v2.69l3.22-3.22Z" />
|
|
2088
|
-
</svg>`,phone:`<!-- heroicons -->
|
|
2089
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
|
|
2090
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z"/>
|
|
2091
|
-
</svg>`,"placeholder-avatar":'<svg fill="currentColor" viewBox="0 0 24 24"><path d="M24 20.993V24H0v-2.996A14.977 14.977 0 0112.004 15c4.904 0 9.26 2.354 11.996 5.993zM16.002 8.999a4 4 0 11-8 0 4 4 0 018 0z"></path></svg>',"plus-circle-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
2092
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
2093
|
-
</svg>`,"puzzle-piece-solid":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
2094
|
-
<path d="M11.25 5.337c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.036 1.007-1.875 2.25-1.875S15 2.34 15 3.375c0 .369-.128.713-.349 1.003-.215.283-.401.604-.401.959 0 .332.278.598.61.578 1.91-.114 3.79-.342 5.632-.676a.75.75 0 0 1 .878.645 49.17 49.17 0 0 1 .376 5.452.657.657 0 0 1-.66.664c-.354 0-.675-.186-.958-.401a1.647 1.647 0 0 0-1.003-.349c-1.035 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401.31 0 .557.262.534.571a48.774 48.774 0 0 1-.595 4.845.75.75 0 0 1-.61.61c-1.82.317-3.673.533-5.555.642a.58.58 0 0 1-.611-.581c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.035-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959a.641.641 0 0 1-.658.643 49.118 49.118 0 0 1-4.708-.36.75.75 0 0 1-.645-.878c.293-1.614.504-3.257.629-4.924A.53.53 0 0 0 5.337 15c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.036 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.369 0 .713.128 1.003.349.283.215.604.401.959.401a.656.656 0 0 0 .659-.663 47.703 47.703 0 0 0-.31-4.82.75.75 0 0 1 .83-.832c1.343.155 2.703.254 4.077.294a.64.64 0 0 0 .657-.642Z" />
|
|
2095
|
-
</svg>`,"question-mark-circle-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
2096
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0zm-9 5.25h.008v.008H12v-.008z"/>
|
|
2097
|
-
</svg>`,"question-mark-circle":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
2098
|
-
<path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm11.378-3.917c-.89-.777-2.366-.777-3.255 0a.75.75 0 0 1-.988-1.129c1.454-1.272 3.776-1.272 5.23 0 1.513 1.324 1.513 3.518 0 4.842a3.75 3.75 0 0 1-.837.552c-.676.328-1.028.774-1.028 1.152v.75a.75.75 0 0 1-1.5 0v-.75c0-1.279 1.06-2.107 1.875-2.502.182-.088.351-.199.503-.331.83-.727.83-1.857 0-2.584ZM12 18a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z" clip-rule="evenodd" />
|
|
2099
|
-
</svg>`,"rectangle-group-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
2100
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 01-1.125-1.125v-3.75zM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-8.25zM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 01-1.125-1.125v-2.25z" />
|
|
2101
|
-
</svg>`,"rocket-launch-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
2102
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z" />
|
|
2103
|
-
</svg>`,"rocket-launch":`<!-- https://heroicons.com/ rocket-launch -->
|
|
2104
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" >
|
|
2105
|
-
<path fill-rule="evenodd" d="M4.606 12.97a.75.75 0 01-.134 1.051 2.494 2.494 0 00-.93 2.437 2.494 2.494 0 002.437-.93.75.75 0 111.186.918 3.995 3.995 0 01-4.482 1.332.75.75 0 01-.461-.461 3.994 3.994 0 011.332-4.482.75.75 0 011.052.134z" clip-rule="evenodd" />
|
|
2106
|
-
<path fill-rule="evenodd" d="M5.752 12A13.07 13.07 0 008 14.248v4.002c0 .414.336.75.75.75a5 5 0 004.797-6.414 12.984 12.984 0 005.45-10.848.75.75 0 00-.735-.735 12.984 12.984 0 00-10.849 5.45A5 5 0 001 11.25c.001.414.337.75.751.75h4.002zM13 9a2 2 0 100-4 2 2 0 000 4z" clip-rule="evenodd" />
|
|
2107
|
-
</svg>`,"save-outline":`<!-- https://www.svgrepo.com/svg/505487/save -->
|
|
2108
|
-
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g stroke-width="0"></g><g stroke-linecap="round" stroke-linejoin="round"></g><g> <path d="M15 20V15H9V20M18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4H14.1716C14.702 4 15.2107 4.21071 15.5858 4.58579L19.4142 8.41421C19.7893 8.78929 20 9.29799 20 9.82843V18C20 19.1046 19.1046 20 18 20Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg>`,"shopping-bag-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
2109
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />
|
|
2110
|
-
</svg>`,"shopping-bag":`<!-- heroicons -->
|
|
2111
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
2112
|
-
<path fill-rule="evenodd" d="M7.5 6v.75H5.513c-.96 0-1.764.724-1.865 1.679l-1.263 12A1.875 1.875 0 0 0 4.25 22.5h15.5a1.875 1.875 0 0 0 1.865-2.071l-1.263-12a1.875 1.875 0 0 0-1.865-1.679H16.5V6a4.5 4.5 0 1 0-9 0ZM12 3a3 3 0 0 0-3 3v.75h6V6a3 3 0 0 0-3-3Zm-3 8.25a3 3 0 1 0 6 0v-.75a.75.75 0 0 1 1.5 0v.75a4.5 4.5 0 1 1-9 0v-.75a.75.75 0 0 1 1.5 0v.75Z" clip-rule="evenodd" />
|
|
2113
|
-
</svg>`,"sparkles-solid":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
2114
|
-
<path fill-rule="evenodd" d="M9 4.5a.75.75 0 0 1 .721.544l.813 2.846a3.75 3.75 0 0 0 2.576 2.576l2.846.813a.75.75 0 0 1 0 1.442l-2.846.813a3.75 3.75 0 0 0-2.576 2.576l-.813 2.846a.75.75 0 0 1-1.442 0l-.813-2.846a3.75 3.75 0 0 0-2.576-2.576l-2.846-.813a.75.75 0 0 1 0-1.442l2.846-.813A3.75 3.75 0 0 0 7.466 7.89l.813-2.846A.75.75 0 0 1 9 4.5ZM18 1.5a.75.75 0 0 1 .728.568l.258 1.036c.236.94.97 1.674 1.91 1.91l1.036.258a.75.75 0 0 1 0 1.456l-1.036.258c-.94.236-1.674.97-1.91 1.91l-.258 1.036a.75.75 0 0 1-1.456 0l-.258-1.036a2.625 2.625 0 0 0-1.91-1.91l-1.036-.258a.75.75 0 0 1 0-1.456l1.036-.258a2.625 2.625 0 0 0 1.91-1.91l.258-1.036A.75.75 0 0 1 18 1.5ZM16.5 15a.75.75 0 0 1 .712.513l.394 1.183c.15.447.5.799.948.948l1.183.395a.75.75 0 0 1 0 1.422l-1.183.395c-.447.15-.799.5-.948.948l-.395 1.183a.75.75 0 0 1-1.422 0l-.395-1.183a1.5 1.5 0 0 0-.948-.948l-1.183-.395a.75.75 0 0 1 0-1.422l1.183-.395c.447-.15.799-.5.948-.948l.395-1.183A.75.75 0 0 1 16.5 15Z" clip-rule="evenodd" />
|
|
2115
|
-
</svg>`,sparkles:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" >
|
|
2116
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z" />
|
|
2117
|
-
</svg>`,"table-cells":`<!-- https://heroicons.com/ table-cells -->
|
|
2118
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" >
|
|
2119
|
-
<path fill-rule="evenodd" d="M.99 5.24A2.25 2.25 0 013.25 3h13.5A2.25 2.25 0 0119 5.25l.01 9.5A2.25 2.25 0 0116.76 17H3.26A2.267 2.267 0 011 14.74l-.01-9.5zm8.26 9.52v-.625a.75.75 0 00-.75-.75H3.25a.75.75 0 00-.75.75v.615c0 .414.336.75.75.75h5.373a.75.75 0 00.627-.74zm1.5 0a.75.75 0 00.627.74h5.373a.75.75 0 00.75-.75v-.615a.75.75 0 00-.75-.75H11.5a.75.75 0 00-.75.75v.625zm6.75-3.63v-.625a.75.75 0 00-.75-.75H11.5a.75.75 0 00-.75.75v.625c0 .414.336.75.75.75h5.25a.75.75 0 00.75-.75zm-8.25 0v-.625a.75.75 0 00-.75-.75H3.25a.75.75 0 00-.75.75v.625c0 .414.336.75.75.75H8.5a.75.75 0 00.75-.75zM17.5 7.5v-.625a.75.75 0 00-.75-.75H11.5a.75.75 0 00-.75.75V7.5c0 .414.336.75.75.75h5.25a.75.75 0 00.75-.75zm-8.25 0v-.625a.75.75 0 00-.75-.75H3.25a.75.75 0 00-.75.75V7.5c0 .414.336.75.75.75H8.5a.75.75 0 00.75-.75z" clip-rule="evenodd" />
|
|
2120
|
-
</svg>`,templates:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
|
2121
|
-
<path fill-rule="evenodd" d="M4.25 2A2.25 2.25 0 002 4.25v2.5A2.25 2.25 0 004.25 9h2.5A2.25 2.25 0 009 6.75v-2.5A2.25 2.25 0 006.75 2h-2.5zm0 9A2.25 2.25 0 002 13.25v2.5A2.25 2.25 0 004.25 18h2.5A2.25 2.25 0 009 15.75v-2.5A2.25 2.25 0 006.75 11h-2.5zm9-9A2.25 2.25 0 0011 4.25v2.5A2.25 2.25 0 0013.25 9h2.5A2.25 2.25 0 0018 6.75v-2.5A2.25 2.25 0 0015.75 2h-2.5zm0 9A2.25 2.25 0 0011 13.25v2.5A2.25 2.25 0 0013.25 18h2.5A2.25 2.25 0 0018 15.75v-2.5A2.25 2.25 0 0015.75 11h-2.5z" clip-rule="evenodd" />
|
|
2122
|
-
</svg>`,ticket:`<!-- heroicons -->
|
|
2123
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
2124
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M16.5 6v.75m0 3v.75m0 3v.75m0 3V18m-9-5.25h5.25M7.5 15h3M3.375 5.25c-.621 0-1.125.504-1.125 1.125v3.026a2.999 2.999 0 0 1 0 5.198v3.026c0 .621.504 1.125 1.125 1.125h17.25c.621 0 1.125-.504 1.125-1.125v-3.026a2.999 2.999 0 0 1 0-5.198V6.375c0-.621-.504-1.125-1.125-1.125H3.375Z" />
|
|
2125
|
-
</svg>`,"trash-outline":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" >
|
|
2126
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
|
|
2127
|
-
</svg>`,twitter:`<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
|
|
2128
|
-
<path stroke="currentColor" d="M12.186 8.672 18.743.947h-2.927l-5.005 5.9-4.44-5.9H0l7.434 9.876-6.986 8.23h2.927l5.434-6.4 4.82 6.4H20L12.186 8.672Zm-2.267 2.671L8.544 9.515 3.2 2.42h2.2l4.312 5.719 1.375 1.828 5.731 7.613h-2.2l-4.699-6.237Z" />
|
|
2129
|
-
</svg>`,"user-circle":`<!-- heroicons -->
|
|
2130
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
2131
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
2132
|
-
</svg>`,"user-solid":`<!-- heroicons -->
|
|
2133
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
2134
|
-
<path fill-rule="evenodd" d="M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z" clip-rule="evenodd" />
|
|
2135
|
-
</svg>`,user:`<!-- heroicons -->
|
|
2136
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
2137
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" />
|
|
2138
|
-
</svg>`,users:`<!-- heroicons -->
|
|
2139
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
2140
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z" />
|
|
2141
|
-
</svg>`,"wechat-pay":`<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2142
|
-
<path d="M10.0425 15.8914C9.87678 15.9759 9.68475 15.9928 9.50688 15.9384C9.32901 15.8841 9.17922 15.7627 9.08913 15.6L9.04254 15.4971L7.07304 11.1659C7.06497 11.1139 7.06497 11.0609 7.07304 11.0088C7.07288 10.9615 7.08222 10.9146 7.1005 10.8709C7.11877 10.8272 7.14562 10.7876 7.17946 10.7545C7.21329 10.7214 7.25342 10.6954 7.29748 10.678C7.34154 10.6607 7.38862 10.6523 7.43596 10.6535C7.5129 10.6519 7.588 10.6772 7.64829 10.725L10.01 12.3793C10.1851 12.4964 10.3908 12.5593 10.6015 12.5602C10.7285 12.5609 10.8543 12.5366 10.972 12.4887L21.8562 7.61367C20.7399 6.38076 19.372 5.40176 17.8449 4.74278C16.3179 4.08381 14.6671 3.76021 13.0043 3.79383C7.01779 3.79383 2.16663 7.83467 2.16663 12.8592C2.2017 14.2127 2.56028 15.5382 3.21238 16.7248C3.86449 17.9114 4.79117 18.9246 5.91496 19.6798C6.03454 19.768 6.12378 19.8911 6.17036 20.0322C6.21693 20.1733 6.21854 20.3254 6.17496 20.4674L5.68746 22.3102C5.65782 22.3941 5.63925 22.4815 5.63221 22.5702C5.63117 22.618 5.63983 22.6655 5.65764 22.7099C5.67546 22.7542 5.70208 22.7945 5.73588 22.8283C5.76969 22.8621 5.80999 22.8887 5.85436 22.9066C5.89873 22.9244 5.94624 22.933 5.99404 22.932C6.06674 22.9281 6.13738 22.9065 6.19988 22.8692L8.56154 21.4988C8.73488 21.3926 8.93313 21.3352 9.13679 21.3341C9.24404 21.3341 9.35021 21.3493 9.45096 21.3807C10.6025 21.7057 11.792 21.8703 12.988 21.8682C18.9735 21.8682 23.8322 17.8284 23.8322 12.844C23.8435 11.3574 23.4313 9.89832 22.6438 8.63742L10.1291 15.8438L10.0425 15.8914Z" fill="currentColor"/>
|
|
2143
|
-
</svg>`,"wrench-screwdriver-solid":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
2144
|
-
<path fill-rule="evenodd" d="M12 6.75a5.25 5.25 0 0 1 6.775-5.025.75.75 0 0 1 .313 1.248l-3.32 3.319c.063.475.276.934.641 1.299.365.365.824.578 1.3.64l3.318-3.319a.75.75 0 0 1 1.248.313 5.25 5.25 0 0 1-5.472 6.756c-1.018-.086-1.87.1-2.309.634L7.344 21.3A3.298 3.298 0 1 1 2.7 16.657l8.684-7.151c.533-.44.72-1.291.634-2.309A5.342 5.342 0 0 1 12 6.75ZM4.117 19.125a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75h-.008a.75.75 0 0 1-.75-.75v-.008Z" clip-rule="evenodd" />
|
|
2145
|
-
<path d="m10.076 8.64-2.201-2.2V4.874a.75.75 0 0 0-.364-.643l-3.75-2.25a.75.75 0 0 0-.916.113l-.75.75a.75.75 0 0 0-.113.916l2.25 3.75a.75.75 0 0 0 .643.364h1.564l2.062 2.062 1.575-1.297Z" />
|
|
2146
|
-
<path fill-rule="evenodd" d="m12.556 17.329 4.183 4.182a3.375 3.375 0 0 0 4.773-4.773l-3.306-3.305a6.803 6.803 0 0 1-1.53.043c-.394-.034-.682-.006-.867.042a.589.589 0 0 0-.167.063l-3.086 3.748Zm3.414-1.36a.75.75 0 0 1 1.06 0l1.875 1.876a.75.75 0 1 1-1.06 1.06L15.97 17.03a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" />
|
|
2147
|
-
</svg>`};var Bt=class extends wr{constructor(e){if(super(e),this.it=Z,e.type!==ss.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Z||e==null)return this._t=void 0,this.it=e;if(e===Ie)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let r=[e];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};Bt.directiveName="unsafeHTML",Bt.resultType=1;var eu=vr(Bt);var Xn=class extends Bt{};Xn.directiveName="unsafeSVG",Xn.resultType=2;var tu=vr(Xn);var Vr,Qn=class extends Vt($){constructor(){super();d(this,Vr,"");this.icon=""}updated(r){if(super.updated(r),r.has("icon")){let n=Qc[this.icon];n&&(g(this,Vr,n),this.requestUpdate())}}render(){return this.icon&&o(this,Vr)?tu(o(this,Vr)):null}};Vr=new WeakMap,w(Qn,"properties",{icon:{type:String}}),w(Qn,"styles",H`
|
|
2148
|
-
:host(:not([class])) svg {
|
|
2149
|
-
width: 20px;
|
|
2150
|
-
height: 20px;
|
|
2151
|
-
}
|
|
2152
|
-
:host([class]) svg {
|
|
2153
|
-
width: 100%;
|
|
2154
|
-
height: 100%;
|
|
2155
|
-
}
|
|
2156
|
-
`);customElements.define("m-svg-icon",Qn);var Js=class extends Vt($){render(){return h`
|
|
1934
|
+
`}};w(Zs,"properties",{orderDetails:{type:Object,attribute:"order-details"},streaming:{type:Boolean},linksNewTab:{type:Boolean,attribute:"links-new-tab"},color:{type:String}});customElements.get("mw-product-order-status-card")||customElements.define("mw-product-order-status-card",Zs);var M0={".section-spacing":{"@apply":"relative flex justify-center px-[25px] py-16 sm:px-9 sm:py-[45px] lg:px-24 lg:py-[104px]"}},yl=Cn({preflight:{...M0},hash:!1,darkMode:"class",theme:{extend:{fontFamily:{display:["Work Sans","sans-serif"],sans:["Inter","sans-serif"]},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"}}}},presets:[ts(),Xi(),Qi(),rs()],ignorelist:/^(sb-|css-|sbdocs|docblock|innerZoomElementWrapper|docs-|rejt-)/});var vl=r=>ns(yl)(r);var Js=class extends vl($){render(){return h`
|
|
2157
1935
|
<svg width="10" height="10" viewBox="0 0 10 10" aria-hidden="true">
|
|
2158
1936
|
<g fill-rule="evenodd">
|
|
2159
1937
|
<path part="line" stroke="currentColor" fill="currentColor" d="M0 5h7"></path>
|
|
2160
1938
|
<path part="tip" stroke="currentColor" fill="transparent" d="M1 1l4 4-4 4"></path>
|
|
2161
1939
|
</g>
|
|
2162
1940
|
</svg>
|
|
2163
|
-
`}};w(Js,"styles",
|
|
1941
|
+
`}};w(Js,"styles",J`
|
|
2164
1942
|
:host {
|
|
2165
1943
|
--w-hover-arrow--hovered: 0;
|
|
2166
1944
|
}
|
|
@@ -2174,238 +1952,66 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2174
1952
|
transform: translateX(calc(var(--w-hover-arrow--hovered) * 3px));
|
|
2175
1953
|
transition: transform 0.3s ease-in-out;
|
|
2176
1954
|
}
|
|
2177
|
-
`);customElements.define("w-hover-arrow",Js);var
|
|
2178
|
-
<span
|
|
2179
|
-
class="group relative inline-block h-auto w-full rounded-full border border-black/20 bg-transparent p-[1px] shadow-[0px_0px_3.13px_0px_#0000001a] duration-200 ease-[cubic-bezier(0.33,1,0.68,1)] disabled:cursor-default disabled:opacity-80 lg:hover:border-transparent lg:hover:shadow-none"
|
|
2180
|
-
?disabled="${this.disabled}">
|
|
2181
|
-
<span
|
|
2182
|
-
part="btn-rainbow-gradient"
|
|
2183
|
-
class="absolute top-1/2 left-1/2 block h-[calc(100%_+_4px)] w-[calc(100%_+_6px)] -translate-x-1/2 -translate-y-1/2 rounded-[80px] bg-transparent bg-cover bg-no-repeat transition-all duration-200 ease-in-out">
|
|
2184
|
-
</span>
|
|
2185
|
-
<span
|
|
2186
|
-
class="to-violet relative flex h-full w-full flex-row items-center justify-center gap-1 rounded-full bg-gradient-to-r from-[#8d00ff] from-40% px-8 py-2 text-center font-sans text-base leading-6 font-medium text-white transition-all ease-[cubic-bezier(0.33,1,0.68,1)] hover:from-[#0a2540] hover:to-[#0a2540] hover:shadow-xl">
|
|
2187
|
-
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
2188
|
-
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
2189
|
-
<slot></slot>
|
|
2190
|
-
</span>
|
|
2191
|
-
</span>
|
|
2192
|
-
</span>
|
|
2193
|
-
`}renderSecondary(){return h`
|
|
2194
|
-
<span
|
|
2195
|
-
class="group inline-block rounded-full border-[0.5px] border-current bg-current px-6 py-1.5 text-center font-sans text-sm leading-6 font-medium transition-[color,opacity,box-shadow] duration-200 ease-[cubic-bezier(0.215,0.61,0.355,1)] hover:opacity-90 hover:shadow-xl disabled:cursor-default disabled:opacity-80"
|
|
2196
|
-
?disabled="${this.disabled}">
|
|
2197
|
-
<span class="flex items-center justify-center gap-3 whitespace-nowrap text-white">
|
|
2198
|
-
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
2199
|
-
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
2200
|
-
<slot></slot>
|
|
2201
|
-
</span>
|
|
2202
|
-
<w-hover-arrow class="group-hover:[--w-hover-arrow--hovered:1]"></w-hover-arrow>
|
|
2203
|
-
</span>
|
|
2204
|
-
</span>
|
|
2205
|
-
`}renderBlack(){return h`
|
|
2206
|
-
<span
|
|
2207
|
-
class="${this.disabled?"pointer-events-none opacity-50":""} inline-flex h-9 items-center justify-center gap-3 rounded-md bg-[#18181A] px-4 py-2 text-sm font-medium whitespace-nowrap text-[#FAFAFA] shadow transition-colors hover:bg-[#18181A]/80">
|
|
2208
|
-
${this.isLoading?h`<m-svg-icon class="h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
2209
|
-
<slot></slot>
|
|
2210
|
-
</span>
|
|
2211
|
-
`}renderLink(){return h`
|
|
2212
|
-
<span
|
|
2213
|
-
class="group relative flex items-center justify-center gap-3 font-sans text-sm font-semibold whitespace-nowrap text-black disabled:cursor-default disabled:opacity-80 lg:hover:text-[#8D00FF]"
|
|
2214
|
-
?disabled="${this.disabled}">
|
|
2215
|
-
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
2216
|
-
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
2217
|
-
<slot></slot>
|
|
2218
|
-
</span>
|
|
2219
|
-
<w-hover-arrow class="group-hover:[--w-hover-arrow--hovered:1]"></w-hover-arrow>
|
|
2220
|
-
</span>
|
|
2221
|
-
`}renderTransparent(){return h`
|
|
2222
|
-
<span
|
|
2223
|
-
class="relative inline-block h-auto w-full rounded-full border border-black/20 bg-transparent p-[1px] shadow-[0px_0px_3.13px_0px_#0000001a] duration-200 ease-[cubic-bezier(0.33,1,0.68,1)] lg:hover:shadow-none">
|
|
2224
|
-
<span class="hover:border-violet relative inline-block w-full rounded-full border border-gray-500">
|
|
2225
|
-
<span
|
|
2226
|
-
class="hover:text-violet relative flex h-full w-full flex-row items-center justify-center gap-1 rounded-full bg-transparent px-8 py-[7px] text-center font-sans text-base leading-6 font-medium text-[#0A2540] transition-all ease-[cubic-bezier(0.33,1,0.68,1)] hover:cursor-pointer hover:shadow-xl disabled:cursor-default disabled:opacity-80">
|
|
2227
|
-
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
2228
|
-
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
2229
|
-
<slot></slot>
|
|
2230
|
-
</span>
|
|
2231
|
-
</span>
|
|
2232
|
-
</span>
|
|
2233
|
-
</span>
|
|
2234
|
-
`}renderTransparentRounded(){return h`
|
|
2235
|
-
<span
|
|
2236
|
-
class="inline-block h-12 w-full overflow-hidden rounded-3xl border-[0.5px] border-[#0A254033] bg-[#EEEDF133] p-[2px] shadow-[0px_0px_3.13px_0px_#0000001a] duration-200 ease-[cubic-bezier(0.33,1,0.68,1)]">
|
|
2237
|
-
<span
|
|
2238
|
-
class="lg:hover:border-violet lg:hover:text-violet flex h-full w-full items-center justify-center gap-5 rounded-3xl border border-[#0A2540] bg-transparent py-2 font-sans text-[15px] leading-[18px] font-semibold text-[#0A2540] disabled:cursor-default disabled:opacity-80 lg:text-lg lg:hover:border-2 lg:hover:bg-transparent">
|
|
2239
|
-
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
2240
|
-
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
2241
|
-
<slot></slot>
|
|
2242
|
-
</span>
|
|
2243
|
-
</span>
|
|
2244
|
-
</span>
|
|
2245
|
-
`}renderTransparentHover(){return h`
|
|
2246
|
-
<span
|
|
2247
|
-
class="hover:shadow[#e0e0e033] group relative inline-block w-full overflow-hidden rounded-full border-[0.5px] border-[#EEEDF133] p-[2px] shadow-[0px_0px_3.13px_0px_#0000001a] duration-200 ease-[cubic-bezier(0.33,1,0.68,1)] group-hover:bg-transparent hover:shadow-sm">
|
|
2248
|
-
<span
|
|
2249
|
-
class="absolute -top-[5px] -left-[5px] block h-[calc(100%+10px)] w-[calc(100%+10px)] rounded-[80px] bg-transparent bg-cover bg-no-repeat duration-200 ease-[cubic-bezier(0.33,1,0.68,1)] lg:group-hover:blur-[6px]">
|
|
2250
|
-
</span>
|
|
2251
|
-
<span
|
|
2252
|
-
class="relative flex h-auto w-auto items-center justify-center gap-5 rounded-full border px-6 py-2 font-sans text-base font-semibold text-white duration-200 ease-[cubic-bezier(0.33,1,0.68,1)] disabled:cursor-default disabled:opacity-80 sm:text-[15px] lg:group-hover:border-transparent lg:group-hover:bg-white lg:group-hover:text-black">
|
|
2253
|
-
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
2254
|
-
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
2255
|
-
<slot></slot>
|
|
2256
|
-
</span>
|
|
2257
|
-
|
|
2258
|
-
<!-- right arrow -->
|
|
2259
|
-
<svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2260
|
-
<path
|
|
2261
|
-
d="M19 9.49473C19 9.38257 18.9681 9.27259 18.9077 9.17697C18.8474 9.08136 18.761 9.00384 18.6581 8.95299L2.80405 1.12543C2.56474 1.01069 2.29394 0.973353 2.03124 1.01886C1.76854 1.06437 1.5277 1.19035 1.34392 1.37839C1.16014 1.56642 1.04305 1.80665 1.00977 2.06397C0.976486 2.3213 1.02875 2.58222 1.15893 2.80861L5.37636 9.49433L1.15893 16.1914C1.02875 16.4178 0.976486 16.6787 1.00977 16.936C1.04305 17.1933 1.16014 17.4336 1.34392 17.6216C1.5277 17.8096 1.76854 17.9356 2.03124 17.9811C2.29394 18.0266 2.56474 17.9893 2.80405 17.8746L18.6581 10.0365C18.761 9.98563 18.8474 9.9081 18.9077 9.81249C18.9681 9.71687 19 9.6069 19 9.49473ZM19 9.49473L5.37219 9.49433"
|
|
2262
|
-
class="lg:group-hover:stroke-black"
|
|
2263
|
-
stroke="white"
|
|
2264
|
-
stroke-width="1.2"
|
|
2265
|
-
stroke-linecap="round"
|
|
2266
|
-
stroke-linejoin="round" />
|
|
2267
|
-
</svg>
|
|
2268
|
-
</span>
|
|
2269
|
-
</span>
|
|
2270
|
-
`}renderGradient(){return h`
|
|
2271
|
-
<span class="group inline-block rounded-full border border-black/20 p-[1px]">
|
|
2272
|
-
<span
|
|
2273
|
-
class="to-violet hover:from-violet hover:to-violet flex flex-row items-center justify-center gap-1 rounded-full bg-gradient-to-r from-[#8d00ff] from-40% px-8 py-[5px] text-center font-sans text-sm leading-6 font-medium text-white transition-[background-image,box-shadow] hover:cursor-pointer hover:shadow-xl disabled:cursor-default disabled:opacity-80">
|
|
2274
|
-
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
2275
|
-
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
2276
|
-
<slot></slot>
|
|
2277
|
-
</span>
|
|
2278
|
-
</span>
|
|
2279
|
-
</span>
|
|
2280
|
-
`}renderDialogPrimary(){return h`
|
|
2281
|
-
<span class="inline-block rounded-full border border-violet-400/20 p-[1px]">
|
|
2282
|
-
<span
|
|
2283
|
-
class="flex flex-row items-center justify-center gap-1 rounded-full bg-gradient-to-r from-violet-600 to-violet-500 px-8 py-[5px] text-center font-sans text-sm leading-6 font-medium text-white transition-all hover:cursor-pointer hover:from-violet-500 hover:to-violet-500">
|
|
2284
|
-
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
2285
|
-
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
2286
|
-
<slot></slot>
|
|
2287
|
-
</span>
|
|
2288
|
-
</span>
|
|
2289
|
-
</span>
|
|
2290
|
-
`}renderDialogPrimaryDanger(){return h`
|
|
2291
|
-
<span class="inline-block rounded-full border border-red-400/20 p-[1px]">
|
|
2292
|
-
<span
|
|
2293
|
-
class="flex flex-row items-center justify-center gap-1 rounded-full bg-gradient-to-r from-red-600 to-red-500 px-8 py-[5px] text-center font-sans text-sm leading-6 font-medium text-white transition-all hover:cursor-pointer hover:from-red-500 hover:to-red-500">
|
|
2294
|
-
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
2295
|
-
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
2296
|
-
<slot></slot>
|
|
2297
|
-
</span>
|
|
2298
|
-
</span>
|
|
2299
|
-
</span>
|
|
2300
|
-
`}renderDialogSecondary(){return h`
|
|
2301
|
-
<span class="inline-block rounded-full p-[1px]">
|
|
2302
|
-
<span
|
|
2303
|
-
class="hover:text-violet flex flex-row items-center justify-center gap-1 rounded-full bg-neutral-400/10 bg-gradient-to-r px-8 py-[5px] text-center font-sans text-sm leading-6 font-medium transition-all hover:cursor-pointer">
|
|
2304
|
-
${this.isLoading?h`<m-svg-icon class="absolute h-5 w-5 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
2305
|
-
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
2306
|
-
<slot></slot>
|
|
2307
|
-
</span>
|
|
2308
|
-
</span>
|
|
2309
|
-
</span>
|
|
2310
|
-
`}renderNinjaSolid(){return h`
|
|
2311
|
-
<span
|
|
2312
|
-
class="text-${this.textColor} inline-flex h-10 items-center justify-center gap-2 rounded-2xl px-4 py-1.5 text-sm font-medium whitespace-nowrap transition-all duration-200 ease-[cubic-bezier(0.33,1,0.68,1)] hover:opacity-80 hover:shadow-md disabled:cursor-default disabled:opacity-50"
|
|
2313
|
-
style="background-color: ${this.bgColor}"
|
|
2314
|
-
?disabled="${this.disabled}">
|
|
2315
|
-
${this.isLoading?h`<m-svg-icon class="text-${this.textColor==="black"?"white":"black"} absolute h-4 w-4 stroke-2" icon="loading"></m-svg-icon>`:null}
|
|
2316
|
-
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
2317
|
-
<slot></slot>
|
|
2318
|
-
</span>
|
|
2319
|
-
</span>
|
|
2320
|
-
`}renderNinjaOutline(){return h`
|
|
2321
|
-
<span
|
|
2322
|
-
class="inline-flex h-10 items-center justify-center gap-2 rounded-2xl border border-[#ffffff20] bg-transparent px-4 py-1.5 text-sm font-medium whitespace-nowrap text-white transition-all duration-200 ease-[cubic-bezier(0.33,1,0.68,1)] hover:bg-[#ffffff10] disabled:cursor-default disabled:opacity-50"
|
|
2323
|
-
?disabled="${this.disabled}">
|
|
2324
|
-
${this.isLoading?h`<m-svg-icon class="absolute h-4 w-4 stroke-2" style="color: #FCBF0B;" icon="loading"></m-svg-icon>`:null}
|
|
2325
|
-
<span class="${this.isLoading?"opacity-0":""} transition-opacity">
|
|
2326
|
-
<slot></slot>
|
|
2327
|
-
</span>
|
|
2328
|
-
</span>
|
|
2329
|
-
`}render(){switch(me(Tp.includes(this.variant),`invalid variant: ${this.variant}`),this.variant){case"primary":return this.renderPrimary();case"secondary":return this.renderSecondary();case"black":return this.renderBlack();case"transparent":return this.renderTransparent();case"gradient":return this.renderGradient();case"transparent-hover":return this.renderTransparentHover();case"link":return this.renderLink();case"transparent-rounded":return this.renderTransparentRounded();case"dialog-primary":return this.renderDialogPrimary();case"dialog-primary-danger":return this.renderDialogPrimaryDanger();case"dialog-secondary":return this.renderDialogSecondary();case"ninja-solid":return this.renderNinjaSolid();case"ninja-outline":return this.renderNinjaOutline()}}};w(ei,"styles",H`
|
|
2330
|
-
:host {
|
|
2331
|
-
display: inline-block;
|
|
2332
|
-
line-height: 0;
|
|
2333
|
-
}
|
|
2334
|
-
|
|
2335
|
-
@media (min-width: 1024px) {
|
|
2336
|
-
.group:hover [part='btn-rainbow-gradient'] {
|
|
2337
|
-
background: conic-gradient(
|
|
2338
|
-
from 180deg at 50% 50%,
|
|
2339
|
-
#ffba71 0deg,
|
|
2340
|
-
#bc82f3 45deg,
|
|
2341
|
-
#f5b9eac9 90deg,
|
|
2342
|
-
#8d99ff 135deg,
|
|
2343
|
-
#aa6eeecf 180deg,
|
|
2344
|
-
#ff6778c2 225deg,
|
|
2345
|
-
#ffba71 270deg,
|
|
2346
|
-
#bc82f3 315deg,
|
|
2347
|
-
#ffba71 360deg
|
|
2348
|
-
);
|
|
2349
|
-
filter: blur(6.5px);
|
|
2350
|
-
}
|
|
2351
|
-
}
|
|
2352
|
-
`),w(ei,"properties",{variant:{type:String},disabled:{type:Boolean},isLoading:{type:Boolean,attribute:"loading"},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"}});customElements.define("w-button",ei);var ie,ru,nu,iu,su,ou,au,lu,vl,Br=class Br extends _($){constructor(){super();d(this,ie);this.title="",this.type="star-rating",this.color="#8B5CF6",this._hoverRating=0}render(){return h`
|
|
1955
|
+
`);customElements.get("w-hover-arrow")||customElements.define("w-hover-arrow",Js);var ne,Qh,ed,td,rd,nd,id,sd,xl,qr=class qr extends _($){constructor(){super();p(this,ne);this.title="",this.type="star-rating",this.color="#8B5CF6",this._hoverRating=0}render(){return h`
|
|
2353
1956
|
<div
|
|
2354
1957
|
class="focus-within: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}]">
|
|
2355
1958
|
<div class="flex flex-col gap-2 p-4">
|
|
2356
|
-
${
|
|
1959
|
+
${Gs(this.type,[["star-rating",()=>m(this,ne,ed).call(this)],["binary-vote",()=>m(this,ne,td).call(this)],["new-conversation-button",()=>m(this,ne,Qh).call(this)]],()=>h`<span class="text-sm text-gray-500">Unsupported input type</span>`)}
|
|
2357
1960
|
</div>
|
|
2358
1961
|
</div>
|
|
2359
|
-
`}};
|
|
1962
|
+
`}};ne=new WeakSet,Qh=function(){return h`
|
|
2360
1963
|
<button
|
|
2361
1964
|
type="button"
|
|
2362
|
-
@click="${()=>this.dispatchEvent(new
|
|
2363
|
-
<
|
|
1965
|
+
@click="${()=>this.dispatchEvent(new qr.SubmitEvent({type:"new-conversation-button"}))}">
|
|
1966
|
+
<span class="group relative flex items-center justify-center gap-3 font-sans text-sm font-semibold whitespace-nowrap text-[${this.color}]">
|
|
1967
|
+
${this.title||"Start a new conversation"}
|
|
1968
|
+
<w-hover-arrow class="text-[#8D00FF] group-hover:text-[${this.color}] group-hover:[--w-hover-arrow--hovered:1]"></w-hover-arrow>
|
|
1969
|
+
</span>
|
|
2364
1970
|
</button>
|
|
2365
|
-
`},
|
|
1971
|
+
`},ed=function(){return h`
|
|
2366
1972
|
${this.title?h`<p class="text-sm font-medium text-gray-700">${this.title}</p>`:null}
|
|
2367
1973
|
<div class="flex justify-center gap-1">
|
|
2368
|
-
${[1,2,3,4,5].map(
|
|
1974
|
+
${[1,2,3,4,5].map(t=>h`
|
|
2369
1975
|
<button
|
|
2370
1976
|
type="button"
|
|
2371
|
-
@click="${()=>
|
|
2372
|
-
@mouseenter="${()=>
|
|
2373
|
-
@mouseleave="${
|
|
1977
|
+
@click="${()=>m(this,ne,nd).call(this,t)}"
|
|
1978
|
+
@mouseenter="${()=>m(this,ne,id).call(this,t)}"
|
|
1979
|
+
@mouseleave="${m(this,ne,sd)}"
|
|
2374
1980
|
class="p-1 transition-transform hover:scale-110"
|
|
2375
|
-
aria-label="${
|
|
2376
|
-
${
|
|
1981
|
+
aria-label="${t} star${t>1?"s":""}">
|
|
1982
|
+
${m(this,ne,rd).call(this,t)}
|
|
2377
1983
|
</button>
|
|
2378
1984
|
`)}
|
|
2379
1985
|
</div>
|
|
2380
|
-
`},
|
|
1986
|
+
`},td=function(){return h`
|
|
2381
1987
|
${this.title?h`<p class="text-sm font-medium text-gray-700">${this.title}</p>`:null}
|
|
2382
1988
|
<div class="flex justify-center gap-4">
|
|
2383
1989
|
<button
|
|
2384
1990
|
type="button"
|
|
2385
|
-
@click="${()=>
|
|
2386
|
-
class="flex flex-col items-center gap-1 rounded-lg border-2 border-gray-300 p-1 transition-all hover:border-
|
|
1991
|
+
@click="${()=>m(this,ne,xl).call(this,"negative")}"
|
|
1992
|
+
class="flex flex-col items-center gap-1 rounded-lg border-2 border-gray-300 p-1 transition-all hover:border-red-400">
|
|
2387
1993
|
<svg class="h-6 w-6 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
2388
1994
|
<path
|
|
2389
1995
|
stroke-linecap="round"
|
|
2390
1996
|
stroke-linejoin="round"
|
|
2391
1997
|
stroke-width="2"
|
|
2392
|
-
d="
|
|
1998
|
+
d="M10 14H5.236a2 2 0 01-1.789-2.894l3.5-7A2 2 0 018.736 3h4.018a2 2 0 01.485.06l3.76.94m-7 10v5a2 2 0 002 2h.096c.5 0 .905-.405.905-.904 0-.715.211-1.413.608-2.008L17 13V4m-7 10h2m5-10h2a2 2 0 012 2v6a2 2 0 01-2 2h-2.5" />
|
|
2393
1999
|
</svg>
|
|
2394
2000
|
</button>
|
|
2395
2001
|
<button
|
|
2396
2002
|
type="button"
|
|
2397
|
-
@click="${()=>
|
|
2398
|
-
class="flex flex-col items-center gap-1 rounded-lg border-2 border-gray-300 p-1 transition-all hover:border-
|
|
2003
|
+
@click="${()=>m(this,ne,xl).call(this,"positive")}"
|
|
2004
|
+
class="flex flex-col items-center gap-1 rounded-lg border-2 border-gray-300 p-1 transition-all hover:border-green-400">
|
|
2399
2005
|
<svg class="h-6 w-6 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
2400
2006
|
<path
|
|
2401
2007
|
stroke-linecap="round"
|
|
2402
2008
|
stroke-linejoin="round"
|
|
2403
2009
|
stroke-width="2"
|
|
2404
|
-
d="
|
|
2010
|
+
d="M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5" />
|
|
2405
2011
|
</svg>
|
|
2406
2012
|
</button>
|
|
2407
2013
|
</div>
|
|
2408
|
-
`},
|
|
2014
|
+
`},rd=function(t){let n=t<=this._hoverRating;return h`
|
|
2409
2015
|
<svg class="${n?"text-yellow-400":"text-gray-300"} h-6 w-6" fill="${n?"currentColor":"none"}" stroke="currentColor" viewBox="0 0 24 24">
|
|
2410
2016
|
<path
|
|
2411
2017
|
stroke-linecap="round"
|
|
@@ -2413,51 +2019,59 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2413
2019
|
stroke-width="2"
|
|
2414
2020
|
d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" />
|
|
2415
2021
|
</svg>
|
|
2416
|
-
`},
|
|
2417
|
-
${
|
|
2022
|
+
`},nd=function(t){this._hoverRating=0,this.dispatchEvent(new qr.SubmitEvent({type:"star-rating",rating:t}))},id=function(t){this._hoverRating=t},sd=function(){this._hoverRating=0},xl=function(t){this.dispatchEvent(new qr.SubmitEvent({type:"binary-vote",vote:t}))},w(qr,"properties",{title:{type:String},type:{type:String},color:{type:String},_hoverRating:{type:Number,state:!0}});var Yn=qr,bl;Yn.SubmitEvent=(bl=class extends CustomEvent{constructor(e,t={}){super(Yn.SubmitEvent.type,{detail:e,bubbles:!0,composed:!0,...t})}},w(bl,"type","mw-request-input:submit"),bl);customElements.get("mw-request-input")||customElements.define("mw-request-input",Yn);var Xn=class extends br{constructor(e){if(super(e),this.it=W,e.type!==ss.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===W||e==null)return this._t=void 0,this.it=e;if(e===Ae)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Xn.directiveName="unsafeHTML",Xn.resultType=1;var od=os(Xn);var ad=Rc(ze({name:X(),description:X(),price:X(),image_url:fr([X(),dr(X())]),category:X(),url:X()}));function ld(r,e,t,{imagesByProductUrl:n,linksNewTab:i=!0,searchParams:s,messageIsStreaming:a=!1,isSupportAgent:u,color:l="#601feb",apiBaseUrl:c=""}){if(!r)return h``;let d=e>0&&t[e-1]&&"data"in t[e-1],f=e<t.length-1||!a;if("text"in r)return h`<p>${r.text}</p>`;if("html"in r)return h`${od(r.html)}`;if("data"in r)switch(r.tag){case"product-card":case"product-card-v1":case"product-card-horizontal":{let y=vn(ad,r.data);if(y.success){let x={...y.output,images:[]};return x.images=Br(x.image_url),h`
|
|
2023
|
+
${d?h`<div class="my-3 w-full border-t border-gray-200/50"></div>`:null}
|
|
2418
2024
|
<mw-product-card-horizontal
|
|
2419
|
-
product="${JSON.stringify(
|
|
2420
|
-
?streaming="${!
|
|
2025
|
+
product="${JSON.stringify(x)}"
|
|
2026
|
+
?streaming="${!f}"
|
|
2421
2027
|
?links-new-tab="${i}"
|
|
2422
2028
|
.searchParams="${s}"
|
|
2423
2029
|
.imagesByProductUrl="${n}"></mw-product-card-horizontal>
|
|
2424
|
-
`}console.warn(
|
|
2425
|
-
order-details="${JSON.stringify(
|
|
2426
|
-
?streaming="${!
|
|
2030
|
+
`}console.warn(y.issues);break}case"order-status-card-v1":return h`<mw-product-order-status-card
|
|
2031
|
+
order-details="${JSON.stringify(r.data)}"
|
|
2032
|
+
?streaming="${!f}"
|
|
2427
2033
|
?links-new-tab="${i}"
|
|
2428
|
-
color="${l}"></mw-product-order-status-card> `;case"live-chat-wait-card-v1":{let
|
|
2429
|
-
|
|
2430
|
-
message="${
|
|
2431
|
-
completeMessage="${
|
|
2432
|
-
gameButton="${
|
|
2433
|
-
target-end-time="${
|
|
2434
|
-
question="${
|
|
2435
|
-
.options="${
|
|
2436
|
-
game-title="${
|
|
2437
|
-
result-prefix="${
|
|
2034
|
+
color="${l}"></mw-product-order-status-card> `;case"live-chat-wait-card-v1":{let y=r.data||{};return u?h`<p><i>${y.message}</i></p>`:h`<mw-chat-wait-timer
|
|
2035
|
+
heading="${y.title||""}"
|
|
2036
|
+
message="${y.message||""}"
|
|
2037
|
+
completeMessage="${y.completeMessage||""}"
|
|
2038
|
+
gameButton="${y.gameButton||""}"
|
|
2039
|
+
target-end-time="${y.targetEndTime||""}"
|
|
2040
|
+
question="${y.firstQuestion||""}"
|
|
2041
|
+
.options="${y.options?.option||["No","Yes"]}"
|
|
2042
|
+
game-title="${y.gameTitle||""}"
|
|
2043
|
+
result-prefix="${y.resultPrefix||""}"
|
|
2044
|
+
correct-button-text="${y.correctButtonText||"Correct"}"
|
|
2045
|
+
wrong-button-text="${y.wrongButtonText||"Wrong"}"
|
|
2438
2046
|
color="${l}"
|
|
2439
|
-
apiBaseUrl="${c}"></mw-chat-wait-timer>`}case"request-input-v1":return h``}return console.warn("could not render part:",
|
|
2440
|
-
<mw-context-widget
|
|
2047
|
+
apiBaseUrl="${c}"></mw-chat-wait-timer>`}case"request-input-v1":return h``}return console.warn("could not render part:",r),h`<p><i>data type not supported</i></p>`}var Qn,Vr,lt,qt,Ys,cd,Ks=class{constructor(e,t,{timeoutMs:n=2e3}={}){p(this,Ys);p(this,Qn);p(this,Vr);p(this,lt);p(this,qt,!1);w(this,"timeoutMs");g(this,Qn,e),g(this,Vr,t),this.timeoutMs=n,e.addController(this)}get isTyping(){return o(this,qt)}hostDisconnected(){clearTimeout(o(this,lt)),g(this,lt,void 0)}onInput(e){if(o(this,Qn).isConnected){if(!e.trim()){this.typingStopped();return}clearTimeout(o(this,lt)),g(this,lt,setTimeout(()=>this.typingStopped(),this.timeoutMs)),o(this,qt)||m(this,Ys,cd).call(this)}}typingStopped(){clearTimeout(o(this,lt)),g(this,qt,!1),o(this,Vr).typingStopped()}};Qn=new WeakMap,Vr=new WeakMap,lt=new WeakMap,qt=new WeakMap,Ys=new WeakSet,cd=function(){g(this,qt,!0),o(this,Vr).typingStarted()};function ud(r,e="en-US"){let t=new Intl.DateTimeFormat(e,{hour:"numeric",minute:"numeric"}).format(r);return`${r.toLocaleDateString(e,{year:"numeric",month:"short",day:"numeric"})}, ${t}`}function hd(r){r?.body?.cancel().catch(console.warn)}var ct,Ve,Cl,ei,kl=class{constructor(e=window.localStorage){p(this,Ve);p(this,ct);g(this,ct,e)}setex(e,t,n){return o(this,ct).setItem(e,m(this,Ve,ei).call(this,{value:m(this,Ve,ei).call(this,t),expiresAt:Date.now()+n*1e3})||"")}set(e,t){return o(this,ct).setItem(e,m(this,Ve,ei).call(this,{value:m(this,Ve,ei).call(this,t)})||"")}get(e){let t=o(this,ct).getItem(e);if(!t)return;let n=m(this,Ve,Cl).call(this,t);if(n){if(n.expiresAt&&n.expiresAt<Date.now()){o(this,ct).removeItem(e);return}return m(this,Ve,Cl).call(this,n.value)}}get molin_shop_assistant_distinct_id(){return localStorage.getItem("molin_shop_assistant_distinct_id")}set molin_shop_assistant_distinct_id(e){e===null?localStorage.removeItem("molin_shop_assistant_distinct_id"):localStorage.setItem("molin_shop_assistant_distinct_id",e)}get molin_widget_open_state(){return xe.get("molin-shop-ai-widget-open")??null}set molin_widget_open_state(e){xe.set("molin-shop-ai-widget-open",e)}resetWidgetData(){xe.molin_shop_assistant_distinct_id=null,xe.molin_widget_open_state=null}};ct=new WeakMap,Ve=new WeakSet,Cl=function(e){if(!(typeof e!="string"||e===""))try{return JSON.parse(e)}catch{return}},ei=function(e){if(e!==void 0)try{return JSON.stringify(e)}catch{return}};var xe=new kl;var he,Ke,Xs,ti,Fr,$l=class{constructor(){p(this,he,[]);p(this,Ke);p(this,Xs,10);p(this,ti,5e3);p(this,Fr,!1)}async add(e,t){if(o(this,he).push(fd(e,t)),o(this,he).length>=o(this,Xs))return this.flush();o(this,Ke)||g(this,Ke,setTimeout(()=>{this.flush().catch(console.error)},o(this,ti)))}async flush(){if(o(this,Fr)||o(this,he).length===0)return;let e=[...o(this,he)];try{g(this,Fr,!0),clearTimeout(o(this,Ke)),g(this,Ke,void 0),g(this,he,[]);let t=new AbortController,n=setTimeout(()=>t.abort(),5e3);await pd(e,{signal:t.signal}),clearTimeout(n)}catch(t){if(t.name==="AbortError")console.error("Request timed out, retrying events"),g(this,he,[...e,...o(this,he)]);else{console.error("Failed to send events to backend:",t);let n=e.filter(i=>i.event.includes("error"));g(this,he,[...n,...o(this,he)])}}finally{g(this,Fr,!1),o(this,he).length>0&&!o(this,Ke)&&g(this,Ke,setTimeout(()=>{this.flush().catch(console.error)},o(this,ti)))}}async flushBeforeUnload(){if(o(this,he).length>0)try{let e=new FormData;e.set("events",JSON.stringify(o(this,he))),navigator.sendBeacon(new URL("/widgets/data/collect",Qs()).href,e)}catch(e){console.error("Failed to send final events:",e)}}};he=new WeakMap,Ke=new WeakMap,Xs=new WeakMap,ti=new WeakMap,Fr=new WeakMap;var dd=new $l;window.addEventListener("beforeunload",()=>{dd.flushBeforeUnload().catch(console.error)});async function F(r,e,t){if(typeof r!="string")throw new TypeError("Event name must be a string");if(typeof e!="object"||e===null)throw new TypeError("Properties must be an object");try{if(r==="ShopAssistant: user clicked link"&&L0("molin_link_click",e),t?.immediate){await pd([fd(r,e)]);return}else return dd.add(r,e)}catch(n){console.error("Failed to send event:",n)}}async function pd(r,{signal:e}={}){let t=new FormData;t.set("events",JSON.stringify(r));let n=await fetch(new URL("/widgets/data/collect",Qs()),{method:"POST",body:t,signal:e});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);hd(n)}function fd(r,e){return{event:r,widget_id:e.widgetId,properties:Object.assign({},e,T0()),distinct_id:A0(),timestamp:new Date().toISOString()}}function A0(){try{let r=xe.molin_shop_assistant_distinct_id;return r||(r=crypto.randomUUID(),xe.molin_shop_assistant_distinct_id=r),r}catch(r){console.error("Failed to deserialize distinct_id:",r);let e=crypto.randomUUID();try{xe.molin_shop_assistant_distinct_id=e}catch(t){console.error("Failed to store new distinct_id:",t)}return e}}function T0(){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 Qs(){let r=new URL(import.meta.url).hostname;return{localhost:"http://localhost:8787","molin.localhost":"http://molin.localhost:8787","widget.molin.foo":"https://widget.molin.foo","widget.molin.ai":"https://widget.molin.ai","molin.ai":"https://molin.ai","molin.foo":"https://molin.foo"}[r]||"https://molin.ai"}function L0(r,e){try{window.dataLayer=window.dataLayer||[];let t={event:r,link_url:e.url};window.dataLayer.push(t)}catch(t){console.error("Failed to send event to dataLayer:",t)}}var Vt,ri,ut,Ft,to,gd,eo=class{constructor(e,t,n){p(this,to);p(this,Vt);p(this,ri);p(this,ut);p(this,Ft);w(this,"isLoading",!1);w(this,"data");g(this,Vt,e),g(this,ri,t),g(this,ut,n),e.addController(this)}fetch(){if(this.isLoading)return;o(this,Ft)?.abort();let e=new AbortController;g(this,Ft,e),this.isLoading=!0,this.data=void 0,o(this,Vt).requestUpdate(),(async()=>{let t=m(this,to,gd).call(this);return t.signal?.addEventListener("abort",()=>e.abort(),{signal:e.signal}),fetch(t,{signal:e.signal})})().then(async t=>{if(!t.ok)throw new Error(`${t.statusText}: ${await t.text()}`);this.isLoading=!1,this.data=typeof o(this,ut)?.transform=="function"?await o(this,ut).transform(t):t,o(this,Vt).requestUpdate()}).catch(t=>{o(this,ut)?.onError?.(t),this.isLoading=!1,this.data=void 0,o(this,Vt).requestUpdate()}).finally(()=>{e.abort()})}hostConnected(){this.isLoading||o(this,ut)?.fetchWhenConnected&&this.fetch()}hostDisconnected(){o(this,Ft)?.abort(),g(this,Ft,void 0)}};Vt=new WeakMap,ri=new WeakMap,ut=new WeakMap,Ft=new WeakMap,to=new WeakSet,gd=function(){let e=o(this,ri);if(typeof e=="function"&&(e=e()),!e)throw new Error("missing request");return new Request(e)};function ht(){return window.molinSettings&&typeof window.molinSettings=="object"?window.molinSettings:null}var ro,si,no,Ye,wd,ni,ii=class ii extends _($){constructor(){super();p(this,Ye);p(this,ro,new dt(this,{onError:console.error}));p(this,si);p(this,no,{onError:t=>{alert(t.error),console.error(t.widgetId,t.error),F("ShopAssistant: error",{...t},{immediate:!0})},onNewMessageStartedStreaming:t=>{F("ShopAssistant: user received bot message (streaming started)",t)},onMessageEndedStreaming:t=>{F("ShopAssistant: user received bot message (streaming ended)",t)},onUserCanceledStreaming:t=>{F("ShopAssistant: user canceled streaming",t)},onUserClickedLink:t=>{F("ShopAssistant: user clicked link",t)},onUserSentInput:t=>{F("ShopAssistant: user sent input",t)}});this.cdn="https://widget.molin.ai",this.widgetId="",this.showClose=!1,this.xUserData=ht()?.userData,this.xCustomInstructions=ht()?.customInstructions}get config(){return o(this,si)||o(this,ro).data}render(){return this.config?h`
|
|
2048
|
+
<mw-context-widget
|
|
2049
|
+
.widgetId="${this.widgetId}"
|
|
2050
|
+
.config="${this.config}"
|
|
2051
|
+
.callbacks="${o(this,no)}"
|
|
2052
|
+
.xUserData="${this.xUserData}"
|
|
2053
|
+
.xCustomInstructions="${this.xCustomInstructions}"
|
|
2054
|
+
autoConnect>
|
|
2441
2055
|
<!-- embed our chat component forwarding props -->
|
|
2442
|
-
<mw-chat ?show-close="${this.showClose}" @mw:close-click="${
|
|
2056
|
+
<mw-chat ?show-close="${this.showClose}" @mw:close-click="${m(this,Ye,wd)}">
|
|
2443
2057
|
<slot name="banner" slot="banner"></slot>
|
|
2444
2058
|
</mw-chat>
|
|
2445
2059
|
</mw-context-widget>
|
|
2446
|
-
`:null}injectConfig(
|
|
2060
|
+
`:null}injectConfig(t){g(this,si,t),this.requestUpdate()}reloadConfig(){o(this,Ye,ni)?.reloadConfig()}reset(){this.xUserData={},this.xCustomInstructions="",o(this,Ye,ni)?.reset(),this.requestUpdate()}get conversationId(){return o(this,Ye,ni)?.conversationId??""}get messages(){return o(this,Ye,ni)?.messages??[]}};ro=new WeakMap,si=new WeakMap,no=new WeakMap,Ye=new WeakSet,wd=function(){this.dispatchEvent(new ii.CloseClickEvent)},ni=function(){return this.renderRoot.querySelector("mw-chat")},w(ii,"styles",J`
|
|
2447
2061
|
:host {
|
|
2448
2062
|
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
2449
2063
|
}
|
|
2450
|
-
`),w(
|
|
2064
|
+
`),w(ii,"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 Nt=ii;customElements.get("molin-shop-ai-chat")||customElements.define("molin-shop-ai-chat",Nt);var Sl;Nt.CloseClickEvent=(Sl=class extends CustomEvent{constructor(e={}){super(Nt.CloseClickEvent.type,{...e})}},w(Sl,"type","mw:close-click"),Sl);var El=class{constructor({hidden:e=!1}){w(this,"hidden");this.hidden=e}setUserData(e){for(let t of document.querySelectorAll("molin-shop-ai"))e?t.setAttribute("user-data",JSON.stringify(e)):t.removeAttribute("user-data");for(let t of document.querySelectorAll("molin-shop-ai-chat"))e?t.setAttribute("user-data",JSON.stringify(e)):t.removeAttribute("user-data")}setCustomInstructions(e){for(let t of document.querySelectorAll("molin-shop-ai"))e?t.setAttribute("custom-instructions",e):t.removeAttribute("custom-instructions");for(let t of document.querySelectorAll("molin-shop-ai-chat"))e?t.setAttribute("custom-instructions",e):t.removeAttribute("custom-instructions")}showLauncher(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof je&&e.showLauncher()}hideLauncher(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof je&&e.hideLauncher()}openChat(e){let{message:t,autoSend:n}=e||{};for(let i of document.querySelectorAll("molin-shop-ai"))i instanceof je&&i.openChat({message:t,autoSend:n})}closeChat(){for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof je&&e.closeChat()}reset(){xe.resetWidgetData();for(let e of document.querySelectorAll("molin-shop-ai"))e instanceof je&&e.reset();for(let e of document.querySelectorAll("molin-shop-ai-chat"))e instanceof Nt&&e.reset()}};function yd({hidden:r}){let e=new El({hidden:r});return window.Molin=e,e}function io(){let r=window.Molin;if(!r)throw new Error("window.Molin global not initialized");return r}window.__INIT_MOLIN_SHOP_AI=function(e){j0(e);let t=ht(),n=typeof t?.hidden=="boolean"?t.hidden:window.self!==window.top;if(yd({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 j0(r){window.__INIT_MOLIN_SHOP_AI_OPTIONS=r}function vd(){return window.__INIT_MOLIN_SHOP_AI_OPTIONS}var Me,oi,Nr,Hr,dt=class{constructor(e,t){p(this,Me);p(this,oi);p(this,Nr);p(this,Hr);g(this,Me,e),g(this,oi,t),e.addController(this)}get data(){return o(this,Hr)||o(this,Nr)?.data}hostConnected(){if(o(this,Nr)||o(this,Hr))return;let e=vd();e&&e.widgetId===o(this,Me).widgetId?g(this,Hr,e.config):g(this,Nr,new eo(o(this,Me),()=>{if(o(this,Me).cdn&&o(this,Me).widgetId)return`${o(this,Me).cdn}/config?w=${o(this,Me).widgetId}`;throw new Error("missing cdn or widgetId")},{fetchWhenConnected:!0,transform:async t=>{let n=await t.json();return n&&!e&&window.__INIT_MOLIN_SHOP_AI({cdn:o(this,Me).cdn,widgetId:o(this,Me).widgetId,config:n}),n},onError:o(this,oi)?.onError}))}};Me=new WeakMap,oi=new WeakMap,Nr=new WeakMap,Hr=new WeakMap;function bd(){let r=new URL(import.meta.url).hostname;return{localhost:"http://uploads.molin.localhost:8787","molin.localhost":"http://uploads.molin.localhost:8787","widget.molin.foo":"https://widget.molin.foo","widget.molin.ai":"https://widget.molin.ai","molin.ai":"https://widget.molin.ai","molin.foo":"https://widget.molin.foo"}[r]||"https://widget.molin.ai"}var D0="\xB7 \xB7 \xB7",O0=["star-rating","binary-vote","new-conversation-button"],A,De,li,ce,zr,so,ci,ui,hi,D,xd,kd,oo,Cd,$d,Sd,Il,Ed,_d,Id,Ht,Md,U0,pt,ao=class ao extends _($){constructor(){super();p(this,D);p(this,A,Wc(this));p(this,De,[]);p(this,li,new Ks(this,{typingStarted:()=>o(this,A).value?.sendUserTypingStart(),typingStopped:()=>o(this,A).value?.sendUserTypingStop()}));p(this,ce,new ps(this,{onImageDelete:t=>{if(!o(this,A).value){console.warn("widget context not available, cannot delete image");return}o(this,A).value.sendImageDelete(t),o(this,D,pt)?.focus()},uploadUrl:new URL("/v1/uploads",bd()).href,onConnect:()=>{o(this,A).value?.connect()}}));p(this,zr,"single");p(this,so,t=>{let n=t,{pendingImages:i}=n.detail;Array.isArray(i)&&o(this,ce).restoreImages(i)});p(this,ci,t=>{let n=t,{questionIndex:i,question:s,answer:a,totalQuestions:u}=n.detail;this.callbacks.onWaitGameQuestionAnswered?.({widgetId:this.widgetId,conversationId:this.conversationId,questionIndex:i,question:s,answer:a,totalQuestions:u})});p(this,ui,t=>{let n=t,{guessedProfession:i,questionCount:s}=n.detail;this.callbacks.onWaitGameCompleted?.({widgetId:this.widgetId,conversationId:this.conversationId,guessedProfession:i,questionCount:s})});p(this,hi,t=>{let n=t,{guessedProfession:i,isCorrect:s,questionCount:a}=n.detail;this.callbacks.onWaitGameGuessValidated?.({widgetId:this.widgetId,conversationId:this.conversationId,guessedProfession:i,isCorrect:s,questionCount:a})});p(this,oo,rr({interval:200},async t=>{Ce(o(this,A).value,"widget context is required"),await o(this,A).value.enqueueUserInput(t,{xUserData:o(this,A).value?.xUserData,xCustomInstructions:o(this,A).value?.xCustomInstructions})&&(o(this,D,pt)?.setValue(""),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:t,example:!0,conversationId:this.conversationId}))}));w(this,"sendMessage",rr({interval:200},async t=>{if(!t?.trim())return console.warn("sendMessage: Message must be a non-empty string"),!1;Ce(o(this,A).value,"Widget context is required");let{value:n}=o(this,A),i=await n.enqueueUserInput(t,{xUserData:n.xUserData,xCustomInstructions:n.xCustomInstructions,role:"user",expectStreaming:!0});return i&&o(this,D,pt)?.setValue(""),i??!1}));this.showClose=!1,this._currentRequestInputIndex=0}get conversationId(){return o(this,A).value?.conversationId||""}get messages(){return o(this,A).value?.messages||[]}get config(){return o(this,A).value?.config}get callbacks(){return o(this,A).value?.callbacks||{}}get widgetId(){return o(this,A).value?.widgetId||""}get typingIndicator(){return o(this,A).value?.typingIndicator}get isStreaming(){return o(this,A).value?.isStreaming}get ranOutOfCredits(){return o(this,A).value?.ranOutOfCredits}get isLiveMode(){return o(this,A).value?.isLiveMode}get lastMsg(){return o(this,A).value?.lastMsg}get hasQueuedMessages(){return o(this,A).value?.hasQueuedMessages}firstUpdated(){document.addEventListener("mw-context-widget:connected",o(this,so),{once:!0}),this.addEventListener("mw-chat-wait-game:question-answered",o(this,ci)),this.addEventListener("mw-chat-wait-game:game-completed",o(this,ui)),this.addEventListener("mw-chat-wait-game:guess-validated",o(this,hi))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("mw-chat-wait-game:question-answered",o(this,ci)),this.removeEventListener("mw-chat-wait-game:game-completed",o(this,ui)),this.removeEventListener("mw-chat-wait-game:guess-validated",o(this,hi))}updated(){o(this,A).value?.widgetId&&this.config?.enableImageUpload&&o(this,ce).updateUploadOptions({conversationId:this.conversationId,widgetId:o(this,A).value?.widgetId,enabled:this.config?.enableImageUpload,isConnected:()=>o(this,A).value?.isConnected()??!1,onConnect:()=>{o(this,A).value?.connect()}})}render(){Ce(this.config,"config is required");let t=Xh(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 h`
|
|
2451
2065
|
<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]">
|
|
2452
2066
|
<div
|
|
2453
2067
|
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]">
|
|
2454
2068
|
<mw-chat-header
|
|
2455
2069
|
class="absolute top-1.5 right-1.5 left-1.5"
|
|
2456
2070
|
.content="${{logoUrl:this.config.logoUrl,title:this.config.title,color:this.config.color}}"
|
|
2457
|
-
?show-new-chat="${!this.isLiveMode&&this.messages.length>0&&!o(this,D,
|
|
2071
|
+
?show-new-chat="${!this.isLiveMode&&this.messages.length>0&&!o(this,D,Md)}"
|
|
2458
2072
|
?show-close="${this.showClose}"
|
|
2459
|
-
@mw:new-chat-click="${
|
|
2460
|
-
@mw:close-click="${
|
|
2073
|
+
@mw:new-chat-click="${m(this,D,Il)}"
|
|
2074
|
+
@mw:close-click="${m(this,D,Ed)}">
|
|
2461
2075
|
</mw-chat-header>
|
|
2462
2076
|
|
|
2463
2077
|
<!-- used by the dashboard to inject content -->
|
|
@@ -2466,7 +2080,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2466
2080
|
</div>
|
|
2467
2081
|
|
|
2468
2082
|
<!-- drag overlay -->
|
|
2469
|
-
${this.config.enableImageUpload&&o(this,
|
|
2083
|
+
${this.config.enableImageUpload&&o(this,ce).isDragging&&o(this,A).value?.isConnected()?h`
|
|
2470
2084
|
<div class="bg-opacity-90 absolute inset-0 z-50 flex items-center justify-center bg-white sm:rounded-[30px]">
|
|
2471
2085
|
<div class="p-8 text-center">
|
|
2472
2086
|
<lucide-icon name="image-plus" class="mx-auto mb-4 h-12 w-12 text-blue-500"></lucide-icon>
|
|
@@ -2478,7 +2092,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2478
2092
|
|
|
2479
2093
|
<!-- this structure of 2 divs is required for the browser native stick/scroll to bottom -->
|
|
2480
2094
|
<div id="scrollable-content" class="mt-6 flex h-full flex-shrink flex-grow flex-col-reverse overflow-auto">
|
|
2481
|
-
${this.config.enableImageUpload&&o(this,
|
|
2095
|
+
${this.config.enableImageUpload&&o(this,ce).error?h`<mw-info-banner variant="error" text="${o(this,ce).error}" auto-dismissable></mw-info-banner> `:null}
|
|
2482
2096
|
${this.config?.showStillLearningBanner?h`<mw-info-banner variant="info" text="I'm still learning!"></mw-info-banner>`:h`
|
|
2483
2097
|
<!-- this makes the chat stick to bottom when the banner is hidden -->
|
|
2484
2098
|
<div class="flex p-1"></div>
|
|
@@ -2487,30 +2101,30 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2487
2101
|
<!-- the padding at the top makes empty room at the top when scrolling and content is hidden behind header -->
|
|
2488
2102
|
<!-- this is the 2nd (inner) div that will natively stick/scroll to bottom -->
|
|
2489
2103
|
<div class="${this.messages.length>0?"pt-20":""}">
|
|
2490
|
-
${_e(Array.from(
|
|
2491
|
-
<div class="my-2 text-center text-xs text-gray-500">${
|
|
2492
|
-
${_e(i??[],s=>s.id,(s,a)=>{let l=i[a+1]?.role===s.role,
|
|
2104
|
+
${_e(Array.from(t),([n])=>n,([n,i])=>h`
|
|
2105
|
+
<div class="my-2 text-center text-xs text-gray-500">${ud(new Date(Number(n)),window.navigator.language)}</div>
|
|
2106
|
+
${_e(i??[],s=>s.id,(s,a)=>{let l=i[a+1]?.role===s.role,d=(a>0?i[a-1]:void 0)?.role===s.role,y=(i.length>0?i[i.length-1]:void 0)?.id===s.id;g(this,zr,y&&!d&&!l?"single-current":!d&&!l?"single":!d&&l?"first":y&&d&&!l?"last-current":d&&!l?"last":d&&l?"middle":"single");let S=this.isLiveMode&&s.role==="user"&&s.id===this.lastMsg?.id?"sent":"",j=(s.content.includes("<request-input-v1>")||!s.content)&&s.parts?.every(k=>"data"in k&&k.tag==="request-input-v1");return h`
|
|
2493
2107
|
${s.images?_e(s.images,k=>k,k=>h`
|
|
2494
2108
|
<div data-id="${s.id}" class="${l?"mb-[1px]":"mb-3"} mr-2 ml-[15px] flex-row">
|
|
2495
2109
|
<mw-chat-image
|
|
2496
2110
|
src="${k}"
|
|
2497
2111
|
alt="User uploaded image"
|
|
2498
2112
|
.side="${s.role==="user"?"right":"left"}"
|
|
2499
|
-
position=${o(this,
|
|
2113
|
+
position=${o(this,zr)}
|
|
2500
2114
|
width="300px"></mw-chat-image>
|
|
2501
2115
|
</div>
|
|
2502
2116
|
`):null}
|
|
2503
|
-
${(s.content||s.parts)&&!
|
|
2117
|
+
${(s.content||s.parts)&&!j?h` <div data-id="${s.id}" class="${l?"mb-[1px]":"mb-3"} mx-2 flex-row">
|
|
2504
2118
|
<mw-chat-message
|
|
2505
2119
|
.color="${this.config?.color}"
|
|
2506
2120
|
status="${S}"
|
|
2507
2121
|
logo="${s.metadata?.avatar||this.config?.logoUrl}"
|
|
2508
2122
|
side="${s.role}"
|
|
2509
|
-
position=${o(this,
|
|
2510
|
-
@click="${
|
|
2123
|
+
position=${o(this,zr)}
|
|
2124
|
+
@click="${m(this,D,xd)}">
|
|
2511
2125
|
<div
|
|
2512
2126
|
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">
|
|
2513
|
-
${s.content===
|
|
2127
|
+
${s.content===D0?h`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config?.color}]"></mw-loading>`:s.parts?_e(s.parts,(k,M)=>M,(k,M)=>ld(k,M,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,color:this.config?.color,apiBaseUrl:Qs()})):h`<p>${s.content}</p>`}
|
|
2514
2128
|
</div>
|
|
2515
2129
|
</mw-chat-message>
|
|
2516
2130
|
</div>`:null}
|
|
@@ -2532,7 +2146,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2532
2146
|
class="flex-grow"
|
|
2533
2147
|
.examples="${this.messages.length>0?[]:this.config.examples}"
|
|
2534
2148
|
color="${this.config.color}"
|
|
2535
|
-
@mw:example-click="${
|
|
2149
|
+
@mw:example-click="${m(this,D,kd)}"></mw-chat-background>
|
|
2536
2150
|
</div>
|
|
2537
2151
|
|
|
2538
2152
|
${this.messages.length===0&&this.config.disclaimerFloating?h`
|
|
@@ -2548,7 +2162,29 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2548
2162
|
<mw-disclaimer .text="${this.config.disclaimer}" .color="${this.config.color}"></mw-disclaimer>
|
|
2549
2163
|
</div>
|
|
2550
2164
|
`:null}
|
|
2551
|
-
${o(this,D,
|
|
2165
|
+
${o(this,D,Ht).length===0||this._currentRequestInputIndex>=o(this,D,Ht).length?h`
|
|
2166
|
+
<mw-chat-input
|
|
2167
|
+
@mw:change="${m(this,D,$d)}"
|
|
2168
|
+
@mw:submit="${m(this,D,Cd)}"
|
|
2169
|
+
@mw:cancel="${m(this,D,Sd)}"
|
|
2170
|
+
placeholder="${this.config?.input?.placeholder??""}"
|
|
2171
|
+
?disabled="${this.ranOutOfCredits||this.hasQueuedMessages||o(this,ce).hasPendingImages}"
|
|
2172
|
+
?streaming="${this.isStreaming??!0}"
|
|
2173
|
+
?loading="${this.hasQueuedMessages||o(this,ce).hasPendingImages}"
|
|
2174
|
+
?enableImageUpload="${this.config?.enableImageUpload&&!this.ranOutOfCredits}"
|
|
2175
|
+
color="${this.config?.color??""}"
|
|
2176
|
+
.onImageUploadClick="${this.config?.enableImageUpload?o(this,ce).openImagePicker:void 0}"
|
|
2177
|
+
.images="${this.config?.enableImageUpload?o(this,ce).selectedImages:[]}"
|
|
2178
|
+
.onImageDelete="${this.config?.enableImageUpload?o(this,ce).onImageDelete:void 0}">
|
|
2179
|
+
</mw-chat-input>
|
|
2180
|
+
`:h`
|
|
2181
|
+
<mw-request-input
|
|
2182
|
+
.title="${o(this,D,Ht)[this._currentRequestInputIndex]?.title}"
|
|
2183
|
+
.type="${o(this,D,Ht)[this._currentRequestInputIndex]?.type}"
|
|
2184
|
+
.color="${this.config?.color??"#8B5CF6"}"
|
|
2185
|
+
@mw-request-input:submit="${m(this,D,_d)}">
|
|
2186
|
+
</mw-request-input>
|
|
2187
|
+
`}
|
|
2552
2188
|
${this.config.removePoweredBy?this.config.disclaimer?h`
|
|
2553
2189
|
<!-- spacing between input box and disclaimer or bottom -->
|
|
2554
2190
|
<div class="mt-1.5">
|
|
@@ -2563,41 +2199,13 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2563
2199
|
</div>
|
|
2564
2200
|
</div>
|
|
2565
2201
|
</div>
|
|
2566
|
-
`}reloadConfig(){o(this,
|
|
2567
|
-
<mw-chat-input
|
|
2568
|
-
@mw:change="${f(this,D,Eu)}"
|
|
2569
|
-
@mw:submit="${f(this,D,Su)}"
|
|
2570
|
-
@mw:cancel="${f(this,D,_u)}"
|
|
2571
|
-
placeholder="${this.config?.input?.placeholder??""}"
|
|
2572
|
-
?disabled="${this.ranOutOfCredits||this.hasQueuedMessages||o(this,pe).hasPendingImages}"
|
|
2573
|
-
?streaming="${this.isStreaming??!0}"
|
|
2574
|
-
?loading="${this.hasQueuedMessages||o(this,pe).hasPendingImages}"
|
|
2575
|
-
?enableImageUpload="${this.config?.enableImageUpload&&!this.ranOutOfCredits}"
|
|
2576
|
-
color="${this.config?.color??""}"
|
|
2577
|
-
.onImageUploadClick="${this.config?.enableImageUpload?o(this,pe).openImagePicker:void 0}"
|
|
2578
|
-
.images="${this.config?.enableImageUpload?o(this,pe).selectedImages:[]}"
|
|
2579
|
-
.onImageDelete="${this.config?.enableImageUpload?o(this,pe).onImageDelete:void 0}">
|
|
2580
|
-
</mw-chat-input>
|
|
2581
|
-
`},Bp=function(){return h`
|
|
2582
|
-
<div
|
|
2583
|
-
class="focus-within:ring-opacity-50 min-h-[32px] 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.config?.color??"#000"}]">
|
|
2584
|
-
<button
|
|
2585
|
-
@click="${f(this,D,so)}"
|
|
2586
|
-
class="flex w-full items-center justify-center gap-2 rounded-2xl bg-white px-6 py-3 font-medium text-black shadow-sm transition-colors hover:bg-gray-50">
|
|
2587
|
-
<lucide-icon name="plus" class="h-5 w-5"></lucide-icon>
|
|
2588
|
-
<span>Start New Conversation</span>
|
|
2589
|
-
</button>
|
|
2590
|
-
</div>
|
|
2591
|
-
`},Au=function(r){if(r.length===0||this._currentRequestInputIndex>=r.length)return f(this,D,Sl).call(this);let n=r[this._currentRequestInputIndex];return h`
|
|
2592
|
-
<mw-request-input .title="${n.title}" .type="${n.type}" .color="${this.config?.color??"#8B5CF6"}" @mw-request-input:submit="${f(this,D,Iu)}">
|
|
2593
|
-
</mw-request-input>
|
|
2594
|
-
`},Iu=function(r){me(o(this,j).value,"widget context is required");let n=o(this,D,ui),i=n[this._currentRequestInputIndex];if(!i){console.warn("no current state found for request input");return}switch(r.detail.type){case"star-rating":{let{rating:s,type:a}=r.detail;o(this,Oe).push({type:a,rating:s,id:i.id,title:i.title});break}case"binary-vote":{let{vote:s,type:a}=r.detail;o(this,Oe).push({type:a,vote:s,id:i.id,title:i.title});break}case"new-conversation-button":{f(this,D,so).call(this),this.requestUpdate();return}default:console.warn("unknown request input type",r.detail);return}this._currentRequestInputIndex+=1,this._currentRequestInputIndex>=n.length&&f(this,D,Lu).call(this),this.requestUpdate()},Lu=async function(){if(me(o(this,j).value,"widget context is required"),o(this,Oe).length===0)return;if(!o(this,j).value.lastMsg?.id){console.warn("cannot submit request inputs without message ID");return}await o(this,j).value.enqueueUserInput("",{role:"user",expectStreaming:!1,requestInputResponse:o(this,Oe)})&&g(this,Oe,[]),this.requestUpdate()},ui=function(){me(o(this,j).value,"widget context is required");let r=o(this,j).value.lastMsg;if(r?.role!=="assistant")return[];let n=r.parts?.filter(i=>"tag"in i&&i.tag==="request-input-v1");return!n||n.length===0?[]:n.map(i=>!("data"in i)||!Vp.includes(i.data.type)?null:{title:i.data.title,type:i.data.type,id:i.data.id}).filter(i=>i!==null)},ju=function(){let r=o(this,D,ui).length;return r===0?!1:o(this,Oe).length<r},Hp=function(){return this.renderRoot.querySelector("#scrollable-content")},Nt=function(){return this.renderRoot.querySelector("mw-chat-input")},w(co,"properties",{showClose:{type:Boolean,attribute:"show-close"},_currentRequestInputIndex:{type:Number,state:!0}});var hi=co,$l;hi.CloseClickEvent=($l=class extends CustomEvent{constructor(e={}){super(hi.CloseClickEvent.type,{...e})}},w($l,"type","mw:close-click"),$l);customElements.get("mw-chat")||customElements.define("mw-chat",hi);var Wr,Tu,Du,Zr=class Zr extends _($){constructor(){super();d(this,Wr);w(this,"render",()=>h`
|
|
2202
|
+
`}reloadConfig(){o(this,A).value?.reloadConfig(),this.requestUpdate()}setInputValue(t){if(!t||typeof t!="string"){console.warn("setInputValue requires a valid string value");return}let n=o(this,D,pt);if(!n){console.warn("input element not found, cannot set value");return}n.setValue?n.setValue(t):console.warn("input element does not have setValue method")}focusInput(){window.requestAnimationFrame(()=>{o(this,D,pt)?.focus()})}reset(){o(this,ce).clearImages(),this._currentRequestInputIndex=0,g(this,De,[]),o(this,A).value?.reset()}};A=new WeakMap,De=new WeakMap,li=new WeakMap,ce=new WeakMap,zr=new WeakMap,so=new WeakMap,ci=new WeakMap,ui=new WeakMap,hi=new WeakMap,D=new WeakSet,xd=function(t){let i=t.composedPath().find(s=>s instanceof HTMLAnchorElement);if(i){if(t.preventDefault(),this.callbacks.onUserClickedLink?.({widgetId:this.widgetId,url:i.href,conversationId:this.conversationId}),window.self!==window.top){window.open(i.href,"_blank");return}let a=this.config?.linksNewTab?"_blank":"_self";window.open(i.href,i.target||a)}},kd=function(t){if(this.isStreaming)return;t.preventDefault();let n=t.detail.example;o(this,oo).call(this,n)},oo=new WeakMap,Cd=function(t){if(Ce(o(this,A).value,"widget context is required"),t.preventDefault(),this.config?.enableImageUpload&&o(this,ce).hasPendingImages)return;let n=t.detail;o(this,A).value.enqueueUserInput(n,{xUserData:o(this,A).value?.xUserData,xCustomInstructions:o(this,A).value?.xCustomInstructions}).then(i=>{i&&(o(this,D,pt)?.setValue(""),o(this,ce).clearImages(),o(this,li).typingStopped(),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:n,example:!1,conversationId:this.conversationId}),window.requestAnimationFrame(()=>{o(this,D,pt)?.focus()}))}).catch(console.warn)},$d=function(t){o(this,li).onInput(t.detail.full)},Sd=function(){Ce(o(this,A).value,"widget context is required"),o(this,A).value.sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})},Il=function(){Ce(o(this,A).value,"widget context is required"),o(this,A).value.sendNewChat(),this.reset()},Ed=function(){this.dispatchEvent(new ao.CloseClickEvent)},_d=function(t){Ce(o(this,A).value,"widget context is required");let n=o(this,D,Ht),i=n[this._currentRequestInputIndex];if(!i){console.warn("no current state found for request input");return}switch(t.detail.type){case"star-rating":{let{rating:a,type:u}=t.detail;o(this,De).push({type:u,rating:a,key:i.key,title:i.title});break}case"binary-vote":{let{vote:a,type:u}=t.detail;o(this,De).push({type:u,vote:a,key:i.key,title:i.title});break}case"new-conversation-button":{m(this,D,Il).call(this),this.requestUpdate();return}default:console.warn("unknown request input type",t.detail);return}this._currentRequestInputIndex+=1;let s=n.filter(a=>a.type==="star-rating"||a.type==="binary-vote").length;o(this,De).length>=s&&m(this,D,Id).call(this),this.requestUpdate()},Id=async function(){if(Ce(o(this,A).value,"widget context is required"),o(this,De).length===0)return;if(!o(this,A).value.lastMsg?.id){console.warn("cannot submit request inputs without message ID");return}await o(this,A).value.enqueueUserInput("",{role:"user",expectStreaming:!1,requestInputResponse:o(this,De)})&&(g(this,De,[]),this._currentRequestInputIndex=0),this.requestUpdate()},Ht=function(){Ce(o(this,A).value,"widget context is required");let t=o(this,A).value.lastMsg;if(t?.role!=="assistant")return[];let n=t.parts?.filter(i=>"tag"in i&&i.tag==="request-input-v1");return!n||n.length===0?[]:n.map(i=>!("data"in i)||!O0.includes(i.data.type)?null:{title:i.data.title,type:i.data.type,key:i.data.key}).filter(i=>i!==null)},Md=function(){let t=o(this,D,Ht).length;return t===0?!1:o(this,De).length<t},U0=function(){return this.renderRoot.querySelector("#scrollable-content")},pt=function(){return this.renderRoot.querySelector("mw-chat-input")},w(ao,"properties",{showClose:{type:Boolean,attribute:"show-close"},_currentRequestInputIndex:{type:Number,state:!0}});var ai=ao,_l;ai.CloseClickEvent=(_l=class extends CustomEvent{constructor(e={}){super(ai.CloseClickEvent.type,{...e})}},w(_l,"type","mw:close-click"),_l);customElements.get("mw-chat")||customElements.define("mw-chat",ai);var Gr,Ad,Td,Wr=class Wr extends _($){constructor(){super();p(this,Gr);w(this,"render",()=>h`
|
|
2595
2203
|
<div class="popup-desktop group relative w-[300px] cursor-pointer rounded-[17px] shadow-2xl select-none">
|
|
2596
2204
|
<mw-spinning-border .color="${this.color}" .border="${"transparent"}" .radius="${"17px"}">
|
|
2597
2205
|
<!-- wrapper -->
|
|
2598
2206
|
<div class="relative z-[2147483647] m-[1px] w-[300px] rounded-2xl bg-white font-sans text-base leading-normal">
|
|
2599
2207
|
<!-- content -->
|
|
2600
|
-
<div class="p-4 text-left text-gray-800" @click="${
|
|
2208
|
+
<div class="p-4 text-left text-gray-800" @click="${m(this,Gr,Td)}">
|
|
2601
2209
|
<p>${this.text}</p>
|
|
2602
2210
|
</div>
|
|
2603
2211
|
</div>
|
|
@@ -2606,12 +2214,12 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2606
2214
|
<!-- close button -->
|
|
2607
2215
|
<button
|
|
2608
2216
|
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"
|
|
2609
|
-
@click="${
|
|
2217
|
+
@click="${m(this,Gr,Ad)}"
|
|
2610
2218
|
aria-label="Close">
|
|
2611
2219
|
×
|
|
2612
2220
|
</button>
|
|
2613
2221
|
</div>
|
|
2614
|
-
`);this.text="Hello there. How can we help?",this.color="#601feb"}};
|
|
2222
|
+
`);this.text="Hello there. How can we help?",this.color="#601feb"}};Gr=new WeakSet,Ad=function(){this.dispatchEvent(new Wr.CloseEvent)},Td=function(){this.dispatchEvent(new Wr.ClickEvent)},w(Wr,"properties",{text:{type:String},color:{type:String}}),w(Wr,"styles",J`
|
|
2615
2223
|
.popup-desktop:hover button {
|
|
2616
2224
|
transition-delay: 0s !important;
|
|
2617
2225
|
}
|
|
@@ -2619,19 +2227,19 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2619
2227
|
.popup-desktop button {
|
|
2620
2228
|
transition-delay: 1s;
|
|
2621
2229
|
}
|
|
2622
|
-
`);var
|
|
2230
|
+
`);var zt=Wr,Ml;zt.CloseEvent=(Ml=class extends CustomEvent{constructor(e={}){super(zt.CloseEvent.type,{...e})}},w(Ml,"type","mw:close"),Ml);var Al;zt.ClickEvent=(Al=class extends CustomEvent{constructor(e={}){super(zt.ClickEvent.type,{...e})}},w(Al,"type","mw:click"),Al);customElements.get("mw-popup-desktop")||customElements.define("mw-popup-desktop",zt);var Zr,Ld,jd,di=class di extends _($){constructor(){super();p(this,Zr);w(this,"render",()=>h`
|
|
2623
2231
|
<!-- wrapper -->
|
|
2624
2232
|
<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">
|
|
2625
2233
|
<!-- close button -->
|
|
2626
2234
|
<button
|
|
2627
2235
|
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"
|
|
2628
|
-
@click="${
|
|
2236
|
+
@click="${m(this,Zr,Ld)}"
|
|
2629
2237
|
aria-label="Close">
|
|
2630
2238
|
×
|
|
2631
2239
|
</button>
|
|
2632
2240
|
|
|
2633
2241
|
<!-- content -->
|
|
2634
|
-
<div class="p-4 text-gray-800" @click="${
|
|
2242
|
+
<div class="p-4 text-gray-800" @click="${m(this,Zr,jd)}">
|
|
2635
2243
|
<h1 class="font-display mr-8 py-2.5 text-left text-lg font-bold">${this.title}</h1>
|
|
2636
2244
|
<p class="py-2.5 text-left">${this.text}</p>
|
|
2637
2245
|
<div class="h-4"></div>
|
|
@@ -2644,30 +2252,30 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2644
2252
|
<!-- can append any other content -->
|
|
2645
2253
|
<slot name="footer"></slot>
|
|
2646
2254
|
</div>
|
|
2647
|
-
`);this.title="Chat with Molin AI",this.text="Hello there. How can we help?",this.button="Chat now",this.color="#601feb"}};
|
|
2255
|
+
`);this.title="Chat with Molin AI",this.text="Hello there. How can we help?",this.button="Chat now",this.color="#601feb"}};Zr=new WeakSet,Ld=function(){this.dispatchEvent(new di.CloseEvent)},jd=function(){this.dispatchEvent(new di.ClickEvent)},w(di,"properties",{title:{type:String},text:{type:String},button:{type:String},color:{type:String}});var Wt=di,Tl;Wt.CloseEvent=(Tl=class extends CustomEvent{constructor(e={}){super(Wt.CloseEvent.type,{...e})}},w(Tl,"type","mw:close"),Tl);var Ll;Wt.ClickEvent=(Ll=class extends CustomEvent{constructor(e={}){super(Wt.ClickEvent.type,{...e})}},w(Ll,"type","mw:click"),Ll);customElements.get("mw-popup-mobile")||customElements.define("mw-popup-mobile",Wt);var Jr,pi,Gt,lo=class{constructor(e,t){p(this,Jr);p(this,pi,!1);p(this,Gt,()=>{o(this,pi)||(o(this,Jr).userFirstInteracted?.(),g(this,pi,!0)),o(this,Jr).userInteracted?.()});g(this,Jr,t),e.addController(this)}hostConnected(){this.startListening()}hostDisconnected(){this.stopListening()}startListening(){window.addEventListener("click",o(this,Gt)),window.addEventListener("keydown",o(this,Gt))}stopListening(){window.removeEventListener("click",o(this,Gt)),window.removeEventListener("keydown",o(this,Gt))}};Jr=new WeakMap,pi=new WeakMap,Gt=new WeakMap;var P0=1440*60*1e3,Kr,ke,Zt,fi,Jt,mi,uo,Dd,co=class{constructor(e,t,n=Date){p(this,uo);p(this,Kr);p(this,ke);p(this,Zt);p(this,fi);p(this,Jt,!1);p(this,mi,!1);g(this,Kr,e),g(this,ke,t),g(this,Zt,n),e.addController(this)}get showing(){return o(this,Jt)}hostDisconnected(){this.abortAutoShowTimer()}show({sound:e}={}){if(this.abortAutoShowTimer(),!o(this,Jt)&&(g(this,Jt,!0),o(this,Kr).requestUpdate(),e)){o(this,ke).playPopupSound();let t=o(this,ke).getPersistedState();o(this,ke).setPersistedState({...t,playedSoundOnce:!0})}}hide(){g(this,mi,!0),this.abortAutoShowTimer(),g(this,Jt,!1),o(this,Kr).requestUpdate()}abortAutoShowTimer(){clearTimeout(o(this,fi))}onCloseClick(){let e=o(this,ke).getPersistedState();o(this,ke).setPersistedState({...e,userDismissedAt:o(this,Zt).now()}),this.hide()}onContentClick(){let e=o(this,ke).getPersistedState();o(this,ke).setPersistedState({...e,userDismissedAt:o(this,Zt).now()}),this.hide()}userFirstInteracted(){this.abortAutoShowTimer(),o(this,mi)||g(this,fi,setTimeout(()=>m(this,uo,Dd).call(this),o(this,ke).getDelayMs()))}};Kr=new WeakMap,ke=new WeakMap,Zt=new WeakMap,fi=new WeakMap,Jt=new WeakMap,mi=new WeakMap,uo=new WeakSet,Dd=function(){let e=o(this,ke).getPersistedState(),t=!!e?.playedSoundOnce;e?.userDismissedAt&&o(this,Zt).now()-e.userDismissedAt<P0||this.show({sound:!t})};var ft,Ol,Xe,ho,Dl,po=class po extends _($){constructor(){super();p(this,Xe);p(this,ft,new co(this,{getDelayMs:()=>this.delayMs,playPopupSound:()=>{this.soundUrl&&new Audio(this.soundUrl).play().then(()=>{}).catch(t=>{console.error("Error playing audio:",t,{})})},setPersistedState:t=>{t?localStorage.setItem("_molin_popup",JSON.stringify(t)):localStorage.removeItem("_molin_popup")},getPersistedState:()=>{let t=localStorage.getItem("_molin_popup");try{return t?JSON.parse(t):null}catch{return null}}}));p(this,Ol,new lo(this,o(this,ft)));this.positionClasses="",this.delayMs=0,this.soundUrl="",this.content={desktop:{text:"",color:""},mobile:{title:"",text:"",button:"",color:"",poweredBy:!0}}}render(){let t=o(this,ft).showing?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3",n=this.content;return h`
|
|
2648
2256
|
<!-- mobile shadow backdrop -->
|
|
2649
|
-
<div @click="${
|
|
2257
|
+
<div @click="${m(this,Xe,ho)}" class="${t} fixed inset-0 z-[2147483647] bg-black/50 transition-[opacity,visibility] sm:hidden"></div>
|
|
2650
2258
|
|
|
2651
2259
|
<!-- mobile overlay -->
|
|
2652
|
-
<div class="${
|
|
2653
|
-
<mw-popup-mobile title="${n.mobile.title}" text="${n.mobile.text}" button="${n.mobile.button}" color="${n.mobile.color}" @mw:click="${
|
|
2260
|
+
<div class="${t} fixed right-0 bottom-0 left-0 z-[2147483647] sm:hidden">
|
|
2261
|
+
<mw-popup-mobile title="${n.mobile.title}" text="${n.mobile.text}" button="${n.mobile.button}" color="${n.mobile.color}" @mw:click="${m(this,Xe,Dl)}" @mw:close="${m(this,Xe,ho)}">
|
|
2654
2262
|
${n.mobile.poweredBy?h`<mw-powered-by class="block p-4" slot="footer"></mw-powered-by>`:null}
|
|
2655
2263
|
</mw-popup-mobile>
|
|
2656
2264
|
</div>
|
|
2657
2265
|
|
|
2658
2266
|
<!-- desktop -->
|
|
2659
|
-
<div class="${
|
|
2660
|
-
<mw-popup-desktop color="${n.desktop.color}" text="${n.desktop.text}" @mw:click="${
|
|
2267
|
+
<div class="${t} ${this.positionClasses} fixed z-[2147483647] transition-[opacity,translate,visibility] max-sm:hidden">
|
|
2268
|
+
<mw-popup-desktop color="${n.desktop.color}" text="${n.desktop.text}" @mw:click="${m(this,Xe,Dl)}" @mw:close="${m(this,Xe,ho)}"></mw-popup-desktop>
|
|
2661
2269
|
</div>
|
|
2662
|
-
`}hide(){o(this,ft).hide()}};ft=new WeakMap,
|
|
2270
|
+
`}hide(){o(this,ft).hide()}};ft=new WeakMap,Ol=new WeakMap,Xe=new WeakSet,ho=function(){o(this,ft).onCloseClick()},Dl=function(){this.dispatchEvent(new po.ClickEvent),o(this,ft).onContentClick()},w(po,"properties",{positionClasses:{type:String,attribute:"position"},delayMs:{type:Number,attribute:"delay"},soundUrl:{type:String,attribute:"sound"},content:{type:Object}});var gi=po,jl;gi.ClickEvent=(jl=class extends CustomEvent{constructor(e={}){super(gi.ClickEvent.type,{...e})}},w(jl,"type","mw:click"),jl);customElements.get("mw-popup")||customElements.define("mw-popup",gi);var mo,Od,fo=class extends _($){constructor(){super();p(this,mo);w(this,"render",()=>h`
|
|
2663
2271
|
<span class="relative inline-flex">
|
|
2664
2272
|
<slot></slot>
|
|
2665
|
-
<span class="${o(this,
|
|
2273
|
+
<span class="${o(this,mo,Od)} pointer-events-none absolute z-10 flex h-3 w-3">
|
|
2666
2274
|
<span class="bg-${this.color} absolute inline-flex h-3 w-3 animate-ping rounded-full opacity-75"></span>
|
|
2667
2275
|
<span class="bg-${this.color} relative inline-flex h-3 w-3 rounded-full"></span>
|
|
2668
2276
|
</span>
|
|
2669
2277
|
</span>
|
|
2670
|
-
`);this.color="sky-500",this.position="top-right"}};
|
|
2278
|
+
`);this.color="sky-500",this.position="top-right"}};mo=new WeakSet,Od=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}`)}},w(fo,"properties",{color:{type:String,attribute:"color"},position:{type:String,attribute:"position"}});customElements.get("mw-pulse-dot")||customElements.define("mw-pulse-dot",fo);var go=class extends _($){constructor(){super();w(this,"render",()=>h`
|
|
2671
2279
|
<div class="${this.positionClasses} fixed right-6 bottom-24 z-10 flex animate-bounce flex-col items-center justify-center font-sans text-base">
|
|
2672
2280
|
<p class="mb-2 -translate-x-4 -rotate-12 transform text-lg leading-normal font-bold text-gray-800">${this.text}</p>
|
|
2673
2281
|
|
|
@@ -2680,7 +2288,7 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2680
2288
|
stroke-linecap="round"></path>
|
|
2681
2289
|
</svg>
|
|
2682
2290
|
</div>
|
|
2683
|
-
`);this.positionClasses="",this.text="Try it out"}};w(
|
|
2291
|
+
`);this.positionClasses="",this.text="Try it out"}};w(go,"properties",{positionClasses:{type:String,attribute:"position"},text:{type:String}});customElements.get("mw-try-it-out")||customElements.define("mw-try-it-out",go);var wo,wi=class extends _($){constructor(){super();p(this,wo,new dt(this,{onError:console.error}));this.cdn="https://widget.molin.ai",this.widgetId="",this.state="open"}get config(){return o(this,wo).data}render(){return this.config?h`
|
|
2684
2292
|
<!-- embed our bubble component forwarding props -->
|
|
2685
2293
|
<!-- these props are never internally updated by mw-bubble so we pass them down only one way -->
|
|
2686
2294
|
<mw-bubble
|
|
@@ -2690,21 +2298,21 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2690
2298
|
.src="${this.config?.bubble?.bubbleUrl}"
|
|
2691
2299
|
width="${ue(this.config?.bubble?.size?.width)}"
|
|
2692
2300
|
height="${ue(this.config?.bubble?.size?.height)}"></mw-bubble>
|
|
2693
|
-
`:null}};
|
|
2301
|
+
`:null}};wo=new WeakMap,w(wi,"styles",J`
|
|
2694
2302
|
:host {
|
|
2695
2303
|
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
2696
2304
|
}
|
|
2697
|
-
`),w(
|
|
2305
|
+
`),w(wi,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},state:{type:String}});customElements.get("molin-shop-ai-launcher")||customElements.define("molin-shop-ai-launcher",wi);var l6="navigator"in globalThis&&/Mobi|Android|iPhone/i.test(navigator.userAgent),c6="navigator"in globalThis&&"share"in navigator,R0=Object.freeze({sm:640,md:768,lg:1024,xl:1280,"2xl":1536});function B0(r){if(typeof window>"u")return!1;let e=R0[r];return typeof e!="number"?(console.warn(`Invalid breakpoint: ${r}`),!1):window.matchMedia(`(min-width: ${e}px)`).matches}function Ul(){return B0("sm")}var vo,Yr,Xr,Kt,yi,bo,yo=class{constructor(e,t,n,i=window.history){p(this,vo);p(this,Yr);p(this,Xr);p(this,Kt);p(this,yi,!1);p(this,bo,()=>{o(this,Yr).test(window.location.pathname)&&o(this,Xr).navigated()});g(this,vo,e),g(this,Yr,t),g(this,Xr,n),g(this,Kt,i),e.addController(this)}hostConnected(){o(this,bo).call(this);let e=o(this,Kt).pushState;o(this,Kt).pushState=(...t)=>{if(e.call(o(this,Kt),...t),!o(this,yi))try{let n=new URL(t[2],window.location.origin);o(this,Yr).test(n.pathname)&&o(this,Xr).navigated()}catch{}}}hostDisconnected(){g(this,yi,!0)}};vo=new WeakMap,Yr=new WeakMap,Xr=new WeakMap,Kt=new WeakMap,yi=new WeakMap,bo=new WeakMap;function Ud({minMs:r,maxMs:e}){return Math.random()*(e-r)+r}function xo(r,e=""){return Object.entries(r).filter(([t,n])=>n).map(([t,n])=>`${e}${t}-[${n}]`).join(" ")}function Pd(r,e={}){return[xo(r),xo(e,"max-sm:")].join(" ")}function Rd(r){return xo(r)}function Bd(r){return Object.entries(r).filter(([e,t])=>t).filter(([e])=>e==="left"||e==="right").map(([e,t])=>{let n=`sm:${e}-[${t}]`;return e==="left"&&(n+=" sm:right-auto"),e==="right"&&(n+=" sm:left-auto"),n}).join(" ")}function qd(r){let e=xo(r),n=`sm:bottom-[${r.bottom?`calc(${r.bottom}+72px)`:"72px"}]`;return[e,n].filter(Boolean).join(" ")}var Qr,en,vi,bi,xi,ko,Pl=class{constructor(e,t,{threshold:n=5}={}){p(this,Qr,0);p(this,en,!1);p(this,vi);p(this,bi);p(this,xi,()=>{o(this,en)||(requestAnimationFrame(o(this,ko)),g(this,en,!0))});p(this,ko,()=>{let e=window.scrollY,t=e-o(this,Qr);if(Math.abs(t)>=o(this,bi)){let n=t>0?"down":"up";o(this,vi).call(this,{scrollY:e,direction:n,deltaY:Math.abs(t)}),g(this,Qr,e)}g(this,en,!1)});g(this,vi,t),g(this,bi,n),e.addController(this)}hostConnected(){g(this,Qr,window.scrollY),window.addEventListener("scroll",o(this,xi),{passive:!0})}hostDisconnected(){window.removeEventListener("scroll",o(this,xi))}};Qr=new WeakMap,en=new WeakMap,vi=new WeakMap,bi=new WeakMap,xi=new WeakMap,ko=new WeakMap;function Vd(r,e,t){return new Pl(r,e,t)}var Co,Hl,Ci,zl,Qe,$o,T,Rl,Bl,ql,ki,mt,Vl,Fd,Nd,Hd,So,$i,Fl,Nl,Yt,je=class extends _($){constructor(){super();p(this,T);p(this,Co,new dt(this,{onError:console.error}));p(this,Hl,Vd(this,t=>{o(this,T,Bl)&&!this._dialogShown&&(t.direction==="down"?this._floatingInputVisible=!1:t.direction==="up"&&(this._floatingInputVisible=!0),this.requestUpdate())},{threshold:20}));p(this,Ci);p(this,zl,new yo(this,/.*/i,{navigated:()=>{if(this.requestUpdate(),!this.widgetId){console.warn("No widgetId set, cannot track page view");return}let t=o(this,T,mt)?.conversationId,n=mr.restore(this.widgetId)?.conversationId,i=t||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,shouldHideForCurrentUrl:o(this,T,ql)})}}));p(this,Qe,!1);p(this,$o,{onError:t=>{alert(t.error),console.error(t.widgetId,t.error),F("ShopAssistant: error",{...t},{immediate:!0})},onNewMessageStartedStreaming:t=>{F("ShopAssistant: user received bot message (streaming started)",t)},onMessageEndedStreaming:t=>{F("ShopAssistant: user received bot message (streaming ended)",t)},onUserCanceledStreaming:t=>{F("ShopAssistant: user canceled streaming",t)},onUserClickedLink:t=>{F("ShopAssistant: user clicked link",t)},onUserSentInput:t=>{F("ShopAssistant: user sent input",t)},onWaitGameQuestionAnswered:t=>{F("ShopAssistant: wait game question answered",t)},onWaitGameCompleted:t=>{F("ShopAssistant: wait game completed",t)},onWaitGameGuessValidated:t=>{F("ShopAssistant: wait game guess validated",t)}});p(this,So,t=>{let n=t.detail.text,i=o(this,T,Vl);i&&typeof i.connect=="function"&&i.connect(),this._dialogShown=!0,g(this,Qe,!0),this.requestUpdate(),m(this,T,Yt).call(this,!0),setTimeout(()=>{m(this,T,Nl).call(this,n),m(this,T,Fl).call(this,n).catch(console.warn)},100),F("ShopAssistant: user sent input",{widgetId:this.widgetId,text:n,example:!1,conversationId:o(this,T,mt)?.conversationId||"",source:"ask-ai"})});p(this,$i,rr({interval:200},({message:t,autoSend:n=!1}={})=>{if(!t)return;m(this,T,Nl).call(this,t);let i=o(this,T,mt)?.isLiveMode;i||this.reset(),n&&!i&&m(this,T,Fl).call(this,t).catch(console.warn)}));this.cdn="https://widget.molin.ai",this.widgetId="",this._floatingInputVisible=!0,this._dialogShown=!1,this.xUserData=ht()?.userData,this.xCustomInstructions=ht()?.customInstructions}get config(){return o(this,Ci)||o(this,Co).data}render(){if(!this.config)return null;let t=Pd(this.config.bubble.position,this.config.bubble.mobilePosition),n=Rd(this.config.bubble.position),i=Bd(this.config.bubble.position),s=qd(this.config.bubble.position);return this.config.hidden||io().hidden||o(this,T,ql)?null:h`
|
|
2698
2306
|
<mw-context-widget
|
|
2699
2307
|
.widgetId="${this.widgetId}"
|
|
2700
2308
|
.config="${this.config}"
|
|
2701
|
-
.callbacks="${o(this
|
|
2309
|
+
.callbacks="${o(this,$o)}"
|
|
2702
2310
|
.xUserData="${this.xUserData}"
|
|
2703
2311
|
.xCustomInstructions="${this.xCustomInstructions}"
|
|
2704
|
-
.autoConnect="${o(this,
|
|
2312
|
+
.autoConnect="${o(this,Qe)}">
|
|
2705
2313
|
<mw-bubble
|
|
2706
|
-
class="${
|
|
2707
|
-
@click="${
|
|
2314
|
+
class="${t} ${this._dialogShown?"opacity-0":"opacity-100"} fixed z-[${o(this,T,Rl)}] transition-opacity"
|
|
2315
|
+
@click="${m(this,T,Nd)}"
|
|
2708
2316
|
state="${this._dialogShown?"close":"open"}"
|
|
2709
2317
|
.color="${this.config?.bubble?.color||this.config?.color}"
|
|
2710
2318
|
.bubbleStyle="${this.config?.bubble?.style}"
|
|
@@ -2716,10 +2324,10 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2716
2324
|
${this.isPopupEnabled?h`
|
|
2717
2325
|
<mw-popup
|
|
2718
2326
|
position="${s}"
|
|
2719
|
-
delay="${this.config.popup?.delayMs||
|
|
2327
|
+
delay="${this.config.popup?.delayMs||Ud({minMs:2e3,maxMs:5e3})}"
|
|
2720
2328
|
sound="${this.config.popup?.muteSounds?"":this.config.popup?.soundUrl||""}"
|
|
2721
2329
|
.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}}}"
|
|
2722
|
-
@mw:click="${
|
|
2330
|
+
@mw:click="${m(this,T,Fd)}"></mw-popup>
|
|
2723
2331
|
`:null}
|
|
2724
2332
|
|
|
2725
2333
|
<!-- show "Try it out" if enabled (even if the chat window is showing) -->
|
|
@@ -2731,27 +2339,27 @@ var Ju=Object.create;var Ao=Object.defineProperty;var Ku=Object.getOwnPropertyDe
|
|
|
2731
2339
|
<!-- 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. -->
|
|
2732
2340
|
<div
|
|
2733
2341
|
class="${this._dialogShown?"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]">
|
|
2734
|
-
<mw-chat ?show-close="${!0}" @mw:close-click="${
|
|
2342
|
+
<mw-chat ?show-close="${!0}" @mw:close-click="${m(this,T,Hd)}">
|
|
2735
2343
|
<slot name="banner" slot="banner"></slot>
|
|
2736
2344
|
</mw-chat>
|
|
2737
2345
|
</div>
|
|
2738
2346
|
|
|
2739
2347
|
<!-- Floating input only visible when enabled, in center, on desktop only -->
|
|
2740
|
-
${this.config?.floatingAskAI?.enabled&&o(this,
|
|
2348
|
+
${this.config?.floatingAskAI?.enabled&&o(this,T,Bl)?h`
|
|
2741
2349
|
<mw-floating-ask-ai
|
|
2742
2350
|
?dark="${this.config?.floatingAskAI?.darkMode}"
|
|
2743
2351
|
.color="${this.config.color||this.config?.bubble?.color}"
|
|
2744
2352
|
placeholder="${ue(this.config?.floatingAskAI?.placeholder)}"
|
|
2745
|
-
class="${!this._dialogShown&&this._floatingInputVisible?"opacity-100 translate-y-0":"opacity-0 translate-y-full"} fixed left-1/2 z-[${o(this,
|
|
2353
|
+
class="${!this._dialogShown&&this._floatingInputVisible?"opacity-100 translate-y-0":"opacity-0 translate-y-full"} fixed left-1/2 z-[${o(this,T,Rl)}] hidden -translate-x-1/2 transition-all duration-300 ease-in-out max-md:hidden sm:block"
|
|
2746
2354
|
style="bottom: ${this.config.bubble.position.bottom||"1.5rem"}"
|
|
2747
|
-
@mw-floating-ask-ai:submit="${o(this,
|
|
2355
|
+
@mw-floating-ask-ai:submit="${o(this,So)}"></mw-floating-ask-ai>
|
|
2748
2356
|
`:null}
|
|
2749
2357
|
</mw-context-widget>
|
|
2750
|
-
`}get isPopupEnabled(){return
|
|
2358
|
+
`}get isPopupEnabled(){return Ul()?!!this.config?.popup?.desktopEnabled:!!this.config?.popup?.mobileEnabled}updated(){this._dialogShown&&o(this,T,ki)?.hide(),this._dialogShown&&setTimeout(()=>{o(this,T,mt)?.focusInput()},0)}firstUpdated(){Ul()&&xe.molin_widget_open_state?.isOpen&&!this._dialogShown&&(this._dialogShown=!0,g(this,Qe,!0),this.requestUpdate())}openChat(t){let{message:n,autoSend:i}=t||{};if(this._dialogShown){o(this,$i).call(this,{message:n,autoSend:i});return}let s=o(this,T,Vl);s&&typeof s.connect=="function"&&s.connect(),this._dialogShown=!0,g(this,Qe,!0),this.requestUpdate(),m(this,T,Yt).call(this,!0),o(this,T,ki)?.hide(),setTimeout(()=>{o(this,$i).call(this,{message:n,autoSend:i})},100),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:this._dialogShown?"open":"close"})}closeChat(){this._dialogShown&&(this._dialogShown=!1,this._floatingInputVisible=!0,this.requestUpdate(),m(this,T,Yt).call(this,!1),o(this,T,ki)?.hide(),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:this._dialogShown?"open":"close"}))}showLauncher(){let t=io();t.hidden=!1,this.requestUpdate(),F("ShopAssistant: called show launcher",{widgetId:this.widgetId,source:"programmatic-method"})}hideLauncher(){let t=io();t.hidden=!0,this.requestUpdate(),F("ShopAssistant: called hide launcher",{widgetId:this.widgetId,source:"programmatic-method"})}injectConfig(t){g(this,Ci,t),this.requestUpdate()}reset(){this.xUserData={},this.xCustomInstructions="",o(this,T,mt)?.reset(),this.requestUpdate()}};Co=new WeakMap,Hl=new WeakMap,Ci=new WeakMap,zl=new WeakMap,Qe=new WeakMap,$o=new WeakMap,T=new WeakSet,Rl=function(){return typeof this.config?.bubble?.zIndex=="number"?this.config.bubble.zIndex:2147483647},Bl=function(){return this.config?.floatingAskAI?.enabled||!0},ql=function(){if(!this.config?.hideUrls||!Array.isArray(this.config.hideUrls))return!1;let t=window.location.href,n=window.location.pathname;return this.config.hideUrls.some(i=>{if(!i||typeof i!="string")return!1;let s=i.endsWith("*"),a=s?i.slice(0,-1):i;return i.startsWith("http")?s?t.startsWith(a):t===a:s?n.startsWith(a):n===a})},ki=function(){return this.renderRoot.querySelector("mw-popup")},mt=function(){return this.renderRoot.querySelector("mw-chat")},Vl=function(){return this.renderRoot.querySelector("mw-context-widget")},Fd=function(){this._dialogShown=!0,g(this,Qe,!0),this.requestUpdate(),m(this,T,Yt).call(this,!0),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"popup-click",state:this._dialogShown?"open":"close"})},Nd=function(){this._dialogShown=!this._dialogShown,g(this,Qe,!0),this.requestUpdate(),m(this,T,Yt).call(this,this._dialogShown),o(this,T,ki)?.hide(),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"bubble-toggle",state:this._dialogShown?"open":"close"})},Hd=function(){this._dialogShown=!1,this._floatingInputVisible=!0,this.requestUpdate(),m(this,T,Yt).call(this,!1),F("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"top-right-close-button",state:this._dialogShown?"open":"close"})},So=new WeakMap,$i=new WeakMap,Fl=async function(t){let n=o(this,T,mt);if(!n){console.warn("Chat element not found, cannot send message");return}n.sendMessage?await n.sendMessage(t):console.warn("Chat element does not have sendMessage method")},Nl=function(t){let n=o(this,T,mt);if(!n){console.warn("Chat element not found, cannot set input value");return}n.setInputValue?n.setInputValue(t):console.warn("Chat element does not have setInputValue method")},Yt=function(t){xe.molin_widget_open_state={isOpen:t}},w(je,"styles",J`
|
|
2751
2359
|
:host {
|
|
2752
2360
|
all: initial; /* reset all properties that can pierce the shadow DOM */
|
|
2753
2361
|
}
|
|
2754
|
-
`),w(
|
|
2362
|
+
`),w(je,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},xUserData:{type:Object,attribute:!1},xCustomInstructions:{type:String,attribute:!1},_floatingInputVisible:{type:Boolean,state:!0},_dialogShown:{type:Boolean,state:!0}});customElements.get("molin-shop-ai")||customElements.define("molin-shop-ai",je);export{je as MolinShopAI};
|
|
2755
2363
|
/*! Bundled license information:
|
|
2756
2364
|
|
|
2757
2365
|
@lit/reactive-element/css-tag.js:
|
|
@@ -2767,7 +2375,6 @@ lit-element/lit-element.js:
|
|
|
2767
2375
|
lit-html/directive.js:
|
|
2768
2376
|
lit-html/directives/repeat.js:
|
|
2769
2377
|
lit-html/directives/unsafe-html.js:
|
|
2770
|
-
lit-html/directives/unsafe-svg.js:
|
|
2771
2378
|
(**
|
|
2772
2379
|
* @license
|
|
2773
2380
|
* Copyright 2017 Google LLC
|