@expedite-commerce/expedite-components 0.2.118 → 0.2.119
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.
|
@@ -24136,15 +24136,15 @@ const vb = Lt("item", () => {
|
|
|
24136
24136
|
"data-item-id": e.itemId,
|
|
24137
24137
|
"data-qli-id": e.qliId
|
|
24138
24138
|
}, [
|
|
24139
|
-
Oe(o).loading.init ? (F(), U("div",
|
|
24139
|
+
Oe(o).loading.init ? (F(), U("div", Ax, [
|
|
24140
|
+
ge(Cx)
|
|
24141
|
+
])) : (F(), U("div", kx, [
|
|
24140
24142
|
ge(Zb, {
|
|
24141
24143
|
"qli-id": e.qliId,
|
|
24142
24144
|
onAction: a[0] || (a[0] = (s) => r("action", s)),
|
|
24143
24145
|
onSave: i.handleSave,
|
|
24144
24146
|
cart: e.cart
|
|
24145
24147
|
}, null, 8, ["qli-id", "onSave", "cart"])
|
|
24146
|
-
])) : (F(), U("div", Ax, [
|
|
24147
|
-
ge(Cx)
|
|
24148
24148
|
]))
|
|
24149
24149
|
], 8, Ex));
|
|
24150
24150
|
}
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
* Date: 2023-05-12T08:44:03.742Z
|
|
84
84
|
*/const I1={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]},ly=cd({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:e=>["delta","html","text"].includes(e)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:e=>["snow","bubble",""].includes(e)},toolbar:{type:[String,Array,Object],required:!1,validator:e=>typeof e=="string"&&e!==""?e.charAt(0)==="#"?!0:Object.keys(I1).indexOf(e)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(e,n)=>{bt(()=>{i()}),er(()=>{t=null});let t,r;const o=X(),i=()=>{var k;if(o.value){if(r=a(),e.modules)if(Array.isArray(e.modules))for(const w of e.modules)fu.register(`modules/${w.name}`,w.module);else fu.register(`modules/${e.modules.name}`,e.modules.module);t=new fu(o.value,r),_(e.content),t.on("text-change",h),t.on("selection-change",m),t.on("editor-change",f),e.theme!=="bubble"&&o.value.classList.remove("ql-bubble"),e.theme!=="snow"&&o.value.classList.remove("ql-snow"),(k=t.getModule("toolbar"))===null||k===void 0||k.container.addEventListener("mousedown",w=>{w.preventDefault()}),n.emit("ready",t)}},a=()=>{const k={};if(e.theme!==""&&(k.theme=e.theme),e.readOnly&&(k.readOnly=e.readOnly),e.placeholder&&(k.placeholder=e.placeholder),e.toolbar&&e.toolbar!==""&&(k.modules={toolbar:(()=>{if(typeof e.toolbar=="object")return e.toolbar;if(typeof e.toolbar=="string")return e.toolbar.charAt(0)==="#"?e.toolbar:I1[e.toolbar]})()}),e.modules){const w=(()=>{var T,q;const K={};if(Array.isArray(e.modules))for(const U of e.modules)K[U.name]=(T=U.options)!==null&&T!==void 0?T:{};else K[e.modules.name]=(q=e.modules.options)!==null&&q!==void 0?q:{};return K})();k.modules=Object.assign({},k.modules,w)}return Object.assign({},e.globalOptions,e.options,k)},s=k=>typeof k=="object"&&k?k.slice():k,l=k=>Object.values(k.ops).some(w=>!w.retain||Object.keys(w).length!==1);let u;const c=k=>{if(typeof u==typeof k){if(k===u)return!0;if(typeof k=="object"&&k&&typeof u=="object"&&u)return!l(u.diff(k))}return!1},h=(k,w,T)=>{u=s(y()),c(e.content)||n.emit("update:content",u),n.emit("textChange",{delta:k,oldContents:w,source:T})},d=X(),m=(k,w,T)=>{d.value=!!(t!=null&&t.hasFocus()),n.emit("selectionChange",{range:k,oldRange:w,source:T})};ze(d,k=>{k?n.emit("focus",o):n.emit("blur",o)});const f=(...k)=>{k[0]==="text-change"&&n.emit("editorChange",{name:k[0],delta:k[1],oldContents:k[2],source:k[3]}),k[0]==="selection-change"&&n.emit("editorChange",{name:k[0],range:k[1],oldRange:k[2],source:k[3]})},g=()=>o.value,p=()=>{var k;return(k=t==null?void 0:t.getModule("toolbar"))===null||k===void 0?void 0:k.container},v=()=>{if(t)return t;throw`The quill editor hasn't been instantiated yet,
|
|
85
85
|
make sure to call this method when the editor ready
|
|
86
|
-
or use v-on:ready="onReady(quill)" event instead.`},y=(k,w)=>e.contentType==="html"?A():e.contentType==="text"?b(k,w):t==null?void 0:t.getContents(k,w),_=(k,w="api")=>{const T=k||(e.contentType==="delta"?new sy:"");e.contentType==="html"?E(T):e.contentType==="text"?C(T,w):t==null||t.setContents(T,w),u=s(T)},b=(k,w)=>{var T;return(T=t==null?void 0:t.getText(k,w))!==null&&T!==void 0?T:""},C=(k,w="api")=>{t==null||t.setText(k,w)},A=()=>{var k;return(k=t==null?void 0:t.root.innerHTML)!==null&&k!==void 0?k:""},E=k=>{t&&(t.root.innerHTML=k)},I=(k,w="api")=>{const T=t==null?void 0:t.clipboard.convert(k);T&&(t==null||t.setContents(T,w))},M=()=>{t==null||t.focus()},S=()=>{Dt(()=>{var k;!n.slots.toolbar&&t&&((k=t.getModule("toolbar"))===null||k===void 0||k.container.remove()),i()})};return ze(()=>e.content,k=>{if(!t||!k||c(k))return;const w=t.getSelection();w&&Dt(()=>t==null?void 0:t.setSelection(w)),_(k)},{deep:!0}),ze(()=>e.enable,k=>{t&&t.enable(k)}),{editor:o,getEditor:g,getToolbar:p,getQuill:v,getContents:y,setContents:_,getHTML:A,setHTML:E,pasteHTML:I,focus:M,getText:b,setText:C,reinit:S}},render(){var e,n;return[(n=(e=this.$slots).toolbar)===null||n===void 0?void 0:n.call(e),Gd("div",{ref:"editor",...this.$attrs})]}}),uy={class:"input"},cy=["for","data-test-id"],dy=["data-test-id"],fy=Be({__name:"RichTextEditor",props:{modelValue:{type:String,default:""},editorOptions:{type:Object,default:()=>({modules:{toolbar:["bold","italic","underline",{align:[]},{list:"ordered"},{list:"bullet"}]},placeholder:"Add AI Instructions",theme:"snow"})},dataTestId:{type:String,default:""},label:{type:String,default:""},required:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["update:modelValue"],setup(e){const n=e,t=ve(()=>typeof n.error=="string"?n.error:n.error===""?!1:n.error===!0?`${n.label||"Field"} is required`:n.error),r=X("");return Zt(()=>{r.value=n.modelValue}),(o,i)=>(F(),$("div",uy,[e.label?(F(),$("label",{key:0,class:De({error_color:!!e.error}),for:e.label,"data-test-id":`${e.dataTestId}-label`},[He(Ee(e.label)+" ",1),e.required?(F(),$("span",{key:0,class:De({error_color:!!e.error})},"*",2)):ye("",!0)],10,cy)):ye("",!0),ge(Oe(ly),{"content-type":"html",toolbar:e.editorOptions,"model-value":e.modelValue,"data-test-id":e.dataTestId,content:r.value,"onUpdate:content":i[0]||(i[0]=a=>o.$emit("update:modelValue",a))},null,8,["toolbar","model-value","data-test-id","content"]),t.value?(F(),$("div",{key:1,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${e.dataTestId}-error`},Ee(t.value),9,dy)):ye("",!0)]))}},[["__scopeId","data-v-76aecac0"]]),hy={class:"ect-w-full ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-rounded-md ect-border-1 ect-border-gray-200 md:ect-gap-5 lg:ect-gap-6","data-test-id":"configurator-inputs-container"},py={key:0,class:"ect-text-sm ect-font-regular ect-text-gray-900"},my={class:"ect-grid ect-grid-cols-1 sm:ect-grid-cols-2 ect-gap-4"},gy={key:0,class:"ect-col-span-2"},yy=["data-test-id"],vy=["id","onUpdate:modelValue","disabled","data-test-id"],by=["for","data-test-id"],_y={key:2,class:"quill-editor-styles"},xy=x("div",{class:"dropdowntp"},null,-1),Cy=x("div",{id:"modals"},null,-1),S1={__name:"InputsContainer",props:{title:{type:String,default:""},lookup:{type:Object,default:()=>null},attributes:{type:Array,required:!0,default:()=>[]},locale:{type:String,default:"en-US"}},setup(e){const n=wn(),t=e,r=X({modules:{toolbar:["bold","italic","underline",{align:[]},{list:"ordered"},{list:"bullet"}]},placeholder:"Add AI Instructions",theme:"snow"}),o=X(t.lookup),i=ve(()=>{const l=t.lookup.relatedFields.map(u=>u.child);return l.push("Name"),l});function a(l,u){const c=u.options.find(h=>h.Id===l);l===null?(u.options=[],u.value=null,u.relatedFields.forEach(h=>{h.value=null})):(u.value=c.Name,u.relatedFields.forEach(h=>{h.value=c[h.child]}))}const s=dn(async function(l,u){u.loading=!0;const c={objectType:u.referenceObject,searchText:l||"",lstFields:i.value||[]},h=await n.getRecords(c);u.options=h,u.loading=!1});return(l,u)=>(F(),$(Se,null,[x("div",hy,[e.title?(F(),$("div",py,Ee(e.title),1)):ye("",!0),x("div",my,[o.value?(F(),$("div",gy,[ge(ir,{modelValue:o.value.referenceRecordId,"onUpdate:modelValue":[u[0]||(u[0]=c=>o.value.referenceRecordId=c),u[1]||(u[1]=c=>a(c,o.value))],"data-test-id":`configurator-inputs-lookup-${o.value.attRecordId??l.index}`,label:o.value.label,options:o.value.options,disabled:!o.value.editable,required:o.value.required,loading:o.value.loading,property:{key:"Id",value:"Name"},lookup:"",search:"",highlight:"",onSearch:u[2]||(u[2]=c=>Oe(s)(c,o.value))},null,8,["modelValue","data-test-id","label","options","disabled","required","loading"])])):ye("",!0),(F(!0),$(Se,null,Ne(e.attributes,(c,h)=>(F(),$("div",{key:h,class:"attribute-input"},[c.dataType==="PICKLIST"||c.dataType==="MULTIPICKLIST"?(F(),we(ir,{key:0,modelValue:c.value,"onUpdate:modelValue":d=>c.value=d,label:c.label,placeholder:c.label,disabled:!c.editable,options:c.picklistValues.map(d=>({label:d,value:d})),select:"",highlight:"","data-test-id":`configurator-inputs-dropdown-${c.attRecordId??l.index}`},null,8,["modelValue","onUpdate:modelValue","label","placeholder","disabled","options","data-test-id"])):c.dataType==="BOOLEAN"?(F(),$("div",{key:1,class:"ect-flex ect-items-center ect-gap-3 ect-py-3.5","data-test-id":`configurator-inputs-checkbox-${c.attRecordId??l.index}`},[kn(x("input",{id:`checkbox-${c.attRecordId??l.index}`,"onUpdate:modelValue":d=>c.value=d,type:"checkbox",disabled:!c.editable,class:"ect-w-4 ect-h-4 ect-accent-success ect-border-gray-300 ect-rounded ect-text-text-success focus:ect-ring-green-500","data-test-id":`configurator-inputs-checkbox-input-${c.attRecordId??l.index}`},null,8,vy),[[Ul,c.value]]),x("label",{for:`checkbox-${c.attRecordId??l.index}`,class:"ect-text-sm ect-font-medium ect-text-gray-900 ect-cursor-pointer","data-test-id":`configurator-inputs-checkbox-label-${c.attRecordId??l.index}`},Ee(c.label),9,by)],8,yy)):c.dataType==="TEXTAREA"?(F(),$("div",_y,[ge(fy,{modelValue:c.value,"onUpdate:modelValue":d=>c.value=d,label:c.label,required:c.required,"editor-options":r.value,"data-test-id":`configurator-inputs-textarea-quill-editor-${c.attRecordId??l.index}`},null,8,["modelValue","onUpdate:modelValue","label","required","editor-options","data-test-id"])])):(F(),we(yo,{key:3,modelValue:c.value,"onUpdate:modelValue":d=>c.value=d,label:c.label,disabled:!c.editable,highlight:"","data-test-id":`configurator-inputs-custom-${c.attRecordId??l.index}`},null,8,["modelValue","onUpdate:modelValue","label","disabled","data-test-id"]))]))),128))])]),xy,Cy],64))}},Ey={class:"ect-w-full ect-flex ect-flex-col ect-gap-4","data-test-id":"configurator-inputs-container"},ky={class:"ect-bg-white ect-rounded-lg"},bu={__name:"AttributesContainer",props:{attributes:{type:Array,required:!0,default:()=>[]},configItem:{type:Object,default:null},locale:{type:String,default:"en-US"}},setup(e){const n=wn(),t=e,r=X([]),o=X([]),i=X({}),a=X({});function s(){const c=[...r.value];return o.value.forEach(h=>{(h.relatedFields||[]).forEach(d=>c.push(d))}),c}function l(c,h){var m;if(!((m=t.configItem)!=null&&m.attributes))return;const d=t.configItem.attributes.find(f=>f.apiName===c.apiName);d&&(d.value=h)}const u=dn(async(c,h,d)=>{var m,f;if(t.configItem){l(c,h);try{const g=await n.evaluateConfigSelection(null,null);((((m=g.inclusions)==null?void 0:m.length)||0)>0||(((f=g.exclusions)==null?void 0:f.length)||0)>0)&&n.setConflict(g,t.configItem,{onRevert:()=>{c.value=d,a.value[c.apiName]=d,l(c,d)}})}catch{c.value=d,a.value[c.apiName]=d,l(c,d)}}},400);return Zt(()=>{const c={},h=[...t.attributes];h.forEach(m=>{m.dataType==="REFERENCE"&&(i.value[m.apiName]=["Name"],m.relatedFields=[],c[m.apiName]=m),m.editable=m.editable&&!m.apiName.includes(".")});let d=null;h.forEach(m=>{if(m.referenceObject==="XX_Base__Location__c"&&(d?m.firstLookup="Copy from "+d.label:d=m),m.apiName.includes(".")){const[f,g]=m.apiName.split(".");m.parent=f,m.child=g,i.value[f]!=null&&(i.value[f].push(g),c[f].relatedFields.push(m))}}),o.value=h.filter(m=>m.dataType==="REFERENCE"),r.value=h.filter(m=>!(m.apiName.includes(".")||m.dataType==="REFERENCE")),s().forEach(m=>{a.value[m.apiName]=m.value})}),ze(()=>[r.value,o.value],()=>{if(!t.configItem)return;s().forEach(h=>{const d=h.value,m=a.value[h.apiName];if(m!==d){const f=m;a.value[h.apiName]=d,u(h,d,f)}})},{deep:!0}),(c,h)=>(F(),$("div",Ey,[x("div",ky,[ge(S1,{attributes:r.value},null,8,["attributes"])]),(F(!0),$(Se,null,Ne(o.value,d=>(F(),$("div",{key:d.attRecordId,class:"ect-bg-white ect-rounded-lg"},[ge(S1,{title:d.referenceLabel+" Lookup",lookup:d,attributes:d.relatedFields},null,8,["title","lookup","attributes"])]))),128))]))}},Ay={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-max-md:max-w-full"},wy=x("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1),Iy={class:"ect-flex ect-items-center ect-justify-between ect-rounded-lg ect-px-4 ect-py-2 ect-gap-2 ect-bg-light-bg-x"},Sy={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Oy={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Ty={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Dy={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-bg-light-bg-x ect-max-md:max-w-full"},Ry={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},My={__name:"AttributesModal",props:{option:{type:Object,required:!0},attributes:{type:Array,required:!0}},emits:["close","done"],setup(e,{emit:n}){const t=n,r=e,o=ve(()=>JSON.parse(JSON.stringify(r.attributes))),i=()=>{t("close")},a=()=>{t("done",o.value),t("close")};return(s,l)=>(F(),we(Gl,{header:"",title:"Update Attributes Values",description:"Update the values associated with selected attributes.",footer:"","no-close":"",onClose:i},{content:Ve(()=>[x("header",Ay,[wy,x("div",Iy,[x("p",Sy,Ee(e.option.itemName),1),x("p",Oy,Ee(e.option.qty),1),x("p",Ty,Ee(e.option.price),1)])]),x("main",Dy,[ge(bu,{attributes:o.value,"config-item":e.option},null,8,["attributes","config-item"])])]),footer:Ve(()=>[x("div",Ry,[ge(Vt,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"attributes-modal-button-cancel",onClick:l[0]||(l[0]=u=>t("close"))},{default:Ve(()=>[He("Cancel")]),_:1}),ge(Vt,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"attributes-modal-button-done",onClick:a},{default:Ve(()=>[He("Done")]),_:1})])]),_:1}))}},Fy={class:"ect-flex ect-flex-col"},By=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],Ny=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],Ly={key:0},Py={key:1,class:"ect-border-t ect-border-gray-200 ect-p-4"},qy={__name:"ConfiguratorTabSections",props:{data:{type:Object,required:!0}},setup(e){const n=wn(),t=e,r=ve(()=>t.data.itemTypes||[]),o=ve(()=>t.data.showImage||!1);let i=X(null),a=X(null);const l=dn(async f=>{const g=await n.evaluateConfigSelection(null,null);g.inclusions.length>0||g.exclusions.length>0?n.setConflict(g,f):n.handleConflictDone()},1e3),u=(f,g,p)=>{var v;f.qty=g,f.calculatePricing&&((v=p==null?void 0:p.selected)!=null&&v.includes(f.itemId))&&l(f)},c=(f,g,p)=>{var v;f.price=g,f.calculatePricing&&((v=p==null?void 0:p.selected)!=null&&v.includes(f.itemId))&&l(f)},h=(f,g)=>{f.itemName=g},d=async(f,g,p,v)=>{if(f.preventDefault(),f.stopPropagation(),i.value=null,a.value=null,g.calculateRules){v&&v.isRadio?p.includes(g.itemId)?(p.splice(0,p.length),a.value=g.publishKey):(p.splice(0,p.length),p.push(g.itemId),i.value=g.publishKey):p.includes(g.itemId)?(p.splice(p.indexOf(g.itemId),1),a.value=g.publishKey):(p.push(g.itemId),i.value=g.publishKey);const y=a.value?g:null,_=i.value?g:null,b=await n.evaluateConfigSelection(y,_);if(b.inclusions.length>0||b.exclusions.length>0){n.setConflict(b,g);const C=n.conflictData;[...C.inclusions,...C.exclusions].includes(g.publishKey)||(i.value&&C.exclusions.push(i.value),a.value&&C.inclusions.push(a.value))}else{n.setConflict(b,g);const C=n.conflictData;i.value&&C.exclusions.push(i.value),a.value&&C.inclusions.push(a.value),n.handleConflictDone()}}},m=(f,g,p,v)=>{f.target.type==="checkbox"||f.target.type==="radio"||(f.preventDefault(),f.stopPropagation(),v.isRadio?p.includes(g.itemId)?p.splice(0,p.length):(p.splice(0,p.length),p.push(g.itemId)):p.includes(g.itemId)?p.splice(p.indexOf(g.itemId),1):p.push(g.itemId),d(f,g,p,v))};return(f,g)=>(F(),$("div",Fy,[(F(!0),$(Se,null,Ne(r.value,p=>(F(),we(vm,{key:p.itemTypeId,title:p.itemTypeName,description:p.description,message:p.minMaxMessage,warning:p.isRadio?!p.selected[0]:p.selected.length<p.minNumber||p.selected.length>p.maxNumber},{default:Ve(()=>[x("div",{class:De([p.numberOfColumns===1?"ect-space-y-3 md:ect-space-y-4 ect-p-2 md:ect-p-4":p.numberOfColumns===2?"ect-grid ect-grid-cols-1 md:ect-grid-cols-2 ect-gap-3 md:ect-gap-4 ect-p-2 md:ect-p-4":"ect-grid ect-grid-cols-1 md:ect-grid-cols-2 lg:ect-grid-cols-3 ect-gap-3 md:ect-gap-4 ect-p-2 md:ect-p-4"])},[(F(!0),$(Se,null,Ne(p.options||[],v=>(F(),$(Se,{key:v.itemId},[v.hidden?ye("",!0):(F(),we(fg,{key:0,item:v,name:v.itemName,description:v.description||"","min-quantity":p.minQuantity,"max-quantity":p.maxQuantity,"show-image":o.value,selected:p.selected.includes(v.itemId),tags:v.getTags(),price:v.price,quantity:v.qty,"image-url":v.defaultImageURL,attributes:v.attributes||[],size:p.numberOfColumns,"item-id":v.itemId,"item-type":p.itemTypeName||"",category:p.category,"relationship-info":v.relationshipInfo||{},option:Oe(n).optionByItemId.get(v.itemId),"is-attributes":v.isAttributes,"show-attributes":p.lightboxAttributes,disabled:v.isDisabled,editable:Oe(n).editable&&!Oe(n).loading.evaluateConfigSelection,"onUpdate:quantity":y=>u(v,y,p),"onUpdate:price":y=>c(v,y,p),"onUpdate:name":y=>h(v,y),onEditAttributes:y=>v.showAttributesModal=!0,onClick:y=>p.selected.includes(v.itemId)||v.isDisabled?null:m(y,v,p.selected,p)},{"selection-control":Ve(()=>[p.isRadio?kn((F(),$("input",{key:0,"onUpdate:modelValue":y=>p.selected[0]=y,"data-test-id":`configurator-${p.itemTypeId}-radio-${v.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"radio",value:v.itemId,disabled:v.isDisabled||Oe(n).loading.evaluateConfigSelection,onClick:g[0]||(g[0]=_t(()=>{},["stop"])),onChange:y=>d(y,v,p.selected,p)},null,40,By)),[[df,p.selected[0]]]):kn((F(),$("input",{key:1,"onUpdate:modelValue":y=>p.selected=y,"data-test-id":`configurator-${p.itemTypeId}-checkbox-${v.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"checkbox",value:v.itemId,disabled:v.isDisabled||Oe(n).loading.evaluateConfigSelection,onClick:g[1]||(g[1]=_t(()=>{},["stop"])),onChange:y=>d(y,v,p.selected,p)},null,40,Ny)),[[Ul,p.selected]])]),default:Ve(()=>[p.lightboxAttributes?(F(),$("div",Ly,[v.showAttributesModal?(F(),we(My,{key:0,option:v,attributes:v.attributes,onDone:y=>v.attributes=y,onClose:y=>v.showAttributesModal=!1},null,8,["option","attributes","onDone","onClose"])):ye("",!0)])):(F(),$("div",Py,[ge(bu,{attributes:v.attributes,"config-item":v},null,8,["attributes","config-item"])]))]),_:2},1032,["item","name","description","min-quantity","max-quantity","show-image","selected","tags","price","quantity","image-url","attributes","size","item-id","item-type","category","relationship-info","option","is-attributes","show-attributes","disabled","editable","onUpdate:quantity","onUpdate:price","onUpdate:name","onEditAttributes","onClick"]))],64))),128))],2)]),_:2},1032,["title","description","message","warning"]))),128))]))}},$y=e=>(Wt("data-v-cb7a75a9"),e=e(),Qt(),e),Uy={class:"ect-space-y-4"},jy={class:"ect-w-full ect-bg-white ect-border ect-border-ect-gray-200 ect-rounded-lg"},Hy={class:"ect-bg-white ect-border-b ect-border-ect-gray-200 ect-px-4 ect-py-4 ect-sticky ect-top-0 ect-z-[5] ect-overflow-hidden ect-rounded-t-lg"},Vy={class:"ect-text-sm ect-font-semibold ect-text-green-700","data-test-id":"configurator-summary-header-title"},zy={class:"ect-bg-white ect-px-4 ect-py-4 ect-pb-3 ect-border-b ect-border-ect-gray-200 ect-top-[53px] ect-z-9 ect-overflow-hidden ect-sticky ect-top-[53px]"},Gy={class:"ect-text-sm ect-font-medium ect-text-ect-gray-800","data-test-id":"configurator-summary-section-frame-color"},Ky={class:"ect-flex ect-items-center ect-bg-light-bg-x ect-border-b ect-border-ect-gray-200"},Xy={class:"ect-flex-1 ect-bg-ect-gray-50 ect-px-8 ect-py-4 ect-min-h-[56px] ect-flex ect-items-center"},Wy={class:"ect-text-sm ect-text-font-clr-light","data-test-id":"configurator-summary-item-red"},Qy={class:"ect-flex ect-items-center ect-px-8 ect-py-4 ect-gap-5"},Zy={class:"ect-flex ect-justify-center ect-min-w-[128px]"},Jy=$y(()=>x("div",{class:"ect-border-r ect-w-[1px] ect-border-text-muted-light ect-h-6"},null,-1)),Yy={class:"ect-flex ect-justify-center ect-min-w-[100px]"},ev={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-price-red"},tv={key:0,class:"ect-flex ect-items-center ect-bg-light-bg-x ect-px-10 ect-py-3"},nv={class:"ect-flex ect-flex-wrap ect-items-center ect-bg-light-bg-x ect-gap-2"},rv={class:"ect-bg-white ect-px-8 ect-py-4 ect-pr-4 ect-flex ect-justify-end"},ov={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-total"},iv=Be({__name:"ConfiguratorSummaryTab",props:{summary:{type:Array,required:!0}},setup(e){return(n,t)=>(F(),$("div",Uy,[(F(!0),$(Se,null,Ne(e.summary,r=>(F(),$("div",{key:r.key,class:"ect-mb-4"},[x("section",jy,[x("div",Hy,[x("h3",Vy,Ee(r.category),1)]),(F(!0),$(Se,null,Ne(r.selectedItemTypes,o=>(F(),$("div",{key:o.itemTypeId,class:"ect-flex ect-flex-col ect-border-b ect-border-ect-gray-200"},[x("div",zy,[x("h4",Gy,Ee(o.itemTypeName),1)]),(F(!0),$(Se,null,Ne(o.selectedOptions,i=>(F(),$(Se,{key:i.itemId},[x("div",Ky,[x("div",Xy,[x("span",Wy,Ee(i.itemName),1)]),x("div",Qy,[x("div",Zy,[ge(is,{value:i.qty,"onUpdate:value":a=>i.qty=a,min:o.minQuantity,max:o.maxQuantity,"data-test-id":`configurator-summary-counter-${i.itemId}`},null,8,["value","onUpdate:value","min","max","data-test-id"])]),Jy,x("div",Yy,[x("span",ev,Ee(Oe(Yt)(i.price)),1)])])]),i.isAttributes&&i.getTags().length>0?(F(),$("div",tv,[x("div",nv,[(F(!0),$(Se,null,Ne(i.getTags(),a=>(F(),we(or,{key:a.attributeId,label:a.label,value:a.value},null,8,["label","value"]))),128))])])):ye("",!0)],64))),128))]))),128)),x("div",rv,[x("span",ov," Total : "+Ee(Oe(Yt)(r.totalPrice())),1)])])]))),128))]))}},[["__scopeId","data-v-cb7a75a9"]]),av={class:"configurator-page ect-flex ect-flex-col ect-h-full ect-relative","data-test-id":"configurator-page-container"},sv={"data-test-id":"configurator-tabs-container",class:"ect-bg-white ect-shadow-sm ect-flex-shrink-0 ect-mb-4"},lv={class:"ect-bg-white ect-border-t ect-border-gray-200 ect-flex-shrink-0 ect-absolute ect-bottom-0 ect-left-0 ect-right-0 ect-z-50","data-test-id":"configurator-footer-sticky"},uv=Be({__name:"ConfiguratorTabs",props:{modelValue:{type:String,default:""}},emits:["scroll","update:modelValue"],setup(e,{emit:n}){const t=wn(),r=e,o=n,i=ve({get:()=>r.modelValue,set:f=>o("update:modelValue",f)}),a=X(""),s=ve(()=>t.configuration.categoryOptions),l=ve(()=>{const f=s.value.map(g=>({key:g.key,title:g.category}));return f.push({key:"summary",title:"Summary"}),f}),u=ve(()=>c.value.get(i.value)),c=ve(()=>{const f=new Map;return s.value.forEach(g=>{f.set(g.key,g)}),f}),h=()=>{const f=l.value.findIndex(g=>g.key===i.value);if(f<l.value.length-1){const g=l.value[f+1];i.value=g.key}else t.maintainQuoteConfiguration(!0)};ze(i,f=>{d(f),o("scroll",0)});const d=f=>{i.value=f;const g=l.value.findIndex(v=>v.key===f),p=g<l.value.length-1?l.value[g+1]:null;a.value=(p==null?void 0:p.title)||""},m=f=>{const g=f.target.scrollTop;o("scroll",g)};return Zt(()=>{i.value=l.value[0].key,o("update:modelValue",l.value[0].key)}),(f,g)=>(F(),$("div",av,[x("div",sv,[ge(J8,{modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=p=>i.value=p),"show-tabs":!0,border:"",tabs:l.value,"data-test-id":"configurator-tabs-container",onTabChange:d},null,8,["modelValue","tabs"])]),i.value&&i.value!=="summary"?(F(),$("div",{key:0,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-p-4 ect-pt-0 ect-pb-20","data-test-id":"`configurator-${activeTab}-tab-content`",onScroll:m},[ge(qy,{data:u.value},null,8,["data"])],32)):(F(),$("div",{key:1,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-p-4 ect-pt-0 ect-pb-20","data-test-id":"`configurator-${activeTab}-tab-content`",onScroll:m},[ge(iv,{summary:Oe(t).summary},null,8,["summary"])],32)),x("div",lv,[ge(cm,{"btn-text":i.value!=="summary"?"Next: "+a.value:Oe(t).showMinMaxPopup?"Proceed with Partial Save":"Save & Continue",item:Oe(t).configuration,disabled:i.value=="summary"&&!Oe(t).isChangedConfiguration,onContinue:h},null,8,["btn-text","item","disabled"])])]))}},[["__scopeId","data-v-d873f41d"]]),cv={class:"ect-px-6 ect-pt-4 ect-pb-2 ect-bg-white"},dv={class:"ect-flow-root"},fv=["src","alt"],hv={key:1,class:"ect-mb-2"},pv={class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed ect-transition-all ect-duration-400"},mv={key:0,class:"ect-mt-2"},gv={class:"ect-inline-block ect-mb-2"},yv={key:1,class:"ect-inline-block ect-mb-2"},vv={key:1,class:"ect-mt-2"},bv={__name:"ConfiguratorInfo",props:{config:{type:Object,required:!0},editAttributes:{type:Boolean,required:!0},scroll:{type:Number,default:0}},emits:["edit-attributes"],setup(e,{emit:n}){const t=e,r=n,o=ve(()=>t.config.attributes.map(i=>({label:i.label,value:i.value})).filter(i=>i.value!==null&&i.value!==""));return(i,a)=>(F(),$("div",cv,[x("div",dv,[e.config.defaultImageURL&&e.scroll<50?(F(),$("div",{key:0,class:De(["ect-bg-gray-200 ect-rounded-lg ect-overflow-hidden ect-float-left ect-mr-4 ect-mb-2",e.editAttributes?"ect-w-[40px] ect-h-[40px]":"ect-w-[104px] ect-h-[104px]"])},[e.config.defaultImageURL?(F(),$("img",{key:0,src:e.config.defaultImageURL,alt:e.config.itemName,class:"ect-w-full ect-h-full ect-object-cover"},null,8,fv)):ye("",!0)],2)):ye("",!0),e.scroll<50?(F(),$("div",hv,[x("p",pv,Ee(e.config.description),1)])):ye("",!0),e.config.isAttributes?(F(),$(Se,{key:2},[e.editAttributes?(F(),$("div",vv,[ge(bu,{attributes:e.config.attributes,"config-item":e.config},null,8,["attributes","config-item"])])):(F(),$("div",mv,[o.value.length>0?(F(),$(Se,{key:0},[(F(!0),$(Se,null,Ne(o.value,(s,l)=>(F(),$("span",{key:l,class:"ect-inline-block ect-mr-2 ect-mb-2"},[ge(or,{label:s.label,value:s.value},null,8,["label","value"])]))),128)),x("span",gv,[x("button",{"data-test-id":"configurator-info-button-edit-attributes",onClick:a[0]||(a[0]=s=>r("edit-attributes"))},[ge(or,{label:"Edit attributes","edit-button":""})])])],64)):(F(),$("span",yv,[x("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:a[1]||(a[1]=s=>r("edit-attributes"))},[ge(or,{label:"Add attributes","add-button":""})])]))]))],64)):ye("",!0)])]))}},_v={class:"configurator-minmax-popup-panel ect-rounded-md ect-fixed ect-top-2 ect-right-2 ect-z-50 ect-w-[547px] ect-max-w-[calc(100vw-1rem)] ect-flex ect-flex-col ect-bg-white ect-rounded ect-border ect-border-[#ED928A] ect-shadow-[0px_20px_20px_12px_rgba(0,0,0,0.02)] ect-overflow-y-auto","data-test-id":"configurator-minmax-popup"},xv=x("div",{class:"ect-flex-shrink-0 ect-px-3 ect-py-2 ect-bg-[#FFF9F9] ect-border-b ect-border-[#F1E1E1]","data-test-id":"configurator-minmax-popup-header"},[x("p",{class:"ect-m-0 ect-text-xs ect-font-semibold ect-leading-[1.5] ect-text-[#353535]","data-test-id":"configurator-minmax-popup-title"}," Resolve These to Complete Configuration (You Can Partially Save and Return) ")],-1),Cv={class:"ect-flex-1 ect-min-h-0 ect-max-h-[152px]"},Ev={class:"ect-list-none ect-p-0 ect-m-0","data-test-id":"configurator-minmax-popup-errors"},kv=["data-test-id","onClick"],Av=["innerHTML"],wv={__name:"ConfiguratorMinMaxPopup",props:{redirect:{type:Boolean,default:!1}},emits:["redirect"],setup(e,{emit:n}){const t=wn(),r=n,o=e,i=a=>{o.redirect&&r("redirect",a)};return ze(()=>t.minMaxErrors,a=>{a.length===0&&t.showMinMaxPopup&&(t.showMinMaxPopup=!1)}),(a,s)=>(F(),$("div",_v,[xv,x("div",Cv,[x("ul",Ev,[(F(!0),$(Se,null,Ne(Oe(t).minMaxErrors,(l,u)=>(F(),$("li",{key:u,class:De(["ect-flex ect-items-center ect-gap-2 ect-p-3 ect-bg-[#FFF9F9] ect-border-b ect-border-[#F1E1E1] last:ect-border-b-0",{"ect-cursor-pointer":o.redirect}]),"data-test-id":`configurator-minmax-popup-error-${u}`,onClick:c=>i(l)},[ge(Ge,{icon:"info",size:16,color:"#D23333",class:"ect-flex-shrink-0","data-test-id":`configurator-minmax-popup-error-icon-${u}`},null,8,["data-test-id"]),x("p",{innerHTML:l.message,class:"ect-m-0 ect-flex-1 ect-text-xs ect-font-medium ect-leading-[1.5] ect-text-[#5F5F5F] ect-max-md:ect-max-w-full"},null,8,Av)],10,kv))),128))])])]))}},Iv=["data-test-id"],Sv=["data-test-id"],Ov=["data-test-id"],Tv={class:"ect-bg-white ect-rounded-xl ect-shadow-sm"},Dv={class:"ect-relative ect-w-full ect-border-b ect-border-solid ect-border-b-neutral-200 max-md:ect-max-w-full"},Rv={key:0,class:"ect-flex ect-z-0 ect-flex-col ect-gap-4 ect-justify-center ect-py-4 ect-px-6 ect-w-full max-md:ect-px-5 max-md:ect-max-w-full"},Mv={class:"ect-gap-1 ect-w-full max-md:ect-max-w-full"},Fv={class:"ect-text-lg ect-font-semibold ect-leading-5 ect-text-neutral-700 max-md:ect-max-w-full"},Bv={key:0,class:"ect-mt-1 ect-text-sm ect-leading-none ect-text-zinc-600 max-md:ect-max-w-full"},Nv={class:"ect-flex ect-overflow-hidden ect-absolute ect-top-2.5 ect-right-4 ect-z-0 ect-p-1 ect-rounded-lg"},Lv={key:0,class:"ect-flex-1 ect-overflow-y-auto ect-h-[600px] ect-max-h-[70vh]"},Pv={key:1,class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-text-xs ect-leading-4 ect-text-neutral-700 max-md:ect-px-5 max-md:ect-max-w-full"},qv={key:2,class:"ect-relative ect-w-full ect-border-t ect-border-solid ect-border-t-neutral-200 max-md:ect-max-w-full"},$v=Be({__name:"AppModalGen3",props:{title:{type:String,required:!0},description:{type:String,required:!0},header:{type:Boolean,default:!1},footer:{type:Boolean,default:!1}},emits:["close"],setup(e,{emit:n}){const t=n;return(r,o)=>(F(),we(bf,{to:"modaltp"},{default:Ve(()=>[x("div",{class:"modal-mask","data-test-id":`${r.dataTestId}-mask`},[x("div",{class:"modal-wrapper","data-test-id":`${r.dataTestId}-wrapper`},[x("div",{class:"modal-container",style:Te(r.width?`max-width: ${r.width.includes("calc")?r.width:r.width+"px"}; width: 100%;`:""),"data-test-id":`${r.dataTestId}-container`},[x("div",Tv,[x("div",Dv,[e.header?(F(),$("div",Rv,[x("div",Mv,[x("div",Fv,Ee(e.title),1),e.description?(F(),$("div",Bv,Ee(e.description),1)):ye("",!0)])])):ye("",!0),x("div",Nv,[x("button",{class:"ect-flex ect-self-stretch ect-my-auto ect-w-6 ect-min-h-6 ect-cursor-pointer hover:ect-bg-gray-100 ect-rounded ect-transition-colors ect-justify-center ect-items-center","aria-label":"Close modal",onClick:o[0]||(o[0]=i=>t("close"))},[ge(Ge,{icon:"close",color:"#000000",size:"11",height:"11"})])])]),r.$slots.content?(F(),$("div",Lv,[it(r.$slots,"content",{},void 0,!0)])):(F(),$("div",Pv,[it(r.$slots,"default",{},void 0,!0)])),e.footer?(F(),$("div",qv,[it(r.$slots,"footer",{},void 0,!0)])):ye("",!0)])],12,Ov)],8,Sv)],8,Iv)]),_:3}))}},[["__scopeId","data-v-41ebff01"]]),sr=e=>(Wt("data-v-6f0a3790"),e=e(),Qt(),e),Uv={class:"ect-w-[600px]"},jv={class:"ect-px-6 ect-pt-4 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-max-md:max-w-full"},Hv=sr(()=>x("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1)),Vv={class:"ect-flex ect-items-center ect-justify-between ect-rounded-lg ect-px-4 ect-py-2 ect-gap-2 ect-bg-light-bg-x"},zv={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Gv={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Kv={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Xv={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-mt-4 ect-w-full ect-bg-light-bg-x ect-max-md:max-w-full"},Wv={key:0,class:"ect-mb-4"},Qv=sr(()=>x("p",{class:"ect-text-xs ect-font-medium ect-leading-6 ect-text-neutral-700 ect-mb-3","data-test-id":"conflict-modal-pricing-rule-section-title"}," This caused change in price for ",-1)),Zv={class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-pricing-rule-table"},Jv=sr(()=>x("div",{class:"ect-px-4 ect-py-2"},[x("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-pricing-rule-header"}," This change will update price: ")],-1)),Yv={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-pricing-rule-product"},e7={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-add-qty"},t7={class:"ect-flex ect-items-center ect-gap-2"},n7={class:"ect-text-sm ect-font-medium ect-leading-5 ect-text-neutral-700 ect-line-through","data-test-id":"conflict-modal-pricing-rule-old-price"},r7={class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-text-success","data-test-id":"conflict-modal-pricing-rule-new-price"},o7={key:0,class:"ect-flex ect-justify-between ect-items-center ect-px-4 ect-py-1 ect-border-t ect-border-neutral-200","data-test-id":"conflict-modal-pricing-rule-price-change"},i7=sr(()=>x("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-pricing-rule-price-change-label"}," Price change ",-1)),a7={class:"ect-text-sm ect-font-semibold ect-leading-5","data-test-id":"conflict-modal-pricing-rule-price-change-value"},s7={key:1},l7=sr(()=>x("p",{class:"ect-text-xs ect-font-medium ect-leading-6 ect-text-neutral-700 ect-mb-3","data-test-id":"conflict-modal-supporting-text"}," Above selection requires a configuration change ",-1)),u7={class:"ect-flex ect-flex-col ect-gap-2"},c7={key:0,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-add-table"},d7=sr(()=>x("div",{class:"ect-px-4 ect-py-2"},[x("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-add-header"}," This change will add: ")],-1)),f7={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-add-product"},h7={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-add-qty"},p7={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-add-price"},m7={key:1,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-remove-table"},g7=sr(()=>x("div",{class:"ect-px-4 ect-py-2"},[x("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-remove-header"}," This change will remove: ")],-1)),y7={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-remove-product"},v7={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-remove-qty"},b7={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-remove-price"},_7={class:"ect-flex ect-justify-between ect-items-center ect-px-4 ect-py-1 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-bg-white ect-rounded-md ect-border ect-border-neutral-200 ect-rounded-md"},x7=sr(()=>x("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-price-change-label"}," Price change ",-1)),C7={class:"ect-text-sm ect-font-semibold ect-leading-5","data-test-id":"conflict-modal-price-change-value"},E7={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full"},k7=sr(()=>x("p",{class:"ect-text-xs ect-font-medium ect-leading-6 ect-text-neutral-500 ect-mb-2","data-test-id":"conflict-modal-summary-supporting-text"}," Price Adjustment Summary ",-1)),A7={class:"ect-border ect-border-neutral-200 ect-rounded-md ect-overflow-hidden ect-mt-2 ect-bg-neutral-50","data-test-id":"conflict-modal-summary-table"},w7={class:"ect-flex ect-flex-col ect-gap-2"},I7={class:"ect-flex-1"},S7={class:"font-regular","data-test-id":"conflict-modal-summary-base-price-label"},O7={class:"ect-text-center ect-w-28"},T7={class:"ect-text-sm ect-font-medium ect-leading-5 ect-text-neutral-700 ect-text-right ect-line-through","data-test-id":"conflict-modal-summary-base-price-original"},D7={class:"ect-text-center ect-w-28"},R7={class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-text-success ect-text-right","data-test-id":"conflict-modal-summary-base-price-adjusted"},M7={class:"ect-border ect-border-neutral-200 ect-rounded-md ect-overflow-hidden ect-px-4 ect-py-1 ect-mt-2","data-test-id":"conflict-modal-summary-total"},F7={class:"ect-flex ect-items-center"},B7=sr(()=>x("div",{class:"ect-flex-1"},[x("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-summary-total-label"}," Total Price change ")],-1)),N7={class:"ect-text-center ect-w-28"},L7={class:"ect-text-sm ect-font-medium ect-leading-5 ect-text-neutral-700 ect-text-right ect-line-through","data-test-id":"conflict-modal-summary-base-price-original"},P7={class:"ect-text-center ect-w-28"},q7={class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-text-success ect-text-right","data-test-id":"conflict-modal-summary-base-price-adjusted"},$7={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},U7=Be({__name:"ConflictModal",props:{item:{type:Object,required:!0},data:{type:Object,required:!0}},emits:["close","done"],setup(e,{emit:n}){const t=wn(),r=n,o=e,i=ve(()=>{const p=t.summaryPrices,v=h.value+m.value,y=[];return y.push({label:"Base Price",value:p.basePrice,priceChange:p.basePrice}),y.push({label:"Add Ons",value:p.addOns,priceChange:p.addOns+v}),y}),a=ve(()=>{const p=t.summaryPrices,v=h.value+m.value;return{label:"Total Price",value:p.total,priceChange:p.total+v}}),s=ve(()=>o.data.inclusions.map(v=>t.optionByPublishKey.get(v))),l=ve(()=>s.value.filter(p=>p.itemId!==o.item.itemId)),u=ve(()=>o.data.exclusions.map(p=>t.optionByPublishKey.get(p))),c=ve(()=>u.value.filter(p=>p.itemId!==o.item.itemId)),h=ve(()=>{const p=s.value.reduce((y,_)=>{const b=_.qty||1;return y+_.price*b},0),v=u.value.reduce((y,_)=>{const b=_.qty||1;return y+_.price*b},0);return p-v}),d=ve(()=>{if(!o.data.pricingRuleFormula||typeof o.data.pricingRuleFormula!="object")return[];const p=[],v=t.optionByPublishKey;return Object.keys(o.data.pricingRuleFormula).forEach(y=>{let _=v.get(y);if(!_){for(const[b,C]of v.entries())if(b.toLowerCase()===y.toLowerCase()){_=C;break}}if(_){const b=o.data.pricingRuleFormula[y];p.push({itemId:_.itemId,itemName:_.itemName,publishKey:y,oldPrice:_.price,newPrice:b.price,oldQty:_.qty,newQty:b.quantity})}}),p}),m=ve(()=>d.value.reduce((p,v)=>{const y=v.oldPrice*v.oldQty,_=v.newPrice*v.newQty;return p+(_-y)},0)),f=()=>{r("close")},g=()=>{if(o.data.pricingRuleFormula&&typeof o.data.pricingRuleFormula=="object"){const p=t.optionByPublishKey;Object.keys(o.data.pricingRuleFormula).forEach(v=>{let y=p.get(v);if(!y){for(const[_,b]of p.entries())if(_.toLowerCase()===v.toLowerCase()){y=b;break}}if(y){const _=o.data.pricingRuleFormula[v];y.price=_.price,y.qty=_.quantity}})}r("done")};return(p,v)=>(F(),we($v,{header:"",title:"Confirm Your Selection",description:"This selection requires a configuration change",footer:"","no-close":"",onClose:f},{content:Ve(()=>[x("div",Uv,[x("header",jv,[Hv,x("div",Vv,[x("p",zv,Ee(e.item.itemName),1),x("p",Gv,Ee(e.item.qty),1),x("p",Kv,Ee(Oe(Yt)(e.item.price)),1)])]),x("main",Xv,[d.value.length>0?(F(),$("div",Wv,[Qv,x("div",Zv,[Jv,(F(!0),$(Se,null,Ne(d.value,y=>(F(),$("div",{key:y.itemId,class:"ect-flex ect-items-center ect-justify-between ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[x("p",Yv,Ee(y.itemName),1),x("p",e7,Ee(y.newQty),1),x("div",t7,[x("p",n7,Ee(Oe(Yt)(y.oldPrice*y.oldQty)),1),x("p",r7,Ee(Oe(Yt)(y.newPrice*y.newQty)),1)])]))),128)),m.value!==0?(F(),$("div",o7,[i7,x("p",a7,Ee(Oe(Yt)(m.value)),1)])):ye("",!0)])])):ye("",!0),l.value.length>0||c.value.length>0?(F(),$("div",s7,[l7,x("div",u7,[l.value.length>0?(F(),$("div",c7,[d7,(F(!0),$(Se,null,Ne(l.value,y=>(F(),$("div",{key:y.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[x("p",f7,Ee(y.itemName),1),x("p",h7,Ee(y.qty),1),x("p",p7," + "+Ee(Oe(Yt)(y.price*(y.qty||1))),1)]))),128))])):ye("",!0),c.value.length>0?(F(),$("div",m7,[g7,(F(!0),$(Se,null,Ne(c.value,y=>(F(),$("div",{key:y.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[x("p",y7,Ee(y.itemName),1),x("p",v7,Ee(y.qty),1),x("p",b7," - "+Ee(Oe(Yt)(y.price*(y.qty||1))),1)]))),128))])):ye("",!0),x("div",_7,[x7,x("p",C7,Ee(Oe(Yt)(h.value)),1)])])])):ye("",!0)]),x("footer",null,[x("div",E7,[k7,x("div",A7,[x("div",w7,[(F(!0),$(Se,null,Ne(i.value,(y,_)=>(F(),$("div",{key:y.label,class:De(["ect-flex ect-px-4 ect-py-1",{"ect-border-t ect-border-neutral-200":_>0}])},[x("div",I7,[x("p",S7,Ee(y.label),1)]),x("div",O7,[x("p",T7,Ee(Oe(Yt)(y.value)),1)]),x("div",D7,[x("p",R7,Ee(Oe(Yt)(y.priceChange)),1)])],2))),128))])]),x("div",M7,[x("div",F7,[B7,x("div",N7,[x("p",L7,Ee(Oe(Yt)(a.value.value)),1)]),x("div",P7,[x("p",q7,Ee(Oe(Yt)(a.value.priceChange)),1)])])])])])])]),footer:Ve(()=>[x("div",$7,[ge(Vt,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"conflict-modal-button-cancel",onClick:v[0]||(v[0]=y=>r("close"))},{default:Ve(()=>[He("Cancel")]),_:1}),ge(Vt,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"conflict-modal-button-done",onClick:g},{default:Ve(()=>[He("Done")]),_:1})])]),_:1}))}},[["__scopeId","data-v-6f0a3790"]]),j7=["data-test-id"],H7=["placeholder","value","data-test-id"],V7=["data-test-id"],z7=["data-test-id","onClick"],G7=Be({__name:"MoleculeSearch",props:{placeholder:{type:String,default:""},modelValue:{type:String,default:""},height:{type:[Number,String],default:32},size:{type:String,default:"regular"},loading:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},iconPosition:{type:String,default:"right",validator:e=>["left","right"].includes(e)},dataTestId:{type:String,required:!0}},emits:["update:modelValue","optionClick"],setup(e,{emit:n}){const t=e,r=n,o=X(""),i=X(null),a=X(!1),s=X(null),l=X(!0),u=ve(()=>l.value?{}:{bottom:"100%",marginTop:"0",marginBottom:"4px"}),c=async()=>{var C;if(await Dt(),!s.value)return;const v=s.value.getBoundingClientRect(),_=window.innerHeight-v.bottom,b=Math.min(((C=t.options)==null?void 0:C.length)*40+20,200);l.value=_>=b},h=()=>{i.value=null,r("update:modelValue","")},d=p=>{const v=p.target.value;o.value&&(clearTimeout(o.value),o.value=null),o.value=setTimeout(()=>{r("update:modelValue",v)},500)},m=async()=>{a.value=!0,await c()},f=()=>{setTimeout(()=>{a.value=!1},150)},g=p=>{a.value=!1,o.value&&(clearTimeout(o.value),o.value=null),r("update:modelValue",p.label),r("optionClick",p)};return(p,v)=>{var y;return F(),$("div",{ref_key:"searchContainer",ref:s,class:De(["molecule-search",{"icon-left":e.iconPosition==="left"}]),"data-test-id":e.dataTestId},[e.loading?(F(),we(cu,{key:0,size:16,class:"icon ect-top-2 icon-loader","data-test-id":`${e.dataTestId}-loader`},null,8,["data-test-id"])):e.iconPosition==="left"||!e.modelValue?(F(),we(Ge,{key:1,class:"icon-search ect-mt-[-1px]",icon:"search",size:14,color:"#5f5f5f","data-test-id":`${e.dataTestId}-search`,onClick:h},null,8,["data-test-id"])):ye("",!0),x("input",{class:De(["search-input-box",{large:e.size==="large"}]),type:"text",style:Te({height:`${e.height}px`}),placeholder:t.placeholder,value:e.modelValue,"data-test-id":`${e.dataTestId}-input`,onInput:d,onFocus:m,onBlur:f},null,46,H7),e.modelValue&&!e.loading?(F(),we(Ge,{key:2,class:"close-btn",icon:"close",size:8,color:"#5f5f5f","data-test-id":`${e.dataTestId}-close`,onClick:h},null,8,["data-test-id"])):ye("",!0),((y=e.options)==null?void 0:y.length)>0&&a.value?(F(),$("div",{key:3,class:De(["search-options",{"dropdown-top":!l.value}]),style:Te(u.value),"data-test-id":`${e.dataTestId}-dropdown`},[(F(!0),$(Se,null,Ne(e.options,(_,b)=>(F(),$("div",{key:_.id,class:"search-option","data-test-id":`${e.dataTestId}-option-${b}`,onClick:_t(C=>g(_),["stop"]),onMousedown:v[0]||(v[0]=_t(()=>{},["prevent"]))},[He(Ee(_.label)+" ",1),x("span",null,Ee(_.subLabel),1)],40,z7))),128))],14,V7)):ye("",!0)],10,j7)}}},[["__scopeId","data-v-6cdaa802"]]),K7=["data-test-id"],X7=Be({__name:"StatePill",props:{text:{type:String,required:!0},state:{type:String,default:"default",validator:e=>["default","draft","review","active","inactive","in draft","active"].includes(e)},dataTestId:{type:String,default:""}},setup(e){const n=e,t=ve(()=>({"ect-state-pill--default":n.state==="default","ect-state-pill--draft":n.state==="draft"||n.state==="in draft","ect-state-pill--review":n.state==="review","ect-state-pill--active":n.state==="active","ect-state-pill--inactive":n.state==="inactive"}));return(r,o)=>(F(),$("span",{class:De(["ect-state-pill",t.value]),"data-test-id":e.dataTestId},Ee(e.text),11,K7))}},[["__scopeId","data-v-6be678b8"]]),W7=["data-test-id"],Q7=["data-test-id"],Z7=["data-test-id"],J7=["data-test-id"],Y7=["data-test-id","onClick"],eb=["data-test-id"],tb=Be({__name:"ecBreadcrumbs",props:{links:{type:Array,default:()=>[],validator:e=>e.every(n=>typeof n=="object"&&typeof n.text=="string"&&(n.route===void 0||typeof n.route=="string"||typeof n.route=="object"))},dataTestId:{type:String,required:!0}},setup(e){const n=Va(),t=r=>{r&&n.push(r)};return(r,o)=>(F(),$("div",{class:"ect-flex ect-items-center ect-justify-between","data-test-id":e.dataTestId},[x("div",{class:"ect-flex ect-items-center ect-gap-4","data-test-id":`${e.dataTestId}-container`},[x("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-breadcrumbs`},[(F(!0),$(Se,null,Ne(e.links,(i,a)=>(F(),$(Se,{key:a},[a>0?(F(),$("span",{key:0,class:"ect-text-[#828282] ect-text-xs ect-font-semibold","data-test-id":`${e.dataTestId}-separator-${a}`}," / ",8,J7)):ye("",!0),i.route?(F(),$("button",{key:1,class:"ect-text-[#828282] ect-text-xs ect-font-semibold ect-font-ui ect-leading-normal hover:ect-text-[#0076D6] hover:ect-underline ect-transition-colors","data-test-id":`${e.dataTestId}-link-${a}`,onClick:s=>t(i.route)},Ee(i.text),9,Y7)):(F(),$("span",{key:2,class:"ect-text-[#828282] ect-text-xs ect-font-semibold ect-font-ui ect-leading-normal","data-test-id":`${e.dataTestId}-text-${a}`},Ee(i.text),9,eb))],64))),128))],8,Z7)],8,Q7)],8,W7))}},[["__scopeId","data-v-151ca816"]]),nb={components:{AppIcon:Ge},props:{direction:{type:String,default:"top",validator:e=>["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"].includes(e)},content:{type:String,default:null},disabled:{type:Boolean,default:!1},width:{type:Number,default:130},icon:{type:String,default:null},dataTestId:{type:String,default:""}},data(){return{show:!1}},computed:{tooltipClass(){return{tooltip:!0,[`tooltip-${this.direction}`]:!0}},styleObj(){return{width:`${this.width}px !important`}}},methods:{showTooltip(){this.disabled||(this.show=!0)},hideTooltip(){this.show=!1}}},rb=["data-test-id"],ob=["data-test-id"];function ib(e,n,t,r,o,i){const a=un("AppIcon");return t.content?(F(),$("div",{key:0,class:"tooltip-container","data-test-id":t.dataTestId,onMouseover:n[0]||(n[0]=(...s)=>i.showTooltip&&i.showTooltip(...s)),onMouseleave:n[1]||(n[1]=(...s)=>i.hideTooltip&&i.hideTooltip(...s))},[it(e.$slots,"default",{},void 0,!0),kn(x("div",{class:De(i.tooltipClass),style:Te(i.styleObj),"data-test-id":`${t.dataTestId}-content`},[t.icon?(F(),we(a,{key:0,icon:t.icon,color:"#57c046",size:14,"data-test-id":`${t.dataTestId}-icon`},null,8,["icon","data-test-id"])):ye("",!0),He(" "+Ee(t.content),1)],14,ob),[[tf,o.show]])],40,rb)):it(e.$slots,"default",{key:1},void 0,!0)}const O1=Be(nb,[["render",ib],["__scopeId","data-v-b36acc62"]]);function pn(e){if(typeof e=="string"&&(e=JSON.parse(e)),e!=null&&e.errorMessage)throw new Error(e==null?void 0:e.errorMessage);return e}const ab=Mt("item",()=>{const e=An(),n=X([]),t=X([]),r=X(!1),o=X(0),i=X(1),a=X(""),s=X(20),l=X(null),u=X(!1),c=X(null),h=X(!1),d=X(null),m=X(null),f=X(null),g=X(null),p=X(null),v=X({addedOptionIds:null,eCatalogCount:null,ecatalogs:null,publishVersionId:null,removedOptionIds:null}),y=X([]),_=X({ecatalogIds:[],optionItemsToAdd:[]}),b=X(!1),C=X(null),A=X(0),E=2,I=j=>{!Array.isArray(j)||j.every(Z=>{var ae;return Z.id&&((ae=Z.itemTypes)==null?void 0:ae.every(fe=>{var H;return fe.id&&((H=fe.options)==null?void 0:H.every(z=>z.id))}))})||j.forEach((Z,ae)=>{Z.id||(Z.id=`category-${ae}-${Z.category}`),Z.itemTypes&&Array.isArray(Z.itemTypes)&&Z.itemTypes.forEach((fe,H)=>{fe.id||(fe.id=fe.itemTypeId||`itemType-${ae}-${H}-${fe.itemTypeName||"unnamed"}`),fe.options&&Array.isArray(fe.options)&&fe.options.forEach((z,ne)=>{z.id||(z.id=z.itemId||`option-${ae}-${H}-${ne}-${z.itemName||"unnamed"}`)})})})},M=async(j,Q=null)=>{var Z;try{h.value=!0;let ae={};if(Q)ae={fileId:Q};else{const H=y.value.find(ne=>ne.status==="Draft"),z=y.value.find(ne=>ne.status==="Active");z?ae={fileId:z.id}:H?ae={fileId:H.id}:ae={itemId:j}}let fe=await window.AdminConfiguratorManager.getItemConfiguration({request:JSON.stringify(ae)});return fe!=null&&fe.errorMessage?(e.handleError(fe.errorMessage),null):(fe=pn(fe.data),typeof fe.data=="string"&&(fe=JSON.parse(fe.data)),(Z=fe==null?void 0:fe.productItem)!=null&&Z.categoryOptions&&I(fe.productItem.categoryOptions),l.value=fe,h.value=!1,y.value.length===0&&!r.value&&await ie(),fe.data)}catch(ae){return h.value=!1,e.handleError("Failed to fetch item configuration. Please try again.",ae),null}},S=async(j,Q="",Z="")=>{try{const ae={searchTerm:j,itemTypeId:Q,filterType:Z};let fe=await window.AdminConfiguratorManager.getItemsList({request:JSON.stringify(ae)});return fe=pn(fe),fe!=null&&fe.errorMessage?(e.handleError(fe.errorMessage),null):fe}catch{return e.handleError("Failed to fetch option list. Please try again."),null}},k=async(j,Q)=>{try{const Z={productItemId:p.value,optionItemId:j,existingItemType:Q};let ae=await window.AdminConfiguratorManager.getItemDetails({request:JSON.stringify(Z)});return ae=pn(ae),ae!=null&&ae.errorMessage?(e.handleError(ae.errorMessage),null):ae}catch{return e.handleError("Failed to fetch option details. Please try again."),null}},w=async()=>{try{const j=await window.AdminConfiguratorManager.getAvailableAttributes();return JSON.parse(j)}catch{e.handleError("Failed to fetch available attributes. Please try again.")}},T=async j=>{try{const Q=await window.AdminConfiguratorManager.addAttribute({request:JSON.stringify(j)});return JSON.parse(Q)}catch{e.handleError("Failed to fetch item configuration. Please try again.")}},q=async j=>{try{const Q=JSON.stringify(j),Z=await window.AdminConfiguratorManager.getChildFields({request:Q});return JSON.parse(Z)}catch(Q){throw e.handleError("Failed to fetch child fields. Please try again.",Q),Q}},K=async()=>{const j={objectApiName:"XX_Base__Item_Type__c",fieldApiName:"XX_Base__Item_Type_Category__c"};try{return(await window.AdminConfiguratorManager.getPicklistValues({request:JSON.stringify(j)})).data}catch(Q){throw e.handleError("Failed to fetch picklist values. Please try again.",Q),Q}},U=async()=>{var j,Q,Z;try{const ae=(Q=(j=l.value)==null?void 0:j.productItem)==null?void 0:Q.itemStatus,H={fileId:(Z=y.value.find(ne=>ne.status===ae))==null?void 0:Z.id,itemId:p.value};let z=await window.AdminConfiguratorManager.activateItemConfig({request:JSON.stringify(H)});return z!=null&&z.error?(R(z==null?void 0:z.error),null):(z=pn(z.data),v.value=z,z)}catch{return R(),null}},Y=async()=>{try{const j={productId:"068bn00000Anu0YAAR"};return(await window.AdminConfiguratorManager.getECatalogsForProduct({request:JSON.stringify(j)})).data}catch(j){e.handleError("Failed to fetch e catalogs for product. Please try again.",j)}},ie=async()=>{try{const j={productId:p.value},Q=await window.AdminConfiguratorManager.getProductConfigInfo({request:JSON.stringify(j)}),Z=JSON.parse(Q.data);return y.value=Z.data,Z}catch(j){e.handleError("Failed to save item configuration. Please try again.",j)}},ee=async()=>{try{const j={ecatalogIds:_.value.ecatalogIds,productItemId:p.value,optionItemsToAdd:_.value.optionItemsToAdd};return(await window.AdminConfiguratorManager.saveItemConfigToCatalog({request:JSON.stringify(j)})).data}catch(j){e.handleError("Failed to save item configuration to catalog. Please try again.",j)}},P=async()=>{var j,Q,Z;try{const ae=(Q=(j=l.value)==null?void 0:j.productItem)==null?void 0:Q.itemStatus,fe={itemId:p.value,fileId:(Z=y.value.find(se=>se.status===ae))==null?void 0:Z.id},H=await window.AdminConfiguratorManager.createNewVersion({request:JSON.stringify(fe)}),z=JSON.parse(H);await ie(),await M(p.value,z.id);const ne=y.value.findIndex(se=>se.status==="Draft");return ne!==-1?y.value[ne]=z:y.value.push(z),z}catch(ae){e.handleError("Failed to create new version. Please try again.",ae)}},O=async()=>{var ae,fe;const j=(ae=y.value.find(H=>H.status==="Inactive"))==null?void 0:ae.id,Q=(fe=y.value.find(H=>H.status==="Active"))==null?void 0:fe.id,Z={itemId:p.value,activeVersionId:Q,inactiveVersionId:j};try{return(await window.AdminConfiguratorManager.rollbackItemConfig({request:JSON.stringify(Z)})).data}catch(H){e.handleError("Failed to rollback item configuration. Please try again.",H)}},R=j=>{j?C.value=j:C.value=null,b.value=!0};return{items:n,loading:r,totalCount:o,currentPage:i,searchTerm:a,itemLimit:s,columns:t,currentItemConfig:l,savingItemConfiguration:u,currentItem:c,configLoader:h,currentItemData:d,currentGroupIndex:m,currentOptionIndex:f,currentOptionData:g,versionInfo:y,activateConfigData:v,activatePayload:_,itemId:p,showActivationErrorModal:b,activationError:C,activationRetryCount:A,maxRetries:E,getItemConfiguration:M,getItemsList:S,getItemDetails:k,getAvailableAttributes:w,addAttribute:T,getChildFields:q,getPicklistValues:K,activateItemConfig:U,getECatalogsForProduct:Y,getversionInfo:ie,saveItemConfigToCatalog:ee,createNewVersion:P,rollbackItemConfig:O,addCrossSell:async j=>{const Q={itemId:j.id||j.itemId,primarySortOrder:j.primarySortOrder};try{const Z=await window.AdminConfiguratorManager.addCrossSell({request:JSON.stringify(Q)});return JSON.parse(Z.data)}catch(Z){return e.handleError("Failed to add cross sell. Please try again.",Z),null}},saveItemConfiguration:async()=>{var j;if(h.value||r.value||u.value||!((j=l.value)!=null&&j.productItem))return null;if(!(l.value.productItem.itemStatus==="Active"||l.value.productItem.itemStatus==="Inactive"))try{u.value=!0;const Q={itemId:p.value,configurationData:l.value},Z=await window.AdminConfiguratorManager.saveItemConfiguration({request:JSON.stringify(Q)});if(Z!=null&&Z.errorMessage)return e.handleError(Z.errorMessage),null;if(!(Z!=null&&Z.error)){const ae=y.value.findIndex(fe=>fe.status==="Draft");y.value[ae].id=Z.data}return Z}catch(Q){return e.handleError("Failed to save item configuration. Please try again.",Q),null}finally{u.value=!1}},showActivationError:R,hideActivationError:()=>{b.value=!1,A.value=0},incrementRetryCount:()=>{A.value+=1,b.value=!0},canRetry:()=>A.value<E,assignStableIds:I}}),sb={class:"app-filters-main-wrapper"},lb={class:"app-filters-wrapper"},ub={class:"app-filters"},cb={class:"left-section"},db={class:"ect-flex ect-gap-2 ect-items-center"},fb={class:"ect-absolute ect-top-0 ect-right-0 ect-w-full ect-h-full ect-z-10"},hb={class:"right-section"},pb={class:"after-search-wrapper"},mb={class:"buttons-wrapper"},gb={class:"before-button-wrapper"},yb={key:0,class:"action-wrapper"},vb={key:1,class:"button-text ect-font-medium"},bb={key:2,class:"count-badge"},_b=Be({__name:"FilterHeader",props:{title:{type:String,default:""},showSearch:{type:Boolean,default:!1},buttons:{type:Array,default:()=>[],validator:e=>e.every(n=>(n.icon||n.text)&&typeof n.handler=="function")},searchWidth:{type:String,default:"312px"},showBackButton:{type:Boolean,default:!1},statusText:{type:String,default:""},placeholder:{type:String,default:"Search by name"},breadcrumbLinks:{type:Array,default:()=>[],validator:e=>e.every(n=>typeof n=="object"&&typeof n.text=="string"&&(n.route===void 0||typeof n.route=="string"))},recordLink:{type:String,default:""}},emits:["search","back"],setup(e,{emit:n}){const t=ab(),r=e,o=ii([]);bt(()=>{i()});const i=()=>{o.splice(0,o.length),r.buttons&&r.buttons.length>0&&r.buttons.forEach(d=>{o.push({...d})})};ze(()=>r.buttons,()=>{i()},{deep:!0});const a=d=>{s("search",d)},s=n,l=X(""),u=(d,m)=>{d.supportsToggle&&(d.isActive=!d.isActive),typeof d.handler=="function"&&d.handler(d,d.isActive)},c=()=>{s("back")},h=()=>{if(!r.recordLink)return;let d=r.recordLink;if(!d){let v=t.itemId;if(!v){const y=new URLSearchParams(window.location.search),_=new URLSearchParams(window.location.hash.split("?")[1]);v=y.get("itemId")||_.get("itemId")}d=v}if(!d)return;const f=window.location.href.match(/^(https?:\/\/[^/]+)/);if(!f){console.info("[ERROR]: Unable to extract base domain from current URL");return}const p=`${f[1]}/${d}`;window.open(p,"_blank")};return(d,m)=>(F(),$("div",sb,[x("div",lb,[x("div",ub,[x("div",cb,[e.breadcrumbLinks&&e.breadcrumbLinks.length>1?(F(),we(tb,{key:0,links:e.breadcrumbLinks,"data-test-id":"filter-header-breadcrumbs",class:"ect-mb-3"},null,8,["links"])):ye("",!0),x("div",db,[e.showBackButton?(F(),$("button",{key:0,class:"back-button","data-test-id":"filter-header-button-back",onClick:c},[ge(Ge,{icon:"arrow",symbol:"",size:16,color:"#198708",class:"ect-relative ect-top-[3px]"})])):ye("",!0),e.title?(F(),$("p",{key:1,class:De(["ect-relative ect-text-lg ect-font-semibold ect-leading-5 ect-text-[#1F1F1F] ect-transition-colors ect-duration-200",{"hover:ect-text-[#0076D6] ect-cursor-pointer":e.recordLink}]),"data-test-id":"filter-header-title",onClick:m[0]||(m[0]=f=>e.recordLink?h():null)},[He(Ee(e.title)+" ",1),e.recordLink?(F(),$(Se,{key:0},[ge(Ge,{icon:"open-link",symbol:"",size:16,color:"currentColor",class:"ect-relative ect-top-[3px]"}),x("div",fb,[ge(O1,{class:"ect-min-w-full ect-h-full",direction:"top",content:"View Item in Salesforce","data-test-id":"filter-header-tooltip",width:160})])],64)):ye("",!0)],2)):ye("",!0),e.statusText?(F(),we(X7,{key:2,text:e.statusText,state:e.statusText.toLowerCase(),"data-test-id":"`filter-header-status-pill`"},null,8,["text","state"])):ye("",!0),it(d.$slots,"after-status",{},void 0,!0)])]),x("div",hb,[e.showSearch?(F(),$("div",{key:0,class:"search-wrapper",style:Te({width:e.searchWidth})},[ge(G7,{modelValue:l.value,"onUpdate:modelValue":[m[1]||(m[1]=f=>l.value=f),a],class:"search-input",placeholder:e.placeholder,"data-test-id":"filter-header-search-input"},null,8,["modelValue","placeholder"])],4)):ye("",!0),x("div",pb,[it(d.$slots,"afterSearch",{},void 0,!0)]),x("div",mb,[x("div",gb,[it(d.$slots,"before-button",{},void 0,!0)]),d.$slots.buttons?(F(),$("div",yb,[it(d.$slots,"buttons",{},void 0,!0)])):(F(!0),$(Se,{key:1},Ne(o,(f,g)=>(F(),$("div",{key:g,class:"action-wrapper"},[ge(Vt,{btype:f.type||"primary","button-style":f.style||"outlined",size:"medium",style:Te({minWidth:f.minWidth||"auto"}),class:De([{active:f.isActive},{"icon-only":f.icon&&!f.text},{"text-button":f.text}]),loading:f.loading,disabled:f.disabled,"data-test-id":`filter-header-button-${f.text?f.text.toLowerCase().replace(/\s+/g,"-"):g}`,onClick:p=>u(f)},{default:Ve(()=>[f.icon?(F(),we(Ge,{key:0,icon:f.icon,symbol:"",color:f.color||"#136E05",size:f.size||14},null,8,["icon","color","size"])):ye("",!0),f.text?(F(),$("span",vb,Ee(f.isActive?f.altText:f.text),1)):ye("",!0),f.count?(F(),$("span",bb,Ee(f.count),1)):ye("",!0)]),_:2},1032,["btype","button-style","style","class","loading","disabled","data-test-id","onClick"])]))),128))])])])])]))}},[["__scopeId","data-v-2ea70801"]]),xb=["data-test-id"],Cb=["data-test-id"],Eb=["data-test-id"],kb=["data-test-id"],Ab=["data-test-id"],wb=["data-test-id"],Ib=["data-test-id"],Sb=Be({__name:"ecSwitch",props:pd({text:{type:[String,Object],required:!1,validator:e=>typeof e=="string"?!0:typeof e=="object"&&e!==null?Object.prototype.hasOwnProperty.call(e,"on")&&Object.prototype.hasOwnProperty.call(e,"off"):!1},subtext:{type:String,required:!1},size:{type:String,default:"regular",validator:e=>["regular","large"].includes(e)},disabled:{type:Boolean,default:!1},dataTestId:{type:String,default:""},leftAlign:{type:Boolean,default:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:pd(["update:modelValue"],["update:modelValue"]),setup(e,{emit:n}){const t=e,r=h6(e,"modelValue"),o=n,i=ve(()=>typeof t.text=="string"?t.text:typeof t.text=="object"&&t.text!==null?r.value?t.text.on:t.text.off:""),a=()=>{t.disabled||o("update:modelValue",!r.value)};return(s,l)=>(F(),$("div",{class:De(["ec-switch-container",{disabled:e.disabled}]),"data-test-id":e.dataTestId},[e.leftAlign?(F(),$("span",{key:0,class:"ec-switch__label","data-test-id":`${e.dataTestId}-label`},[He(Ee(i.value)+" ",1),e.subtext?(F(),$("span",{key:0,class:"ec-switch__subtext","data-test-id":`${e.dataTestId}-subtext`},Ee(e.subtext),9,Eb)):ye("",!0)],8,Cb)):ye("",!0),x("div",{class:De(["ec-switch",{"ec-switch--active":r.value,"ec-switch--large":e.size==="large"}]),"data-test-id":`${e.dataTestId}-switch`,onClick:a},[x("div",{class:"ec-switch__handle","data-test-id":`${e.dataTestId}-handle`},null,8,Ab)],10,kb),e.leftAlign?ye("",!0):(F(),$("span",{key:1,class:"ec-switch__label","data-test-id":`${e.dataTestId}-label`},[He(Ee(i.value)+" ",1),e.subtext?(F(),$("span",{key:0,class:"ec-switch__subtext","data-test-id":`${e.dataTestId}-subtext`},Ee(e.subtext),9,Ib)):ye("",!0)],8,wb))],10,xb))}},[["__scopeId","data-v-cfefad9a"]]),Ob={key:0,class:"ect-bg-white ect-h-full ect-flex ect-flex-col ect-overflow-auto"},Tb={key:0,class:"ect-fixed ect-top-2 ect-right-2 ect-z-[60]","data-test-id":"configurator-minmax-popup-wrapper"},Db={class:"ect-sticky ect-top-0 ect-z-50 ect-bg-white","data-test-id":"configurator-header-sticky"},Rb={class:"ect-flex ect-flex-col ect-sticky ect-top-0 ect-z-50 ect-bg-white ect-border-b ect-border-gray-200"},Mb={key:0,class:"ect-mr-2 ect-w-[300px]"},Fb={key:1,class:"ect-relative ect-text-lg ect-font-semibold ect-leading-5 ect-text-[#1F1F1F] ect-transition-colors ect-duration-200"},Bb={key:0,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-bg-light-bg-x","data-test-id":"configurator-content-scrollable"},Nb=Be({__name:"ProductConfiguration",props:{qliId:{type:String,required:!1},cart:{type:Boolean,default:!1}},emits:["action"],setup(e,{emit:n}){const t=wn(),r=X(!1),o=X(0),i=X(t.qliId||null),a=ve(()=>t.configuration),s=X(""),l=d=>{s.value=d.tab},u=ve(()=>r.value?[{text:"Done",altText:"Done",type:"primary",style:"primary",handler:()=>c()}]:t.isChangedConfiguration?[]:[]),c=()=>{r.value=!1},h=async d=>{const m=t.products.find(f=>f.value===d);m&&await t.initConfigurator(m.itemId,m.value,t.quoteId)};return(d,m)=>Oe(t).configuration?(F(),$("div",Ob,[Oe(t).showMinMaxPopup&&!Oe(t).loading.save?(F(),$("div",Tb,[ge(wv,{redirect:!0,onRedirect:l})])):ye("",!0),Oe(t).conflictData?(F(),we(U7,{key:1,item:Oe(t).conflictItemChanged||{},data:Oe(t).conflictData,"data-test-id":"configurator-conflict-modal",onClose:m[0]||(m[0]=f=>Oe(t).clearConflict()),onDone:m[1]||(m[1]=f=>Oe(t).handleConflictDone())},null,8,["item","data"])):ye("",!0),Oe(t).savedScreen?(F(),we(z8,{key:3})):(F(),$(Se,{key:2},[x("div",Db,[x("div",Rb,[ge(_b,{buttons:u.value},{"after-status":Ve(()=>[Oe(t).quoteId&&Oe(t).products.length>0?(F(),$("div",Mb,[ge(f8,{modelValue:i.value,"onUpdate:modelValue":[m[2]||(m[2]=f=>i.value=f),h],options:Oe(t).products,placeholder:"Select configuration","data-test-id":"filter-header-input-list"},null,8,["modelValue","options"])])):(F(),$("div",Fb,Ee(a.value.itemName),1))]),"before-button":Ve(()=>[Oe(t).isYearlyPricingExist?(F(),we(Sb,{key:0,modelValue:Oe(t).showYearlyPricing,"onUpdate:modelValue":[m[3]||(m[3]=f=>Oe(t).showYearlyPricing=f),Oe(t).changePricingScheme],"left-align":"",class:"ect-text-nowrap",text:{on:"Yearly Price",off:"Monthly Price"},"data-test-id":"configurator-switch-show-yearly-pricing"},null,8,["modelValue","onUpdate:modelValue"])):ye("",!0)]),_:1},8,["buttons"])]),x("div",{class:De(r.value?"ect-pb-16":"ect-pb-0")},[ge(bv,{config:a.value,"edit-attributes":r.value,scroll:o.value,onEditAttributes:m[4]||(m[4]=f=>r.value=!0)},null,8,["config","edit-attributes","scroll"])],2)]),r.value?ye("",!0):(F(),$("div",Bb,[ge(uv,{modelValue:s.value,"onUpdate:modelValue":m[5]||(m[5]=f=>s.value=f)},null,8,["modelValue"])]))],64))])):ye("",!0)}},[["__scopeId","data-v-4b502cb0"]]),Ri=e=>(Wt("data-v-5ac7f237"),e=e(),Qt(),e),Lb={key:0,class:"ect-bg-white ect-h-full ect-flex ect-flex-col","data-test-id":"configurator-skeleton-container"},Pb={class:"ect-sticky ect-top-0 ect-z-50 ect-bg-white","data-test-id":"configurator-skeleton-header-sticky"},qb={class:"ect-flex ect-flex-col"},$b=Ri(()=>x("div",{class:"ect-px-6 ect-py-4 ect-border-b ect-border-gray-200"},[x("div",{class:"ect-flex ect-items-center ect-justify-between"},[x("div",{class:"ect-flex-1 ect-mx-4"},[x("div",{class:"ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-64 ect-animate-pulse"})])])],-1)),Ub={class:"ect-px-6 ect-pt-4 ect-pb-2 ect-bg-white ect-border-b ect-border-gray-200"},jb={class:"ect-flex ect-items-start"},Hb=Ri(()=>x("div",{class:"ect-bg-gray-200 ect-rounded-lg ect-float-left ect-mr-4 ect-mb-2 ect-w-[104px] ect-h-[104px] ect-animate-pulse"},null,-1)),Vb={class:"ect-flex-1"},zb=Ri(()=>x("div",{class:"ect-mb-2"},[x("div",{class:"ect-h-4 ect-bg-gray-200 ect-rounded-md ect-w-full ect-mb-2 ect-animate-pulse"}),x("div",{class:"ect-h-4 ect-bg-gray-200 ect-rounded-md ect-w-3/4 ect-animate-pulse"})],-1)),Gb={class:"ect-mt-2 ect-clear-both"},Kb={class:"ect-flex ect-gap-2 ect-flex-wrap"},Xb={class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-bg-light-bg-x","data-test-id":"configurator-skeleton-content-scrollable"},Wb=yi('<div class="ect-bg-white ect-shadow-sm ect-flex-shrink-0 ect-mb-4 ect-sticky ect-top-0 ect-z-50" data-test-id="configurator-skeleton-tabs-container" data-v-5ac7f237><div class="ect-px-6 ect-py-3" data-v-5ac7f237><div class="ect-flex ect-gap-6" data-v-5ac7f237><div class="ect-h-8 ect-bg-gray-200 ect-rounded-md ect-w-24 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-8 ect-bg-gray-200 ect-rounded-md ect-w-28 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-8 ect-bg-gray-200 ect-rounded-md ect-w-20 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-8 ect-bg-gray-200 ect-rounded-md ect-w-16 ect-animate-pulse" data-v-5ac7f237></div></div></div></div>',1),Qb={class:"ect-m-4 ect-bg-white","data-test-id":"configurator-skeleton-tab-content"},Zb=Ri(()=>x("div",{class:"ect-mb-2 ect-border-b ect-border-gray-200 ect-p-4"},[x("div",{class:"ect-h-4 ect-bg-gray-200 ect-rounded-md ect-w-48 ect-mb-2 ect-animate-pulse"}),x("div",{class:"ect-h-3 ect-bg-gray-200 ect-rounded-md ect-w-64 ect-animate-pulse"})],-1)),Jb=[yi('<div class="ect-bg-white ect-border ect-border-gray-200 ect-rounded-lg ect-p-4" data-v-5ac7f237><div class="ect-flex ect-items-start ect-gap-4" data-v-5ac7f237><div class="ect-w-16 ect-h-16 ect-bg-gray-200 ect-rounded-md ect-animate-pulse ect-flex-shrink-0" data-v-5ac7f237></div><div class="ect-flex-1" data-v-5ac7f237><div class="ect-h-5 ect-bg-gray-200 ect-rounded-md ect-w-3/4 ect-mb-2 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-4 ect-bg-gray-200 ect-rounded-md ect-w-full ect-mb-1 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-4 ect-bg-gray-200 ect-rounded-md ect-w-2/3 ect-mb-3 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-flex ect-items-center ect-gap-2" data-v-5ac7f237><div class="ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-20 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-16 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-12 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-24 ect-animate-pulse" data-v-5ac7f237></div></div></div><div class="ect-flex ect-items-center ect-justify-center" data-v-5ac7f237><div class="ect-flex-shrink-0 ect-w-5 ect-h-5 ect-bg-gray-200 ect-rounded-full ect-animate-pulse" data-v-5ac7f237></div></div></div></div>',1)],Yb=yi('<div class="ect-bg-white ect-border-t ect-border-gray-200 ect-flex-shrink-0" data-test-id="configurator-skeleton-footer-sticky" data-v-5ac7f237><div class="ect-px-6 ect-py-4" data-v-5ac7f237><div class="ect-flex ect-justify-between ect-items-center" data-v-5ac7f237><div class="ect-flex ect-items-center ect-gap-2" data-v-5ac7f237><div class="ect-h-5 ect-bg-gray-200 ect-rounded-md ect-w-16 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-24 ect-animate-pulse" data-v-5ac7f237></div></div><div class="ect-h-10 ect-bg-gray-200 ect-rounded-md ect-w-24 ect-animate-pulse" data-v-5ac7f237></div></div></div></div>',1),e_={key:1,class:"ect-bg-white ect-h-full ect-flex ect-flex-col","data-test-id":"configurator-skeleton-container"},t_={class:"ect-flex ect-flex-col ect-gap-4 ect-m-4"},n_=Ri(()=>x("div",{class:"ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-2/6 ect-mb-2 ect-animate-pulse"},null,-1)),r_=[yi('<div class="ect-flex ect-items-start ect-gap-4" data-v-5ac7f237><div class="ect-flex-1" data-v-5ac7f237><div class="ect-h-5 ect-bg-gray-200 ect-rounded-md ect-w-3/4 ect-mb-2 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-4 ect-bg-gray-200 ect-rounded-md ect-w-full ect-mb-1 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-4 ect-bg-gray-200 ect-rounded-md ect-w-2/3 ect-mb-3 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-flex ect-items-center ect-justify-between ect-gap-2" data-v-5ac7f237><div class="ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-20 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-8 ect-bg-gray-200 ect-rounded-md ect-w-32 ect-animate-pulse" data-v-5ac7f237></div></div></div></div>',1)],o_=Be({__name:"ConfiguratorSkeletion",props:{type:{type:String,default:"full"},rows:{type:Number,default:4}},setup(e){return(n,t)=>e.type==="full"?(F(),$("div",Lb,[x("div",Pb,[x("div",qb,[$b,x("div",Ub,[x("div",jb,[Hb,x("div",Vb,[zb,x("div",Gb,[x("div",Kb,[(F(),$(Se,null,Ne(20,r=>x("div",{key:r,class:"ect-h-6 ect-bg-gray-200 ect-rounded-full ect-animate-pulse",style:Te({width:`${Math.random()*100+60}px`})},null,4)),64))])])])])])])]),x("div",Xb,[Wb,x("div",Qb,[Zb,(F(),$(Se,null,Ne(5,r=>x("div",{key:r,class:"ect-space-y-4 ect-py-2 ect-px-4"},Jb)),64))])]),Yb])):e.type==="recommendations"?(F(),$("div",e_,[x("div",t_,[n_,(F(!0),$(Se,null,Ne(e.rows,r=>(F(),$("div",{key:r,class:"ect-bg-white ect-border ect-border-gray-200 ect-rounded-lg ect-p-4"},r_))),128))])])):ye("",!0)}},[["__scopeId","data-v-5ac7f237"]]),i_=["data-item-id","data-qli-id"],a_={key:0,class:"ect-flex-1 ect-min-h-0"},s_={key:1,class:"ect-flex-1 ect-min-h-0"},l_={__name:"Configurator",props:{itemId:{type:String,required:!0},qliId:{type:String,required:!1},cart:{type:Boolean,default:!1}},emits:["ready","action"],setup(e,{emit:n}){const t=e,r=n,o=wn();return Zt(async()=>{console.time("CONFIGURATOR ON BEFORE MOUNT"),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","1"),await o.initConfigurator(t.itemId,t.qliId),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","2"),console.timeEnd("CONFIGURATOR ON BEFORE MOUNT"),r("ready")}),ze(()=>[t.itemId,t.qliId],async([i,a],[s,l])=>{i&&(i!==s||a!==l)&&(await o.initConfigurator(i,a),r("ready"))}),(i,a)=>(F(),$("div",{class:"ect-h-full ect-flex ect-flex-col","data-item-id":e.itemId,"data-qli-id":e.qliId},[Oe(o).loading.init?(F(),$("div",a_,[ge(Nb,{"qli-id":e.qliId,onAction:a[0]||(a[0]=s=>r("action",s)),onSave:i.handleSave,cart:e.cart},null,8,["qli-id","onSave","cart"])])):(F(),$("div",s_,[ge(o_)]))],8,i_))}},u_=e=>(Wt("data-v-f17b67a2"),e=e(),Qt(),e),c_={class:"ect-hidden"},d_=u_(()=>x("div",{class:"dropdowntp"},null,-1)),T1=Be({__name:"ExpediteConfigurator",props:{security:{type:{baseUrl:String,accessToken:String},default:()=>({}),required:!0},cart:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},userLocale:{type:String,default:"en_US"},composablesOrgType:{type:String,required:!1},identity:{type:Object,required:!1},session:{type:Object,required:!1},functions:{type:Object,required:!1},resources:{type:Object,required:!1}},emits:["ready","action"],setup(e,{emit:n}){const t=wf(),r=An(),o=wn(),i=e,a=n,s=()=>{a("ready",o.exposeProperties())};function l(c){if(o.isChangedConfiguration)return c.preventDefault(),c.returnValue="",""}function u(){var f,g,p;t.quoteId=(f=i.session)==null?void 0:f.quoteId,t.eCatalogId=(g=i.session)==null?void 0:g.eCatalogId;const c={orgType:i.composablesOrgType,orgId:i.identity.organizationId,userId:i.identity.userId,accountId:i.identity.accountId,userLocale:i.userLocale,pricingSchema:((p=i.identity)==null?void 0:p.pricingSchema)||"Single"},{orgType:h,orgId:d,userId:m}=c;t.setSetupData(c,i.security,i.functions,i.resources),o.initializeController(h,d,m),o.editable=i.editable}return Zt(()=>{u(),window.addEventListener("beforeunload",l)}),ze(()=>[i.identity,i.security,i.session],()=>{u()},{deep:!0}),er(()=>{window.removeEventListener("beforeunload",l)}),(c,h)=>{var d,m;return F(),$(Se,null,[x("div",c_," Is Changed Configuration: "+Ee(Oe(o).isChangedConfiguration),1),ge(R9),ge(uu),Oe(r).errorPopup?(F(),we(M3,{key:0,data:Oe(r).errorPopup,onClose:h[0]||(h[0]=f=>Oe(r).errorPopup=null)},null,8,["data"])):ye("",!0),Oe(o).configuration&&Oe(o).message?(F(),we(w9,{key:1,message:Oe(o).message,onClose:h[1]||(h[1]=f=>Oe(o).message=null)},null,8,["message"])):ye("",!0),d_,ge(l_,{"item-id":(d=i.session)==null?void 0:d.itemId,"qli-id":(m=i.session)==null?void 0:m.qliId,onReady:s,onAction:h[2]||(h[2]=f=>a("action",f)),cart:e.cart,editable:e.editable},null,8,["item-id","qli-id","cart","editable"])],64)}}},[["__scopeId","data-v-f17b67a2"]]),f_=Mt("mygpt",()=>{const e=X("");async function n(r,o="gpt-3.5-turbo",i=300){var a,s,l;if(!e.value)throw new Error("Secret key is required. Please set it in the store.");try{const u=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.value}`},body:JSON.stringify({model:o,messages:r,max_tokens:Math.min(i,300),temperature:.7})});if(!u.ok){const h=await u.json().catch(()=>({}));throw new Error(((a=h.error)==null?void 0:a.message)||`API Error: ${u.status} ${u.statusText}`)}return((l=(s=(await u.json()).choices[0])==null?void 0:s.message)==null?void 0:l.content)||"No response generated"}catch(u){throw new Error(u.message||"Failed to get response from GPT")}}function t(r){e.value=r}return{secretKey:e,getGptResponse:n,setSecretKey:t}}),Mi=e=>(Wt("data-v-46273585"),e=e(),Qt(),e),h_={class:"custom-gpt-container"},p_={class:"gpt-header"},m_=Mi(()=>x("h3",{class:"gpt-title"},"GPT Chat",-1)),g_={class:"gpt-response-area"},y_={key:0,class:"loading-indicator"},v_=[Mi(()=>x("div",{class:"spinner"},null,-1)),Mi(()=>x("span",null,"Thinking...",-1))],b_={key:1,class:"error-message"},__=Mi(()=>x("strong",null,"Error:",-1)),x_={key:2,class:"response-content"},C_={key:3,class:"empty-state"},E_=[Mi(()=>x("p",null,"Enter a message below to start a conversation with GPT 5.0",-1))],k_={class:"gpt-input-area"},A_={class:"input-wrapper"},w_=["placeholder","disabled"],I_=["disabled"],S_={key:0},O_={key:1},T_={key:0,class:"warning-message"},D_=Be({__name:"ExpediteGPT",props:{secretKey:{type:String,required:!1,default:""},model:{type:String,required:!1,default:"gpt-3.5-turbo"},maxTokens:{type:Number,required:!1,default:300},placeholder:{type:String,required:!1,default:"Enter your message..."}},setup(e){const n=e,t=f_(),r=ve(()=>n.secretKey||t.secretKey),o=X(""),i=X(""),a=X(!1),s=X(null),l=X([]),u=ve(()=>i.value.trim().length>0),c=ve(()=>o.value.trim().length>0&&!a.value&&r.value),h=async()=>{if(!c.value)return;const f=o.value.trim();if(f){a.value=!0,s.value=null,o.value="";try{l.value.push({role:"user",content:f});const g=l.value.reduce((y,_)=>y+Math.ceil(_.content.length/4),0);let p=[...l.value];g>n.maxTokens&&(p=l.value.slice(-3));const v=await t.getGptResponse(p,n.model,n.maxTokens);i.value=v,l.value.push({role:"assistant",content:v})}catch(g){s.value=g.message||"Failed to get response from GPT",console.error("GPT API Error:",g)}finally{a.value=!1}}},d=f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),h())},m=()=>{l.value=[],i.value="",s.value=null};return Zt(()=>{t.setSecretKey(n.secretKey)}),(f,g)=>(F(),$("div",h_,[x("div",p_,[m_,u.value||l.value.length>0?(F(),$("button",{key:0,onClick:m,class:"clear-button",type:"button"}," Clear ")):ye("",!0)]),x("div",g_,[a.value?(F(),$("div",y_,v_)):s.value?(F(),$("div",b_,[__,He(" "+Ee(s.value),1)])):u.value?(F(),$("div",x_,Ee(i.value),1)):(F(),$("div",C_,E_))]),x("div",k_,[x("div",A_,[kn(x("textarea",{"onUpdate:modelValue":g[0]||(g[0]=p=>o.value=p),placeholder:e.placeholder,disabled:a.value||!r.value,onKeypress:d,class:"gpt-input",rows:"3"},null,40,w_),[[po,o.value]]),x("button",{onClick:h,disabled:!c.value,class:"send-button",type:"button"},[a.value?(F(),$("span",S_,"...")):(F(),$("span",O_,"Send"))],8,I_)]),r.value?ye("",!0):(F(),$("div",T_," ⚠️ Secret key is required to use this component. Set it via prop or in the store. "))])]))}},[["__scopeId","data-v-46273585"]]);var D1={exports:{}};function R_(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _u={exports:{}};const M_=Gg(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var R1;function Ye(){return R1||(R1=1,function(e,n){(function(t,r){e.exports=r()})($e,function(){var t=t||function(r,o){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof $e<"u"&&$e.crypto&&(i=$e.crypto),!i&&typeof R_=="function")try{i=M_}catch{}var a=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function y(){}return function(_){var b;return y.prototype=_,b=new y,y.prototype=null,b}}(),l={},u=l.lib={},c=u.Base=function(){return{extend:function(y){var _=s(this);return y&&_.mixIn(y),(!_.hasOwnProperty("init")||this.init===_.init)&&(_.init=function(){_.$super.init.apply(this,arguments)}),_.init.prototype=_,_.$super=this,_},create:function(){var y=this.extend();return y.init.apply(y,arguments),y},init:function(){},mixIn:function(y){for(var _ in y)y.hasOwnProperty(_)&&(this[_]=y[_]);y.hasOwnProperty("toString")&&(this.toString=y.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),h=u.WordArray=c.extend({init:function(y,_){y=this.words=y||[],_!=o?this.sigBytes=_:this.sigBytes=y.length*4},toString:function(y){return(y||m).stringify(this)},concat:function(y){var _=this.words,b=y.words,C=this.sigBytes,A=y.sigBytes;if(this.clamp(),C%4)for(var E=0;E<A;E++){var I=b[E>>>2]>>>24-E%4*8&255;_[C+E>>>2]|=I<<24-(C+E)%4*8}else for(var M=0;M<A;M+=4)_[C+M>>>2]=b[M>>>2];return this.sigBytes+=A,this},clamp:function(){var y=this.words,_=this.sigBytes;y[_>>>2]&=4294967295<<32-_%4*8,y.length=r.ceil(_/4)},clone:function(){var y=c.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var _=[],b=0;b<y;b+=4)_.push(a());return new h.init(_,y)}}),d=l.enc={},m=d.Hex={stringify:function(y){for(var _=y.words,b=y.sigBytes,C=[],A=0;A<b;A++){var E=_[A>>>2]>>>24-A%4*8&255;C.push((E>>>4).toString(16)),C.push((E&15).toString(16))}return C.join("")},parse:function(y){for(var _=y.length,b=[],C=0;C<_;C+=2)b[C>>>3]|=parseInt(y.substr(C,2),16)<<24-C%8*4;return new h.init(b,_/2)}},f=d.Latin1={stringify:function(y){for(var _=y.words,b=y.sigBytes,C=[],A=0;A<b;A++){var E=_[A>>>2]>>>24-A%4*8&255;C.push(String.fromCharCode(E))}return C.join("")},parse:function(y){for(var _=y.length,b=[],C=0;C<_;C++)b[C>>>2]|=(y.charCodeAt(C)&255)<<24-C%4*8;return new h.init(b,_)}},g=d.Utf8={stringify:function(y){try{return decodeURIComponent(escape(f.stringify(y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(y){return f.parse(unescape(encodeURIComponent(y)))}},p=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=g.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var _,b=this._data,C=b.words,A=b.sigBytes,E=this.blockSize,I=E*4,M=A/I;y?M=r.ceil(M):M=r.max((M|0)-this._minBufferSize,0);var S=M*E,k=r.min(S*4,A);if(S){for(var w=0;w<S;w+=E)this._doProcessBlock(C,w);_=C.splice(0,S),b.sigBytes-=k}return new h.init(_,k)},clone:function(){var y=c.clone.call(this);return y._data=this._data.clone(),y},_minBufferSize:0});u.Hasher=p.extend({cfg:c.extend(),init:function(y){this.cfg=this.cfg.extend(y),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(y){return this._append(y),this._process(),this},finalize:function(y){y&&this._append(y);var _=this._doFinalize();return _},blockSize:16,_createHelper:function(y){return function(_,b){return new y.init(b).finalize(_)}},_createHmacHelper:function(y){return function(_,b){return new v.HMAC.init(y,b).finalize(_)}}});var v=l.algo={};return l}(Math);return t})}(_u)),_u.exports}var xu={exports:{}},M1;function ps(){return M1||(M1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(r){var o=t,i=o.lib,a=i.Base,s=i.WordArray,l=o.x64={};l.Word=a.extend({init:function(u,c){this.high=u,this.low=c}}),l.WordArray=a.extend({init:function(u,c){u=this.words=u||[],c!=r?this.sigBytes=c:this.sigBytes=u.length*8},toX32:function(){for(var u=this.words,c=u.length,h=[],d=0;d<c;d++){var m=u[d];h.push(m.high),h.push(m.low)}return s.create(h,this.sigBytes)},clone:function(){for(var u=a.clone.call(this),c=u.words=this.words.slice(0),h=c.length,d=0;d<h;d++)c[d]=c[d].clone();return u}})}(),t})}(xu)),xu.exports}var Cu={exports:{}},F1;function F_(){return F1||(F1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(){if(typeof ArrayBuffer=="function"){var r=t,o=r.lib,i=o.WordArray,a=i.init,s=i.init=function(l){if(l instanceof ArrayBuffer&&(l=new Uint8Array(l)),(l instanceof Int8Array||typeof Uint8ClampedArray<"u"&&l instanceof Uint8ClampedArray||l instanceof Int16Array||l instanceof Uint16Array||l instanceof Int32Array||l instanceof Uint32Array||l instanceof Float32Array||l instanceof Float64Array)&&(l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength)),l instanceof Uint8Array){for(var u=l.byteLength,c=[],h=0;h<u;h++)c[h>>>2]|=l[h]<<24-h%4*8;a.call(this,c,u)}else a.apply(this,arguments)};s.prototype=i}}(),t.lib.WordArray})}(Cu)),Cu.exports}var Eu={exports:{}},B1;function B_(){return B1||(B1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(){var r=t,o=r.lib,i=o.WordArray,a=r.enc;a.Utf16=a.Utf16BE={stringify:function(l){for(var u=l.words,c=l.sigBytes,h=[],d=0;d<c;d+=2){var m=u[d>>>2]>>>16-d%4*8&65535;h.push(String.fromCharCode(m))}return h.join("")},parse:function(l){for(var u=l.length,c=[],h=0;h<u;h++)c[h>>>1]|=l.charCodeAt(h)<<16-h%2*16;return i.create(c,u*2)}},a.Utf16LE={stringify:function(l){for(var u=l.words,c=l.sigBytes,h=[],d=0;d<c;d+=2){var m=s(u[d>>>2]>>>16-d%4*8&65535);h.push(String.fromCharCode(m))}return h.join("")},parse:function(l){for(var u=l.length,c=[],h=0;h<u;h++)c[h>>>1]|=s(l.charCodeAt(h)<<16-h%2*16);return i.create(c,u*2)}};function s(l){return l<<8&4278255360|l>>>8&16711935}}(),t.enc.Utf16})}(Eu)),Eu.exports}var ku={exports:{}},N1;function vo(){return N1||(N1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(){var r=t,o=r.lib,i=o.WordArray,a=r.enc;a.Base64={stringify:function(l){var u=l.words,c=l.sigBytes,h=this._map;l.clamp();for(var d=[],m=0;m<c;m+=3)for(var f=u[m>>>2]>>>24-m%4*8&255,g=u[m+1>>>2]>>>24-(m+1)%4*8&255,p=u[m+2>>>2]>>>24-(m+2)%4*8&255,v=f<<16|g<<8|p,y=0;y<4&&m+y*.75<c;y++)d.push(h.charAt(v>>>6*(3-y)&63));var _=h.charAt(64);if(_)for(;d.length%4;)d.push(_);return d.join("")},parse:function(l){var u=l.length,c=this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var d=0;d<c.length;d++)h[c.charCodeAt(d)]=d}var m=c.charAt(64);if(m){var f=l.indexOf(m);f!==-1&&(u=f)}return s(l,u,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(l,u,c){for(var h=[],d=0,m=0;m<u;m++)if(m%4){var f=c[l.charCodeAt(m-1)]<<m%4*2,g=c[l.charCodeAt(m)]>>>6-m%4*2,p=f|g;h[d>>>2]|=p<<24-d%4*8,d++}return i.create(h,d)}}(),t.enc.Base64})}(ku)),ku.exports}var Au={exports:{}},L1;function N_(){return L1||(L1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(){var r=t,o=r.lib,i=o.WordArray,a=r.enc;a.Base64url={stringify:function(l,u){u===void 0&&(u=!0);var c=l.words,h=l.sigBytes,d=u?this._safe_map:this._map;l.clamp();for(var m=[],f=0;f<h;f+=3)for(var g=c[f>>>2]>>>24-f%4*8&255,p=c[f+1>>>2]>>>24-(f+1)%4*8&255,v=c[f+2>>>2]>>>24-(f+2)%4*8&255,y=g<<16|p<<8|v,_=0;_<4&&f+_*.75<h;_++)m.push(d.charAt(y>>>6*(3-_)&63));var b=d.charAt(64);if(b)for(;m.length%4;)m.push(b);return m.join("")},parse:function(l,u){u===void 0&&(u=!0);var c=l.length,h=u?this._safe_map:this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var m=0;m<h.length;m++)d[h.charCodeAt(m)]=m}var f=h.charAt(64);if(f){var g=l.indexOf(f);g!==-1&&(c=g)}return s(l,c,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function s(l,u,c){for(var h=[],d=0,m=0;m<u;m++)if(m%4){var f=c[l.charCodeAt(m-1)]<<m%4*2,g=c[l.charCodeAt(m)]>>>6-m%4*2,p=f|g;h[d>>>2]|=p<<24-d%4*8,d++}return i.create(h,d)}}(),t.enc.Base64url})}(Au)),Au.exports}var wu={exports:{}},P1;function bo(){return P1||(P1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(r){var o=t,i=o.lib,a=i.WordArray,s=i.Hasher,l=o.algo,u=[];(function(){for(var g=0;g<64;g++)u[g]=r.abs(r.sin(g+1))*4294967296|0})();var c=l.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,p){for(var v=0;v<16;v++){var y=p+v,_=g[y];g[y]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}var b=this._hash.words,C=g[p+0],A=g[p+1],E=g[p+2],I=g[p+3],M=g[p+4],S=g[p+5],k=g[p+6],w=g[p+7],T=g[p+8],q=g[p+9],K=g[p+10],U=g[p+11],Y=g[p+12],ie=g[p+13],ee=g[p+14],P=g[p+15],O=b[0],R=b[1],D=b[2],L=b[3];O=h(O,R,D,L,C,7,u[0]),L=h(L,O,R,D,A,12,u[1]),D=h(D,L,O,R,E,17,u[2]),R=h(R,D,L,O,I,22,u[3]),O=h(O,R,D,L,M,7,u[4]),L=h(L,O,R,D,S,12,u[5]),D=h(D,L,O,R,k,17,u[6]),R=h(R,D,L,O,w,22,u[7]),O=h(O,R,D,L,T,7,u[8]),L=h(L,O,R,D,q,12,u[9]),D=h(D,L,O,R,K,17,u[10]),R=h(R,D,L,O,U,22,u[11]),O=h(O,R,D,L,Y,7,u[12]),L=h(L,O,R,D,ie,12,u[13]),D=h(D,L,O,R,ee,17,u[14]),R=h(R,D,L,O,P,22,u[15]),O=d(O,R,D,L,A,5,u[16]),L=d(L,O,R,D,k,9,u[17]),D=d(D,L,O,R,U,14,u[18]),R=d(R,D,L,O,C,20,u[19]),O=d(O,R,D,L,S,5,u[20]),L=d(L,O,R,D,K,9,u[21]),D=d(D,L,O,R,P,14,u[22]),R=d(R,D,L,O,M,20,u[23]),O=d(O,R,D,L,q,5,u[24]),L=d(L,O,R,D,ee,9,u[25]),D=d(D,L,O,R,I,14,u[26]),R=d(R,D,L,O,T,20,u[27]),O=d(O,R,D,L,ie,5,u[28]),L=d(L,O,R,D,E,9,u[29]),D=d(D,L,O,R,w,14,u[30]),R=d(R,D,L,O,Y,20,u[31]),O=m(O,R,D,L,S,4,u[32]),L=m(L,O,R,D,T,11,u[33]),D=m(D,L,O,R,U,16,u[34]),R=m(R,D,L,O,ee,23,u[35]),O=m(O,R,D,L,A,4,u[36]),L=m(L,O,R,D,M,11,u[37]),D=m(D,L,O,R,w,16,u[38]),R=m(R,D,L,O,K,23,u[39]),O=m(O,R,D,L,ie,4,u[40]),L=m(L,O,R,D,C,11,u[41]),D=m(D,L,O,R,I,16,u[42]),R=m(R,D,L,O,k,23,u[43]),O=m(O,R,D,L,q,4,u[44]),L=m(L,O,R,D,Y,11,u[45]),D=m(D,L,O,R,P,16,u[46]),R=m(R,D,L,O,E,23,u[47]),O=f(O,R,D,L,C,6,u[48]),L=f(L,O,R,D,w,10,u[49]),D=f(D,L,O,R,ee,15,u[50]),R=f(R,D,L,O,S,21,u[51]),O=f(O,R,D,L,Y,6,u[52]),L=f(L,O,R,D,I,10,u[53]),D=f(D,L,O,R,K,15,u[54]),R=f(R,D,L,O,A,21,u[55]),O=f(O,R,D,L,T,6,u[56]),L=f(L,O,R,D,P,10,u[57]),D=f(D,L,O,R,k,15,u[58]),R=f(R,D,L,O,ie,21,u[59]),O=f(O,R,D,L,M,6,u[60]),L=f(L,O,R,D,U,10,u[61]),D=f(D,L,O,R,E,15,u[62]),R=f(R,D,L,O,q,21,u[63]),b[0]=b[0]+O|0,b[1]=b[1]+R|0,b[2]=b[2]+D|0,b[3]=b[3]+L|0},_doFinalize:function(){var g=this._data,p=g.words,v=this._nDataBytes*8,y=g.sigBytes*8;p[y>>>5]|=128<<24-y%32;var _=r.floor(v/4294967296),b=v;p[(y+64>>>9<<4)+15]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,p[(y+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,g.sigBytes=(p.length+1)*4,this._process();for(var C=this._hash,A=C.words,E=0;E<4;E++){var I=A[E];A[E]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}return C},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g}});function h(g,p,v,y,_,b,C){var A=g+(p&v|~p&y)+_+C;return(A<<b|A>>>32-b)+p}function d(g,p,v,y,_,b,C){var A=g+(p&y|v&~y)+_+C;return(A<<b|A>>>32-b)+p}function m(g,p,v,y,_,b,C){var A=g+(p^v^y)+_+C;return(A<<b|A>>>32-b)+p}function f(g,p,v,y,_,b,C){var A=g+(v^(p|~y))+_+C;return(A<<b|A>>>32-b)+p}o.MD5=s._createHelper(c),o.HmacMD5=s._createHmacHelper(c)}(Math),t.MD5})}(wu)),wu.exports}var Iu={exports:{}},q1;function $1(){return q1||(q1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(){var r=t,o=r.lib,i=o.WordArray,a=o.Hasher,s=r.algo,l=[],u=s.SHA1=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,h){for(var d=this._hash.words,m=d[0],f=d[1],g=d[2],p=d[3],v=d[4],y=0;y<80;y++){if(y<16)l[y]=c[h+y]|0;else{var _=l[y-3]^l[y-8]^l[y-14]^l[y-16];l[y]=_<<1|_>>>31}var b=(m<<5|m>>>27)+v+l[y];y<20?b+=(f&g|~f&p)+1518500249:y<40?b+=(f^g^p)+1859775393:y<60?b+=(f&g|f&p|g&p)-1894007588:b+=(f^g^p)-899497514,v=p,p=g,g=f<<30|f>>>2,f=m,m=b}d[0]=d[0]+m|0,d[1]=d[1]+f|0,d[2]=d[2]+g|0,d[3]=d[3]+p|0,d[4]=d[4]+v|0},_doFinalize:function(){var c=this._data,h=c.words,d=this._nDataBytes*8,m=c.sigBytes*8;return h[m>>>5]|=128<<24-m%32,h[(m+64>>>9<<4)+14]=Math.floor(d/4294967296),h[(m+64>>>9<<4)+15]=d,c.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var c=a.clone.call(this);return c._hash=this._hash.clone(),c}});r.SHA1=a._createHelper(u),r.HmacSHA1=a._createHmacHelper(u)}(),t.SHA1})}(Iu)),Iu.exports}var Su={exports:{}},U1;function Ou(){return U1||(U1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(r){var o=t,i=o.lib,a=i.WordArray,s=i.Hasher,l=o.algo,u=[],c=[];(function(){function m(v){for(var y=r.sqrt(v),_=2;_<=y;_++)if(!(v%_))return!1;return!0}function f(v){return(v-(v|0))*4294967296|0}for(var g=2,p=0;p<64;)m(g)&&(p<8&&(u[p]=f(r.pow(g,1/2))),c[p]=f(r.pow(g,1/3)),p++),g++})();var h=[],d=l.SHA256=s.extend({_doReset:function(){this._hash=new a.init(u.slice(0))},_doProcessBlock:function(m,f){for(var g=this._hash.words,p=g[0],v=g[1],y=g[2],_=g[3],b=g[4],C=g[5],A=g[6],E=g[7],I=0;I<64;I++){if(I<16)h[I]=m[f+I]|0;else{var M=h[I-15],S=(M<<25|M>>>7)^(M<<14|M>>>18)^M>>>3,k=h[I-2],w=(k<<15|k>>>17)^(k<<13|k>>>19)^k>>>10;h[I]=S+h[I-7]+w+h[I-16]}var T=b&C^~b&A,q=p&v^p&y^v&y,K=(p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22),U=(b<<26|b>>>6)^(b<<21|b>>>11)^(b<<7|b>>>25),Y=E+U+T+c[I]+h[I],ie=K+q;E=A,A=C,C=b,b=_+Y|0,_=y,y=v,v=p,p=Y+ie|0}g[0]=g[0]+p|0,g[1]=g[1]+v|0,g[2]=g[2]+y|0,g[3]=g[3]+_|0,g[4]=g[4]+b|0,g[5]=g[5]+C|0,g[6]=g[6]+A|0,g[7]=g[7]+E|0},_doFinalize:function(){var m=this._data,f=m.words,g=this._nDataBytes*8,p=m.sigBytes*8;return f[p>>>5]|=128<<24-p%32,f[(p+64>>>9<<4)+14]=r.floor(g/4294967296),f[(p+64>>>9<<4)+15]=g,m.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var m=s.clone.call(this);return m._hash=this._hash.clone(),m}});o.SHA256=s._createHelper(d),o.HmacSHA256=s._createHmacHelper(d)}(Math),t.SHA256})}(Su)),Su.exports}var Tu={exports:{}},j1;function L_(){return j1||(j1=1,function(e,n){(function(t,r,o){e.exports=r(Ye(),Ou())})($e,function(t){return function(){var r=t,o=r.lib,i=o.WordArray,a=r.algo,s=a.SHA256,l=a.SHA224=s.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=s._doFinalize.call(this);return u.sigBytes-=4,u}});r.SHA224=s._createHelper(l),r.HmacSHA224=s._createHmacHelper(l)}(),t.SHA224})}(Tu)),Tu.exports}var Du={exports:{}},H1;function V1(){return H1||(H1=1,function(e,n){(function(t,r,o){e.exports=r(Ye(),ps())})($e,function(t){return function(){var r=t,o=r.lib,i=o.Hasher,a=r.x64,s=a.Word,l=a.WordArray,u=r.algo;function c(){return s.create.apply(s,arguments)}var h=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],d=[];(function(){for(var f=0;f<80;f++)d[f]=c()})();var m=u.SHA512=i.extend({_doReset:function(){this._hash=new l.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(f,g){for(var p=this._hash.words,v=p[0],y=p[1],_=p[2],b=p[3],C=p[4],A=p[5],E=p[6],I=p[7],M=v.high,S=v.low,k=y.high,w=y.low,T=_.high,q=_.low,K=b.high,U=b.low,Y=C.high,ie=C.low,ee=A.high,P=A.low,O=E.high,R=E.low,D=I.high,L=I.low,V=M,N=S,G=k,j=w,Q=T,Z=q,ae=K,fe=U,H=Y,z=ie,ne=ee,se=P,ue=O,te=R,he=D,_e=L,xe=0;xe<80;xe++){var pe,oe,W=d[xe];if(xe<16)oe=W.high=f[g+xe*2]|0,pe=W.low=f[g+xe*2+1]|0;else{var re=d[xe-15],le=re.high,ce=re.low,de=(le>>>1|ce<<31)^(le>>>8|ce<<24)^le>>>7,Ce=(ce>>>1|le<<31)^(ce>>>8|le<<24)^(ce>>>7|le<<25),Ie=d[xe-2],Me=Ie.high,Ue=Ie.low,Ct=(Me>>>19|Ue<<13)^(Me<<3|Ue>>>29)^Me>>>6,ot=(Ue>>>19|Me<<13)^(Ue<<3|Me>>>29)^(Ue>>>6|Me<<26),ft=d[xe-7],Qe=ft.high,je=ft.low,Ut=d[xe-16],Lt=Ut.high,yn=Ut.low;pe=Ce+je,oe=de+Qe+(pe>>>0<Ce>>>0?1:0),pe=pe+ot,oe=oe+Ct+(pe>>>0<ot>>>0?1:0),pe=pe+yn,oe=oe+Lt+(pe>>>0<yn>>>0?1:0),W.high=oe,W.low=pe}var Cr=H&ne^~H&ue,Gt=z&se^~z&te,Er=V&G^V&Q^G&Q,Wn=N&j^N&Z^j&Z,ht=(V>>>28|N<<4)^(V<<30|N>>>2)^(V<<25|N>>>7),on=(N>>>28|V<<4)^(N<<30|V>>>2)^(N<<25|V>>>7),kr=(H>>>14|z<<18)^(H>>>18|z<<14)^(H<<23|z>>>9),On=(z>>>14|H<<18)^(z>>>18|H<<14)^(z<<23|H>>>9),Qn=h[xe],vn=Qn.high,Ar=Qn.low,St=_e+On,mt=he+kr+(St>>>0<_e>>>0?1:0),St=St+Gt,mt=mt+Cr+(St>>>0<Gt>>>0?1:0),St=St+Ar,mt=mt+vn+(St>>>0<Ar>>>0?1:0),St=St+pe,mt=mt+oe+(St>>>0<pe>>>0?1:0),bn=on+Wn,hr=ht+Er+(bn>>>0<on>>>0?1:0);he=ue,_e=te,ue=ne,te=se,ne=H,se=z,z=fe+St|0,H=ae+mt+(z>>>0<fe>>>0?1:0)|0,ae=Q,fe=Z,Q=G,Z=j,G=V,j=N,N=St+bn|0,V=mt+hr+(N>>>0<St>>>0?1:0)|0}S=v.low=S+N,v.high=M+V+(S>>>0<N>>>0?1:0),w=y.low=w+j,y.high=k+G+(w>>>0<j>>>0?1:0),q=_.low=q+Z,_.high=T+Q+(q>>>0<Z>>>0?1:0),U=b.low=U+fe,b.high=K+ae+(U>>>0<fe>>>0?1:0),ie=C.low=ie+z,C.high=Y+H+(ie>>>0<z>>>0?1:0),P=A.low=P+se,A.high=ee+ne+(P>>>0<se>>>0?1:0),R=E.low=R+te,E.high=O+ue+(R>>>0<te>>>0?1:0),L=I.low=L+_e,I.high=D+he+(L>>>0<_e>>>0?1:0)},_doFinalize:function(){var f=this._data,g=f.words,p=this._nDataBytes*8,v=f.sigBytes*8;g[v>>>5]|=128<<24-v%32,g[(v+128>>>10<<5)+30]=Math.floor(p/4294967296),g[(v+128>>>10<<5)+31]=p,f.sigBytes=g.length*4,this._process();var y=this._hash.toX32();return y},clone:function(){var f=i.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:1024/32});r.SHA512=i._createHelper(m),r.HmacSHA512=i._createHmacHelper(m)}(),t.SHA512})}(Du)),Du.exports}var Ru={exports:{}},z1;function P_(){return z1||(z1=1,function(e,n){(function(t,r,o){e.exports=r(Ye(),ps(),V1())})($e,function(t){return function(){var r=t,o=r.x64,i=o.Word,a=o.WordArray,s=r.algo,l=s.SHA512,u=s.SHA384=l.extend({_doReset:function(){this._hash=new a.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var c=l._doFinalize.call(this);return c.sigBytes-=16,c}});r.SHA384=l._createHelper(u),r.HmacSHA384=l._createHmacHelper(u)}(),t.SHA384})}(Ru)),Ru.exports}var Mu={exports:{}},G1;function q_(){return G1||(G1=1,function(e,n){(function(t,r,o){e.exports=r(Ye(),ps())})($e,function(t){return function(r){var o=t,i=o.lib,a=i.WordArray,s=i.Hasher,l=o.x64,u=l.Word,c=o.algo,h=[],d=[],m=[];(function(){for(var p=1,v=0,y=0;y<24;y++){h[p+5*v]=(y+1)*(y+2)/2%64;var _=v%5,b=(2*p+3*v)%5;p=_,v=b}for(var p=0;p<5;p++)for(var v=0;v<5;v++)d[p+5*v]=v+(2*p+3*v)%5*5;for(var C=1,A=0;A<24;A++){for(var E=0,I=0,M=0;M<7;M++){if(C&1){var S=(1<<M)-1;S<32?I^=1<<S:E^=1<<S-32}C&128?C=C<<1^113:C<<=1}m[A]=u.create(E,I)}})();var f=[];(function(){for(var p=0;p<25;p++)f[p]=u.create()})();var g=c.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var p=this._state=[],v=0;v<25;v++)p[v]=new u.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(p,v){for(var y=this._state,_=this.blockSize/2,b=0;b<_;b++){var C=p[v+2*b],A=p[v+2*b+1];C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,A=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360;var E=y[b];E.high^=A,E.low^=C}for(var I=0;I<24;I++){for(var M=0;M<5;M++){for(var S=0,k=0,w=0;w<5;w++){var E=y[M+5*w];S^=E.high,k^=E.low}var T=f[M];T.high=S,T.low=k}for(var M=0;M<5;M++)for(var q=f[(M+4)%5],K=f[(M+1)%5],U=K.high,Y=K.low,S=q.high^(U<<1|Y>>>31),k=q.low^(Y<<1|U>>>31),w=0;w<5;w++){var E=y[M+5*w];E.high^=S,E.low^=k}for(var ie=1;ie<25;ie++){var S,k,E=y[ie],ee=E.high,P=E.low,O=h[ie];O<32?(S=ee<<O|P>>>32-O,k=P<<O|ee>>>32-O):(S=P<<O-32|ee>>>64-O,k=ee<<O-32|P>>>64-O);var R=f[d[ie]];R.high=S,R.low=k}var D=f[0],L=y[0];D.high=L.high,D.low=L.low;for(var M=0;M<5;M++)for(var w=0;w<5;w++){var ie=M+5*w,E=y[ie],V=f[ie],N=f[(M+1)%5+5*w],G=f[(M+2)%5+5*w];E.high=V.high^~N.high&G.high,E.low=V.low^~N.low&G.low}var E=y[0],j=m[I];E.high^=j.high,E.low^=j.low}},_doFinalize:function(){var p=this._data,v=p.words;this._nDataBytes*8;var y=p.sigBytes*8,_=this.blockSize*32;v[y>>>5]|=1<<24-y%32,v[(r.ceil((y+1)/_)*_>>>5)-1]|=128,p.sigBytes=v.length*4,this._process();for(var b=this._state,C=this.cfg.outputLength/8,A=C/8,E=[],I=0;I<A;I++){var M=b[I],S=M.high,k=M.low;S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,E.push(k),E.push(S)}return new a.init(E,C)},clone:function(){for(var p=s.clone.call(this),v=p._state=this._state.slice(0),y=0;y<25;y++)v[y]=v[y].clone();return p}});o.SHA3=s._createHelper(g),o.HmacSHA3=s._createHmacHelper(g)}(Math),t.SHA3})}(Mu)),Mu.exports}var Fu={exports:{}},K1;function $_(){return K1||(K1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){/** @preserve
|
|
86
|
+
or use v-on:ready="onReady(quill)" event instead.`},y=(k,w)=>e.contentType==="html"?A():e.contentType==="text"?b(k,w):t==null?void 0:t.getContents(k,w),_=(k,w="api")=>{const T=k||(e.contentType==="delta"?new sy:"");e.contentType==="html"?E(T):e.contentType==="text"?C(T,w):t==null||t.setContents(T,w),u=s(T)},b=(k,w)=>{var T;return(T=t==null?void 0:t.getText(k,w))!==null&&T!==void 0?T:""},C=(k,w="api")=>{t==null||t.setText(k,w)},A=()=>{var k;return(k=t==null?void 0:t.root.innerHTML)!==null&&k!==void 0?k:""},E=k=>{t&&(t.root.innerHTML=k)},I=(k,w="api")=>{const T=t==null?void 0:t.clipboard.convert(k);T&&(t==null||t.setContents(T,w))},M=()=>{t==null||t.focus()},S=()=>{Dt(()=>{var k;!n.slots.toolbar&&t&&((k=t.getModule("toolbar"))===null||k===void 0||k.container.remove()),i()})};return ze(()=>e.content,k=>{if(!t||!k||c(k))return;const w=t.getSelection();w&&Dt(()=>t==null?void 0:t.setSelection(w)),_(k)},{deep:!0}),ze(()=>e.enable,k=>{t&&t.enable(k)}),{editor:o,getEditor:g,getToolbar:p,getQuill:v,getContents:y,setContents:_,getHTML:A,setHTML:E,pasteHTML:I,focus:M,getText:b,setText:C,reinit:S}},render(){var e,n;return[(n=(e=this.$slots).toolbar)===null||n===void 0?void 0:n.call(e),Gd("div",{ref:"editor",...this.$attrs})]}}),uy={class:"input"},cy=["for","data-test-id"],dy=["data-test-id"],fy=Be({__name:"RichTextEditor",props:{modelValue:{type:String,default:""},editorOptions:{type:Object,default:()=>({modules:{toolbar:["bold","italic","underline",{align:[]},{list:"ordered"},{list:"bullet"}]},placeholder:"Add AI Instructions",theme:"snow"})},dataTestId:{type:String,default:""},label:{type:String,default:""},required:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["update:modelValue"],setup(e){const n=e,t=ve(()=>typeof n.error=="string"?n.error:n.error===""?!1:n.error===!0?`${n.label||"Field"} is required`:n.error),r=X("");return Zt(()=>{r.value=n.modelValue}),(o,i)=>(F(),$("div",uy,[e.label?(F(),$("label",{key:0,class:De({error_color:!!e.error}),for:e.label,"data-test-id":`${e.dataTestId}-label`},[He(Ee(e.label)+" ",1),e.required?(F(),$("span",{key:0,class:De({error_color:!!e.error})},"*",2)):ye("",!0)],10,cy)):ye("",!0),ge(Oe(ly),{"content-type":"html",toolbar:e.editorOptions,"model-value":e.modelValue,"data-test-id":e.dataTestId,content:r.value,"onUpdate:content":i[0]||(i[0]=a=>o.$emit("update:modelValue",a))},null,8,["toolbar","model-value","data-test-id","content"]),t.value?(F(),$("div",{key:1,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${e.dataTestId}-error`},Ee(t.value),9,dy)):ye("",!0)]))}},[["__scopeId","data-v-76aecac0"]]),hy={class:"ect-w-full ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-rounded-md ect-border-1 ect-border-gray-200 md:ect-gap-5 lg:ect-gap-6","data-test-id":"configurator-inputs-container"},py={key:0,class:"ect-text-sm ect-font-regular ect-text-gray-900"},my={class:"ect-grid ect-grid-cols-1 sm:ect-grid-cols-2 ect-gap-4"},gy={key:0,class:"ect-col-span-2"},yy=["data-test-id"],vy=["id","onUpdate:modelValue","disabled","data-test-id"],by=["for","data-test-id"],_y={key:2,class:"quill-editor-styles"},xy=x("div",{class:"dropdowntp"},null,-1),Cy=x("div",{id:"modals"},null,-1),S1={__name:"InputsContainer",props:{title:{type:String,default:""},lookup:{type:Object,default:()=>null},attributes:{type:Array,required:!0,default:()=>[]},locale:{type:String,default:"en-US"}},setup(e){const n=wn(),t=e,r=X({modules:{toolbar:["bold","italic","underline",{align:[]},{list:"ordered"},{list:"bullet"}]},placeholder:"Add AI Instructions",theme:"snow"}),o=X(t.lookup),i=ve(()=>{const l=t.lookup.relatedFields.map(u=>u.child);return l.push("Name"),l});function a(l,u){const c=u.options.find(h=>h.Id===l);l===null?(u.options=[],u.value=null,u.relatedFields.forEach(h=>{h.value=null})):(u.value=c.Name,u.relatedFields.forEach(h=>{h.value=c[h.child]}))}const s=dn(async function(l,u){u.loading=!0;const c={objectType:u.referenceObject,searchText:l||"",lstFields:i.value||[]},h=await n.getRecords(c);u.options=h,u.loading=!1});return(l,u)=>(F(),$(Se,null,[x("div",hy,[e.title?(F(),$("div",py,Ee(e.title),1)):ye("",!0),x("div",my,[o.value?(F(),$("div",gy,[ge(ir,{modelValue:o.value.referenceRecordId,"onUpdate:modelValue":[u[0]||(u[0]=c=>o.value.referenceRecordId=c),u[1]||(u[1]=c=>a(c,o.value))],"data-test-id":`configurator-inputs-lookup-${o.value.attRecordId??l.index}`,label:o.value.label,options:o.value.options,disabled:!o.value.editable,required:o.value.required,loading:o.value.loading,property:{key:"Id",value:"Name"},lookup:"",search:"",highlight:"",onSearch:u[2]||(u[2]=c=>Oe(s)(c,o.value))},null,8,["modelValue","data-test-id","label","options","disabled","required","loading"])])):ye("",!0),(F(!0),$(Se,null,Ne(e.attributes,(c,h)=>(F(),$("div",{key:h,class:"attribute-input"},[c.dataType==="PICKLIST"||c.dataType==="MULTIPICKLIST"?(F(),we(ir,{key:0,modelValue:c.value,"onUpdate:modelValue":d=>c.value=d,label:c.label,placeholder:c.label,disabled:!c.editable,options:c.picklistValues.map(d=>({label:d,value:d})),select:"",highlight:"","data-test-id":`configurator-inputs-dropdown-${c.attRecordId??l.index}`},null,8,["modelValue","onUpdate:modelValue","label","placeholder","disabled","options","data-test-id"])):c.dataType==="BOOLEAN"?(F(),$("div",{key:1,class:"ect-flex ect-items-center ect-gap-3 ect-py-3.5","data-test-id":`configurator-inputs-checkbox-${c.attRecordId??l.index}`},[kn(x("input",{id:`checkbox-${c.attRecordId??l.index}`,"onUpdate:modelValue":d=>c.value=d,type:"checkbox",disabled:!c.editable,class:"ect-w-4 ect-h-4 ect-accent-success ect-border-gray-300 ect-rounded ect-text-text-success focus:ect-ring-green-500","data-test-id":`configurator-inputs-checkbox-input-${c.attRecordId??l.index}`},null,8,vy),[[Ul,c.value]]),x("label",{for:`checkbox-${c.attRecordId??l.index}`,class:"ect-text-sm ect-font-medium ect-text-gray-900 ect-cursor-pointer","data-test-id":`configurator-inputs-checkbox-label-${c.attRecordId??l.index}`},Ee(c.label),9,by)],8,yy)):c.dataType==="TEXTAREA"?(F(),$("div",_y,[ge(fy,{modelValue:c.value,"onUpdate:modelValue":d=>c.value=d,label:c.label,required:c.required,"editor-options":r.value,"data-test-id":`configurator-inputs-textarea-quill-editor-${c.attRecordId??l.index}`},null,8,["modelValue","onUpdate:modelValue","label","required","editor-options","data-test-id"])])):(F(),we(yo,{key:3,modelValue:c.value,"onUpdate:modelValue":d=>c.value=d,label:c.label,disabled:!c.editable,highlight:"","data-test-id":`configurator-inputs-custom-${c.attRecordId??l.index}`},null,8,["modelValue","onUpdate:modelValue","label","disabled","data-test-id"]))]))),128))])]),xy,Cy],64))}},Ey={class:"ect-w-full ect-flex ect-flex-col ect-gap-4","data-test-id":"configurator-inputs-container"},ky={class:"ect-bg-white ect-rounded-lg"},bu={__name:"AttributesContainer",props:{attributes:{type:Array,required:!0,default:()=>[]},configItem:{type:Object,default:null},locale:{type:String,default:"en-US"}},setup(e){const n=wn(),t=e,r=X([]),o=X([]),i=X({}),a=X({});function s(){const c=[...r.value];return o.value.forEach(h=>{(h.relatedFields||[]).forEach(d=>c.push(d))}),c}function l(c,h){var m;if(!((m=t.configItem)!=null&&m.attributes))return;const d=t.configItem.attributes.find(f=>f.apiName===c.apiName);d&&(d.value=h)}const u=dn(async(c,h,d)=>{var m,f;if(t.configItem){l(c,h);try{const g=await n.evaluateConfigSelection(null,null);((((m=g.inclusions)==null?void 0:m.length)||0)>0||(((f=g.exclusions)==null?void 0:f.length)||0)>0)&&n.setConflict(g,t.configItem,{onRevert:()=>{c.value=d,a.value[c.apiName]=d,l(c,d)}})}catch{c.value=d,a.value[c.apiName]=d,l(c,d)}}},400);return Zt(()=>{const c={},h=[...t.attributes];h.forEach(m=>{m.dataType==="REFERENCE"&&(i.value[m.apiName]=["Name"],m.relatedFields=[],c[m.apiName]=m),m.editable=m.editable&&!m.apiName.includes(".")});let d=null;h.forEach(m=>{if(m.referenceObject==="XX_Base__Location__c"&&(d?m.firstLookup="Copy from "+d.label:d=m),m.apiName.includes(".")){const[f,g]=m.apiName.split(".");m.parent=f,m.child=g,i.value[f]!=null&&(i.value[f].push(g),c[f].relatedFields.push(m))}}),o.value=h.filter(m=>m.dataType==="REFERENCE"),r.value=h.filter(m=>!(m.apiName.includes(".")||m.dataType==="REFERENCE")),s().forEach(m=>{a.value[m.apiName]=m.value})}),ze(()=>[r.value,o.value],()=>{if(!t.configItem)return;s().forEach(h=>{const d=h.value,m=a.value[h.apiName];if(m!==d){const f=m;a.value[h.apiName]=d,u(h,d,f)}})},{deep:!0}),(c,h)=>(F(),$("div",Ey,[x("div",ky,[ge(S1,{attributes:r.value},null,8,["attributes"])]),(F(!0),$(Se,null,Ne(o.value,d=>(F(),$("div",{key:d.attRecordId,class:"ect-bg-white ect-rounded-lg"},[ge(S1,{title:d.referenceLabel+" Lookup",lookup:d,attributes:d.relatedFields},null,8,["title","lookup","attributes"])]))),128))]))}},Ay={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-max-md:max-w-full"},wy=x("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1),Iy={class:"ect-flex ect-items-center ect-justify-between ect-rounded-lg ect-px-4 ect-py-2 ect-gap-2 ect-bg-light-bg-x"},Sy={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Oy={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Ty={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Dy={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-bg-light-bg-x ect-max-md:max-w-full"},Ry={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},My={__name:"AttributesModal",props:{option:{type:Object,required:!0},attributes:{type:Array,required:!0}},emits:["close","done"],setup(e,{emit:n}){const t=n,r=e,o=ve(()=>JSON.parse(JSON.stringify(r.attributes))),i=()=>{t("close")},a=()=>{t("done",o.value),t("close")};return(s,l)=>(F(),we(Gl,{header:"",title:"Update Attributes Values",description:"Update the values associated with selected attributes.",footer:"","no-close":"",onClose:i},{content:Ve(()=>[x("header",Ay,[wy,x("div",Iy,[x("p",Sy,Ee(e.option.itemName),1),x("p",Oy,Ee(e.option.qty),1),x("p",Ty,Ee(e.option.price),1)])]),x("main",Dy,[ge(bu,{attributes:o.value,"config-item":e.option},null,8,["attributes","config-item"])])]),footer:Ve(()=>[x("div",Ry,[ge(Vt,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"attributes-modal-button-cancel",onClick:l[0]||(l[0]=u=>t("close"))},{default:Ve(()=>[He("Cancel")]),_:1}),ge(Vt,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"attributes-modal-button-done",onClick:a},{default:Ve(()=>[He("Done")]),_:1})])]),_:1}))}},Fy={class:"ect-flex ect-flex-col"},By=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],Ny=["onUpdate:modelValue","data-test-id","value","disabled","onChange"],Ly={key:0},Py={key:1,class:"ect-border-t ect-border-gray-200 ect-p-4"},qy={__name:"ConfiguratorTabSections",props:{data:{type:Object,required:!0}},setup(e){const n=wn(),t=e,r=ve(()=>t.data.itemTypes||[]),o=ve(()=>t.data.showImage||!1);let i=X(null),a=X(null);const l=dn(async f=>{const g=await n.evaluateConfigSelection(null,null);g.inclusions.length>0||g.exclusions.length>0?n.setConflict(g,f):n.handleConflictDone()},1e3),u=(f,g,p)=>{var v;f.qty=g,f.calculatePricing&&((v=p==null?void 0:p.selected)!=null&&v.includes(f.itemId))&&l(f)},c=(f,g,p)=>{var v;f.price=g,f.calculatePricing&&((v=p==null?void 0:p.selected)!=null&&v.includes(f.itemId))&&l(f)},h=(f,g)=>{f.itemName=g},d=async(f,g,p,v)=>{if(f.preventDefault(),f.stopPropagation(),i.value=null,a.value=null,g.calculateRules){v&&v.isRadio?p.includes(g.itemId)?(p.splice(0,p.length),a.value=g.publishKey):(p.splice(0,p.length),p.push(g.itemId),i.value=g.publishKey):p.includes(g.itemId)?(p.splice(p.indexOf(g.itemId),1),a.value=g.publishKey):(p.push(g.itemId),i.value=g.publishKey);const y=a.value?g:null,_=i.value?g:null,b=await n.evaluateConfigSelection(y,_);if(b.inclusions.length>0||b.exclusions.length>0){n.setConflict(b,g);const C=n.conflictData;[...C.inclusions,...C.exclusions].includes(g.publishKey)||(i.value&&C.exclusions.push(i.value),a.value&&C.inclusions.push(a.value))}else{n.setConflict(b,g);const C=n.conflictData;i.value&&C.exclusions.push(i.value),a.value&&C.inclusions.push(a.value),n.handleConflictDone()}}},m=(f,g,p,v)=>{f.target.type==="checkbox"||f.target.type==="radio"||(f.preventDefault(),f.stopPropagation(),v.isRadio?p.includes(g.itemId)?p.splice(0,p.length):(p.splice(0,p.length),p.push(g.itemId)):p.includes(g.itemId)?p.splice(p.indexOf(g.itemId),1):p.push(g.itemId),d(f,g,p,v))};return(f,g)=>(F(),$("div",Fy,[(F(!0),$(Se,null,Ne(r.value,p=>(F(),we(vm,{key:p.itemTypeId,title:p.itemTypeName,description:p.description,message:p.minMaxMessage,warning:p.isRadio?!p.selected[0]:p.selected.length<p.minNumber||p.selected.length>p.maxNumber},{default:Ve(()=>[x("div",{class:De([p.numberOfColumns===1?"ect-space-y-3 md:ect-space-y-4 ect-p-2 md:ect-p-4":p.numberOfColumns===2?"ect-grid ect-grid-cols-1 md:ect-grid-cols-2 ect-gap-3 md:ect-gap-4 ect-p-2 md:ect-p-4":"ect-grid ect-grid-cols-1 md:ect-grid-cols-2 lg:ect-grid-cols-3 ect-gap-3 md:ect-gap-4 ect-p-2 md:ect-p-4"])},[(F(!0),$(Se,null,Ne(p.options||[],v=>(F(),$(Se,{key:v.itemId},[v.hidden?ye("",!0):(F(),we(fg,{key:0,item:v,name:v.itemName,description:v.description||"","min-quantity":p.minQuantity,"max-quantity":p.maxQuantity,"show-image":o.value,selected:p.selected.includes(v.itemId),tags:v.getTags(),price:v.price,quantity:v.qty,"image-url":v.defaultImageURL,attributes:v.attributes||[],size:p.numberOfColumns,"item-id":v.itemId,"item-type":p.itemTypeName||"",category:p.category,"relationship-info":v.relationshipInfo||{},option:Oe(n).optionByItemId.get(v.itemId),"is-attributes":v.isAttributes,"show-attributes":p.lightboxAttributes,disabled:v.isDisabled,editable:Oe(n).editable&&!Oe(n).loading.evaluateConfigSelection,"onUpdate:quantity":y=>u(v,y,p),"onUpdate:price":y=>c(v,y,p),"onUpdate:name":y=>h(v,y),onEditAttributes:y=>v.showAttributesModal=!0,onClick:y=>p.selected.includes(v.itemId)||v.isDisabled?null:m(y,v,p.selected,p)},{"selection-control":Ve(()=>[p.isRadio?kn((F(),$("input",{key:0,"onUpdate:modelValue":y=>p.selected[0]=y,"data-test-id":`configurator-${p.itemTypeId}-radio-${v.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"radio",value:v.itemId,disabled:v.isDisabled||Oe(n).loading.evaluateConfigSelection,onClick:g[0]||(g[0]=_t(()=>{},["stop"])),onChange:y=>d(y,v,p.selected,p)},null,40,By)),[[df,p.selected[0]]]):kn((F(),$("input",{key:1,"onUpdate:modelValue":y=>p.selected=y,"data-test-id":`configurator-${p.itemTypeId}-checkbox-${v.itemId}`,class:"ect-accent-success ect-w-5 ect-h-5",type:"checkbox",value:v.itemId,disabled:v.isDisabled||Oe(n).loading.evaluateConfigSelection,onClick:g[1]||(g[1]=_t(()=>{},["stop"])),onChange:y=>d(y,v,p.selected,p)},null,40,Ny)),[[Ul,p.selected]])]),default:Ve(()=>[p.lightboxAttributes?(F(),$("div",Ly,[v.showAttributesModal?(F(),we(My,{key:0,option:v,attributes:v.attributes,onDone:y=>v.attributes=y,onClose:y=>v.showAttributesModal=!1},null,8,["option","attributes","onDone","onClose"])):ye("",!0)])):(F(),$("div",Py,[ge(bu,{attributes:v.attributes,"config-item":v},null,8,["attributes","config-item"])]))]),_:2},1032,["item","name","description","min-quantity","max-quantity","show-image","selected","tags","price","quantity","image-url","attributes","size","item-id","item-type","category","relationship-info","option","is-attributes","show-attributes","disabled","editable","onUpdate:quantity","onUpdate:price","onUpdate:name","onEditAttributes","onClick"]))],64))),128))],2)]),_:2},1032,["title","description","message","warning"]))),128))]))}},$y=e=>(Wt("data-v-cb7a75a9"),e=e(),Qt(),e),Uy={class:"ect-space-y-4"},jy={class:"ect-w-full ect-bg-white ect-border ect-border-ect-gray-200 ect-rounded-lg"},Hy={class:"ect-bg-white ect-border-b ect-border-ect-gray-200 ect-px-4 ect-py-4 ect-sticky ect-top-0 ect-z-[5] ect-overflow-hidden ect-rounded-t-lg"},Vy={class:"ect-text-sm ect-font-semibold ect-text-green-700","data-test-id":"configurator-summary-header-title"},zy={class:"ect-bg-white ect-px-4 ect-py-4 ect-pb-3 ect-border-b ect-border-ect-gray-200 ect-top-[53px] ect-z-9 ect-overflow-hidden ect-sticky ect-top-[53px]"},Gy={class:"ect-text-sm ect-font-medium ect-text-ect-gray-800","data-test-id":"configurator-summary-section-frame-color"},Ky={class:"ect-flex ect-items-center ect-bg-light-bg-x ect-border-b ect-border-ect-gray-200"},Xy={class:"ect-flex-1 ect-bg-ect-gray-50 ect-px-8 ect-py-4 ect-min-h-[56px] ect-flex ect-items-center"},Wy={class:"ect-text-sm ect-text-font-clr-light","data-test-id":"configurator-summary-item-red"},Qy={class:"ect-flex ect-items-center ect-px-8 ect-py-4 ect-gap-5"},Zy={class:"ect-flex ect-justify-center ect-min-w-[128px]"},Jy=$y(()=>x("div",{class:"ect-border-r ect-w-[1px] ect-border-text-muted-light ect-h-6"},null,-1)),Yy={class:"ect-flex ect-justify-center ect-min-w-[100px]"},ev={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-price-red"},tv={key:0,class:"ect-flex ect-items-center ect-bg-light-bg-x ect-px-10 ect-py-3"},nv={class:"ect-flex ect-flex-wrap ect-items-center ect-bg-light-bg-x ect-gap-2"},rv={class:"ect-bg-white ect-px-8 ect-py-4 ect-pr-4 ect-flex ect-justify-end"},ov={class:"ect-text-sm ect-font-semibold ect-text-ect-gray-800","data-test-id":"configurator-summary-total"},iv=Be({__name:"ConfiguratorSummaryTab",props:{summary:{type:Array,required:!0}},setup(e){return(n,t)=>(F(),$("div",Uy,[(F(!0),$(Se,null,Ne(e.summary,r=>(F(),$("div",{key:r.key,class:"ect-mb-4"},[x("section",jy,[x("div",Hy,[x("h3",Vy,Ee(r.category),1)]),(F(!0),$(Se,null,Ne(r.selectedItemTypes,o=>(F(),$("div",{key:o.itemTypeId,class:"ect-flex ect-flex-col ect-border-b ect-border-ect-gray-200"},[x("div",zy,[x("h4",Gy,Ee(o.itemTypeName),1)]),(F(!0),$(Se,null,Ne(o.selectedOptions,i=>(F(),$(Se,{key:i.itemId},[x("div",Ky,[x("div",Xy,[x("span",Wy,Ee(i.itemName),1)]),x("div",Qy,[x("div",Zy,[ge(is,{value:i.qty,"onUpdate:value":a=>i.qty=a,min:o.minQuantity,max:o.maxQuantity,"data-test-id":`configurator-summary-counter-${i.itemId}`},null,8,["value","onUpdate:value","min","max","data-test-id"])]),Jy,x("div",Yy,[x("span",ev,Ee(Oe(Yt)(i.price)),1)])])]),i.isAttributes&&i.getTags().length>0?(F(),$("div",tv,[x("div",nv,[(F(!0),$(Se,null,Ne(i.getTags(),a=>(F(),we(or,{key:a.attributeId,label:a.label,value:a.value},null,8,["label","value"]))),128))])])):ye("",!0)],64))),128))]))),128)),x("div",rv,[x("span",ov," Total : "+Ee(Oe(Yt)(r.totalPrice())),1)])])]))),128))]))}},[["__scopeId","data-v-cb7a75a9"]]),av={class:"configurator-page ect-flex ect-flex-col ect-h-full ect-relative","data-test-id":"configurator-page-container"},sv={"data-test-id":"configurator-tabs-container",class:"ect-bg-white ect-shadow-sm ect-flex-shrink-0 ect-mb-4"},lv={class:"ect-bg-white ect-border-t ect-border-gray-200 ect-flex-shrink-0 ect-absolute ect-bottom-0 ect-left-0 ect-right-0 ect-z-50","data-test-id":"configurator-footer-sticky"},uv=Be({__name:"ConfiguratorTabs",props:{modelValue:{type:String,default:""}},emits:["scroll","update:modelValue"],setup(e,{emit:n}){const t=wn(),r=e,o=n,i=ve({get:()=>r.modelValue,set:f=>o("update:modelValue",f)}),a=X(""),s=ve(()=>t.configuration.categoryOptions),l=ve(()=>{const f=s.value.map(g=>({key:g.key,title:g.category}));return f.push({key:"summary",title:"Summary"}),f}),u=ve(()=>c.value.get(i.value)),c=ve(()=>{const f=new Map;return s.value.forEach(g=>{f.set(g.key,g)}),f}),h=()=>{const f=l.value.findIndex(g=>g.key===i.value);if(f<l.value.length-1){const g=l.value[f+1];i.value=g.key}else t.maintainQuoteConfiguration(!0)};ze(i,f=>{d(f),o("scroll",0)});const d=f=>{i.value=f;const g=l.value.findIndex(v=>v.key===f),p=g<l.value.length-1?l.value[g+1]:null;a.value=(p==null?void 0:p.title)||""},m=f=>{const g=f.target.scrollTop;o("scroll",g)};return Zt(()=>{i.value=l.value[0].key,o("update:modelValue",l.value[0].key)}),(f,g)=>(F(),$("div",av,[x("div",sv,[ge(J8,{modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=p=>i.value=p),"show-tabs":!0,border:"",tabs:l.value,"data-test-id":"configurator-tabs-container",onTabChange:d},null,8,["modelValue","tabs"])]),i.value&&i.value!=="summary"?(F(),$("div",{key:0,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-p-4 ect-pt-0 ect-pb-20","data-test-id":"`configurator-${activeTab}-tab-content`",onScroll:m},[ge(qy,{data:u.value},null,8,["data"])],32)):(F(),$("div",{key:1,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-p-4 ect-pt-0 ect-pb-20","data-test-id":"`configurator-${activeTab}-tab-content`",onScroll:m},[ge(iv,{summary:Oe(t).summary},null,8,["summary"])],32)),x("div",lv,[ge(cm,{"btn-text":i.value!=="summary"?"Next: "+a.value:Oe(t).showMinMaxPopup?"Proceed with Partial Save":"Save & Continue",item:Oe(t).configuration,disabled:i.value=="summary"&&!Oe(t).isChangedConfiguration,onContinue:h},null,8,["btn-text","item","disabled"])])]))}},[["__scopeId","data-v-d873f41d"]]),cv={class:"ect-px-6 ect-pt-4 ect-pb-2 ect-bg-white"},dv={class:"ect-flow-root"},fv=["src","alt"],hv={key:1,class:"ect-mb-2"},pv={class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed ect-transition-all ect-duration-400"},mv={key:0,class:"ect-mt-2"},gv={class:"ect-inline-block ect-mb-2"},yv={key:1,class:"ect-inline-block ect-mb-2"},vv={key:1,class:"ect-mt-2"},bv={__name:"ConfiguratorInfo",props:{config:{type:Object,required:!0},editAttributes:{type:Boolean,required:!0},scroll:{type:Number,default:0}},emits:["edit-attributes"],setup(e,{emit:n}){const t=e,r=n,o=ve(()=>t.config.attributes.map(i=>({label:i.label,value:i.value})).filter(i=>i.value!==null&&i.value!==""));return(i,a)=>(F(),$("div",cv,[x("div",dv,[e.config.defaultImageURL&&e.scroll<50?(F(),$("div",{key:0,class:De(["ect-bg-gray-200 ect-rounded-lg ect-overflow-hidden ect-float-left ect-mr-4 ect-mb-2",e.editAttributes?"ect-w-[40px] ect-h-[40px]":"ect-w-[104px] ect-h-[104px]"])},[e.config.defaultImageURL?(F(),$("img",{key:0,src:e.config.defaultImageURL,alt:e.config.itemName,class:"ect-w-full ect-h-full ect-object-cover"},null,8,fv)):ye("",!0)],2)):ye("",!0),e.scroll<50?(F(),$("div",hv,[x("p",pv,Ee(e.config.description),1)])):ye("",!0),e.config.isAttributes?(F(),$(Se,{key:2},[e.editAttributes?(F(),$("div",vv,[ge(bu,{attributes:e.config.attributes,"config-item":e.config},null,8,["attributes","config-item"])])):(F(),$("div",mv,[o.value.length>0?(F(),$(Se,{key:0},[(F(!0),$(Se,null,Ne(o.value,(s,l)=>(F(),$("span",{key:l,class:"ect-inline-block ect-mr-2 ect-mb-2"},[ge(or,{label:s.label,value:s.value},null,8,["label","value"])]))),128)),x("span",gv,[x("button",{"data-test-id":"configurator-info-button-edit-attributes",onClick:a[0]||(a[0]=s=>r("edit-attributes"))},[ge(or,{label:"Edit attributes","edit-button":""})])])],64)):(F(),$("span",yv,[x("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:a[1]||(a[1]=s=>r("edit-attributes"))},[ge(or,{label:"Add attributes","add-button":""})])]))]))],64)):ye("",!0)])]))}},_v={class:"configurator-minmax-popup-panel ect-rounded-md ect-fixed ect-top-2 ect-right-2 ect-z-50 ect-w-[547px] ect-max-w-[calc(100vw-1rem)] ect-flex ect-flex-col ect-bg-white ect-rounded ect-border ect-border-[#ED928A] ect-shadow-[0px_20px_20px_12px_rgba(0,0,0,0.02)] ect-overflow-y-auto","data-test-id":"configurator-minmax-popup"},xv=x("div",{class:"ect-flex-shrink-0 ect-px-3 ect-py-2 ect-bg-[#FFF9F9] ect-border-b ect-border-[#F1E1E1]","data-test-id":"configurator-minmax-popup-header"},[x("p",{class:"ect-m-0 ect-text-xs ect-font-semibold ect-leading-[1.5] ect-text-[#353535]","data-test-id":"configurator-minmax-popup-title"}," Resolve These to Complete Configuration (You Can Partially Save and Return) ")],-1),Cv={class:"ect-flex-1 ect-min-h-0 ect-max-h-[152px]"},Ev={class:"ect-list-none ect-p-0 ect-m-0","data-test-id":"configurator-minmax-popup-errors"},kv=["data-test-id","onClick"],Av=["innerHTML"],wv={__name:"ConfiguratorMinMaxPopup",props:{redirect:{type:Boolean,default:!1}},emits:["redirect"],setup(e,{emit:n}){const t=wn(),r=n,o=e,i=a=>{o.redirect&&r("redirect",a)};return ze(()=>t.minMaxErrors,a=>{a.length===0&&t.showMinMaxPopup&&(t.showMinMaxPopup=!1)}),(a,s)=>(F(),$("div",_v,[xv,x("div",Cv,[x("ul",Ev,[(F(!0),$(Se,null,Ne(Oe(t).minMaxErrors,(l,u)=>(F(),$("li",{key:u,class:De(["ect-flex ect-items-center ect-gap-2 ect-p-3 ect-bg-[#FFF9F9] ect-border-b ect-border-[#F1E1E1] last:ect-border-b-0",{"ect-cursor-pointer":o.redirect}]),"data-test-id":`configurator-minmax-popup-error-${u}`,onClick:c=>i(l)},[ge(Ge,{icon:"info",size:16,color:"#D23333",class:"ect-flex-shrink-0","data-test-id":`configurator-minmax-popup-error-icon-${u}`},null,8,["data-test-id"]),x("p",{innerHTML:l.message,class:"ect-m-0 ect-flex-1 ect-text-xs ect-font-medium ect-leading-[1.5] ect-text-[#5F5F5F] ect-max-md:ect-max-w-full"},null,8,Av)],10,kv))),128))])])]))}},Iv=["data-test-id"],Sv=["data-test-id"],Ov=["data-test-id"],Tv={class:"ect-bg-white ect-rounded-xl ect-shadow-sm"},Dv={class:"ect-relative ect-w-full ect-border-b ect-border-solid ect-border-b-neutral-200 max-md:ect-max-w-full"},Rv={key:0,class:"ect-flex ect-z-0 ect-flex-col ect-gap-4 ect-justify-center ect-py-4 ect-px-6 ect-w-full max-md:ect-px-5 max-md:ect-max-w-full"},Mv={class:"ect-gap-1 ect-w-full max-md:ect-max-w-full"},Fv={class:"ect-text-lg ect-font-semibold ect-leading-5 ect-text-neutral-700 max-md:ect-max-w-full"},Bv={key:0,class:"ect-mt-1 ect-text-sm ect-leading-none ect-text-zinc-600 max-md:ect-max-w-full"},Nv={class:"ect-flex ect-overflow-hidden ect-absolute ect-top-2.5 ect-right-4 ect-z-0 ect-p-1 ect-rounded-lg"},Lv={key:0,class:"ect-flex-1 ect-overflow-y-auto ect-h-[600px] ect-max-h-[70vh]"},Pv={key:1,class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full ect-text-xs ect-leading-4 ect-text-neutral-700 max-md:ect-px-5 max-md:ect-max-w-full"},qv={key:2,class:"ect-relative ect-w-full ect-border-t ect-border-solid ect-border-t-neutral-200 max-md:ect-max-w-full"},$v=Be({__name:"AppModalGen3",props:{title:{type:String,required:!0},description:{type:String,required:!0},header:{type:Boolean,default:!1},footer:{type:Boolean,default:!1}},emits:["close"],setup(e,{emit:n}){const t=n;return(r,o)=>(F(),we(bf,{to:"modaltp"},{default:Ve(()=>[x("div",{class:"modal-mask","data-test-id":`${r.dataTestId}-mask`},[x("div",{class:"modal-wrapper","data-test-id":`${r.dataTestId}-wrapper`},[x("div",{class:"modal-container",style:Te(r.width?`max-width: ${r.width.includes("calc")?r.width:r.width+"px"}; width: 100%;`:""),"data-test-id":`${r.dataTestId}-container`},[x("div",Tv,[x("div",Dv,[e.header?(F(),$("div",Rv,[x("div",Mv,[x("div",Fv,Ee(e.title),1),e.description?(F(),$("div",Bv,Ee(e.description),1)):ye("",!0)])])):ye("",!0),x("div",Nv,[x("button",{class:"ect-flex ect-self-stretch ect-my-auto ect-w-6 ect-min-h-6 ect-cursor-pointer hover:ect-bg-gray-100 ect-rounded ect-transition-colors ect-justify-center ect-items-center","aria-label":"Close modal",onClick:o[0]||(o[0]=i=>t("close"))},[ge(Ge,{icon:"close",color:"#000000",size:"11",height:"11"})])])]),r.$slots.content?(F(),$("div",Lv,[it(r.$slots,"content",{},void 0,!0)])):(F(),$("div",Pv,[it(r.$slots,"default",{},void 0,!0)])),e.footer?(F(),$("div",qv,[it(r.$slots,"footer",{},void 0,!0)])):ye("",!0)])],12,Ov)],8,Sv)],8,Iv)]),_:3}))}},[["__scopeId","data-v-41ebff01"]]),sr=e=>(Wt("data-v-6f0a3790"),e=e(),Qt(),e),Uv={class:"ect-w-[600px]"},jv={class:"ect-px-6 ect-pt-4 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-max-md:max-w-full"},Hv=sr(()=>x("p",{class:"ect-m-1 ect-text-sm ect-font-regular ect-leading-5 ect-text-neutral-700"},"You Selected",-1)),Vv={class:"ect-flex ect-items-center ect-justify-between ect-rounded-lg ect-px-4 ect-py-2 ect-gap-2 ect-bg-light-bg-x"},zv={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Gv={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Kv={class:"ect-mt-1 ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700"},Xv={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-mt-4 ect-w-full ect-bg-light-bg-x ect-max-md:max-w-full"},Wv={key:0,class:"ect-mb-4"},Qv=sr(()=>x("p",{class:"ect-text-xs ect-font-medium ect-leading-6 ect-text-neutral-700 ect-mb-3","data-test-id":"conflict-modal-pricing-rule-section-title"}," This caused change in price for ",-1)),Zv={class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-pricing-rule-table"},Jv=sr(()=>x("div",{class:"ect-px-4 ect-py-2"},[x("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-pricing-rule-header"}," This change will update price: ")],-1)),Yv={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-pricing-rule-product"},e7={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-add-qty"},t7={class:"ect-flex ect-items-center ect-gap-2"},n7={class:"ect-text-sm ect-font-medium ect-leading-5 ect-text-neutral-700 ect-line-through","data-test-id":"conflict-modal-pricing-rule-old-price"},r7={class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-text-success","data-test-id":"conflict-modal-pricing-rule-new-price"},o7={key:0,class:"ect-flex ect-justify-between ect-items-center ect-px-4 ect-py-1 ect-border-t ect-border-neutral-200","data-test-id":"conflict-modal-pricing-rule-price-change"},i7=sr(()=>x("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-pricing-rule-price-change-label"}," Price change ",-1)),a7={class:"ect-text-sm ect-font-semibold ect-leading-5","data-test-id":"conflict-modal-pricing-rule-price-change-value"},s7={key:1},l7=sr(()=>x("p",{class:"ect-text-xs ect-font-medium ect-leading-6 ect-text-neutral-700 ect-mb-3","data-test-id":"conflict-modal-supporting-text"}," Above selection requires a configuration change ",-1)),u7={class:"ect-flex ect-flex-col ect-gap-2"},c7={key:0,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-add-table"},d7=sr(()=>x("div",{class:"ect-px-4 ect-py-2"},[x("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-add-header"}," This change will add: ")],-1)),f7={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-add-product"},h7={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-add-qty"},p7={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-add-price"},m7={key:1,class:"ect-bg-white ect-border ect-border-neutral-200 ect-rounded-md","data-test-id":"conflict-modal-remove-table"},g7=sr(()=>x("div",{class:"ect-px-4 ect-py-2"},[x("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-remove-header"}," This change will remove: ")],-1)),y7={class:"ect-flex-grow font-regular","data-test-id":"conflict-modal-remove-product"},v7={class:"ect-w-20 ect-text-center font-regular","data-test-id":"conflict-modal-remove-qty"},b7={class:"ect-w-28 ect-text-right font-regular","data-test-id":"conflict-modal-remove-price"},_7={class:"ect-flex ect-justify-between ect-items-center ect-px-4 ect-py-1 ect-w-full ect-text-sm ect-leading-none ect-text-neutral-700 ect-bg-white ect-rounded-md ect-border ect-border-neutral-200 ect-rounded-md"},x7=sr(()=>x("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-price-change-label"}," Price change ",-1)),C7={class:"ect-text-sm ect-font-semibold ect-leading-5","data-test-id":"conflict-modal-price-change-value"},E7={class:"ect-px-6 ect-pt-4 ect-pb-6 ect-w-full"},k7=sr(()=>x("p",{class:"ect-text-xs ect-font-medium ect-leading-6 ect-text-neutral-500 ect-mb-2","data-test-id":"conflict-modal-summary-supporting-text"}," Price Adjustment Summary ",-1)),A7={class:"ect-border ect-border-neutral-200 ect-rounded-md ect-overflow-hidden ect-mt-2 ect-bg-neutral-50","data-test-id":"conflict-modal-summary-table"},w7={class:"ect-flex ect-flex-col ect-gap-2"},I7={class:"ect-flex-1"},S7={class:"font-regular","data-test-id":"conflict-modal-summary-base-price-label"},O7={class:"ect-text-center ect-w-28"},T7={class:"ect-text-sm ect-font-medium ect-leading-5 ect-text-neutral-700 ect-text-right ect-line-through","data-test-id":"conflict-modal-summary-base-price-original"},D7={class:"ect-text-center ect-w-28"},R7={class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-text-success ect-text-right","data-test-id":"conflict-modal-summary-base-price-adjusted"},M7={class:"ect-border ect-border-neutral-200 ect-rounded-md ect-overflow-hidden ect-px-4 ect-py-1 ect-mt-2","data-test-id":"conflict-modal-summary-total"},F7={class:"ect-flex ect-items-center"},B7=sr(()=>x("div",{class:"ect-flex-1"},[x("p",{class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-neutral-700","data-test-id":"conflict-modal-summary-total-label"}," Total Price change ")],-1)),N7={class:"ect-text-center ect-w-28"},L7={class:"ect-text-sm ect-font-medium ect-leading-5 ect-text-neutral-700 ect-text-right ect-line-through","data-test-id":"conflict-modal-summary-base-price-original"},P7={class:"ect-text-center ect-w-28"},q7={class:"ect-text-sm ect-font-semibold ect-leading-5 ect-text-text-success ect-text-right","data-test-id":"conflict-modal-summary-base-price-adjusted"},$7={class:"ect-flex ect-justify-end ect-gap-2 ect-p-4"},U7=Be({__name:"ConflictModal",props:{item:{type:Object,required:!0},data:{type:Object,required:!0}},emits:["close","done"],setup(e,{emit:n}){const t=wn(),r=n,o=e,i=ve(()=>{const p=t.summaryPrices,v=h.value+m.value,y=[];return y.push({label:"Base Price",value:p.basePrice,priceChange:p.basePrice}),y.push({label:"Add Ons",value:p.addOns,priceChange:p.addOns+v}),y}),a=ve(()=>{const p=t.summaryPrices,v=h.value+m.value;return{label:"Total Price",value:p.total,priceChange:p.total+v}}),s=ve(()=>o.data.inclusions.map(v=>t.optionByPublishKey.get(v))),l=ve(()=>s.value.filter(p=>p.itemId!==o.item.itemId)),u=ve(()=>o.data.exclusions.map(p=>t.optionByPublishKey.get(p))),c=ve(()=>u.value.filter(p=>p.itemId!==o.item.itemId)),h=ve(()=>{const p=s.value.reduce((y,_)=>{const b=_.qty||1;return y+_.price*b},0),v=u.value.reduce((y,_)=>{const b=_.qty||1;return y+_.price*b},0);return p-v}),d=ve(()=>{if(!o.data.pricingRuleFormula||typeof o.data.pricingRuleFormula!="object")return[];const p=[],v=t.optionByPublishKey;return Object.keys(o.data.pricingRuleFormula).forEach(y=>{let _=v.get(y);if(!_){for(const[b,C]of v.entries())if(b.toLowerCase()===y.toLowerCase()){_=C;break}}if(_){const b=o.data.pricingRuleFormula[y];p.push({itemId:_.itemId,itemName:_.itemName,publishKey:y,oldPrice:_.price,newPrice:b.price,oldQty:_.qty,newQty:b.quantity})}}),p}),m=ve(()=>d.value.reduce((p,v)=>{const y=v.oldPrice*v.oldQty,_=v.newPrice*v.newQty;return p+(_-y)},0)),f=()=>{r("close")},g=()=>{if(o.data.pricingRuleFormula&&typeof o.data.pricingRuleFormula=="object"){const p=t.optionByPublishKey;Object.keys(o.data.pricingRuleFormula).forEach(v=>{let y=p.get(v);if(!y){for(const[_,b]of p.entries())if(_.toLowerCase()===v.toLowerCase()){y=b;break}}if(y){const _=o.data.pricingRuleFormula[v];y.price=_.price,y.qty=_.quantity}})}r("done")};return(p,v)=>(F(),we($v,{header:"",title:"Confirm Your Selection",description:"This selection requires a configuration change",footer:"","no-close":"",onClose:f},{content:Ve(()=>[x("div",Uv,[x("header",jv,[Hv,x("div",Vv,[x("p",zv,Ee(e.item.itemName),1),x("p",Gv,Ee(e.item.qty),1),x("p",Kv,Ee(Oe(Yt)(e.item.price)),1)])]),x("main",Xv,[d.value.length>0?(F(),$("div",Wv,[Qv,x("div",Zv,[Jv,(F(!0),$(Se,null,Ne(d.value,y=>(F(),$("div",{key:y.itemId,class:"ect-flex ect-items-center ect-justify-between ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[x("p",Yv,Ee(y.itemName),1),x("p",e7,Ee(y.newQty),1),x("div",t7,[x("p",n7,Ee(Oe(Yt)(y.oldPrice*y.oldQty)),1),x("p",r7,Ee(Oe(Yt)(y.newPrice*y.newQty)),1)])]))),128)),m.value!==0?(F(),$("div",o7,[i7,x("p",a7,Ee(Oe(Yt)(m.value)),1)])):ye("",!0)])])):ye("",!0),l.value.length>0||c.value.length>0?(F(),$("div",s7,[l7,x("div",u7,[l.value.length>0?(F(),$("div",c7,[d7,(F(!0),$(Se,null,Ne(l.value,y=>(F(),$("div",{key:y.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[x("p",f7,Ee(y.itemName),1),x("p",h7,Ee(y.qty),1),x("p",p7," + "+Ee(Oe(Yt)(y.price*(y.qty||1))),1)]))),128))])):ye("",!0),c.value.length>0?(F(),$("div",m7,[g7,(F(!0),$(Se,null,Ne(c.value,y=>(F(),$("div",{key:y.itemId,class:"ect-flex ect-items-center ect-py-2 ect-px-4 ect-border-t ect-border-neutral-200"},[x("p",y7,Ee(y.itemName),1),x("p",v7,Ee(y.qty),1),x("p",b7," - "+Ee(Oe(Yt)(y.price*(y.qty||1))),1)]))),128))])):ye("",!0),x("div",_7,[x7,x("p",C7,Ee(Oe(Yt)(h.value)),1)])])])):ye("",!0)]),x("footer",null,[x("div",E7,[k7,x("div",A7,[x("div",w7,[(F(!0),$(Se,null,Ne(i.value,(y,_)=>(F(),$("div",{key:y.label,class:De(["ect-flex ect-px-4 ect-py-1",{"ect-border-t ect-border-neutral-200":_>0}])},[x("div",I7,[x("p",S7,Ee(y.label),1)]),x("div",O7,[x("p",T7,Ee(Oe(Yt)(y.value)),1)]),x("div",D7,[x("p",R7,Ee(Oe(Yt)(y.priceChange)),1)])],2))),128))])]),x("div",M7,[x("div",F7,[B7,x("div",N7,[x("p",L7,Ee(Oe(Yt)(a.value.value)),1)]),x("div",P7,[x("p",q7,Ee(Oe(Yt)(a.value.priceChange)),1)])])])])])])]),footer:Ve(()=>[x("div",$7,[ge(Vt,{class:"ect-min-w-[100px]",btype:"secondary","button-style":"outlined",size:"medium","data-test-id":"conflict-modal-button-cancel",onClick:v[0]||(v[0]=y=>r("close"))},{default:Ve(()=>[He("Cancel")]),_:1}),ge(Vt,{class:"ect-min-w-[100px]",btype:"primary","button-style":"primary",size:"medium","data-test-id":"conflict-modal-button-done",onClick:g},{default:Ve(()=>[He("Done")]),_:1})])]),_:1}))}},[["__scopeId","data-v-6f0a3790"]]),j7=["data-test-id"],H7=["placeholder","value","data-test-id"],V7=["data-test-id"],z7=["data-test-id","onClick"],G7=Be({__name:"MoleculeSearch",props:{placeholder:{type:String,default:""},modelValue:{type:String,default:""},height:{type:[Number,String],default:32},size:{type:String,default:"regular"},loading:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},iconPosition:{type:String,default:"right",validator:e=>["left","right"].includes(e)},dataTestId:{type:String,required:!0}},emits:["update:modelValue","optionClick"],setup(e,{emit:n}){const t=e,r=n,o=X(""),i=X(null),a=X(!1),s=X(null),l=X(!0),u=ve(()=>l.value?{}:{bottom:"100%",marginTop:"0",marginBottom:"4px"}),c=async()=>{var C;if(await Dt(),!s.value)return;const v=s.value.getBoundingClientRect(),_=window.innerHeight-v.bottom,b=Math.min(((C=t.options)==null?void 0:C.length)*40+20,200);l.value=_>=b},h=()=>{i.value=null,r("update:modelValue","")},d=p=>{const v=p.target.value;o.value&&(clearTimeout(o.value),o.value=null),o.value=setTimeout(()=>{r("update:modelValue",v)},500)},m=async()=>{a.value=!0,await c()},f=()=>{setTimeout(()=>{a.value=!1},150)},g=p=>{a.value=!1,o.value&&(clearTimeout(o.value),o.value=null),r("update:modelValue",p.label),r("optionClick",p)};return(p,v)=>{var y;return F(),$("div",{ref_key:"searchContainer",ref:s,class:De(["molecule-search",{"icon-left":e.iconPosition==="left"}]),"data-test-id":e.dataTestId},[e.loading?(F(),we(cu,{key:0,size:16,class:"icon ect-top-2 icon-loader","data-test-id":`${e.dataTestId}-loader`},null,8,["data-test-id"])):e.iconPosition==="left"||!e.modelValue?(F(),we(Ge,{key:1,class:"icon-search ect-mt-[-1px]",icon:"search",size:14,color:"#5f5f5f","data-test-id":`${e.dataTestId}-search`,onClick:h},null,8,["data-test-id"])):ye("",!0),x("input",{class:De(["search-input-box",{large:e.size==="large"}]),type:"text",style:Te({height:`${e.height}px`}),placeholder:t.placeholder,value:e.modelValue,"data-test-id":`${e.dataTestId}-input`,onInput:d,onFocus:m,onBlur:f},null,46,H7),e.modelValue&&!e.loading?(F(),we(Ge,{key:2,class:"close-btn",icon:"close",size:8,color:"#5f5f5f","data-test-id":`${e.dataTestId}-close`,onClick:h},null,8,["data-test-id"])):ye("",!0),((y=e.options)==null?void 0:y.length)>0&&a.value?(F(),$("div",{key:3,class:De(["search-options",{"dropdown-top":!l.value}]),style:Te(u.value),"data-test-id":`${e.dataTestId}-dropdown`},[(F(!0),$(Se,null,Ne(e.options,(_,b)=>(F(),$("div",{key:_.id,class:"search-option","data-test-id":`${e.dataTestId}-option-${b}`,onClick:_t(C=>g(_),["stop"]),onMousedown:v[0]||(v[0]=_t(()=>{},["prevent"]))},[He(Ee(_.label)+" ",1),x("span",null,Ee(_.subLabel),1)],40,z7))),128))],14,V7)):ye("",!0)],10,j7)}}},[["__scopeId","data-v-6cdaa802"]]),K7=["data-test-id"],X7=Be({__name:"StatePill",props:{text:{type:String,required:!0},state:{type:String,default:"default",validator:e=>["default","draft","review","active","inactive","in draft","active"].includes(e)},dataTestId:{type:String,default:""}},setup(e){const n=e,t=ve(()=>({"ect-state-pill--default":n.state==="default","ect-state-pill--draft":n.state==="draft"||n.state==="in draft","ect-state-pill--review":n.state==="review","ect-state-pill--active":n.state==="active","ect-state-pill--inactive":n.state==="inactive"}));return(r,o)=>(F(),$("span",{class:De(["ect-state-pill",t.value]),"data-test-id":e.dataTestId},Ee(e.text),11,K7))}},[["__scopeId","data-v-6be678b8"]]),W7=["data-test-id"],Q7=["data-test-id"],Z7=["data-test-id"],J7=["data-test-id"],Y7=["data-test-id","onClick"],eb=["data-test-id"],tb=Be({__name:"ecBreadcrumbs",props:{links:{type:Array,default:()=>[],validator:e=>e.every(n=>typeof n=="object"&&typeof n.text=="string"&&(n.route===void 0||typeof n.route=="string"||typeof n.route=="object"))},dataTestId:{type:String,required:!0}},setup(e){const n=Va(),t=r=>{r&&n.push(r)};return(r,o)=>(F(),$("div",{class:"ect-flex ect-items-center ect-justify-between","data-test-id":e.dataTestId},[x("div",{class:"ect-flex ect-items-center ect-gap-4","data-test-id":`${e.dataTestId}-container`},[x("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-breadcrumbs`},[(F(!0),$(Se,null,Ne(e.links,(i,a)=>(F(),$(Se,{key:a},[a>0?(F(),$("span",{key:0,class:"ect-text-[#828282] ect-text-xs ect-font-semibold","data-test-id":`${e.dataTestId}-separator-${a}`}," / ",8,J7)):ye("",!0),i.route?(F(),$("button",{key:1,class:"ect-text-[#828282] ect-text-xs ect-font-semibold ect-font-ui ect-leading-normal hover:ect-text-[#0076D6] hover:ect-underline ect-transition-colors","data-test-id":`${e.dataTestId}-link-${a}`,onClick:s=>t(i.route)},Ee(i.text),9,Y7)):(F(),$("span",{key:2,class:"ect-text-[#828282] ect-text-xs ect-font-semibold ect-font-ui ect-leading-normal","data-test-id":`${e.dataTestId}-text-${a}`},Ee(i.text),9,eb))],64))),128))],8,Z7)],8,Q7)],8,W7))}},[["__scopeId","data-v-151ca816"]]),nb={components:{AppIcon:Ge},props:{direction:{type:String,default:"top",validator:e=>["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"].includes(e)},content:{type:String,default:null},disabled:{type:Boolean,default:!1},width:{type:Number,default:130},icon:{type:String,default:null},dataTestId:{type:String,default:""}},data(){return{show:!1}},computed:{tooltipClass(){return{tooltip:!0,[`tooltip-${this.direction}`]:!0}},styleObj(){return{width:`${this.width}px !important`}}},methods:{showTooltip(){this.disabled||(this.show=!0)},hideTooltip(){this.show=!1}}},rb=["data-test-id"],ob=["data-test-id"];function ib(e,n,t,r,o,i){const a=un("AppIcon");return t.content?(F(),$("div",{key:0,class:"tooltip-container","data-test-id":t.dataTestId,onMouseover:n[0]||(n[0]=(...s)=>i.showTooltip&&i.showTooltip(...s)),onMouseleave:n[1]||(n[1]=(...s)=>i.hideTooltip&&i.hideTooltip(...s))},[it(e.$slots,"default",{},void 0,!0),kn(x("div",{class:De(i.tooltipClass),style:Te(i.styleObj),"data-test-id":`${t.dataTestId}-content`},[t.icon?(F(),we(a,{key:0,icon:t.icon,color:"#57c046",size:14,"data-test-id":`${t.dataTestId}-icon`},null,8,["icon","data-test-id"])):ye("",!0),He(" "+Ee(t.content),1)],14,ob),[[tf,o.show]])],40,rb)):it(e.$slots,"default",{key:1},void 0,!0)}const O1=Be(nb,[["render",ib],["__scopeId","data-v-b36acc62"]]);function pn(e){if(typeof e=="string"&&(e=JSON.parse(e)),e!=null&&e.errorMessage)throw new Error(e==null?void 0:e.errorMessage);return e}const ab=Mt("item",()=>{const e=An(),n=X([]),t=X([]),r=X(!1),o=X(0),i=X(1),a=X(""),s=X(20),l=X(null),u=X(!1),c=X(null),h=X(!1),d=X(null),m=X(null),f=X(null),g=X(null),p=X(null),v=X({addedOptionIds:null,eCatalogCount:null,ecatalogs:null,publishVersionId:null,removedOptionIds:null}),y=X([]),_=X({ecatalogIds:[],optionItemsToAdd:[]}),b=X(!1),C=X(null),A=X(0),E=2,I=j=>{!Array.isArray(j)||j.every(Z=>{var ae;return Z.id&&((ae=Z.itemTypes)==null?void 0:ae.every(fe=>{var H;return fe.id&&((H=fe.options)==null?void 0:H.every(z=>z.id))}))})||j.forEach((Z,ae)=>{Z.id||(Z.id=`category-${ae}-${Z.category}`),Z.itemTypes&&Array.isArray(Z.itemTypes)&&Z.itemTypes.forEach((fe,H)=>{fe.id||(fe.id=fe.itemTypeId||`itemType-${ae}-${H}-${fe.itemTypeName||"unnamed"}`),fe.options&&Array.isArray(fe.options)&&fe.options.forEach((z,ne)=>{z.id||(z.id=z.itemId||`option-${ae}-${H}-${ne}-${z.itemName||"unnamed"}`)})})})},M=async(j,Q=null)=>{var Z;try{h.value=!0;let ae={};if(Q)ae={fileId:Q};else{const H=y.value.find(ne=>ne.status==="Draft"),z=y.value.find(ne=>ne.status==="Active");z?ae={fileId:z.id}:H?ae={fileId:H.id}:ae={itemId:j}}let fe=await window.AdminConfiguratorManager.getItemConfiguration({request:JSON.stringify(ae)});return fe!=null&&fe.errorMessage?(e.handleError(fe.errorMessage),null):(fe=pn(fe.data),typeof fe.data=="string"&&(fe=JSON.parse(fe.data)),(Z=fe==null?void 0:fe.productItem)!=null&&Z.categoryOptions&&I(fe.productItem.categoryOptions),l.value=fe,h.value=!1,y.value.length===0&&!r.value&&await ie(),fe.data)}catch(ae){return h.value=!1,e.handleError("Failed to fetch item configuration. Please try again.",ae),null}},S=async(j,Q="",Z="")=>{try{const ae={searchTerm:j,itemTypeId:Q,filterType:Z};let fe=await window.AdminConfiguratorManager.getItemsList({request:JSON.stringify(ae)});return fe=pn(fe),fe!=null&&fe.errorMessage?(e.handleError(fe.errorMessage),null):fe}catch{return e.handleError("Failed to fetch option list. Please try again."),null}},k=async(j,Q)=>{try{const Z={productItemId:p.value,optionItemId:j,existingItemType:Q};let ae=await window.AdminConfiguratorManager.getItemDetails({request:JSON.stringify(Z)});return ae=pn(ae),ae!=null&&ae.errorMessage?(e.handleError(ae.errorMessage),null):ae}catch{return e.handleError("Failed to fetch option details. Please try again."),null}},w=async()=>{try{const j=await window.AdminConfiguratorManager.getAvailableAttributes();return JSON.parse(j)}catch{e.handleError("Failed to fetch available attributes. Please try again.")}},T=async j=>{try{const Q=await window.AdminConfiguratorManager.addAttribute({request:JSON.stringify(j)});return JSON.parse(Q)}catch{e.handleError("Failed to fetch item configuration. Please try again.")}},q=async j=>{try{const Q=JSON.stringify(j),Z=await window.AdminConfiguratorManager.getChildFields({request:Q});return JSON.parse(Z)}catch(Q){throw e.handleError("Failed to fetch child fields. Please try again.",Q),Q}},K=async()=>{const j={objectApiName:"XX_Base__Item_Type__c",fieldApiName:"XX_Base__Item_Type_Category__c"};try{return(await window.AdminConfiguratorManager.getPicklistValues({request:JSON.stringify(j)})).data}catch(Q){throw e.handleError("Failed to fetch picklist values. Please try again.",Q),Q}},U=async()=>{var j,Q,Z;try{const ae=(Q=(j=l.value)==null?void 0:j.productItem)==null?void 0:Q.itemStatus,H={fileId:(Z=y.value.find(ne=>ne.status===ae))==null?void 0:Z.id,itemId:p.value};let z=await window.AdminConfiguratorManager.activateItemConfig({request:JSON.stringify(H)});return z!=null&&z.error?(R(z==null?void 0:z.error),null):(z=pn(z.data),v.value=z,z)}catch{return R(),null}},Y=async()=>{try{const j={productId:"068bn00000Anu0YAAR"};return(await window.AdminConfiguratorManager.getECatalogsForProduct({request:JSON.stringify(j)})).data}catch(j){e.handleError("Failed to fetch e catalogs for product. Please try again.",j)}},ie=async()=>{try{const j={productId:p.value},Q=await window.AdminConfiguratorManager.getProductConfigInfo({request:JSON.stringify(j)}),Z=JSON.parse(Q.data);return y.value=Z.data,Z}catch(j){e.handleError("Failed to save item configuration. Please try again.",j)}},ee=async()=>{try{const j={ecatalogIds:_.value.ecatalogIds,productItemId:p.value,optionItemsToAdd:_.value.optionItemsToAdd};return(await window.AdminConfiguratorManager.saveItemConfigToCatalog({request:JSON.stringify(j)})).data}catch(j){e.handleError("Failed to save item configuration to catalog. Please try again.",j)}},P=async()=>{var j,Q,Z;try{const ae=(Q=(j=l.value)==null?void 0:j.productItem)==null?void 0:Q.itemStatus,fe={itemId:p.value,fileId:(Z=y.value.find(se=>se.status===ae))==null?void 0:Z.id},H=await window.AdminConfiguratorManager.createNewVersion({request:JSON.stringify(fe)}),z=JSON.parse(H);await ie(),await M(p.value,z.id);const ne=y.value.findIndex(se=>se.status==="Draft");return ne!==-1?y.value[ne]=z:y.value.push(z),z}catch(ae){e.handleError("Failed to create new version. Please try again.",ae)}},O=async()=>{var ae,fe;const j=(ae=y.value.find(H=>H.status==="Inactive"))==null?void 0:ae.id,Q=(fe=y.value.find(H=>H.status==="Active"))==null?void 0:fe.id,Z={itemId:p.value,activeVersionId:Q,inactiveVersionId:j};try{return(await window.AdminConfiguratorManager.rollbackItemConfig({request:JSON.stringify(Z)})).data}catch(H){e.handleError("Failed to rollback item configuration. Please try again.",H)}},R=j=>{j?C.value=j:C.value=null,b.value=!0};return{items:n,loading:r,totalCount:o,currentPage:i,searchTerm:a,itemLimit:s,columns:t,currentItemConfig:l,savingItemConfiguration:u,currentItem:c,configLoader:h,currentItemData:d,currentGroupIndex:m,currentOptionIndex:f,currentOptionData:g,versionInfo:y,activateConfigData:v,activatePayload:_,itemId:p,showActivationErrorModal:b,activationError:C,activationRetryCount:A,maxRetries:E,getItemConfiguration:M,getItemsList:S,getItemDetails:k,getAvailableAttributes:w,addAttribute:T,getChildFields:q,getPicklistValues:K,activateItemConfig:U,getECatalogsForProduct:Y,getversionInfo:ie,saveItemConfigToCatalog:ee,createNewVersion:P,rollbackItemConfig:O,addCrossSell:async j=>{const Q={itemId:j.id||j.itemId,primarySortOrder:j.primarySortOrder};try{const Z=await window.AdminConfiguratorManager.addCrossSell({request:JSON.stringify(Q)});return JSON.parse(Z.data)}catch(Z){return e.handleError("Failed to add cross sell. Please try again.",Z),null}},saveItemConfiguration:async()=>{var j;if(h.value||r.value||u.value||!((j=l.value)!=null&&j.productItem))return null;if(!(l.value.productItem.itemStatus==="Active"||l.value.productItem.itemStatus==="Inactive"))try{u.value=!0;const Q={itemId:p.value,configurationData:l.value},Z=await window.AdminConfiguratorManager.saveItemConfiguration({request:JSON.stringify(Q)});if(Z!=null&&Z.errorMessage)return e.handleError(Z.errorMessage),null;if(!(Z!=null&&Z.error)){const ae=y.value.findIndex(fe=>fe.status==="Draft");y.value[ae].id=Z.data}return Z}catch(Q){return e.handleError("Failed to save item configuration. Please try again.",Q),null}finally{u.value=!1}},showActivationError:R,hideActivationError:()=>{b.value=!1,A.value=0},incrementRetryCount:()=>{A.value+=1,b.value=!0},canRetry:()=>A.value<E,assignStableIds:I}}),sb={class:"app-filters-main-wrapper"},lb={class:"app-filters-wrapper"},ub={class:"app-filters"},cb={class:"left-section"},db={class:"ect-flex ect-gap-2 ect-items-center"},fb={class:"ect-absolute ect-top-0 ect-right-0 ect-w-full ect-h-full ect-z-10"},hb={class:"right-section"},pb={class:"after-search-wrapper"},mb={class:"buttons-wrapper"},gb={class:"before-button-wrapper"},yb={key:0,class:"action-wrapper"},vb={key:1,class:"button-text ect-font-medium"},bb={key:2,class:"count-badge"},_b=Be({__name:"FilterHeader",props:{title:{type:String,default:""},showSearch:{type:Boolean,default:!1},buttons:{type:Array,default:()=>[],validator:e=>e.every(n=>(n.icon||n.text)&&typeof n.handler=="function")},searchWidth:{type:String,default:"312px"},showBackButton:{type:Boolean,default:!1},statusText:{type:String,default:""},placeholder:{type:String,default:"Search by name"},breadcrumbLinks:{type:Array,default:()=>[],validator:e=>e.every(n=>typeof n=="object"&&typeof n.text=="string"&&(n.route===void 0||typeof n.route=="string"))},recordLink:{type:String,default:""}},emits:["search","back"],setup(e,{emit:n}){const t=ab(),r=e,o=ii([]);bt(()=>{i()});const i=()=>{o.splice(0,o.length),r.buttons&&r.buttons.length>0&&r.buttons.forEach(d=>{o.push({...d})})};ze(()=>r.buttons,()=>{i()},{deep:!0});const a=d=>{s("search",d)},s=n,l=X(""),u=(d,m)=>{d.supportsToggle&&(d.isActive=!d.isActive),typeof d.handler=="function"&&d.handler(d,d.isActive)},c=()=>{s("back")},h=()=>{if(!r.recordLink)return;let d=r.recordLink;if(!d){let v=t.itemId;if(!v){const y=new URLSearchParams(window.location.search),_=new URLSearchParams(window.location.hash.split("?")[1]);v=y.get("itemId")||_.get("itemId")}d=v}if(!d)return;const f=window.location.href.match(/^(https?:\/\/[^/]+)/);if(!f){console.info("[ERROR]: Unable to extract base domain from current URL");return}const p=`${f[1]}/${d}`;window.open(p,"_blank")};return(d,m)=>(F(),$("div",sb,[x("div",lb,[x("div",ub,[x("div",cb,[e.breadcrumbLinks&&e.breadcrumbLinks.length>1?(F(),we(tb,{key:0,links:e.breadcrumbLinks,"data-test-id":"filter-header-breadcrumbs",class:"ect-mb-3"},null,8,["links"])):ye("",!0),x("div",db,[e.showBackButton?(F(),$("button",{key:0,class:"back-button","data-test-id":"filter-header-button-back",onClick:c},[ge(Ge,{icon:"arrow",symbol:"",size:16,color:"#198708",class:"ect-relative ect-top-[3px]"})])):ye("",!0),e.title?(F(),$("p",{key:1,class:De(["ect-relative ect-text-lg ect-font-semibold ect-leading-5 ect-text-[#1F1F1F] ect-transition-colors ect-duration-200",{"hover:ect-text-[#0076D6] ect-cursor-pointer":e.recordLink}]),"data-test-id":"filter-header-title",onClick:m[0]||(m[0]=f=>e.recordLink?h():null)},[He(Ee(e.title)+" ",1),e.recordLink?(F(),$(Se,{key:0},[ge(Ge,{icon:"open-link",symbol:"",size:16,color:"currentColor",class:"ect-relative ect-top-[3px]"}),x("div",fb,[ge(O1,{class:"ect-min-w-full ect-h-full",direction:"top",content:"View Item in Salesforce","data-test-id":"filter-header-tooltip",width:160})])],64)):ye("",!0)],2)):ye("",!0),e.statusText?(F(),we(X7,{key:2,text:e.statusText,state:e.statusText.toLowerCase(),"data-test-id":"`filter-header-status-pill`"},null,8,["text","state"])):ye("",!0),it(d.$slots,"after-status",{},void 0,!0)])]),x("div",hb,[e.showSearch?(F(),$("div",{key:0,class:"search-wrapper",style:Te({width:e.searchWidth})},[ge(G7,{modelValue:l.value,"onUpdate:modelValue":[m[1]||(m[1]=f=>l.value=f),a],class:"search-input",placeholder:e.placeholder,"data-test-id":"filter-header-search-input"},null,8,["modelValue","placeholder"])],4)):ye("",!0),x("div",pb,[it(d.$slots,"afterSearch",{},void 0,!0)]),x("div",mb,[x("div",gb,[it(d.$slots,"before-button",{},void 0,!0)]),d.$slots.buttons?(F(),$("div",yb,[it(d.$slots,"buttons",{},void 0,!0)])):(F(!0),$(Se,{key:1},Ne(o,(f,g)=>(F(),$("div",{key:g,class:"action-wrapper"},[ge(Vt,{btype:f.type||"primary","button-style":f.style||"outlined",size:"medium",style:Te({minWidth:f.minWidth||"auto"}),class:De([{active:f.isActive},{"icon-only":f.icon&&!f.text},{"text-button":f.text}]),loading:f.loading,disabled:f.disabled,"data-test-id":`filter-header-button-${f.text?f.text.toLowerCase().replace(/\s+/g,"-"):g}`,onClick:p=>u(f)},{default:Ve(()=>[f.icon?(F(),we(Ge,{key:0,icon:f.icon,symbol:"",color:f.color||"#136E05",size:f.size||14},null,8,["icon","color","size"])):ye("",!0),f.text?(F(),$("span",vb,Ee(f.isActive?f.altText:f.text),1)):ye("",!0),f.count?(F(),$("span",bb,Ee(f.count),1)):ye("",!0)]),_:2},1032,["btype","button-style","style","class","loading","disabled","data-test-id","onClick"])]))),128))])])])])]))}},[["__scopeId","data-v-2ea70801"]]),xb=["data-test-id"],Cb=["data-test-id"],Eb=["data-test-id"],kb=["data-test-id"],Ab=["data-test-id"],wb=["data-test-id"],Ib=["data-test-id"],Sb=Be({__name:"ecSwitch",props:pd({text:{type:[String,Object],required:!1,validator:e=>typeof e=="string"?!0:typeof e=="object"&&e!==null?Object.prototype.hasOwnProperty.call(e,"on")&&Object.prototype.hasOwnProperty.call(e,"off"):!1},subtext:{type:String,required:!1},size:{type:String,default:"regular",validator:e=>["regular","large"].includes(e)},disabled:{type:Boolean,default:!1},dataTestId:{type:String,default:""},leftAlign:{type:Boolean,default:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:pd(["update:modelValue"],["update:modelValue"]),setup(e,{emit:n}){const t=e,r=h6(e,"modelValue"),o=n,i=ve(()=>typeof t.text=="string"?t.text:typeof t.text=="object"&&t.text!==null?r.value?t.text.on:t.text.off:""),a=()=>{t.disabled||o("update:modelValue",!r.value)};return(s,l)=>(F(),$("div",{class:De(["ec-switch-container",{disabled:e.disabled}]),"data-test-id":e.dataTestId},[e.leftAlign?(F(),$("span",{key:0,class:"ec-switch__label","data-test-id":`${e.dataTestId}-label`},[He(Ee(i.value)+" ",1),e.subtext?(F(),$("span",{key:0,class:"ec-switch__subtext","data-test-id":`${e.dataTestId}-subtext`},Ee(e.subtext),9,Eb)):ye("",!0)],8,Cb)):ye("",!0),x("div",{class:De(["ec-switch",{"ec-switch--active":r.value,"ec-switch--large":e.size==="large"}]),"data-test-id":`${e.dataTestId}-switch`,onClick:a},[x("div",{class:"ec-switch__handle","data-test-id":`${e.dataTestId}-handle`},null,8,Ab)],10,kb),e.leftAlign?ye("",!0):(F(),$("span",{key:1,class:"ec-switch__label","data-test-id":`${e.dataTestId}-label`},[He(Ee(i.value)+" ",1),e.subtext?(F(),$("span",{key:0,class:"ec-switch__subtext","data-test-id":`${e.dataTestId}-subtext`},Ee(e.subtext),9,Ib)):ye("",!0)],8,wb))],10,xb))}},[["__scopeId","data-v-cfefad9a"]]),Ob={key:0,class:"ect-bg-white ect-h-full ect-flex ect-flex-col ect-overflow-auto"},Tb={key:0,class:"ect-fixed ect-top-2 ect-right-2 ect-z-[60]","data-test-id":"configurator-minmax-popup-wrapper"},Db={class:"ect-sticky ect-top-0 ect-z-50 ect-bg-white","data-test-id":"configurator-header-sticky"},Rb={class:"ect-flex ect-flex-col ect-sticky ect-top-0 ect-z-50 ect-bg-white ect-border-b ect-border-gray-200"},Mb={key:0,class:"ect-mr-2 ect-w-[300px]"},Fb={key:1,class:"ect-relative ect-text-lg ect-font-semibold ect-leading-5 ect-text-[#1F1F1F] ect-transition-colors ect-duration-200"},Bb={key:0,class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-bg-light-bg-x","data-test-id":"configurator-content-scrollable"},Nb=Be({__name:"ProductConfiguration",props:{qliId:{type:String,required:!1},cart:{type:Boolean,default:!1}},emits:["action"],setup(e,{emit:n}){const t=wn(),r=X(!1),o=X(0),i=X(t.qliId||null),a=ve(()=>t.configuration),s=X(""),l=d=>{s.value=d.tab},u=ve(()=>r.value?[{text:"Done",altText:"Done",type:"primary",style:"primary",handler:()=>c()}]:t.isChangedConfiguration?[]:[]),c=()=>{r.value=!1},h=async d=>{const m=t.products.find(f=>f.value===d);m&&await t.initConfigurator(m.itemId,m.value,t.quoteId)};return(d,m)=>Oe(t).configuration?(F(),$("div",Ob,[Oe(t).showMinMaxPopup&&!Oe(t).loading.save?(F(),$("div",Tb,[ge(wv,{redirect:!0,onRedirect:l})])):ye("",!0),Oe(t).conflictData?(F(),we(U7,{key:1,item:Oe(t).conflictItemChanged||{},data:Oe(t).conflictData,"data-test-id":"configurator-conflict-modal",onClose:m[0]||(m[0]=f=>Oe(t).clearConflict()),onDone:m[1]||(m[1]=f=>Oe(t).handleConflictDone())},null,8,["item","data"])):ye("",!0),Oe(t).savedScreen?(F(),we(z8,{key:3})):(F(),$(Se,{key:2},[x("div",Db,[x("div",Rb,[ge(_b,{buttons:u.value},{"after-status":Ve(()=>[Oe(t).quoteId&&Oe(t).products.length>0?(F(),$("div",Mb,[ge(f8,{modelValue:i.value,"onUpdate:modelValue":[m[2]||(m[2]=f=>i.value=f),h],options:Oe(t).products,placeholder:"Select configuration","data-test-id":"filter-header-input-list"},null,8,["modelValue","options"])])):(F(),$("div",Fb,Ee(a.value.itemName),1))]),"before-button":Ve(()=>[Oe(t).isYearlyPricingExist?(F(),we(Sb,{key:0,modelValue:Oe(t).showYearlyPricing,"onUpdate:modelValue":[m[3]||(m[3]=f=>Oe(t).showYearlyPricing=f),Oe(t).changePricingScheme],"left-align":"",class:"ect-text-nowrap",text:{on:"Yearly Price",off:"Monthly Price"},"data-test-id":"configurator-switch-show-yearly-pricing"},null,8,["modelValue","onUpdate:modelValue"])):ye("",!0)]),_:1},8,["buttons"])]),x("div",{class:De(r.value?"ect-pb-16":"ect-pb-0")},[ge(bv,{config:a.value,"edit-attributes":r.value,scroll:o.value,onEditAttributes:m[4]||(m[4]=f=>r.value=!0)},null,8,["config","edit-attributes","scroll"])],2)]),r.value?ye("",!0):(F(),$("div",Bb,[ge(uv,{modelValue:s.value,"onUpdate:modelValue":m[5]||(m[5]=f=>s.value=f)},null,8,["modelValue"])]))],64))])):ye("",!0)}},[["__scopeId","data-v-4b502cb0"]]),Ri=e=>(Wt("data-v-5ac7f237"),e=e(),Qt(),e),Lb={key:0,class:"ect-bg-white ect-h-full ect-flex ect-flex-col","data-test-id":"configurator-skeleton-container"},Pb={class:"ect-sticky ect-top-0 ect-z-50 ect-bg-white","data-test-id":"configurator-skeleton-header-sticky"},qb={class:"ect-flex ect-flex-col"},$b=Ri(()=>x("div",{class:"ect-px-6 ect-py-4 ect-border-b ect-border-gray-200"},[x("div",{class:"ect-flex ect-items-center ect-justify-between"},[x("div",{class:"ect-flex-1 ect-mx-4"},[x("div",{class:"ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-64 ect-animate-pulse"})])])],-1)),Ub={class:"ect-px-6 ect-pt-4 ect-pb-2 ect-bg-white ect-border-b ect-border-gray-200"},jb={class:"ect-flex ect-items-start"},Hb=Ri(()=>x("div",{class:"ect-bg-gray-200 ect-rounded-lg ect-float-left ect-mr-4 ect-mb-2 ect-w-[104px] ect-h-[104px] ect-animate-pulse"},null,-1)),Vb={class:"ect-flex-1"},zb=Ri(()=>x("div",{class:"ect-mb-2"},[x("div",{class:"ect-h-4 ect-bg-gray-200 ect-rounded-md ect-w-full ect-mb-2 ect-animate-pulse"}),x("div",{class:"ect-h-4 ect-bg-gray-200 ect-rounded-md ect-w-3/4 ect-animate-pulse"})],-1)),Gb={class:"ect-mt-2 ect-clear-both"},Kb={class:"ect-flex ect-gap-2 ect-flex-wrap"},Xb={class:"ect-flex-1 ect-min-h-0 ect-overflow-y-auto ect-bg-light-bg-x","data-test-id":"configurator-skeleton-content-scrollable"},Wb=yi('<div class="ect-bg-white ect-shadow-sm ect-flex-shrink-0 ect-mb-4 ect-sticky ect-top-0 ect-z-50" data-test-id="configurator-skeleton-tabs-container" data-v-5ac7f237><div class="ect-px-6 ect-py-3" data-v-5ac7f237><div class="ect-flex ect-gap-6" data-v-5ac7f237><div class="ect-h-8 ect-bg-gray-200 ect-rounded-md ect-w-24 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-8 ect-bg-gray-200 ect-rounded-md ect-w-28 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-8 ect-bg-gray-200 ect-rounded-md ect-w-20 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-8 ect-bg-gray-200 ect-rounded-md ect-w-16 ect-animate-pulse" data-v-5ac7f237></div></div></div></div>',1),Qb={class:"ect-m-4 ect-bg-white","data-test-id":"configurator-skeleton-tab-content"},Zb=Ri(()=>x("div",{class:"ect-mb-2 ect-border-b ect-border-gray-200 ect-p-4"},[x("div",{class:"ect-h-4 ect-bg-gray-200 ect-rounded-md ect-w-48 ect-mb-2 ect-animate-pulse"}),x("div",{class:"ect-h-3 ect-bg-gray-200 ect-rounded-md ect-w-64 ect-animate-pulse"})],-1)),Jb=[yi('<div class="ect-bg-white ect-border ect-border-gray-200 ect-rounded-lg ect-p-4" data-v-5ac7f237><div class="ect-flex ect-items-start ect-gap-4" data-v-5ac7f237><div class="ect-w-16 ect-h-16 ect-bg-gray-200 ect-rounded-md ect-animate-pulse ect-flex-shrink-0" data-v-5ac7f237></div><div class="ect-flex-1" data-v-5ac7f237><div class="ect-h-5 ect-bg-gray-200 ect-rounded-md ect-w-3/4 ect-mb-2 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-4 ect-bg-gray-200 ect-rounded-md ect-w-full ect-mb-1 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-4 ect-bg-gray-200 ect-rounded-md ect-w-2/3 ect-mb-3 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-flex ect-items-center ect-gap-2" data-v-5ac7f237><div class="ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-20 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-16 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-12 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-24 ect-animate-pulse" data-v-5ac7f237></div></div></div><div class="ect-flex ect-items-center ect-justify-center" data-v-5ac7f237><div class="ect-flex-shrink-0 ect-w-5 ect-h-5 ect-bg-gray-200 ect-rounded-full ect-animate-pulse" data-v-5ac7f237></div></div></div></div>',1)],Yb=yi('<div class="ect-bg-white ect-border-t ect-border-gray-200 ect-flex-shrink-0" data-test-id="configurator-skeleton-footer-sticky" data-v-5ac7f237><div class="ect-px-6 ect-py-4" data-v-5ac7f237><div class="ect-flex ect-justify-between ect-items-center" data-v-5ac7f237><div class="ect-flex ect-items-center ect-gap-2" data-v-5ac7f237><div class="ect-h-5 ect-bg-gray-200 ect-rounded-md ect-w-16 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-24 ect-animate-pulse" data-v-5ac7f237></div></div><div class="ect-h-10 ect-bg-gray-200 ect-rounded-md ect-w-24 ect-animate-pulse" data-v-5ac7f237></div></div></div></div>',1),e_={key:1,class:"ect-bg-white ect-h-full ect-flex ect-flex-col","data-test-id":"configurator-skeleton-container"},t_={class:"ect-flex ect-flex-col ect-gap-4 ect-m-4"},n_=Ri(()=>x("div",{class:"ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-2/6 ect-mb-2 ect-animate-pulse"},null,-1)),r_=[yi('<div class="ect-flex ect-items-start ect-gap-4" data-v-5ac7f237><div class="ect-flex-1" data-v-5ac7f237><div class="ect-h-5 ect-bg-gray-200 ect-rounded-md ect-w-3/4 ect-mb-2 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-4 ect-bg-gray-200 ect-rounded-md ect-w-full ect-mb-1 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-4 ect-bg-gray-200 ect-rounded-md ect-w-2/3 ect-mb-3 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-flex ect-items-center ect-justify-between ect-gap-2" data-v-5ac7f237><div class="ect-h-6 ect-bg-gray-200 ect-rounded-md ect-w-20 ect-animate-pulse" data-v-5ac7f237></div><div class="ect-h-8 ect-bg-gray-200 ect-rounded-md ect-w-32 ect-animate-pulse" data-v-5ac7f237></div></div></div></div>',1)],o_=Be({__name:"ConfiguratorSkeletion",props:{type:{type:String,default:"full"},rows:{type:Number,default:4}},setup(e){return(n,t)=>e.type==="full"?(F(),$("div",Lb,[x("div",Pb,[x("div",qb,[$b,x("div",Ub,[x("div",jb,[Hb,x("div",Vb,[zb,x("div",Gb,[x("div",Kb,[(F(),$(Se,null,Ne(20,r=>x("div",{key:r,class:"ect-h-6 ect-bg-gray-200 ect-rounded-full ect-animate-pulse",style:Te({width:`${Math.random()*100+60}px`})},null,4)),64))])])])])])])]),x("div",Xb,[Wb,x("div",Qb,[Zb,(F(),$(Se,null,Ne(5,r=>x("div",{key:r,class:"ect-space-y-4 ect-py-2 ect-px-4"},Jb)),64))])]),Yb])):e.type==="recommendations"?(F(),$("div",e_,[x("div",t_,[n_,(F(!0),$(Se,null,Ne(e.rows,r=>(F(),$("div",{key:r,class:"ect-bg-white ect-border ect-border-gray-200 ect-rounded-lg ect-p-4"},r_))),128))])])):ye("",!0)}},[["__scopeId","data-v-5ac7f237"]]),i_=["data-item-id","data-qli-id"],a_={key:0,class:"ect-flex-1 ect-min-h-0"},s_={key:1,class:"ect-flex-1 ect-min-h-0"},l_={__name:"Configurator",props:{itemId:{type:String,required:!0},qliId:{type:String,required:!1},cart:{type:Boolean,default:!1}},emits:["ready","action"],setup(e,{emit:n}){const t=e,r=n,o=wn();return Zt(async()=>{console.time("CONFIGURATOR ON BEFORE MOUNT"),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","1"),await o.initConfigurator(t.itemId,t.qliId),console.timeLog("CONFIGURATOR ON BEFORE MOUNT","2"),console.timeEnd("CONFIGURATOR ON BEFORE MOUNT"),r("ready")}),ze(()=>[t.itemId,t.qliId],async([i,a],[s,l])=>{i&&(i!==s||a!==l)&&(await o.initConfigurator(i,a),r("ready"))}),(i,a)=>(F(),$("div",{class:"ect-h-full ect-flex ect-flex-col","data-item-id":e.itemId,"data-qli-id":e.qliId},[Oe(o).loading.init?(F(),$("div",s_,[ge(o_)])):(F(),$("div",a_,[ge(Nb,{"qli-id":e.qliId,onAction:a[0]||(a[0]=s=>r("action",s)),onSave:i.handleSave,cart:e.cart},null,8,["qli-id","onSave","cart"])]))],8,i_))}},u_=e=>(Wt("data-v-f17b67a2"),e=e(),Qt(),e),c_={class:"ect-hidden"},d_=u_(()=>x("div",{class:"dropdowntp"},null,-1)),T1=Be({__name:"ExpediteConfigurator",props:{security:{type:{baseUrl:String,accessToken:String},default:()=>({}),required:!0},cart:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},userLocale:{type:String,default:"en_US"},composablesOrgType:{type:String,required:!1},identity:{type:Object,required:!1},session:{type:Object,required:!1},functions:{type:Object,required:!1},resources:{type:Object,required:!1}},emits:["ready","action"],setup(e,{emit:n}){const t=wf(),r=An(),o=wn(),i=e,a=n,s=()=>{a("ready",o.exposeProperties())};function l(c){if(o.isChangedConfiguration)return c.preventDefault(),c.returnValue="",""}function u(){var f,g,p;t.quoteId=(f=i.session)==null?void 0:f.quoteId,t.eCatalogId=(g=i.session)==null?void 0:g.eCatalogId;const c={orgType:i.composablesOrgType,orgId:i.identity.organizationId,userId:i.identity.userId,accountId:i.identity.accountId,userLocale:i.userLocale,pricingSchema:((p=i.identity)==null?void 0:p.pricingSchema)||"Single"},{orgType:h,orgId:d,userId:m}=c;t.setSetupData(c,i.security,i.functions,i.resources),o.initializeController(h,d,m),o.editable=i.editable}return Zt(()=>{u(),window.addEventListener("beforeunload",l)}),ze(()=>[i.identity,i.security,i.session],()=>{u()},{deep:!0}),er(()=>{window.removeEventListener("beforeunload",l)}),(c,h)=>{var d,m;return F(),$(Se,null,[x("div",c_," Is Changed Configuration: "+Ee(Oe(o).isChangedConfiguration),1),ge(R9),ge(uu),Oe(r).errorPopup?(F(),we(M3,{key:0,data:Oe(r).errorPopup,onClose:h[0]||(h[0]=f=>Oe(r).errorPopup=null)},null,8,["data"])):ye("",!0),Oe(o).configuration&&Oe(o).message?(F(),we(w9,{key:1,message:Oe(o).message,onClose:h[1]||(h[1]=f=>Oe(o).message=null)},null,8,["message"])):ye("",!0),d_,ge(l_,{"item-id":(d=i.session)==null?void 0:d.itemId,"qli-id":(m=i.session)==null?void 0:m.qliId,onReady:s,onAction:h[2]||(h[2]=f=>a("action",f)),cart:e.cart,editable:e.editable},null,8,["item-id","qli-id","cart","editable"])],64)}}},[["__scopeId","data-v-f17b67a2"]]),f_=Mt("mygpt",()=>{const e=X("");async function n(r,o="gpt-3.5-turbo",i=300){var a,s,l;if(!e.value)throw new Error("Secret key is required. Please set it in the store.");try{const u=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.value}`},body:JSON.stringify({model:o,messages:r,max_tokens:Math.min(i,300),temperature:.7})});if(!u.ok){const h=await u.json().catch(()=>({}));throw new Error(((a=h.error)==null?void 0:a.message)||`API Error: ${u.status} ${u.statusText}`)}return((l=(s=(await u.json()).choices[0])==null?void 0:s.message)==null?void 0:l.content)||"No response generated"}catch(u){throw new Error(u.message||"Failed to get response from GPT")}}function t(r){e.value=r}return{secretKey:e,getGptResponse:n,setSecretKey:t}}),Mi=e=>(Wt("data-v-46273585"),e=e(),Qt(),e),h_={class:"custom-gpt-container"},p_={class:"gpt-header"},m_=Mi(()=>x("h3",{class:"gpt-title"},"GPT Chat",-1)),g_={class:"gpt-response-area"},y_={key:0,class:"loading-indicator"},v_=[Mi(()=>x("div",{class:"spinner"},null,-1)),Mi(()=>x("span",null,"Thinking...",-1))],b_={key:1,class:"error-message"},__=Mi(()=>x("strong",null,"Error:",-1)),x_={key:2,class:"response-content"},C_={key:3,class:"empty-state"},E_=[Mi(()=>x("p",null,"Enter a message below to start a conversation with GPT 5.0",-1))],k_={class:"gpt-input-area"},A_={class:"input-wrapper"},w_=["placeholder","disabled"],I_=["disabled"],S_={key:0},O_={key:1},T_={key:0,class:"warning-message"},D_=Be({__name:"ExpediteGPT",props:{secretKey:{type:String,required:!1,default:""},model:{type:String,required:!1,default:"gpt-3.5-turbo"},maxTokens:{type:Number,required:!1,default:300},placeholder:{type:String,required:!1,default:"Enter your message..."}},setup(e){const n=e,t=f_(),r=ve(()=>n.secretKey||t.secretKey),o=X(""),i=X(""),a=X(!1),s=X(null),l=X([]),u=ve(()=>i.value.trim().length>0),c=ve(()=>o.value.trim().length>0&&!a.value&&r.value),h=async()=>{if(!c.value)return;const f=o.value.trim();if(f){a.value=!0,s.value=null,o.value="";try{l.value.push({role:"user",content:f});const g=l.value.reduce((y,_)=>y+Math.ceil(_.content.length/4),0);let p=[...l.value];g>n.maxTokens&&(p=l.value.slice(-3));const v=await t.getGptResponse(p,n.model,n.maxTokens);i.value=v,l.value.push({role:"assistant",content:v})}catch(g){s.value=g.message||"Failed to get response from GPT",console.error("GPT API Error:",g)}finally{a.value=!1}}},d=f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),h())},m=()=>{l.value=[],i.value="",s.value=null};return Zt(()=>{t.setSecretKey(n.secretKey)}),(f,g)=>(F(),$("div",h_,[x("div",p_,[m_,u.value||l.value.length>0?(F(),$("button",{key:0,onClick:m,class:"clear-button",type:"button"}," Clear ")):ye("",!0)]),x("div",g_,[a.value?(F(),$("div",y_,v_)):s.value?(F(),$("div",b_,[__,He(" "+Ee(s.value),1)])):u.value?(F(),$("div",x_,Ee(i.value),1)):(F(),$("div",C_,E_))]),x("div",k_,[x("div",A_,[kn(x("textarea",{"onUpdate:modelValue":g[0]||(g[0]=p=>o.value=p),placeholder:e.placeholder,disabled:a.value||!r.value,onKeypress:d,class:"gpt-input",rows:"3"},null,40,w_),[[po,o.value]]),x("button",{onClick:h,disabled:!c.value,class:"send-button",type:"button"},[a.value?(F(),$("span",S_,"...")):(F(),$("span",O_,"Send"))],8,I_)]),r.value?ye("",!0):(F(),$("div",T_," ⚠️ Secret key is required to use this component. Set it via prop or in the store. "))])]))}},[["__scopeId","data-v-46273585"]]);var D1={exports:{}};function R_(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _u={exports:{}};const M_=Gg(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var R1;function Ye(){return R1||(R1=1,function(e,n){(function(t,r){e.exports=r()})($e,function(){var t=t||function(r,o){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof $e<"u"&&$e.crypto&&(i=$e.crypto),!i&&typeof R_=="function")try{i=M_}catch{}var a=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function y(){}return function(_){var b;return y.prototype=_,b=new y,y.prototype=null,b}}(),l={},u=l.lib={},c=u.Base=function(){return{extend:function(y){var _=s(this);return y&&_.mixIn(y),(!_.hasOwnProperty("init")||this.init===_.init)&&(_.init=function(){_.$super.init.apply(this,arguments)}),_.init.prototype=_,_.$super=this,_},create:function(){var y=this.extend();return y.init.apply(y,arguments),y},init:function(){},mixIn:function(y){for(var _ in y)y.hasOwnProperty(_)&&(this[_]=y[_]);y.hasOwnProperty("toString")&&(this.toString=y.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),h=u.WordArray=c.extend({init:function(y,_){y=this.words=y||[],_!=o?this.sigBytes=_:this.sigBytes=y.length*4},toString:function(y){return(y||m).stringify(this)},concat:function(y){var _=this.words,b=y.words,C=this.sigBytes,A=y.sigBytes;if(this.clamp(),C%4)for(var E=0;E<A;E++){var I=b[E>>>2]>>>24-E%4*8&255;_[C+E>>>2]|=I<<24-(C+E)%4*8}else for(var M=0;M<A;M+=4)_[C+M>>>2]=b[M>>>2];return this.sigBytes+=A,this},clamp:function(){var y=this.words,_=this.sigBytes;y[_>>>2]&=4294967295<<32-_%4*8,y.length=r.ceil(_/4)},clone:function(){var y=c.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var _=[],b=0;b<y;b+=4)_.push(a());return new h.init(_,y)}}),d=l.enc={},m=d.Hex={stringify:function(y){for(var _=y.words,b=y.sigBytes,C=[],A=0;A<b;A++){var E=_[A>>>2]>>>24-A%4*8&255;C.push((E>>>4).toString(16)),C.push((E&15).toString(16))}return C.join("")},parse:function(y){for(var _=y.length,b=[],C=0;C<_;C+=2)b[C>>>3]|=parseInt(y.substr(C,2),16)<<24-C%8*4;return new h.init(b,_/2)}},f=d.Latin1={stringify:function(y){for(var _=y.words,b=y.sigBytes,C=[],A=0;A<b;A++){var E=_[A>>>2]>>>24-A%4*8&255;C.push(String.fromCharCode(E))}return C.join("")},parse:function(y){for(var _=y.length,b=[],C=0;C<_;C++)b[C>>>2]|=(y.charCodeAt(C)&255)<<24-C%4*8;return new h.init(b,_)}},g=d.Utf8={stringify:function(y){try{return decodeURIComponent(escape(f.stringify(y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(y){return f.parse(unescape(encodeURIComponent(y)))}},p=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=g.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var _,b=this._data,C=b.words,A=b.sigBytes,E=this.blockSize,I=E*4,M=A/I;y?M=r.ceil(M):M=r.max((M|0)-this._minBufferSize,0);var S=M*E,k=r.min(S*4,A);if(S){for(var w=0;w<S;w+=E)this._doProcessBlock(C,w);_=C.splice(0,S),b.sigBytes-=k}return new h.init(_,k)},clone:function(){var y=c.clone.call(this);return y._data=this._data.clone(),y},_minBufferSize:0});u.Hasher=p.extend({cfg:c.extend(),init:function(y){this.cfg=this.cfg.extend(y),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(y){return this._append(y),this._process(),this},finalize:function(y){y&&this._append(y);var _=this._doFinalize();return _},blockSize:16,_createHelper:function(y){return function(_,b){return new y.init(b).finalize(_)}},_createHmacHelper:function(y){return function(_,b){return new v.HMAC.init(y,b).finalize(_)}}});var v=l.algo={};return l}(Math);return t})}(_u)),_u.exports}var xu={exports:{}},M1;function ps(){return M1||(M1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(r){var o=t,i=o.lib,a=i.Base,s=i.WordArray,l=o.x64={};l.Word=a.extend({init:function(u,c){this.high=u,this.low=c}}),l.WordArray=a.extend({init:function(u,c){u=this.words=u||[],c!=r?this.sigBytes=c:this.sigBytes=u.length*8},toX32:function(){for(var u=this.words,c=u.length,h=[],d=0;d<c;d++){var m=u[d];h.push(m.high),h.push(m.low)}return s.create(h,this.sigBytes)},clone:function(){for(var u=a.clone.call(this),c=u.words=this.words.slice(0),h=c.length,d=0;d<h;d++)c[d]=c[d].clone();return u}})}(),t})}(xu)),xu.exports}var Cu={exports:{}},F1;function F_(){return F1||(F1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(){if(typeof ArrayBuffer=="function"){var r=t,o=r.lib,i=o.WordArray,a=i.init,s=i.init=function(l){if(l instanceof ArrayBuffer&&(l=new Uint8Array(l)),(l instanceof Int8Array||typeof Uint8ClampedArray<"u"&&l instanceof Uint8ClampedArray||l instanceof Int16Array||l instanceof Uint16Array||l instanceof Int32Array||l instanceof Uint32Array||l instanceof Float32Array||l instanceof Float64Array)&&(l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength)),l instanceof Uint8Array){for(var u=l.byteLength,c=[],h=0;h<u;h++)c[h>>>2]|=l[h]<<24-h%4*8;a.call(this,c,u)}else a.apply(this,arguments)};s.prototype=i}}(),t.lib.WordArray})}(Cu)),Cu.exports}var Eu={exports:{}},B1;function B_(){return B1||(B1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(){var r=t,o=r.lib,i=o.WordArray,a=r.enc;a.Utf16=a.Utf16BE={stringify:function(l){for(var u=l.words,c=l.sigBytes,h=[],d=0;d<c;d+=2){var m=u[d>>>2]>>>16-d%4*8&65535;h.push(String.fromCharCode(m))}return h.join("")},parse:function(l){for(var u=l.length,c=[],h=0;h<u;h++)c[h>>>1]|=l.charCodeAt(h)<<16-h%2*16;return i.create(c,u*2)}},a.Utf16LE={stringify:function(l){for(var u=l.words,c=l.sigBytes,h=[],d=0;d<c;d+=2){var m=s(u[d>>>2]>>>16-d%4*8&65535);h.push(String.fromCharCode(m))}return h.join("")},parse:function(l){for(var u=l.length,c=[],h=0;h<u;h++)c[h>>>1]|=s(l.charCodeAt(h)<<16-h%2*16);return i.create(c,u*2)}};function s(l){return l<<8&4278255360|l>>>8&16711935}}(),t.enc.Utf16})}(Eu)),Eu.exports}var ku={exports:{}},N1;function vo(){return N1||(N1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(){var r=t,o=r.lib,i=o.WordArray,a=r.enc;a.Base64={stringify:function(l){var u=l.words,c=l.sigBytes,h=this._map;l.clamp();for(var d=[],m=0;m<c;m+=3)for(var f=u[m>>>2]>>>24-m%4*8&255,g=u[m+1>>>2]>>>24-(m+1)%4*8&255,p=u[m+2>>>2]>>>24-(m+2)%4*8&255,v=f<<16|g<<8|p,y=0;y<4&&m+y*.75<c;y++)d.push(h.charAt(v>>>6*(3-y)&63));var _=h.charAt(64);if(_)for(;d.length%4;)d.push(_);return d.join("")},parse:function(l){var u=l.length,c=this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var d=0;d<c.length;d++)h[c.charCodeAt(d)]=d}var m=c.charAt(64);if(m){var f=l.indexOf(m);f!==-1&&(u=f)}return s(l,u,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(l,u,c){for(var h=[],d=0,m=0;m<u;m++)if(m%4){var f=c[l.charCodeAt(m-1)]<<m%4*2,g=c[l.charCodeAt(m)]>>>6-m%4*2,p=f|g;h[d>>>2]|=p<<24-d%4*8,d++}return i.create(h,d)}}(),t.enc.Base64})}(ku)),ku.exports}var Au={exports:{}},L1;function N_(){return L1||(L1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(){var r=t,o=r.lib,i=o.WordArray,a=r.enc;a.Base64url={stringify:function(l,u){u===void 0&&(u=!0);var c=l.words,h=l.sigBytes,d=u?this._safe_map:this._map;l.clamp();for(var m=[],f=0;f<h;f+=3)for(var g=c[f>>>2]>>>24-f%4*8&255,p=c[f+1>>>2]>>>24-(f+1)%4*8&255,v=c[f+2>>>2]>>>24-(f+2)%4*8&255,y=g<<16|p<<8|v,_=0;_<4&&f+_*.75<h;_++)m.push(d.charAt(y>>>6*(3-_)&63));var b=d.charAt(64);if(b)for(;m.length%4;)m.push(b);return m.join("")},parse:function(l,u){u===void 0&&(u=!0);var c=l.length,h=u?this._safe_map:this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var m=0;m<h.length;m++)d[h.charCodeAt(m)]=m}var f=h.charAt(64);if(f){var g=l.indexOf(f);g!==-1&&(c=g)}return s(l,c,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function s(l,u,c){for(var h=[],d=0,m=0;m<u;m++)if(m%4){var f=c[l.charCodeAt(m-1)]<<m%4*2,g=c[l.charCodeAt(m)]>>>6-m%4*2,p=f|g;h[d>>>2]|=p<<24-d%4*8,d++}return i.create(h,d)}}(),t.enc.Base64url})}(Au)),Au.exports}var wu={exports:{}},P1;function bo(){return P1||(P1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(r){var o=t,i=o.lib,a=i.WordArray,s=i.Hasher,l=o.algo,u=[];(function(){for(var g=0;g<64;g++)u[g]=r.abs(r.sin(g+1))*4294967296|0})();var c=l.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,p){for(var v=0;v<16;v++){var y=p+v,_=g[y];g[y]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}var b=this._hash.words,C=g[p+0],A=g[p+1],E=g[p+2],I=g[p+3],M=g[p+4],S=g[p+5],k=g[p+6],w=g[p+7],T=g[p+8],q=g[p+9],K=g[p+10],U=g[p+11],Y=g[p+12],ie=g[p+13],ee=g[p+14],P=g[p+15],O=b[0],R=b[1],D=b[2],L=b[3];O=h(O,R,D,L,C,7,u[0]),L=h(L,O,R,D,A,12,u[1]),D=h(D,L,O,R,E,17,u[2]),R=h(R,D,L,O,I,22,u[3]),O=h(O,R,D,L,M,7,u[4]),L=h(L,O,R,D,S,12,u[5]),D=h(D,L,O,R,k,17,u[6]),R=h(R,D,L,O,w,22,u[7]),O=h(O,R,D,L,T,7,u[8]),L=h(L,O,R,D,q,12,u[9]),D=h(D,L,O,R,K,17,u[10]),R=h(R,D,L,O,U,22,u[11]),O=h(O,R,D,L,Y,7,u[12]),L=h(L,O,R,D,ie,12,u[13]),D=h(D,L,O,R,ee,17,u[14]),R=h(R,D,L,O,P,22,u[15]),O=d(O,R,D,L,A,5,u[16]),L=d(L,O,R,D,k,9,u[17]),D=d(D,L,O,R,U,14,u[18]),R=d(R,D,L,O,C,20,u[19]),O=d(O,R,D,L,S,5,u[20]),L=d(L,O,R,D,K,9,u[21]),D=d(D,L,O,R,P,14,u[22]),R=d(R,D,L,O,M,20,u[23]),O=d(O,R,D,L,q,5,u[24]),L=d(L,O,R,D,ee,9,u[25]),D=d(D,L,O,R,I,14,u[26]),R=d(R,D,L,O,T,20,u[27]),O=d(O,R,D,L,ie,5,u[28]),L=d(L,O,R,D,E,9,u[29]),D=d(D,L,O,R,w,14,u[30]),R=d(R,D,L,O,Y,20,u[31]),O=m(O,R,D,L,S,4,u[32]),L=m(L,O,R,D,T,11,u[33]),D=m(D,L,O,R,U,16,u[34]),R=m(R,D,L,O,ee,23,u[35]),O=m(O,R,D,L,A,4,u[36]),L=m(L,O,R,D,M,11,u[37]),D=m(D,L,O,R,w,16,u[38]),R=m(R,D,L,O,K,23,u[39]),O=m(O,R,D,L,ie,4,u[40]),L=m(L,O,R,D,C,11,u[41]),D=m(D,L,O,R,I,16,u[42]),R=m(R,D,L,O,k,23,u[43]),O=m(O,R,D,L,q,4,u[44]),L=m(L,O,R,D,Y,11,u[45]),D=m(D,L,O,R,P,16,u[46]),R=m(R,D,L,O,E,23,u[47]),O=f(O,R,D,L,C,6,u[48]),L=f(L,O,R,D,w,10,u[49]),D=f(D,L,O,R,ee,15,u[50]),R=f(R,D,L,O,S,21,u[51]),O=f(O,R,D,L,Y,6,u[52]),L=f(L,O,R,D,I,10,u[53]),D=f(D,L,O,R,K,15,u[54]),R=f(R,D,L,O,A,21,u[55]),O=f(O,R,D,L,T,6,u[56]),L=f(L,O,R,D,P,10,u[57]),D=f(D,L,O,R,k,15,u[58]),R=f(R,D,L,O,ie,21,u[59]),O=f(O,R,D,L,M,6,u[60]),L=f(L,O,R,D,U,10,u[61]),D=f(D,L,O,R,E,15,u[62]),R=f(R,D,L,O,q,21,u[63]),b[0]=b[0]+O|0,b[1]=b[1]+R|0,b[2]=b[2]+D|0,b[3]=b[3]+L|0},_doFinalize:function(){var g=this._data,p=g.words,v=this._nDataBytes*8,y=g.sigBytes*8;p[y>>>5]|=128<<24-y%32;var _=r.floor(v/4294967296),b=v;p[(y+64>>>9<<4)+15]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,p[(y+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,g.sigBytes=(p.length+1)*4,this._process();for(var C=this._hash,A=C.words,E=0;E<4;E++){var I=A[E];A[E]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}return C},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g}});function h(g,p,v,y,_,b,C){var A=g+(p&v|~p&y)+_+C;return(A<<b|A>>>32-b)+p}function d(g,p,v,y,_,b,C){var A=g+(p&y|v&~y)+_+C;return(A<<b|A>>>32-b)+p}function m(g,p,v,y,_,b,C){var A=g+(p^v^y)+_+C;return(A<<b|A>>>32-b)+p}function f(g,p,v,y,_,b,C){var A=g+(v^(p|~y))+_+C;return(A<<b|A>>>32-b)+p}o.MD5=s._createHelper(c),o.HmacMD5=s._createHmacHelper(c)}(Math),t.MD5})}(wu)),wu.exports}var Iu={exports:{}},q1;function $1(){return q1||(q1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(){var r=t,o=r.lib,i=o.WordArray,a=o.Hasher,s=r.algo,l=[],u=s.SHA1=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,h){for(var d=this._hash.words,m=d[0],f=d[1],g=d[2],p=d[3],v=d[4],y=0;y<80;y++){if(y<16)l[y]=c[h+y]|0;else{var _=l[y-3]^l[y-8]^l[y-14]^l[y-16];l[y]=_<<1|_>>>31}var b=(m<<5|m>>>27)+v+l[y];y<20?b+=(f&g|~f&p)+1518500249:y<40?b+=(f^g^p)+1859775393:y<60?b+=(f&g|f&p|g&p)-1894007588:b+=(f^g^p)-899497514,v=p,p=g,g=f<<30|f>>>2,f=m,m=b}d[0]=d[0]+m|0,d[1]=d[1]+f|0,d[2]=d[2]+g|0,d[3]=d[3]+p|0,d[4]=d[4]+v|0},_doFinalize:function(){var c=this._data,h=c.words,d=this._nDataBytes*8,m=c.sigBytes*8;return h[m>>>5]|=128<<24-m%32,h[(m+64>>>9<<4)+14]=Math.floor(d/4294967296),h[(m+64>>>9<<4)+15]=d,c.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var c=a.clone.call(this);return c._hash=this._hash.clone(),c}});r.SHA1=a._createHelper(u),r.HmacSHA1=a._createHmacHelper(u)}(),t.SHA1})}(Iu)),Iu.exports}var Su={exports:{}},U1;function Ou(){return U1||(U1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){return function(r){var o=t,i=o.lib,a=i.WordArray,s=i.Hasher,l=o.algo,u=[],c=[];(function(){function m(v){for(var y=r.sqrt(v),_=2;_<=y;_++)if(!(v%_))return!1;return!0}function f(v){return(v-(v|0))*4294967296|0}for(var g=2,p=0;p<64;)m(g)&&(p<8&&(u[p]=f(r.pow(g,1/2))),c[p]=f(r.pow(g,1/3)),p++),g++})();var h=[],d=l.SHA256=s.extend({_doReset:function(){this._hash=new a.init(u.slice(0))},_doProcessBlock:function(m,f){for(var g=this._hash.words,p=g[0],v=g[1],y=g[2],_=g[3],b=g[4],C=g[5],A=g[6],E=g[7],I=0;I<64;I++){if(I<16)h[I]=m[f+I]|0;else{var M=h[I-15],S=(M<<25|M>>>7)^(M<<14|M>>>18)^M>>>3,k=h[I-2],w=(k<<15|k>>>17)^(k<<13|k>>>19)^k>>>10;h[I]=S+h[I-7]+w+h[I-16]}var T=b&C^~b&A,q=p&v^p&y^v&y,K=(p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22),U=(b<<26|b>>>6)^(b<<21|b>>>11)^(b<<7|b>>>25),Y=E+U+T+c[I]+h[I],ie=K+q;E=A,A=C,C=b,b=_+Y|0,_=y,y=v,v=p,p=Y+ie|0}g[0]=g[0]+p|0,g[1]=g[1]+v|0,g[2]=g[2]+y|0,g[3]=g[3]+_|0,g[4]=g[4]+b|0,g[5]=g[5]+C|0,g[6]=g[6]+A|0,g[7]=g[7]+E|0},_doFinalize:function(){var m=this._data,f=m.words,g=this._nDataBytes*8,p=m.sigBytes*8;return f[p>>>5]|=128<<24-p%32,f[(p+64>>>9<<4)+14]=r.floor(g/4294967296),f[(p+64>>>9<<4)+15]=g,m.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var m=s.clone.call(this);return m._hash=this._hash.clone(),m}});o.SHA256=s._createHelper(d),o.HmacSHA256=s._createHmacHelper(d)}(Math),t.SHA256})}(Su)),Su.exports}var Tu={exports:{}},j1;function L_(){return j1||(j1=1,function(e,n){(function(t,r,o){e.exports=r(Ye(),Ou())})($e,function(t){return function(){var r=t,o=r.lib,i=o.WordArray,a=r.algo,s=a.SHA256,l=a.SHA224=s.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=s._doFinalize.call(this);return u.sigBytes-=4,u}});r.SHA224=s._createHelper(l),r.HmacSHA224=s._createHmacHelper(l)}(),t.SHA224})}(Tu)),Tu.exports}var Du={exports:{}},H1;function V1(){return H1||(H1=1,function(e,n){(function(t,r,o){e.exports=r(Ye(),ps())})($e,function(t){return function(){var r=t,o=r.lib,i=o.Hasher,a=r.x64,s=a.Word,l=a.WordArray,u=r.algo;function c(){return s.create.apply(s,arguments)}var h=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],d=[];(function(){for(var f=0;f<80;f++)d[f]=c()})();var m=u.SHA512=i.extend({_doReset:function(){this._hash=new l.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(f,g){for(var p=this._hash.words,v=p[0],y=p[1],_=p[2],b=p[3],C=p[4],A=p[5],E=p[6],I=p[7],M=v.high,S=v.low,k=y.high,w=y.low,T=_.high,q=_.low,K=b.high,U=b.low,Y=C.high,ie=C.low,ee=A.high,P=A.low,O=E.high,R=E.low,D=I.high,L=I.low,V=M,N=S,G=k,j=w,Q=T,Z=q,ae=K,fe=U,H=Y,z=ie,ne=ee,se=P,ue=O,te=R,he=D,_e=L,xe=0;xe<80;xe++){var pe,oe,W=d[xe];if(xe<16)oe=W.high=f[g+xe*2]|0,pe=W.low=f[g+xe*2+1]|0;else{var re=d[xe-15],le=re.high,ce=re.low,de=(le>>>1|ce<<31)^(le>>>8|ce<<24)^le>>>7,Ce=(ce>>>1|le<<31)^(ce>>>8|le<<24)^(ce>>>7|le<<25),Ie=d[xe-2],Me=Ie.high,Ue=Ie.low,Ct=(Me>>>19|Ue<<13)^(Me<<3|Ue>>>29)^Me>>>6,ot=(Ue>>>19|Me<<13)^(Ue<<3|Me>>>29)^(Ue>>>6|Me<<26),ft=d[xe-7],Qe=ft.high,je=ft.low,Ut=d[xe-16],Lt=Ut.high,yn=Ut.low;pe=Ce+je,oe=de+Qe+(pe>>>0<Ce>>>0?1:0),pe=pe+ot,oe=oe+Ct+(pe>>>0<ot>>>0?1:0),pe=pe+yn,oe=oe+Lt+(pe>>>0<yn>>>0?1:0),W.high=oe,W.low=pe}var Cr=H&ne^~H&ue,Gt=z&se^~z&te,Er=V&G^V&Q^G&Q,Wn=N&j^N&Z^j&Z,ht=(V>>>28|N<<4)^(V<<30|N>>>2)^(V<<25|N>>>7),on=(N>>>28|V<<4)^(N<<30|V>>>2)^(N<<25|V>>>7),kr=(H>>>14|z<<18)^(H>>>18|z<<14)^(H<<23|z>>>9),On=(z>>>14|H<<18)^(z>>>18|H<<14)^(z<<23|H>>>9),Qn=h[xe],vn=Qn.high,Ar=Qn.low,St=_e+On,mt=he+kr+(St>>>0<_e>>>0?1:0),St=St+Gt,mt=mt+Cr+(St>>>0<Gt>>>0?1:0),St=St+Ar,mt=mt+vn+(St>>>0<Ar>>>0?1:0),St=St+pe,mt=mt+oe+(St>>>0<pe>>>0?1:0),bn=on+Wn,hr=ht+Er+(bn>>>0<on>>>0?1:0);he=ue,_e=te,ue=ne,te=se,ne=H,se=z,z=fe+St|0,H=ae+mt+(z>>>0<fe>>>0?1:0)|0,ae=Q,fe=Z,Q=G,Z=j,G=V,j=N,N=St+bn|0,V=mt+hr+(N>>>0<St>>>0?1:0)|0}S=v.low=S+N,v.high=M+V+(S>>>0<N>>>0?1:0),w=y.low=w+j,y.high=k+G+(w>>>0<j>>>0?1:0),q=_.low=q+Z,_.high=T+Q+(q>>>0<Z>>>0?1:0),U=b.low=U+fe,b.high=K+ae+(U>>>0<fe>>>0?1:0),ie=C.low=ie+z,C.high=Y+H+(ie>>>0<z>>>0?1:0),P=A.low=P+se,A.high=ee+ne+(P>>>0<se>>>0?1:0),R=E.low=R+te,E.high=O+ue+(R>>>0<te>>>0?1:0),L=I.low=L+_e,I.high=D+he+(L>>>0<_e>>>0?1:0)},_doFinalize:function(){var f=this._data,g=f.words,p=this._nDataBytes*8,v=f.sigBytes*8;g[v>>>5]|=128<<24-v%32,g[(v+128>>>10<<5)+30]=Math.floor(p/4294967296),g[(v+128>>>10<<5)+31]=p,f.sigBytes=g.length*4,this._process();var y=this._hash.toX32();return y},clone:function(){var f=i.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:1024/32});r.SHA512=i._createHelper(m),r.HmacSHA512=i._createHmacHelper(m)}(),t.SHA512})}(Du)),Du.exports}var Ru={exports:{}},z1;function P_(){return z1||(z1=1,function(e,n){(function(t,r,o){e.exports=r(Ye(),ps(),V1())})($e,function(t){return function(){var r=t,o=r.x64,i=o.Word,a=o.WordArray,s=r.algo,l=s.SHA512,u=s.SHA384=l.extend({_doReset:function(){this._hash=new a.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var c=l._doFinalize.call(this);return c.sigBytes-=16,c}});r.SHA384=l._createHelper(u),r.HmacSHA384=l._createHmacHelper(u)}(),t.SHA384})}(Ru)),Ru.exports}var Mu={exports:{}},G1;function q_(){return G1||(G1=1,function(e,n){(function(t,r,o){e.exports=r(Ye(),ps())})($e,function(t){return function(r){var o=t,i=o.lib,a=i.WordArray,s=i.Hasher,l=o.x64,u=l.Word,c=o.algo,h=[],d=[],m=[];(function(){for(var p=1,v=0,y=0;y<24;y++){h[p+5*v]=(y+1)*(y+2)/2%64;var _=v%5,b=(2*p+3*v)%5;p=_,v=b}for(var p=0;p<5;p++)for(var v=0;v<5;v++)d[p+5*v]=v+(2*p+3*v)%5*5;for(var C=1,A=0;A<24;A++){for(var E=0,I=0,M=0;M<7;M++){if(C&1){var S=(1<<M)-1;S<32?I^=1<<S:E^=1<<S-32}C&128?C=C<<1^113:C<<=1}m[A]=u.create(E,I)}})();var f=[];(function(){for(var p=0;p<25;p++)f[p]=u.create()})();var g=c.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var p=this._state=[],v=0;v<25;v++)p[v]=new u.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(p,v){for(var y=this._state,_=this.blockSize/2,b=0;b<_;b++){var C=p[v+2*b],A=p[v+2*b+1];C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,A=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360;var E=y[b];E.high^=A,E.low^=C}for(var I=0;I<24;I++){for(var M=0;M<5;M++){for(var S=0,k=0,w=0;w<5;w++){var E=y[M+5*w];S^=E.high,k^=E.low}var T=f[M];T.high=S,T.low=k}for(var M=0;M<5;M++)for(var q=f[(M+4)%5],K=f[(M+1)%5],U=K.high,Y=K.low,S=q.high^(U<<1|Y>>>31),k=q.low^(Y<<1|U>>>31),w=0;w<5;w++){var E=y[M+5*w];E.high^=S,E.low^=k}for(var ie=1;ie<25;ie++){var S,k,E=y[ie],ee=E.high,P=E.low,O=h[ie];O<32?(S=ee<<O|P>>>32-O,k=P<<O|ee>>>32-O):(S=P<<O-32|ee>>>64-O,k=ee<<O-32|P>>>64-O);var R=f[d[ie]];R.high=S,R.low=k}var D=f[0],L=y[0];D.high=L.high,D.low=L.low;for(var M=0;M<5;M++)for(var w=0;w<5;w++){var ie=M+5*w,E=y[ie],V=f[ie],N=f[(M+1)%5+5*w],G=f[(M+2)%5+5*w];E.high=V.high^~N.high&G.high,E.low=V.low^~N.low&G.low}var E=y[0],j=m[I];E.high^=j.high,E.low^=j.low}},_doFinalize:function(){var p=this._data,v=p.words;this._nDataBytes*8;var y=p.sigBytes*8,_=this.blockSize*32;v[y>>>5]|=1<<24-y%32,v[(r.ceil((y+1)/_)*_>>>5)-1]|=128,p.sigBytes=v.length*4,this._process();for(var b=this._state,C=this.cfg.outputLength/8,A=C/8,E=[],I=0;I<A;I++){var M=b[I],S=M.high,k=M.low;S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,E.push(k),E.push(S)}return new a.init(E,C)},clone:function(){for(var p=s.clone.call(this),v=p._state=this._state.slice(0),y=0;y<25;y++)v[y]=v[y].clone();return p}});o.SHA3=s._createHelper(g),o.HmacSHA3=s._createHmacHelper(g)}(Math),t.SHA3})}(Mu)),Mu.exports}var Fu={exports:{}},K1;function $_(){return K1||(K1=1,function(e,n){(function(t,r){e.exports=r(Ye())})($e,function(t){/** @preserve
|
|
87
87
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
88
88
|
|
|
89
89
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
package/package.json
CHANGED