@trintel/zooy 1.14.2 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/chunks/register-B0h_UWOz.js +1 -0
- package/dist/chunks/register-CSR-CzsT.js +1679 -0
- package/dist/zooy.cjs.js +1 -1
- package/dist/zooy.es.js +1 -1
- package/package.json +8 -2
- package/src/sass/carbon.scss +20 -0
- package/dist/chunks/register-Dq0hul2Y.js +0 -1
- package/dist/chunks/register-RDk7_sJH.js +0 -1632
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Event-driven JavaScript UI framework for building complex web applications.
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
8
|
+
vp add @trintel/zooy
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Core Architecture
|
|
@@ -404,25 +404,25 @@ import "@trintel/zooy/sass"; // Main SASS entry point
|
|
|
404
404
|
### Setup
|
|
405
405
|
|
|
406
406
|
```bash
|
|
407
|
-
|
|
407
|
+
vp install
|
|
408
408
|
```
|
|
409
409
|
|
|
410
410
|
### Build
|
|
411
411
|
|
|
412
412
|
```bash
|
|
413
|
-
|
|
413
|
+
vp run build
|
|
414
414
|
```
|
|
415
415
|
|
|
416
416
|
### Linting
|
|
417
417
|
|
|
418
418
|
```bash
|
|
419
|
-
|
|
420
|
-
|
|
419
|
+
vp lint # Check
|
|
420
|
+
vp lint --fix # Auto-fix
|
|
421
421
|
```
|
|
422
422
|
|
|
423
423
|
### Pre-commit Hooks
|
|
424
424
|
|
|
425
|
-
|
|
425
|
+
Vite+ git hooks (`.vite-hooks/`, installed by `vp config` on install) lint staged files before commits.
|
|
426
426
|
|
|
427
427
|
## Code Quality
|
|
428
428
|
|
|
@@ -0,0 +1 @@
|
|
|
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;
|