@commmerce/ui 1.9.0 → 1.9.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/dist/cdn.js CHANGED
@@ -1477,7 +1477,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1477
1477
  .message { font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); font-weight: 500; }
1478
1478
 
1479
1479
  }
1480
- `];$("cm-save-bar",Oa);var qa=class extends S{constructor(){super(...arguments);this.heading="";this.action="";this.actionLabel="";this.headingLevel=2;this.variant="default";this.layout="stacked";this._list=!0}render(){let e=Math.min(6,Math.max(2,this.headingLevel||2));return c`<section part="panel" aria-label=${this.heading||h}>
1480
+ `];$("cm-save-bar",Oa);var F1=z("infoItem",{edit:"Edit {label}"}),qa=class extends S{constructor(){super(...arguments);this.heading="";this.action="";this.actionLabel="";this.headingLevel=2;this.variant="default";this.layout="stacked";this._list=!0}render(){let e=Math.min(6,Math.max(2,this.headingLevel||2));return c`<section part="panel" aria-label=${this.heading||h}>
1481
1481
  ${this.heading||this.action?c`<header>
1482
1482
  <div class="title" role="heading" aria-level=${e} part="title">${this.heading}</div>
1483
1483
  ${this.action?c`<button class="action" type="button" part="action" aria-label=${this.actionLabel||h}
@@ -1509,7 +1509,9 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1509
1509
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: baseline;
1510
1510
  column-gap: var(--cm-space-12); grid-column: 1 / -1; --_cm-info-value-gap: 0px;
1511
1511
  }
1512
- `];$("cm-info-panel",qa);var Ba=class extends S{constructor(){super(...arguments);this.label="";this.half=!1}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","listitem")}render(){return c`<div class="label" part="label">${this.label}</div><div class="value" part="value"><slot></slot></div>`}};Ba.properties={label:{},half:{type:Boolean,reflect:!0}},Ba.styles=[k,x`
1512
+ `];$("cm-info-panel",qa);var Ba=class extends T{constructor(){super(...arguments);this.label="";this.half=!1;this.editable=!1;this.editLabel=""}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","listitem")}render(){let e=c`<div class="value" part="value"><slot></slot></div>`;return this.editable?c`<div class="label" part="label">${this.label}</div><div class="row">${e}<button class="edit" part="edit" type="button"
1513
+ aria-label=${this.editLabel||this.t("edit",{label:this.label})}
1514
+ @click=${()=>this.dispatchEvent(new CustomEvent("cm-edit",{bubbles:!0,composed:!0}))}><cm-icon name="edit" size="16"></cm-icon></button></div>`:c`<div class="label" part="label">${this.label}</div>${e}`}};Ba.properties={label:{},half:{type:Boolean,reflect:!0},editable:{type:Boolean,reflect:!0},editLabel:{attribute:"edit-label"}},Ba.styles=[k,x`
1513
1515
  :host { display: block; grid-column: 1 / -1; min-width: 0; }
1514
1516
  :host([half]) { grid-column: auto; }
1515
1517
  .label { font-size: var(--cm-font-size-13); line-height: var(--cm-line-height-13); color: var(--cm-text-tertiary); }
@@ -1518,6 +1520,16 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1518
1520
  margin-top: var(--_cm-info-value-gap, var(--cm-space-4)); font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); font-weight: 500; overflow-wrap: anywhere;
1519
1521
 
1520
1522
  }
1523
+ /* Editable (1.9.1): the value and a 28px pencil on one row, the pencil centred on the value's first 20px line. */
1524
+ .row { display: flex; align-items: flex-start; gap: var(--cm-space-4); margin-top: var(--_cm-info-value-gap, var(--cm-space-4)); }
1525
+ .row .value { margin-top: 0; min-width: 0; }
1526
+ .edit {
1527
+ position: relative; flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; margin-block: -4px; padding: 0;
1528
+ background: none; border: 0; border-radius: var(--cm-radius-sm); color: var(--cm-icon-default); cursor: pointer;
1529
+ }
1530
+ .edit:hover { background: var(--cm-bg-hover); color: var(--cm-icon-selected); }
1531
+ .edit:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
1532
+ @media (pointer: coarse) { .edit::after { content: ''; position: absolute; inset: -8px; } }
1521
1533
  `];$("cm-info-item",Ba);var cr,Fa=class extends S{constructor(){super(...arguments);this.heading="";this.open=!1;this.disabled=!1;this.headingLevel=3;p(this,cr,A("cm-accordion"))}toggle(){this.disabled||(this.open=!this.open,this.dispatchEvent(new CustomEvent("cm-toggle",{bubbles:!0,composed:!0,detail:{open:this.open}})))}render(){let e=Math.min(6,Math.max(2,this.headingLevel||3));return c`<div class="wrap" part="accordion">
1522
1534
  <div class="h" role="heading" aria-level=${e}>
1523
1535
  <button type="button" part="toggle" id="${r(this,cr)}-btn" aria-expanded=${this.open?"true":"false"} aria-controls="${r(this,cr)}-body"
@@ -1665,7 +1677,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1665
1677
  .body { grid-template-columns: minmax(0, 1fr); }
1666
1678
  .head { height: 60px; }
1667
1679
  }
1668
- `];$("cm-skeleton-display",Va);var n$=z("commentBox",{heading:"Comments",label:"Add a comment",action:"Post comment"}),Yd,pb,Ka=class extends T{constructor(){super(...arguments);p(this,Yd);this.author="";this.datetime="";this.time=""}connectedCallback(){super.connectedCallback(),!this.hasAttribute("role")&&this.parentElement?.localName==="cm-comment-box"&&this.setAttribute("role","listitem")}render(){let e=s(this,Yd,pb).call(this);return c`<article part="comment">
1680
+ `];$("cm-skeleton-display",Va);var l$=z("commentBox",{heading:"Comments",label:"Add a comment",action:"Post comment"}),Yd,pb,Ka=class extends T{constructor(){super(...arguments);p(this,Yd);this.author="";this.datetime="";this.time=""}connectedCallback(){super.connectedCallback(),!this.hasAttribute("role")&&this.parentElement?.localName==="cm-comment-box"&&this.setAttribute("role","listitem")}render(){let e=s(this,Yd,pb).call(this);return c`<article part="comment">
1669
1681
  ${e?c`<time class="meta" part="time" datetime=${this.datetime||h}>${e}</time>`:h}
1670
1682
  <div class="body" part="body"><slot></slot></div>
1671
1683
  ${this.author?c`<div class="meta" part="author">– ${this.author}</div>`:h}
@@ -1724,7 +1736,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1724
1736
  :host([open]) .tip { opacity: 1; visibility: visible; transition: opacity var(--cm-duration-fast) var(--cm-easing-standard); }
1725
1737
  @media (prefers-reduced-motion: reduce) { .tip { transition: none; } }
1726
1738
  @media (forced-colors: active) { .tip { border: 1px solid CanvasText; } }
1727
- `];$("cm-tooltip",Ga);var b$=z("timelineItem",{justNow:"Just now",minutesAgo:{one:"{count} minute ago",other:"{count} minutes ago"},hoursAgo:{one:"{count} hour ago",other:"{count} hours ago"},daysAgo:{one:"{count} day ago",other:"{count} days ago"},inMinutes:{one:"In {count} minute",other:"In {count} minutes"},inHours:{one:"In {count} hour",other:"In {count} hours"},inDays:{one:"In {count} day",other:"In {count} days"},showAll:"Show all",showLess:"Show less"}),f$=z("timeline",{label:"Activity",showMore:"Show more",loading:"Loading activity"}),xy=7,No=new Set,Io;function bb(o,n){n?No.add(o):No.delete(o),No.size&&!Io&&(Io=setInterval(()=>No.forEach(e=>e.requestUpdate()),6e4)),!No.size&&Io&&(clearInterval(Io),Io=void 0)}var Po,pr,dt,wp,ih,fb,Qa=class extends T{constructor(){super(...arguments);p(this,dt);this.icon="";this.tone="neutral";this.heading="";this.datetime="";this.time="";this.meta="";this.lines=3;this.expanded=!1;this._overflow=!1;this._body=!1;this._meta=!1;this._actions=!1;p(this,Po,A("cm-tl"));p(this,pr)}connectedCallback(){super.connectedCallback(),bb(this,!0)}disconnectedCallback(){super.disconnectedCallback(),bb(this,!1),r(this,pr)?.disconnect(),g(this,pr,void 0)}firstUpdated(){let e=this.renderRoot.querySelector(".body");e&&typeof ResizeObserver<"u"&&(g(this,pr,new ResizeObserver(()=>s(this,dt,wp).call(this))),r(this,pr).observe(e))}updated(e){(e.has("lines")||e.has("_body")||e.has("expanded"))&&s(this,dt,wp).call(this)}get date(){if(!this.datetime)return;let e=new Date(this.datetime);return Number.isNaN(e.getTime())?void 0:e}get relativeTime(){if(this.time)return this.time;let e=this.date;if(!e)return this.datetime;let t=Date.now()-e.getTime(),i=t<0,a=Math.floor(Math.abs(t)/6e4);if(a<1)return this.t("justNow");if(a<60)return this.t(i?"inMinutes":"minutesAgo",{count:a});let l=Math.floor(a/60);if(l<24)return this.t(i?"inHours":"hoursAgo",{count:l});let d=Math.floor(l/24);return d<xy?this.t(i?"inDays":"daysAgo",{count:d}):ae(e,{dateStyle:"medium"},this.locale)}get fullTime(){let e=this.date;return e?ae(e,{dateStyle:"full",timeStyle:"short"},this.locale):""}render(){let e=this.relativeTime,t=this.fullTime,i=this.tone&&this.tone!=="neutral"?this.tone:"",a=this.lines>0&&!this.expanded,l=e?t?c`<cm-tooltip class="when" content=${t} visual-only placement="top"><time part="time" tabindex="0" datetime=${this.datetime}>${e}<span class="sr">, ${t}</span></time></cm-tooltip>`:c`<time class="when" part="time" datetime=${this.datetime||h}>${e}</time>`:h;return c`<div class="item">
1739
+ `];$("cm-tooltip",Ga);var v$=z("timelineItem",{justNow:"Just now",minutesAgo:{one:"{count} minute ago",other:"{count} minutes ago"},hoursAgo:{one:"{count} hour ago",other:"{count} hours ago"},daysAgo:{one:"{count} day ago",other:"{count} days ago"},inMinutes:{one:"In {count} minute",other:"In {count} minutes"},inHours:{one:"In {count} hour",other:"In {count} hours"},inDays:{one:"In {count} day",other:"In {count} days"},showAll:"Show all",showLess:"Show less"}),y$=z("timeline",{label:"Activity",showMore:"Show more",loading:"Loading activity"}),xy=7,No=new Set,Io;function bb(o,n){n?No.add(o):No.delete(o),No.size&&!Io&&(Io=setInterval(()=>No.forEach(e=>e.requestUpdate()),6e4)),!No.size&&Io&&(clearInterval(Io),Io=void 0)}var Po,pr,dt,wp,ih,fb,Qa=class extends T{constructor(){super(...arguments);p(this,dt);this.icon="";this.tone="neutral";this.heading="";this.datetime="";this.time="";this.meta="";this.lines=3;this.expanded=!1;this._overflow=!1;this._body=!1;this._meta=!1;this._actions=!1;p(this,Po,A("cm-tl"));p(this,pr)}connectedCallback(){super.connectedCallback(),bb(this,!0)}disconnectedCallback(){super.disconnectedCallback(),bb(this,!1),r(this,pr)?.disconnect(),g(this,pr,void 0)}firstUpdated(){let e=this.renderRoot.querySelector(".body");e&&typeof ResizeObserver<"u"&&(g(this,pr,new ResizeObserver(()=>s(this,dt,wp).call(this))),r(this,pr).observe(e))}updated(e){(e.has("lines")||e.has("_body")||e.has("expanded"))&&s(this,dt,wp).call(this)}get date(){if(!this.datetime)return;let e=new Date(this.datetime);return Number.isNaN(e.getTime())?void 0:e}get relativeTime(){if(this.time)return this.time;let e=this.date;if(!e)return this.datetime;let t=Date.now()-e.getTime(),i=t<0,a=Math.floor(Math.abs(t)/6e4);if(a<1)return this.t("justNow");if(a<60)return this.t(i?"inMinutes":"minutesAgo",{count:a});let l=Math.floor(a/60);if(l<24)return this.t(i?"inHours":"hoursAgo",{count:l});let d=Math.floor(l/24);return d<xy?this.t(i?"inDays":"daysAgo",{count:d}):ae(e,{dateStyle:"medium"},this.locale)}get fullTime(){let e=this.date;return e?ae(e,{dateStyle:"full",timeStyle:"short"},this.locale):""}render(){let e=this.relativeTime,t=this.fullTime,i=this.tone&&this.tone!=="neutral"?this.tone:"",a=this.lines>0&&!this.expanded,l=e?t?c`<cm-tooltip class="when" content=${t} visual-only placement="top"><time part="time" tabindex="0" datetime=${this.datetime}>${e}<span class="sr">, ${t}</span></time></cm-tooltip>`:c`<time class="when" part="time" datetime=${this.datetime||h}>${e}</time>`:h;return c`<div class="item">
1728
1740
  <span class="icon ${i}" part="icon" aria-hidden="true">${this.icon?c`<cm-icon name=${this.icon} size="16"></cm-icon>`:c`<span class="dot"></span>`}</span>
1729
1741
  <div class="main">
1730
1742
  <div class="head">
@@ -1816,7 +1828,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1816
1828
  @media (max-width: 640px) {
1817
1829
  .more { padding-inline-start: 0; }
1818
1830
  }
1819
- `];$("cm-timeline",mr);var k$=z("smartTip",{newTab:"(opens in a new tab)"}),E$=z("smartTips",{heading:"Smart tips",tourAction:"Start"}),ts=class extends T{constructor(){super(...arguments);this.heading="";this.href="";this.target=""}connectedCallback(){super.connectedCallback(),!this.hasAttribute("role")&&this.parentElement?.localName==="cm-smart-tips"&&this.setAttribute("role","listitem")}render(){let e=this.target==="_blank";return c`<a part="tip" href=${this.href||h} target=${this.target||h} rel=${e?"noopener noreferrer":h}>
1831
+ `];$("cm-timeline",mr);var M$=z("smartTip",{newTab:"(opens in a new tab)"}),T$=z("smartTips",{heading:"Smart tips",tourAction:"Start"}),ts=class extends T{constructor(){super(...arguments);this.heading="";this.href="";this.target=""}connectedCallback(){super.connectedCallback(),!this.hasAttribute("role")&&this.parentElement?.localName==="cm-smart-tips"&&this.setAttribute("role","listitem")}render(){let e=this.target==="_blank";return c`<a part="tip" href=${this.href||h} target=${this.target||h} rel=${e?"noopener noreferrer":h}>
1820
1832
  <span class="text">
1821
1833
  <span class="title" part="heading">${this.heading}</span>
1822
1834
  <span class="desc" part="description"><slot></slot></span>
@@ -1868,7 +1880,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1868
1880
  margin: var(--cm-space-8) 0 var(--cm-space-16); text-align: center; font-size: var(--cm-type-heading-sm-size); line-height: var(--cm-type-heading-sm-line-height); font-weight: 600;
1869
1881
  }
1870
1882
  .list { display: flex; flex-direction: column; gap: var(--cm-space-8); }
1871
- `];$("cm-smart-tips",is);var C$=z("pagination",{label:"Pagination",rows:"Number of rows",summary:"Showing {from}\u2013{to} of {total} {resource}",page:"Page",of:"of {count}",previous:"Previous page",next:"Next page"}),Wt,as,yb,xb,rs=class extends T{constructor(){super(...arguments);p(this,as);this.page=1;this.total=0;this.pageSize=20;this.pageSizes=[10,20,50,100];this.resourceName="";this._draft=null;p(this,Wt,A("cm-pg"))}get pageCount(){return Math.max(1,Math.ceil((this.total||0)/Math.max(1,this.pageSize)))}goTo(e){let t=Math.min(this.pageCount,Math.max(1,Math.round(e)||1));if(this._draft=null,t===this.page){this.requestUpdate();return}this.page=t,this.dispatchEvent(new CustomEvent("cm-page-change",{detail:{page:t},bubbles:!0,composed:!0}))}render(){let e=this.pageCount,t=Math.min(e,Math.max(1,this.page)),i=this.total?(t-1)*this.pageSize+1:0,a=Math.min(this.total,t*this.pageSize),l=this.pageSizes??[];return c`
1883
+ `];$("cm-smart-tips",is);var L$=z("pagination",{label:"Pagination",rows:"Number of rows",summary:"Showing {from}\u2013{to} of {total} {resource}",page:"Page",of:"of {count}",previous:"Previous page",next:"Next page"}),Wt,as,yb,xb,rs=class extends T{constructor(){super(...arguments);p(this,as);this.page=1;this.total=0;this.pageSize=20;this.pageSizes=[10,20,50,100];this.resourceName="";this._draft=null;p(this,Wt,A("cm-pg"))}get pageCount(){return Math.max(1,Math.ceil((this.total||0)/Math.max(1,this.pageSize)))}goTo(e){let t=Math.min(this.pageCount,Math.max(1,Math.round(e)||1));if(this._draft=null,t===this.page){this.requestUpdate();return}this.page=t,this.dispatchEvent(new CustomEvent("cm-page-change",{detail:{page:t},bubbles:!0,composed:!0}))}render(){let e=this.pageCount,t=Math.min(e,Math.max(1,this.page)),i=this.total?(t-1)*this.pageSize+1:0,a=Math.min(this.total,t*this.pageSize),l=this.pageSizes??[];return c`
1872
1884
  <nav part="bar" aria-label=${this.label}>
1873
1885
  ${l.length?c`<div class="rows" part="rows">
1874
1886
  <label for="${r(this,Wt)}-s">${this.t("rows")}</label>
@@ -1938,7 +1950,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
1938
1950
  select, input { height: var(--cm-control-height-touch); }
1939
1951
  button { width: var(--cm-control-height-touch); height: var(--cm-control-height-touch); }
1940
1952
  }
1941
- `];$("cm-pagination",rs);var H$=z("statusTabs",{label:"Status",option:"{label} ({count})"}),ns,Bo,me,qo,wb,kp,$b,Ep,kb,ss=class extends T{constructor(){super(...arguments);p(this,me);this.value="";this.tabs=[];this.controls="";this.size="large";this.mobile="scroll";this._more="";p(this,ns,new ResizeObserver(()=>s(this,me,qo).call(this)));this._slotted=[];p(this,Bo,new MutationObserver(()=>s(this,me,kp).call(this)))}connectedCallback(){super.connectedCallback(),s(this,me,kp).call(this),r(this,Bo).observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","label","count","disabled","selected"]})}disconnectedCallback(){super.disconnectedCallback(),r(this,Bo).disconnect(),r(this,ns).disconnect()}firstUpdated(){let e=this.renderRoot.querySelector(".tabs");r(this,ns).observe(e),e.addEventListener("scroll",()=>s(this,me,qo).call(this),{passive:!0}),document.fonts?.ready.then(()=>s(this,me,qo).call(this))}get items(){return this.tabs.length?this.tabs.map(e=>typeof e=="string"?{value:e,label:e}:e):this._slotted}focus(e){let t=this.renderRoot.querySelector(".pick select");t&&t.offsetParent!==null?t.focus(e):this.renderRoot.querySelector('button[tabindex="0"]')?.focus(e)}updated(e){s(this,me,qo).call(this);for(let a of this.renderRoot.querySelectorAll(".tabs > *"))r(this,ns).observe(a);if(!("ariaControlsElements"in Element.prototype))return;let t=this.getRootNode(),i=this.controls?t.getElementById?.(this.controls):null;for(let a of this.renderRoot.querySelectorAll("button, select"))a.ariaControlsElements=i?[i]:null}render(){let e=this.items,t=s(this,me,$b).call(this,e),i=this.getAttribute("aria-label")||this.t("label");return c`
1953
+ `];$("cm-pagination",rs);var I$=z("statusTabs",{label:"Status",option:"{label} ({count})"}),ns,Bo,me,qo,wb,kp,$b,Ep,kb,ss=class extends T{constructor(){super(...arguments);p(this,me);this.value="";this.tabs=[];this.controls="";this.size="large";this.mobile="scroll";this._more="";p(this,ns,new ResizeObserver(()=>s(this,me,qo).call(this)));this._slotted=[];p(this,Bo,new MutationObserver(()=>s(this,me,kp).call(this)))}connectedCallback(){super.connectedCallback(),s(this,me,kp).call(this),r(this,Bo).observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","label","count","disabled","selected"]})}disconnectedCallback(){super.disconnectedCallback(),r(this,Bo).disconnect(),r(this,ns).disconnect()}firstUpdated(){let e=this.renderRoot.querySelector(".tabs");r(this,ns).observe(e),e.addEventListener("scroll",()=>s(this,me,qo).call(this),{passive:!0}),document.fonts?.ready.then(()=>s(this,me,qo).call(this))}get items(){return this.tabs.length?this.tabs.map(e=>typeof e=="string"?{value:e,label:e}:e):this._slotted}focus(e){let t=this.renderRoot.querySelector(".pick select");t&&t.offsetParent!==null?t.focus(e):this.renderRoot.querySelector('button[tabindex="0"]')?.focus(e)}updated(e){s(this,me,qo).call(this);for(let a of this.renderRoot.querySelectorAll(".tabs > *"))r(this,ns).observe(a);if(!("ariaControlsElements"in Element.prototype))return;let t=this.getRootNode(),i=this.controls?t.getElementById?.(this.controls):null;for(let a of this.renderRoot.querySelectorAll("button, select"))a.ariaControlsElements=i?[i]:null}render(){let e=this.items,t=s(this,me,$b).call(this,e),i=this.getAttribute("aria-label")||this.t("label");return c`
1942
1954
  <div class=${`tabs${this._more?` more-${this._more}`:""}`} part="tabs" role="tablist" aria-label=${i}>
1943
1955
  ${e.map((a,l)=>c`<button type="button" role="tab" part="tab" aria-selected=${l===t?"true":"false"}
1944
1956
  tabindex=${l===t?"0":"-1"} ?disabled=${!!a.disabled}
@@ -2007,7 +2019,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
2007
2019
  :host([mobile='select']) .tabs { display: none; }
2008
2020
  :host([mobile='select']) .pick { display: block; }
2009
2021
  }
2010
- `];$("cm-status-tabs",ss);var B$=z("tableHeader",{selectAll:"Select all",sorted:", sorted {direction}",sortable:", sortable"}),rh,Fo,Gt,Mp,Eb,Mb,os=class extends T{constructor(){super(...arguments);p(this,Gt);this.columns=[];this.sort="";this.direction="ascending";this.selectable=!1;this.checked=!1;this.indeterminate=!1;this._slotted=[];this._inTable=!1;p(this,rh,A("cm-th"));p(this,Fo,new MutationObserver(()=>s(this,Gt,Mp).call(this)))}connectedCallback(){super.connectedCallback(),this._inTable=!!this.parentElement?.closest('table, [role="table"], [role="grid"], [role="treegrid"]'),s(this,Gt,Mp).call(this),r(this,Fo).observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0})}disconnectedCallback(){super.disconnectedCallback(),r(this,Fo).disconnect()}get items(){return this.columns.length?this.columns.map(e=>typeof e=="string"?{key:e,label:e}:{...e,key:e.key??e.label}):this._slotted}render(){let e=this._inTable,t=this.items;return c`
2022
+ `];$("cm-status-tabs",ss);var j$=z("tableHeader",{selectAll:"Select all",sorted:", sorted {direction}",sortable:", sortable"}),rh,Fo,Gt,Mp,Eb,Mb,os=class extends T{constructor(){super(...arguments);p(this,Gt);this.columns=[];this.sort="";this.direction="ascending";this.selectable=!1;this.checked=!1;this.indeterminate=!1;this._slotted=[];this._inTable=!1;p(this,rh,A("cm-th"));p(this,Fo,new MutationObserver(()=>s(this,Gt,Mp).call(this)))}connectedCallback(){super.connectedCallback(),this._inTable=!!this.parentElement?.closest('table, [role="table"], [role="grid"], [role="treegrid"]'),s(this,Gt,Mp).call(this),r(this,Fo).observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0})}disconnectedCallback(){super.disconnectedCallback(),r(this,Fo).disconnect()}get items(){return this.columns.length?this.columns.map(e=>typeof e=="string"?{key:e,label:e}:{...e,key:e.key??e.label}):this._slotted}render(){let e=this._inTable,t=this.items;return c`
2011
2023
  <div class="bar ${this.selectable?"sel":""}" part="bar" role=${e?"row":h}
2012
2024
  style="--_cols: repeat(${Math.max(1,t.length)}, minmax(0, 1fr))">
2013
2025
  ${this.selectable?c`<span class="cell" role=${e?"columnheader":h}><span class="check">
@@ -2075,7 +2087,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
2075
2087
  `];$("cm-table-header",os);var wy=`
2076
2088
  [data-cm-density="compact"] { --cm-table-row-height: 40px; --cm-resource-row-height: 40px; --cm-resource-row-padding: 4px; --cm-resource-media-size: 32px; }
2077
2089
  [data-cm-density="comfortable"] { --cm-table-row-height: 48px; --cm-resource-row-height: 56px; --cm-resource-row-padding: 8px; --cm-resource-media-size: 40px; }
2078
- `,ah=null,Tb=new WeakSet;function sh(o){if(typeof document>"u"||typeof CSSStyleSheet>"u")return;let n=[document],e=o.getRootNode();e instanceof ShadowRoot&&n.push(e);for(let t of n)if(!Tb.has(t)){Tb.add(t);try{ah||(ah=new CSSStyleSheet,ah.replaceSync(wy)),t.adoptedStyleSheets=[...t.adoptedStyleSheets,ah]}catch{}}}var Y$=z("dataTable",{empty:"No data",sorted:"Sorted by {column}, {direction}",scrollHint:"Scroll for more",columns:"Columns",showColumns:"Show columns",resize:"Resize {column} column",resized:"{column} column, {width} pixels wide",viewAll:"View all fields",viewLess:"Hide fields",rowAction:"{action}, {name}"}),zb=48,_b=16,Cb=!1,$y=`
2090
+ `,ah=null,Tb=new WeakSet;function sh(o){if(typeof document>"u"||typeof CSSStyleSheet>"u")return;let n=[document],e=o.getRootNode();e instanceof ShadowRoot&&n.push(e);for(let t of n)if(!Tb.has(t)){Tb.add(t);try{ah||(ah=new CSSStyleSheet,ah.replaceSync(wy)),t.adoptedStyleSheets=[...t.adoptedStyleSheets,ah]}catch{}}}var J$=z("dataTable",{empty:"No data",sorted:"Sorted by {column}, {direction}",scrollHint:"Scroll for more",columns:"Columns",showColumns:"Show columns",resize:"Resize {column} column",resized:"{column} column, {width} pixels wide",viewAll:"View all fields",viewLess:"Hide fields",rowAction:"{action}, {name}"}),zb=48,_b=16,Cb=!1,$y=`
2079
2091
  cm-data-table > table { width: 100%; border-collapse: separate; border-spacing: 0; font: inherit; font-size: var(--cm-font-size-13); line-height: var(--cm-line-height-13); font-variant-numeric: tabular-nums; color: var(--cm-text-default); }
2080
2092
  cm-data-table > table caption { text-align: start; font-weight: 600; font-size: var(--cm-font-size-16); line-height: var(--cm-line-height-16); padding-block-end: var(--cm-space-8); }
2081
2093
  cm-data-table > table th, cm-data-table > table td { box-sizing: border-box; }
@@ -2329,7 +2341,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
2329
2341
  :host([mobile='priority']) tr.more { display: table-row; }
2330
2342
  }
2331
2343
  @media (forced-colors: active) { button.sort cm-icon { opacity: 1; } .acts { opacity: 1 !important; } }
2332
- `];$("cm-data-table",ms);var ik=z("resourceItem",{select:"Select {name}"}),rk=z("resourceList",{resourceName:"item",resourceNamePlural:"items",select:"Select",selectPageHidden:"all {count} {resource} on this page",selectionOptions:"Selection options",selectPage:"Select all {count} on this page",selectAll:"Select all {count} {resource}",selectNone:"Select none",selected:"{count} {resource} selected.",allSelected:"All {count} {resource} selected.",clearSelection:"Clear selection",loading:"Loading {resource}"}),Jb=x`
2344
+ `];$("cm-data-table",ms);var ak=z("resourceItem",{select:"Select {name}"}),sk=z("resourceList",{resourceName:"item",resourceNamePlural:"items",select:"Select",selectPageHidden:"all {count} {resource} on this page",selectionOptions:"Selection options",selectPage:"Select all {count} on this page",selectAll:"Select all {count} {resource}",selectNone:"Select none",selected:"{count} {resource} selected.",allSelected:"All {count} {resource} selected.",clearSelection:"Clear selection",loading:"Loading {resource}"}),Jb=x`
2333
2345
  .check { position: relative; display: inline-flex; flex: none; width: 16px; height: 16px; }
2334
2346
  .check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
2335
2347
  .check input:disabled { cursor: not-allowed; }
@@ -2477,7 +2489,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
2477
2489
  .toolbar .check { width: 20px; height: 20px; }
2478
2490
  .spinner { width: 32px; height: 32px; margin: -16px; border-width: 3px; }
2479
2491
  }
2480
- `];$("cm-resource-list",xs);var ck=z("nestedItem",{reorder:"Reorder {label}",hint:"Press up or down arrow to move.",hintGroup:"Press up or down arrow to move. At either end of the list, the arrow moves it into the list before or after.",moved:"{label} moved to position {position} of {total}.",movedTo:"{label} moved to {list}, position {position} of {total}."}),dk=z("nestedList",{show:"Show {heading}",hide:"Hide {heading}"}),fh,re,Np,Ip,tf,rf,zi,af,sf,nf,Pp,of,ht=class ht extends T{constructor(){super();p(this,re);this.label="";this.value="";this.sortable=!1;this._hasChildren=!1;p(this,fh,this.attachInternals());p(this,zi,!1);r(this,fh).role="listitem"}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","listitem")}get list(){let e=this.parentElement;return e?.localName==="cm-nested-list"?e:null}moveToList(e,t){let i=this.list;if(!i||!e)return!1;if(e===i)return t===void 0?!1:this.moveTo(t);if(!i.group||e.group!==i.group)return!1;let a=e.items,l=Math.max(0,Math.min(a.length,t??a.length)),d={item:this,from:i.items.indexOf(this),to:l,fromList:i,toList:e};return this.dispatchEvent(new CustomEvent("cm-move",{detail:d,bubbles:!0,composed:!0,cancelable:!0}))?(e.insertBefore(this,a[l]??null),e.announce(this.t("movedTo",{label:this.label,list:e.heading,position:l+1,total:a.length+1})),!0):!1}get siblings(){return[...this.parentElement.children].filter(e=>e.localName==="cm-nested-item")}moveTo(e){let t=this.siblings,i=t.indexOf(this);if(e=Math.max(0,Math.min(t.length-1,e)),e===i)return!1;let a=new CustomEvent("cm-reorder",{detail:{item:this,from:i,to:e},bubbles:!0,composed:!0,cancelable:!0});if(!this.dispatchEvent(a))return!1;let l=t[e];return l.parentElement.insertBefore(this,e>i?l.nextSibling:l),this.closest("cm-nested-list")?.announce(this.t("moved",{label:this.label,position:e+1,total:t.length})),!0}render(){return c`
2492
+ `];$("cm-resource-list",xs);var hk=z("nestedItem",{reorder:"Reorder {label}",hint:"Press up or down arrow to move.",hintGroup:"Press up or down arrow to move. At either end of the list, the arrow moves it into the list before or after.",moved:"{label} moved to position {position} of {total}.",movedTo:"{label} moved to {list}, position {position} of {total}."}),mk=z("nestedList",{show:"Show {heading}",hide:"Hide {heading}"}),fh,re,Np,Ip,tf,rf,zi,af,sf,nf,Pp,of,ht=class ht extends T{constructor(){super();p(this,re);this.label="";this.value="";this.sortable=!1;this._hasChildren=!1;p(this,fh,this.attachInternals());p(this,zi,!1);r(this,fh).role="listitem"}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","listitem")}get list(){let e=this.parentElement;return e?.localName==="cm-nested-list"?e:null}moveToList(e,t){let i=this.list;if(!i||!e)return!1;if(e===i)return t===void 0?!1:this.moveTo(t);if(!i.group||e.group!==i.group)return!1;let a=e.items,l=Math.max(0,Math.min(a.length,t??a.length)),d={item:this,from:i.items.indexOf(this),to:l,fromList:i,toList:e};return this.dispatchEvent(new CustomEvent("cm-move",{detail:d,bubbles:!0,composed:!0,cancelable:!0}))?(e.insertBefore(this,a[l]??null),e.announce(this.t("movedTo",{label:this.label,list:e.heading,position:l+1,total:a.length+1})),!0):!1}get siblings(){return[...this.parentElement.children].filter(e=>e.localName==="cm-nested-item")}moveTo(e){let t=this.siblings,i=t.indexOf(this);if(e=Math.max(0,Math.min(t.length-1,e)),e===i)return!1;let a=new CustomEvent("cm-reorder",{detail:{item:this,from:i,to:e},bubbles:!0,composed:!0,cancelable:!0});if(!this.dispatchEvent(a))return!1;let l=t[e];return l.parentElement.insertBefore(this,e>i?l.nextSibling:l),this.closest("cm-nested-list")?.announce(this.t("moved",{label:this.label,position:e+1,total:t.length})),!0}render(){return c`
2481
2493
  <div class="row" part="row" @dragover=${s(this,re,nf)} @dragleave=${s(this,re,Pp)} @drop=${s(this,re,of)}>
2482
2494
  ${this.sortable?c`<button class="handle" type="button" part="handle" draggable="true" aria-label=${this.t("reorder",{label:this.label})}
2483
2495
  aria-describedby="hint"
@@ -2554,7 +2566,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
2554
2566
  .title { font-size: var(--cm-type-heading-sm-size); line-height: var(--cm-type-heading-sm-line-height); }
2555
2567
  .rows { margin-inline-start: var(--cm-space-8); }
2556
2568
  }
2557
- `];$("cm-nested-list",$s);var hf=(o,n,e)=>{let t=new Map;for(let i=n;i<=e;i++)t.set(o[i],i);return t},mf=Gr(class extends ti{constructor(o){if(super(o),o.type!==ot.CHILD)throw Error("repeat() can only be used in text expressions")}dt(o,n,e){let t;e===void 0?e=n:n!==void 0&&(t=n);let i=[],a=[],l=0;for(let d of o)i[l]=t?t(d,l):l,a[l]=e(d,l),l++;return{values:a,keys:i}}render(o,n,e){return this.dt(o,n,e).values}update(o,[n,e,t]){let i=mg(o),{values:a,keys:l}=this.dt(n,e,t);if(!Array.isArray(i))return this.ut=l,a;let d=this.ut??=[],m=[],u,v,b=0,w=i.length-1,y=0,M=a.length-1;for(;b<=w&&y<=M;)if(i[b]===null)b++;else if(i[w]===null)w--;else if(d[b]===l[y])m[y]=ii(i[b],a[y]),b++,y++;else if(d[w]===l[M])m[M]=ii(i[w],a[M]),w--,M--;else if(d[b]===l[M])m[M]=ii(i[b],a[M]),Yr(o,m[M+1],i[b]),b++,M--;else if(d[w]===l[y])m[y]=ii(i[w],a[y]),Yr(o,i[b],i[w]),w--,y++;else if(u===void 0&&(u=hf(l,y,M),v=hf(d,b,w)),u.has(d[b]))if(u.has(d[w])){let D=v.get(l[y]),H=D!==void 0?i[D]:null;if(H===null){let q=Yr(o,i[b]);ii(q,a[y]),m[y]=q}else m[y]=ii(H,a[y]),Yr(o,i[b],H),i[D]=null;y++}else zc(i[w]),w--;else zc(i[b]),b++;for(;y<=M;){let D=Yr(o,m[M+1]);ii(D,a[y]),m[y++]=D}for(;b<=w;){let D=i[b++];D!==null&&zc(D)}return this.ut=l,Tc(o,m),we}});function pf(o,n,e){let t=l=>e.slotCount(l),i=l=>Math.max(0,t(l)-1),a=l=>{for(let d=n.group+l;d>=0&&d<e.groupCount();d+=l)if(t(d)>0)return{group:d,index:Math.min(n.index,i(d))};return{...n}};switch(o){case"ArrowRight":return a(1);case"ArrowLeft":return a(-1);case"ArrowDown":return{group:n.group,index:Math.min(n.index+1,i(n.group))};case"ArrowUp":return{group:n.group,index:Math.max(n.index-1,0)};case"Home":return{group:n.group,index:0};case"End":return{group:n.group,index:i(n.group)};default:return null}}var le,Ue,Ve,xr=class{constructor(n){p(this,le);p(this,Ue,null);p(this,Ve,null);g(this,le,n)}get active(){return r(this,Ue)!==null}get from(){return r(this,Ue)&&{...r(this,Ue)}}get target(){return r(this,Ve)&&{...r(this,Ve)}}groupCount(){return r(this,le).groupCount()}slotCount(n){return n>=0&&n<r(this,le).groupCount()?r(this,le).slotCount(n):0}pickUp(n){this.active&&this.cancel(),g(this,Ue,{...n}),g(this,Ve,{...n}),r(this,le).onTarget?.(this.target),r(this,le).announce(r(this,le).messages.pickedUp(this.target))}moveTo(n){if(!r(this,Ve))return;let e=Math.max(0,Math.min(n.group,r(this,le).groupCount()-1)),t=this.slotCount(e);t<=0||(g(this,Ve,{group:e,index:Math.max(0,Math.min(n.index,t-1))}),r(this,le).onTarget?.(this.target),r(this,le).announce(r(this,le).messages.over(this.target)))}drop(){if(!r(this,Ue)||!r(this,Ve))return;let n=r(this,Ue),e=r(this,Ve);g(this,Ue,g(this,Ve,null)),r(this,le).onTarget?.(null),r(this,le).onDrop(n,e)}cancel(n=!1){if(!r(this,Ue))return;let e=r(this,Ue),t=n?"":r(this,le).messages.cancelled(e);g(this,Ue,g(this,Ve,null)),r(this,le).onTarget?.(null),r(this,le).onCancel?.(e),t&&r(this,le).announce(t)}handleKey(n,e=n.key){if(!this.active||n.altKey||n.ctrlKey||n.metaKey)return!1;if(e===" "||e==="Enter")return this.drop(),!0;if(e==="Escape")return this.cancel(),!0;if(e==="Tab")return this.cancel(),!1;let t=(r(this,le).navigate??pf)(e,r(this,Ve),this);return t?(this.moveTo(t),!0):!1}};le=new WeakMap,Ue=new WeakMap,Ve=new WeakMap;var Go,yr,wr=class{constructor(n=document,e="assertive"){p(this,Go);p(this,yr);let t=n.createElement("div");t.setAttribute("aria-live",e),t.setAttribute("aria-atomic","true"),t.className="cm-announcer",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",border:"0"}),this.element=t}get text(){return r(this,yr)??this.element.textContent??""}announce(n){clearTimeout(r(this,Go)),this.element.textContent===n?(this.element.textContent="",g(this,yr,n),g(this,Go,setTimeout(()=>{this.element.textContent=n,g(this,yr,void 0)},50))):(g(this,yr,void 0),this.element.textContent=n)}};Go=new WeakMap,yr=new WeakMap;var zk=z("boardCard",{roleDescription:"movable card",instructions:"Press Space to pick up. Then use the arrow keys to choose a column and a position, Space or Enter to drop, and Escape to cancel.",openHint:"Press Enter to open.",saving:"Saving"}),_k=z("boardColumn",{count:{one:"{count} card",other:"{count} cards"},loadMore:"Load more",loading:"Loading {column}",empty:"No cards"}),Ck=z("board",{label:"Board",pickedUp:"Picked up {card}. Column {column}, position {position} of {count}.",over:"Column {column}, position {position} of {count}.",moved:"Moved {card} to {column}, position {position} of {count}.",sameSpot:"{card} dropped where it started.",cancelled:"Move cancelled. {card} is back in {column}.",refused:"{card} can't be moved to {column}.",reverted:"Couldn't move {card}. It is back in {column}."}),zy="input, select, textarea, [contenteditable], cm-action-menu, cm-select, cm-text-field, [data-no-drag]",Yo,wh,uf,$r=class extends T{constructor(){super(...arguments);p(this,wh);this.value="";this.label="";this.heading="";this.href="";this.locked=!1;this.pending=!1;this.moving=!1;this._badges=!1;this._slottedTitle="";p(this,Yo,A("cm-bc"))}get name(){let e=i=>(i??"").replace(/\s+/g," ").trim();if(this.label)return this.label;if(this.heading)return this.heading;let t=this.querySelector(':scope > [slot="heading"]');return t?e(t.textContent):e(this.textContent).slice(0,80)}get key(){return this.value||this.name}get opener(){if(this.href)return this.renderRoot?.querySelector(".title a")??null;let e=this.querySelector(':scope > [slot="heading"]');return e?e.matches("a[href], button, cm-button")?e:e.querySelector("a[href], button, cm-button"):null}focusHandle(e){let t=this.renderRoot?.querySelector(".handle");t?t.focus(e):this.focus(e)}open(){let e=this.opener;return e?(e.click(),!0):!1}render(){let e=!!(this.href||this.querySelector(':scope > [slot="heading"] a[href], :scope > [slot="heading"] button, :scope > a[slot="heading"][href], :scope > button[slot="heading"]')),t=this.pending;return c`<div class="card" part="card">
2569
+ `];$("cm-nested-list",$s);var hf=(o,n,e)=>{let t=new Map;for(let i=n;i<=e;i++)t.set(o[i],i);return t},mf=Gr(class extends ti{constructor(o){if(super(o),o.type!==ot.CHILD)throw Error("repeat() can only be used in text expressions")}dt(o,n,e){let t;e===void 0?e=n:n!==void 0&&(t=n);let i=[],a=[],l=0;for(let d of o)i[l]=t?t(d,l):l,a[l]=e(d,l),l++;return{values:a,keys:i}}render(o,n,e){return this.dt(o,n,e).values}update(o,[n,e,t]){let i=mg(o),{values:a,keys:l}=this.dt(n,e,t);if(!Array.isArray(i))return this.ut=l,a;let d=this.ut??=[],m=[],u,v,b=0,w=i.length-1,y=0,M=a.length-1;for(;b<=w&&y<=M;)if(i[b]===null)b++;else if(i[w]===null)w--;else if(d[b]===l[y])m[y]=ii(i[b],a[y]),b++,y++;else if(d[w]===l[M])m[M]=ii(i[w],a[M]),w--,M--;else if(d[b]===l[M])m[M]=ii(i[b],a[M]),Yr(o,m[M+1],i[b]),b++,M--;else if(d[w]===l[y])m[y]=ii(i[w],a[y]),Yr(o,i[b],i[w]),w--,y++;else if(u===void 0&&(u=hf(l,y,M),v=hf(d,b,w)),u.has(d[b]))if(u.has(d[w])){let D=v.get(l[y]),H=D!==void 0?i[D]:null;if(H===null){let q=Yr(o,i[b]);ii(q,a[y]),m[y]=q}else m[y]=ii(H,a[y]),Yr(o,i[b],H),i[D]=null;y++}else zc(i[w]),w--;else zc(i[b]),b++;for(;y<=M;){let D=Yr(o,m[M+1]);ii(D,a[y]),m[y++]=D}for(;b<=w;){let D=i[b++];D!==null&&zc(D)}return this.ut=l,Tc(o,m),we}});function pf(o,n,e){let t=l=>e.slotCount(l),i=l=>Math.max(0,t(l)-1),a=l=>{for(let d=n.group+l;d>=0&&d<e.groupCount();d+=l)if(t(d)>0)return{group:d,index:Math.min(n.index,i(d))};return{...n}};switch(o){case"ArrowRight":return a(1);case"ArrowLeft":return a(-1);case"ArrowDown":return{group:n.group,index:Math.min(n.index+1,i(n.group))};case"ArrowUp":return{group:n.group,index:Math.max(n.index-1,0)};case"Home":return{group:n.group,index:0};case"End":return{group:n.group,index:i(n.group)};default:return null}}var le,Ue,Ve,xr=class{constructor(n){p(this,le);p(this,Ue,null);p(this,Ve,null);g(this,le,n)}get active(){return r(this,Ue)!==null}get from(){return r(this,Ue)&&{...r(this,Ue)}}get target(){return r(this,Ve)&&{...r(this,Ve)}}groupCount(){return r(this,le).groupCount()}slotCount(n){return n>=0&&n<r(this,le).groupCount()?r(this,le).slotCount(n):0}pickUp(n){this.active&&this.cancel(),g(this,Ue,{...n}),g(this,Ve,{...n}),r(this,le).onTarget?.(this.target),r(this,le).announce(r(this,le).messages.pickedUp(this.target))}moveTo(n){if(!r(this,Ve))return;let e=Math.max(0,Math.min(n.group,r(this,le).groupCount()-1)),t=this.slotCount(e);t<=0||(g(this,Ve,{group:e,index:Math.max(0,Math.min(n.index,t-1))}),r(this,le).onTarget?.(this.target),r(this,le).announce(r(this,le).messages.over(this.target)))}drop(){if(!r(this,Ue)||!r(this,Ve))return;let n=r(this,Ue),e=r(this,Ve);g(this,Ue,g(this,Ve,null)),r(this,le).onTarget?.(null),r(this,le).onDrop(n,e)}cancel(n=!1){if(!r(this,Ue))return;let e=r(this,Ue),t=n?"":r(this,le).messages.cancelled(e);g(this,Ue,g(this,Ve,null)),r(this,le).onTarget?.(null),r(this,le).onCancel?.(e),t&&r(this,le).announce(t)}handleKey(n,e=n.key){if(!this.active||n.altKey||n.ctrlKey||n.metaKey)return!1;if(e===" "||e==="Enter")return this.drop(),!0;if(e==="Escape")return this.cancel(),!0;if(e==="Tab")return this.cancel(),!1;let t=(r(this,le).navigate??pf)(e,r(this,Ve),this);return t?(this.moveTo(t),!0):!1}};le=new WeakMap,Ue=new WeakMap,Ve=new WeakMap;var Go,yr,wr=class{constructor(n=document,e="assertive"){p(this,Go);p(this,yr);let t=n.createElement("div");t.setAttribute("aria-live",e),t.setAttribute("aria-atomic","true"),t.className="cm-announcer",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",border:"0"}),this.element=t}get text(){return r(this,yr)??this.element.textContent??""}announce(n){clearTimeout(r(this,Go)),this.element.textContent===n?(this.element.textContent="",g(this,yr,n),g(this,Go,setTimeout(()=>{this.element.textContent=n,g(this,yr,void 0)},50))):(g(this,yr,void 0),this.element.textContent=n)}};Go=new WeakMap,yr=new WeakMap;var Ck=z("boardCard",{roleDescription:"movable card",instructions:"Press Space to pick up. Then use the arrow keys to choose a column and a position, Space or Enter to drop, and Escape to cancel.",openHint:"Press Enter to open.",saving:"Saving"}),Sk=z("boardColumn",{count:{one:"{count} card",other:"{count} cards"},loadMore:"Load more",loading:"Loading {column}",empty:"No cards"}),Lk=z("board",{label:"Board",pickedUp:"Picked up {card}. Column {column}, position {position} of {count}.",over:"Column {column}, position {position} of {count}.",moved:"Moved {card} to {column}, position {position} of {count}.",sameSpot:"{card} dropped where it started.",cancelled:"Move cancelled. {card} is back in {column}.",refused:"{card} can't be moved to {column}.",reverted:"Couldn't move {card}. It is back in {column}."}),zy="input, select, textarea, [contenteditable], cm-action-menu, cm-select, cm-text-field, [data-no-drag]",Yo,wh,uf,$r=class extends T{constructor(){super(...arguments);p(this,wh);this.value="";this.label="";this.heading="";this.href="";this.locked=!1;this.pending=!1;this.moving=!1;this._badges=!1;this._slottedTitle="";p(this,Yo,A("cm-bc"))}get name(){let e=i=>(i??"").replace(/\s+/g," ").trim();if(this.label)return this.label;if(this.heading)return this.heading;let t=this.querySelector(':scope > [slot="heading"]');return t?e(t.textContent):e(this.textContent).slice(0,80)}get key(){return this.value||this.name}get opener(){if(this.href)return this.renderRoot?.querySelector(".title a")??null;let e=this.querySelector(':scope > [slot="heading"]');return e?e.matches("a[href], button, cm-button")?e:e.querySelector("a[href], button, cm-button"):null}focusHandle(e){let t=this.renderRoot?.querySelector(".handle");t?t.focus(e):this.focus(e)}open(){let e=this.opener;return e?(e.click(),!0):!1}render(){let e=!!(this.href||this.querySelector(':scope > [slot="heading"] a[href], :scope > [slot="heading"] button, :scope > a[slot="heading"][href], :scope > button[slot="heading"]')),t=this.pending;return c`<div class="card" part="card">
2558
2570
  ${this.locked?h:c`<div class="handle" part="handle" tabindex="0" role="button" aria-roledescription=${this.t("roleDescription")}
2559
2571
  aria-label=${t?`${this.name}, ${this.t("saving")}`:this.name} aria-describedby="${r(this,Yo)}-help"></div>`}
2560
2572
  <div class="content">
@@ -2661,7 +2673,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
2661
2673
  ::slotted(cm-board-column) { inline-size: calc(100% - 40px); scroll-snap-align: start; }
2662
2674
  ::slotted(cm-board-column[collapsed]) { inline-size: 48px; }
2663
2675
  }
2664
- `];$("cm-board",Ms);var Ik=z("calendar",{label:"Calendar",previousMonth:"Previous month",nextMonth:"Next month",previousWeek:"Previous week",nextWeek:"Next week",previousDays:"Previous {count} days",nextDays:"Next {count} days",previousDay:"Previous day",nextDay:"Next day",today:"Today",views:"View",month:"Month",week:"Week",day:"Day",allDay:"All day",time:"Time",add:"Add",addOn:"Add on {date}",addAllDay:"Add an all-day event on {date}",addAt:"Add at {time}, {date}",more:"+{count} more",moreLabel:"{count} more on {date}",dayEvents:{one:"{date}, {count} event",other:"{date}, {count} events"},noEvents:"No events",loading:"Loading events",timeRange:"{start} to {end}",timed:"{date}, {time}",allDayOn:"{date}, all day",allDayRange:"{start} to {end}, all day",eventName:"{title}, {when}",eventNameKind:"{title}, {when}, {kind}",roleDescription:"movable event",openHint:"Press Enter to open.",instructions:"Press Space to pick up, then the arrow keys to choose a day or time, Space or Enter to drop and Escape to cancel.",gridHelp:"Use the arrow keys to move between days, times and events, and Page Up and Page Down for the previous or next period.",saving:"Saving",pickedUp:"Picked up {event}. {place}.",over:"{place}.",moved:"Moved {event} to {place}.",sameSpot:"{event} dropped where it started.",cancelled:"Move cancelled. {event} is back on {place}.",refused:"{event} can't be moved to {place}.",reverted:"Couldn't move {event}. It is back on {place}."}),Ls=class extends S{constructor(){super(...arguments);this.value="";this.heading="";this.label="";this.start="";this.end="";this.allDay=!1;this.kind="";this.tone="neutral";this.icon="";this.href="";this.locked=!1;this.pending=!1;this.moving=!1}get name(){return this.label||this.heading||(this.textContent??"").replace(/\s+/g," ").trim()}get key(){return this.value||this.name}updated(){let e=this.parentElement;e?.localName==="cm-calendar"&&e.requestUpdate()}render(){return h}};Ls.properties={value:{reflect:!0},heading:{},label:{},start:{},end:{},allDay:{type:Boolean,attribute:"all-day",reflect:!0},kind:{},tone:{reflect:!0},icon:{},href:{},locked:{type:Boolean,reflect:!0},pending:{type:Boolean,reflect:!0},moving:{type:Boolean,reflect:!0}},Ls.styles=x`:host { display: none !important; }`;$("cm-calendar-event",Ls);var _h=o=>String(o).padStart(2,"0"),Ef=o=>`${P(o)}T${_h(o.getHours())}:${_h(o.getMinutes())}`,$h=(o,n)=>Math.round((Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())-Date.UTC(o.getFullYear(),o.getMonth(),o.getDate()))/864e5),Mf=["month","week","day"],_y=600,Tf=new Map,zf=(o,n)=>{let e=`${o}|${JSON.stringify(n)}`,t=Tf.get(e);return t||(t=new Intl.DateTimeFormat(o,n),Tf.set(e,t)),t},Gp=o=>o.replace(/[  ]/g," ").trim(),As,Se,Le,xe,Z,Q,Tr,Et,We,ul,Di,Rs,Hs,Ns,Is,gl,f,Ee,Si,nl,kh,kt,Yp,ol,mt,Xp,_f,pt,Cs,Cf,Sf,Ke,ll,cl,Eh,Lf,Df,Af,Mr,Jp,dl,Rf,hl,Hf,Nf,If,Pf,bl,fl,Of,qf,vl,ml,Bf,Zp,Qp,eu,Ff,jf,tu,iu,ru,yl,au,Uf,xl,wl,$l,kl,El,Ml,su,Mh,Vf,Li,pl,Kf,nu,Wf,Th,ou,Ss,zh,Gf,Yf,Xf,Jf,Zf,Ds=class extends T{constructor(){super();p(this,f);this.view="month";this.date="";this.today="";this.step=15;p(this,As,"");this.hourCycle="";this.dayStart=8;this.maxEvents=3;this.headingLevel=2;this.loading=!1;this.readonly=!1;this.controlled=!1;this.dragging=!1;this._narrow=!1;this._more="";this._target=null;p(this,Se,A("cm-cal"));p(this,Le,new wr);p(this,xe);p(this,Z,null);p(this,Q,null);p(this,Tr,new WeakMap);p(this,Et,"");p(this,We,null);p(this,ul,"");p(this,Di,!0);p(this,Rs,0);p(this,Hs,!1);p(this,Ns);p(this,Is,0);p(this,gl,new MutationObserver(()=>this.requestUpdate()));p(this,bl,e=>{let t=e.composedPath()[0];if(t instanceof HTMLElement&&t.classList.contains("item")&&t.dataset.k){g(this,Et,t.dataset.k);for(let i of s(this,f,hl).call(this))i.tabIndex=i===t?0:-1}});p(this,fl,e=>{let t=e.relatedTarget;if(this._more&&!r(this,Z)){let i=this.renderRoot.querySelector(".pop"),a=e.composedPath()[0];i&&i.contains(a)&&!(t&&i.contains(t))&&queueMicrotask(()=>{i.contains(this.renderRoot.activeElement)||(this._more="")})}!r(this,xe).active||!r(this,Z)||!t&&document.hasFocus()===!1||this.updateComplete.then(()=>setTimeout(()=>{if(!r(this,xe).active||!r(this,Z))return;this.renderRoot.activeElement?.dataset.ev!==r(this,Z).ev.key&&r(this,xe).cancel()}))});p(this,vl,e=>{if(r(this,Q)?.started&&e.key==="Escape"){e.preventDefault(),this.cancelMove();return}let t=J(e,this);if(r(this,xe).active){r(this,xe).handleKey(e,t)&&(e.preventDefault(),e.stopPropagation());return}if(e.altKey||e.ctrlKey||e.metaKey)return;let i=e.composedPath()[0];if(!(i instanceof HTMLElement)||i.getRootNode()!==this.renderRoot)return;let a=i.closest(".pop");if(a&&e.key==="Escape"){e.preventDefault(),s(this,f,Th).call(this,!0);return}if(i.dataset.ev&&e.key===" "){e.preventDefault(),g(this,Rs,performance.now()+400),this.pickUp(i.dataset.ev,i.dataset.day);return}if(a&&(t==="ArrowDown"||t==="ArrowUp")){let d=[...a.querySelectorAll(".chip")],m=d[d.indexOf(i)+(t==="ArrowDown"?1:-1)];m&&(e.preventDefault(),m.focus());return}if(!i.classList.contains("item"))return;if(e.key==="PageUp"||e.key==="PageDown"){e.preventDefault(),s(this,f,qf).call(this,i,e.key==="PageUp"?-1:1);return}let l=s(this,f,Of).call(this,i,t);l?(e.preventDefault(),s(this,f,Pf).call(this,l)):(t.startsWith("Arrow")||t==="Home"||t==="End")&&e.preventDefault()});p(this,yl,e=>{e.composedPath().some(t=>t.dataset?.ev)&&e.preventDefault()});p(this,xl,e=>{if(r(this,Q)||this.readonly||!e.isPrimary||e.pointerType==="mouse"&&e.button!==0)return;let t=e.composedPath().find(m=>m.dataset?.ev);if(!t)return;let i=this.event(t.dataset.ev),a=i&&s(this,f,Cs).call(this,i);if(!a||i.locked||i.pending)return;let l=s(this,f,Qp).call(this,a,t.dataset.day??a.days[0]);if(!l)return;r(this,xe).active&&r(this,xe).cancel();let d=0;if(l.mode==="time"){let m=s(this,f,au).call(this,e.clientX,e.clientY);m&&t.classList.contains("time")&&(d=Math.max(0,Math.min(a.dur,m.min-a.min)))}g(this,Q,{...l,pointerId:e.pointerId,type:e.pointerType,x0:e.clientX,y0:e.clientY,x:e.clientX,y:e.clientY,started:!1,grab:d,to:{...l.from}}),e.pointerType!=="mouse"&&(r(this,Q).timer=setTimeout(()=>{r(this,Q)&&!r(this,Q).started&&s(this,f,su).call(this)},300)),window.addEventListener("pointermove",r(this,kl),!0),window.addEventListener("pointerup",r(this,El),!0),window.addEventListener("pointercancel",r(this,Ml),!0),window.addEventListener("touchmove",r(this,wl),{capture:!0,passive:!1}),window.addEventListener("contextmenu",r(this,$l),!0)});p(this,wl,e=>{r(this,Q)?.started&&e.cancelable&&e.preventDefault()});p(this,$l,e=>{r(this,Q)&&e.preventDefault()});p(this,kl,e=>{let t=r(this,Q);if(!(!t||e.pointerId!==t.pointerId)){if(t.x=e.clientX,t.y=e.clientY,!t.started){let i=Math.hypot(t.x-t.x0,t.y-t.y0);(t.type==="mouse"?i>4:i>8)&&(t.type==="mouse"?s(this,f,su).call(this):s(this,f,Li).call(this,!1));return}e.preventDefault(),s(this,f,Mh).call(this)}});p(this,El,e=>{let t=r(this,Q);if(!t||e.pointerId!==t.pointerId)return;if(!t.started){s(this,f,Li).call(this,!1);return}let i=a=>{a.stopPropagation(),a.preventDefault()};window.addEventListener("click",i,{capture:!0,once:!0}),setTimeout(()=>window.removeEventListener("click",i,!0),0),s(this,f,Li).call(this,!0)});p(this,Ml,e=>{r(this,Q)&&e.pointerId===r(this,Q).pointerId&&s(this,f,Li).call(this,!1)});g(this,xe,new xr({groupCount:()=>s(this,f,pt).call(this).length,slotCount:()=>r(this,Z)?r(this,Z).mode==="day"?1:s(this,f,ml).call(this,r(this,Z).ev.dur):0,navigate:(e,t)=>s(this,f,Bf).call(this,e,t),onTarget:e=>s(this,f,Ff).call(this,e),onDrop:(e,t)=>s(this,f,jf).call(this,e,t),onCancel:()=>s(this,f,eu).call(this),messages:{pickedUp:e=>this.t("pickedUp",{event:r(this,Z)?.ev.name??"",place:s(this,f,Mr).call(this,r(this,Z),e)}),over:e=>this.t("over",{place:s(this,f,Mr).call(this,r(this,Z),e)}),cancelled:e=>this.t("cancelled",{event:r(this,Z)?.ev.name??"",place:s(this,f,Mr).call(this,r(this,Z),e)})},announce:e=>r(this,Le).announce(e)}))}get locale(){return r(this,As)}set locale(e){let t=r(this,As);g(this,As,e??""),this.requestUpdate("locale",t)}get events(){return[...this.children].filter(e=>e.localName==="cm-calendar-event")}event(e){return this.events.find(t=>t.key===e)}get range(){let e=s(this,f,pt).call(this);return{view:r(this,f,Ee),start:P(e[0]),end:P(e[e.length-1])}}get heldEvent(){return r(this,Z)?.ev.el??null}get announcement(){return r(this,Le).text}announce(e){r(this,Le).announce(e)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",r(this,vl)),this.addEventListener("focusin",r(this,bl)),this.addEventListener("focusout",r(this,fl)),this.addEventListener("pointerdown",r(this,xl)),this.addEventListener("dragstart",r(this,yl)),r(this,gl).observe(this,{childList:!0}),typeof ResizeObserver<"u"&&(g(this,Ns,new ResizeObserver(()=>{cancelAnimationFrame(r(this,Is)),g(this,Is,requestAnimationFrame(()=>s(this,f,Jp).call(this)))})),r(this,Ns).observe(this)),s(this,f,Jp).call(this)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",r(this,vl)),this.removeEventListener("focusin",r(this,bl)),this.removeEventListener("focusout",r(this,fl)),this.removeEventListener("pointerdown",r(this,xl)),this.removeEventListener("dragstart",r(this,yl)),r(this,gl).disconnect(),r(this,Ns)?.disconnect(),cancelAnimationFrame(r(this,Is)),r(this,xe).cancel(!0),s(this,f,Li).call(this,!1)}willUpdate(e){e.has("view")&&(g(this,Di,!0),e.get("view")!==void 0&&(this._more="",r(this,xe).cancel(!0))),(e.has("date")||e.has("_narrow"))&&(this._more=this._more&&this.range.start<=this._more&&this._more<=this.range.end?this._more:"")}firstUpdated(){this.renderRoot.appendChild(r(this,Le).element)}scrollToHour(e){let t=this.renderRoot.querySelector(".tg"),i=t?.querySelector(".tcell");!t||!i||(t.scrollTop=i.offsetHeight*Math.max(0,Math.min(23,Math.trunc(Number(e))||0)))}updated(e){if(e.has("dayStart")&&e.get("dayStart")!==void 0&&g(this,Di,!0),s(this,f,If).call(this),r(this,We)){let l=s(this,f,Hf).call(this,r(this,We).key);l?(g(this,We,null),l.focus({preventScroll:!1})):Date.now()>r(this,We).until&&g(this,We,null)}r(this,Hs)&&(g(this,Hs,!1),(this.renderRoot.querySelector(".pop .chip")??this.renderRoot.querySelector(".pop button"))?.focus());let t=this.renderRoot.querySelector(".tg");if(t&&r(this,Di)){let l=t.querySelector(".tcell"),d=Math.max(0,Math.min(23,Math.trunc(Number(this.dayStart))||0));l&&(t.scrollTop=l.offsetHeight*d),g(this,Di,!1)}t||g(this,Di,!0),r(this,Z)&&this._target&&this.renderRoot.querySelector(".ph")?.scrollIntoView?.({block:"nearest",inline:"nearest"});let i=this.range,a=`${i.view}|${i.start}|${i.end}`;a!==r(this,ul)&&(g(this,ul,a),this.dispatchEvent(new CustomEvent("cm-range-change",{detail:i,bubbles:!0,composed:!0})))}previous(){this.date=P(s(this,f,dl).call(this,r(this,f,mt),-1))}next(){this.date=P(s(this,f,dl).call(this,r(this,f,mt),1))}goToToday(){this.date=r(this,f,ol)}pickUp(e,t){let i=typeof e=="string"?this.event(e):e;if(!i||i.locked||i.pending||this.readonly)return!1;let a=s(this,f,Cs).call(this,i);if(!a)return!1;let l=s(this,f,pt).call(this).map(P),d=t&&a.days.includes(t)&&l.includes(t)?t:a.days.find(v=>l.includes(v));if(!d)return!1;let m=s(this,f,Qp).call(this,a,d);if(!m)return!1;s(this,f,Li).call(this,!1),r(this,xe).cancel(!0),this._more="",g(this,Z,m),i.moving=!0;let u=`ev:${a.key}:${d}`;return g(this,Et,u),g(this,We,{key:u,until:Date.now()+1e3}),this.requestUpdate(),r(this,xe).pickUp(m.from),!0}cancelMove(){let e=r(this,Q);e?.started&&(s(this,f,Li).call(this,!1),r(this,Le).announce(this.t("cancelled",{event:e.ev.name,place:s(this,f,Mr).call(this,e,e.from)}))),r(this,xe).cancel()}moveEvent(e,t,i){let a=typeof e=="string"?this.event(e):e,l=a&&s(this,f,Cs).call(this,a);if(!l)return!1;let d=l.allDay?N(Qe(t).date||t):vt(t);if(!d)return!1;let m=i?l.allDay?N(Qe(i).date||i):vt(i):null;return(!m||m<d)&&(m=l.allDay?G(d,$h(l.start,l.end)):new Date(d.getTime()+l.dur*6e4)),s(this,f,ru).call(this,l,d,m,"api",!1,P(d))}revert(e){let t=typeof e=="string"?this.event(e):e;if(!t)return!1;t.pending=!1;let i=r(this,Tr).get(t);if(this.controlled||!i)return!1;r(this,Tr).delete(t);let a=this.renderRoot.activeElement?.dataset.ev===t.key;t.start=i.start,t.end=i.end;let l=s(this,f,Cs).call(this,t);return l&&a&&g(this,We,{key:`ev:${l.key}:${l.days[0]}`,until:Date.now()+1e3}),r(this,Le).announce(this.t("reverted",{event:t.name,place:l?s(this,f,Eh).call(this,l):i.start})),!0}render(){let e=s(this,f,pt).call(this),t=s(this,f,Sf).call(this,s(this,f,Cf).call(this));return c`<div class="cal ${this._narrow?"narrow":""}" role="group" aria-label=${this.label}>
2676
+ `];$("cm-board",Ms);var Ok=z("calendar",{label:"Calendar",previousMonth:"Previous month",nextMonth:"Next month",previousWeek:"Previous week",nextWeek:"Next week",previousDays:"Previous {count} days",nextDays:"Next {count} days",previousDay:"Previous day",nextDay:"Next day",today:"Today",views:"View",month:"Month",week:"Week",day:"Day",allDay:"All day",time:"Time",add:"Add",addOn:"Add on {date}",addAllDay:"Add an all-day event on {date}",addAt:"Add at {time}, {date}",more:"+{count} more",moreLabel:"{count} more on {date}",dayEvents:{one:"{date}, {count} event",other:"{date}, {count} events"},noEvents:"No events",loading:"Loading events",timeRange:"{start} to {end}",timed:"{date}, {time}",allDayOn:"{date}, all day",allDayRange:"{start} to {end}, all day",eventName:"{title}, {when}",eventNameKind:"{title}, {when}, {kind}",roleDescription:"movable event",openHint:"Press Enter to open.",instructions:"Press Space to pick up, then the arrow keys to choose a day or time, Space or Enter to drop and Escape to cancel.",gridHelp:"Use the arrow keys to move between days, times and events, and Page Up and Page Down for the previous or next period.",saving:"Saving",pickedUp:"Picked up {event}. {place}.",over:"{place}.",moved:"Moved {event} to {place}.",sameSpot:"{event} dropped where it started.",cancelled:"Move cancelled. {event} is back on {place}.",refused:"{event} can't be moved to {place}.",reverted:"Couldn't move {event}. It is back on {place}."}),Ls=class extends S{constructor(){super(...arguments);this.value="";this.heading="";this.label="";this.start="";this.end="";this.allDay=!1;this.kind="";this.tone="neutral";this.icon="";this.href="";this.locked=!1;this.pending=!1;this.moving=!1}get name(){return this.label||this.heading||(this.textContent??"").replace(/\s+/g," ").trim()}get key(){return this.value||this.name}updated(){let e=this.parentElement;e?.localName==="cm-calendar"&&e.requestUpdate()}render(){return h}};Ls.properties={value:{reflect:!0},heading:{},label:{},start:{},end:{},allDay:{type:Boolean,attribute:"all-day",reflect:!0},kind:{},tone:{reflect:!0},icon:{},href:{},locked:{type:Boolean,reflect:!0},pending:{type:Boolean,reflect:!0},moving:{type:Boolean,reflect:!0}},Ls.styles=x`:host { display: none !important; }`;$("cm-calendar-event",Ls);var _h=o=>String(o).padStart(2,"0"),Ef=o=>`${P(o)}T${_h(o.getHours())}:${_h(o.getMinutes())}`,$h=(o,n)=>Math.round((Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())-Date.UTC(o.getFullYear(),o.getMonth(),o.getDate()))/864e5),Mf=["month","week","day"],_y=600,Tf=new Map,zf=(o,n)=>{let e=`${o}|${JSON.stringify(n)}`,t=Tf.get(e);return t||(t=new Intl.DateTimeFormat(o,n),Tf.set(e,t)),t},Gp=o=>o.replace(/[  ]/g," ").trim(),As,Se,Le,xe,Z,Q,Tr,Et,We,ul,Di,Rs,Hs,Ns,Is,gl,f,Ee,Si,nl,kh,kt,Yp,ol,mt,Xp,_f,pt,Cs,Cf,Sf,Ke,ll,cl,Eh,Lf,Df,Af,Mr,Jp,dl,Rf,hl,Hf,Nf,If,Pf,bl,fl,Of,qf,vl,ml,Bf,Zp,Qp,eu,Ff,jf,tu,iu,ru,yl,au,Uf,xl,wl,$l,kl,El,Ml,su,Mh,Vf,Li,pl,Kf,nu,Wf,Th,ou,Ss,zh,Gf,Yf,Xf,Jf,Zf,Ds=class extends T{constructor(){super();p(this,f);this.view="month";this.date="";this.today="";this.step=15;p(this,As,"");this.hourCycle="";this.dayStart=8;this.maxEvents=3;this.headingLevel=2;this.loading=!1;this.readonly=!1;this.controlled=!1;this.dragging=!1;this._narrow=!1;this._more="";this._target=null;p(this,Se,A("cm-cal"));p(this,Le,new wr);p(this,xe);p(this,Z,null);p(this,Q,null);p(this,Tr,new WeakMap);p(this,Et,"");p(this,We,null);p(this,ul,"");p(this,Di,!0);p(this,Rs,0);p(this,Hs,!1);p(this,Ns);p(this,Is,0);p(this,gl,new MutationObserver(()=>this.requestUpdate()));p(this,bl,e=>{let t=e.composedPath()[0];if(t instanceof HTMLElement&&t.classList.contains("item")&&t.dataset.k){g(this,Et,t.dataset.k);for(let i of s(this,f,hl).call(this))i.tabIndex=i===t?0:-1}});p(this,fl,e=>{let t=e.relatedTarget;if(this._more&&!r(this,Z)){let i=this.renderRoot.querySelector(".pop"),a=e.composedPath()[0];i&&i.contains(a)&&!(t&&i.contains(t))&&queueMicrotask(()=>{i.contains(this.renderRoot.activeElement)||(this._more="")})}!r(this,xe).active||!r(this,Z)||!t&&document.hasFocus()===!1||this.updateComplete.then(()=>setTimeout(()=>{if(!r(this,xe).active||!r(this,Z))return;this.renderRoot.activeElement?.dataset.ev!==r(this,Z).ev.key&&r(this,xe).cancel()}))});p(this,vl,e=>{if(r(this,Q)?.started&&e.key==="Escape"){e.preventDefault(),this.cancelMove();return}let t=J(e,this);if(r(this,xe).active){r(this,xe).handleKey(e,t)&&(e.preventDefault(),e.stopPropagation());return}if(e.altKey||e.ctrlKey||e.metaKey)return;let i=e.composedPath()[0];if(!(i instanceof HTMLElement)||i.getRootNode()!==this.renderRoot)return;let a=i.closest(".pop");if(a&&e.key==="Escape"){e.preventDefault(),s(this,f,Th).call(this,!0);return}if(i.dataset.ev&&e.key===" "){e.preventDefault(),g(this,Rs,performance.now()+400),this.pickUp(i.dataset.ev,i.dataset.day);return}if(a&&(t==="ArrowDown"||t==="ArrowUp")){let d=[...a.querySelectorAll(".chip")],m=d[d.indexOf(i)+(t==="ArrowDown"?1:-1)];m&&(e.preventDefault(),m.focus());return}if(!i.classList.contains("item"))return;if(e.key==="PageUp"||e.key==="PageDown"){e.preventDefault(),s(this,f,qf).call(this,i,e.key==="PageUp"?-1:1);return}let l=s(this,f,Of).call(this,i,t);l?(e.preventDefault(),s(this,f,Pf).call(this,l)):(t.startsWith("Arrow")||t==="Home"||t==="End")&&e.preventDefault()});p(this,yl,e=>{e.composedPath().some(t=>t.dataset?.ev)&&e.preventDefault()});p(this,xl,e=>{if(r(this,Q)||this.readonly||!e.isPrimary||e.pointerType==="mouse"&&e.button!==0)return;let t=e.composedPath().find(m=>m.dataset?.ev);if(!t)return;let i=this.event(t.dataset.ev),a=i&&s(this,f,Cs).call(this,i);if(!a||i.locked||i.pending)return;let l=s(this,f,Qp).call(this,a,t.dataset.day??a.days[0]);if(!l)return;r(this,xe).active&&r(this,xe).cancel();let d=0;if(l.mode==="time"){let m=s(this,f,au).call(this,e.clientX,e.clientY);m&&t.classList.contains("time")&&(d=Math.max(0,Math.min(a.dur,m.min-a.min)))}g(this,Q,{...l,pointerId:e.pointerId,type:e.pointerType,x0:e.clientX,y0:e.clientY,x:e.clientX,y:e.clientY,started:!1,grab:d,to:{...l.from}}),e.pointerType!=="mouse"&&(r(this,Q).timer=setTimeout(()=>{r(this,Q)&&!r(this,Q).started&&s(this,f,su).call(this)},300)),window.addEventListener("pointermove",r(this,kl),!0),window.addEventListener("pointerup",r(this,El),!0),window.addEventListener("pointercancel",r(this,Ml),!0),window.addEventListener("touchmove",r(this,wl),{capture:!0,passive:!1}),window.addEventListener("contextmenu",r(this,$l),!0)});p(this,wl,e=>{r(this,Q)?.started&&e.cancelable&&e.preventDefault()});p(this,$l,e=>{r(this,Q)&&e.preventDefault()});p(this,kl,e=>{let t=r(this,Q);if(!(!t||e.pointerId!==t.pointerId)){if(t.x=e.clientX,t.y=e.clientY,!t.started){let i=Math.hypot(t.x-t.x0,t.y-t.y0);(t.type==="mouse"?i>4:i>8)&&(t.type==="mouse"?s(this,f,su).call(this):s(this,f,Li).call(this,!1));return}e.preventDefault(),s(this,f,Mh).call(this)}});p(this,El,e=>{let t=r(this,Q);if(!t||e.pointerId!==t.pointerId)return;if(!t.started){s(this,f,Li).call(this,!1);return}let i=a=>{a.stopPropagation(),a.preventDefault()};window.addEventListener("click",i,{capture:!0,once:!0}),setTimeout(()=>window.removeEventListener("click",i,!0),0),s(this,f,Li).call(this,!0)});p(this,Ml,e=>{r(this,Q)&&e.pointerId===r(this,Q).pointerId&&s(this,f,Li).call(this,!1)});g(this,xe,new xr({groupCount:()=>s(this,f,pt).call(this).length,slotCount:()=>r(this,Z)?r(this,Z).mode==="day"?1:s(this,f,ml).call(this,r(this,Z).ev.dur):0,navigate:(e,t)=>s(this,f,Bf).call(this,e,t),onTarget:e=>s(this,f,Ff).call(this,e),onDrop:(e,t)=>s(this,f,jf).call(this,e,t),onCancel:()=>s(this,f,eu).call(this),messages:{pickedUp:e=>this.t("pickedUp",{event:r(this,Z)?.ev.name??"",place:s(this,f,Mr).call(this,r(this,Z),e)}),over:e=>this.t("over",{place:s(this,f,Mr).call(this,r(this,Z),e)}),cancelled:e=>this.t("cancelled",{event:r(this,Z)?.ev.name??"",place:s(this,f,Mr).call(this,r(this,Z),e)})},announce:e=>r(this,Le).announce(e)}))}get locale(){return r(this,As)}set locale(e){let t=r(this,As);g(this,As,e??""),this.requestUpdate("locale",t)}get events(){return[...this.children].filter(e=>e.localName==="cm-calendar-event")}event(e){return this.events.find(t=>t.key===e)}get range(){let e=s(this,f,pt).call(this);return{view:r(this,f,Ee),start:P(e[0]),end:P(e[e.length-1])}}get heldEvent(){return r(this,Z)?.ev.el??null}get announcement(){return r(this,Le).text}announce(e){r(this,Le).announce(e)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",r(this,vl)),this.addEventListener("focusin",r(this,bl)),this.addEventListener("focusout",r(this,fl)),this.addEventListener("pointerdown",r(this,xl)),this.addEventListener("dragstart",r(this,yl)),r(this,gl).observe(this,{childList:!0}),typeof ResizeObserver<"u"&&(g(this,Ns,new ResizeObserver(()=>{cancelAnimationFrame(r(this,Is)),g(this,Is,requestAnimationFrame(()=>s(this,f,Jp).call(this)))})),r(this,Ns).observe(this)),s(this,f,Jp).call(this)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",r(this,vl)),this.removeEventListener("focusin",r(this,bl)),this.removeEventListener("focusout",r(this,fl)),this.removeEventListener("pointerdown",r(this,xl)),this.removeEventListener("dragstart",r(this,yl)),r(this,gl).disconnect(),r(this,Ns)?.disconnect(),cancelAnimationFrame(r(this,Is)),r(this,xe).cancel(!0),s(this,f,Li).call(this,!1)}willUpdate(e){e.has("view")&&(g(this,Di,!0),e.get("view")!==void 0&&(this._more="",r(this,xe).cancel(!0))),(e.has("date")||e.has("_narrow"))&&(this._more=this._more&&this.range.start<=this._more&&this._more<=this.range.end?this._more:"")}firstUpdated(){this.renderRoot.appendChild(r(this,Le).element)}scrollToHour(e){let t=this.renderRoot.querySelector(".tg"),i=t?.querySelector(".tcell");!t||!i||(t.scrollTop=i.offsetHeight*Math.max(0,Math.min(23,Math.trunc(Number(e))||0)))}updated(e){if(e.has("dayStart")&&e.get("dayStart")!==void 0&&g(this,Di,!0),s(this,f,If).call(this),r(this,We)){let l=s(this,f,Hf).call(this,r(this,We).key);l?(g(this,We,null),l.focus({preventScroll:!1})):Date.now()>r(this,We).until&&g(this,We,null)}r(this,Hs)&&(g(this,Hs,!1),(this.renderRoot.querySelector(".pop .chip")??this.renderRoot.querySelector(".pop button"))?.focus());let t=this.renderRoot.querySelector(".tg");if(t&&r(this,Di)){let l=t.querySelector(".tcell"),d=Math.max(0,Math.min(23,Math.trunc(Number(this.dayStart))||0));l&&(t.scrollTop=l.offsetHeight*d),g(this,Di,!1)}t||g(this,Di,!0),r(this,Z)&&this._target&&this.renderRoot.querySelector(".ph")?.scrollIntoView?.({block:"nearest",inline:"nearest"});let i=this.range,a=`${i.view}|${i.start}|${i.end}`;a!==r(this,ul)&&(g(this,ul,a),this.dispatchEvent(new CustomEvent("cm-range-change",{detail:i,bubbles:!0,composed:!0})))}previous(){this.date=P(s(this,f,dl).call(this,r(this,f,mt),-1))}next(){this.date=P(s(this,f,dl).call(this,r(this,f,mt),1))}goToToday(){this.date=r(this,f,ol)}pickUp(e,t){let i=typeof e=="string"?this.event(e):e;if(!i||i.locked||i.pending||this.readonly)return!1;let a=s(this,f,Cs).call(this,i);if(!a)return!1;let l=s(this,f,pt).call(this).map(P),d=t&&a.days.includes(t)&&l.includes(t)?t:a.days.find(v=>l.includes(v));if(!d)return!1;let m=s(this,f,Qp).call(this,a,d);if(!m)return!1;s(this,f,Li).call(this,!1),r(this,xe).cancel(!0),this._more="",g(this,Z,m),i.moving=!0;let u=`ev:${a.key}:${d}`;return g(this,Et,u),g(this,We,{key:u,until:Date.now()+1e3}),this.requestUpdate(),r(this,xe).pickUp(m.from),!0}cancelMove(){let e=r(this,Q);e?.started&&(s(this,f,Li).call(this,!1),r(this,Le).announce(this.t("cancelled",{event:e.ev.name,place:s(this,f,Mr).call(this,e,e.from)}))),r(this,xe).cancel()}moveEvent(e,t,i){let a=typeof e=="string"?this.event(e):e,l=a&&s(this,f,Cs).call(this,a);if(!l)return!1;let d=l.allDay?N(Qe(t).date||t):vt(t);if(!d)return!1;let m=i?l.allDay?N(Qe(i).date||i):vt(i):null;return(!m||m<d)&&(m=l.allDay?G(d,$h(l.start,l.end)):new Date(d.getTime()+l.dur*6e4)),s(this,f,ru).call(this,l,d,m,"api",!1,P(d))}revert(e){let t=typeof e=="string"?this.event(e):e;if(!t)return!1;t.pending=!1;let i=r(this,Tr).get(t);if(this.controlled||!i)return!1;r(this,Tr).delete(t);let a=this.renderRoot.activeElement?.dataset.ev===t.key;t.start=i.start,t.end=i.end;let l=s(this,f,Cs).call(this,t);return l&&a&&g(this,We,{key:`ev:${l.key}:${l.days[0]}`,until:Date.now()+1e3}),r(this,Le).announce(this.t("reverted",{event:t.name,place:l?s(this,f,Eh).call(this,l):i.start})),!0}render(){let e=s(this,f,pt).call(this),t=s(this,f,Sf).call(this,s(this,f,Cf).call(this));return c`<div class="cal ${this._narrow?"narrow":""}" role="group" aria-label=${this.label}>
2665
2677
  ${s(this,f,Gf).call(this,e)}
2666
2678
  ${r(this,f,Ee)==="month"?s(this,f,Xf).call(this,e,t):s(this,f,Zf).call(this,e,t)}
2667
2679
  <span class="vh" role="status">${this.loading?this.t("loading"):""}</span>
@@ -2905,7 +2917,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
2905
2917
  .chip.time > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2906
2918
  .chip.time .lead { display: flex; align-items: center; gap: 4px; min-width: 0; }
2907
2919
  .ph.time { position: absolute; z-index: 3; inset-inline: 0 2px; inset-block-start: calc(var(--top) * var(--h)); height: calc(var(--len) * var(--h)); align-items: flex-start; }
2908
- `];$("cm-calendar",Ds);var jk=z("reportTile",{pinned:", pinned"}),zr=class extends T{constructor(){super(...arguments);this.label="";this.icon="chart";this.href="";this.pinned=!1}render(){let e=c`
2920
+ `];$("cm-calendar",Ds);var Vk=z("reportTile",{pinned:", pinned"}),zr=class extends T{constructor(){super(...arguments);this.label="";this.icon="chart";this.href="";this.pinned=!1}render(){let e=c`
2909
2921
  <span class="icon" aria-hidden="true"><slot name="icon"><cm-icon name=${this.icon} size="40"></cm-icon></slot></span>
2910
2922
  <span class="label">${this.label}</span>
2911
2923
  ${this.pinned?c`<span class="pin" part="pin"><cm-icon name="pin" size="16"></cm-icon>
@@ -2942,7 +2954,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
2942
2954
  .title { margin-bottom: var(--cm-space-8); }
2943
2955
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--cm-space-8); }
2944
2956
  }
2945
- `];$("cm-report-tiles",Ps);var Gk=z("metric",{up:"Up {change}",down:"Down {change}",flat:"No change {change}",good:"{trend}, good",bad:"{trend}, bad",loadingValue:"Loading {label}"}),Qf=/^\s*-?\d+(\.\d+)?\s*$/,Os=class extends T{constructor(){super(...arguments);this.label="";this.value="";this.hint="";this.change="";this.trendSentiment="auto";this.href="";this.loading=!1;this._hasHint=!1;this.onHintSlot=e=>{this._hasHint=e.target.assignedNodes({flatten:!1}).some(t=>t.nodeType===1||t.textContent?.trim())}}connectedCallback(){super.connectedCallback(),this._hasHint=!!this.querySelector(':scope > [slot="hint"]')}figure(){let e=this.value;if(e===""||e===null||e===void 0)return"";let t=typeof e=="number"?e:Qf.test(String(e))?Number(e):NaN;return Number.isNaN(t)?String(e):this.formatNumber(t)}sentiment(){let e=this.trendSentiment;return e==="positive"||e==="negative"||e==="neutral"?e:this.trend==="up"?"positive":this.trend==="down"?"negative":"neutral"}renderChange(){let e=this.trend&&["up","down","flat"].includes(this.trend)?this.trend:void 0;if(!this.change&&!e)return h;if(!e)return c`<span class="change neutral" part="change">${this.change}</span>`;let t=this.sentiment(),i=this.t(e,{change:this.change}).trim(),a=t==="positive"?this.t("good",{trend:i}):t==="negative"?this.t("bad",{trend:i}):i;return c`<span class="change ${e} ${t}" part="change">
2957
+ `];$("cm-report-tiles",Ps);var Xk=z("metric",{up:"Up {change}",down:"Down {change}",flat:"No change {change}",good:"{trend}, good",bad:"{trend}, bad",loadingValue:"Loading {label}"}),Qf=/^\s*-?\d+(\.\d+)?\s*$/,Os=class extends T{constructor(){super(...arguments);this.label="";this.value="";this.hint="";this.change="";this.trendSentiment="auto";this.href="";this.loading=!1;this._hasHint=!1;this.onHintSlot=e=>{this._hasHint=e.target.assignedNodes({flatten:!1}).some(t=>t.nodeType===1||t.textContent?.trim())}}connectedCallback(){super.connectedCallback(),this._hasHint=!!this.querySelector(':scope > [slot="hint"]')}figure(){let e=this.value;if(e===""||e===null||e===void 0)return"";let t=typeof e=="number"?e:Qf.test(String(e))?Number(e):NaN;return Number.isNaN(t)?String(e):this.formatNumber(t)}sentiment(){let e=this.trendSentiment;return e==="positive"||e==="negative"||e==="neutral"?e:this.trend==="up"?"positive":this.trend==="down"?"negative":"neutral"}renderChange(){let e=this.trend&&["up","down","flat"].includes(this.trend)?this.trend:void 0;if(!this.change&&!e)return h;if(!e)return c`<span class="change neutral" part="change">${this.change}</span>`;let t=this.sentiment(),i=this.t(e,{change:this.change}).trim(),a=t==="positive"?this.t("good",{trend:i}):t==="negative"?this.t("bad",{trend:i}):i;return c`<span class="change ${e} ${t}" part="change">
2946
2958
  <cm-icon name=${e==="flat"?"arrow-left":"arrow-up-right"} size="16"></cm-icon><span aria-hidden="true">${this.change}</span><span class="sr">${a}</span>
2947
2959
  </span>`}render(){let e=this._hasHint||!!this.hint,t=this.loading?c`<cm-skeleton variant="block"></cm-skeleton>`:this.figure(),i=this.renderChange(),a=i!==h||e,l=c`
2948
2960
  <span class="label" id="label" part="label">${this.label}</span>
@@ -2987,7 +2999,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
2987
2999
  .value { font-size: var(--cm-type-heading-lg-resp-size); }
2988
3000
  }
2989
3001
  @media (forced-colors: active) { .change { color: CanvasText; } }
2990
- `];$("cm-metric",Os);var qs=class extends S{constructor(){super(...arguments);this.label="";this.icon="";this.href="";this.value="";this.current=!1;this.badge="";this.expanded=!1;this.primary=!1}render(){return null}toItem(){return ev(this)}};qs.properties={label:{reflect:!0},icon:{reflect:!0},href:{reflect:!0},value:{reflect:!0},current:{type:Boolean,reflect:!0},badge:{reflect:!0},expanded:{type:Boolean,reflect:!0},primary:{type:Boolean,reflect:!0}},qs.styles=x`:host { display: none !important; }`;$("cm-nav-item",qs);function ev(o){let n=i=>o.getAttribute(i),e={label:n("label")||""};n("icon")&&(e.icon=n("icon")),n("href")&&(e.href=n("href")),n("value")&&(e.value=n("value")),o.hasAttribute("current")&&(e.current=!0),n("badge")&&(e.badge=n("badge")),o.hasAttribute("expanded")&&(e.expanded=!0),o.hasAttribute("primary")&&(e.primary=!0);let t=Yt(o);return t.length&&(e.items=t),e}var Yt=o=>[...o.children].filter(n=>n.localName==="cm-nav-item").map(ev),lu=o=>o.value||o.href||o.label,Ch=o=>!!o.current||!!o.items?.some(Ch),Ai=(o,n)=>{let e=new MutationObserver(n);return e.observe(o,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["label","icon","href","value","current","badge","expanded","primary"]}),e},Ri=(o,n)=>o.dispatchEvent(new CustomEvent("cm-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:{item:n,value:lu(n),href:n.href??""}}));var rE=z("sideNavigation",{label:"Main",collapse:"Collapse menu",expand:"Expand menu"}),Tl,zl,Dh,j,cu,Sh,du,tv,iv,hu,mu,rv,pu,uu,Lh,gu,av,Bs=class extends T{constructor(){super(...arguments);p(this,j);this.items=[];this.collapsed=!1;this.collapsible=!1;this._slotted=[];this._open=new Set;p(this,Tl,new Set);p(this,zl);p(this,Dh,A("cm-sidenav"))}connectedCallback(){super.connectedCallback(),s(this,j,cu).call(this),g(this,zl,Ai(this,()=>s(this,j,cu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,zl)?.disconnect()}get navItems(){return this.items.length?this.items:this._slotted}willUpdate(){this.navItems.forEach((e,t)=>{let i=s(this,j,Sh).call(this,e,t);r(this,Tl).has(i)||!e.items?.length||(r(this,Tl).add(i),(e.expanded||Ch(e))&&this._open.add(i))})}toggle(e,t){let i=this.navItems[e];if(!i?.items?.length)return;let a=s(this,j,Sh).call(this,i,e),l=t??!this._open.has(a);if(l===this._open.has(a))return;let d=new Set(this._open);l?d.add(a):d.delete(a),this._open=d,this.dispatchEvent(new CustomEvent("cm-expand",{bubbles:!0,composed:!0,detail:{item:i,expanded:l}}))}render(){let e=this.collapsed;return c`
3002
+ `];$("cm-metric",Os);var qs=class extends S{constructor(){super(...arguments);this.label="";this.icon="";this.href="";this.value="";this.current=!1;this.badge="";this.expanded=!1;this.primary=!1}render(){return null}toItem(){return ev(this)}};qs.properties={label:{reflect:!0},icon:{reflect:!0},href:{reflect:!0},value:{reflect:!0},current:{type:Boolean,reflect:!0},badge:{reflect:!0},expanded:{type:Boolean,reflect:!0},primary:{type:Boolean,reflect:!0}},qs.styles=x`:host { display: none !important; }`;$("cm-nav-item",qs);function ev(o){let n=i=>o.getAttribute(i),e={label:n("label")||""};n("icon")&&(e.icon=n("icon")),n("href")&&(e.href=n("href")),n("value")&&(e.value=n("value")),o.hasAttribute("current")&&(e.current=!0),n("badge")&&(e.badge=n("badge")),o.hasAttribute("expanded")&&(e.expanded=!0),o.hasAttribute("primary")&&(e.primary=!0);let t=Yt(o);return t.length&&(e.items=t),e}var Yt=o=>[...o.children].filter(n=>n.localName==="cm-nav-item").map(ev),lu=o=>o.value||o.href||o.label,Ch=o=>!!o.current||!!o.items?.some(Ch),Ai=(o,n)=>{let e=new MutationObserver(n);return e.observe(o,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["label","icon","href","value","current","badge","expanded","primary"]}),e},Ri=(o,n)=>o.dispatchEvent(new CustomEvent("cm-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:{item:n,value:lu(n),href:n.href??""}}));var sE=z("sideNavigation",{label:"Main",collapse:"Collapse menu",expand:"Expand menu"}),Tl,zl,Dh,j,cu,Sh,du,tv,iv,hu,mu,rv,pu,uu,Lh,gu,av,Bs=class extends T{constructor(){super(...arguments);p(this,j);this.items=[];this.collapsed=!1;this.collapsible=!1;this._slotted=[];this._open=new Set;p(this,Tl,new Set);p(this,zl);p(this,Dh,A("cm-sidenav"))}connectedCallback(){super.connectedCallback(),s(this,j,cu).call(this),g(this,zl,Ai(this,()=>s(this,j,cu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,zl)?.disconnect()}get navItems(){return this.items.length?this.items:this._slotted}willUpdate(){this.navItems.forEach((e,t)=>{let i=s(this,j,Sh).call(this,e,t);r(this,Tl).has(i)||!e.items?.length||(r(this,Tl).add(i),(e.expanded||Ch(e))&&this._open.add(i))})}toggle(e,t){let i=this.navItems[e];if(!i?.items?.length)return;let a=s(this,j,Sh).call(this,i,e),l=t??!this._open.has(a);if(l===this._open.has(a))return;let d=new Set(this._open);l?d.add(a):d.delete(a),this._open=d,this.dispatchEvent(new CustomEvent("cm-expand",{bubbles:!0,composed:!0,detail:{item:i,expanded:l}}))}render(){let e=this.collapsed;return c`
2991
3003
  <nav part="nav" aria-label=${this.label||this.t("label")} @keydown=${s(this,j,iv)}>
2992
3004
  <slot name="header"></slot>
2993
3005
  <ul part="list">
@@ -3067,7 +3079,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
3067
3079
  .icon { background: var(--cm-bg-input-filled); color: var(--cm-icon-selected); }
3068
3080
  img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
3069
3081
  @media (forced-colors: active) { .avatar { border: 1px solid CanvasText; } }
3070
- `];$("cm-avatar",Fs);var pE=z("headerBar",{label:"Admin",store:"Store: {store}. Switch store",balance:"Wallet balance {balance}",account:"Account: {name}",search:"Search"}),Vs,Xt,Ks,Me,_l,bu,js,Us=class extends T{constructor(){super();p(this,Me);this.store="";this.balance="";this.userName="";this.avatarSrc="";this._narrow=!1;this._hasSearch=!1;this._searchOpen=!1;p(this,Vs);p(this,Xt,!1);p(this,Ks,null);this.addEventListener("cm-select",e=>{let t=s(this,Me,_l).call(this);this._searchOpen&&t&&e.composedPath().includes(t)&&this.closeSearch()})}get searchOpen(){return this._searchOpen}openSearch(){if(!this._narrow){s(this,Me,_l).call(this)?.focus();return}this._searchOpen||(g(this,Ks,_m()),this._searchOpen=!0)}closeSearch(){this._searchOpen&&(this._searchOpen=!1)}connectedCallback(){super.connectedCallback(),g(this,Vs,new ResizeObserver(([e])=>{let t=e.contentRect.width<=900;t!==this._narrow&&(this._narrow=t,t||this.closeSearch())})),r(this,Vs).observe(this)}disconnectedCallback(){super.disconnectedCallback(),r(this,Vs)?.disconnect(),r(this,Xt)&&(go(),g(this,Xt,!1))}updated(e){if(!e.has("_searchOpen"))return;let t=this.renderRoot.querySelector("dialog.layer");if(this._searchOpen&&t&&!t.open)t.showModal(),r(this,Xt)||(zm(),g(this,Xt,!0)),s(this,Me,_l).call(this)?.focus(),s(this,Me,js).call(this,"cm-search-toggle",{open:!0});else if(!this._searchOpen&&e.get("_searchOpen")){t?.open&&t.close(),r(this,Xt)&&(go(),g(this,Xt,!1));let i=r(this,Ks)??this.renderRoot.querySelector(".search-btn");g(this,Ks,null),i?.isConnected&&i.focus(),s(this,Me,js).call(this,"cm-search-toggle",{open:!1})}}render(){return c`
3082
+ `];$("cm-avatar",Fs);var gE=z("headerBar",{label:"Admin",store:"Store: {store}. Switch store",balance:"Wallet balance {balance}",account:"Account: {name}",search:"Search"}),Vs,Xt,Ks,Me,_l,bu,js,Us=class extends T{constructor(){super();p(this,Me);this.store="";this.balance="";this.userName="";this.avatarSrc="";this._narrow=!1;this._hasSearch=!1;this._searchOpen=!1;p(this,Vs);p(this,Xt,!1);p(this,Ks,null);this.addEventListener("cm-select",e=>{let t=s(this,Me,_l).call(this);this._searchOpen&&t&&e.composedPath().includes(t)&&this.closeSearch()})}get searchOpen(){return this._searchOpen}openSearch(){if(!this._narrow){s(this,Me,_l).call(this)?.focus();return}this._searchOpen||(g(this,Ks,_m()),this._searchOpen=!0)}closeSearch(){this._searchOpen&&(this._searchOpen=!1)}connectedCallback(){super.connectedCallback(),g(this,Vs,new ResizeObserver(([e])=>{let t=e.contentRect.width<=900;t!==this._narrow&&(this._narrow=t,t||this.closeSearch())})),r(this,Vs).observe(this)}disconnectedCallback(){super.disconnectedCallback(),r(this,Vs)?.disconnect(),r(this,Xt)&&(go(),g(this,Xt,!1))}updated(e){if(!e.has("_searchOpen"))return;let t=this.renderRoot.querySelector("dialog.layer");if(this._searchOpen&&t&&!t.open)t.showModal(),r(this,Xt)||(zm(),g(this,Xt,!0)),s(this,Me,_l).call(this)?.focus(),s(this,Me,js).call(this,"cm-search-toggle",{open:!0});else if(!this._searchOpen&&e.get("_searchOpen")){t?.open&&t.close(),r(this,Xt)&&(go(),g(this,Xt,!1));let i=r(this,Ks)??this.renderRoot.querySelector(".search-btn");g(this,Ks,null),i?.isConnected&&i.focus(),s(this,Me,js).call(this,"cm-search-toggle",{open:!1})}}render(){return c`
3071
3083
  <header part="bar" role="banner" aria-label=${this.label||h}>
3072
3084
  <div class="logo"><slot name="logo"></slot></div>
3073
3085
  ${this.store?c`<button type="button" class="store" part="store" aria-haspopup="true" aria-label=${this.t("store",{store:this.store})}
@@ -3171,7 +3183,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
3171
3183
  @media (pointer: coarse) {
3172
3184
  @container (max-width: 640px) { .user { min-width: var(--_touch); } }
3173
3185
  }
3174
- `];$("cm-header-bar",Us);var xE=z("bottomNavigation",{label:"Main"}),Cl,_r,fu,nv,Ws=class extends T{constructor(){super(...arguments);p(this,_r);this.items=[];this.fixed=!1;this._slotted=[];p(this,Cl)}connectedCallback(){super.connectedCallback(),s(this,_r,fu).call(this),g(this,Cl,Ai(this,()=>s(this,_r,fu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,Cl)?.disconnect()}get navItems(){return this.items.length?this.items:this._slotted}render(){return c`<nav part="nav" aria-label=${this.label||this.t("label")}>
3186
+ `];$("cm-header-bar",Us);var $E=z("bottomNavigation",{label:"Main"}),Cl,_r,fu,nv,Ws=class extends T{constructor(){super(...arguments);p(this,_r);this.items=[];this.fixed=!1;this._slotted=[];p(this,Cl)}connectedCallback(){super.connectedCallback(),s(this,_r,fu).call(this),g(this,Cl,Ai(this,()=>s(this,_r,fu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,Cl)?.disconnect()}get navItems(){return this.items.length?this.items:this._slotted}render(){return c`<nav part="nav" aria-label=${this.label||this.t("label")}>
3175
3187
  <ul>${this.navItems.slice(0,5).map(e=>c`<li>${s(this,_r,nv).call(this,e)}</li>`)}</ul>
3176
3188
  <slot hidden></slot>
3177
3189
  </nav>`}};Cl=new WeakMap,_r=new WeakSet,fu=function(){this._slotted=Yt(this)},nv=function(e){let t=`item ${e.primary?"primary":""}`,i=c`<span class="icon">${e.icon?c`<cm-icon name=${e.icon} size=${e.primary?16:20}></cm-icon>`:h}</span><span class="label">${e.label}</span>`,a=l=>{Ri(this,e)||l.preventDefault()};return e.href?c`<a class=${t} part="item" href=${e.href} aria-current=${e.current?"page":h} @click=${a}>${i}</a>`:c`<button type="button" class=${t} part="item" aria-current=${e.current?"page":h} @click=${a}>${i}</button>`},Ws.properties={items:{type:Array},label:{string:"label"},fixed:{type:Boolean,reflect:!0},_slotted:{state:!0}},Ws.styles=[k,x`
@@ -3196,7 +3208,7 @@ cm-data-table:has(> table) { container-type: inline-size; }
3196
3208
  .icon { display: grid; place-items: center; width: var(--cm-icon-size-lg); height: var(--cm-icon-size-lg); }
3197
3209
  .primary .icon { color: var(--cm-action-primary-text); background: var(--cm-action-primary); border-radius: var(--cm-radius-xs); }
3198
3210
  .label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3199
- `];$("cm-bottom-navigation",Ws);var zE=z("mobileMenu",{label:"Menu",profile:"Profile",store:"Logged in to store"}),Sl,Cr,De,vu,ov,yu,xu,lv,Gs=class extends T{constructor(){super(...arguments);p(this,De);this.items=[];this.store="";this.userName="";this.userEmail="";this.avatarSrc="";this._slotted=[];this._page=null;p(this,Sl);p(this,Cr,A("cm-mmenu"))}connectedCallback(){super.connectedCallback(),s(this,De,vu).call(this),g(this,Sl,Ai(this,()=>s(this,De,vu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,Sl)?.disconnect()}get sections(){return this.items.length?this.items:this._slotted}back(){if(!this._page)return;let[e,t]=this._page;this._page=null,this.updateComplete.then(()=>this.renderRoot.querySelector(`[data-row="${e}-${t}"]`)?.focus())}render(){let e=this.sections,t=this._page?e[this._page[0]]?.items?.[this._page[1]]:void 0;return t?c`<nav part="nav" class="sub" aria-label=${this.label||this.t("label")} id="${r(this,Cr)}-sub"
3211
+ `];$("cm-bottom-navigation",Ws);var CE=z("mobileMenu",{label:"Menu",profile:"Profile",store:"Logged in to store"}),Sl,Cr,De,vu,ov,yu,xu,lv,Gs=class extends T{constructor(){super(...arguments);p(this,De);this.items=[];this.store="";this.userName="";this.userEmail="";this.avatarSrc="";this._slotted=[];this._page=null;p(this,Sl);p(this,Cr,A("cm-mmenu"))}connectedCallback(){super.connectedCallback(),s(this,De,vu).call(this),g(this,Sl,Ai(this,()=>s(this,De,vu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,Sl)?.disconnect()}get sections(){return this.items.length?this.items:this._slotted}back(){if(!this._page)return;let[e,t]=this._page;this._page=null,this.updateComplete.then(()=>this.renderRoot.querySelector(`[data-row="${e}-${t}"]`)?.focus())}render(){let e=this.sections,t=this._page?e[this._page[0]]?.items?.[this._page[1]]:void 0;return t?c`<nav part="nav" class="sub" aria-label=${this.label||this.t("label")} id="${r(this,Cr)}-sub"
3200
3212
  @keydown=${i=>{i.key==="Escape"&&(i.preventDefault(),this.back())}}>
3201
3213
  <button type="button" class="back" part="back" @click=${()=>this.back()}><cm-icon name="arrow-left" size="16"></cm-icon>
3202
3214
  ${t.label}</button>
@@ -3258,7 +3270,7 @@ ${t.label}</button>
3258
3270
  }
3259
3271
  .back:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
3260
3272
  .sub .row { font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); }
3261
- `];$("cm-mobile-menu",Gs);var AE=z("flashOfferBar",{label:"Offer",dismiss:"Dismiss offer"}),Ah,cv,Ys=class extends T{constructor(){super(...arguments);p(this,Ah);this.icon="send";this.dismissible=!1}render(){return c`<div class="bar" part="bar" role="region" aria-label=${this.label||this.t("label")}>
3273
+ `];$("cm-mobile-menu",Gs);var HE=z("flashOfferBar",{label:"Offer",dismiss:"Dismiss offer"}),Ah,cv,Ys=class extends T{constructor(){super(...arguments);p(this,Ah);this.icon="send";this.dismissible=!1}render(){return c`<div class="bar" part="bar" role="region" aria-label=${this.label||this.t("label")}>
3262
3274
  <span class="icon" aria-hidden="true"><slot name="icon">${this.icon?c`<cm-icon name=${this.icon} size="20"></cm-icon>`:h}</slot></span>
3263
3275
  <span class="text"><slot></slot></span>
3264
3276
  ${this.dismissible?c`<button type="button" class="close" part="close" aria-label=${this.t("dismiss")} @click=${s(this,Ah,cv)}><cm-icon name="close" size="16"></cm-icon>
@@ -3285,7 +3297,7 @@ ${t.label}</button>
3285
3297
  @media (max-width: 640px) {
3286
3298
  .bar { min-height: 44px; justify-content: flex-start; text-align: start; }
3287
3299
  }
3288
- `];$("cm-flash-offer-bar",Ys);var qE=z("linkTabs",{label:"Sections"}),Ll,Dl,wu,Xs=class extends T{constructor(){super(...arguments);p(this,Dl);this.items=[];this._slotted=[];p(this,Ll)}connectedCallback(){super.connectedCallback(),s(this,Dl,wu).call(this),g(this,Ll,Ai(this,()=>s(this,Dl,wu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,Ll)?.disconnect()}get tabs(){return this.items.length?this.items:this._slotted}render(){return c`<nav part="nav" aria-label=${this.label||this.t("label")}>
3300
+ `];$("cm-flash-offer-bar",Ys);var FE=z("linkTabs",{label:"Sections"}),Ll,Dl,wu,Xs=class extends T{constructor(){super(...arguments);p(this,Dl);this.items=[];this._slotted=[];p(this,Ll)}connectedCallback(){super.connectedCallback(),s(this,Dl,wu).call(this),g(this,Ll,Ai(this,()=>s(this,Dl,wu).call(this)))}disconnectedCallback(){super.disconnectedCallback(),r(this,Ll)?.disconnect()}get tabs(){return this.items.length?this.items:this._slotted}render(){return c`<nav part="nav" aria-label=${this.label||this.t("label")}>
3289
3301
  <ul part="tabs">${this.tabs.map(e=>c`<li><a part="tab" href=${e.href||"#"} aria-current=${e.current?"page":h}
3290
3302
  @click=${t=>{Ri(this,e)||t.preventDefault()}}>${e.label}${e.badge?c`<span class="badge">(${e.badge})</span>`:h}</a></li>`)}</ul>
3291
3303
  <slot hidden></slot>
@@ -3308,7 +3320,7 @@ ${t.label}</button>
3308
3320
  .badge { font-size: var(--cm-font-size-12); color: var(--cm-text-tertiary); font-variant-numeric: tabular-nums; }
3309
3321
  @media (max-width: 640px) { ul { gap: var(--cm-space-16); } }
3310
3322
 
3311
- `];$("cm-link-tabs",Xs);var KE=z("appCard",{developer:"By {developer}",rating:"Rated {rating} out of 5",reviews:{one:"{count} Review",other:"{count} Reviews"},offer:"Offer: ",details:"View Details",detailsLabel:"View details of {name}"}),Js=class extends T{constructor(){super(...arguments);this.name="";this.developer="";this.reviewsHref="";this.pricing="";this.offer="";this.href="";this.headingLevel=3}render(){let e=Math.min(6,Math.max(2,Math.round(this.headingLevel)||3)),t=typeof this.rating=="number"&&!Number.isNaN(this.rating),i=typeof this.reviews=="number"?this.t("reviews",{count:this.reviews}):"",a=t?this.formatNumber(this.rating,{minimumFractionDigits:1,maximumFractionDigits:1}):"";return c`<article part="card" aria-labelledby="name">
3323
+ `];$("cm-link-tabs",Xs);var GE=z("appCard",{developer:"By {developer}",rating:"Rated {rating} out of 5",reviews:{one:"{count} Review",other:"{count} Reviews"},offer:"Offer: ",details:"View Details",detailsLabel:"View details of {name}"}),Js=class extends T{constructor(){super(...arguments);this.name="";this.developer="";this.reviewsHref="";this.pricing="";this.offer="";this.href="";this.headingLevel=3}render(){let e=Math.min(6,Math.max(2,Math.round(this.headingLevel)||3)),t=typeof this.rating=="number"&&!Number.isNaN(this.rating),i=typeof this.reviews=="number"?this.t("reviews",{count:this.reviews}):"",a=t?this.formatNumber(this.rating,{minimumFractionDigits:1,maximumFractionDigits:1}):"";return c`<article part="card" aria-labelledby="name">
3312
3324
  <div class="logo" part="logo"><slot name="logo"></slot></div>
3313
3325
  <div class="status"><slot name="status"></slot></div>
3314
3326
  <div class="name" id="name" role="heading" aria-level=${e}>${this.name}</div>
@@ -3389,7 +3401,7 @@ ${t.label}</button>
3389
3401
  .panel { border-radius: var(--cm-radius-lg); }
3390
3402
 
3391
3403
  }
3392
- `];$("cm-side-panel",Mt);var lM=z("filterPanel",{heading:"Search and Filter",searchLabel:"Search",searchPlaceholder:"Search anything",apply:"Search",reset:"Reset"}),en,Nh,Qs=class extends Mt{constructor(){super(...arguments);this.search=!1;this.query="";p(this,en,()=>{this.dispatchEvent(new CustomEvent("cm-filter-apply",{detail:{values:this.values,query:this.query},bubbles:!0,composed:!0,cancelable:!0}))&&this.requestClose("action")});p(this,Nh,()=>{this.reset(),this.dispatchEvent(new CustomEvent("cm-filter-reset",{bubbles:!0,composed:!0}))})}get form(){return this.querySelector("form")}get values(){let e={},t=(a,l)=>{if(l==="")return;let d=e[a];e[a]=d===void 0?l:Array.isArray(d)?[...d,l]:[d,l]},i=this.form;if(i){for(let[a,l]of new FormData(i))typeof l=="string"&&t(a,l);return e}return this.querySelectorAll("[name]").forEach(a=>{let l=a.getAttribute("name");"checked"in a&&(a.type==="checkbox"||a.type==="radio"||a.localName.match(/^cm-(checkbox|radio|toggle)$/))?a.checked&&t(l,a.value||"on"):typeof a.value=="string"&&t(l,a.value)}),e}reset(){let e=this.form;e?e.reset():this.querySelectorAll("[name]").forEach(t=>t.formResetCallback?.()),this.query=""}renderBody(){return c`${this.search?c`<cm-search class="search" part="search" .value=${this.query} label=${this.searchLabel}
3404
+ `];$("cm-side-panel",Mt);var dM=z("filterPanel",{heading:"Search and Filter",searchLabel:"Search",searchPlaceholder:"Search anything",apply:"Search",reset:"Reset"}),en,Nh,Qs=class extends Mt{constructor(){super(...arguments);this.search=!1;this.query="";p(this,en,()=>{this.dispatchEvent(new CustomEvent("cm-filter-apply",{detail:{values:this.values,query:this.query},bubbles:!0,composed:!0,cancelable:!0}))&&this.requestClose("action")});p(this,Nh,()=>{this.reset(),this.dispatchEvent(new CustomEvent("cm-filter-reset",{bubbles:!0,composed:!0}))})}get form(){return this.querySelector("form")}get values(){let e={},t=(a,l)=>{if(l==="")return;let d=e[a];e[a]=d===void 0?l:Array.isArray(d)?[...d,l]:[d,l]},i=this.form;if(i){for(let[a,l]of new FormData(i))typeof l=="string"&&t(a,l);return e}return this.querySelectorAll("[name]").forEach(a=>{let l=a.getAttribute("name");"checked"in a&&(a.type==="checkbox"||a.type==="radio"||a.localName.match(/^cm-(checkbox|radio|toggle)$/))?a.checked&&t(l,a.value||"on"):typeof a.value=="string"&&t(l,a.value)}),e}reset(){let e=this.form;e?e.reset():this.querySelectorAll("[name]").forEach(t=>t.formResetCallback?.()),this.query=""}renderBody(){return c`${this.search?c`<cm-search class="search" part="search" .value=${this.query} label=${this.searchLabel}
3393
3405
  placeholder=${this.searchPlaceholder}
3394
3406
  @input=${e=>{this.query=e.target.value}}
3395
3407
  @cm-search=${e=>{e.stopPropagation(),r(this,en).call(this)}}></cm-search>`:h}
@@ -3442,7 +3454,7 @@ ${t.label}</button>
3442
3454
  }
3443
3455
  @keyframes cm-sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
3444
3456
  .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
3445
- `];$("cm-bottom-sheet",tn);var wM=z("notificationPanel",{heading:"Notifications",more:"See more notifications",empty:"No notifications yet.",unread:"Unread: ",markAllRead:"Mark all read"}),Cy={information:"bag",attention:"alert",success:"check-circle",critical:"x-circle"},rn=class extends S{constructor(){super(...arguments);this.time="";this.tone="information";this.href="";this.unread=!1;this.value="";this.description="";this.icon=""}render(){return null}};rn.properties={time:{reflect:!0},tone:{reflect:!0},href:{reflect:!0},unread:{type:Boolean,reflect:!0},value:{reflect:!0},description:{reflect:!0},icon:{reflect:!0}},rn.styles=x`:host { display: none; }`;$("cm-notification-item",rn);var sn,Ie,ku,Eu,pv,uv,gv,an=class extends ee{constructor(){super(...arguments);p(this,Ie);this.items=[];this.moreHref="";this.markAllRead=!1;this.loading=!1;this._slotted=[];this._footer=!1;p(this,sn)}connectedCallback(){super.connectedCallback(),s(this,Ie,ku).call(this),g(this,sn,new MutationObserver(()=>s(this,Ie,ku).call(this))),r(this,sn).observe(this,{childList:!0,subtree:!0,attributes:!0,characterData:!0})}disconnectedCallback(){super.disconnectedCallback(),r(this,sn)?.disconnect()}get notifications(){return this.items.length?this.items:this._slotted}render(){let e=this.notifications,t=this.markAllRead&&!this.loading&&e.some(a=>a.unread)?c`<button type="button" class="mark" part="mark-all-read" @click=${s(this,Ie,uv)}>${this.markAllLabel}</button>`:h,i=this.loading?c`<ul class="loading" part="list" aria-hidden="true">${[0,1,2].map(()=>c`<li>
3457
+ `];$("cm-bottom-sheet",tn);var kM=z("notificationPanel",{heading:"Notifications",more:"See more notifications",empty:"No notifications yet.",unread:"Unread: ",markAllRead:"Mark all read"}),Cy={information:"bag",attention:"alert",success:"check-circle",critical:"x-circle"},rn=class extends S{constructor(){super(...arguments);this.time="";this.tone="information";this.href="";this.unread=!1;this.value="";this.description="";this.icon=""}render(){return null}};rn.properties={time:{reflect:!0},tone:{reflect:!0},href:{reflect:!0},unread:{type:Boolean,reflect:!0},value:{reflect:!0},description:{reflect:!0},icon:{reflect:!0}},rn.styles=x`:host { display: none; }`;$("cm-notification-item",rn);var sn,Ie,ku,Eu,pv,uv,gv,an=class extends ee{constructor(){super(...arguments);p(this,Ie);this.items=[];this.moreHref="";this.markAllRead=!1;this.loading=!1;this._slotted=[];this._footer=!1;p(this,sn)}connectedCallback(){super.connectedCallback(),s(this,Ie,ku).call(this),g(this,sn,new MutationObserver(()=>s(this,Ie,ku).call(this))),r(this,sn).observe(this,{childList:!0,subtree:!0,attributes:!0,characterData:!0})}disconnectedCallback(){super.disconnectedCallback(),r(this,sn)?.disconnect()}get notifications(){return this.items.length?this.items:this._slotted}render(){let e=this.notifications,t=this.markAllRead&&!this.loading&&e.some(a=>a.unread)?c`<button type="button" class="mark" part="mark-all-read" @click=${s(this,Ie,uv)}>${this.markAllLabel}</button>`:h,i=this.loading?c`<ul class="loading" part="list" aria-hidden="true">${[0,1,2].map(()=>c`<li>
3446
3458
  <cm-skeleton class="sk-ic" variant="block" style="--cm-skeleton-height:22px"></cm-skeleton><cm-skeleton class="sk-text"></cm-skeleton></li>`)}</ul>`:e.length?c`<ul class="list" part="list">${e.map(a=>c`<li>${s(this,Ie,pv).call(this,a)}</li>`)}</ul>`:c`<p class="empty">${this.emptyText}</p>`;return this.renderDialog(c`<div class="panel" part="panel" tabindex="-1">
3447
3459
  ${this.renderHeader(t)}
3448
3460
  ${i}
@@ -3502,7 +3514,7 @@ ${t.label}</button>
3502
3514
  @media (max-width: 599px) {
3503
3515
  dialog { inset: var(--cm-notification-panel-top, 56px) 8px auto 8px; width: auto; }
3504
3516
  }
3505
- `];$("cm-notification-panel",an);var zM=z("toastRegion",{label:"Notifications"}),_M=z("toast",{undo:"Undo",shortcut:"Press F6 to reach it."}),bv=()=>{let o=document.activeElement;for(;o?.shadowRoot?.activeElement;)o=o.shadowRoot.activeElement;return o&&o!==document.body?o:null},Mu=(o,n)=>{for(let e=n;e;e=e.parentNode??e.host??null)if(e===o)return!0;return!1},Sy=2e3,fv=1e4,vv=150,Rl,ut,Jt,Hl,cn,dn,Lr,Hi,Dr,pe,Ih,yv,nn,Tu,Nl,Il,Pl,Ol,xv,on=class extends T{constructor(){super(...arguments);p(this,pe);this.message="";this.tone="default";this.actionLabel="";this.open=!0;this._inRegion=!1;this._primed=!1;p(this,Rl);p(this,ut);p(this,Jt,0);p(this,Hl,0);p(this,cn,!1);p(this,dn,!1);p(this,Lr);p(this,Hi);p(this,Dr);p(this,Nl,()=>{g(this,cn,!0),s(this,pe,Tu).call(this)});p(this,Il,()=>{g(this,cn,!1),s(this,pe,nn).call(this)});p(this,Pl,()=>{g(this,dn,!0),s(this,pe,Tu).call(this)});p(this,Ol,e=>{e.relatedTarget instanceof Node&&this.contains(e.relatedTarget)||e.relatedTarget instanceof Node&&this.shadowRoot?.contains(e.relatedTarget)||(g(this,dn,!1),s(this,pe,nn).call(this))})}get closed(){if(!r(this,Lr)){if(!this.open&&r(this,Dr))return Promise.resolve(r(this,Dr));g(this,Lr,new Promise(e=>{g(this,Hi,e)}))}return r(this,Lr)}get effectiveDuration(){let e=this.duration??(this.actionLabel?fv:5e3);return Math.min(fv,Math.max(Sy,Number(e)||5e3))}connectedCallback(){super.connectedCallback(),this._inRegion=!!this.parentElement?.closest("cm-toast-region"),!this._inRegion&&!this._primed&&g(this,Rl,setTimeout(()=>{this._primed=!0},vv)),this.addEventListener("pointerenter",r(this,Nl)),this.addEventListener("pointerleave",r(this,Il)),this.addEventListener("focusin",r(this,Pl)),this.addEventListener("focusout",r(this,Ol))}disconnectedCallback(){super.disconnectedCallback(),this.open&&r(this,Hi)&&queueMicrotask(()=>{!this.isConnected&&this.open&&s(this,pe,Ih).call(this,"removed")}),clearTimeout(r(this,ut)),clearTimeout(r(this,Rl)),this.removeEventListener("pointerenter",r(this,Nl)),this.removeEventListener("pointerleave",r(this,Il)),this.removeEventListener("focusin",r(this,Pl)),this.removeEventListener("focusout",r(this,Ol))}updated(e){e.has("open")&&e.get("open")!==void 0&&(this.open?g(this,Dr,void 0):r(this,Hi)&&s(this,pe,Ih).call(this,"close")),(e.has("open")||e.has("duration")||e.has("actionLabel")||e.has("_primed")||e.has("_inRegion"))&&(clearTimeout(r(this,ut)),this.open&&(this._inRegion||this._primed)&&(g(this,Jt,this.effectiveDuration),s(this,pe,nn).call(this)))}show(){this.open?(g(this,Jt,this.effectiveDuration),s(this,pe,nn).call(this)):this.open=!0}dismiss(e="close"){let t=new CustomEvent("cm-dismiss",{bubbles:!0,composed:!0,cancelable:!0,detail:{reason:e}});return this.dispatchEvent(t)?(clearTimeout(r(this,ut)),this.open=!1,s(this,pe,Ih).call(this,e),!0):(e==="timeout"&&(g(this,Jt,this.effectiveDuration),s(this,pe,nn).call(this)),!1)}render(){let e=c`<div class="toast" part="toast">
3517
+ `];$("cm-notification-panel",an);var CM=z("toastRegion",{label:"Notifications"}),SM=z("toast",{undo:"Undo",shortcut:"Press F6 to reach it."}),bv=()=>{let o=document.activeElement;for(;o?.shadowRoot?.activeElement;)o=o.shadowRoot.activeElement;return o&&o!==document.body?o:null},Mu=(o,n)=>{for(let e=n;e;e=e.parentNode??e.host??null)if(e===o)return!0;return!1},Sy=2e3,fv=1e4,vv=150,Rl,ut,Jt,Hl,cn,dn,Lr,Hi,Dr,pe,Ih,yv,nn,Tu,Nl,Il,Pl,Ol,xv,on=class extends T{constructor(){super(...arguments);p(this,pe);this.message="";this.tone="default";this.actionLabel="";this.open=!0;this._inRegion=!1;this._primed=!1;p(this,Rl);p(this,ut);p(this,Jt,0);p(this,Hl,0);p(this,cn,!1);p(this,dn,!1);p(this,Lr);p(this,Hi);p(this,Dr);p(this,Nl,()=>{g(this,cn,!0),s(this,pe,Tu).call(this)});p(this,Il,()=>{g(this,cn,!1),s(this,pe,nn).call(this)});p(this,Pl,()=>{g(this,dn,!0),s(this,pe,Tu).call(this)});p(this,Ol,e=>{e.relatedTarget instanceof Node&&this.contains(e.relatedTarget)||e.relatedTarget instanceof Node&&this.shadowRoot?.contains(e.relatedTarget)||(g(this,dn,!1),s(this,pe,nn).call(this))})}get closed(){if(!r(this,Lr)){if(!this.open&&r(this,Dr))return Promise.resolve(r(this,Dr));g(this,Lr,new Promise(e=>{g(this,Hi,e)}))}return r(this,Lr)}get effectiveDuration(){let e=this.duration??(this.actionLabel?fv:5e3);return Math.min(fv,Math.max(Sy,Number(e)||5e3))}connectedCallback(){super.connectedCallback(),this._inRegion=!!this.parentElement?.closest("cm-toast-region"),!this._inRegion&&!this._primed&&g(this,Rl,setTimeout(()=>{this._primed=!0},vv)),this.addEventListener("pointerenter",r(this,Nl)),this.addEventListener("pointerleave",r(this,Il)),this.addEventListener("focusin",r(this,Pl)),this.addEventListener("focusout",r(this,Ol))}disconnectedCallback(){super.disconnectedCallback(),this.open&&r(this,Hi)&&queueMicrotask(()=>{!this.isConnected&&this.open&&s(this,pe,Ih).call(this,"removed")}),clearTimeout(r(this,ut)),clearTimeout(r(this,Rl)),this.removeEventListener("pointerenter",r(this,Nl)),this.removeEventListener("pointerleave",r(this,Il)),this.removeEventListener("focusin",r(this,Pl)),this.removeEventListener("focusout",r(this,Ol))}updated(e){e.has("open")&&e.get("open")!==void 0&&(this.open?g(this,Dr,void 0):r(this,Hi)&&s(this,pe,Ih).call(this,"close")),(e.has("open")||e.has("duration")||e.has("actionLabel")||e.has("_primed")||e.has("_inRegion"))&&(clearTimeout(r(this,ut)),this.open&&(this._inRegion||this._primed)&&(g(this,Jt,this.effectiveDuration),s(this,pe,nn).call(this)))}show(){this.open?(g(this,Jt,this.effectiveDuration),s(this,pe,nn).call(this)):this.open=!0}dismiss(e="close"){let t=new CustomEvent("cm-dismiss",{bubbles:!0,composed:!0,cancelable:!0,detail:{reason:e}});return this.dispatchEvent(t)?(clearTimeout(r(this,ut)),this.open=!1,s(this,pe,Ih).call(this,e),!0):(e==="timeout"&&(g(this,Jt,this.effectiveDuration),s(this,pe,nn).call(this)),!1)}render(){let e=c`<div class="toast" part="toast">
3506
3518
  ${this.tone==="critical"?c`<cm-icon class="icon" name="alert" size="20"></cm-icon>`:h}
3507
3519
  <div class="message" part="message">${this.message}<slot></slot></div>
3508
3520
  ${this.actionLabel?c`<button class="action" part="action" aria-keyshortcuts=${this._inRegion?"F6":h} @click=${s(this,pe,xv)}>${this.actionLabel}</button>`:h}
@@ -3548,7 +3560,7 @@ ${t.label}</button>
3548
3560
  display: flex; flex-direction: column; align-items: center; gap: var(--cm-space-8);
3549
3561
  padding-inline: var(--cm-space-12); pointer-events: none;
3550
3562
  }
3551
- `];$("cm-toast-region",ln);function wv(o,n={}){let e=n.root??document.body,t=e.querySelector(":scope > cm-toast-region"),i=!t;t||(t=document.createElement("cm-toast-region"),e.append(t));let a=document.createElement("cm-toast");if(a.message=String(o),n.tone&&(a.tone=n.tone),n.duration!==void 0&&(a.duration=n.duration),n.action){a.actionLabel=n.action.label;let l=n.action.onAction;a.addEventListener("cm-action",()=>l())}if(i){let l=t;return setTimeout(()=>l.add(a),vv),a}return t.add(a)}async function Ly(o,n,e){await o();let{message:t,undoLabel:i,...a}=e,l=i??mc("toast","undo",void 0,a.root??document.body),d=await wv(t,{...a,action:{label:l,onAction:()=>{}}}).closed;return d==="action"&&await n(),d}var RM=z("progressBar",{inProgress:"In progress"}),Oh,mn=class extends T{constructor(){super(...arguments);this.value=null;this.label="";this.labelHidden=!1;this.showValue=!1;this.size="medium";p(this,Oh,A("cm-progress"))}get clampedValue(){let e=this.value;return e==null||Number.isNaN(Number(e))?null:Math.min(100,Math.max(0,Number(e)))}render(){let e=this.clampedValue,t=`${r(this,Oh)}-label`;return c`
3563
+ `];$("cm-toast-region",ln);function wv(o,n={}){let e=n.root??document.body,t=e.querySelector(":scope > cm-toast-region"),i=!t;t||(t=document.createElement("cm-toast-region"),e.append(t));let a=document.createElement("cm-toast");if(a.message=String(o),n.tone&&(a.tone=n.tone),n.duration!==void 0&&(a.duration=n.duration),n.action){a.actionLabel=n.action.label;let l=n.action.onAction;a.addEventListener("cm-action",()=>l())}if(i){let l=t;return setTimeout(()=>l.add(a),vv),a}return t.add(a)}async function Ly(o,n,e){await o();let{message:t,undoLabel:i,...a}=e,l=i??mc("toast","undo",void 0,a.root??document.body),d=await wv(t,{...a,action:{label:l,onAction:()=>{}}}).closed;return d==="action"&&await n(),d}var NM=z("progressBar",{inProgress:"In progress"}),Oh,mn=class extends T{constructor(){super(...arguments);this.value=null;this.label="";this.labelHidden=!1;this.showValue=!1;this.size="medium";p(this,Oh,A("cm-progress"))}get clampedValue(){let e=this.value;return e==null||Number.isNaN(Number(e))?null:Math.min(100,Math.max(0,Number(e)))}render(){let e=this.clampedValue,t=`${r(this,Oh)}-label`;return c`
3552
3564
  <div class="head ${this.labelHidden?"vh":""}">
3553
3565
  <span id=${t} part="label">${this.label}</span>
3554
3566
  ${this.showValue&&e!==null?c`<span class="value" aria-hidden="true">${this.formatNumber(Math.round(e)/100,{style:"percent"})}</span>`:h}
@@ -3796,7 +3808,7 @@ ${t.label}</button>
3796
3808
  border-radius: var(--cm-radius-sm); color: inherit; cursor: pointer;
3797
3809
  }
3798
3810
  .close:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
3799
- `];$("cm-banner",Mn);var z2=z("thumbnail",{noImage:"{alt} (no image)"}),zn=class extends T{constructor(){super(...arguments);this.src="";this.alt="";this.size="medium";this.loading="eager";this._failed=!1}willUpdate(e){e.has("src")&&(this._failed=!1)}render(){if(this.src&&!this._failed)return c`<span class="box" part="thumbnail"><img src=${this.src} alt=${this.alt} loading=${this.loading}
3811
+ `];$("cm-banner",Mn);var C2=z("thumbnail",{noImage:"{alt} (no image)"}),zn=class extends T{constructor(){super(...arguments);this.src="";this.alt="";this.size="medium";this.loading="eager";this._failed=!1}willUpdate(e){e.has("src")&&(this._failed=!1)}render(){if(this.src&&!this._failed)return c`<span class="box" part="thumbnail"><img src=${this.src} alt=${this.alt} loading=${this.loading}
3800
3812
  @error=${()=>{this._failed=!0}}></span>`;let e=this.size==="small"?18:this.size==="large"?32:24;return c`<span class="box" part="thumbnail" role=${this.alt?"img":h}
3801
3813
  aria-label=${this.alt?this.t("noImage",{alt:this.alt}):h} aria-hidden=${this.alt?h:"true"}>
3802
3814
  <cm-icon name="box" size=${e}></cm-icon></span>`}};zn.properties={src:{},alt:{},size:{reflect:!0},loading:{},_failed:{state:!0}},zn.styles=[k,x`
@@ -1,4 +1,15 @@
1
1
  import { LitElement } from 'lit';
2
+ import { CmLocalizedElement } from '../localize.js';
3
+ import './icon.js';
4
+ declare const strings: {
5
+ /** Accessible name of an editable fact's edit button (`editable`). {label} is the fact's label. */
6
+ edit: string;
7
+ };
8
+ declare module '../localize.js' {
9
+ interface CmStrings {
10
+ infoItem: typeof strings;
11
+ }
12
+ }
2
13
  /**
3
14
  * Side card on detail pages that lists facts as label/value pairs (order details, SKU, tags).
4
15
  * Put `cm-info-item` elements inside. The Figma file calls this the "Additional Info Card".
@@ -54,21 +65,36 @@ export declare class CmInfoPanel extends LitElement {
54
65
  }
55
66
  /**
56
67
  * One fact in an info panel: a label (13px) and its value (14px): text, a link, a badge or tags.
68
+ * With `editable` (since 1.9.1) a light pencil button follows the value, centred on its first line, for editing one
69
+ * field in place on a record page; it fires `cm-edit`. Use it instead of an outlined button beside each value.
57
70
  * @element cm-info-item
58
71
  * @slot - The value.
72
+ * @fires cm-edit - When the pencil of an `editable` fact is pressed.
73
+ * @csspart edit - The pencil button.
59
74
  */
60
- export declare class CmInfoItem extends LitElement {
75
+ export declare class CmInfoItem extends CmLocalizedElement {
61
76
  static properties: {
62
77
  label: {};
63
78
  half: {
64
79
  type: BooleanConstructor;
65
80
  reflect: boolean;
66
81
  };
82
+ editable: {
83
+ type: BooleanConstructor;
84
+ reflect: boolean;
85
+ };
86
+ editLabel: {
87
+ attribute: string;
88
+ };
67
89
  };
68
90
  /** What the value is ("Ordered on", "SKU"). */
69
91
  label: string;
70
92
  /** Takes half the width, so two short facts share a line. */
71
93
  half: boolean;
94
+ /** Shows a pencil button after the value that fires `cm-edit`. Since 1.9.1. */
95
+ editable: boolean;
96
+ /** Accessible name of the pencil; default "Edit {label}". Since 1.9.1. */
97
+ editLabel: string;
72
98
  static styles: import("lit").CSSResult[];
73
99
  connectedCallback(): void;
74
100
  render(): import("lit-html").TemplateResult<1>;
@@ -79,3 +105,4 @@ declare global {
79
105
  'cm-info-item': CmInfoItem;
80
106
  }
81
107
  }
108
+ export {};
@@ -1,5 +1,11 @@
1
1
  import { LitElement, html, css, nothing } from 'lit';
2
2
  import { base, define } from '../base.js';
3
+ import { CmLocalizedElement, defineStrings } from '../localize.js';
4
+ import './icon.js';
5
+ const strings = defineStrings('infoItem', {
6
+ /** Accessible name of an editable fact's edit button (`editable`). {label} is the fact's label. */
7
+ edit: 'Edit {label}',
8
+ });
3
9
  /**
4
10
  * Side card on detail pages that lists facts as label/value pairs (order details, SKU, tags).
5
11
  * Put `cm-info-item` elements inside. The Figma file calls this the "Additional Info Card".
@@ -92,16 +98,24 @@ CmInfoPanel.styles = [
92
98
  define('cm-info-panel', CmInfoPanel);
93
99
  /**
94
100
  * One fact in an info panel: a label (13px) and its value (14px): text, a link, a badge or tags.
101
+ * With `editable` (since 1.9.1) a light pencil button follows the value, centred on its first line, for editing one
102
+ * field in place on a record page; it fires `cm-edit`. Use it instead of an outlined button beside each value.
95
103
  * @element cm-info-item
96
104
  * @slot - The value.
105
+ * @fires cm-edit - When the pencil of an `editable` fact is pressed.
106
+ * @csspart edit - The pencil button.
97
107
  */
98
- export class CmInfoItem extends LitElement {
108
+ export class CmInfoItem extends CmLocalizedElement {
99
109
  constructor() {
100
110
  super(...arguments);
101
111
  /** What the value is ("Ordered on", "SKU"). */
102
112
  this.label = '';
103
113
  /** Takes half the width, so two short facts share a line. */
104
114
  this.half = false;
115
+ /** Shows a pencil button after the value that fires `cm-edit`. Since 1.9.1. */
116
+ this.editable = false;
117
+ /** Accessible name of the pencil; default "Edit {label}". Since 1.9.1. */
118
+ this.editLabel = '';
105
119
  }
106
120
  connectedCallback() {
107
121
  super.connectedCallback();
@@ -109,12 +123,19 @@ export class CmInfoItem extends LitElement {
109
123
  this.setAttribute('role', 'listitem');
110
124
  }
111
125
  render() {
112
- return html `<div class="label" part="label">${this.label}</div><div class="value" part="value"><slot></slot></div>`;
126
+ const value = html `<div class="value" part="value"><slot></slot></div>`;
127
+ if (!this.editable)
128
+ return html `<div class="label" part="label">${this.label}</div>${value}`;
129
+ return html `<div class="label" part="label">${this.label}</div><div class="row">${value}<button class="edit" part="edit" type="button"
130
+ aria-label=${this.editLabel || this.t('edit', { label: this.label })}
131
+ @click=${() => this.dispatchEvent(new CustomEvent('cm-edit', { bubbles: true, composed: true }))}><cm-icon name="edit" size="16"></cm-icon></button></div>`;
113
132
  }
114
133
  }
115
134
  CmInfoItem.properties = {
116
135
  label: {},
117
136
  half: { type: Boolean, reflect: true },
137
+ editable: { type: Boolean, reflect: true },
138
+ editLabel: { attribute: 'edit-label' },
118
139
  };
119
140
  CmInfoItem.styles = [
120
141
  base,
@@ -127,6 +148,16 @@ CmInfoItem.styles = [
127
148
  margin-top: var(--_cm-info-value-gap, var(--cm-space-4)); font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); font-weight: 500; overflow-wrap: anywhere;
128
149
 
129
150
  }
151
+ /* Editable (1.9.1): the value and a 28px pencil on one row, the pencil centred on the value's first 20px line. */
152
+ .row { display: flex; align-items: flex-start; gap: var(--cm-space-4); margin-top: var(--_cm-info-value-gap, var(--cm-space-4)); }
153
+ .row .value { margin-top: 0; min-width: 0; }
154
+ .edit {
155
+ position: relative; flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; margin-block: -4px; padding: 0;
156
+ background: none; border: 0; border-radius: var(--cm-radius-sm); color: var(--cm-icon-default); cursor: pointer;
157
+ }
158
+ .edit:hover { background: var(--cm-bg-hover); color: var(--cm-icon-selected); }
159
+ .edit:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
160
+ @media (pointer: coarse) { .edit::after { content: ''; position: absolute; inset: -8px; } }
130
161
  `,
131
162
  ];
132
163
  define('cm-info-item', CmInfoItem);
@@ -18372,8 +18372,14 @@
18372
18372
  },
18373
18373
  {
18374
18374
  "kind": "class",
18375
- "description": "One fact in an info panel: a label (13px) and its value (14px): text, a link, a badge or tags.",
18375
+ "description": "One fact in an info panel: a label (13px) and its value (14px): text, a link, a badge or tags.\nWith `editable` (since 1.9.1) a light pencil button follows the value, centred on its first line, for editing one\nfield in place on a record page; it fires `cm-edit`. Use it instead of an outlined button beside each value.",
18376
18376
  "name": "CmInfoItem",
18377
+ "cssParts": [
18378
+ {
18379
+ "description": "The pencil button.",
18380
+ "name": "edit"
18381
+ }
18382
+ ],
18377
18383
  "slots": [
18378
18384
  {
18379
18385
  "description": "The value.",
@@ -18403,6 +18409,134 @@
18403
18409
  "description": "Takes half the width, so two short facts share a line.",
18404
18410
  "attribute": "half",
18405
18411
  "reflects": true
18412
+ },
18413
+ {
18414
+ "kind": "field",
18415
+ "name": "editable",
18416
+ "privacy": "public",
18417
+ "type": {
18418
+ "text": "boolean"
18419
+ },
18420
+ "default": "false",
18421
+ "description": "Shows a pencil button after the value that fires `cm-edit`. Since 1.9.1.",
18422
+ "attribute": "editable",
18423
+ "reflects": true
18424
+ },
18425
+ {
18426
+ "kind": "field",
18427
+ "name": "editLabel",
18428
+ "privacy": "public",
18429
+ "type": {
18430
+ "text": "string"
18431
+ },
18432
+ "default": "''",
18433
+ "description": "Accessible name of the pencil; default \"Edit {label}\". Since 1.9.1.",
18434
+ "attribute": "edit-label"
18435
+ },
18436
+ {
18437
+ "kind": "method",
18438
+ "name": "finalize",
18439
+ "static": true,
18440
+ "description": "A property declared with `string: 'key'` (e.g. `saveLabel: { attribute: 'save-label', string: 'save' }`) reads\nas that built-in string until it is set, so `el.saveLabel` is \"Save\" in English and the translation elsewhere.\nSetting it overrides the string for this element; setting `undefined` goes back to the built-in one.",
18441
+ "inheritedFrom": {
18442
+ "name": "CmLocalizedElement",
18443
+ "module": "src/localize.ts"
18444
+ }
18445
+ },
18446
+ {
18447
+ "kind": "field",
18448
+ "name": "strings",
18449
+ "privacy": "public",
18450
+ "type": {
18451
+ "text": "Record<string, Message> | null | undefined"
18452
+ },
18453
+ "description": "Replaces this component's built-in text (labels, accessible names, messages), key by key. In HTML pass JSON:\n`strings='{\"close\":\"Fermer\"}'`. Keys and English defaults are listed under \"Built-in text\" on the component's\npage; set text for every component at once with `configure()` or `setStrings()` (see Localisation).",
18454
+ "attribute": "strings",
18455
+ "inheritedFrom": {
18456
+ "name": "CmLocalizedElement",
18457
+ "module": "src/localize.ts"
18458
+ }
18459
+ },
18460
+ {
18461
+ "kind": "field",
18462
+ "name": "stringsNamespace",
18463
+ "privacy": "protected",
18464
+ "description": "The string namespace: the tag name without `cm-`, in camelCase.",
18465
+ "readonly": true,
18466
+ "inheritedFrom": {
18467
+ "name": "CmLocalizedElement",
18468
+ "module": "src/localize.ts"
18469
+ }
18470
+ },
18471
+ {
18472
+ "kind": "method",
18473
+ "name": "t",
18474
+ "privacy": "protected",
18475
+ "parameters": [
18476
+ {
18477
+ "name": "key",
18478
+ "type": {
18479
+ "text": "string"
18480
+ }
18481
+ },
18482
+ {
18483
+ "name": "vars",
18484
+ "optional": true,
18485
+ "type": {
18486
+ "text": "MessageVars"
18487
+ }
18488
+ }
18489
+ ],
18490
+ "description": "The component's text for `key`, in its language, with `{placeholders}` filled from `vars`.",
18491
+ "inheritedFrom": {
18492
+ "name": "CmLocalizedElement",
18493
+ "module": "src/localize.ts"
18494
+ }
18495
+ },
18496
+ {
18497
+ "kind": "field",
18498
+ "name": "locale",
18499
+ "privacy": "protected",
18500
+ "description": "The locale used for numbers, dates and plurals.",
18501
+ "readonly": true,
18502
+ "inheritedFrom": {
18503
+ "name": "CmLocalizedElement",
18504
+ "module": "src/localize.ts"
18505
+ }
18506
+ },
18507
+ {
18508
+ "kind": "method",
18509
+ "name": "formatNumber",
18510
+ "privacy": "protected",
18511
+ "parameters": [
18512
+ {
18513
+ "name": "n",
18514
+ "type": {
18515
+ "text": "number"
18516
+ }
18517
+ },
18518
+ {
18519
+ "name": "options",
18520
+ "optional": true,
18521
+ "type": {
18522
+ "text": "Intl.NumberFormatOptions"
18523
+ }
18524
+ }
18525
+ ],
18526
+ "description": "A number formatted for the component's locale.",
18527
+ "inheritedFrom": {
18528
+ "name": "CmLocalizedElement",
18529
+ "module": "src/localize.ts"
18530
+ }
18531
+ }
18532
+ ],
18533
+ "events": [
18534
+ {
18535
+ "name": "cm-edit",
18536
+ "type": {
18537
+ "text": "CustomEvent"
18538
+ },
18539
+ "description": "When the pencil of an `editable` fact is pressed."
18406
18540
  }
18407
18541
  ],
18408
18542
  "attributes": [
@@ -18423,11 +18557,41 @@
18423
18557
  "default": "false",
18424
18558
  "description": "Takes half the width, so two short facts share a line.",
18425
18559
  "fieldName": "half"
18560
+ },
18561
+ {
18562
+ "name": "editable",
18563
+ "type": {
18564
+ "text": "boolean"
18565
+ },
18566
+ "default": "false",
18567
+ "description": "Shows a pencil button after the value that fires `cm-edit`. Since 1.9.1.",
18568
+ "fieldName": "editable"
18569
+ },
18570
+ {
18571
+ "name": "edit-label",
18572
+ "type": {
18573
+ "text": "string"
18574
+ },
18575
+ "default": "''",
18576
+ "description": "Accessible name of the pencil; default \"Edit {label}\". Since 1.9.1.",
18577
+ "fieldName": "editLabel"
18578
+ },
18579
+ {
18580
+ "name": "strings",
18581
+ "type": {
18582
+ "text": "Record<string, Message> | null | undefined"
18583
+ },
18584
+ "description": "Replaces this component's built-in text (labels, accessible names, messages), key by key. In HTML pass JSON:\n`strings='{\"close\":\"Fermer\"}'`. Keys and English defaults are listed under \"Built-in text\" on the component's\npage; set text for every component at once with `configure()` or `setStrings()` (see Localisation).",
18585
+ "fieldName": "strings",
18586
+ "inheritedFrom": {
18587
+ "name": "CmLocalizedElement",
18588
+ "module": "src/localize.ts"
18589
+ }
18426
18590
  }
18427
18591
  ],
18428
18592
  "superclass": {
18429
- "name": "LitElement",
18430
- "package": "lit"
18593
+ "name": "CmLocalizedElement",
18594
+ "module": "/src/localize.js"
18431
18595
  },
18432
18596
  "tagName": "cm-info-item",
18433
18597
  "customElement": true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commmerce/ui",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "Commmerce UI web components: build apps that feel native to the Commmerce admin. Works in plain HTML, React, Vue and server-rendered pages.",
5
5
  "keywords": [
6
6
  "web-components",
@@ -50,8 +50,8 @@
50
50
  "test": "vitest run"
51
51
  },
52
52
  "dependencies": {
53
- "@commmerce/icons": "1.9.0",
54
- "@commmerce/tokens": "1.9.0",
53
+ "@commmerce/icons": "1.9.1",
54
+ "@commmerce/tokens": "1.9.1",
55
55
  "lit": "3.2.1"
56
56
  },
57
57
  "devDependencies": {