expedite-components 0.5.3 → 0.5.4

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.
@@ -10740,8 +10740,12 @@ const xn = Et("comConfigurator", () => {
10740
10740
  }), O = me(() => {
10741
10741
  if (!s.value)
10742
10742
  return {};
10743
- const M = (z) => !z || !Array.isArray(z) ? [] : z.filter((F) => F.apiName && F.value !== null && F.value !== void 0 && F.value !== "").map((F) => ({
10744
- fieldAPIName: F.apiName,
10743
+ const M = (z) => !z || !Array.isArray(z) ? [] : z.map((F) => ({
10744
+ field: F.apiName,
10745
+ dataType: F.dataType,
10746
+ picklistValues: F.picklistValues,
10747
+ isEditable: F.editable,
10748
+ defaultValue: F.defaultValue,
10745
10749
  value: F.dataType === "BOOLEAN" ? F.value ? "true" : "false" : F.dataType === "REFERENCE" ? F.referenceRecordId || F.value || "" : F.value || ""
10746
10750
  })), U = {
10747
10751
  itemId: s.value.itemId,
@@ -30,7 +30,7 @@
30
30
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const r=new this(n);return t.forEach(i=>r.set(i)),r}static accessor(n){const r=(this[h0]=this[h0]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=vi(a);r[s]||(N9(i,a),r[s]=!0)}return de.isArray(n)?n.forEach(o):o(n),this}}Ao.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),de.reduceDescriptors(Ao.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(r){this[t]=r}}}),de.freezeMethods(Ao);const Jt=Ao;function as(e,n){const t=this||is,r=n||t,i=Jt.from(r.headers);let o=r.data;return de.forEach(e,function(s){o=s.call(t,o,i.normalize(),n?n.status:void 0)}),i.normalize(),o}function p0(e){return!!(e&&e.__CANCEL__)}function Pr(e,n,t){Le.call(this,e??"canceled",Le.ERR_CANCELED,n,t),this.name="CanceledError"}de.inherits(Pr,Le,{__CANCEL__:!0});function v0(e,n,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?e(t):n(new Le("Request failed with status code "+t.status,[Le.ERR_BAD_REQUEST,Le.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function F9(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function P9(e,n){e=e||10;const t=new Array(e),r=new Array(e);let i=0,o=0,a;return n=n!==void 0?n:1e3,function(u){const f=Date.now(),c=r[o];a||(a=f),t[i]=u,r[i]=f;let v=o,l=0;for(;v!==i;)l+=t[v++],v=v%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),f-a<n)return;const h=c&&f-c;return h?Math.round(l*1e3/h):void 0}}function M9(e,n){let t=0,r=1e3/n,i,o;const a=(f,c=Date.now())=>{t=c,i=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const c=Date.now(),v=c-t;v>=r?a(f,c):(i=f,o||(o=setTimeout(()=>{o=null,a(i)},r-v)))},()=>i&&a(i)]}const ko=(e,n,t=3)=>{let r=0;const i=P9(50,250);return M9(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,u=a-r,f=i(u),c=a<=s;r=a;const v={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:f||void 0,estimated:f&&s&&c?(s-a)/f:void 0,event:o,lengthComputable:s!=null,[n?"download":"upload"]:!0};e(v)},t)},g0=(e,n)=>{const t=e!=null;return[r=>n[0]({lengthComputable:t,total:e,loaded:r}),n[1]]},m0=e=>(...n)=>de.asap(()=>e(...n)),q9=yt.hasStandardBrowserEnv?((e,n)=>t=>(t=new URL(t,yt.origin),e.protocol===t.protocol&&e.host===t.host&&(n||e.port===t.port)))(new URL(yt.origin),yt.navigator&&/(msie|trident)/i.test(yt.navigator.userAgent)):()=>!0,$9=yt.hasStandardBrowserEnv?{write(e,n,t,r,i,o,a){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(n)}`];de.isNumber(t)&&s.push(`expires=${new Date(t).toUTCString()}`),de.isString(r)&&s.push(`path=${r}`),de.isString(i)&&s.push(`domain=${i}`),o===!0&&s.push("secure"),de.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function j9(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function H9(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function y0(e,n,t){let r=!j9(n);return e&&(r||t==!1)?H9(e,n):n}const x0=e=>e instanceof Jt?{...e}:e;function lr(e,n){n=n||{};const t={};function r(f,c,v,l){return de.isPlainObject(f)&&de.isPlainObject(c)?de.merge.call({caseless:l},f,c):de.isPlainObject(c)?de.merge({},c):de.isArray(c)?c.slice():c}function i(f,c,v,l){if(de.isUndefined(c)){if(!de.isUndefined(f))return r(void 0,f,v,l)}else return r(f,c,v,l)}function o(f,c){if(!de.isUndefined(c))return r(void 0,c)}function a(f,c){if(de.isUndefined(c)){if(!de.isUndefined(f))return r(void 0,f)}else return r(void 0,c)}function s(f,c,v){if(v in n)return r(f,c);if(v in e)return r(void 0,f)}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(f,c,v)=>i(x0(f),x0(c),v,!0)};return de.forEach(Object.keys({...e,...n}),function(c){const v=u[c]||i,l=v(e[c],n[c],c);de.isUndefined(l)&&v!==s||(t[c]=l)}),t}const _0=e=>{const n=lr({},e);let{data:t,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=n;if(n.headers=a=Jt.from(a),n.url=c0(y0(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),de.isFormData(t)){if(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(de.isFunction(t.getHeaders)){const u=t.getHeaders(),f=["content-type","content-length"];Object.entries(u).forEach(([c,v])=>{f.includes(c.toLowerCase())&&a.set(c,v)})}}if(yt.hasStandardBrowserEnv&&(r&&de.isFunction(r)&&(r=r(n)),r||r!==!1&&q9(n.url))){const u=i&&o&&$9.read(o);u&&a.set(i,u)}return n},V9=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(t,r){const i=_0(e);let o=i.data;const a=Jt.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:f}=i,c,v,l,h,p;function g(){h&&h(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let d=new XMLHttpRequest;d.open(i.method.toUpperCase(),i.url,!0),d.timeout=i.timeout;function m(){if(!d)return;const _=Jt.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),b={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:_,config:e,request:d};v0(function(A){t(A),g()},function(A){r(A),g()},b),d=null}"onloadend"in d?d.onloadend=m:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(m)},d.onabort=function(){d&&(r(new Le("Request aborted",Le.ECONNABORTED,e,d)),d=null)},d.onerror=function(x){const b=x&&x.message?x.message:"Network Error",S=new Le(b,Le.ERR_NETWORK,e,d);S.event=x||null,r(S),d=null},d.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const b=i.transitional||f0;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),r(new Le(x,b.clarifyTimeoutError?Le.ETIMEDOUT:Le.ECONNABORTED,e,d)),d=null},o===void 0&&a.setContentType(null),"setRequestHeader"in d&&de.forEach(a.toJSON(),function(x,b){d.setRequestHeader(b,x)}),de.isUndefined(i.withCredentials)||(d.withCredentials=!!i.withCredentials),s&&s!=="json"&&(d.responseType=i.responseType),f&&([l,p]=ko(f,!0),d.addEventListener("progress",l)),u&&d.upload&&([v,h]=ko(u),d.upload.addEventListener("progress",v),d.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(c=_=>{d&&(r(!_||_.type?new Pr(null,e,d):_),d.abort(),d=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const y=F9(i.url);if(y&&yt.protocols.indexOf(y)===-1){r(new Le("Unsupported protocol "+y+":",Le.ERR_BAD_REQUEST,e));return}d.send(o||null)})},U9=(e,n)=>{const{length:t}=e=e?e.filter(Boolean):[];if(n||t){let r=new AbortController,i;const o=function(f){if(!i){i=!0,s();const c=f instanceof Error?f:this.reason;r.abort(c instanceof Le?c:new Pr(c instanceof Error?c.message:c))}};let a=n&&setTimeout(()=>{a=null,o(new Le(`timeout ${n} of ms exceeded`,Le.ETIMEDOUT))},n);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>de.asap(s),u}},z9=function*(e,n){let t=e.byteLength;if(!n||t<n){yield e;return}let r=0,i;for(;r<t;)i=r+n,yield e.slice(r,i),r=i},K9=async function*(e,n){for await(const t of X9(e))yield*z9(t,n)},X9=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:t,value:r}=await n.read();if(t)break;yield r}}finally{await n.cancel()}},b0=(e,n,t,r)=>{const i=K9(e,n);let o=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:f,value:c}=await i.next();if(f){s(),u.close();return}let v=c.byteLength;if(t){let l=o+=v;t(l)}u.enqueue(new Uint8Array(c))}catch(f){throw s(f),f}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},C0=64*1024,{isFunction:Oo}=de,W9=(({Request:e,Response:n})=>({Request:e,Response:n}))(de.global),{ReadableStream:w0,TextEncoder:E0}=de.global,A0=(e,...n)=>{try{return!!e(...n)}catch{return!1}},G9=e=>{e=de.merge.call({skipUndefined:!0},W9,e);const{fetch:n,Request:t,Response:r}=e,i=n?Oo(n):typeof fetch=="function",o=Oo(t),a=Oo(r);if(!i)return!1;const s=i&&Oo(w0),u=i&&(typeof E0=="function"?(p=>g=>p.encode(g))(new E0):async p=>new Uint8Array(await new t(p).arrayBuffer())),f=o&&s&&A0(()=>{let p=!1;const g=new t(yt.origin,{body:new w0,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!g}),c=a&&s&&A0(()=>de.isReadableStream(new r("").body)),v={stream:c&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!v[p]&&(v[p]=(g,d)=>{let m=g&&g[p];if(m)return m.call(g);throw new Le(`Response type '${p}' is not supported`,Le.ERR_NOT_SUPPORT,d)})});const l=async p=>{if(p==null)return 0;if(de.isBlob(p))return p.size;if(de.isSpecCompliantForm(p))return(await new t(yt.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(de.isArrayBufferView(p)||de.isArrayBuffer(p))return p.byteLength;if(de.isURLSearchParams(p)&&(p=p+""),de.isString(p))return(await u(p)).byteLength},h=async(p,g)=>{const d=de.toFiniteNumber(p.getContentLength());return d??l(g)};return async p=>{let{url:g,method:d,data:m,signal:y,cancelToken:_,timeout:x,onDownloadProgress:b,onUploadProgress:S,responseType:A,headers:I,withCredentials:B="same-origin",fetchOptions:O}=_0(p),E=n||fetch;A=A?(A+"").toLowerCase():"text";let k=U9([y,_&&_.toAbortSignal()],x),R=null;const N=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let q;try{if(S&&f&&d!=="get"&&d!=="head"&&(q=await h(I,m))!==0){let w=new t(g,{method:"POST",body:m,duplex:"half"}),D;if(de.isFormData(m)&&(D=w.headers.get("content-type"))&&I.setContentType(D),w.body){const[L,$]=g0(q,ko(m0(S)));m=b0(w.body,C0,L,$)}}de.isString(B)||(B=B?"include":"omit");const G=o&&"credentials"in t.prototype,Y={...O,signal:k,method:d.toUpperCase(),headers:I.normalize().toJSON(),body:m,duplex:"half",credentials:G?B:void 0};R=o&&new t(g,Y);let ne=await(o?E(R,O):E(g,Y));const Q=c&&(A==="stream"||A==="response");if(c&&(b||Q&&N)){const w={};["status","statusText","headers"].forEach(W=>{w[W]=ne[W]});const D=de.toFiniteNumber(ne.headers.get("content-length")),[L,$]=b&&g0(D,ko(m0(b),!0))||[];ne=new r(b0(ne.body,C0,L,()=>{$&&$(),N&&N()}),w)}A=A||"text";let P=await v[de.findKey(v,A)||"text"](ne,p);return!Q&&N&&N(),await new Promise((w,D)=>{v0(w,D,{data:P,headers:Jt.from(ne.headers),status:ne.status,statusText:ne.statusText,config:p,request:R})})}catch(G){throw N&&N(),G&&G.name==="TypeError"&&/Load failed|fetch/i.test(G.message)?Object.assign(new Le("Network Error",Le.ERR_NETWORK,p,R),{cause:G.cause||G}):Le.from(G,G&&G.code,p,R)}}},Q9=new Map,k0=e=>{let n=e&&e.env||{};const{fetch:t,Request:r,Response:i}=n,o=[r,i,t];let a=o.length,s=a,u,f,c=Q9;for(;s--;)u=o[s],f=c.get(u),f===void 0&&c.set(u,f=s?new Map:G9(n)),c=f;return f};k0();const ss={http:y9,xhr:V9,fetch:{get:k0}};de.forEach(ss,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const O0=e=>`- ${e}`,Z9=e=>de.isFunction(e)||e===null||e===!1;function J9(e,n){e=de.isArray(e)?e:[e];const{length:t}=e;let r,i;const o={};for(let a=0;a<t;a++){r=e[a];let s;if(i=r,!Z9(r)&&(i=ss[(s=String(r)).toLowerCase()],i===void 0))throw new Le(`Unknown adapter '${s}'`);if(i&&(de.isFunction(i)||(i=i.get(n))))break;o[s||"#"+a]=i}if(!i){const a=Object.entries(o).map(([u,f])=>`adapter ${u} `+(f===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
31
31
  `+a.map(O0).join(`
32
32
  `):" "+O0(a[0]):"as no adapter specified";throw new Le("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i}const S0={getAdapter:J9,adapters:ss};function ls(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pr(null,e)}function I0(e){return ls(e),e.headers=Jt.from(e.headers),e.data=as.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),S0.getAdapter(e.adapter||is.adapter,e)(e).then(function(r){return ls(e),r.data=as.call(e,e.transformResponse,r),r.headers=Jt.from(r.headers),r},function(r){return p0(r)||(ls(e),r&&r.response&&(r.response.data=as.call(e,e.transformResponse,r.response),r.response.headers=Jt.from(r.response.headers))),Promise.reject(r)})}const T0="1.13.2",So={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{So[e]=function(r){return typeof r===e||"a"+(n<1?"n ":" ")+e}});const B0={};So.transitional=function(n,t,r){function i(o,a){return"[Axios v"+T0+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(n===!1)throw new Le(i(a," has been removed"+(t?" in "+t:"")),Le.ERR_DEPRECATED);return t&&!B0[a]&&(B0[a]=!0,console.warn(i(a," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(o,a,s):!0}},So.spelling=function(n){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${n}`),!0)};function Y9(e,n,t){if(typeof e!="object")throw new Le("options must be an object",Le.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=n[o];if(a){const s=e[o],u=s===void 0||a(s,o,e);if(u!==!0)throw new Le("option "+o+" must be "+u,Le.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Le("Unknown option "+o,Le.ERR_BAD_OPTION)}}const Io={assertOptions:Y9,validators:So},fn=Io.validators;class To{constructor(n){this.defaults=n||{},this.interceptors={request:new u0,response:new u0}}async request(n,t){try{return await this._request(n,t)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
33
- `+o):r.stack=o}catch{}}throw r}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=lr(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;r!==void 0&&Io.assertOptions(r,{silentJSONParsing:fn.transitional(fn.boolean),forcedJSONParsing:fn.transitional(fn.boolean),clarifyTimeoutError:fn.transitional(fn.boolean)},!1),i!=null&&(de.isFunction(i)?t.paramsSerializer={serialize:i}:Io.assertOptions(i,{encode:fn.function,serialize:fn.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Io.assertOptions(t,{baseUrl:fn.spelling("baseURL"),withXsrfToken:fn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&de.merge(o.common,o[t.method]);o&&de.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),t.headers=Jt.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(t)===!1||(u=u&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const f=[];this.interceptors.response.forEach(function(g){f.push(g.fulfilled,g.rejected)});let c,v=0,l;if(!u){const p=[I0.bind(this),void 0];for(p.unshift(...s),p.push(...f),l=p.length,c=Promise.resolve(t);v<l;)c=c.then(p[v++],p[v++]);return c}l=s.length;let h=t;for(;v<l;){const p=s[v++],g=s[v++];try{h=p(h)}catch(d){g.call(this,d);break}}try{c=I0.call(this,h)}catch(p){return Promise.reject(p)}for(v=0,l=f.length;v<l;)c=c.then(f[v++],f[v++]);return c}getUri(n){n=lr(this.defaults,n);const t=y0(n.baseURL,n.url,n.allowAbsoluteUrls);return c0(t,n.params,n.paramsSerializer)}}de.forEach(["delete","get","head","options"],function(n){To.prototype[n]=function(t,r){return this.request(lr(r||{},{method:n,url:t,data:(r||{}).data}))}}),de.forEach(["post","put","patch"],function(n){function t(r){return function(o,a,s){return this.request(lr(s||{},{method:n,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}To.prototype[n]=t(),To.prototype[n+"Form"]=t(!0)});const Bo=To;class cs{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(o){t=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},n(function(o,a,s){r.reason||(r.reason=new Pr(o,a,s),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new cs(function(i){n=i}),cancel:n}}}const e4=cs;function t4(e){return function(t){return e.apply(null,t)}}function n4(e){return de.isObject(e)&&e.isAxiosError===!0}const us={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(us).forEach(([e,n])=>{us[n]=e});const r4=us;function D0(e){const n=new Bo(e),t=Wu(Bo.prototype.request,n);return de.extend(t,Bo.prototype,n,{allOwnKeys:!0}),de.extend(t,n,null,{allOwnKeys:!0}),t.create=function(i){return D0(lr(e,i))},t}const Ge=D0(is);Ge.Axios=Bo,Ge.CanceledError=Pr,Ge.CancelToken=e4,Ge.isCancel=p0,Ge.VERSION=T0,Ge.toFormData=wo,Ge.AxiosError=Le,Ge.Cancel=Ge.CanceledError,Ge.all=function(n){return Promise.all(n)},Ge.spread=t4,Ge.isAxiosError=n4,Ge.mergeConfig=lr,Ge.AxiosHeaders=Jt,Ge.formToJSON=e=>d0(de.isHTMLForm(e)?new FormData(e):e),Ge.getAdapter=S0.getAdapter,Ge.HttpStatusCode=r4,Ge.default=Ge;class i4{constructor(n,t,r,i){this.awsURL="https://ec-apigw.blink.expedite1.com",this.headers={"x-api-key":n,"X-Salesforce-Org-Type":t,"X-Salesforce-Org-Id":r,"X-Salesforce-User-Id":i,"Content-Type":"application/json"}}}const R0=wt("comShare",()=>{const e=te(""),n=te(""),t=te(""),r=te(""),i=te(""),o=te(""),a=te(""),s=te("Single"),u=me(()=>s.value==="Single");async function f(c){e.value=c.orgType||"Production",n.value=c.orgId||"",t.value=c.userId||"",r.value=c.accountId||"",i.value=c.opportunityId||"",a.value=c.userLocale||"en_US",s.value=c.pricingSchema||"Single"}return{orgType:e,orgId:n,userId:t,accountId:r,opportunityId:i,userLocale:a,pricingSchema:s,quoteId:o,isSinglePricingSchema:u,setSetupData:f}});function o4(e){return e.offerData.pricingTypes.forEach(n=>{n.appliedOnField==="Catalog Price"?(e.catalogPrice=n,e.salesPrice=n.offerPrice,e.price=n.offerPrice):n.appliedOnField==="MRC"?(e.mrcPrice=n,e.mrc=n.offerPrice):n.appliedOnField==="YRC"&&(e.yrcPrice=n,e.yrc=n.offerPrice)}),e}function a4(e){const n=t=>Math.min(...t.options.map(r=>r.relationshipInfo.primarySortOrder));return e.forEach(t=>{t.itemTypes.forEach(r=>{r.options.sort((i,o)=>i.relationshipInfo.primarySortOrder-o.relationshipInfo.primarySortOrder||i.itemName.localeCompare(o.itemName))}),t.itemTypes.sort((r,i)=>n(r)-n(i)||r.itemTypeName.localeCompare(i.itemTypeName))}),e.sort((t,r)=>{const i=Math.min(...t.itemTypes.map(n)),o=Math.min(...r.itemTypes.map(n));return i-o||t.category.localeCompare(r.category)}),e}const s4=(e,n)=>{const t=(r,i)=>typeof i=="function"?void 0:i;return JSON.stringify(e,t)===JSON.stringify(n,t)};class l4 extends i4{constructor(n,t,r,i){super(n,t,r,i)}async getAvailableConfiguration(n){return(await Ge.post(`${this.awsURL}/product-pricing/getAvailableConfiguration`,n,{headers:this.headers})).data}async getLineItems({request:n}){const t=await Ge.post(`${this.awsURL}/quoting/getConfiguredLineItems`,n,{headers:this.headers});return console.info("getLineItems:response",t.data),t.data}async maintainQuoteConfiguration({request:n}){const t=await Ge.post(`${this.awsURL}/transactions/maintainConfiguration`,n,{headers:this.headers});return console.info("maintainQuoteConfiguration:response",t.data),t.data}async getProductCrossSells({objectId:n,productItemId:t}){const r=await Ge.get(`${this.awsURL}/pricing/getProductCrossSells?productItemId=${t}&objectId=${n}`,{headers:this.headers});return console.info("getProductCrossSells:response",r.data),r.data}async addLines({request:n}){const t=await Ge.post(`${this.awsURL}/transactions/addLines`,n,{headers:this.headers});return console.info("addLines:response",t.data),t.data}async evaluateConfigurationSelection({request:n}){const t=await Ge.post("https://api-svc.blink.expedite1.com/api/product-pricing/evaluateConfigurationSelection",n,{headers:this.headers});return console.info("evaluateConfigurationSelection:response",t.data),t.data}}const dn=wt("comConfigurator",()=>{const e=te(null),n=Qt(),t=R0(),r=fi(),i=te(null),o=te(null),a=te(null),s=te(null),u=te(null),f=te([]),c=te(null),v=te([]),l=te([]),h=te(null),p=te(new Map),g=te(!1),d=te({init:!1,configuration:!1,lineItem:!1,productOptionsPricing:!1,bestOfferPrice:!1,lineItemAttributes:!1,save:!1}),m=te(!1),y=me(()=>_.value&&!t.isSinglePricingSchema),_=me(()=>{var j;if(!s.value||!((j=s.value.categoryOptions)!=null&&j.length)>0)return!1;let M=!0,U=!0,Z=!0,z=null,F=!1;for(const se of s.value.categoryOptions)for(const fe of se.itemTypes)for(const ce of fe.options)ce.billingPeriod&&(z&&z!==ce.billingPeriod&&(Z=!1),z=ce.billingPeriod,!ce.yrcPrice&&ce.billingPeriod==="Monthly"&&(M=!1),!ce.mrcPrice&&ce.billingPeriod==="Yearly"&&(U=!1),F=!0);return M&&U&&Z&&F}),x=me(()=>!s4(s.value,u.value)),b=me(()=>{var U;const M=((U=s.value)==null?void 0:U.categoryOptions)||[];return M.forEach(Z=>{Z.itemTypes.forEach(z=>{z.selectedOptions=z.options.filter(F=>z.selected.includes(F.itemId)),z.totalPrice=function(){return z.selectedOptions.reduce((F,j)=>F+j.price*j.qty,0)||0},z.oneTimePrice=function(){return z.selectedOptions.filter(F=>!F.billingPeriod).reduce((F,j)=>F+j.price*j.qty,0)||0},z.recurringPrice=function(){return z.selectedOptions.filter(F=>F.billingPeriod).reduce((F,j)=>F+j.price*j.qty,0)||0}}),Z.selectedItemTypes=Z.itemTypes.filter(z=>z.selected.length>0),Z.totalPrice=function(){return Z.itemTypes.reduce((z,F)=>z+F.totalPrice(),0)},Z.oneTimePrice=function(){return Z.itemTypes.reduce((z,F)=>z+F.oneTimePrice(),0)},Z.recurringPrice=function(){return Z.itemTypes.reduce((z,F)=>z+F.recurringPrice(),0)}}),M.filter(Z=>Z.itemTypes.filter(z=>z.selected.length>0).length>0)}),S=me(()=>b.value.reduce((M,U)=>M+U.totalPrice(),0)),A=me(()=>{if(!s.value)return{basePrice:0,addOns:0,oneTimePrice:0,recurringPrice:0,total:0};const M=b.value.reduce((z,F)=>z+F.totalPrice(),0);let U=b.value.reduce((z,F)=>z+F.oneTimePrice(),0),Z=b.value.reduce((z,F)=>z+F.recurringPrice(),0);return s.value.billingPeriod?Z=(Z+s.value.price)*s.value.qty:U=(U+s.value.price)*s.value.qty,{basePrice:s.value.price,addOns:M,oneTimePrice:U,recurringPrice:Z,total:s.value.price*s.value.qty+M*s.value.qty+U+Z}}),I=me(()=>{var U,Z,z,F;const M=new Map;return(U=c.value)!=null&&U.productLineItem&&M.set((Z=c.value)==null?void 0:Z.productLineItem.XX_ORD1__Item__c,(z=c.value)==null?void 0:z.productLineItem),(F=c.value)==null||F.options.forEach(j=>{M.set(j.XX_ORD1__Item__c,j)}),M}),B=me(()=>{var U;const M=new Map;return s.value&&((U=s.value.categoryOptions)==null?void 0:U.length)>0&&s.value.categoryOptions.forEach(Z=>{Z.itemTypes.forEach(z=>{z.options.forEach(F=>{M.set(F.publishKey,F)})})}),M}),O=me(()=>{if(!s.value)return{};const M=z=>!z||!Array.isArray(z)?[]:z.filter(F=>F.apiName&&F.value!==null&&F.value!==void 0&&F.value!=="").map(F=>({fieldAPIName:F.apiName,value:F.dataType==="BOOLEAN"?F.value?"true":"false":F.dataType==="REFERENCE"?F.referenceRecordId||F.value||"":F.value||""})),U={itemId:s.value.itemId,qliId:s.value.qliId||null,name:s.value.itemName,qty:s.value.qty||1,salesPrice:s.value.price||0,mrc:s.value.mrc||null,yrc:s.value.yrc||null,attributes:M(s.value.attributes)},Z=[];return s.value.categoryOptions.forEach(z=>{z.itemTypes.forEach(F=>{F.options.forEach(j=>{F.selected.includes(j.itemId)&&Z.push({itemId:j.itemId,qliId:j.qliId||null,name:j.itemName,qty:j.qty||1,salesPrice:j.price||0,mrc:j.mrc||null,yrc:j.yrc||null,attributes:M(j.attributes)})})})}),{[s.value.itemId]:{product:U,options:Z}}}),E=(M,U)=>{if(!M||!Array.isArray(M))return[];const Z=new Map;return U.forEach(z=>{Z.set(z.fieldAPIName,z.value)}),M.map(z=>(z.value=Z.get(z.fieldAPIName)||null,z))};function k(M,U){console.log("updateCurrentConfiguration:newConfiguration",JSON.stringify(M)),console.log("updateCurrentConfiguration:suggestedConfigurations",JSON.stringify(U)),U&&(l.value=U.filter(z=>z.product.itemId!==M.product.itemId));const Z=new Map;M.options.forEach(z=>{Z.set(z.itemId,z)}),s.value.itemName=M.product.name,s.value.qty=M.product.qty,s.value.price=M.product.salesPrice,s.value.attributes=E(s.value.attributes,M.product.attributes),s.value.categoryOptions.forEach(z=>{z.itemTypes.forEach(F=>{F.selected=[],F.options.forEach(j=>{Z.has(j.itemId)&&(j.itemName=Z.get(j.itemId).name,j.qty=Z.get(j.itemId).qty,j.price=Z.get(j.itemId).salesPrice,j.qliId=Z.get(j.itemId).qliId,j.attributes=E(j.attributes,Z.get(j.itemId).attributes),F.selected.push(j.itemId))})})}),s.value={...s.value}}function R(){return{get getConfig(){return O.value},setConfig:k}}function N(M){s.value.qliId&&(s.value.qliBillingPeriod==="Monthly"&&!M?s.value.price=s.value.salesPrice||s.value.mrc:s.value.qliBillingPeriod==="Yearly"&&M&&(s.value.price=s.value.salesPrice)),s.value.categoryOptions.forEach(U=>{U.itemTypes.forEach(Z=>{Z.options.forEach(z=>{z.billingPeriod&&(z.price=(M?z.yrcPrice.offerPrice:z.mrcPrice.offerPrice)||z.price,z.qliId&&(z.qliBillingPeriod==="Monthly"&&!M?z.price=z.salesPrice||z.mrc:z.qliBillingPeriod==="Yearly"&&M&&(z.price=z.salesPrice)))})})})}function q(){s.value=null,u.value=null,f.value=[],a.value=null,c.value=null,h.value=null,p.value=new Map,g.value=!1,d.value.configuration=!1,d.value.lineItem=!1,d.value.productOptionsPricing=!1,d.value.bestOfferPrice=!1,d.value.lineItemAttributes=!1,d.value.save=!1}function G(M,U,Z,z){e.value=new l4(M,U,Z,z)}async function Y(M,U,Z){d.value.init=!0,console.time("CONFIGURATOR INIT CONFIGURATOR"),q(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","1"),o.value=M,a.value=U,i.value=Z||t.quoteId;const z=await ne();console.timeLog("CONFIGURATOR INIT CONFIGURATOR","2"),s.value=Q(z),a.value?(await w(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","3"),P(s.value),s.value.categoryOptions.forEach(F=>{F.itemTypes.forEach(j=>{j.options.forEach(se=>{P(se),(I.value.has(se.itemId)||se.relationshipInfo.relationship==="Kit")&&j.selected.push(se.itemId)})})}),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","4")):w(),u.value=JSON.parse(JSON.stringify(s.value)),console.timeEnd("CONFIGURATOR INIT CONFIGURATOR"),d.value.init=!1}async function ne(){try{const M={accountId:t.accountId,objectId:i.value,itemId:o.value,configScope:"BASIC",fields:[],pricePreference:"Lowest Price"},U=await e.value.getAvailableConfiguration(M);console.info("getAvailableConfiguration:result",U);const Z=U.data.productConfiguration;return Z.categoryOptions=a4(Z.categoryOptions),Z}catch(M){return console.info("error",M.message),!1}}function Q(M){p.value.set(a.value,M.attributes),f.value=M.configRules;const U=new Set;return f.value.forEach(Z=>{const z=JSON.parse(Z.ruleJson);z.optionSelected.forEach(F=>{U.add(F)}),z.affectedOptions.forEach(F=>{U.add(F)})}),console.info("rulesByPublishKey",U),P(M),M.categoryOptions.forEach(Z=>{Z.key=Z.category.toLowerCase().replace(/\s+/g,"-").replace(/[&]/g,""),Z.itemTypes.forEach(z=>{z.selected=[],z.numberOfColumns||(z.numberOfColumns=1),z.numberOfColumns>1&&(z.lightboxAttributes=!0),z.maxNumber||(z.maxNumber=100),z.minNumber||(z.minNumber=0),z.maxQuantity||(z.maxQuantity=1e4),z.minQuantity||(z.minQuantity=1),z.maxNumber===1?(z.isRadio=!0,z.minMessage="Please select 1 option",z.maxMessage="",z.isKit=z.options.some(F=>F.relationshipInfo.relationship==="Kit")):(z.minMessage=`Minimum of ${z.minNumber} selection${z.minNumber!==1?"s":""} required`,z.maxMessage=`Maximum of ${z.maxNumber} selection${z.maxNumber!==1?"s":""} allowed`),z.options.forEach(F=>{Z.showImage=Z.showImage||!!F.defaultImageURL,F.showAttributesModal=!1,F.calculateRules=U.has("option."+F.publishKey),console.info("option.calculateRules",F.calculateRules),F.qty=z.minQuantity||1,F.getTags=()=>(F.attributes=F.attributes||[],F.attributes.filter(j=>j.value!==null&&j.value!=="").map(j=>({label:j.label,value:j.value}))),Object.defineProperty(F,"isDisabled",{get:function(){return F.relationshipInfo.relationship==="Kit"||(z.isRadio?z.isKit:!z.selected.includes(F.itemId)&&z.maxNumber===z.selected.length)}}),P(F)})})}),M}function P(M){M.isAttributes=M.attributes&&M.attributes.length>0;const U=M.catalogItem;if(I.value.has(M.itemId)){const Z=I.value.get(M.itemId);M.qliId=Z.Id,M.qty=Z.XX_ORD1__QTY__c,M.itemName=Z.XX_ORD1__Line_Description__c,M.billingPeriod=Z.XX_ORD1__Billing_Period__c,M.price=Z.XX_ORD1__Sales_Price__c,M.billingPeriod?M.price=Z.XX_ORD1__Sales_Price__c||Z.XX_ORD1__MRC__c:M.price=Z.XX_ORD1__NRC__c||Z.XX_ORD1__Sales_Price__c,M.salesPrice=Z.XX_ORD1__Sales_Price__c,M.nrc=Z.XX_ORD1__NRC__c,M.mrc=Z.XX_ORD1__MRC__c,M.qliBillingPeriod=Z.XX_ORD1__Billing_Period__c,p.value.set(M.qliId,M.attributes)}else M.itemName=U.XX_ORD1__Line_Description__c||M.itemName,M.price=U.XX_ORD1__Negotiated_Price__c||U.XX_ORD1__NRC_for_New__c,M.nrcPrice=U.XX_ORD1__NRC_for_New__c,M.qty=M.qty||1,o4(M)}async function w(){d.value.lineItem=!0,console.info("getLineItems",i.value,a.value);try{const M={objectId:i.value,filters:{},additionalFields:["Name","XX_ORD1__Line_Description__c","XX_ORD1__SYS_Configuration_Status2__c"],primarySort:{field:"CreatedDate",direction:"DESC"},productPage:{limit:200,offset:0,productLineItemId:a.value}},U=await e.value.getLineItems({request:JSON.stringify(M)});return(U.data.products||[]).forEach(z=>{const F=z.productLineItem;F.Id===a.value?c.value=z:v.value.push(F)}),console.info("lineItem.value",c.value),console.info("configurableLineItems.value",v.value),d.value.lineItem=!1,U}catch(M){return console.info("error",M.message),d.value.lineItem=!1,!1}}async function D(M){console.info("getRecords");try{const U=await window.productManagerController.getRecords({request:JSON.stringify(M)});return console.info("getRecords:result",U),JSON.parse(U.data)}catch(U){return console.info("error",U.message),!1}}async function L(){g.value=!0,d.value.save=!0,console.info("maintainQuoteConfiguration");const M=[],U=[];s.value.categoryOptions.forEach(F=>{F.itemTypes.forEach(j=>{j.options.forEach(se=>{j.selected.includes(se.itemId)?M.push($(se)):se.qliId&&U.push(se.qliId)})})});const Z={objectId:i.value,eCatalogId:t.eCatalogId,isGenesisAI:!0,blinkUser:!1,optionsToRemove:U,grandFatheredOptionsToRemove:[],productLineItem:{...$(s.value),optionLineItems:M}};console.info("maintainQuoteConfiguration:request",Z);const z=await e.value.maintainQuoteConfiguration({request:JSON.stringify(Z)});if(console.info("maintainQuoteConfiguration:result",z),z!=null&&z.error){const F={title:"Unable to Save Configuration",description:z.error,button:{label:"Back to Configuration",action:()=>{g.value=!1}},cancel:{label:"Quote List",action:()=>{r.push("/quote-item?id="+i.value)}}};n.errorPopup=F}else if(u.value=JSON.parse(JSON.stringify(s.value)),console.info("maintainQuoteConfiguration:result",z),d.value.save=!1,!a.value)return s.value.qliId=z.data.productLineItem.lineItemId,a.value=z.data.productLineItem.lineItemId,z.data.productLineItem.lineItemId;d.value.save=!1}function $(M){const U={};M.isAttributes&&M.attributes.forEach(z=>{!z.apiName.includes(".")&&z.value!==null&&z.value!==void 0&&(z.dataType==="BOOLEAN"?U[z.apiName]=z.value?"true":"false":z.dataType==="REFERENCE"?U[z.apiName]=z.referenceRecordId:U[z.apiName]=z.value)});const Z={attributes:U,itemId:M.itemId,lineItemId:M.qliId,lineDescription:M.itemName,qty:M.qty,billingPeriod:M.billingPeriod,...M.offer};return M.billingPeriod&&_.value&&!t.isSinglePricingSchema&&(Z.billingPeriod=m.value?"Yearly":"Monthly"),!t.isSinglePricingSchema&&!M.billingPeriod?Z.nrcPrice=M.price:(Z.applyOnField="Catalog Price",Z.salesPrice=M.price,Z.nrcPrice=M.nrcPrice),Z}async function W(){const M={objectId:t.accountId,productItemId:o.value};try{let U=await e.value.getProductCrossSells(M);const{crossSells:Z,offerResult:z}=U.data;if(Z.length===0)return[];const F=new Map;return z.forEach(j=>{F.set(j.eCatalogItemId,{...j,...j.pricingTypes[0]})}),Z.forEach(j=>{j.loading=!1,j.Name=j.XX_ORD1__Line_Description__c||j.XX_ORD1__Item__r.Name,j.Description=j.XX_ORD1__Item__r.XX_ORD1__Product_Description__c,F.has(j.Id)?(j.Price=F.get(j.Id).offerPrice,j.priceFormatted=F.get(j.Id).formattedOfferPrice,j.offer={offerDiscount:F.get(j.Id).offerDiscount,offerId:F.get(j.Id).offerId,offerType:F.get(j.Id).offerType}):(j.Price=j.XX_ORD1__List_Price2__c,j.priceFormatted=j.XX_ORD1__List_Price2__c,j.offer={offerDiscount:0,offerId:null,offerType:null})}),Z}catch(U){return console.info("error",U.message),!1}}const H=M=>!M||!Array.isArray(M)?[]:M.filter(U=>U.apiName&&U.value!==null&&U.value!==void 0&&U.value!=="").map(U=>({attrName:U.apiName,attrValue:U.dataType==="BOOLEAN"?U.value:U.value||"",dataType:U.dataType}));async function X(M,U){const Z={product:{publishKey:s.value.publishKey,attributes:H(s.value.attributes),lineDescription:s.value.itemName,meta:{XX_ORD1__Sales_Price__c:s.value.price,XX_ORD1__MRC__c:s.value.mrc,XX_ORD1__NRC__c:s.value.nrc,XX_ORD1__YRC__c:s.value.yrc,quantity:s.value.qty}},options:[]};s.value.categoryOptions.forEach(j=>{j.itemTypes.forEach(se=>{se.options.forEach(fe=>{se.selected.includes(fe.itemId)&&Z.options.push({publishKey:fe.publishKey,attributes:H(fe.attributes),lineDescription:fe.itemName,meta:{XX_ORD1__Sales_Price__c:fe.price,XX_ORD1__MRC__c:fe.mrc,XX_ORD1__NRC__c:fe.nrc,XX_ORD1__YRC__c:fe.yrc,quantity:fe.qty}})})})}),console.info("evaluateConfigSelection:currentConfig.options",Z.options);const z={itemId:o.value,currentConfig:Z,selected:M?{publishKey:M==null?void 0:M.publishKey,attributes:H(M.attributes),lineDescription:M.itemName}:{},unselected:U?{publishKey:U==null?void 0:U.publishKey,attributes:H(U.attributes),lineDescription:U.itemName}:{}};return await e.value.evaluateConfigurationSelection({request:JSON.stringify(z)})}async function ee(M){const U={objectId:i.value,lstLIRequest:[{eCatalogItemId:M.Id,quantity:1,offerApplicable:M.offer}]};try{const Z=await e.value.addLines({request:JSON.stringify(U)});console.info("addLines:result",Z)}catch(Z){return console.info("error",Z.message),!1}}return{itemId:o,configuration:s,_configurationCopy:u,lineItem:c,savedScreen:g,loading:d,summary:b,addOns:S,summaryPrices:A,optionByItemId:I,attributesByQLIId:p,optionByPublishKey:B,showYearlyPricing:m,isYearlyPricingExist:_,isChangedConfiguration:x,isRecurringPricingSchema:y,configurableLineItems:v,suggestedConfigurations:l,initializeController:G,exposeProperties:R,updateCurrentConfiguration:k,changePricingScheme:N,addLines:ee,resetConfigurator:q,getRecords:D,getProductCrossSells:W,initConfigurator:Y,maintainQuoteConfiguration:L,evaluateConfigSelection:X}}),c4={class:"ect-p-4 ect-flex ect-gap-2 ect-items-center ect-justify-between ect-border-b ect-border-gray-200"},u4={class:"ect-flex ect-items-center ect-gap-3"},f4={class:"ect-text-xl ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},d4={key:0,class:"ect-flex ect-gap-1.5 ect-items-center"},h4=C("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Saving configuration...",-1),p4={key:1,class:"ect-flex ect-gap-1.5 ect-items-center"},v4=C("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Configuration Saved Successfully",-1),g4={key:1,class:"ect-flex ect-flex-col ect-gap-4 ect-flex-1 ect-overflow-y-auto ect-mb-16"},m4=C("h3",{class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed ect-p-4 ect-pb-0"},"You may consider these products",-1),y4={class:"ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-pt-0 ect-overflow-y-auto"},x4=["data-test-id"],_4={class:"ect-flex-1 ect-flex ect-flex-col ect-gap-2"},b4={class:"ect-text-sm ect-font-semibold ect-text-gray-800 ect-leading-tight"},C4={class:"ect-text-sm ect-font-medium ect-text-gray-600 ect-leading-relaxed ect-line-clamp-2"},w4={class:"ect-flex ect-flex-row ect-justify-between ect-items-center"},E4={class:"ect-text-sm ect-font-semibold ect-text-gray-800"},A4={key:2,class:"ect-flex ect-flex-col ect-gap-4 ect-m-4 ect-flex-1 ect-overflow-y-auto"},k4=C("h3",{class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},"What do you want to do next?",-1),O4={class:"ect-flex ect-flex-col ect-gap-4"},S4=["data-test-id","onClick"],I4={class:"ect-flex ect-items-center ect-justify-center"},T4={class:"ect-flex ect-flex-col ect-items-center ect-gap-2 ect-w-full"},B4=["data-test-id"],D4=["data-test-id"],R4={__name:"ConfiguratorRecommend",setup(e){const n=dn();fi();const t=me(()=>n.configuration),r=te(!0),i=te(""),o=te([{icon:"configuration",title:"Back to current Product Configuration",description:"Returns to the active product configuration page.",link:"/item/overview",action:"backToConfiguration"}]),a=te(null),s=te([]),u=async p=>{p.loading=!0,await n.addLines(p),p.disabled=!0,p.loading=!1},f=me(()=>{var p;if(((p=n.suggestedConfigurations)==null?void 0:p.length)>0){const g=n.suggestedConfigurations[0];return{Name:g.product.name,Description:g.product.description,Price:g.product.salesPrice,XX_ORD1__Item__c:g.product.itemId}}return null}),c=p=>{p.action==="backToConfiguration"&&(n.savedScreen=!1)};async function v(){const p=n.configurableLineItems,g=p.filter(m=>m.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration").length;i.value=`(${p.length-g}/${p.length})`;const d=p.find(m=>m.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration"&&m.Id!=n.qliId);return a.value=d?{Name:d.XX_ORD1__Line_Description__c,Description:d.XX_ORD1__Product_Description__c,Price:d.XX_ORD1__Sales_Price__c,XX_ORD1__Item__c:d.XX_ORD1__Item__c,Id:d.Id}:null,p}async function l(){n.resetConfigurator(),await n.initConfigurator(f.value.XX_ORD1__Item__c,null),n.updateCurrentConfiguration(n.suggestedConfigurations[0],n.suggestedConfigurations)}async function h(){n.resetConfigurator(),n.initConfigurator(a.value.XX_ORD1__Item__c,a.value.Id)}return qn(async()=>{r.value=!0;const p=await v(),g=await n.getProductCrossSells(),d=new Set;p.forEach(m=>{d.add(m.XX_ORD1__Item__c)}),g.forEach(m=>{m.disabled=d.has(m.XX_ORD1__Item__c)}),s.value=g||[],r.value=!1}),(p,g)=>(V(),J(be,null,[C("div",c4,[C("div",u4,[he(We,{icon:"arrow",symbol:"",size:12,onClick:g[0]||(g[0]=d=>Ne(n).savedScreen=!1)}),C("h2",f4,xe(t.value.itemName),1)]),Ne(n).loading.save?(V(),J("div",d4,[he(Hu,{svg:""}),h4])):(V(),J("div",p4,[he(We,{icon:"check",color:"#136E05",size:14,"data-test-id":"item-tabs-before-button-icon"}),v4]))]),r.value?(V(),Ee($u,{key:0,type:"recommendations",rows:4})):s.value.length>0?(V(),J("div",g4,[m4,C("div",y4,[(V(!0),J(be,null,Me(s.value,(d,m)=>(V(),J("div",{key:d.Id||m,class:"ect-bg-white ect-border ect-border-gray-300 ect-rounded-md ect-p-3 ect-flex ect-flex-col","data-test-id":`configurator-recommend-card-${d.Id||m}`},[C("div",_4,[C("h4",b4,xe(d.Name),1),C("p",C4,xe(d.Description),1)]),C("div",w4,[C("div",E4,xe(Ne(Pt)(d.Price)),1),he(Ut,{btype:d.disabled?"secondary":"primary","button-style":d.disabled?"normal":"outlined",size:"medium",class:we({"ect-w-[120px]":d.loading}),loading:d.loading,disabled:d.disabled||d.loading,"data-test-id":`configurator-recommend-button-add-${d.Id||m}`,onClick:y=>u(d)},{default:Ve(()=>[Fe(xe(d.loading?"":d.disabled?"Added to Quote":"Add to Quote"),1)]),_:2},1032,["btype","button-style","class","loading","disabled","data-test-id","onClick"])])],8,x4))),128))])])):(V(),J("div",A4,[k4,C("div",O4,[(V(!0),J(be,null,Me(o.value,(d,m)=>(V(),J("div",{key:d.title||m,class:"ect-bg-white ect-border ect-border-[#DEDEDE] ect-rounded-xl ect-p-4 md:ect-p-5 lg:ect-p-6 ect-flex ect-flex-col ect-items-center ect-gap-4 md:ect-gap-6 lg:ect-gap-8 ect-cursor-pointer ect-transition-all ect-duration-200 hover:ect-shadow-md hover:ect-border-gray-400","data-test-id":`configurator-recommend-redirect-card-${m}`,onClick:y=>c(d)},[C("div",I4,[he(We,{icon:d.icon,size:20,color:"#000000","data-test-id":`configurator-recommend-redirect-icon-${m}`},null,8,["icon","data-test-id"])]),C("div",T4,[C("h4",{class:"ect-text-sm ect-font-semibold ect-text-[#5F5F5F] ect-text-center ect-leading-[1.43]","data-test-id":`configurator-recommend-redirect-title-${m}`},xe(d.title),9,B4),C("p",{class:"ect-text-sm ect-font-normal ect-text-[#828282] ect-text-center ect-leading-[1.71]","data-test-id":`configurator-recommend-redirect-description-${m}`},xe(d.description),9,D4)])],8,S4))),128))])])),f.value?(V(),Ee(ju,{key:3,title:"Configuere next AI suggested product","configuered-product":f.value,"count-configued-product-string":i.value,onConfigureNextProduct:l},null,8,["configuered-product","count-configued-product-string"])):(V(),Ee(ju,{key:4,title:`Configuere next product from your quote ${i.value}`,"configuered-product":a.value,"count-configued-product-string":i.value,onConfigureNextProduct:h},null,8,["title","configuered-product","count-configued-product-string"]))],64))}},L4=["data-test-id"],N4=Re({__name:"AppPill",props:{variant:{type:String,default:"",validator:e=>["success","error",""].includes(e)},dataTestId:{type:String,default:""}},setup(e){return(n,t)=>(V(),J("span",{class:we(["ect-pill",{"ect-pill-success":e.variant==="success","ect-pill-error":e.variant==="error","ect-pill-default":!e.variant}]),"data-test-id":e.dataTestId},[Je(n.$slots,"default",{},void 0,!0)],10,L4))}},[["__scopeId","data-v-c7f05fa0"]]),F4=["data-test-id"],P4=["data-test-id"],M4=["data-test-id","onClick"],q4=["data-test-id"],$4=Re({__name:"AppTabsV2",props:{showTabs:{type:Boolean,default:!0},modelValue:{type:String,default:""},border:{type:Boolean,default:!1},tabs:{type:Array,required:!0,validator:e=>e.every(n=>typeof n=="object"&&n.title&&n.key&&(n.sections===void 0||Array.isArray(n.sections)))},dataTestId:{type:String,required:!0}},emits:["update:modelValue","tab-change"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>{var a;return t.modelValue||((a=t.tabs[0])==null?void 0:a.key)||""}),o=a=>{r("update:modelValue",a),r("tab-change",a)};return(a,s)=>(V(),J("div",{class:"ect-page-tabs","data-test-id":e.dataTestId},[e.showTabs?(V(),J("div",{key:0,class:we(["ect-page-tabs-header",[{"ect-tab-border":e.border}]]),"data-test-id":`${e.dataTestId}-header`},[(V(!0),J(be,null,Me(e.tabs,u=>(V(),J("button",{key:u.key,class:we(["ect-page-tab-button",`ect-page-tab-button${i.value===u.key?"-active":""} ${u.tabClass||""}`]),"data-test-id":`${e.dataTestId}-tab-${u.key}`,onClick:f=>o(u.key)},[Fe(xe(u.title)+" ",1),u.pill!==void 0&&u.pill!==null?(V(),Ee(N4,{key:0,class:"ect-ml-2",variant:u.pillStyle,"data-test-id":`${e.dataTestId}-tab-${u.key}-pill`},{default:Ve(()=>[Fe(xe(u.pill),1)]),_:2},1032,["variant","data-test-id"])):ge("",!0)],10,M4))),128))],10,P4)):ge("",!0),C("div",{class:"ect-page-tab-content","data-test-id":`${e.dataTestId}-content`},null,8,q4)],8,F4))}},[["__scopeId","data-v-f22cb1ed"]]),j4=["data-test-id"],H4=["disabled","data-test-id"],V4=["value","disabled","data-test-id"],U4=["disabled","data-test-id"],Do={__name:"CounterButton",props:{value:{type:Number,required:!0,default:null},min:{type:Number,default:1},max:{type:Number,default:999},empty:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataTestId:{type:String,required:!0}},emits:["update:value","change"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>t.min==null?0:t.min),o=me(()=>t.max==null?999:t.max),a=(x,b,S)=>Math.min(Math.max(x,b),S),s=x=>{if(x==null||x==="")return NaN;const b=Number(x);return Number.isFinite(b)?b:NaN},u=te(null),f=te(t.value??i.value),c=x=>{f.value=a(x,i.value,o.value)};t.value!==null&&c(t.value);const v=me(()=>f.value),l=me(()=>u.value!=null?u.value:String(v.value)),h=me(()=>t.disabled||v.value<=i.value),p=me(()=>t.disabled||v.value>=o.value);function g(x){x!==t.value&&(f.value=x,r("update:value",x),r("change",x))}function d(){if(h.value)return;const x=a(v.value-1,i.value,o.value);u.value=null,g(x)}function m(){if(p.value)return;const x=a(v.value+1,i.value,o.value);u.value=null,g(x)}function y(x){const S=String(x.target.value??"").replace(/\D+/g,"");u.value=S}function _(){const x=s(u.value),b=i.value,S=a(Number.isNaN(x)?b:x,i.value,o.value);u.value=null,g(S)}return(x,b)=>(V(),J("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":e.dataTestId},[C("button",{type:"button",class:we(["ect-h-7 ect-w-7 ect-border ect-border-gray ect-rounded-md ect-flex ect-items-center ect-justify-center ect-text-gray-700 ect-text-sm hover:ect-border-gray-400 ect-transition-colors ect-bg-white",{"ect-opacity-50":h.value,"ect-cursor-not-allowed":h.value}]),disabled:h.value,"data-test-id":`${e.dataTestId}-decrement`,onClick:d}," - ",10,H4),C("input",{type:"text",inputmode:"numeric",pattern:"[0-9]*",value:e.empty?"":l.value,disabled:e.disabled,class:"ect-h-7 ect-w-[48px] ect-px-2 ect-border ect-border-gray ect-rounded-md ect-text-center ect-text-sm ect-font-medium ect-text-gray-900 focus:ect-outline-none focus:ect-border-gray-400 ect-bg-white","data-test-id":`${e.dataTestId}-input`,onInput:y,onBlur:_},null,40,V4),C("button",{type:"button",class:we(["ect-h-7 ect-w-7 ect-border ect-border-gray ect-rounded-md ect-flex ect-items-center ect-justify-center ect-text-gray-700 ect-text-sm hover:ect-border-gray-400 ect-transition-colors ect-bg-white",{"ect-opacity-50":p.value,"ect-cursor-not-allowed":p.value}]),disabled:p.value,"data-test-id":`${e.dataTestId}-increment`,onClick:m}," + ",10,U4)],8,j4))}},z4={class:"ect-flex ect-justify-end ect-items-center ect-gap-2.5 ect-px-6 ect-py-4 ect-bg-white ect-border-t ect-border-gray-300 ect-shadow-[0_-2px_4px_0px_rgba(0,0,0,0.11)]","data-test-id":"configurator-footer"},K4={"data-test-id":"configurator-footer-quantity"},X4={class:"ect-flex ect-justify-end ect-items-center ect-gap-6 ect-px-8 ect-py-0 ect-flex-1","data-test-id":"configurator-footer-prices"},W4=["data-test-id"],G4=["data-test-id"],Q4=["data-test-id"],Z4=["data-test-id"],J4={__name:"ConfiguratorFooter",props:{item:{type:Object,required:!0,default:()=>{}},disabled:{type:Boolean,default:!1},btnText:{type:String,default:"Save"}},emits:["update:qty","continue"],setup(e,{emit:n}){const t=dn(),r=e,i=te(r.item),o=me(()=>{const u=t.summaryPrices,f=[];return t.isRecurringPricingSchema?(f.push({label:"One Time Price",value:u.oneTimePrice,highlight:!1}),f.push({label:t.showYearlyPricing?"Yearly Price":"Monthly Price",value:u.recurringPrice,highlight:!1})):(f.push({label:"Base Price",value:u.basePrice,highlight:!1}),f.push({label:"Add Ons",value:u.addOns,highlight:!1}),f.push({label:"Total Price",value:u.total,highlight:!1})),f}),a=n,s=()=>{r.disabled||a("continue")};return(u,f)=>(V(),J("footer",z4,[C("div",K4,[he(Do,{value:i.value.qty,"onUpdate:value":f[0]||(f[0]=c=>i.value.qty=c),min:1,max:999,disabled:e.disabled,"is-selected":!0,"data-test-id":"configurator-footer-counter-button"},null,8,["value","disabled"])]),C("div",X4,[(V(!0),J(be,null,Me(o.value,(c,v)=>(V(),J(be,{key:v},[C("div",{class:"ect-flex ect-flex-col ect-justify-center","data-test-id":`configurator-footer-price-${v}`},[C("span",{class:"ect-text-xs ect-font-normal ect-text-gray-500 ect-text-left","data-test-id":`configurator-footer-price-label-${v}`},xe(c.label),9,G4),C("span",{class:we(["ect-text-left",c.highlight?"ect-text-lg ect-font-bold ect-text-green-700":"ect-text-sm ect-font-medium ect-text-gray-800 "]),"data-test-id":`configurator-footer-price-value-${v}`},xe(Ne(Pt)(c.value)),11,Q4)],8,W4),v<o.value.length-1?(V(),J("div",{key:0,class:"ect-w-0 ect-h-5 ect-border-l ect-border-gray-400","data-test-id":`configurator-footer-divider-${v}`},null,8,Z4)):ge("",!0)],64))),128))]),he(Ut,{class:"ect-min-w-[100px]",btype:e.disabled?"secondary":"primary",disabled:e.disabled,"button-style":"primary",size:"medium","data-test-id":"configurator-footer-button-continue",onClick:s},{default:Ve(()=>[Fe(xe(e.btnText),1)]),_:1},8,["btype","disabled"])]))}},Y4={class:"ect-w-full ect-bg-white ect-mb-4","data-test-id":"configurator-type-section"},e6={class:"ect-sticky ect-top-0 ect-z-30 ect-bg-white ect-shadow-sm ect-p-3 ect-px-4 ect-border-b ect-border-gray-200 ect-flex ect-justify-between ect-items-center","data-test-id":"configurator-type-header-sticky"},t6={class:"ect-flex ect-flex-col"},n6={class:"ect-font-bold ect-text-text-success ect-leading-tight"},r6=["innerHTML"],i6={key:0,class:"ect-flex ect-items-center ect-gap-2 ect-px-2 ect-py-1","data-test-id":"configurator-type-message"},o6={class:"ect-text-xs ect-font-medium ect-text-gray-600 ect-leading-tight ect-min-w-[190px]"},a6={class:"ect-divide-y ect-divide-gray-100 ect-overflow-y-auto"},s6={__name:"ConfiguratorType",props:{title:{type:String,required:!0},description:{type:String,default:""},message:{type:String,default:""}},setup(e){return(n,t)=>(V(),J("section",Y4,[C("header",e6,[C("div",t6,[C("h2",n6,xe(e.title),1),e.description?(V(),J("p",{key:0,class:"ect-mt-1 ect-text-xs ect-text-gray-500 ect-leading-tight",innerHTML:e.description},null,8,r6)):ge("",!0)]),e.message?(V(),J("div",i6,[he(We,{icon:"info",symbol:"",color:"#198708",size:14,"data-test-id":"configurator-type-message-icon"}),C("span",o6,xe(e.message),1)])):ge("",!0)]),C("div",a6,[Je(n.$slots,"default")])]))}},l6={__name:"ShadowDisplay",props:{content:{type:String,required:!0}},setup(e){const n=e,t=te(null);let r=null;return Ft(()=>{t.value&&!r&&(r=t.value.attachShadow({mode:"open"}),r.innerHTML=n.content)}),Ye(()=>n.content,i=>{r&&(r.innerHTML=i)}),(i,o)=>(V(),J("div",{ref_key:"host",ref:t},null,512))}},c6=["data-test-id"],u6=["data-test-id"],f6=["data-test-id"],d6=[C("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[C("g",{id:"Group"},[C("path",{id:"Vector",d:"M7 1.3125V12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"}),C("path",{id:"Vector_2",d:"M1.3125 7H12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)],h6=["data-test-id"],p6=["data-test-id"],v6=["data-test-id"],g6=["data-test-id"],m6=["data-test-id"],y6=["data-test-id","innerHTML"],hn={__name:"Tag",props:{label:{type:String,default:""},value:{type:String,default:""},addButton:{type:Boolean,default:!1},editButton:{type:Boolean,default:!1},dataTestId:{type:String,default:""}},setup(e){const n=e,t=me(()=>{const r=n.value;if(typeof r!="string")return!1;const i=new DOMParser().parseFromString(r,"text/html");return Array.from(i.body.childNodes).some(o=>o.nodeType===1)});return(r,i)=>e.addButton?(V(),J("div",{key:0,class:"ect-bg-orange-4 ect-flex ect-gap-1 ect-justify-center ect-items-center ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-text-center ect-rounded-md ect-border ect-border-solid ect-border-orange-secondary","data-test-id":e.dataTestId},[C("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-orange-secondary ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-content`},[C("div",{"data-test-id":`${e.dataTestId}-add-icon`},d6,8,f6),Fe(" "+xe(e.label),1)],8,u6)],8,c6)):e.editButton?(V(),J("div",{key:1,class:"ect-bg-white ect-flex ect-gap-1 ect-justify-center ect-items-center ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-text-center ect-rounded-md ect-border ect-border-solid ect-border-success","data-test-id":e.dataTestId},[C("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-success ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-content`},xe(e.label),9,p6)],8,h6)):(V(),J("div",{key:2,class:"ect-bg-white ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-rounded-md ect-border ect-border-solid ect-border-neutral-200","data-test-id":e.dataTestId},[C("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${e.dataTestId}-label`},xe(e.label),9,g6),e.value?(V(),J("span",{key:0,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${e.dataTestId}-separator`}," : ",8,m6)):ge("",!0),t.value?(V(),Ee(l6,{key:1,content:e.value},null,8,["content"])):e.value?(V(),J("span",{key:2,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-neutral-700","data-test-id":`${e.dataTestId}-value`,innerHTML:e.value},null,8,y6)):ge("",!0)],8,v6))}},x6=["data-test-id"],_6=["data-test-id"],b6=["data-test-id"],C6=["type","step","min","data-test-id"],fs=Re({__name:"InputEdit",props:{modelValue:{type:[String,Number],required:!0},type:{type:String,default:"string",validator:e=>["string","number","currency"].includes(e)},tag:{type:String,default:"span"},disabled:{type:Boolean,default:!1},dataTestId:{type:String,required:!0}},emits:["update:modelValue","change"],setup(e,{expose:n,emit:t}){const r=e,i=t,o=te(!1),a=te(!1),s=te(""),u=te(null),f=me(()=>r.type==="currency"?m(r.modelValue):r.type==="number"?y(r.modelValue):r.modelValue),c=me(()=>r.type==="string"?"text":"number"),v=me(()=>r.type==="currency"?"0.01":void 0),l=me(()=>r.type==="currency"?"0":void 0),h=()=>{r.disabled||(r.type==="currency"?s.value=parseFloat(r.modelValue)||"0.00":r.type==="number"?s.value=parseFloat(r.modelValue)||"0":s.value=r.modelValue,o.value=!0,sn(()=>{u.value&&(u.value.focus(),u.value.select())}))},p=()=>{let _=s.value;if(r.type==="number"||r.type==="currency"){const x=parseFloat(s.value);isNaN(x)?_=r.modelValue:_=r.type==="currency"?x.toFixed(2):x.toString()}_!==r.modelValue&&(i("update:modelValue",_),i("change",_)),o.value=!1},g=()=>{s.value=r.modelValue,o.value=!1},d=()=>{o.value&&p()},m=_=>!_||isNaN(_)?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(parseFloat(_)),y=_=>!_||isNaN(_)?"0":new Intl.NumberFormat("en-US").format(parseFloat(_));return Ye(()=>r.modelValue,_=>{o.value||(s.value=_)}),n({startEditing:h,saveChanges:p,cancelEditing:g}),(_,x)=>{const b=l1("click-outside");return V(),J("div",{class:"ect-relative ect-inline-block ect-min-w-[60px] ect-h-[30px]","data-test-id":e.dataTestId,onMouseenter:x[1]||(x[1]=S=>a.value=!0),onMouseleave:x[2]||(x[2]=S=>a.value=!1)},[o.value?ln((V(),J("div",{key:1,class:"ect-w-full ect-h-full","data-test-id":`${e.dataTestId}-input-wrapper`},[ln(C("input",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":x[0]||(x[0]=S=>s.value=S),type:c.value,step:v.value,min:l.value,class:we(["ect-w-full ect-h-full ect-px-3 ect-bg-white ect-border ect-border-green-500 ect-rounded-sm ect-text-gray-700 ect-text-base ect-font-sans ect-outline-none ect-duration-200",_.$attrs.class]),"data-test-id":`${e.dataTestId}-input`,onKeyup:[ir(p,["enter"]),ir(g,["esc"])],onBlur:p},null,42,C6),[[Oh,s.value]])],8,b6)),[[b,d]]):(V(),J("div",{key:0,class:we(["ect-flex ect-items-center ect-gap-2 ect-rounded ect-transition-colors ect-duration-200",{"ect-cursor-pointer":!e.disabled}]),"data-test-id":`${e.dataTestId}-display`,onClick:h},[(V(),Ee(Wi(e.tag),ao(_.$attrs,{class:"ect-m-0 ect-text-inherit","data-test-id":`${e.dataTestId}-text`}),{default:Ve(()=>[Fe(xe(f.value)+" ",1),he(We,{class:we(a.value&&!e.disabled?"ect-visible":"ect-invisible"),icon:"edit",size:"12",color:"#828282","data-test-id":`${e.dataTestId}-edit-icon`},null,8,["class","data-test-id"])]),_:1},16,["data-test-id"]))],10,_6))],40,x6)}}},[["__scopeId","data-v-5cd60070"]]),L0=e=>(jt("data-v-b9675cf1"),e=e(),Ht(),e),w6=["data-test-id","data-publish-key"],E6={key:0,class:"ect-text-xs ect-text-gray-500 ect-text-white ect-font-medium ect-leading-tight ect-absolute ect-top-[-.7rem] ect-left-[-1rem] ect-bg-text-success ect-rounded-xl ect-px-2 ect-py-1"},A6={key:1,class:"ect-flex ect-items-start ect-gap-4 ect-p-3 ect-px-4"},k6={key:0,class:"ect-w-16 ect-h-16 ect-flex ect-items-center ect-justify-center ect-rounded-lg ect-bg-gray-200 ect-flex-shrink-0"},O6=["src","alt"],S6={class:"ect-flex-1 ect-min-w-0"},I6={class:"ect-flex ect-gap-4 ect-items-center ect-justify-between"},T6={class:"ect-flex ect-flex-row ect-gap-3"},B6=L0(()=>C("div",{class:"ect-w-px ect-h-auto ect-bg-gray-200 ect-mx-2"},null,-1)),D6={class:"ect-flex ect-flex-col ect-max-w-[125px]"},R6={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},L6=["innerHTML"],N6={key:0,class:"ect-flex ect-flex-wrap ect-gap-2.5 ect-mt-2"},F6=["data-test-id"],P6=["data-test-id"],M6={key:1,class:"ect-inline-block ect-mb-2"},q6={key:2,class:"ect-flex ect-flex-col ect-gap-3 ect-p-3 ect-h-full ect-justify-between"},$6={class:"ect-flex ect-items-start ect-gap-2"},j6={key:0,class:"ect-w-16 ect-h-16 ect-rounded-lg ect-bg-gray-200 ect-flex-shrink-0 ect-overflow-hidden"},H6=["src","alt"],V6={class:"ect-flex-1 ect-min-w-0"},U6={class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},z6=["innerHTML"],K6={class:"temp-hidden"},X6={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},W6={key:0,class:"ect-flex ect-flex-wrap ect-gap-1.5"},G6=["data-test-id"],Q6=["data-test-id"],Z6={key:1,class:"ect-inline-block ect-mb-2"},J6={class:"ect-flex ect-justify-between ect-items-center"},Y6={class:"ect-flex ect-flex-col"},e8=L0(()=>C("p",{class:"ect-text-xs ect-text-gray-500 ect-font-medium ect-leading-tight"},"Price",-1)),t8={key:3,"data-test-id":"configurator-item-slot-details",class:"ect-bg-white ect-rounded-md"},n8=Re({__name:"ConfiguratorItem",props:{item:{type:Object,required:!0},name:{type:String,required:!0},description:{type:String,default:""},imageUrl:{type:String,default:""},price:{type:Number,required:!0},quantity:{type:Number,default:1},selected:{type:Boolean,default:!1},tags:{type:Array,default:()=>[]},attributes:{type:Array,default:()=>[]},size:{type:Number,default:1},minQuantity:{type:Number,default:null},maxQuantity:{type:Number,default:null},showImage:{type:Boolean,default:!1},option:{type:Object,default:null},isAttributes:{type:Boolean,default:!1},showAttributes:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:quantity","update:name","edit-attributes"],setup(e,{emit:n}){const t=e,r=n,i=te(null),o=te(0),a=te(t.item),s=me(()=>a.value.relationshipInfo.relationship==="Kit"?"ect-bg-green-3 ect-border-gray-200 ect-border-success":t.disabled?"ect-bg-light-bg-x ect-border-gray-200":t.selected?"ect-bg-green-3 ect-border-gray-200 ect-border-success":"ect-bg-white ect-border-gray-200 hover:ect-border-success"),u=me({get:()=>t.quantity,set:p=>r("update:quantity",p)}),f=me({get:()=>t.name,set:p=>r("update:name",p)}),c=p=>{r("update:quantity",p)},v=me(()=>{if(o.value===0)return t.tags;const g=Math.floor(o.value/120);return t.tags.slice(0,Math.max(1,g))}),l=me(()=>Math.max(0,t.tags.length-v.value.length)),h=()=>{if(i.value){const p=i.value,g=80,d=120,m=32,y=64;o.value=p.offsetWidth-g-d-m-y}};return Ft(()=>{sn(()=>{h()})}),Ye(()=>t.tags,()=>{sn(()=>{h()})},{deep:!0}),Ft(()=>{window.addEventListener("resize",h)}),(p,g)=>(V(),J("div",{ref_key:"containerRef",ref:i,class:we(["ect-w-full ect-rounded-md ect-border-1 ect-transition-colors ect-relative",s.value]),"data-test-id":`configurator-item-${e.item.itemId}`,"data-publish-key":e.item.publishKey},[e.item.relationshipInfo.relationship==="Kit"?(V(),J("div",E6," KIT ")):ge("",!0),e.size===1?(V(),J("div",A6,[e.showImage?(V(),J("div",k6,[e.imageUrl?(V(),J("img",{key:0,src:e.imageUrl,alt:f.value,class:"ect-w-full ect-h-full ect-object-cover"},null,8,O6)):(V(),Ee(We,{key:1,disabled:"",icon:"image",symbol:"",size:20,color:"#ACACAC"}))])):ge("",!0),C("div",S6,[C("div",I6,[he(fs,{modelValue:f.value,"onUpdate:modelValue":g[0]||(g[0]=d=>f.value=d),tag:"h3","data-test-id":"itemId"+e.item.itemId,class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},null,8,["modelValue","data-test-id"]),C("div",T6,[C("div",{onClick:g[2]||(g[2]=mt(()=>{},["stop"]))},[he(Do,{value:u.value,"onUpdate:value":g[1]||(g[1]=d=>u.value=d),min:e.minQuantity,max:e.maxQuantity,"data-test-id":`configurator-item-counter-${e.item.itemId}`,onChange:c},null,8,["value","min","max","data-test-id"])]),B6,C("div",D6,[he(fs,{modelValue:a.value.price,"onUpdate:modelValue":g[3]||(g[3]=d=>a.value.price=d),tag:"p",type:"currency","data-test-id":"itemId"+e.item.itemId,class:"ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])]),C("div",R6,[Je(p.$slots,"selection-control",{},void 0,!0)])])]),C("p",{class:"ect-mt-2 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:e.description},null,8,L6),e.isAttributes&&e.showAttributes&&e.selected?(V(),J("div",N6,[a.value.getTags().length>0?(V(),J(be,{key:0},[(V(!0),J(be,null,Me(v.value,(d,m)=>(V(),J("span",{key:m,class:"ect-inline-block"},[he(hn,{label:d.label,value:d.value},null,8,["label","value"])]))),128)),l.value>0?(V(),J("button",{key:0,type:"button",class:"ect-text-xs ect-text-gray-700 ect-border ect-border-gray-300 ect-rounded-md ect-px-2 ect-py-0.5","data-test-id":`configurator-item-button-more-tags-${e.item.itemId}`,onClick:g[4]||(g[4]=mt(()=>{},["stop"]))}," +"+xe(l.value)+" more ",9,F6)):ge("",!0),e.selected?(V(),J("button",{key:1,"data-test-id":`configurator-item-button-edit-attributes-${e.item.itemId}`,onClick:g[5]||(g[5]=d=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})],8,P6)):ge("",!0)],64)):(V(),J("span",M6,[C("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:g[6]||(g[6]=d=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))])):ge("",!0)])])):(V(),J("div",q6,[C("div",$6,[e.showImage?(V(),J("div",j6,[e.imageUrl?(V(),J("img",{key:0,src:e.imageUrl,alt:e.name,class:"ect-w-full ect-h-full ect-object-cover"},null,8,H6)):ge("",!0)])):ge("",!0),C("div",V6,[C("h3",U6,xe(e.name),1),C("p",{class:"ect-mt-1 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:e.description},null,8,z6),C("p",K6,xe(e.item.publishKey)+" :: "+xe(e.item.calculateRules),1)]),C("div",X6,[Je(p.$slots,"selection-control",{},void 0,!0)])]),e.isAttributes&&e.showAttributes&&e.selected?(V(),J("div",W6,[a.value.getTags().length>0?(V(),J(be,{key:0},[(V(!0),J(be,null,Me(v.value,(d,m)=>(V(),J("span",{key:m,class:"ect-inline-block"},[he(hn,{label:d.label,value:d.value},null,8,["label","value"])]))),128)),l.value>0?(V(),J("button",{key:0,type:"button",class:"ect-text-xs ect-text-gray-700 ect-border ect-border-gray-300 ect-rounded-md ect-px-2 ect-py-0.5","data-test-id":`configurator-item-button-more-tags-${e.item.itemId}`,onClick:g[7]||(g[7]=mt(()=>{},["stop"]))}," +"+xe(l.value)+" more ",9,G6)):ge("",!0),e.selected?(V(),J("button",{key:1,class:"ect-ml-auto","data-test-id":`configurator-item-button-edit-attributes-${e.item.itemId}`,onClick:g[8]||(g[8]=d=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})],8,Q6)):ge("",!0)],64)):(V(),J("span",Z6,[C("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:g[9]||(g[9]=d=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))])):ge("",!0),C("div",J6,[C("div",{onClick:g[11]||(g[11]=mt(()=>{},["stop"]))},[he(Do,{value:u.value,"onUpdate:value":g[10]||(g[10]=d=>u.value=d),min:e.minQuantity,max:e.maxQuantity,"data-test-id":`configurator-item-counter-${e.item.itemId}`,onChange:c},null,8,["value","min","max","data-test-id"])]),C("div",Y6,[e8,he(fs,{modelValue:a.value.price,"onUpdate:modelValue":g[12]||(g[12]=d=>a.value.price=d),tag:"p",type:"currency","data-test-id":"itemId"+e.item.itemId,class:"ect-w-[125px] ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])])])])),e.selected&&e.isAttributes?(V(),J("div",t8,[Je(p.$slots,"default",{},void 0,!0)])):ge("",!0)],10,w6))}},[["__scopeId","data-v-b9675cf1"]]),r8={"af-ZA":",","sq-AL":",","ar-DZ":",","ar-BH":"٫","ar-EG":"٫","ar-IQ":"٫","ar-JO":"٫","ar-KW":"٫","ar-LB":"٫","ar-LY":",","ar-MA":",","ar-OM":"٫","ar-QA":"٫","ar-SA":"٫","ar-SD":"٫","ar-SY":"٫","ar-TN":",","ar-AE":"٫","ar-YE":"٫","hy-AM":",","az-AZ":",","bn-BD":".","bn-IN":".","eu-ES":",","be-BY":",","bs-BA":",","bg-BG":",","my-MM":".","ca-ES":",","ca-ES-EURO":",","zh-CN":".","zh-CN-PINYIN":".","zh-CN-STROKE":".","zh-HK":".","zh-HK-STROKE":".","zh-MO":".","zh-SG":".","zh-TW":".","zh-TW-STROKE":".","hr-HR":",","cs-CZ":",","da-DK":",","nl-AW":",","nl-BE":",","nl-NL":",","nl-SR":",","dz-BT":".","en-AG":".","en-AU":".","en-BS":".","en-BB":".","en-BZ":".","en-BM":".","en-BW":".","en-CM":".","en-CA":".","en-DE":",","en-KY":".","en-ER":".","en-FK":".","en-FJ":".","en-GM":".","en-GH":".","en-GI":".","en-GY":".","en-HK":".","en-IN":".","en-ID":".","en-IE":".","en-IE-EURO":".","en-JM":".","en-KE":".","en-LR":".","en-MG":".","en-MW":".","en-MY":".","en-MU":".","en-NA":".","en-NZ":".","en-NG":".","en-PK":".","en-PG":".","en-PH":".","en-RW":".","en-WS":".","en-SC":".","en-SL":".","en-SG":".","en-SX":".","en-SB":".","en-ZA":",","en-SH":".","en-SZ":".","en-TZ":".","en-TO":".","en-TT":".","en-UG":".","en-GB":".","en-US":".","en-VU":".","et-EE":",","fi-FI":",","fi-FI-EURO":",","fr-BE":",","fr-CA":",","fr-KM":",","fr-FR":",","fr-FR-EURO":",","fr-GN":",","fr-HT":",","fr-LU":",","fr-MR":",","fr-MC":",","fr-CH":",","fr-WF":",","ka-GE":",","de-AT":",","de-AT-EURO":",","de-BE":",","de-DE":",","de-DE-EURO":",","de-LU":",","de-LU-EURO":",","de-CH":".","el-GR":",","gu-IN":".","iw-IL":".","hi-IN":".","hu-HU":",","is-IS":",","in-ID":",","ga-IE":".","it-IT":",","it-CH":".","ja-JP":".","kn-IN":".","kk-KZ":",","km-KH":",","ko-KP":".","ko-KR":".","ky-KG":",","lo-LA":",","lv-LV":",","lt-LT":",","lu-CD":",","lb-LU":",","mk-MK":",","ms-BN":",","ms-MY":".","ml-IN":".","mt-MT":".","mi-NZ":".","mr-IN":".","ne-NP":".","no-NO":",","ps-AF":"٫","fa-IR":"٫","pl-PL":",","pt-AO":",","pt-BR":",","pt-CV":",","pt-MZ":",","pt-PT":",","pt-ST":",","ro-MD":",","ro-RO":",","rm-CH":".","rn-BI":",","ru-KZ":",","ru-RU":",","sr-BA":",","sr-RS":",","sh-BA":",","sh-ME":",","sh-ME-USD":",","sh-CS":",","sk-SK":",","sl-SI":",","so-DJ":".","so-SO":".","es-AR":",","es-BO":",","es-CL":",","es-CO":",","es-CR":",","es-CU":".","es-DO":".","es-EC":",","es-SV":".","es-GT":".","es-HN":".","es-MX":".","es-NI":".","es-PA":".","es-PY":",","es-PE":".","es-PR":".","es-ES":",","es-ES-EURO":",","es-US":".","es-UY":",","es-VE":",","sw-KE":".","sv-SE":",","tl-PH":".","tg-TJ":",","ta-IN":".","ta-LK":".","te-IN":".","th-TH":".","ti-ET":".","tr-TR":",","uk-UA":",","ur-PK":".","uz-LATN-UZ":",","vi-VN":",","cy-GB":".","xh-ZA":".","yo-BJ":".","zu-ZA":"."},i8={name:"CustomInput",components:{AppIcon:We},props:{editMode:{type:Boolean,default:!0},type:{type:String,default:"text"},max:{type:Number,default:500},label:{type:String,default:""},name:{type:String,default:""},showLabel:{type:Boolean,default:!0},modelValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},isReadOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},highlight:{type:Boolean,default:!1},placeholder:{type:String,default:""},error:{type:[Boolean,String],default:!1},cssClass:{type:Object,default:()=>({})},tooltip:{type:String,default:null},locale:{type:String,default:"en-US"},icon:{type:String,default:null},itooltip:{type:String,default:null},icolor:{type:String,default:"#7d7d7d"},ihover:{type:String,default:"#57c046"},icustom:{type:Boolean,default:!1},idisabled:{type:Boolean,default:!1},height:{type:Number,default:32},textAlignment:{type:String,default:"left"},decimalPrecision:{type:Number,default:0},allowNegatives:{type:Boolean,default:!1},size:{type:String,default:"medium"},dataTestId:{type:String,required:!0}},emits:["update:modelValue","iclick","blur"],data(){return{initialValue:"",decimalSeprator:".",ctrl:!1}},computed:{getValue(){return this.modelValue?this.type==="currency"?String(this.modelValue).replace(".",this.decimalSeprator):String(this.modelValue):""},error_message(){return typeof this.error=="string"?this.error:this.error===""?!1:this.error===!0?`${this.label||"Field"} is required`:this.error},isHighlight(){return(this.initialValue===""||this.initialValue===null)&&(this.modelValue===""||this.modelValue===null)?!1:this.initialValue!==this.modelValue}},created(){this.initialValue=this.modelValue,this.decimalSeprator=this.type==="currency"?r8[this.locale]:"."},methods:{handlerInput(e){const n=e.target.value;this.type==="currency"?this.$emit("update:modelValue",n.replace(this.decimalSeprator,".")):this.$emit("update:modelValue",n)},preventNonNumeric(e){if(this.type==="number"){const n=this.decimalPrecision,t=e.target.value,r=e.key;if(["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(r)||this.allowNegatives&&r==="-")return;if(r==="."&&n===0){e.preventDefault();return}if(r==="."&&t.includes(".")){e.preventDefault();return}if(r==="."||t.includes(".")&&!t.endsWith(".")&&r!=="Backspace"){const i=t.split(".");if(i.length>1&&i[1].length>=n){e.preventDefault();return}}if(isNaN(r)&&![".","Backspace","Tab"].includes(r)){e.preventDefault();return}}if(e.key==="Backspace"||this.ctrl)return!0;if(e.key==="Control"&&(this.ctrl=!0),this.type==="currency"||this.type==="number"){if(!this.getValue.includes(this.decimalSeprator)&&e.key===this.decimalSeprator)return!0;/[\deE+\-]/.test(e.key)||e.preventDefault()}return!0},handlerKeyup(e){e.key==="Control"&&(this.ctrl=!1)}}},o8=["data-test-id"],a8=["for","data-test-id"],s8=["data-test-id"],l8=["id","type","name","disabled","placeholder","value","maxlength","readonly","data-test-id"],c8=["data-test-id"],u8=["data-test-id"];function f8(e,n,t,r,i,o){const a=er("AppIcon");return V(),J("div",{class:"input","data-test-id":t.dataTestId},[t.label&&t.showLabel?(V(),J("label",{key:0,class:we({error_color:!!t.error}),for:t.label,"data-test-id":`${t.dataTestId}-label`},[Fe(xe(t.label)+" ",1),t.required?(V(),J("span",{key:0,class:we({error_color:!!t.error})},"*",2)):ge("",!0)],10,a8)):ge("",!0),t.editMode?(V(),J("div",{key:1,class:we(["input-wrapper ect-w-full",{errorBorder_color:!!t.error,highlight:o.isHighlight&&t.highlight}]),"data-test-id":`${t.dataTestId}-wrapper`},[t.icon?(V(),Ee(a,{key:0,class:"input-wrapper_icon",icon:t.icon,hover:t.ihover,color:t.icolor,size:19,disabled:t.idisabled,custom:t.icustom,tooltip:t.itooltip,"data-test-id":`${t.dataTestId}-icon`,direction:"top-right",onClick:n[0]||(n[0]=s=>e.$emit("iclick"))},null,8,["icon","hover","color","disabled","custom","tooltip","data-test-id"])):ge("",!0),C("input",{id:t.label,class:we(`ectheme-input-box ${t.size}`),type:t.type,style:ze({width:t.icon?"calc(100% - 36px)":"100%",height:`${t.height}px`,textAlign:t.textAlignment}),name:t.name,disabled:t.disabled,placeholder:t.placeholder,value:o.getValue,maxlength:t.max,readonly:t.isReadOnly,"data-test-id":`${t.dataTestId}-input`,onInput:n[1]||(n[1]=(...s)=>o.handlerInput&&o.handlerInput(...s)),onKeydown:n[2]||(n[2]=(...s)=>o.preventNonNumeric&&o.preventNonNumeric(...s)),onKeyup:n[3]||(n[3]=(...s)=>o.handlerKeyup&&o.handlerKeyup(...s)),onBlur:n[4]||(n[4]=s=>e.$emit("blur"))},null,46,l8)],10,s8)):ge("",!0),t.editMode?ge("",!0):(V(),J("p",{key:2,class:"value","data-test-id":`${t.dataTestId}-value`},xe(o.getValue),9,c8)),o.error_message?(V(),J("div",{key:3,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${t.dataTestId}-error`},xe(o.error_message),9,u8)):ge("",!0)],8,o8)}const d8=Re(i8,[["render",f8],["__scopeId","data-v-032ca141"]]),h8={name:"AtomSpinner",props:{dataTestId:{type:String,default:""}}},p8=["data-test-id"];function v8(e,n,t,r,i,o){return V(),J("div",{class:"spinner","data-test-id":t.dataTestId},null,8,p8)}const g8={name:"CustomDropdown",components:{AppIcon:We,AtomSpinner:Re(h8,[["render",v8],["__scopeId","data-v-771ed032"]])},props:{label:{type:String,default:""},placeholder:{type:String,default:""},options:{type:Array,default:()=>[]},display:{type:Array,default:()=>[]},modelValue:{type:String,default:""},error:{type:[Boolean,String],default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},select:{type:Boolean,default:!1},lookup:{type:Boolean,default:!1},search:{type:Boolean,default:!1},badge:{type:String,default:void 0},highlight:{type:Boolean,default:!1},property:{type:Object,default:()=>({key:"value",value:"label",assigned:"assigned"})},dropdownTheme:{type:String,default:"light"},icon:{type:String,default:""},size:{type:String,default:"medium"},dataTestId:{type:String,required:!0}},emits:["search","focus-in","focus-out","update:modelValue"],data:()=>({inputFocused:!1,value:"",isHover:!1,highlightedIndex:-1,initialValue:"",teleportStyle:{position:"absolute",top:"0px",left:"0px",width:"0px"}}),computed:{isHighlight(){return(this.initialValue===""||this.initialValue==null)&&(this.modelValue===""||this.modelValue==null)?!1:this.initialValue!==this.modelValue},error_message(){return this.error===""?!1:this.error===!0?`${this.label||"Field"} is required`:this.error},getOptions(){if(this.select&&this.search){const e=this.value.toLowerCase();return this.options.filter(n=>JSON.stringify(n).toLowerCase().includes(e))}else return this.options},getSelected(){let e=null;if(this.modelValue)e=this.options.find(n=>n[this.property.key]===this.modelValue);else if(!this.search){const n=this.options.find(t=>t[this.property.key]==="");n?e=n:this.placeholder?e={[this.property.value]:this.placeholder,[this.property.key]:""}:e={[this.property.value]:"--Select--",[this.property.key]:""}}return e||{[this.property.value]:this.placeholder||"--Select--",[this.property.key]:""}},shouldShowAbove(){if(!this.$refs.triggerElement)return!1;const e=this.$refs.triggerElement.getBoundingClientRect(),n=250,t=window.innerHeight-e.bottom,r=e.top;return t<n&&r>n},dropdownStyle(){if(!this.$refs.triggerElement)return{};const e=this.$refs.triggerElement.getBoundingClientRect(),n=250,t=window.innerHeight-e.bottom,r=e.top,i=t<n&&r>n;return{position:"absolute",top:i?"auto":"100%",bottom:i?"100%":"auto",left:"0",width:"100%",zIndex:1e3}}},created(){this.initialValue=this.modelValue},mounted(){window.addEventListener("resize",this.updateDropdownPosition),window.addEventListener("scroll",this.updateDropdownPosition,!0)},beforeUnmount(){window.removeEventListener("resize",this.updateDropdownPosition),window.removeEventListener("scroll",this.updateDropdownPosition,!0)},methods:{updateDropdownPosition(){if(!this.$refs.triggerElement)return;const e=this.$refs.triggerElement.getBoundingClientRect(),n=200,t=window.innerHeight-e.bottom,r=e.top,i=t<n&&r>n;this.teleportStyle={position:"absolute",top:`${i?e.top-n:e.bottom}px`,left:`${e.left}px`,width:`${e.width}px`,zIndex:9999}},subFieldsText(e){if(!this.display||this.display.length<1)return"";const n=[];return this.display.forEach(t=>{const r=this.subField(e,t);r&&n.push(r)}),n.join(" | ")},subField(e,n){return n?n.split(".").reduce((i,o)=>i[o]||"",e):e},lookupSearchHandler:or(function(e){this.value=e,this.search&&!this.select&&this.$emit("search",e)}),handlerFocusIn(){!(this.modelValue&&this.search)&&!this.disabled&&(this.inputFocused=!0,this.updateDropdownPosition(),this.$emit("focus-in"))},updateSelected(e){e&&(this.value="",this.$emit("update:modelValue",e[this.property.key]),this.search&&!this.select&&!this.lookup&&this.$emit("search",""),this.onInputFocusedOut(!0))},clear(){this.disabled||(this.value="",this.$emit("update:modelValue",null),this.search&&!this.select&&!this.lookup&&this.$emit("search",""))},onInputFocusedOut(e=!1){(!this.isHover||e)&&!this.disabled&&(e?(this.highlightedIndex=-1,this.inputFocused=!1,this.$emit("focus-out")):setTimeout(()=>{this.highlightedIndex=-1,this.inputFocused=!1,this.$emit("focus-out")},100))},highlightNextOption(){this.highlightedIndex<this.options.length-1&&this.highlightedIndex++},highlightPreviousOption(){this.highlightedIndex>0&&this.highlightedIndex--}}},m8=["data-test-id"],y8=["for","data-test-id"],x8={class:"input-container-box ect-grow ect-w-full"},_8=["data-test-id"],b8=["placeholder","disabled","data-test-id"],C8=["data-test-id"],w8=["title","data-test-id"],E8=["data-test-id"],A8=["data-test-id"],k8=["data-test-id"],O8=["data-test-id"],S8=["data-test-id","onClick"],I8=["data-test-id"],T8={class:"ect-text-font-clr-light ect-flex ect-gap-2 ect-items-center ect-justify-between ect-w-full"},B8=["data-test-id"],D8=["data-test-id"],R8=["data-test-id"],L8=["title","data-test-id"],N8=["data-test-id"];function F8(e,n,t,r,i,o){const a=er("AppIcon"),s=er("AtomSpinner");return V(),J("div",{ref:"dropdownWrapper",class:we(["customdropdown input-container",{dark:t.dropdownTheme==="dark"}]),"data-test-id":t.dataTestId,onMouseenter:n[7]||(n[7]=u=>e.isHover=!0),onMouseleave:n[8]||(n[8]=u=>e.isHover=!1)},[t.label?(V(),J("label",{key:0,class:we(["title_label",{error_color:!!t.error}]),for:t.label,"data-test-id":`${t.dataTestId}-label`},[Fe(xe(t.label)+" ",1),t.required?(V(),J("span",{key:0,class:we({error_color:!!t.error})},"*",2)):ge("",!0)],10,y8)):ge("",!0),C("div",x8,[C("div",{ref:"triggerElement",class:we(["input-wrapper ectheme-input-box ect-w-full",{disabled:t.disabled,"input-error":t.error,highlight:o.isHighlight&&t.highlight,"size-large":t.size==="large","size-medium":t.size==="medium"||t.size==="small"}]),"data-test-id":`${t.dataTestId}-trigger`,tabindex:"0",onFocusin:n[2]||(n[2]=(...u)=>o.handlerFocusIn&&o.handlerFocusIn(...u)),onFocusout:n[3]||(n[3]=u=>o.onInputFocusedOut(!1)),onKeydown:[n[4]||(n[4]=ir(u=>o.updateSelected(t.options[e.highlightedIndex]),["enter"])),n[5]||(n[5]=ir(mt((...u)=>o.highlightPreviousOption&&o.highlightPreviousOption(...u),["prevent"]),["up"])),n[6]||(n[6]=ir(mt((...u)=>o.highlightNextOption&&o.highlightNextOption(...u),["prevent"]),["down"]))]},[!t.modelValue&&t.search?ln((V(),J("input",{key:0,ref:"searchInput","onUpdate:modelValue":n[0]||(n[0]=u=>e.value=u),type:"text",name:"search",placeholder:t.placeholder,autocomplete:"off",disabled:t.disabled,"data-test-id":`${t.dataTestId}-search-input`,onInput:n[1]||(n[1]=mt(u=>o.lookupSearchHandler(u.target.value),["prevent"]))},null,40,b8)),[[li,e.value]]):(V(),J("div",{key:1,class:we(["selection-name ect-text-text-primary-dark ect-flex ect-justify-between ect-items-center",{"size-large":t.size==="large","size-medium":t.size==="medium"||t.size==="small"}]),"data-test-id":`${t.dataTestId}-selection`},[o.getSelected?(V(),J(be,{key:0},[C("span",{title:o.getSelected[t.property.value],class:we(["ect-flex ect-items-center ect-gap-2 ect-font-medium",{"ect-text-font-clr-light":!t.modelValue}]),"data-test-id":`${t.dataTestId}-selection-value`},[t.icon?(V(),Ee(a,{key:0,class:"ect-mr-0",icon:t.icon,size:14,color:"#5F5F5F","data-test-id":`${t.dataTestId}-selection-icon`},null,8,["icon","data-test-id"])):ge("",!0),Fe(" "+xe(o.getSelected[t.property.value]),1)],10,w8),t.badge&&o.getSelected[t.badge]?(V(),J("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${t.dataTestId}-selection-badge`},xe(o.getSelected[t.badge]),9,E8)):ge("",!0)],64)):ge("",!0)],10,C8)),t.search?(V(),J(be,{key:2},[t.loading?(V(),Ee(s,{key:0,class:"spinner","data-test-id":`${t.dataTestId}-loading-spinner`},null,8,["data-test-id"])):(V(),J("div",{key:1,class:"clear-button","data-test-id":`${t.dataTestId}-action-button`},[e.value||t.modelValue?(V(),Ee(a,{key:0,disabled:t.disabled,icon:"close",color:"#acacac",size:10,"data-test-id":`${t.dataTestId}-clear-button`,onClick:o.clear},null,8,["disabled","data-test-id","onClick"])):(V(),Ee(a,{key:1,icon:"search",size:14,color:"#acacac",disabled:t.disabled,"data-test-id":`${t.dataTestId}-search-button`},null,8,["disabled","data-test-id"]))],8,A8))],64)):(V(),Ee(a,{key:3,class:"clear-button",color:o.error_message?"#ff6a6a":"#acacac",icon:"arrow_drop_up",size:12,disabled:t.disabled,"data-test-id":`${t.dataTestId}-dropdown-arrow`},null,8,["color","disabled","data-test-id"]))],42,_8),o.error_message?(V(),J("div",{key:0,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${t.dataTestId}-error`},xe(o.error_message),9,k8)):ge("",!0),o.getOptions&&e.inputFocused&&!t.disabled&&(t.select||t.lookup)?(V(),J("div",{key:1,ref:"dropdown",class:we(["dropdown",{"dropdown-above":o.shouldShowAbove}]),style:ze(o.dropdownStyle),"data-test-id":`${t.dataTestId}-dropdown`},[(V(!0),J(be,null,Me(o.getOptions,(u,f)=>(V(),J("div",{key:u[t.property.key],class:we(["dropdown-item",{highlighted:f===e.highlightedIndex,"ect-pointer-events-none":u[t.property.assigned]}]),"data-test-id":`${t.dataTestId}-option-${f}`,onClick:c=>o.updateSelected(u)},[C("div",{class:"name ect-items-center","data-test-id":`${t.dataTestId}-option-${f}-name`},[C("span",T8,[C("span",{class:we({"ect-text-zinc-400":u[t.property.assigned]}),"data-test-id":`${t.dataTestId}-option-${f}-value`},xe(u[t.property.value]==null?"Key and Value is Wrong":u[t.property.value]),11,B8),u[t.property.assigned]?(V(),J("span",{key:0,class:"ect-text-xs ect-leading-4 ect-text-zinc-600","data-test-id":`${t.dataTestId}-option-${f}-assigned`},"Assigned",8,D8)):ge("",!0)]),t.badge?(V(),J("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${t.dataTestId}-option-${f}-badge`},xe(u[t.badge]),9,R8)):ge("",!0)],8,I8),C("div",{class:"info",title:o.subFieldsText(u),"data-test-id":`${t.dataTestId}-option-${f}-info`},[C("span",null,xe(o.subFieldsText(u)),1)],8,L8)],10,S8))),128)),!o.getOptions.length&&!t.loading&&(e.value||t.select)?(V(),J("div",{key:0,class:"no-items-found","data-test-id":`${t.dataTestId}-no-options`}," no options found ",8,N8)):ge("",!0)],14,O8)):ge("",!0)])],42,m8)}const N0=Re(g8,[["render",F8],["__scopeId","data-v-5ae4f6dc"]]);var Se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ds(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function P8(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var t=function r(){return this instanceof r?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),t}var F0={exports:{}};/*!
33
+ `+o):r.stack=o}catch{}}throw r}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=lr(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;r!==void 0&&Io.assertOptions(r,{silentJSONParsing:fn.transitional(fn.boolean),forcedJSONParsing:fn.transitional(fn.boolean),clarifyTimeoutError:fn.transitional(fn.boolean)},!1),i!=null&&(de.isFunction(i)?t.paramsSerializer={serialize:i}:Io.assertOptions(i,{encode:fn.function,serialize:fn.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Io.assertOptions(t,{baseUrl:fn.spelling("baseURL"),withXsrfToken:fn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&de.merge(o.common,o[t.method]);o&&de.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),t.headers=Jt.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(t)===!1||(u=u&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const f=[];this.interceptors.response.forEach(function(g){f.push(g.fulfilled,g.rejected)});let c,v=0,l;if(!u){const p=[I0.bind(this),void 0];for(p.unshift(...s),p.push(...f),l=p.length,c=Promise.resolve(t);v<l;)c=c.then(p[v++],p[v++]);return c}l=s.length;let h=t;for(;v<l;){const p=s[v++],g=s[v++];try{h=p(h)}catch(d){g.call(this,d);break}}try{c=I0.call(this,h)}catch(p){return Promise.reject(p)}for(v=0,l=f.length;v<l;)c=c.then(f[v++],f[v++]);return c}getUri(n){n=lr(this.defaults,n);const t=y0(n.baseURL,n.url,n.allowAbsoluteUrls);return c0(t,n.params,n.paramsSerializer)}}de.forEach(["delete","get","head","options"],function(n){To.prototype[n]=function(t,r){return this.request(lr(r||{},{method:n,url:t,data:(r||{}).data}))}}),de.forEach(["post","put","patch"],function(n){function t(r){return function(o,a,s){return this.request(lr(s||{},{method:n,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}To.prototype[n]=t(),To.prototype[n+"Form"]=t(!0)});const Bo=To;class cs{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(o){t=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},n(function(o,a,s){r.reason||(r.reason=new Pr(o,a,s),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new cs(function(i){n=i}),cancel:n}}}const e4=cs;function t4(e){return function(t){return e.apply(null,t)}}function n4(e){return de.isObject(e)&&e.isAxiosError===!0}const us={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(us).forEach(([e,n])=>{us[n]=e});const r4=us;function D0(e){const n=new Bo(e),t=Wu(Bo.prototype.request,n);return de.extend(t,Bo.prototype,n,{allOwnKeys:!0}),de.extend(t,n,null,{allOwnKeys:!0}),t.create=function(i){return D0(lr(e,i))},t}const Ge=D0(is);Ge.Axios=Bo,Ge.CanceledError=Pr,Ge.CancelToken=e4,Ge.isCancel=p0,Ge.VERSION=T0,Ge.toFormData=wo,Ge.AxiosError=Le,Ge.Cancel=Ge.CanceledError,Ge.all=function(n){return Promise.all(n)},Ge.spread=t4,Ge.isAxiosError=n4,Ge.mergeConfig=lr,Ge.AxiosHeaders=Jt,Ge.formToJSON=e=>d0(de.isHTMLForm(e)?new FormData(e):e),Ge.getAdapter=S0.getAdapter,Ge.HttpStatusCode=r4,Ge.default=Ge;class i4{constructor(n,t,r,i){this.awsURL="https://ec-apigw.blink.expedite1.com",this.headers={"x-api-key":n,"X-Salesforce-Org-Type":t,"X-Salesforce-Org-Id":r,"X-Salesforce-User-Id":i,"Content-Type":"application/json"}}}const R0=wt("comShare",()=>{const e=te(""),n=te(""),t=te(""),r=te(""),i=te(""),o=te(""),a=te(""),s=te("Single"),u=me(()=>s.value==="Single");async function f(c){e.value=c.orgType||"Production",n.value=c.orgId||"",t.value=c.userId||"",r.value=c.accountId||"",i.value=c.opportunityId||"",a.value=c.userLocale||"en_US",s.value=c.pricingSchema||"Single"}return{orgType:e,orgId:n,userId:t,accountId:r,opportunityId:i,userLocale:a,pricingSchema:s,quoteId:o,isSinglePricingSchema:u,setSetupData:f}});function o4(e){return e.offerData.pricingTypes.forEach(n=>{n.appliedOnField==="Catalog Price"?(e.catalogPrice=n,e.salesPrice=n.offerPrice,e.price=n.offerPrice):n.appliedOnField==="MRC"?(e.mrcPrice=n,e.mrc=n.offerPrice):n.appliedOnField==="YRC"&&(e.yrcPrice=n,e.yrc=n.offerPrice)}),e}function a4(e){const n=t=>Math.min(...t.options.map(r=>r.relationshipInfo.primarySortOrder));return e.forEach(t=>{t.itemTypes.forEach(r=>{r.options.sort((i,o)=>i.relationshipInfo.primarySortOrder-o.relationshipInfo.primarySortOrder||i.itemName.localeCompare(o.itemName))}),t.itemTypes.sort((r,i)=>n(r)-n(i)||r.itemTypeName.localeCompare(i.itemTypeName))}),e.sort((t,r)=>{const i=Math.min(...t.itemTypes.map(n)),o=Math.min(...r.itemTypes.map(n));return i-o||t.category.localeCompare(r.category)}),e}const s4=(e,n)=>{const t=(r,i)=>typeof i=="function"?void 0:i;return JSON.stringify(e,t)===JSON.stringify(n,t)};class l4 extends i4{constructor(n,t,r,i){super(n,t,r,i)}async getAvailableConfiguration(n){return(await Ge.post(`${this.awsURL}/product-pricing/getAvailableConfiguration`,n,{headers:this.headers})).data}async getLineItems({request:n}){const t=await Ge.post(`${this.awsURL}/quoting/getConfiguredLineItems`,n,{headers:this.headers});return console.info("getLineItems:response",t.data),t.data}async maintainQuoteConfiguration({request:n}){const t=await Ge.post(`${this.awsURL}/transactions/maintainConfiguration`,n,{headers:this.headers});return console.info("maintainQuoteConfiguration:response",t.data),t.data}async getProductCrossSells({objectId:n,productItemId:t}){const r=await Ge.get(`${this.awsURL}/pricing/getProductCrossSells?productItemId=${t}&objectId=${n}`,{headers:this.headers});return console.info("getProductCrossSells:response",r.data),r.data}async addLines({request:n}){const t=await Ge.post(`${this.awsURL}/transactions/addLines`,n,{headers:this.headers});return console.info("addLines:response",t.data),t.data}async evaluateConfigurationSelection({request:n}){const t=await Ge.post("https://api-svc.blink.expedite1.com/api/product-pricing/evaluateConfigurationSelection",n,{headers:this.headers});return console.info("evaluateConfigurationSelection:response",t.data),t.data}}const dn=wt("comConfigurator",()=>{const e=te(null),n=Qt(),t=R0(),r=fi(),i=te(null),o=te(null),a=te(null),s=te(null),u=te(null),f=te([]),c=te(null),v=te([]),l=te([]),h=te(null),p=te(new Map),g=te(!1),d=te({init:!1,configuration:!1,lineItem:!1,productOptionsPricing:!1,bestOfferPrice:!1,lineItemAttributes:!1,save:!1}),m=te(!1),y=me(()=>_.value&&!t.isSinglePricingSchema),_=me(()=>{var j;if(!s.value||!((j=s.value.categoryOptions)!=null&&j.length)>0)return!1;let M=!0,U=!0,Z=!0,z=null,F=!1;for(const se of s.value.categoryOptions)for(const fe of se.itemTypes)for(const ce of fe.options)ce.billingPeriod&&(z&&z!==ce.billingPeriod&&(Z=!1),z=ce.billingPeriod,!ce.yrcPrice&&ce.billingPeriod==="Monthly"&&(M=!1),!ce.mrcPrice&&ce.billingPeriod==="Yearly"&&(U=!1),F=!0);return M&&U&&Z&&F}),x=me(()=>!s4(s.value,u.value)),b=me(()=>{var U;const M=((U=s.value)==null?void 0:U.categoryOptions)||[];return M.forEach(Z=>{Z.itemTypes.forEach(z=>{z.selectedOptions=z.options.filter(F=>z.selected.includes(F.itemId)),z.totalPrice=function(){return z.selectedOptions.reduce((F,j)=>F+j.price*j.qty,0)||0},z.oneTimePrice=function(){return z.selectedOptions.filter(F=>!F.billingPeriod).reduce((F,j)=>F+j.price*j.qty,0)||0},z.recurringPrice=function(){return z.selectedOptions.filter(F=>F.billingPeriod).reduce((F,j)=>F+j.price*j.qty,0)||0}}),Z.selectedItemTypes=Z.itemTypes.filter(z=>z.selected.length>0),Z.totalPrice=function(){return Z.itemTypes.reduce((z,F)=>z+F.totalPrice(),0)},Z.oneTimePrice=function(){return Z.itemTypes.reduce((z,F)=>z+F.oneTimePrice(),0)},Z.recurringPrice=function(){return Z.itemTypes.reduce((z,F)=>z+F.recurringPrice(),0)}}),M.filter(Z=>Z.itemTypes.filter(z=>z.selected.length>0).length>0)}),S=me(()=>b.value.reduce((M,U)=>M+U.totalPrice(),0)),A=me(()=>{if(!s.value)return{basePrice:0,addOns:0,oneTimePrice:0,recurringPrice:0,total:0};const M=b.value.reduce((z,F)=>z+F.totalPrice(),0);let U=b.value.reduce((z,F)=>z+F.oneTimePrice(),0),Z=b.value.reduce((z,F)=>z+F.recurringPrice(),0);return s.value.billingPeriod?Z=(Z+s.value.price)*s.value.qty:U=(U+s.value.price)*s.value.qty,{basePrice:s.value.price,addOns:M,oneTimePrice:U,recurringPrice:Z,total:s.value.price*s.value.qty+M*s.value.qty+U+Z}}),I=me(()=>{var U,Z,z,F;const M=new Map;return(U=c.value)!=null&&U.productLineItem&&M.set((Z=c.value)==null?void 0:Z.productLineItem.XX_ORD1__Item__c,(z=c.value)==null?void 0:z.productLineItem),(F=c.value)==null||F.options.forEach(j=>{M.set(j.XX_ORD1__Item__c,j)}),M}),B=me(()=>{var U;const M=new Map;return s.value&&((U=s.value.categoryOptions)==null?void 0:U.length)>0&&s.value.categoryOptions.forEach(Z=>{Z.itemTypes.forEach(z=>{z.options.forEach(F=>{M.set(F.publishKey,F)})})}),M}),O=me(()=>{if(!s.value)return{};const M=z=>!z||!Array.isArray(z)?[]:z.map(F=>({field:F.apiName,dataType:F.dataType,picklistValues:F.picklistValues,isEditable:F.editable,defaultValue:F.defaultValue,value:F.dataType==="BOOLEAN"?F.value?"true":"false":F.dataType==="REFERENCE"?F.referenceRecordId||F.value||"":F.value||""})),U={itemId:s.value.itemId,qliId:s.value.qliId||null,name:s.value.itemName,qty:s.value.qty||1,salesPrice:s.value.price||0,mrc:s.value.mrc||null,yrc:s.value.yrc||null,attributes:M(s.value.attributes)},Z=[];return s.value.categoryOptions.forEach(z=>{z.itemTypes.forEach(F=>{F.options.forEach(j=>{F.selected.includes(j.itemId)&&Z.push({itemId:j.itemId,qliId:j.qliId||null,name:j.itemName,qty:j.qty||1,salesPrice:j.price||0,mrc:j.mrc||null,yrc:j.yrc||null,attributes:M(j.attributes)})})})}),{[s.value.itemId]:{product:U,options:Z}}}),E=(M,U)=>{if(!M||!Array.isArray(M))return[];const Z=new Map;return U.forEach(z=>{Z.set(z.fieldAPIName,z.value)}),M.map(z=>(z.value=Z.get(z.fieldAPIName)||null,z))};function k(M,U){console.log("updateCurrentConfiguration:newConfiguration",JSON.stringify(M)),console.log("updateCurrentConfiguration:suggestedConfigurations",JSON.stringify(U)),U&&(l.value=U.filter(z=>z.product.itemId!==M.product.itemId));const Z=new Map;M.options.forEach(z=>{Z.set(z.itemId,z)}),s.value.itemName=M.product.name,s.value.qty=M.product.qty,s.value.price=M.product.salesPrice,s.value.attributes=E(s.value.attributes,M.product.attributes),s.value.categoryOptions.forEach(z=>{z.itemTypes.forEach(F=>{F.selected=[],F.options.forEach(j=>{Z.has(j.itemId)&&(j.itemName=Z.get(j.itemId).name,j.qty=Z.get(j.itemId).qty,j.price=Z.get(j.itemId).salesPrice,j.qliId=Z.get(j.itemId).qliId,j.attributes=E(j.attributes,Z.get(j.itemId).attributes),F.selected.push(j.itemId))})})}),s.value={...s.value}}function R(){return{get getConfig(){return O.value},setConfig:k}}function N(M){s.value.qliId&&(s.value.qliBillingPeriod==="Monthly"&&!M?s.value.price=s.value.salesPrice||s.value.mrc:s.value.qliBillingPeriod==="Yearly"&&M&&(s.value.price=s.value.salesPrice)),s.value.categoryOptions.forEach(U=>{U.itemTypes.forEach(Z=>{Z.options.forEach(z=>{z.billingPeriod&&(z.price=(M?z.yrcPrice.offerPrice:z.mrcPrice.offerPrice)||z.price,z.qliId&&(z.qliBillingPeriod==="Monthly"&&!M?z.price=z.salesPrice||z.mrc:z.qliBillingPeriod==="Yearly"&&M&&(z.price=z.salesPrice)))})})})}function q(){s.value=null,u.value=null,f.value=[],a.value=null,c.value=null,h.value=null,p.value=new Map,g.value=!1,d.value.configuration=!1,d.value.lineItem=!1,d.value.productOptionsPricing=!1,d.value.bestOfferPrice=!1,d.value.lineItemAttributes=!1,d.value.save=!1}function G(M,U,Z,z){e.value=new l4(M,U,Z,z)}async function Y(M,U,Z){d.value.init=!0,console.time("CONFIGURATOR INIT CONFIGURATOR"),q(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","1"),o.value=M,a.value=U,i.value=Z||t.quoteId;const z=await ne();console.timeLog("CONFIGURATOR INIT CONFIGURATOR","2"),s.value=Q(z),a.value?(await w(),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","3"),P(s.value),s.value.categoryOptions.forEach(F=>{F.itemTypes.forEach(j=>{j.options.forEach(se=>{P(se),(I.value.has(se.itemId)||se.relationshipInfo.relationship==="Kit")&&j.selected.push(se.itemId)})})}),console.timeLog("CONFIGURATOR INIT CONFIGURATOR","4")):w(),u.value=JSON.parse(JSON.stringify(s.value)),console.timeEnd("CONFIGURATOR INIT CONFIGURATOR"),d.value.init=!1}async function ne(){try{const M={accountId:t.accountId,objectId:i.value,itemId:o.value,configScope:"BASIC",fields:[],pricePreference:"Lowest Price"},U=await e.value.getAvailableConfiguration(M);console.info("getAvailableConfiguration:result",U);const Z=U.data.productConfiguration;return Z.categoryOptions=a4(Z.categoryOptions),Z}catch(M){return console.info("error",M.message),!1}}function Q(M){p.value.set(a.value,M.attributes),f.value=M.configRules;const U=new Set;return f.value.forEach(Z=>{const z=JSON.parse(Z.ruleJson);z.optionSelected.forEach(F=>{U.add(F)}),z.affectedOptions.forEach(F=>{U.add(F)})}),console.info("rulesByPublishKey",U),P(M),M.categoryOptions.forEach(Z=>{Z.key=Z.category.toLowerCase().replace(/\s+/g,"-").replace(/[&]/g,""),Z.itemTypes.forEach(z=>{z.selected=[],z.numberOfColumns||(z.numberOfColumns=1),z.numberOfColumns>1&&(z.lightboxAttributes=!0),z.maxNumber||(z.maxNumber=100),z.minNumber||(z.minNumber=0),z.maxQuantity||(z.maxQuantity=1e4),z.minQuantity||(z.minQuantity=1),z.maxNumber===1?(z.isRadio=!0,z.minMessage="Please select 1 option",z.maxMessage="",z.isKit=z.options.some(F=>F.relationshipInfo.relationship==="Kit")):(z.minMessage=`Minimum of ${z.minNumber} selection${z.minNumber!==1?"s":""} required`,z.maxMessage=`Maximum of ${z.maxNumber} selection${z.maxNumber!==1?"s":""} allowed`),z.options.forEach(F=>{Z.showImage=Z.showImage||!!F.defaultImageURL,F.showAttributesModal=!1,F.calculateRules=U.has("option."+F.publishKey),console.info("option.calculateRules",F.calculateRules),F.qty=z.minQuantity||1,F.getTags=()=>(F.attributes=F.attributes||[],F.attributes.filter(j=>j.value!==null&&j.value!=="").map(j=>({label:j.label,value:j.value}))),Object.defineProperty(F,"isDisabled",{get:function(){return F.relationshipInfo.relationship==="Kit"||(z.isRadio?z.isKit:!z.selected.includes(F.itemId)&&z.maxNumber===z.selected.length)}}),P(F)})})}),M}function P(M){M.isAttributes=M.attributes&&M.attributes.length>0;const U=M.catalogItem;if(I.value.has(M.itemId)){const Z=I.value.get(M.itemId);M.qliId=Z.Id,M.qty=Z.XX_ORD1__QTY__c,M.itemName=Z.XX_ORD1__Line_Description__c,M.billingPeriod=Z.XX_ORD1__Billing_Period__c,M.price=Z.XX_ORD1__Sales_Price__c,M.billingPeriod?M.price=Z.XX_ORD1__Sales_Price__c||Z.XX_ORD1__MRC__c:M.price=Z.XX_ORD1__NRC__c||Z.XX_ORD1__Sales_Price__c,M.salesPrice=Z.XX_ORD1__Sales_Price__c,M.nrc=Z.XX_ORD1__NRC__c,M.mrc=Z.XX_ORD1__MRC__c,M.qliBillingPeriod=Z.XX_ORD1__Billing_Period__c,p.value.set(M.qliId,M.attributes)}else M.itemName=U.XX_ORD1__Line_Description__c||M.itemName,M.price=U.XX_ORD1__Negotiated_Price__c||U.XX_ORD1__NRC_for_New__c,M.nrcPrice=U.XX_ORD1__NRC_for_New__c,M.qty=M.qty||1,o4(M)}async function w(){d.value.lineItem=!0,console.info("getLineItems",i.value,a.value);try{const M={objectId:i.value,filters:{},additionalFields:["Name","XX_ORD1__Line_Description__c","XX_ORD1__SYS_Configuration_Status2__c"],primarySort:{field:"CreatedDate",direction:"DESC"},productPage:{limit:200,offset:0,productLineItemId:a.value}},U=await e.value.getLineItems({request:JSON.stringify(M)});return(U.data.products||[]).forEach(z=>{const F=z.productLineItem;F.Id===a.value?c.value=z:v.value.push(F)}),console.info("lineItem.value",c.value),console.info("configurableLineItems.value",v.value),d.value.lineItem=!1,U}catch(M){return console.info("error",M.message),d.value.lineItem=!1,!1}}async function D(M){console.info("getRecords");try{const U=await window.productManagerController.getRecords({request:JSON.stringify(M)});return console.info("getRecords:result",U),JSON.parse(U.data)}catch(U){return console.info("error",U.message),!1}}async function L(){g.value=!0,d.value.save=!0,console.info("maintainQuoteConfiguration");const M=[],U=[];s.value.categoryOptions.forEach(F=>{F.itemTypes.forEach(j=>{j.options.forEach(se=>{j.selected.includes(se.itemId)?M.push($(se)):se.qliId&&U.push(se.qliId)})})});const Z={objectId:i.value,eCatalogId:t.eCatalogId,isGenesisAI:!0,blinkUser:!1,optionsToRemove:U,grandFatheredOptionsToRemove:[],productLineItem:{...$(s.value),optionLineItems:M}};console.info("maintainQuoteConfiguration:request",Z);const z=await e.value.maintainQuoteConfiguration({request:JSON.stringify(Z)});if(console.info("maintainQuoteConfiguration:result",z),z!=null&&z.error){const F={title:"Unable to Save Configuration",description:z.error,button:{label:"Back to Configuration",action:()=>{g.value=!1}},cancel:{label:"Quote List",action:()=>{r.push("/quote-item?id="+i.value)}}};n.errorPopup=F}else if(u.value=JSON.parse(JSON.stringify(s.value)),console.info("maintainQuoteConfiguration:result",z),d.value.save=!1,!a.value)return s.value.qliId=z.data.productLineItem.lineItemId,a.value=z.data.productLineItem.lineItemId,z.data.productLineItem.lineItemId;d.value.save=!1}function $(M){const U={};M.isAttributes&&M.attributes.forEach(z=>{!z.apiName.includes(".")&&z.value!==null&&z.value!==void 0&&(z.dataType==="BOOLEAN"?U[z.apiName]=z.value?"true":"false":z.dataType==="REFERENCE"?U[z.apiName]=z.referenceRecordId:U[z.apiName]=z.value)});const Z={attributes:U,itemId:M.itemId,lineItemId:M.qliId,lineDescription:M.itemName,qty:M.qty,billingPeriod:M.billingPeriod,...M.offer};return M.billingPeriod&&_.value&&!t.isSinglePricingSchema&&(Z.billingPeriod=m.value?"Yearly":"Monthly"),!t.isSinglePricingSchema&&!M.billingPeriod?Z.nrcPrice=M.price:(Z.applyOnField="Catalog Price",Z.salesPrice=M.price,Z.nrcPrice=M.nrcPrice),Z}async function W(){const M={objectId:t.accountId,productItemId:o.value};try{let U=await e.value.getProductCrossSells(M);const{crossSells:Z,offerResult:z}=U.data;if(Z.length===0)return[];const F=new Map;return z.forEach(j=>{F.set(j.eCatalogItemId,{...j,...j.pricingTypes[0]})}),Z.forEach(j=>{j.loading=!1,j.Name=j.XX_ORD1__Line_Description__c||j.XX_ORD1__Item__r.Name,j.Description=j.XX_ORD1__Item__r.XX_ORD1__Product_Description__c,F.has(j.Id)?(j.Price=F.get(j.Id).offerPrice,j.priceFormatted=F.get(j.Id).formattedOfferPrice,j.offer={offerDiscount:F.get(j.Id).offerDiscount,offerId:F.get(j.Id).offerId,offerType:F.get(j.Id).offerType}):(j.Price=j.XX_ORD1__List_Price2__c,j.priceFormatted=j.XX_ORD1__List_Price2__c,j.offer={offerDiscount:0,offerId:null,offerType:null})}),Z}catch(U){return console.info("error",U.message),!1}}const H=M=>!M||!Array.isArray(M)?[]:M.filter(U=>U.apiName&&U.value!==null&&U.value!==void 0&&U.value!=="").map(U=>({attrName:U.apiName,attrValue:U.dataType==="BOOLEAN"?U.value:U.value||"",dataType:U.dataType}));async function X(M,U){const Z={product:{publishKey:s.value.publishKey,attributes:H(s.value.attributes),lineDescription:s.value.itemName,meta:{XX_ORD1__Sales_Price__c:s.value.price,XX_ORD1__MRC__c:s.value.mrc,XX_ORD1__NRC__c:s.value.nrc,XX_ORD1__YRC__c:s.value.yrc,quantity:s.value.qty}},options:[]};s.value.categoryOptions.forEach(j=>{j.itemTypes.forEach(se=>{se.options.forEach(fe=>{se.selected.includes(fe.itemId)&&Z.options.push({publishKey:fe.publishKey,attributes:H(fe.attributes),lineDescription:fe.itemName,meta:{XX_ORD1__Sales_Price__c:fe.price,XX_ORD1__MRC__c:fe.mrc,XX_ORD1__NRC__c:fe.nrc,XX_ORD1__YRC__c:fe.yrc,quantity:fe.qty}})})})}),console.info("evaluateConfigSelection:currentConfig.options",Z.options);const z={itemId:o.value,currentConfig:Z,selected:M?{publishKey:M==null?void 0:M.publishKey,attributes:H(M.attributes),lineDescription:M.itemName}:{},unselected:U?{publishKey:U==null?void 0:U.publishKey,attributes:H(U.attributes),lineDescription:U.itemName}:{}};return await e.value.evaluateConfigurationSelection({request:JSON.stringify(z)})}async function ee(M){const U={objectId:i.value,lstLIRequest:[{eCatalogItemId:M.Id,quantity:1,offerApplicable:M.offer}]};try{const Z=await e.value.addLines({request:JSON.stringify(U)});console.info("addLines:result",Z)}catch(Z){return console.info("error",Z.message),!1}}return{itemId:o,configuration:s,_configurationCopy:u,lineItem:c,savedScreen:g,loading:d,summary:b,addOns:S,summaryPrices:A,optionByItemId:I,attributesByQLIId:p,optionByPublishKey:B,showYearlyPricing:m,isYearlyPricingExist:_,isChangedConfiguration:x,isRecurringPricingSchema:y,configurableLineItems:v,suggestedConfigurations:l,initializeController:G,exposeProperties:R,updateCurrentConfiguration:k,changePricingScheme:N,addLines:ee,resetConfigurator:q,getRecords:D,getProductCrossSells:W,initConfigurator:Y,maintainQuoteConfiguration:L,evaluateConfigSelection:X}}),c4={class:"ect-p-4 ect-flex ect-gap-2 ect-items-center ect-justify-between ect-border-b ect-border-gray-200"},u4={class:"ect-flex ect-items-center ect-gap-3"},f4={class:"ect-text-xl ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},d4={key:0,class:"ect-flex ect-gap-1.5 ect-items-center"},h4=C("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Saving configuration...",-1),p4={key:1,class:"ect-flex ect-gap-1.5 ect-items-center"},v4=C("span",{class:"ect-text-sm ect-text-gray-700 ect-leading-relaxed"},"Configuration Saved Successfully",-1),g4={key:1,class:"ect-flex ect-flex-col ect-gap-4 ect-flex-1 ect-overflow-y-auto ect-mb-16"},m4=C("h3",{class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed ect-p-4 ect-pb-0"},"You may consider these products",-1),y4={class:"ect-flex ect-flex-col ect-gap-4 ect-p-4 ect-pt-0 ect-overflow-y-auto"},x4=["data-test-id"],_4={class:"ect-flex-1 ect-flex ect-flex-col ect-gap-2"},b4={class:"ect-text-sm ect-font-semibold ect-text-gray-800 ect-leading-tight"},C4={class:"ect-text-sm ect-font-medium ect-text-gray-600 ect-leading-relaxed ect-line-clamp-2"},w4={class:"ect-flex ect-flex-row ect-justify-between ect-items-center"},E4={class:"ect-text-sm ect-font-semibold ect-text-gray-800"},A4={key:2,class:"ect-flex ect-flex-col ect-gap-4 ect-m-4 ect-flex-1 ect-overflow-y-auto"},k4=C("h3",{class:"ect-text-lg ect-font-semibold ect-text-gray-700 ect-leading-relaxed"},"What do you want to do next?",-1),O4={class:"ect-flex ect-flex-col ect-gap-4"},S4=["data-test-id","onClick"],I4={class:"ect-flex ect-items-center ect-justify-center"},T4={class:"ect-flex ect-flex-col ect-items-center ect-gap-2 ect-w-full"},B4=["data-test-id"],D4=["data-test-id"],R4={__name:"ConfiguratorRecommend",setup(e){const n=dn();fi();const t=me(()=>n.configuration),r=te(!0),i=te(""),o=te([{icon:"configuration",title:"Back to current Product Configuration",description:"Returns to the active product configuration page.",link:"/item/overview",action:"backToConfiguration"}]),a=te(null),s=te([]),u=async p=>{p.loading=!0,await n.addLines(p),p.disabled=!0,p.loading=!1},f=me(()=>{var p;if(((p=n.suggestedConfigurations)==null?void 0:p.length)>0){const g=n.suggestedConfigurations[0];return{Name:g.product.name,Description:g.product.description,Price:g.product.salesPrice,XX_ORD1__Item__c:g.product.itemId}}return null}),c=p=>{p.action==="backToConfiguration"&&(n.savedScreen=!1)};async function v(){const p=n.configurableLineItems,g=p.filter(m=>m.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration").length;i.value=`(${p.length-g}/${p.length})`;const d=p.find(m=>m.XX_ORD1__SYS_Configuration_Status2__c=="Needs Configuration"&&m.Id!=n.qliId);return a.value=d?{Name:d.XX_ORD1__Line_Description__c,Description:d.XX_ORD1__Product_Description__c,Price:d.XX_ORD1__Sales_Price__c,XX_ORD1__Item__c:d.XX_ORD1__Item__c,Id:d.Id}:null,p}async function l(){n.resetConfigurator(),await n.initConfigurator(f.value.XX_ORD1__Item__c,null),n.updateCurrentConfiguration(n.suggestedConfigurations[0],n.suggestedConfigurations)}async function h(){n.resetConfigurator(),n.initConfigurator(a.value.XX_ORD1__Item__c,a.value.Id)}return qn(async()=>{r.value=!0;const p=await v(),g=await n.getProductCrossSells(),d=new Set;p.forEach(m=>{d.add(m.XX_ORD1__Item__c)}),g.forEach(m=>{m.disabled=d.has(m.XX_ORD1__Item__c)}),s.value=g||[],r.value=!1}),(p,g)=>(V(),J(be,null,[C("div",c4,[C("div",u4,[he(We,{icon:"arrow",symbol:"",size:12,onClick:g[0]||(g[0]=d=>Ne(n).savedScreen=!1)}),C("h2",f4,xe(t.value.itemName),1)]),Ne(n).loading.save?(V(),J("div",d4,[he(Hu,{svg:""}),h4])):(V(),J("div",p4,[he(We,{icon:"check",color:"#136E05",size:14,"data-test-id":"item-tabs-before-button-icon"}),v4]))]),r.value?(V(),Ee($u,{key:0,type:"recommendations",rows:4})):s.value.length>0?(V(),J("div",g4,[m4,C("div",y4,[(V(!0),J(be,null,Me(s.value,(d,m)=>(V(),J("div",{key:d.Id||m,class:"ect-bg-white ect-border ect-border-gray-300 ect-rounded-md ect-p-3 ect-flex ect-flex-col","data-test-id":`configurator-recommend-card-${d.Id||m}`},[C("div",_4,[C("h4",b4,xe(d.Name),1),C("p",C4,xe(d.Description),1)]),C("div",w4,[C("div",E4,xe(Ne(Pt)(d.Price)),1),he(Ut,{btype:d.disabled?"secondary":"primary","button-style":d.disabled?"normal":"outlined",size:"medium",class:we({"ect-w-[120px]":d.loading}),loading:d.loading,disabled:d.disabled||d.loading,"data-test-id":`configurator-recommend-button-add-${d.Id||m}`,onClick:y=>u(d)},{default:Ve(()=>[Fe(xe(d.loading?"":d.disabled?"Added to Quote":"Add to Quote"),1)]),_:2},1032,["btype","button-style","class","loading","disabled","data-test-id","onClick"])])],8,x4))),128))])])):(V(),J("div",A4,[k4,C("div",O4,[(V(!0),J(be,null,Me(o.value,(d,m)=>(V(),J("div",{key:d.title||m,class:"ect-bg-white ect-border ect-border-[#DEDEDE] ect-rounded-xl ect-p-4 md:ect-p-5 lg:ect-p-6 ect-flex ect-flex-col ect-items-center ect-gap-4 md:ect-gap-6 lg:ect-gap-8 ect-cursor-pointer ect-transition-all ect-duration-200 hover:ect-shadow-md hover:ect-border-gray-400","data-test-id":`configurator-recommend-redirect-card-${m}`,onClick:y=>c(d)},[C("div",I4,[he(We,{icon:d.icon,size:20,color:"#000000","data-test-id":`configurator-recommend-redirect-icon-${m}`},null,8,["icon","data-test-id"])]),C("div",T4,[C("h4",{class:"ect-text-sm ect-font-semibold ect-text-[#5F5F5F] ect-text-center ect-leading-[1.43]","data-test-id":`configurator-recommend-redirect-title-${m}`},xe(d.title),9,B4),C("p",{class:"ect-text-sm ect-font-normal ect-text-[#828282] ect-text-center ect-leading-[1.71]","data-test-id":`configurator-recommend-redirect-description-${m}`},xe(d.description),9,D4)])],8,S4))),128))])])),f.value?(V(),Ee(ju,{key:3,title:"Configuere next AI suggested product","configuered-product":f.value,"count-configued-product-string":i.value,onConfigureNextProduct:l},null,8,["configuered-product","count-configued-product-string"])):(V(),Ee(ju,{key:4,title:`Configuere next product from your quote ${i.value}`,"configuered-product":a.value,"count-configued-product-string":i.value,onConfigureNextProduct:h},null,8,["title","configuered-product","count-configued-product-string"]))],64))}},L4=["data-test-id"],N4=Re({__name:"AppPill",props:{variant:{type:String,default:"",validator:e=>["success","error",""].includes(e)},dataTestId:{type:String,default:""}},setup(e){return(n,t)=>(V(),J("span",{class:we(["ect-pill",{"ect-pill-success":e.variant==="success","ect-pill-error":e.variant==="error","ect-pill-default":!e.variant}]),"data-test-id":e.dataTestId},[Je(n.$slots,"default",{},void 0,!0)],10,L4))}},[["__scopeId","data-v-c7f05fa0"]]),F4=["data-test-id"],P4=["data-test-id"],M4=["data-test-id","onClick"],q4=["data-test-id"],$4=Re({__name:"AppTabsV2",props:{showTabs:{type:Boolean,default:!0},modelValue:{type:String,default:""},border:{type:Boolean,default:!1},tabs:{type:Array,required:!0,validator:e=>e.every(n=>typeof n=="object"&&n.title&&n.key&&(n.sections===void 0||Array.isArray(n.sections)))},dataTestId:{type:String,required:!0}},emits:["update:modelValue","tab-change"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>{var a;return t.modelValue||((a=t.tabs[0])==null?void 0:a.key)||""}),o=a=>{r("update:modelValue",a),r("tab-change",a)};return(a,s)=>(V(),J("div",{class:"ect-page-tabs","data-test-id":e.dataTestId},[e.showTabs?(V(),J("div",{key:0,class:we(["ect-page-tabs-header",[{"ect-tab-border":e.border}]]),"data-test-id":`${e.dataTestId}-header`},[(V(!0),J(be,null,Me(e.tabs,u=>(V(),J("button",{key:u.key,class:we(["ect-page-tab-button",`ect-page-tab-button${i.value===u.key?"-active":""} ${u.tabClass||""}`]),"data-test-id":`${e.dataTestId}-tab-${u.key}`,onClick:f=>o(u.key)},[Fe(xe(u.title)+" ",1),u.pill!==void 0&&u.pill!==null?(V(),Ee(N4,{key:0,class:"ect-ml-2",variant:u.pillStyle,"data-test-id":`${e.dataTestId}-tab-${u.key}-pill`},{default:Ve(()=>[Fe(xe(u.pill),1)]),_:2},1032,["variant","data-test-id"])):ge("",!0)],10,M4))),128))],10,P4)):ge("",!0),C("div",{class:"ect-page-tab-content","data-test-id":`${e.dataTestId}-content`},null,8,q4)],8,F4))}},[["__scopeId","data-v-f22cb1ed"]]),j4=["data-test-id"],H4=["disabled","data-test-id"],V4=["value","disabled","data-test-id"],U4=["disabled","data-test-id"],Do={__name:"CounterButton",props:{value:{type:Number,required:!0,default:null},min:{type:Number,default:1},max:{type:Number,default:999},empty:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataTestId:{type:String,required:!0}},emits:["update:value","change"],setup(e,{emit:n}){const t=e,r=n,i=me(()=>t.min==null?0:t.min),o=me(()=>t.max==null?999:t.max),a=(x,b,S)=>Math.min(Math.max(x,b),S),s=x=>{if(x==null||x==="")return NaN;const b=Number(x);return Number.isFinite(b)?b:NaN},u=te(null),f=te(t.value??i.value),c=x=>{f.value=a(x,i.value,o.value)};t.value!==null&&c(t.value);const v=me(()=>f.value),l=me(()=>u.value!=null?u.value:String(v.value)),h=me(()=>t.disabled||v.value<=i.value),p=me(()=>t.disabled||v.value>=o.value);function g(x){x!==t.value&&(f.value=x,r("update:value",x),r("change",x))}function d(){if(h.value)return;const x=a(v.value-1,i.value,o.value);u.value=null,g(x)}function m(){if(p.value)return;const x=a(v.value+1,i.value,o.value);u.value=null,g(x)}function y(x){const S=String(x.target.value??"").replace(/\D+/g,"");u.value=S}function _(){const x=s(u.value),b=i.value,S=a(Number.isNaN(x)?b:x,i.value,o.value);u.value=null,g(S)}return(x,b)=>(V(),J("div",{class:"ect-flex ect-items-center ect-gap-1","data-test-id":e.dataTestId},[C("button",{type:"button",class:we(["ect-h-7 ect-w-7 ect-border ect-border-gray ect-rounded-md ect-flex ect-items-center ect-justify-center ect-text-gray-700 ect-text-sm hover:ect-border-gray-400 ect-transition-colors ect-bg-white",{"ect-opacity-50":h.value,"ect-cursor-not-allowed":h.value}]),disabled:h.value,"data-test-id":`${e.dataTestId}-decrement`,onClick:d}," - ",10,H4),C("input",{type:"text",inputmode:"numeric",pattern:"[0-9]*",value:e.empty?"":l.value,disabled:e.disabled,class:"ect-h-7 ect-w-[48px] ect-px-2 ect-border ect-border-gray ect-rounded-md ect-text-center ect-text-sm ect-font-medium ect-text-gray-900 focus:ect-outline-none focus:ect-border-gray-400 ect-bg-white","data-test-id":`${e.dataTestId}-input`,onInput:y,onBlur:_},null,40,V4),C("button",{type:"button",class:we(["ect-h-7 ect-w-7 ect-border ect-border-gray ect-rounded-md ect-flex ect-items-center ect-justify-center ect-text-gray-700 ect-text-sm hover:ect-border-gray-400 ect-transition-colors ect-bg-white",{"ect-opacity-50":p.value,"ect-cursor-not-allowed":p.value}]),disabled:p.value,"data-test-id":`${e.dataTestId}-increment`,onClick:m}," + ",10,U4)],8,j4))}},z4={class:"ect-flex ect-justify-end ect-items-center ect-gap-2.5 ect-px-6 ect-py-4 ect-bg-white ect-border-t ect-border-gray-300 ect-shadow-[0_-2px_4px_0px_rgba(0,0,0,0.11)]","data-test-id":"configurator-footer"},K4={"data-test-id":"configurator-footer-quantity"},X4={class:"ect-flex ect-justify-end ect-items-center ect-gap-6 ect-px-8 ect-py-0 ect-flex-1","data-test-id":"configurator-footer-prices"},W4=["data-test-id"],G4=["data-test-id"],Q4=["data-test-id"],Z4=["data-test-id"],J4={__name:"ConfiguratorFooter",props:{item:{type:Object,required:!0,default:()=>{}},disabled:{type:Boolean,default:!1},btnText:{type:String,default:"Save"}},emits:["update:qty","continue"],setup(e,{emit:n}){const t=dn(),r=e,i=te(r.item),o=me(()=>{const u=t.summaryPrices,f=[];return t.isRecurringPricingSchema?(f.push({label:"One Time Price",value:u.oneTimePrice,highlight:!1}),f.push({label:t.showYearlyPricing?"Yearly Price":"Monthly Price",value:u.recurringPrice,highlight:!1})):(f.push({label:"Base Price",value:u.basePrice,highlight:!1}),f.push({label:"Add Ons",value:u.addOns,highlight:!1}),f.push({label:"Total Price",value:u.total,highlight:!1})),f}),a=n,s=()=>{r.disabled||a("continue")};return(u,f)=>(V(),J("footer",z4,[C("div",K4,[he(Do,{value:i.value.qty,"onUpdate:value":f[0]||(f[0]=c=>i.value.qty=c),min:1,max:999,disabled:e.disabled,"is-selected":!0,"data-test-id":"configurator-footer-counter-button"},null,8,["value","disabled"])]),C("div",X4,[(V(!0),J(be,null,Me(o.value,(c,v)=>(V(),J(be,{key:v},[C("div",{class:"ect-flex ect-flex-col ect-justify-center","data-test-id":`configurator-footer-price-${v}`},[C("span",{class:"ect-text-xs ect-font-normal ect-text-gray-500 ect-text-left","data-test-id":`configurator-footer-price-label-${v}`},xe(c.label),9,G4),C("span",{class:we(["ect-text-left",c.highlight?"ect-text-lg ect-font-bold ect-text-green-700":"ect-text-sm ect-font-medium ect-text-gray-800 "]),"data-test-id":`configurator-footer-price-value-${v}`},xe(Ne(Pt)(c.value)),11,Q4)],8,W4),v<o.value.length-1?(V(),J("div",{key:0,class:"ect-w-0 ect-h-5 ect-border-l ect-border-gray-400","data-test-id":`configurator-footer-divider-${v}`},null,8,Z4)):ge("",!0)],64))),128))]),he(Ut,{class:"ect-min-w-[100px]",btype:e.disabled?"secondary":"primary",disabled:e.disabled,"button-style":"primary",size:"medium","data-test-id":"configurator-footer-button-continue",onClick:s},{default:Ve(()=>[Fe(xe(e.btnText),1)]),_:1},8,["btype","disabled"])]))}},Y4={class:"ect-w-full ect-bg-white ect-mb-4","data-test-id":"configurator-type-section"},e6={class:"ect-sticky ect-top-0 ect-z-30 ect-bg-white ect-shadow-sm ect-p-3 ect-px-4 ect-border-b ect-border-gray-200 ect-flex ect-justify-between ect-items-center","data-test-id":"configurator-type-header-sticky"},t6={class:"ect-flex ect-flex-col"},n6={class:"ect-font-bold ect-text-text-success ect-leading-tight"},r6=["innerHTML"],i6={key:0,class:"ect-flex ect-items-center ect-gap-2 ect-px-2 ect-py-1","data-test-id":"configurator-type-message"},o6={class:"ect-text-xs ect-font-medium ect-text-gray-600 ect-leading-tight ect-min-w-[190px]"},a6={class:"ect-divide-y ect-divide-gray-100 ect-overflow-y-auto"},s6={__name:"ConfiguratorType",props:{title:{type:String,required:!0},description:{type:String,default:""},message:{type:String,default:""}},setup(e){return(n,t)=>(V(),J("section",Y4,[C("header",e6,[C("div",t6,[C("h2",n6,xe(e.title),1),e.description?(V(),J("p",{key:0,class:"ect-mt-1 ect-text-xs ect-text-gray-500 ect-leading-tight",innerHTML:e.description},null,8,r6)):ge("",!0)]),e.message?(V(),J("div",i6,[he(We,{icon:"info",symbol:"",color:"#198708",size:14,"data-test-id":"configurator-type-message-icon"}),C("span",o6,xe(e.message),1)])):ge("",!0)]),C("div",a6,[Je(n.$slots,"default")])]))}},l6={__name:"ShadowDisplay",props:{content:{type:String,required:!0}},setup(e){const n=e,t=te(null);let r=null;return Ft(()=>{t.value&&!r&&(r=t.value.attachShadow({mode:"open"}),r.innerHTML=n.content)}),Ye(()=>n.content,i=>{r&&(r.innerHTML=i)}),(i,o)=>(V(),J("div",{ref_key:"host",ref:t},null,512))}},c6=["data-test-id"],u6=["data-test-id"],f6=["data-test-id"],d6=[C("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[C("g",{id:"Group"},[C("path",{id:"Vector",d:"M7 1.3125V12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"}),C("path",{id:"Vector_2",d:"M1.3125 7H12.6875",stroke:"#A86200","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)],h6=["data-test-id"],p6=["data-test-id"],v6=["data-test-id"],g6=["data-test-id"],m6=["data-test-id"],y6=["data-test-id","innerHTML"],hn={__name:"Tag",props:{label:{type:String,default:""},value:{type:String,default:""},addButton:{type:Boolean,default:!1},editButton:{type:Boolean,default:!1},dataTestId:{type:String,default:""}},setup(e){const n=e,t=me(()=>{const r=n.value;if(typeof r!="string")return!1;const i=new DOMParser().parseFromString(r,"text/html");return Array.from(i.body.childNodes).some(o=>o.nodeType===1)});return(r,i)=>e.addButton?(V(),J("div",{key:0,class:"ect-bg-orange-4 ect-flex ect-gap-1 ect-justify-center ect-items-center ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-text-center ect-rounded-md ect-border ect-border-solid ect-border-orange-secondary","data-test-id":e.dataTestId},[C("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-orange-secondary ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-content`},[C("div",{"data-test-id":`${e.dataTestId}-add-icon`},d6,8,f6),Fe(" "+xe(e.label),1)],8,u6)],8,c6)):e.editButton?(V(),J("div",{key:1,class:"ect-bg-white ect-flex ect-gap-1 ect-justify-center ect-items-center ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-text-center ect-rounded-md ect-border ect-border-solid ect-border-success","data-test-id":e.dataTestId},[C("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-success ect-flex ect-items-center ect-gap-1","data-test-id":`${e.dataTestId}-content`},xe(e.label),9,p6)],8,h6)):(V(),J("div",{key:2,class:"ect-bg-white ect-px-2 ect-py-0.5 ect-text-xs ect-font-medium ect-rounded-md ect-border ect-border-solid ect-border-neutral-200","data-test-id":e.dataTestId},[C("span",{class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${e.dataTestId}-label`},xe(e.label),9,g6),e.value?(V(),J("span",{key:0,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-zinc-500","data-test-id":`${e.dataTestId}-separator`}," : ",8,m6)):ge("",!0),t.value?(V(),Ee(l6,{key:1,content:e.value},null,8,["content"])):e.value?(V(),J("span",{key:2,class:"ect-self-stretch ect-my-auto ect-text-xs ect-leading-5 ect-text-neutral-700","data-test-id":`${e.dataTestId}-value`,innerHTML:e.value},null,8,y6)):ge("",!0)],8,v6))}},x6=["data-test-id"],_6=["data-test-id"],b6=["data-test-id"],C6=["type","step","min","data-test-id"],fs=Re({__name:"InputEdit",props:{modelValue:{type:[String,Number],required:!0},type:{type:String,default:"string",validator:e=>["string","number","currency"].includes(e)},tag:{type:String,default:"span"},disabled:{type:Boolean,default:!1},dataTestId:{type:String,required:!0}},emits:["update:modelValue","change"],setup(e,{expose:n,emit:t}){const r=e,i=t,o=te(!1),a=te(!1),s=te(""),u=te(null),f=me(()=>r.type==="currency"?m(r.modelValue):r.type==="number"?y(r.modelValue):r.modelValue),c=me(()=>r.type==="string"?"text":"number"),v=me(()=>r.type==="currency"?"0.01":void 0),l=me(()=>r.type==="currency"?"0":void 0),h=()=>{r.disabled||(r.type==="currency"?s.value=parseFloat(r.modelValue)||"0.00":r.type==="number"?s.value=parseFloat(r.modelValue)||"0":s.value=r.modelValue,o.value=!0,sn(()=>{u.value&&(u.value.focus(),u.value.select())}))},p=()=>{let _=s.value;if(r.type==="number"||r.type==="currency"){const x=parseFloat(s.value);isNaN(x)?_=r.modelValue:_=r.type==="currency"?x.toFixed(2):x.toString()}_!==r.modelValue&&(i("update:modelValue",_),i("change",_)),o.value=!1},g=()=>{s.value=r.modelValue,o.value=!1},d=()=>{o.value&&p()},m=_=>!_||isNaN(_)?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(parseFloat(_)),y=_=>!_||isNaN(_)?"0":new Intl.NumberFormat("en-US").format(parseFloat(_));return Ye(()=>r.modelValue,_=>{o.value||(s.value=_)}),n({startEditing:h,saveChanges:p,cancelEditing:g}),(_,x)=>{const b=l1("click-outside");return V(),J("div",{class:"ect-relative ect-inline-block ect-min-w-[60px] ect-h-[30px]","data-test-id":e.dataTestId,onMouseenter:x[1]||(x[1]=S=>a.value=!0),onMouseleave:x[2]||(x[2]=S=>a.value=!1)},[o.value?ln((V(),J("div",{key:1,class:"ect-w-full ect-h-full","data-test-id":`${e.dataTestId}-input-wrapper`},[ln(C("input",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":x[0]||(x[0]=S=>s.value=S),type:c.value,step:v.value,min:l.value,class:we(["ect-w-full ect-h-full ect-px-3 ect-bg-white ect-border ect-border-green-500 ect-rounded-sm ect-text-gray-700 ect-text-base ect-font-sans ect-outline-none ect-duration-200",_.$attrs.class]),"data-test-id":`${e.dataTestId}-input`,onKeyup:[ir(p,["enter"]),ir(g,["esc"])],onBlur:p},null,42,C6),[[Oh,s.value]])],8,b6)),[[b,d]]):(V(),J("div",{key:0,class:we(["ect-flex ect-items-center ect-gap-2 ect-rounded ect-transition-colors ect-duration-200",{"ect-cursor-pointer":!e.disabled}]),"data-test-id":`${e.dataTestId}-display`,onClick:h},[(V(),Ee(Wi(e.tag),ao(_.$attrs,{class:"ect-m-0 ect-text-inherit","data-test-id":`${e.dataTestId}-text`}),{default:Ve(()=>[Fe(xe(f.value)+" ",1),he(We,{class:we(a.value&&!e.disabled?"ect-visible":"ect-invisible"),icon:"edit",size:"12",color:"#828282","data-test-id":`${e.dataTestId}-edit-icon`},null,8,["class","data-test-id"])]),_:1},16,["data-test-id"]))],10,_6))],40,x6)}}},[["__scopeId","data-v-5cd60070"]]),L0=e=>(jt("data-v-b9675cf1"),e=e(),Ht(),e),w6=["data-test-id","data-publish-key"],E6={key:0,class:"ect-text-xs ect-text-gray-500 ect-text-white ect-font-medium ect-leading-tight ect-absolute ect-top-[-.7rem] ect-left-[-1rem] ect-bg-text-success ect-rounded-xl ect-px-2 ect-py-1"},A6={key:1,class:"ect-flex ect-items-start ect-gap-4 ect-p-3 ect-px-4"},k6={key:0,class:"ect-w-16 ect-h-16 ect-flex ect-items-center ect-justify-center ect-rounded-lg ect-bg-gray-200 ect-flex-shrink-0"},O6=["src","alt"],S6={class:"ect-flex-1 ect-min-w-0"},I6={class:"ect-flex ect-gap-4 ect-items-center ect-justify-between"},T6={class:"ect-flex ect-flex-row ect-gap-3"},B6=L0(()=>C("div",{class:"ect-w-px ect-h-auto ect-bg-gray-200 ect-mx-2"},null,-1)),D6={class:"ect-flex ect-flex-col ect-max-w-[125px]"},R6={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},L6=["innerHTML"],N6={key:0,class:"ect-flex ect-flex-wrap ect-gap-2.5 ect-mt-2"},F6=["data-test-id"],P6=["data-test-id"],M6={key:1,class:"ect-inline-block ect-mb-2"},q6={key:2,class:"ect-flex ect-flex-col ect-gap-3 ect-p-3 ect-h-full ect-justify-between"},$6={class:"ect-flex ect-items-start ect-gap-2"},j6={key:0,class:"ect-w-16 ect-h-16 ect-rounded-lg ect-bg-gray-200 ect-flex-shrink-0 ect-overflow-hidden"},H6=["src","alt"],V6={class:"ect-flex-1 ect-min-w-0"},U6={class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},z6=["innerHTML"],K6={class:"temp-hidden"},X6={class:"ect-flex ect-items-start ect-justify-center ect-ml-2 ect-mt-0"},W6={key:0,class:"ect-flex ect-flex-wrap ect-gap-1.5"},G6=["data-test-id"],Q6=["data-test-id"],Z6={key:1,class:"ect-inline-block ect-mb-2"},J6={class:"ect-flex ect-justify-between ect-items-center"},Y6={class:"ect-flex ect-flex-col"},e8=L0(()=>C("p",{class:"ect-text-xs ect-text-gray-500 ect-font-medium ect-leading-tight"},"Price",-1)),t8={key:3,"data-test-id":"configurator-item-slot-details",class:"ect-bg-white ect-rounded-md"},n8=Re({__name:"ConfiguratorItem",props:{item:{type:Object,required:!0},name:{type:String,required:!0},description:{type:String,default:""},imageUrl:{type:String,default:""},price:{type:Number,required:!0},quantity:{type:Number,default:1},selected:{type:Boolean,default:!1},tags:{type:Array,default:()=>[]},attributes:{type:Array,default:()=>[]},size:{type:Number,default:1},minQuantity:{type:Number,default:null},maxQuantity:{type:Number,default:null},showImage:{type:Boolean,default:!1},option:{type:Object,default:null},isAttributes:{type:Boolean,default:!1},showAttributes:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:quantity","update:name","edit-attributes"],setup(e,{emit:n}){const t=e,r=n,i=te(null),o=te(0),a=te(t.item),s=me(()=>a.value.relationshipInfo.relationship==="Kit"?"ect-bg-green-3 ect-border-gray-200 ect-border-success":t.disabled?"ect-bg-light-bg-x ect-border-gray-200":t.selected?"ect-bg-green-3 ect-border-gray-200 ect-border-success":"ect-bg-white ect-border-gray-200 hover:ect-border-success"),u=me({get:()=>t.quantity,set:p=>r("update:quantity",p)}),f=me({get:()=>t.name,set:p=>r("update:name",p)}),c=p=>{r("update:quantity",p)},v=me(()=>{if(o.value===0)return t.tags;const g=Math.floor(o.value/120);return t.tags.slice(0,Math.max(1,g))}),l=me(()=>Math.max(0,t.tags.length-v.value.length)),h=()=>{if(i.value){const p=i.value,g=80,d=120,m=32,y=64;o.value=p.offsetWidth-g-d-m-y}};return Ft(()=>{sn(()=>{h()})}),Ye(()=>t.tags,()=>{sn(()=>{h()})},{deep:!0}),Ft(()=>{window.addEventListener("resize",h)}),(p,g)=>(V(),J("div",{ref_key:"containerRef",ref:i,class:we(["ect-w-full ect-rounded-md ect-border-1 ect-transition-colors ect-relative",s.value]),"data-test-id":`configurator-item-${e.item.itemId}`,"data-publish-key":e.item.publishKey},[e.item.relationshipInfo.relationship==="Kit"?(V(),J("div",E6," KIT ")):ge("",!0),e.size===1?(V(),J("div",A6,[e.showImage?(V(),J("div",k6,[e.imageUrl?(V(),J("img",{key:0,src:e.imageUrl,alt:f.value,class:"ect-w-full ect-h-full ect-object-cover"},null,8,O6)):(V(),Ee(We,{key:1,disabled:"",icon:"image",symbol:"",size:20,color:"#ACACAC"}))])):ge("",!0),C("div",S6,[C("div",I6,[he(fs,{modelValue:f.value,"onUpdate:modelValue":g[0]||(g[0]=d=>f.value=d),tag:"h3","data-test-id":"itemId"+e.item.itemId,class:"ect-text-sm ect-font-semibold ect-text-gray-900 ect-leading-tight"},null,8,["modelValue","data-test-id"]),C("div",T6,[C("div",{onClick:g[2]||(g[2]=mt(()=>{},["stop"]))},[he(Do,{value:u.value,"onUpdate:value":g[1]||(g[1]=d=>u.value=d),min:e.minQuantity,max:e.maxQuantity,"data-test-id":`configurator-item-counter-${e.item.itemId}`,onChange:c},null,8,["value","min","max","data-test-id"])]),B6,C("div",D6,[he(fs,{modelValue:a.value.price,"onUpdate:modelValue":g[3]||(g[3]=d=>a.value.price=d),tag:"p",type:"currency","data-test-id":"itemId"+e.item.itemId,class:"ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])]),C("div",R6,[Je(p.$slots,"selection-control",{},void 0,!0)])])]),C("p",{class:"ect-mt-2 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:e.description},null,8,L6),e.isAttributes&&e.showAttributes&&e.selected?(V(),J("div",N6,[a.value.getTags().length>0?(V(),J(be,{key:0},[(V(!0),J(be,null,Me(v.value,(d,m)=>(V(),J("span",{key:m,class:"ect-inline-block"},[he(hn,{label:d.label,value:d.value},null,8,["label","value"])]))),128)),l.value>0?(V(),J("button",{key:0,type:"button",class:"ect-text-xs ect-text-gray-700 ect-border ect-border-gray-300 ect-rounded-md ect-px-2 ect-py-0.5","data-test-id":`configurator-item-button-more-tags-${e.item.itemId}`,onClick:g[4]||(g[4]=mt(()=>{},["stop"]))}," +"+xe(l.value)+" more ",9,F6)):ge("",!0),e.selected?(V(),J("button",{key:1,"data-test-id":`configurator-item-button-edit-attributes-${e.item.itemId}`,onClick:g[5]||(g[5]=d=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})],8,P6)):ge("",!0)],64)):(V(),J("span",M6,[C("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:g[6]||(g[6]=d=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))])):ge("",!0)])])):(V(),J("div",q6,[C("div",$6,[e.showImage?(V(),J("div",j6,[e.imageUrl?(V(),J("img",{key:0,src:e.imageUrl,alt:e.name,class:"ect-w-full ect-h-full ect-object-cover"},null,8,H6)):ge("",!0)])):ge("",!0),C("div",V6,[C("h3",U6,xe(e.name),1),C("p",{class:"ect-mt-1 ect-text-sm ect-text-gray-700 ect-leading-tight",innerHTML:e.description},null,8,z6),C("p",K6,xe(e.item.publishKey)+" :: "+xe(e.item.calculateRules),1)]),C("div",X6,[Je(p.$slots,"selection-control",{},void 0,!0)])]),e.isAttributes&&e.showAttributes&&e.selected?(V(),J("div",W6,[a.value.getTags().length>0?(V(),J(be,{key:0},[(V(!0),J(be,null,Me(v.value,(d,m)=>(V(),J("span",{key:m,class:"ect-inline-block"},[he(hn,{label:d.label,value:d.value},null,8,["label","value"])]))),128)),l.value>0?(V(),J("button",{key:0,type:"button",class:"ect-text-xs ect-text-gray-700 ect-border ect-border-gray-300 ect-rounded-md ect-px-2 ect-py-0.5","data-test-id":`configurator-item-button-more-tags-${e.item.itemId}`,onClick:g[7]||(g[7]=mt(()=>{},["stop"]))}," +"+xe(l.value)+" more ",9,G6)):ge("",!0),e.selected?(V(),J("button",{key:1,class:"ect-ml-auto","data-test-id":`configurator-item-button-edit-attributes-${e.item.itemId}`,onClick:g[8]||(g[8]=d=>r("edit-attributes"))},[he(hn,{label:"Edit attributes","edit-button":""})],8,Q6)):ge("",!0)],64)):(V(),J("span",Z6,[C("button",{"data-test-id":"configurator-info-button-add-attributes",onClick:g[9]||(g[9]=d=>r("edit-attributes"))},[he(hn,{label:"Add attributes","add-button":""})])]))])):ge("",!0),C("div",J6,[C("div",{onClick:g[11]||(g[11]=mt(()=>{},["stop"]))},[he(Do,{value:u.value,"onUpdate:value":g[10]||(g[10]=d=>u.value=d),min:e.minQuantity,max:e.maxQuantity,"data-test-id":`configurator-item-counter-${e.item.itemId}`,onChange:c},null,8,["value","min","max","data-test-id"])]),C("div",Y6,[e8,he(fs,{modelValue:a.value.price,"onUpdate:modelValue":g[12]||(g[12]=d=>a.value.price=d),tag:"p",type:"currency","data-test-id":"itemId"+e.item.itemId,class:"ect-w-[125px] ect-text-base ect-font-bold"},null,8,["modelValue","data-test-id"])])])])),e.selected&&e.isAttributes?(V(),J("div",t8,[Je(p.$slots,"default",{},void 0,!0)])):ge("",!0)],10,w6))}},[["__scopeId","data-v-b9675cf1"]]),r8={"af-ZA":",","sq-AL":",","ar-DZ":",","ar-BH":"٫","ar-EG":"٫","ar-IQ":"٫","ar-JO":"٫","ar-KW":"٫","ar-LB":"٫","ar-LY":",","ar-MA":",","ar-OM":"٫","ar-QA":"٫","ar-SA":"٫","ar-SD":"٫","ar-SY":"٫","ar-TN":",","ar-AE":"٫","ar-YE":"٫","hy-AM":",","az-AZ":",","bn-BD":".","bn-IN":".","eu-ES":",","be-BY":",","bs-BA":",","bg-BG":",","my-MM":".","ca-ES":",","ca-ES-EURO":",","zh-CN":".","zh-CN-PINYIN":".","zh-CN-STROKE":".","zh-HK":".","zh-HK-STROKE":".","zh-MO":".","zh-SG":".","zh-TW":".","zh-TW-STROKE":".","hr-HR":",","cs-CZ":",","da-DK":",","nl-AW":",","nl-BE":",","nl-NL":",","nl-SR":",","dz-BT":".","en-AG":".","en-AU":".","en-BS":".","en-BB":".","en-BZ":".","en-BM":".","en-BW":".","en-CM":".","en-CA":".","en-DE":",","en-KY":".","en-ER":".","en-FK":".","en-FJ":".","en-GM":".","en-GH":".","en-GI":".","en-GY":".","en-HK":".","en-IN":".","en-ID":".","en-IE":".","en-IE-EURO":".","en-JM":".","en-KE":".","en-LR":".","en-MG":".","en-MW":".","en-MY":".","en-MU":".","en-NA":".","en-NZ":".","en-NG":".","en-PK":".","en-PG":".","en-PH":".","en-RW":".","en-WS":".","en-SC":".","en-SL":".","en-SG":".","en-SX":".","en-SB":".","en-ZA":",","en-SH":".","en-SZ":".","en-TZ":".","en-TO":".","en-TT":".","en-UG":".","en-GB":".","en-US":".","en-VU":".","et-EE":",","fi-FI":",","fi-FI-EURO":",","fr-BE":",","fr-CA":",","fr-KM":",","fr-FR":",","fr-FR-EURO":",","fr-GN":",","fr-HT":",","fr-LU":",","fr-MR":",","fr-MC":",","fr-CH":",","fr-WF":",","ka-GE":",","de-AT":",","de-AT-EURO":",","de-BE":",","de-DE":",","de-DE-EURO":",","de-LU":",","de-LU-EURO":",","de-CH":".","el-GR":",","gu-IN":".","iw-IL":".","hi-IN":".","hu-HU":",","is-IS":",","in-ID":",","ga-IE":".","it-IT":",","it-CH":".","ja-JP":".","kn-IN":".","kk-KZ":",","km-KH":",","ko-KP":".","ko-KR":".","ky-KG":",","lo-LA":",","lv-LV":",","lt-LT":",","lu-CD":",","lb-LU":",","mk-MK":",","ms-BN":",","ms-MY":".","ml-IN":".","mt-MT":".","mi-NZ":".","mr-IN":".","ne-NP":".","no-NO":",","ps-AF":"٫","fa-IR":"٫","pl-PL":",","pt-AO":",","pt-BR":",","pt-CV":",","pt-MZ":",","pt-PT":",","pt-ST":",","ro-MD":",","ro-RO":",","rm-CH":".","rn-BI":",","ru-KZ":",","ru-RU":",","sr-BA":",","sr-RS":",","sh-BA":",","sh-ME":",","sh-ME-USD":",","sh-CS":",","sk-SK":",","sl-SI":",","so-DJ":".","so-SO":".","es-AR":",","es-BO":",","es-CL":",","es-CO":",","es-CR":",","es-CU":".","es-DO":".","es-EC":",","es-SV":".","es-GT":".","es-HN":".","es-MX":".","es-NI":".","es-PA":".","es-PY":",","es-PE":".","es-PR":".","es-ES":",","es-ES-EURO":",","es-US":".","es-UY":",","es-VE":",","sw-KE":".","sv-SE":",","tl-PH":".","tg-TJ":",","ta-IN":".","ta-LK":".","te-IN":".","th-TH":".","ti-ET":".","tr-TR":",","uk-UA":",","ur-PK":".","uz-LATN-UZ":",","vi-VN":",","cy-GB":".","xh-ZA":".","yo-BJ":".","zu-ZA":"."},i8={name:"CustomInput",components:{AppIcon:We},props:{editMode:{type:Boolean,default:!0},type:{type:String,default:"text"},max:{type:Number,default:500},label:{type:String,default:""},name:{type:String,default:""},showLabel:{type:Boolean,default:!0},modelValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},isReadOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},highlight:{type:Boolean,default:!1},placeholder:{type:String,default:""},error:{type:[Boolean,String],default:!1},cssClass:{type:Object,default:()=>({})},tooltip:{type:String,default:null},locale:{type:String,default:"en-US"},icon:{type:String,default:null},itooltip:{type:String,default:null},icolor:{type:String,default:"#7d7d7d"},ihover:{type:String,default:"#57c046"},icustom:{type:Boolean,default:!1},idisabled:{type:Boolean,default:!1},height:{type:Number,default:32},textAlignment:{type:String,default:"left"},decimalPrecision:{type:Number,default:0},allowNegatives:{type:Boolean,default:!1},size:{type:String,default:"medium"},dataTestId:{type:String,required:!0}},emits:["update:modelValue","iclick","blur"],data(){return{initialValue:"",decimalSeprator:".",ctrl:!1}},computed:{getValue(){return this.modelValue?this.type==="currency"?String(this.modelValue).replace(".",this.decimalSeprator):String(this.modelValue):""},error_message(){return typeof this.error=="string"?this.error:this.error===""?!1:this.error===!0?`${this.label||"Field"} is required`:this.error},isHighlight(){return(this.initialValue===""||this.initialValue===null)&&(this.modelValue===""||this.modelValue===null)?!1:this.initialValue!==this.modelValue}},created(){this.initialValue=this.modelValue,this.decimalSeprator=this.type==="currency"?r8[this.locale]:"."},methods:{handlerInput(e){const n=e.target.value;this.type==="currency"?this.$emit("update:modelValue",n.replace(this.decimalSeprator,".")):this.$emit("update:modelValue",n)},preventNonNumeric(e){if(this.type==="number"){const n=this.decimalPrecision,t=e.target.value,r=e.key;if(["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(r)||this.allowNegatives&&r==="-")return;if(r==="."&&n===0){e.preventDefault();return}if(r==="."&&t.includes(".")){e.preventDefault();return}if(r==="."||t.includes(".")&&!t.endsWith(".")&&r!=="Backspace"){const i=t.split(".");if(i.length>1&&i[1].length>=n){e.preventDefault();return}}if(isNaN(r)&&![".","Backspace","Tab"].includes(r)){e.preventDefault();return}}if(e.key==="Backspace"||this.ctrl)return!0;if(e.key==="Control"&&(this.ctrl=!0),this.type==="currency"||this.type==="number"){if(!this.getValue.includes(this.decimalSeprator)&&e.key===this.decimalSeprator)return!0;/[\deE+\-]/.test(e.key)||e.preventDefault()}return!0},handlerKeyup(e){e.key==="Control"&&(this.ctrl=!1)}}},o8=["data-test-id"],a8=["for","data-test-id"],s8=["data-test-id"],l8=["id","type","name","disabled","placeholder","value","maxlength","readonly","data-test-id"],c8=["data-test-id"],u8=["data-test-id"];function f8(e,n,t,r,i,o){const a=er("AppIcon");return V(),J("div",{class:"input","data-test-id":t.dataTestId},[t.label&&t.showLabel?(V(),J("label",{key:0,class:we({error_color:!!t.error}),for:t.label,"data-test-id":`${t.dataTestId}-label`},[Fe(xe(t.label)+" ",1),t.required?(V(),J("span",{key:0,class:we({error_color:!!t.error})},"*",2)):ge("",!0)],10,a8)):ge("",!0),t.editMode?(V(),J("div",{key:1,class:we(["input-wrapper ect-w-full",{errorBorder_color:!!t.error,highlight:o.isHighlight&&t.highlight}]),"data-test-id":`${t.dataTestId}-wrapper`},[t.icon?(V(),Ee(a,{key:0,class:"input-wrapper_icon",icon:t.icon,hover:t.ihover,color:t.icolor,size:19,disabled:t.idisabled,custom:t.icustom,tooltip:t.itooltip,"data-test-id":`${t.dataTestId}-icon`,direction:"top-right",onClick:n[0]||(n[0]=s=>e.$emit("iclick"))},null,8,["icon","hover","color","disabled","custom","tooltip","data-test-id"])):ge("",!0),C("input",{id:t.label,class:we(`ectheme-input-box ${t.size}`),type:t.type,style:ze({width:t.icon?"calc(100% - 36px)":"100%",height:`${t.height}px`,textAlign:t.textAlignment}),name:t.name,disabled:t.disabled,placeholder:t.placeholder,value:o.getValue,maxlength:t.max,readonly:t.isReadOnly,"data-test-id":`${t.dataTestId}-input`,onInput:n[1]||(n[1]=(...s)=>o.handlerInput&&o.handlerInput(...s)),onKeydown:n[2]||(n[2]=(...s)=>o.preventNonNumeric&&o.preventNonNumeric(...s)),onKeyup:n[3]||(n[3]=(...s)=>o.handlerKeyup&&o.handlerKeyup(...s)),onBlur:n[4]||(n[4]=s=>e.$emit("blur"))},null,46,l8)],10,s8)):ge("",!0),t.editMode?ge("",!0):(V(),J("p",{key:2,class:"value","data-test-id":`${t.dataTestId}-value`},xe(o.getValue),9,c8)),o.error_message?(V(),J("div",{key:3,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${t.dataTestId}-error`},xe(o.error_message),9,u8)):ge("",!0)],8,o8)}const d8=Re(i8,[["render",f8],["__scopeId","data-v-032ca141"]]),h8={name:"AtomSpinner",props:{dataTestId:{type:String,default:""}}},p8=["data-test-id"];function v8(e,n,t,r,i,o){return V(),J("div",{class:"spinner","data-test-id":t.dataTestId},null,8,p8)}const g8={name:"CustomDropdown",components:{AppIcon:We,AtomSpinner:Re(h8,[["render",v8],["__scopeId","data-v-771ed032"]])},props:{label:{type:String,default:""},placeholder:{type:String,default:""},options:{type:Array,default:()=>[]},display:{type:Array,default:()=>[]},modelValue:{type:String,default:""},error:{type:[Boolean,String],default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},select:{type:Boolean,default:!1},lookup:{type:Boolean,default:!1},search:{type:Boolean,default:!1},badge:{type:String,default:void 0},highlight:{type:Boolean,default:!1},property:{type:Object,default:()=>({key:"value",value:"label",assigned:"assigned"})},dropdownTheme:{type:String,default:"light"},icon:{type:String,default:""},size:{type:String,default:"medium"},dataTestId:{type:String,required:!0}},emits:["search","focus-in","focus-out","update:modelValue"],data:()=>({inputFocused:!1,value:"",isHover:!1,highlightedIndex:-1,initialValue:"",teleportStyle:{position:"absolute",top:"0px",left:"0px",width:"0px"}}),computed:{isHighlight(){return(this.initialValue===""||this.initialValue==null)&&(this.modelValue===""||this.modelValue==null)?!1:this.initialValue!==this.modelValue},error_message(){return this.error===""?!1:this.error===!0?`${this.label||"Field"} is required`:this.error},getOptions(){if(this.select&&this.search){const e=this.value.toLowerCase();return this.options.filter(n=>JSON.stringify(n).toLowerCase().includes(e))}else return this.options},getSelected(){let e=null;if(this.modelValue)e=this.options.find(n=>n[this.property.key]===this.modelValue);else if(!this.search){const n=this.options.find(t=>t[this.property.key]==="");n?e=n:this.placeholder?e={[this.property.value]:this.placeholder,[this.property.key]:""}:e={[this.property.value]:"--Select--",[this.property.key]:""}}return e||{[this.property.value]:this.placeholder||"--Select--",[this.property.key]:""}},shouldShowAbove(){if(!this.$refs.triggerElement)return!1;const e=this.$refs.triggerElement.getBoundingClientRect(),n=250,t=window.innerHeight-e.bottom,r=e.top;return t<n&&r>n},dropdownStyle(){if(!this.$refs.triggerElement)return{};const e=this.$refs.triggerElement.getBoundingClientRect(),n=250,t=window.innerHeight-e.bottom,r=e.top,i=t<n&&r>n;return{position:"absolute",top:i?"auto":"100%",bottom:i?"100%":"auto",left:"0",width:"100%",zIndex:1e3}}},created(){this.initialValue=this.modelValue},mounted(){window.addEventListener("resize",this.updateDropdownPosition),window.addEventListener("scroll",this.updateDropdownPosition,!0)},beforeUnmount(){window.removeEventListener("resize",this.updateDropdownPosition),window.removeEventListener("scroll",this.updateDropdownPosition,!0)},methods:{updateDropdownPosition(){if(!this.$refs.triggerElement)return;const e=this.$refs.triggerElement.getBoundingClientRect(),n=200,t=window.innerHeight-e.bottom,r=e.top,i=t<n&&r>n;this.teleportStyle={position:"absolute",top:`${i?e.top-n:e.bottom}px`,left:`${e.left}px`,width:`${e.width}px`,zIndex:9999}},subFieldsText(e){if(!this.display||this.display.length<1)return"";const n=[];return this.display.forEach(t=>{const r=this.subField(e,t);r&&n.push(r)}),n.join(" | ")},subField(e,n){return n?n.split(".").reduce((i,o)=>i[o]||"",e):e},lookupSearchHandler:or(function(e){this.value=e,this.search&&!this.select&&this.$emit("search",e)}),handlerFocusIn(){!(this.modelValue&&this.search)&&!this.disabled&&(this.inputFocused=!0,this.updateDropdownPosition(),this.$emit("focus-in"))},updateSelected(e){e&&(this.value="",this.$emit("update:modelValue",e[this.property.key]),this.search&&!this.select&&!this.lookup&&this.$emit("search",""),this.onInputFocusedOut(!0))},clear(){this.disabled||(this.value="",this.$emit("update:modelValue",null),this.search&&!this.select&&!this.lookup&&this.$emit("search",""))},onInputFocusedOut(e=!1){(!this.isHover||e)&&!this.disabled&&(e?(this.highlightedIndex=-1,this.inputFocused=!1,this.$emit("focus-out")):setTimeout(()=>{this.highlightedIndex=-1,this.inputFocused=!1,this.$emit("focus-out")},100))},highlightNextOption(){this.highlightedIndex<this.options.length-1&&this.highlightedIndex++},highlightPreviousOption(){this.highlightedIndex>0&&this.highlightedIndex--}}},m8=["data-test-id"],y8=["for","data-test-id"],x8={class:"input-container-box ect-grow ect-w-full"},_8=["data-test-id"],b8=["placeholder","disabled","data-test-id"],C8=["data-test-id"],w8=["title","data-test-id"],E8=["data-test-id"],A8=["data-test-id"],k8=["data-test-id"],O8=["data-test-id"],S8=["data-test-id","onClick"],I8=["data-test-id"],T8={class:"ect-text-font-clr-light ect-flex ect-gap-2 ect-items-center ect-justify-between ect-w-full"},B8=["data-test-id"],D8=["data-test-id"],R8=["data-test-id"],L8=["title","data-test-id"],N8=["data-test-id"];function F8(e,n,t,r,i,o){const a=er("AppIcon"),s=er("AtomSpinner");return V(),J("div",{ref:"dropdownWrapper",class:we(["customdropdown input-container",{dark:t.dropdownTheme==="dark"}]),"data-test-id":t.dataTestId,onMouseenter:n[7]||(n[7]=u=>e.isHover=!0),onMouseleave:n[8]||(n[8]=u=>e.isHover=!1)},[t.label?(V(),J("label",{key:0,class:we(["title_label",{error_color:!!t.error}]),for:t.label,"data-test-id":`${t.dataTestId}-label`},[Fe(xe(t.label)+" ",1),t.required?(V(),J("span",{key:0,class:we({error_color:!!t.error})},"*",2)):ge("",!0)],10,y8)):ge("",!0),C("div",x8,[C("div",{ref:"triggerElement",class:we(["input-wrapper ectheme-input-box ect-w-full",{disabled:t.disabled,"input-error":t.error,highlight:o.isHighlight&&t.highlight,"size-large":t.size==="large","size-medium":t.size==="medium"||t.size==="small"}]),"data-test-id":`${t.dataTestId}-trigger`,tabindex:"0",onFocusin:n[2]||(n[2]=(...u)=>o.handlerFocusIn&&o.handlerFocusIn(...u)),onFocusout:n[3]||(n[3]=u=>o.onInputFocusedOut(!1)),onKeydown:[n[4]||(n[4]=ir(u=>o.updateSelected(t.options[e.highlightedIndex]),["enter"])),n[5]||(n[5]=ir(mt((...u)=>o.highlightPreviousOption&&o.highlightPreviousOption(...u),["prevent"]),["up"])),n[6]||(n[6]=ir(mt((...u)=>o.highlightNextOption&&o.highlightNextOption(...u),["prevent"]),["down"]))]},[!t.modelValue&&t.search?ln((V(),J("input",{key:0,ref:"searchInput","onUpdate:modelValue":n[0]||(n[0]=u=>e.value=u),type:"text",name:"search",placeholder:t.placeholder,autocomplete:"off",disabled:t.disabled,"data-test-id":`${t.dataTestId}-search-input`,onInput:n[1]||(n[1]=mt(u=>o.lookupSearchHandler(u.target.value),["prevent"]))},null,40,b8)),[[li,e.value]]):(V(),J("div",{key:1,class:we(["selection-name ect-text-text-primary-dark ect-flex ect-justify-between ect-items-center",{"size-large":t.size==="large","size-medium":t.size==="medium"||t.size==="small"}]),"data-test-id":`${t.dataTestId}-selection`},[o.getSelected?(V(),J(be,{key:0},[C("span",{title:o.getSelected[t.property.value],class:we(["ect-flex ect-items-center ect-gap-2 ect-font-medium",{"ect-text-font-clr-light":!t.modelValue}]),"data-test-id":`${t.dataTestId}-selection-value`},[t.icon?(V(),Ee(a,{key:0,class:"ect-mr-0",icon:t.icon,size:14,color:"#5F5F5F","data-test-id":`${t.dataTestId}-selection-icon`},null,8,["icon","data-test-id"])):ge("",!0),Fe(" "+xe(o.getSelected[t.property.value]),1)],10,w8),t.badge&&o.getSelected[t.badge]?(V(),J("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${t.dataTestId}-selection-badge`},xe(o.getSelected[t.badge]),9,E8)):ge("",!0)],64)):ge("",!0)],10,C8)),t.search?(V(),J(be,{key:2},[t.loading?(V(),Ee(s,{key:0,class:"spinner","data-test-id":`${t.dataTestId}-loading-spinner`},null,8,["data-test-id"])):(V(),J("div",{key:1,class:"clear-button","data-test-id":`${t.dataTestId}-action-button`},[e.value||t.modelValue?(V(),Ee(a,{key:0,disabled:t.disabled,icon:"close",color:"#acacac",size:10,"data-test-id":`${t.dataTestId}-clear-button`,onClick:o.clear},null,8,["disabled","data-test-id","onClick"])):(V(),Ee(a,{key:1,icon:"search",size:14,color:"#acacac",disabled:t.disabled,"data-test-id":`${t.dataTestId}-search-button`},null,8,["disabled","data-test-id"]))],8,A8))],64)):(V(),Ee(a,{key:3,class:"clear-button",color:o.error_message?"#ff6a6a":"#acacac",icon:"arrow_drop_up",size:12,disabled:t.disabled,"data-test-id":`${t.dataTestId}-dropdown-arrow`},null,8,["color","disabled","data-test-id"]))],42,_8),o.error_message?(V(),J("div",{key:0,class:"error_tooltip error_tooltip-bottom-right","data-test-id":`${t.dataTestId}-error`},xe(o.error_message),9,k8)):ge("",!0),o.getOptions&&e.inputFocused&&!t.disabled&&(t.select||t.lookup)?(V(),J("div",{key:1,ref:"dropdown",class:we(["dropdown",{"dropdown-above":o.shouldShowAbove}]),style:ze(o.dropdownStyle),"data-test-id":`${t.dataTestId}-dropdown`},[(V(!0),J(be,null,Me(o.getOptions,(u,f)=>(V(),J("div",{key:u[t.property.key],class:we(["dropdown-item",{highlighted:f===e.highlightedIndex,"ect-pointer-events-none":u[t.property.assigned]}]),"data-test-id":`${t.dataTestId}-option-${f}`,onClick:c=>o.updateSelected(u)},[C("div",{class:"name ect-items-center","data-test-id":`${t.dataTestId}-option-${f}-name`},[C("span",T8,[C("span",{class:we({"ect-text-zinc-400":u[t.property.assigned]}),"data-test-id":`${t.dataTestId}-option-${f}-value`},xe(u[t.property.value]==null?"Key and Value is Wrong":u[t.property.value]),11,B8),u[t.property.assigned]?(V(),J("span",{key:0,class:"ect-text-xs ect-leading-4 ect-text-zinc-600","data-test-id":`${t.dataTestId}-option-${f}-assigned`},"Assigned",8,D8)):ge("",!0)]),t.badge?(V(),J("span",{key:0,class:"badge ect-bg-btn ect-rounded-[5px] ect-py-[2px] ect-px-[10px] ect-text-white","data-test-id":`${t.dataTestId}-option-${f}-badge`},xe(u[t.badge]),9,R8)):ge("",!0)],8,I8),C("div",{class:"info",title:o.subFieldsText(u),"data-test-id":`${t.dataTestId}-option-${f}-info`},[C("span",null,xe(o.subFieldsText(u)),1)],8,L8)],10,S8))),128)),!o.getOptions.length&&!t.loading&&(e.value||t.select)?(V(),J("div",{key:0,class:"no-items-found","data-test-id":`${t.dataTestId}-no-options`}," no options found ",8,N8)):ge("",!0)],14,O8)):ge("",!0)])],42,m8)}const N0=Re(g8,[["render",F8],["__scopeId","data-v-5ae4f6dc"]]);var Se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ds(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function P8(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var t=function r(){return this instanceof r?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),t}var F0={exports:{}};/*!
34
34
  * Quill Editor v1.3.7
35
35
  * https://quilljs.com/
36
36
  * Copyright (c) 2014, Jason Chen
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "expedite-components",
3
3
  "private": false,
4
- "version": "0.5.3",
4
+ "version": "0.5.4",
5
5
  "type": "module",
6
6
  "description": "Vue 3 components library for Expedite",
7
7
  "main": "./dist/expedite-components.cjs.js",