@blotoutio/providers-shop-gpt-sdk 1.2.1 → 1.3.0

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.
Files changed (4) hide show
  1. package/index.cjs.js +201 -103
  2. package/index.js +201 -103
  3. package/index.mjs +201 -103
  4. package/package.json +1 -1
package/index.js CHANGED
@@ -491,7 +491,7 @@ var ProvidersShopGptSdk = (function () {
491
491
  // exit if not in top window
492
492
  return;
493
493
  }
494
- const { enabled, devMode, merchantUrl, profiles, productHandles, targetPath, uiMode, } = (_c = params.manifest.variables) !== null && _c !== void 0 ? _c : {};
494
+ const { enabled, devMode, merchantUrl, profiles, productHandles, targetPath, uiMode, brandName, quickPrompts, merchantImage, } = (_c = params.manifest.variables) !== null && _c !== void 0 ? _c : {};
495
495
  let shouldShowUI = enabled;
496
496
  if (!enabled && hasPreviewKey()) {
497
497
  logger.log('Enabling UI in preview mode');
@@ -517,6 +517,9 @@ var ProvidersShopGptSdk = (function () {
517
517
  profiles,
518
518
  productHandles,
519
519
  path: targetPath,
520
+ brandName,
521
+ quickPrompts,
522
+ merchantImage,
520
523
  });
521
524
  }
522
525
  };
@@ -550,7 +553,7 @@ var ProvidersShopGptSdk = (function () {
550
553
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
551
554
  PERFORMANCE OF THIS SOFTWARE.
552
555
  ***************************************************************************** */
553
- /* global Reflect, Promise, SuppressedError, Symbol */
556
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
554
557
 
555
558
 
556
559
  function __decorate(decorators, target, key, desc) {
@@ -574,26 +577,26 @@ var ProvidersShopGptSdk = (function () {
574
577
  * Copyright 2019 Google LLC
575
578
  * SPDX-License-Identifier: BSD-3-Clause
576
579
  */
577
- const t$4=globalThis,e$8=t$4.ShadowRoot&&(void 0===t$4.ShadyCSS||t$4.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$5=new WeakMap;let n$4 = class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s$2)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$8&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$6=t=>new n$4("string"==typeof t?t:t+"",void 0,s$2),i$3=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$4(o,t,s$2)},S$1=(s,o)=>{if(e$8)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$4.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$8?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$6(e)})(t):t;
580
+ const t$4=globalThis,e$8=t$4.ShadowRoot&&(void 0===t$4.ShadyCSS||t$4.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$1=Symbol(),o$5=new WeakMap;let n$4 = class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s$1)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$8&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$6=t=>new n$4("string"==typeof t?t:t+"",void 0,s$1),i$4=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$4(o,t,s$1)},S$1=(s,o)=>{if(e$8)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$4.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$8?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$6(e)})(t):t;
578
581
 
579
582
  /**
580
583
  * @license
581
584
  * Copyright 2017 Google LLC
582
585
  * SPDX-License-Identifier: BSD-3-Clause
583
- */const{is:i$2,defineProperty:e$7,getOwnPropertyDescriptor:r$5,getOwnPropertyNames:h$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$3}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$2(t,s),y$1={attribute:!0,type:String,converter:u$1,reflect:!1,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;let b$1 = class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y$1){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e$7(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$5(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$3(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...h$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return !1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u$1).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$1;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$1)(this[t],s))return;this.P(t,s,i);}!1===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){this.isUpdatePending=!0;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i);}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU();}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return !0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}};b$1.elementStyles=[],b$1.shadowRootOptions={mode:"open"},b$1[d$1("elementProperties")]=new Map,b$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:b$1}),(a$1.reactiveElementVersions??=[]).push("2.0.4");
586
+ */const{is:i$3,defineProperty:e$7,getOwnPropertyDescriptor:r$5,getOwnPropertyNames:h$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$3}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$3(t,s),y$1={attribute:!0,type:String,converter:u$1,reflect:!1,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;let b$1 = class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y$1){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e$7(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$5(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$3(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...h$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return !1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u$1).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$1;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$1)(this[t],s))return;this.P(t,s,i);}!1===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){this.isUpdatePending=!0;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i);}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU();}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return !0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}};b$1.elementStyles=[],b$1.shadowRootOptions={mode:"open"},b$1[d$1("elementProperties")]=new Map,b$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:b$1}),(a$1.reactiveElementVersions??=[]).push("2.0.4");
584
587
 
585
588
  /**
586
589
  * @license
587
590
  * Copyright 2017 Google LLC
588
591
  * SPDX-License-Identifier: BSD-3-Clause
589
592
  */
590
- const t$3=globalThis,i$1=t$3.trustedTypes,s$1=i$1?i$1.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$6="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$3="?"+h,n$2=`<${o$3}>`,r$4=document,l=()=>r$4.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a=Array.isArray,u=t=>a(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),A=new WeakMap,E=r$4.createTreeWalker(r$4,129);function C(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$1?s$1.createHTML(i):i}const P=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":"",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?s+n$2:d>=0?(o.push(a),s.slice(0,d)+e$6+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [C(t,l+(t[s]||"<?>")+(2===i?"</svg>":"")),o]};class V{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=P(t,s);if(this.el=V.createElement(f,n),E.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=E.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$6)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?k:"?"===e[1]?H:"@"===e[1]?I:R}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$1?i$1.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l()),E.nextNode(),d.push({type:2,index:++c});r.append(t[s],l());}}}else if(8===r.nodeType)if(r.data===o$3)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r$4.createElement("template");return s.innerHTML=t,s}}function N(t,i,s=t,e){if(i===w)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=N(t,h._$AS(t,i.values),h,e)),i}class S{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r$4).importNode(i,!0);E.currentNode=e;let h=E.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new M(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new L(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=E.nextNode(),o++);}return E.currentNode=r$4,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=N(this,t,i),c(t)?t===T||null==t||""===t?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==w&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t);}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t));}_(t){this._$AH!==T&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$4.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=V.createElement(C(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new S(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new V(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new M(this.S(l()),this.S(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T;}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=N(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=N(this,e[s+n],i,n),r===w&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===T?t=T:t!==T&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class k extends R{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===T?void 0:t;}}class H extends R{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==T);}}class I extends R{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=N(this,t,i,0)??T)===w)return;const s=this._$AH,e=t===T&&s!==T||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==T&&(s===T||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t);}}const Z=t$3.litHtmlPolyfillSupport;Z?.(V,M),(t$3.litHtmlVersions??=[]).push("3.1.3");const j=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new M(i.insertBefore(l(),t),t,void 0,s??{});}return h._$AI(t),h};
593
+ const t$3=globalThis,i$2=t$3.trustedTypes,s=i$2?i$2.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$6="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$3="?"+h,n$2=`<${o$3}>`,r$4=document,l=()=>r$4.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a=Array.isArray,u=t=>a(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r$4.createTreeWalker(r$4,129);function P(t,i){if(!a(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?"!--"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m):void 0!==u[3]&&(c=m):c===m?">"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?s+n$2:d>=0?(o.push(a),s.slice(0,d)+e$6+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [P(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$6)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H:"?"===e[1]?I:"@"===e[1]?L:k}),r.removeAttribute(t);}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i$2?i$2.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l());}}}else if(8===r.nodeType)if(r.data===o$3)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1;}c++;}}static createElement(t,i){const s=r$4.createElement("template");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r$4).importNode(i,!0);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C.nextNode(),o++);}return C.currentNode=r$4,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$4.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l()),this.O(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E;}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}}class H extends k{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E?void 0:t;}}class I extends k{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E);}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t);}}const j=t$3.litHtmlPolyfillSupport;j?.(N,R),(t$3.litHtmlVersions??=[]).push("3.2.1");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l(),t),t,void 0,s??{});}return h._$AI(t),h};
591
594
 
592
595
  /**
593
596
  * @license
594
597
  * Copyright 2017 Google LLC
595
598
  * SPDX-License-Identifier: BSD-3-Clause
596
- */class s extends b$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=j(i,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1);}render(){return w}}s._$litElement$=!0,s[("finalized")]=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const r$3=globalThis.litElementPolyfillSupport;r$3?.({LitElement:s});(globalThis.litElementVersions??=[]).push("4.0.5");
599
+ */let r$3 = class r extends b$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(s,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1);}render(){return T}};r$3._$litElement$=!0,r$3["finalized"]=!0,globalThis.litElementHydrateSupport?.({LitElement:r$3});const i$1=globalThis.litElementPolyfillSupport;i$1?.({LitElement:r$3});(globalThis.litElementVersions??=[]).push("4.1.1");
597
600
 
598
601
  /**
599
602
  * @license
@@ -627,7 +630,7 @@ var ProvidersShopGptSdk = (function () {
627
630
  * SPDX-License-Identifier: BSD-3-Clause
628
631
  */function e$4(e,r){return (n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(r){const{get:e,set:r}="object"==typeof s?n:i??(()=>{const t=Symbol();return {get(){return this[t]},set(e){this[t]=e;}}})();return e$5(n,s,{get(){let t=e.call(this);return void 0===t&&(t=o(this),(null!==t||this.hasUpdated)&&r.call(this,t)),t}})}return e$5(n,s,{get(){return o(this)}})}}
629
632
 
630
- const scrollBarStyles = i$3 `
633
+ const scrollBarStyles = i$4 `
631
634
  ::-webkit-scrollbar {
632
635
  width: 20px;
633
636
  }
@@ -647,7 +650,7 @@ var ProvidersShopGptSdk = (function () {
647
650
  background-color: #a8bbbf;
648
651
  }
649
652
  `;
650
- const shopGPTStyles = i$3 `
653
+ const shopGPTStyles = i$4 `
651
654
  ${scrollBarStyles}
652
655
 
653
656
  * {
@@ -764,7 +767,7 @@ var ProvidersShopGptSdk = (function () {
764
767
  * @license
765
768
  * Copyright 2018 Google LLC
766
769
  * SPDX-License-Identifier: BSD-3-Clause
767
- */const e$2=e$3(class extends i{constructor(t){if(super(t),t.type!==t$1.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return w}});
770
+ */const e$2=e$3(class extends i{constructor(t){if(super(t),t.type!==t$1.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T}});
768
771
 
769
772
  /**
770
773
  * @license
@@ -844,7 +847,7 @@ var ProvidersShopGptSdk = (function () {
844
847
  <path d="M90.323 25.7117C90.2401 25.7117 90.1986 25.7117 90.1669 25.7281C90.1391 25.7424 90.1165 25.7653 90.1022 25.7934C90.0861 25.8255 90.0861 25.8674 90.0861 25.9512V26.9203H89.7359C89.6558 26.9203 89.6148 26.9205 89.5836 26.9366C89.5558 26.9509 89.5331 26.9738 89.5189 27.002C89.5028 27.034 89.5028 27.0759 89.5028 27.1597V27.717C89.5028 27.8008 89.5028 27.8427 89.5189 27.8748C89.5331 27.9029 89.5558 27.9258 89.5836 27.9402C89.6153 27.9565 89.6568 27.9565 89.7397 27.9565H90.0861V32.1113H90.0847C90.0843 32.1182 90.0838 32.1251 90.0835 32.1319C90.0841 32.1478 90.085 32.1637 90.0861 32.1795V32.2192L90.0883 32.2191C90.1341 33.0885 90.844 33.7701 91.7052 33.7715C91.8727 33.7713 92.0388 33.745 92.1978 33.6936C92.2668 33.6713 92.321 33.5887 92.3208 33.5154L92.3225 32.749C92.3226 32.7376 92.3205 32.7194 92.3176 32.7084C92.317 32.7064 92.3165 32.7043 92.3159 32.7022C92.3113 32.6856 92.297 32.6611 92.283 32.651C92.2793 32.6484 92.2311 32.6207 92.1908 32.6453C92.1477 32.6656 92.147 32.6659 92.1463 32.6662C92.1353 32.6715 92.0981 32.6856 92.0807 32.6958C91.9299 32.7603 91.9074 32.7589 91.8631 32.7651C91.8328 32.7694 91.8023 32.7716 91.7716 32.7716C91.7139 32.7716 91.6565 32.7639 91.6007 32.7488C91.5449 32.7337 91.4914 32.7113 91.4414 32.6821C91.4146 32.6643 91.3891 32.6445 91.3652 32.623C91.3511 32.613 91.3375 32.6024 91.3243 32.5912C91.3176 32.5863 91.3111 32.5812 91.3046 32.576C91.3029 32.5738 91.3012 32.5715 91.2995 32.5692C91.1797 32.456 91.1115 32.2977 91.1112 32.1319C91.1116 32.1265 91.1121 32.1212 91.1127 32.1158C91.1122 32.1118 91.1116 32.1079 91.1112 32.1039V27.9565H92.0702C92.1531 27.9565 92.1946 27.9565 92.2262 27.9402C92.2541 27.9258 92.2767 27.9029 92.2909 27.8748C92.3071 27.8427 92.3071 27.8008 92.3071 27.717V27.1597C92.3071 27.0759 92.3071 27.034 92.2909 27.002C92.2767 26.9738 92.2541 26.9509 92.2262 26.9366C92.1946 26.9203 92.1531 26.9203 92.0702 26.9203H91.1112V25.9512C91.1112 25.8674 91.1112 25.8255 91.095 25.7934C91.0808 25.7653 91.0582 25.7424 91.0303 25.7281C90.9986 25.7117 90.9572 25.7117 90.8743 25.7117H90.323Z" fill="#F25C2B"/>
845
848
  </svg>`;
846
849
 
847
- const chatThreadsStyles = i$3 `
850
+ const chatThreadsStyles = i$4 `
848
851
  :host {
849
852
  padding: 24px 24px 21px;
850
853
  font-family: 'Inter', sans-serif;
@@ -997,13 +1000,13 @@ var ProvidersShopGptSdk = (function () {
997
1000
 
998
1001
  let LoadSpinner =
999
1002
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1000
- class LoadSpinner extends s {
1003
+ class LoadSpinner extends r$3 {
1001
1004
  render() {
1002
1005
  return x ` <div class="loader"><div class="spinner"></div></div> `;
1003
1006
  }
1004
1007
  };
1005
1008
  LoadSpinner.styles = [
1006
- i$3 `
1009
+ i$4 `
1007
1010
  .loader {
1008
1011
  display: flex;
1009
1012
  flex: 1;
@@ -1042,7 +1045,7 @@ var ProvidersShopGptSdk = (function () {
1042
1045
 
1043
1046
  let ChatThreads =
1044
1047
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1045
- class ChatThreads extends s {
1048
+ class ChatThreads extends r$3 {
1046
1049
  getDomain() {
1047
1050
  var _a;
1048
1051
  if ((_a = this.merchantUrl) === null || _a === void 0 ? void 0 : _a.startsWith('https://')) {
@@ -1106,7 +1109,7 @@ var ProvidersShopGptSdk = (function () {
1106
1109
  </div>
1107
1110
  `)}
1108
1111
  </div>`
1109
- : T}
1112
+ : E}
1110
1113
  </div>
1111
1114
  `;
1112
1115
  }
@@ -1128,21 +1131,21 @@ var ProvidersShopGptSdk = (function () {
1128
1131
  ${this.getDomain().replace('https://', '')}
1129
1132
  </a>
1130
1133
  </div>`
1131
- : T}
1134
+ : E}
1132
1135
  ${this.deleteThreadId
1133
1136
  ? x `
1134
1137
  <confirm-dialog
1135
1138
  @accept=${this.handleThreadDelete}
1136
1139
  @decline=${() => (this.deleteThreadId = '')}
1137
1140
  >
1138
- <h2 slot="title">Delete Thread?</h2>
1141
+ <h2 slot="title">Delete Chat?</h2>
1139
1142
  <p slot="content">
1140
1143
  This action cannot be undone. Are you sure you want to delete
1141
1144
  <b>"${this.chatThreads.get(this.deleteThreadId).title}"</b>?
1142
1145
  </p>
1143
1146
  </confirm-dialog>
1144
1147
  `
1145
- : T}
1148
+ : E}
1146
1149
  `;
1147
1150
  }
1148
1151
  };
@@ -1176,7 +1179,7 @@ var ProvidersShopGptSdk = (function () {
1176
1179
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1177
1180
  ], ChatThreads);
1178
1181
 
1179
- const productsSectionStyles = i$3 `
1182
+ const productsSectionStyles = i$4 `
1180
1183
  :host {
1181
1184
  padding: 24px 16px;
1182
1185
  background-color: #fff;
@@ -1212,9 +1215,14 @@ var ProvidersShopGptSdk = (function () {
1212
1215
  justify-content: center;
1213
1216
  height: 100%;
1214
1217
  }
1218
+
1219
+ .merchant-image {
1220
+ width: 100%;
1221
+ object-fit: contain;
1222
+ }
1215
1223
  `;
1216
1224
 
1217
- const productItemStyles = i$3 `
1225
+ const productItemStyles = i$4 `
1218
1226
  :host {
1219
1227
  font-family: 'Inter', sans-serif;
1220
1228
  font-size: 16px;
@@ -1359,7 +1367,7 @@ var ProvidersShopGptSdk = (function () {
1359
1367
 
1360
1368
  let ProductItem =
1361
1369
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1362
- class ProductItem extends s {
1370
+ class ProductItem extends r$3 {
1363
1371
  getLocalPrice(price) {
1364
1372
  if (!this.siteCurrency) {
1365
1373
  return price;
@@ -1375,8 +1383,8 @@ var ProvidersShopGptSdk = (function () {
1375
1383
  (_a = open(url, '_blank')) === null || _a === void 0 ? void 0 : _a.focus();
1376
1384
  }
1377
1385
  renderVariantTitles() {
1378
- if (!this.product.hasVariantsThatRequiresComponents) {
1379
- return T;
1386
+ if (this.product.hasOnlyDefaultVariant) {
1387
+ return E;
1380
1388
  }
1381
1389
  return this.product.variants[0].selectedOptions.map((option) => x `
1382
1390
  <p class="product-variation-details">${option.name}: ${option.value}</p>
@@ -1406,7 +1414,7 @@ var ProvidersShopGptSdk = (function () {
1406
1414
  ? x `<p class="price-compared">
1407
1415
  ${this.getLocalPrice(this.product.variants[0].comparedAtPrice)}
1408
1416
  </p>`
1409
- : T}
1417
+ : E}
1410
1418
  <p>${this.getLocalPrice(this.product.variants[0].price)}</p>
1411
1419
  </div>
1412
1420
  <button
@@ -1434,7 +1442,7 @@ var ProvidersShopGptSdk = (function () {
1434
1442
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1435
1443
  ], ProductItem);
1436
1444
 
1437
- const productsListStyles = i$3 `
1445
+ const productsListStyles = i$4 `
1438
1446
  .products::-webkit-scrollbar {
1439
1447
  display: none;
1440
1448
  }
@@ -1496,17 +1504,34 @@ var ProvidersShopGptSdk = (function () {
1496
1504
 
1497
1505
  let ProductsList =
1498
1506
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1499
- class ProductsList extends s {
1507
+ class ProductsList extends r$3 {
1508
+ constructor() {
1509
+ super(...arguments);
1510
+ this.showButtons = true;
1511
+ this.updateButtonsState = () => {
1512
+ if (!this.leftBtnEle || !this.productsEle || !this.rightBtnEle) {
1513
+ return;
1514
+ }
1515
+ const { scrollWidth, clientWidth } = this.productsEle;
1516
+ this.showButtons = scrollWidth > clientWidth;
1517
+ this.leftBtnEle.classList.toggle('disabled', this.productsEle.scrollLeft === 0);
1518
+ const maxScroll = this.productsEle.scrollWidth - this.productsEle.clientWidth;
1519
+ this.rightBtnEle.classList.toggle('disabled', this.productsEle.scrollLeft >= maxScroll - 1);
1520
+ };
1521
+ }
1500
1522
  connectedCallback() {
1501
1523
  super.connectedCallback();
1524
+ this.updateButtonsState();
1525
+ window.addEventListener('resize', this.updateButtonsState);
1502
1526
  }
1503
- updateButtonsState() {
1504
- if (!this.leftBtnEle || !this.productsEle || !this.rightBtnEle) {
1505
- return;
1527
+ disconnectedCallback() {
1528
+ window.removeEventListener('resize', this.updateButtonsState);
1529
+ super.disconnectedCallback();
1530
+ }
1531
+ updated(_changedProperties) {
1532
+ if (_changedProperties.has('products')) {
1533
+ this.updateButtonsState();
1506
1534
  }
1507
- this.leftBtnEle.classList.toggle('disabled', this.productsEle.scrollLeft === 0);
1508
- const maxScroll = this.productsEle.scrollWidth - this.productsEle.clientWidth;
1509
- this.rightBtnEle.classList.toggle('disabled', this.productsEle.scrollLeft >= maxScroll - 1);
1510
1535
  }
1511
1536
  scrollToLeft(e) {
1512
1537
  var _a;
@@ -1520,7 +1545,7 @@ var ProvidersShopGptSdk = (function () {
1520
1545
  }
1521
1546
  render() {
1522
1547
  if (!this.products.length) {
1523
- return T;
1548
+ return E;
1524
1549
  }
1525
1550
  return x `
1526
1551
  <div class="products-wrapper">
@@ -1539,12 +1564,16 @@ var ProvidersShopGptSdk = (function () {
1539
1564
  </div>
1540
1565
  `)}
1541
1566
  </div>
1542
- <div class="scroll-btns">
1543
- <div class="left-btn disabled" @click=${this.scrollToLeft}>
1544
- ${leftBtn}
1545
- </div>
1546
- <div class="right-btn" @click=${this.scrollToRight}>${rightBtn}</div>
1547
- </div>
1567
+ ${this.showButtons
1568
+ ? x ` <div class="scroll-btns">
1569
+ <div class="left-btn disabled" @click=${this.scrollToLeft}>
1570
+ ${leftBtn}
1571
+ </div>
1572
+ <div class="right-btn" @click=${this.scrollToRight}>
1573
+ ${rightBtn}
1574
+ </div>
1575
+ </div>`
1576
+ : E}
1548
1577
  </div>
1549
1578
  `;
1550
1579
  }
@@ -1558,6 +1587,10 @@ var ProvidersShopGptSdk = (function () {
1558
1587
  n$1({ type: Object }),
1559
1588
  __metadata("design:type", Object)
1560
1589
  ], ProductsList.prototype, "siteCurrency", void 0);
1590
+ __decorate([
1591
+ r$1(),
1592
+ __metadata("design:type", Object)
1593
+ ], ProductsList.prototype, "showButtons", void 0);
1561
1594
  __decorate([
1562
1595
  e$4('.left-btn'),
1563
1596
  __metadata("design:type", Object)
@@ -1577,22 +1610,28 @@ var ProvidersShopGptSdk = (function () {
1577
1610
 
1578
1611
  let ProductsSection =
1579
1612
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1580
- class ProductsSection extends s {
1613
+ class ProductsSection extends r$3 {
1581
1614
  connectedCallback() {
1582
1615
  super.connectedCallback();
1583
1616
  }
1617
+ renderMerchantImage() {
1618
+ if (this.merchantImage) {
1619
+ return x ` <img class="merchant-image" src=${this.merchantImage} /> `;
1620
+ }
1621
+ return x `
1622
+ <div>${searchIcon}</div>
1623
+ <p>
1624
+ Start exploring by typing your query in the search bar on the right.
1625
+ </p>
1626
+ `;
1627
+ }
1584
1628
  render() {
1585
1629
  if (this.isLoadingHistory) {
1586
1630
  return x ` <load-spinner></load-spinner> `;
1587
1631
  }
1588
1632
  if (!this.products.length) {
1589
1633
  return x `
1590
- <div class="no-products">
1591
- <div>${searchIcon}</div>
1592
- <p>
1593
- Start exploring by typing your query in the search bar on the right.
1594
- </p>
1595
- </div>
1634
+ <div class="no-products">${this.renderMerchantImage()}</div>
1596
1635
  `;
1597
1636
  }
1598
1637
  const topResult = this.products[0];
@@ -1618,6 +1657,10 @@ var ProvidersShopGptSdk = (function () {
1618
1657
  }
1619
1658
  };
1620
1659
  ProductsSection.styles = [productsSectionStyles];
1660
+ __decorate([
1661
+ n$1({ type: String }),
1662
+ __metadata("design:type", Object)
1663
+ ], ProductsSection.prototype, "merchantImage", void 0);
1621
1664
  __decorate([
1622
1665
  n$1({ type: Array }),
1623
1666
  __metadata("design:type", Array)
@@ -1647,7 +1690,7 @@ var ProvidersShopGptSdk = (function () {
1647
1690
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1648
1691
  ], ProductsSection);
1649
1692
 
1650
- const chatSectionStyles = i$3 `
1693
+ const chatSectionStyles = i$4 `
1651
1694
  :host {
1652
1695
  font-family: 'Inter', sans-serif;
1653
1696
  font-size: 16px;
@@ -2121,7 +2164,7 @@ var ProvidersShopGptSdk = (function () {
2121
2164
  <path d="M18 7.05L16.95 6L12 10.95L7.05 6L6 7.05L10.95 12L6 16.95L7.05 18L12 13.05L16.95 18L18 16.95L13.05 12L18 7.05Z" fill="white"/>
2122
2165
  </svg>`;
2123
2166
 
2124
- const personalizeDialogStyles = i$3 `
2167
+ const personalizeDialogStyles = i$4 `
2125
2168
  :host {
2126
2169
  font-family: 'Inter', sans-serif;
2127
2170
  font-size: 16px;
@@ -2361,7 +2404,7 @@ var ProvidersShopGptSdk = (function () {
2361
2404
 
2362
2405
  let PersonalizeDialog =
2363
2406
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2364
- class PersonalizeDialog extends s {
2407
+ class PersonalizeDialog extends r$3 {
2365
2408
  constructor() {
2366
2409
  super(...arguments);
2367
2410
  this.isLoading = false;
@@ -2384,7 +2427,7 @@ var ProvidersShopGptSdk = (function () {
2384
2427
  return this.selectProductHandle();
2385
2428
  }
2386
2429
  }
2387
- return T;
2430
+ return E;
2388
2431
  };
2389
2432
  }
2390
2433
  showModal() {
@@ -2568,7 +2611,7 @@ var ProvidersShopGptSdk = (function () {
2568
2611
  : 'Select Product'}
2569
2612
  </div>
2570
2613
  <ul class="dropdown-list">
2571
- ${(_a = this.defaultProductHandles) === null || _a === void 0 ? void 0 : _a.map((productHandle) => x `<li
2614
+ ${(_a = this.defaultProductHandles) === null || _a === void 0 ? void 0 : _a.map((productHandle) => x ` <li
2572
2615
  class="dropdown-item"
2573
2616
  @click=${() => {
2574
2617
  this.productHandle = productHandle;
@@ -2580,10 +2623,10 @@ var ProvidersShopGptSdk = (function () {
2580
2623
  </ul>
2581
2624
  </div>
2582
2625
  ${this.productHandle
2583
- ? x `<button class="finish-btn" @click=${this.handleSubmit}>
2626
+ ? x ` <button class="finish-btn" @click=${this.handleSubmit}>
2584
2627
  Finish
2585
2628
  </button>`
2586
- : T}
2629
+ : E}
2587
2630
  `;
2588
2631
  }
2589
2632
  render() {
@@ -2591,10 +2634,10 @@ var ProvidersShopGptSdk = (function () {
2591
2634
  <dialog>
2592
2635
  <div class="dialog-title">
2593
2636
  ${this.state !== 'profile-type'
2594
- ? x `<div class="back-btn btn" @click=${this.handleBackStep}>
2637
+ ? x ` <div class="back-btn btn" @click=${this.handleBackStep}>
2595
2638
  ${backBtn}
2596
2639
  </div>`
2597
- : T}
2640
+ : E}
2598
2641
  <h2>Personalize your search</h2>
2599
2642
  <div class="close-btn btn" @click=${() => this.dialogModal.close()}>
2600
2643
  ${closeBtn}
@@ -2628,7 +2671,7 @@ var ProvidersShopGptSdk = (function () {
2628
2671
  ], PersonalizeDialog.prototype, "defaultProfiles", void 0);
2629
2672
  __decorate([
2630
2673
  n$1({ type: Boolean }),
2631
- __metadata("design:type", Boolean)
2674
+ __metadata("design:type", Object)
2632
2675
  ], PersonalizeDialog.prototype, "isLoading", void 0);
2633
2676
  __decorate([
2634
2677
  n$1({ type: String }),
@@ -2659,20 +2702,20 @@ var ProvidersShopGptSdk = (function () {
2659
2702
  * @license
2660
2703
  * Copyright 2017 Google LLC
2661
2704
  * SPDX-License-Identifier: BSD-3-Clause
2662
- */let e$1 = class e extends i{constructor(i){if(super(i),this.it=T,i.type!==t$1.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===T||null==r)return this._t=void 0,this.it=r;if(r===w)return r;if("string"!=typeof r)throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};e$1.directiveName="unsafeHTML",e$1.resultType=1;const o=e$3(e$1);
2705
+ */let e$1 = class e extends i{constructor(i){if(super(i),this.it=E,i.type!==t$1.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===E||null==r)return this._t=void 0,this.it=r;if(r===T)return r;if("string"!=typeof r)throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};e$1.directiveName="unsafeHTML",e$1.resultType=1;const o=e$3(e$1);
2663
2706
 
2664
2707
  var e={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function n(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function r(e){return (e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function t(a,c){var o,l,g,s,p,u=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,m=[],h="",i=c||{},d=0;function f(n){var r=e[n[1]||""],t=m[m.length-1]==n;return r?r[1]?(t?m.pop():m.push(n),r[0|t]):r[0]:n}function $(){for(var e="";m.length;)e+=f(m[m.length-1]);return e}for(a=a.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(e,n,r){return i[n.toLowerCase()]=r,""}).replace(/^\n+|\n+$/g,"");g=u.exec(a);)l=a.substring(d,g.index),d=u.lastIndex,o=g[0],l.match(/[^\\](\\\\)*\\$/)||((p=g[3]||g[4])?o='<pre class="code '+(g[4]?"poetry":g[2].toLowerCase())+'"><code'+(g[2]?' class="language-'+g[2].toLowerCase()+'"':"")+">"+n(r(p).replace(/^\n+|\n+$/g,""))+"</code></pre>":(p=g[6])?(p.match(/\./)&&(g[5]=g[5].replace(/^\d+/gm,"")),s=t(n(g[5].replace(/^\s*[>*+.-]/gm,""))),">"==p?p="blockquote":(p=p.match(/\./)?"ol":"ul",s=s.replace(/^(.*)(\n|$)/gm,"<li>$1</li>")),o="<"+p+">"+s+"</"+p+">"):g[8]?o='<img src="'+r(g[8])+'" alt="'+r(g[7])+'">':g[10]?(h=h.replace("<a>",'<a href="'+r(g[11]||i[l.toLowerCase()])+'">'),o=$()+"</a>"):g[9]?o="<a>":g[12]||g[14]?o="<"+(p="h"+(g[14]?g[14].length:g[13]>"="?1:2))+">"+t(g[12]||g[15],i)+"</"+p+">":g[16]?o="<code>"+r(g[16])+"</code>":(g[17]||g[1])&&(o=f(g[17]||"--"))),h+=l,h+=o;return (h+a.substring(d)+$()).replace(/^\n+|\n+$/g,"")}
2665
2708
 
2666
2709
  let MarkdownRenderer =
2667
2710
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2668
- class MarkdownRenderer extends s {
2711
+ class MarkdownRenderer extends r$3 {
2669
2712
  render() {
2670
2713
  const slotContent = this.innerHTML.trim();
2671
2714
  const parsedContent = t(slotContent);
2672
2715
  return o(parsedContent);
2673
2716
  }
2674
2717
  };
2675
- MarkdownRenderer.styles = i$3 `
2718
+ MarkdownRenderer.styles = i$4 `
2676
2719
  :host {
2677
2720
  font-family: 'Inter', sans-serif;
2678
2721
  font-size: 16px;
@@ -2690,7 +2733,7 @@ var ProvidersShopGptSdk = (function () {
2690
2733
 
2691
2734
  let TooltipComponent =
2692
2735
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2693
- class TooltipComponent extends s {
2736
+ class TooltipComponent extends r$3 {
2694
2737
  constructor() {
2695
2738
  super(...arguments);
2696
2739
  this.position = 'bottom-left';
@@ -2704,11 +2747,12 @@ var ProvidersShopGptSdk = (function () {
2704
2747
  }
2705
2748
  };
2706
2749
  TooltipComponent.styles = [
2707
- i$3 `
2750
+ i$4 `
2708
2751
  :host {
2709
2752
  position: relative;
2710
2753
  display: inline-block;
2711
2754
  }
2755
+
2712
2756
  .tooltip {
2713
2757
  position: absolute;
2714
2758
  color: #172a41;
@@ -2729,57 +2773,70 @@ var ProvidersShopGptSdk = (function () {
2729
2773
  font-weight: 400;
2730
2774
  line-height: 150%;
2731
2775
  }
2776
+
2732
2777
  :host(:hover) .tooltip {
2733
2778
  opacity: 1;
2734
2779
  }
2780
+
2735
2781
  .top-center {
2736
2782
  bottom: calc(100% + 2px);
2737
2783
  left: 50%;
2738
2784
  transform: translateX(-50%);
2739
2785
  }
2786
+
2740
2787
  .top-left {
2741
2788
  bottom: calc(100% + 2px);
2742
2789
  left: 0;
2743
2790
  }
2791
+
2744
2792
  .top-right {
2745
2793
  bottom: calc(100% + 2px);
2746
2794
  right: 0;
2747
2795
  }
2796
+
2748
2797
  .bottom-center {
2749
2798
  top: calc(100% + 2px);
2750
2799
  left: 50%;
2751
2800
  transform: translateX(-50%);
2752
2801
  }
2802
+
2753
2803
  .bottom-left {
2754
2804
  top: calc(100% + 2px);
2755
2805
  left: 0;
2756
2806
  }
2807
+
2757
2808
  .bottom-right {
2758
2809
  top: calc(100% + 2px);
2759
2810
  right: 0;
2760
2811
  }
2812
+
2761
2813
  .left-center {
2762
2814
  right: calc(100% + 2px);
2763
2815
  top: 50%;
2764
2816
  transform: translateY(-50%);
2765
2817
  }
2818
+
2766
2819
  .left-top {
2767
2820
  right: calc(100% + 2px);
2768
2821
  top: 0;
2769
2822
  }
2823
+
2770
2824
  .left-bottom {
2771
2825
  right: calc(100% + 2px);
2772
2826
  bottom: 0;
2773
2827
  }
2828
+
2774
2829
  .right-center {
2775
2830
  left: calc(100% + 2px);
2776
2831
  top: 50%;
2777
2832
  transform: translateY(-50%);
2778
2833
  }
2834
+
2779
2835
  .right-top {
2780
2836
  left: calc(100% + 2px);
2781
2837
  top: 0;
2782
2838
  }
2839
+
2783
2840
  .right-bottom {
2784
2841
  left: calc(100% + 2px);
2785
2842
  bottom: 0;
@@ -2792,14 +2849,14 @@ var ProvidersShopGptSdk = (function () {
2792
2849
  ], TooltipComponent.prototype, "position", void 0);
2793
2850
  __decorate([
2794
2851
  n$1({ type: String }),
2795
- __metadata("design:type", String)
2852
+ __metadata("design:type", Object)
2796
2853
  ], TooltipComponent.prototype, "text", void 0);
2797
2854
  TooltipComponent = __decorate([
2798
2855
  t$2('tooltip-component')
2799
2856
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2800
2857
  ], TooltipComponent);
2801
2858
 
2802
- const confirmDialogStyles = i$3 `
2859
+ const confirmDialogStyles = i$4 `
2803
2860
  :host {
2804
2861
  font-family: 'Inter', sans-serif;
2805
2862
  font-size: 16px;
@@ -2880,7 +2937,7 @@ var ProvidersShopGptSdk = (function () {
2880
2937
 
2881
2938
  let ConfirmDialog =
2882
2939
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2883
- class ConfirmDialog extends s {
2940
+ class ConfirmDialog extends r$3 {
2884
2941
  onAcceptClick(e) {
2885
2942
  e.preventDefault();
2886
2943
  this.dispatchEvent(new CustomEvent('accept', {
@@ -2922,7 +2979,7 @@ var ProvidersShopGptSdk = (function () {
2922
2979
 
2923
2980
  let ChatSection =
2924
2981
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2925
- class ChatSection extends s {
2982
+ class ChatSection extends r$3 {
2926
2983
  constructor() {
2927
2984
  super(...arguments);
2928
2985
  this.showChatThreads = false;
@@ -2961,7 +3018,7 @@ var ProvidersShopGptSdk = (function () {
2961
3018
  this.deleteThreadId = '';
2962
3019
  }
2963
3020
  typingIndicator() {
2964
- return x `<div class="typing-dots">
3021
+ return x ` <div class="typing-dots">
2965
3022
  <div class="dot"></div>
2966
3023
  <div class="dot"></div>
2967
3024
  <div class="dot"></div>
@@ -2977,8 +3034,8 @@ var ProvidersShopGptSdk = (function () {
2977
3034
  </div>
2978
3035
  <div>
2979
3036
  ${message.message
2980
- ? x `<markdown-renderer>${message.message}</markdown-renderer>`
2981
- : T}
3037
+ ? x ` <markdown-renderer>${message.message}</markdown-renderer>`
3038
+ : E}
2982
3039
  ${this.viewType !== 'modal' && ((_a = message.products) === null || _a === void 0 ? void 0 : _a[0])
2983
3040
  ? x `
2984
3041
  <span class="line"></span>
@@ -2989,16 +3046,16 @@ var ProvidersShopGptSdk = (function () {
2989
3046
  ></product-item>
2990
3047
  </div>
2991
3048
  `
2992
- : T}
3049
+ : E}
2993
3050
  </div>
2994
3051
  </div>
2995
3052
  ${this.viewType === 'modal' && message.products
2996
- ? x `<products-list
3053
+ ? x ` <products-list
2997
3054
  .products=${message.products}
2998
3055
  .siteCurrency=${this.siteCurrency}
2999
3056
  .viewType=${this.viewType}
3000
3057
  ></products-list>`
3001
- : T}
3058
+ : E}
3002
3059
  </div>
3003
3060
  `;
3004
3061
  }
@@ -3009,7 +3066,7 @@ var ProvidersShopGptSdk = (function () {
3009
3066
  return x `
3010
3067
  <div class="messages">
3011
3068
  ${this.isTyping
3012
- ? x `<div class="message bot">
3069
+ ? x ` <div class="message bot">
3013
3070
  <div>
3014
3071
  <div class="bot-icon">${botIcon}</div>
3015
3072
  </div>
@@ -3021,7 +3078,7 @@ var ProvidersShopGptSdk = (function () {
3021
3078
  sender: 'bot',
3022
3079
  message: "Uh-oh! Looks like I tripped over some alpha-stage wires. Things are still a bit wobbly here, buy hey, that's what testing is for, Let's try that again; or feel free to throw another challenge my way!",
3023
3080
  })
3024
- : T}
3081
+ : E}
3025
3082
  ${this.messages.map((message) => {
3026
3083
  if (message.sender === 'bot') {
3027
3084
  return this.botMessage(message);
@@ -3034,11 +3091,10 @@ var ProvidersShopGptSdk = (function () {
3034
3091
  </div>
3035
3092
  <div>
3036
3093
  <p>
3037
- Welcome to the personalized search! How can we help?
3038
- <br />
3039
- <br />
3040
- Type your search query or select one of the prompts to get
3041
- started:
3094
+ Hi,
3095
+ ${this.brandName ? x `Welcome to ${this.brandName}.` : E}
3096
+ I'm here to help you find the perfect product? What are you
3097
+ looking to resolve today?
3042
3098
  </p>
3043
3099
  </div>
3044
3100
  </div>
@@ -3048,9 +3104,11 @@ var ProvidersShopGptSdk = (function () {
3048
3104
  quickPrompts() {
3049
3105
  var _a;
3050
3106
  if (((_a = this.thread) === null || _a === void 0 ? void 0 : _a.threadId) || this.messages.length) {
3051
- return T;
3107
+ return E;
3052
3108
  }
3053
- const defaultPrompts = ['Best Selling Items', 'Hot Sales'];
3109
+ const defaultPrompts = this.prompts
3110
+ ? this.prompts.split(',').map((prompt) => prompt.trim())
3111
+ : ['Best Selling Items', 'Hot Sales'];
3054
3112
  return x `
3055
3113
  <div class="prompts btn">
3056
3114
  ${defaultPrompts.map((prompt) => x `
@@ -3120,8 +3178,8 @@ var ProvidersShopGptSdk = (function () {
3120
3178
  <span class="context-type-value"> ${profileType} </span>
3121
3179
  </div>
3122
3180
  ${userDetails
3123
- ? x `<div class="context user-details">${userDetails}</div>`
3124
- : T}
3181
+ ? x ` <div class="context user-details">${userDetails}</div>`
3182
+ : E}
3125
3183
  </div>
3126
3184
  <div>
3127
3185
  <div class="context">
@@ -3129,10 +3187,10 @@ var ProvidersShopGptSdk = (function () {
3129
3187
  <span class="context-type-value">${visitationType}</span>
3130
3188
  </div>
3131
3189
  ${devContext.productHandle
3132
- ? x `<div class="context product-handle">
3190
+ ? x ` <div class="context product-handle">
3133
3191
  ${devContext.productHandle}
3134
3192
  </div>`
3135
- : T}
3193
+ : E}
3136
3194
  </div>
3137
3195
  </div>
3138
3196
  `;
@@ -3228,9 +3286,9 @@ var ProvidersShopGptSdk = (function () {
3228
3286
  }
3229
3287
  renderChatThreads() {
3230
3288
  if (!this.chatThreads || !this.showChatThreads) {
3231
- return T;
3289
+ return E;
3232
3290
  }
3233
- return x `<div id="modal-chat-threads">
3291
+ return x ` <div id="modal-chat-threads">
3234
3292
  <div class="chat-threads">
3235
3293
  <h2>Your Search History</h2>
3236
3294
  <div class="thread-titles-wrapper">
@@ -3316,18 +3374,26 @@ var ProvidersShopGptSdk = (function () {
3316
3374
  @accept=${this.handleThreadDelete}
3317
3375
  @decline=${() => (this.deleteThreadId = '')}
3318
3376
  >
3319
- <h2 slot="title">Delete Thread?</h2>
3377
+ <h2 slot="title">Delete Chat?</h2>
3320
3378
  <p slot="content">
3321
3379
  This action cannot be undone. Are you sure you want to delete
3322
3380
  <b>"${this.chatThreads.get(this.deleteThreadId).title}"</b>?
3323
3381
  </p>
3324
3382
  </confirm-dialog>
3325
3383
  `
3326
- : T}
3384
+ : E}
3327
3385
  `;
3328
3386
  }
3329
3387
  };
3330
3388
  ChatSection.styles = [chatSectionStyles];
3389
+ __decorate([
3390
+ n$1({ type: String }),
3391
+ __metadata("design:type", Object)
3392
+ ], ChatSection.prototype, "brandName", void 0);
3393
+ __decorate([
3394
+ n$1({ type: String }),
3395
+ __metadata("design:type", Object)
3396
+ ], ChatSection.prototype, "prompts", void 0);
3331
3397
  __decorate([
3332
3398
  n$1({ type: Object }),
3333
3399
  __metadata("design:type", Map)
@@ -3338,7 +3404,7 @@ var ProvidersShopGptSdk = (function () {
3338
3404
  ], ChatSection.prototype, "deleteThreadId", void 0);
3339
3405
  __decorate([
3340
3406
  n$1({ type: Boolean }),
3341
- __metadata("design:type", Boolean)
3407
+ __metadata("design:type", Object)
3342
3408
  ], ChatSection.prototype, "showChatThreads", void 0);
3343
3409
  __decorate([
3344
3410
  n$1({ type: Boolean }),
@@ -3390,7 +3456,7 @@ var ProvidersShopGptSdk = (function () {
3390
3456
  ], ChatSection.prototype, "personalizeDialogElement", void 0);
3391
3457
  __decorate([
3392
3458
  n$1({ type: String }),
3393
- __metadata("design:type", String)
3459
+ __metadata("design:type", Object)
3394
3460
  ], ChatSection.prototype, "userQuery", void 0);
3395
3461
  ChatSection = __decorate([
3396
3462
  t$2('chat-section')
@@ -3398,8 +3464,9 @@ var ProvidersShopGptSdk = (function () {
3398
3464
  ], ChatSection);
3399
3465
 
3400
3466
  const DIALOG_DELAY = 1000;
3467
+ const LATEST_THREAD_LOAD_DAYS = 14;
3401
3468
  const normalizePath = (path) => path.replace(/\/$/, '');
3402
- let ShopGPT = class ShopGPT extends s {
3469
+ let ShopGPT = class ShopGPT extends r$3 {
3403
3470
  constructor() {
3404
3471
  super(...arguments);
3405
3472
  this.modalState = 'close';
@@ -3411,6 +3478,14 @@ var ProvidersShopGptSdk = (function () {
3411
3478
  this.products = [];
3412
3479
  this.messages = [];
3413
3480
  this.chatThreads = new Map();
3481
+ this.loadData = async () => {
3482
+ if (!this.shopGPTAPI) {
3483
+ return;
3484
+ }
3485
+ await this.loadChatThreads();
3486
+ await this.loadInitialQuery();
3487
+ this.selectLatestThread();
3488
+ };
3414
3489
  this.submitQuery = (message) => {
3415
3490
  if (!message) {
3416
3491
  return;
@@ -3434,14 +3509,12 @@ var ProvidersShopGptSdk = (function () {
3434
3509
  }
3435
3510
  this.init();
3436
3511
  }
3512
+ disconnectedCallback() {
3513
+ window.removeEventListener('edgetag-initialized', this.loadData);
3514
+ super.disconnectedCallback();
3515
+ }
3437
3516
  init() {
3438
- window.addEventListener('edgetag-initialized', async () => {
3439
- if (!this.shopGPTAPI) {
3440
- return;
3441
- }
3442
- await this.loadChatThreads();
3443
- await this.loadInitialQuery();
3444
- });
3517
+ window.addEventListener('edgetag-initialized', this.loadData);
3445
3518
  if (!this.uiMode || this.uiMode === 'overlay') {
3446
3519
  delay(DIALOG_DELAY).then(() => {
3447
3520
  var _a;
@@ -3501,6 +3574,23 @@ var ProvidersShopGptSdk = (function () {
3501
3574
  this.isLoadingThreads = false;
3502
3575
  }
3503
3576
  }
3577
+ selectLatestThread() {
3578
+ if (!this.devMode) {
3579
+ return;
3580
+ }
3581
+ const cutoffTime = Date.now() - LATEST_THREAD_LOAD_DAYS * 24 * 60 * 60 * 1000;
3582
+ // If the latest thread is not older than cutoff we should load the thread
3583
+ let latestThread;
3584
+ for (const thread of this.chatThreads.values()) {
3585
+ if (thread.createdAt >= cutoffTime &&
3586
+ (!latestThread || latestThread.createdAt < thread.createdAt)) {
3587
+ latestThread = thread;
3588
+ }
3589
+ }
3590
+ if (latestThread) {
3591
+ this.setSelectedThreadId(latestThread.threadId);
3592
+ }
3593
+ }
3504
3594
  async loadHistory(threadId) {
3505
3595
  var _a, _b, _c;
3506
3596
  try {
@@ -3638,11 +3728,14 @@ var ProvidersShopGptSdk = (function () {
3638
3728
  .merchantUrl=${this.merchantUrl}
3639
3729
  ></chat-threads>
3640
3730
  <products-section
3731
+ .merchantImage=${this.merchantImage}
3641
3732
  .products=${this.products}
3642
3733
  .isLoadingHistory=${this.isLoadingHistory}
3643
3734
  .siteCurrency=${this.getSiteCurrency()}
3644
3735
  ></products-section>
3645
3736
  <chat-section
3737
+ .prompts=${this.quickPrompts}
3738
+ .brandName=${this.brandName}
3646
3739
  .isFailed=${this.isFailed}
3647
3740
  .isLoadingHistory=${this.isLoadingHistory}
3648
3741
  .isTyping=${this.isTyping}
@@ -3666,7 +3759,7 @@ var ProvidersShopGptSdk = (function () {
3666
3759
  this.modalState = 'close';
3667
3760
  };
3668
3761
  if (this.modalState === 'close') {
3669
- return x `<div class="chatbot-widget">
3762
+ return x ` <div class="chatbot-widget">
3670
3763
  <button
3671
3764
  @click=${(e) => {
3672
3765
  e.preventDefault();
@@ -3680,6 +3773,8 @@ var ProvidersShopGptSdk = (function () {
3680
3773
  return x `
3681
3774
  <div id="shop-gpt-modal" @delete-thread=${this.handleThreadDelete}>
3682
3775
  <chat-section
3776
+ .prompts=${this.quickPrompts}
3777
+ .brandName=${this.brandName}
3683
3778
  .isFailed=${this.isFailed}
3684
3779
  .isLoadingHistory=${this.isLoadingHistory}
3685
3780
  .isTyping=${this.isTyping}
@@ -3711,23 +3806,23 @@ var ProvidersShopGptSdk = (function () {
3711
3806
  ], ShopGPT.prototype, "modalState", void 0);
3712
3807
  __decorate([
3713
3808
  n$1({ type: Boolean }),
3714
- __metadata("design:type", Boolean)
3809
+ __metadata("design:type", Object)
3715
3810
  ], ShopGPT.prototype, "isLoadingHistory", void 0);
3716
3811
  __decorate([
3717
3812
  n$1({ type: Boolean }),
3718
- __metadata("design:type", Boolean)
3813
+ __metadata("design:type", Object)
3719
3814
  ], ShopGPT.prototype, "isLoadingThreads", void 0);
3720
3815
  __decorate([
3721
3816
  n$1({ type: Boolean }),
3722
- __metadata("design:type", Boolean)
3817
+ __metadata("design:type", Object)
3723
3818
  ], ShopGPT.prototype, "isTyping", void 0);
3724
3819
  __decorate([
3725
3820
  n$1({ type: Boolean }),
3726
- __metadata("design:type", Boolean)
3821
+ __metadata("design:type", Object)
3727
3822
  ], ShopGPT.prototype, "isFailed", void 0);
3728
3823
  __decorate([
3729
3824
  n$1({ type: String }),
3730
- __metadata("design:type", String)
3825
+ __metadata("design:type", Object)
3731
3826
  ], ShopGPT.prototype, "selectedThreadId", void 0);
3732
3827
  __decorate([
3733
3828
  n$1({ type: Array }),
@@ -3764,6 +3859,9 @@ var ProvidersShopGptSdk = (function () {
3764
3859
  shopGPT.productHandles = params.productHandles;
3765
3860
  shopGPT.uiMode = params.uiMode;
3766
3861
  shopGPT.path = params.path;
3862
+ shopGPT.brandName = params.brandName;
3863
+ shopGPT.quickPrompts = params.quickPrompts;
3864
+ shopGPT.merchantImage = params.merchantImage;
3767
3865
  document.body.append(shopGPT);
3768
3866
  },
3769
3867
  });