@trintel/zooy 1.15.1 → 1.15.2
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Rt=Object.create;var nt=Object.defineProperty;var Ut=Object.getOwnPropertyDescriptor;var Ht=Object.getOwnPropertyNames;var $t=Object.getPrototypeOf,Gt=Object.prototype.hasOwnProperty;var jt=(t,e,s,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Ht(e))!Gt.call(t,o)&&o!==s&&nt(t,o,{get:()=>e[o],enumerable:!(n=Ut(e,o))||n.enumerable});return t};var l=(t,e,s)=>(s=t!=null?Rt($t(t)):{},jt(e||!t||!t.__esModule?nt(s,"default",{value:t,enumerable:!0}):s,t));const m=require("./component-library-registry-BZI0_XM_.js"),i=require("./attributes-D6kBA8su.js");let Wt=require("badu"),T=require("ramda");T=m.__toESM(T,1);let Vt=require("@carbon/web-components/lib/components/data-table/defs.js");var Zt=m.__exportAll({cdsTableWrap:()=>Xt}),ot=(t,e,s)=>{const n=customElements.get("cds-table"),o=customElements.get("cds-pagination"),r=customElements.get(n.selectorTableBatchActions);customElements.get("cds-popover");const a=e.dataBinder,c=e.pagination,p=e.skeleton,b=e.querySelector(n.selectorTableToolbarSearch),A=e.querySelector(n.selectorTableBatchActions),x=e.querySelector(n.selectorTableBody),G=["button","a","input","select","textarea",'[role="button"]',".cds--table-expand",".cds--table-column-checkbox"].join(","),tt=e.querySelectorAll(n.selectorHeaderCell+"[is-sortable]"),Pt=e.isSortable||tt.length>0,j=Symbol(),V=Symbol(),w=new Map,_t=d=>{t.listen(e,"click",u=>{const v=u.target.closest(n.selectorTableRow);if(!v||u.composedPath().some(k=>k.matches&&k.matches(G)))return;u.stopPropagation();const f=i.getSemanticAttributes(v);t.dispatchPanelEvent(d,{...f})})},Ct=d=>{t.listen(e,n.eventExpandoToggle,u=>{const v=u.target,f=v.tagName==="CDS-TABLE-HEADER-ROW",k=u.detail.expanded,W={tableAttrs:s,...i.getSemanticAttributes(v),target:v,allRows:f,didExpand:k};t.dispatchPanelEvent(d,W)})},xt=d=>{w.set(j,u=>{t.dispatchPanelEvent(d,u)})},wt=d=>{w.set(V,u=>{const v=u.detail.selectedRows,f=Math.min(v.length,A.totalRowsCount),k=u.target,W=i.getSemanticAttributes(k),E=v.map(i.getSemanticAttributes),P={tableAttrs:s,...W,target:k,selectCount:f,selection:E};t.dispatchPanelEvent(d,P)})},Dt=d=>{t.listen(e,n.eventTableRowSelect,u=>{const v=u.target,f=u.detail.selectedRows||[],k=f.length,W=f.map(i.getSemanticAttributes),E={tableAttrs:s,...i.getSemanticAttributes(v),selectCount:k,selection:W,target:v};t.dispatchPanelEvent(d,E)})},Tt=()=>{t.listen(e,n.eventBeforeSort,d=>{const u=d.target,v=d.detail.oldSortDirection,f=d.detail.sortDirection,k=i.getSemanticAttributes(u),W=k.sortField,E=f===Vt.TABLE_SORT_DIRECTION.DESCENDING?`-${W}`:W;d.cancelBubble=!0,d.stopPropagation(),d.preventDefault(),x.innerHTML="",p&&p.show(),tt.forEach((_,h)=>{_===u?(_.setAttribute("sort-active","true"),_.setAttribute("sort-direction",f)):(_.removeAttribute("sort-active"),_.setAttribute("sort-direction","none"))});const P={ordering:E};a.fetchData(P).then(()=>{c.setData(a),p&&p.hide()}),w.has(j)&&w.get(j)({tableAttrs:s,...k,sortNow:f,sortWas:v,sortField:W,ordering:E,target:u})})},Bt=()=>{t.listen(e,n.eventTableRowSelectAll,d=>{d.detail.selectedRows.length===0&&e.querySelectorAll(n.selectorTableRow).forEach(u=>{u.disabled=!1,u.selected=!1}),w.has(V)&&w.get(V)(d)})},Nt=()=>{t.listen(e,n.eventBeforeChangeSelectionAll,d=>{d.stopPropagation(),d.detail.callback&&d.detail.callback()})},Mt=d=>{const u=e.querySelector("cds-table-header-row");t.listen(d,r.eventClickSelectAll,v=>{v.stopPropagation(),u.dispatchEvent(new CustomEvent(n.eventBeforeChangeSelectionAll,{bubbles:!0,cancelable:!0,composed:!0,detail:{selected:!0,callback:()=>{d.selectedRowsCount=d.totalRowsCount,e.querySelectorAll(n.selectorTableRow).forEach(f=>{f.disabled=!0})}}}))})},Ft=d=>{t.listen(d,"keydown",u=>{if(u.key==="Enter"){p&&p.show(),c.totalItems=0,e.querySelector("cds-table-body").replaceChildren();const v={search:d.value||"",offset:0};a.fetchData(v).then(()=>{c.setData(a),p&&p.hide()})}})},Lt=d=>{t.listen(d,n.eventSearchInput,u=>{if((u.detail.value||"")===""){const v={search:"",offset:0};p&&p.show(),a.fetchData(v).then(()=>{p&&p.hide(),c.setData(a)})}})},qt=d=>{d.caret=!1;const u=d.querySelector("cds-icon-button, button:not([slot])"),v=d.querySelectorAll("cds-checkbox"),f=d.querySelectorAll("cds-modal-footer-button"),k=[...d.querySelectorAll("cds-checkbox-group")].map(i.getSemanticAttributes).map(T.pathOr("noop",["zoo","filter","field"])).reduce((h,S)=>(h[S]=null,h),{offset:0});if(!u||!f){console.error("Improperly configured Batch Filter popover");return}new MutationObserver(()=>{d.classList.toggle("cds--overflow-menu--open",d.open)}).observe(d,{attributes:!0,attributeFilter:["open"]});const W=Symbol(),E=Symbol(),P=[...f].reduce((h,S,C)=>(S.hasAttribute("reset-filter")&&h.set(W,S),S.hasAttribute("apply-filter")&&h.set(E,S),h),new Map),_=()=>{const h=new Map;return v.forEach(S=>{const C=S.getAttribute("id");if(!C||!C.includes(":"))return;const[B,N]=C.split(":");h.has(B)||h.set(B,[]),S.checked&&h.get(B).push(N)}),h};if(P.has(W)){const h=S=>S.checked=!1;t.listen(P.get(W),"click",S=>{S.stopPropagation(),v.forEach(h),p&&p.show(),a.fetchData(k).then(()=>{c&&c.setData(a),p&&p.hide(),d.open=!1})})}P.has(E)&&t.listen(P.get(E),"click",h=>{h.stopPropagation();const S=[..._()].reduce((C,[B,N])=>(C[B]=Array.isArray(N)&&N.length===0?null:N,C),{offset:0});p&&p.show(),a.fetchData(S).then(()=>{c&&c.setData(a),p&&p.hide(),d.open=!1})}),t.listen(u,"click",h=>{h.stopPropagation(),d.open=!d.open,d.classList.toggle("cds--overflow-menu--open",d.open)})},Ot=()=>{t.listen(c,o.eventPageSizeChanged,d=>{const u={limit:c.pageSize,offset:0};a.fetchData(u).then(()=>{c.setData(a)})})},zt=()=>{t.listen(c,o.eventChangeCurrent,d=>{const{page:u}=d.detail,v=c.pageSize,f={limit:v,offset:(u-1)*v};a.fetchData(f).then(()=>{c.setData(a),p&&p.hide()})})};a&&c&&(Ot(),zt()),a&&b&&(Ft(b),Lt(b));const et=e.querySelector(n.selectorTableToolbarContent);if(et){const d=et.querySelectorAll("cds-popover[data-batch-filter]");a&&d&&d.forEach(qt)}e.isSelectable&&(Bt(),Nt(),A&&Mt(A)),a&&Pt&&Tt();const st={zoo:{event:{row:{click:_t,expand:Ct,check:{one:Dt,all:wt}},column:{sort:xt}}}};(0,Wt.objToPaths)(s).forEach(([d,u])=>{T.hasPath(d,st)&&T.path(d,st)(u)})},Jt=t=>{const e=document.createElement("cds-pagination");return e.backwardText="Previous page",e.forwardText="Next page",e.itemsPerPageText="Items per page:",e.pageSize=t.limit,e.size="lg",[10,25,50,100,500].forEach(s=>{const n=document.createElement("cds-select-item");n.value=s.toString(),n.textContent=s.toString(),e.appendChild(n)}),e.setData=s=>{if(s.isPaginated){const{count:n}=T.pick(["count"],s.data),o=Math.ceil(n/s.limit);e.pagesUnknown=o>100,e.totalItems=n,e.pagesUnknown?e.formatStatusWithIndeterminateTotal=({start:r,end:a})=>`${r}–${a} of ${n} item${n<=1?"":"s"}`:delete e.formatStatusWithIndeterminateTotal}},e},Kt=t=>{if(!t.parentNode){console.error("[Carbon Table] Cannot create skeleton: table has no parent node");return}const e=!!t.querySelector("cds-table-header-title"),s=!!t.querySelector("cds-table-header-description"),n=!!t.querySelector("cds-table-toolbar"),o=[...t.querySelectorAll("cds-table-header-cell")].length,r=t.hasAttribute("zebra"),a=t.getAttribute("size"),c=document.createElement("cds-table-skeleton");c.showHeader=e||s,c.showToolbar=n,c.zebra=r,c.columnCount=o,c.size=a,c.show=()=>c.classList.remove("hidden"),c.hide=()=>c.classList.add("hidden");const p=document.createElement("div");return p.classList.add("zoo-datatable-skeleton-wrapper"),t.parentNode.insertBefore(p,t),p.appendChild(c),p.appendChild(t),c},Qt=(t,e)=>{const s=e.getAttribute("zoo-url-api"),n=parseInt(e.getAttribute("data-page-size")||25,10);if(s)return new i.Binder(t,s,e,{urlParams:{limit:n}})},Xt={selector:"cds-table",init:function(t){const e=i.getSemanticAttributes(t),s=this,n=Qt(s,t);if((0,Wt.isDefAndNotNull)(n)){t.dataBinder=n;const o=Kt(t);t.skeleton=o;const r=Jt(n);t.pagination=r,t.after(r),n.fetchData().then(a=>{o.hide(),r.setData(n),ot(s,t,e)})}else ot(s,t,e)}},Yt=m.__exportAll({cdsPaginationNavWrap:()=>ee,cdsPaginationWrap:()=>te}),te={selector:"cds-pagination",init:function(t){const e=this,s=customElements.get("cds-pagination");let n=null;e.listen(t,s.eventChangeCurrent,o=>{const r=o.detail.page,a=t.pageSize,c=(r-1)*a;c!==n&&(n=c,e.dispatchPanelEvent("pagination-changed-current",{detail:{page:r,pageSize:a,action:"page-change"}}))}),e.listen(t,s.eventPageSizeChanged,o=>{const r=t.pageSize;n=null,e.dispatchPanelEvent("pagination-changed-page-size",{detail:{page:1,pageSize:r,action:"page-size-change"}})})}},ee={selector:"cds-pagination-nav",event:"cds-page-changed",getData:(t,e,s)=>({...e,page:t.detail.page,pageNumber:t.detail.page+1,totalItems:s.totalItems})},se=m.__exportAll({cdsModalBodyContentWrap:()=>le,cdsModalBodyWrap:()=>ie,cdsModalCloseButWrap:()=>ce,cdsModalFooterButWrap:()=>pe,cdsModalFooterWrap:()=>de,cdsModalHeaderWrap:()=>oe,cdsModalHeadingWrap:()=>re,cdsModalLabelWrap:()=>ae,cdsModalWrap:()=>ne}),ne={selector:"cds-modal",init:function(t){const e=customElements.get("cds-modal"),s=i.getSemanticAttributes(t),n=t===this.getElement(),o=i.getEventAttribute(t,"open-event","event");if(o){const c=new MutationObserver(()=>{t.hasAttribute("open")&&this.dispatchPanelEvent(o,{...s,action:"opened"})});c.observe(t,{attributes:!0,attributeFilter:["open"]}),t._openObserver=c}const r=t.getAttribute("before-close-event");r&&this.listen(t,e.eventBeforeClose,c=>{this.dispatchPanelEvent(r,{...s,action:"closing",cancelable:!0})}),this.listen(t,e.eventClose,c=>{const p={...s,action:"closed",triggeredBy:c.detail?.triggeredBy};if(n){this.dispatchPanelEvent("destroy_me",p);return}const b=t.getAttribute("close-event");b&&this.dispatchPanelEvent(b,p)});const a=t.getAttribute("primary-event");a&&this.listen(t,"click",c=>{const p=c.target.closest?.('cds-modal-footer-button[kind="primary"]');p&&t.contains(p)&&this.dispatchPanelEvent(a,{...s,action:"primary"})})}},oe={selector:"cds-modal-header"},re={selector:"cds-modal-heading"},ae={selector:"cds-modal-label"},ce={selector:"cds-modal-close-button"},ie={selector:"cds-modal-body"},le={selector:"cds-modal-body-content"},de={selector:"cds-modal-footer"},pe={selector:"cds-modal-footer-button",init:function(t){const e=i.getSemanticAttributes(t);if(t.getAttribute("type")==="submit"){this.listen(t,"click",n=>{let o=t.closest("form");if(!o){const r=t.getAttribute("form");r&&(o=document.getElementById(r))}o&&o.requestSubmit()});return}const s=e.event;s&&this.listen(t,"click",n=>{n.stopPropagation(),this.dispatchPanelEvent(s,e)})}},ue=m.__exportAll({cdsMenuButtonWrap:()=>me,cdsMenuWrap:()=>ve}),ve={selector:"cds-menu",init:function(t){const e=i.getSemanticAttributes(t),s=i.getEventAttribute(t,"open-event");s&&this.listen(t,"cds-menu-opened",o=>{this.dispatchPanelEvent(s,{...e,action:"opened"})});const n=i.getEventAttribute(t,"close-event");n&&this.listen(t,"cds-menu-closed",o=>{this.dispatchPanelEvent(n,{...e,action:"closed"})}),this.listen(t,"click",o=>{if(o.target.tagName==="CDS-MENU-ITEM"){const r=i.getSemanticAttributes(o.target),a=r.event||e.event;a&&(o.stopPropagation(),this.dispatchPanelEvent(a,{...e,...r}))}}),this.listen(t,"cds-item-changed",o=>{const r=o.detail.triggeredBy,a=i.getSemanticAttributes(r),c=a.event||e.event;c&&this.dispatchPanelEvent(c,{...e,...a,action:"selection-changed"})})}},me={selector:"cds-menu-button",init:function(t){const e=i.getSemanticAttributes(t),s=t.querySelector("cds-menu");s&&this.listen(s,"click",n=>{if(n.target.tagName==="CDS-MENU-ITEM"){const o=i.getSemanticAttributes(n.target),r=o.event||e.event;r&&(n.stopPropagation(),this.dispatchPanelEvent(r,{...e,...o}))}})}},ge=m.__exportAll({cdsButFabWrap:()=>Se,cdsButtonWrap:()=>fe,cdsComboButWrap:()=>We,cdsCopyButWrap:()=>ke,cdsIconButToggleWrap:()=>be,cdsIconButWrap:()=>he}),fe={selector:"cds-button",init:function(t){const e=i.getSemanticAttributes(t);if(t.getAttribute("type")==="submit"){this.listen(t,"click",n=>{let o=t.closest("form");if(!o){const r=t.getAttribute("form");r&&(o=document.getElementById(r))}o&&o.requestSubmit()});return}const s=e.event;s&&this.listen(t,"click",n=>{n.stopPropagation(),this.dispatchPanelEvent(s,i.getSemanticAttributes(t))})}},he={selector:"cds-icon-button:not([data-toggle])",event:"click",getData:(t,e)=>e},be={selector:"cds-icon-button[data-toggle]",init:function(t){const e=i.getSemanticAttributes(t);e.event&&this.listen(t,"click",s=>{s.stopPropagation(),t.isSelected=!t.isSelected,this.dispatchPanelEvent(e.event,{...e,isOn:t.isSelected})})}},Se={selector:"cds-button[data-fab]",event:"click",getData:(t,e)=>e},ke={selector:"cds-copy-button",init:function(t){const e=i.getSemanticAttributes(t),s=e.event;s&&this.listen(t,"click",o=>{o.stopPropagation(),this.dispatchPanelEvent(s,{...e,action:"copy"})});const n=t.getAttribute("success-event");if(n){const o=new MutationObserver(()=>{t.hasAttribute("feedback-shown")&&this.dispatchPanelEvent(n,{...e,action:"copied"})});o.observe(t,{attributes:!0,attributeFilter:["feedback-shown"]}),t._copyObserver=o}}},We={selector:"cds-combo-button",init:function(t){const e=i.getSemanticAttributes(t);e.event&&this.listen(t,"click",n=>{const o=n.composedPath(),r=o.some(c=>c.tagName==="CDS-MENU-ITEM"),a=o.some(c=>c.tagName==="CDS-ICON-BUTTON");!r&&!a&&(n.stopPropagation(),this.dispatchPanelEvent(e.event,{...e,action:"primary"}))});const s=t.querySelector("cds-menu");s&&this.listen(s,"click",n=>{if(n.target.tagName==="CDS-MENU-ITEM"){const o=i.getSemanticAttributes(n.target),r=o.event||i.getEventAttribute(t,"menu-event","event");r&&this.dispatchPanelEvent(r,{...e,...o,action:"menu-item"})}})}},Ae=m.__exportAll({cdsComboBoxWrap:()=>Ie,cdsDropdownWrap:()=>Ee,cdsMultiSelectWrap:()=>ye}),Ee={selector:"cds-dropdown",init:function(t){const e=customElements.get("cds-dropdown"),s=i.getSemanticAttributes(t),n=s.event;n&&this.listen(t,e.eventSelect,r=>{this.dispatchPanelEvent(n,{...s,value:t.value,selectedValue:r.detail?.item?.value,selectedText:r.detail?.item?.textContent?.trim()})});const o=t.getAttribute("toggle-event");o&&this.listen(t,e.eventToggle,r=>{this.dispatchPanelEvent(o,{...s,open:t.hasAttribute("open")})})}},Ie={selector:"cds-combo-box",init:function(t){const e=customElements.get("cds-combo-box"),s=i.getSemanticAttributes(t),n=s.event;n&&this.listen(t,e.eventSelect,r=>{const a=r.detail?.item;this.dispatchPanelEvent(n,{...s,value:t.value,selectedValue:a?.value,selectedText:a?.textContent?.trim()})});const o=t.getAttribute("toggle-event");o&&this.listen(t,e.eventToggle,r=>{this.dispatchPanelEvent(o,{...s,open:t.hasAttribute("open")})})}},ye={selector:"cds-multi-select",init:function(t){const e=customElements.get("cds-multi-select"),s=i.getSemanticAttributes(t),n=s.event;n&&this.listen(t,e.eventSelect,r=>{const a=t.value?t.value.split(","):[];this.dispatchPanelEvent(n,{...s,selectedItems:a})});const o=t.getAttribute("toggle-event");o&&this.listen(t,e.eventToggle,r=>{this.dispatchPanelEvent(o,{...s,open:t.hasAttribute("open")})})}},Pe=m.__exportAll({cdsDatePickerWrap:()=>_e,cdsTimePickerWrap:()=>Ce}),_e={selector:"cds-date-picker",init:function(t){const e=customElements.get("cds-date-picker"),s=i.getSemanticAttributes(t),n=t.querySelector('cds-date-picker-input[kind="from"]'),o=t.querySelector('cds-date-picker-input[kind="to"]'),r=n&&o,a=s.event;a&&this.listen(t,e.eventChange,p=>{let b;r?b={from:n.value||"",to:o.value||""}:b=t.value,this.dispatchPanelEvent(a,{...s,value:b})});const c=t.getAttribute("error-event");c&&this.listen(t,e.eventFlatpickrError,p=>{this.dispatchPanelEvent(c,{...s,error:p.detail})})}},Ce={selector:"cds-time-picker",event:"cds-time-picker-changed",getData:(t,e,s)=>({...e,value:s.value})},xe=m.__exportAll({cdsFileUploaderButtonWrap:()=>Te,cdsFileUploaderDropContainerWrap:()=>Me,cdsFileUploaderWrap:()=>De});function At(t){customElements.whenDefined(t).then(e=>{if(!(!e||e.prototype.__zooyAcceptCasePatched)){if(typeof e.prototype._getFiles!="function"){console.warn(`[Zooy] ${t}._getFiles missing; accept case-insensitivity shim skipped (Carbon may have refactored).`);return}e.prototype._getFiles=function(s,n){if(n===void 0&&(n=(s.type==="drop"?s.dataTransfer:s.target)?.files),!this.accept||!/^(change|drop)$/.test(s.type))return Array.from(n??[]);const o=new Set(this.accept.toLowerCase().split(/[\s,]+/).filter(Boolean));return Array.prototype.filter.call(n??[],({name:r,type:a=""})=>{const c=r.match(/\.[^.]+$/),p=c?c[0].toLowerCase():void 0;return o.has(a.toLowerCase())||p&&o.has(p)})},e.prototype.__zooyAcceptCasePatched=!0}})}At("cds-file-uploader-drop-container");At("cds-file-uploader-button");function we(t){customElements.whenDefined(t).then(e=>{if(!e||e.prototype.__zooyDisabledGuardPatched)return;if(typeof e.selectorUploaderItem!="string"){console.warn(`[Zooy] ${t}.selectorUploaderItem missing; disabled null-guard shim skipped (Carbon may have refactored).`);return}const s=e.prototype.updated;e.prototype.updated=function(n){return n.has("disabled")&&!this.querySelector(this.constructor.selectorUploaderItem)&&(n=new Map(n),n.delete("disabled")),s.call(this,n)},e.prototype.__zooyDisabledGuardPatched=!0})}we("cds-file-uploader");var De={selector:"cds-file-uploader",init:function(t){const e=i.getSemanticAttributes(t),s=e.event;if(s){const a=t.querySelector('input[type="file"]');a&&this.listen(a,"change",c=>{this.dispatchPanelEvent(s,{...e,files:Array.from(c.target.files||[])})})}const n=a=>{const c=a.target;return{...e,...i.getSemanticAttributes(c),fileName:c.textContent.trim(),state:c.getAttribute("state"),item:c}},o=t.getAttribute("before-delete-event");o&&this.listen(t,"cds-file-uploader-item-beingdeleted",a=>{this.dispatchPanelEvent(o,{...n(a),action:"deleting",cancelable:!0})});const r=t.getAttribute("delete-event");r&&this.listen(t,"cds-file-uploader-item-deleted",a=>{this.dispatchPanelEvent(r,{...n(a),action:"deleted"})})}};function Et(t,e){const s=new DataTransfer;for(const n of e)s.items.add(n);t.files=s.files,t.dispatchEvent(new Event("change",{bubbles:!0}))}function It(t){const e=t.getAttribute("for");if(!e)return console.warn(`[Zooy] ${t.tagName.toLowerCase()} missing 'for' attribute; cannot bind to a form input.`,t),null;const s=t.ownerDocument.getElementById(e);return!s||s.tagName!=="INPUT"||s.type!=="file"?(console.warn(`[Zooy] 'for=${e}' did not resolve to an <input type="file">.`,t),null):s}var Te={selector:"cds-file-uploader-button",init:function(t){const e=It(t),s=i.getSemanticAttributes(t),n=s.event;this.listen(t,"cds-file-uploader-button-changed",o=>{const r=o.detail?.addedFiles||[];e&&Et(e,r),n&&this.dispatchPanelEvent(n,{...s,files:Array.from(r)})})}};function Be(t,e,s,n){const o=t.querySelector(`[data-file-list-for="${e}"]`);if(o){o.replaceChildren();for(const r of s){const a=t.createElement("cds-file-uploader-item");a.setAttribute("state","edit"),a.textContent=r.name,a.addEventListener("cds-file-uploader-item-deleted",()=>{n(r.name)}),o.appendChild(a)}}}function Ne(t,e){const s=new DataTransfer;for(const n of t.files)n.name!==e&&s.items.add(n);t.files=s.files,t.dispatchEvent(new Event("change",{bubbles:!0}))}var Me={selector:"cds-file-uploader-drop-container",init:function(t){const e=It(t),s=i.getSemanticAttributes(t),n=s.event,o=t.getAttribute("for"),r=()=>{if(!o||!e)return;const a=Array.from(e.files);Be(t.ownerDocument,o,a,c=>{Ne(e,c),r()}),t.multiple||(t.style.display=a.length>0?"none":"")};this.listen(t,"cds-file-uploader-drop-container-changed",a=>{const c=a.detail?.addedFiles||[],p=t.multiple?c:c.slice(0,1);e&&Et(e,p),r(),n&&this.dispatchPanelEvent(n,{...s,files:Array.from(p)})})}},Fe=m.__exportAll({cdsAccordionWrap:()=>qe,cdsContentSwitcherWrap:()=>Oe,cdsTabsVerticalWrap:()=>ze,cdsTabsWrap:()=>Le}),Le={selector:"cds-tabs",init:function(t){const e=customElements.get("cds-tabs"),s=i.getSemanticAttributes(t),n=t.getAttribute("before-select-event");n&&this.listen(t,e.eventBeforeSelect,r=>{this.dispatchPanelEvent(n,{...s,tabValue:r.detail.item?.getAttribute("value"),cancelable:!0})});const o=s.event;o&&this.listen(t,e.eventSelect,r=>{const a=r.detail.item,c=i.getSemanticAttributes(a);this.dispatchPanelEvent(o,{...s,...c,tabValue:a.getAttribute("value"),tabIndex:r.detail.index,tabText:r.detail.text})})}},qe={selector:"cds-accordion",init:function(t){const e=customElements.get("cds-accordion-item"),s=i.getSemanticAttributes(t);[...t.querySelectorAll("cds-accordion-item")].forEach(n=>{const o=i.getSemanticAttributes(n),r=o.event||s.event;r&&this.listen(n,e.eventToggle,a=>{this.dispatchPanelEvent(r,{...s,...o,open:a.detail.open})})})}},Oe={selector:"cds-content-switcher",init:function(t){const e=customElements.get("cds-content-switcher"),s=i.getSemanticAttributes(t),n=t.getAttribute("before-select-event");n&&this.listen(t,e.eventBeforeSelect,o=>{this.dispatchPanelEvent(n,{...s,value:o.detail.item?.getAttribute("value"),cancelable:!0})}),this.listen(t,e.eventSelect,o=>{const r=o.detail.item,a=i.getSemanticAttributes(r),c=a.event||s.event;c&&this.dispatchPanelEvent(c,{...s,...a,value:r.getAttribute("value"),index:o.detail.index,text:o.detail.text})})}},ze={selector:"cds-tabs-vertical"},Re=m.__exportAll({cdsBreadCrumbWrap:()=>$e,cdsBreadcrumbItemWrap:()=>Ue,cdsBreadcrumbLinkWrap:()=>He}),Ue={selector:"cds-breadcrumb-item"},He={selector:"cds-breadcrumb-link",event:"click",getData:(t,e,s)=>(t.preventDefault(),{...e,href:s.getAttribute("href")})},$e={selector:"cds-breadcrumb",init:function(t){const e=this,s=i.getSemanticAttributes(t),n=s.event;if(n){const o=a=>{e.dispatchPanelEvent(n,{...s,...a})};e.listen(t,"click",a=>{const c=a.target.closest("cds-breadcrumb-link");if(c){a.preventDefault(),a.stopPropagation();const p=i.getSemanticAttributes(c);o(p)}});const r=t.querySelector("cds-overflow-menu-body");r&&e.listen(r,"cds-overflow-menu-item-clicked",a=>{a.stopPropagation();const c=i.getSemanticAttributes(a.target);o(c)})}}},Ge=m.__exportAll({cdsNumberInputWrap:()=>Ze,cdsPasswordInputWrap:()=>Je,cdsSearchWrap:()=>Ke,cdsTextAreaWrap:()=>Ve,cdsTextInputWrap:()=>je}),je={selector:"cds-text-input",multiEvent:!0,events:[{type:"input",attrName:"event",getData:(t,e)=>({...e,value:t.currentTarget.value})},{type:"change",attrName:"change-event",getData:(t,e)=>({...e,value:t.currentTarget.value})}]},Ve={selector:"cds-textarea",multiEvent:!0,events:[{type:"input",attrName:"event",getData:(t,e)=>({...e,value:t.currentTarget.value})},{type:"change",attrName:"change-event",getData:(t,e)=>({...e,value:t.currentTarget.value})}]},Ze={selector:"cds-number-input",event:"cds-number-input",getData:(t,e,s)=>({...e,value:t.detail.value,direction:t.detail.direction})},Je={selector:"cds-password-input",multiEvent:!0,events:[{type:"input",attrName:"event",getData:(t,e)=>({...e,value:t.currentTarget.value})},{type:"change",attrName:"change-event",getData:(t,e)=>({...e,value:t.currentTarget.value})}]},Ke={selector:"cds-search",event:"cds-search-input",getData:(t,e,s)=>({...e,value:s.value})},Qe=m.__exportAll({cdsCheckboxWrap:()=>Xe,cdsRadioButGroupWrap:()=>Ye,cdsSelectWrap:()=>es,cdsSliderWrap:()=>ss,cdsToggleWrap:()=>ts}),Xe={selector:"cds-checkbox",event:"cds-checkbox-changed",getData:(t,e,s)=>({...e,checked:t.detail.checked,value:s.value})},Ye={selector:"cds-radio-button-group",event:"cds-radio-button-group-changed",getData:(t,e)=>({...e,value:t.detail?.value})},ts={selector:"cds-toggle",event:"cds-toggle-changed",getData:(t,e)=>({...e,isOn:t.detail.checked,value:t.detail.checked})},es={selector:"cds-select",event:"cds-select-selected",getData:(t,e)=>({...e,value:t.detail.value})},ss={selector:"cds-slider",init:function(t){const e=i.getSemanticAttributes(t),s=e.event;s&&this.listen(t,"cds-slider-changed",o=>{this.dispatchPanelEvent(s,{...e,value:o.detail.value})});const n=t.getAttribute("input-event");n&&this.listen(t,"cds-slider-input-changed",o=>{this.dispatchPanelEvent(n,{...e,value:o.detail.value})})}},ns=m.__exportAll({cdsOperationalTagWrap:()=>cs,cdsSDismissibleTagWrap:()=>rs,cdsSelectableTagWrap:()=>as,cdsTagSkeletonWrap:()=>is,cdsTagsWrap:()=>os}),os={selector:"cds-tag",event:"click",getData:(t,e)=>e},rs={selector:"cds-dismissible-tag",init:function(t){const e=i.getSemanticAttributes(t),s=t.getAttribute("click-event");s&&this.listen(t,"click",o=>{o.target.closest("button")||this.dispatchPanelEvent(s,{...e})});const n=e.event;n&&this.listen(t,"cds-dismissible-tag-closed",o=>{this.dispatchPanelEvent(n,{...e,action:"closed"})})}},yt=t=>function(e){const s=i.getSemanticAttributes(e),n=e.constructor,o=n.eventBeforeSelected||`${t}-beingselected`,r=n.eventSelected||`${t}-selected`,a=e.getAttribute("before-select-event");a&&this.listen(e,o,p=>{this.dispatchPanelEvent(a,{...s,selected:e.selected,text:e.text,action:"selecting",cancelable:!0})});const c=s.event;c&&this.listen(e,r,p=>{this.dispatchPanelEvent(c,{...s,selected:e.selected,text:e.text,action:e.selected?"selected":"deselected"})})},as={selector:"cds-selectable-tag",init:yt("cds-selectable-tag")},cs={selector:"cds-operational-tag",init:yt("cds-operational-tag")},is={selector:"cds-tag-skeleton"},ls=m.__exportAll({cdsContainedListDescriptionWrap:()=>vs,cdsContainedListItemWrap:()=>ms,cdsContainedListWrap:()=>us,cdsListItemWrap:()=>bs,cdsOrderedListWrap:()=>hs,cdsOverflowMenuWrap:()=>ds,cdsStructuredListWrap:()=>ps,cdsTreeViewWrap:()=>gs,cdsUnorderedListWrap:()=>fs}),ds={selector:"cds-overflow-menu",init:function(t){const e=i.getSemanticAttributes(t),s=e.event,n=t.querySelector("cds-overflow-menu-body");s&&n&&this.listen(n,"cds-overflow-menu-item-clicked",o=>{o.stopPropagation();const r=i.getSemanticAttributes(o.target);this.dispatchPanelEvent(s,{...e,...r})})}},ps={selector:"cds-structured-list",init:function(t){const e=i.getSemanticAttributes(t);[...t.querySelectorAll("cds-structured-list-row")].forEach(s=>{const n=i.getSemanticAttributes(s),o=n.event||e.event;o&&this.listen(s,"click",r=>{r.stopPropagation(),this.dispatchPanelEvent(o,{...e,...n})})}),t.hasAttribute("selection")&&this.listen(t,"cds-structured-list-selected",s=>{const n=s.detail.row,o=i.getSemanticAttributes(n),r=e.event;r&&this.dispatchPanelEvent(r,{...e,...o})})}},us={selector:"cds-contained-list"},vs={selector:"cds-contained-list-description"},ms={selector:"cds-contained-list-item",event:"cds-contained-list-item-click",getData:(t,e)=>e},gs={selector:"cds-tree-view",init:function(t){const e=i.getSemanticAttributes(t);this.listen(t,"cds-tree-node-selected",n=>{const o=n.target,r=i.getSemanticAttributes(o),a=r.event||e.event;a&&this.dispatchPanelEvent(a,{...e,...r,nodeId:o.id,label:o.getAttribute("label")})});const s=i.getEventAttribute(t,"expand-event");s&&this.listen(t,"cds-tree-node-toggled",n=>{this.dispatchPanelEvent(s,{...e,nodeId:n.target.id,expanded:n.detail.expanded})})}},fs={selector:"cds-unordered-list"},hs={selector:"cds-ordered-list"},bs={selector:"cds-list-item"},Ss=m.__exportAll({cdsActionableNotificationWrap:()=>As,cdsCalloutNotificationWrap:()=>Es,cdsInlineNotificationWrap:()=>Ws,cdsToastNotificationWrap:()=>ks}),ks={selector:"cds-toast-notification",event:"cds-notification-closed",getData:(t,e)=>({...e,action:"closed"})},Ws={selector:"cds-inline-notification",event:"cds-notification-closed",getData:(t,e)=>({...e,action:"closed"})},As={selector:"cds-actionable-notification",init:function(t){const e=i.getSemanticAttributes(t),s=i.getEventAttribute(t,"close-event","event");s&&this.listen(t,"cds-notification-closed",o=>{this.dispatchPanelEvent(s,{...e,action:"closed"})});const n=i.getEventAttribute(t,"action-event");n&&this.listen(t,"cds-notification-actioned",o=>{this.dispatchPanelEvent(n,{...e,action:"actioned"})})}},Es={selector:"cds-callout-notification"},Is=m.__exportAll({cdsClickableTileWrap:()=>_s,cdsExpandableTileWrap:()=>Cs,cdsRadioTileWrap:()=>ws,cdsSelectableTileWrap:()=>xs,cdsTileGroupWrap:()=>Ds,cdsTileWrap:()=>Ps});function ys(t){customElements.whenDefined(t).then(e=>{if(!e||e.prototype.__zooyChevronListenerPatched)return;const s=e.prototype.render;e.prototype.render=function(){const n=s.call(this),o=n?.strings?.findIndex?.(a=>a.endsWith('@click="'))??-1;if(o<0||n.values[o]!=="")return n;const r=n.values.slice();return r[o]=void 0,{...n,values:r}},e.prototype.__zooyChevronListenerPatched=!0})}ys("cds-expandable-tile");var Ps={selector:"cds-tile"},_s={selector:"cds-clickable-tile",init:function(t){const e=i.getSemanticAttributes(t),s=e.event;if(s){const n=e.href||t.getAttribute("href")||"";t.removeAttribute("href"),t.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),this.dispatchPanelEvent(s,{...e,href:n})},!0)}}},Cs={selector:"cds-expandable-tile",init:function(t){const e=i.getSemanticAttributes(t),s=t.getAttribute("before-toggle-event");s&&this.listen(t,"cds-expandable-tile-beingtoggled",o=>{this.dispatchPanelEvent(s,{...e,expanded:o.detail.expanded,cancelable:!0})});const n=e.event;n&&this.listen(t,"cds-expandable-tile-toggled",o=>{this.dispatchPanelEvent(n,{...e,expanded:o.detail.expanded})})}},xs={selector:"cds-selectable-tile",event:"cds-selectable-tile-changed",getData:(t,e,s)=>({...e,selected:t.detail.selected,value:s.value})},ws={selector:"cds-radio-tile",event:"cds-radio-tile-selected",getData:(t,e,s)=>({...e,selected:t.detail.selected,name:t.detail.name,value:s.value})},Ds={selector:"cds-tile-group",init:function(t){const e=i.getSemanticAttributes(t),s=e.event;s&&(this.listen(t,"cds-current-radio-tile-selection",n=>{const o=n.detail.target;this.dispatchPanelEvent(s,{...e,value:o?.value,name:o?.name,selected:o?.selected})}),this.listen(t,"cds-current-selectable-tile-selections",n=>{const o=n.detail.currentSelections||[];this.dispatchPanelEvent(s,{...e,values:o.map(r=>r.value),names:o.map(r=>r.name),count:o.length})}))}},Ts=m.__exportAll({cdsInlineLoadingWrap:()=>Ms,cdsProgressBarWrap:()=>Bs,cdsProgressIndicatorWrap:()=>Ns}),Bs={selector:"cds-progress-bar",init:function(t){const e=i.getSemanticAttributes(t);if(e.event){const s=new MutationObserver(()=>{const n=parseFloat(t.getAttribute("value")||"0");n>=parseFloat(t.getAttribute("max")||"100")&&this.dispatchPanelEvent(e.event,{...e,value:n,status:"complete"})});s.observe(t,{attributes:!0,attributeFilter:["value"]}),t._progressObserver=s}}},Ns={selector:"cds-progress-indicator",init:function(t){const e=i.getSemanticAttributes(t),s=()=>[...t.querySelectorAll("cds-progress-step")];(e.event||s().some(n=>i.getSemanticAttributes(n).event))&&typeof t.onChange!="function"&&(t.onChange=()=>{}),this.listen(t,"cds-progress-step-click",n=>{const o=n.target,r=i.getSemanticAttributes(o),a=r.event||e.event;a&&this.dispatchPanelEvent(a,{...e,...r,stepIndex:s().indexOf(o),stepLabel:o.getAttribute("label")})})}},Ms={selector:"cds-inline-loading",init:function(t){const e=i.getSemanticAttributes(t),s=e.event;s&&this.listen(t,"cds-inline-loading-onsuccess",o=>{this.dispatchPanelEvent(s,{...e,status:"finished"})});const n=t.getAttribute("status-event");if(n){const o=new MutationObserver(r=>{r.forEach(a=>{if(a.attributeName==="status"){const c=t.getAttribute("status");this.dispatchPanelEvent(n,{...e,status:c})}})});o.observe(t,{attributes:!0,attributeFilter:["status"]}),t._statusObserver=o}}},Fs=m.__exportAll({cdsDefinitionTooltipWrap:()=>zs,cdsPopoverWrap:()=>qs,cdsToggletipWrap:()=>Os,cdsTooltipWrap:()=>Ls}),Ls={selector:"cds-tooltip",init:function(t){const e=i.getSemanticAttributes(t),s=i.getEventAttribute(t,"open-event");s&&this.listen(t,"cds-tooltip-beingopened",o=>{this.dispatchPanelEvent(s,{...e,action:"opened"})});const n=i.getEventAttribute(t,"close-event");n&&this.listen(t,"cds-tooltip-closed",o=>{this.dispatchPanelEvent(n,{...e,action:"closed"})})}},qs={selector:"cds-popover",init:function(t){const e=i.getSemanticAttributes(t),s=i.getEventAttribute(t,"open-event"),n=i.getEventAttribute(t,"close-event");if(!s&&!n)return;const o=r=>{const a=r?s:n;a&&this.dispatchPanelEvent(a,{...e,action:r?"opened":"closed"})};this.listen(t,"click",r=>{const a=t.querySelector("cds-popover-content");a&&r.composedPath().includes(a)||(t.open=!t.open,o(t.open))}),this.listen(t,"cds-popover-closed",()=>o(!1))}},Os={selector:"cds-toggletip",init:function(t){const e=i.getSemanticAttributes(t);if(e.event){const s=new MutationObserver(n=>{n.forEach(o=>{if(o.attributeName==="open"){const r=t.hasAttribute("open");this.dispatchPanelEvent(e.event,{...e,action:r?"opened":"closed",open:r})}})});s.observe(t,{attributes:!0,attributeFilter:["open"]}),t._toggletipObserver=s}}},zs={selector:"cds-definition-tooltip"},Rs=m.__exportAll({cdsCodeSnipWrap:()=>Hs,cdsLinkWrap:()=>Us}),Us={selector:"cds-link",event:"click",getData:(t,e,s)=>({...e,href:s.getAttribute("href")})},Hs={selector:"cds-code-snippet",event:"cds-copy-button-clicked",getData:(t,e)=>({...e,action:"copied"})},$s=m.__exportAll({cdsBadgeIndicatorWrap:()=>Ys,cdsColumnHangWrap:()=>on,cdsColumnWrap:()=>nn,cdsFormGroupWrap:()=>Vs,cdsFormItemWrap:()=>js,cdsFormWrap:()=>Gs,cdsGridWrap:()=>sn,cdsHeadingWrap:()=>Js,cdsIconIndicatorWrap:()=>Xs,cdsIconWrap:()=>Qs,cdsLayerWrap:()=>en,cdsLoadingWrap:()=>tn,cdsSectionWrap:()=>Ks,cdsStackWrap:()=>Zs}),Gs={selector:"cds-form"},js={selector:"cds-form-item"},Vs={selector:"cds-form-group"},Zs={selector:"cds-stack"},Js={selector:"cds-heading"},Ks={selector:"cds-section"},Qs={selector:"cds-icon"},Xs={selector:"cds-icon-indicator"},Ys={selector:"cds-badge-indicator"},tn={selector:"cds-loading"},en={selector:"cds-layer"},sn={selector:"cds-grid"},nn={selector:"cds-column"},on={selector:"cds-column-hang"},rn=m.__exportAll({cdsAccordionItemSkeletonWrap:()=>pn,cdsAccordionSkeletonWrap:()=>dn,cdsBreadcrumbSkeletonWrap:()=>un,cdsButtonSkeletonWrap:()=>vn,cdsCheckboxSkeletonWrap:()=>mn,cdsCodeSnippetSkeletonWrap:()=>gn,cdsDatePickerInputSkeletonWrap:()=>hn,cdsDropdownSkeletonWrap:()=>bn,cdsFileUploaderSkeletonWrap:()=>Sn,cdsNumberInputSkeletonWrap:()=>kn,cdsPasswordInputSkeletonWrap:()=>Wn,cdsProgressIndicatorSkeletonWrap:()=>An,cdsProgressStepSkeletonWrap:()=>En,cdsRadioButtonSkeletonWrap:()=>In,cdsSearchSkeletonWrap:()=>yn,cdsSelectSkeletonWrap:()=>Pn,cdsSkeletonIconWrap:()=>ln,cdsSkeletonPlaceholderWrap:()=>cn,cdsSkeletonTextWrap:()=>an,cdsSliderSkeletonWrap:()=>_n,cdsStructuredListHeaderCellSkeletonWrap:()=>Cn,cdsTabSkeletonWrap:()=>wn,cdsTableSkeletonWrap:()=>fn,cdsTabsSkeletonWrap:()=>xn,cdsTextInputSkeletonWrap:()=>Dn,cdsTextareaSkeletonWrap:()=>Tn,cdsToggleSkeletonWrap:()=>Bn}),an={selector:"cds-skeleton-text"},cn={selector:"cds-skeleton-placeholder"},ln={selector:"cds-skeleton-icon"},dn={selector:"cds-accordion-skeleton"},pn={selector:"cds-accordion-item-skeleton"},un={selector:"cds-breadcrumb-skeleton"},vn={selector:"cds-button-skeleton"},mn={selector:"cds-checkbox-skeleton"},gn={selector:"cds-code-snippet-skeleton"},fn={selector:"cds-table-skeleton"},hn={selector:"cds-date-picker-input-skeleton"},bn={selector:"cds-dropdown-skeleton"},Sn={selector:"cds-file-uploader-skeleton"},kn={selector:"cds-number-input-skeleton"},Wn={selector:"cds-password-input-skeleton"},An={selector:"cds-progress-indicator-skeleton"},En={selector:"cds-progress-step-skeleton"},In={selector:"cds-radio-button-skeleton"},yn={selector:"cds-search-skeleton"},Pn={selector:"cds-select-skeleton"},_n={selector:"cds-slider-skeleton"},Cn={selector:"cds-structured-list-header-cell-skeleton"},xn={selector:"cds-tabs-skeleton"},wn={selector:"cds-tab-skeleton"},Dn={selector:"cds-text-input-skeleton"},Tn={selector:"cds-textarea-skeleton"},Bn={selector:"cds-toggle-skeleton"};function g(t){return Object.values(t).filter(e=>typeof e=="object"&&e!==null&&e.selector)}var Nn=[...g(Yt),...g(Zt),...g(se),...g(ue),...g(ge),...g(Ae),...g(Pe),...g(xe),...g(Fe),...g(Re),...g(Ge),...g(Qe),...g(ns),...g(ls),...g(Ss),...g(Is),...g(Ts),...g(Fs),...g(Rs),...g($s),...g(rn)];function Mn(){const t=new Map;return Nn.forEach(e=>{t.set(e.selector,e)}),t}var Z=()=>import("@carbon/web-components/es/components/accordion/index.js"),L=()=>import("@carbon/web-components/es/components/breadcrumb/index.js"),Fn=()=>import("@carbon/web-components/es/components/stack/index.js"),rt=()=>import("@carbon/web-components/es/components/structured-list/index.js"),J=()=>import("@carbon/web-components/es/components/contained-list/index.js"),D=()=>import("@carbon/web-components/es/components/tile/index.js"),Ln=()=>import("@carbon/web-components/es/components/tree-view/index.js"),qn=()=>import("@carbon/web-components/es/components/link/index.js"),q=()=>import("@carbon/web-components/es/components/tabs/index.js"),On=()=>import("@carbon/web-components/es/components/content-switcher/index.js"),zn=()=>import("@carbon/web-components/es/components/menu/index.js"),Rn=()=>import("@carbon/web-components/es/components/menu-button/index.js"),Un=()=>import("@carbon/web-components/es/components/overflow-menu/index.js"),O=()=>import("@carbon/web-components/es/components/button/index.js"),at=()=>import("@carbon/web-components/es/components/icon-button/index.js"),Hn=()=>import("@carbon/web-components/es/components/combo-button/index.js"),$n=()=>import("@carbon/web-components/es/components/copy-button/index.js"),ct=()=>import("@carbon/web-components/es/components/checkbox/index.js"),it=()=>import("@carbon/web-components/es/components/radio-button/index.js"),lt=()=>import("@carbon/web-components/es/components/toggle/index.js"),z=()=>import("@carbon/web-components/es/components/select/index.js"),dt=()=>import("@carbon/web-components/es/components/slider/index.js"),R=()=>import("@carbon/web-components/es/components/text-input/index.js"),pt=()=>import("@carbon/web-components/es/components/textarea/index.js"),ut=()=>import("@carbon/web-components/es/components/number-input/index.js"),vt=()=>import("@carbon/web-components/es/components/password-input/index.js"),K=()=>import("@carbon/web-components/es/components/search/index.js"),Gn=()=>import("@carbon/web-components/es/components/combo-box/index.js"),mt=()=>import("@carbon/web-components/es/components/dropdown/index.js"),jn=()=>import("@carbon/web-components/es/components/multi-select/index.js"),gt=()=>import("@carbon/web-components/es/components/date-picker/index.js"),Vn=()=>import("@carbon/web-components/es/components/time-picker/index.js"),M=()=>import("@carbon/web-components/es/components/file-uploader/index.js"),ft=()=>import("@carbon/web-components/es/components/form/index.js"),Zn=()=>import("@carbon/web-components/es/components/form-group/index.js"),ht=()=>import("@carbon/web-components/es/components/data-table/index.js"),bt=()=>import("@carbon/web-components/es/components/pagination/index.js"),St=()=>import("@carbon/web-components/es/components/code-snippet/index.js"),F=()=>import("@carbon/web-components/es/components/tag/index.js"),Jn=()=>import("@carbon/web-components/es/components/badge-indicator/index.js"),U=()=>import("@carbon/web-components/es/components/notification/index.js"),Kn=()=>import("@carbon/web-components/es/components/loading/index.js"),Qn=()=>import("@carbon/web-components/es/components/inline-loading/index.js"),Xn=()=>import("@carbon/web-components/es/components/progress-bar/index.js"),Q=()=>import("@carbon/web-components/es/components/progress-indicator/index.js"),Yn=()=>import("@carbon/web-components/es/components/skeleton-placeholder/index.js"),to=()=>import("@carbon/web-components/es/components/skeleton-text/index.js"),eo=()=>import("@carbon/web-components/es/components/skeleton-icon/index.js"),X=()=>import("@carbon/web-components/es/components/list/index.js"),so=()=>import("@carbon/web-components/es/components/layer/index.js"),Y=()=>import("@carbon/web-components/es/components/grid/index.js"),no=()=>import("@carbon/web-components/es/components/pagination-nav/index.js"),y=()=>import("@carbon/web-components/es/components/modal/index.js"),I=()=>import("@carbon/web-components/es/components/tooltip/index.js"),oo=()=>import("@carbon/web-components/es/components/popover/index.js"),ro=()=>import("@carbon/web-components/es/components/toggle-tip/index.js"),kt=()=>import("@carbon/web-components/es/components/heading/index.js"),ao=()=>import("@carbon/web-components/es/components/icon/index.js"),co=()=>import("@carbon/web-components/es/components/icon-indicator/index.js"),$={"cds-table":[I,O,R,K,z,bt,ht],"cds-pagination":[z,R,bt],"cds-button":[I,O],"cds-icon-button:not([data-toggle])":[I,at],"cds-icon-button[data-toggle]":[I,at],"cds-button[data-fab]":[I,O],"cds-copy-button":[I,$n],"cds-combo-button":[I,Hn],"cds-checkbox":[ct],"cds-radio-button-group":[it],"cds-toggle":[lt],"cds-select":[z],"cds-slider":[dt],"cds-text-input":[R],"cds-textarea":[pt],"cds-number-input":[ut],"cds-password-input":[I,vt],"cds-search":[K],"cds-dropdown":[mt],"cds-combo-box":[Gn],"cds-multi-select":[jn],"cds-date-picker":[gt],"cds-time-picker":[Vn],"cds-file-uploader":[M],"cds-file-uploader-button":[M],"cds-file-uploader-drop-container":[M],"cds-file-uploader-item":[M],"cds-tabs":[q],"cds-accordion":[Z],"cds-content-switcher":[On],"cds-breadcrumb":[L],"cds-breadcrumb-item":[L],"cds-breadcrumb-link":[L],"cds-menu":[zn],"cds-menu-button":[Rn],"cds-overflow-menu":[Un],"cds-structured-list":[rt],"cds-contained-list":[J],"cds-contained-list-item":[J],"cds-contained-list-description":[J],"cds-tree-view":[Ln],"cds-modal":[y],"cds-modal-header":[y],"cds-modal-heading":[y],"cds-modal-label":[y],"cds-modal-close-button":[y],"cds-modal-body":[y],"cds-modal-body-content":[y],"cds-modal-footer":[y],"cds-modal-footer-button":[y],"cds-toast-notification":[U],"cds-inline-notification":[U],"cds-actionable-notification":[U],"cds-tile":[D],"cds-tile-group":[D],"cds-clickable-tile":[D],"cds-expandable-tile":[D],"cds-selectable-tile":[D],"cds-radio-tile":[D],"cds-progress-bar":[Xn],"cds-progress-indicator":[Q],"cds-inline-loading":[Qn],"cds-tooltip":[I],"cds-popover":[oo],"cds-toggletip":[ro],"cds-tag":[F],"cds-dismissible-tag":[F],"cds-selectable-tag":[F],"cds-operational-tag":[F],"cds-tag-skeleton":[F],"cds-link":[qn],"cds-code-snippet":[St],"cds-form":[ft],"cds-form-item":[ft],"cds-form-group":[Zn],"cds-stack":[Fn],"cds-heading":[kt],"cds-section":[kt],"cds-icon":[ao],"cds-icon-indicator":[co],"cds-badge-indicator":[Jn],"cds-loading":[Kn],"cds-skeleton-text":[to],"cds-skeleton-placeholder":[Yn],"cds-skeleton-icon":[eo],"cds-accordion-skeleton":[Z],"cds-accordion-item-skeleton":[Z],"cds-breadcrumb-skeleton":[L],"cds-button-skeleton":[O],"cds-checkbox-skeleton":[ct],"cds-code-snippet-skeleton":[St],"cds-table-skeleton":[ht],"cds-date-picker-input-skeleton":[gt],"cds-dropdown-skeleton":[mt],"cds-file-uploader-skeleton":[M],"cds-number-input-skeleton":[ut],"cds-password-input-skeleton":[vt],"cds-progress-indicator-skeleton":[Q],"cds-progress-step-skeleton":[Q],"cds-radio-button-skeleton":[it],"cds-search-skeleton":[K],"cds-select-skeleton":[z],"cds-slider-skeleton":[dt],"cds-structured-list-header-cell-skeleton":[rt],"cds-tabs-skeleton":[q],"cds-tab-skeleton":[q],"cds-text-input-skeleton":[R],"cds-textarea-skeleton":[pt],"cds-toggle-skeleton":[lt],"cds-callout-notification":[U],"cds-definition-tooltip":[I],"cds-tabs-vertical":[q],"cds-unordered-list":[X],"cds-ordered-list":[X],"cds-list-item":[X],"cds-layer":[so],"cds-grid":[Y],"cds-column":[Y],"cds-column-hang":[Y],"cds-pagination-nav":[no]};function io(t){const e=new Map;if(!t||!(t instanceof Element))return e;for(const n of Object.keys(H))e.set(n,[]);for(const[n]of Object.entries(H))t.matches(n)&&e.get(n).push(t);const s=t.querySelectorAll("*");for(const n of s)for(const[o]of Object.entries(H))n.matches(o)&&e.get(o).push(n);for(const[n,o]of e.entries())o.length===0&&e.delete(n);return e}function lo(t){const e=new Set;for(const[s,n]of t.entries())n.length>0&&$[s]&&$[s].forEach(o=>e.add(o));return e}async function po(t,e){if(t.size===0)return;const s=Array.from(t).map(async n=>(e.has(n)||e.set(n,n()),e.get(n)));await Promise.all(s)}function uo(t,e){let s=0;for(const[n,o]of t.entries()){const r=H[n];o.forEach(a=>{if(r.init){r.init.call(e,a);return}if(r.multiEvent){const b=i.getSemanticAttributes(a);r.events.forEach(A=>{const x=i.getEventAttribute(a,A.attrName,"event");x&&e.listen(a,A.type,G=>{e.dispatchPanelEvent(x,A.getData(G,b,a))})});return}const c=i.getSemanticAttributes(a),p=c.event;p&&e.listen(a,r.event,b=>{b.stopPropagation();const A=r.getData(b,c,a),x=A._eventOverride||p;delete A._eventOverride,e.dispatchPanelEvent(x,A)})}),s+=o.length}return s}var H=Object.fromEntries(Mn()),vo=async function(t,e){const s=io(t);if(s.size===0){this.debugMe("[Carbon] No Carbon components found in panel");return}this.carbonComponents||(this.carbonComponents=new Map);for(const[r,a]of s.entries())this.carbonComponents.set(r,a);const n=lo(s);if(n.size>0)try{await po(n,e)}catch(r){console.error("[Carbon] Failed to load some component modules:",r)}const o=uo(s,this);o>0&&this.debugMe(`[Carbon] Total components initialized: ${o}`)},mo=(t={})=>{const{preload:e=[]}=t,s=new Map;if(e.length>0){const n=e.filter(r=>$[r]?!0:(console.warn(`[Carbon] No import found for selector: ${r}`),!1)),o=n.flatMap(r=>$[r].map(a=>(s.has(a)||s.set(a,a()),s.get(a))));Promise.all(o).then(()=>console.debug(`[Carbon] Preloaded: ${n.join(", ")}`)).catch(r=>console.warn("[Carbon] Preload error:",r))}m.ComponentLibraryRegistry.register("carbon",{cache:s,render:async function(n,o){try{await vo.call(this,n,o)}catch(r){console.error("[Carbon] Initialization error:",r)}},dispose:function(n){},config:{version:"2.0",description:"IBM Carbon Design System Web Components"}}),console.debug("[Zooy] Carbon Design System library registered")};exports.registerCarbonLibrary=mo;
|
|
@@ -2,8 +2,8 @@ import { n as m, t as ze } from "./component-library-registry-BXnJ4Oqa.js";
|
|
|
2
2
|
import { n as i, r as Re, t as S } from "./attributes-DLvrzXzz.js";
|
|
3
3
|
import { isDefAndNotNull as qe, objToPaths as Ue } from "badu";
|
|
4
4
|
import * as U from "ramda";
|
|
5
|
-
import { TABLE_SORT_DIRECTION as
|
|
6
|
-
var
|
|
5
|
+
import { TABLE_SORT_DIRECTION as He } from "@carbon/web-components/lib/components/data-table/defs.js";
|
|
6
|
+
var $e = /* @__PURE__ */ m({ cdsTableWrap: () => Ze }), oe = (e, t, o) => {
|
|
7
7
|
const s = customElements.get("cds-table"), n = customElements.get("cds-pagination"), r = customElements.get(s.selectorTableBatchActions);
|
|
8
8
|
customElements.get("cds-popover");
|
|
9
9
|
const a = t.dataBinder, c = t.pagination, d = t.skeleton, g = t.querySelector(s.selectorTableToolbarSearch), E = t.querySelector(s.selectorTableBatchActions), x = t.querySelector(s.selectorTableBody), G = [
|
|
@@ -62,7 +62,7 @@ var He = /* @__PURE__ */ m({ cdsTableWrap: () => Ze }), oe = (e, t, o) => {
|
|
|
62
62
|
});
|
|
63
63
|
}, De = () => {
|
|
64
64
|
e.listen(t, s.eventBeforeSort, (l) => {
|
|
65
|
-
const p = l.target, u = l.detail.oldSortDirection, f = l.detail.sortDirection, k = i(p), W = k.sortField, I = f ===
|
|
65
|
+
const p = l.target, u = l.detail.oldSortDirection, f = l.detail.sortDirection, k = i(p), W = k.sortField, I = f === He.DESCENDING ? `-${W}` : W;
|
|
66
66
|
l.cancelBubble = !0, l.stopPropagation(), l.preventDefault(), x.innerHTML = "", d && d.show(), ee.forEach((A, h) => {
|
|
67
67
|
A === p ? (A.setAttribute("sort-active", "true"), A.setAttribute("sort-direction", f)) : (A.removeAttribute("sort-active"), A.setAttribute("sort-direction", "none"));
|
|
68
68
|
});
|
|
@@ -791,20 +791,20 @@ var Tt = {
|
|
|
791
791
|
selector: "cds-content-switcher",
|
|
792
792
|
init: function(e) {
|
|
793
793
|
const t = customElements.get("cds-content-switcher"), o = i(e), s = e.getAttribute("before-select-event");
|
|
794
|
-
s && this.listen(e, t.eventBeforeSelect, (
|
|
794
|
+
s && this.listen(e, t.eventBeforeSelect, (n) => {
|
|
795
795
|
this.dispatchPanelEvent(s, {
|
|
796
796
|
...o,
|
|
797
|
-
value:
|
|
797
|
+
value: n.detail.item?.getAttribute("value"),
|
|
798
798
|
cancelable: !0
|
|
799
799
|
});
|
|
800
|
-
})
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
const a = r.detail.item, c = i(a);
|
|
804
|
-
this.dispatchPanelEvent(n, {
|
|
800
|
+
}), this.listen(e, t.eventSelect, (n) => {
|
|
801
|
+
const r = n.detail.item, a = i(r), c = a.event || o.event;
|
|
802
|
+
c && this.dispatchPanelEvent(c, {
|
|
805
803
|
...o,
|
|
806
|
-
...
|
|
807
|
-
value:
|
|
804
|
+
...a,
|
|
805
|
+
value: r.getAttribute("value"),
|
|
806
|
+
index: n.detail.index,
|
|
807
|
+
text: n.detail.text
|
|
808
808
|
});
|
|
809
809
|
});
|
|
810
810
|
}
|
|
@@ -847,10 +847,10 @@ var Tt = {
|
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
849
|
}, qt = /* @__PURE__ */ m({
|
|
850
|
-
cdsNumberInputWrap: () =>
|
|
850
|
+
cdsNumberInputWrap: () => $t,
|
|
851
851
|
cdsPasswordInputWrap: () => Gt,
|
|
852
852
|
cdsSearchWrap: () => jt,
|
|
853
|
-
cdsTextAreaWrap: () =>
|
|
853
|
+
cdsTextAreaWrap: () => Ht,
|
|
854
854
|
cdsTextInputWrap: () => Ut
|
|
855
855
|
}), Ut = {
|
|
856
856
|
selector: "cds-text-input",
|
|
@@ -870,7 +870,7 @@ var Tt = {
|
|
|
870
870
|
value: e.currentTarget.value
|
|
871
871
|
})
|
|
872
872
|
}]
|
|
873
|
-
},
|
|
873
|
+
}, Ht = {
|
|
874
874
|
selector: "cds-textarea",
|
|
875
875
|
multiEvent: !0,
|
|
876
876
|
events: [{
|
|
@@ -888,7 +888,7 @@ var Tt = {
|
|
|
888
888
|
value: e.currentTarget.value
|
|
889
889
|
})
|
|
890
890
|
}]
|
|
891
|
-
},
|
|
891
|
+
}, $t = {
|
|
892
892
|
selector: "cds-number-input",
|
|
893
893
|
event: "cds-number-input",
|
|
894
894
|
getData: (e, t, o) => ({
|
|
@@ -1078,7 +1078,7 @@ var Tt = {
|
|
|
1078
1078
|
init: function(e) {
|
|
1079
1079
|
const t = i(e);
|
|
1080
1080
|
this.listen(e, "cds-tree-node-selected", (s) => {
|
|
1081
|
-
const n = s.
|
|
1081
|
+
const n = s.target, r = i(n), a = r.event || t.event;
|
|
1082
1082
|
a && this.dispatchPanelEvent(a, {
|
|
1083
1083
|
...t,
|
|
1084
1084
|
...r,
|
|
@@ -1087,10 +1087,10 @@ var Tt = {
|
|
|
1087
1087
|
});
|
|
1088
1088
|
});
|
|
1089
1089
|
const o = S(e, "expand-event");
|
|
1090
|
-
o && this.listen(e, "cds-tree-node-
|
|
1090
|
+
o && this.listen(e, "cds-tree-node-toggled", (s) => {
|
|
1091
1091
|
this.dispatchPanelEvent(o, {
|
|
1092
1092
|
...t,
|
|
1093
|
-
nodeId: s.
|
|
1093
|
+
nodeId: s.target.id,
|
|
1094
1094
|
expanded: s.detail.expanded
|
|
1095
1095
|
});
|
|
1096
1096
|
});
|
|
@@ -1145,7 +1145,7 @@ function Ss(e) {
|
|
|
1145
1145
|
if (!t || t.prototype.__zooyChevronListenerPatched) return;
|
|
1146
1146
|
const o = t.prototype.render;
|
|
1147
1147
|
t.prototype.render = function() {
|
|
1148
|
-
const s = o.call(this), n = s?.strings?.findIndex?.((a) =>
|
|
1148
|
+
const s = o.call(this), n = s?.strings?.findIndex?.((a) => a.endsWith('@click="')) ?? -1;
|
|
1149
1149
|
if (n < 0 || s.values[n] !== "") return s;
|
|
1150
1150
|
const r = s.values.slice();
|
|
1151
1151
|
return r[n] = void 0, {
|
|
@@ -1321,20 +1321,19 @@ var Es = { selector: "cds-tile" }, Is = {
|
|
|
1321
1321
|
}, Ns = {
|
|
1322
1322
|
selector: "cds-popover",
|
|
1323
1323
|
init: function(e) {
|
|
1324
|
-
const t = i(e), o = S(e, "open-event");
|
|
1325
|
-
o &&
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
});
|
|
1330
|
-
});
|
|
1331
|
-
const s = S(e, "close-event");
|
|
1332
|
-
s && this.listen(e, "cds-popover-closed", (n) => {
|
|
1333
|
-
this.dispatchPanelEvent(s, {
|
|
1324
|
+
const t = i(e), o = S(e, "open-event"), s = S(e, "close-event");
|
|
1325
|
+
if (!o && !s) return;
|
|
1326
|
+
const n = (r) => {
|
|
1327
|
+
const a = r ? o : s;
|
|
1328
|
+
a && this.dispatchPanelEvent(a, {
|
|
1334
1329
|
...t,
|
|
1335
|
-
action: "closed"
|
|
1330
|
+
action: r ? "opened" : "closed"
|
|
1336
1331
|
});
|
|
1337
|
-
}
|
|
1332
|
+
};
|
|
1333
|
+
this.listen(e, "click", (r) => {
|
|
1334
|
+
const a = e.querySelector("cds-popover-content");
|
|
1335
|
+
a && r.composedPath().includes(a) || (e.open = !e.open, n(e.open));
|
|
1336
|
+
}), this.listen(e, "cds-popover-closed", () => n(!1));
|
|
1338
1337
|
}
|
|
1339
1338
|
}, Ms = {
|
|
1340
1339
|
selector: "cds-toggletip",
|
|
@@ -1380,7 +1379,7 @@ var Es = { selector: "cds-tile" }, Is = {
|
|
|
1380
1379
|
cdsBadgeIndicatorWrap: () => Js,
|
|
1381
1380
|
cdsColumnHangWrap: () => eo,
|
|
1382
1381
|
cdsColumnWrap: () => Ys,
|
|
1383
|
-
cdsFormGroupWrap: () =>
|
|
1382
|
+
cdsFormGroupWrap: () => Hs,
|
|
1384
1383
|
cdsFormItemWrap: () => Us,
|
|
1385
1384
|
cdsFormWrap: () => qs,
|
|
1386
1385
|
cdsGridWrap: () => Xs,
|
|
@@ -1390,8 +1389,8 @@ var Es = { selector: "cds-tile" }, Is = {
|
|
|
1390
1389
|
cdsLayerWrap: () => Qs,
|
|
1391
1390
|
cdsLoadingWrap: () => Ks,
|
|
1392
1391
|
cdsSectionWrap: () => js,
|
|
1393
|
-
cdsStackWrap: () =>
|
|
1394
|
-
}), qs = { selector: "cds-form" }, Us = { selector: "cds-form-item" },
|
|
1392
|
+
cdsStackWrap: () => $s
|
|
1393
|
+
}), qs = { selector: "cds-form" }, Us = { selector: "cds-form-item" }, Hs = { selector: "cds-form-group" }, $s = { selector: "cds-stack" }, Gs = { selector: "cds-heading" }, js = { selector: "cds-section" }, Vs = { selector: "cds-icon" }, Zs = { selector: "cds-icon-indicator" }, Js = { selector: "cds-badge-indicator" }, Ks = { selector: "cds-loading" }, Qs = { selector: "cds-layer" }, Xs = { selector: "cds-grid" }, Ys = { selector: "cds-column" }, eo = { selector: "cds-column-hang" }, to = /* @__PURE__ */ m({
|
|
1395
1394
|
cdsAccordionItemSkeletonWrap: () => ao,
|
|
1396
1395
|
cdsAccordionSkeletonWrap: () => ro,
|
|
1397
1396
|
cdsBreadcrumbSkeletonWrap: () => co,
|
|
@@ -1425,7 +1424,7 @@ function v(e) {
|
|
|
1425
1424
|
}
|
|
1426
1425
|
var Do = [
|
|
1427
1426
|
...v(Je),
|
|
1428
|
-
...v(
|
|
1427
|
+
...v($e),
|
|
1429
1428
|
...v(Xe),
|
|
1430
1429
|
...v(it),
|
|
1431
1430
|
...v(pt),
|
|
@@ -1452,7 +1451,7 @@ function To() {
|
|
|
1452
1451
|
e.set(t.selector, t);
|
|
1453
1452
|
}), e;
|
|
1454
1453
|
}
|
|
1455
|
-
var Z = () => import("@carbon/web-components/es/components/accordion/index.js"), F = () => import("@carbon/web-components/es/components/breadcrumb/index.js"), _o = () => import("@carbon/web-components/es/components/stack/index.js"), ne = () => import("@carbon/web-components/es/components/structured-list/index.js"), J = () => import("@carbon/web-components/es/components/contained-list/index.js"), T = () => import("@carbon/web-components/es/components/tile/index.js"), Bo = () => import("@carbon/web-components/es/components/tree-view/index.js"), No = () => import("@carbon/web-components/es/components/link/index.js"), L = () => import("@carbon/web-components/es/components/tabs/index.js"), Mo = () => import("@carbon/web-components/es/components/content-switcher/index.js"), Fo = () => import("@carbon/web-components/es/components/menu/index.js"), Lo = () => import("@carbon/web-components/es/components/menu-button/index.js"), Oo = () => import("@carbon/web-components/es/components/overflow-menu/index.js"), O = () => import("@carbon/web-components/es/components/button/index.js"), re = () => import("@carbon/web-components/es/components/icon-button/index.js"), zo = () => import("@carbon/web-components/es/components/combo-button/index.js"), Ro = () => import("@carbon/web-components/es/components/copy-button/index.js"), ae = () => import("@carbon/web-components/es/components/checkbox/index.js"), ce = () => import("@carbon/web-components/es/components/radio-button/index.js"), ie = () => import("@carbon/web-components/es/components/toggle/index.js"), z = () => import("@carbon/web-components/es/components/select/index.js"), le = () => import("@carbon/web-components/es/components/slider/index.js"), R = () => import("@carbon/web-components/es/components/text-input/index.js"), de = () => import("@carbon/web-components/es/components/textarea/index.js"), pe = () => import("@carbon/web-components/es/components/number-input/index.js"), ue = () => import("@carbon/web-components/es/components/password-input/index.js"), K = () => import("@carbon/web-components/es/components/search/index.js"), qo = () => import("@carbon/web-components/es/components/combo-box/index.js"), ve = () => import("@carbon/web-components/es/components/dropdown/index.js"), Uo = () => import("@carbon/web-components/es/components/multi-select/index.js"), me = () => import("@carbon/web-components/es/components/date-picker/index.js"),
|
|
1454
|
+
var Z = () => import("@carbon/web-components/es/components/accordion/index.js"), F = () => import("@carbon/web-components/es/components/breadcrumb/index.js"), _o = () => import("@carbon/web-components/es/components/stack/index.js"), ne = () => import("@carbon/web-components/es/components/structured-list/index.js"), J = () => import("@carbon/web-components/es/components/contained-list/index.js"), T = () => import("@carbon/web-components/es/components/tile/index.js"), Bo = () => import("@carbon/web-components/es/components/tree-view/index.js"), No = () => import("@carbon/web-components/es/components/link/index.js"), L = () => import("@carbon/web-components/es/components/tabs/index.js"), Mo = () => import("@carbon/web-components/es/components/content-switcher/index.js"), Fo = () => import("@carbon/web-components/es/components/menu/index.js"), Lo = () => import("@carbon/web-components/es/components/menu-button/index.js"), Oo = () => import("@carbon/web-components/es/components/overflow-menu/index.js"), O = () => import("@carbon/web-components/es/components/button/index.js"), re = () => import("@carbon/web-components/es/components/icon-button/index.js"), zo = () => import("@carbon/web-components/es/components/combo-button/index.js"), Ro = () => import("@carbon/web-components/es/components/copy-button/index.js"), ae = () => import("@carbon/web-components/es/components/checkbox/index.js"), ce = () => import("@carbon/web-components/es/components/radio-button/index.js"), ie = () => import("@carbon/web-components/es/components/toggle/index.js"), z = () => import("@carbon/web-components/es/components/select/index.js"), le = () => import("@carbon/web-components/es/components/slider/index.js"), R = () => import("@carbon/web-components/es/components/text-input/index.js"), de = () => import("@carbon/web-components/es/components/textarea/index.js"), pe = () => import("@carbon/web-components/es/components/number-input/index.js"), ue = () => import("@carbon/web-components/es/components/password-input/index.js"), K = () => import("@carbon/web-components/es/components/search/index.js"), qo = () => import("@carbon/web-components/es/components/combo-box/index.js"), ve = () => import("@carbon/web-components/es/components/dropdown/index.js"), Uo = () => import("@carbon/web-components/es/components/multi-select/index.js"), me = () => import("@carbon/web-components/es/components/date-picker/index.js"), Ho = () => import("@carbon/web-components/es/components/time-picker/index.js"), N = () => import("@carbon/web-components/es/components/file-uploader/index.js"), fe = () => import("@carbon/web-components/es/components/form/index.js"), $o = () => import("@carbon/web-components/es/components/form-group/index.js"), he = () => import("@carbon/web-components/es/components/data-table/index.js"), ge = () => import("@carbon/web-components/es/components/pagination/index.js"), be = () => import("@carbon/web-components/es/components/code-snippet/index.js"), M = () => import("@carbon/web-components/es/components/tag/index.js"), Go = () => import("@carbon/web-components/es/components/badge-indicator/index.js"), q = () => import("@carbon/web-components/es/components/notification/index.js"), jo = () => import("@carbon/web-components/es/components/loading/index.js"), Vo = () => import("@carbon/web-components/es/components/inline-loading/index.js"), Zo = () => import("@carbon/web-components/es/components/progress-bar/index.js"), Q = () => import("@carbon/web-components/es/components/progress-indicator/index.js"), Jo = () => import("@carbon/web-components/es/components/skeleton-placeholder/index.js"), Ko = () => import("@carbon/web-components/es/components/skeleton-text/index.js"), Qo = () => import("@carbon/web-components/es/components/skeleton-icon/index.js"), X = () => import("@carbon/web-components/es/components/list/index.js"), Xo = () => import("@carbon/web-components/es/components/layer/index.js"), Y = () => import("@carbon/web-components/es/components/grid/index.js"), Yo = () => import("@carbon/web-components/es/components/pagination-nav/index.js"), P = () => import("@carbon/web-components/es/components/modal/index.js"), y = () => import("@carbon/web-components/es/components/tooltip/index.js"), en = () => import("@carbon/web-components/es/components/popover/index.js"), tn = () => import("@carbon/web-components/es/components/toggle-tip/index.js"), ke = () => import("@carbon/web-components/es/components/heading/index.js"), sn = () => import("@carbon/web-components/es/components/icon/index.js"), on = () => import("@carbon/web-components/es/components/icon-indicator/index.js"), $ = {
|
|
1456
1455
|
"cds-table": [
|
|
1457
1456
|
y,
|
|
1458
1457
|
O,
|
|
@@ -1487,7 +1486,7 @@ var Z = () => import("@carbon/web-components/es/components/accordion/index.js"),
|
|
|
1487
1486
|
"cds-combo-box": [qo],
|
|
1488
1487
|
"cds-multi-select": [Uo],
|
|
1489
1488
|
"cds-date-picker": [me],
|
|
1490
|
-
"cds-time-picker": [
|
|
1489
|
+
"cds-time-picker": [Ho],
|
|
1491
1490
|
"cds-file-uploader": [N],
|
|
1492
1491
|
"cds-file-uploader-button": [N],
|
|
1493
1492
|
"cds-file-uploader-drop-container": [N],
|
|
@@ -1539,7 +1538,7 @@ var Z = () => import("@carbon/web-components/es/components/accordion/index.js"),
|
|
|
1539
1538
|
"cds-code-snippet": [be],
|
|
1540
1539
|
"cds-form": [fe],
|
|
1541
1540
|
"cds-form-item": [fe],
|
|
1542
|
-
"cds-form-group": [
|
|
1541
|
+
"cds-form-group": [$o],
|
|
1543
1542
|
"cds-stack": [_o],
|
|
1544
1543
|
"cds-heading": [ke],
|
|
1545
1544
|
"cds-section": [ke],
|
|
@@ -1589,16 +1588,16 @@ var Z = () => import("@carbon/web-components/es/components/accordion/index.js"),
|
|
|
1589
1588
|
function nn(e) {
|
|
1590
1589
|
const t = /* @__PURE__ */ new Map();
|
|
1591
1590
|
if (!e || !(e instanceof Element)) return t;
|
|
1592
|
-
for (const s of Object.keys(
|
|
1593
|
-
for (const [s] of Object.entries(
|
|
1591
|
+
for (const s of Object.keys(H)) t.set(s, []);
|
|
1592
|
+
for (const [s] of Object.entries(H)) e.matches(s) && t.get(s).push(e);
|
|
1594
1593
|
const o = e.querySelectorAll("*");
|
|
1595
|
-
for (const s of o) for (const [n] of Object.entries(
|
|
1594
|
+
for (const s of o) for (const [n] of Object.entries(H)) s.matches(n) && t.get(n).push(s);
|
|
1596
1595
|
for (const [s, n] of t.entries()) n.length === 0 && t.delete(s);
|
|
1597
1596
|
return t;
|
|
1598
1597
|
}
|
|
1599
1598
|
function rn(e) {
|
|
1600
1599
|
const t = /* @__PURE__ */ new Set();
|
|
1601
|
-
for (const [o, s] of e.entries()) s.length > 0 &&
|
|
1600
|
+
for (const [o, s] of e.entries()) s.length > 0 && $[o] && $[o].forEach((n) => t.add(n));
|
|
1602
1601
|
return t;
|
|
1603
1602
|
}
|
|
1604
1603
|
async function an(e, t) {
|
|
@@ -1609,7 +1608,7 @@ async function an(e, t) {
|
|
|
1609
1608
|
function cn(e, t) {
|
|
1610
1609
|
let o = 0;
|
|
1611
1610
|
for (const [s, n] of e.entries()) {
|
|
1612
|
-
const r =
|
|
1611
|
+
const r = H[s];
|
|
1613
1612
|
n.forEach((a) => {
|
|
1614
1613
|
if (r.init) {
|
|
1615
1614
|
r.init.call(t, a);
|
|
@@ -1635,7 +1634,7 @@ function cn(e, t) {
|
|
|
1635
1634
|
}
|
|
1636
1635
|
return o;
|
|
1637
1636
|
}
|
|
1638
|
-
var
|
|
1637
|
+
var H = Object.fromEntries(To()), ln = async function(e, t) {
|
|
1639
1638
|
const o = nn(e);
|
|
1640
1639
|
if (o.size === 0) {
|
|
1641
1640
|
this.debugMe("[Carbon] No Carbon components found in panel");
|
|
@@ -1654,7 +1653,7 @@ var $ = Object.fromEntries(To()), ln = async function(e, t) {
|
|
|
1654
1653
|
}, mn = (e = {}) => {
|
|
1655
1654
|
const { preload: t = [] } = e, o = /* @__PURE__ */ new Map();
|
|
1656
1655
|
if (t.length > 0) {
|
|
1657
|
-
const s = t.filter((r) =>
|
|
1656
|
+
const s = t.filter((r) => $[r] ? !0 : (console.warn(`[Carbon] No import found for selector: ${r}`), !1)), n = s.flatMap((r) => $[r].map((a) => (o.has(a) || o.set(a, a()), o.get(a))));
|
|
1658
1657
|
Promise.all(n).then(() => console.debug(`[Carbon] Preloaded: ${s.join(", ")}`)).catch((r) => console.warn("[Carbon] Preload error:", r));
|
|
1659
1658
|
}
|
|
1660
1659
|
ze.register("carbon", {
|
package/dist/zooy.cjs.js
CHANGED
|
@@ -79,4 +79,4 @@ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{val
|
|
|
79
79
|
}
|
|
80
80
|
`;constructor(){super(),this.timestamp=Date.now(),this.kind="both",this.concat="r (s)",this._boundTickHandler=this._onTimeTick.bind(this),this._isListening=!1}_shouldListenToTicks(){return this.kind==="relative"||this.kind==="both"||this.kind==="stack"}connectedCallback(){super.connectedCallback(),this._updateTickListener()}disconnectedCallback(){this._removeTickListener(),super.disconnectedCallback()}updated(e){super.updated(e),e.has("kind")&&this._updateTickListener()}_updateTickListener(){const e=this._shouldListenToTicks();e&&!this._isListening?(document.addEventListener("zoo-tick-60",this._boundTickHandler),this._isListening=!0):!e&&this._isListening&&this._removeTickListener()}_removeTickListener(){this._isListening&&(document.removeEventListener("zoo-tick-60",this._boundTickHandler),this._isListening=!1)}_onTimeTick(){this.requestUpdate()}_parseTemplate(e){const t=[];let s=e;for(;s.length>0;){const i=s.indexOf("r"),r=s.indexOf("s"),n=[i,r,s.indexOf("d")].filter(c=>c!==-1).sort((c,g)=>c-g)[0];if(n===void 0){s.length>0&&t.push({type:"text",value:s});break}n>0&&t.push({type:"text",value:s.substring(0,n)}),n===i?t.push({type:"relative",value:""}):n===r?t.push({type:"static",value:""}):t.push({type:"dateOnly",value:""}),s=s.substring(n+1)}return t}_parseStackOrder(e){const t=e.indexOf("r"),s=e.indexOf("s"),i=e.indexOf("d");let r=-1,n=null;return s!==-1&&(i===-1||s<i)?(r=s,n="static"):i!==-1&&(r=i,n="dateOnly"),t!==-1&&r!==-1?t<r?["relative",n]:[n,"relative"]:t!==-1?["relative"]:r!==-1?[n]:["relative","static"]}_getFormattedParts(){let e=this.timestamp;e<9466848e5&&(e=e*1e3);const t=new Date(e),s=je(t),i=He(t),r=We(t);switch(this.kind){case"relative":return[{type:"relative",value:s}];case"datetime":return[{type:"static",value:i}];case"date":return[{type:"static",value:r}];case"both":return this._parseTemplate(this.concat).map(n=>n.type==="relative"?{type:"relative",value:s}:n.type==="static"?{type:"static",value:i}:n.type==="dateOnly"?{type:"static",value:r}:n);case"stack":return this._parseStackOrder(this.concat).map(n=>n==="relative"?{type:"relative",value:s}:n==="dateOnly"?{type:"static",value:r}:{type:"static",value:i});default:return this._parseTemplate(this.concat).map(n=>n.type==="relative"?{type:"relative",value:s}:n.type==="static"?{type:"static",value:i}:n.type==="dateOnly"?{type:"static",value:r}:n)}}render(){let e=this.timestamp;e<9466848e5&&(e=e*1e3);const t=new Date(e),s=this._getFormattedParts();return L.html`<time datetime="${t.toISOString()}">
|
|
81
81
|
${s.map(i=>i.type==="relative"?L.html`<span class="relative">${i.value}</span>`:i.type==="static"?L.html`<span class="static">${i.value}</span>`:L.html`<span class="separator">${i.value}</span>`)}
|
|
82
|
-
</time>`}};customElements.get("zoo-timestamp")||customElements.define("zoo-timestamp",_e);var ye=T.__exportAll({ZooTag:()=>Ee,ZooTimestamp:()=>_e,getEventAttribute:()=>A.getEventAttribute,getSemanticAttributes:()=>A.getSemanticAttributes});async function be(e={}){const{registerCarbonLibrary:t}=await Promise.resolve().then(()=>require("./chunks/register-
|
|
82
|
+
</time>`}};customElements.get("zoo-timestamp")||customElements.define("zoo-timestamp",_e);var ye=T.__exportAll({ZooTag:()=>Ee,ZooTimestamp:()=>_e,getEventAttribute:()=>A.getEventAttribute,getSemanticAttributes:()=>A.getSemanticAttributes});async function be(e={}){const{registerCarbonLibrary:t}=await Promise.resolve().then(()=>require("./chunks/register-B9OKySeR.js"));return t(e)}async function Se(){const{registerMdcLibrary:e}=await Promise.resolve().then(()=>require("./chunks/register-Kldh2rNG.js"));return e()}var Je={Evt:w,Component:I,Dragger:V,Panel:F,FormPanel:ue,Split:pe,UserManager:N,View:J,Conductor:ve,DataBinder:A.Binder,UiEventType:u,domUtils:p.utils_exports,uriUtils:ie,registerCarbonLibrary:be,registerMdcLibrary:Se,ComponentLibraryRegistry:T.ComponentLibraryRegistry,handlers:fe,zoo:ye};exports.Binder=A.Binder;exports.Component=I;exports.ComponentLibraryRegistry=T.ComponentLibraryRegistry;exports.Conductor=ve;exports.Dragger=V;exports.Evt=w;exports.FormPanel=ue;exports.Panel=F;exports.Split=pe;exports.UiEventType=u;exports.UserManager=N;exports.View=J;exports.default=Je;Object.defineProperty(exports,"domUtils",{enumerable:!0,get:function(){return p.utils_exports}});Object.defineProperty(exports,"handlers",{enumerable:!0,get:function(){return fe}});exports.registerCarbonLibrary=be;exports.registerMdcLibrary=Se;Object.defineProperty(exports,"uriUtils",{enumerable:!0,get:function(){return ie}});Object.defineProperty(exports,"zoo",{enumerable:!0,get:function(){return ye}});
|
package/dist/zooy.es.js
CHANGED
|
@@ -1543,7 +1543,7 @@ var ft = /* @__PURE__ */ J({
|
|
|
1543
1543
|
getSemanticAttributes: () => Ve
|
|
1544
1544
|
});
|
|
1545
1545
|
async function gt(e = {}) {
|
|
1546
|
-
const { registerCarbonLibrary: t } = await import("./chunks/register-
|
|
1546
|
+
const { registerCarbonLibrary: t } = await import("./chunks/register-CT6vMnQg.js");
|
|
1547
1547
|
return t(e);
|
|
1548
1548
|
}
|
|
1549
1549
|
async function vt() {
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Rt=Object.create;var nt=Object.defineProperty;var Ut=Object.getOwnPropertyDescriptor;var $t=Object.getOwnPropertyNames;var Ht=Object.getPrototypeOf,Gt=Object.prototype.hasOwnProperty;var jt=(t,e,s,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of $t(e))!Gt.call(t,o)&&o!==s&&nt(t,o,{get:()=>e[o],enumerable:!(n=Ut(e,o))||n.enumerable});return t};var l=(t,e,s)=>(s=t!=null?Rt(Ht(t)):{},jt(e||!t||!t.__esModule?nt(s,"default",{value:t,enumerable:!0}):s,t));const m=require("./component-library-registry-BZI0_XM_.js"),i=require("./attributes-D6kBA8su.js");let Wt=require("badu"),T=require("ramda");T=m.__toESM(T,1);let Vt=require("@carbon/web-components/lib/components/data-table/defs.js");var Zt=m.__exportAll({cdsTableWrap:()=>Xt}),ot=(t,e,s)=>{const n=customElements.get("cds-table"),o=customElements.get("cds-pagination"),r=customElements.get(n.selectorTableBatchActions);customElements.get("cds-popover");const a=e.dataBinder,c=e.pagination,p=e.skeleton,b=e.querySelector(n.selectorTableToolbarSearch),A=e.querySelector(n.selectorTableBatchActions),x=e.querySelector(n.selectorTableBody),G=["button","a","input","select","textarea",'[role="button"]',".cds--table-expand",".cds--table-column-checkbox"].join(","),tt=e.querySelectorAll(n.selectorHeaderCell+"[is-sortable]"),Pt=e.isSortable||tt.length>0,j=Symbol(),V=Symbol(),w=new Map,_t=d=>{t.listen(e,"click",u=>{const v=u.target.closest(n.selectorTableRow);if(!v||u.composedPath().some(k=>k.matches&&k.matches(G)))return;u.stopPropagation();const f=i.getSemanticAttributes(v);t.dispatchPanelEvent(d,{...f})})},Ct=d=>{t.listen(e,n.eventExpandoToggle,u=>{const v=u.target,f=v.tagName==="CDS-TABLE-HEADER-ROW",k=u.detail.expanded,W={tableAttrs:s,...i.getSemanticAttributes(v),target:v,allRows:f,didExpand:k};t.dispatchPanelEvent(d,W)})},xt=d=>{w.set(j,u=>{t.dispatchPanelEvent(d,u)})},wt=d=>{w.set(V,u=>{const v=u.detail.selectedRows,f=Math.min(v.length,A.totalRowsCount),k=u.target,W=i.getSemanticAttributes(k),E=v.map(i.getSemanticAttributes),P={tableAttrs:s,...W,target:k,selectCount:f,selection:E};t.dispatchPanelEvent(d,P)})},Dt=d=>{t.listen(e,n.eventTableRowSelect,u=>{const v=u.target,f=u.detail.selectedRows||[],k=f.length,W=f.map(i.getSemanticAttributes),E={tableAttrs:s,...i.getSemanticAttributes(v),selectCount:k,selection:W,target:v};t.dispatchPanelEvent(d,E)})},Tt=()=>{t.listen(e,n.eventBeforeSort,d=>{const u=d.target,v=d.detail.oldSortDirection,f=d.detail.sortDirection,k=i.getSemanticAttributes(u),W=k.sortField,E=f===Vt.TABLE_SORT_DIRECTION.DESCENDING?`-${W}`:W;d.cancelBubble=!0,d.stopPropagation(),d.preventDefault(),x.innerHTML="",p&&p.show(),tt.forEach((_,h)=>{_===u?(_.setAttribute("sort-active","true"),_.setAttribute("sort-direction",f)):(_.removeAttribute("sort-active"),_.setAttribute("sort-direction","none"))});const P={ordering:E};a.fetchData(P).then(()=>{c.setData(a),p&&p.hide()}),w.has(j)&&w.get(j)({tableAttrs:s,...k,sortNow:f,sortWas:v,sortField:W,ordering:E,target:u})})},Bt=()=>{t.listen(e,n.eventTableRowSelectAll,d=>{d.detail.selectedRows.length===0&&e.querySelectorAll(n.selectorTableRow).forEach(u=>{u.disabled=!1,u.selected=!1}),w.has(V)&&w.get(V)(d)})},Nt=()=>{t.listen(e,n.eventBeforeChangeSelectionAll,d=>{d.stopPropagation(),d.detail.callback&&d.detail.callback()})},Mt=d=>{const u=e.querySelector("cds-table-header-row");t.listen(d,r.eventClickSelectAll,v=>{v.stopPropagation(),u.dispatchEvent(new CustomEvent(n.eventBeforeChangeSelectionAll,{bubbles:!0,cancelable:!0,composed:!0,detail:{selected:!0,callback:()=>{d.selectedRowsCount=d.totalRowsCount,e.querySelectorAll(n.selectorTableRow).forEach(f=>{f.disabled=!0})}}}))})},Ft=d=>{t.listen(d,"keydown",u=>{if(u.key==="Enter"){p&&p.show(),c.totalItems=0,e.querySelector("cds-table-body").replaceChildren();const v={search:d.value||"",offset:0};a.fetchData(v).then(()=>{c.setData(a),p&&p.hide()})}})},Lt=d=>{t.listen(d,n.eventSearchInput,u=>{if((u.detail.value||"")===""){const v={search:"",offset:0};p&&p.show(),a.fetchData(v).then(()=>{p&&p.hide(),c.setData(a)})}})},qt=d=>{d.caret=!1;const u=d.querySelector("cds-icon-button, button:not([slot])"),v=d.querySelectorAll("cds-checkbox"),f=d.querySelectorAll("cds-modal-footer-button"),k=[...d.querySelectorAll("cds-checkbox-group")].map(i.getSemanticAttributes).map(T.pathOr("noop",["zoo","filter","field"])).reduce((h,S)=>(h[S]=null,h),{offset:0});if(!u||!f){console.error("Improperly configured Batch Filter popover");return}new MutationObserver(()=>{d.classList.toggle("cds--overflow-menu--open",d.open)}).observe(d,{attributes:!0,attributeFilter:["open"]});const W=Symbol(),E=Symbol(),P=[...f].reduce((h,S,C)=>(S.hasAttribute("reset-filter")&&h.set(W,S),S.hasAttribute("apply-filter")&&h.set(E,S),h),new Map),_=()=>{const h=new Map;return v.forEach(S=>{const C=S.getAttribute("id");if(!C||!C.includes(":"))return;const[B,N]=C.split(":");h.has(B)||h.set(B,[]),S.checked&&h.get(B).push(N)}),h};if(P.has(W)){const h=S=>S.checked=!1;t.listen(P.get(W),"click",S=>{S.stopPropagation(),v.forEach(h),p&&p.show(),a.fetchData(k).then(()=>{c&&c.setData(a),p&&p.hide(),d.open=!1})})}P.has(E)&&t.listen(P.get(E),"click",h=>{h.stopPropagation();const S=[..._()].reduce((C,[B,N])=>(C[B]=Array.isArray(N)&&N.length===0?null:N,C),{offset:0});p&&p.show(),a.fetchData(S).then(()=>{c&&c.setData(a),p&&p.hide(),d.open=!1})}),t.listen(u,"click",h=>{h.stopPropagation(),d.open=!d.open,d.classList.toggle("cds--overflow-menu--open",d.open)})},Ot=()=>{t.listen(c,o.eventPageSizeChanged,d=>{const u={limit:c.pageSize,offset:0};a.fetchData(u).then(()=>{c.setData(a)})})},zt=()=>{t.listen(c,o.eventChangeCurrent,d=>{const{page:u}=d.detail,v=c.pageSize,f={limit:v,offset:(u-1)*v};a.fetchData(f).then(()=>{c.setData(a),p&&p.hide()})})};a&&c&&(Ot(),zt()),a&&b&&(Ft(b),Lt(b));const et=e.querySelector(n.selectorTableToolbarContent);if(et){const d=et.querySelectorAll("cds-popover[data-batch-filter]");a&&d&&d.forEach(qt)}e.isSelectable&&(Bt(),Nt(),A&&Mt(A)),a&&Pt&&Tt();const st={zoo:{event:{row:{click:_t,expand:Ct,check:{one:Dt,all:wt}},column:{sort:xt}}}};(0,Wt.objToPaths)(s).forEach(([d,u])=>{T.hasPath(d,st)&&T.path(d,st)(u)})},Jt=t=>{const e=document.createElement("cds-pagination");return e.backwardText="Previous page",e.forwardText="Next page",e.itemsPerPageText="Items per page:",e.pageSize=t.limit,e.size="lg",[10,25,50,100,500].forEach(s=>{const n=document.createElement("cds-select-item");n.value=s.toString(),n.textContent=s.toString(),e.appendChild(n)}),e.setData=s=>{if(s.isPaginated){const{count:n}=T.pick(["count"],s.data),o=Math.ceil(n/s.limit);e.pagesUnknown=o>100,e.totalItems=n,e.pagesUnknown?e.formatStatusWithIndeterminateTotal=({start:r,end:a})=>`${r}–${a} of ${n} item${n<=1?"":"s"}`:delete e.formatStatusWithIndeterminateTotal}},e},Kt=t=>{if(!t.parentNode){console.error("[Carbon Table] Cannot create skeleton: table has no parent node");return}const e=!!t.querySelector("cds-table-header-title"),s=!!t.querySelector("cds-table-header-description"),n=!!t.querySelector("cds-table-toolbar"),o=[...t.querySelectorAll("cds-table-header-cell")].length,r=t.hasAttribute("zebra"),a=t.getAttribute("size"),c=document.createElement("cds-table-skeleton");c.showHeader=e||s,c.showToolbar=n,c.zebra=r,c.columnCount=o,c.size=a,c.show=()=>c.classList.remove("hidden"),c.hide=()=>c.classList.add("hidden");const p=document.createElement("div");return p.classList.add("zoo-datatable-skeleton-wrapper"),t.parentNode.insertBefore(p,t),p.appendChild(c),p.appendChild(t),c},Qt=(t,e)=>{const s=e.getAttribute("zoo-url-api"),n=parseInt(e.getAttribute("data-page-size")||25,10);if(s)return new i.Binder(t,s,e,{urlParams:{limit:n}})},Xt={selector:"cds-table",init:function(t){const e=i.getSemanticAttributes(t),s=this,n=Qt(s,t);if((0,Wt.isDefAndNotNull)(n)){t.dataBinder=n;const o=Kt(t);t.skeleton=o;const r=Jt(n);t.pagination=r,t.after(r),n.fetchData().then(a=>{o.hide(),r.setData(n),ot(s,t,e)})}else ot(s,t,e)}},Yt=m.__exportAll({cdsPaginationNavWrap:()=>ee,cdsPaginationWrap:()=>te}),te={selector:"cds-pagination",init:function(t){const e=this,s=customElements.get("cds-pagination");let n=null;e.listen(t,s.eventChangeCurrent,o=>{const r=o.detail.page,a=t.pageSize,c=(r-1)*a;c!==n&&(n=c,e.dispatchPanelEvent("pagination-changed-current",{detail:{page:r,pageSize:a,action:"page-change"}}))}),e.listen(t,s.eventPageSizeChanged,o=>{const r=t.pageSize;n=null,e.dispatchPanelEvent("pagination-changed-page-size",{detail:{page:1,pageSize:r,action:"page-size-change"}})})}},ee={selector:"cds-pagination-nav",event:"cds-page-changed",getData:(t,e,s)=>({...e,page:t.detail.page,pageNumber:t.detail.page+1,totalItems:s.totalItems})},se=m.__exportAll({cdsModalBodyContentWrap:()=>le,cdsModalBodyWrap:()=>ie,cdsModalCloseButWrap:()=>ce,cdsModalFooterButWrap:()=>pe,cdsModalFooterWrap:()=>de,cdsModalHeaderWrap:()=>oe,cdsModalHeadingWrap:()=>re,cdsModalLabelWrap:()=>ae,cdsModalWrap:()=>ne}),ne={selector:"cds-modal",init:function(t){const e=customElements.get("cds-modal"),s=i.getSemanticAttributes(t),n=t===this.getElement(),o=i.getEventAttribute(t,"open-event","event");if(o){const c=new MutationObserver(()=>{t.hasAttribute("open")&&this.dispatchPanelEvent(o,{...s,action:"opened"})});c.observe(t,{attributes:!0,attributeFilter:["open"]}),t._openObserver=c}const r=t.getAttribute("before-close-event");r&&this.listen(t,e.eventBeforeClose,c=>{this.dispatchPanelEvent(r,{...s,action:"closing",cancelable:!0})}),this.listen(t,e.eventClose,c=>{const p={...s,action:"closed",triggeredBy:c.detail?.triggeredBy};if(n){this.dispatchPanelEvent("destroy_me",p);return}const b=t.getAttribute("close-event");b&&this.dispatchPanelEvent(b,p)});const a=t.getAttribute("primary-event");a&&this.listen(t,"click",c=>{const p=c.target.closest?.('cds-modal-footer-button[kind="primary"]');p&&t.contains(p)&&this.dispatchPanelEvent(a,{...s,action:"primary"})})}},oe={selector:"cds-modal-header"},re={selector:"cds-modal-heading"},ae={selector:"cds-modal-label"},ce={selector:"cds-modal-close-button"},ie={selector:"cds-modal-body"},le={selector:"cds-modal-body-content"},de={selector:"cds-modal-footer"},pe={selector:"cds-modal-footer-button",init:function(t){const e=i.getSemanticAttributes(t);if(t.getAttribute("type")==="submit"){this.listen(t,"click",n=>{let o=t.closest("form");if(!o){const r=t.getAttribute("form");r&&(o=document.getElementById(r))}o&&o.requestSubmit()});return}const s=e.event;s&&this.listen(t,"click",n=>{n.stopPropagation(),this.dispatchPanelEvent(s,e)})}},ue=m.__exportAll({cdsMenuButtonWrap:()=>me,cdsMenuWrap:()=>ve}),ve={selector:"cds-menu",init:function(t){const e=i.getSemanticAttributes(t),s=i.getEventAttribute(t,"open-event");s&&this.listen(t,"cds-menu-opened",o=>{this.dispatchPanelEvent(s,{...e,action:"opened"})});const n=i.getEventAttribute(t,"close-event");n&&this.listen(t,"cds-menu-closed",o=>{this.dispatchPanelEvent(n,{...e,action:"closed"})}),this.listen(t,"click",o=>{if(o.target.tagName==="CDS-MENU-ITEM"){const r=i.getSemanticAttributes(o.target),a=r.event||e.event;a&&(o.stopPropagation(),this.dispatchPanelEvent(a,{...e,...r}))}}),this.listen(t,"cds-item-changed",o=>{const r=o.detail.triggeredBy,a=i.getSemanticAttributes(r),c=a.event||e.event;c&&this.dispatchPanelEvent(c,{...e,...a,action:"selection-changed"})})}},me={selector:"cds-menu-button",init:function(t){const e=i.getSemanticAttributes(t),s=t.querySelector("cds-menu");s&&this.listen(s,"click",n=>{if(n.target.tagName==="CDS-MENU-ITEM"){const o=i.getSemanticAttributes(n.target),r=o.event||e.event;r&&(n.stopPropagation(),this.dispatchPanelEvent(r,{...e,...o}))}})}},ge=m.__exportAll({cdsButFabWrap:()=>Se,cdsButtonWrap:()=>fe,cdsComboButWrap:()=>We,cdsCopyButWrap:()=>ke,cdsIconButToggleWrap:()=>be,cdsIconButWrap:()=>he}),fe={selector:"cds-button",init:function(t){const e=i.getSemanticAttributes(t);if(t.getAttribute("type")==="submit"){this.listen(t,"click",n=>{let o=t.closest("form");if(!o){const r=t.getAttribute("form");r&&(o=document.getElementById(r))}o&&o.requestSubmit()});return}const s=e.event;s&&this.listen(t,"click",n=>{n.stopPropagation(),this.dispatchPanelEvent(s,i.getSemanticAttributes(t))})}},he={selector:"cds-icon-button:not([data-toggle])",event:"click",getData:(t,e)=>e},be={selector:"cds-icon-button[data-toggle]",init:function(t){const e=i.getSemanticAttributes(t);e.event&&this.listen(t,"click",s=>{s.stopPropagation(),t.isSelected=!t.isSelected,this.dispatchPanelEvent(e.event,{...e,isOn:t.isSelected})})}},Se={selector:"cds-button[data-fab]",event:"click",getData:(t,e)=>e},ke={selector:"cds-copy-button",init:function(t){const e=i.getSemanticAttributes(t),s=e.event;s&&this.listen(t,"click",o=>{o.stopPropagation(),this.dispatchPanelEvent(s,{...e,action:"copy"})});const n=t.getAttribute("success-event");if(n){const o=new MutationObserver(()=>{t.hasAttribute("feedback-shown")&&this.dispatchPanelEvent(n,{...e,action:"copied"})});o.observe(t,{attributes:!0,attributeFilter:["feedback-shown"]}),t._copyObserver=o}}},We={selector:"cds-combo-button",init:function(t){const e=i.getSemanticAttributes(t);e.event&&this.listen(t,"click",n=>{const o=n.composedPath(),r=o.some(c=>c.tagName==="CDS-MENU-ITEM"),a=o.some(c=>c.tagName==="CDS-ICON-BUTTON");!r&&!a&&(n.stopPropagation(),this.dispatchPanelEvent(e.event,{...e,action:"primary"}))});const s=t.querySelector("cds-menu");s&&this.listen(s,"click",n=>{if(n.target.tagName==="CDS-MENU-ITEM"){const o=i.getSemanticAttributes(n.target),r=o.event||i.getEventAttribute(t,"menu-event","event");r&&this.dispatchPanelEvent(r,{...e,...o,action:"menu-item"})}})}},Ae=m.__exportAll({cdsComboBoxWrap:()=>Ie,cdsDropdownWrap:()=>Ee,cdsMultiSelectWrap:()=>ye}),Ee={selector:"cds-dropdown",init:function(t){const e=customElements.get("cds-dropdown"),s=i.getSemanticAttributes(t),n=s.event;n&&this.listen(t,e.eventSelect,r=>{this.dispatchPanelEvent(n,{...s,value:t.value,selectedValue:r.detail?.item?.value,selectedText:r.detail?.item?.textContent?.trim()})});const o=t.getAttribute("toggle-event");o&&this.listen(t,e.eventToggle,r=>{this.dispatchPanelEvent(o,{...s,open:t.hasAttribute("open")})})}},Ie={selector:"cds-combo-box",init:function(t){const e=customElements.get("cds-combo-box"),s=i.getSemanticAttributes(t),n=s.event;n&&this.listen(t,e.eventSelect,r=>{const a=r.detail?.item;this.dispatchPanelEvent(n,{...s,value:t.value,selectedValue:a?.value,selectedText:a?.textContent?.trim()})});const o=t.getAttribute("toggle-event");o&&this.listen(t,e.eventToggle,r=>{this.dispatchPanelEvent(o,{...s,open:t.hasAttribute("open")})})}},ye={selector:"cds-multi-select",init:function(t){const e=customElements.get("cds-multi-select"),s=i.getSemanticAttributes(t),n=s.event;n&&this.listen(t,e.eventSelect,r=>{const a=t.value?t.value.split(","):[];this.dispatchPanelEvent(n,{...s,selectedItems:a})});const o=t.getAttribute("toggle-event");o&&this.listen(t,e.eventToggle,r=>{this.dispatchPanelEvent(o,{...s,open:t.hasAttribute("open")})})}},Pe=m.__exportAll({cdsDatePickerWrap:()=>_e,cdsTimePickerWrap:()=>Ce}),_e={selector:"cds-date-picker",init:function(t){const e=customElements.get("cds-date-picker"),s=i.getSemanticAttributes(t),n=t.querySelector('cds-date-picker-input[kind="from"]'),o=t.querySelector('cds-date-picker-input[kind="to"]'),r=n&&o,a=s.event;a&&this.listen(t,e.eventChange,p=>{let b;r?b={from:n.value||"",to:o.value||""}:b=t.value,this.dispatchPanelEvent(a,{...s,value:b})});const c=t.getAttribute("error-event");c&&this.listen(t,e.eventFlatpickrError,p=>{this.dispatchPanelEvent(c,{...s,error:p.detail})})}},Ce={selector:"cds-time-picker",event:"cds-time-picker-changed",getData:(t,e,s)=>({...e,value:s.value})},xe=m.__exportAll({cdsFileUploaderButtonWrap:()=>Te,cdsFileUploaderDropContainerWrap:()=>Me,cdsFileUploaderWrap:()=>De});function At(t){customElements.whenDefined(t).then(e=>{if(!(!e||e.prototype.__zooyAcceptCasePatched)){if(typeof e.prototype._getFiles!="function"){console.warn(`[Zooy] ${t}._getFiles missing; accept case-insensitivity shim skipped (Carbon may have refactored).`);return}e.prototype._getFiles=function(s,n){if(n===void 0&&(n=(s.type==="drop"?s.dataTransfer:s.target)?.files),!this.accept||!/^(change|drop)$/.test(s.type))return Array.from(n??[]);const o=new Set(this.accept.toLowerCase().split(/[\s,]+/).filter(Boolean));return Array.prototype.filter.call(n??[],({name:r,type:a=""})=>{const c=r.match(/\.[^.]+$/),p=c?c[0].toLowerCase():void 0;return o.has(a.toLowerCase())||p&&o.has(p)})},e.prototype.__zooyAcceptCasePatched=!0}})}At("cds-file-uploader-drop-container");At("cds-file-uploader-button");function we(t){customElements.whenDefined(t).then(e=>{if(!e||e.prototype.__zooyDisabledGuardPatched)return;if(typeof e.selectorUploaderItem!="string"){console.warn(`[Zooy] ${t}.selectorUploaderItem missing; disabled null-guard shim skipped (Carbon may have refactored).`);return}const s=e.prototype.updated;e.prototype.updated=function(n){return n.has("disabled")&&!this.querySelector(this.constructor.selectorUploaderItem)&&(n=new Map(n),n.delete("disabled")),s.call(this,n)},e.prototype.__zooyDisabledGuardPatched=!0})}we("cds-file-uploader");var De={selector:"cds-file-uploader",init:function(t){const e=i.getSemanticAttributes(t),s=e.event;if(s){const a=t.querySelector('input[type="file"]');a&&this.listen(a,"change",c=>{this.dispatchPanelEvent(s,{...e,files:Array.from(c.target.files||[])})})}const n=a=>{const c=a.target;return{...e,...i.getSemanticAttributes(c),fileName:c.textContent.trim(),state:c.getAttribute("state"),item:c}},o=t.getAttribute("before-delete-event");o&&this.listen(t,"cds-file-uploader-item-beingdeleted",a=>{this.dispatchPanelEvent(o,{...n(a),action:"deleting",cancelable:!0})});const r=t.getAttribute("delete-event");r&&this.listen(t,"cds-file-uploader-item-deleted",a=>{this.dispatchPanelEvent(r,{...n(a),action:"deleted"})})}};function Et(t,e){const s=new DataTransfer;for(const n of e)s.items.add(n);t.files=s.files,t.dispatchEvent(new Event("change",{bubbles:!0}))}function It(t){const e=t.getAttribute("for");if(!e)return console.warn(`[Zooy] ${t.tagName.toLowerCase()} missing 'for' attribute; cannot bind to a form input.`,t),null;const s=t.ownerDocument.getElementById(e);return!s||s.tagName!=="INPUT"||s.type!=="file"?(console.warn(`[Zooy] 'for=${e}' did not resolve to an <input type="file">.`,t),null):s}var Te={selector:"cds-file-uploader-button",init:function(t){const e=It(t),s=i.getSemanticAttributes(t),n=s.event;this.listen(t,"cds-file-uploader-button-changed",o=>{const r=o.detail?.addedFiles||[];e&&Et(e,r),n&&this.dispatchPanelEvent(n,{...s,files:Array.from(r)})})}};function Be(t,e,s,n){const o=t.querySelector(`[data-file-list-for="${e}"]`);if(o){o.replaceChildren();for(const r of s){const a=t.createElement("cds-file-uploader-item");a.setAttribute("state","edit"),a.textContent=r.name,a.addEventListener("cds-file-uploader-item-deleted",()=>{n(r.name)}),o.appendChild(a)}}}function Ne(t,e){const s=new DataTransfer;for(const n of t.files)n.name!==e&&s.items.add(n);t.files=s.files,t.dispatchEvent(new Event("change",{bubbles:!0}))}var Me={selector:"cds-file-uploader-drop-container",init:function(t){const e=It(t),s=i.getSemanticAttributes(t),n=s.event,o=t.getAttribute("for"),r=()=>{if(!o||!e)return;const a=Array.from(e.files);Be(t.ownerDocument,o,a,c=>{Ne(e,c),r()}),t.multiple||(t.style.display=a.length>0?"none":"")};this.listen(t,"cds-file-uploader-drop-container-changed",a=>{const c=a.detail?.addedFiles||[],p=t.multiple?c:c.slice(0,1);e&&Et(e,p),r(),n&&this.dispatchPanelEvent(n,{...s,files:Array.from(p)})})}},Fe=m.__exportAll({cdsAccordionWrap:()=>qe,cdsContentSwitcherWrap:()=>Oe,cdsTabsVerticalWrap:()=>ze,cdsTabsWrap:()=>Le}),Le={selector:"cds-tabs",init:function(t){const e=customElements.get("cds-tabs"),s=i.getSemanticAttributes(t),n=t.getAttribute("before-select-event");n&&this.listen(t,e.eventBeforeSelect,r=>{this.dispatchPanelEvent(n,{...s,tabValue:r.detail.item?.getAttribute("value"),cancelable:!0})});const o=s.event;o&&this.listen(t,e.eventSelect,r=>{const a=r.detail.item,c=i.getSemanticAttributes(a);this.dispatchPanelEvent(o,{...s,...c,tabValue:a.getAttribute("value"),tabIndex:r.detail.index,tabText:r.detail.text})})}},qe={selector:"cds-accordion",init:function(t){const e=customElements.get("cds-accordion-item"),s=i.getSemanticAttributes(t);[...t.querySelectorAll("cds-accordion-item")].forEach(n=>{const o=i.getSemanticAttributes(n),r=o.event||s.event;r&&this.listen(n,e.eventToggle,a=>{this.dispatchPanelEvent(r,{...s,...o,open:a.detail.open})})})}},Oe={selector:"cds-content-switcher",init:function(t){const e=customElements.get("cds-content-switcher"),s=i.getSemanticAttributes(t),n=t.getAttribute("before-select-event");n&&this.listen(t,e.eventBeforeSelect,r=>{this.dispatchPanelEvent(n,{...s,value:r.detail.item?.getAttribute("value"),cancelable:!0})});const o=s.event;o&&this.listen(t,e.eventSelect,r=>{const a=r.detail.item,c=i.getSemanticAttributes(a);this.dispatchPanelEvent(o,{...s,...c,value:a.getAttribute("value")})})}},ze={selector:"cds-tabs-vertical"},Re=m.__exportAll({cdsBreadCrumbWrap:()=>He,cdsBreadcrumbItemWrap:()=>Ue,cdsBreadcrumbLinkWrap:()=>$e}),Ue={selector:"cds-breadcrumb-item"},$e={selector:"cds-breadcrumb-link",event:"click",getData:(t,e,s)=>(t.preventDefault(),{...e,href:s.getAttribute("href")})},He={selector:"cds-breadcrumb",init:function(t){const e=this,s=i.getSemanticAttributes(t),n=s.event;if(n){const o=a=>{e.dispatchPanelEvent(n,{...s,...a})};e.listen(t,"click",a=>{const c=a.target.closest("cds-breadcrumb-link");if(c){a.preventDefault(),a.stopPropagation();const p=i.getSemanticAttributes(c);o(p)}});const r=t.querySelector("cds-overflow-menu-body");r&&e.listen(r,"cds-overflow-menu-item-clicked",a=>{a.stopPropagation();const c=i.getSemanticAttributes(a.target);o(c)})}}},Ge=m.__exportAll({cdsNumberInputWrap:()=>Ze,cdsPasswordInputWrap:()=>Je,cdsSearchWrap:()=>Ke,cdsTextAreaWrap:()=>Ve,cdsTextInputWrap:()=>je}),je={selector:"cds-text-input",multiEvent:!0,events:[{type:"input",attrName:"event",getData:(t,e)=>({...e,value:t.currentTarget.value})},{type:"change",attrName:"change-event",getData:(t,e)=>({...e,value:t.currentTarget.value})}]},Ve={selector:"cds-textarea",multiEvent:!0,events:[{type:"input",attrName:"event",getData:(t,e)=>({...e,value:t.currentTarget.value})},{type:"change",attrName:"change-event",getData:(t,e)=>({...e,value:t.currentTarget.value})}]},Ze={selector:"cds-number-input",event:"cds-number-input",getData:(t,e,s)=>({...e,value:t.detail.value,direction:t.detail.direction})},Je={selector:"cds-password-input",multiEvent:!0,events:[{type:"input",attrName:"event",getData:(t,e)=>({...e,value:t.currentTarget.value})},{type:"change",attrName:"change-event",getData:(t,e)=>({...e,value:t.currentTarget.value})}]},Ke={selector:"cds-search",event:"cds-search-input",getData:(t,e,s)=>({...e,value:s.value})},Qe=m.__exportAll({cdsCheckboxWrap:()=>Xe,cdsRadioButGroupWrap:()=>Ye,cdsSelectWrap:()=>es,cdsSliderWrap:()=>ss,cdsToggleWrap:()=>ts}),Xe={selector:"cds-checkbox",event:"cds-checkbox-changed",getData:(t,e,s)=>({...e,checked:t.detail.checked,value:s.value})},Ye={selector:"cds-radio-button-group",event:"cds-radio-button-group-changed",getData:(t,e)=>({...e,value:t.detail?.value})},ts={selector:"cds-toggle",event:"cds-toggle-changed",getData:(t,e)=>({...e,isOn:t.detail.checked,value:t.detail.checked})},es={selector:"cds-select",event:"cds-select-selected",getData:(t,e)=>({...e,value:t.detail.value})},ss={selector:"cds-slider",init:function(t){const e=i.getSemanticAttributes(t),s=e.event;s&&this.listen(t,"cds-slider-changed",o=>{this.dispatchPanelEvent(s,{...e,value:o.detail.value})});const n=t.getAttribute("input-event");n&&this.listen(t,"cds-slider-input-changed",o=>{this.dispatchPanelEvent(n,{...e,value:o.detail.value})})}},ns=m.__exportAll({cdsOperationalTagWrap:()=>cs,cdsSDismissibleTagWrap:()=>rs,cdsSelectableTagWrap:()=>as,cdsTagSkeletonWrap:()=>is,cdsTagsWrap:()=>os}),os={selector:"cds-tag",event:"click",getData:(t,e)=>e},rs={selector:"cds-dismissible-tag",init:function(t){const e=i.getSemanticAttributes(t),s=t.getAttribute("click-event");s&&this.listen(t,"click",o=>{o.target.closest("button")||this.dispatchPanelEvent(s,{...e})});const n=e.event;n&&this.listen(t,"cds-dismissible-tag-closed",o=>{this.dispatchPanelEvent(n,{...e,action:"closed"})})}},yt=t=>function(e){const s=i.getSemanticAttributes(e),n=e.constructor,o=n.eventBeforeSelected||`${t}-beingselected`,r=n.eventSelected||`${t}-selected`,a=e.getAttribute("before-select-event");a&&this.listen(e,o,p=>{this.dispatchPanelEvent(a,{...s,selected:e.selected,text:e.text,action:"selecting",cancelable:!0})});const c=s.event;c&&this.listen(e,r,p=>{this.dispatchPanelEvent(c,{...s,selected:e.selected,text:e.text,action:e.selected?"selected":"deselected"})})},as={selector:"cds-selectable-tag",init:yt("cds-selectable-tag")},cs={selector:"cds-operational-tag",init:yt("cds-operational-tag")},is={selector:"cds-tag-skeleton"},ls=m.__exportAll({cdsContainedListDescriptionWrap:()=>vs,cdsContainedListItemWrap:()=>ms,cdsContainedListWrap:()=>us,cdsListItemWrap:()=>bs,cdsOrderedListWrap:()=>hs,cdsOverflowMenuWrap:()=>ds,cdsStructuredListWrap:()=>ps,cdsTreeViewWrap:()=>gs,cdsUnorderedListWrap:()=>fs}),ds={selector:"cds-overflow-menu",init:function(t){const e=i.getSemanticAttributes(t),s=e.event,n=t.querySelector("cds-overflow-menu-body");s&&n&&this.listen(n,"cds-overflow-menu-item-clicked",o=>{o.stopPropagation();const r=i.getSemanticAttributes(o.target);this.dispatchPanelEvent(s,{...e,...r})})}},ps={selector:"cds-structured-list",init:function(t){const e=i.getSemanticAttributes(t);[...t.querySelectorAll("cds-structured-list-row")].forEach(s=>{const n=i.getSemanticAttributes(s),o=n.event||e.event;o&&this.listen(s,"click",r=>{r.stopPropagation(),this.dispatchPanelEvent(o,{...e,...n})})}),t.hasAttribute("selection")&&this.listen(t,"cds-structured-list-selected",s=>{const n=s.detail.row,o=i.getSemanticAttributes(n),r=e.event;r&&this.dispatchPanelEvent(r,{...e,...o})})}},us={selector:"cds-contained-list"},vs={selector:"cds-contained-list-description"},ms={selector:"cds-contained-list-item",event:"cds-contained-list-item-click",getData:(t,e)=>e},gs={selector:"cds-tree-view",init:function(t){const e=i.getSemanticAttributes(t);this.listen(t,"cds-tree-node-selected",n=>{const o=n.detail.node,r=i.getSemanticAttributes(o),a=r.event||e.event;a&&this.dispatchPanelEvent(a,{...e,...r,nodeId:o.id,label:o.getAttribute("label")})});const s=i.getEventAttribute(t,"expand-event");s&&this.listen(t,"cds-tree-node-expanded",n=>{this.dispatchPanelEvent(s,{...e,nodeId:n.detail.node.id,expanded:n.detail.expanded})})}},fs={selector:"cds-unordered-list"},hs={selector:"cds-ordered-list"},bs={selector:"cds-list-item"},Ss=m.__exportAll({cdsActionableNotificationWrap:()=>As,cdsCalloutNotificationWrap:()=>Es,cdsInlineNotificationWrap:()=>Ws,cdsToastNotificationWrap:()=>ks}),ks={selector:"cds-toast-notification",event:"cds-notification-closed",getData:(t,e)=>({...e,action:"closed"})},Ws={selector:"cds-inline-notification",event:"cds-notification-closed",getData:(t,e)=>({...e,action:"closed"})},As={selector:"cds-actionable-notification",init:function(t){const e=i.getSemanticAttributes(t),s=i.getEventAttribute(t,"close-event","event");s&&this.listen(t,"cds-notification-closed",o=>{this.dispatchPanelEvent(s,{...e,action:"closed"})});const n=i.getEventAttribute(t,"action-event");n&&this.listen(t,"cds-notification-actioned",o=>{this.dispatchPanelEvent(n,{...e,action:"actioned"})})}},Es={selector:"cds-callout-notification"},Is=m.__exportAll({cdsClickableTileWrap:()=>_s,cdsExpandableTileWrap:()=>Cs,cdsRadioTileWrap:()=>ws,cdsSelectableTileWrap:()=>xs,cdsTileGroupWrap:()=>Ds,cdsTileWrap:()=>Ps});function ys(t){customElements.whenDefined(t).then(e=>{if(!e||e.prototype.__zooyChevronListenerPatched)return;const s=e.prototype.render;e.prototype.render=function(){const n=s.call(this),o=n?.strings?.findIndex?.(a=>/@click="$/.test(a))??-1;if(o<0||n.values[o]!=="")return n;const r=n.values.slice();return r[o]=void 0,{...n,values:r}},e.prototype.__zooyChevronListenerPatched=!0})}ys("cds-expandable-tile");var Ps={selector:"cds-tile"},_s={selector:"cds-clickable-tile",init:function(t){const e=i.getSemanticAttributes(t),s=e.event;if(s){const n=e.href||t.getAttribute("href")||"";t.removeAttribute("href"),t.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),this.dispatchPanelEvent(s,{...e,href:n})},!0)}}},Cs={selector:"cds-expandable-tile",init:function(t){const e=i.getSemanticAttributes(t),s=t.getAttribute("before-toggle-event");s&&this.listen(t,"cds-expandable-tile-beingtoggled",o=>{this.dispatchPanelEvent(s,{...e,expanded:o.detail.expanded,cancelable:!0})});const n=e.event;n&&this.listen(t,"cds-expandable-tile-toggled",o=>{this.dispatchPanelEvent(n,{...e,expanded:o.detail.expanded})})}},xs={selector:"cds-selectable-tile",event:"cds-selectable-tile-changed",getData:(t,e,s)=>({...e,selected:t.detail.selected,value:s.value})},ws={selector:"cds-radio-tile",event:"cds-radio-tile-selected",getData:(t,e,s)=>({...e,selected:t.detail.selected,name:t.detail.name,value:s.value})},Ds={selector:"cds-tile-group",init:function(t){const e=i.getSemanticAttributes(t),s=e.event;s&&(this.listen(t,"cds-current-radio-tile-selection",n=>{const o=n.detail.target;this.dispatchPanelEvent(s,{...e,value:o?.value,name:o?.name,selected:o?.selected})}),this.listen(t,"cds-current-selectable-tile-selections",n=>{const o=n.detail.currentSelections||[];this.dispatchPanelEvent(s,{...e,values:o.map(r=>r.value),names:o.map(r=>r.name),count:o.length})}))}},Ts=m.__exportAll({cdsInlineLoadingWrap:()=>Ms,cdsProgressBarWrap:()=>Bs,cdsProgressIndicatorWrap:()=>Ns}),Bs={selector:"cds-progress-bar",init:function(t){const e=i.getSemanticAttributes(t);if(e.event){const s=new MutationObserver(()=>{const n=parseFloat(t.getAttribute("value")||"0");n>=parseFloat(t.getAttribute("max")||"100")&&this.dispatchPanelEvent(e.event,{...e,value:n,status:"complete"})});s.observe(t,{attributes:!0,attributeFilter:["value"]}),t._progressObserver=s}}},Ns={selector:"cds-progress-indicator",init:function(t){const e=i.getSemanticAttributes(t),s=()=>[...t.querySelectorAll("cds-progress-step")];(e.event||s().some(n=>i.getSemanticAttributes(n).event))&&typeof t.onChange!="function"&&(t.onChange=()=>{}),this.listen(t,"cds-progress-step-click",n=>{const o=n.target,r=i.getSemanticAttributes(o),a=r.event||e.event;a&&this.dispatchPanelEvent(a,{...e,...r,stepIndex:s().indexOf(o),stepLabel:o.getAttribute("label")})})}},Ms={selector:"cds-inline-loading",init:function(t){const e=i.getSemanticAttributes(t),s=e.event;s&&this.listen(t,"cds-inline-loading-onsuccess",o=>{this.dispatchPanelEvent(s,{...e,status:"finished"})});const n=t.getAttribute("status-event");if(n){const o=new MutationObserver(r=>{r.forEach(a=>{if(a.attributeName==="status"){const c=t.getAttribute("status");this.dispatchPanelEvent(n,{...e,status:c})}})});o.observe(t,{attributes:!0,attributeFilter:["status"]}),t._statusObserver=o}}},Fs=m.__exportAll({cdsDefinitionTooltipWrap:()=>zs,cdsPopoverWrap:()=>qs,cdsToggletipWrap:()=>Os,cdsTooltipWrap:()=>Ls}),Ls={selector:"cds-tooltip",init:function(t){const e=i.getSemanticAttributes(t),s=i.getEventAttribute(t,"open-event");s&&this.listen(t,"cds-tooltip-beingopened",o=>{this.dispatchPanelEvent(s,{...e,action:"opened"})});const n=i.getEventAttribute(t,"close-event");n&&this.listen(t,"cds-tooltip-closed",o=>{this.dispatchPanelEvent(n,{...e,action:"closed"})})}},qs={selector:"cds-popover",init:function(t){const e=i.getSemanticAttributes(t),s=i.getEventAttribute(t,"open-event");s&&this.listen(t,"cds-popover-beingopened",o=>{this.dispatchPanelEvent(s,{...e,action:"opened"})});const n=i.getEventAttribute(t,"close-event");n&&this.listen(t,"cds-popover-closed",o=>{this.dispatchPanelEvent(n,{...e,action:"closed"})})}},Os={selector:"cds-toggletip",init:function(t){const e=i.getSemanticAttributes(t);if(e.event){const s=new MutationObserver(n=>{n.forEach(o=>{if(o.attributeName==="open"){const r=t.hasAttribute("open");this.dispatchPanelEvent(e.event,{...e,action:r?"opened":"closed",open:r})}})});s.observe(t,{attributes:!0,attributeFilter:["open"]}),t._toggletipObserver=s}}},zs={selector:"cds-definition-tooltip"},Rs=m.__exportAll({cdsCodeSnipWrap:()=>$s,cdsLinkWrap:()=>Us}),Us={selector:"cds-link",event:"click",getData:(t,e,s)=>({...e,href:s.getAttribute("href")})},$s={selector:"cds-code-snippet",event:"cds-copy-button-clicked",getData:(t,e)=>({...e,action:"copied"})},Hs=m.__exportAll({cdsBadgeIndicatorWrap:()=>Ys,cdsColumnHangWrap:()=>on,cdsColumnWrap:()=>nn,cdsFormGroupWrap:()=>Vs,cdsFormItemWrap:()=>js,cdsFormWrap:()=>Gs,cdsGridWrap:()=>sn,cdsHeadingWrap:()=>Js,cdsIconIndicatorWrap:()=>Xs,cdsIconWrap:()=>Qs,cdsLayerWrap:()=>en,cdsLoadingWrap:()=>tn,cdsSectionWrap:()=>Ks,cdsStackWrap:()=>Zs}),Gs={selector:"cds-form"},js={selector:"cds-form-item"},Vs={selector:"cds-form-group"},Zs={selector:"cds-stack"},Js={selector:"cds-heading"},Ks={selector:"cds-section"},Qs={selector:"cds-icon"},Xs={selector:"cds-icon-indicator"},Ys={selector:"cds-badge-indicator"},tn={selector:"cds-loading"},en={selector:"cds-layer"},sn={selector:"cds-grid"},nn={selector:"cds-column"},on={selector:"cds-column-hang"},rn=m.__exportAll({cdsAccordionItemSkeletonWrap:()=>pn,cdsAccordionSkeletonWrap:()=>dn,cdsBreadcrumbSkeletonWrap:()=>un,cdsButtonSkeletonWrap:()=>vn,cdsCheckboxSkeletonWrap:()=>mn,cdsCodeSnippetSkeletonWrap:()=>gn,cdsDatePickerInputSkeletonWrap:()=>hn,cdsDropdownSkeletonWrap:()=>bn,cdsFileUploaderSkeletonWrap:()=>Sn,cdsNumberInputSkeletonWrap:()=>kn,cdsPasswordInputSkeletonWrap:()=>Wn,cdsProgressIndicatorSkeletonWrap:()=>An,cdsProgressStepSkeletonWrap:()=>En,cdsRadioButtonSkeletonWrap:()=>In,cdsSearchSkeletonWrap:()=>yn,cdsSelectSkeletonWrap:()=>Pn,cdsSkeletonIconWrap:()=>ln,cdsSkeletonPlaceholderWrap:()=>cn,cdsSkeletonTextWrap:()=>an,cdsSliderSkeletonWrap:()=>_n,cdsStructuredListHeaderCellSkeletonWrap:()=>Cn,cdsTabSkeletonWrap:()=>wn,cdsTableSkeletonWrap:()=>fn,cdsTabsSkeletonWrap:()=>xn,cdsTextInputSkeletonWrap:()=>Dn,cdsTextareaSkeletonWrap:()=>Tn,cdsToggleSkeletonWrap:()=>Bn}),an={selector:"cds-skeleton-text"},cn={selector:"cds-skeleton-placeholder"},ln={selector:"cds-skeleton-icon"},dn={selector:"cds-accordion-skeleton"},pn={selector:"cds-accordion-item-skeleton"},un={selector:"cds-breadcrumb-skeleton"},vn={selector:"cds-button-skeleton"},mn={selector:"cds-checkbox-skeleton"},gn={selector:"cds-code-snippet-skeleton"},fn={selector:"cds-table-skeleton"},hn={selector:"cds-date-picker-input-skeleton"},bn={selector:"cds-dropdown-skeleton"},Sn={selector:"cds-file-uploader-skeleton"},kn={selector:"cds-number-input-skeleton"},Wn={selector:"cds-password-input-skeleton"},An={selector:"cds-progress-indicator-skeleton"},En={selector:"cds-progress-step-skeleton"},In={selector:"cds-radio-button-skeleton"},yn={selector:"cds-search-skeleton"},Pn={selector:"cds-select-skeleton"},_n={selector:"cds-slider-skeleton"},Cn={selector:"cds-structured-list-header-cell-skeleton"},xn={selector:"cds-tabs-skeleton"},wn={selector:"cds-tab-skeleton"},Dn={selector:"cds-text-input-skeleton"},Tn={selector:"cds-textarea-skeleton"},Bn={selector:"cds-toggle-skeleton"};function g(t){return Object.values(t).filter(e=>typeof e=="object"&&e!==null&&e.selector)}var Nn=[...g(Yt),...g(Zt),...g(se),...g(ue),...g(ge),...g(Ae),...g(Pe),...g(xe),...g(Fe),...g(Re),...g(Ge),...g(Qe),...g(ns),...g(ls),...g(Ss),...g(Is),...g(Ts),...g(Fs),...g(Rs),...g(Hs),...g(rn)];function Mn(){const t=new Map;return Nn.forEach(e=>{t.set(e.selector,e)}),t}var Z=()=>import("@carbon/web-components/es/components/accordion/index.js"),L=()=>import("@carbon/web-components/es/components/breadcrumb/index.js"),Fn=()=>import("@carbon/web-components/es/components/stack/index.js"),rt=()=>import("@carbon/web-components/es/components/structured-list/index.js"),J=()=>import("@carbon/web-components/es/components/contained-list/index.js"),D=()=>import("@carbon/web-components/es/components/tile/index.js"),Ln=()=>import("@carbon/web-components/es/components/tree-view/index.js"),qn=()=>import("@carbon/web-components/es/components/link/index.js"),q=()=>import("@carbon/web-components/es/components/tabs/index.js"),On=()=>import("@carbon/web-components/es/components/content-switcher/index.js"),zn=()=>import("@carbon/web-components/es/components/menu/index.js"),Rn=()=>import("@carbon/web-components/es/components/menu-button/index.js"),Un=()=>import("@carbon/web-components/es/components/overflow-menu/index.js"),O=()=>import("@carbon/web-components/es/components/button/index.js"),at=()=>import("@carbon/web-components/es/components/icon-button/index.js"),$n=()=>import("@carbon/web-components/es/components/combo-button/index.js"),Hn=()=>import("@carbon/web-components/es/components/copy-button/index.js"),ct=()=>import("@carbon/web-components/es/components/checkbox/index.js"),it=()=>import("@carbon/web-components/es/components/radio-button/index.js"),lt=()=>import("@carbon/web-components/es/components/toggle/index.js"),z=()=>import("@carbon/web-components/es/components/select/index.js"),dt=()=>import("@carbon/web-components/es/components/slider/index.js"),R=()=>import("@carbon/web-components/es/components/text-input/index.js"),pt=()=>import("@carbon/web-components/es/components/textarea/index.js"),ut=()=>import("@carbon/web-components/es/components/number-input/index.js"),vt=()=>import("@carbon/web-components/es/components/password-input/index.js"),K=()=>import("@carbon/web-components/es/components/search/index.js"),Gn=()=>import("@carbon/web-components/es/components/combo-box/index.js"),mt=()=>import("@carbon/web-components/es/components/dropdown/index.js"),jn=()=>import("@carbon/web-components/es/components/multi-select/index.js"),gt=()=>import("@carbon/web-components/es/components/date-picker/index.js"),Vn=()=>import("@carbon/web-components/es/components/time-picker/index.js"),M=()=>import("@carbon/web-components/es/components/file-uploader/index.js"),ft=()=>import("@carbon/web-components/es/components/form/index.js"),Zn=()=>import("@carbon/web-components/es/components/form-group/index.js"),ht=()=>import("@carbon/web-components/es/components/data-table/index.js"),bt=()=>import("@carbon/web-components/es/components/pagination/index.js"),St=()=>import("@carbon/web-components/es/components/code-snippet/index.js"),F=()=>import("@carbon/web-components/es/components/tag/index.js"),Jn=()=>import("@carbon/web-components/es/components/badge-indicator/index.js"),U=()=>import("@carbon/web-components/es/components/notification/index.js"),Kn=()=>import("@carbon/web-components/es/components/loading/index.js"),Qn=()=>import("@carbon/web-components/es/components/inline-loading/index.js"),Xn=()=>import("@carbon/web-components/es/components/progress-bar/index.js"),Q=()=>import("@carbon/web-components/es/components/progress-indicator/index.js"),Yn=()=>import("@carbon/web-components/es/components/skeleton-placeholder/index.js"),to=()=>import("@carbon/web-components/es/components/skeleton-text/index.js"),eo=()=>import("@carbon/web-components/es/components/skeleton-icon/index.js"),X=()=>import("@carbon/web-components/es/components/list/index.js"),so=()=>import("@carbon/web-components/es/components/layer/index.js"),Y=()=>import("@carbon/web-components/es/components/grid/index.js"),no=()=>import("@carbon/web-components/es/components/pagination-nav/index.js"),y=()=>import("@carbon/web-components/es/components/modal/index.js"),I=()=>import("@carbon/web-components/es/components/tooltip/index.js"),oo=()=>import("@carbon/web-components/es/components/popover/index.js"),ro=()=>import("@carbon/web-components/es/components/toggle-tip/index.js"),kt=()=>import("@carbon/web-components/es/components/heading/index.js"),ao=()=>import("@carbon/web-components/es/components/icon/index.js"),co=()=>import("@carbon/web-components/es/components/icon-indicator/index.js"),H={"cds-table":[I,O,R,K,z,bt,ht],"cds-pagination":[z,R,bt],"cds-button":[I,O],"cds-icon-button:not([data-toggle])":[I,at],"cds-icon-button[data-toggle]":[I,at],"cds-button[data-fab]":[I,O],"cds-copy-button":[I,Hn],"cds-combo-button":[I,$n],"cds-checkbox":[ct],"cds-radio-button-group":[it],"cds-toggle":[lt],"cds-select":[z],"cds-slider":[dt],"cds-text-input":[R],"cds-textarea":[pt],"cds-number-input":[ut],"cds-password-input":[I,vt],"cds-search":[K],"cds-dropdown":[mt],"cds-combo-box":[Gn],"cds-multi-select":[jn],"cds-date-picker":[gt],"cds-time-picker":[Vn],"cds-file-uploader":[M],"cds-file-uploader-button":[M],"cds-file-uploader-drop-container":[M],"cds-file-uploader-item":[M],"cds-tabs":[q],"cds-accordion":[Z],"cds-content-switcher":[On],"cds-breadcrumb":[L],"cds-breadcrumb-item":[L],"cds-breadcrumb-link":[L],"cds-menu":[zn],"cds-menu-button":[Rn],"cds-overflow-menu":[Un],"cds-structured-list":[rt],"cds-contained-list":[J],"cds-contained-list-item":[J],"cds-contained-list-description":[J],"cds-tree-view":[Ln],"cds-modal":[y],"cds-modal-header":[y],"cds-modal-heading":[y],"cds-modal-label":[y],"cds-modal-close-button":[y],"cds-modal-body":[y],"cds-modal-body-content":[y],"cds-modal-footer":[y],"cds-modal-footer-button":[y],"cds-toast-notification":[U],"cds-inline-notification":[U],"cds-actionable-notification":[U],"cds-tile":[D],"cds-tile-group":[D],"cds-clickable-tile":[D],"cds-expandable-tile":[D],"cds-selectable-tile":[D],"cds-radio-tile":[D],"cds-progress-bar":[Xn],"cds-progress-indicator":[Q],"cds-inline-loading":[Qn],"cds-tooltip":[I],"cds-popover":[oo],"cds-toggletip":[ro],"cds-tag":[F],"cds-dismissible-tag":[F],"cds-selectable-tag":[F],"cds-operational-tag":[F],"cds-tag-skeleton":[F],"cds-link":[qn],"cds-code-snippet":[St],"cds-form":[ft],"cds-form-item":[ft],"cds-form-group":[Zn],"cds-stack":[Fn],"cds-heading":[kt],"cds-section":[kt],"cds-icon":[ao],"cds-icon-indicator":[co],"cds-badge-indicator":[Jn],"cds-loading":[Kn],"cds-skeleton-text":[to],"cds-skeleton-placeholder":[Yn],"cds-skeleton-icon":[eo],"cds-accordion-skeleton":[Z],"cds-accordion-item-skeleton":[Z],"cds-breadcrumb-skeleton":[L],"cds-button-skeleton":[O],"cds-checkbox-skeleton":[ct],"cds-code-snippet-skeleton":[St],"cds-table-skeleton":[ht],"cds-date-picker-input-skeleton":[gt],"cds-dropdown-skeleton":[mt],"cds-file-uploader-skeleton":[M],"cds-number-input-skeleton":[ut],"cds-password-input-skeleton":[vt],"cds-progress-indicator-skeleton":[Q],"cds-progress-step-skeleton":[Q],"cds-radio-button-skeleton":[it],"cds-search-skeleton":[K],"cds-select-skeleton":[z],"cds-slider-skeleton":[dt],"cds-structured-list-header-cell-skeleton":[rt],"cds-tabs-skeleton":[q],"cds-tab-skeleton":[q],"cds-text-input-skeleton":[R],"cds-textarea-skeleton":[pt],"cds-toggle-skeleton":[lt],"cds-callout-notification":[U],"cds-definition-tooltip":[I],"cds-tabs-vertical":[q],"cds-unordered-list":[X],"cds-ordered-list":[X],"cds-list-item":[X],"cds-layer":[so],"cds-grid":[Y],"cds-column":[Y],"cds-column-hang":[Y],"cds-pagination-nav":[no]};function io(t){const e=new Map;if(!t||!(t instanceof Element))return e;for(const n of Object.keys($))e.set(n,[]);for(const[n]of Object.entries($))t.matches(n)&&e.get(n).push(t);const s=t.querySelectorAll("*");for(const n of s)for(const[o]of Object.entries($))n.matches(o)&&e.get(o).push(n);for(const[n,o]of e.entries())o.length===0&&e.delete(n);return e}function lo(t){const e=new Set;for(const[s,n]of t.entries())n.length>0&&H[s]&&H[s].forEach(o=>e.add(o));return e}async function po(t,e){if(t.size===0)return;const s=Array.from(t).map(async n=>(e.has(n)||e.set(n,n()),e.get(n)));await Promise.all(s)}function uo(t,e){let s=0;for(const[n,o]of t.entries()){const r=$[n];o.forEach(a=>{if(r.init){r.init.call(e,a);return}if(r.multiEvent){const b=i.getSemanticAttributes(a);r.events.forEach(A=>{const x=i.getEventAttribute(a,A.attrName,"event");x&&e.listen(a,A.type,G=>{e.dispatchPanelEvent(x,A.getData(G,b,a))})});return}const c=i.getSemanticAttributes(a),p=c.event;p&&e.listen(a,r.event,b=>{b.stopPropagation();const A=r.getData(b,c,a),x=A._eventOverride||p;delete A._eventOverride,e.dispatchPanelEvent(x,A)})}),s+=o.length}return s}var $=Object.fromEntries(Mn()),vo=async function(t,e){const s=io(t);if(s.size===0){this.debugMe("[Carbon] No Carbon components found in panel");return}this.carbonComponents||(this.carbonComponents=new Map);for(const[r,a]of s.entries())this.carbonComponents.set(r,a);const n=lo(s);if(n.size>0)try{await po(n,e)}catch(r){console.error("[Carbon] Failed to load some component modules:",r)}const o=uo(s,this);o>0&&this.debugMe(`[Carbon] Total components initialized: ${o}`)},mo=(t={})=>{const{preload:e=[]}=t,s=new Map;if(e.length>0){const n=e.filter(r=>H[r]?!0:(console.warn(`[Carbon] No import found for selector: ${r}`),!1)),o=n.flatMap(r=>H[r].map(a=>(s.has(a)||s.set(a,a()),s.get(a))));Promise.all(o).then(()=>console.debug(`[Carbon] Preloaded: ${n.join(", ")}`)).catch(r=>console.warn("[Carbon] Preload error:",r))}m.ComponentLibraryRegistry.register("carbon",{cache:s,render:async function(n,o){try{await vo.call(this,n,o)}catch(r){console.error("[Carbon] Initialization error:",r)}},dispose:function(n){},config:{version:"2.0",description:"IBM Carbon Design System Web Components"}}),console.debug("[Zooy] Carbon Design System library registered")};exports.registerCarbonLibrary=mo;
|