@genesislcap/foundation-rapid-cdn 15.32.0 → 15.32.1

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.
@@ -58,7 +58,7 @@ function bx(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o
58
58
  &#x2715;
59
59
  </button></span>`)}</div>`)}<${e}-button class="criteria-toggle-button" appearance="outline" title=${e=>e.showingChips?"Add more criteria":"View active filters"}?disabled=${e=>0===e.activeGroups.length||e.isInterpreting}@click=${e=>e.toggleCriteriaView()}><${e}-icon name="pen" size="sm"></${e}-icon></${e}-button><${e}-button class="criteria-clear-button" appearance="outline" title="Clear all filters" ?disabled=${e=>0===e.activeGroups.length||e.isInterpreting}@click=${e=>e.clearChips()}><${e}-icon name="trash-alt" size="sm"></${e}-icon></${e}-button>${He(e=>e.speechAvailable,W`<${e}-button class="mic-button" appearance="${e=>e.isRecording?"accent":"outline"}" ?disabled=${e=>e.disabled||e.isInterpreting}@click=${e=>e.toggleSpeechInput()}title=${e=>e.isRecording?"Stop recording":"Start voice input"}><${e}-icon class="mic-icon" name="microphone" size="lg" variant="solid"></${e}-icon></${e}-button>`)}</div></div>`)} `)($z(e))} `,eC={contains:Rz.containsIgnoreCase,equals:Rz.EQ,startsWith:Rz.startsWith,endsWith:Rz.endsWith,greaterThan:Rz.GT,lessThan:Rz.LT,greaterThanOrEqual:Rz.GE,lessThanOrEqual:Rz.LE,notEqual:Rz.NE,dateIsToday:Rz.dateIsToday,dateIsAfter:Rz.dateIsGreaterEqual,dateIsGreaterEqual:Rz.dateIsGreaterEqual,dateIsBefore:Rz.dateIsLessEqual,dateIsLessEqual:Rz.dateIsLessEqual,dateIsEqual:Rz.dateIsEqual,dateTimeIsAfter:Rz.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:Rz.dateTimeIsGreaterEqual,dateTimeIsBefore:Rz.dateTimeIsLessEqual,dateTimeIsLessEqual:Rz.dateTimeIsLessEqual};function tC(e){var t,i;const o=null!==(t=eC[e.operator])&&void 0!==t?t:Rz.containsIgnoreCase;return(new Fz).withField(e.field).withValue(null!==(i=e.value)&&void 0!==i?i:null).withSerialiser(o).withGroup("default").build()}function iC(e,t){return 1===e.length?e[0]:e.reduce((e,i,o)=>0===o?[i]:[...e,t,i],[])}function oC(e){var t;const i=new Dz;let o=!1;for(const c of e){if(!(null===(t=c.clauses)||void 0===t?void 0:t.length))continue;const e=c.clauses.map(tC),s="or"===c.logic?Az.Or():Az.And(),n=iC(e,s),a=e.length>1?{join:s}:{};c.negated?i.And([Az.Not(),n]):i.And(1===e.length?e[0]:e,a),o=!0}return o?i.build():""}const cC=["contains","equals","startsWith","endsWith","notEqual"],sC=["equals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","notEqual"],nC=["dateIsToday","dateIsAfter","dateIsBefore","dateIsEqual","dateIsGreaterEqual","dateIsLessEqual"],aC=["dateTimeIsAfter","dateTimeIsBefore","dateTimeIsGreaterEqual","dateTimeIsLessEqual"],rC={contains:"contains",equals:"=",startsWith:"starts with",endsWith:"ends with",notEqual:"≠",greaterThan:">",lessThan:"<",greaterThanOrEqual:"≥",lessThanOrEqual:"≤",dateIsToday:"is today",dateIsAfter:"after",dateIsBefore:"before",dateIsEqual:"=",dateIsGreaterEqual:"≥",dateIsLessEqual:"≤",dateTimeIsAfter:"after",dateTimeIsBefore:"before",dateTimeIsGreaterEqual:"≥",dateTimeIsLessEqual:"≤"},lC=new Set(["DATE","LOCALDATE"]),dC=new Set(["DATETIME","NANO_TIMESTAMP","LOCALDATETIME","TIMESTAMP"]),hC=new Set(["INT","INTEGER","LONG","SHORT","DOUBLE","BIGDECIMAL","DECIMAL"]);function uC(e){return(e||"").toUpperCase().trim().split("(")[0].trim()}function pC(e){const t=uC(e);return lC.has(t)?nC:dC.has(t)?aC:hC.has(t)?sC:cC}function fC(e){return hC.has(uC(e))}function mC(e){return null!=e&&("number"==typeof e?!Number.isNaN(e)&&e>0:"string"==typeof e&&(/^\d{8}$/.test(e)||/^\d{4}-\d{2}-\d{2}$/.test(e)||/^\d{8}-\d{2}:\d{2}(:\d{2})?$/.test(e)))}function gC(e){return null!=e&&("number"==typeof e?!Number.isNaN(e):"string"==typeof e&&!Number.isNaN(Number(e)))}function vC(e,t){const i=[],o=[],c=new Map;if(Array.isArray(t)&&t.length>0){"string"==typeof t[0]?t.forEach(e=>c.set(e,void 0)):t.forEach(e=>c.set(e.NAME,e))}for(const t of e){const{field:e,operator:s,value:n}=t;if(!e||"string"!=typeof e){o.push({field:String(e),message:"Field name is required"});continue}const a=c.get(e),r=a&&"TYPE"in a?a.TYPE:"STRING";pC(r).includes(s)?!nC.includes(s)&&!aC.includes(s)||"dateIsToday"===s||mC(n)?fC(r)&&sC.includes(s)&&!gC(n)?o.push({field:e,operator:s,value:n,message:"Invalid numeric value"}):c.size>0&&!c.has(e)?o.push({field:e,operator:s,value:n,message:`Unknown field '${e}'`}):i.push(t):o.push({field:e,operator:s,value:n,message:"Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch"}):o.push({field:e,operator:s,value:n,message:`Operator '${s}' is not allowed for field type ${r}`})}return{valid:i,invalid:o}}const bC=op("foundation-notifications");let yC=null;const xC=new Map,zC=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.body)&&void 0!==i?i:"Something went wrong"}`},CC=e=>{var t;return(null==e?void 0:e.logLevel)||(null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.logLevel)||Bu.debug},LC=e=>{bC.log({message:zC(e),level:CC(e)})},MC=(e,t)=>{let i=document.querySelector(`#${e}`);if(!i)if(xC.has(e))i=xC.get(e);else{const t=vp(document).find(t=>t.id===e);t&&(i=t,xC.set(e,t))}if(!i){i=document.createElement("div"),i.setAttribute("id",e),i.style.zIndex="9999";const{element:t,prefix:o}=bp(document.body,"rapid");if(t)t.appendChild(i),yC=t;else if(yC)yC.appendChild(i);else{const e=document.createElement(`${o}-design-system-provider`);e.appendChild(i),document.body.appendChild(e),yC=e}}return i},wC=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e};var kC,SC,$C;!function(e){e.NOTIFICATION_EVENT="notification-event"}(kC||(kC={})),function(e){e.Top="top",e.Bottom="bottom"}(SC||(SC={})),function(e){e.Left="left",e.Right="right"}($C||($C={}));const EC="12px";const NC=(e,t,i)=>{var o,c,s,n,a,r,l,d,h,u,p,f,m,g,v,b,y,x,z;LC(e);const C=t.split("-")[0],L=(null===(c=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.toast)||void 0===c?void 0:c.position)||"top-right",M=null!==(s=null!=i?i:(e=>vp(document.body).find(t=>"notify-container"===t.tagName.toLowerCase()&&t.position===e))(L))&&void 0!==s?s:MC("notify-container");M&&"notify-container"!==M.tagName.toLowerCase()&&function(e,t){var i,o;switch(t.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.toast)||void 0===o?void 0:o.position){case"top-left":t.style.top="var(--nav-height, 0)",t.style.left="0";break;case"bottom-left":t.style.bottom="0",t.style.left="0";break;case"bottom-right":t.style.bottom="0",t.style.right="0";break;default:t.style.top="var(--nav-height, 0)",t.style.right="0"}}(e,M);const w=document.createElement(`${C}-toast`),k=document.createElement("div");k.setAttribute("slot","top"),k.textContent=e.title;const S=document.createElement("div");S.setAttribute("slot","content"),S.textContent=(null==e?void 0:e.body)||"";const $=document.createElement("div");let E;$.setAttribute("slot","date"),$.textContent=(null===(n=null==e?void 0:e.createdAt)||void 0===n?void 0:n.toLocaleTimeString())||"",(null===(r=null===(a=null==e?void 0:e.config)||void 0===a?void 0:a.toast)||void 0===r?void 0:r.buttons)&&(null===(h=null===(d=null===(l=null==e?void 0:e.config)||void 0===l?void 0:l.toast)||void 0===d?void 0:d.buttons)||void 0===h?void 0:h.length)&&(E=document.createElement("div"),E.setAttribute("slot","bottom"),e.config.toast.buttons.forEach(t=>{const i=document.createElement(`${C}-button`);i.textContent=t.placeholder||"example placeholder",i.addEventListener("click",()=>{const{details:o}=e.config.toast;if(t.action)return t.action({details:o,buttonElement:i,toastElement:w})}),t.appearance&&i.setAttribute("appearance",t.appearance),E.appendChild(i)})),w.setAttribute("notify",(null===(p=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.toast)||void 0===p?void 0:p.type)||""),e.iconName&&w.setAttribute("notification-icon",e.iconName),(null===(m=null===(f=null==e?void 0:e.config)||void 0===f?void 0:f.toast)||void 0===m?void 0:m.autoClose)&&w.setAttribute("auto-close",`${null===(v=null===(g=null==e?void 0:e.config)||void 0===g?void 0:g.toast)||void 0===v?void 0:v.autoClose}`),(null===(y=null===(b=null==e?void 0:e.config)||void 0===b?void 0:b.toast)||void 0===y?void 0:y.closeTimeout)&&w.setAttribute("close-timeout",`${null===(z=null===(x=null==e?void 0:e.config)||void 0===x?void 0:x.toast)||void 0===z?void 0:z.closeTimeout}`),w.appendChild(k),w.appendChild(S),w.appendChild($),E&&w.appendChild(E),M.prepend(w)},AC=(e,t,i)=>{if(!e.title)throw new Error("Title is required");if(!e.body)throw new Error("Missing required param 'body'");let o={title:e.title,body:e.body,iconName:e.iconName},c={};e.createdAt&&(o=Object.assign({createdAt:e.createdAt},o)),null!=e.logLevel&&(o=Object.assign({logLevel:e.logLevel},o)),e.toast&&(c=Object.assign({toast:e.toast},c),o=Object.assign({config:c},o)),NC(o,t,i)},OC=Ce` :host{position: fixed;z-index: 9999;display: flex;flex-direction: column;gap: 4px;box-sizing: border-box;pointer-events: none;/* Allow clicks to pass through empty space */ width: 415px}.toast-container{padding: 0 8px 12px 12px;position: relative}/* Expanded / List State: Allow scrolling if too many items */ :host(:not([stack-collapsed])){max-height: calc(100% - var(--nav-height));overflow: hidden;pointer-events: auto;/* Enable pointer events for scrolling */ slot{display: block;height: calc(100vh - var(--nav-height) - 54px);position: relative}.toast-container{flex: 1;height: 100%;overflow-y: auto;overflow-x: hidden;scrollbar-color: var(--neutral-layer-3) transparent;&:hover{scrollbar-color: var(--neutral-layer-4) transparent}}}.header{display: flex;gap: 12px;pointer-events: none;margin: 5px 24px;justify-content: space-between;visibility: hidden;align-items: center;box-sizing: border-box;.header-title{text-shadow: 0 0 10px #000}.notification-header-buttons{display: flex;gap: 4px;rapid-icon{color: var(--neutral-foreground-hint);margin-left: 4px;display: inline-flex;font-size: 14px;&.chevron-up.collapse{transform: rotate(180deg);transition: transform 0.3s ease}}}--base-height-multiplier: 8;*[appearance='neutral']{font-size: 11px;cursor: pointer;background: var(--neutral-fill-rest)}}.header.visible{visibility: visible;pointer-events: auto;/* Enable clicks on header buttons */}:host([position$='left']) .header{justify-content: space-between}:host([position^='bottom']) .header{margin-bottom: 0;margin-top: 4px}/* Ensure children (toasts) are clickable */ ::slotted(*){pointer-events: auto}:host([position='top-right']){top: var(--nav-height, 0);right: 0}:host([position='top-left']){top: var(--nav-height, 0);left: 0}:host([position='bottom-right']){bottom: 0;right: 0;flex-direction: column-reverse}:host([position='bottom-left']){bottom: 0;left: 0;flex-direction: column-reverse}/* Stacked / Collapsed State */ :host([stack-collapsed]){height: min-content;/* Host allows pointer events so they can reach the slot */ pointer-events: auto;cursor: pointer}/* Apply the grid layout to the slot itself so it acts as the container and click target */ :host([stack-collapsed]) slot{display: grid;grid-template-columns: auto;grid-template-rows: auto;align-items: end;/* Default to bottom-up stacking */ justify-items: center;/* The slot catches the click */ pointer-events: auto}/* Rotate when the collapse class is present */ :host([stack-collapsed][position^='top']) slot{align-items: start}:host([stack-collapsed][position$='right']) slot{justify-items: end}:host([stack-collapsed][position$='left']) slot{justify-items: start}:host([stack-collapsed]) ::slotted(*){grid-area: 1 / 1;transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;opacity: 0%;pointer-events: none !important;/* Disable interaction with toasts in collapsed state */ transform: scale(0.9);top: 0 !important}/* Show and offset the top 3 items in the stack */ :host([stack-collapsed]) ::slotted([data-stack-index='0']){opacity: 100%;pointer-events: auto;transform: translateY(0) scale(1);z-index: 3;position: relative !important}:host([stack-collapsed]) ::slotted([data-stack-index='1']){opacity: 100%;transform: translateY(var(--stack-offset-y, 8px)) scale(0.95);z-index: 2;position: relative !important}:host([stack-collapsed]) ::slotted([data-stack-index='2']){opacity: 100%;transform: translateY(var(--stack-offset-y-2, 16px)) scale(0.9);z-index: 1;position: relative !important}/* Adjust offset direction based on position */ :host([stack-collapsed][position^='top']){--stack-offset-y: 8px;--stack-offset-y-2: 16px}:host([stack-collapsed][position^='bottom']){--stack-offset-y: -8px;--stack-offset-y-2: -16px}`,TC=W` ${He(e=>e.allowCloseAll||e.allowManualCollapse,W` ${e=>(e=>W`<div class="header ${e=>Jt(["visible",e.slottedNodes.length>1])}">${He(e=>e.showCount,W`<span class="header-title">${e=>e.slottedNodes.length}Notifications</span>`)}<div class="notification-header-buttons">${He(e=>e.allowManualCollapse,W`<${e}-button @click=${e=>e.handleToggleCollapse()}>${e=>e.stackCollapsed?"Expand":"Collapse"}<${e}-icon class="chevron-up ${e=>Jt(["collapse",e.stackCollapsed])}" name="chevron-up"></${e}-icon></${e}-button>`)} ${He(e=>e.allowCloseAll,W`<${e}-button @click=${e=>e.handleCloseAll()}>
60
60
  Close All <${e}-icon name="xmark"></${e}-icon></${e}-button>`)}</div></div>`)(e.designSystemPrefix)} `)}<div class="toast-container"><slot ${Ke("slottedNodes")}@click="${e=>e.handleContainerClick()}"></slot></div>`;let RC=class extends be{constructor(){super(...arguments),this.position="top-right",this.stackThreshold=5,this.allowManualCollapse=!0,this.allowCloseAll=!0,this.designSystemPrefix="rapid",this.showCount=!0,this.stackCollapsed=!1,this.notificationInterval=0,this.manuallyExpanded=!1,this.pendingQueue=[],this.queueTimer=null,this.queuedNodes=new Set,this.mutationObserver=null,this.knownNodes=new Set,this.peekingNode=null,this.peekTimer=null,this.routeSubscriber={handleChange:()=>this.checkRoute(mf.shared.pathName)},this.slottedNodes=[]}connectedCallback(){super.connectedCallback(),"bottom-left"!==this.position&&"bottom-right"!==this.position||bC.error("NotifyContainer doesn't currently support bottom corner placements"),m.getNotifier(mf.shared).subscribe(this.routeSubscriber,"pathName"),this.checkRoute(mf.shared.pathName),this.mutationObserver=new MutationObserver(e=>this.handleMutation(e)),this.mutationObserver.observe(this,{childList:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),m.getNotifier(mf.shared).unsubscribe(this.routeSubscriber,"pathName"),null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=null}checkRoute(e){(e.includes("/login")||e.includes("/logout"))&&(this.pendingQueue=[],this.queuedNodes.clear(),clearTimeout(this.queueTimer),this.queueTimer=null,this.handleCloseAll())}slottedNodesChanged(){if(!this.manuallyExpanded&&!this.stackCollapsed&&this.slottedNodes.length>this.stackThreshold&&(this.stackCollapsed=!0),this.stackCollapsed&&this.slottedNodes.length<=1&&(this.stackCollapsed=!1,this.manuallyExpanded=!1,this.cancelPeek()),this.stackCollapsed){const e=this.slottedNodes.filter(e=>e instanceof HTMLElement&&!this.knownNodes.has(e)).shift();e&&this.maybePeek(e)}this.knownNodes=new Set(this.slottedNodes),this.applySort()}handleContainerClick(){this.stackCollapsed&&(this.stackCollapsed=!1,this.manuallyExpanded=!0,this.cancelPeek())}handleToggleCollapse(){this.stackCollapsed=!this.stackCollapsed,this.manuallyExpanded=!this.stackCollapsed,this.stackCollapsed||this.cancelPeek()}handleCloseAll(){for(this.cancelPeek();this.firstChild;)this.removeChild(this.firstChild);this.stackCollapsed=!1,this.manuallyExpanded=!1}notificationIntervalChanged(e,t){!t&&this.pendingQueue&&this.flushQueue()}handleMutation(e){this.notificationInterval&&(e.forEach(e=>{e.addedNodes.forEach(e=>{e instanceof HTMLElement&&(this.queuedNodes.has(e)?this.queuedNodes.delete(e):(this.removeChild(e),this.pendingQueue.push(e)))})}),this.queueTimer||this.processQueue())}processQueue(){if(!this.pendingQueue.length)return void(this.queueTimer=null);const e=this.pendingQueue.shift();this.queuedNodes.add(e),this.prepend(e),this.queueTimer=setTimeout(()=>{this.queueTimer=null,this.processQueue()},this.notificationInterval)}flushQueue(){for(clearTimeout(this.queueTimer),this.queueTimer=null;this.pendingQueue.length;){const e=this.pendingQueue.shift();this.queuedNodes.add(e),this.prepend(e)}}sortFnChanged(){this.applySort()}applySort(){const e=this.slottedNodes.filter(e=>e instanceof HTMLElement);if(!e.length)return;const t=this.sortFn&&e.length>1?[...e].sort(this.sortFn):e;this.peekingNode&&t.includes(this.peekingNode)?this.handlePosition([this.peekingNode,...t.filter(e=>e!==this.peekingNode)]):this.handlePosition(t)}maybePeek(e){const t=this.slottedNodes.filter(e=>e instanceof HTMLElement);if(0===(this.sortFn&&t.length>1?[...t].sort(this.sortFn):t).indexOf(e))return;this.cancelPeek(),this.peekingNode=e;const i=this.notificationInterval?this.notificationInterval/2:1500;this.peekTimer=setTimeout(()=>{this.peekingNode=null,this.peekTimer=null,this.applySort()},i)}cancelPeek(){clearTimeout(this.peekTimer),this.peekTimer=null,this.peekingNode=null}handlePosition(e){if(!e.length)return;e.forEach((t,i)=>{t.style.position="absolute",t.style.transition="all 0.3s ease-in",t.style.right="0px",t.style.zIndex=(e.length-i).toString(),t.dataset.stackIndex=i.toString()});const t=e.map(e=>e.offsetHeight);e.reduce((e,i,o)=>(i.style.top=`${e}px`,e+t[o]),0)}};Nu([re],RC.prototype,"position",void 0),Nu([re({attribute:"stack-threshold"})],RC.prototype,"stackThreshold",void 0),Nu([re({attribute:"allow-manual-collapse",mode:"boolean"})],RC.prototype,"allowManualCollapse",void 0),Nu([re({attribute:"allow-close-all",mode:"boolean"})],RC.prototype,"allowCloseAll",void 0),Nu([re({attribute:"design-system-prefix"})],RC.prototype,"designSystemPrefix",void 0),Nu([re({attribute:"show-count",mode:"boolean"})],RC.prototype,"showCount",void 0),Nu([re({attribute:"stack-collapsed",mode:"boolean"})],RC.prototype,"stackCollapsed",void 0),Nu([re({attribute:"notification-interval"})],RC.prototype,"notificationInterval",void 0),Nu([g],RC.prototype,"sortFn",void 0),Nu([g],RC.prototype,"slottedNodes",void 0),RC=Nu([ye({name:"notify-container",template:TC,styles:OC})],RC);const IC={alert:e=>{LC(e),alert(zC(e))},toast:NC,dialog:(e,t,i)=>{LC(e);const o=t.split("-")[0],c=document.createElement(`${o}-dialog`),s=i?(e=>{let t=e.querySelector("#dialog-container");return t||(t=document.createElement("div"),t.setAttribute("id","dialog-container"),t.style.position="relative",e.appendChild(t)),t})(i):MC("dialog-container");s.appendChild(c),c.notification=e,c.show()},snackbar:(e,t)=>{var i,o,c,s,n,a;LC(e);const r=t.split("-")[0],l=document.createElement(`${r}-snackbar`),d=null!==(c=null===(o=null===(i=e.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.verticalEdge)&&void 0!==c?c:SC.Bottom,h=null!==(a=null===(n=null===(s=e.config)||void 0===s?void 0:s.snackbar)||void 0===n?void 0:n.horizontalEdge)&&void 0!==a?a:$C.Left,u=MC(`snack-container-${d}-${h}`);u&&((e,t,i)=>{e.style.position="fixed",e.style.top=t===SC.Top?EC:"",e.style.bottom=t===SC.Bottom?EC:"",e.style.left=i===$C.Left?EC:"",e.style.right=i===$C.Right?EC:""})(u,d,h),u.appendChild(l),l.notification=e},banner:(e,t,i)=>{var o;LC(e);const c=t.split("-")[0],s=document.createElement(`${c}-banner`),n=(e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return wC()})(i);(null===(o=null==n?void 0:n.children)||void 0===o?void 0:o.length)>0&&(s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%"),n.appendChild(s),s.notification=e}},_C=(e,t,i)=>{Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{IC[o]&&IC[o](e,t,i)})};function DC(e,t,i){(null==t?void 0:t.trim())&&_C({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:"error"}}},i)}class FC extends qt{constructor(){super(...arguments),this.placeholder="Describe your search criteria in natural language...",this.inputValue="",this.isInterpreting=!1,this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.fieldMetadata=[],this.isRecording=!1,this.stopRecording=null,this.speechApplyDebounceTimer=null}get speechAvailable(){return Wz()}get criteriaChips(){return this.activeGroups.flatMap((e,t)=>e.clauses.map((e,i)=>{var o,c;return{groupIndex:t,clauseIndex:i,fieldLabel:this.getFieldLabel(e.field),operatorLabel:null!==(o=rC[e.operator])&&void 0!==o?o:e.operator,valueLabel:"dateIsToday"===e.operator?"":String(null!==(c=e.value)&&void 0!==c?c:"")}}))}getFieldLabel(e){var t,i;if(!Array.isArray(this.fieldMetadata)||0===this.fieldMetadata.length)return e;if("string"==typeof this.fieldMetadata[0])return e;const o=this.fieldMetadata.find(t=>t.NAME===e);return null!==(i=null!==(t=null==o?void 0:o.UI_LABEL)&&void 0!==t?t:null==o?void 0:o.NAME)&&void 0!==i?i:e}toggleCriteriaView(){this.showingChips?(this.inputValue="",this.showingChips=!1):this.showingChips=!0}removeChip(e,t){var i;const o=this.activeGroups.map(e=>Object.assign(Object.assign({},e),{clauses:[...e.clauses]}));null===(i=o[e])||void 0===i||i.clauses.splice(t,1);const c=o.filter(e=>e.clauses.length>0);if(this.activeGroups=c,0===c.length)this.showingChips=!1,this.lastValidCriteria=null,this.$emit("criteria-changed",null);else{const e=oC(c);this.lastValidCriteria=e,this.$emit("criteria-changed",e)}}clearChips(){this.activeGroups=[],this.showingChips=!1,this.lastValidCriteria=null,this.$emit("criteria-changed",null)}handleSubmit(){return Ou(this,void 0,void 0,function*(){var e,t,i;const o=null===(e=this.inputValue)||void 0===e?void 0:e.trim();if(!o||this.isInterpreting)return;const c=null===(t=this.providerRegistry)||void 0===t?void 0:t.default();if(null==c?void 0:c.interpretCriteria){this.isInterpreting=!0;try{const e=Array.isArray(this.fieldMetadata)?this.fieldMetadata:[],t=yield c.interpretCriteria(o,{fields:e});if(!(null===(i=null==t?void 0:t.groups)||void 0===i?void 0:i.some(e=>{var t;return null===(t=e.clauses)||void 0===t?void 0:t.length})))return DC("AI criteria search","AI could not interpret the criteria",$z(this)),void(this.isInterpreting=!1);const{valid:n,invalid:a}=function(e,t){var i;const o=[],c=[];for(const s of e){if(!(null==s?void 0:s.clauses)||!Array.isArray(s.clauses)){c.push({field:"",message:"Group must have a clauses array"});continue}const{valid:e,invalid:n}=vC(s.clauses,t);c.push(...n),e.length>0&&o.push({logic:null!==(i=s.logic)&&void 0!==i?i:"and",negated:s.negated,clauses:e})}return{valid:o,invalid:c}}(t.groups,this.fieldMetadata);if(a.length>0&&(DC("Criteria validation error",0===(s=a).length?"":1===s.length?s[0].message:s.map(e=>e.message).join("; "),$z(this)),this.$emit("validation-errors",a)),n.length>0){const e=[...this.activeGroups,...n],t=oC(e);this.lastValidCriteria=t,this.activeGroups=e,this.inputValue="",this.showingChips=!0,this.$emit("criteria-changed",t)}}catch(e){DC("AI criteria search",e instanceof Error?e.message:"Interpretation failed",$z(this))}finally{this.isInterpreting=!1}var s}else DC("AI criteria search","AI provider not configured",$z(this))})}handleBlur(){var e;if(this.isRecording)return;(null===(e=this.inputValue)||void 0===e?void 0:e.trim())?this.handleSubmit():this.activeGroups.length>0&&(this.showingChips=!0)}clear(){this.inputValue="",this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.$emit("criteria-changed",null)}toggleSpeechInput(){if(this.isRecording&&this.stopRecording)return this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,void(this.isRecording=!1);this.inputValue="",this.showingChips=!1,this.stopRecording=function(e,t){if(!Wz())return null;const i=new(window.SpeechRecognition||window.webkitSpeechRecognition);i.continuous=!0,i.interimResults=!0,i.lang="en-US";let o="";return i.onresult=t=>{let i="",c="";for(let e=t.resultIndex;e<t.results.length;e+=1){const o=t.results[e][0].transcript;t.results[e].isFinal?c+=o:i+=o}c?(o+=c,e(o,!0)):i&&e(o+i,!1)},i.onerror=e=>{"aborted"!==e.error&&(null==t||t(e.error||"Speech recognition error"))},i.start(),()=>{try{i.stop()}catch(e){}}}((e,t)=>{this.inputValue=e,t&&(null==e?void 0:e.trim())&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}}Nu([Qz],FC.prototype,"providerRegistry",void 0),Nu([re],FC.prototype,"placeholder",void 0),Nu([re({mode:"boolean"})],FC.prototype,"disabled",void 0),Nu([g],FC.prototype,"inputValue",void 0),Nu([g],FC.prototype,"isInterpreting",void 0),Nu([g],FC.prototype,"lastValidCriteria",void 0),Nu([g],FC.prototype,"activeGroups",void 0),Nu([g],FC.prototype,"showingChips",void 0),Nu([g],FC.prototype,"fieldMetadata",void 0),Nu([g],FC.prototype,"isRecording",void 0),Nu([v],FC.prototype,"speechAvailable",null),Nu([v],FC.prototype,"criteriaChips",null);const HC=void 0,PC={};FC.compose(Object.assign({baseName:"ai-criteria-search",template:Jz,styles:Xz,shadowOptions:HC},PC));const VC=(e,t)=>Ce` :host{display: flex;justify-content: center;align-items: center;width: 100%;margin: calc(var(--design-unit) * 2px) 0;position: relative;/* Same as connection indicator */ --green: 50 164 49;--trafic-light-green: rgb(var(--green));--red: 187 30 16;--trafic-light-red: rgb(var(--red));--amber: 230 160 20;--trafic-light-amber: rgb(var(--amber))}.ai-indicator-container{display: flex;flex-direction: column;align-items: center;position: relative}.ai-indicator-badge{display: inline-flex;align-items: center;gap: calc(var(--design-unit) * 1.4px);font-size: 12px;line-height: 1;font-weight: 600;text-transform: uppercase;height: calc(var(--design-unit) * 6px);padding: calc(var(--design-unit) * 0.5px) calc(var(--design-unit) * 2px);border-radius: calc(var(--design-unit) * 1px);cursor: pointer;color: #fff}.ai-indicator-badge:hover{opacity: 90%}.ai-indicator-badge.green{background: var(--trafic-light-green)}.ai-indicator-badge.amber{background: var(--trafic-light-amber)}.ai-indicator-badge.red{background: var(--trafic-light-red)}.ai-indicator-badge .ai-indicator-icon{flex-shrink: 0;color: inherit}.ai-indicator-badge.pulsing{animation: ai-indicator-pulse 1.5s ease-in-out infinite}@keyframes ai-indicator-pulse{0%, 100%{opacity: 100%}50%{opacity: 50%}}.ai-indicator-dropdown{position: absolute;top: 100%;right: 0;margin-top: calc(var(--design-unit) * 2px);min-width: 200px;padding: calc(var(--design-unit) * 4px);background: var(--neutral-layer-floating, #fff);border: 1px solid var(--neutral-stroke-rest, #e0e0e0);border-radius: calc(var(--design-unit) * 2px);box-shadow: 0 calc(var(--design-unit) * 1px) calc(var(--design-unit) * 4px) rgb(0 0 0 / 12%);z-index: 1000}.ai-indicator-info{display: flex;flex-direction: column;gap: 0;margin: 0;padding: 0}.ai-indicator-info .info-row{display: grid;grid-template-columns: 72px 1fr;gap: calc(var(--design-unit) * 4px);align-items: baseline;padding: calc(var(--design-unit) * 1.5px) 0;border-bottom: 1px solid var(--neutral-stroke-subtle, #eee)}.ai-indicator-info .info-row:last-child{border-bottom: none}.ai-indicator-info .info-label{margin: 0;font-size: var(--type-ramp-base-font-size);font-weight: 500;color: var(--neutral-foreground-hint, #666)}.ai-indicator-info .info-value{margin: 0;font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-rest, #333);text-transform: capitalize;word-break: break-word}.install-button{margin-top: calc(var(--design-unit) * 3px);width: 100%}`,BC=W` ${e=>(e=>W` ${He(()=>Gz(),W`<div class="ai-indicator-container" part="ai-indicator-container"><div class=${e=>Jt("ai-indicator-badge",["green","available"===e.state||"server"===e.state],["amber","downloading"===e.state||"downloadable"===e.state],["red","unavailable"===e.state||"none"===e.state],["pulsing","downloading"===e.state||e.isInstalling])}data-test-id="ai-indicator-badge" part="ai-indicator-badge" role="button" tabindex="0" aria-label="AI status" aria-haspopup="true" aria-expanded="${e=>e.open}" @click=${e=>e.toggleDropdown()}@keydown=${(e,t)=>{const i=t.event;"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),e.toggleDropdown())}}><${e}-icon class="ai-indicator-icon" name="wand-magic-sparkles" size="xs" variant="solid" part="ai-indicator-icon"></${e}-icon><span class="ai-indicator-text" data-test-id="ai-indicator-text" part="ai-indicator-text">AI</span></div>${He(e=>e.open,W`<div class="ai-indicator-dropdown" part="ai-indicator-dropdown"><dl class="ai-indicator-info"><div class="info-row"><dt class="info-label">Provider</dt><dd class="info-value">${e=>{var t,i;return null!==(i=null===(t=e.status)||void 0===t?void 0:t.provider)&&void 0!==i?i:"none"}}</dd></div><div class="info-row"><dt class="info-label">Model</dt><dd class="info-value">${e=>{var t;return(null===(t=e.status)||void 0===t?void 0:t.model)||"—"}}</dd></div>${He(e=>e.chromeStatusLabel,W`<div class="info-row"><dt class="info-label">Status</dt><dd class="info-value">${e=>e.chromeStatusLabel}</dd></div>`)}</dl>${He(e=>e.canInstall,W`<${e}-button class="install-button" appearance="accent" @click=${(e,t)=>{t.event.preventDefault(),e.onInstall()}}>
61
- Install model </${e}-button>`)}</div>`)}</div>`)} `)($z(e))} `;class UC extends qt{constructor(){super(...arguments),this.status=null,this.open=!1,this.state="none",this.isInstalling=!1,this.pollTimer=null,this.clickOutside=e=>this.handleClickOutside(e)}get aiProvider(){var e;return null===(e=this.providerRegistry)||void 0===e?void 0:e.default()}get chromeStatusLabel(){var e,t;if("chrome"!==(null===(e=this.status)||void 0===e?void 0:e.provider))return null;const i=null===(t=this.status)||void 0===t?void 0:t.chromeAvailability;return"available"===i?"Installed":"downloading"===i||this.isInstalling?"Downloading…":"downloadable"===i?"Downloadable":"unavailable"===i?"Unavailable":null}get canInstall(){var e,t,i;return!!(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)&&"chrome"===(null===(t=this.status)||void 0===t?void 0:t.provider)&&"downloadable"===(null===(i=this.status)||void 0===i?void 0:i.chromeAvailability)&&!this.isInstalling}get isDownloading(){var e;return"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Ou(this,void 0,void 0,function*(){e.connectedCallback.call(this),yield this.refreshStatus(),this.maybeStartPolling()})}disconnectedCallback(){this.stopPolling(),document.removeEventListener("mousedown",this.clickOutside)}openChanged(){this.open?(document.addEventListener("mousedown",this.clickOutside),this.refreshStatus()):document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){kz(e,this)&&(this.open=!1)}toggleDropdown(){this.open=!this.open}refreshStatus(){return Ou(this,void 0,void 0,function*(){var e;if(!(null===(e=this.aiProvider)||void 0===e?void 0:e.getStatus))return this.status=null,void(this.state="none");try{const e=yield this.aiProvider.getStatus();this.status=e,this.state=this.deriveState(e),"available"===this.state&&(this.isInstalling=!1)}catch(e){this.status=null,this.state="none",this.isInstalling=!1}})}deriveState(e){if(!e||"none"===e.provider)return"none";if("chrome"===e.provider){const t=e.chromeAvailability;return"available"===t?"available":"downloading"===t?"downloading":"downloadable"===t?"downloadable":"unavailable"}return"server"}maybeStartPolling(){var e;"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling?this.startPolling():this.stopPolling()}startPolling(){this.pollTimer||(this.pollTimer=setInterval(()=>{this.refreshStatus().then(()=>{this.maybeStartPolling()})},2500))}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}onInstall(){return Ou(this,void 0,void 0,function*(){var e;if(this.canInstall&&(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)){this.isInstalling=!0;try{yield this.aiProvider.triggerDownload(),this.startPolling()}catch(e){this.isInstalling=!1}finally{yield this.refreshStatus()}}})}}Nu([Qz],UC.prototype,"providerRegistry",void 0),Nu([g],UC.prototype,"status",void 0),Nu([g],UC.prototype,"open",void 0),Nu([g],UC.prototype,"state",void 0),Nu([g],UC.prototype,"isInstalling",void 0),Nu([v],UC.prototype,"chromeStatusLabel",null),Nu([v],UC.prototype,"canInstall",null),Nu([v],UC.prototype,"isDownloading",null),UC.compose({baseName:"ai-indicator",template:BC,styles:VC});const jC=(e,t)=>Ni(0,t),qC=(e,t)=>Ce` ${Yd()}`;class GC extends Kd{}const WC={delegatesFocus:!0,mode:"open"},YC={};GC.compose(Object.assign({baseName:"anchor",template:jC,styles:qC,shadowOptions:WC},YC));const KC=(e,t)=>Ri(),ZC=(e,t)=>Ce` ${Zd()}`;class QC extends _i{}const XC={delegatesFocus:!0,mode:"open"},JC={};QC.compose(Object.assign({baseName:"anchored-region",template:KC,styles:ZC,shadowOptions:XC},JC));const eL=(e,t)=>ji(0,t),tL=W` ${He(e=>e.imgSrc,W`<img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />`)} `,iL=(e,t)=>Ce` ${Qd(e)}`;class oL extends Xd{}const cL={delegatesFocus:!0,mode:"open"},sL={media:tL};oL.compose(Object.assign({baseName:"avatar",template:eL,styles:iL,shadowOptions:cL},sL));const nL=(e,t)=>Gi(),aL=(e,t)=>Ce` ${eh()}`;class rL extends Wi{}const lL=void 0,dL={};rL.compose(Object.assign({baseName:"badge",template:nL,styles:aL,shadowOptions:lL},dL));const hL=Ce` @keyframes delete-animate{from{height: 100px;opacity: 100%}to{height: 0;opacity: 0%}}@keyframes append-animate{from{height: 0;opacity: 0%}to{height: var(--banner-height);opacity: 100%}}:host{--banner-width: 100%;--banner-height: 65px;--flow: row}@media screen and (max-width: 640px){:host{--flow: column;--banner-height: 100px}}.banner{animation: append-animate 0.3s linear;width: var(--banner-width);height: var(--banner-height);background-color: var(--fill-color);display: flex;flex-direction: var(--flow);padding: 5px 8px;box-sizing: border-box;overflow: hidden}.banner-delete{animation: delete-animate 0.3s linear;opacity: 0%}.content{display: flex;align-items: center;flex: 2;font-size: 12px;overflow: hidden;white-space: pre-line}.action{display: flex;flex-direction: row-reverse;align-items: center;gap: 10px;flex: 1;overflow: hidden}`,uL=W` ${e=>(e=>W`<div role="alert" aria-live="polite" class="banner ${e=>e.dismissAnimation}" ${Ie("banner")}><div part="content" class="content"><slot name="content">${He(e=>e.notification,W`<div><div>${e=>{var t;return(null===(t=e.notification)||void 0===t?void 0:t.body)||"Place holder for notification message"}}</div></div>`)}</slot></div><div part="action" class="action"><slot name="action" class="action">${He(e=>e.notification,W`<${e}-button slot="action" appearance="lightweight" @click=${e=>e.dismiss()}>${e=>{var t,i,o,c;return(null===(c=null===(o=null===(i=null===(t=e.notification)||void 0===t?void 0:t.config)||void 0===i?void 0:i.banner)||void 0===o?void 0:o.dismissingAction)||void 0===c?void 0:c.label)||"Ignore"}}</${e}-button>`)} ${qe(e=>{var t,i;return null===(i=null===(t=e.notification)||void 0===t?void 0:t.config)||void 0===i?void 0:i.banner.confirmingActions},W`<${e}-button slot="action" appearance="lightweight" @click=${(e,t)=>{var i;null==e||e.action(),null===(i=t.parent)||void 0===i||i.dismissNotification()}}>${e=>e.label}</${e}-button>`)}</slot></div></div>`)($z(e))} `,pL={mode:"open",delegatesFocus:!0};class fL extends qt{constructor(){super(...arguments),this.dismissAnimation=""}connectedCallback(){super.connectedCallback()}dismiss(){return this.dismissAnimation="banner-delete",new Promise(e=>{this.banner.onanimationend=()=>{this.remove(),e()}})}dismissNotification(){return Ou(this,void 0,void 0,function*(){try{yield this.dismiss(),this.remove()}catch(e){Mz.error(e)}})}}Nu([g],fL.prototype,"dismissAnimation",void 0),Nu([g],fL.prototype,"notification",void 0),fL.compose({baseName:"banner",styles:hL,template:uL,shadowOptions:pL});const mL=(e,t)=>Zi(),gL=(e,t)=>Ce` ${ih()}`;class vL extends Qi{}vL.compose(Object.assign({baseName:"breadcrumb",template:mL,styles:gL,shadowOptions:void 0},{}));const bL=(e,t)=>Yi(0,t),yL=(e,t)=>Ce` ${th()}`;class xL extends Ki{}const zL=void 0,CL={separator:"/"};xL.compose(Object.assign({baseName:"breadcrumb-item",template:bL,styles:yL,shadowOptions:zL},CL));const LL=(e,t)=>Xi(0,t),ML=(e,t)=>Ce` ${oh()}`;class wL extends ch{}const kL={delegatesFocus:!0,mode:"open"},SL={};wL.compose(Object.assign({baseName:"button",template:LL,styles:ML,shadowOptions:kL},SL));const $L=()=>Ce` ${sh}`,EL=(e,t)=>Oo(e,t);class NL extends ho{}const AL={delegatesFocus:!0,mode:"open"},OL={};NL.compose(Object.assign({baseName:"calendar",template:EL,styles:$L,shadowOptions:AL},OL));const TL=(e,t)=>To(),RL=(e,t)=>Ce` ${nh()} :host{background-color: var(--fui-card-fill-color);color: var(--fui-card-foreground-color)}`;class IL extends ah{}const _L=void 0,DL={};var FL,HL,PL;IL.compose(Object.assign({baseName:"card",template:TL,styles:RL,shadowOptions:_L},DL)),function(e){e.BELOW="below",e.ABOVE="above"}(FL||(FL={}));var VL=function(){if(PL)return HL;PL=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,c=parseInt,s="object"==typeof tf&&tf&&tf.Object===Object&&tf,n="object"==typeof self&&self&&self.Object===Object&&self,a=s||n||Function("return this")(),r=Object.prototype.toString,l=Math.max,d=Math.min,h=function(){return a.Date.now()};function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(s){if("number"==typeof s)return s;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==r.call(e)}(s))return NaN;if(u(s)){var n="function"==typeof s.valueOf?s.valueOf():s;s=u(n)?n+"":n}if("string"!=typeof s)return 0===s?s:+s;s=s.replace(e,"");var a=i.test(s);return a||o.test(s)?c(s.slice(2),a?2:8):t.test(s)?NaN:+s}return HL=function(e,t,i){var o,c,s,n,a,r,f=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var i=o,s=c;return o=c=void 0,f=t,n=e.apply(s,i)}function y(e){var i=e-r;return void 0===r||i>=t||i<0||g&&e-f>=s}function x(){var e=h();if(y(e))return z(e);a=setTimeout(x,function(e){var i=t-(e-r);return g?d(i,s-(e-f)):i}(e))}function z(e){return a=void 0,v&&o?b(e):(o=c=void 0,n)}function C(){var e=h(),i=y(e);if(o=arguments,c=this,r=e,i){if(void 0===a)return function(e){return f=e,a=setTimeout(x,t),m?b(e):n}(r);if(g)return a=setTimeout(x,t),b(r)}return void 0===a&&(a=setTimeout(x,t)),n}return t=p(t)||0,u(i)&&(m=!!i.leading,s=(g="maxWait"in i)?l(p(i.maxWait)||0,t):s,v="trailing"in i?!!i.trailing:v),C.cancel=function(){void 0!==a&&clearTimeout(a),f=0,o=r=c=a=void 0},C.flush=function(){return void 0===a?n:z(h())},C},HL}(),BL=of(VL);const UL=Ce` :host{--scrollbar-width: 12px;--scrollbar-thumb-width: 8px}.root{position: relative;width: inherit;min-width: 250px}.control{cursor: pointer;position: relative;display: flex;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}#display-field{width: 100%;cursor: pointer;color: var(--neutral-foreground-rest);min-height: 40px;padding: 0 calc(var(--design-unit) * 2.25px);border-width: 0;background-color: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px)}#display-field[disabled]{cursor: not-allowed;opacity: 30%}#display-field:focus{outline: 1px solid var(--accent-fill-rest);background: var(--neutral-fill-input-rest);border-style: none;box-shadow: none}#display-field:hover:not(:focus):not([disabled]){outline: 1px solid var(--neutral-stroke-hover)}button{pointer-events: none}.indicator{position: absolute;left: calc(100% - 26px);padding: 0;cursor: pointer}#arrow-icon{width: 16px;fill: white;transform: rotate(0deg);transition: transform 0.2s linear 0s}#arrow-icon.flipped{transform: rotate(180deg)}.disabled-svg{pointer-events: none;opacity: 30%}.position-above{bottom: 100%}::-webkit-scrollbar{width: var(--scrollbar-width)}::-webkit-scrollbar-track{background: var(--neutral-layer-4)}::-webkit-scrollbar-thumb{width: var(--scrollbar-thumb-width);border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-layer-2);border: 3px solid var(--neutral-layer-4)}::-webkit-scrollbar-corner{background: var(--neutral-layer-4)}.multiselect-dropdown{display: flex;flex-direction: column;position: absolute;height: max-content;overflow: hidden;margin-top: calc(var(--design-unit) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;z-index: 999}.multiselect-dropdown:not(.is-resizing){transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s}.checkbox-container{display: flex;flex-direction: column;list-style: none;overflow-y: auto;height: 100%}.is-resizing .checkbox-container{overflow-y: hidden}.checkbox-container zero-checkbox{min-width: fit-content}.checkbox-container zero-checkbox[disabled], .checkbox-container foundation-checkbox[disabled]{cursor: not-allowed}.visible{visibility: visible;max-height: var(--custom-max-height, ${230..toString()}px);overflow: hidden}::slotted(foundation-checkbox), foundation-checkbox{border-bottom: 1px solid var(--neutral-layer-4);padding: 5px 0 5px 5px;margin: 0}::slotted(foundation-checkbox:hover), foundation-checkbox:hover{background-color: var(--neutral-layer-3);cursor: pointer}::slotted(foundation-checkbox)::part(label), foundation-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}ol, li{margin: 0;padding: 0}.checkbox{width: 100%}.select-all{width: 100%;margin-left: 0;margin-right: 0}.display-value{position: absolute;right: 40px;color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-family: var(--body-font)}.options-header-item-hidden{display: none}.resize-button{position: absolute;bottom: 0;right: 0;width: 12px;height: 12px;cursor: nw-resize;background: linear-gradient( -45deg, transparent 30%, var(--neutral-foreground-rest) 30%, var(--neutral-foreground-rest) 40%, transparent 40%, transparent 60%, var(--neutral-foreground-rest) 60%, var(--neutral-foreground-rest) 70%, transparent 70% );z-index: 1000;opacity: 60%;transition: opacity 0.2s ease}.resize-button:hover{opacity: 100%}.multiselect-dropdown.resizable{resize: none;overflow: hidden}`;var jL;let qL=jL=class extends wz{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=jL.defaultPageSize,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria="",this.listboxElement=null,this.loadingMoreRows=!1,this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.selectOpenChangeHandler=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.open)&&(this.listboxElement||this.attachListboxScrollListener(),this.topUpVisibleListbox())},this.listboxScrollHandler=()=>{const e=this.listboxElement;e&&this.isNearListboxBottom(e)&&this.loadNextPage()},this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{var t;const i=e.target.value,o=null===(t=this.options)||void 0===t?void 0:t.find(e=>String(e.label)===i);!o&&this.allowCustomOptions&&this.select instanceof uh?this.select.$emit("value-change",{label:i,value:i}):this.select.$emit("value-change",o)}}initialSelectedValueChanged(e,t){t!==e&&(t?this.select&&this.getDisplayForValue(t)===String(this.select.value||"")||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData()):this.select&&(this.initalSelectedValueInitialized=!1,this.clearData(),this.resetCombobox()))}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Ou(this,void 0,void 0,function*(){var t,i;if(e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=null!==(i=this.optionElement)&&void 0!==i?i:`${$z(this.select)}-option`,this.select.addEventListener("change",this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.infiniteScroll){if(this.isSnapshot=!0,this.maxRows=this.pageSize>0?this.pageSize:jL.defaultPageSize,this.select.addEventListener("open-change",this.selectOpenChangeHandler),yield this.applyInfiniteScrollFetchMode(),!this.isConnected)return;u.queueUpdate(()=>this.attachListboxScrollListener())}this.fetchData(),this.valueField||Mz.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')})}disconnectedCallback(){var e;super.disconnectedCallback(),this.resizeObserver.disconnect(),null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null,this.select.removeEventListener("open-change",this.selectOpenChangeHandler),this.select.removeEventListener("change",this.selectChangeHandler)}applyInfiniteScrollFetchMode(){return Ou(this,void 0,void 0,function*(){if(this.resourceName&&this.connect.isConnected)try{const e=yield this.resources.getResourceTypeFor(this.resourceName);this.isSnapshot=e!==sb.DATASERVER}catch(e){Mz.warn(`Unable to determine the resource type for ${this.resourceName}`,e)}})}attachListboxScrollListener(){var e,t,i,o,c,s,n;this.isConnected&&(null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null!==(c=null!==(i=null===(t=this.select)||void 0===t?void 0:t.scrollableListbox)&&void 0!==i?i:null===(o=this.select)||void 0===o?void 0:o.listbox)&&void 0!==c?c:null===(n=null===(s=this.select)||void 0===s?void 0:s.shadowRoot)||void 0===n?void 0:n.querySelector(".listbox"),this.listboxElement?this.listboxElement.addEventListener("scroll",this.listboxScrollHandler):Mz.warn("Unable to locate listbox element, infinite scroll will not be available."))}isNearListboxBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-jL.scrollLoadThresholdPx}loadNextPage(){return Ou(this,void 0,void 0,function*(){if(this.loadingMoreRows||!this.canRequestMoreRows())return;this.loadingMoreRows=!0;const e=this.datasource.resourceType===sb.REQUEST_SERVER;try{yield this.requestMoreRows()}catch(e){return void(this.loadingMoreRows=!1)}e&&(this.loadingMoreRows=!1)})}topUpVisibleListbox(){this.infiniteScroll&&requestAnimationFrame(()=>{if(!this.isConnected)return;const e=this.listboxElement;e&&0!==e.clientHeight&&this.isNearListboxBottom(e)&&e.scrollHeight!==this.lastTopUpScrollHeight&&(this.lastTopUpScrollHeight=e.scrollHeight,this.loadNextPage())})}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof uh&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return Ou(this,void 0,void 0,function*(){(yield this.datasource.init(this.datasourceOptions(),!0))?function(e,t){const i=new Dz;i.withExpression((new Fz).withField(e.valueField).withValue(t).withSerialiser(Rz.equals).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${i.build()}`:e.criteria=i.build()}(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.rowsSyncedWithStream.clear(),this.options=[],this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.loadingMoreRows=!1,this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof jL||this.select.removeChild(e)}),this.select.value="",this.select.initialValue="")}checkOverflow(e){const t=e.shadowRoot.querySelector(".content");t&&(t.scrollWidth>t.clientWidth?e.setAttribute("title",e.textContent):e.removeAttribute("title"))}rowToOption(e){var t;return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}}renderListboxOptions(e){e.forEach(({value:e,label:t})=>{const i=document.createElement(this.optionElement);i.textContent=t||e,i.value=e,this.select.appendChild(i),this.resizeObserver.observe(i)})}removeEmptyDataOption(){this.emptyDataOption&&(this.emptyDataOption.remove(),this.emptyDataOption=null)}syncComponentData(e){this.loadingMoreRows=!1;const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.removeEmptyDataOption(),this.options=t.map(e=>this.rowToOption(e));const e=0===this.renderedOptionsCount;if(this.renderListboxOptions(this.options.slice(this.renderedOptionsCount)),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox(),!this.initalSelectedValueInitialized||this.select instanceof uh&&!this.select.async&&e){this.resetCombobox();const e=this.getInitialLabel();u.queueUpdate(()=>{this.select.value=String(e),e&&this.select instanceof uh&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else if(this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof uh&&!this.select.async)&&(this.resetCombobox(),u.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0),this.select&&!this.emptyDataOption){const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(e),this.emptyDataOption=e}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){var t;if(null==e||0!==e&&!e)return"";const i=null===(t=this.options)||void 0===t?void 0:t.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof uh?String(i?i.label:e):i?String(i.label):""}resetCombobox(){this.select&&this.select instanceof uh&&this.select.resetCombobox()}handleStreamInserts(e){var t,i;if(this.loadingMoreRows=!1,!(null==e?void 0:e.length))return;this.removeEmptyDataOption();const o=new Set((null!==(t=this.options)&&void 0!==t?t:[]).map(e=>String(e.value))),c=e.filter(e=>!o.has(String(e[this.valueField])));if(!c.length)return Mz.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`),void(this.moreRowsAvailable=!1);const s=c.map(e=>this.rowToOption(e));this.options=[...null!==(i=this.options)&&void 0!==i?i:[],...s],this.renderListboxOptions(s),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox()}handleStreamDeletes(e){Mz.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Mz.debug("handleStreamUpdates - Method not implemented.")}};qL.defaultPageSize=20,qL.scrollLoadThresholdPx=32,Nu([Yx],qL.prototype,"resources",void 0),Nu([re({attribute:"label-field"})],qL.prototype,"labelField",void 0),Nu([re({attribute:"option-element"})],qL.prototype,"optionElement",void 0),Nu([re({attribute:"value-field"})],qL.prototype,"valueField",void 0),Nu([re({attribute:"empty-data-label"})],qL.prototype,"emptyDataLabel",void 0),Nu([re({mode:"boolean",attribute:"allow-custom-options"})],qL.prototype,"allowCustomOptions",void 0),Nu([re({mode:"boolean",attribute:"infinite-scroll"})],qL.prototype,"infiniteScroll",void 0),Nu([re({attribute:"page-size",converter:ne})],qL.prototype,"pageSize",void 0),Nu([g],qL.prototype,"labelFormatter",void 0),Nu([g],qL.prototype,"labelRowFormatter",void 0),Nu([g],qL.prototype,"initialSelectedValue",void 0),qL=jL=Nu([ye({name:"options-datasource"})],qL);let GL=class extends wz{constructor(){super(...arguments),this.isSnapshot=!0,this.baseCriteria=""}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Ou(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||Mz.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")')})}clearData(){this.select.options=[]}syncComponentData(e){var t;const i=(null!=e?e:Array.from(this.rowsSyncedWithStream.values())).map(e=>{var t;return{value:e[this.valueField],label:this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}});(null===(t=this.select)||void 0===t?void 0:t.async)&&(this.select.loading=!1),this.select.options=i}handleStreamInserts(e){Mz.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){Mz.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Mz.debug("handleStreamUpdates - Method not implemented.")}};Nu([re({attribute:"value-field"})],GL.prototype,"valueField",void 0),Nu([re({attribute:"label-field"})],GL.prototype,"labelField",void 0),GL=Nu([ye({name:"multiselect-datasource"})],GL);const WL=(e="foundation")=>W`<label part="label" for="display-field" class=${e=>{var t;return Jt("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}><slot name="label" ${Ke({property:"defaultSlottedNodes",filter:Ds})}></slot></label><div class="root" part="root" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control"><input id="display-field" part="filter-search" role="combobox" aria-haspopup="listbox" aria-controls="checkbox-container" aria-expanded=${e=>e.open?"true":"false"}tabindex="${e=>e.tabindex}" ?readonly=${e=>!e.search}@click=${e=>e.toggle()}?disabled="${e=>e.disabled}" ${Ie("filterSearchInput")}value=${Ep(e=>e.filterSearchValue,"string","input")}placeholder="${e=>e.getDisplayValue}" autocomplete="off" @input=${(e,t)=>e.inputHandler()}@change=${(e,t)=>e.changeHandler(t.event)}/><div part="indicator" class="indicator" @click=${e=>!e.disabled&&e.toggle()}><svg viewBox="0 0 12 7" ${Ie("arrowIcon")}id="arrow-icon" class="${e=>Jt(["disabled-svg",e.disabled])}" xmlns="http://www.w3.org/2000/svg"><path d="${"M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"}" /></svg></div>${He(e=>e.filterSearchValue&&e.selectedOptions.length,W`<div class="display-value">${e=>e.getDisplayValue}</div>`)}</div>${He(e=>e.loading,W`<${e}-progress slot="indicator"></${e}-progress>`)}<section class=${e=>Jt("multiselect-dropdown",["resizable",e.resizable])} ${Ie("multiselectDropdown")}part="multiselect-dropdown">${He(e=>e.resizable,W`<div class="resize-button" @mousedown=${(e,t)=>e.handleResizeStart(t.event)}></div>`)} ${He(e=>e.all,W`<${e}-button class="select-all" @click=${e=>e.selectCheckboxAll()}?disabled="${(e,t)=>e.isAllOptionsDisabled}">${e=>e.areAllOptionsSelected?"Deselect All":"Select All"} ${e=>e.name}</${e}-button>`)}<ol id="checkbox-container" class="checkbox-container options" aria-multiselectable="true" part="options-ol"><li part="options-header-item" class=${e=>{var t;return Jt("options-header-item",["options-header-item-hidden",!(null===(t=e.optionsHeaderSlottedNodes)||void 0===t?void 0:t.length)])}}><slot name="options-header" ${Ke({property:"optionsHeaderSlottedNodes",filter:Ds})}></slot></li>${qe(e=>e.filteredAvailableOptions,W`<li role="option" value=${(e,t)=>t.parent.getItemLabel(e)}part="option"><${e}-checkbox part="checkbox" class="checkbox" exportparts="label:checkbox-label" @keydown=${(e,t)=>t.parent.checkboxKeyDown(e,t.event)}@click=${(e,t)=>t.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parent.isOptionDisabled(e)}">${(e,t)=>{var i,o;return null===(o=null===(i=t.parent)||void 0===i?void 0:i.itemRenderer)||void 0===o?void 0:o.call(i,e,t.parent)}}</${e}-checkbox></li>`)}</ol>${He(e=>e.showCreatable,W`<${e}-button @click=${e=>e.addOption()}>Create&nbsp;"${e=>e.filterSearchValue}"</${e}-button>`)}</section></div><slot ${Ke({property:"slottedDatasource",filter:e=>e instanceof GL})}></slot>`,YL=W` ${WL()} `,KL=void 0,ZL={};class QL extends qt{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.resizable=!1,this.filterByContains=!1,this.filterSearchValue="",this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=FL.BELOW,this.itemRenderer=this.defaultItemRenderer,this.initialisedOptions=!1,this.isResizing=!1,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.handleResizeStart=e=>{this.resizable&&this.multiselectDropdown&&(e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.startX=e.clientX,this.startY=e.clientY,this.startWidth=this.multiselectDropdown.offsetWidth,this.startHeight=this.multiselectDropdown.offsetHeight,this.multiselectDropdown.classList.add("is-resizing"),document.addEventListener("mousemove",this.handleResizeMove),document.addEventListener("mouseup",this.handleResizeEnd))},this.handleResizeMove=e=>{if(!this.isResizing||!this.multiselectDropdown)return;e.preventDefault();const t=e.clientX-this.startX,i=e.clientY-this.startY,o=Math.max(250,this.startWidth+t),c=Math.max(100,this.startHeight+i);this.multiselectDropdown&&(this.multiselectDropdown.style.width=`${o}px`,this.multiselectDropdown.style.maxHeight=`${c}px`)},this.handleResizeEnd=()=>{this.isResizing=!1,document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd),this.multiselectDropdown&&(this.multiselectDropdown.classList.remove("is-resizing"),this.multiselectDropdown.style.setProperty("--custom-max-height",this.multiselectDropdown.style.maxHeight),this.multiselectDropdown.style.removeProperty("max-height"))}}debounceChanged(e,t){this.debouncedInputHandler=BL(this.asyncSetFilter,t)}openChanged(e,t){var i,o,c,s;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.arrowIcon)||void 0===i||i.classList.add("flipped"),null===(o=this.multiselectDropdown)||void 0===o||o.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(c=this.arrowIcon)||void 0===c||c.classList.remove("flipped"),null===(s=this.multiselectDropdown)||void 0===s||s.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===FL.ABOVE&&(null===(e=this.multiselectDropdown)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd)}defaultItemRenderer(e,t){return W` ${"string"==typeof e?W`<span part="option-label">${()=>t.getItemLabel(e)}</span>`:W`<span data-option-label-text=${()=>e.optionLabelText}style=${()=>e.labelStyle}part="option-label">${()=>t.getItemLabel(e)}</span>`} `}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,c=i-t.bottom;e=c<230&&o>c?FL.ABOVE:FL.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===FL.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===FL.BELOW)}optionValueGetter(e){return"string"==typeof e?e:e.value}optionLabelGetter(e){return"string"==typeof e?e:e.label}getItemLabel(e){let t;return e?(t="string"==typeof e?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get areAllOptionsSelected(){const e=this.getEnabledOptionsCount();return e>0&&this.selectedOptions.length===e}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&0===this.findExactMatchOptions().length}isOptionSelected(e){const t=this.optionValueGetter(e);return this.selectedOptions.some(i=>{if("object"==typeof e&&"object"==typeof e.value)try{return JSON.stringify(i)===JSON.stringify(t)}catch(e){return i===t}return i===t})}selectCheckboxOne(e){const t=this.optionValueGetter(e),i=this.selectedOptions.includes(t);this.selectedOptions=i?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}checkboxKeyDown(e,t){return" "===t.key&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){const e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){const e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>{var i,o;const c="string"==typeof t?t:null!==(i=this.optionLabelGetter(t))&&void 0!==i?i:this.optionValueGetter(t);return(null!==(o=null==c?void 0:c.toLowerCase())&&void 0!==o?o:"")===e})}setFilter(){const e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if("string"==typeof t)return t.toLowerCase().includes(e);const i=t.label.toLowerCase(),o="object"==typeof t.value?(c=t.value,Object.values(c).some(t=>t.toLowerCase().includes(e))):String(t.value).toLowerCase().includes(e);var c;return i.includes(e)||o})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?Pz(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,Mz.warn("Multiselect-datasource is not connected. Please add a datasource to use this functionality."))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){kz(e,this)&&(this.open=!1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Escape":if(this.open){this.open=!1;break}break;case"ArrowUp":case"ArrowDown":if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){const{clearSelectedValues:t=!0,clearFilterText:i=!0}=e;t&&(this.selectedOptions=[],this.$emit("selectionChange",this.selectedOptions)),i&&(this.filterSearchValue="",this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value="")),this.$emit("clear",{clearSelectedValues:t,clearFilterText:i})}}Nu([re],QL.prototype,"name",void 0),Nu([re({mode:"boolean",attribute:"auto-position"})],QL.prototype,"autoPosition",void 0),Nu([re({mode:"boolean"})],QL.prototype,"all",void 0),Nu([re({mode:"boolean"})],QL.prototype,"allSelected",void 0),Nu([re({mode:"boolean"})],QL.prototype,"search",void 0),Nu([re({mode:"boolean"})],QL.prototype,"disabled",void 0),Nu([re({mode:"boolean"})],QL.prototype,"creatable",void 0),Nu([re({mode:"boolean"})],QL.prototype,"async",void 0),Nu([re],QL.prototype,"debounce",void 0),Nu([re({mode:"boolean"})],QL.prototype,"resizable",void 0),Nu([re],QL.prototype,"tabindex",void 0),Nu([re({mode:"boolean",attribute:"filter-by-contains"})],QL.prototype,"filterByContains",void 0),Nu([g],QL.prototype,"defaultSlottedNodes",void 0),Nu([g],QL.prototype,"slottedDatasource",void 0),Nu([g],QL.prototype,"valueFormatter",void 0),Nu([g],QL.prototype,"loading",void 0),Nu([g],QL.prototype,"filterSearchValue",void 0),Nu([g],QL.prototype,"open",void 0),Nu([g],QL.prototype,"options",void 0),Nu([g],QL.prototype,"selectedOptions",void 0),Nu([g],QL.prototype,"filteredAvailableOptions",void 0),Nu([g],QL.prototype,"scrollContainer",void 0),Nu([re],QL.prototype,"position",void 0),Nu([g],QL.prototype,"onAllSelectedCallback",void 0),Nu([g],QL.prototype,"itemRenderer",void 0),Nu([v],QL.prototype,"getDisplayValue",null),Nu([v],QL.prototype,"getPlaceholder",null),Nu([v],QL.prototype,"isAllOptionsDisabled",null),Nu([v],QL.prototype,"areAllOptionsSelected",null),Nu([v],QL.prototype,"showCreatable",null),Nu([g],QL.prototype,"optionsHeaderSlottedNodes",void 0),QL.compose(Object.assign({baseName:"multiselect",template:YL,styles:UL,shadowOptions:KL},ZL));const XL=Ce` .root{position: relative;width: 100%;min-width: 250px}.control-button{display: flex;justify-content: center;min-width: 31px;width: 31px;height: 31px;margin-left: calc(var(--design-unit) * 2px);color: var(--neutral-foreground-hint)}.control{cursor: pointer;position: relative;display: flex;justify-content: end;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}.control:hover .control-button, .control:hover .label{color: var(--neutral-foreground-rest)}button{pointer-events: none}.options{display: flex;flex-direction: column;position: absolute;height: max-content;overflow-y: hidden;margin-top: 5px;padding: calc((var(--design-unit) + 3) * 2px) calc((var(--design-unit) + 3) * 1px);border: 1px solid rgba(46 51 57 / 100%);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s;z-index: 999}.option-content{display: flex;align-items: center;gap: calc(var(--design-unit) * 4px);width: 100%}.icon-container{display: flex;align-items: center;justify-content: center;width: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px + 4px );height: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px );border-radius: calc((var(--control-corner-radius) - 1) * 2px);background: var(--neutral-layer-2);box-sizing: border-box;box-shadow: 0 0 5px 0 rgba(0 0 0 / 35%);flex-shrink: 0}.text-content{display: flex;flex-direction: column;flex: 1}.svg-icon{height: 2em}.position-above{bottom: 100%}.checkbox-container{display: flex;flex-direction: column;overflow-y: scroll;scrollbar-width: thin;scrollbar-color: rgb(46 48 53) rgb(31 33 38)}span{border-bottom: calc(var(--stroke-width) * 1px) solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 2) * 2px) calc((var(--design-unit) + 3) * 1px);font-size: calc((var(--type-ramp-base-font-size) - 1px));color: var(--neutral-foreground-hint)}.multiselect-checkbox{min-width: fit-content;flex-direction: row-reverse;justify-content: space-between;align-items: flex-start;border-bottom: 1px solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) 0;margin: 0}.multiselect-checkbox:hover{background-color: rgb(45 47 51);cursor: pointer}.multiselect-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis}.multiselect-checkbox::part(control){min-width: calc( ( (var(--base-height-multiplier) + var(--density)) * var(--design-unit) / 2 + var(--design-unit) ) * 1px )}.checkbox-container .multiselect-checkbox[disabled]{cursor: not-allowed}.description{text-wrap: wrap;font-size: calc((var(--type-ramp-base-font-size) - 1px));margin: calc((var(--design-unit) + 3) * 1px) 0}#filter-search{padding: 5px}::-webkit-scrollbar{width: 12px}::-webkit-scrollbar-track{background: rgb(31 33 38)}::-webkit-scrollbar-thumb{width: 8px;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: rgb(46 48 53);border: 3px solid rgb(31 33 38)}.visible{visibility: visible;max-height: ${450..toString()}px}`,JL=(e="foundation")=>W`<div class="root" part="root"><div class="control" part="control" @click=${e=>!e.disabled&&e.toggle()}><label part="label" for="control" class=${e=>{var t;return Jt("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}><slot ${Ke({property:"defaultSlottedNodes",filter:Ds})}></slot></label><${e}-button class="control-button" part="control-button"><slot name="button-content"><${e}-icon name="plus" variant="solid" size="lg"></${e}-icon></slot></${e}-button></div><div ${Ie("optionsElement")}class="options" part="options">${He(e=>e.search,W`<${e}-text-field id="filter-search" part="filter-search" value=${Ep(e=>e.filterSearchValue,"string","input")}placeholder="${e=>e.getPlaceholder}" @input=${(e,t)=>e.setFilter()}@change=${(e,t)=>e.changeHandler(t.event)}></${e}-text-field>`)}<div class="checkbox-container" part="checkbox-container">${qe(e=>e.filteredAvailableOptions,W`<span>${e=>e.type}</span>${qe(e=>e.options,W`<${e}-checkbox class="multiselect-checkbox" part="multiselect-checkbox" @click=${(e,t)=>t.parentContext.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parentContext.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parentContext.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parentContext.parent.isOptionDisabled(e)}"><div class="option-content">${He(e=>e.icon||e.svg,W`<div class="icon-container">${He(e=>e.icon,W`<${e}-icon style="color:${e=>e.iconColor||"#fff"}" name="${e=>e.icon}" size="xl"></${e}-icon>`)} ${He(e=>e.svg,W`<img class="svg-icon" src="${e=>e.svg}" alt="${e=>e.label}" />`)}</div>`)}<div class="text-content"><div class="option-label">${(e,t)=>t.parentContext.parent.getItemLabel(e)}</div>${He(e=>e.description,W`<p class="description">${e=>e.description}</p>`)}</div></div></${e}-checkbox>`)} `)}</div></div></div>`,eM=W` ${JL()} `,tM=void 0,iM={};class oM extends qt{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=FL.BELOW}openChanged(e,t){var i,o;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.optionsElement)||void 0===i||i.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(o=this.optionsElement)||void 0===o||o.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===FL.ABOVE&&(null===(e=this.optionsElement)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}sortFilteredOptions(e){const t=(null!=e?e:this.options).reduce((e,t)=>{const i=t.type||"Other";return e[i]?e[i].options.push(t):e[i]={type:i,options:[t]},e},{});return Object.values(t)}optionsChanged(){this.filteredAvailableOptions=this.sortFilteredOptions()}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains("content-wrapper");)t=t.parentElement;if(t){const i=t.getBoundingClientRect(),o=this.getBoundingClientRect(),c=i.top+i.height/2;e=o.top<c?FL.BELOW:FL.ABOVE}else{const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,c=i-t.bottom;e=c<t.height&&o>c?FL.ABOVE:FL.BELOW}}e===FL.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===FL.BELOW&&(this.optionsElement.classList.add("position-below"),this.optionsElement.classList.remove("position-above"))}optionGetter(e){return e.value}getItemLabel(e){let t;return e?(t=e.label||e.value||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){const t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}setFilter(){const e=this.options.filter(e=>{var t;const i=e.description,o=null!==(t=e.label)&&void 0!==t?t:e.value;return(null==i?void 0:i.toLowerCase().includes(this.filterSearchValue.toLowerCase()))||o.toLowerCase().includes(this.filterSearchValue.toLowerCase())?e:void 0});this.filteredAvailableOptions=this.sortFilteredOptions(e)}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){kz(e,this)&&(this.open=!1)}}Nu([re],oM.prototype,"name",void 0),Nu([re({mode:"boolean",attribute:"auto-position"})],oM.prototype,"autoPosition",void 0),Nu([re({mode:"boolean"})],oM.prototype,"search",void 0),Nu([re({mode:"boolean"})],oM.prototype,"disabled",void 0),Nu([g],oM.prototype,"defaultSlottedNodes",void 0),Nu([g],oM.prototype,"valueFormatter",void 0),Nu([g],oM.prototype,"filterSearchValue",void 0),Nu([g],oM.prototype,"open",void 0),Nu([g],oM.prototype,"options",void 0),Nu([g],oM.prototype,"selectedOptions",void 0),Nu([g],oM.prototype,"filteredAvailableOptions",void 0),Nu([g],oM.prototype,"position",void 0),Nu([v],oM.prototype,"getPlaceholder",null),oM.compose(Object.assign({baseName:"categorized-multiselect",template:eM,styles:XL,shadowOptions:tM},iM));const cM=(e,t)=>Io(0,t),sM=(e,t)=>Ce` ${rh()}`;class nM extends Fo{}const aM=void 0,rM={checkedIndicator:'\n <svg\n aria-hidden="true"\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '};nM.compose(Object.assign({baseName:"checkbox",template:cM,styles:sM,shadowOptions:aM},rM));const lM=(e,t)=>Ce` .combo-box-indicator{transition-property: transform;transition-duration: 0.2s;transition-timing-function: ease-out}:host([open]) .combo-box-indicator{transform: rotate(180deg)}${hh(e)}`,dM=(e,t)=>W`<template aria-activedescendant="${e=>e.activeDescendant}" class="${e=>e.open?"open":""} ${e=>e.disabled?"disabled":""} ${e=>e.position}" ?open="${e=>e.open}" @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control">${et(0,t)}<slot name="control"><input aria-activedescendant="${e=>e.activeDescendant}" aria-autocomplete="${e=>e.ariaAutoComplete||e.autocomplete}" aria-controls="${e=>e.ariaControls||e.listboxId}" aria-disabled="${e=>e.disabled?"true":"false"}" aria-expanded="${e=>e.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="${e=>e.ariaLabelledby}" aria-label="${e=>e.ariaLabel}" autocomplete="${e=>e.autocomplete}" class="selected-value" part="selected-value" placeholder="${e=>e.placeholder}" role="combobox" type="text" ?disabled="${e=>e.disabled}" :value="${e=>e.value}" @input="${(e,t)=>e.inputHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}" ${Ie("control")}/><div class="indicator" part="indicator" aria-hidden="true"><slot name="indicator">${t.indicator||""}</slot></div></slot>${Je(0,t)}</div><div class="listbox" id="${e=>e.listboxId}" part="listbox" role="listbox" ?disabled="${e=>e.disabled}" ?hidden="${e=>!e.open}" ${Ie("listbox")}><slot ${Ie("slottedDatasource")} ${Ke({filter:Bo.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}></slot></div></template>`;var hM,uM;class pM extends uh{constructor(){super(...arguments),hM.set(this,void 0),uM.set(this,!1),this.needManualChangeEventDispatch=!1,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.filterMode="startsWith",this.scrollToSelectedWhenOpening=!1,this.scrollToSelectedWhenOpeningOptions={behavior:"auto",block:"nearest"},this.scrollWhenSelectionChanges=!1,this.scrollWhenSelectionChangesOptions={behavior:"auto",block:"center"},this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value="",this.control.value="",this.filter="",this.filterOptions()}}get activeDescendant(){var e,t;if(this.selectedOptions&&0!==this.selectedOptions.length)return this.ariaActiveDescendant=null===(e=this.selectedOptions[0])||void 0===e?void 0:e.id,null===(t=this.selectedOptions[0])||void 0===t?void 0:t.id}debounceChanged(e,t){this.debouncedInputHandler=BL(this.asyncSetFilter,t)}get scrollableListbox(){var e,t;return null!==(e=this.listbox)&&void 0!==e?e:null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".listbox")}openChanged(){super.openChanged(),this.$emit("open-change",{open:this.open}),this.open?this.scrollToSelectedWhenOpening&&setTimeout(()=>{const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollToSelectedWhenOpeningOptions)},500):(this.manuallyDispatchChangeEvent(),this.filter="",this.filterOptions())}get value(){return m.track(this,"value"),this._ourValue}set value(e){var t,i,o;if(void 0===e)return;const c=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){const c=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===String(e).toLowerCase(),s=this.options?this.options.findIndex(c):-1,n=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,a=null===(i=this.options[s])||void 0===i?void 0:i.text;this.selectedIndex=a&&a!==n?s:this.selectedIndex,e&&""!==e.trim()&&-1===s&&(e=(null===(o=this.firstSelectedOption)||void 0===o?void 0:o.text)||e)}c!==e&&(this._ourValue=e,super.valueChanged(c,e),m.notify(this,"value"))}slottedOptionsChanged(e,t){this.enableAsyncForInfiniteScrollDatasource(),super.slottedOptionsChanged(e,t),this.updateValue(!1)}enableAsyncForInfiniteScrollDatasource(){var e;if(this.async)return;const t=null===(e=this.slottedDatasource)||void 0===e?void 0:e.assignedNodes().find(e=>e instanceof qL);(null==t?void 0:t.infiniteScroll)&&(this.async=!0)}filterOptions(){if(this.async)return this.filteredOptions=[...this._options],void this._options.forEach(e=>e.hidden=!1);this.autocomplete&&this.autocomplete!==Qo||(this.filter="");const e=this.filter,t=this.caseSensitive?e:e.toLowerCase();this.filteredOptions=this._options.filter(e=>{const i=this.caseSensitive?e.text:e.text.toLowerCase();return"contains"===this.filterMode?i.includes(t):i.startsWith(t)}),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled)if(kz(e,this))this.open=!1;else{if(Sz(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!Sz(e,this.control))return super.clickHandler(e)}}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":if(Vu(this,uM,this.open,"f"),!this.open)return this.open=!0,!0;break;case"ArrowDown":case"ArrowUp":if(!this.open)return this.open=!0,!0;if(this.scrollWhenSelectionChanges){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollWhenSelectionChangesOptions)}break;case"Escape":if(this.control.value!==this.currentValue)return this.filter="",this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),void(this.open=!1);if(!this.open)return!0}const i=super.keydownHandler(e);return"Enter"!==t?i:void 0}keyupHandler(e){var t;const i=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(i){case"Enter":return!Pu(this,uM,"f");case"ArrowDown":case"ArrowUp":this.open&&this.firstSelectedOption&&this.autocomplete===Zo&&(this.needManualChangeEventDispatch=!0,this.currentValue=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value);break;case"Home":case"End":return;case"Backspace":case"Delete":const i=super.keyupHandler(e);return this.selectItemByValue(this.control.value),i}return super.keyupHandler(e)}get indicator(){return Pu(this,hM,"f")||Vu(this,hM,this.shadowRoot.querySelector('[part="indicator"]'),"f"),Pu(this,hM,"f")}selectItemByValue(e){var t,i,o;this.selectedIndex=null!==(i=null===(t=this.options)||void 0===t?void 0:t.findIndex(t=>t.text===e))&&void 0!==i?i:-1,null===(o=this.options)||void 0===o||o.forEach((e,t)=>e.selected=t===this.selectedIndex)}inputHandler(e){this.async?this.debouncedInputHandler():super.inputHandler(e)}asyncSetFilter(){const e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof qL);if(t.length>0){const i=t[0];null==e||""===e?i.criteria=i.baseCriteria||"":Pz(i,e),u.queueUpdate(()=>{this.control.value=e})}else Mz.warn("Options-datasource is not connected. Please add a datasource to use this functionality.")}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===Zo&&(this.dispatchEvent(new Event("change",{bubbles:!0})),this.needManualChangeEventDispatch=!1)}}hM=new WeakMap,uM=new WeakMap,Nu([g],pM.prototype,"activeDescendant",null),Nu([g],pM.prototype,"slottedDatasource",void 0),Nu([re({mode:"boolean"})],pM.prototype,"async",void 0),Nu([re],pM.prototype,"debounce",void 0),Nu([re({mode:"boolean",attribute:"case-sensitive"})],pM.prototype,"caseSensitive",void 0),Nu([re({mode:"boolean",attribute:"ignore-input-click"})],pM.prototype,"ignoreInputClick",void 0),Nu([re({attribute:"filter-mode"})],pM.prototype,"filterMode",void 0),Nu([re({mode:"boolean",attribute:"scroll-to-selected-when-opening"})],pM.prototype,"scrollToSelectedWhenOpening",void 0),Nu([g],pM.prototype,"scrollToSelectedWhenOpeningOptions",void 0),Nu([re({mode:"boolean",attribute:"scroll-when-selection-changes"})],pM.prototype,"scrollWhenSelectionChanges",void 0),Nu([g],pM.prototype,"scrollWhenSelectionChangesOptions",void 0);const fM={delegatesFocus:!0,mode:"open"},mM={indicator:'\n <svg\n class="combo-box-indicator"\n part="combo-box-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '};pM.compose(Object.assign({baseName:"combobox",template:dM,styles:lM,shadowOptions:fM},mM));const gM=(e,t)=>Ce` :host{--light-size: 12px;--height: calc(var(--design-unit) * 2px + var(--light-size));display: flex;justify-content: center;align-items: center;width: 100%;height: var(--height);margin: calc(var(--design-unit) * 2px) 0;/* https://www.colorxs.com/color/traffic-light-green-2032-20 */ --green: 50 164 49;--trafic-light-green: rgb(var(--green));--trafic-light-green-glow: rgb(var(--green) / 40%) 0 0 4px 4px, rgb(var(--green) / 20%) 0 0 8px 8px;/* https://www.colorxs.com/color/ral-3020-traffic-red */ --red: 187 30 16;--trafic-light-red: rgb(var(--red));--trafic-light-red-glow: rgb(var(--red) / 40%) 0 0 4px 4px, rgb(var(--red) / 20%) 0 0 8px 8px}.light{height: var(--light-size);width: var(--light-size);margin: 1rem;border-radius: 100%}.green{background: var(--trafic-light-green);box-shadow: var(--trafic-light-green-glow)}.red{background: var(--trafic-light-red);box-shadow: var(--trafic-light-red-glow)}.label{font-size: small;color: grey;overflow: hidden;text-overflow: ellipsis;white-space: nowrap}`,vM=W`<div class=${e=>Jt(["light",!0],[e.colour,!0])}></div>${He(e=>e.showLabel,W`<div class="label">${e=>e.label}</div>`)} `;class bM extends qt{constructor(){super(...arguments),this.showLabel=!1,this.label="disconnected",this.colour="red"}connectedCallback(){super.connectedCallback(),this.subscription=this.connect.isConnectedSubject.subscribe(e=>{this.label=this.getLabel(e),this.colour=e?"green":"red"})}disconnectedCallback(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}getLabel(e){if(!e)return"disconnected";return`${this.session.getSessionStorageItem("hostUrl")} ✔`}}Nu([gx],bM.prototype,"connect",void 0),Nu([Cb],bM.prototype,"session",void 0),Nu([re({mode:"boolean",attribute:"show-label"})],bM.prototype,"showLabel",void 0),Nu([g],bM.prototype,"label",void 0),Nu([g],bM.prototype,"colour",void 0),bM.compose({baseName:"connection-indicator",template:vM,styles:gM});const yM=class extends Lo{}.compose(Object.assign({baseName:"data-grid",template:(e,t)=>Co(e),styles:(e,t)=>Ce` ${ph()}`,shadowOptions:void 0},{}));const xM=class extends ko{}.compose(Object.assign({baseName:"data-grid-cell",template:$o,styles:(e,t)=>Ce` ${mh()}`,shadowOptions:void 0},{}));const zM=class extends zo{}.compose(Object.assign({baseName:"data-grid-row",template:So,styles:(e,t)=>Ce` ${fh()}`,shadowOptions:void 0},{})),CM=Ce` :host{position: relative}.date-toggle::part(control){cursor: pointer}.date-toggle::part(label){cursor: pointer}.calendar-dropdown{display: none;width: 300px;z-index: 999;position: absolute;top: 100%;left: 50%;transform: translate(-50%, 8px);margin: 10px 0 0;padding: 20px;background: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);box-shadow: 0 0 8px rgb(0 0 0 / 20%)}.calendar-dropdown.hide-weekends{width: 215px}.calendar-dropdown.top{top: auto;bottom: 100%;margin: 0 0 5px;transform: translate(-50%, -8px)}.calendar-dropdown.left{top: 50%;left: 0;margin: 0 0 0 5px;transform: translate(calc(-8px + -100%), -50%)}.calendar-dropdown.right{top: 50%;left: 100%;transform: translate(8px, -50%)}.calendar-dropdown.visible{display: block}.calendar-dropdown.inline{display: block;position: static;z-index: auto;margin-top: 5px;transform: none}.header{display: flex;justify-content: space-between;align-items: center;margin: 0 0 10px}.header h3{margin: 0;text-transform: capitalize;font-weight: bold;color: var(--neutral-foreground-rest)}.header .icon-button{height: auto;padding: 0;min-width: auto}.header .months-arrows{display: flex;gap: calc(var(--design-unit) * 2px)}.week-days{display: grid;grid-template-columns: repeat(7, 1fr);grid-gap: 5px;margin-bottom: 10px;color: var(--neutral-foreground-rest)}.week-days span{display: flex;justify-content: center;align-items: center;font-size: 14px;font-weight: bold;text-transform: capitalize}.week-days span.disabled{opacity: 60%}.month-days{display: grid;grid-template-columns: repeat(7, 1fr);grid-gap: 5px}.week-days.hide-weekends, .month-days.hide-weekends{grid-template-columns: repeat(5, 1fr)}.month-day{padding: 8px 5px;color: #808080;background: none;display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 4px);cursor: pointer;border: none}.month-day.current{opacity: 100%;color: var(--neutral-foreground-hint)}.month-day.selected{background: var(--accent-foreground-rest);color: var(--neutral-foreground-rest)}.month-day:hover:not(:disabled){background: var(--neutral-stroke-hover);color: var(--neutral-foreground-rest)}.month-day[disabled]{opacity: 50%;cursor: not-allowed}.date-toggle[readonly] .label{cursor: pointer}`,LM=[1,7],MM=e=>W`<${e}-text-field data-test-id="date-picker" readonly :value="${e=>e.inputValue}" placeholder="${e=>e.inputPlaceholder}" part="date-toggle" class="date-toggle" @click="${e=>e.toggleCalendar()}">${e=>e.label}<div class="input-icon-container" part="input-icon-container" slot="end"><${e}-icon variant="regular" name="calendar-alt" size="sm"></${e}-icon></div></${e}-text-field><div class="calendar-dropdown ${e=>e.calendarDropdownClasses} ${e=>e.position}"><div class="header"><h3>${e=>e.currentMonth} ${e=>e.currentYear}</h3><div class="months-arrows"><${e}-button class="icon-button" appearance="accent" @click="${e=>e.prevMonth()}" aria-label="previous month"><${e}-icon name="angle-left"></${e}-icon></${e}-button><${e}-button class="icon-button" appearance="accent" @click="${e=>e.nextMonth()}" aria-label="next month"><${e}-icon name="angle-right"></${e}-icon></${e}-button></div></div><div class="week-days ${e=>Jt(["hide-weekends",e.hideWeekends])}">${qe(e=>{var t;return null===(t=e.calendar)||void 0===t?void 0:t.weekDays},W` ${He((e,t)=>!t.parent.hideWeekends||-1===LM.indexOf(t.index+1),W`<span class="${(e,t)=>Jt(["disabled",-1!==t.parent.disabledDaysOfWeek.indexOf(t.index+1)])}">${(e,t)=>e.substring(0,t.parent.substringNumber)}</span>`)} `,{positioning:!0})}</div><div class="month-days ${e=>Jt(["hide-weekends",e.hideWeekends])}">${qe(e=>e.monthList,W` ${He((e,t)=>!t.parent.hideWeekends||-1===LM.indexOf(e.dayNumber),W`<button ?disabled="${(e,t)=>-1!==t.parent.disabledDaysOfWeek.indexOf(e.dayNumber)}" class="month-day ${(e,t)=>t.parent.isSelectedDate(e)?"selected":""} ${(e,t)=>e.monthNumber===t.parent.calendar.month.number?"current":""}" @click=${(e,t)=>t.parent.selectDay(e)}>${e=>e.date}</button>`)} `)}</div><slot name="bottom"></slot></div>`,wM=W` ${e=>MM($z(e))} `;var kM,SM={exports:{}};function $M(){return kM||(kM=1,function(e){e.exports=function(){var e=1e3,t=6e4,i=36e5,o="millisecond",c="second",s="minute",n="hour",a="day",r="week",l="month",d="quarter",h="year",u="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}},v=function(e,t,i){var o=String(e);return!o||o.length>=t?e:""+Array(t+1-o.length).join(i)+e},b={s:v,z:function(e){var t=-e.utcOffset(),i=Math.abs(t),o=Math.floor(i/60),c=i%60;return(t<=0?"+":"-")+v(o,2,"0")+":"+v(c,2,"0")},m:function e(t,i){if(t.date()<i.date())return-e(i,t);var o=12*(i.year()-t.year())+(i.month()-t.month()),c=t.clone().add(o,l),s=i-c<0,n=t.clone().add(o+(s?-1:1),l);return+(-(o+(i-c)/(s?c-n:n-c))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:h,w:r,d:a,D:u,h:n,m:s,s:c,ms:o,Q:d}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",x={};x[y]=g;var z="$isDayjsObject",C=function(e){return e instanceof k||!(!e||!e[z])},L=function e(t,i,o){var c;if(!t)return y;if("string"==typeof t){var s=t.toLowerCase();x[s]&&(c=s),i&&(x[s]=i,c=s);var n=t.split("-");if(!c&&n.length>1)return e(n[0])}else{var a=t.name;x[a]=t,c=a}return!o&&c&&(y=c),c||!o&&y},M=function(e,t){if(C(e))return e.clone();var i="object"==typeof t?t:{};return i.date=e,i.args=arguments,new k(i)},w=b;w.l=L,w.i=C,w.w=function(e,t){return M(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var k=function(){function g(e){this.$L=L(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[z]=!0}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,i=e.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var o=t.match(f);if(o){var c=o[2]-1||0,s=(o[7]||"0").substring(0,3);return i?new Date(Date.UTC(o[1],c,o[3]||1,o[4]||0,o[5]||0,o[6]||0,s)):new Date(o[1],c,o[3]||1,o[4]||0,o[5]||0,o[6]||0,s)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return w},v.isValid=function(){return!(this.$d.toString()===p)},v.isSame=function(e,t){var i=M(e);return this.startOf(t)<=i&&i<=this.endOf(t)},v.isAfter=function(e,t){return M(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<M(e)},v.$g=function(e,t,i){return w.u(e)?this[t]:this.set(i,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var i=this,o=!!w.u(t)||t,d=w.p(e),p=function(e,t){var c=w.w(i.$u?Date.UTC(i.$y,t,e):new Date(i.$y,t,e),i);return o?c:c.endOf(a)},f=function(e,t){return w.w(i.toDate()[e].apply(i.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(t)),i)},m=this.$W,g=this.$M,v=this.$D,b="set"+(this.$u?"UTC":"");switch(d){case h:return o?p(1,0):p(31,11);case l:return o?p(1,g):p(0,g+1);case r:var y=this.$locale().weekStart||0,x=(m<y?m+7:m)-y;return p(o?v-x:v+(6-x),g);case a:case u:return f(b+"Hours",0);case n:return f(b+"Minutes",1);case s:return f(b+"Seconds",2);case c:return f(b+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var i,r=w.p(e),d="set"+(this.$u?"UTC":""),p=(i={},i[a]=d+"Date",i[u]=d+"Date",i[l]=d+"Month",i[h]=d+"FullYear",i[n]=d+"Hours",i[s]=d+"Minutes",i[c]=d+"Seconds",i[o]=d+"Milliseconds",i)[r],f=r===a?this.$D+(t-this.$W):t;if(r===l||r===h){var m=this.clone().set(u,1);m.$d[p](f),m.init(),this.$d=m.set(u,Math.min(this.$D,m.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[w.p(e)]()},v.add=function(o,d){var u,p=this;o=Number(o);var f=w.p(d),m=function(e){var t=M(p);return w.w(t.date(t.date()+Math.round(e*o)),p)};if(f===l)return this.set(l,this.$M+o);if(f===h)return this.set(h,this.$y+o);if(f===a)return m(1);if(f===r)return m(7);var g=(u={},u[s]=t,u[n]=i,u[c]=e,u)[f]||1,v=this.$d.getTime()+o*g;return w.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,i=this.$locale();if(!this.isValid())return i.invalidDate||p;var o=e||"YYYY-MM-DDTHH:mm:ssZ",c=w.z(this),s=this.$H,n=this.$m,a=this.$M,r=i.weekdays,l=i.months,d=i.meridiem,h=function(e,i,c,s){return e&&(e[i]||e(t,o))||c[i].slice(0,s)},u=function(e){return w.s(s%12||12,e,"0")},f=d||function(e,t,i){var o=e<12?"AM":"PM";return i?o.toLowerCase():o};return o.replace(m,function(e,o){return o||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return w.s(t.$y,4,"0");case"M":return a+1;case"MM":return w.s(a+1,2,"0");case"MMM":return h(i.monthsShort,a,l,3);case"MMMM":return h(l,a);case"D":return t.$D;case"DD":return w.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(i.weekdaysMin,t.$W,r,2);case"ddd":return h(i.weekdaysShort,t.$W,r,3);case"dddd":return r[t.$W];case"H":return String(s);case"HH":return w.s(s,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return f(s,n,!0);case"A":return f(s,n,!1);case"m":return String(n);case"mm":return w.s(n,2,"0");case"s":return String(t.$s);case"ss":return w.s(t.$s,2,"0");case"SSS":return w.s(t.$ms,3,"0");case"Z":return c}return null}(e)||c.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(o,u,p){var f,m=this,g=w.p(u),v=M(o),b=(v.utcOffset()-this.utcOffset())*t,y=this-v,x=function(){return w.m(m,v)};switch(g){case h:f=x()/12;break;case l:f=x();break;case d:f=x()/3;break;case r:f=(y-b)/6048e5;break;case a:f=(y-b)/864e5;break;case n:f=y/i;break;case s:f=y/t;break;case c:f=y/e;break;default:f=y}return p?f:w.a(f)},v.daysInMonth=function(){return this.endOf(l).$D},v.$locale=function(){return x[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var i=this.clone(),o=L(e,t,!0);return o&&(i.$L=o),i},v.clone=function(){return w.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),S=k.prototype;return M.prototype=S,[["$ms",o],["$s",c],["$m",s],["$H",n],["$W",a],["$M",l],["$y",h],["$D",u]].forEach(function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),M.extend=function(e,t){return e.$i||(e(t,k,M),e.$i=!0),M},M.locale=L,M.isDayjs=C,M.unix=function(e){return M(1e3*e)},M.en=x[y],M.Ls=x,M.p={},M}()}(SM)),SM.exports}var EM,NM=of($M()),AM={exports:{}};var OM,TM=(EM||(EM=1,function(e){e.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,c=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,n={},a=function(e){return(e=+e)+(e>68?1900:2e3)},r=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),i=60*t[1]+(+t[2]||0);return 0===i?0:"+"===t[0]?-i:i}(e)}],d=function(e){var t=n[e];return t&&(t.indexOf?t:t.s.concat(t.f))},h=function(e,t){var i,o=n.meridiem;if(o){for(var c=1;c<=24;c+=1)if(e.indexOf(o(c,0,t))>-1){i=c>12;break}}else i=e===(t?"pm":"PM");return i},u={A:[s,function(e){this.afternoon=h(e,!1)}],a:[s,function(e){this.afternoon=h(e,!0)}],Q:[i,function(e){this.month=3*(e-1)+1}],S:[i,function(e){this.milliseconds=100*+e}],SS:[o,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[c,r("seconds")],ss:[c,r("seconds")],m:[c,r("minutes")],mm:[c,r("minutes")],H:[c,r("hours")],h:[c,r("hours")],HH:[c,r("hours")],hh:[c,r("hours")],D:[c,r("day")],DD:[o,r("day")],Do:[s,function(e){var t=n.ordinal,i=e.match(/\d+/);if(this.day=i[0],t)for(var o=1;o<=31;o+=1)t(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],w:[c,r("week")],ww:[o,r("week")],M:[c,r("month")],MM:[o,r("month")],MMM:[s,function(e){var t=d("months"),i=(d("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(i<1)throw new Error;this.month=i%12||i}],MMMM:[s,function(e){var t=d("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,r("year")],YY:[o,function(e){this.year=a(e)}],YYYY:[/\d{4}/,r("year")],Z:l,ZZ:l};function p(i){var o,c;o=i,c=n&&n.formats;for(var s=(i=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,i,o){var s=o&&o.toUpperCase();return i||c[o]||e[o]||c[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})).match(t),a=s.length,r=0;r<a;r+=1){var l=s[r],d=u[l],h=d&&d[0],p=d&&d[1];s[r]=p?{regex:h,parser:p}:l.replace(/^\[|\]$/g,"")}return function(e){for(var t={},i=0,o=0;i<a;i+=1){var c=s[i];if("string"==typeof c)o+=c.length;else{var n=c.regex,r=c.parser,l=e.slice(o),d=n.exec(l)[0];r.call(t,d),e=e.replace(d,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var i=e.hours;t?i<12&&(e.hours+=12):12===i&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,i){i.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var o=t.prototype,c=o.parse;o.parse=function(e){var t=e.date,o=e.utc,s=e.args;this.$u=o;var a=s[1];if("string"==typeof a){var r=!0===s[2],l=!0===s[3],d=r||l,h=s[2];l&&(h=s[2]),n=this.$locale(),!r&&h&&(n=i.Ls[h]),this.$d=function(e,t,i,o){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var c=p(t)(e),s=c.year,n=c.month,a=c.day,r=c.hours,l=c.minutes,d=c.seconds,h=c.milliseconds,u=c.zone,f=c.week,m=new Date,g=a||(s||n?1:m.getDate()),v=s||m.getFullYear(),b=0;s&&!n||(b=n>0?n-1:m.getMonth());var y,x=r||0,z=l||0,C=d||0,L=h||0;return u?new Date(Date.UTC(v,b,g,x,z,C,L+60*u.offset*1e3)):i?new Date(Date.UTC(v,b,g,x,z,C,L)):(y=new Date(v,b,g,x,z,C,L),f&&(y=o(y).week(f).toDate()),y)}catch(e){return new Date("")}}(t,a,o,i),this.init(),h&&!0!==h&&(this.$L=this.locale(h).$L),d&&t!=this.format(a)&&(this.$d=new Date("")),n={}}else if(a instanceof Array)for(var u=a.length,f=1;f<=u;f+=1){s[1]=a[f-1];var m=i.apply(this,s);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}f===u&&(this.$d=new Date(""))}else c.call(this,e)}}}()}(AM)),AM.exports),RM=of(TM),IM={exports:{}};var _M,DM=(OM||(OM=1,function(e){e.exports=function(e,t,i){var o=t.prototype,c=function(e){return e&&(e.indexOf?e:e.s)},s=function(e,t,i,o,s){var n=e.name?e:e.$locale(),a=c(n[t]),r=c(n[i]),l=a||r.map(function(e){return e.slice(0,o)});if(!s)return l;var d=n.weekStart;return l.map(function(e,t){return l[(t+(d||0))%7]})},n=function(){return i.Ls[i.locale()]},a=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})}(e.formats[t.toUpperCase()])},r=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):s(e,"months")},monthsShort:function(t){return t?t.format("MMM"):s(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):s(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):s(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):s(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return a(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return r.bind(this)()},i.localeData=function(){var e=n();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(t){return a(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},i.months=function(){return s(n(),"months")},i.monthsShort=function(){return s(n(),"monthsShort","months",3)},i.weekdays=function(e){return s(n(),"weekdays",null,null,e)},i.weekdaysShort=function(e){return s(n(),"weekdaysShort","weekdays",3,e)},i.weekdaysMin=function(e){return s(n(),"weekdaysMin","weekdays",2,e)}}}(IM)),IM.exports),FM=of(DM),HM={exports:{}};var PM,VM=(_M||(_M=1,function(e){var t;e.exports=(t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},function(e,i,o){var c=i.prototype,s=c.format;o.en.formats=t,c.format=function(e){void 0===e&&(e="YYYY-MM-DDTHH:mm:ssZ");var i=this.$locale().formats,o=function(e,i){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,o,c){var s=c&&c.toUpperCase();return o||i[c]||t[c]||i[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})}(e,void 0===i?{}:i);return s.call(this,o)}})}(HM)),HM.exports),BM=of(VM),UM={exports:{}};var jM=(PM||(PM=1,function(e){e.exports=function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}}(UM)),UM.exports),qM=of(jM);class GM{constructor(e,t="default"){e=null!=e?e:new Date,this.Date=e,this.date=e.getDate(),this.day=e.toLocaleString(t,{weekday:"long"}),this.dayNumber=e.getDay()+1,this.dayShort=e.toLocaleString(t,{weekday:"short"}),this.year=e.getFullYear(),this.yearShort=Number(e.toLocaleString(t,{year:"2-digit"})),this.month=e.toLocaleString(t,{month:"long"}),this.monthShort=e.toLocaleString(t,{month:"short"}),this.monthNumber=e.getMonth()+1,this.timestamp=e.getTime()}}NM.extend(qM);class WM{constructor(e=null,t="default"){const i=new GM(e,t);this.lang=t,this.name=i.month,this.number=i.monthNumber,this.year=i.year,this.numberOfDays=[31,28,31,30,31,30,31,31,30,31,30,31][this.number-1],2===this.number&&(this.numberOfDays+=NM(i.date).isLeapYear()?1:0)}getDay(e){return new GM(new Date(this.year,this.number-1,e),this.lang)}}NM.extend(qM);class YM{constructor(e=null,t=null,i="default"){this.weekDays=Array.from({length:7}),this.today=new GM(null,i),this.year=null!=e?e:this.today.year,this.month=new WM(new Date(this.year,(t||this.today.monthNumber)-1),i),this.lang=i,this.weekDays.forEach((e,t)=>{const i=this.month.getDay(t);this.weekDays[i.dayNumber-1]=i.day})}getMonth(e){return new WM(new Date(this.year,e-1),this.lang)}getPreviousMonth(){return 1===this.month.number?new WM(new Date(this.year-1,11),this.lang):new WM(new Date(this.year,this.month.number-2),this.lang)}getNextMonth(){return 1===this.month.number?new WM(new Date(this.year+1,0),this.lang):new WM(new Date(this.year,this.month.number+2),this.lang)}goToDate(e,t){this.month=new WM(new Date(t,e-1),this.lang),this.year=t}goToNextYear(){this.year+=1,this.month=new WM(new Date(this.year,0),this.lang)}goToPreviousYear(){this.year-=1,this.month=new WM(new Date(this.year,11),this.lang)}goToNextMonth(){if(12===this.month.number)return this.goToNextYear();this.month=new WM(new Date(this.year,this.month.number+1-1),this.lang)}goToPreviousMonth(){if(1===this.month.number)return this.goToPreviousYear();this.month=new WM(new Date(this.year,this.month.number-1-1),this.lang)}}var KM,ZM={exports:{}};function QM(e){return null!=e&&""!==String(e).trim()}KM||(KM=1,function(e){e.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e),o={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}};return i.default.locale(o,null,!0),o}($M())}(ZM)),NM.extend(RM),NM.extend(FM),NM.extend(BM);const XM="MM-DD-YYYY";const JM=[1,2,3,4,5,6,7],ew=(e,t,i)=>{if(o=t,-1===e.indexOf(o.dayNumber))return t;var o;const c=JM.filter(t=>-1===e.indexOf(t));let s=c.find(e=>e>t.dayNumber);s||(s=Math.min(...c));const n=t.dayNumber<s?s-t.dayNumber:s-t.dayNumber+7;return c.length?new GM(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,n),i):(gp.warn("Date picker disabled days - all days of week have been disabled"),t)};class tw extends qt{constructor(){super(...arguments),this.format=XM,this.lang="en-US",this.visible=!1,this.position="bottom",this.disabledDaysOfWeek=[],this.suppressValueChanged=!1,this.cachedFormat=XM,this.clickOutside=e=>this.handleClickOutside(e),this.keydownOutside=e=>this.handleKeydownOutside(e)}formatChanged(e,t){!this.useLocaleFormat&&t&&this.cacheUserFormat(t),t&&this.calendar&&QM(this.value)&&(this.formatDate=NM(this.currentDate.Date).format(t))}langChanged(){this.applyEffectiveLangChange()}useLocaleFormatChanged(e,t){this.calendar&&(t&&!e?this.cacheUserFormat(this.format):!t&&e&&this.restoreUserFormat(),this.applyEffectiveLangChange())}inlineCalendarChanged(){this.inlineCalendar?(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)):this.visible&&(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)),this.toggleVisibility()}hideWeekendsCalendarChanged(){this.toggleVisibility()}valueChanged(e,t){this.suppressValueChanged||this.calendar&&(QM(t)?this.applyValue(t):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate())}disconnectedCallback(){document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside),super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),NM.extend(RM),NM.extend(BM),NM.extend(FM),this.substringNumber=3,this.useLocaleFormat&&(this.cacheUserFormat(this.format),this.applyLocaleFormat());const e=this.value;!this.allowEmpty||QM(e)?QM(e)?this.applyValue(e):this.initializeWithDefaultDate():this.initializeEmpty()}clear(){this.allowEmpty&&this.clearToEmpty(!0)}get inputValue(){return QM(this.value)?this.formatDate:""}get inputPlaceholder(){var e;return!this.allowEmpty||QM(this.value)?"":(null===(e=this.placeholder)||void 0===e?void 0:e.trim())||this.format.replace(/YYYY/g,"yyyy").replace(/YY(?!Y)/g,"yy").replace(/DD/g,"dd").replace(/D(?!D)/g,"d").replace(/MM/g,"mm").replace(/M(?!M)/g,"m")}get effectiveLang(){return this.useLocaleFormat&&!this.hasAttribute("lang")?"undefined"!=typeof navigator&&navigator.language?navigator.language:"en":this.lang}applyLocaleFormat(){this.format=function(e="en"){const t=function(e){const t=((null==e?void 0:e.trim())||"en").toLowerCase().replace(/_/g,"-");return"en-us"===t||"en"===t?"en":"en-gb"===t?"en-gb":t}(e),i=NM().locale(t),o=i.locale();return(c=t)!==(s=o)&&s!==c.split("-")[0]?NM().locale("en").localeData().longDateFormat("L")||"MM/DD/YYYY":i.localeData().longDateFormat("L")||"MM/DD/YYYY";var c,s}(this.effectiveLang)}cacheUserFormat(e){const t=null==e?void 0:e.trim();t&&(this.cachedFormat=t)}restoreUserFormat(){this.format=this.cachedFormat}applyEffectiveLangChange(){var e,t;if(!this.calendar)return;this.useLocaleFormat&&this.applyLocaleFormat();const i=this.calendar.year,o=this.calendar.month.number,c=null!==(t=null===(e=this.currentDate)||void 0===e?void 0:e.Date)&&void 0!==t?t:NM().toDate();this.currentDate=new GM(c,this.effectiveLang),this.calendar=new YM(i,o,this.effectiveLang),QM(this.value)&&(this.formatDate=NM(this.currentDate.Date).format(this.format)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}syncValueAttribute(e){this.suppressValueChanged=!0,this.value=e,this.suppressValueChanged=!1}initializeEmpty(){const e=NM();this.currentDate=new GM(e.toDate(),this.effectiveLang),this.calendar=new YM(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate="",this.syncValueAttribute(""),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}initializeWithDefaultDate(){this.resetToDefaultDate(!0)}resetToDefaultDate(e=!1){var t;let i=new GM(NM().toDate(),this.effectiveLang);(null===(t=this.disabledDaysOfWeek)||void 0===t?void 0:t.length)&&(i=ew(this.disabledDaysOfWeek,i,this.effectiveLang)),this.currentDate=i,e||!this.calendar?this.calendar=new YM(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang):this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=NM(this.currentDate.Date).format(this.format),this.syncValueAttribute(NM(this.currentDate.Date).format(XM)),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}applyValue(e){const t=function(e,t){const i=String(e).trim(),o=NM(i,t,!0);if(o.isValid())return o;const c=NM(i,XM,!0);return c.isValid()?c:null}(e,this.format);t?(this.currentDate=new GM(t.toDate(),this.effectiveLang),this.calendar?this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year):this.calendar=new YM(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate=NM(this.currentDate.Date).format(this.format),this.syncValueAttribute(NM(this.currentDate.Date).format(XM)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate()}clearToEmpty(e){const t=NM();this.currentDate=new GM(t.toDate(),this.effectiveLang),this.calendar&&(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()),this.formatDate="",this.syncValueAttribute(""),e&&this.$emit("value-changed",void 0)}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}visibleChanged(e,t){this.inlineCalendar||(t?(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)):(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)))}handleKeydownOutside(e){!this.inlineCalendar&&this.visible&&"Escape"===e.key&&(e.preventDefault(),this.closeCalendar())}handleClickOutside(e){!this.inlineCalendar&&this.visible&&kz(e,this)&&this.closeCalendar()}closeCalendar(){this.visible&&(this.visible=!1,this.toggleVisibility())}toggleCalendar(){this.visible=!this.visible,this.toggleVisibility(),this.isCurrentCalendarMonth()||(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText())}toggleVisibility(){this.calendarDropdownClasses=Jt(["visible",this.visible],this.position,["inline",this.inlineCalendar],["hide-weekends",this.hideWeekends])}isSelectedDate(e){return!(this.allowEmpty&&!QM(this.value))&&NM(e.Date).isSame(this.currentDate.Date,"day")}isCurrentCalendarMonth(){return this.currentMonth===this.currentDate.monthNumber&&this.currentYear===this.currentDate.year}prevMonth(){this.calendar.goToPreviousMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}nextMonth(){this.calendar.goToNextMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}selectDay(e){NM(e.Date).isSame(this.currentDate.Date,"day")&&QM(this.value)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=NM(this.currentDate.Date).format(this.format),this.syncValueAttribute(NM(e.Date).format(XM)),this.$emit("value-changed",this.value),this.toggleCalendar())}getMonthDaysGrid(){const e=this.calendar.month.getDay(1),t=this.calendar.getPreviousMonth(),i=e.dayNumber-1,o=this.calendar.month.numberOfDays+i,c=Array.from({length:o});for(let e=i;e<o;e+=1)c[e]=this.calendar.month.getDay(e+1-i);for(let e=0;e<i;e+=1){const o=i-(e+1);c[e]=t.getDay(t.numberOfDays-o)}return c}}Nu([re],tw.prototype,"format",void 0),Nu([re],tw.prototype,"lang",void 0),Nu([re({attribute:"use-locale-format",mode:"boolean"})],tw.prototype,"useLocaleFormat",void 0),Nu([re],tw.prototype,"visible",void 0),Nu([re({attribute:"inline-calendar",mode:"boolean"})],tw.prototype,"inlineCalendar",void 0),Nu([re({attribute:"hide-weekends",mode:"boolean"})],tw.prototype,"hideWeekends",void 0),Nu([re],tw.prototype,"position",void 0),Nu([re],tw.prototype,"label",void 0),Nu([re({attribute:"allow-empty",mode:"boolean"})],tw.prototype,"allowEmpty",void 0),Nu([re],tw.prototype,"placeholder",void 0),Nu([re],tw.prototype,"value",void 0),Nu([g],tw.prototype,"currentDate",void 0),Nu([g],tw.prototype,"currentMonth",void 0),Nu([g],tw.prototype,"currentYear",void 0),Nu([g],tw.prototype,"calendarDropdownClasses",void 0),Nu([g],tw.prototype,"formatDate",void 0),Nu([g],tw.prototype,"monthList",void 0),Nu([g],tw.prototype,"disabledDaysOfWeek",void 0),Nu([g],tw.prototype,"calendar",void 0),tw.compose(Object.assign({baseName:"date-picker",styles:CM,template:wM,shadowOptions:void 0},{}));class iw{constructor(){this.value=null}}Nu([g],iw.prototype,"value",void 0),new iw;const ow=(e,t,i)=>{const o=i?(e,t)=>e.setValueFor(i,t):(e,t)=>e.withDefault(t);Object.keys(e).forEach(i=>{const c=`${i}Value`;t[c]&&o(e[i],t[c])})};function cw(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const sw={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=Da(e);return t?Va.create(t.r,t.g,t.b):null}},nw=e=>Wa.from(Va.from(Da(e)));Va.create(1,1,1),Va.create(0,0,0);const aw=Da("#585858"),rw=Va.create(aw.r,aw.g,aw.b),lw=Da("#ffffff"),dw=Va.create(lw.r,lw.g,lw.b),hw=Wa.from(dw),uw=Da("#eeeeee"),pw=Va.create(uw.r,uw.g,uw.b);Wa.from(pw);const fw=Da("#08c3a5"),mw=Va.create(fw.r,fw.g,fw.b);Wa.from(mw);const{create:gw}=vc,vw=gw("fui-fill-color").withDefault(rw),bw=gw({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(dw);function yw(e,t){return e.colorContrast(t,14)}const xw=gw({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>yw(gw("fui-card-palette").withDefault(hw).getValueFor(e),bw.getValueFor(e)));var zw=Object.freeze({__proto__:null,fuiFillColor:vw,fuiCardFillColor:bw,defaultNeutralForegroundContrast:14,neutralForeground:yw,fuiCardForegroundColor:xw,accentFillActive:Al,accentFillActiveDelta:_r,accentFillFocus:Ol,accentFillFocusDelta:Dr,accentFillHover:Nl,accentFillHoverDelta:Ir,accentFillRest:El,accentFillRestDelta:Rr,accentForegroundActive:Yl,accentForegroundActiveDelta:Pr,accentForegroundFocus:Kl,accentForegroundFocusDelta:Vr,accentForegroundHover:Wl,accentForegroundHoverDelta:Hr,accentForegroundRest:Gl,accentForegroundRestDelta:Fr,accentPalette:pl,baseHeightMultiplier:nr,baseLayerLuminance:rr,bodyFont:sr,controlCornerRadius:lr,density:dr,designUnit:hr,direction:ur,disabledOpacity:pr,fillColor:kl,focusStrokeInner:zd,focusStrokeOuter:yd,focusStrokeWidth:mr,foregroundOnAccentActive:Dl,foregroundOnAccentActiveLarge:Bl,foregroundOnAccentFocus:Fl,foregroundOnAccentFocusLarge:Ul,foregroundOnAccentHover:_l,foregroundOnAccentHoverLarge:Vl,foregroundOnAccentRest:Il,foregroundOnAccentRestLarge:Pl,neutralFillActive:Jl,neutralFillActiveDelta:jr,neutralFillFocus:ed,neutralFillFocusDelta:qr,neutralFillHover:Xl,neutralFillHoverDelta:Ur,neutralFillInputActive:cd,neutralFillInputActiveDelta:Yr,neutralFillInputFocus:sd,neutralFillInputFocusDelta:Kr,neutralFillInputHover:od,neutralFillInputHoverDelta:Wr,neutralFillInputRest:id,neutralFillInputRestDelta:Gr,neutralFillLayerRest:vd,neutralFillLayerRestDelta:cl,neutralFillRest:Ql,neutralFillRestDelta:Br,neutralFillStealthActive:ld,neutralFillStealthActiveDelta:Xr,neutralFillStealthFocus:dd,neutralFillStealthFocusDelta:Jr,neutralFillStealthHover:rd,neutralFillStealthHoverDelta:Qr,neutralFillStealthRest:ad,neutralFillStealthRestDelta:Zr,neutralFillStrongActive:fd,neutralFillStrongActiveDelta:il,neutralFillStrongFocus:md,neutralFillStrongFocusDelta:ol,neutralFillStrongHover:pd,neutralFillStrongHoverDelta:tl,neutralFillStrongRest:ud,neutralFillStrongRestDelta:el,neutralForegroundHint:Ld,neutralForegroundRest:wd,neutralLayer1:yl,neutralLayer2:zl,neutralLayer3:Ll,neutralLayer4:wl,neutralLayerCardContainer:ml,neutralLayerFloating:vl,neutralPalette:hl,neutralStrokeActive:Ed,neutralStrokeActiveDelta:al,neutralStrokeDividerRest:Od,neutralStrokeDividerRestDelta:ll,neutralStrokeFocus:Nd,neutralStrokeFocusDelta:rl,neutralStrokeHover:$d,neutralStrokeHoverDelta:nl,neutralStrokeRest:Sd,neutralStrokeRestDelta:sl,strokeWidth:fr,typeRampBaseFontSize:gr,typeRampBaseLineHeight:vr,typeRampMinus1FontSize:br,typeRampMinus1LineHeight:yr,typeRampMinus2FontSize:xr,typeRampMinus2LineHeight:zr,typeRampPlus1FontSize:Cr,typeRampPlus1LineHeight:Lr,typeRampPlus2FontSize:Mr,typeRampPlus2LineHeight:wr,typeRampPlus3FontSize:kr,typeRampPlus3LineHeight:Sr,typeRampPlus4FontSize:$r,typeRampPlus4LineHeight:Er,typeRampPlus5FontSize:Nr,typeRampPlus5LineHeight:Ar,typeRampPlus6FontSize:Or,typeRampPlus6LineHeight:Tr});const Cw=nw("#08c3a5"),Lw=nw("#eeeeee"),Mw=tr,ww=xi.ltr;var kw=Object.freeze({__proto__:null,accentPaletteValue:Cw,neutralPaletteValue:Lw,baseLayerLuminanceValue:Mw,directionValue:ww,controlCornerRadiusValue:4,designUnitValue:4});
61
+ Install model </${e}-button>`)}</div>`)}</div>`)} `)($z(e))} `;class UC extends qt{constructor(){super(...arguments),this.status=null,this.open=!1,this.state="none",this.isInstalling=!1,this.pollTimer=null,this.clickOutside=e=>this.handleClickOutside(e)}get aiProvider(){var e;return null===(e=this.providerRegistry)||void 0===e?void 0:e.default()}get chromeStatusLabel(){var e,t;if("chrome"!==(null===(e=this.status)||void 0===e?void 0:e.provider))return null;const i=null===(t=this.status)||void 0===t?void 0:t.chromeAvailability;return"available"===i?"Installed":"downloading"===i||this.isInstalling?"Downloading…":"downloadable"===i?"Downloadable":"unavailable"===i?"Unavailable":null}get canInstall(){var e,t,i;return!!(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)&&"chrome"===(null===(t=this.status)||void 0===t?void 0:t.provider)&&"downloadable"===(null===(i=this.status)||void 0===i?void 0:i.chromeAvailability)&&!this.isInstalling}get isDownloading(){var e;return"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Ou(this,void 0,void 0,function*(){e.connectedCallback.call(this),yield this.refreshStatus(),this.maybeStartPolling()})}disconnectedCallback(){this.stopPolling(),document.removeEventListener("mousedown",this.clickOutside)}openChanged(){this.open?(document.addEventListener("mousedown",this.clickOutside),this.refreshStatus()):document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){kz(e,this)&&(this.open=!1)}toggleDropdown(){this.open=!this.open}refreshStatus(){return Ou(this,void 0,void 0,function*(){var e;if(!(null===(e=this.aiProvider)||void 0===e?void 0:e.getStatus))return this.status=null,void(this.state="none");try{const e=yield this.aiProvider.getStatus();this.status=e,this.state=this.deriveState(e),"available"===this.state&&(this.isInstalling=!1)}catch(e){this.status=null,this.state="none",this.isInstalling=!1}})}deriveState(e){if(!e||"none"===e.provider)return"none";if("chrome"===e.provider){const t=e.chromeAvailability;return"available"===t?"available":"downloading"===t?"downloading":"downloadable"===t?"downloadable":"unavailable"}return"server"}maybeStartPolling(){var e;"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling?this.startPolling():this.stopPolling()}startPolling(){this.pollTimer||(this.pollTimer=setInterval(()=>{this.refreshStatus().then(()=>{this.maybeStartPolling()})},2500))}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}onInstall(){return Ou(this,void 0,void 0,function*(){var e;if(this.canInstall&&(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)){this.isInstalling=!0;try{yield this.aiProvider.triggerDownload(),this.startPolling()}catch(e){this.isInstalling=!1}finally{yield this.refreshStatus()}}})}}Nu([Qz],UC.prototype,"providerRegistry",void 0),Nu([g],UC.prototype,"status",void 0),Nu([g],UC.prototype,"open",void 0),Nu([g],UC.prototype,"state",void 0),Nu([g],UC.prototype,"isInstalling",void 0),Nu([v],UC.prototype,"chromeStatusLabel",null),Nu([v],UC.prototype,"canInstall",null),Nu([v],UC.prototype,"isDownloading",null),UC.compose({baseName:"ai-indicator",template:BC,styles:VC});const jC=(e,t)=>Ni(0,t),qC=(e,t)=>Ce` ${Yd()}`;class GC extends Kd{}const WC={delegatesFocus:!0,mode:"open"},YC={};GC.compose(Object.assign({baseName:"anchor",template:jC,styles:qC,shadowOptions:WC},YC));const KC=(e,t)=>Ri(),ZC=(e,t)=>Ce` ${Zd()}`;class QC extends _i{}const XC={delegatesFocus:!0,mode:"open"},JC={};QC.compose(Object.assign({baseName:"anchored-region",template:KC,styles:ZC,shadowOptions:XC},JC));const eL=(e,t)=>ji(0,t),tL=W` ${He(e=>e.imgSrc,W`<img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />`)} `,iL=(e,t)=>Ce` ${Qd(e)}`;class oL extends Xd{}const cL={delegatesFocus:!0,mode:"open"},sL={media:tL};oL.compose(Object.assign({baseName:"avatar",template:eL,styles:iL,shadowOptions:cL},sL));const nL=(e,t)=>Gi(),aL=(e,t)=>Ce` ${eh()}`;class rL extends Wi{}const lL=void 0,dL={};rL.compose(Object.assign({baseName:"badge",template:nL,styles:aL,shadowOptions:lL},dL));const hL=Ce` @keyframes delete-animate{from{height: 100px;opacity: 100%}to{height: 0;opacity: 0%}}@keyframes append-animate{from{height: 0;opacity: 0%}to{height: var(--banner-height);opacity: 100%}}:host{--banner-width: 100%;--banner-height: 65px;--flow: row}@media screen and (max-width: 640px){:host{--flow: column;--banner-height: 100px}}.banner{animation: append-animate 0.3s linear;width: var(--banner-width);height: var(--banner-height);background-color: var(--fill-color);display: flex;flex-direction: var(--flow);padding: 5px 8px;box-sizing: border-box;overflow: hidden}.banner-delete{animation: delete-animate 0.3s linear;opacity: 0%}.content{display: flex;align-items: center;flex: 2;font-size: 12px;overflow: hidden;white-space: pre-line}.action{display: flex;flex-direction: row-reverse;align-items: center;gap: 10px;flex: 1;overflow: hidden}`,uL=W` ${e=>(e=>W`<div role="alert" aria-live="polite" class="banner ${e=>e.dismissAnimation}" ${Ie("banner")}><div part="content" class="content"><slot name="content">${He(e=>e.notification,W`<div><div>${e=>{var t;return(null===(t=e.notification)||void 0===t?void 0:t.body)||"Place holder for notification message"}}</div></div>`)}</slot></div><div part="action" class="action"><slot name="action" class="action">${He(e=>e.notification,W`<${e}-button slot="action" appearance="lightweight" @click=${e=>e.dismiss()}>${e=>{var t,i,o,c;return(null===(c=null===(o=null===(i=null===(t=e.notification)||void 0===t?void 0:t.config)||void 0===i?void 0:i.banner)||void 0===o?void 0:o.dismissingAction)||void 0===c?void 0:c.label)||"Ignore"}}</${e}-button>`)} ${qe(e=>{var t,i;return null===(i=null===(t=e.notification)||void 0===t?void 0:t.config)||void 0===i?void 0:i.banner.confirmingActions},W`<${e}-button slot="action" appearance="lightweight" @click=${(e,t)=>{var i;null==e||e.action(),null===(i=t.parent)||void 0===i||i.dismissNotification()}}>${e=>e.label}</${e}-button>`)}</slot></div></div>`)($z(e))} `,pL={mode:"open",delegatesFocus:!0};class fL extends qt{constructor(){super(...arguments),this.dismissAnimation=""}connectedCallback(){super.connectedCallback()}dismiss(){return this.dismissAnimation="banner-delete",new Promise(e=>{this.banner.onanimationend=()=>{this.remove(),e()}})}dismissNotification(){return Ou(this,void 0,void 0,function*(){try{yield this.dismiss(),this.remove()}catch(e){Mz.error(e)}})}}Nu([g],fL.prototype,"dismissAnimation",void 0),Nu([g],fL.prototype,"notification",void 0),fL.compose({baseName:"banner",styles:hL,template:uL,shadowOptions:pL});const mL=(e,t)=>Zi(),gL=(e,t)=>Ce` ${ih()}`;class vL extends Qi{}vL.compose(Object.assign({baseName:"breadcrumb",template:mL,styles:gL,shadowOptions:void 0},{}));const bL=(e,t)=>Yi(0,t),yL=(e,t)=>Ce` ${th()}`;class xL extends Ki{}const zL=void 0,CL={separator:"/"};xL.compose(Object.assign({baseName:"breadcrumb-item",template:bL,styles:yL,shadowOptions:zL},CL));const LL=(e,t)=>Xi(0,t),ML=(e,t)=>Ce` ${oh()}`;class wL extends ch{}const kL={delegatesFocus:!0,mode:"open"},SL={};wL.compose(Object.assign({baseName:"button",template:LL,styles:ML,shadowOptions:kL},SL));const $L=()=>Ce` ${sh}`,EL=(e,t)=>Oo(e,t);class NL extends ho{}const AL={delegatesFocus:!0,mode:"open"},OL={};NL.compose(Object.assign({baseName:"calendar",template:EL,styles:$L,shadowOptions:AL},OL));const TL=(e,t)=>To(),RL=(e,t)=>Ce` ${nh()} :host{background-color: var(--fui-card-fill-color);color: var(--fui-card-foreground-color)}`;class IL extends ah{}const _L=void 0,DL={};var FL,HL,PL;IL.compose(Object.assign({baseName:"card",template:TL,styles:RL,shadowOptions:_L},DL)),function(e){e.BELOW="below",e.ABOVE="above"}(FL||(FL={}));var VL=function(){if(PL)return HL;PL=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,c=parseInt,s="object"==typeof tf&&tf&&tf.Object===Object&&tf,n="object"==typeof self&&self&&self.Object===Object&&self,a=s||n||Function("return this")(),r=Object.prototype.toString,l=Math.max,d=Math.min,h=function(){return a.Date.now()};function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(s){if("number"==typeof s)return s;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==r.call(e)}(s))return NaN;if(u(s)){var n="function"==typeof s.valueOf?s.valueOf():s;s=u(n)?n+"":n}if("string"!=typeof s)return 0===s?s:+s;s=s.replace(e,"");var a=i.test(s);return a||o.test(s)?c(s.slice(2),a?2:8):t.test(s)?NaN:+s}return HL=function(e,t,i){var o,c,s,n,a,r,f=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var i=o,s=c;return o=c=void 0,f=t,n=e.apply(s,i)}function y(e){var i=e-r;return void 0===r||i>=t||i<0||g&&e-f>=s}function x(){var e=h();if(y(e))return z(e);a=setTimeout(x,function(e){var i=t-(e-r);return g?d(i,s-(e-f)):i}(e))}function z(e){return a=void 0,v&&o?b(e):(o=c=void 0,n)}function C(){var e=h(),i=y(e);if(o=arguments,c=this,r=e,i){if(void 0===a)return function(e){return f=e,a=setTimeout(x,t),m?b(e):n}(r);if(g)return a=setTimeout(x,t),b(r)}return void 0===a&&(a=setTimeout(x,t)),n}return t=p(t)||0,u(i)&&(m=!!i.leading,s=(g="maxWait"in i)?l(p(i.maxWait)||0,t):s,v="trailing"in i?!!i.trailing:v),C.cancel=function(){void 0!==a&&clearTimeout(a),f=0,o=r=c=a=void 0},C.flush=function(){return void 0===a?n:z(h())},C},HL}(),BL=of(VL);const UL=Ce` :host{--scrollbar-width: 12px;--scrollbar-thumb-width: 8px}.root{position: relative;width: inherit;min-width: 250px}.control{cursor: pointer;position: relative;display: flex;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}#display-field{width: 100%;cursor: pointer;color: var(--neutral-foreground-rest);min-height: 40px;padding: 0 calc(var(--design-unit) * 2.25px);border-width: 0;background-color: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px)}#display-field[disabled]{cursor: not-allowed;opacity: 30%}#display-field:focus{outline: 1px solid var(--accent-fill-rest);background: var(--neutral-fill-input-rest);border-style: none;box-shadow: none}#display-field:hover:not(:focus):not([disabled]){outline: 1px solid var(--neutral-stroke-hover)}button{pointer-events: none}.indicator{position: absolute;left: calc(100% - 26px);padding: 0;cursor: pointer}#arrow-icon{width: 16px;fill: white;transform: rotate(0deg);transition: transform 0.2s linear 0s}#arrow-icon.flipped{transform: rotate(180deg)}.disabled-svg{pointer-events: none;opacity: 30%}.position-above{bottom: 100%}::-webkit-scrollbar{width: var(--scrollbar-width)}::-webkit-scrollbar-track{background: var(--neutral-layer-4)}::-webkit-scrollbar-thumb{width: var(--scrollbar-thumb-width);border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-layer-2);border: 3px solid var(--neutral-layer-4)}::-webkit-scrollbar-corner{background: var(--neutral-layer-4)}.multiselect-dropdown{display: flex;flex-direction: column;position: absolute;height: max-content;overflow: hidden;margin-top: calc(var(--design-unit) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;z-index: 999}.multiselect-dropdown:not(.is-resizing){transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s}.checkbox-container{display: flex;flex-direction: column;list-style: none;overflow-y: auto;height: 100%}.is-resizing .checkbox-container{overflow-y: hidden}.checkbox-container zero-checkbox{min-width: fit-content}.checkbox-container zero-checkbox[disabled], .checkbox-container foundation-checkbox[disabled]{cursor: not-allowed}.visible{visibility: visible;max-height: var(--custom-max-height, ${230..toString()}px);overflow: hidden}::slotted(foundation-checkbox), foundation-checkbox{border-bottom: 1px solid var(--neutral-layer-4);padding: 5px 0 5px 5px;margin: 0}::slotted(foundation-checkbox:hover), foundation-checkbox:hover{background-color: var(--neutral-layer-3);cursor: pointer}::slotted(foundation-checkbox)::part(label), foundation-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}ol, li{margin: 0;padding: 0}.checkbox{width: 100%}.select-all{width: 100%;margin-left: 0;margin-right: 0}.display-value{position: absolute;right: 40px;color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-family: var(--body-font)}.options-header-item-hidden{display: none}.resize-button{position: absolute;bottom: 0;right: 0;width: 12px;height: 12px;cursor: nw-resize;background: linear-gradient( -45deg, transparent 30%, var(--neutral-foreground-rest) 30%, var(--neutral-foreground-rest) 40%, transparent 40%, transparent 60%, var(--neutral-foreground-rest) 60%, var(--neutral-foreground-rest) 70%, transparent 70% );z-index: 1000;opacity: 60%;transition: opacity 0.2s ease}.resize-button:hover{opacity: 100%}.multiselect-dropdown.resizable{resize: none;overflow: hidden}`;var jL;let qL=jL=class extends wz{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=jL.defaultPageSize,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria="",this.listboxElement=null,this.loadingMoreRows=!1,this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.selectOpenChangeHandler=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.open)&&(this.listboxElement||this.attachListboxScrollListener(),this.topUpVisibleListbox())},this.listboxScrollHandler=()=>{const e=this.listboxElement;e&&this.isNearListboxBottom(e)&&this.loadNextPage()},this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{var t;const i=e.target.value,o=null===(t=this.options)||void 0===t?void 0:t.find(e=>String(e.label)===i);!o&&this.allowCustomOptions&&this.select instanceof uh?this.select.$emit("value-change",{label:i,value:i}):this.select.$emit("value-change",o)}}initialSelectedValueChanged(e,t){t!==e&&(t?this.select&&this.getDisplayForValue(t)===String(this.select.value||"")||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData()):this.select&&(this.initalSelectedValueInitialized=!1,this.clearData(),this.resetCombobox(),this.fetchData()))}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Ou(this,void 0,void 0,function*(){var t,i;if(e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=null!==(i=this.optionElement)&&void 0!==i?i:`${$z(this.select)}-option`,this.select.addEventListener("change",this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.infiniteScroll){if(this.isSnapshot=!0,this.maxRows=this.pageSize>0?this.pageSize:jL.defaultPageSize,this.select.addEventListener("open-change",this.selectOpenChangeHandler),yield this.applyInfiniteScrollFetchMode(),!this.isConnected)return;u.queueUpdate(()=>this.attachListboxScrollListener())}this.fetchData(),this.valueField||Mz.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')})}disconnectedCallback(){var e;super.disconnectedCallback(),this.resizeObserver.disconnect(),null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null,this.select.removeEventListener("open-change",this.selectOpenChangeHandler),this.select.removeEventListener("change",this.selectChangeHandler)}applyInfiniteScrollFetchMode(){return Ou(this,void 0,void 0,function*(){if(this.resourceName&&this.connect.isConnected)try{const e=yield this.resources.getResourceTypeFor(this.resourceName);this.isSnapshot=e!==sb.DATASERVER}catch(e){Mz.warn(`Unable to determine the resource type for ${this.resourceName}`,e)}})}attachListboxScrollListener(){var e,t,i,o,c,s,n;this.isConnected&&(null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null!==(c=null!==(i=null===(t=this.select)||void 0===t?void 0:t.scrollableListbox)&&void 0!==i?i:null===(o=this.select)||void 0===o?void 0:o.listbox)&&void 0!==c?c:null===(n=null===(s=this.select)||void 0===s?void 0:s.shadowRoot)||void 0===n?void 0:n.querySelector(".listbox"),this.listboxElement?this.listboxElement.addEventListener("scroll",this.listboxScrollHandler):Mz.warn("Unable to locate listbox element, infinite scroll will not be available."))}isNearListboxBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-jL.scrollLoadThresholdPx}loadNextPage(){return Ou(this,void 0,void 0,function*(){if(this.loadingMoreRows||!this.canRequestMoreRows())return;this.loadingMoreRows=!0;const e=this.datasource.resourceType===sb.REQUEST_SERVER;try{yield this.requestMoreRows()}catch(e){return void(this.loadingMoreRows=!1)}e&&(this.loadingMoreRows=!1)})}topUpVisibleListbox(){this.infiniteScroll&&requestAnimationFrame(()=>{if(!this.isConnected)return;const e=this.listboxElement;e&&0!==e.clientHeight&&this.isNearListboxBottom(e)&&e.scrollHeight!==this.lastTopUpScrollHeight&&(this.lastTopUpScrollHeight=e.scrollHeight,this.loadNextPage())})}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof uh&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return Ou(this,void 0,void 0,function*(){(yield this.datasource.init(this.datasourceOptions(),!0))?function(e,t){const i=new Dz;i.withExpression((new Fz).withField(e.valueField).withValue(t).withSerialiser(Rz.equals).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${i.build()}`:e.criteria=i.build()}(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.rowsSyncedWithStream.clear(),this.options=[],this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.loadingMoreRows=!1,this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof jL||this.select.removeChild(e)}),this.select.value="",this.select.initialValue="")}checkOverflow(e){const t=e.shadowRoot.querySelector(".content");t&&(t.scrollWidth>t.clientWidth?e.setAttribute("title",e.textContent):e.removeAttribute("title"))}rowToOption(e){var t;return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}}renderListboxOptions(e){e.forEach(({value:e,label:t})=>{const i=document.createElement(this.optionElement);i.textContent=t||e,i.value=e,this.select.appendChild(i),this.resizeObserver.observe(i)})}removeEmptyDataOption(){this.emptyDataOption&&(this.emptyDataOption.remove(),this.emptyDataOption=null)}syncComponentData(e){this.loadingMoreRows=!1;const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.removeEmptyDataOption(),this.options=t.map(e=>this.rowToOption(e));const e=0===this.renderedOptionsCount;if(this.renderListboxOptions(this.options.slice(this.renderedOptionsCount)),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox(),!this.initalSelectedValueInitialized||this.select instanceof uh&&!this.select.async&&e){this.resetCombobox();const e=this.getInitialLabel();u.queueUpdate(()=>{this.select.value=String(e),e&&this.select instanceof uh&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else if(this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof uh&&!this.select.async)&&(this.resetCombobox(),u.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0),this.select&&!this.emptyDataOption){const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(e),this.emptyDataOption=e}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){var t;if(null==e||0!==e&&!e)return"";const i=null===(t=this.options)||void 0===t?void 0:t.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof uh?String(i?i.label:e):i?String(i.label):""}resetCombobox(){this.select&&this.select instanceof uh&&this.select.resetCombobox()}handleStreamInserts(e){var t,i;if(this.loadingMoreRows=!1,!(null==e?void 0:e.length))return;this.removeEmptyDataOption();const o=new Set((null!==(t=this.options)&&void 0!==t?t:[]).map(e=>String(e.value))),c=e.filter(e=>!o.has(String(e[this.valueField])));if(!c.length)return Mz.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`),void(this.moreRowsAvailable=!1);const s=c.map(e=>this.rowToOption(e));this.options=[...null!==(i=this.options)&&void 0!==i?i:[],...s],this.renderListboxOptions(s),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox()}handleStreamDeletes(e){Mz.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Mz.debug("handleStreamUpdates - Method not implemented.")}};qL.defaultPageSize=20,qL.scrollLoadThresholdPx=32,Nu([Yx],qL.prototype,"resources",void 0),Nu([re({attribute:"label-field"})],qL.prototype,"labelField",void 0),Nu([re({attribute:"option-element"})],qL.prototype,"optionElement",void 0),Nu([re({attribute:"value-field"})],qL.prototype,"valueField",void 0),Nu([re({attribute:"empty-data-label"})],qL.prototype,"emptyDataLabel",void 0),Nu([re({mode:"boolean",attribute:"allow-custom-options"})],qL.prototype,"allowCustomOptions",void 0),Nu([re({mode:"boolean",attribute:"infinite-scroll"})],qL.prototype,"infiniteScroll",void 0),Nu([re({attribute:"page-size",converter:ne})],qL.prototype,"pageSize",void 0),Nu([g],qL.prototype,"labelFormatter",void 0),Nu([g],qL.prototype,"labelRowFormatter",void 0),Nu([g],qL.prototype,"initialSelectedValue",void 0),qL=jL=Nu([ye({name:"options-datasource"})],qL);let GL=class extends wz{constructor(){super(...arguments),this.isSnapshot=!0,this.baseCriteria=""}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Ou(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||Mz.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")')})}clearData(){this.select.options=[]}syncComponentData(e){var t;const i=(null!=e?e:Array.from(this.rowsSyncedWithStream.values())).map(e=>{var t;return{value:e[this.valueField],label:this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}});(null===(t=this.select)||void 0===t?void 0:t.async)&&(this.select.loading=!1),this.select.options=i}handleStreamInserts(e){Mz.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){Mz.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Mz.debug("handleStreamUpdates - Method not implemented.")}};Nu([re({attribute:"value-field"})],GL.prototype,"valueField",void 0),Nu([re({attribute:"label-field"})],GL.prototype,"labelField",void 0),GL=Nu([ye({name:"multiselect-datasource"})],GL);const WL=(e="foundation")=>W`<label part="label" for="display-field" class=${e=>{var t;return Jt("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}><slot name="label" ${Ke({property:"defaultSlottedNodes",filter:Ds})}></slot></label><div class="root" part="root" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control"><input id="display-field" part="filter-search" role="combobox" aria-haspopup="listbox" aria-controls="checkbox-container" aria-expanded=${e=>e.open?"true":"false"}tabindex="${e=>e.tabindex}" ?readonly=${e=>!e.search}@click=${e=>e.toggle()}?disabled="${e=>e.disabled}" ${Ie("filterSearchInput")}value=${Ep(e=>e.filterSearchValue,"string","input")}placeholder="${e=>e.getDisplayValue}" autocomplete="off" @input=${(e,t)=>e.inputHandler()}@change=${(e,t)=>e.changeHandler(t.event)}/><div part="indicator" class="indicator" @click=${e=>!e.disabled&&e.toggle()}><svg viewBox="0 0 12 7" ${Ie("arrowIcon")}id="arrow-icon" class="${e=>Jt(["disabled-svg",e.disabled])}" xmlns="http://www.w3.org/2000/svg"><path d="${"M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"}" /></svg></div>${He(e=>e.filterSearchValue&&e.selectedOptions.length,W`<div class="display-value">${e=>e.getDisplayValue}</div>`)}</div>${He(e=>e.loading,W`<${e}-progress slot="indicator"></${e}-progress>`)}<section class=${e=>Jt("multiselect-dropdown",["resizable",e.resizable])} ${Ie("multiselectDropdown")}part="multiselect-dropdown">${He(e=>e.resizable,W`<div class="resize-button" @mousedown=${(e,t)=>e.handleResizeStart(t.event)}></div>`)} ${He(e=>e.all,W`<${e}-button class="select-all" @click=${e=>e.selectCheckboxAll()}?disabled="${(e,t)=>e.isAllOptionsDisabled}">${e=>e.areAllOptionsSelected?"Deselect All":"Select All"} ${e=>e.name}</${e}-button>`)}<ol id="checkbox-container" class="checkbox-container options" aria-multiselectable="true" part="options-ol"><li part="options-header-item" class=${e=>{var t;return Jt("options-header-item",["options-header-item-hidden",!(null===(t=e.optionsHeaderSlottedNodes)||void 0===t?void 0:t.length)])}}><slot name="options-header" ${Ke({property:"optionsHeaderSlottedNodes",filter:Ds})}></slot></li>${qe(e=>e.filteredAvailableOptions,W`<li role="option" value=${(e,t)=>t.parent.getItemLabel(e)}part="option"><${e}-checkbox part="checkbox" class="checkbox" exportparts="label:checkbox-label" @keydown=${(e,t)=>t.parent.checkboxKeyDown(e,t.event)}@click=${(e,t)=>t.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parent.isOptionDisabled(e)}">${(e,t)=>{var i,o;return null===(o=null===(i=t.parent)||void 0===i?void 0:i.itemRenderer)||void 0===o?void 0:o.call(i,e,t.parent)}}</${e}-checkbox></li>`)}</ol>${He(e=>e.showCreatable,W`<${e}-button @click=${e=>e.addOption()}>Create&nbsp;"${e=>e.filterSearchValue}"</${e}-button>`)}</section></div><slot ${Ke({property:"slottedDatasource",filter:e=>e instanceof GL})}></slot>`,YL=W` ${WL()} `,KL=void 0,ZL={};class QL extends qt{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.resizable=!1,this.filterByContains=!1,this.filterSearchValue="",this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=FL.BELOW,this.itemRenderer=this.defaultItemRenderer,this.initialisedOptions=!1,this.isResizing=!1,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.handleResizeStart=e=>{this.resizable&&this.multiselectDropdown&&(e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.startX=e.clientX,this.startY=e.clientY,this.startWidth=this.multiselectDropdown.offsetWidth,this.startHeight=this.multiselectDropdown.offsetHeight,this.multiselectDropdown.classList.add("is-resizing"),document.addEventListener("mousemove",this.handleResizeMove),document.addEventListener("mouseup",this.handleResizeEnd))},this.handleResizeMove=e=>{if(!this.isResizing||!this.multiselectDropdown)return;e.preventDefault();const t=e.clientX-this.startX,i=e.clientY-this.startY,o=Math.max(250,this.startWidth+t),c=Math.max(100,this.startHeight+i);this.multiselectDropdown&&(this.multiselectDropdown.style.width=`${o}px`,this.multiselectDropdown.style.maxHeight=`${c}px`)},this.handleResizeEnd=()=>{this.isResizing=!1,document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd),this.multiselectDropdown&&(this.multiselectDropdown.classList.remove("is-resizing"),this.multiselectDropdown.style.setProperty("--custom-max-height",this.multiselectDropdown.style.maxHeight),this.multiselectDropdown.style.removeProperty("max-height"))}}debounceChanged(e,t){this.debouncedInputHandler=BL(this.asyncSetFilter,t)}openChanged(e,t){var i,o,c,s;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.arrowIcon)||void 0===i||i.classList.add("flipped"),null===(o=this.multiselectDropdown)||void 0===o||o.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(c=this.arrowIcon)||void 0===c||c.classList.remove("flipped"),null===(s=this.multiselectDropdown)||void 0===s||s.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===FL.ABOVE&&(null===(e=this.multiselectDropdown)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd)}defaultItemRenderer(e,t){return W` ${"string"==typeof e?W`<span part="option-label">${()=>t.getItemLabel(e)}</span>`:W`<span data-option-label-text=${()=>e.optionLabelText}style=${()=>e.labelStyle}part="option-label">${()=>t.getItemLabel(e)}</span>`} `}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,c=i-t.bottom;e=c<230&&o>c?FL.ABOVE:FL.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===FL.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===FL.BELOW)}optionValueGetter(e){return"string"==typeof e?e:e.value}optionLabelGetter(e){return"string"==typeof e?e:e.label}getItemLabel(e){let t;return e?(t="string"==typeof e?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get areAllOptionsSelected(){const e=this.getEnabledOptionsCount();return e>0&&this.selectedOptions.length===e}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&0===this.findExactMatchOptions().length}isOptionSelected(e){const t=this.optionValueGetter(e);return this.selectedOptions.some(i=>{if("object"==typeof e&&"object"==typeof e.value)try{return JSON.stringify(i)===JSON.stringify(t)}catch(e){return i===t}return i===t})}selectCheckboxOne(e){const t=this.optionValueGetter(e),i=this.selectedOptions.includes(t);this.selectedOptions=i?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}checkboxKeyDown(e,t){return" "===t.key&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){const e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){const e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>{var i,o;const c="string"==typeof t?t:null!==(i=this.optionLabelGetter(t))&&void 0!==i?i:this.optionValueGetter(t);return(null!==(o=null==c?void 0:c.toLowerCase())&&void 0!==o?o:"")===e})}setFilter(){const e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if("string"==typeof t)return t.toLowerCase().includes(e);const i=t.label.toLowerCase(),o="object"==typeof t.value?(c=t.value,Object.values(c).some(t=>t.toLowerCase().includes(e))):String(t.value).toLowerCase().includes(e);var c;return i.includes(e)||o})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?Pz(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,Mz.warn("Multiselect-datasource is not connected. Please add a datasource to use this functionality."))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){kz(e,this)&&(this.open=!1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Escape":if(this.open){this.open=!1;break}break;case"ArrowUp":case"ArrowDown":if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){const{clearSelectedValues:t=!0,clearFilterText:i=!0}=e;t&&(this.selectedOptions=[],this.$emit("selectionChange",this.selectedOptions)),i&&(this.filterSearchValue="",this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value="")),this.$emit("clear",{clearSelectedValues:t,clearFilterText:i})}}Nu([re],QL.prototype,"name",void 0),Nu([re({mode:"boolean",attribute:"auto-position"})],QL.prototype,"autoPosition",void 0),Nu([re({mode:"boolean"})],QL.prototype,"all",void 0),Nu([re({mode:"boolean"})],QL.prototype,"allSelected",void 0),Nu([re({mode:"boolean"})],QL.prototype,"search",void 0),Nu([re({mode:"boolean"})],QL.prototype,"disabled",void 0),Nu([re({mode:"boolean"})],QL.prototype,"creatable",void 0),Nu([re({mode:"boolean"})],QL.prototype,"async",void 0),Nu([re],QL.prototype,"debounce",void 0),Nu([re({mode:"boolean"})],QL.prototype,"resizable",void 0),Nu([re],QL.prototype,"tabindex",void 0),Nu([re({mode:"boolean",attribute:"filter-by-contains"})],QL.prototype,"filterByContains",void 0),Nu([g],QL.prototype,"defaultSlottedNodes",void 0),Nu([g],QL.prototype,"slottedDatasource",void 0),Nu([g],QL.prototype,"valueFormatter",void 0),Nu([g],QL.prototype,"loading",void 0),Nu([g],QL.prototype,"filterSearchValue",void 0),Nu([g],QL.prototype,"open",void 0),Nu([g],QL.prototype,"options",void 0),Nu([g],QL.prototype,"selectedOptions",void 0),Nu([g],QL.prototype,"filteredAvailableOptions",void 0),Nu([g],QL.prototype,"scrollContainer",void 0),Nu([re],QL.prototype,"position",void 0),Nu([g],QL.prototype,"onAllSelectedCallback",void 0),Nu([g],QL.prototype,"itemRenderer",void 0),Nu([v],QL.prototype,"getDisplayValue",null),Nu([v],QL.prototype,"getPlaceholder",null),Nu([v],QL.prototype,"isAllOptionsDisabled",null),Nu([v],QL.prototype,"areAllOptionsSelected",null),Nu([v],QL.prototype,"showCreatable",null),Nu([g],QL.prototype,"optionsHeaderSlottedNodes",void 0),QL.compose(Object.assign({baseName:"multiselect",template:YL,styles:UL,shadowOptions:KL},ZL));const XL=Ce` .root{position: relative;width: 100%;min-width: 250px}.control-button{display: flex;justify-content: center;min-width: 31px;width: 31px;height: 31px;margin-left: calc(var(--design-unit) * 2px);color: var(--neutral-foreground-hint)}.control{cursor: pointer;position: relative;display: flex;justify-content: end;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}.control:hover .control-button, .control:hover .label{color: var(--neutral-foreground-rest)}button{pointer-events: none}.options{display: flex;flex-direction: column;position: absolute;height: max-content;overflow-y: hidden;margin-top: 5px;padding: calc((var(--design-unit) + 3) * 2px) calc((var(--design-unit) + 3) * 1px);border: 1px solid rgba(46 51 57 / 100%);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s;z-index: 999}.option-content{display: flex;align-items: center;gap: calc(var(--design-unit) * 4px);width: 100%}.icon-container{display: flex;align-items: center;justify-content: center;width: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px + 4px );height: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px );border-radius: calc((var(--control-corner-radius) - 1) * 2px);background: var(--neutral-layer-2);box-sizing: border-box;box-shadow: 0 0 5px 0 rgba(0 0 0 / 35%);flex-shrink: 0}.text-content{display: flex;flex-direction: column;flex: 1}.svg-icon{height: 2em}.position-above{bottom: 100%}.checkbox-container{display: flex;flex-direction: column;overflow-y: scroll;scrollbar-width: thin;scrollbar-color: rgb(46 48 53) rgb(31 33 38)}span{border-bottom: calc(var(--stroke-width) * 1px) solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 2) * 2px) calc((var(--design-unit) + 3) * 1px);font-size: calc((var(--type-ramp-base-font-size) - 1px));color: var(--neutral-foreground-hint)}.multiselect-checkbox{min-width: fit-content;flex-direction: row-reverse;justify-content: space-between;align-items: flex-start;border-bottom: 1px solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) 0;margin: 0}.multiselect-checkbox:hover{background-color: rgb(45 47 51);cursor: pointer}.multiselect-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis}.multiselect-checkbox::part(control){min-width: calc( ( (var(--base-height-multiplier) + var(--density)) * var(--design-unit) / 2 + var(--design-unit) ) * 1px )}.checkbox-container .multiselect-checkbox[disabled]{cursor: not-allowed}.description{text-wrap: wrap;font-size: calc((var(--type-ramp-base-font-size) - 1px));margin: calc((var(--design-unit) + 3) * 1px) 0}#filter-search{padding: 5px}::-webkit-scrollbar{width: 12px}::-webkit-scrollbar-track{background: rgb(31 33 38)}::-webkit-scrollbar-thumb{width: 8px;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: rgb(46 48 53);border: 3px solid rgb(31 33 38)}.visible{visibility: visible;max-height: ${450..toString()}px}`,JL=(e="foundation")=>W`<div class="root" part="root"><div class="control" part="control" @click=${e=>!e.disabled&&e.toggle()}><label part="label" for="control" class=${e=>{var t;return Jt("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}><slot ${Ke({property:"defaultSlottedNodes",filter:Ds})}></slot></label><${e}-button class="control-button" part="control-button"><slot name="button-content"><${e}-icon name="plus" variant="solid" size="lg"></${e}-icon></slot></${e}-button></div><div ${Ie("optionsElement")}class="options" part="options">${He(e=>e.search,W`<${e}-text-field id="filter-search" part="filter-search" value=${Ep(e=>e.filterSearchValue,"string","input")}placeholder="${e=>e.getPlaceholder}" @input=${(e,t)=>e.setFilter()}@change=${(e,t)=>e.changeHandler(t.event)}></${e}-text-field>`)}<div class="checkbox-container" part="checkbox-container">${qe(e=>e.filteredAvailableOptions,W`<span>${e=>e.type}</span>${qe(e=>e.options,W`<${e}-checkbox class="multiselect-checkbox" part="multiselect-checkbox" @click=${(e,t)=>t.parentContext.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parentContext.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parentContext.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parentContext.parent.isOptionDisabled(e)}"><div class="option-content">${He(e=>e.icon||e.svg,W`<div class="icon-container">${He(e=>e.icon,W`<${e}-icon style="color:${e=>e.iconColor||"#fff"}" name="${e=>e.icon}" size="xl"></${e}-icon>`)} ${He(e=>e.svg,W`<img class="svg-icon" src="${e=>e.svg}" alt="${e=>e.label}" />`)}</div>`)}<div class="text-content"><div class="option-label">${(e,t)=>t.parentContext.parent.getItemLabel(e)}</div>${He(e=>e.description,W`<p class="description">${e=>e.description}</p>`)}</div></div></${e}-checkbox>`)} `)}</div></div></div>`,eM=W` ${JL()} `,tM=void 0,iM={};class oM extends qt{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=FL.BELOW}openChanged(e,t){var i,o;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.optionsElement)||void 0===i||i.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(o=this.optionsElement)||void 0===o||o.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===FL.ABOVE&&(null===(e=this.optionsElement)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}sortFilteredOptions(e){const t=(null!=e?e:this.options).reduce((e,t)=>{const i=t.type||"Other";return e[i]?e[i].options.push(t):e[i]={type:i,options:[t]},e},{});return Object.values(t)}optionsChanged(){this.filteredAvailableOptions=this.sortFilteredOptions()}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains("content-wrapper");)t=t.parentElement;if(t){const i=t.getBoundingClientRect(),o=this.getBoundingClientRect(),c=i.top+i.height/2;e=o.top<c?FL.BELOW:FL.ABOVE}else{const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,c=i-t.bottom;e=c<t.height&&o>c?FL.ABOVE:FL.BELOW}}e===FL.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===FL.BELOW&&(this.optionsElement.classList.add("position-below"),this.optionsElement.classList.remove("position-above"))}optionGetter(e){return e.value}getItemLabel(e){let t;return e?(t=e.label||e.value||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){const t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}setFilter(){const e=this.options.filter(e=>{var t;const i=e.description,o=null!==(t=e.label)&&void 0!==t?t:e.value;return(null==i?void 0:i.toLowerCase().includes(this.filterSearchValue.toLowerCase()))||o.toLowerCase().includes(this.filterSearchValue.toLowerCase())?e:void 0});this.filteredAvailableOptions=this.sortFilteredOptions(e)}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){kz(e,this)&&(this.open=!1)}}Nu([re],oM.prototype,"name",void 0),Nu([re({mode:"boolean",attribute:"auto-position"})],oM.prototype,"autoPosition",void 0),Nu([re({mode:"boolean"})],oM.prototype,"search",void 0),Nu([re({mode:"boolean"})],oM.prototype,"disabled",void 0),Nu([g],oM.prototype,"defaultSlottedNodes",void 0),Nu([g],oM.prototype,"valueFormatter",void 0),Nu([g],oM.prototype,"filterSearchValue",void 0),Nu([g],oM.prototype,"open",void 0),Nu([g],oM.prototype,"options",void 0),Nu([g],oM.prototype,"selectedOptions",void 0),Nu([g],oM.prototype,"filteredAvailableOptions",void 0),Nu([g],oM.prototype,"position",void 0),Nu([v],oM.prototype,"getPlaceholder",null),oM.compose(Object.assign({baseName:"categorized-multiselect",template:eM,styles:XL,shadowOptions:tM},iM));const cM=(e,t)=>Io(0,t),sM=(e,t)=>Ce` ${rh()}`;class nM extends Fo{}const aM=void 0,rM={checkedIndicator:'\n <svg\n aria-hidden="true"\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '};nM.compose(Object.assign({baseName:"checkbox",template:cM,styles:sM,shadowOptions:aM},rM));const lM=(e,t)=>Ce` .combo-box-indicator{transition-property: transform;transition-duration: 0.2s;transition-timing-function: ease-out}:host([open]) .combo-box-indicator{transform: rotate(180deg)}${hh(e)}`,dM=(e,t)=>W`<template aria-activedescendant="${e=>e.activeDescendant}" class="${e=>e.open?"open":""} ${e=>e.disabled?"disabled":""} ${e=>e.position}" ?open="${e=>e.open}" @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control">${et(0,t)}<slot name="control"><input aria-activedescendant="${e=>e.activeDescendant}" aria-autocomplete="${e=>e.ariaAutoComplete||e.autocomplete}" aria-controls="${e=>e.ariaControls||e.listboxId}" aria-disabled="${e=>e.disabled?"true":"false"}" aria-expanded="${e=>e.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="${e=>e.ariaLabelledby}" aria-label="${e=>e.ariaLabel}" autocomplete="${e=>e.autocomplete}" class="selected-value" part="selected-value" placeholder="${e=>e.placeholder}" role="combobox" type="text" ?disabled="${e=>e.disabled}" :value="${e=>e.value}" @input="${(e,t)=>e.inputHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}" ${Ie("control")}/><div class="indicator" part="indicator" aria-hidden="true"><slot name="indicator">${t.indicator||""}</slot></div></slot>${Je(0,t)}</div><div class="listbox" id="${e=>e.listboxId}" part="listbox" role="listbox" ?disabled="${e=>e.disabled}" ?hidden="${e=>!e.open}" ${Ie("listbox")}><slot ${Ie("slottedDatasource")} ${Ke({filter:Bo.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}></slot></div></template>`;var hM,uM;class pM extends uh{constructor(){super(...arguments),hM.set(this,void 0),uM.set(this,!1),this.needManualChangeEventDispatch=!1,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.filterMode="startsWith",this.scrollToSelectedWhenOpening=!1,this.scrollToSelectedWhenOpeningOptions={behavior:"auto",block:"nearest"},this.scrollWhenSelectionChanges=!1,this.scrollWhenSelectionChangesOptions={behavior:"auto",block:"center"},this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value="",this.control.value="",this.filter="",this.filterOptions()}}get activeDescendant(){var e,t;if(this.selectedOptions&&0!==this.selectedOptions.length)return this.ariaActiveDescendant=null===(e=this.selectedOptions[0])||void 0===e?void 0:e.id,null===(t=this.selectedOptions[0])||void 0===t?void 0:t.id}debounceChanged(e,t){this.debouncedInputHandler=BL(this.asyncSetFilter,t)}get scrollableListbox(){var e,t;return null!==(e=this.listbox)&&void 0!==e?e:null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".listbox")}openChanged(){super.openChanged(),this.$emit("open-change",{open:this.open}),this.open?this.scrollToSelectedWhenOpening&&setTimeout(()=>{const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollToSelectedWhenOpeningOptions)},500):(this.manuallyDispatchChangeEvent(),this.filter="",this.filterOptions())}get value(){return m.track(this,"value"),this._ourValue}set value(e){var t,i,o;if(void 0===e)return;const c=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){const c=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===String(e).toLowerCase(),s=this.options?this.options.findIndex(c):-1,n=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,a=null===(i=this.options[s])||void 0===i?void 0:i.text;this.selectedIndex=a&&a!==n?s:this.selectedIndex,e&&""!==e.trim()&&-1===s&&(e=(null===(o=this.firstSelectedOption)||void 0===o?void 0:o.text)||e)}c!==e&&(this._ourValue=e,super.valueChanged(c,e),m.notify(this,"value"))}slottedOptionsChanged(e,t){this.enableAsyncForInfiniteScrollDatasource(),super.slottedOptionsChanged(e,t),this.updateValue(!1)}enableAsyncForInfiniteScrollDatasource(){var e;if(this.async)return;const t=null===(e=this.slottedDatasource)||void 0===e?void 0:e.assignedNodes().find(e=>e instanceof qL);(null==t?void 0:t.infiniteScroll)&&(this.async=!0)}filterOptions(){if(this.async)return this.filteredOptions=[...this._options],void this._options.forEach(e=>e.hidden=!1);this.autocomplete&&this.autocomplete!==Qo||(this.filter="");const e=this.filter,t=this.caseSensitive?e:e.toLowerCase();this.filteredOptions=this._options.filter(e=>{const i=this.caseSensitive?e.text:e.text.toLowerCase();return"contains"===this.filterMode?i.includes(t):i.startsWith(t)}),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled)if(kz(e,this))this.open=!1;else{if(Sz(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!Sz(e,this.control))return super.clickHandler(e)}}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":if(Vu(this,uM,this.open,"f"),!this.open)return this.open=!0,!0;break;case"ArrowDown":case"ArrowUp":if(!this.open)return this.open=!0,!0;if(this.scrollWhenSelectionChanges){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollWhenSelectionChangesOptions)}break;case"Escape":if(this.control.value!==this.currentValue)return this.filter="",this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),void(this.open=!1);if(!this.open)return!0}const i=super.keydownHandler(e);return"Enter"!==t?i:void 0}keyupHandler(e){var t;const i=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(i){case"Enter":return!Pu(this,uM,"f");case"ArrowDown":case"ArrowUp":this.open&&this.firstSelectedOption&&this.autocomplete===Zo&&(this.needManualChangeEventDispatch=!0,this.currentValue=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value);break;case"Home":case"End":return;case"Backspace":case"Delete":const i=super.keyupHandler(e);return this.selectItemByValue(this.control.value),i}return super.keyupHandler(e)}get indicator(){return Pu(this,hM,"f")||Vu(this,hM,this.shadowRoot.querySelector('[part="indicator"]'),"f"),Pu(this,hM,"f")}selectItemByValue(e){var t,i,o;this.selectedIndex=null!==(i=null===(t=this.options)||void 0===t?void 0:t.findIndex(t=>t.text===e))&&void 0!==i?i:-1,null===(o=this.options)||void 0===o||o.forEach((e,t)=>e.selected=t===this.selectedIndex)}inputHandler(e){this.async?this.debouncedInputHandler():super.inputHandler(e)}asyncSetFilter(){const e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof qL);if(t.length>0){const i=t[0];null==e||""===e?i.criteria=i.baseCriteria||"":Pz(i,e),u.queueUpdate(()=>{this.control.value=e})}else Mz.warn("Options-datasource is not connected. Please add a datasource to use this functionality.")}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===Zo&&(this.dispatchEvent(new Event("change",{bubbles:!0})),this.needManualChangeEventDispatch=!1)}}hM=new WeakMap,uM=new WeakMap,Nu([g],pM.prototype,"activeDescendant",null),Nu([g],pM.prototype,"slottedDatasource",void 0),Nu([re({mode:"boolean"})],pM.prototype,"async",void 0),Nu([re],pM.prototype,"debounce",void 0),Nu([re({mode:"boolean",attribute:"case-sensitive"})],pM.prototype,"caseSensitive",void 0),Nu([re({mode:"boolean",attribute:"ignore-input-click"})],pM.prototype,"ignoreInputClick",void 0),Nu([re({attribute:"filter-mode"})],pM.prototype,"filterMode",void 0),Nu([re({mode:"boolean",attribute:"scroll-to-selected-when-opening"})],pM.prototype,"scrollToSelectedWhenOpening",void 0),Nu([g],pM.prototype,"scrollToSelectedWhenOpeningOptions",void 0),Nu([re({mode:"boolean",attribute:"scroll-when-selection-changes"})],pM.prototype,"scrollWhenSelectionChanges",void 0),Nu([g],pM.prototype,"scrollWhenSelectionChangesOptions",void 0);const fM={delegatesFocus:!0,mode:"open"},mM={indicator:'\n <svg\n class="combo-box-indicator"\n part="combo-box-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '};pM.compose(Object.assign({baseName:"combobox",template:dM,styles:lM,shadowOptions:fM},mM));const gM=(e,t)=>Ce` :host{--light-size: 12px;--height: calc(var(--design-unit) * 2px + var(--light-size));display: flex;justify-content: center;align-items: center;width: 100%;height: var(--height);margin: calc(var(--design-unit) * 2px) 0;/* https://www.colorxs.com/color/traffic-light-green-2032-20 */ --green: 50 164 49;--trafic-light-green: rgb(var(--green));--trafic-light-green-glow: rgb(var(--green) / 40%) 0 0 4px 4px, rgb(var(--green) / 20%) 0 0 8px 8px;/* https://www.colorxs.com/color/ral-3020-traffic-red */ --red: 187 30 16;--trafic-light-red: rgb(var(--red));--trafic-light-red-glow: rgb(var(--red) / 40%) 0 0 4px 4px, rgb(var(--red) / 20%) 0 0 8px 8px}.light{height: var(--light-size);width: var(--light-size);margin: 1rem;border-radius: 100%}.green{background: var(--trafic-light-green);box-shadow: var(--trafic-light-green-glow)}.red{background: var(--trafic-light-red);box-shadow: var(--trafic-light-red-glow)}.label{font-size: small;color: grey;overflow: hidden;text-overflow: ellipsis;white-space: nowrap}`,vM=W`<div class=${e=>Jt(["light",!0],[e.colour,!0])}></div>${He(e=>e.showLabel,W`<div class="label">${e=>e.label}</div>`)} `;class bM extends qt{constructor(){super(...arguments),this.showLabel=!1,this.label="disconnected",this.colour="red"}connectedCallback(){super.connectedCallback(),this.subscription=this.connect.isConnectedSubject.subscribe(e=>{this.label=this.getLabel(e),this.colour=e?"green":"red"})}disconnectedCallback(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}getLabel(e){if(!e)return"disconnected";return`${this.session.getSessionStorageItem("hostUrl")} ✔`}}Nu([gx],bM.prototype,"connect",void 0),Nu([Cb],bM.prototype,"session",void 0),Nu([re({mode:"boolean",attribute:"show-label"})],bM.prototype,"showLabel",void 0),Nu([g],bM.prototype,"label",void 0),Nu([g],bM.prototype,"colour",void 0),bM.compose({baseName:"connection-indicator",template:vM,styles:gM});const yM=class extends Lo{}.compose(Object.assign({baseName:"data-grid",template:(e,t)=>Co(e),styles:(e,t)=>Ce` ${ph()}`,shadowOptions:void 0},{}));const xM=class extends ko{}.compose(Object.assign({baseName:"data-grid-cell",template:$o,styles:(e,t)=>Ce` ${mh()}`,shadowOptions:void 0},{}));const zM=class extends zo{}.compose(Object.assign({baseName:"data-grid-row",template:So,styles:(e,t)=>Ce` ${fh()}`,shadowOptions:void 0},{})),CM=Ce` :host{position: relative}.date-toggle::part(control){cursor: pointer}.date-toggle::part(label){cursor: pointer}.calendar-dropdown{display: none;width: 300px;z-index: 999;position: absolute;top: 100%;left: 50%;transform: translate(-50%, 8px);margin: 10px 0 0;padding: 20px;background: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);box-shadow: 0 0 8px rgb(0 0 0 / 20%)}.calendar-dropdown.hide-weekends{width: 215px}.calendar-dropdown.top{top: auto;bottom: 100%;margin: 0 0 5px;transform: translate(-50%, -8px)}.calendar-dropdown.left{top: 50%;left: 0;margin: 0 0 0 5px;transform: translate(calc(-8px + -100%), -50%)}.calendar-dropdown.right{top: 50%;left: 100%;transform: translate(8px, -50%)}.calendar-dropdown.visible{display: block}.calendar-dropdown.inline{display: block;position: static;z-index: auto;margin-top: 5px;transform: none}.header{display: flex;justify-content: space-between;align-items: center;margin: 0 0 10px}.header h3{margin: 0;text-transform: capitalize;font-weight: bold;color: var(--neutral-foreground-rest)}.header .icon-button{height: auto;padding: 0;min-width: auto}.header .months-arrows{display: flex;gap: calc(var(--design-unit) * 2px)}.week-days{display: grid;grid-template-columns: repeat(7, 1fr);grid-gap: 5px;margin-bottom: 10px;color: var(--neutral-foreground-rest)}.week-days span{display: flex;justify-content: center;align-items: center;font-size: 14px;font-weight: bold;text-transform: capitalize}.week-days span.disabled{opacity: 60%}.month-days{display: grid;grid-template-columns: repeat(7, 1fr);grid-gap: 5px}.week-days.hide-weekends, .month-days.hide-weekends{grid-template-columns: repeat(5, 1fr)}.month-day{padding: 8px 5px;color: #808080;background: none;display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 4px);cursor: pointer;border: none}.month-day.current{opacity: 100%;color: var(--neutral-foreground-hint)}.month-day.selected{background: var(--accent-foreground-rest);color: var(--neutral-foreground-rest)}.month-day:hover:not(:disabled){background: var(--neutral-stroke-hover);color: var(--neutral-foreground-rest)}.month-day[disabled]{opacity: 50%;cursor: not-allowed}.date-toggle[readonly] .label{cursor: pointer}`,LM=[1,7],MM=e=>W`<${e}-text-field data-test-id="date-picker" readonly :value="${e=>e.inputValue}" placeholder="${e=>e.inputPlaceholder}" part="date-toggle" class="date-toggle" @click="${e=>e.toggleCalendar()}">${e=>e.label}<div class="input-icon-container" part="input-icon-container" slot="end"><${e}-icon variant="regular" name="calendar-alt" size="sm"></${e}-icon></div></${e}-text-field><div class="calendar-dropdown ${e=>e.calendarDropdownClasses} ${e=>e.position}"><div class="header"><h3>${e=>e.currentMonth} ${e=>e.currentYear}</h3><div class="months-arrows"><${e}-button class="icon-button" appearance="accent" @click="${e=>e.prevMonth()}" aria-label="previous month"><${e}-icon name="angle-left"></${e}-icon></${e}-button><${e}-button class="icon-button" appearance="accent" @click="${e=>e.nextMonth()}" aria-label="next month"><${e}-icon name="angle-right"></${e}-icon></${e}-button></div></div><div class="week-days ${e=>Jt(["hide-weekends",e.hideWeekends])}">${qe(e=>{var t;return null===(t=e.calendar)||void 0===t?void 0:t.weekDays},W` ${He((e,t)=>!t.parent.hideWeekends||-1===LM.indexOf(t.index+1),W`<span class="${(e,t)=>Jt(["disabled",-1!==t.parent.disabledDaysOfWeek.indexOf(t.index+1)])}">${(e,t)=>e.substring(0,t.parent.substringNumber)}</span>`)} `,{positioning:!0})}</div><div class="month-days ${e=>Jt(["hide-weekends",e.hideWeekends])}">${qe(e=>e.monthList,W` ${He((e,t)=>!t.parent.hideWeekends||-1===LM.indexOf(e.dayNumber),W`<button ?disabled="${(e,t)=>-1!==t.parent.disabledDaysOfWeek.indexOf(e.dayNumber)}" class="month-day ${(e,t)=>t.parent.isSelectedDate(e)?"selected":""} ${(e,t)=>e.monthNumber===t.parent.calendar.month.number?"current":""}" @click=${(e,t)=>t.parent.selectDay(e)}>${e=>e.date}</button>`)} `)}</div><slot name="bottom"></slot></div>`,wM=W` ${e=>MM($z(e))} `;var kM,SM={exports:{}};function $M(){return kM||(kM=1,function(e){e.exports=function(){var e=1e3,t=6e4,i=36e5,o="millisecond",c="second",s="minute",n="hour",a="day",r="week",l="month",d="quarter",h="year",u="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}},v=function(e,t,i){var o=String(e);return!o||o.length>=t?e:""+Array(t+1-o.length).join(i)+e},b={s:v,z:function(e){var t=-e.utcOffset(),i=Math.abs(t),o=Math.floor(i/60),c=i%60;return(t<=0?"+":"-")+v(o,2,"0")+":"+v(c,2,"0")},m:function e(t,i){if(t.date()<i.date())return-e(i,t);var o=12*(i.year()-t.year())+(i.month()-t.month()),c=t.clone().add(o,l),s=i-c<0,n=t.clone().add(o+(s?-1:1),l);return+(-(o+(i-c)/(s?c-n:n-c))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:h,w:r,d:a,D:u,h:n,m:s,s:c,ms:o,Q:d}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",x={};x[y]=g;var z="$isDayjsObject",C=function(e){return e instanceof k||!(!e||!e[z])},L=function e(t,i,o){var c;if(!t)return y;if("string"==typeof t){var s=t.toLowerCase();x[s]&&(c=s),i&&(x[s]=i,c=s);var n=t.split("-");if(!c&&n.length>1)return e(n[0])}else{var a=t.name;x[a]=t,c=a}return!o&&c&&(y=c),c||!o&&y},M=function(e,t){if(C(e))return e.clone();var i="object"==typeof t?t:{};return i.date=e,i.args=arguments,new k(i)},w=b;w.l=L,w.i=C,w.w=function(e,t){return M(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var k=function(){function g(e){this.$L=L(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[z]=!0}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,i=e.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var o=t.match(f);if(o){var c=o[2]-1||0,s=(o[7]||"0").substring(0,3);return i?new Date(Date.UTC(o[1],c,o[3]||1,o[4]||0,o[5]||0,o[6]||0,s)):new Date(o[1],c,o[3]||1,o[4]||0,o[5]||0,o[6]||0,s)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return w},v.isValid=function(){return!(this.$d.toString()===p)},v.isSame=function(e,t){var i=M(e);return this.startOf(t)<=i&&i<=this.endOf(t)},v.isAfter=function(e,t){return M(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<M(e)},v.$g=function(e,t,i){return w.u(e)?this[t]:this.set(i,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var i=this,o=!!w.u(t)||t,d=w.p(e),p=function(e,t){var c=w.w(i.$u?Date.UTC(i.$y,t,e):new Date(i.$y,t,e),i);return o?c:c.endOf(a)},f=function(e,t){return w.w(i.toDate()[e].apply(i.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(t)),i)},m=this.$W,g=this.$M,v=this.$D,b="set"+(this.$u?"UTC":"");switch(d){case h:return o?p(1,0):p(31,11);case l:return o?p(1,g):p(0,g+1);case r:var y=this.$locale().weekStart||0,x=(m<y?m+7:m)-y;return p(o?v-x:v+(6-x),g);case a:case u:return f(b+"Hours",0);case n:return f(b+"Minutes",1);case s:return f(b+"Seconds",2);case c:return f(b+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var i,r=w.p(e),d="set"+(this.$u?"UTC":""),p=(i={},i[a]=d+"Date",i[u]=d+"Date",i[l]=d+"Month",i[h]=d+"FullYear",i[n]=d+"Hours",i[s]=d+"Minutes",i[c]=d+"Seconds",i[o]=d+"Milliseconds",i)[r],f=r===a?this.$D+(t-this.$W):t;if(r===l||r===h){var m=this.clone().set(u,1);m.$d[p](f),m.init(),this.$d=m.set(u,Math.min(this.$D,m.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[w.p(e)]()},v.add=function(o,d){var u,p=this;o=Number(o);var f=w.p(d),m=function(e){var t=M(p);return w.w(t.date(t.date()+Math.round(e*o)),p)};if(f===l)return this.set(l,this.$M+o);if(f===h)return this.set(h,this.$y+o);if(f===a)return m(1);if(f===r)return m(7);var g=(u={},u[s]=t,u[n]=i,u[c]=e,u)[f]||1,v=this.$d.getTime()+o*g;return w.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,i=this.$locale();if(!this.isValid())return i.invalidDate||p;var o=e||"YYYY-MM-DDTHH:mm:ssZ",c=w.z(this),s=this.$H,n=this.$m,a=this.$M,r=i.weekdays,l=i.months,d=i.meridiem,h=function(e,i,c,s){return e&&(e[i]||e(t,o))||c[i].slice(0,s)},u=function(e){return w.s(s%12||12,e,"0")},f=d||function(e,t,i){var o=e<12?"AM":"PM";return i?o.toLowerCase():o};return o.replace(m,function(e,o){return o||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return w.s(t.$y,4,"0");case"M":return a+1;case"MM":return w.s(a+1,2,"0");case"MMM":return h(i.monthsShort,a,l,3);case"MMMM":return h(l,a);case"D":return t.$D;case"DD":return w.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(i.weekdaysMin,t.$W,r,2);case"ddd":return h(i.weekdaysShort,t.$W,r,3);case"dddd":return r[t.$W];case"H":return String(s);case"HH":return w.s(s,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return f(s,n,!0);case"A":return f(s,n,!1);case"m":return String(n);case"mm":return w.s(n,2,"0");case"s":return String(t.$s);case"ss":return w.s(t.$s,2,"0");case"SSS":return w.s(t.$ms,3,"0");case"Z":return c}return null}(e)||c.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(o,u,p){var f,m=this,g=w.p(u),v=M(o),b=(v.utcOffset()-this.utcOffset())*t,y=this-v,x=function(){return w.m(m,v)};switch(g){case h:f=x()/12;break;case l:f=x();break;case d:f=x()/3;break;case r:f=(y-b)/6048e5;break;case a:f=(y-b)/864e5;break;case n:f=y/i;break;case s:f=y/t;break;case c:f=y/e;break;default:f=y}return p?f:w.a(f)},v.daysInMonth=function(){return this.endOf(l).$D},v.$locale=function(){return x[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var i=this.clone(),o=L(e,t,!0);return o&&(i.$L=o),i},v.clone=function(){return w.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),S=k.prototype;return M.prototype=S,[["$ms",o],["$s",c],["$m",s],["$H",n],["$W",a],["$M",l],["$y",h],["$D",u]].forEach(function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),M.extend=function(e,t){return e.$i||(e(t,k,M),e.$i=!0),M},M.locale=L,M.isDayjs=C,M.unix=function(e){return M(1e3*e)},M.en=x[y],M.Ls=x,M.p={},M}()}(SM)),SM.exports}var EM,NM=of($M()),AM={exports:{}};var OM,TM=(EM||(EM=1,function(e){e.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,c=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,n={},a=function(e){return(e=+e)+(e>68?1900:2e3)},r=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),i=60*t[1]+(+t[2]||0);return 0===i?0:"+"===t[0]?-i:i}(e)}],d=function(e){var t=n[e];return t&&(t.indexOf?t:t.s.concat(t.f))},h=function(e,t){var i,o=n.meridiem;if(o){for(var c=1;c<=24;c+=1)if(e.indexOf(o(c,0,t))>-1){i=c>12;break}}else i=e===(t?"pm":"PM");return i},u={A:[s,function(e){this.afternoon=h(e,!1)}],a:[s,function(e){this.afternoon=h(e,!0)}],Q:[i,function(e){this.month=3*(e-1)+1}],S:[i,function(e){this.milliseconds=100*+e}],SS:[o,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[c,r("seconds")],ss:[c,r("seconds")],m:[c,r("minutes")],mm:[c,r("minutes")],H:[c,r("hours")],h:[c,r("hours")],HH:[c,r("hours")],hh:[c,r("hours")],D:[c,r("day")],DD:[o,r("day")],Do:[s,function(e){var t=n.ordinal,i=e.match(/\d+/);if(this.day=i[0],t)for(var o=1;o<=31;o+=1)t(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],w:[c,r("week")],ww:[o,r("week")],M:[c,r("month")],MM:[o,r("month")],MMM:[s,function(e){var t=d("months"),i=(d("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(i<1)throw new Error;this.month=i%12||i}],MMMM:[s,function(e){var t=d("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,r("year")],YY:[o,function(e){this.year=a(e)}],YYYY:[/\d{4}/,r("year")],Z:l,ZZ:l};function p(i){var o,c;o=i,c=n&&n.formats;for(var s=(i=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,i,o){var s=o&&o.toUpperCase();return i||c[o]||e[o]||c[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})).match(t),a=s.length,r=0;r<a;r+=1){var l=s[r],d=u[l],h=d&&d[0],p=d&&d[1];s[r]=p?{regex:h,parser:p}:l.replace(/^\[|\]$/g,"")}return function(e){for(var t={},i=0,o=0;i<a;i+=1){var c=s[i];if("string"==typeof c)o+=c.length;else{var n=c.regex,r=c.parser,l=e.slice(o),d=n.exec(l)[0];r.call(t,d),e=e.replace(d,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var i=e.hours;t?i<12&&(e.hours+=12):12===i&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,i){i.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var o=t.prototype,c=o.parse;o.parse=function(e){var t=e.date,o=e.utc,s=e.args;this.$u=o;var a=s[1];if("string"==typeof a){var r=!0===s[2],l=!0===s[3],d=r||l,h=s[2];l&&(h=s[2]),n=this.$locale(),!r&&h&&(n=i.Ls[h]),this.$d=function(e,t,i,o){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var c=p(t)(e),s=c.year,n=c.month,a=c.day,r=c.hours,l=c.minutes,d=c.seconds,h=c.milliseconds,u=c.zone,f=c.week,m=new Date,g=a||(s||n?1:m.getDate()),v=s||m.getFullYear(),b=0;s&&!n||(b=n>0?n-1:m.getMonth());var y,x=r||0,z=l||0,C=d||0,L=h||0;return u?new Date(Date.UTC(v,b,g,x,z,C,L+60*u.offset*1e3)):i?new Date(Date.UTC(v,b,g,x,z,C,L)):(y=new Date(v,b,g,x,z,C,L),f&&(y=o(y).week(f).toDate()),y)}catch(e){return new Date("")}}(t,a,o,i),this.init(),h&&!0!==h&&(this.$L=this.locale(h).$L),d&&t!=this.format(a)&&(this.$d=new Date("")),n={}}else if(a instanceof Array)for(var u=a.length,f=1;f<=u;f+=1){s[1]=a[f-1];var m=i.apply(this,s);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}f===u&&(this.$d=new Date(""))}else c.call(this,e)}}}()}(AM)),AM.exports),RM=of(TM),IM={exports:{}};var _M,DM=(OM||(OM=1,function(e){e.exports=function(e,t,i){var o=t.prototype,c=function(e){return e&&(e.indexOf?e:e.s)},s=function(e,t,i,o,s){var n=e.name?e:e.$locale(),a=c(n[t]),r=c(n[i]),l=a||r.map(function(e){return e.slice(0,o)});if(!s)return l;var d=n.weekStart;return l.map(function(e,t){return l[(t+(d||0))%7]})},n=function(){return i.Ls[i.locale()]},a=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})}(e.formats[t.toUpperCase()])},r=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):s(e,"months")},monthsShort:function(t){return t?t.format("MMM"):s(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):s(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):s(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):s(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return a(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return r.bind(this)()},i.localeData=function(){var e=n();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(t){return a(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},i.months=function(){return s(n(),"months")},i.monthsShort=function(){return s(n(),"monthsShort","months",3)},i.weekdays=function(e){return s(n(),"weekdays",null,null,e)},i.weekdaysShort=function(e){return s(n(),"weekdaysShort","weekdays",3,e)},i.weekdaysMin=function(e){return s(n(),"weekdaysMin","weekdays",2,e)}}}(IM)),IM.exports),FM=of(DM),HM={exports:{}};var PM,VM=(_M||(_M=1,function(e){var t;e.exports=(t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},function(e,i,o){var c=i.prototype,s=c.format;o.en.formats=t,c.format=function(e){void 0===e&&(e="YYYY-MM-DDTHH:mm:ssZ");var i=this.$locale().formats,o=function(e,i){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,o,c){var s=c&&c.toUpperCase();return o||i[c]||t[c]||i[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})}(e,void 0===i?{}:i);return s.call(this,o)}})}(HM)),HM.exports),BM=of(VM),UM={exports:{}};var jM=(PM||(PM=1,function(e){e.exports=function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}}(UM)),UM.exports),qM=of(jM);class GM{constructor(e,t="default"){e=null!=e?e:new Date,this.Date=e,this.date=e.getDate(),this.day=e.toLocaleString(t,{weekday:"long"}),this.dayNumber=e.getDay()+1,this.dayShort=e.toLocaleString(t,{weekday:"short"}),this.year=e.getFullYear(),this.yearShort=Number(e.toLocaleString(t,{year:"2-digit"})),this.month=e.toLocaleString(t,{month:"long"}),this.monthShort=e.toLocaleString(t,{month:"short"}),this.monthNumber=e.getMonth()+1,this.timestamp=e.getTime()}}NM.extend(qM);class WM{constructor(e=null,t="default"){const i=new GM(e,t);this.lang=t,this.name=i.month,this.number=i.monthNumber,this.year=i.year,this.numberOfDays=[31,28,31,30,31,30,31,31,30,31,30,31][this.number-1],2===this.number&&(this.numberOfDays+=NM(i.date).isLeapYear()?1:0)}getDay(e){return new GM(new Date(this.year,this.number-1,e),this.lang)}}NM.extend(qM);class YM{constructor(e=null,t=null,i="default"){this.weekDays=Array.from({length:7}),this.today=new GM(null,i),this.year=null!=e?e:this.today.year,this.month=new WM(new Date(this.year,(t||this.today.monthNumber)-1),i),this.lang=i,this.weekDays.forEach((e,t)=>{const i=this.month.getDay(t);this.weekDays[i.dayNumber-1]=i.day})}getMonth(e){return new WM(new Date(this.year,e-1),this.lang)}getPreviousMonth(){return 1===this.month.number?new WM(new Date(this.year-1,11),this.lang):new WM(new Date(this.year,this.month.number-2),this.lang)}getNextMonth(){return 1===this.month.number?new WM(new Date(this.year+1,0),this.lang):new WM(new Date(this.year,this.month.number+2),this.lang)}goToDate(e,t){this.month=new WM(new Date(t,e-1),this.lang),this.year=t}goToNextYear(){this.year+=1,this.month=new WM(new Date(this.year,0),this.lang)}goToPreviousYear(){this.year-=1,this.month=new WM(new Date(this.year,11),this.lang)}goToNextMonth(){if(12===this.month.number)return this.goToNextYear();this.month=new WM(new Date(this.year,this.month.number+1-1),this.lang)}goToPreviousMonth(){if(1===this.month.number)return this.goToPreviousYear();this.month=new WM(new Date(this.year,this.month.number-1-1),this.lang)}}var KM,ZM={exports:{}};function QM(e){return null!=e&&""!==String(e).trim()}KM||(KM=1,function(e){e.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e),o={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}};return i.default.locale(o,null,!0),o}($M())}(ZM)),NM.extend(RM),NM.extend(FM),NM.extend(BM);const XM="MM-DD-YYYY";const JM=[1,2,3,4,5,6,7],ew=(e,t,i)=>{if(o=t,-1===e.indexOf(o.dayNumber))return t;var o;const c=JM.filter(t=>-1===e.indexOf(t));let s=c.find(e=>e>t.dayNumber);s||(s=Math.min(...c));const n=t.dayNumber<s?s-t.dayNumber:s-t.dayNumber+7;return c.length?new GM(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,n),i):(gp.warn("Date picker disabled days - all days of week have been disabled"),t)};class tw extends qt{constructor(){super(...arguments),this.format=XM,this.lang="en-US",this.visible=!1,this.position="bottom",this.disabledDaysOfWeek=[],this.suppressValueChanged=!1,this.cachedFormat=XM,this.clickOutside=e=>this.handleClickOutside(e),this.keydownOutside=e=>this.handleKeydownOutside(e)}formatChanged(e,t){!this.useLocaleFormat&&t&&this.cacheUserFormat(t),t&&this.calendar&&QM(this.value)&&(this.formatDate=NM(this.currentDate.Date).format(t))}langChanged(){this.applyEffectiveLangChange()}useLocaleFormatChanged(e,t){this.calendar&&(t&&!e?this.cacheUserFormat(this.format):!t&&e&&this.restoreUserFormat(),this.applyEffectiveLangChange())}inlineCalendarChanged(){this.inlineCalendar?(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)):this.visible&&(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)),this.toggleVisibility()}hideWeekendsCalendarChanged(){this.toggleVisibility()}valueChanged(e,t){this.suppressValueChanged||this.calendar&&(QM(t)?this.applyValue(t):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate())}disconnectedCallback(){document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside),super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),NM.extend(RM),NM.extend(BM),NM.extend(FM),this.substringNumber=3,this.useLocaleFormat&&(this.cacheUserFormat(this.format),this.applyLocaleFormat());const e=this.value;!this.allowEmpty||QM(e)?QM(e)?this.applyValue(e):this.initializeWithDefaultDate():this.initializeEmpty()}clear(){this.allowEmpty&&this.clearToEmpty(!0)}get inputValue(){return QM(this.value)?this.formatDate:""}get inputPlaceholder(){var e;return!this.allowEmpty||QM(this.value)?"":(null===(e=this.placeholder)||void 0===e?void 0:e.trim())||this.format.replace(/YYYY/g,"yyyy").replace(/YY(?!Y)/g,"yy").replace(/DD/g,"dd").replace(/D(?!D)/g,"d").replace(/MM/g,"mm").replace(/M(?!M)/g,"m")}get effectiveLang(){return this.useLocaleFormat&&!this.hasAttribute("lang")?"undefined"!=typeof navigator&&navigator.language?navigator.language:"en":this.lang}applyLocaleFormat(){this.format=function(e="en"){const t=function(e){const t=((null==e?void 0:e.trim())||"en").toLowerCase().replace(/_/g,"-");return"en-us"===t||"en"===t?"en":"en-gb"===t?"en-gb":t}(e),i=NM().locale(t),o=i.locale();return(c=t)!==(s=o)&&s!==c.split("-")[0]?NM().locale("en").localeData().longDateFormat("L")||"MM/DD/YYYY":i.localeData().longDateFormat("L")||"MM/DD/YYYY";var c,s}(this.effectiveLang)}cacheUserFormat(e){const t=null==e?void 0:e.trim();t&&(this.cachedFormat=t)}restoreUserFormat(){this.format=this.cachedFormat}applyEffectiveLangChange(){var e,t;if(!this.calendar)return;this.useLocaleFormat&&this.applyLocaleFormat();const i=this.calendar.year,o=this.calendar.month.number,c=null!==(t=null===(e=this.currentDate)||void 0===e?void 0:e.Date)&&void 0!==t?t:NM().toDate();this.currentDate=new GM(c,this.effectiveLang),this.calendar=new YM(i,o,this.effectiveLang),QM(this.value)&&(this.formatDate=NM(this.currentDate.Date).format(this.format)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}syncValueAttribute(e){this.suppressValueChanged=!0,this.value=e,this.suppressValueChanged=!1}initializeEmpty(){const e=NM();this.currentDate=new GM(e.toDate(),this.effectiveLang),this.calendar=new YM(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate="",this.syncValueAttribute(""),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}initializeWithDefaultDate(){this.resetToDefaultDate(!0)}resetToDefaultDate(e=!1){var t;let i=new GM(NM().toDate(),this.effectiveLang);(null===(t=this.disabledDaysOfWeek)||void 0===t?void 0:t.length)&&(i=ew(this.disabledDaysOfWeek,i,this.effectiveLang)),this.currentDate=i,e||!this.calendar?this.calendar=new YM(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang):this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=NM(this.currentDate.Date).format(this.format),this.syncValueAttribute(NM(this.currentDate.Date).format(XM)),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}applyValue(e){const t=function(e,t){const i=String(e).trim(),o=NM(i,t,!0);if(o.isValid())return o;const c=NM(i,XM,!0);return c.isValid()?c:null}(e,this.format);t?(this.currentDate=new GM(t.toDate(),this.effectiveLang),this.calendar?this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year):this.calendar=new YM(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate=NM(this.currentDate.Date).format(this.format),this.syncValueAttribute(NM(this.currentDate.Date).format(XM)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate()}clearToEmpty(e){const t=NM();this.currentDate=new GM(t.toDate(),this.effectiveLang),this.calendar&&(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()),this.formatDate="",this.syncValueAttribute(""),e&&this.$emit("value-changed",void 0)}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}visibleChanged(e,t){this.inlineCalendar||(t?(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)):(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)))}handleKeydownOutside(e){!this.inlineCalendar&&this.visible&&"Escape"===e.key&&(e.preventDefault(),this.closeCalendar())}handleClickOutside(e){!this.inlineCalendar&&this.visible&&kz(e,this)&&this.closeCalendar()}closeCalendar(){this.visible&&(this.visible=!1,this.toggleVisibility())}toggleCalendar(){this.visible=!this.visible,this.toggleVisibility(),this.isCurrentCalendarMonth()||(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText())}toggleVisibility(){this.calendarDropdownClasses=Jt(["visible",this.visible],this.position,["inline",this.inlineCalendar],["hide-weekends",this.hideWeekends])}isSelectedDate(e){return!(this.allowEmpty&&!QM(this.value))&&NM(e.Date).isSame(this.currentDate.Date,"day")}isCurrentCalendarMonth(){return this.currentMonth===this.currentDate.monthNumber&&this.currentYear===this.currentDate.year}prevMonth(){this.calendar.goToPreviousMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}nextMonth(){this.calendar.goToNextMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}selectDay(e){NM(e.Date).isSame(this.currentDate.Date,"day")&&QM(this.value)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=NM(this.currentDate.Date).format(this.format),this.syncValueAttribute(NM(e.Date).format(XM)),this.$emit("value-changed",this.value),this.toggleCalendar())}getMonthDaysGrid(){const e=this.calendar.month.getDay(1),t=this.calendar.getPreviousMonth(),i=e.dayNumber-1,o=this.calendar.month.numberOfDays+i,c=Array.from({length:o});for(let e=i;e<o;e+=1)c[e]=this.calendar.month.getDay(e+1-i);for(let e=0;e<i;e+=1){const o=i-(e+1);c[e]=t.getDay(t.numberOfDays-o)}return c}}Nu([re],tw.prototype,"format",void 0),Nu([re],tw.prototype,"lang",void 0),Nu([re({attribute:"use-locale-format",mode:"boolean"})],tw.prototype,"useLocaleFormat",void 0),Nu([re],tw.prototype,"visible",void 0),Nu([re({attribute:"inline-calendar",mode:"boolean"})],tw.prototype,"inlineCalendar",void 0),Nu([re({attribute:"hide-weekends",mode:"boolean"})],tw.prototype,"hideWeekends",void 0),Nu([re],tw.prototype,"position",void 0),Nu([re],tw.prototype,"label",void 0),Nu([re({attribute:"allow-empty",mode:"boolean"})],tw.prototype,"allowEmpty",void 0),Nu([re],tw.prototype,"placeholder",void 0),Nu([re],tw.prototype,"value",void 0),Nu([g],tw.prototype,"currentDate",void 0),Nu([g],tw.prototype,"currentMonth",void 0),Nu([g],tw.prototype,"currentYear",void 0),Nu([g],tw.prototype,"calendarDropdownClasses",void 0),Nu([g],tw.prototype,"formatDate",void 0),Nu([g],tw.prototype,"monthList",void 0),Nu([g],tw.prototype,"disabledDaysOfWeek",void 0),Nu([g],tw.prototype,"calendar",void 0),tw.compose(Object.assign({baseName:"date-picker",styles:CM,template:wM,shadowOptions:void 0},{}));class iw{constructor(){this.value=null}}Nu([g],iw.prototype,"value",void 0),new iw;const ow=(e,t,i)=>{const o=i?(e,t)=>e.setValueFor(i,t):(e,t)=>e.withDefault(t);Object.keys(e).forEach(i=>{const c=`${i}Value`;t[c]&&o(e[i],t[c])})};function cw(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const sw={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=Da(e);return t?Va.create(t.r,t.g,t.b):null}},nw=e=>Wa.from(Va.from(Da(e)));Va.create(1,1,1),Va.create(0,0,0);const aw=Da("#585858"),rw=Va.create(aw.r,aw.g,aw.b),lw=Da("#ffffff"),dw=Va.create(lw.r,lw.g,lw.b),hw=Wa.from(dw),uw=Da("#eeeeee"),pw=Va.create(uw.r,uw.g,uw.b);Wa.from(pw);const fw=Da("#08c3a5"),mw=Va.create(fw.r,fw.g,fw.b);Wa.from(mw);const{create:gw}=vc,vw=gw("fui-fill-color").withDefault(rw),bw=gw({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(dw);function yw(e,t){return e.colorContrast(t,14)}const xw=gw({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>yw(gw("fui-card-palette").withDefault(hw).getValueFor(e),bw.getValueFor(e)));var zw=Object.freeze({__proto__:null,fuiFillColor:vw,fuiCardFillColor:bw,defaultNeutralForegroundContrast:14,neutralForeground:yw,fuiCardForegroundColor:xw,accentFillActive:Al,accentFillActiveDelta:_r,accentFillFocus:Ol,accentFillFocusDelta:Dr,accentFillHover:Nl,accentFillHoverDelta:Ir,accentFillRest:El,accentFillRestDelta:Rr,accentForegroundActive:Yl,accentForegroundActiveDelta:Pr,accentForegroundFocus:Kl,accentForegroundFocusDelta:Vr,accentForegroundHover:Wl,accentForegroundHoverDelta:Hr,accentForegroundRest:Gl,accentForegroundRestDelta:Fr,accentPalette:pl,baseHeightMultiplier:nr,baseLayerLuminance:rr,bodyFont:sr,controlCornerRadius:lr,density:dr,designUnit:hr,direction:ur,disabledOpacity:pr,fillColor:kl,focusStrokeInner:zd,focusStrokeOuter:yd,focusStrokeWidth:mr,foregroundOnAccentActive:Dl,foregroundOnAccentActiveLarge:Bl,foregroundOnAccentFocus:Fl,foregroundOnAccentFocusLarge:Ul,foregroundOnAccentHover:_l,foregroundOnAccentHoverLarge:Vl,foregroundOnAccentRest:Il,foregroundOnAccentRestLarge:Pl,neutralFillActive:Jl,neutralFillActiveDelta:jr,neutralFillFocus:ed,neutralFillFocusDelta:qr,neutralFillHover:Xl,neutralFillHoverDelta:Ur,neutralFillInputActive:cd,neutralFillInputActiveDelta:Yr,neutralFillInputFocus:sd,neutralFillInputFocusDelta:Kr,neutralFillInputHover:od,neutralFillInputHoverDelta:Wr,neutralFillInputRest:id,neutralFillInputRestDelta:Gr,neutralFillLayerRest:vd,neutralFillLayerRestDelta:cl,neutralFillRest:Ql,neutralFillRestDelta:Br,neutralFillStealthActive:ld,neutralFillStealthActiveDelta:Xr,neutralFillStealthFocus:dd,neutralFillStealthFocusDelta:Jr,neutralFillStealthHover:rd,neutralFillStealthHoverDelta:Qr,neutralFillStealthRest:ad,neutralFillStealthRestDelta:Zr,neutralFillStrongActive:fd,neutralFillStrongActiveDelta:il,neutralFillStrongFocus:md,neutralFillStrongFocusDelta:ol,neutralFillStrongHover:pd,neutralFillStrongHoverDelta:tl,neutralFillStrongRest:ud,neutralFillStrongRestDelta:el,neutralForegroundHint:Ld,neutralForegroundRest:wd,neutralLayer1:yl,neutralLayer2:zl,neutralLayer3:Ll,neutralLayer4:wl,neutralLayerCardContainer:ml,neutralLayerFloating:vl,neutralPalette:hl,neutralStrokeActive:Ed,neutralStrokeActiveDelta:al,neutralStrokeDividerRest:Od,neutralStrokeDividerRestDelta:ll,neutralStrokeFocus:Nd,neutralStrokeFocusDelta:rl,neutralStrokeHover:$d,neutralStrokeHoverDelta:nl,neutralStrokeRest:Sd,neutralStrokeRestDelta:sl,strokeWidth:fr,typeRampBaseFontSize:gr,typeRampBaseLineHeight:vr,typeRampMinus1FontSize:br,typeRampMinus1LineHeight:yr,typeRampMinus2FontSize:xr,typeRampMinus2LineHeight:zr,typeRampPlus1FontSize:Cr,typeRampPlus1LineHeight:Lr,typeRampPlus2FontSize:Mr,typeRampPlus2LineHeight:wr,typeRampPlus3FontSize:kr,typeRampPlus3LineHeight:Sr,typeRampPlus4FontSize:$r,typeRampPlus4LineHeight:Er,typeRampPlus5FontSize:Nr,typeRampPlus5LineHeight:Ar,typeRampPlus6FontSize:Or,typeRampPlus6LineHeight:Tr});const Cw=nw("#08c3a5"),Lw=nw("#eeeeee"),Mw=tr,ww=xi.ltr;var kw=Object.freeze({__proto__:null,accentPaletteValue:Cw,neutralPaletteValue:Lw,baseLayerLuminanceValue:Mw,directionValue:ww,controlCornerRadiusValue:4,designUnitValue:4});
62
62
  /*!
63
63
  * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
64
64
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
@@ -58,7 +58,7 @@ function zz(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var c
58
58
  &#x2715;
59
59
  </button></span>`)}</div>`)}<${e}-button class="criteria-toggle-button" appearance="outline" title=${e=>e.showingChips?"Add more criteria":"View active filters"}?disabled=${e=>0===e.activeGroups.length||e.isInterpreting}@click=${e=>e.toggleCriteriaView()}><${e}-icon name="pen" size="sm"></${e}-icon></${e}-button><${e}-button class="criteria-clear-button" appearance="outline" title="Clear all filters" ?disabled=${e=>0===e.activeGroups.length||e.isInterpreting}@click=${e=>e.clearChips()}><${e}-icon name="trash-alt" size="sm"></${e}-icon></${e}-button>${Ve(e=>e.speechAvailable,K`<${e}-button class="mic-button" appearance="${e=>e.isRecording?"accent":"outline"}" ?disabled=${e=>e.disabled||e.isInterpreting}@click=${e=>e.toggleSpeechInput()}title=${e=>e.isRecording?"Stop recording":"Start voice input"}><${e}-icon class="mic-icon" name="microphone" size="lg" variant="solid"></${e}-icon></${e}-button>`)}</div></div>`)} `)(NC(e))} `,iL={contains:DC.containsIgnoreCase,equals:DC.EQ,startsWith:DC.startsWith,endsWith:DC.endsWith,greaterThan:DC.GT,lessThan:DC.LT,greaterThanOrEqual:DC.GE,lessThanOrEqual:DC.LE,notEqual:DC.NE,dateIsToday:DC.dateIsToday,dateIsAfter:DC.dateIsGreaterEqual,dateIsGreaterEqual:DC.dateIsGreaterEqual,dateIsBefore:DC.dateIsLessEqual,dateIsLessEqual:DC.dateIsLessEqual,dateIsEqual:DC.dateIsEqual,dateTimeIsAfter:DC.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:DC.dateTimeIsGreaterEqual,dateTimeIsBefore:DC.dateTimeIsLessEqual,dateTimeIsLessEqual:DC.dateTimeIsLessEqual};function cL(e){var t,i;const c=null!==(t=iL[e.operator])&&void 0!==t?t:DC.containsIgnoreCase;return(new PC).withField(e.field).withValue(null!==(i=e.value)&&void 0!==i?i:null).withSerialiser(c).withGroup("default").build()}function oL(e,t){return 1===e.length?e[0]:e.reduce((e,i,c)=>0===c?[i]:[...e,t,i],[])}function sL(e){var t;const i=new _C;let c=!1;for(const o of e){if(!(null===(t=o.clauses)||void 0===t?void 0:t.length))continue;const e=o.clauses.map(cL),s="or"===o.logic?TC.Or():TC.And(),a=oL(e,s),n=e.length>1?{join:s}:{};o.negated?i.And([TC.Not(),a]):i.And(1===e.length?e[0]:e,n),c=!0}return c?i.build():""}const aL=["contains","equals","startsWith","endsWith","notEqual"],nL=["equals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","notEqual"],rL=["dateIsToday","dateIsAfter","dateIsBefore","dateIsEqual","dateIsGreaterEqual","dateIsLessEqual"],lL=["dateTimeIsAfter","dateTimeIsBefore","dateTimeIsGreaterEqual","dateTimeIsLessEqual"],dL={contains:"contains",equals:"=",startsWith:"starts with",endsWith:"ends with",notEqual:"≠",greaterThan:">",lessThan:"<",greaterThanOrEqual:"≥",lessThanOrEqual:"≤",dateIsToday:"is today",dateIsAfter:"after",dateIsBefore:"before",dateIsEqual:"=",dateIsGreaterEqual:"≥",dateIsLessEqual:"≤",dateTimeIsAfter:"after",dateTimeIsBefore:"before",dateTimeIsGreaterEqual:"≥",dateTimeIsLessEqual:"≤"},hL=new Set(["DATE","LOCALDATE"]),uL=new Set(["DATETIME","NANO_TIMESTAMP","LOCALDATETIME","TIMESTAMP"]),fL=new Set(["INT","INTEGER","LONG","SHORT","DOUBLE","BIGDECIMAL","DECIMAL"]);function pL(e){return(e||"").toUpperCase().trim().split("(")[0].trim()}function mL(e){const t=pL(e);return hL.has(t)?rL:uL.has(t)?lL:fL.has(t)?nL:aL}function gL(e){return fL.has(pL(e))}function vL(e){return null!=e&&("number"==typeof e?!Number.isNaN(e)&&e>0:"string"==typeof e&&(/^\d{8}$/.test(e)||/^\d{4}-\d{2}-\d{2}$/.test(e)||/^\d{8}-\d{2}:\d{2}(:\d{2})?$/.test(e)))}function bL(e){return null!=e&&("number"==typeof e?!Number.isNaN(e):"string"==typeof e&&!Number.isNaN(Number(e)))}function yL(e,t){const i=[],c=[],o=new Map;if(Array.isArray(t)&&t.length>0){"string"==typeof t[0]?t.forEach(e=>o.set(e,void 0)):t.forEach(e=>o.set(e.NAME,e))}for(const t of e){const{field:e,operator:s,value:a}=t;if(!e||"string"!=typeof e){c.push({field:String(e),message:"Field name is required"});continue}const n=o.get(e),r=n&&"TYPE"in n?n.TYPE:"STRING";mL(r).includes(s)?!rL.includes(s)&&!lL.includes(s)||"dateIsToday"===s||vL(a)?gL(r)&&nL.includes(s)&&!bL(a)?c.push({field:e,operator:s,value:a,message:"Invalid numeric value"}):o.size>0&&!o.has(e)?c.push({field:e,operator:s,value:a,message:`Unknown field '${e}'`}):i.push(t):c.push({field:e,operator:s,value:a,message:"Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch"}):c.push({field:e,operator:s,value:a,message:`Operator '${s}' is not allowed for field type ${r}`})}return{valid:i,invalid:c}}const zL=af("foundation-notifications");let CL=null;const LL=new Map,xL=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.body)&&void 0!==i?i:"Something went wrong"}`},ML=e=>{var t;return(null==e?void 0:e.logLevel)||(null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.logLevel)||ju.debug},wL=e=>{zL.log({message:xL(e),level:ML(e)})},SL=(e,t)=>{let i=document.querySelector(`#${e}`);if(!i)if(LL.has(e))i=LL.get(e);else{const t=zf(document).find(t=>t.id===e);t&&(i=t,LL.set(e,t))}if(!i){i=document.createElement("div"),i.setAttribute("id",e),i.style.zIndex="9999";const{element:t,prefix:c}=Cf(document.body,"rapid");if(t)t.appendChild(i),CL=t;else if(CL)CL.appendChild(i);else{const e=document.createElement(`${c}-design-system-provider`);e.appendChild(i),document.body.appendChild(e),CL=e}}return i},kL=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e};var EL,$L,NL;!function(e){e.NOTIFICATION_EVENT="notification-event"}(EL||(EL={})),function(e){e.Top="top",e.Bottom="bottom"}($L||($L={})),function(e){e.Left="left",e.Right="right"}(NL||(NL={}));const AL="12px";const OL=(e,t,i)=>{var c,o,s,a,n,r,l,d,h,u,f,p,m,g,v,b,y,z,C;wL(e);const L=t.split("-")[0],x=(null===(o=null===(c=null==e?void 0:e.config)||void 0===c?void 0:c.toast)||void 0===o?void 0:o.position)||"top-right",M=null!==(s=null!=i?i:(e=>zf(document.body).find(t=>"notify-container"===t.tagName.toLowerCase()&&t.position===e))(x))&&void 0!==s?s:SL("notify-container");M&&"notify-container"!==M.tagName.toLowerCase()&&function(e,t){var i,c;switch(t.style.position="fixed",null===(c=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.toast)||void 0===c?void 0:c.position){case"top-left":t.style.top="var(--nav-height, 0)",t.style.left="0";break;case"bottom-left":t.style.bottom="0",t.style.left="0";break;case"bottom-right":t.style.bottom="0",t.style.right="0";break;default:t.style.top="var(--nav-height, 0)",t.style.right="0"}}(e,M);const w=document.createElement(`${L}-toast`),S=document.createElement("div");S.setAttribute("slot","top"),S.textContent=e.title;const k=document.createElement("div");k.setAttribute("slot","content"),k.textContent=(null==e?void 0:e.body)||"";const E=document.createElement("div");let $;E.setAttribute("slot","date"),E.textContent=(null===(a=null==e?void 0:e.createdAt)||void 0===a?void 0:a.toLocaleTimeString())||"",(null===(r=null===(n=null==e?void 0:e.config)||void 0===n?void 0:n.toast)||void 0===r?void 0:r.buttons)&&(null===(h=null===(d=null===(l=null==e?void 0:e.config)||void 0===l?void 0:l.toast)||void 0===d?void 0:d.buttons)||void 0===h?void 0:h.length)&&($=document.createElement("div"),$.setAttribute("slot","bottom"),e.config.toast.buttons.forEach(t=>{const i=document.createElement(`${L}-button`);i.textContent=t.placeholder||"example placeholder",i.addEventListener("click",()=>{const{details:c}=e.config.toast;if(t.action)return t.action({details:c,buttonElement:i,toastElement:w})}),t.appearance&&i.setAttribute("appearance",t.appearance),$.appendChild(i)})),w.setAttribute("notify",(null===(f=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.toast)||void 0===f?void 0:f.type)||""),e.iconName&&w.setAttribute("notification-icon",e.iconName),(null===(m=null===(p=null==e?void 0:e.config)||void 0===p?void 0:p.toast)||void 0===m?void 0:m.autoClose)&&w.setAttribute("auto-close",`${null===(v=null===(g=null==e?void 0:e.config)||void 0===g?void 0:g.toast)||void 0===v?void 0:v.autoClose}`),(null===(y=null===(b=null==e?void 0:e.config)||void 0===b?void 0:b.toast)||void 0===y?void 0:y.closeTimeout)&&w.setAttribute("close-timeout",`${null===(C=null===(z=null==e?void 0:e.config)||void 0===z?void 0:z.toast)||void 0===C?void 0:C.closeTimeout}`),w.appendChild(S),w.appendChild(k),w.appendChild(E),$&&w.appendChild($),M.prepend(w)},TL=(e,t,i)=>{if(!e.title)throw new Error("Title is required");if(!e.body)throw new Error("Missing required param 'body'");let c={title:e.title,body:e.body,iconName:e.iconName},o={};e.createdAt&&(c=Object.assign({createdAt:e.createdAt},c)),null!=e.logLevel&&(c=Object.assign({logLevel:e.logLevel},c)),e.toast&&(o=Object.assign({toast:e.toast},o),c=Object.assign({config:o},c)),OL(c,t,i)},RL=Me` :host{position: fixed;z-index: 9999;display: flex;flex-direction: column;gap: 4px;box-sizing: border-box;pointer-events: none;/* Allow clicks to pass through empty space */ width: 415px}.toast-container{padding: 0 8px 12px 12px;position: relative}/* Expanded / List State: Allow scrolling if too many items */ :host(:not([stack-collapsed])){max-height: calc(100% - var(--nav-height));overflow: hidden;pointer-events: auto;/* Enable pointer events for scrolling */ slot{display: block;height: calc(100vh - var(--nav-height) - 54px);position: relative}.toast-container{flex: 1;height: 100%;overflow-y: auto;overflow-x: hidden;scrollbar-color: var(--neutral-layer-3) transparent;&:hover{scrollbar-color: var(--neutral-layer-4) transparent}}}.header{display: flex;gap: 12px;pointer-events: none;margin: 5px 24px;justify-content: space-between;visibility: hidden;align-items: center;box-sizing: border-box;.header-title{text-shadow: 0 0 10px #000}.notification-header-buttons{display: flex;gap: 4px;rapid-icon{color: var(--neutral-foreground-hint);margin-left: 4px;display: inline-flex;font-size: 14px;&.chevron-up.collapse{transform: rotate(180deg);transition: transform 0.3s ease}}}--base-height-multiplier: 8;*[appearance='neutral']{font-size: 11px;cursor: pointer;background: var(--neutral-fill-rest)}}.header.visible{visibility: visible;pointer-events: auto;/* Enable clicks on header buttons */}:host([position$='left']) .header{justify-content: space-between}:host([position^='bottom']) .header{margin-bottom: 0;margin-top: 4px}/* Ensure children (toasts) are clickable */ ::slotted(*){pointer-events: auto}:host([position='top-right']){top: var(--nav-height, 0);right: 0}:host([position='top-left']){top: var(--nav-height, 0);left: 0}:host([position='bottom-right']){bottom: 0;right: 0;flex-direction: column-reverse}:host([position='bottom-left']){bottom: 0;left: 0;flex-direction: column-reverse}/* Stacked / Collapsed State */ :host([stack-collapsed]){height: min-content;/* Host allows pointer events so they can reach the slot */ pointer-events: auto;cursor: pointer}/* Apply the grid layout to the slot itself so it acts as the container and click target */ :host([stack-collapsed]) slot{display: grid;grid-template-columns: auto;grid-template-rows: auto;align-items: end;/* Default to bottom-up stacking */ justify-items: center;/* The slot catches the click */ pointer-events: auto}/* Rotate when the collapse class is present */ :host([stack-collapsed][position^='top']) slot{align-items: start}:host([stack-collapsed][position$='right']) slot{justify-items: end}:host([stack-collapsed][position$='left']) slot{justify-items: start}:host([stack-collapsed]) ::slotted(*){grid-area: 1 / 1;transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;opacity: 0%;pointer-events: none !important;/* Disable interaction with toasts in collapsed state */ transform: scale(0.9);top: 0 !important}/* Show and offset the top 3 items in the stack */ :host([stack-collapsed]) ::slotted([data-stack-index='0']){opacity: 100%;pointer-events: auto;transform: translateY(0) scale(1);z-index: 3;position: relative !important}:host([stack-collapsed]) ::slotted([data-stack-index='1']){opacity: 100%;transform: translateY(var(--stack-offset-y, 8px)) scale(0.95);z-index: 2;position: relative !important}:host([stack-collapsed]) ::slotted([data-stack-index='2']){opacity: 100%;transform: translateY(var(--stack-offset-y-2, 16px)) scale(0.9);z-index: 1;position: relative !important}/* Adjust offset direction based on position */ :host([stack-collapsed][position^='top']){--stack-offset-y: 8px;--stack-offset-y-2: 16px}:host([stack-collapsed][position^='bottom']){--stack-offset-y: -8px;--stack-offset-y-2: -16px}`,IL=K` ${Ve(e=>e.allowCloseAll||e.allowManualCollapse,K` ${e=>(e=>K`<div class="header ${e=>ti(["visible",e.slottedNodes.length>1])}">${Ve(e=>e.showCount,K`<span class="header-title">${e=>e.slottedNodes.length}Notifications</span>`)}<div class="notification-header-buttons">${Ve(e=>e.allowManualCollapse,K`<${e}-button @click=${e=>e.handleToggleCollapse()}>${e=>e.stackCollapsed?"Expand":"Collapse"}<${e}-icon class="chevron-up ${e=>ti(["collapse",e.stackCollapsed])}" name="chevron-up"></${e}-icon></${e}-button>`)} ${Ve(e=>e.allowCloseAll,K`<${e}-button @click=${e=>e.handleCloseAll()}>
60
60
  Close All <${e}-icon name="xmark"></${e}-icon></${e}-button>`)}</div></div>`)(e.designSystemPrefix)} `)}<div class="toast-container"><slot ${Qe("slottedNodes")}@click="${e=>e.handleContainerClick()}"></slot></div>`;let DL=class extends ze{constructor(){super(...arguments),this.position="top-right",this.stackThreshold=5,this.allowManualCollapse=!0,this.allowCloseAll=!0,this.designSystemPrefix="rapid",this.showCount=!0,this.stackCollapsed=!1,this.notificationInterval=0,this.manuallyExpanded=!1,this.pendingQueue=[],this.queueTimer=null,this.queuedNodes=new Set,this.mutationObserver=null,this.knownNodes=new Set,this.peekingNode=null,this.peekTimer=null,this.routeSubscriber={handleChange:()=>this.checkRoute(vp.shared.pathName)},this.slottedNodes=[]}connectedCallback(){super.connectedCallback(),"bottom-left"!==this.position&&"bottom-right"!==this.position||zL.error("NotifyContainer doesn't currently support bottom corner placements"),v.getNotifier(vp.shared).subscribe(this.routeSubscriber,"pathName"),this.checkRoute(vp.shared.pathName),this.mutationObserver=new MutationObserver(e=>this.handleMutation(e)),this.mutationObserver.observe(this,{childList:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),v.getNotifier(vp.shared).unsubscribe(this.routeSubscriber,"pathName"),null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=null}checkRoute(e){(e.includes("/login")||e.includes("/logout"))&&(this.pendingQueue=[],this.queuedNodes.clear(),clearTimeout(this.queueTimer),this.queueTimer=null,this.handleCloseAll())}slottedNodesChanged(){if(!this.manuallyExpanded&&!this.stackCollapsed&&this.slottedNodes.length>this.stackThreshold&&(this.stackCollapsed=!0),this.stackCollapsed&&this.slottedNodes.length<=1&&(this.stackCollapsed=!1,this.manuallyExpanded=!1,this.cancelPeek()),this.stackCollapsed){const e=this.slottedNodes.filter(e=>e instanceof HTMLElement&&!this.knownNodes.has(e)).shift();e&&this.maybePeek(e)}this.knownNodes=new Set(this.slottedNodes),this.applySort()}handleContainerClick(){this.stackCollapsed&&(this.stackCollapsed=!1,this.manuallyExpanded=!0,this.cancelPeek())}handleToggleCollapse(){this.stackCollapsed=!this.stackCollapsed,this.manuallyExpanded=!this.stackCollapsed,this.stackCollapsed||this.cancelPeek()}handleCloseAll(){for(this.cancelPeek();this.firstChild;)this.removeChild(this.firstChild);this.stackCollapsed=!1,this.manuallyExpanded=!1}notificationIntervalChanged(e,t){!t&&this.pendingQueue&&this.flushQueue()}handleMutation(e){this.notificationInterval&&(e.forEach(e=>{e.addedNodes.forEach(e=>{e instanceof HTMLElement&&(this.queuedNodes.has(e)?this.queuedNodes.delete(e):(this.removeChild(e),this.pendingQueue.push(e)))})}),this.queueTimer||this.processQueue())}processQueue(){if(!this.pendingQueue.length)return void(this.queueTimer=null);const e=this.pendingQueue.shift();this.queuedNodes.add(e),this.prepend(e),this.queueTimer=setTimeout(()=>{this.queueTimer=null,this.processQueue()},this.notificationInterval)}flushQueue(){for(clearTimeout(this.queueTimer),this.queueTimer=null;this.pendingQueue.length;){const e=this.pendingQueue.shift();this.queuedNodes.add(e),this.prepend(e)}}sortFnChanged(){this.applySort()}applySort(){const e=this.slottedNodes.filter(e=>e instanceof HTMLElement);if(!e.length)return;const t=this.sortFn&&e.length>1?[...e].sort(this.sortFn):e;this.peekingNode&&t.includes(this.peekingNode)?this.handlePosition([this.peekingNode,...t.filter(e=>e!==this.peekingNode)]):this.handlePosition(t)}maybePeek(e){const t=this.slottedNodes.filter(e=>e instanceof HTMLElement);if(0===(this.sortFn&&t.length>1?[...t].sort(this.sortFn):t).indexOf(e))return;this.cancelPeek(),this.peekingNode=e;const i=this.notificationInterval?this.notificationInterval/2:1500;this.peekTimer=setTimeout(()=>{this.peekingNode=null,this.peekTimer=null,this.applySort()},i)}cancelPeek(){clearTimeout(this.peekTimer),this.peekTimer=null,this.peekingNode=null}handlePosition(e){if(!e.length)return;e.forEach((t,i)=>{t.style.position="absolute",t.style.transition="all 0.3s ease-in",t.style.right="0px",t.style.zIndex=(e.length-i).toString(),t.dataset.stackIndex=i.toString()});const t=e.map(e=>e.offsetHeight);e.reduce((e,i,c)=>(i.style.top=`${e}px`,e+t[c]),0)}};Ou([de],DL.prototype,"position",void 0),Ou([de({attribute:"stack-threshold"})],DL.prototype,"stackThreshold",void 0),Ou([de({attribute:"allow-manual-collapse",mode:"boolean"})],DL.prototype,"allowManualCollapse",void 0),Ou([de({attribute:"allow-close-all",mode:"boolean"})],DL.prototype,"allowCloseAll",void 0),Ou([de({attribute:"design-system-prefix"})],DL.prototype,"designSystemPrefix",void 0),Ou([de({attribute:"show-count",mode:"boolean"})],DL.prototype,"showCount",void 0),Ou([de({attribute:"stack-collapsed",mode:"boolean"})],DL.prototype,"stackCollapsed",void 0),Ou([de({attribute:"notification-interval"})],DL.prototype,"notificationInterval",void 0),Ou([b],DL.prototype,"sortFn",void 0),Ou([b],DL.prototype,"slottedNodes",void 0),DL=Ou([Ce({name:"notify-container",template:IL,styles:RL})],DL);const FL={alert:e=>{wL(e),alert(xL(e))},toast:OL,dialog:(e,t,i)=>{wL(e);const c=t.split("-")[0],o=document.createElement(`${c}-dialog`),s=i?(e=>{let t=e.querySelector("#dialog-container");return t||(t=document.createElement("div"),t.setAttribute("id","dialog-container"),t.style.position="relative",e.appendChild(t)),t})(i):SL("dialog-container");s.appendChild(o),o.notification=e,o.show()},snackbar:(e,t)=>{var i,c,o,s,a,n;wL(e);const r=t.split("-")[0],l=document.createElement(`${r}-snackbar`),d=null!==(o=null===(c=null===(i=e.config)||void 0===i?void 0:i.snackbar)||void 0===c?void 0:c.verticalEdge)&&void 0!==o?o:$L.Bottom,h=null!==(n=null===(a=null===(s=e.config)||void 0===s?void 0:s.snackbar)||void 0===a?void 0:a.horizontalEdge)&&void 0!==n?n:NL.Left,u=SL(`snack-container-${d}-${h}`);u&&((e,t,i)=>{e.style.position="fixed",e.style.top=t===$L.Top?AL:"",e.style.bottom=t===$L.Bottom?AL:"",e.style.left=i===NL.Left?AL:"",e.style.right=i===NL.Right?AL:""})(u,d,h),u.appendChild(l),l.notification=e},banner:(e,t,i)=>{var c;wL(e);const o=t.split("-")[0],s=document.createElement(`${o}-banner`),a=(e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const c=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(c)return c.style.position="relative",c;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return kL()})(i);(null===(c=null==a?void 0:a.children)||void 0===c?void 0:c.length)>0&&(s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%"),a.appendChild(s),s.notification=e}},HL=(e,t,i)=>{Object.keys((null==e?void 0:e.config)||{}).forEach(c=>{FL[c]&&FL[c](e,t,i)})};function _L(e,t,i){(null==t?void 0:t.trim())&&HL({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:"error"}}},i)}class PL extends Wt{constructor(){super(...arguments),this.placeholder="Describe your search criteria in natural language...",this.inputValue="",this.isInterpreting=!1,this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.fieldMetadata=[],this.isRecording=!1,this.stopRecording=null,this.speechApplyDebounceTimer=null}get speechAvailable(){return KC()}get criteriaChips(){return this.activeGroups.flatMap((e,t)=>e.clauses.map((e,i)=>{var c,o;return{groupIndex:t,clauseIndex:i,fieldLabel:this.getFieldLabel(e.field),operatorLabel:null!==(c=dL[e.operator])&&void 0!==c?c:e.operator,valueLabel:"dateIsToday"===e.operator?"":String(null!==(o=e.value)&&void 0!==o?o:"")}}))}getFieldLabel(e){var t,i;if(!Array.isArray(this.fieldMetadata)||0===this.fieldMetadata.length)return e;if("string"==typeof this.fieldMetadata[0])return e;const c=this.fieldMetadata.find(t=>t.NAME===e);return null!==(i=null!==(t=null==c?void 0:c.UI_LABEL)&&void 0!==t?t:null==c?void 0:c.NAME)&&void 0!==i?i:e}toggleCriteriaView(){this.showingChips?(this.inputValue="",this.showingChips=!1):this.showingChips=!0}removeChip(e,t){var i;const c=this.activeGroups.map(e=>Object.assign(Object.assign({},e),{clauses:[...e.clauses]}));null===(i=c[e])||void 0===i||i.clauses.splice(t,1);const o=c.filter(e=>e.clauses.length>0);if(this.activeGroups=o,0===o.length)this.showingChips=!1,this.lastValidCriteria=null,this.$emit("criteria-changed",null);else{const e=sL(o);this.lastValidCriteria=e,this.$emit("criteria-changed",e)}}clearChips(){this.activeGroups=[],this.showingChips=!1,this.lastValidCriteria=null,this.$emit("criteria-changed",null)}handleSubmit(){return Ru(this,void 0,void 0,function*(){var e,t,i;const c=null===(e=this.inputValue)||void 0===e?void 0:e.trim();if(!c||this.isInterpreting)return;const o=null===(t=this.providerRegistry)||void 0===t?void 0:t.default();if(null==o?void 0:o.interpretCriteria){this.isInterpreting=!0;try{const e=Array.isArray(this.fieldMetadata)?this.fieldMetadata:[],t=yield o.interpretCriteria(c,{fields:e});if(!(null===(i=null==t?void 0:t.groups)||void 0===i?void 0:i.some(e=>{var t;return null===(t=e.clauses)||void 0===t?void 0:t.length})))return _L("AI criteria search","AI could not interpret the criteria",NC(this)),void(this.isInterpreting=!1);const{valid:a,invalid:n}=function(e,t){var i;const c=[],o=[];for(const s of e){if(!(null==s?void 0:s.clauses)||!Array.isArray(s.clauses)){o.push({field:"",message:"Group must have a clauses array"});continue}const{valid:e,invalid:a}=yL(s.clauses,t);o.push(...a),e.length>0&&c.push({logic:null!==(i=s.logic)&&void 0!==i?i:"and",negated:s.negated,clauses:e})}return{valid:c,invalid:o}}(t.groups,this.fieldMetadata);if(n.length>0&&(_L("Criteria validation error",0===(s=n).length?"":1===s.length?s[0].message:s.map(e=>e.message).join("; "),NC(this)),this.$emit("validation-errors",n)),a.length>0){const e=[...this.activeGroups,...a],t=sL(e);this.lastValidCriteria=t,this.activeGroups=e,this.inputValue="",this.showingChips=!0,this.$emit("criteria-changed",t)}}catch(e){_L("AI criteria search",e instanceof Error?e.message:"Interpretation failed",NC(this))}finally{this.isInterpreting=!1}var s}else _L("AI criteria search","AI provider not configured",NC(this))})}handleBlur(){var e;if(this.isRecording)return;(null===(e=this.inputValue)||void 0===e?void 0:e.trim())?this.handleSubmit():this.activeGroups.length>0&&(this.showingChips=!0)}clear(){this.inputValue="",this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.$emit("criteria-changed",null)}toggleSpeechInput(){if(this.isRecording&&this.stopRecording)return this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,void(this.isRecording=!1);this.inputValue="",this.showingChips=!1,this.stopRecording=function(e,t){if(!KC())return null;const i=new(window.SpeechRecognition||window.webkitSpeechRecognition);i.continuous=!0,i.interimResults=!0,i.lang="en-US";let c="";return i.onresult=t=>{let i="",o="";for(let e=t.resultIndex;e<t.results.length;e+=1){const c=t.results[e][0].transcript;t.results[e].isFinal?o+=c:i+=c}o?(c+=o,e(c,!0)):i&&e(c+i,!1)},i.onerror=e=>{"aborted"!==e.error&&(null==t||t(e.error||"Speech recognition error"))},i.start(),()=>{try{i.stop()}catch(e){}}}((e,t)=>{this.inputValue=e,t&&(null==e?void 0:e.trim())&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}}Ou([JC],PL.prototype,"providerRegistry",void 0),Ou([de],PL.prototype,"placeholder",void 0),Ou([de({mode:"boolean"})],PL.prototype,"disabled",void 0),Ou([b],PL.prototype,"inputValue",void 0),Ou([b],PL.prototype,"isInterpreting",void 0),Ou([b],PL.prototype,"lastValidCriteria",void 0),Ou([b],PL.prototype,"activeGroups",void 0),Ou([b],PL.prototype,"showingChips",void 0),Ou([b],PL.prototype,"fieldMetadata",void 0),Ou([b],PL.prototype,"isRecording",void 0),Ou([y],PL.prototype,"speechAvailable",null),Ou([y],PL.prototype,"criteriaChips",null);const VL=void 0,BL={};PL.compose(Object.assign({baseName:"ai-criteria-search",template:tL,styles:eL,shadowOptions:VL},BL));const UL=(e,t)=>Me` :host{display: flex;justify-content: center;align-items: center;width: 100%;margin: calc(var(--design-unit) * 2px) 0;position: relative;/* Same as connection indicator */ --green: 50 164 49;--trafic-light-green: rgb(var(--green));--red: 187 30 16;--trafic-light-red: rgb(var(--red));--amber: 230 160 20;--trafic-light-amber: rgb(var(--amber))}.ai-indicator-container{display: flex;flex-direction: column;align-items: center;position: relative}.ai-indicator-badge{display: inline-flex;align-items: center;gap: calc(var(--design-unit) * 1.4px);font-size: 12px;line-height: 1;font-weight: 600;text-transform: uppercase;height: calc(var(--design-unit) * 6px);padding: calc(var(--design-unit) * 0.5px) calc(var(--design-unit) * 2px);border-radius: calc(var(--design-unit) * 1px);cursor: pointer;color: #fff}.ai-indicator-badge:hover{opacity: 90%}.ai-indicator-badge.green{background: var(--trafic-light-green)}.ai-indicator-badge.amber{background: var(--trafic-light-amber)}.ai-indicator-badge.red{background: var(--trafic-light-red)}.ai-indicator-badge .ai-indicator-icon{flex-shrink: 0;color: inherit}.ai-indicator-badge.pulsing{animation: ai-indicator-pulse 1.5s ease-in-out infinite}@keyframes ai-indicator-pulse{0%, 100%{opacity: 100%}50%{opacity: 50%}}.ai-indicator-dropdown{position: absolute;top: 100%;right: 0;margin-top: calc(var(--design-unit) * 2px);min-width: 200px;padding: calc(var(--design-unit) * 4px);background: var(--neutral-layer-floating, #fff);border: 1px solid var(--neutral-stroke-rest, #e0e0e0);border-radius: calc(var(--design-unit) * 2px);box-shadow: 0 calc(var(--design-unit) * 1px) calc(var(--design-unit) * 4px) rgb(0 0 0 / 12%);z-index: 1000}.ai-indicator-info{display: flex;flex-direction: column;gap: 0;margin: 0;padding: 0}.ai-indicator-info .info-row{display: grid;grid-template-columns: 72px 1fr;gap: calc(var(--design-unit) * 4px);align-items: baseline;padding: calc(var(--design-unit) * 1.5px) 0;border-bottom: 1px solid var(--neutral-stroke-subtle, #eee)}.ai-indicator-info .info-row:last-child{border-bottom: none}.ai-indicator-info .info-label{margin: 0;font-size: var(--type-ramp-base-font-size);font-weight: 500;color: var(--neutral-foreground-hint, #666)}.ai-indicator-info .info-value{margin: 0;font-size: var(--type-ramp-base-font-size);color: var(--neutral-foreground-rest, #333);text-transform: capitalize;word-break: break-word}.install-button{margin-top: calc(var(--design-unit) * 3px);width: 100%}`,jL=K` ${e=>(e=>K` ${Ve(()=>YC(),K`<div class="ai-indicator-container" part="ai-indicator-container"><div class=${e=>ti("ai-indicator-badge",["green","available"===e.state||"server"===e.state],["amber","downloading"===e.state||"downloadable"===e.state],["red","unavailable"===e.state||"none"===e.state],["pulsing","downloading"===e.state||e.isInstalling])}data-test-id="ai-indicator-badge" part="ai-indicator-badge" role="button" tabindex="0" aria-label="AI status" aria-haspopup="true" aria-expanded="${e=>e.open}" @click=${e=>e.toggleDropdown()}@keydown=${(e,t)=>{const i=t.event;"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),e.toggleDropdown())}}><${e}-icon class="ai-indicator-icon" name="wand-magic-sparkles" size="xs" variant="solid" part="ai-indicator-icon"></${e}-icon><span class="ai-indicator-text" data-test-id="ai-indicator-text" part="ai-indicator-text">AI</span></div>${Ve(e=>e.open,K`<div class="ai-indicator-dropdown" part="ai-indicator-dropdown"><dl class="ai-indicator-info"><div class="info-row"><dt class="info-label">Provider</dt><dd class="info-value">${e=>{var t,i;return null!==(i=null===(t=e.status)||void 0===t?void 0:t.provider)&&void 0!==i?i:"none"}}</dd></div><div class="info-row"><dt class="info-label">Model</dt><dd class="info-value">${e=>{var t;return(null===(t=e.status)||void 0===t?void 0:t.model)||"—"}}</dd></div>${Ve(e=>e.chromeStatusLabel,K`<div class="info-row"><dt class="info-label">Status</dt><dd class="info-value">${e=>e.chromeStatusLabel}</dd></div>`)}</dl>${Ve(e=>e.canInstall,K`<${e}-button class="install-button" appearance="accent" @click=${(e,t)=>{t.event.preventDefault(),e.onInstall()}}>
61
- Install model </${e}-button>`)}</div>`)}</div>`)} `)(NC(e))} `;class qL extends Wt{constructor(){super(...arguments),this.status=null,this.open=!1,this.state="none",this.isInstalling=!1,this.pollTimer=null,this.clickOutside=e=>this.handleClickOutside(e)}get aiProvider(){var e;return null===(e=this.providerRegistry)||void 0===e?void 0:e.default()}get chromeStatusLabel(){var e,t;if("chrome"!==(null===(e=this.status)||void 0===e?void 0:e.provider))return null;const i=null===(t=this.status)||void 0===t?void 0:t.chromeAvailability;return"available"===i?"Installed":"downloading"===i||this.isInstalling?"Downloading…":"downloadable"===i?"Downloadable":"unavailable"===i?"Unavailable":null}get canInstall(){var e,t,i;return!!(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)&&"chrome"===(null===(t=this.status)||void 0===t?void 0:t.provider)&&"downloadable"===(null===(i=this.status)||void 0===i?void 0:i.chromeAvailability)&&!this.isInstalling}get isDownloading(){var e;return"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Ru(this,void 0,void 0,function*(){e.connectedCallback.call(this),yield this.refreshStatus(),this.maybeStartPolling()})}disconnectedCallback(){this.stopPolling(),document.removeEventListener("mousedown",this.clickOutside)}openChanged(){this.open?(document.addEventListener("mousedown",this.clickOutside),this.refreshStatus()):document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){EC(e,this)&&(this.open=!1)}toggleDropdown(){this.open=!this.open}refreshStatus(){return Ru(this,void 0,void 0,function*(){var e;if(!(null===(e=this.aiProvider)||void 0===e?void 0:e.getStatus))return this.status=null,void(this.state="none");try{const e=yield this.aiProvider.getStatus();this.status=e,this.state=this.deriveState(e),"available"===this.state&&(this.isInstalling=!1)}catch(e){this.status=null,this.state="none",this.isInstalling=!1}})}deriveState(e){if(!e||"none"===e.provider)return"none";if("chrome"===e.provider){const t=e.chromeAvailability;return"available"===t?"available":"downloading"===t?"downloading":"downloadable"===t?"downloadable":"unavailable"}return"server"}maybeStartPolling(){var e;"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling?this.startPolling():this.stopPolling()}startPolling(){this.pollTimer||(this.pollTimer=setInterval(()=>{this.refreshStatus().then(()=>{this.maybeStartPolling()})},2500))}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}onInstall(){return Ru(this,void 0,void 0,function*(){var e;if(this.canInstall&&(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)){this.isInstalling=!0;try{yield this.aiProvider.triggerDownload(),this.startPolling()}catch(e){this.isInstalling=!1}finally{yield this.refreshStatus()}}})}}Ou([JC],qL.prototype,"providerRegistry",void 0),Ou([b],qL.prototype,"status",void 0),Ou([b],qL.prototype,"open",void 0),Ou([b],qL.prototype,"state",void 0),Ou([b],qL.prototype,"isInstalling",void 0),Ou([y],qL.prototype,"chromeStatusLabel",null),Ou([y],qL.prototype,"canInstall",null),Ou([y],qL.prototype,"isDownloading",null),qL.compose({baseName:"ai-indicator",template:jL,styles:UL});const GL=(e,t)=>Oi(0,t),WL=(e,t)=>Me` ${Zd()}`;class YL extends Qd{}const KL={delegatesFocus:!0,mode:"open"},ZL={};YL.compose(Object.assign({baseName:"anchor",template:GL,styles:WL,shadowOptions:KL},ZL));const QL=(e,t)=>Di(),XL=(e,t)=>Me` ${Xd()}`;class JL extends Hi{}const ex={delegatesFocus:!0,mode:"open"},tx={};JL.compose(Object.assign({baseName:"anchored-region",template:QL,styles:XL,shadowOptions:ex},tx));const ix=(e,t)=>Gi(0,t),cx=K` ${Ve(e=>e.imgSrc,K`<img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />`)} `,ox=(e,t)=>Me` ${Jd(e)}`;class sx extends eh{}const ax={delegatesFocus:!0,mode:"open"},nx={media:cx};sx.compose(Object.assign({baseName:"avatar",template:ix,styles:ox,shadowOptions:ax},nx));const rx=(e,t)=>Yi(),lx=(e,t)=>Me` ${ih()}`;class dx extends Ki{}const hx=void 0,ux={};dx.compose(Object.assign({baseName:"badge",template:rx,styles:lx,shadowOptions:hx},ux));const fx=Me` @keyframes delete-animate{from{height: 100px;opacity: 100%}to{height: 0;opacity: 0%}}@keyframes append-animate{from{height: 0;opacity: 0%}to{height: var(--banner-height);opacity: 100%}}:host{--banner-width: 100%;--banner-height: 65px;--flow: row}@media screen and (max-width: 640px){:host{--flow: column;--banner-height: 100px}}.banner{animation: append-animate 0.3s linear;width: var(--banner-width);height: var(--banner-height);background-color: var(--fill-color);display: flex;flex-direction: var(--flow);padding: 5px 8px;box-sizing: border-box;overflow: hidden}.banner-delete{animation: delete-animate 0.3s linear;opacity: 0%}.content{display: flex;align-items: center;flex: 2;font-size: 12px;overflow: hidden;white-space: pre-line}.action{display: flex;flex-direction: row-reverse;align-items: center;gap: 10px;flex: 1;overflow: hidden}`,px=K` ${e=>(e=>K`<div role="alert" aria-live="polite" class="banner ${e=>e.dismissAnimation}" ${Fe("banner")}><div part="content" class="content"><slot name="content">${Ve(e=>e.notification,K`<div><div>${e=>{var t;return(null===(t=e.notification)||void 0===t?void 0:t.body)||"Place holder for notification message"}}</div></div>`)}</slot></div><div part="action" class="action"><slot name="action" class="action">${Ve(e=>e.notification,K`<${e}-button slot="action" appearance="lightweight" @click=${e=>e.dismiss()}>${e=>{var t,i,c,o;return(null===(o=null===(c=null===(i=null===(t=e.notification)||void 0===t?void 0:t.config)||void 0===i?void 0:i.banner)||void 0===c?void 0:c.dismissingAction)||void 0===o?void 0:o.label)||"Ignore"}}</${e}-button>`)} ${We(e=>{var t,i;return null===(i=null===(t=e.notification)||void 0===t?void 0:t.config)||void 0===i?void 0:i.banner.confirmingActions},K`<${e}-button slot="action" appearance="lightweight" @click=${(e,t)=>{var i;null==e||e.action(),null===(i=t.parent)||void 0===i||i.dismissNotification()}}>${e=>e.label}</${e}-button>`)}</slot></div></div>`)(NC(e))} `,mx={mode:"open",delegatesFocus:!0};class gx extends Wt{constructor(){super(...arguments),this.dismissAnimation=""}connectedCallback(){super.connectedCallback()}dismiss(){return this.dismissAnimation="banner-delete",new Promise(e=>{this.banner.onanimationend=()=>{this.remove(),e()}})}dismissNotification(){return Ru(this,void 0,void 0,function*(){try{yield this.dismiss(),this.remove()}catch(e){SC.error(e)}})}}Ou([b],gx.prototype,"dismissAnimation",void 0),Ou([b],gx.prototype,"notification",void 0),gx.compose({baseName:"banner",styles:fx,template:px,shadowOptions:mx});const vx=(e,t)=>Xi(),bx=(e,t)=>Me` ${oh()}`;class yx extends Ji{}yx.compose(Object.assign({baseName:"breadcrumb",template:vx,styles:bx,shadowOptions:void 0},{}));const zx=(e,t)=>Zi(0,t),Cx=(e,t)=>Me` ${ch()}`;class Lx extends Qi{}const xx=void 0,Mx={separator:"/"};Lx.compose(Object.assign({baseName:"breadcrumb-item",template:zx,styles:Cx,shadowOptions:xx},Mx));const wx=(e,t)=>ec(0,t),Sx=(e,t)=>Me` ${sh()}`;class kx extends ah{}const Ex={delegatesFocus:!0,mode:"open"},$x={};kx.compose(Object.assign({baseName:"button",template:wx,styles:Sx,shadowOptions:Ex},$x));const Nx=()=>Me` ${nh}`,Ax=(e,t)=>Tc(e,t);class Ox extends uc{}const Tx={delegatesFocus:!0,mode:"open"},Rx={};Ox.compose(Object.assign({baseName:"calendar",template:Ax,styles:Nx,shadowOptions:Tx},Rx));const Ix=(e,t)=>Rc(),Dx=(e,t)=>Me` ${rh()} :host{background-color: var(--fui-card-fill-color);color: var(--fui-card-foreground-color)}`;class Fx extends lh{}const Hx=void 0,_x={};var Px,Vx,Bx;Fx.compose(Object.assign({baseName:"card",template:Ix,styles:Dx,shadowOptions:Hx},_x)),function(e){e.BELOW="below",e.ABOVE="above"}(Px||(Px={}));var Ux=function(){if(Bx)return Vx;Bx=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,c=/^0o[0-7]+$/i,o=parseInt,s="object"==typeof op&&op&&op.Object===Object&&op,a="object"==typeof self&&self&&self.Object===Object&&self,n=s||a||Function("return this")(),r=Object.prototype.toString,l=Math.max,d=Math.min,h=function(){return n.Date.now()};function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function f(s){if("number"==typeof s)return s;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==r.call(e)}(s))return NaN;if(u(s)){var a="function"==typeof s.valueOf?s.valueOf():s;s=u(a)?a+"":a}if("string"!=typeof s)return 0===s?s:+s;s=s.replace(e,"");var n=i.test(s);return n||c.test(s)?o(s.slice(2),n?2:8):t.test(s)?NaN:+s}return Vx=function(e,t,i){var c,o,s,a,n,r,p=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var i=c,s=o;return c=o=void 0,p=t,a=e.apply(s,i)}function y(e){var i=e-r;return void 0===r||i>=t||i<0||g&&e-p>=s}function z(){var e=h();if(y(e))return C(e);n=setTimeout(z,function(e){var i=t-(e-r);return g?d(i,s-(e-p)):i}(e))}function C(e){return n=void 0,v&&c?b(e):(c=o=void 0,a)}function L(){var e=h(),i=y(e);if(c=arguments,o=this,r=e,i){if(void 0===n)return function(e){return p=e,n=setTimeout(z,t),m?b(e):a}(r);if(g)return n=setTimeout(z,t),b(r)}return void 0===n&&(n=setTimeout(z,t)),a}return t=f(t)||0,u(i)&&(m=!!i.leading,s=(g="maxWait"in i)?l(f(i.maxWait)||0,t):s,v="trailing"in i?!!i.trailing:v),L.cancel=function(){void 0!==n&&clearTimeout(n),p=0,c=r=o=n=void 0},L.flush=function(){return void 0===n?a:C(h())},L},Vx}(),jx=sp(Ux);const qx=Me` :host{--scrollbar-width: 12px;--scrollbar-thumb-width: 8px}.root{position: relative;width: inherit;min-width: 250px}.control{cursor: pointer;position: relative;display: flex;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}#display-field{width: 100%;cursor: pointer;color: var(--neutral-foreground-rest);min-height: 40px;padding: 0 calc(var(--design-unit) * 2.25px);border-width: 0;background-color: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px)}#display-field[disabled]{cursor: not-allowed;opacity: 30%}#display-field:focus{outline: 1px solid var(--accent-fill-rest);background: var(--neutral-fill-input-rest);border-style: none;box-shadow: none}#display-field:hover:not(:focus):not([disabled]){outline: 1px solid var(--neutral-stroke-hover)}button{pointer-events: none}.indicator{position: absolute;left: calc(100% - 26px);padding: 0;cursor: pointer}#arrow-icon{width: 16px;fill: white;transform: rotate(0deg);transition: transform 0.2s linear 0s}#arrow-icon.flipped{transform: rotate(180deg)}.disabled-svg{pointer-events: none;opacity: 30%}.position-above{bottom: 100%}::-webkit-scrollbar{width: var(--scrollbar-width)}::-webkit-scrollbar-track{background: var(--neutral-layer-4)}::-webkit-scrollbar-thumb{width: var(--scrollbar-thumb-width);border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-layer-2);border: 3px solid var(--neutral-layer-4)}::-webkit-scrollbar-corner{background: var(--neutral-layer-4)}.multiselect-dropdown{display: flex;flex-direction: column;position: absolute;height: max-content;overflow: hidden;margin-top: calc(var(--design-unit) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;z-index: 999}.multiselect-dropdown:not(.is-resizing){transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s}.checkbox-container{display: flex;flex-direction: column;list-style: none;overflow-y: auto;height: 100%}.is-resizing .checkbox-container{overflow-y: hidden}.checkbox-container zero-checkbox{min-width: fit-content}.checkbox-container zero-checkbox[disabled], .checkbox-container foundation-checkbox[disabled]{cursor: not-allowed}.visible{visibility: visible;max-height: var(--custom-max-height, ${230..toString()}px);overflow: hidden}::slotted(foundation-checkbox), foundation-checkbox{border-bottom: 1px solid var(--neutral-layer-4);padding: 5px 0 5px 5px;margin: 0}::slotted(foundation-checkbox:hover), foundation-checkbox:hover{background-color: var(--neutral-layer-3);cursor: pointer}::slotted(foundation-checkbox)::part(label), foundation-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}ol, li{margin: 0;padding: 0}.checkbox{width: 100%}.select-all{width: 100%;margin-left: 0;margin-right: 0}.display-value{position: absolute;right: 40px;color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-family: var(--body-font)}.options-header-item-hidden{display: none}.resize-button{position: absolute;bottom: 0;right: 0;width: 12px;height: 12px;cursor: nw-resize;background: linear-gradient( -45deg, transparent 30%, var(--neutral-foreground-rest) 30%, var(--neutral-foreground-rest) 40%, transparent 40%, transparent 60%, var(--neutral-foreground-rest) 60%, var(--neutral-foreground-rest) 70%, transparent 70% );z-index: 1000;opacity: 60%;transition: opacity 0.2s ease}.resize-button:hover{opacity: 100%}.multiselect-dropdown.resizable{resize: none;overflow: hidden}`;var Gx;let Wx=Gx=class extends kC{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=Gx.defaultPageSize,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria="",this.listboxElement=null,this.loadingMoreRows=!1,this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.selectOpenChangeHandler=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.open)&&(this.listboxElement||this.attachListboxScrollListener(),this.topUpVisibleListbox())},this.listboxScrollHandler=()=>{const e=this.listboxElement;e&&this.isNearListboxBottom(e)&&this.loadNextPage()},this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{var t;const i=e.target.value,c=null===(t=this.options)||void 0===t?void 0:t.find(e=>String(e.label)===i);!c&&this.allowCustomOptions&&this.select instanceof ph?this.select.$emit("value-change",{label:i,value:i}):this.select.$emit("value-change",c)}}initialSelectedValueChanged(e,t){t!==e&&(t?this.select&&this.getDisplayForValue(t)===String(this.select.value||"")||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData()):this.select&&(this.initalSelectedValueInitialized=!1,this.clearData(),this.resetCombobox()))}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Ru(this,void 0,void 0,function*(){var t,i;if(e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=null!==(i=this.optionElement)&&void 0!==i?i:`${NC(this.select)}-option`,this.select.addEventListener("change",this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.infiniteScroll){if(this.isSnapshot=!0,this.maxRows=this.pageSize>0?this.pageSize:Gx.defaultPageSize,this.select.addEventListener("open-change",this.selectOpenChangeHandler),yield this.applyInfiniteScrollFetchMode(),!this.isConnected)return;p.queueUpdate(()=>this.attachListboxScrollListener())}this.fetchData(),this.valueField||SC.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')})}disconnectedCallback(){var e;super.disconnectedCallback(),this.resizeObserver.disconnect(),null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null,this.select.removeEventListener("open-change",this.selectOpenChangeHandler),this.select.removeEventListener("change",this.selectChangeHandler)}applyInfiniteScrollFetchMode(){return Ru(this,void 0,void 0,function*(){if(this.resourceName&&this.connect.isConnected)try{const e=yield this.resources.getResourceTypeFor(this.resourceName);this.isSnapshot=e!==nb.DATASERVER}catch(e){SC.warn(`Unable to determine the resource type for ${this.resourceName}`,e)}})}attachListboxScrollListener(){var e,t,i,c,o,s,a;this.isConnected&&(null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null!==(o=null!==(i=null===(t=this.select)||void 0===t?void 0:t.scrollableListbox)&&void 0!==i?i:null===(c=this.select)||void 0===c?void 0:c.listbox)&&void 0!==o?o:null===(a=null===(s=this.select)||void 0===s?void 0:s.shadowRoot)||void 0===a?void 0:a.querySelector(".listbox"),this.listboxElement?this.listboxElement.addEventListener("scroll",this.listboxScrollHandler):SC.warn("Unable to locate listbox element, infinite scroll will not be available."))}isNearListboxBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-Gx.scrollLoadThresholdPx}loadNextPage(){return Ru(this,void 0,void 0,function*(){if(this.loadingMoreRows||!this.canRequestMoreRows())return;this.loadingMoreRows=!0;const e=this.datasource.resourceType===nb.REQUEST_SERVER;try{yield this.requestMoreRows()}catch(e){return void(this.loadingMoreRows=!1)}e&&(this.loadingMoreRows=!1)})}topUpVisibleListbox(){this.infiniteScroll&&requestAnimationFrame(()=>{if(!this.isConnected)return;const e=this.listboxElement;e&&0!==e.clientHeight&&this.isNearListboxBottom(e)&&e.scrollHeight!==this.lastTopUpScrollHeight&&(this.lastTopUpScrollHeight=e.scrollHeight,this.loadNextPage())})}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof ph&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return Ru(this,void 0,void 0,function*(){(yield this.datasource.init(this.datasourceOptions(),!0))?function(e,t){const i=new _C;i.withExpression((new PC).withField(e.valueField).withValue(t).withSerialiser(DC.equals).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${i.build()}`:e.criteria=i.build()}(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.rowsSyncedWithStream.clear(),this.options=[],this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.loadingMoreRows=!1,this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof Gx||this.select.removeChild(e)}),this.select.value="",this.select.initialValue="")}checkOverflow(e){const t=e.shadowRoot.querySelector(".content");t&&(t.scrollWidth>t.clientWidth?e.setAttribute("title",e.textContent):e.removeAttribute("title"))}rowToOption(e){var t;return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}}renderListboxOptions(e){e.forEach(({value:e,label:t})=>{const i=document.createElement(this.optionElement);i.textContent=t||e,i.value=e,this.select.appendChild(i),this.resizeObserver.observe(i)})}removeEmptyDataOption(){this.emptyDataOption&&(this.emptyDataOption.remove(),this.emptyDataOption=null)}syncComponentData(e){this.loadingMoreRows=!1;const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.removeEmptyDataOption(),this.options=t.map(e=>this.rowToOption(e));const e=0===this.renderedOptionsCount;if(this.renderListboxOptions(this.options.slice(this.renderedOptionsCount)),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox(),!this.initalSelectedValueInitialized||this.select instanceof ph&&!this.select.async&&e){this.resetCombobox();const e=this.getInitialLabel();p.queueUpdate(()=>{this.select.value=String(e),e&&this.select instanceof ph&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else if(this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof ph&&!this.select.async)&&(this.resetCombobox(),p.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0),this.select&&!this.emptyDataOption){const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(e),this.emptyDataOption=e}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){var t;if(null==e||0!==e&&!e)return"";const i=null===(t=this.options)||void 0===t?void 0:t.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof ph?String(i?i.label:e):i?String(i.label):""}resetCombobox(){this.select&&this.select instanceof ph&&this.select.resetCombobox()}handleStreamInserts(e){var t,i;if(this.loadingMoreRows=!1,!(null==e?void 0:e.length))return;this.removeEmptyDataOption();const c=new Set((null!==(t=this.options)&&void 0!==t?t:[]).map(e=>String(e.value))),o=e.filter(e=>!c.has(String(e[this.valueField])));if(!o.length)return SC.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`),void(this.moreRowsAvailable=!1);const s=o.map(e=>this.rowToOption(e));this.options=[...null!==(i=this.options)&&void 0!==i?i:[],...s],this.renderListboxOptions(s),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox()}handleStreamDeletes(e){SC.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){SC.debug("handleStreamUpdates - Method not implemented.")}};Wx.defaultPageSize=20,Wx.scrollLoadThresholdPx=32,Ou([Zz],Wx.prototype,"resources",void 0),Ou([de({attribute:"label-field"})],Wx.prototype,"labelField",void 0),Ou([de({attribute:"option-element"})],Wx.prototype,"optionElement",void 0),Ou([de({attribute:"value-field"})],Wx.prototype,"valueField",void 0),Ou([de({attribute:"empty-data-label"})],Wx.prototype,"emptyDataLabel",void 0),Ou([de({mode:"boolean",attribute:"allow-custom-options"})],Wx.prototype,"allowCustomOptions",void 0),Ou([de({mode:"boolean",attribute:"infinite-scroll"})],Wx.prototype,"infiniteScroll",void 0),Ou([de({attribute:"page-size",converter:re})],Wx.prototype,"pageSize",void 0),Ou([b],Wx.prototype,"labelFormatter",void 0),Ou([b],Wx.prototype,"labelRowFormatter",void 0),Ou([b],Wx.prototype,"initialSelectedValue",void 0),Wx=Gx=Ou([Ce({name:"options-datasource"})],Wx);let Yx=class extends kC{constructor(){super(...arguments),this.isSnapshot=!0,this.baseCriteria=""}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Ru(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||SC.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")')})}clearData(){this.select.options=[]}syncComponentData(e){var t;const i=(null!=e?e:Array.from(this.rowsSyncedWithStream.values())).map(e=>{var t;return{value:e[this.valueField],label:this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}});(null===(t=this.select)||void 0===t?void 0:t.async)&&(this.select.loading=!1),this.select.options=i}handleStreamInserts(e){SC.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){SC.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){SC.debug("handleStreamUpdates - Method not implemented.")}};Ou([de({attribute:"value-field"})],Yx.prototype,"valueField",void 0),Ou([de({attribute:"label-field"})],Yx.prototype,"labelField",void 0),Yx=Ou([Ce({name:"multiselect-datasource"})],Yx);const Kx=(e="foundation")=>K`<label part="label" for="display-field" class=${e=>{var t;return ti("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}><slot name="label" ${Qe({property:"defaultSlottedNodes",filter:_s})}></slot></label><div class="root" part="root" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control"><input id="display-field" part="filter-search" role="combobox" aria-haspopup="listbox" aria-controls="checkbox-container" aria-expanded=${e=>e.open?"true":"false"}tabindex="${e=>e.tabindex}" ?readonly=${e=>!e.search}@click=${e=>e.toggle()}?disabled="${e=>e.disabled}" ${Fe("filterSearchInput")}value=${Of(e=>e.filterSearchValue,"string","input")}placeholder="${e=>e.getDisplayValue}" autocomplete="off" @input=${(e,t)=>e.inputHandler()}@change=${(e,t)=>e.changeHandler(t.event)}/><div part="indicator" class="indicator" @click=${e=>!e.disabled&&e.toggle()}><svg viewBox="0 0 12 7" ${Fe("arrowIcon")}id="arrow-icon" class="${e=>ti(["disabled-svg",e.disabled])}" xmlns="http://www.w3.org/2000/svg"><path d="${"M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"}" /></svg></div>${Ve(e=>e.filterSearchValue&&e.selectedOptions.length,K`<div class="display-value">${e=>e.getDisplayValue}</div>`)}</div>${Ve(e=>e.loading,K`<${e}-progress slot="indicator"></${e}-progress>`)}<section class=${e=>ti("multiselect-dropdown",["resizable",e.resizable])} ${Fe("multiselectDropdown")}part="multiselect-dropdown">${Ve(e=>e.resizable,K`<div class="resize-button" @mousedown=${(e,t)=>e.handleResizeStart(t.event)}></div>`)} ${Ve(e=>e.all,K`<${e}-button class="select-all" @click=${e=>e.selectCheckboxAll()}?disabled="${(e,t)=>e.isAllOptionsDisabled}">${e=>e.areAllOptionsSelected?"Deselect All":"Select All"} ${e=>e.name}</${e}-button>`)}<ol id="checkbox-container" class="checkbox-container options" aria-multiselectable="true" part="options-ol"><li part="options-header-item" class=${e=>{var t;return ti("options-header-item",["options-header-item-hidden",!(null===(t=e.optionsHeaderSlottedNodes)||void 0===t?void 0:t.length)])}}><slot name="options-header" ${Qe({property:"optionsHeaderSlottedNodes",filter:_s})}></slot></li>${We(e=>e.filteredAvailableOptions,K`<li role="option" value=${(e,t)=>t.parent.getItemLabel(e)}part="option"><${e}-checkbox part="checkbox" class="checkbox" exportparts="label:checkbox-label" @keydown=${(e,t)=>t.parent.checkboxKeyDown(e,t.event)}@click=${(e,t)=>t.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parent.isOptionDisabled(e)}">${(e,t)=>{var i,c;return null===(c=null===(i=t.parent)||void 0===i?void 0:i.itemRenderer)||void 0===c?void 0:c.call(i,e,t.parent)}}</${e}-checkbox></li>`)}</ol>${Ve(e=>e.showCreatable,K`<${e}-button @click=${e=>e.addOption()}>Create&nbsp;"${e=>e.filterSearchValue}"</${e}-button>`)}</section></div><slot ${Qe({property:"slottedDatasource",filter:e=>e instanceof Yx})}></slot>`,Zx=K` ${Kx()} `,Qx=void 0,Xx={};class Jx extends Wt{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.resizable=!1,this.filterByContains=!1,this.filterSearchValue="",this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=Px.BELOW,this.itemRenderer=this.defaultItemRenderer,this.initialisedOptions=!1,this.isResizing=!1,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.handleResizeStart=e=>{this.resizable&&this.multiselectDropdown&&(e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.startX=e.clientX,this.startY=e.clientY,this.startWidth=this.multiselectDropdown.offsetWidth,this.startHeight=this.multiselectDropdown.offsetHeight,this.multiselectDropdown.classList.add("is-resizing"),document.addEventListener("mousemove",this.handleResizeMove),document.addEventListener("mouseup",this.handleResizeEnd))},this.handleResizeMove=e=>{if(!this.isResizing||!this.multiselectDropdown)return;e.preventDefault();const t=e.clientX-this.startX,i=e.clientY-this.startY,c=Math.max(250,this.startWidth+t),o=Math.max(100,this.startHeight+i);this.multiselectDropdown&&(this.multiselectDropdown.style.width=`${c}px`,this.multiselectDropdown.style.maxHeight=`${o}px`)},this.handleResizeEnd=()=>{this.isResizing=!1,document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd),this.multiselectDropdown&&(this.multiselectDropdown.classList.remove("is-resizing"),this.multiselectDropdown.style.setProperty("--custom-max-height",this.multiselectDropdown.style.maxHeight),this.multiselectDropdown.style.removeProperty("max-height"))}}debounceChanged(e,t){this.debouncedInputHandler=jx(this.asyncSetFilter,t)}openChanged(e,t){var i,c,o,s;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.arrowIcon)||void 0===i||i.classList.add("flipped"),null===(c=this.multiselectDropdown)||void 0===c||c.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(o=this.arrowIcon)||void 0===o||o.classList.remove("flipped"),null===(s=this.multiselectDropdown)||void 0===s||s.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===Px.ABOVE&&(null===(e=this.multiselectDropdown)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd)}defaultItemRenderer(e,t){return K` ${"string"==typeof e?K`<span part="option-label">${()=>t.getItemLabel(e)}</span>`:K`<span data-option-label-text=${()=>e.optionLabelText}style=${()=>e.labelStyle}part="option-label">${()=>t.getItemLabel(e)}</span>`} `}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,c=t.top,o=i-t.bottom;e=o<230&&c>o?Px.ABOVE:Px.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===Px.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===Px.BELOW)}optionValueGetter(e){return"string"==typeof e?e:e.value}optionLabelGetter(e){return"string"==typeof e?e:e.label}getItemLabel(e){let t;return e?(t="string"==typeof e?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get areAllOptionsSelected(){const e=this.getEnabledOptionsCount();return e>0&&this.selectedOptions.length===e}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&0===this.findExactMatchOptions().length}isOptionSelected(e){const t=this.optionValueGetter(e);return this.selectedOptions.some(i=>{if("object"==typeof e&&"object"==typeof e.value)try{return JSON.stringify(i)===JSON.stringify(t)}catch(e){return i===t}return i===t})}selectCheckboxOne(e){const t=this.optionValueGetter(e),i=this.selectedOptions.includes(t);this.selectedOptions=i?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}checkboxKeyDown(e,t){return" "===t.key&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){const e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){const e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>{var i,c;const o="string"==typeof t?t:null!==(i=this.optionLabelGetter(t))&&void 0!==i?i:this.optionValueGetter(t);return(null!==(c=null==o?void 0:o.toLowerCase())&&void 0!==c?c:"")===e})}setFilter(){const e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if("string"==typeof t)return t.toLowerCase().includes(e);const i=t.label.toLowerCase(),c="object"==typeof t.value?(o=t.value,Object.values(o).some(t=>t.toLowerCase().includes(e))):String(t.value).toLowerCase().includes(e);var o;return i.includes(e)||c})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?BC(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,SC.warn("Multiselect-datasource is not connected. Please add a datasource to use this functionality."))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){EC(e,this)&&(this.open=!1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Escape":if(this.open){this.open=!1;break}break;case"ArrowUp":case"ArrowDown":if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){const{clearSelectedValues:t=!0,clearFilterText:i=!0}=e;t&&(this.selectedOptions=[],this.$emit("selectionChange",this.selectedOptions)),i&&(this.filterSearchValue="",this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value="")),this.$emit("clear",{clearSelectedValues:t,clearFilterText:i})}}Ou([de],Jx.prototype,"name",void 0),Ou([de({mode:"boolean",attribute:"auto-position"})],Jx.prototype,"autoPosition",void 0),Ou([de({mode:"boolean"})],Jx.prototype,"all",void 0),Ou([de({mode:"boolean"})],Jx.prototype,"allSelected",void 0),Ou([de({mode:"boolean"})],Jx.prototype,"search",void 0),Ou([de({mode:"boolean"})],Jx.prototype,"disabled",void 0),Ou([de({mode:"boolean"})],Jx.prototype,"creatable",void 0),Ou([de({mode:"boolean"})],Jx.prototype,"async",void 0),Ou([de],Jx.prototype,"debounce",void 0),Ou([de({mode:"boolean"})],Jx.prototype,"resizable",void 0),Ou([de],Jx.prototype,"tabindex",void 0),Ou([de({mode:"boolean",attribute:"filter-by-contains"})],Jx.prototype,"filterByContains",void 0),Ou([b],Jx.prototype,"defaultSlottedNodes",void 0),Ou([b],Jx.prototype,"slottedDatasource",void 0),Ou([b],Jx.prototype,"valueFormatter",void 0),Ou([b],Jx.prototype,"loading",void 0),Ou([b],Jx.prototype,"filterSearchValue",void 0),Ou([b],Jx.prototype,"open",void 0),Ou([b],Jx.prototype,"options",void 0),Ou([b],Jx.prototype,"selectedOptions",void 0),Ou([b],Jx.prototype,"filteredAvailableOptions",void 0),Ou([b],Jx.prototype,"scrollContainer",void 0),Ou([de],Jx.prototype,"position",void 0),Ou([b],Jx.prototype,"onAllSelectedCallback",void 0),Ou([b],Jx.prototype,"itemRenderer",void 0),Ou([y],Jx.prototype,"getDisplayValue",null),Ou([y],Jx.prototype,"getPlaceholder",null),Ou([y],Jx.prototype,"isAllOptionsDisabled",null),Ou([y],Jx.prototype,"areAllOptionsSelected",null),Ou([y],Jx.prototype,"showCreatable",null),Ou([b],Jx.prototype,"optionsHeaderSlottedNodes",void 0),Jx.compose(Object.assign({baseName:"multiselect",template:Zx,styles:qx,shadowOptions:Qx},Xx));const eM=Me` .root{position: relative;width: 100%;min-width: 250px}.control-button{display: flex;justify-content: center;min-width: 31px;width: 31px;height: 31px;margin-left: calc(var(--design-unit) * 2px);color: var(--neutral-foreground-hint)}.control{cursor: pointer;position: relative;display: flex;justify-content: end;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}.control:hover .control-button, .control:hover .label{color: var(--neutral-foreground-rest)}button{pointer-events: none}.options{display: flex;flex-direction: column;position: absolute;height: max-content;overflow-y: hidden;margin-top: 5px;padding: calc((var(--design-unit) + 3) * 2px) calc((var(--design-unit) + 3) * 1px);border: 1px solid rgba(46 51 57 / 100%);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s;z-index: 999}.option-content{display: flex;align-items: center;gap: calc(var(--design-unit) * 4px);width: 100%}.icon-container{display: flex;align-items: center;justify-content: center;width: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px + 4px );height: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px );border-radius: calc((var(--control-corner-radius) - 1) * 2px);background: var(--neutral-layer-2);box-sizing: border-box;box-shadow: 0 0 5px 0 rgba(0 0 0 / 35%);flex-shrink: 0}.text-content{display: flex;flex-direction: column;flex: 1}.svg-icon{height: 2em}.position-above{bottom: 100%}.checkbox-container{display: flex;flex-direction: column;overflow-y: scroll;scrollbar-width: thin;scrollbar-color: rgb(46 48 53) rgb(31 33 38)}span{border-bottom: calc(var(--stroke-width) * 1px) solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 2) * 2px) calc((var(--design-unit) + 3) * 1px);font-size: calc((var(--type-ramp-base-font-size) - 1px));color: var(--neutral-foreground-hint)}.multiselect-checkbox{min-width: fit-content;flex-direction: row-reverse;justify-content: space-between;align-items: flex-start;border-bottom: 1px solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) 0;margin: 0}.multiselect-checkbox:hover{background-color: rgb(45 47 51);cursor: pointer}.multiselect-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis}.multiselect-checkbox::part(control){min-width: calc( ( (var(--base-height-multiplier) + var(--density)) * var(--design-unit) / 2 + var(--design-unit) ) * 1px )}.checkbox-container .multiselect-checkbox[disabled]{cursor: not-allowed}.description{text-wrap: wrap;font-size: calc((var(--type-ramp-base-font-size) - 1px));margin: calc((var(--design-unit) + 3) * 1px) 0}#filter-search{padding: 5px}::-webkit-scrollbar{width: 12px}::-webkit-scrollbar-track{background: rgb(31 33 38)}::-webkit-scrollbar-thumb{width: 8px;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: rgb(46 48 53);border: 3px solid rgb(31 33 38)}.visible{visibility: visible;max-height: ${450..toString()}px}`,tM=(e="foundation")=>K`<div class="root" part="root"><div class="control" part="control" @click=${e=>!e.disabled&&e.toggle()}><label part="label" for="control" class=${e=>{var t;return ti("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}><slot ${Qe({property:"defaultSlottedNodes",filter:_s})}></slot></label><${e}-button class="control-button" part="control-button"><slot name="button-content"><${e}-icon name="plus" variant="solid" size="lg"></${e}-icon></slot></${e}-button></div><div ${Fe("optionsElement")}class="options" part="options">${Ve(e=>e.search,K`<${e}-text-field id="filter-search" part="filter-search" value=${Of(e=>e.filterSearchValue,"string","input")}placeholder="${e=>e.getPlaceholder}" @input=${(e,t)=>e.setFilter()}@change=${(e,t)=>e.changeHandler(t.event)}></${e}-text-field>`)}<div class="checkbox-container" part="checkbox-container">${We(e=>e.filteredAvailableOptions,K`<span>${e=>e.type}</span>${We(e=>e.options,K`<${e}-checkbox class="multiselect-checkbox" part="multiselect-checkbox" @click=${(e,t)=>t.parentContext.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parentContext.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parentContext.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parentContext.parent.isOptionDisabled(e)}"><div class="option-content">${Ve(e=>e.icon||e.svg,K`<div class="icon-container">${Ve(e=>e.icon,K`<${e}-icon style="color:${e=>e.iconColor||"#fff"}" name="${e=>e.icon}" size="xl"></${e}-icon>`)} ${Ve(e=>e.svg,K`<img class="svg-icon" src="${e=>e.svg}" alt="${e=>e.label}" />`)}</div>`)}<div class="text-content"><div class="option-label">${(e,t)=>t.parentContext.parent.getItemLabel(e)}</div>${Ve(e=>e.description,K`<p class="description">${e=>e.description}</p>`)}</div></div></${e}-checkbox>`)} `)}</div></div></div>`,iM=K` ${tM()} `,cM=void 0,oM={};class sM extends Wt{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=Px.BELOW}openChanged(e,t){var i,c;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.optionsElement)||void 0===i||i.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(c=this.optionsElement)||void 0===c||c.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===Px.ABOVE&&(null===(e=this.optionsElement)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}sortFilteredOptions(e){const t=(null!=e?e:this.options).reduce((e,t)=>{const i=t.type||"Other";return e[i]?e[i].options.push(t):e[i]={type:i,options:[t]},e},{});return Object.values(t)}optionsChanged(){this.filteredAvailableOptions=this.sortFilteredOptions()}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains("content-wrapper");)t=t.parentElement;if(t){const i=t.getBoundingClientRect(),c=this.getBoundingClientRect(),o=i.top+i.height/2;e=c.top<o?Px.BELOW:Px.ABOVE}else{const t=this.getBoundingClientRect(),i=window.innerHeight,c=t.top,o=i-t.bottom;e=o<t.height&&c>o?Px.ABOVE:Px.BELOW}}e===Px.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===Px.BELOW&&(this.optionsElement.classList.add("position-below"),this.optionsElement.classList.remove("position-above"))}optionGetter(e){return e.value}getItemLabel(e){let t;return e?(t=e.label||e.value||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){const t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}setFilter(){const e=this.options.filter(e=>{var t;const i=e.description,c=null!==(t=e.label)&&void 0!==t?t:e.value;return(null==i?void 0:i.toLowerCase().includes(this.filterSearchValue.toLowerCase()))||c.toLowerCase().includes(this.filterSearchValue.toLowerCase())?e:void 0});this.filteredAvailableOptions=this.sortFilteredOptions(e)}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){EC(e,this)&&(this.open=!1)}}Ou([de],sM.prototype,"name",void 0),Ou([de({mode:"boolean",attribute:"auto-position"})],sM.prototype,"autoPosition",void 0),Ou([de({mode:"boolean"})],sM.prototype,"search",void 0),Ou([de({mode:"boolean"})],sM.prototype,"disabled",void 0),Ou([b],sM.prototype,"defaultSlottedNodes",void 0),Ou([b],sM.prototype,"valueFormatter",void 0),Ou([b],sM.prototype,"filterSearchValue",void 0),Ou([b],sM.prototype,"open",void 0),Ou([b],sM.prototype,"options",void 0),Ou([b],sM.prototype,"selectedOptions",void 0),Ou([b],sM.prototype,"filteredAvailableOptions",void 0),Ou([b],sM.prototype,"position",void 0),Ou([y],sM.prototype,"getPlaceholder",null),sM.compose(Object.assign({baseName:"categorized-multiselect",template:iM,styles:eM,shadowOptions:cM},oM));const aM=(e,t)=>Dc(0,t),nM=(e,t)=>Me` ${dh()}`;class rM extends _c{}const lM=void 0,dM={checkedIndicator:'\n <svg\n aria-hidden="true"\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '};rM.compose(Object.assign({baseName:"checkbox",template:aM,styles:nM,shadowOptions:lM},dM));const hM=(e,t)=>Me` .combo-box-indicator{transition-property: transform;transition-duration: 0.2s;transition-timing-function: ease-out}:host([open]) .combo-box-indicator{transform: rotate(180deg)}${fh(e)}`,uM=(e,t)=>K`<template aria-activedescendant="${e=>e.activeDescendant}" class="${e=>e.open?"open":""} ${e=>e.disabled?"disabled":""} ${e=>e.position}" ?open="${e=>e.open}" @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control">${it(0,t)}<slot name="control"><input aria-activedescendant="${e=>e.activeDescendant}" aria-autocomplete="${e=>e.ariaAutoComplete||e.autocomplete}" aria-controls="${e=>e.ariaControls||e.listboxId}" aria-disabled="${e=>e.disabled?"true":"false"}" aria-expanded="${e=>e.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="${e=>e.ariaLabelledby}" aria-label="${e=>e.ariaLabel}" autocomplete="${e=>e.autocomplete}" class="selected-value" part="selected-value" placeholder="${e=>e.placeholder}" role="combobox" type="text" ?disabled="${e=>e.disabled}" :value="${e=>e.value}" @input="${(e,t)=>e.inputHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}" ${Fe("control")}/><div class="indicator" part="indicator" aria-hidden="true"><slot name="indicator">${t.indicator||""}</slot></div></slot>${tt(0,t)}</div><div class="listbox" id="${e=>e.listboxId}" part="listbox" role="listbox" ?disabled="${e=>e.disabled}" ?hidden="${e=>!e.open}" ${Fe("listbox")}><slot ${Fe("slottedDatasource")} ${Qe({filter:Uc.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}></slot></div></template>`;var fM,pM;class mM extends ph{constructor(){super(...arguments),fM.set(this,void 0),pM.set(this,!1),this.needManualChangeEventDispatch=!1,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.filterMode="startsWith",this.scrollToSelectedWhenOpening=!1,this.scrollToSelectedWhenOpeningOptions={behavior:"auto",block:"nearest"},this.scrollWhenSelectionChanges=!1,this.scrollWhenSelectionChangesOptions={behavior:"auto",block:"center"},this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value="",this.control.value="",this.filter="",this.filterOptions()}}get activeDescendant(){var e,t;if(this.selectedOptions&&0!==this.selectedOptions.length)return this.ariaActiveDescendant=null===(e=this.selectedOptions[0])||void 0===e?void 0:e.id,null===(t=this.selectedOptions[0])||void 0===t?void 0:t.id}debounceChanged(e,t){this.debouncedInputHandler=jx(this.asyncSetFilter,t)}get scrollableListbox(){var e,t;return null!==(e=this.listbox)&&void 0!==e?e:null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".listbox")}openChanged(){super.openChanged(),this.$emit("open-change",{open:this.open}),this.open?this.scrollToSelectedWhenOpening&&setTimeout(()=>{const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollToSelectedWhenOpeningOptions)},500):(this.manuallyDispatchChangeEvent(),this.filter="",this.filterOptions())}get value(){return v.track(this,"value"),this._ourValue}set value(e){var t,i,c;if(void 0===e)return;const o=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){const o=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===String(e).toLowerCase(),s=this.options?this.options.findIndex(o):-1,a=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,n=null===(i=this.options[s])||void 0===i?void 0:i.text;this.selectedIndex=n&&n!==a?s:this.selectedIndex,e&&""!==e.trim()&&-1===s&&(e=(null===(c=this.firstSelectedOption)||void 0===c?void 0:c.text)||e)}o!==e&&(this._ourValue=e,super.valueChanged(o,e),v.notify(this,"value"))}slottedOptionsChanged(e,t){this.enableAsyncForInfiniteScrollDatasource(),super.slottedOptionsChanged(e,t),this.updateValue(!1)}enableAsyncForInfiniteScrollDatasource(){var e;if(this.async)return;const t=null===(e=this.slottedDatasource)||void 0===e?void 0:e.assignedNodes().find(e=>e instanceof Wx);(null==t?void 0:t.infiniteScroll)&&(this.async=!0)}filterOptions(){if(this.async)return this.filteredOptions=[...this._options],void this._options.forEach(e=>e.hidden=!1);this.autocomplete&&this.autocomplete!==Xc||(this.filter="");const e=this.filter,t=this.caseSensitive?e:e.toLowerCase();this.filteredOptions=this._options.filter(e=>{const i=this.caseSensitive?e.text:e.text.toLowerCase();return"contains"===this.filterMode?i.includes(t):i.startsWith(t)}),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled)if(EC(e,this))this.open=!1;else{if($C(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!$C(e,this.control))return super.clickHandler(e)}}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":if(Uu(this,pM,this.open,"f"),!this.open)return this.open=!0,!0;break;case"ArrowDown":case"ArrowUp":if(!this.open)return this.open=!0,!0;if(this.scrollWhenSelectionChanges){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollWhenSelectionChangesOptions)}break;case"Escape":if(this.control.value!==this.currentValue)return this.filter="",this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),void(this.open=!1);if(!this.open)return!0}const i=super.keydownHandler(e);return"Enter"!==t?i:void 0}keyupHandler(e){var t;const i=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(i){case"Enter":return!Bu(this,pM,"f");case"ArrowDown":case"ArrowUp":this.open&&this.firstSelectedOption&&this.autocomplete===Qc&&(this.needManualChangeEventDispatch=!0,this.currentValue=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value);break;case"Home":case"End":return;case"Backspace":case"Delete":const i=super.keyupHandler(e);return this.selectItemByValue(this.control.value),i}return super.keyupHandler(e)}get indicator(){return Bu(this,fM,"f")||Uu(this,fM,this.shadowRoot.querySelector('[part="indicator"]'),"f"),Bu(this,fM,"f")}selectItemByValue(e){var t,i,c;this.selectedIndex=null!==(i=null===(t=this.options)||void 0===t?void 0:t.findIndex(t=>t.text===e))&&void 0!==i?i:-1,null===(c=this.options)||void 0===c||c.forEach((e,t)=>e.selected=t===this.selectedIndex)}inputHandler(e){this.async?this.debouncedInputHandler():super.inputHandler(e)}asyncSetFilter(){const e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof Wx);if(t.length>0){const i=t[0];null==e||""===e?i.criteria=i.baseCriteria||"":BC(i,e),p.queueUpdate(()=>{this.control.value=e})}else SC.warn("Options-datasource is not connected. Please add a datasource to use this functionality.")}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===Qc&&(this.dispatchEvent(new Event("change",{bubbles:!0})),this.needManualChangeEventDispatch=!1)}}fM=new WeakMap,pM=new WeakMap,Ou([b],mM.prototype,"activeDescendant",null),Ou([b],mM.prototype,"slottedDatasource",void 0),Ou([de({mode:"boolean"})],mM.prototype,"async",void 0),Ou([de],mM.prototype,"debounce",void 0),Ou([de({mode:"boolean",attribute:"case-sensitive"})],mM.prototype,"caseSensitive",void 0),Ou([de({mode:"boolean",attribute:"ignore-input-click"})],mM.prototype,"ignoreInputClick",void 0),Ou([de({attribute:"filter-mode"})],mM.prototype,"filterMode",void 0),Ou([de({mode:"boolean",attribute:"scroll-to-selected-when-opening"})],mM.prototype,"scrollToSelectedWhenOpening",void 0),Ou([b],mM.prototype,"scrollToSelectedWhenOpeningOptions",void 0),Ou([de({mode:"boolean",attribute:"scroll-when-selection-changes"})],mM.prototype,"scrollWhenSelectionChanges",void 0),Ou([b],mM.prototype,"scrollWhenSelectionChangesOptions",void 0);const gM={delegatesFocus:!0,mode:"open"},vM={indicator:'\n <svg\n class="combo-box-indicator"\n part="combo-box-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '};mM.compose(Object.assign({baseName:"combobox",template:uM,styles:hM,shadowOptions:gM},vM));const bM=(e,t)=>Me` :host{--light-size: 12px;--height: calc(var(--design-unit) * 2px + var(--light-size));display: flex;justify-content: center;align-items: center;width: 100%;height: var(--height);margin: calc(var(--design-unit) * 2px) 0;/* https://www.colorxs.com/color/traffic-light-green-2032-20 */ --green: 50 164 49;--trafic-light-green: rgb(var(--green));--trafic-light-green-glow: rgb(var(--green) / 40%) 0 0 4px 4px, rgb(var(--green) / 20%) 0 0 8px 8px;/* https://www.colorxs.com/color/ral-3020-traffic-red */ --red: 187 30 16;--trafic-light-red: rgb(var(--red));--trafic-light-red-glow: rgb(var(--red) / 40%) 0 0 4px 4px, rgb(var(--red) / 20%) 0 0 8px 8px}.light{height: var(--light-size);width: var(--light-size);margin: 1rem;border-radius: 100%}.green{background: var(--trafic-light-green);box-shadow: var(--trafic-light-green-glow)}.red{background: var(--trafic-light-red);box-shadow: var(--trafic-light-red-glow)}.label{font-size: small;color: grey;overflow: hidden;text-overflow: ellipsis;white-space: nowrap}`,yM=K`<div class=${e=>ti(["light",!0],[e.colour,!0])}></div>${Ve(e=>e.showLabel,K`<div class="label">${e=>e.label}</div>`)} `;class zM extends Wt{constructor(){super(...arguments),this.showLabel=!1,this.label="disconnected",this.colour="red"}connectedCallback(){super.connectedCallback(),this.subscription=this.connect.isConnectedSubject.subscribe(e=>{this.label=this.getLabel(e),this.colour=e?"green":"red"})}disconnectedCallback(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}getLabel(e){if(!e)return"disconnected";return`${this.session.getSessionStorageItem("hostUrl")} ✔`}}Ou([bz],zM.prototype,"connect",void 0),Ou([Mb],zM.prototype,"session",void 0),Ou([de({mode:"boolean",attribute:"show-label"})],zM.prototype,"showLabel",void 0),Ou([b],zM.prototype,"label",void 0),Ou([b],zM.prototype,"colour",void 0),zM.compose({baseName:"connection-indicator",template:yM,styles:bM});(class extends Mc{}).compose(Object.assign({baseName:"data-grid",template:(e,t)=>xc(e),styles:(e,t)=>Me` ${mh()}`,shadowOptions:void 0},{}));(class extends kc{}).compose(Object.assign({baseName:"data-grid-cell",template:$c,styles:(e,t)=>Me` ${vh()}`,shadowOptions:void 0},{}));(class extends Lc{}).compose(Object.assign({baseName:"data-grid-row",template:Ec,styles:(e,t)=>Me` ${gh()}`,shadowOptions:void 0},{}));const CM=Me` :host{position: relative}.date-toggle::part(control){cursor: pointer}.date-toggle::part(label){cursor: pointer}.calendar-dropdown{display: none;width: 300px;z-index: 999;position: absolute;top: 100%;left: 50%;transform: translate(-50%, 8px);margin: 10px 0 0;padding: 20px;background: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);box-shadow: 0 0 8px rgb(0 0 0 / 20%)}.calendar-dropdown.hide-weekends{width: 215px}.calendar-dropdown.top{top: auto;bottom: 100%;margin: 0 0 5px;transform: translate(-50%, -8px)}.calendar-dropdown.left{top: 50%;left: 0;margin: 0 0 0 5px;transform: translate(calc(-8px + -100%), -50%)}.calendar-dropdown.right{top: 50%;left: 100%;transform: translate(8px, -50%)}.calendar-dropdown.visible{display: block}.calendar-dropdown.inline{display: block;position: static;z-index: auto;margin-top: 5px;transform: none}.header{display: flex;justify-content: space-between;align-items: center;margin: 0 0 10px}.header h3{margin: 0;text-transform: capitalize;font-weight: bold;color: var(--neutral-foreground-rest)}.header .icon-button{height: auto;padding: 0;min-width: auto}.header .months-arrows{display: flex;gap: calc(var(--design-unit) * 2px)}.week-days{display: grid;grid-template-columns: repeat(7, 1fr);grid-gap: 5px;margin-bottom: 10px;color: var(--neutral-foreground-rest)}.week-days span{display: flex;justify-content: center;align-items: center;font-size: 14px;font-weight: bold;text-transform: capitalize}.week-days span.disabled{opacity: 60%}.month-days{display: grid;grid-template-columns: repeat(7, 1fr);grid-gap: 5px}.week-days.hide-weekends, .month-days.hide-weekends{grid-template-columns: repeat(5, 1fr)}.month-day{padding: 8px 5px;color: #808080;background: none;display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 4px);cursor: pointer;border: none}.month-day.current{opacity: 100%;color: var(--neutral-foreground-hint)}.month-day.selected{background: var(--accent-foreground-rest);color: var(--neutral-foreground-rest)}.month-day:hover:not(:disabled){background: var(--neutral-stroke-hover);color: var(--neutral-foreground-rest)}.month-day[disabled]{opacity: 50%;cursor: not-allowed}.date-toggle[readonly] .label{cursor: pointer}`,LM=[1,7],xM=e=>K`<${e}-text-field data-test-id="date-picker" readonly :value="${e=>e.inputValue}" placeholder="${e=>e.inputPlaceholder}" part="date-toggle" class="date-toggle" @click="${e=>e.toggleCalendar()}">${e=>e.label}<div class="input-icon-container" part="input-icon-container" slot="end"><${e}-icon variant="regular" name="calendar-alt" size="sm"></${e}-icon></div></${e}-text-field><div class="calendar-dropdown ${e=>e.calendarDropdownClasses} ${e=>e.position}"><div class="header"><h3>${e=>e.currentMonth} ${e=>e.currentYear}</h3><div class="months-arrows"><${e}-button class="icon-button" appearance="accent" @click="${e=>e.prevMonth()}" aria-label="previous month"><${e}-icon name="angle-left"></${e}-icon></${e}-button><${e}-button class="icon-button" appearance="accent" @click="${e=>e.nextMonth()}" aria-label="next month"><${e}-icon name="angle-right"></${e}-icon></${e}-button></div></div><div class="week-days ${e=>ti(["hide-weekends",e.hideWeekends])}">${We(e=>{var t;return null===(t=e.calendar)||void 0===t?void 0:t.weekDays},K` ${Ve((e,t)=>!t.parent.hideWeekends||-1===LM.indexOf(t.index+1),K`<span class="${(e,t)=>ti(["disabled",-1!==t.parent.disabledDaysOfWeek.indexOf(t.index+1)])}">${(e,t)=>e.substring(0,t.parent.substringNumber)}</span>`)} `,{positioning:!0})}</div><div class="month-days ${e=>ti(["hide-weekends",e.hideWeekends])}">${We(e=>e.monthList,K` ${Ve((e,t)=>!t.parent.hideWeekends||-1===LM.indexOf(e.dayNumber),K`<button ?disabled="${(e,t)=>-1!==t.parent.disabledDaysOfWeek.indexOf(e.dayNumber)}" class="month-day ${(e,t)=>t.parent.isSelectedDate(e)?"selected":""} ${(e,t)=>e.monthNumber===t.parent.calendar.month.number?"current":""}" @click=${(e,t)=>t.parent.selectDay(e)}>${e=>e.date}</button>`)} `)}</div><slot name="bottom"></slot></div>`,MM=K` ${e=>xM(NC(e))} `;var wM,SM={exports:{}};function kM(){return wM||(wM=1,function(e){e.exports=function(){var e=1e3,t=6e4,i=36e5,c="millisecond",o="second",s="minute",a="hour",n="day",r="week",l="month",d="quarter",h="year",u="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}},v=function(e,t,i){var c=String(e);return!c||c.length>=t?e:""+Array(t+1-c.length).join(i)+e},b={s:v,z:function(e){var t=-e.utcOffset(),i=Math.abs(t),c=Math.floor(i/60),o=i%60;return(t<=0?"+":"-")+v(c,2,"0")+":"+v(o,2,"0")},m:function e(t,i){if(t.date()<i.date())return-e(i,t);var c=12*(i.year()-t.year())+(i.month()-t.month()),o=t.clone().add(c,l),s=i-o<0,a=t.clone().add(c+(s?-1:1),l);return+(-(c+(i-o)/(s?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:h,w:r,d:n,D:u,h:a,m:s,s:o,ms:c,Q:d}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",z={};z[y]=g;var C="$isDayjsObject",L=function(e){return e instanceof S||!(!e||!e[C])},x=function e(t,i,c){var o;if(!t)return y;if("string"==typeof t){var s=t.toLowerCase();z[s]&&(o=s),i&&(z[s]=i,o=s);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var n=t.name;z[n]=t,o=n}return!c&&o&&(y=o),o||!c&&y},M=function(e,t){if(L(e))return e.clone();var i="object"==typeof t?t:{};return i.date=e,i.args=arguments,new S(i)},w=b;w.l=x,w.i=L,w.w=function(e,t){return M(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var S=function(){function g(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[C]=!0}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,i=e.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var c=t.match(p);if(c){var o=c[2]-1||0,s=(c[7]||"0").substring(0,3);return i?new Date(Date.UTC(c[1],o,c[3]||1,c[4]||0,c[5]||0,c[6]||0,s)):new Date(c[1],o,c[3]||1,c[4]||0,c[5]||0,c[6]||0,s)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return w},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(e,t){var i=M(e);return this.startOf(t)<=i&&i<=this.endOf(t)},v.isAfter=function(e,t){return M(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<M(e)},v.$g=function(e,t,i){return w.u(e)?this[t]:this.set(i,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var i=this,c=!!w.u(t)||t,d=w.p(e),f=function(e,t){var o=w.w(i.$u?Date.UTC(i.$y,t,e):new Date(i.$y,t,e),i);return c?o:o.endOf(n)},p=function(e,t){return w.w(i.toDate()[e].apply(i.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),i)},m=this.$W,g=this.$M,v=this.$D,b="set"+(this.$u?"UTC":"");switch(d){case h:return c?f(1,0):f(31,11);case l:return c?f(1,g):f(0,g+1);case r:var y=this.$locale().weekStart||0,z=(m<y?m+7:m)-y;return f(c?v-z:v+(6-z),g);case n:case u:return p(b+"Hours",0);case a:return p(b+"Minutes",1);case s:return p(b+"Seconds",2);case o:return p(b+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var i,r=w.p(e),d="set"+(this.$u?"UTC":""),f=(i={},i[n]=d+"Date",i[u]=d+"Date",i[l]=d+"Month",i[h]=d+"FullYear",i[a]=d+"Hours",i[s]=d+"Minutes",i[o]=d+"Seconds",i[c]=d+"Milliseconds",i)[r],p=r===n?this.$D+(t-this.$W):t;if(r===l||r===h){var m=this.clone().set(u,1);m.$d[f](p),m.init(),this.$d=m.set(u,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[w.p(e)]()},v.add=function(c,d){var u,f=this;c=Number(c);var p=w.p(d),m=function(e){var t=M(f);return w.w(t.date(t.date()+Math.round(e*c)),f)};if(p===l)return this.set(l,this.$M+c);if(p===h)return this.set(h,this.$y+c);if(p===n)return m(1);if(p===r)return m(7);var g=(u={},u[s]=t,u[a]=i,u[o]=e,u)[p]||1,v=this.$d.getTime()+c*g;return w.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,i=this.$locale();if(!this.isValid())return i.invalidDate||f;var c=e||"YYYY-MM-DDTHH:mm:ssZ",o=w.z(this),s=this.$H,a=this.$m,n=this.$M,r=i.weekdays,l=i.months,d=i.meridiem,h=function(e,i,o,s){return e&&(e[i]||e(t,c))||o[i].slice(0,s)},u=function(e){return w.s(s%12||12,e,"0")},p=d||function(e,t,i){var c=e<12?"AM":"PM";return i?c.toLowerCase():c};return c.replace(m,function(e,c){return c||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return w.s(t.$y,4,"0");case"M":return n+1;case"MM":return w.s(n+1,2,"0");case"MMM":return h(i.monthsShort,n,l,3);case"MMMM":return h(l,n);case"D":return t.$D;case"DD":return w.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(i.weekdaysMin,t.$W,r,2);case"ddd":return h(i.weekdaysShort,t.$W,r,3);case"dddd":return r[t.$W];case"H":return String(s);case"HH":return w.s(s,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return p(s,a,!0);case"A":return p(s,a,!1);case"m":return String(a);case"mm":return w.s(a,2,"0");case"s":return String(t.$s);case"ss":return w.s(t.$s,2,"0");case"SSS":return w.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(c,u,f){var p,m=this,g=w.p(u),v=M(c),b=(v.utcOffset()-this.utcOffset())*t,y=this-v,z=function(){return w.m(m,v)};switch(g){case h:p=z()/12;break;case l:p=z();break;case d:p=z()/3;break;case r:p=(y-b)/6048e5;break;case n:p=(y-b)/864e5;break;case a:p=y/i;break;case s:p=y/t;break;case o:p=y/e;break;default:p=y}return f?p:w.a(p)},v.daysInMonth=function(){return this.endOf(l).$D},v.$locale=function(){return z[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var i=this.clone(),c=x(e,t,!0);return c&&(i.$L=c),i},v.clone=function(){return w.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),k=S.prototype;return M.prototype=k,[["$ms",c],["$s",o],["$m",s],["$H",a],["$W",n],["$M",l],["$y",h],["$D",u]].forEach(function(e){k[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),M.extend=function(e,t){return e.$i||(e(t,S,M),e.$i=!0),M},M.locale=x,M.isDayjs=L,M.unix=function(e){return M(1e3*e)},M.en=z[y],M.Ls=z,M.p={},M}()}(SM)),SM.exports}var EM,$M=sp(kM()),NM={exports:{}};var AM,OM=(EM||(EM=1,function(e){e.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,c=/\d\d/,o=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,a={},n=function(e){return(e=+e)+(e>68?1900:2e3)},r=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),i=60*t[1]+(+t[2]||0);return 0===i?0:"+"===t[0]?-i:i}(e)}],d=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},h=function(e,t){var i,c=a.meridiem;if(c){for(var o=1;o<=24;o+=1)if(e.indexOf(c(o,0,t))>-1){i=o>12;break}}else i=e===(t?"pm":"PM");return i},u={A:[s,function(e){this.afternoon=h(e,!1)}],a:[s,function(e){this.afternoon=h(e,!0)}],Q:[i,function(e){this.month=3*(e-1)+1}],S:[i,function(e){this.milliseconds=100*+e}],SS:[c,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[o,r("seconds")],ss:[o,r("seconds")],m:[o,r("minutes")],mm:[o,r("minutes")],H:[o,r("hours")],h:[o,r("hours")],HH:[o,r("hours")],hh:[o,r("hours")],D:[o,r("day")],DD:[c,r("day")],Do:[s,function(e){var t=a.ordinal,i=e.match(/\d+/);if(this.day=i[0],t)for(var c=1;c<=31;c+=1)t(c).replace(/\[|\]/g,"")===e&&(this.day=c)}],w:[o,r("week")],ww:[c,r("week")],M:[o,r("month")],MM:[c,r("month")],MMM:[s,function(e){var t=d("months"),i=(d("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(i<1)throw new Error;this.month=i%12||i}],MMMM:[s,function(e){var t=d("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,r("year")],YY:[c,function(e){this.year=n(e)}],YYYY:[/\d{4}/,r("year")],Z:l,ZZ:l};function f(i){var c,o;c=i,o=a&&a.formats;for(var s=(i=c.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,i,c){var s=c&&c.toUpperCase();return i||o[c]||e[c]||o[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})).match(t),n=s.length,r=0;r<n;r+=1){var l=s[r],d=u[l],h=d&&d[0],f=d&&d[1];s[r]=f?{regex:h,parser:f}:l.replace(/^\[|\]$/g,"")}return function(e){for(var t={},i=0,c=0;i<n;i+=1){var o=s[i];if("string"==typeof o)c+=o.length;else{var a=o.regex,r=o.parser,l=e.slice(c),d=a.exec(l)[0];r.call(t,d),e=e.replace(d,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var i=e.hours;t?i<12&&(e.hours+=12):12===i&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,i){i.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(n=e.parseTwoDigitYear);var c=t.prototype,o=c.parse;c.parse=function(e){var t=e.date,c=e.utc,s=e.args;this.$u=c;var n=s[1];if("string"==typeof n){var r=!0===s[2],l=!0===s[3],d=r||l,h=s[2];l&&(h=s[2]),a=this.$locale(),!r&&h&&(a=i.Ls[h]),this.$d=function(e,t,i,c){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var o=f(t)(e),s=o.year,a=o.month,n=o.day,r=o.hours,l=o.minutes,d=o.seconds,h=o.milliseconds,u=o.zone,p=o.week,m=new Date,g=n||(s||a?1:m.getDate()),v=s||m.getFullYear(),b=0;s&&!a||(b=a>0?a-1:m.getMonth());var y,z=r||0,C=l||0,L=d||0,x=h||0;return u?new Date(Date.UTC(v,b,g,z,C,L,x+60*u.offset*1e3)):i?new Date(Date.UTC(v,b,g,z,C,L,x)):(y=new Date(v,b,g,z,C,L,x),p&&(y=c(y).week(p).toDate()),y)}catch(e){return new Date("")}}(t,n,c,i),this.init(),h&&!0!==h&&(this.$L=this.locale(h).$L),d&&t!=this.format(n)&&(this.$d=new Date("")),a={}}else if(n instanceof Array)for(var u=n.length,p=1;p<=u;p+=1){s[1]=n[p-1];var m=i.apply(this,s);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}p===u&&(this.$d=new Date(""))}else o.call(this,e)}}}()}(NM)),NM.exports),TM=sp(OM),RM={exports:{}};var IM,DM=(AM||(AM=1,function(e){e.exports=function(e,t,i){var c=t.prototype,o=function(e){return e&&(e.indexOf?e:e.s)},s=function(e,t,i,c,s){var a=e.name?e:e.$locale(),n=o(a[t]),r=o(a[i]),l=n||r.map(function(e){return e.slice(0,c)});if(!s)return l;var d=a.weekStart;return l.map(function(e,t){return l[(t+(d||0))%7]})},a=function(){return i.Ls[i.locale()]},n=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})}(e.formats[t.toUpperCase()])},r=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):s(e,"months")},monthsShort:function(t){return t?t.format("MMM"):s(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):s(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):s(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):s(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return n(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};c.localeData=function(){return r.bind(this)()},i.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(t){return n(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},i.months=function(){return s(a(),"months")},i.monthsShort=function(){return s(a(),"monthsShort","months",3)},i.weekdays=function(e){return s(a(),"weekdays",null,null,e)},i.weekdaysShort=function(e){return s(a(),"weekdaysShort","weekdays",3,e)},i.weekdaysMin=function(e){return s(a(),"weekdaysMin","weekdays",2,e)}}}(RM)),RM.exports),FM=sp(DM),HM={exports:{}};var _M,PM=(IM||(IM=1,function(e){var t;e.exports=(t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},function(e,i,c){var o=i.prototype,s=o.format;c.en.formats=t,o.format=function(e){void 0===e&&(e="YYYY-MM-DDTHH:mm:ssZ");var i=this.$locale().formats,c=function(e,i){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,c,o){var s=o&&o.toUpperCase();return c||i[o]||t[o]||i[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})}(e,void 0===i?{}:i);return s.call(this,c)}})}(HM)),HM.exports),VM=sp(PM),BM={exports:{}};var UM=(_M||(_M=1,function(e){e.exports=function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}}(BM)),BM.exports),jM=sp(UM);class qM{constructor(e,t="default"){e=null!=e?e:new Date,this.Date=e,this.date=e.getDate(),this.day=e.toLocaleString(t,{weekday:"long"}),this.dayNumber=e.getDay()+1,this.dayShort=e.toLocaleString(t,{weekday:"short"}),this.year=e.getFullYear(),this.yearShort=Number(e.toLocaleString(t,{year:"2-digit"})),this.month=e.toLocaleString(t,{month:"long"}),this.monthShort=e.toLocaleString(t,{month:"short"}),this.monthNumber=e.getMonth()+1,this.timestamp=e.getTime()}}$M.extend(jM);class GM{constructor(e=null,t="default"){const i=new qM(e,t);this.lang=t,this.name=i.month,this.number=i.monthNumber,this.year=i.year,this.numberOfDays=[31,28,31,30,31,30,31,31,30,31,30,31][this.number-1],2===this.number&&(this.numberOfDays+=$M(i.date).isLeapYear()?1:0)}getDay(e){return new qM(new Date(this.year,this.number-1,e),this.lang)}}$M.extend(jM);class WM{constructor(e=null,t=null,i="default"){this.weekDays=Array.from({length:7}),this.today=new qM(null,i),this.year=null!=e?e:this.today.year,this.month=new GM(new Date(this.year,(t||this.today.monthNumber)-1),i),this.lang=i,this.weekDays.forEach((e,t)=>{const i=this.month.getDay(t);this.weekDays[i.dayNumber-1]=i.day})}getMonth(e){return new GM(new Date(this.year,e-1),this.lang)}getPreviousMonth(){return 1===this.month.number?new GM(new Date(this.year-1,11),this.lang):new GM(new Date(this.year,this.month.number-2),this.lang)}getNextMonth(){return 1===this.month.number?new GM(new Date(this.year+1,0),this.lang):new GM(new Date(this.year,this.month.number+2),this.lang)}goToDate(e,t){this.month=new GM(new Date(t,e-1),this.lang),this.year=t}goToNextYear(){this.year+=1,this.month=new GM(new Date(this.year,0),this.lang)}goToPreviousYear(){this.year-=1,this.month=new GM(new Date(this.year,11),this.lang)}goToNextMonth(){if(12===this.month.number)return this.goToNextYear();this.month=new GM(new Date(this.year,this.month.number+1-1),this.lang)}goToPreviousMonth(){if(1===this.month.number)return this.goToPreviousYear();this.month=new GM(new Date(this.year,this.month.number-1-1),this.lang)}}var YM,KM={exports:{}};function ZM(e){return null!=e&&""!==String(e).trim()}YM||(YM=1,function(e){e.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e),c={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}};return i.default.locale(c,null,!0),c}(kM())}(KM)),$M.extend(TM),$M.extend(FM),$M.extend(VM);const QM="MM-DD-YYYY";const XM=[1,2,3,4,5,6,7],JM=(e,t,i)=>{if(c=t,-1===e.indexOf(c.dayNumber))return t;var c;const o=XM.filter(t=>-1===e.indexOf(t));let s=o.find(e=>e>t.dayNumber);s||(s=Math.min(...o));const a=t.dayNumber<s?s-t.dayNumber:s-t.dayNumber+7;return o.length?new qM(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,a),i):(yf.warn("Date picker disabled days - all days of week have been disabled"),t)};class ew extends Wt{constructor(){super(...arguments),this.format=QM,this.lang="en-US",this.visible=!1,this.position="bottom",this.disabledDaysOfWeek=[],this.suppressValueChanged=!1,this.cachedFormat=QM,this.clickOutside=e=>this.handleClickOutside(e),this.keydownOutside=e=>this.handleKeydownOutside(e)}formatChanged(e,t){!this.useLocaleFormat&&t&&this.cacheUserFormat(t),t&&this.calendar&&ZM(this.value)&&(this.formatDate=$M(this.currentDate.Date).format(t))}langChanged(){this.applyEffectiveLangChange()}useLocaleFormatChanged(e,t){this.calendar&&(t&&!e?this.cacheUserFormat(this.format):!t&&e&&this.restoreUserFormat(),this.applyEffectiveLangChange())}inlineCalendarChanged(){this.inlineCalendar?(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)):this.visible&&(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)),this.toggleVisibility()}hideWeekendsCalendarChanged(){this.toggleVisibility()}valueChanged(e,t){this.suppressValueChanged||this.calendar&&(ZM(t)?this.applyValue(t):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate())}disconnectedCallback(){document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside),super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),$M.extend(TM),$M.extend(VM),$M.extend(FM),this.substringNumber=3,this.useLocaleFormat&&(this.cacheUserFormat(this.format),this.applyLocaleFormat());const e=this.value;!this.allowEmpty||ZM(e)?ZM(e)?this.applyValue(e):this.initializeWithDefaultDate():this.initializeEmpty()}clear(){this.allowEmpty&&this.clearToEmpty(!0)}get inputValue(){return ZM(this.value)?this.formatDate:""}get inputPlaceholder(){var e;return!this.allowEmpty||ZM(this.value)?"":(null===(e=this.placeholder)||void 0===e?void 0:e.trim())||this.format.replace(/YYYY/g,"yyyy").replace(/YY(?!Y)/g,"yy").replace(/DD/g,"dd").replace(/D(?!D)/g,"d").replace(/MM/g,"mm").replace(/M(?!M)/g,"m")}get effectiveLang(){return this.useLocaleFormat&&!this.hasAttribute("lang")?"undefined"!=typeof navigator&&navigator.language?navigator.language:"en":this.lang}applyLocaleFormat(){this.format=function(e="en"){const t=function(e){const t=((null==e?void 0:e.trim())||"en").toLowerCase().replace(/_/g,"-");return"en-us"===t||"en"===t?"en":"en-gb"===t?"en-gb":t}(e),i=$M().locale(t),c=i.locale();return(o=t)!==(s=c)&&s!==o.split("-")[0]?$M().locale("en").localeData().longDateFormat("L")||"MM/DD/YYYY":i.localeData().longDateFormat("L")||"MM/DD/YYYY";var o,s}(this.effectiveLang)}cacheUserFormat(e){const t=null==e?void 0:e.trim();t&&(this.cachedFormat=t)}restoreUserFormat(){this.format=this.cachedFormat}applyEffectiveLangChange(){var e,t;if(!this.calendar)return;this.useLocaleFormat&&this.applyLocaleFormat();const i=this.calendar.year,c=this.calendar.month.number,o=null!==(t=null===(e=this.currentDate)||void 0===e?void 0:e.Date)&&void 0!==t?t:$M().toDate();this.currentDate=new qM(o,this.effectiveLang),this.calendar=new WM(i,c,this.effectiveLang),ZM(this.value)&&(this.formatDate=$M(this.currentDate.Date).format(this.format)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}syncValueAttribute(e){this.suppressValueChanged=!0,this.value=e,this.suppressValueChanged=!1}initializeEmpty(){const e=$M();this.currentDate=new qM(e.toDate(),this.effectiveLang),this.calendar=new WM(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate="",this.syncValueAttribute(""),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}initializeWithDefaultDate(){this.resetToDefaultDate(!0)}resetToDefaultDate(e=!1){var t;let i=new qM($M().toDate(),this.effectiveLang);(null===(t=this.disabledDaysOfWeek)||void 0===t?void 0:t.length)&&(i=JM(this.disabledDaysOfWeek,i,this.effectiveLang)),this.currentDate=i,e||!this.calendar?this.calendar=new WM(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang):this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=$M(this.currentDate.Date).format(this.format),this.syncValueAttribute($M(this.currentDate.Date).format(QM)),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}applyValue(e){const t=function(e,t){const i=String(e).trim(),c=$M(i,t,!0);if(c.isValid())return c;const o=$M(i,QM,!0);return o.isValid()?o:null}(e,this.format);t?(this.currentDate=new qM(t.toDate(),this.effectiveLang),this.calendar?this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year):this.calendar=new WM(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate=$M(this.currentDate.Date).format(this.format),this.syncValueAttribute($M(this.currentDate.Date).format(QM)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate()}clearToEmpty(e){const t=$M();this.currentDate=new qM(t.toDate(),this.effectiveLang),this.calendar&&(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()),this.formatDate="",this.syncValueAttribute(""),e&&this.$emit("value-changed",void 0)}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}visibleChanged(e,t){this.inlineCalendar||(t?(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)):(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)))}handleKeydownOutside(e){!this.inlineCalendar&&this.visible&&"Escape"===e.key&&(e.preventDefault(),this.closeCalendar())}handleClickOutside(e){!this.inlineCalendar&&this.visible&&EC(e,this)&&this.closeCalendar()}closeCalendar(){this.visible&&(this.visible=!1,this.toggleVisibility())}toggleCalendar(){this.visible=!this.visible,this.toggleVisibility(),this.isCurrentCalendarMonth()||(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText())}toggleVisibility(){this.calendarDropdownClasses=ti(["visible",this.visible],this.position,["inline",this.inlineCalendar],["hide-weekends",this.hideWeekends])}isSelectedDate(e){return!(this.allowEmpty&&!ZM(this.value))&&$M(e.Date).isSame(this.currentDate.Date,"day")}isCurrentCalendarMonth(){return this.currentMonth===this.currentDate.monthNumber&&this.currentYear===this.currentDate.year}prevMonth(){this.calendar.goToPreviousMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}nextMonth(){this.calendar.goToNextMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}selectDay(e){$M(e.Date).isSame(this.currentDate.Date,"day")&&ZM(this.value)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=$M(this.currentDate.Date).format(this.format),this.syncValueAttribute($M(e.Date).format(QM)),this.$emit("value-changed",this.value),this.toggleCalendar())}getMonthDaysGrid(){const e=this.calendar.month.getDay(1),t=this.calendar.getPreviousMonth(),i=e.dayNumber-1,c=this.calendar.month.numberOfDays+i,o=Array.from({length:c});for(let e=i;e<c;e+=1)o[e]=this.calendar.month.getDay(e+1-i);for(let e=0;e<i;e+=1){const c=i-(e+1);o[e]=t.getDay(t.numberOfDays-c)}return o}}Ou([de],ew.prototype,"format",void 0),Ou([de],ew.prototype,"lang",void 0),Ou([de({attribute:"use-locale-format",mode:"boolean"})],ew.prototype,"useLocaleFormat",void 0),Ou([de],ew.prototype,"visible",void 0),Ou([de({attribute:"inline-calendar",mode:"boolean"})],ew.prototype,"inlineCalendar",void 0),Ou([de({attribute:"hide-weekends",mode:"boolean"})],ew.prototype,"hideWeekends",void 0),Ou([de],ew.prototype,"position",void 0),Ou([de],ew.prototype,"label",void 0),Ou([de({attribute:"allow-empty",mode:"boolean"})],ew.prototype,"allowEmpty",void 0),Ou([de],ew.prototype,"placeholder",void 0),Ou([de],ew.prototype,"value",void 0),Ou([b],ew.prototype,"currentDate",void 0),Ou([b],ew.prototype,"currentMonth",void 0),Ou([b],ew.prototype,"currentYear",void 0),Ou([b],ew.prototype,"calendarDropdownClasses",void 0),Ou([b],ew.prototype,"formatDate",void 0),Ou([b],ew.prototype,"monthList",void 0),Ou([b],ew.prototype,"disabledDaysOfWeek",void 0),Ou([b],ew.prototype,"calendar",void 0),ew.compose(Object.assign({baseName:"date-picker",styles:CM,template:MM,shadowOptions:void 0},{}));class tw{constructor(){this.value=null}}Ou([b],tw.prototype,"value",void 0),new tw;const iw=(e,t,i)=>{const c=i?(e,t)=>e.setValueFor(i,t):(e,t)=>e.withDefault(t);Object.keys(e).forEach(i=>{const o=`${i}Value`;t[o]&&c(e[i],t[o])})};function cw(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const ow={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=_n(e);return t?Un.create(t.r,t.g,t.b):null}},sw=e=>Kn.from(Un.from(_n(e)));Un.create(1,1,1),Un.create(0,0,0);const aw=_n("#585858"),nw=Un.create(aw.r,aw.g,aw.b),rw=_n("#ffffff"),lw=Un.create(rw.r,rw.g,rw.b),dw=Kn.from(lw),hw=_n("#eeeeee"),uw=Un.create(hw.r,hw.g,hw.b);Kn.from(uw);const fw=_n("#08c3a5"),pw=Un.create(fw.r,fw.g,fw.b);Kn.from(pw);const{create:mw}=yo,gw=mw("fui-fill-color").withDefault(nw),vw=mw({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(lw);function bw(e,t){return e.colorContrast(t,14)}const yw=mw({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>bw(mw("fui-card-palette").withDefault(dw).getValueFor(e),vw.getValueFor(e)));var zw=Object.freeze({__proto__:null,fuiFillColor:gw,fuiCardFillColor:vw,defaultNeutralForegroundContrast:14,neutralForeground:bw,fuiCardForegroundColor:yw,accentFillActive:Tl,accentFillActiveDelta:Hr,accentFillFocus:Rl,accentFillFocusDelta:_r,accentFillHover:Ol,accentFillHoverDelta:Fr,accentFillRest:Al,accentFillRestDelta:Dr,accentForegroundActive:Zl,accentForegroundActiveDelta:Br,accentForegroundFocus:Ql,accentForegroundFocusDelta:Ur,accentForegroundHover:Kl,accentForegroundHoverDelta:Vr,accentForegroundRest:Yl,accentForegroundRestDelta:Pr,accentPalette:ml,baseHeightMultiplier:rr,baseLayerLuminance:dr,bodyFont:nr,controlCornerRadius:hr,density:ur,designUnit:fr,direction:pr,disabledOpacity:mr,fillColor:El,focusStrokeInner:xd,focusStrokeOuter:Cd,focusStrokeWidth:vr,foregroundOnAccentActive:_l,foregroundOnAccentActiveLarge:jl,foregroundOnAccentFocus:Pl,foregroundOnAccentFocusLarge:ql,foregroundOnAccentHover:Hl,foregroundOnAccentHoverLarge:Ul,foregroundOnAccentRest:Fl,foregroundOnAccentRestLarge:Bl,neutralFillActive:td,neutralFillActiveDelta:Gr,neutralFillFocus:id,neutralFillFocusDelta:Wr,neutralFillHover:ed,neutralFillHoverDelta:qr,neutralFillInputActive:ad,neutralFillInputActiveDelta:Zr,neutralFillInputFocus:nd,neutralFillInputFocusDelta:Qr,neutralFillInputHover:sd,neutralFillInputHoverDelta:Kr,neutralFillInputRest:od,neutralFillInputRestDelta:Yr,neutralFillLayerRest:yd,neutralFillLayerRestDelta:al,neutralFillRest:Jl,neutralFillRestDelta:jr,neutralFillStealthActive:hd,neutralFillStealthActiveDelta:el,neutralFillStealthFocus:ud,neutralFillStealthFocusDelta:tl,neutralFillStealthHover:dd,neutralFillStealthHoverDelta:Jr,neutralFillStealthRest:ld,neutralFillStealthRestDelta:Xr,neutralFillStrongActive:gd,neutralFillStrongActiveDelta:ol,neutralFillStrongFocus:vd,neutralFillStrongFocusDelta:sl,neutralFillStrongHover:md,neutralFillStrongHoverDelta:cl,neutralFillStrongRest:pd,neutralFillStrongRestDelta:il,neutralForegroundHint:wd,neutralForegroundRest:kd,neutralLayer1:Cl,neutralLayer2:xl,neutralLayer3:wl,neutralLayer4:kl,neutralLayerCardContainer:vl,neutralLayerFloating:yl,neutralPalette:fl,neutralStrokeActive:Ad,neutralStrokeActiveDelta:ll,neutralStrokeDividerRest:Rd,neutralStrokeDividerRestDelta:hl,neutralStrokeFocus:Od,neutralStrokeFocusDelta:dl,neutralStrokeHover:Nd,neutralStrokeHoverDelta:rl,neutralStrokeRest:$d,neutralStrokeRestDelta:nl,strokeWidth:gr,typeRampBaseFontSize:br,typeRampBaseLineHeight:yr,typeRampMinus1FontSize:zr,typeRampMinus1LineHeight:Cr,typeRampMinus2FontSize:Lr,typeRampMinus2LineHeight:xr,typeRampPlus1FontSize:Mr,typeRampPlus1LineHeight:wr,typeRampPlus2FontSize:Sr,typeRampPlus2LineHeight:kr,typeRampPlus3FontSize:Er,typeRampPlus3LineHeight:$r,typeRampPlus4FontSize:Nr,typeRampPlus4LineHeight:Ar,typeRampPlus5FontSize:Or,typeRampPlus5LineHeight:Tr,typeRampPlus6FontSize:Rr,typeRampPlus6LineHeight:Ir});const Cw=sw("#08c3a5"),Lw=sw("#eeeeee"),xw=cr,Mw=Li.ltr;var ww=Object.freeze({__proto__:null,accentPaletteValue:Cw,neutralPaletteValue:Lw,baseLayerLuminanceValue:xw,directionValue:Mw,controlCornerRadiusValue:4,designUnitValue:4});
61
+ Install model </${e}-button>`)}</div>`)}</div>`)} `)(NC(e))} `;class qL extends Wt{constructor(){super(...arguments),this.status=null,this.open=!1,this.state="none",this.isInstalling=!1,this.pollTimer=null,this.clickOutside=e=>this.handleClickOutside(e)}get aiProvider(){var e;return null===(e=this.providerRegistry)||void 0===e?void 0:e.default()}get chromeStatusLabel(){var e,t;if("chrome"!==(null===(e=this.status)||void 0===e?void 0:e.provider))return null;const i=null===(t=this.status)||void 0===t?void 0:t.chromeAvailability;return"available"===i?"Installed":"downloading"===i||this.isInstalling?"Downloading…":"downloadable"===i?"Downloadable":"unavailable"===i?"Unavailable":null}get canInstall(){var e,t,i;return!!(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)&&"chrome"===(null===(t=this.status)||void 0===t?void 0:t.provider)&&"downloadable"===(null===(i=this.status)||void 0===i?void 0:i.chromeAvailability)&&!this.isInstalling}get isDownloading(){var e;return"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Ru(this,void 0,void 0,function*(){e.connectedCallback.call(this),yield this.refreshStatus(),this.maybeStartPolling()})}disconnectedCallback(){this.stopPolling(),document.removeEventListener("mousedown",this.clickOutside)}openChanged(){this.open?(document.addEventListener("mousedown",this.clickOutside),this.refreshStatus()):document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){EC(e,this)&&(this.open=!1)}toggleDropdown(){this.open=!this.open}refreshStatus(){return Ru(this,void 0,void 0,function*(){var e;if(!(null===(e=this.aiProvider)||void 0===e?void 0:e.getStatus))return this.status=null,void(this.state="none");try{const e=yield this.aiProvider.getStatus();this.status=e,this.state=this.deriveState(e),"available"===this.state&&(this.isInstalling=!1)}catch(e){this.status=null,this.state="none",this.isInstalling=!1}})}deriveState(e){if(!e||"none"===e.provider)return"none";if("chrome"===e.provider){const t=e.chromeAvailability;return"available"===t?"available":"downloading"===t?"downloading":"downloadable"===t?"downloadable":"unavailable"}return"server"}maybeStartPolling(){var e;"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling?this.startPolling():this.stopPolling()}startPolling(){this.pollTimer||(this.pollTimer=setInterval(()=>{this.refreshStatus().then(()=>{this.maybeStartPolling()})},2500))}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}onInstall(){return Ru(this,void 0,void 0,function*(){var e;if(this.canInstall&&(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)){this.isInstalling=!0;try{yield this.aiProvider.triggerDownload(),this.startPolling()}catch(e){this.isInstalling=!1}finally{yield this.refreshStatus()}}})}}Ou([JC],qL.prototype,"providerRegistry",void 0),Ou([b],qL.prototype,"status",void 0),Ou([b],qL.prototype,"open",void 0),Ou([b],qL.prototype,"state",void 0),Ou([b],qL.prototype,"isInstalling",void 0),Ou([y],qL.prototype,"chromeStatusLabel",null),Ou([y],qL.prototype,"canInstall",null),Ou([y],qL.prototype,"isDownloading",null),qL.compose({baseName:"ai-indicator",template:jL,styles:UL});const GL=(e,t)=>Oi(0,t),WL=(e,t)=>Me` ${Zd()}`;class YL extends Qd{}const KL={delegatesFocus:!0,mode:"open"},ZL={};YL.compose(Object.assign({baseName:"anchor",template:GL,styles:WL,shadowOptions:KL},ZL));const QL=(e,t)=>Di(),XL=(e,t)=>Me` ${Xd()}`;class JL extends Hi{}const ex={delegatesFocus:!0,mode:"open"},tx={};JL.compose(Object.assign({baseName:"anchored-region",template:QL,styles:XL,shadowOptions:ex},tx));const ix=(e,t)=>Gi(0,t),cx=K` ${Ve(e=>e.imgSrc,K`<img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />`)} `,ox=(e,t)=>Me` ${Jd(e)}`;class sx extends eh{}const ax={delegatesFocus:!0,mode:"open"},nx={media:cx};sx.compose(Object.assign({baseName:"avatar",template:ix,styles:ox,shadowOptions:ax},nx));const rx=(e,t)=>Yi(),lx=(e,t)=>Me` ${ih()}`;class dx extends Ki{}const hx=void 0,ux={};dx.compose(Object.assign({baseName:"badge",template:rx,styles:lx,shadowOptions:hx},ux));const fx=Me` @keyframes delete-animate{from{height: 100px;opacity: 100%}to{height: 0;opacity: 0%}}@keyframes append-animate{from{height: 0;opacity: 0%}to{height: var(--banner-height);opacity: 100%}}:host{--banner-width: 100%;--banner-height: 65px;--flow: row}@media screen and (max-width: 640px){:host{--flow: column;--banner-height: 100px}}.banner{animation: append-animate 0.3s linear;width: var(--banner-width);height: var(--banner-height);background-color: var(--fill-color);display: flex;flex-direction: var(--flow);padding: 5px 8px;box-sizing: border-box;overflow: hidden}.banner-delete{animation: delete-animate 0.3s linear;opacity: 0%}.content{display: flex;align-items: center;flex: 2;font-size: 12px;overflow: hidden;white-space: pre-line}.action{display: flex;flex-direction: row-reverse;align-items: center;gap: 10px;flex: 1;overflow: hidden}`,px=K` ${e=>(e=>K`<div role="alert" aria-live="polite" class="banner ${e=>e.dismissAnimation}" ${Fe("banner")}><div part="content" class="content"><slot name="content">${Ve(e=>e.notification,K`<div><div>${e=>{var t;return(null===(t=e.notification)||void 0===t?void 0:t.body)||"Place holder for notification message"}}</div></div>`)}</slot></div><div part="action" class="action"><slot name="action" class="action">${Ve(e=>e.notification,K`<${e}-button slot="action" appearance="lightweight" @click=${e=>e.dismiss()}>${e=>{var t,i,c,o;return(null===(o=null===(c=null===(i=null===(t=e.notification)||void 0===t?void 0:t.config)||void 0===i?void 0:i.banner)||void 0===c?void 0:c.dismissingAction)||void 0===o?void 0:o.label)||"Ignore"}}</${e}-button>`)} ${We(e=>{var t,i;return null===(i=null===(t=e.notification)||void 0===t?void 0:t.config)||void 0===i?void 0:i.banner.confirmingActions},K`<${e}-button slot="action" appearance="lightweight" @click=${(e,t)=>{var i;null==e||e.action(),null===(i=t.parent)||void 0===i||i.dismissNotification()}}>${e=>e.label}</${e}-button>`)}</slot></div></div>`)(NC(e))} `,mx={mode:"open",delegatesFocus:!0};class gx extends Wt{constructor(){super(...arguments),this.dismissAnimation=""}connectedCallback(){super.connectedCallback()}dismiss(){return this.dismissAnimation="banner-delete",new Promise(e=>{this.banner.onanimationend=()=>{this.remove(),e()}})}dismissNotification(){return Ru(this,void 0,void 0,function*(){try{yield this.dismiss(),this.remove()}catch(e){SC.error(e)}})}}Ou([b],gx.prototype,"dismissAnimation",void 0),Ou([b],gx.prototype,"notification",void 0),gx.compose({baseName:"banner",styles:fx,template:px,shadowOptions:mx});const vx=(e,t)=>Xi(),bx=(e,t)=>Me` ${oh()}`;class yx extends Ji{}yx.compose(Object.assign({baseName:"breadcrumb",template:vx,styles:bx,shadowOptions:void 0},{}));const zx=(e,t)=>Zi(0,t),Cx=(e,t)=>Me` ${ch()}`;class Lx extends Qi{}const xx=void 0,Mx={separator:"/"};Lx.compose(Object.assign({baseName:"breadcrumb-item",template:zx,styles:Cx,shadowOptions:xx},Mx));const wx=(e,t)=>ec(0,t),Sx=(e,t)=>Me` ${sh()}`;class kx extends ah{}const Ex={delegatesFocus:!0,mode:"open"},$x={};kx.compose(Object.assign({baseName:"button",template:wx,styles:Sx,shadowOptions:Ex},$x));const Nx=()=>Me` ${nh}`,Ax=(e,t)=>Tc(e,t);class Ox extends uc{}const Tx={delegatesFocus:!0,mode:"open"},Rx={};Ox.compose(Object.assign({baseName:"calendar",template:Ax,styles:Nx,shadowOptions:Tx},Rx));const Ix=(e,t)=>Rc(),Dx=(e,t)=>Me` ${rh()} :host{background-color: var(--fui-card-fill-color);color: var(--fui-card-foreground-color)}`;class Fx extends lh{}const Hx=void 0,_x={};var Px,Vx,Bx;Fx.compose(Object.assign({baseName:"card",template:Ix,styles:Dx,shadowOptions:Hx},_x)),function(e){e.BELOW="below",e.ABOVE="above"}(Px||(Px={}));var Ux=function(){if(Bx)return Vx;Bx=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,c=/^0o[0-7]+$/i,o=parseInt,s="object"==typeof op&&op&&op.Object===Object&&op,a="object"==typeof self&&self&&self.Object===Object&&self,n=s||a||Function("return this")(),r=Object.prototype.toString,l=Math.max,d=Math.min,h=function(){return n.Date.now()};function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function f(s){if("number"==typeof s)return s;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==r.call(e)}(s))return NaN;if(u(s)){var a="function"==typeof s.valueOf?s.valueOf():s;s=u(a)?a+"":a}if("string"!=typeof s)return 0===s?s:+s;s=s.replace(e,"");var n=i.test(s);return n||c.test(s)?o(s.slice(2),n?2:8):t.test(s)?NaN:+s}return Vx=function(e,t,i){var c,o,s,a,n,r,p=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var i=c,s=o;return c=o=void 0,p=t,a=e.apply(s,i)}function y(e){var i=e-r;return void 0===r||i>=t||i<0||g&&e-p>=s}function z(){var e=h();if(y(e))return C(e);n=setTimeout(z,function(e){var i=t-(e-r);return g?d(i,s-(e-p)):i}(e))}function C(e){return n=void 0,v&&c?b(e):(c=o=void 0,a)}function L(){var e=h(),i=y(e);if(c=arguments,o=this,r=e,i){if(void 0===n)return function(e){return p=e,n=setTimeout(z,t),m?b(e):a}(r);if(g)return n=setTimeout(z,t),b(r)}return void 0===n&&(n=setTimeout(z,t)),a}return t=f(t)||0,u(i)&&(m=!!i.leading,s=(g="maxWait"in i)?l(f(i.maxWait)||0,t):s,v="trailing"in i?!!i.trailing:v),L.cancel=function(){void 0!==n&&clearTimeout(n),p=0,c=r=o=n=void 0},L.flush=function(){return void 0===n?a:C(h())},L},Vx}(),jx=sp(Ux);const qx=Me` :host{--scrollbar-width: 12px;--scrollbar-thumb-width: 8px}.root{position: relative;width: inherit;min-width: 250px}.control{cursor: pointer;position: relative;display: flex;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}#display-field{width: 100%;cursor: pointer;color: var(--neutral-foreground-rest);min-height: 40px;padding: 0 calc(var(--design-unit) * 2.25px);border-width: 0;background-color: var(--neutral-fill-input-rest);border-radius: calc(var(--control-corner-radius) * 1px)}#display-field[disabled]{cursor: not-allowed;opacity: 30%}#display-field:focus{outline: 1px solid var(--accent-fill-rest);background: var(--neutral-fill-input-rest);border-style: none;box-shadow: none}#display-field:hover:not(:focus):not([disabled]){outline: 1px solid var(--neutral-stroke-hover)}button{pointer-events: none}.indicator{position: absolute;left: calc(100% - 26px);padding: 0;cursor: pointer}#arrow-icon{width: 16px;fill: white;transform: rotate(0deg);transition: transform 0.2s linear 0s}#arrow-icon.flipped{transform: rotate(180deg)}.disabled-svg{pointer-events: none;opacity: 30%}.position-above{bottom: 100%}::-webkit-scrollbar{width: var(--scrollbar-width)}::-webkit-scrollbar-track{background: var(--neutral-layer-4)}::-webkit-scrollbar-thumb{width: var(--scrollbar-thumb-width);border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: var(--neutral-layer-2);border: 3px solid var(--neutral-layer-4)}::-webkit-scrollbar-corner{background: var(--neutral-layer-4)}.multiselect-dropdown{display: flex;flex-direction: column;position: absolute;height: max-content;overflow: hidden;margin-top: calc(var(--design-unit) * 1px);border: calc(var(--stroke-width) * 1px) solid var(--neutral-layer-2);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;z-index: 999}.multiselect-dropdown:not(.is-resizing){transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s}.checkbox-container{display: flex;flex-direction: column;list-style: none;overflow-y: auto;height: 100%}.is-resizing .checkbox-container{overflow-y: hidden}.checkbox-container zero-checkbox{min-width: fit-content}.checkbox-container zero-checkbox[disabled], .checkbox-container foundation-checkbox[disabled]{cursor: not-allowed}.visible{visibility: visible;max-height: var(--custom-max-height, ${230..toString()}px);overflow: hidden}::slotted(foundation-checkbox), foundation-checkbox{border-bottom: 1px solid var(--neutral-layer-4);padding: 5px 0 5px 5px;margin: 0}::slotted(foundation-checkbox:hover), foundation-checkbox:hover{background-color: var(--neutral-layer-3);cursor: pointer}::slotted(foundation-checkbox)::part(label), foundation-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}ol, li{margin: 0;padding: 0}.checkbox{width: 100%}.select-all{width: 100%;margin-left: 0;margin-right: 0}.display-value{position: absolute;right: 40px;color: var(--neutral-foreground-rest);font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-family: var(--body-font)}.options-header-item-hidden{display: none}.resize-button{position: absolute;bottom: 0;right: 0;width: 12px;height: 12px;cursor: nw-resize;background: linear-gradient( -45deg, transparent 30%, var(--neutral-foreground-rest) 30%, var(--neutral-foreground-rest) 40%, transparent 40%, transparent 60%, var(--neutral-foreground-rest) 60%, var(--neutral-foreground-rest) 70%, transparent 70% );z-index: 1000;opacity: 60%;transition: opacity 0.2s ease}.resize-button:hover{opacity: 100%}.multiselect-dropdown.resizable{resize: none;overflow: hidden}`;var Gx;let Wx=Gx=class extends kC{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=Gx.defaultPageSize,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria="",this.listboxElement=null,this.loadingMoreRows=!1,this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.selectOpenChangeHandler=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.open)&&(this.listboxElement||this.attachListboxScrollListener(),this.topUpVisibleListbox())},this.listboxScrollHandler=()=>{const e=this.listboxElement;e&&this.isNearListboxBottom(e)&&this.loadNextPage()},this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{var t;const i=e.target.value,c=null===(t=this.options)||void 0===t?void 0:t.find(e=>String(e.label)===i);!c&&this.allowCustomOptions&&this.select instanceof ph?this.select.$emit("value-change",{label:i,value:i}):this.select.$emit("value-change",c)}}initialSelectedValueChanged(e,t){t!==e&&(t?this.select&&this.getDisplayForValue(t)===String(this.select.value||"")||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData()):this.select&&(this.initalSelectedValueInitialized=!1,this.clearData(),this.resetCombobox(),this.fetchData()))}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Ru(this,void 0,void 0,function*(){var t,i;if(e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=null!==(i=this.optionElement)&&void 0!==i?i:`${NC(this.select)}-option`,this.select.addEventListener("change",this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.infiniteScroll){if(this.isSnapshot=!0,this.maxRows=this.pageSize>0?this.pageSize:Gx.defaultPageSize,this.select.addEventListener("open-change",this.selectOpenChangeHandler),yield this.applyInfiniteScrollFetchMode(),!this.isConnected)return;p.queueUpdate(()=>this.attachListboxScrollListener())}this.fetchData(),this.valueField||SC.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')})}disconnectedCallback(){var e;super.disconnectedCallback(),this.resizeObserver.disconnect(),null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null,this.select.removeEventListener("open-change",this.selectOpenChangeHandler),this.select.removeEventListener("change",this.selectChangeHandler)}applyInfiniteScrollFetchMode(){return Ru(this,void 0,void 0,function*(){if(this.resourceName&&this.connect.isConnected)try{const e=yield this.resources.getResourceTypeFor(this.resourceName);this.isSnapshot=e!==nb.DATASERVER}catch(e){SC.warn(`Unable to determine the resource type for ${this.resourceName}`,e)}})}attachListboxScrollListener(){var e,t,i,c,o,s,a;this.isConnected&&(null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null!==(o=null!==(i=null===(t=this.select)||void 0===t?void 0:t.scrollableListbox)&&void 0!==i?i:null===(c=this.select)||void 0===c?void 0:c.listbox)&&void 0!==o?o:null===(a=null===(s=this.select)||void 0===s?void 0:s.shadowRoot)||void 0===a?void 0:a.querySelector(".listbox"),this.listboxElement?this.listboxElement.addEventListener("scroll",this.listboxScrollHandler):SC.warn("Unable to locate listbox element, infinite scroll will not be available."))}isNearListboxBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-Gx.scrollLoadThresholdPx}loadNextPage(){return Ru(this,void 0,void 0,function*(){if(this.loadingMoreRows||!this.canRequestMoreRows())return;this.loadingMoreRows=!0;const e=this.datasource.resourceType===nb.REQUEST_SERVER;try{yield this.requestMoreRows()}catch(e){return void(this.loadingMoreRows=!1)}e&&(this.loadingMoreRows=!1)})}topUpVisibleListbox(){this.infiniteScroll&&requestAnimationFrame(()=>{if(!this.isConnected)return;const e=this.listboxElement;e&&0!==e.clientHeight&&this.isNearListboxBottom(e)&&e.scrollHeight!==this.lastTopUpScrollHeight&&(this.lastTopUpScrollHeight=e.scrollHeight,this.loadNextPage())})}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof ph&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return Ru(this,void 0,void 0,function*(){(yield this.datasource.init(this.datasourceOptions(),!0))?function(e,t){const i=new _C;i.withExpression((new PC).withField(e.valueField).withValue(t).withSerialiser(DC.equals).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${i.build()}`:e.criteria=i.build()}(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.rowsSyncedWithStream.clear(),this.options=[],this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.loadingMoreRows=!1,this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof Gx||this.select.removeChild(e)}),this.select.value="",this.select.initialValue="")}checkOverflow(e){const t=e.shadowRoot.querySelector(".content");t&&(t.scrollWidth>t.clientWidth?e.setAttribute("title",e.textContent):e.removeAttribute("title"))}rowToOption(e){var t;return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}}renderListboxOptions(e){e.forEach(({value:e,label:t})=>{const i=document.createElement(this.optionElement);i.textContent=t||e,i.value=e,this.select.appendChild(i),this.resizeObserver.observe(i)})}removeEmptyDataOption(){this.emptyDataOption&&(this.emptyDataOption.remove(),this.emptyDataOption=null)}syncComponentData(e){this.loadingMoreRows=!1;const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.removeEmptyDataOption(),this.options=t.map(e=>this.rowToOption(e));const e=0===this.renderedOptionsCount;if(this.renderListboxOptions(this.options.slice(this.renderedOptionsCount)),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox(),!this.initalSelectedValueInitialized||this.select instanceof ph&&!this.select.async&&e){this.resetCombobox();const e=this.getInitialLabel();p.queueUpdate(()=>{this.select.value=String(e),e&&this.select instanceof ph&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else if(this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof ph&&!this.select.async)&&(this.resetCombobox(),p.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0),this.select&&!this.emptyDataOption){const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(e),this.emptyDataOption=e}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){var t;if(null==e||0!==e&&!e)return"";const i=null===(t=this.options)||void 0===t?void 0:t.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof ph?String(i?i.label:e):i?String(i.label):""}resetCombobox(){this.select&&this.select instanceof ph&&this.select.resetCombobox()}handleStreamInserts(e){var t,i;if(this.loadingMoreRows=!1,!(null==e?void 0:e.length))return;this.removeEmptyDataOption();const c=new Set((null!==(t=this.options)&&void 0!==t?t:[]).map(e=>String(e.value))),o=e.filter(e=>!c.has(String(e[this.valueField])));if(!o.length)return SC.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`),void(this.moreRowsAvailable=!1);const s=o.map(e=>this.rowToOption(e));this.options=[...null!==(i=this.options)&&void 0!==i?i:[],...s],this.renderListboxOptions(s),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox()}handleStreamDeletes(e){SC.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){SC.debug("handleStreamUpdates - Method not implemented.")}};Wx.defaultPageSize=20,Wx.scrollLoadThresholdPx=32,Ou([Zz],Wx.prototype,"resources",void 0),Ou([de({attribute:"label-field"})],Wx.prototype,"labelField",void 0),Ou([de({attribute:"option-element"})],Wx.prototype,"optionElement",void 0),Ou([de({attribute:"value-field"})],Wx.prototype,"valueField",void 0),Ou([de({attribute:"empty-data-label"})],Wx.prototype,"emptyDataLabel",void 0),Ou([de({mode:"boolean",attribute:"allow-custom-options"})],Wx.prototype,"allowCustomOptions",void 0),Ou([de({mode:"boolean",attribute:"infinite-scroll"})],Wx.prototype,"infiniteScroll",void 0),Ou([de({attribute:"page-size",converter:re})],Wx.prototype,"pageSize",void 0),Ou([b],Wx.prototype,"labelFormatter",void 0),Ou([b],Wx.prototype,"labelRowFormatter",void 0),Ou([b],Wx.prototype,"initialSelectedValue",void 0),Wx=Gx=Ou([Ce({name:"options-datasource"})],Wx);let Yx=class extends kC{constructor(){super(...arguments),this.isSnapshot=!0,this.baseCriteria=""}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return Ru(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||SC.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")')})}clearData(){this.select.options=[]}syncComponentData(e){var t;const i=(null!=e?e:Array.from(this.rowsSyncedWithStream.values())).map(e=>{var t;return{value:e[this.valueField],label:this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}});(null===(t=this.select)||void 0===t?void 0:t.async)&&(this.select.loading=!1),this.select.options=i}handleStreamInserts(e){SC.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){SC.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){SC.debug("handleStreamUpdates - Method not implemented.")}};Ou([de({attribute:"value-field"})],Yx.prototype,"valueField",void 0),Ou([de({attribute:"label-field"})],Yx.prototype,"labelField",void 0),Yx=Ou([Ce({name:"multiselect-datasource"})],Yx);const Kx=(e="foundation")=>K`<label part="label" for="display-field" class=${e=>{var t;return ti("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}><slot name="label" ${Qe({property:"defaultSlottedNodes",filter:_s})}></slot></label><div class="root" part="root" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control"><input id="display-field" part="filter-search" role="combobox" aria-haspopup="listbox" aria-controls="checkbox-container" aria-expanded=${e=>e.open?"true":"false"}tabindex="${e=>e.tabindex}" ?readonly=${e=>!e.search}@click=${e=>e.toggle()}?disabled="${e=>e.disabled}" ${Fe("filterSearchInput")}value=${Of(e=>e.filterSearchValue,"string","input")}placeholder="${e=>e.getDisplayValue}" autocomplete="off" @input=${(e,t)=>e.inputHandler()}@change=${(e,t)=>e.changeHandler(t.event)}/><div part="indicator" class="indicator" @click=${e=>!e.disabled&&e.toggle()}><svg viewBox="0 0 12 7" ${Fe("arrowIcon")}id="arrow-icon" class="${e=>ti(["disabled-svg",e.disabled])}" xmlns="http://www.w3.org/2000/svg"><path d="${"M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"}" /></svg></div>${Ve(e=>e.filterSearchValue&&e.selectedOptions.length,K`<div class="display-value">${e=>e.getDisplayValue}</div>`)}</div>${Ve(e=>e.loading,K`<${e}-progress slot="indicator"></${e}-progress>`)}<section class=${e=>ti("multiselect-dropdown",["resizable",e.resizable])} ${Fe("multiselectDropdown")}part="multiselect-dropdown">${Ve(e=>e.resizable,K`<div class="resize-button" @mousedown=${(e,t)=>e.handleResizeStart(t.event)}></div>`)} ${Ve(e=>e.all,K`<${e}-button class="select-all" @click=${e=>e.selectCheckboxAll()}?disabled="${(e,t)=>e.isAllOptionsDisabled}">${e=>e.areAllOptionsSelected?"Deselect All":"Select All"} ${e=>e.name}</${e}-button>`)}<ol id="checkbox-container" class="checkbox-container options" aria-multiselectable="true" part="options-ol"><li part="options-header-item" class=${e=>{var t;return ti("options-header-item",["options-header-item-hidden",!(null===(t=e.optionsHeaderSlottedNodes)||void 0===t?void 0:t.length)])}}><slot name="options-header" ${Qe({property:"optionsHeaderSlottedNodes",filter:_s})}></slot></li>${We(e=>e.filteredAvailableOptions,K`<li role="option" value=${(e,t)=>t.parent.getItemLabel(e)}part="option"><${e}-checkbox part="checkbox" class="checkbox" exportparts="label:checkbox-label" @keydown=${(e,t)=>t.parent.checkboxKeyDown(e,t.event)}@click=${(e,t)=>t.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parent.isOptionDisabled(e)}">${(e,t)=>{var i,c;return null===(c=null===(i=t.parent)||void 0===i?void 0:i.itemRenderer)||void 0===c?void 0:c.call(i,e,t.parent)}}</${e}-checkbox></li>`)}</ol>${Ve(e=>e.showCreatable,K`<${e}-button @click=${e=>e.addOption()}>Create&nbsp;"${e=>e.filterSearchValue}"</${e}-button>`)}</section></div><slot ${Qe({property:"slottedDatasource",filter:e=>e instanceof Yx})}></slot>`,Zx=K` ${Kx()} `,Qx=void 0,Xx={};class Jx extends Wt{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.resizable=!1,this.filterByContains=!1,this.filterSearchValue="",this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=Px.BELOW,this.itemRenderer=this.defaultItemRenderer,this.initialisedOptions=!1,this.isResizing=!1,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.handleResizeStart=e=>{this.resizable&&this.multiselectDropdown&&(e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.startX=e.clientX,this.startY=e.clientY,this.startWidth=this.multiselectDropdown.offsetWidth,this.startHeight=this.multiselectDropdown.offsetHeight,this.multiselectDropdown.classList.add("is-resizing"),document.addEventListener("mousemove",this.handleResizeMove),document.addEventListener("mouseup",this.handleResizeEnd))},this.handleResizeMove=e=>{if(!this.isResizing||!this.multiselectDropdown)return;e.preventDefault();const t=e.clientX-this.startX,i=e.clientY-this.startY,c=Math.max(250,this.startWidth+t),o=Math.max(100,this.startHeight+i);this.multiselectDropdown&&(this.multiselectDropdown.style.width=`${c}px`,this.multiselectDropdown.style.maxHeight=`${o}px`)},this.handleResizeEnd=()=>{this.isResizing=!1,document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd),this.multiselectDropdown&&(this.multiselectDropdown.classList.remove("is-resizing"),this.multiselectDropdown.style.setProperty("--custom-max-height",this.multiselectDropdown.style.maxHeight),this.multiselectDropdown.style.removeProperty("max-height"))}}debounceChanged(e,t){this.debouncedInputHandler=jx(this.asyncSetFilter,t)}openChanged(e,t){var i,c,o,s;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.arrowIcon)||void 0===i||i.classList.add("flipped"),null===(c=this.multiselectDropdown)||void 0===c||c.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(o=this.arrowIcon)||void 0===o||o.classList.remove("flipped"),null===(s=this.multiselectDropdown)||void 0===s||s.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===Px.ABOVE&&(null===(e=this.multiselectDropdown)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd)}defaultItemRenderer(e,t){return K` ${"string"==typeof e?K`<span part="option-label">${()=>t.getItemLabel(e)}</span>`:K`<span data-option-label-text=${()=>e.optionLabelText}style=${()=>e.labelStyle}part="option-label">${()=>t.getItemLabel(e)}</span>`} `}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,c=t.top,o=i-t.bottom;e=o<230&&c>o?Px.ABOVE:Px.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===Px.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===Px.BELOW)}optionValueGetter(e){return"string"==typeof e?e:e.value}optionLabelGetter(e){return"string"==typeof e?e:e.label}getItemLabel(e){let t;return e?(t="string"==typeof e?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get areAllOptionsSelected(){const e=this.getEnabledOptionsCount();return e>0&&this.selectedOptions.length===e}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&0===this.findExactMatchOptions().length}isOptionSelected(e){const t=this.optionValueGetter(e);return this.selectedOptions.some(i=>{if("object"==typeof e&&"object"==typeof e.value)try{return JSON.stringify(i)===JSON.stringify(t)}catch(e){return i===t}return i===t})}selectCheckboxOne(e){const t=this.optionValueGetter(e),i=this.selectedOptions.includes(t);this.selectedOptions=i?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}checkboxKeyDown(e,t){return" "===t.key&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){const e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){const e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>{var i,c;const o="string"==typeof t?t:null!==(i=this.optionLabelGetter(t))&&void 0!==i?i:this.optionValueGetter(t);return(null!==(c=null==o?void 0:o.toLowerCase())&&void 0!==c?c:"")===e})}setFilter(){const e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if("string"==typeof t)return t.toLowerCase().includes(e);const i=t.label.toLowerCase(),c="object"==typeof t.value?(o=t.value,Object.values(o).some(t=>t.toLowerCase().includes(e))):String(t.value).toLowerCase().includes(e);var o;return i.includes(e)||c})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?BC(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,SC.warn("Multiselect-datasource is not connected. Please add a datasource to use this functionality."))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){EC(e,this)&&(this.open=!1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Escape":if(this.open){this.open=!1;break}break;case"ArrowUp":case"ArrowDown":if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){const{clearSelectedValues:t=!0,clearFilterText:i=!0}=e;t&&(this.selectedOptions=[],this.$emit("selectionChange",this.selectedOptions)),i&&(this.filterSearchValue="",this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value="")),this.$emit("clear",{clearSelectedValues:t,clearFilterText:i})}}Ou([de],Jx.prototype,"name",void 0),Ou([de({mode:"boolean",attribute:"auto-position"})],Jx.prototype,"autoPosition",void 0),Ou([de({mode:"boolean"})],Jx.prototype,"all",void 0),Ou([de({mode:"boolean"})],Jx.prototype,"allSelected",void 0),Ou([de({mode:"boolean"})],Jx.prototype,"search",void 0),Ou([de({mode:"boolean"})],Jx.prototype,"disabled",void 0),Ou([de({mode:"boolean"})],Jx.prototype,"creatable",void 0),Ou([de({mode:"boolean"})],Jx.prototype,"async",void 0),Ou([de],Jx.prototype,"debounce",void 0),Ou([de({mode:"boolean"})],Jx.prototype,"resizable",void 0),Ou([de],Jx.prototype,"tabindex",void 0),Ou([de({mode:"boolean",attribute:"filter-by-contains"})],Jx.prototype,"filterByContains",void 0),Ou([b],Jx.prototype,"defaultSlottedNodes",void 0),Ou([b],Jx.prototype,"slottedDatasource",void 0),Ou([b],Jx.prototype,"valueFormatter",void 0),Ou([b],Jx.prototype,"loading",void 0),Ou([b],Jx.prototype,"filterSearchValue",void 0),Ou([b],Jx.prototype,"open",void 0),Ou([b],Jx.prototype,"options",void 0),Ou([b],Jx.prototype,"selectedOptions",void 0),Ou([b],Jx.prototype,"filteredAvailableOptions",void 0),Ou([b],Jx.prototype,"scrollContainer",void 0),Ou([de],Jx.prototype,"position",void 0),Ou([b],Jx.prototype,"onAllSelectedCallback",void 0),Ou([b],Jx.prototype,"itemRenderer",void 0),Ou([y],Jx.prototype,"getDisplayValue",null),Ou([y],Jx.prototype,"getPlaceholder",null),Ou([y],Jx.prototype,"isAllOptionsDisabled",null),Ou([y],Jx.prototype,"areAllOptionsSelected",null),Ou([y],Jx.prototype,"showCreatable",null),Ou([b],Jx.prototype,"optionsHeaderSlottedNodes",void 0),Jx.compose(Object.assign({baseName:"multiselect",template:Zx,styles:qx,shadowOptions:Qx},Xx));const eM=Me` .root{position: relative;width: 100%;min-width: 250px}.control-button{display: flex;justify-content: center;min-width: 31px;width: 31px;height: 31px;margin-left: calc(var(--design-unit) * 2px);color: var(--neutral-foreground-hint)}.control{cursor: pointer;position: relative;display: flex;justify-content: end;align-items: center;width: 100%;border-radius: calc(var(--control-corner-radius) * 1px)}.label{display: block;cursor: pointer;font-size: var(--type-ramp-base-font-size);line-height: var(--type-ramp-base-line-height);font-style: normal;font-weight: 700;margin: calc(var(--design-unit) * 2px) 0}.label-hidden{display: none}.control:hover .control-button, .control:hover .label{color: var(--neutral-foreground-rest)}button{pointer-events: none}.options{display: flex;flex-direction: column;position: absolute;height: max-content;overflow-y: hidden;margin-top: 5px;padding: calc((var(--design-unit) + 3) * 2px) calc((var(--design-unit) + 3) * 1px);border: 1px solid rgba(46 51 57 / 100%);border-radius: 4px;background: var(--neutral-fill-input-rest);width: 100%;max-height: 0;visibility: hidden;transition: max-height 0.4s ease 0s, visibility 0.4s ease 0s;z-index: 999}.option-content{display: flex;align-items: center;gap: calc(var(--design-unit) * 4px);width: 100%}.icon-container{display: flex;align-items: center;justify-content: center;width: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px + 4px );height: calc( ((var(--base-height-multiplier) * var(--design-unit)) + (var(--design-unit) * 2)) * 1px );border-radius: calc((var(--control-corner-radius) - 1) * 2px);background: var(--neutral-layer-2);box-sizing: border-box;box-shadow: 0 0 5px 0 rgba(0 0 0 / 35%);flex-shrink: 0}.text-content{display: flex;flex-direction: column;flex: 1}.svg-icon{height: 2em}.position-above{bottom: 100%}.checkbox-container{display: flex;flex-direction: column;overflow-y: scroll;scrollbar-width: thin;scrollbar-color: rgb(46 48 53) rgb(31 33 38)}span{border-bottom: calc(var(--stroke-width) * 1px) solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 2) * 2px) calc((var(--design-unit) + 3) * 1px);font-size: calc((var(--type-ramp-base-font-size) - 1px));color: var(--neutral-foreground-hint)}.multiselect-checkbox{min-width: fit-content;flex-direction: row-reverse;justify-content: space-between;align-items: flex-start;border-bottom: 1px solid;border-color: color-mix(in srgb, var(--neutral-fill-rest), transparent 50%);padding: calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) calc((var(--design-unit) + 3) * 1px) 0;margin: 0}.multiselect-checkbox:hover{background-color: rgb(45 47 51);cursor: pointer}.multiselect-checkbox::part(label){overflow-x: hidden;text-overflow: ellipsis}.multiselect-checkbox::part(control){min-width: calc( ( (var(--base-height-multiplier) + var(--density)) * var(--design-unit) / 2 + var(--design-unit) ) * 1px )}.checkbox-container .multiselect-checkbox[disabled]{cursor: not-allowed}.description{text-wrap: wrap;font-size: calc((var(--type-ramp-base-font-size) - 1px));margin: calc((var(--design-unit) + 3) * 1px) 0}#filter-search{padding: 5px}::-webkit-scrollbar{width: 12px}::-webkit-scrollbar-track{background: rgb(31 33 38)}::-webkit-scrollbar-thumb{width: 8px;border-radius: 10px;box-shadow: inset 0 0 6px rgba(0 0 0 / 30%);background-color: rgb(46 48 53);border: 3px solid rgb(31 33 38)}.visible{visibility: visible;max-height: ${450..toString()}px}`,tM=(e="foundation")=>K`<div class="root" part="root"><div class="control" part="control" @click=${e=>!e.disabled&&e.toggle()}><label part="label" for="control" class=${e=>{var t;return ti("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}><slot ${Qe({property:"defaultSlottedNodes",filter:_s})}></slot></label><${e}-button class="control-button" part="control-button"><slot name="button-content"><${e}-icon name="plus" variant="solid" size="lg"></${e}-icon></slot></${e}-button></div><div ${Fe("optionsElement")}class="options" part="options">${Ve(e=>e.search,K`<${e}-text-field id="filter-search" part="filter-search" value=${Of(e=>e.filterSearchValue,"string","input")}placeholder="${e=>e.getPlaceholder}" @input=${(e,t)=>e.setFilter()}@change=${(e,t)=>e.changeHandler(t.event)}></${e}-text-field>`)}<div class="checkbox-container" part="checkbox-container">${We(e=>e.filteredAvailableOptions,K`<span>${e=>e.type}</span>${We(e=>e.options,K`<${e}-checkbox class="multiselect-checkbox" part="multiselect-checkbox" @click=${(e,t)=>t.parentContext.parent.selectCheckboxOne(e)}@change=${(e,t)=>t.parentContext.parent.changeHandler(t.event)}?current-checked="${(e,t)=>t.parentContext.parent.isOptionSelected(e)}" ?disabled="${(e,t)=>t.parentContext.parent.isOptionDisabled(e)}"><div class="option-content">${Ve(e=>e.icon||e.svg,K`<div class="icon-container">${Ve(e=>e.icon,K`<${e}-icon style="color:${e=>e.iconColor||"#fff"}" name="${e=>e.icon}" size="xl"></${e}-icon>`)} ${Ve(e=>e.svg,K`<img class="svg-icon" src="${e=>e.svg}" alt="${e=>e.label}" />`)}</div>`)}<div class="text-content"><div class="option-label">${(e,t)=>t.parentContext.parent.getItemLabel(e)}</div>${Ve(e=>e.description,K`<p class="description">${e=>e.description}</p>`)}</div></div></${e}-checkbox>`)} `)}</div></div></div>`,iM=K` ${tM()} `,cM=void 0,oM={};class sM extends Wt{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=Px.BELOW}openChanged(e,t){var i,c;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.optionsElement)||void 0===i||i.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(c=this.optionsElement)||void 0===c||c.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===Px.ABOVE&&(null===(e=this.optionsElement)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}sortFilteredOptions(e){const t=(null!=e?e:this.options).reduce((e,t)=>{const i=t.type||"Other";return e[i]?e[i].options.push(t):e[i]={type:i,options:[t]},e},{});return Object.values(t)}optionsChanged(){this.filteredAvailableOptions=this.sortFilteredOptions()}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains("content-wrapper");)t=t.parentElement;if(t){const i=t.getBoundingClientRect(),c=this.getBoundingClientRect(),o=i.top+i.height/2;e=c.top<o?Px.BELOW:Px.ABOVE}else{const t=this.getBoundingClientRect(),i=window.innerHeight,c=t.top,o=i-t.bottom;e=o<t.height&&c>o?Px.ABOVE:Px.BELOW}}e===Px.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===Px.BELOW&&(this.optionsElement.classList.add("position-below"),this.optionsElement.classList.remove("position-above"))}optionGetter(e){return e.value}getItemLabel(e){let t;return e?(t=e.label||e.value||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){const t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}setFilter(){const e=this.options.filter(e=>{var t;const i=e.description,c=null!==(t=e.label)&&void 0!==t?t:e.value;return(null==i?void 0:i.toLowerCase().includes(this.filterSearchValue.toLowerCase()))||c.toLowerCase().includes(this.filterSearchValue.toLowerCase())?e:void 0});this.filteredAvailableOptions=this.sortFilteredOptions(e)}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){EC(e,this)&&(this.open=!1)}}Ou([de],sM.prototype,"name",void 0),Ou([de({mode:"boolean",attribute:"auto-position"})],sM.prototype,"autoPosition",void 0),Ou([de({mode:"boolean"})],sM.prototype,"search",void 0),Ou([de({mode:"boolean"})],sM.prototype,"disabled",void 0),Ou([b],sM.prototype,"defaultSlottedNodes",void 0),Ou([b],sM.prototype,"valueFormatter",void 0),Ou([b],sM.prototype,"filterSearchValue",void 0),Ou([b],sM.prototype,"open",void 0),Ou([b],sM.prototype,"options",void 0),Ou([b],sM.prototype,"selectedOptions",void 0),Ou([b],sM.prototype,"filteredAvailableOptions",void 0),Ou([b],sM.prototype,"position",void 0),Ou([y],sM.prototype,"getPlaceholder",null),sM.compose(Object.assign({baseName:"categorized-multiselect",template:iM,styles:eM,shadowOptions:cM},oM));const aM=(e,t)=>Dc(0,t),nM=(e,t)=>Me` ${dh()}`;class rM extends _c{}const lM=void 0,dM={checkedIndicator:'\n <svg\n aria-hidden="true"\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '};rM.compose(Object.assign({baseName:"checkbox",template:aM,styles:nM,shadowOptions:lM},dM));const hM=(e,t)=>Me` .combo-box-indicator{transition-property: transform;transition-duration: 0.2s;transition-timing-function: ease-out}:host([open]) .combo-box-indicator{transform: rotate(180deg)}${fh(e)}`,uM=(e,t)=>K`<template aria-activedescendant="${e=>e.activeDescendant}" class="${e=>e.open?"open":""} ${e=>e.disabled?"disabled":""} ${e=>e.position}" ?open="${e=>e.open}" @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><div class="control" part="control">${it(0,t)}<slot name="control"><input aria-activedescendant="${e=>e.activeDescendant}" aria-autocomplete="${e=>e.ariaAutoComplete||e.autocomplete}" aria-controls="${e=>e.ariaControls||e.listboxId}" aria-disabled="${e=>e.disabled?"true":"false"}" aria-expanded="${e=>e.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="${e=>e.ariaLabelledby}" aria-label="${e=>e.ariaLabel}" autocomplete="${e=>e.autocomplete}" class="selected-value" part="selected-value" placeholder="${e=>e.placeholder}" role="combobox" type="text" ?disabled="${e=>e.disabled}" :value="${e=>e.value}" @input="${(e,t)=>e.inputHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}" ${Fe("control")}/><div class="indicator" part="indicator" aria-hidden="true"><slot name="indicator">${t.indicator||""}</slot></div></slot>${tt(0,t)}</div><div class="listbox" id="${e=>e.listboxId}" part="listbox" role="listbox" ?disabled="${e=>e.disabled}" ?hidden="${e=>!e.open}" ${Fe("listbox")}><slot ${Fe("slottedDatasource")} ${Qe({filter:Uc.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}></slot></div></template>`;var fM,pM;class mM extends ph{constructor(){super(...arguments),fM.set(this,void 0),pM.set(this,!1),this.needManualChangeEventDispatch=!1,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.filterMode="startsWith",this.scrollToSelectedWhenOpening=!1,this.scrollToSelectedWhenOpeningOptions={behavior:"auto",block:"nearest"},this.scrollWhenSelectionChanges=!1,this.scrollWhenSelectionChangesOptions={behavior:"auto",block:"center"},this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value="",this.control.value="",this.filter="",this.filterOptions()}}get activeDescendant(){var e,t;if(this.selectedOptions&&0!==this.selectedOptions.length)return this.ariaActiveDescendant=null===(e=this.selectedOptions[0])||void 0===e?void 0:e.id,null===(t=this.selectedOptions[0])||void 0===t?void 0:t.id}debounceChanged(e,t){this.debouncedInputHandler=jx(this.asyncSetFilter,t)}get scrollableListbox(){var e,t;return null!==(e=this.listbox)&&void 0!==e?e:null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".listbox")}openChanged(){super.openChanged(),this.$emit("open-change",{open:this.open}),this.open?this.scrollToSelectedWhenOpening&&setTimeout(()=>{const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollToSelectedWhenOpeningOptions)},500):(this.manuallyDispatchChangeEvent(),this.filter="",this.filterOptions())}get value(){return v.track(this,"value"),this._ourValue}set value(e){var t,i,c;if(void 0===e)return;const o=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){const o=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===String(e).toLowerCase(),s=this.options?this.options.findIndex(o):-1,a=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,n=null===(i=this.options[s])||void 0===i?void 0:i.text;this.selectedIndex=n&&n!==a?s:this.selectedIndex,e&&""!==e.trim()&&-1===s&&(e=(null===(c=this.firstSelectedOption)||void 0===c?void 0:c.text)||e)}o!==e&&(this._ourValue=e,super.valueChanged(o,e),v.notify(this,"value"))}slottedOptionsChanged(e,t){this.enableAsyncForInfiniteScrollDatasource(),super.slottedOptionsChanged(e,t),this.updateValue(!1)}enableAsyncForInfiniteScrollDatasource(){var e;if(this.async)return;const t=null===(e=this.slottedDatasource)||void 0===e?void 0:e.assignedNodes().find(e=>e instanceof Wx);(null==t?void 0:t.infiniteScroll)&&(this.async=!0)}filterOptions(){if(this.async)return this.filteredOptions=[...this._options],void this._options.forEach(e=>e.hidden=!1);this.autocomplete&&this.autocomplete!==Xc||(this.filter="");const e=this.filter,t=this.caseSensitive?e:e.toLowerCase();this.filteredOptions=this._options.filter(e=>{const i=this.caseSensitive?e.text:e.text.toLowerCase();return"contains"===this.filterMode?i.includes(t):i.startsWith(t)}),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled)if(EC(e,this))this.open=!1;else{if($C(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!$C(e,this.control))return super.clickHandler(e)}}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":if(Uu(this,pM,this.open,"f"),!this.open)return this.open=!0,!0;break;case"ArrowDown":case"ArrowUp":if(!this.open)return this.open=!0,!0;if(this.scrollWhenSelectionChanges){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollWhenSelectionChangesOptions)}break;case"Escape":if(this.control.value!==this.currentValue)return this.filter="",this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),void(this.open=!1);if(!this.open)return!0}const i=super.keydownHandler(e);return"Enter"!==t?i:void 0}keyupHandler(e){var t;const i=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(i){case"Enter":return!Bu(this,pM,"f");case"ArrowDown":case"ArrowUp":this.open&&this.firstSelectedOption&&this.autocomplete===Qc&&(this.needManualChangeEventDispatch=!0,this.currentValue=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value);break;case"Home":case"End":return;case"Backspace":case"Delete":const i=super.keyupHandler(e);return this.selectItemByValue(this.control.value),i}return super.keyupHandler(e)}get indicator(){return Bu(this,fM,"f")||Uu(this,fM,this.shadowRoot.querySelector('[part="indicator"]'),"f"),Bu(this,fM,"f")}selectItemByValue(e){var t,i,c;this.selectedIndex=null!==(i=null===(t=this.options)||void 0===t?void 0:t.findIndex(t=>t.text===e))&&void 0!==i?i:-1,null===(c=this.options)||void 0===c||c.forEach((e,t)=>e.selected=t===this.selectedIndex)}inputHandler(e){this.async?this.debouncedInputHandler():super.inputHandler(e)}asyncSetFilter(){const e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof Wx);if(t.length>0){const i=t[0];null==e||""===e?i.criteria=i.baseCriteria||"":BC(i,e),p.queueUpdate(()=>{this.control.value=e})}else SC.warn("Options-datasource is not connected. Please add a datasource to use this functionality.")}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===Qc&&(this.dispatchEvent(new Event("change",{bubbles:!0})),this.needManualChangeEventDispatch=!1)}}fM=new WeakMap,pM=new WeakMap,Ou([b],mM.prototype,"activeDescendant",null),Ou([b],mM.prototype,"slottedDatasource",void 0),Ou([de({mode:"boolean"})],mM.prototype,"async",void 0),Ou([de],mM.prototype,"debounce",void 0),Ou([de({mode:"boolean",attribute:"case-sensitive"})],mM.prototype,"caseSensitive",void 0),Ou([de({mode:"boolean",attribute:"ignore-input-click"})],mM.prototype,"ignoreInputClick",void 0),Ou([de({attribute:"filter-mode"})],mM.prototype,"filterMode",void 0),Ou([de({mode:"boolean",attribute:"scroll-to-selected-when-opening"})],mM.prototype,"scrollToSelectedWhenOpening",void 0),Ou([b],mM.prototype,"scrollToSelectedWhenOpeningOptions",void 0),Ou([de({mode:"boolean",attribute:"scroll-when-selection-changes"})],mM.prototype,"scrollWhenSelectionChanges",void 0),Ou([b],mM.prototype,"scrollWhenSelectionChangesOptions",void 0);const gM={delegatesFocus:!0,mode:"open"},vM={indicator:'\n <svg\n class="combo-box-indicator"\n part="combo-box-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '};mM.compose(Object.assign({baseName:"combobox",template:uM,styles:hM,shadowOptions:gM},vM));const bM=(e,t)=>Me` :host{--light-size: 12px;--height: calc(var(--design-unit) * 2px + var(--light-size));display: flex;justify-content: center;align-items: center;width: 100%;height: var(--height);margin: calc(var(--design-unit) * 2px) 0;/* https://www.colorxs.com/color/traffic-light-green-2032-20 */ --green: 50 164 49;--trafic-light-green: rgb(var(--green));--trafic-light-green-glow: rgb(var(--green) / 40%) 0 0 4px 4px, rgb(var(--green) / 20%) 0 0 8px 8px;/* https://www.colorxs.com/color/ral-3020-traffic-red */ --red: 187 30 16;--trafic-light-red: rgb(var(--red));--trafic-light-red-glow: rgb(var(--red) / 40%) 0 0 4px 4px, rgb(var(--red) / 20%) 0 0 8px 8px}.light{height: var(--light-size);width: var(--light-size);margin: 1rem;border-radius: 100%}.green{background: var(--trafic-light-green);box-shadow: var(--trafic-light-green-glow)}.red{background: var(--trafic-light-red);box-shadow: var(--trafic-light-red-glow)}.label{font-size: small;color: grey;overflow: hidden;text-overflow: ellipsis;white-space: nowrap}`,yM=K`<div class=${e=>ti(["light",!0],[e.colour,!0])}></div>${Ve(e=>e.showLabel,K`<div class="label">${e=>e.label}</div>`)} `;class zM extends Wt{constructor(){super(...arguments),this.showLabel=!1,this.label="disconnected",this.colour="red"}connectedCallback(){super.connectedCallback(),this.subscription=this.connect.isConnectedSubject.subscribe(e=>{this.label=this.getLabel(e),this.colour=e?"green":"red"})}disconnectedCallback(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}getLabel(e){if(!e)return"disconnected";return`${this.session.getSessionStorageItem("hostUrl")} ✔`}}Ou([bz],zM.prototype,"connect",void 0),Ou([Mb],zM.prototype,"session",void 0),Ou([de({mode:"boolean",attribute:"show-label"})],zM.prototype,"showLabel",void 0),Ou([b],zM.prototype,"label",void 0),Ou([b],zM.prototype,"colour",void 0),zM.compose({baseName:"connection-indicator",template:yM,styles:bM});(class extends Mc{}).compose(Object.assign({baseName:"data-grid",template:(e,t)=>xc(e),styles:(e,t)=>Me` ${mh()}`,shadowOptions:void 0},{}));(class extends kc{}).compose(Object.assign({baseName:"data-grid-cell",template:$c,styles:(e,t)=>Me` ${vh()}`,shadowOptions:void 0},{}));(class extends Lc{}).compose(Object.assign({baseName:"data-grid-row",template:Ec,styles:(e,t)=>Me` ${gh()}`,shadowOptions:void 0},{}));const CM=Me` :host{position: relative}.date-toggle::part(control){cursor: pointer}.date-toggle::part(label){cursor: pointer}.calendar-dropdown{display: none;width: 300px;z-index: 999;position: absolute;top: 100%;left: 50%;transform: translate(-50%, 8px);margin: 10px 0 0;padding: 20px;background: var(--neutral-fill-rest);border-radius: calc(var(--control-corner-radius) * 1px);box-shadow: 0 0 8px rgb(0 0 0 / 20%)}.calendar-dropdown.hide-weekends{width: 215px}.calendar-dropdown.top{top: auto;bottom: 100%;margin: 0 0 5px;transform: translate(-50%, -8px)}.calendar-dropdown.left{top: 50%;left: 0;margin: 0 0 0 5px;transform: translate(calc(-8px + -100%), -50%)}.calendar-dropdown.right{top: 50%;left: 100%;transform: translate(8px, -50%)}.calendar-dropdown.visible{display: block}.calendar-dropdown.inline{display: block;position: static;z-index: auto;margin-top: 5px;transform: none}.header{display: flex;justify-content: space-between;align-items: center;margin: 0 0 10px}.header h3{margin: 0;text-transform: capitalize;font-weight: bold;color: var(--neutral-foreground-rest)}.header .icon-button{height: auto;padding: 0;min-width: auto}.header .months-arrows{display: flex;gap: calc(var(--design-unit) * 2px)}.week-days{display: grid;grid-template-columns: repeat(7, 1fr);grid-gap: 5px;margin-bottom: 10px;color: var(--neutral-foreground-rest)}.week-days span{display: flex;justify-content: center;align-items: center;font-size: 14px;font-weight: bold;text-transform: capitalize}.week-days span.disabled{opacity: 60%}.month-days{display: grid;grid-template-columns: repeat(7, 1fr);grid-gap: 5px}.week-days.hide-weekends, .month-days.hide-weekends{grid-template-columns: repeat(5, 1fr)}.month-day{padding: 8px 5px;color: #808080;background: none;display: flex;justify-content: center;align-items: center;border-radius: calc(var(--control-corner-radius) * 4px);cursor: pointer;border: none}.month-day.current{opacity: 100%;color: var(--neutral-foreground-hint)}.month-day.selected{background: var(--accent-foreground-rest);color: var(--neutral-foreground-rest)}.month-day:hover:not(:disabled){background: var(--neutral-stroke-hover);color: var(--neutral-foreground-rest)}.month-day[disabled]{opacity: 50%;cursor: not-allowed}.date-toggle[readonly] .label{cursor: pointer}`,LM=[1,7],xM=e=>K`<${e}-text-field data-test-id="date-picker" readonly :value="${e=>e.inputValue}" placeholder="${e=>e.inputPlaceholder}" part="date-toggle" class="date-toggle" @click="${e=>e.toggleCalendar()}">${e=>e.label}<div class="input-icon-container" part="input-icon-container" slot="end"><${e}-icon variant="regular" name="calendar-alt" size="sm"></${e}-icon></div></${e}-text-field><div class="calendar-dropdown ${e=>e.calendarDropdownClasses} ${e=>e.position}"><div class="header"><h3>${e=>e.currentMonth} ${e=>e.currentYear}</h3><div class="months-arrows"><${e}-button class="icon-button" appearance="accent" @click="${e=>e.prevMonth()}" aria-label="previous month"><${e}-icon name="angle-left"></${e}-icon></${e}-button><${e}-button class="icon-button" appearance="accent" @click="${e=>e.nextMonth()}" aria-label="next month"><${e}-icon name="angle-right"></${e}-icon></${e}-button></div></div><div class="week-days ${e=>ti(["hide-weekends",e.hideWeekends])}">${We(e=>{var t;return null===(t=e.calendar)||void 0===t?void 0:t.weekDays},K` ${Ve((e,t)=>!t.parent.hideWeekends||-1===LM.indexOf(t.index+1),K`<span class="${(e,t)=>ti(["disabled",-1!==t.parent.disabledDaysOfWeek.indexOf(t.index+1)])}">${(e,t)=>e.substring(0,t.parent.substringNumber)}</span>`)} `,{positioning:!0})}</div><div class="month-days ${e=>ti(["hide-weekends",e.hideWeekends])}">${We(e=>e.monthList,K` ${Ve((e,t)=>!t.parent.hideWeekends||-1===LM.indexOf(e.dayNumber),K`<button ?disabled="${(e,t)=>-1!==t.parent.disabledDaysOfWeek.indexOf(e.dayNumber)}" class="month-day ${(e,t)=>t.parent.isSelectedDate(e)?"selected":""} ${(e,t)=>e.monthNumber===t.parent.calendar.month.number?"current":""}" @click=${(e,t)=>t.parent.selectDay(e)}>${e=>e.date}</button>`)} `)}</div><slot name="bottom"></slot></div>`,MM=K` ${e=>xM(NC(e))} `;var wM,SM={exports:{}};function kM(){return wM||(wM=1,function(e){e.exports=function(){var e=1e3,t=6e4,i=36e5,c="millisecond",o="second",s="minute",a="hour",n="day",r="week",l="month",d="quarter",h="year",u="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}},v=function(e,t,i){var c=String(e);return!c||c.length>=t?e:""+Array(t+1-c.length).join(i)+e},b={s:v,z:function(e){var t=-e.utcOffset(),i=Math.abs(t),c=Math.floor(i/60),o=i%60;return(t<=0?"+":"-")+v(c,2,"0")+":"+v(o,2,"0")},m:function e(t,i){if(t.date()<i.date())return-e(i,t);var c=12*(i.year()-t.year())+(i.month()-t.month()),o=t.clone().add(c,l),s=i-o<0,a=t.clone().add(c+(s?-1:1),l);return+(-(c+(i-o)/(s?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:h,w:r,d:n,D:u,h:a,m:s,s:o,ms:c,Q:d}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",z={};z[y]=g;var C="$isDayjsObject",L=function(e){return e instanceof S||!(!e||!e[C])},x=function e(t,i,c){var o;if(!t)return y;if("string"==typeof t){var s=t.toLowerCase();z[s]&&(o=s),i&&(z[s]=i,o=s);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var n=t.name;z[n]=t,o=n}return!c&&o&&(y=o),o||!c&&y},M=function(e,t){if(L(e))return e.clone();var i="object"==typeof t?t:{};return i.date=e,i.args=arguments,new S(i)},w=b;w.l=x,w.i=L,w.w=function(e,t){return M(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var S=function(){function g(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[C]=!0}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,i=e.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var c=t.match(p);if(c){var o=c[2]-1||0,s=(c[7]||"0").substring(0,3);return i?new Date(Date.UTC(c[1],o,c[3]||1,c[4]||0,c[5]||0,c[6]||0,s)):new Date(c[1],o,c[3]||1,c[4]||0,c[5]||0,c[6]||0,s)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return w},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(e,t){var i=M(e);return this.startOf(t)<=i&&i<=this.endOf(t)},v.isAfter=function(e,t){return M(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<M(e)},v.$g=function(e,t,i){return w.u(e)?this[t]:this.set(i,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var i=this,c=!!w.u(t)||t,d=w.p(e),f=function(e,t){var o=w.w(i.$u?Date.UTC(i.$y,t,e):new Date(i.$y,t,e),i);return c?o:o.endOf(n)},p=function(e,t){return w.w(i.toDate()[e].apply(i.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),i)},m=this.$W,g=this.$M,v=this.$D,b="set"+(this.$u?"UTC":"");switch(d){case h:return c?f(1,0):f(31,11);case l:return c?f(1,g):f(0,g+1);case r:var y=this.$locale().weekStart||0,z=(m<y?m+7:m)-y;return f(c?v-z:v+(6-z),g);case n:case u:return p(b+"Hours",0);case a:return p(b+"Minutes",1);case s:return p(b+"Seconds",2);case o:return p(b+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var i,r=w.p(e),d="set"+(this.$u?"UTC":""),f=(i={},i[n]=d+"Date",i[u]=d+"Date",i[l]=d+"Month",i[h]=d+"FullYear",i[a]=d+"Hours",i[s]=d+"Minutes",i[o]=d+"Seconds",i[c]=d+"Milliseconds",i)[r],p=r===n?this.$D+(t-this.$W):t;if(r===l||r===h){var m=this.clone().set(u,1);m.$d[f](p),m.init(),this.$d=m.set(u,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[w.p(e)]()},v.add=function(c,d){var u,f=this;c=Number(c);var p=w.p(d),m=function(e){var t=M(f);return w.w(t.date(t.date()+Math.round(e*c)),f)};if(p===l)return this.set(l,this.$M+c);if(p===h)return this.set(h,this.$y+c);if(p===n)return m(1);if(p===r)return m(7);var g=(u={},u[s]=t,u[a]=i,u[o]=e,u)[p]||1,v=this.$d.getTime()+c*g;return w.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,i=this.$locale();if(!this.isValid())return i.invalidDate||f;var c=e||"YYYY-MM-DDTHH:mm:ssZ",o=w.z(this),s=this.$H,a=this.$m,n=this.$M,r=i.weekdays,l=i.months,d=i.meridiem,h=function(e,i,o,s){return e&&(e[i]||e(t,c))||o[i].slice(0,s)},u=function(e){return w.s(s%12||12,e,"0")},p=d||function(e,t,i){var c=e<12?"AM":"PM";return i?c.toLowerCase():c};return c.replace(m,function(e,c){return c||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return w.s(t.$y,4,"0");case"M":return n+1;case"MM":return w.s(n+1,2,"0");case"MMM":return h(i.monthsShort,n,l,3);case"MMMM":return h(l,n);case"D":return t.$D;case"DD":return w.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(i.weekdaysMin,t.$W,r,2);case"ddd":return h(i.weekdaysShort,t.$W,r,3);case"dddd":return r[t.$W];case"H":return String(s);case"HH":return w.s(s,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return p(s,a,!0);case"A":return p(s,a,!1);case"m":return String(a);case"mm":return w.s(a,2,"0");case"s":return String(t.$s);case"ss":return w.s(t.$s,2,"0");case"SSS":return w.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(c,u,f){var p,m=this,g=w.p(u),v=M(c),b=(v.utcOffset()-this.utcOffset())*t,y=this-v,z=function(){return w.m(m,v)};switch(g){case h:p=z()/12;break;case l:p=z();break;case d:p=z()/3;break;case r:p=(y-b)/6048e5;break;case n:p=(y-b)/864e5;break;case a:p=y/i;break;case s:p=y/t;break;case o:p=y/e;break;default:p=y}return f?p:w.a(p)},v.daysInMonth=function(){return this.endOf(l).$D},v.$locale=function(){return z[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var i=this.clone(),c=x(e,t,!0);return c&&(i.$L=c),i},v.clone=function(){return w.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),k=S.prototype;return M.prototype=k,[["$ms",c],["$s",o],["$m",s],["$H",a],["$W",n],["$M",l],["$y",h],["$D",u]].forEach(function(e){k[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),M.extend=function(e,t){return e.$i||(e(t,S,M),e.$i=!0),M},M.locale=x,M.isDayjs=L,M.unix=function(e){return M(1e3*e)},M.en=z[y],M.Ls=z,M.p={},M}()}(SM)),SM.exports}var EM,$M=sp(kM()),NM={exports:{}};var AM,OM=(EM||(EM=1,function(e){e.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,c=/\d\d/,o=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,a={},n=function(e){return(e=+e)+(e>68?1900:2e3)},r=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),i=60*t[1]+(+t[2]||0);return 0===i?0:"+"===t[0]?-i:i}(e)}],d=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},h=function(e,t){var i,c=a.meridiem;if(c){for(var o=1;o<=24;o+=1)if(e.indexOf(c(o,0,t))>-1){i=o>12;break}}else i=e===(t?"pm":"PM");return i},u={A:[s,function(e){this.afternoon=h(e,!1)}],a:[s,function(e){this.afternoon=h(e,!0)}],Q:[i,function(e){this.month=3*(e-1)+1}],S:[i,function(e){this.milliseconds=100*+e}],SS:[c,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[o,r("seconds")],ss:[o,r("seconds")],m:[o,r("minutes")],mm:[o,r("minutes")],H:[o,r("hours")],h:[o,r("hours")],HH:[o,r("hours")],hh:[o,r("hours")],D:[o,r("day")],DD:[c,r("day")],Do:[s,function(e){var t=a.ordinal,i=e.match(/\d+/);if(this.day=i[0],t)for(var c=1;c<=31;c+=1)t(c).replace(/\[|\]/g,"")===e&&(this.day=c)}],w:[o,r("week")],ww:[c,r("week")],M:[o,r("month")],MM:[c,r("month")],MMM:[s,function(e){var t=d("months"),i=(d("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(i<1)throw new Error;this.month=i%12||i}],MMMM:[s,function(e){var t=d("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,r("year")],YY:[c,function(e){this.year=n(e)}],YYYY:[/\d{4}/,r("year")],Z:l,ZZ:l};function f(i){var c,o;c=i,o=a&&a.formats;for(var s=(i=c.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,i,c){var s=c&&c.toUpperCase();return i||o[c]||e[c]||o[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})).match(t),n=s.length,r=0;r<n;r+=1){var l=s[r],d=u[l],h=d&&d[0],f=d&&d[1];s[r]=f?{regex:h,parser:f}:l.replace(/^\[|\]$/g,"")}return function(e){for(var t={},i=0,c=0;i<n;i+=1){var o=s[i];if("string"==typeof o)c+=o.length;else{var a=o.regex,r=o.parser,l=e.slice(c),d=a.exec(l)[0];r.call(t,d),e=e.replace(d,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var i=e.hours;t?i<12&&(e.hours+=12):12===i&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,i){i.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(n=e.parseTwoDigitYear);var c=t.prototype,o=c.parse;c.parse=function(e){var t=e.date,c=e.utc,s=e.args;this.$u=c;var n=s[1];if("string"==typeof n){var r=!0===s[2],l=!0===s[3],d=r||l,h=s[2];l&&(h=s[2]),a=this.$locale(),!r&&h&&(a=i.Ls[h]),this.$d=function(e,t,i,c){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var o=f(t)(e),s=o.year,a=o.month,n=o.day,r=o.hours,l=o.minutes,d=o.seconds,h=o.milliseconds,u=o.zone,p=o.week,m=new Date,g=n||(s||a?1:m.getDate()),v=s||m.getFullYear(),b=0;s&&!a||(b=a>0?a-1:m.getMonth());var y,z=r||0,C=l||0,L=d||0,x=h||0;return u?new Date(Date.UTC(v,b,g,z,C,L,x+60*u.offset*1e3)):i?new Date(Date.UTC(v,b,g,z,C,L,x)):(y=new Date(v,b,g,z,C,L,x),p&&(y=c(y).week(p).toDate()),y)}catch(e){return new Date("")}}(t,n,c,i),this.init(),h&&!0!==h&&(this.$L=this.locale(h).$L),d&&t!=this.format(n)&&(this.$d=new Date("")),a={}}else if(n instanceof Array)for(var u=n.length,p=1;p<=u;p+=1){s[1]=n[p-1];var m=i.apply(this,s);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}p===u&&(this.$d=new Date(""))}else o.call(this,e)}}}()}(NM)),NM.exports),TM=sp(OM),RM={exports:{}};var IM,DM=(AM||(AM=1,function(e){e.exports=function(e,t,i){var c=t.prototype,o=function(e){return e&&(e.indexOf?e:e.s)},s=function(e,t,i,c,s){var a=e.name?e:e.$locale(),n=o(a[t]),r=o(a[i]),l=n||r.map(function(e){return e.slice(0,c)});if(!s)return l;var d=a.weekStart;return l.map(function(e,t){return l[(t+(d||0))%7]})},a=function(){return i.Ls[i.locale()]},n=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})}(e.formats[t.toUpperCase()])},r=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):s(e,"months")},monthsShort:function(t){return t?t.format("MMM"):s(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):s(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):s(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):s(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return n(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};c.localeData=function(){return r.bind(this)()},i.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(t){return n(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},i.months=function(){return s(a(),"months")},i.monthsShort=function(){return s(a(),"monthsShort","months",3)},i.weekdays=function(e){return s(a(),"weekdays",null,null,e)},i.weekdaysShort=function(e){return s(a(),"weekdaysShort","weekdays",3,e)},i.weekdaysMin=function(e){return s(a(),"weekdaysMin","weekdays",2,e)}}}(RM)),RM.exports),FM=sp(DM),HM={exports:{}};var _M,PM=(IM||(IM=1,function(e){var t;e.exports=(t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},function(e,i,c){var o=i.prototype,s=o.format;c.en.formats=t,o.format=function(e){void 0===e&&(e="YYYY-MM-DDTHH:mm:ssZ");var i=this.$locale().formats,c=function(e,i){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,c,o){var s=o&&o.toUpperCase();return c||i[o]||t[o]||i[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})}(e,void 0===i?{}:i);return s.call(this,c)}})}(HM)),HM.exports),VM=sp(PM),BM={exports:{}};var UM=(_M||(_M=1,function(e){e.exports=function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}}(BM)),BM.exports),jM=sp(UM);class qM{constructor(e,t="default"){e=null!=e?e:new Date,this.Date=e,this.date=e.getDate(),this.day=e.toLocaleString(t,{weekday:"long"}),this.dayNumber=e.getDay()+1,this.dayShort=e.toLocaleString(t,{weekday:"short"}),this.year=e.getFullYear(),this.yearShort=Number(e.toLocaleString(t,{year:"2-digit"})),this.month=e.toLocaleString(t,{month:"long"}),this.monthShort=e.toLocaleString(t,{month:"short"}),this.monthNumber=e.getMonth()+1,this.timestamp=e.getTime()}}$M.extend(jM);class GM{constructor(e=null,t="default"){const i=new qM(e,t);this.lang=t,this.name=i.month,this.number=i.monthNumber,this.year=i.year,this.numberOfDays=[31,28,31,30,31,30,31,31,30,31,30,31][this.number-1],2===this.number&&(this.numberOfDays+=$M(i.date).isLeapYear()?1:0)}getDay(e){return new qM(new Date(this.year,this.number-1,e),this.lang)}}$M.extend(jM);class WM{constructor(e=null,t=null,i="default"){this.weekDays=Array.from({length:7}),this.today=new qM(null,i),this.year=null!=e?e:this.today.year,this.month=new GM(new Date(this.year,(t||this.today.monthNumber)-1),i),this.lang=i,this.weekDays.forEach((e,t)=>{const i=this.month.getDay(t);this.weekDays[i.dayNumber-1]=i.day})}getMonth(e){return new GM(new Date(this.year,e-1),this.lang)}getPreviousMonth(){return 1===this.month.number?new GM(new Date(this.year-1,11),this.lang):new GM(new Date(this.year,this.month.number-2),this.lang)}getNextMonth(){return 1===this.month.number?new GM(new Date(this.year+1,0),this.lang):new GM(new Date(this.year,this.month.number+2),this.lang)}goToDate(e,t){this.month=new GM(new Date(t,e-1),this.lang),this.year=t}goToNextYear(){this.year+=1,this.month=new GM(new Date(this.year,0),this.lang)}goToPreviousYear(){this.year-=1,this.month=new GM(new Date(this.year,11),this.lang)}goToNextMonth(){if(12===this.month.number)return this.goToNextYear();this.month=new GM(new Date(this.year,this.month.number+1-1),this.lang)}goToPreviousMonth(){if(1===this.month.number)return this.goToPreviousYear();this.month=new GM(new Date(this.year,this.month.number-1-1),this.lang)}}var YM,KM={exports:{}};function ZM(e){return null!=e&&""!==String(e).trim()}YM||(YM=1,function(e){e.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e),c={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}};return i.default.locale(c,null,!0),c}(kM())}(KM)),$M.extend(TM),$M.extend(FM),$M.extend(VM);const QM="MM-DD-YYYY";const XM=[1,2,3,4,5,6,7],JM=(e,t,i)=>{if(c=t,-1===e.indexOf(c.dayNumber))return t;var c;const o=XM.filter(t=>-1===e.indexOf(t));let s=o.find(e=>e>t.dayNumber);s||(s=Math.min(...o));const a=t.dayNumber<s?s-t.dayNumber:s-t.dayNumber+7;return o.length?new qM(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,a),i):(yf.warn("Date picker disabled days - all days of week have been disabled"),t)};class ew extends Wt{constructor(){super(...arguments),this.format=QM,this.lang="en-US",this.visible=!1,this.position="bottom",this.disabledDaysOfWeek=[],this.suppressValueChanged=!1,this.cachedFormat=QM,this.clickOutside=e=>this.handleClickOutside(e),this.keydownOutside=e=>this.handleKeydownOutside(e)}formatChanged(e,t){!this.useLocaleFormat&&t&&this.cacheUserFormat(t),t&&this.calendar&&ZM(this.value)&&(this.formatDate=$M(this.currentDate.Date).format(t))}langChanged(){this.applyEffectiveLangChange()}useLocaleFormatChanged(e,t){this.calendar&&(t&&!e?this.cacheUserFormat(this.format):!t&&e&&this.restoreUserFormat(),this.applyEffectiveLangChange())}inlineCalendarChanged(){this.inlineCalendar?(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)):this.visible&&(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)),this.toggleVisibility()}hideWeekendsCalendarChanged(){this.toggleVisibility()}valueChanged(e,t){this.suppressValueChanged||this.calendar&&(ZM(t)?this.applyValue(t):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate())}disconnectedCallback(){document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside),super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),$M.extend(TM),$M.extend(VM),$M.extend(FM),this.substringNumber=3,this.useLocaleFormat&&(this.cacheUserFormat(this.format),this.applyLocaleFormat());const e=this.value;!this.allowEmpty||ZM(e)?ZM(e)?this.applyValue(e):this.initializeWithDefaultDate():this.initializeEmpty()}clear(){this.allowEmpty&&this.clearToEmpty(!0)}get inputValue(){return ZM(this.value)?this.formatDate:""}get inputPlaceholder(){var e;return!this.allowEmpty||ZM(this.value)?"":(null===(e=this.placeholder)||void 0===e?void 0:e.trim())||this.format.replace(/YYYY/g,"yyyy").replace(/YY(?!Y)/g,"yy").replace(/DD/g,"dd").replace(/D(?!D)/g,"d").replace(/MM/g,"mm").replace(/M(?!M)/g,"m")}get effectiveLang(){return this.useLocaleFormat&&!this.hasAttribute("lang")?"undefined"!=typeof navigator&&navigator.language?navigator.language:"en":this.lang}applyLocaleFormat(){this.format=function(e="en"){const t=function(e){const t=((null==e?void 0:e.trim())||"en").toLowerCase().replace(/_/g,"-");return"en-us"===t||"en"===t?"en":"en-gb"===t?"en-gb":t}(e),i=$M().locale(t),c=i.locale();return(o=t)!==(s=c)&&s!==o.split("-")[0]?$M().locale("en").localeData().longDateFormat("L")||"MM/DD/YYYY":i.localeData().longDateFormat("L")||"MM/DD/YYYY";var o,s}(this.effectiveLang)}cacheUserFormat(e){const t=null==e?void 0:e.trim();t&&(this.cachedFormat=t)}restoreUserFormat(){this.format=this.cachedFormat}applyEffectiveLangChange(){var e,t;if(!this.calendar)return;this.useLocaleFormat&&this.applyLocaleFormat();const i=this.calendar.year,c=this.calendar.month.number,o=null!==(t=null===(e=this.currentDate)||void 0===e?void 0:e.Date)&&void 0!==t?t:$M().toDate();this.currentDate=new qM(o,this.effectiveLang),this.calendar=new WM(i,c,this.effectiveLang),ZM(this.value)&&(this.formatDate=$M(this.currentDate.Date).format(this.format)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}syncValueAttribute(e){this.suppressValueChanged=!0,this.value=e,this.suppressValueChanged=!1}initializeEmpty(){const e=$M();this.currentDate=new qM(e.toDate(),this.effectiveLang),this.calendar=new WM(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate="",this.syncValueAttribute(""),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}initializeWithDefaultDate(){this.resetToDefaultDate(!0)}resetToDefaultDate(e=!1){var t;let i=new qM($M().toDate(),this.effectiveLang);(null===(t=this.disabledDaysOfWeek)||void 0===t?void 0:t.length)&&(i=JM(this.disabledDaysOfWeek,i,this.effectiveLang)),this.currentDate=i,e||!this.calendar?this.calendar=new WM(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang):this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=$M(this.currentDate.Date).format(this.format),this.syncValueAttribute($M(this.currentDate.Date).format(QM)),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}applyValue(e){const t=function(e,t){const i=String(e).trim(),c=$M(i,t,!0);if(c.isValid())return c;const o=$M(i,QM,!0);return o.isValid()?o:null}(e,this.format);t?(this.currentDate=new qM(t.toDate(),this.effectiveLang),this.calendar?this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year):this.calendar=new WM(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate=$M(this.currentDate.Date).format(this.format),this.syncValueAttribute($M(this.currentDate.Date).format(QM)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate()}clearToEmpty(e){const t=$M();this.currentDate=new qM(t.toDate(),this.effectiveLang),this.calendar&&(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()),this.formatDate="",this.syncValueAttribute(""),e&&this.$emit("value-changed",void 0)}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}visibleChanged(e,t){this.inlineCalendar||(t?(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)):(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)))}handleKeydownOutside(e){!this.inlineCalendar&&this.visible&&"Escape"===e.key&&(e.preventDefault(),this.closeCalendar())}handleClickOutside(e){!this.inlineCalendar&&this.visible&&EC(e,this)&&this.closeCalendar()}closeCalendar(){this.visible&&(this.visible=!1,this.toggleVisibility())}toggleCalendar(){this.visible=!this.visible,this.toggleVisibility(),this.isCurrentCalendarMonth()||(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText())}toggleVisibility(){this.calendarDropdownClasses=ti(["visible",this.visible],this.position,["inline",this.inlineCalendar],["hide-weekends",this.hideWeekends])}isSelectedDate(e){return!(this.allowEmpty&&!ZM(this.value))&&$M(e.Date).isSame(this.currentDate.Date,"day")}isCurrentCalendarMonth(){return this.currentMonth===this.currentDate.monthNumber&&this.currentYear===this.currentDate.year}prevMonth(){this.calendar.goToPreviousMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}nextMonth(){this.calendar.goToNextMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}selectDay(e){$M(e.Date).isSame(this.currentDate.Date,"day")&&ZM(this.value)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=$M(this.currentDate.Date).format(this.format),this.syncValueAttribute($M(e.Date).format(QM)),this.$emit("value-changed",this.value),this.toggleCalendar())}getMonthDaysGrid(){const e=this.calendar.month.getDay(1),t=this.calendar.getPreviousMonth(),i=e.dayNumber-1,c=this.calendar.month.numberOfDays+i,o=Array.from({length:c});for(let e=i;e<c;e+=1)o[e]=this.calendar.month.getDay(e+1-i);for(let e=0;e<i;e+=1){const c=i-(e+1);o[e]=t.getDay(t.numberOfDays-c)}return o}}Ou([de],ew.prototype,"format",void 0),Ou([de],ew.prototype,"lang",void 0),Ou([de({attribute:"use-locale-format",mode:"boolean"})],ew.prototype,"useLocaleFormat",void 0),Ou([de],ew.prototype,"visible",void 0),Ou([de({attribute:"inline-calendar",mode:"boolean"})],ew.prototype,"inlineCalendar",void 0),Ou([de({attribute:"hide-weekends",mode:"boolean"})],ew.prototype,"hideWeekends",void 0),Ou([de],ew.prototype,"position",void 0),Ou([de],ew.prototype,"label",void 0),Ou([de({attribute:"allow-empty",mode:"boolean"})],ew.prototype,"allowEmpty",void 0),Ou([de],ew.prototype,"placeholder",void 0),Ou([de],ew.prototype,"value",void 0),Ou([b],ew.prototype,"currentDate",void 0),Ou([b],ew.prototype,"currentMonth",void 0),Ou([b],ew.prototype,"currentYear",void 0),Ou([b],ew.prototype,"calendarDropdownClasses",void 0),Ou([b],ew.prototype,"formatDate",void 0),Ou([b],ew.prototype,"monthList",void 0),Ou([b],ew.prototype,"disabledDaysOfWeek",void 0),Ou([b],ew.prototype,"calendar",void 0),ew.compose(Object.assign({baseName:"date-picker",styles:CM,template:MM,shadowOptions:void 0},{}));class tw{constructor(){this.value=null}}Ou([b],tw.prototype,"value",void 0),new tw;const iw=(e,t,i)=>{const c=i?(e,t)=>e.setValueFor(i,t):(e,t)=>e.withDefault(t);Object.keys(e).forEach(i=>{const o=`${i}Value`;t[o]&&c(e[i],t[o])})};function cw(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const ow={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=_n(e);return t?Un.create(t.r,t.g,t.b):null}},sw=e=>Kn.from(Un.from(_n(e)));Un.create(1,1,1),Un.create(0,0,0);const aw=_n("#585858"),nw=Un.create(aw.r,aw.g,aw.b),rw=_n("#ffffff"),lw=Un.create(rw.r,rw.g,rw.b),dw=Kn.from(lw),hw=_n("#eeeeee"),uw=Un.create(hw.r,hw.g,hw.b);Kn.from(uw);const fw=_n("#08c3a5"),pw=Un.create(fw.r,fw.g,fw.b);Kn.from(pw);const{create:mw}=yo,gw=mw("fui-fill-color").withDefault(nw),vw=mw({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(lw);function bw(e,t){return e.colorContrast(t,14)}const yw=mw({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>bw(mw("fui-card-palette").withDefault(dw).getValueFor(e),vw.getValueFor(e)));var zw=Object.freeze({__proto__:null,fuiFillColor:gw,fuiCardFillColor:vw,defaultNeutralForegroundContrast:14,neutralForeground:bw,fuiCardForegroundColor:yw,accentFillActive:Tl,accentFillActiveDelta:Hr,accentFillFocus:Rl,accentFillFocusDelta:_r,accentFillHover:Ol,accentFillHoverDelta:Fr,accentFillRest:Al,accentFillRestDelta:Dr,accentForegroundActive:Zl,accentForegroundActiveDelta:Br,accentForegroundFocus:Ql,accentForegroundFocusDelta:Ur,accentForegroundHover:Kl,accentForegroundHoverDelta:Vr,accentForegroundRest:Yl,accentForegroundRestDelta:Pr,accentPalette:ml,baseHeightMultiplier:rr,baseLayerLuminance:dr,bodyFont:nr,controlCornerRadius:hr,density:ur,designUnit:fr,direction:pr,disabledOpacity:mr,fillColor:El,focusStrokeInner:xd,focusStrokeOuter:Cd,focusStrokeWidth:vr,foregroundOnAccentActive:_l,foregroundOnAccentActiveLarge:jl,foregroundOnAccentFocus:Pl,foregroundOnAccentFocusLarge:ql,foregroundOnAccentHover:Hl,foregroundOnAccentHoverLarge:Ul,foregroundOnAccentRest:Fl,foregroundOnAccentRestLarge:Bl,neutralFillActive:td,neutralFillActiveDelta:Gr,neutralFillFocus:id,neutralFillFocusDelta:Wr,neutralFillHover:ed,neutralFillHoverDelta:qr,neutralFillInputActive:ad,neutralFillInputActiveDelta:Zr,neutralFillInputFocus:nd,neutralFillInputFocusDelta:Qr,neutralFillInputHover:sd,neutralFillInputHoverDelta:Kr,neutralFillInputRest:od,neutralFillInputRestDelta:Yr,neutralFillLayerRest:yd,neutralFillLayerRestDelta:al,neutralFillRest:Jl,neutralFillRestDelta:jr,neutralFillStealthActive:hd,neutralFillStealthActiveDelta:el,neutralFillStealthFocus:ud,neutralFillStealthFocusDelta:tl,neutralFillStealthHover:dd,neutralFillStealthHoverDelta:Jr,neutralFillStealthRest:ld,neutralFillStealthRestDelta:Xr,neutralFillStrongActive:gd,neutralFillStrongActiveDelta:ol,neutralFillStrongFocus:vd,neutralFillStrongFocusDelta:sl,neutralFillStrongHover:md,neutralFillStrongHoverDelta:cl,neutralFillStrongRest:pd,neutralFillStrongRestDelta:il,neutralForegroundHint:wd,neutralForegroundRest:kd,neutralLayer1:Cl,neutralLayer2:xl,neutralLayer3:wl,neutralLayer4:kl,neutralLayerCardContainer:vl,neutralLayerFloating:yl,neutralPalette:fl,neutralStrokeActive:Ad,neutralStrokeActiveDelta:ll,neutralStrokeDividerRest:Rd,neutralStrokeDividerRestDelta:hl,neutralStrokeFocus:Od,neutralStrokeFocusDelta:dl,neutralStrokeHover:Nd,neutralStrokeHoverDelta:rl,neutralStrokeRest:$d,neutralStrokeRestDelta:nl,strokeWidth:gr,typeRampBaseFontSize:br,typeRampBaseLineHeight:yr,typeRampMinus1FontSize:zr,typeRampMinus1LineHeight:Cr,typeRampMinus2FontSize:Lr,typeRampMinus2LineHeight:xr,typeRampPlus1FontSize:Mr,typeRampPlus1LineHeight:wr,typeRampPlus2FontSize:Sr,typeRampPlus2LineHeight:kr,typeRampPlus3FontSize:Er,typeRampPlus3LineHeight:$r,typeRampPlus4FontSize:Nr,typeRampPlus4LineHeight:Ar,typeRampPlus5FontSize:Or,typeRampPlus5LineHeight:Tr,typeRampPlus6FontSize:Rr,typeRampPlus6LineHeight:Ir});const Cw=sw("#08c3a5"),Lw=sw("#eeeeee"),xw=cr,Mw=Li.ltr;var ww=Object.freeze({__proto__:null,accentPaletteValue:Cw,neutralPaletteValue:Lw,baseLayerLuminanceValue:xw,directionValue:Mw,controlCornerRadiusValue:4,designUnitValue:4});
62
62
  /*!
63
63
  * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
64
64
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-rapid-cdn",
3
3
  "description": "Side-effecting CDN bundle that auto-registers the Rapid Design System. Intended for AI/prototyping tools (e.g. Claude Artifacts), not for production apps.",
4
- "version": "15.32.0",
4
+ "version": "15.32.1",
5
5
  "sideEffects": true,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "unpkg": "dist/foundation-rapid-cdn.iife.min.js",
@@ -27,11 +27,11 @@
27
27
  "test:browser:react": "npx -y http-server . -p 4322 -c-1 -o /test/react.html"
28
28
  },
29
29
  "devDependencies": {
30
- "@genesislcap/genx": "15.32.0",
31
- "@genesislcap/rollup-builder": "15.32.0"
30
+ "@genesislcap/genx": "15.32.1",
31
+ "@genesislcap/rollup-builder": "15.32.1"
32
32
  },
33
33
  "dependencies": {
34
- "@genesislcap/rapid-design-system": "15.32.0"
34
+ "@genesislcap/rapid-design-system": "15.32.1"
35
35
  },
36
36
  "repository": {
37
37
  "type": "git",