@trintel/zooy 1.14.2 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +14 -11
- 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/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-B0h_UWOz.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-CSR-CzsT.js");
|
|
1547
1547
|
return t(e);
|
|
1548
1548
|
}
|
|
1549
1549
|
async function vt() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trintel/zooy",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.1",
|
|
4
4
|
"description": "UI Building Blocks",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -30,29 +30,32 @@
|
|
|
30
30
|
"./sass": "./src/sass/main.scss"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@carbon/icons": "
|
|
34
|
-
"@carbon/web-components": "
|
|
35
|
-
"@ibm/plex": "
|
|
36
|
-
"badu": "
|
|
33
|
+
"@carbon/icons": "^11.87.0",
|
|
34
|
+
"@carbon/web-components": "^2.62.0",
|
|
35
|
+
"@ibm/plex": "^6.4.1",
|
|
36
|
+
"badu": "^8.6.0",
|
|
37
37
|
"lit": "^3.1.0",
|
|
38
38
|
"material-components-web": "^14.0.0",
|
|
39
|
-
"ramda": "
|
|
39
|
+
"ramda": "^0.32.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@eslint/js": "latest",
|
|
43
42
|
"@vitest/browser-playwright": "4.1.11",
|
|
44
|
-
"esbuild": "latest",
|
|
45
|
-
"esm": "latest",
|
|
46
43
|
"playwright": "1.62.1",
|
|
47
|
-
"sass": "
|
|
44
|
+
"sass": "^1.103.1",
|
|
48
45
|
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.0",
|
|
49
|
-
"vite-plus": "0.3.0"
|
|
46
|
+
"vite-plus": "0.3.0",
|
|
47
|
+
"node": "runtime:^24.0.0"
|
|
50
48
|
},
|
|
51
49
|
"devEngines": {
|
|
52
50
|
"packageManager": {
|
|
53
51
|
"name": "pnpm",
|
|
54
52
|
"version": "11.24.0",
|
|
55
53
|
"onFail": "download"
|
|
54
|
+
},
|
|
55
|
+
"runtime": {
|
|
56
|
+
"name": "node",
|
|
57
|
+
"version": "^24.0.0",
|
|
58
|
+
"onFail": "download"
|
|
56
59
|
}
|
|
57
60
|
},
|
|
58
61
|
"scripts": {
|
package/src/sass/carbon.scss
CHANGED
|
@@ -116,6 +116,15 @@ cds-popover {
|
|
|
116
116
|
// Long modal content still scrolls correctly because the inner
|
|
117
117
|
// <cds-modal-body> has its own `overflow-y: auto` on a different
|
|
118
118
|
// element (`.cds--modal-content`).
|
|
119
|
+
// A <cds-modal> that is part of a panel's markup (rather than a fetched,
|
|
120
|
+
// panel-root modal) sits in the DOM before Carbon's module is imported. Until
|
|
121
|
+
// the element is defined the browser would render its light-DOM children
|
|
122
|
+
// inline — the "modal shows on page load" flash. Hide it until it upgrades;
|
|
123
|
+
// Carbon takes over visibility from there.
|
|
124
|
+
cds-modal:not(:defined) {
|
|
125
|
+
display: none;
|
|
126
|
+
}
|
|
127
|
+
|
|
119
128
|
cds-modal[open][allow_overflow]::part(dialog) {
|
|
120
129
|
overflow: visible;
|
|
121
130
|
}
|
|
@@ -125,3 +134,14 @@ cds-modal[open][allow_overflow] {
|
|
|
125
134
|
overflow: visible;
|
|
126
135
|
}
|
|
127
136
|
}
|
|
137
|
+
|
|
138
|
+
// Carbon gives <cds-definition-tooltip> no host `display`, yet its shadow
|
|
139
|
+
// <cds-popover> is `display: flex` — a block-level box inside an inline host,
|
|
140
|
+
// so every term forces line breaks before and after itself in running text
|
|
141
|
+
// ("The / MNO / supplies the / ICCID …"). Reproduced with Carbon's CSS alone,
|
|
142
|
+
// so it is a Carbon oversight. A document rule on the host is safe here:
|
|
143
|
+
// Carbon sets no `:host` display for this element (unlike cds-modal, whose
|
|
144
|
+
// host-level visibility must be left alone).
|
|
145
|
+
cds-definition-tooltip {
|
|
146
|
+
display: inline-flex;
|
|
147
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Ut=Object.create;var nt=Object.defineProperty;var Ht=Object.getOwnPropertyDescriptor;var $t=Object.getOwnPropertyNames;var Gt=Object.getPrototypeOf,jt=Object.prototype.hasOwnProperty;var Vt=(t,e,s,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of $t(e))!jt.call(t,o)&&o!==s&&nt(t,o,{get:()=>e[o],enumerable:!(n=Ht(e,o))||n.enumerable});return t};var l=(t,e,s)=>(s=t!=null?Ut(Gt(t)):{},Vt(e||!t||!t.__esModule?nt(s,"default",{value:t,enumerable:!0}):s,t));const m=require("./component-library-registry-BZI0_XM_.js"),c=require("./attributes-D6kBA8su.js");let At=require("badu"),T=require("ramda");T=m.__toESM(T,1);let Zt=require("@carbon/web-components/lib/components/data-table/defs.js");var Jt=m.__exportAll({cdsTableWrap:()=>Yt}),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,i=e.pagination,p=e.skeleton,k=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]"),_t=e.isSortable||tt.length>0,j=Symbol(),V=Symbol(),w=new Map,Ct=d=>{t.listen(e,"click",u=>{const v=u.target.closest(n.selectorTableRow);if(!v||u.composedPath().some(S=>S.matches&&S.matches(G)))return;u.stopPropagation();const f=c.getSemanticAttributes(v);t.dispatchPanelEvent(d,{...f})})},xt=d=>{t.listen(e,n.eventExpandoToggle,u=>{const v=u.target,f=v.tagName==="CDS-TABLE-HEADER-ROW",S=u.detail.expanded,W={tableAttrs:s,...c.getSemanticAttributes(v),target:v,allRows:f,didExpand:S};t.dispatchPanelEvent(d,W)})},wt=d=>{w.set(j,u=>{t.dispatchPanelEvent(d,u)})},Dt=d=>{w.set(V,u=>{const v=u.detail.selectedRows,f=Math.min(v.length,A.totalRowsCount),S=u.target,W=c.getSemanticAttributes(S),E=v.map(c.getSemanticAttributes),P={tableAttrs:s,...W,target:S,selectCount:f,selection:E};t.dispatchPanelEvent(d,P)})},Tt=d=>{t.listen(e,n.eventTableRowSelect,u=>{const v=u.target,f=u.detail.selectedRows||[],S=f.length,W=f.map(c.getSemanticAttributes),E={tableAttrs:s,...c.getSemanticAttributes(v),selectCount:S,selection:W,target:v};t.dispatchPanelEvent(d,E)})},Bt=()=>{t.listen(e,n.eventBeforeSort,d=>{const u=d.target,v=d.detail.oldSortDirection,f=d.detail.sortDirection,S=c.getSemanticAttributes(u),W=S.sortField,E=f===Zt.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(()=>{i.setData(a),p&&p.hide()}),w.has(j)&&w.get(j)({tableAttrs:s,...S,sortNow:f,sortWas:v,sortField:W,ordering:E,target:u})})},Nt=()=>{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)})},Mt=()=>{t.listen(e,n.eventBeforeChangeSelectionAll,d=>{d.stopPropagation(),d.detail.callback&&d.detail.callback()})},Ft=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})}}}))})},Lt=d=>{t.listen(d,"keydown",u=>{if(u.key==="Enter"){p&&p.show(),i.totalItems=0,e.querySelector("cds-table-body").replaceChildren();const v={search:d.value||"",offset:0};a.fetchData(v).then(()=>{i.setData(a),p&&p.hide()})}})},qt=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(),i.setData(a)})}})},Ot=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"),S=[...d.querySelectorAll("cds-checkbox-group")].map(c.getSemanticAttributes).map(T.pathOr("noop",["zoo","filter","field"])).reduce((h,b)=>(h[b]=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,b,C)=>(b.hasAttribute("reset-filter")&&h.set(W,b),b.hasAttribute("apply-filter")&&h.set(E,b),h),new Map),_=()=>{const h=new Map;return v.forEach(b=>{const C=b.getAttribute("id");if(!C||!C.includes(":"))return;const[B,N]=C.split(":");h.has(B)||h.set(B,[]),b.checked&&h.get(B).push(N)}),h};if(P.has(W)){const h=b=>b.checked=!1;t.listen(P.get(W),"click",b=>{b.stopPropagation(),v.forEach(h),p&&p.show(),a.fetchData(S).then(()=>{i&&i.setData(a),p&&p.hide(),d.open=!1})})}P.has(E)&&t.listen(P.get(E),"click",h=>{h.stopPropagation();const b=[..._()].reduce((C,[B,N])=>(C[B]=Array.isArray(N)&&N.length===0?null:N,C),{offset:0});p&&p.show(),a.fetchData(b).then(()=>{i&&i.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)})},zt=()=>{t.listen(i,o.eventPageSizeChanged,d=>{const u={limit:i.pageSize,offset:0};a.fetchData(u).then(()=>{i.setData(a)})})},Rt=()=>{t.listen(i,o.eventChangeCurrent,d=>{const{page:u}=d.detail,v=i.pageSize,f={limit:v,offset:(u-1)*v};a.fetchData(f).then(()=>{i.setData(a),p&&p.hide()})})};a&&i&&(zt(),Rt()),a&&k&&(Lt(k),qt(k));const et=e.querySelector(n.selectorTableToolbarContent);if(et){const d=et.querySelectorAll("cds-popover[data-batch-filter]");a&&d&&d.forEach(Ot)}e.isSelectable&&(Nt(),Mt(),A&&Ft(A)),a&&_t&&Bt();const st={zoo:{event:{row:{click:Ct,expand:xt,check:{one:Tt,all:Dt}},column:{sort:wt}}}};(0,At.objToPaths)(s).forEach(([d,u])=>{T.hasPath(d,st)&&T.path(d,st)(u)})},Kt=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},Qt=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"),i=document.createElement("cds-table-skeleton");i.showHeader=e||s,i.showToolbar=n,i.zebra=r,i.columnCount=o,i.size=a,i.show=()=>i.classList.remove("hidden"),i.hide=()=>i.classList.add("hidden");const p=document.createElement("div");return p.classList.add("zoo-datatable-skeleton-wrapper"),t.parentNode.insertBefore(p,t),p.appendChild(i),p.appendChild(t),i},Xt=(t,e)=>{const s=e.getAttribute("zoo-url-api"),n=parseInt(e.getAttribute("data-page-size")||25,10);if(s)return new c.Binder(t,s,e,{urlParams:{limit:n}})},Yt={selector:"cds-table",init:function(t){const e=c.getSemanticAttributes(t),s=this,n=Xt(s,t);if((0,At.isDefAndNotNull)(n)){t.dataBinder=n;const o=Qt(t);t.skeleton=o;const r=Kt(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)}},te=m.__exportAll({cdsPaginationNavWrap:()=>se,cdsPaginationWrap:()=>ee}),ee={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,i=(r-1)*a;i!==n&&(n=i,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"}})})}},se={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})},ne=m.__exportAll({cdsModalBodyContentWrap:()=>de,cdsModalBodyWrap:()=>le,cdsModalCloseButWrap:()=>ie,cdsModalFooterButWrap:()=>ue,cdsModalFooterWrap:()=>pe,cdsModalHeaderWrap:()=>re,cdsModalHeadingWrap:()=>ae,cdsModalLabelWrap:()=>ce,cdsModalWrap:()=>oe}),oe={selector:"cds-modal",init:function(t){const e=customElements.get("cds-modal"),s=c.getSemanticAttributes(t),n=c.getEventAttribute(t,"open-event","event");n&&this.listen(t,"cds-modal-beingopened",a=>{this.dispatchPanelEvent(n,{...s,action:"opened"})});const o=t.getAttribute("before-close-event");o&&this.listen(t,e.eventBeforeClose,a=>{this.dispatchPanelEvent(o,{...s,action:"closing",cancelable:!0})}),this.listen(t,e.eventClose,a=>{this.dispatchPanelEvent("destroy_me",{...s,action:"closed",triggeredBy:a.detail?.triggeredBy})});const r=c.getEventAttribute(t,"primary-event","event");r&&this.listen(t,"cds-modal-primary-focus",a=>{this.dispatchPanelEvent(r,{...s,action:"primary"})})}},re={selector:"cds-modal-header"},ae={selector:"cds-modal-heading"},ce={selector:"cds-modal-label"},ie={selector:"cds-modal-close-button"},le={selector:"cds-modal-body"},de={selector:"cds-modal-body-content"},pe={selector:"cds-modal-footer"},ue={selector:"cds-modal-footer-button",init:function(t){const e=c.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)})}},ve=m.__exportAll({cdsMenuButtonWrap:()=>ge,cdsMenuWrap:()=>me}),me={selector:"cds-menu",init:function(t){const e=c.getSemanticAttributes(t),s=c.getEventAttribute(t,"open-event");s&&this.listen(t,"cds-menu-opened",o=>{this.dispatchPanelEvent(s,{...e,action:"opened"})});const n=c.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=c.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=c.getSemanticAttributes(r),i=a.event||e.event;i&&this.dispatchPanelEvent(i,{...e,...a,action:"selection-changed"})})}},ge={selector:"cds-menu-button",init:function(t){const e=c.getSemanticAttributes(t),s=t.querySelector("cds-menu");s&&this.listen(s,"click",n=>{if(n.target.tagName==="CDS-MENU-ITEM"){const o=c.getSemanticAttributes(n.target),r=o.event||e.event;r&&(n.stopPropagation(),this.dispatchPanelEvent(r,{...e,...o}))}})}},fe=m.__exportAll({cdsButFabWrap:()=>We,cdsButtonWrap:()=>he,cdsComboButWrap:()=>Ae,cdsCopyButWrap:()=>ke,cdsIconButToggleWrap:()=>Se,cdsIconButWrap:()=>be}),he={selector:"cds-button",init:function(t){const e=c.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,c.getSemanticAttributes(t))})}},be={selector:"cds-icon-button:not([data-toggle])",event:"click",getData:(t,e)=>e},Se={selector:"cds-icon-button[data-toggle]",init:function(t){const e=c.getSemanticAttributes(t);e.event&&this.listen(t,"click",s=>{s.stopPropagation(),t.isSelected=!t.isSelected,this.dispatchPanelEvent(e.event,{...e,isOn:t.isSelected})})}},We={selector:"cds-button[data-fab]",event:"click",getData:(t,e)=>e},ke={selector:"cds-copy-button",init:function(t){const e=c.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}}},Ae={selector:"cds-combo-button",init:function(t){const e=c.getSemanticAttributes(t);e.event&&this.listen(t,"click",n=>{const o=n.composedPath(),r=o.some(i=>i.tagName==="CDS-MENU-ITEM"),a=o.some(i=>i.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=c.getSemanticAttributes(n.target),r=o.event||c.getEventAttribute(t,"menu-event","event");r&&this.dispatchPanelEvent(r,{...e,...o,action:"menu-item"})}})}},Ee=m.__exportAll({cdsComboBoxWrap:()=>ye,cdsDropdownWrap:()=>Ie,cdsMultiSelectWrap:()=>Pe}),Ie={selector:"cds-dropdown",init:function(t){const e=customElements.get("cds-dropdown"),s=c.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")})})}},ye={selector:"cds-combo-box",init:function(t){const e=customElements.get("cds-combo-box"),s=c.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")})})}},Pe={selector:"cds-multi-select",init:function(t){const e=customElements.get("cds-multi-select"),s=c.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")})})}},_e=m.__exportAll({cdsDatePickerWrap:()=>Ce,cdsTimePickerWrap:()=>xe}),Ce={selector:"cds-date-picker",init:function(t){const e=customElements.get("cds-date-picker"),s=c.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 k;r?k={from:n.value||"",to:o.value||""}:k=t.value,this.dispatchPanelEvent(a,{...s,value:k})});const i=t.getAttribute("error-event");i&&this.listen(t,e.eventFlatpickrError,p=>{this.dispatchPanelEvent(i,{...s,error:p.detail})})}},xe={selector:"cds-time-picker",event:"cds-time-picker-changed",getData:(t,e,s)=>({...e,value:s.value})},we=m.__exportAll({cdsFileUploaderButtonWrap:()=>Be,cdsFileUploaderDropContainerWrap:()=>Fe,cdsFileUploaderWrap:()=>Te});function Et(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 i=r.match(/\.[^.]+$/),p=i?i[0].toLowerCase():void 0;return o.has(a.toLowerCase())||p&&o.has(p)})},e.prototype.__zooyAcceptCasePatched=!0}})}Et("cds-file-uploader-drop-container");Et("cds-file-uploader-button");function De(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})}De("cds-file-uploader");var Te={selector:"cds-file-uploader",init:function(t){const e=c.getSemanticAttributes(t),s=e.event;if(s){const o=t.querySelector('input[type="file"]');o&&this.listen(o,"change",r=>{this.dispatchPanelEvent(s,{...e,files:Array.from(r.target.files||[])})})}const n=t.getAttribute("delete-event");n&&this.listen(t,"cds-file-uploader-item-deleted",o=>{this.dispatchPanelEvent(n,{...e,fileName:o.detail?.fileName,fileId:o.detail?.fileId})})}};function It(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 yt(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 Be={selector:"cds-file-uploader-button",init:function(t){const e=yt(t),s=c.getSemanticAttributes(t),n=s.event;this.listen(t,"cds-file-uploader-button-changed",o=>{const r=o.detail?.addedFiles||[];e&&It(e,r),n&&this.dispatchPanelEvent(n,{...s,files:Array.from(r)})})}};function Ne(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 Me(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 Fe={selector:"cds-file-uploader-drop-container",init:function(t){const e=yt(t),s=c.getSemanticAttributes(t),n=s.event,o=t.getAttribute("for"),r=()=>{if(!o||!e)return;const a=Array.from(e.files);Ne(t.ownerDocument,o,a,i=>{Me(e,i),r()}),t.multiple||(t.style.display=a.length>0?"none":"")};this.listen(t,"cds-file-uploader-drop-container-changed",a=>{const i=a.detail?.addedFiles||[],p=t.multiple?i:i.slice(0,1);e&&It(e,p),r(),n&&this.dispatchPanelEvent(n,{...s,files:Array.from(p)})})}},Le=m.__exportAll({cdsAccordionWrap:()=>Oe,cdsContentSwitcherWrap:()=>ze,cdsTabsVerticalWrap:()=>Re,cdsTabsWrap:()=>qe}),qe={selector:"cds-tabs",init:function(t){const e=customElements.get("cds-tabs"),s=c.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,i=c.getSemanticAttributes(a);this.dispatchPanelEvent(o,{...s,...i,tabValue:a.getAttribute("value"),tabIndex:r.detail.index,tabText:r.detail.text})})}},Oe={selector:"cds-accordion",init:function(t){const e=customElements.get("cds-accordion-item"),s=c.getSemanticAttributes(t);[...t.querySelectorAll("cds-accordion-item")].forEach(n=>{const o=c.getSemanticAttributes(n),r=o.event||s.event;r&&this.listen(n,e.eventToggle,a=>{this.dispatchPanelEvent(r,{...s,...o,open:a.detail.open})})})}},ze={selector:"cds-content-switcher",init:function(t){const e=customElements.get("cds-content-switcher"),s=c.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,i=c.getSemanticAttributes(a);this.dispatchPanelEvent(o,{...s,...i,value:a.getAttribute("value")})})}},Re={selector:"cds-tabs-vertical"},Ue=m.__exportAll({cdsBreadCrumbWrap:()=>Ge,cdsBreadcrumbItemWrap:()=>He,cdsBreadcrumbLinkWrap:()=>$e}),He={selector:"cds-breadcrumb-item"},$e={selector:"cds-breadcrumb-link",event:"click",getData:(t,e,s)=>(t.preventDefault(),{...e,href:s.getAttribute("href")})},Ge={selector:"cds-breadcrumb",init:function(t){const e=this,s=c.getSemanticAttributes(t),n=s.event;if(n){const o=a=>{e.dispatchPanelEvent(n,{...s,...a})};e.listen(t,"click",a=>{const i=a.target.closest("cds-breadcrumb-link");if(i){a.preventDefault(),a.stopPropagation();const p=c.getSemanticAttributes(i);o(p)}});const r=t.querySelector("cds-overflow-menu-body");r&&e.listen(r,"cds-overflow-menu-item-clicked",a=>{a.stopPropagation();const i=c.getSemanticAttributes(a.target);o(i)})}}},je=m.__exportAll({cdsNumberInputWrap:()=>Je,cdsPasswordInputWrap:()=>Ke,cdsSearchWrap:()=>Qe,cdsTextAreaWrap:()=>Ze,cdsTextInputWrap:()=>Ve}),Ve={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})}]},Ze={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})}]},Je={selector:"cds-number-input",event:"cds-number-input",getData:(t,e,s)=>({...e,value:t.detail.value,direction:t.detail.direction})},Ke={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})}]},Qe={selector:"cds-search",event:"cds-search-input",getData:(t,e,s)=>({...e,value:s.value})},Xe=m.__exportAll({cdsCheckboxWrap:()=>Ye,cdsRadioButGroupWrap:()=>ts,cdsSelectWrap:()=>ss,cdsSliderWrap:()=>ns,cdsToggleWrap:()=>es}),Ye={selector:"cds-checkbox",event:"cds-checkbox-changed",getData:(t,e,s)=>({...e,checked:t.detail.checked,value:s.value})},ts={selector:"cds-radio-button-group",event:"cds-radio-button-group-changed",getData:(t,e)=>({...e,value:t.detail?.value})},es={selector:"cds-toggle",event:"cds-toggle-changed",getData:(t,e)=>({...e,isOn:t.detail.checked,value:t.detail.checked})},ss={selector:"cds-select",event:"cds-select-selected",getData:(t,e)=>({...e,value:t.detail.value})},ns={selector:"cds-slider",init:function(t){const e=c.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})})}},os=m.__exportAll({cdsOperationalTagWrap:()=>is,cdsSDismissibleTagWrap:()=>as,cdsSelectableTagWrap:()=>cs,cdsTagSkeletonWrap:()=>ls,cdsTagsWrap:()=>rs}),rs={selector:"cds-tag",event:"click",getData:(t,e)=>e},as={selector:"cds-dismissible-tag",init:function(t){const e=c.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"})})}},Pt=t=>function(e){const s=c.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 i=s.event;i&&this.listen(e,r,p=>{this.dispatchPanelEvent(i,{...s,selected:e.selected,text:e.text,action:e.selected?"selected":"deselected"})})},cs={selector:"cds-selectable-tag",init:Pt("cds-selectable-tag")},is={selector:"cds-operational-tag",init:Pt("cds-operational-tag")},ls={selector:"cds-tag-skeleton"},ds=m.__exportAll({cdsContainedListDescriptionWrap:()=>ms,cdsContainedListItemWrap:()=>gs,cdsContainedListWrap:()=>vs,cdsListItemWrap:()=>Ss,cdsOrderedListWrap:()=>bs,cdsOverflowMenuWrap:()=>ps,cdsStructuredListWrap:()=>us,cdsTreeViewWrap:()=>fs,cdsUnorderedListWrap:()=>hs}),ps={selector:"cds-overflow-menu",init:function(t){const e=c.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=c.getSemanticAttributes(o.target);this.dispatchPanelEvent(s,{...e,...r})})}},us={selector:"cds-structured-list",init:function(t){const e=c.getSemanticAttributes(t);[...t.querySelectorAll("cds-structured-list-row")].forEach(s=>{const n=c.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=c.getSemanticAttributes(n),r=e.event;r&&this.dispatchPanelEvent(r,{...e,...o})})}},vs={selector:"cds-contained-list"},ms={selector:"cds-contained-list-description"},gs={selector:"cds-contained-list-item",event:"cds-contained-list-item-click",getData:(t,e)=>e},fs={selector:"cds-tree-view",init:function(t){const e=c.getSemanticAttributes(t);this.listen(t,"cds-tree-node-selected",n=>{const o=n.detail.node,r=c.getSemanticAttributes(o),a=r.event||e.event;a&&this.dispatchPanelEvent(a,{...e,...r,nodeId:o.id,label:o.getAttribute("label")})});const s=c.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})})}},hs={selector:"cds-unordered-list"},bs={selector:"cds-ordered-list"},Ss={selector:"cds-list-item"},Ws=m.__exportAll({cdsActionableNotificationWrap:()=>Es,cdsCalloutNotificationWrap:()=>Is,cdsInlineNotificationWrap:()=>As,cdsToastNotificationWrap:()=>ks}),ks={selector:"cds-toast-notification",event:"cds-notification-closed",getData:(t,e)=>({...e,action:"closed"})},As={selector:"cds-inline-notification",event:"cds-notification-closed",getData:(t,e)=>({...e,action:"closed"})},Es={selector:"cds-actionable-notification",init:function(t){const e=c.getSemanticAttributes(t),s=c.getEventAttribute(t,"close-event","event");s&&this.listen(t,"cds-notification-closed",o=>{this.dispatchPanelEvent(s,{...e,action:"closed"})});const n=c.getEventAttribute(t,"action-event");n&&this.listen(t,"cds-notification-actioned",o=>{this.dispatchPanelEvent(n,{...e,action:"actioned"})})}},Is={selector:"cds-callout-notification"},ys=m.__exportAll({cdsClickableTileWrap:()=>_s,cdsExpandableTileWrap:()=>Cs,cdsRadioTileWrap:()=>ws,cdsSelectableTileWrap:()=>xs,cdsTileGroupWrap:()=>Ds,cdsTileWrap:()=>Ps}),Ps={selector:"cds-tile"},_s={selector:"cds-clickable-tile",init:function(t){const e=c.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=c.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=c.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=c.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=c.getSemanticAttributes(t);this.listen(t,"cds-progress-step-click",s=>{const n=s.target,o=c.getSemanticAttributes(n),r=o.event||e.event;r&&this.dispatchPanelEvent(r,{...e,...o,stepIndex:n.getAttribute("data-index"),stepLabel:n.getAttribute("label")})})}},Ms={selector:"cds-inline-loading",init:function(t){const e=c.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 i=t.getAttribute("status");this.dispatchPanelEvent(n,{...e,status:i})}})});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=c.getSemanticAttributes(t),s=c.getEventAttribute(t,"open-event");s&&this.listen(t,"cds-tooltip-beingopened",o=>{this.dispatchPanelEvent(s,{...e,action:"opened"})});const n=c.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=c.getSemanticAttributes(t),s=c.getEventAttribute(t,"open-event");s&&this.listen(t,"cds-popover-beingopened",o=>{this.dispatchPanelEvent(s,{...e,action:"opened"})});const n=c.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=c.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:()=>Wn,cdsPasswordInputSkeletonWrap:()=>kn,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"},Wn={selector:"cds-number-input-skeleton"},kn={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(te),...g(Jt),...g(ne),...g(ve),...g(fe),...g(Ee),...g(_e),...g(we),...g(Le),...g(Ue),...g(je),...g(Xe),...g(os),...g(ds),...g(Ws),...g(ys),...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"),at=()=>import("@carbon/web-components/es/components/menu/index.js"),zn=()=>import("@carbon/web-components/es/components/overflow-menu/index.js"),O=()=>import("@carbon/web-components/es/components/button/index.js"),ct=()=>import("@carbon/web-components/es/components/icon-button/index.js"),Rn=()=>import("@carbon/web-components/es/components/combo-button/index.js"),Un=()=>import("@carbon/web-components/es/components/copy-button/index.js"),it=()=>import("@carbon/web-components/es/components/checkbox/index.js"),lt=()=>import("@carbon/web-components/es/components/radio-button/index.js"),dt=()=>import("@carbon/web-components/es/components/toggle/index.js"),z=()=>import("@carbon/web-components/es/components/select/index.js"),pt=()=>import("@carbon/web-components/es/components/slider/index.js"),R=()=>import("@carbon/web-components/es/components/text-input/index.js"),ut=()=>import("@carbon/web-components/es/components/textarea/index.js"),vt=()=>import("@carbon/web-components/es/components/number-input/index.js"),mt=()=>import("@carbon/web-components/es/components/password-input/index.js"),K=()=>import("@carbon/web-components/es/components/search/index.js"),Hn=()=>import("@carbon/web-components/es/components/combo-box/index.js"),gt=()=>import("@carbon/web-components/es/components/dropdown/index.js"),$n=()=>import("@carbon/web-components/es/components/multi-select/index.js"),ft=()=>import("@carbon/web-components/es/components/date-picker/index.js"),Gn=()=>import("@carbon/web-components/es/components/time-picker/index.js"),M=()=>import("@carbon/web-components/es/components/file-uploader/index.js"),ht=()=>import("@carbon/web-components/es/components/form/index.js"),jn=()=>import("@carbon/web-components/es/components/form-group/index.js"),bt=()=>import("@carbon/web-components/es/components/data-table/index.js"),St=()=>import("@carbon/web-components/es/components/pagination/index.js"),Wt=()=>import("@carbon/web-components/es/components/code-snippet/index.js"),F=()=>import("@carbon/web-components/es/components/tag/index.js"),Vn=()=>import("@carbon/web-components/es/components/badge-indicator/index.js"),U=()=>import("@carbon/web-components/es/components/notification/index.js"),Zn=()=>import("@carbon/web-components/es/components/loading/index.js"),Jn=()=>import("@carbon/web-components/es/components/inline-loading/index.js"),Kn=()=>import("@carbon/web-components/es/components/progress-bar/index.js"),Q=()=>import("@carbon/web-components/es/components/progress-indicator/index.js"),Qn=()=>import("@carbon/web-components/es/components/skeleton-placeholder/index.js"),Xn=()=>import("@carbon/web-components/es/components/skeleton-text/index.js"),Yn=()=>import("@carbon/web-components/es/components/skeleton-icon/index.js"),X=()=>import("@carbon/web-components/es/components/list/index.js"),to=()=>import("@carbon/web-components/es/components/layer/index.js"),Y=()=>import("@carbon/web-components/es/components/grid/index.js"),eo=()=>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"),so=()=>import("@carbon/web-components/es/components/popover/index.js"),no=()=>import("@carbon/web-components/es/components/toggle-tip/index.js"),kt=()=>import("@carbon/web-components/es/components/heading/index.js"),oo=()=>import("@carbon/web-components/es/components/icon/index.js"),ro=()=>import("@carbon/web-components/es/components/icon-indicator/index.js"),$={"cds-table":[I,O,R,K,z,St,bt],"cds-pagination":[z,R,St],"cds-button":[I,O],"cds-icon-button:not([data-toggle])":[I,ct],"cds-icon-button[data-toggle]":[I,ct],"cds-button[data-fab]":[I,O],"cds-copy-button":[I,Un],"cds-combo-button":[I,Rn],"cds-checkbox":[it],"cds-radio-button-group":[lt],"cds-toggle":[dt],"cds-select":[z],"cds-slider":[pt],"cds-text-input":[R],"cds-textarea":[ut],"cds-number-input":[vt],"cds-password-input":[I,mt],"cds-search":[K],"cds-dropdown":[gt],"cds-combo-box":[Hn],"cds-multi-select":[$n],"cds-date-picker":[ft],"cds-time-picker":[Gn],"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":[at],"cds-menu-button":[at],"cds-overflow-menu":[zn],"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":[Kn],"cds-progress-indicator":[Q],"cds-inline-loading":[Jn],"cds-tooltip":[I],"cds-popover":[so],"cds-toggletip":[no],"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":[Wt],"cds-form":[ht],"cds-form-item":[ht],"cds-form-group":[jn],"cds-stack":[Fn],"cds-heading":[kt],"cds-section":[kt],"cds-icon":[oo],"cds-icon-indicator":[ro],"cds-badge-indicator":[Vn],"cds-loading":[Zn],"cds-skeleton-text":[Xn],"cds-skeleton-placeholder":[Qn],"cds-skeleton-icon":[Yn],"cds-accordion-skeleton":[Z],"cds-accordion-item-skeleton":[Z],"cds-breadcrumb-skeleton":[L],"cds-button-skeleton":[O],"cds-checkbox-skeleton":[it],"cds-code-snippet-skeleton":[Wt],"cds-table-skeleton":[bt],"cds-date-picker-input-skeleton":[ft],"cds-dropdown-skeleton":[gt],"cds-file-uploader-skeleton":[M],"cds-number-input-skeleton":[vt],"cds-password-input-skeleton":[mt],"cds-progress-indicator-skeleton":[Q],"cds-progress-step-skeleton":[Q],"cds-radio-button-skeleton":[lt],"cds-search-skeleton":[K],"cds-select-skeleton":[z],"cds-slider-skeleton":[pt],"cds-structured-list-header-cell-skeleton":[rt],"cds-tabs-skeleton":[q],"cds-tab-skeleton":[q],"cds-text-input-skeleton":[R],"cds-textarea-skeleton":[ut],"cds-toggle-skeleton":[dt],"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":[to],"cds-grid":[Y],"cds-column":[Y],"cds-column-hang":[Y],"cds-pagination-nav":[eo]};function ao(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 co(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 io(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 lo(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 k=c.getSemanticAttributes(a);r.events.forEach(A=>{const x=c.getEventAttribute(a,A.attrName,"event");x&&e.listen(a,A.type,G=>{e.dispatchPanelEvent(x,A.getData(G,k,a))})});return}const i=c.getSemanticAttributes(a),p=i.event;p&&e.listen(a,r.event,k=>{k.stopPropagation();const A=r.getData(k,i,a),x=A._eventOverride||p;delete A._eventOverride,e.dispatchPanelEvent(x,A)})}),s+=o.length}return s}var H=Object.fromEntries(Mn()),po=async function(t,e){const s=ao(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=co(s);if(n.size>0)try{await io(n,e)}catch(r){console.error("[Carbon] Failed to load some component modules:",r)}const o=lo(s,this);o>0&&this.debugMe(`[Carbon] Total components initialized: ${o}`)},uo=(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 po.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=uo;
|