PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.12
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.12
1.1.12 1.1.11 1.1.10 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 All 36 releases
← All changes | assets/js/apps/users.min.js +178 -168 1.1.8 → 1.1.12 View file →
@@ -1,60 +1,60 @@
1 -var openStationApp_users=function($e){"use strict";const It="desktop-mode";function Be(){return window.wp?.i18n}function a(o,e=It){return Be()?.__(o,e)??o}function x(o,...e){const t=Be()?.sprintf;if(t)return t(o,...e);let s=0;return o.replace(/%(?:(\d+)\$)?[sd]/g,(n,i)=>{const r=i?Number.parseInt(i,10)-1:s++;return String(e[r]??"")})}function p(o,...e){return{__wpdHtml:!0,strings:o,values:e}}function Dt(o){return!!o&&o.__wpdHtml===!0}const qt="$$wpd$$",$=/\$\$wpd\$\$(\d+)\$\$/g,Ft="$$wpd-node$$",Ut=/^\$\$wpd-node\$\$(\d+)\$\$$/,jt=new Set(["style","script","textarea","title"]);function Wt(o){let e="",t=!1,s=null,n=!1,i=null,r="",l=!1;for(let d=0;d<o.length;d++){const c=o[d];e+=c;for(let h=0;h<c.length;h++){const u=c[h];if(n){c.startsWith("-->",h)&&(n=!1,h+=2);continue}if(i!==null){u==="<"&&c[h+1]==="/"&&c.slice(h+2,h+2+i.length).toLowerCase()===i&&(h+=1+i.length,i=null,t=!0,l=!1,r="");continue}if(s!==null){u===s&&(s=null);continue}if(t){u==='"'||u==="'"?(s=u,l=!1):u===">"?(t=!1,l=!1,jt.has(r)&&(i=r),r=""):l&&(/[a-zA-Z0-9-]/.test(u)?r+=u.toLowerCase():l=!1);continue}if(c.startsWith("<!--",h)){n=!0,h+=3;continue}const m=c[h+1]??"";u==="<"&&/[a-zA-Z/!]/.test(m)&&(t=!0,r="",l=/[a-zA-Z]/.test(m))}d<o.length-1&&(e+=t||n||i!==null?`${qt}${d}$$`:`<!--${Ft}${d}$$-->`)}return e}const Ge=new WeakMap;function Ke(o){const e=Ge.get(o);if(e)return e;const t=document.createElement("template");t.innerHTML=Wt(o);const s=[],n=(l,d)=>{if(l.nodeType===Node.ELEMENT_NODE){const u=l;for(const m of Array.from(u.attributes)){const f=m.name,b=m.value,y=f[0];if($.test(b))if($.lastIndex=0,y==="@"){const _=$.exec(b);$.lastIndex=0,s.push({path:d,kind:"event",name:f.slice(1),valueIndex:_?Number(_[1]):0}),u.removeAttribute(f)}else if(y==="."){const _=$.exec(b);$.lastIndex=0,s.push({path:d,kind:"prop",name:f.slice(1),valueIndex:_?Number(_[1]):0}),u.removeAttribute(f)}else if(y==="?"){const _=$.exec(b);$.lastIndex=0,s.push({path:d,kind:"bool",name:f.slice(1),valueIndex:_?Number(_[1]):0}),u.removeAttribute(f)}else{const _=[],R=[];let z=0,N;for($.lastIndex=0;(N=$.exec(b))!==null;)_.push(b.slice(z,N.index)),R.push(Number(N[1])),z=N.index+N[0].length;_.push(b.slice(z)),s.push({path:d,kind:"attr",name:f,template:_,valueIndices:R}),u.setAttribute(f,"")}}}const c=Array.from(l.childNodes);let h=0;for(let u=0;u<c.length;u++){const m=c[u],f=u+h;if(m.nodeType===Node.COMMENT_NODE){const b=Ut.exec(m.data);if(b){const y=document.createTextNode("");m.parentNode.replaceChild(y,m),s.push({path:[...d,f],kind:"node",valueIndex:Number(b[1])})}continue}if(m.nodeType===Node.TEXT_NODE){const b=m.textContent||"";if(!$.test(b)){$.lastIndex=0;continue}$.lastIndex=0;const y=m.parentNode;let _=0,R;const z=[],N=[];for($.lastIndex=0;(R=$.exec(b))!==null;){R.index>_&&z.push(document.createTextNode(b.slice(_,R.index)));const S=document.createTextNode("");z.push(S),N.push({path:[...d,f+z.length-1],kind:"node",valueIndex:Number(R[1])}),_=R.index+R[0].length}_<b.length&&z.push(document.createTextNode(b.slice(_)));for(const S of z)y.insertBefore(S,m);y.removeChild(m),h+=z.length-1,s.push(...N)}else n(m,[...d,f])}};n(t.content,[]);const r={template:t,buildParts:l=>{const d=[];for(const c of s){let h=l;for(const u of c.path)h=h.childNodes[u];c.kind==="node"?d.push({kind:"node",valueIndex:c.valueIndex,child:{anchor:h,state:null}}):c.kind==="attr"?d.push({kind:"attr",element:h,name:c.name,template:c.template,valueIndices:c.valueIndices}):c.kind==="event"?d.push({kind:"event",valueIndex:c.valueIndex,element:h,name:c.name}):c.kind==="prop"?d.push({kind:"prop",valueIndex:c.valueIndex,element:h,name:c.name}):c.kind==="bool"&&d.push({kind:"bool",valueIndex:c.valueIndex,element:h,name:c.name})}return d}};return Ge.set(o,r),r}const Ve=new WeakMap;function Ht(o,e){for(const t of o.nodes)if(t.parentNode!==e)return!1;return!0}function Ze(o,e){const t=Ve.get(e);if(t&&t.strings===o.strings&&Ht(t,e)){he(t.parts,o.values);return}const s=Ke(o.strings),n=s.template.content.cloneNode(!0),i=s.buildParts(n),r=Array.from(n.childNodes);for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(n),he(i,o.values),Ve.set(e,{strings:o.strings,parts:i,nodes:r})}function he(o,e){for(const t of o)if(t.kind==="node")me(t.child,e[t.valueIndex]);else if(t.kind==="attr"){let s=t.template[0];for(let n=0;n<t.valueIndices.length;n++)s+=Je(e[t.valueIndices[n]]),s+=t.template[n+1];s!==t.last&&(t.last=s,s===""?t.element.removeAttribute(t.name):t.element.setAttribute(t.name,s))}else if(t.kind==="event"){const s=e[t.valueIndex];s!==t.current&&(t.current&&t.element.removeEventListener(t.name,t.current),s&&t.element.addEventListener(t.name,s),t.current=s)}else if(t.kind==="prop"){const s=e[t.valueIndex];s!==t.last&&(t.last=s,t.element[t.name]=s)}else if(t.kind==="bool"){const s=!!e[t.valueIndex];s!==t.last&&(t.last=s,s?t.element.setAttribute(t.name,""):t.element.removeAttribute(t.name))}}function me(o,e){if(e==null||e===!1){o.state&&(M(o.state),o.state=null);return}if(Array.isArray(e)){Bt(o,e);return}if(Dt(e)){Xt(o,e);return}if(e instanceof Node){Ot(o,e);return}Yt(o,Je(e))}function Ot(o,e){const t=o.state;t?.shape==="node"&&t.node===e||(t&&M(t),G(o,[e]),o.state={shape:"node",node:e})}function Yt(o,e){const t=o.state;if(t?.shape==="text"){t.text!==e&&(t.node.textContent=e,t.text=e);return}t&&M(t);const s=document.createTextNode(e);G(o,[s]),o.state={shape:"text",node:s,text:e}}function Xt(o,e){const t=o.state;if(t?.shape==="template"&&t.strings===e.strings){he(t.parts,e.values);return}t&&M(t);const s=Ke(e.strings),n=s.template.content.cloneNode(!0),i=s.buildParts(n),r=Array.from(n.childNodes);G(o,[n]),he(i,e.values),o.state={shape:"template",strings:e.strings,parts:i,nodes:r}}function Bt(o,e){const t=o.state;if(t?.shape==="array"){const n=Math.min(t.entries.length,e.length);for(let i=0;i<n;i++)me(t.entries[i],e[i]);if(e.length<t.entries.length){for(let i=e.length;i<t.entries.length;i++){const r=t.entries[i];r.state&&M(r.state),r.anchor.remove()}t.entries.length=e.length}else for(let i=t.entries.length;i<e.length;i++){const r=document.createTextNode("");G(o,[r]);const l={anchor:r,state:null};me(l,e[i]),t.entries.push(l)}return}t&&M(t);const s=[];for(const n of e){const i=document.createTextNode("");G(o,[i]);const r={anchor:i,state:null};me(r,n),s.push(r)}o.state={shape:"array",entries:s}}function G(o,e){const t=o.anchor.parentNode;if(t)for(const s of e)t.insertBefore(s,o.anchor)}function M(o){if(o.shape==="text"){o.node.remove();return}if(o.shape==="template"){for(const e of o.parts)e.kind==="node"&&e.child.state&&(M(e.child.state),e.child.state=null);for(const e of o.nodes)e.parentNode&&e.parentNode.removeChild(e);return}if(o.shape==="node"){o.node.parentNode&&o.node.parentNode.removeChild(o.node);return}for(const e of o.entries)e.state&&M(e.state),e.anchor.remove()}function Je(o){return o==null||o===!1?"":String(o)}function Qe(o,e="short"){if(o===""||o===null||o===void 0)return"";const t=typeof o=="string"&&/^\d{4}-\d{2}$/.test(o)?`${o}-01T00:00:00`:o,s=t instanceof Date?t:new Date(t);if(Number.isNaN(s.getTime()))return String(o);try{switch(e){case"long":return s.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});case"month":return s.toLocaleDateString(void 0,{year:"numeric",month:"long"});case"datetime":return s.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"});case"iso":return s.toISOString();default:return s.toLocaleDateString(void 0,{month:"short",day:"numeric"})}}catch{return String(o)}}async function et(o){if(o==="")return!1;const e=globalThis.navigator?.clipboard;if(e?.writeText)try{return await e.writeText(o),!0}catch{}return Gt(o)}function Gt(o){const e=globalThis.document;if(!e?.body||typeof e.execCommand!="function")return!1;const t=e.createElement("textarea");t.value=o,t.setAttribute("readonly",""),t.setAttribute("aria-hidden","true"),t.style.position="fixed",t.style.insetInlineStart="-9999px",t.style.opacity="0",e.body.appendChild(t);const s=e.activeElement;t.select();let n=!1;try{n=e.execCommand("copy")}catch{n=!1}return t.remove(),s?.focus?.(),n}const Kt="data-os-mode";function fe(o=typeof document<"u"?document.documentElement:null){return!!o&&o.getAttribute(Kt)==="mobile"}function Vt(o){return o.phone??fe()?p`<os-select
1 +var openStationApp_users=function(ze){"use strict";const jt="desktop-mode";function tt(){return window.wp?.i18n}function l(o,e=jt){return tt()?.__(o,e)??o}function x(o,...e){const t=tt()?.sprintf;if(t)return t(o,...e);let s=0;return o.replace(/%(?:(\d+)\$)?[sd]/g,(i,n)=>{const r=n?Number.parseInt(n,10)-1:s++;return String(e[r]??"")})}function h(o,...e){return{__wpdHtml:!0,strings:o,values:e}}function Bt(o){return!!o&&o.__wpdHtml===!0}const Kt="$$wpd$$",$=/\$\$wpd\$\$(\d+)\$\$/g,Vt="$$wpd-node$$",Yt=/^\$\$wpd-node\$\$(\d+)\$\$$/,Xt=new Set(["style","script","textarea","title"]);function Gt(o){let e="",t=!1,s=null,i=!1,n=null,r="",a=!1;for(let c=0;c<o.length;c++){const d=o[c];e+=d;for(let p=0;p<d.length;p++){const u=d[p];if(i){d.startsWith("-->",p)&&(i=!1,p+=2);continue}if(n!==null){u==="<"&&d[p+1]==="/"&&d.slice(p+2,p+2+n.length).toLowerCase()===n&&(p+=1+n.length,n=null,t=!0,a=!1,r="");continue}if(s!==null){u===s&&(s=null);continue}if(t){u==='"'||u==="'"?(s=u,a=!1):u===">"?(t=!1,a=!1,Xt.has(r)&&(n=r),r=""):a&&(/[a-zA-Z0-9-]/.test(u)?r+=u.toLowerCase():a=!1);continue}if(d.startsWith("<!--",p)){i=!0,p+=3;continue}const m=d[p+1]??"";u==="<"&&/[a-zA-Z/!]/.test(m)&&(t=!0,r="",a=/[a-zA-Z]/.test(m))}c<o.length-1&&(e+=t||i||n!==null?`${Kt}${c}$$`:`<!--${Vt}${c}$$-->`)}return e}const ot=new WeakMap;function st(o){const e=ot.get(o);if(e)return e;const t=document.createElement("template");t.innerHTML=Gt(o);const s=[],i=(a,c)=>{if(a.nodeType===Node.ELEMENT_NODE){const u=a;for(const m of Array.from(u.attributes)){const f=m.name,g=m.value,_=f[0];if($.test(g))if($.lastIndex=0,_==="@"){const v=$.exec(g);$.lastIndex=0,s.push({path:c,kind:"event",name:f.slice(1),valueIndex:v?Number(v[1]):0}),u.removeAttribute(f)}else if(_==="."){const v=$.exec(g);$.lastIndex=0,s.push({path:c,kind:"prop",name:f.slice(1),valueIndex:v?Number(v[1]):0}),u.removeAttribute(f)}else if(_==="?"){const v=$.exec(g);$.lastIndex=0,s.push({path:c,kind:"bool",name:f.slice(1),valueIndex:v?Number(v[1]):0}),u.removeAttribute(f)}else{const v=[],L=[];let A=0,T;for($.lastIndex=0;(T=$.exec(g))!==null;)v.push(g.slice(A,T.index)),L.push(Number(T[1])),A=T.index+T[0].length;v.push(g.slice(A)),s.push({path:c,kind:"attr",name:f,template:v,valueIndices:L}),u.setAttribute(f,"")}}}const d=Array.from(a.childNodes);let p=0;for(let u=0;u<d.length;u++){const m=d[u],f=u+p;if(m.nodeType===Node.COMMENT_NODE){const g=Yt.exec(m.data);if(g){const _=document.createTextNode("");m.parentNode.replaceChild(_,m),s.push({path:[...c,f],kind:"node",valueIndex:Number(g[1])})}continue}if(m.nodeType===Node.TEXT_NODE){const g=m.textContent||"";if(!$.test(g)){$.lastIndex=0;continue}$.lastIndex=0;const _=m.parentNode;let v=0,L;const A=[],T=[];for($.lastIndex=0;(L=$.exec(g))!==null;){L.index>v&&A.push(document.createTextNode(g.slice(v,L.index)));const C=document.createTextNode("");A.push(C),T.push({path:[...c,f+A.length-1],kind:"node",valueIndex:Number(L[1])}),v=L.index+L[0].length}v<g.length&&A.push(document.createTextNode(g.slice(v)));for(const C of A)_.insertBefore(C,m);_.removeChild(m),p+=A.length-1,s.push(...T)}else i(m,[...c,f])}};i(t.content,[]);const r={template:t,buildParts:a=>{const c=[];for(const d of s){let p=a;for(const u of d.path)p=p.childNodes[u];d.kind==="node"?c.push({kind:"node",valueIndex:d.valueIndex,child:{anchor:p,state:null}}):d.kind==="attr"?c.push({kind:"attr",element:p,name:d.name,template:d.template,valueIndices:d.valueIndices}):d.kind==="event"?c.push({kind:"event",valueIndex:d.valueIndex,element:p,name:d.name}):d.kind==="prop"?c.push({kind:"prop",valueIndex:d.valueIndex,element:p,name:d.name}):d.kind==="bool"&&c.push({kind:"bool",valueIndex:d.valueIndex,element:p,name:d.name})}return c}};return ot.set(o,r),r}const it=new WeakMap;function Zt(o,e){for(const t of o.nodes)if(t.parentNode!==e)return!1;return!0}function G(o,e){const t=it.get(e);if(t&&t.strings===o.strings&&Zt(t,e)){be(t.parts,o.values);return}const s=st(o.strings),i=s.template.content.cloneNode(!0),n=s.buildParts(i),r=Array.from(i.childNodes);for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(i),be(n,o.values),it.set(e,{strings:o.strings,parts:n,nodes:r})}function be(o,e){for(const t of o)if(t.kind==="node")ve(t.child,e[t.valueIndex]);else if(t.kind==="attr"){let s=t.template[0];for(let i=0;i<t.valueIndices.length;i++)s+=nt(e[t.valueIndices[i]]),s+=t.template[i+1];s!==t.last&&(t.last=s,s===""?t.element.removeAttribute(t.name):t.element.setAttribute(t.name,s))}else if(t.kind==="event"){const s=e[t.valueIndex];s!==t.current&&(t.current&&t.element.removeEventListener(t.name,t.current),s&&t.element.addEventListener(t.name,s),t.current=s)}else if(t.kind==="prop"){const s=e[t.valueIndex];s!==t.last&&(t.last=s,t.element[t.name]=s)}else if(t.kind==="bool"){const s=!!e[t.valueIndex];s!==t.last&&(t.last=s,s?t.element.setAttribute(t.name,""):t.element.removeAttribute(t.name))}}function ve(o,e){if(e==null||e===!1){o.state&&(M(o.state),o.state=null);return}if(Array.isArray(e)){to(o,e);return}if(Bt(e)){eo(o,e);return}if(e instanceof Node){Jt(o,e);return}Qt(o,nt(e))}function Jt(o,e){const t=o.state;t?.shape==="node"&&t.node===e||(t&&M(t),Z(o,[e]),o.state={shape:"node",node:e})}function Qt(o,e){const t=o.state;if(t?.shape==="text"){t.text!==e&&(t.node.textContent=e,t.text=e);return}t&&M(t);const s=document.createTextNode(e);Z(o,[s]),o.state={shape:"text",node:s,text:e}}function eo(o,e){const t=o.state;if(t?.shape==="template"&&t.strings===e.strings){be(t.parts,e.values);return}t&&M(t);const s=st(e.strings),i=s.template.content.cloneNode(!0),n=s.buildParts(i),r=Array.from(i.childNodes);Z(o,[i]),be(n,e.values),o.state={shape:"template",strings:e.strings,parts:n,nodes:r}}function to(o,e){const t=o.state;if(t?.shape==="array"){const i=Math.min(t.entries.length,e.length);for(let n=0;n<i;n++)ve(t.entries[n],e[n]);if(e.length<t.entries.length){for(let n=e.length;n<t.entries.length;n++){const r=t.entries[n];r.state&&M(r.state),r.anchor.remove()}t.entries.length=e.length}else for(let n=t.entries.length;n<e.length;n++){const r=document.createTextNode("");Z(o,[r]);const a={anchor:r,state:null};ve(a,e[n]),t.entries.push(a)}return}t&&M(t);const s=[];for(const i of e){const n=document.createTextNode("");Z(o,[n]);const r={anchor:n,state:null};ve(r,i),s.push(r)}o.state={shape:"array",entries:s}}function Z(o,e){const t=o.anchor.parentNode;if(t)for(const s of e)t.insertBefore(s,o.anchor)}function M(o){if(o.shape==="text"){o.node.remove();return}if(o.shape==="template"){for(const e of o.parts)e.kind==="node"&&e.child.state&&(M(e.child.state),e.child.state=null);for(const e of o.nodes)e.parentNode&&e.parentNode.removeChild(e);return}if(o.shape==="node"){o.node.parentNode&&o.node.parentNode.removeChild(o.node);return}for(const e of o.entries)e.state&&M(e.state),e.anchor.remove()}function nt(o){return o==null||o===!1?"":String(o)}function rt(o,e="short"){if(o===""||o===null||o===void 0)return"";const t=typeof o=="string"&&/^\d{4}-\d{2}$/.test(o)?`${o}-01T00:00:00`:o,s=t instanceof Date?t:new Date(t);if(Number.isNaN(s.getTime()))return String(o);try{switch(e){case"long":return s.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});case"month":return s.toLocaleDateString(void 0,{year:"numeric",month:"long"});case"datetime":return s.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"});case"iso":return s.toISOString();default:return s.toLocaleDateString(void 0,{month:"short",day:"numeric"})}}catch{return String(o)}}async function at(o){if(o==="")return!1;const e=globalThis.navigator?.clipboard;if(e?.writeText)try{return await e.writeText(o),!0}catch{}return oo(o)}function oo(o){const e=globalThis.document;if(!e?.body||typeof e.execCommand!="function")return!1;const t=e.createElement("textarea");t.value=o,t.setAttribute("readonly",""),t.setAttribute("aria-hidden","true"),t.style.position="fixed",t.style.insetInlineStart="-9999px",t.style.opacity="0",e.body.appendChild(t);const s=e.activeElement;t.select();let i=!1;try{i=e.execCommand("copy")}catch{i=!1}return t.remove(),s?.focus?.(),i}const so="data-os-mode";function _e(o=typeof document<"u"?document.documentElement:null){return!!o&&o.getAttribute(so)==="mobile"}function io(o){return o.phone??_e()?h`<os-select
2 2 class="os-app-list__status"
3 3 os-bind=${o.bind}
4 4 os-action=${o.action}
5 5 .value=${o.value}
6 6 aria-label=${o.label}
7 - >${o.segments.map(t=>p`<os-option .value=${t.value}>${t.label}</os-option>`)}</os-select>`:p`<os-segmented
7 + >${o.segments.map(t=>h`<os-option .value=${t.value}>${t.label}</os-option>`)}</os-select>`:h`<os-segmented
8 8 class="os-app-list__status"
9 9 os-bind=${o.bind}
10 10 os-action=${o.action}
11 11 value=${o.value}
12 12 label=${o.label}
13 - >${o.segments.map(t=>p`<os-segment value=${t.value}>${t.label}</os-segment>`)}</os-segmented>`}function Zt(o,e=null){const t=e??(typeof document<"u"?document.documentElement:null);if(!!t&&fe(t)){o.hasAttribute("stacked")||o.setAttribute("stacked","");const i=o.getAttribute("sticky-columns");return i!==null&&(o.setAttribute("data-os-sticky-columns",i),o.removeAttribute("sticky-columns")),!0}o.hasAttribute("stacked")&&o.removeAttribute("stacked");const n=o.getAttribute("data-os-sticky-columns");return n!==null&&(o.setAttribute("sticky-columns",n),o.removeAttribute("data-os-sticky-columns")),!1}function tt(o){return Array.from(o.selection??[],String)}function Jt(){let o=null,e=!1,t=null,s=null;return{invalidateColumns(){o=null},invalidateData(){s=null},sync(n){const i={phone:!1,columnsChanged:!1,dataChanged:!1,selectionChanged:!1},r=n.table;if(!r)return i;const l=n.rowId??(c=>c.id),d=Zt(r);if(i.phone=d,d!==o&&(o=d,r.columns=n.columns(d),i.columnsChanged=!0),e||(e=!0,n.wire?.(r)),n.listKey!==t&&(t=n.listKey,tt(r).length>0&&(r.clearSelection(),i.selectionChanged=!0,n.onSelection?.([]))),n.fingerprint!==s){s=n.fingerprint,r.data=n.rows,i.dataChanged=!0;const c=new Set(n.rows.map(m=>String(l(m)))),h=tt(r),u=h.filter(m=>c.has(m));u.length!==h.length&&(r.selection=u,i.selectionChanged=!0,n.onSelection?.(u))}return i}}}function Qt(o,e){const t=e.local??{},s={id:o,hasLocal:r=>Object.prototype.hasOwnProperty.call(t,r),runLocal:(r,l,d,c)=>{const h=t[r];if(!h)return l;const u={...l},m=h(u,d,c);return m===void 0?u:m},render:r=>{Ze(e.view(r),r.root),e.updated?.(r)},mounted:r=>e.mounted?.(r)},{placeholder:n}=e;n&&(s.placeholder=r=>n(r));const i=window;return(i.openStationApps??(i.openStationApps={}))[o]=s,s}class eo{constructor(){this.data=null,this.loading=!1,this.error=!1,this.active=!1,this.previous=null,this.request=null,this.disposed=!1}update(e){const t=e.state.tab==="activity",s=t&&(!this.active||this.previous!==e.data);this.active=t,this.previous=e.data,s&&this.load(e)}async load(e){if(this.disposed||this.loading)return;const t=new AbortController;this.request=t,this.loading=!0,this.error=!1,e.repaint();try{const s=await e.fetch("/desktop-mode/v1/users/activity-summary",{signal:t.signal});if(!s.ok)throw new Error("Activity summary unavailable");const n=await s.json();t.signal.aborted||(this.data=n)}catch{t.signal.aborted||(this.error=!0)}finally{this.loading=!1,this.disposed||e.repaint()}}dispose(){this.disposed=!0,this.request?.abort()}}class to{constructor(){this.data=null,this.loading=!1,this.error=!1,this.active=!1,this.previous=null,this.request=null,this.disposed=!1}update(e){const t=e.state.tab==="roles",s=t&&(!this.active||this.previous!==e.data);this.active=t,this.previous=e.data,s&&this.load(e)}async load(e){if(this.disposed||this.loading)return;const t=new AbortController;this.request=t,this.loading=!0,this.error=!1,e.repaint();try{const s=await e.fetch("/desktop-mode/v1/users/roles-summary",{signal:t.signal});if(!s.ok)throw new Error("Role summary unavailable");const n=await s.json();t.signal.aborted||(this.data=n)}catch{t.signal.aborted||(this.error=!0)}finally{this.loading=!1,this.disposed||e.repaint()}}dispose(){this.disposed=!0,this.request?.abort()}}class oo{constructor(){this.items=[],this.pending=!1,this.error=!1,this.key="",this.lastData=null,this.page=0,this.pages=0,this.expected=0,this.disposed=!1,this.ctx=null,this.observer=null,this.sentinel=null,this.restarting=!1}reconcile(e){this.ctx=e;const{state:t,data:s}=e,n=JSON.stringify([t.search,t.role,t.orderby,t.order,t.perPage]);if(n!==this.key&&(this.key=n,this.items=[],this.page=0,this.pages=0,this.lastData=null,this.error=!1),!e.loading&&s&&s!==this.lastData&&s.list.page===t.page)if(this.lastData=s,s.list.error)this.error=!0;else if(s.list.page>1&&s.list.page!==this.expected)this.restarting||(this.restarting=!0,queueMicrotask(()=>{this.disposed||e.dispatch("page",{page:1}).catch(()=>{this.error=!0}).finally(()=>{this.restarting=!1,this.disposed||e.repaint()})}));else{const i=s.list.page===1?s.list.items:[...this.items,...s.list.items];this.items=Array.from(new Map(i.map(r=>[r.id,r])).values()),this.page=s.list.page,this.pages=s.list.pages,this.error=!1}return s?{...e,data:{...s,list:{...s.list,items:this.items}}}:e}get hasMore(){return this.page>0&&this.page<this.pages}async more(){const e=this.ctx;if(!(!e||this.disposed||this.pending||e.loading||!this.hasMore)){this.pending=!0,this.error=!1,this.expected=this.page+1,e.repaint();try{const t=this.expected;(!await e.dispatch("page",{page:t})||e.data?.list.error||this.page!==t||!this.hasMore&&this.items.length<e.data.list.total)&&(this.error=!0)}catch{this.error=!0}finally{this.pending=!1,this.expected=0,this.sentinel=null,this.disposed||e.repaint()}}}tail(){let e=this.items.length?a("You’re all caught up."):"";return this.pending?e=a("Loading more…"):this.hasMore&&(e=p`<os-button variant="ghost" @click=${()=>void this.more()}>${this.error?a("Could not load more. Retry"):a("Load more people")}</os-button>`),p`<div class="os-people__continuation" data-users-feed-end role="status">${e}</div>`}observe(e){const t=e.querySelector(".os-people__cards [data-users-feed-end]");t!==this.sentinel&&(this.observer?.disconnect(),this.sentinel=t,!(!t||typeof IntersectionObserver>"u")&&(this.observer=new IntersectionObserver(s=>{s.some(n=>n.isIntersecting)&&!this.error&&this.more()},{root:e.querySelector(".os-people__cards"),rootMargin:"0px 0px 240px 0px"}),this.observer.observe(t)))}dispose(){this.disposed=!0,this.observer?.disconnect()}}const F=class F extends HTMLElement{constructor(){super(),this._renderScheduled=!1,this._propValues={},this.constructor.shadow?(this.attachShadow({mode:"open"}),this._renderRoot=this.shadowRoot):this._renderRoot=this,this._installPropAccessors()}static get observedAttributes(){return this.props.map(ot)}connectedCallback(){this._adoptStyles(),this.requestUpdate()}attributeChangedCallback(e,t,s){if(t===s)return;const n=so(e);this._propValues[n]=s,this.requestUpdate()}get classNames(){return Array.from(this.classList)}set classNames(e){if(e==null){this.removeAttribute("class");return}const s=(Array.isArray(e)?e:String(e).split(/\s+/)).map(n=>String(n).trim()).filter(n=>n!=="");this.className=s.join(" ")}requestUpdate(){this._scheduleRender()}emit(e,t){return this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}_installPropAccessors(){const e=this.constructor;for(const t of e.props){if(Object.getOwnPropertyDescriptor(this,t))continue;const s=ot(t);Object.defineProperty(this,t,{get:()=>t in this._propValues?this._propValues[t]:this.getAttribute(s),set:n=>{let i;n==null||n===!1?i=null:n===!0?i="":i=String(n),this._propValues[t]=i,i===null?this.removeAttribute(s):this.setAttribute(s,i),this.requestUpdate()},enumerable:!0,configurable:!0})}}_scheduleRender(){this._renderScheduled||!this.isConnected||(this._renderScheduled=!0,queueMicrotask(()=>{this._renderScheduled=!1,this.isConnected&&Ze(this.render(),this._renderRoot)}))}_adoptStyles(){const e=this.constructor;if(e.styles.length!==0)if(e.shadow&&this.shadowRoot){const t=e.styles.map(s=>s.sheet).filter(s=>s!==null);if(this.shadowRoot.adoptedStyleSheets=t,t.length!==e.styles.length){for(const s of e.styles)if(!s.sheet){const n=document.createElement("style");n.textContent=s.cssText,this.shadowRoot.appendChild(n)}}}else this._adoptLightStyles(e)}_adoptLightStyles(e){if(!F._lightStylesAdopted.has(e)){F._lightStylesAdopted.add(e);for(const t of e.styles){const s=document.createElement("style");s.dataset.osUi=this.tagName.toLowerCase(),s.textContent=t.cssText,document.head.appendChild(s)}}}};F.props=[],F.styles=[],F.shadow=!0,F._lightStylesAdopted=new WeakSet;let w=F;function A(o,e){customElements.get(o)||customElements.define(o,e)}function ot(o){return o.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function so(o){return o.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const no=(()=>{try{return typeof new CSSStyleSheet().replaceSync=="function"}catch{return!1}})();function g(o,...e){let t=o[0];for(let s=1;s<o.length;s++){const n=e[s-1];if(typeof n=="string"||typeof n=="number")t+=String(n);else if(n&&n.__wpdCss)t+=n.cssText;else throw new TypeError("[os-ui] css`` interpolations must be strings, numbers, or other css`` results. Got: "+typeof n);t+=o[s]}if(no){const s=new CSSStyleSheet;return s.replaceSync(t),{__wpdCss:!0,sheet:s,cssText:t}}return{__wpdCss:!0,sheet:null,cssText:t}}function io(o){if(!o)return 214;let e=5381;for(let t=0;t<o.length;t++)e=Math.imul(e,33)+o.charCodeAt(t);return(e%360+360)%360}const ao=g`:host{display:inline-flex;position:relative;width:var( --os-ui-avatar-size,32px );height:var( --os-ui-avatar-size,32px );flex:0 0 auto;vertical-align:middle;line-height:0;perspective:calc( var( --os-ui-avatar-size,32px ) * 8 );--os-ui-avatar-tilt-x:0deg;--os-ui-avatar-tilt-y:0deg;--os-ui-avatar-hover:0;--os-ui-avatar-glare-x:50%;--os-ui-avatar-glare-y:50%}:host( [ hidden ] ){display:none}.os-avatar__tile{position:relative;width:100%;height:100%;border-radius:50%;overflow:hidden;background:var( --os-window-bg,#f0f0f1 );color:var( --os-ui-fg-on-accent,#fff );display:flex;align-items:center;justify-content:center;font-weight:700;font-size:calc( var( --os-ui-avatar-size,32px ) * 0.48 );line-height:1;letter-spacing:0;font-feature-settings:'tnum' 1;user-select:none;transform-style:preserve-3d;transform:rotateX( var( --os-ui-avatar-tilt-x ) ) rotateY( var( --os-ui-avatar-tilt-y ) ) scale( calc( 1 + var( --os-ui-avatar-hover ) * 0.07 ) );transition:transform 220ms cubic-bezier( 0.2,0.8,0.2,1 ),box-shadow 220ms cubic-bezier( 0.2,0.8,0.2,1 );box-shadow:inset 0 0 0 1px rgba( 255,255,255,calc( 0.18 + 0.22 * var( --os-ui-avatar-hover ) ) ),inset 0 0 0 calc( 1px + var( --os-ui-avatar-hover ) * 1px ) rgba( 0,0,0,calc( 0.08 + 0.04 * var( --os-ui-avatar-hover ) ) ),0 calc( 1px + var( --os-ui-avatar-hover ) * 8px ) calc( 6px + var( --os-ui-avatar-hover ) * 18px ) rgba( 0,0,0,calc( 0.08 + 0.18 * var( --os-ui-avatar-hover ) ) )}.os-avatar__tile::after{content:'';position:absolute;inset:0;border-radius:50%;background:radial-gradient( circle at var( --os-ui-avatar-glare-x ) var( --os-ui-avatar-glare-y ),var( --os-ui-scrim,rgba( 255,255,255,0.55 ) ) 0%,var( --os-ui-hover,rgba( 255,255,255,0 ) ) 55% );opacity:var( --os-ui-avatar-hover );mix-blend-mode:overlay;pointer-events:none;transition:opacity 220ms cubic-bezier( 0.2,0.8,0.2,1 )}.os-avatar__tile::before{content:'';position:absolute;inset:calc( var( --os-ui-avatar-hover ) * -3px );border-radius:50%;background:radial-gradient( circle at var( --os-ui-avatar-glare-x ) var( --os-ui-avatar-glare-y ),color-mix( in srgb,var( --os-ui-avatar-halo,rgb( 99,102,241 ) ) calc( 35% * var( --os-ui-avatar-hover ) ),transparent ) 0%,transparent 70% );filter:blur( 4px );pointer-events:none;z-index:-1;transition:inset 220ms cubic-bezier( 0.2,0.8,0.2,1 ),background 220ms}.os-avatar__tile img{width:calc( 100% + 2px );height:calc( 100% + 2px );margin:-1px;object-fit:cover;display:block;transform:translateZ( 1px )}.os-avatar__dot{position:absolute;bottom:0;inset-inline-end:0;width:calc( var( --os-ui-avatar-size,32px ) * 0.32 );height:calc( var( --os-ui-avatar-size,32px ) * 0.32 );min-width:8px;min-height:8px;border-radius:50%;box-sizing:border-box;border:2px solid var( --os-ui-avatar-dot-ring,var( --os-window-bg,#fff ) );background:var( --os-ui-avatar-dot-color,transparent );z-index:2}.os-avatar__dot--online{background:var( --os-ui-success-fg,#00a32a )}.os-avatar__dot--online::after{content:'';position:absolute;inset:-2px;border-radius:50%;border:1px solid var( --os-ui-success-fg,#00a32a );animation:os-avatar-presence 6s var( --os-ui-ease-out,cubic-bezier( 0.22,0.9,0.28,1 ) ) infinite;pointer-events:none}@keyframes os-avatar-presence{0%{opacity:0.6;transform:scale( 1 )}20%{opacity:0;transform:scale( 2.2 )}100%{opacity:0;transform:scale( 2.2 )}}.os-avatar__dot--inactive{background:var( --os-ui-warning-fg,#dba617 )}.os-avatar__dot--offline{background:var( --os-ui-fg-muted,#8c8f94 )}@media ( prefers-reduced-motion:reduce ){.os-avatar__dot--online::after{animation:none;opacity:0.6}.os-avatar__tile{transform:none;transition:box-shadow 200ms}.os-avatar__tile::after,.os-avatar__tile::before{display:none}}`,st={xs:20,sm:24,md:40,lg:64,xl:96},nt=new Set(["online","inactive","offline"]),Q=class Q extends w{constructor(){super(...arguments),this._presenceHandler=null,this._imgFailed=!1,this._onPointerMove=null,this._onPointerEnter=null,this._onPointerLeave=null,this._tiltRaf=0,this._pendingTiltX="0deg",this._pendingTiltY="0deg",this._pendingGlareX="50%",this._pendingGlareY="50%"}connectedCallback(){super.connectedCallback(),this._maybeAttachPresenceListener(),this._attachHoverEffect()}disconnectedCallback(){this._presenceHandler&&(document.removeEventListener("os-presence-changed",this._presenceHandler),this._presenceHandler=null),this._detachHoverEffect()}attributeChangedCallback(e,t,s){super.attributeChangedCallback(e,t,s),e==="src"&&(this._imgFailed=!1),(e==="user-id"||e==="presence")&&this._maybeAttachPresenceListener()}render(){const e=this._attr("src"),t=this._attr("name")||"",s=this._attr("alt"),n=s!==null?s:t,i=this._attr("size"),r=this._resolveSize(i),l=this._presenceForRender(),d=this._attr("clickable")!==null;this.style.setProperty("--os-ui-avatar-size",`${r}px`);const c=e&&!this._imgFailed?"":this._initialsBg(t),h=e&&!this._imgFailed?p`<img
13 + >${o.segments.map(t=>h`<os-segment value=${t.value}>${t.label}</os-segment>`)}</os-segmented>`}function no(o,e=null){const t=e??(typeof document<"u"?document.documentElement:null);if(!!t&&_e(t)){o.hasAttribute("stacked")||o.setAttribute("stacked","");const n=o.getAttribute("sticky-columns");return n!==null&&(o.setAttribute("data-os-sticky-columns",n),o.removeAttribute("sticky-columns")),!0}o.hasAttribute("stacked")&&o.removeAttribute("stacked");const i=o.getAttribute("data-os-sticky-columns");return i!==null&&(o.setAttribute("sticky-columns",i),o.removeAttribute("data-os-sticky-columns")),!1}function lt(o){return Array.from(o.selection??[],String)}function ro(){let o=null,e=!1,t=null,s=null;return{invalidateColumns(){o=null},invalidateData(){s=null},sync(i){const n={phone:!1,columnsChanged:!1,dataChanged:!1,selectionChanged:!1},r=i.table;if(!r)return n;const a=i.rowId??(d=>d.id),c=no(r);if(n.phone=c,c!==o&&(o=c,r.columns=i.columns(c),n.columnsChanged=!0),e||(e=!0,i.wire?.(r)),i.listKey!==t&&(t=i.listKey,lt(r).length>0&&(r.clearSelection(),n.selectionChanged=!0,i.onSelection?.([]))),i.fingerprint!==s){s=i.fingerprint,r.data=i.rows,n.dataChanged=!0;const d=new Set(i.rows.map(m=>String(a(m)))),p=lt(r),u=p.filter(m=>d.has(m));u.length!==p.length&&(r.selection=u,n.selectionChanged=!0,i.onSelection?.(u))}return n}}}function ao(o,e){const t=e.local??{},s={id:o,hasLocal:r=>Object.prototype.hasOwnProperty.call(t,r),runLocal:(r,a,c,d)=>{const p=t[r];if(!p)return a;const u={...a},m=p(u,c,d);return m===void 0?u:m},render:r=>{G(e.view(r),r.root),e.updated?.(r)},mounted:r=>e.mounted?.(r)},{placeholder:i}=e;i&&(s.placeholder=r=>i(r));const n=window;return(n.openStationApps??(n.openStationApps={}))[o]=s,s}class lo{constructor(){this.data=null,this.loading=!1,this.error=!1,this.active=!1,this.previous=null,this.request=null,this.disposed=!1}update(e){const t=e.state.tab==="activity",s=t&&(!this.active||this.previous!==e.data);this.active=t,this.previous=e.data,s&&this.load(e)}async load(e){if(this.disposed||this.loading)return;const t=new AbortController;this.request=t,this.loading=!0,this.error=!1,e.repaint();try{const s=await e.fetch("/desktop-mode/v1/users/activity-summary",{signal:t.signal});if(!s.ok)throw new Error("Activity summary unavailable");const i=await s.json();t.signal.aborted||(this.data=i)}catch{t.signal.aborted||(this.error=!0)}finally{this.loading=!1,this.disposed||e.repaint()}}dispose(){this.disposed=!0,this.request?.abort()}}class co{constructor(){this.data=null,this.loading=!1,this.error=!1,this.active=!1,this.previous=null,this.request=null,this.disposed=!1}update(e){const t=e.state.tab==="roles",s=t&&(!this.active||this.previous!==e.data);this.active=t,this.previous=e.data,s&&this.load(e)}async load(e){if(this.disposed||this.loading)return;const t=new AbortController;this.request=t,this.loading=!0,this.error=!1,e.repaint();try{const s=await e.fetch("/desktop-mode/v1/users/roles-summary",{signal:t.signal});if(!s.ok)throw new Error("Role summary unavailable");const i=await s.json();t.signal.aborted||(this.data=i)}catch{t.signal.aborted||(this.error=!0)}finally{this.loading=!1,this.disposed||e.repaint()}}dispose(){this.disposed=!0,this.request?.abort()}}class uo{constructor(){this.items=[],this.pending=!1,this.error=!1,this.key="",this.lastData=null,this.page=0,this.pages=0,this.expected=0,this.disposed=!1,this.ctx=null,this.observer=null,this.sentinel=null,this.restarting=!1}reconcile(e){this.ctx=e;const{state:t,data:s}=e,i=JSON.stringify([t.search,t.role,t.orderby,t.order,t.perPage]);if(i!==this.key&&(this.key=i,this.items=[],this.page=0,this.pages=0,this.lastData=null,this.error=!1),!e.loading&&s&&s!==this.lastData&&s.list.page===t.page)if(this.lastData=s,s.list.error)this.error=!0;else if(s.list.page>1&&s.list.page!==this.expected)this.restarting||(this.restarting=!0,queueMicrotask(()=>{this.disposed||e.dispatch("page",{page:1}).catch(()=>{this.error=!0}).finally(()=>{this.restarting=!1,this.disposed||e.repaint()})}));else{const n=s.list.page===1?s.list.items:[...this.items,...s.list.items];this.items=Array.from(new Map(n.map(r=>[r.id,r])).values()),this.page=s.list.page,this.pages=s.list.pages,this.error=!1}return s?{...e,data:{...s,list:{...s.list,items:this.items}}}:e}get hasMore(){return this.page>0&&this.page<this.pages}async more(){const e=this.ctx;if(!(!e||this.disposed||this.pending||e.loading||!this.hasMore)){this.pending=!0,this.error=!1,this.expected=this.page+1,e.repaint();try{const t=this.expected;(!await e.dispatch("page",{page:t})||e.data?.list.error||this.page!==t||!this.hasMore&&this.items.length<e.data.list.total)&&(this.error=!0)}catch{this.error=!0}finally{this.pending=!1,this.expected=0,this.sentinel=null,this.disposed||e.repaint()}}}tail(){let e=this.items.length?l("You’re all caught up."):"";return this.pending?e=l("Loading more…"):this.hasMore&&(e=h`<os-button variant="ghost" @click=${()=>void this.more()}>${this.error?l("Could not load more. Retry"):l("Load more people")}</os-button>`),h`<div class="os-people__continuation" data-users-feed-end role="status">${e}</div>`}observe(e){const t=e.querySelector(".os-people__cards [data-users-feed-end]");t!==this.sentinel&&(this.observer?.disconnect(),this.sentinel=t,!(!t||typeof IntersectionObserver>"u")&&(this.observer=new IntersectionObserver(s=>{s.some(i=>i.isIntersecting)&&!this.error&&this.more()},{root:e.querySelector(".os-people__cards"),rootMargin:"0px 0px 240px 0px"}),this.observer.observe(t)))}dispose(){this.disposed=!0,this.observer?.disconnect()}}const W=class W extends HTMLElement{constructor(){super(),this._renderScheduled=!1,this._propValues={},this.constructor.shadow?(this.attachShadow({mode:"open"}),this._renderRoot=this.shadowRoot):this._renderRoot=this,this._installPropAccessors()}static get observedAttributes(){return this.props.map(ct)}connectedCallback(){this._adoptStyles(),this.requestUpdate()}attributeChangedCallback(e,t,s){if(t===s)return;const i=po(e);this._propValues[i]=s,this.requestUpdate()}get classNames(){return Array.from(this.classList)}set classNames(e){if(e==null){this.removeAttribute("class");return}const s=(Array.isArray(e)?e:String(e).split(/\s+/)).map(i=>String(i).trim()).filter(i=>i!=="");this.className=s.join(" ")}requestUpdate(){this._scheduleRender()}emit(e,t){return this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}_installPropAccessors(){const e=this.constructor;for(const t of e.props){if(Object.getOwnPropertyDescriptor(this,t))continue;const s=ct(t);Object.defineProperty(this,t,{get:()=>t in this._propValues?this._propValues[t]:this.getAttribute(s),set:i=>{let n;i==null||i===!1?n=null:i===!0?n="":n=String(i),this._propValues[t]=n,n===null?this.removeAttribute(s):this.setAttribute(s,n),this.requestUpdate()},enumerable:!0,configurable:!0})}}_scheduleRender(){this._renderScheduled||!this.isConnected||(this._renderScheduled=!0,queueMicrotask(()=>{this._renderScheduled=!1,this.isConnected&&G(this.render(),this._renderRoot)}))}_adoptStyles(){const e=this.constructor;if(e.styles.length!==0)if(e.shadow&&this.shadowRoot){const t=e.styles.map(s=>s.sheet).filter(s=>s!==null);if(this.shadowRoot.adoptedStyleSheets=t,t.length!==e.styles.length){for(const s of e.styles)if(!s.sheet){const i=document.createElement("style");i.textContent=s.cssText,this.shadowRoot.appendChild(i)}}}else this._adoptLightStyles(e)}_adoptLightStyles(e){if(!W._lightStylesAdopted.has(e)){W._lightStylesAdopted.add(e);for(const t of e.styles){const s=document.createElement("style");s.dataset.osUi=this.tagName.toLowerCase(),s.textContent=t.cssText,document.head.appendChild(s)}}}};W.props=[],W.styles=[],W.shadow=!0,W._lightStylesAdopted=new WeakSet;let w=W;function S(o,e){customElements.get(o)||customElements.define(o,e)}function ct(o){return o.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function po(o){return o.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const ho=(()=>{try{return typeof new CSSStyleSheet().replaceSync=="function"}catch{return!1}})();function b(o,...e){let t=o[0];for(let s=1;s<o.length;s++){const i=e[s-1];if(typeof i=="string"||typeof i=="number")t+=String(i);else if(i&&i.__wpdCss)t+=i.cssText;else throw new TypeError("[os-ui] css`` interpolations must be strings, numbers, or other css`` results. Got: "+typeof i);t+=o[s]}if(ho){const s=new CSSStyleSheet;return s.replaceSync(t),{__wpdCss:!0,sheet:s,cssText:t}}return{__wpdCss:!0,sheet:null,cssText:t}}function mo(o){if(!o)return 214;let e=5381;for(let t=0;t<o.length;t++)e=Math.imul(e,33)+o.charCodeAt(t);return(e%360+360)%360}const fo=b`:host{display:inline-flex;position:relative;width:var( --os-ui-avatar-size,32px );height:var( --os-ui-avatar-size,32px );flex:0 0 auto;vertical-align:middle;line-height:0;perspective:calc( var( --os-ui-avatar-size,32px ) * 8 );--os-ui-avatar-tilt-x:0deg;--os-ui-avatar-tilt-y:0deg;--os-ui-avatar-hover:0;--os-ui-avatar-glare-x:50%;--os-ui-avatar-glare-y:50%}:host( [ hidden ] ){display:none}.os-avatar__tile{position:relative;width:100%;height:100%;border-radius:50%;overflow:hidden;background:var( --os-window-bg,#f0f0f1 );color:var( --os-ui-fg-on-accent,#fff );display:flex;align-items:center;justify-content:center;font-weight:700;font-size:calc( var( --os-ui-avatar-size,32px ) * 0.48 );line-height:1;letter-spacing:0;font-feature-settings:'tnum' 1;user-select:none;transform-style:preserve-3d;transform:rotateX( var( --os-ui-avatar-tilt-x ) ) rotateY( var( --os-ui-avatar-tilt-y ) ) scale( calc( 1 + var( --os-ui-avatar-hover ) * 0.07 ) );transition:transform 220ms cubic-bezier( 0.2,0.8,0.2,1 ),box-shadow 220ms cubic-bezier( 0.2,0.8,0.2,1 );box-shadow:inset 0 0 0 1px rgba( 255,255,255,calc( 0.18 + 0.22 * var( --os-ui-avatar-hover ) ) ),inset 0 0 0 calc( 1px + var( --os-ui-avatar-hover ) * 1px ) rgba( 0,0,0,calc( 0.08 + 0.04 * var( --os-ui-avatar-hover ) ) ),0 calc( 1px + var( --os-ui-avatar-hover ) * 8px ) calc( 6px + var( --os-ui-avatar-hover ) * 18px ) rgba( 0,0,0,calc( 0.08 + 0.18 * var( --os-ui-avatar-hover ) ) )}.os-avatar__tile::after{content:'';position:absolute;inset:0;border-radius:50%;background:radial-gradient( circle at var( --os-ui-avatar-glare-x ) var( --os-ui-avatar-glare-y ),var( --os-ui-scrim,rgba( 255,255,255,0.55 ) ) 0%,var( --os-ui-hover,rgba( 255,255,255,0 ) ) 55% );opacity:var( --os-ui-avatar-hover );mix-blend-mode:overlay;pointer-events:none;transition:opacity 220ms cubic-bezier( 0.2,0.8,0.2,1 )}.os-avatar__tile::before{content:'';position:absolute;inset:calc( var( --os-ui-avatar-hover ) * -3px );border-radius:50%;background:radial-gradient( circle at var( --os-ui-avatar-glare-x ) var( --os-ui-avatar-glare-y ),color-mix( in srgb,var( --os-ui-avatar-halo,rgb( 99,102,241 ) ) calc( 35% * var( --os-ui-avatar-hover ) ),transparent ) 0%,transparent 70% );filter:blur( 4px );pointer-events:none;z-index:-1;transition:inset 220ms cubic-bezier( 0.2,0.8,0.2,1 ),background 220ms}.os-avatar__tile img{width:calc( 100% + 2px );height:calc( 100% + 2px );margin:-1px;object-fit:cover;display:block;transform:translateZ( 1px )}.os-avatar__dot{position:absolute;bottom:0;inset-inline-end:0;width:calc( var( --os-ui-avatar-size,32px ) * 0.32 );height:calc( var( --os-ui-avatar-size,32px ) * 0.32 );min-width:8px;min-height:8px;border-radius:50%;box-sizing:border-box;border:2px solid var( --os-ui-avatar-dot-ring,var( --os-window-bg,#fff ) );background:var( --os-ui-avatar-dot-color,transparent );z-index:2}.os-avatar__dot--online{background:var( --os-ui-success-fg,#00a32a )}.os-avatar__dot--online::after{content:'';position:absolute;inset:-2px;border-radius:50%;border:1px solid var( --os-ui-success-fg,#00a32a );animation:os-avatar-presence 6s var( --os-ui-ease-out,cubic-bezier( 0.22,0.9,0.28,1 ) ) infinite;pointer-events:none}@keyframes os-avatar-presence{0%{opacity:0.6;transform:scale( 1 )}20%{opacity:0;transform:scale( 2.2 )}100%{opacity:0;transform:scale( 2.2 )}}.os-avatar__dot--inactive{background:var( --os-ui-warning-fg,#dba617 )}.os-avatar__dot--offline{background:var( --os-ui-fg-muted,#8c8f94 )}@media ( prefers-reduced-motion:reduce ){.os-avatar__dot--online::after{animation:none;opacity:0.6}.os-avatar__tile{transform:none;transition:box-shadow 200ms}.os-avatar__tile::after,.os-avatar__tile::before{display:none}}`,dt={xs:20,sm:24,md:40,lg:64,xl:96},ut=new Set(["online","inactive","offline"]),oe=class oe extends w{constructor(){super(...arguments),this._presenceHandler=null,this._imgFailed=!1,this._onPointerMove=null,this._onPointerEnter=null,this._onPointerLeave=null,this._tiltRaf=0,this._pendingTiltX="0deg",this._pendingTiltY="0deg",this._pendingGlareX="50%",this._pendingGlareY="50%"}connectedCallback(){super.connectedCallback(),this._maybeAttachPresenceListener(),this._attachHoverEffect()}disconnectedCallback(){this._presenceHandler&&(document.removeEventListener("os-presence-changed",this._presenceHandler),this._presenceHandler=null),this._detachHoverEffect()}attributeChangedCallback(e,t,s){super.attributeChangedCallback(e,t,s),e==="src"&&(this._imgFailed=!1),(e==="user-id"||e==="presence")&&this._maybeAttachPresenceListener()}render(){const e=this._attr("src"),t=this._attr("name")||"",s=this._attr("alt"),i=s!==null?s:t,n=this._attr("size"),r=this._resolveSize(n),a=this._presenceForRender(),c=this._attr("clickable")!==null;this.style.setProperty("--os-ui-avatar-size",`${r}px`);const d=e&&!this._imgFailed?"":this._initialsBg(t),p=e&&!this._imgFailed?h`<img
14 14 src=${e}
15 - alt=${n}
15 + alt=${i}
16 16 @error=${()=>this._onImgError()}
17 17 loading="lazy"
18 - />`:this._initials(t),u=l?p`<span
19 - class=${`os-avatar__dot os-avatar__dot--${l}`}
20 - aria-label=${this._presenceLabel(l)}
21 - ></span>`:p``;return d?p`
18 + />`:this._initials(t),u=a?h`<span
19 + class=${`os-avatar__dot os-avatar__dot--${a}`}
20 + aria-label=${this._presenceLabel(a)}
21 + ></span>`:h``;return c?h`
22 22 <button
23 23 type="button"
24 24 class="os-avatar__tile"
25 - aria-label=${n||"User"}
26 - style=${c?`background:${c};`:""}
25 + aria-label=${i||"User"}
26 + style=${d?`background:${d};`:""}
27 27 @click=${m=>this._onClick(m)}
28 - >${h}</button>
28 + >${p}</button>
29 29 ${u}
30 - `:p`
30 + `:h`
31 31 <div
32 32 class="os-avatar__tile"
33 33 role="img"
34 - aria-label=${n||"User"}
35 - style=${c?`background:${c};`:""}
36 - >${h}</div>
34 + aria-label=${i||"User"}
35 + style=${d?`background:${d};`:""}
36 + >${p}</div>
37 37 ${u}
38 - `}_attr(e){return this.getAttribute(e)}_resolveSize(e){if(!e)return 32;if(e in st)return st[e];const t=Number(e);return Number.isFinite(t)&&t>0?t:32}_initials(e){const t=e.trim();return t?Array.from(t)[0]?.toUpperCase()??"?":"?"}_initialsBg(e){const t=io(e);return`linear-gradient(135deg, hsl(${t} 62% 55%), hsl(${(t+24)%360} 58% 42%))`}_presenceForRender(){const e=this._attr("presence");return e&&nt.has(e)?e:null}_presenceLabel(e){switch(e){case"online":return"Online";case"inactive":return"Inactive";case"offline":return"Offline"}}_onImgError(){this._imgFailed=!0,this.requestUpdate()}_onClick(e){const t=this._attr("user-id"),s={userId:t!==null&&Number(t)||null,originalEvent:e};this.emit("os-avatar-click",s)}_attachHoverEffect(){typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||(this._onPointerEnter=()=>{this.style.setProperty("--os-ui-avatar-hover","1")},this._onPointerLeave=()=>{this.style.setProperty("--os-ui-avatar-hover","0"),this._pendingTiltX="0deg",this._pendingTiltY="0deg",this._pendingGlareX="50%",this._pendingGlareY="50%",this._flushTilt()},this._onPointerMove=t=>{const s=this.getBoundingClientRect();if(s.width===0||s.height===0)return;const n=(t.clientX-s.left)/s.width-.5,i=(t.clientY-s.top)/s.height-.5,r=14;this._pendingTiltY=`${(n*r).toFixed(2)}deg`,this._pendingTiltX=`${(-i*r).toFixed(2)}deg`;const l=Math.max(0,Math.min(100,(n+.5)*100)),d=Math.max(0,Math.min(100,(i+.5)*100));this._pendingGlareX=`${l.toFixed(1)}%`,this._pendingGlareY=`${d.toFixed(1)}%`,this._tiltRaf||(this._tiltRaf=requestAnimationFrame(()=>this._flushTilt()))},this.addEventListener("pointerenter",this._onPointerEnter),this.addEventListener("pointerleave",this._onPointerLeave),this.addEventListener("pointermove",this._onPointerMove))}_flushTilt(){this._tiltRaf=0,this.style.setProperty("--os-ui-avatar-tilt-x",this._pendingTiltX),this.style.setProperty("--os-ui-avatar-tilt-y",this._pendingTiltY),this.style.setProperty("--os-ui-avatar-glare-x",this._pendingGlareX),this.style.setProperty("--os-ui-avatar-glare-y",this._pendingGlareY)}_detachHoverEffect(){this._onPointerMove&&(this.removeEventListener("pointermove",this._onPointerMove),this._onPointerMove=null),this._onPointerEnter&&(this.removeEventListener("pointerenter",this._onPointerEnter),this._onPointerEnter=null),this._onPointerLeave&&(this.removeEventListener("pointerleave",this._onPointerLeave),this._onPointerLeave=null),this._tiltRaf&&(cancelAnimationFrame(this._tiltRaf),this._tiltRaf=0)}_maybeAttachPresenceListener(){const e=this._attr("user-id"),t=this._attr("presence"),s=!!e&&!t;s&&!this._presenceHandler?(this._presenceHandler=n=>{const i=n.detail;i&&String(i.userId)===String(e)&&i.newStatus&&nt.has(i.newStatus)&&this.setAttribute("presence",i.newStatus)},document.addEventListener("os-presence-changed",this._presenceHandler)):!s&&this._presenceHandler&&(document.removeEventListener("os-presence-changed",this._presenceHandler),this._presenceHandler=null)}};Q.props=["src","alt","name","size","presence","userId","clickable"],Q.styles=[ao],Q.help=void 0;let we=Q;A("os-avatar",we);const ro=g`:host{--_border:var( --os-ui-stat-border,var( --os-ui-border,#dcdcde ) );--_bg:var( --os-ui-stat-bg,transparent );--_value-color:var( --os-ui-stat-value-color,var( --wp-admin-theme-color,#2271b1 ) );--_value-size:var( --os-ui-stat-value-size,20px );--_label-color:var( --os-ui-stat-label-color,var( --os-ui-fg-muted,#646970 ) );display:flex;flex-direction:column;gap:2px;padding:var( --os-ui-stat-padding,10px 12px );border:1px solid var( --_border );border-radius:var( --os-ui-stat-radius,8px );background:var( --_bg );min-inline-size:0}:host( [ hidden ] ){display:none}.value{font-size:var( --_value-size );font-weight:700;line-height:1.1;color:var( --_value-color );font-variant-numeric:tabular-nums}.label{display:inline-flex;align-items:center;gap:6px;font-size:11px;letter-spacing:0.05em;text-transform:uppercase;color:var( --_label-color )}.caption{font-size:11px;color:var( --_label-color )}.swatch{display:inline-block;inline-size:10px;block-size:10px;border-radius:3px;flex:none;background:var( --os-app-tone,var( --os-ui-fg-muted,#646970 ) )}`,ee=class ee extends w{render(){const e=this,t=e.caption||"";return p`
38 + `}_attr(e){return this.getAttribute(e)}_resolveSize(e){if(!e)return 32;if(e in dt)return dt[e];const t=Number(e);return Number.isFinite(t)&&t>0?t:32}_initials(e){const t=e.trim();return t?Array.from(t)[0]?.toUpperCase()??"?":"?"}_initialsBg(e){const t=mo(e);return`linear-gradient(135deg, hsl(${t} 62% 55%), hsl(${(t+24)%360} 58% 42%))`}_presenceForRender(){const e=this._attr("presence");return e&&ut.has(e)?e:null}_presenceLabel(e){switch(e){case"online":return"Online";case"inactive":return"Inactive";case"offline":return"Offline"}}_onImgError(){this._imgFailed=!0,this.requestUpdate()}_onClick(e){const t=this._attr("user-id"),s={userId:t!==null&&Number(t)||null,originalEvent:e};this.emit("os-avatar-click",s)}_attachHoverEffect(){typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||(this._onPointerEnter=()=>{this.style.setProperty("--os-ui-avatar-hover","1")},this._onPointerLeave=()=>{this.style.setProperty("--os-ui-avatar-hover","0"),this._pendingTiltX="0deg",this._pendingTiltY="0deg",this._pendingGlareX="50%",this._pendingGlareY="50%",this._flushTilt()},this._onPointerMove=t=>{const s=this.getBoundingClientRect();if(s.width===0||s.height===0)return;const i=(t.clientX-s.left)/s.width-.5,n=(t.clientY-s.top)/s.height-.5,r=14;this._pendingTiltY=`${(i*r).toFixed(2)}deg`,this._pendingTiltX=`${(-n*r).toFixed(2)}deg`;const a=Math.max(0,Math.min(100,(i+.5)*100)),c=Math.max(0,Math.min(100,(n+.5)*100));this._pendingGlareX=`${a.toFixed(1)}%`,this._pendingGlareY=`${c.toFixed(1)}%`,this._tiltRaf||(this._tiltRaf=requestAnimationFrame(()=>this._flushTilt()))},this.addEventListener("pointerenter",this._onPointerEnter),this.addEventListener("pointerleave",this._onPointerLeave),this.addEventListener("pointermove",this._onPointerMove))}_flushTilt(){this._tiltRaf=0,this.style.setProperty("--os-ui-avatar-tilt-x",this._pendingTiltX),this.style.setProperty("--os-ui-avatar-tilt-y",this._pendingTiltY),this.style.setProperty("--os-ui-avatar-glare-x",this._pendingGlareX),this.style.setProperty("--os-ui-avatar-glare-y",this._pendingGlareY)}_detachHoverEffect(){this._onPointerMove&&(this.removeEventListener("pointermove",this._onPointerMove),this._onPointerMove=null),this._onPointerEnter&&(this.removeEventListener("pointerenter",this._onPointerEnter),this._onPointerEnter=null),this._onPointerLeave&&(this.removeEventListener("pointerleave",this._onPointerLeave),this._onPointerLeave=null),this._tiltRaf&&(cancelAnimationFrame(this._tiltRaf),this._tiltRaf=0)}_maybeAttachPresenceListener(){const e=this._attr("user-id"),t=this._attr("presence"),s=!!e&&!t;s&&!this._presenceHandler?(this._presenceHandler=i=>{const n=i.detail;n&&String(n.userId)===String(e)&&n.newStatus&&ut.has(n.newStatus)&&this.setAttribute("presence",n.newStatus)},document.addEventListener("os-presence-changed",this._presenceHandler)):!s&&this._presenceHandler&&(document.removeEventListener("os-presence-changed",this._presenceHandler),this._presenceHandler=null)}};oe.props=["src","alt","name","size","presence","userId","clickable"],oe.styles=[fo],oe.help=void 0;let Ee=oe;S("os-avatar",Ee);const go=b`:host{--_border:var( --os-ui-stat-border,var( --os-ui-border,#dcdcde ) );--_bg:var( --os-ui-stat-bg,transparent );--_value-color:var( --os-ui-stat-value-color,var( --wp-admin-theme-color,#2271b1 ) );--_value-size:var( --os-ui-stat-value-size,20px );--_label-color:var( --os-ui-stat-label-color,var( --os-ui-fg-muted,#646970 ) );display:flex;flex-direction:column;gap:2px;padding:var( --os-ui-stat-padding,10px 12px );border:1px solid var( --_border );border-radius:var( --os-ui-stat-radius,8px );background:var( --_bg );min-inline-size:0}:host( [ hidden ] ){display:none}.value{font-size:var( --_value-size );font-weight:700;line-height:1.1;color:var( --_value-color );font-variant-numeric:tabular-nums}.label{display:inline-flex;align-items:center;gap:6px;font-size:11px;letter-spacing:0.05em;text-transform:uppercase;color:var( --_label-color )}.caption{font-size:11px;color:var( --_label-color )}.swatch{display:inline-block;inline-size:10px;block-size:10px;border-radius:3px;flex:none;background:var( --os-app-tone,var( --os-ui-fg-muted,#646970 ) )}`,se=class se extends w{render(){const e=this,t=e.caption||"";return h`
39 39 <span class="value" part="value">${e.value||""}</span>
40 40 <span class="label" part="label">
41 - ${this.hasAttribute("swatch")?p`<i class="swatch" aria-hidden="true"></i>`:""}
41 + ${this.hasAttribute("swatch")?h`<i class="swatch" aria-hidden="true"></i>`:""}
42 42 ${e.label||""}
43 43 </span>
44 - ${t?p`<span class="caption" part="caption">${t}</span>`:""}
45 - `}};ee.props=["value","label","caption","swatch"],ee.styles=[ro],ee.help=void 0;let Ae=ee;A("os-stat",Ae);const j=g`:host{--_holo-fill:var( --os-ui-holo-fill,${"linear-gradient( 124deg, #afa2e8 0%, #f5a8ea 46%, #8ee9f7 100% )"} );--_holo-ink:var( --os-ui-holo-ink,#0c0b0f );--_holo-sheen:var( --os-ui-holo-sheen,linear-gradient( 124deg,rgba( 159,214,255,0.1 ) 0%,rgba( 236,155,255,0.12 ) 34%,rgba( 242,82,252,0.1 ) 58%,rgba( 147,240,198,0.09 ) 100% ) );--_holo-edge:var( --os-ui-holo-edge,linear-gradient( 124deg,rgba( 154,242,255,0.7 ) 0%,rgba( 236,155,255,0.85 ) 38%,rgba( 242,82,252,0.7 ) 62%,rgba( 159,152,255,0.6 ) 100% ) );--_holo-edge-quiet:var( --os-ui-holo-edge-quiet,linear-gradient( 124deg,rgba( 154,242,255,0.22 ) 0%,rgba( 236,155,255,0.28 ) 38%,rgba( 242,82,252,0.22 ) 62%,rgba( 159,152,255,0.2 ) 100% ) );--_holo-glow:var( --os-ui-holo-glow,0 0 0 1px rgba( 242,82,252,0.28 ),0 2px 10px rgba( 242,82,252,0.22 ) );--_holo-glow-strong:var( --os-ui-holo-glow-strong,0 0 0 1px rgba( 242,82,252,0.42 ),0 4px 18px rgba( 242,82,252,0.38 ),0 1px 3px rgba( 12,11,15,0.6 ) );--_holo-track:var( --os-ui-holo-track,rgba( 255,251,255,0.16 ) );--_holo-track-edge:var( --os-ui-holo-track-edge,#8c8f94 );--_holo-ring-color:var( --os-ui-accent-dim,#2271b1 );--_holo-focus:var( --os-ui-focus-ring,0 0 0 2px rgba( 12,11,15,0.9 ),0 0 0 4px #f252fc,0 0 12px 2px rgba( 242,82,252,0.45 ) );--_holo-focus-field:var( --os-ui-focus-ring-field,0 0 0 1px #f252fc,0 0 0 4px rgba( 242,82,252,0.18 ) );--_holo-t:var( --os-ui-holo-transition,220ms );--_holo-t-fast:var( --os-ui-motion-fast,140ms );--_holo-t-slow:var( --os-ui-motion-slow,340ms );--_holo-t-ambient:var( --os-ui-motion-ambient,12s );--_holo-spring:var( --os-ui-ease-spring,cubic-bezier( 0.32,1.5,0.55,1 ) );--_holo-ease:var( --os-ui-ease-out,cubic-bezier( 0.22,0.9,0.28,1 ) );--_holo-loop:var( --os-ui-ease-loop,cubic-bezier( 0.45,0,0.55,1 ) )}`,lo=g` .os-holo-fill{background-color:transparent;background-image:var( --_holo-fill );background-size:220% 220%;background-position:22% 28%;background-repeat:no-repeat;color:var( --_holo-ink );transition:background-position var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,filter var( --_holo-t ) ease}.os-holo-fill:hover{background-position:74% 66%}.os-holo-fill:active{background-position:88% 82%;filter:brightness( 0.94 )}@media ( prefers-reduced-motion:reduce ){.os-holo-fill{transition-duration:1ms}.os-holo-fill:hover,.os-holo-fill:active{background-position:22% 28%}}`,ze=g` .os-holo-sheen{position:relative;isolation:isolate}.os-holo-sheen::before{content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;background-image:var( --_holo-sheen );background-size:200% 200%;background-position:20% 30%;opacity:0;pointer-events:none;transition:opacity var( --_holo-t ) ease,background-position var( --_holo-t ) ease}.os-holo-sheen:hover::before,.os-holo-sheen:focus-visible::before{opacity:1;background-position:76% 68%}@media ( prefers-reduced-motion:reduce ){.os-holo-sheen::before{transition-duration:1ms}.os-holo-sheen:hover::before,.os-holo-sheen:focus-visible::before{background-position:20% 30%}}`,it=g` .os-holo-edge{position:relative}.os-holo-edge::after{content:'';position:absolute;inset:0;border-radius:inherit;padding:1px;background-image:var( --_holo-edge-quiet );opacity:0;pointer-events:none;-webkit-mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );-webkit-mask-composite:xor;mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );mask-composite:exclude;transition:opacity var( --_holo-t ) ease}.os-holo-edge:hover::after,.os-holo-edge:focus-visible::after{background-image:var( --_holo-edge );opacity:1}.os-holo-edge.is-lit::after{background-image:var( --_holo-edge );opacity:1}@media ( prefers-reduced-motion:reduce ){.os-holo-edge::after{transition-duration:1ms}}`,at=g` .os-holo-glint{position:absolute;inset:0;border-radius:inherit;overflow:hidden;pointer-events:none}.os-holo-glint::before{content:'';position:absolute;top:-60%;bottom:-60%;width:45%;inset-inline-start:-60%;background:linear-gradient( 90deg,transparent 0%,rgba( 255,251,255,0.14 ) 45%,rgba( 255,251,255,0.22 ) 50%,rgba( 255,251,255,0.14 ) 55%,transparent 100% );transform:rotate( 18deg ) translateX( 0 );opacity:0}:hover>.os-holo-glint::before,:focus-visible>.os-holo-glint::before,:host(:hover )>.os-holo-glint::before,:host(:focus-visible )>.os-holo-glint::before{animation:os-holo-glint var( --_holo-t-slow ) var( --_holo-ease )}@keyframes os-holo-glint{0%{opacity:0;transform:rotate( 18deg ) translateX( 0 )}15%{opacity:1}85%{opacity:1}100%{opacity:0;transform:rotate( 18deg ) translateX( 240vw )}}@media ( prefers-reduced-motion:reduce ){:hover>.os-holo-glint::before,:focus-visible>.os-holo-glint::before,:host(:hover )>.os-holo-glint::before,:host(:focus-visible )>.os-holo-glint::before{animation:none}}`,rt=g` .os-holo-ring{position:absolute;inset:0;border-radius:inherit;box-shadow:0 0 0 0 var( --_holo-ring-color );opacity:0;pointer-events:none}:active:not(:disabled )>.os-holo-ring,:host(:active:not( [ disabled ] ) )>.os-holo-ring{animation:os-holo-ring var( --_holo-t-slow ) var( --_holo-ease )}@keyframes os-holo-ring{0%{opacity:0.45;box-shadow:0 0 0 0 var( --_holo-ring-color )}100%{opacity:0;box-shadow:0 0 0 10px transparent}}@media ( prefers-reduced-motion:reduce ){:active:not(:disabled )>.os-holo-ring,:host(:active:not( [ disabled ] ) )>.os-holo-ring{animation:none}}`,lt=g` .os-holo-shimmer{background-image:var( --_holo-fill );background-size:300% 300%;background-repeat:no-repeat;animation:os-holo-shimmer 2.4s var( --_holo-loop ) infinite}@keyframes os-holo-shimmer{0%{background-position:0% 50%}100%{background-position:100% 50%}}@media ( prefers-reduced-motion:reduce ){.os-holo-shimmer{animation:none;background-position:30% 50%}}`,ct=g` .os-holo-enter{animation:os-holo-enter var( --_holo-t ) var( --_holo-spring )}@keyframes os-holo-enter{from{opacity:0;transform:scale( 0.96 )}}@media ( prefers-reduced-motion:reduce ){.os-holo-enter{animation:none}}`,co=g` input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ),select,textarea{transition:background-color var( --_holo-t ) ease,border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease}input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ):hover:not(:disabled ),select:hover:not(:disabled ),textarea:hover:not(:disabled ){border-color:var( --os-ui-border-strong,#8c8f94 )}input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ):focus,input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ):focus-visible,select:focus,select:focus-visible,textarea:focus,textarea:focus-visible{outline:none;border-color:var( --os-ui-accent,#2271b1 );box-shadow:var( --_holo-focus-field )}input::placeholder,textarea::placeholder{color:var( --os-ui-fg-faint,#8c8f94 );opacity:1}input::selection,textarea::selection{background:var( --os-ui-selection-bg,rgba( 159,152,255,0.6 ) );color:var( --os-ui-selection-fg,#fffbff )}@media ( prefers-reduced-motion:reduce ){input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ),select,textarea{transition-duration:1ms}}`,dt=g` input[ type='checkbox' ],input[ type='radio' ]{appearance:none;-webkit-appearance:none;position:relative;flex:0 0 auto;box-sizing:border-box;width:16px;height:16px;margin:0;padding:0;border:1px solid var( --_holo-track-edge );border-radius:4px;background-color:var( --_holo-track );background-image:none;background-repeat:no-repeat;cursor:inherit;transition:background-color var( --_holo-t ) ease,border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease}input[ type='radio' ]{border-radius:50%}input[ type='checkbox' ]:hover:not(:disabled ),input[ type='radio' ]:hover:not(:disabled ){border-color:var( --os-ui-accent,#2271b1 )}input[ type='checkbox' ]:focus-visible,input[ type='radio' ]:focus-visible{outline:none;box-shadow:var( --_holo-focus )}input[ type='checkbox' ]:checked,input[ type='checkbox' ]:indeterminate,input[ type='radio' ]:checked{border-color:transparent;background-color:var( --os-ui-accent,#2271b1 )}input[ type='checkbox' ]:checked:focus-visible,input[ type='radio' ]:checked:focus-visible{box-shadow:var( --_holo-focus )}input[ type='checkbox' ]:checked::after{content:'';position:absolute;inset-inline-start:50%;top:46%;width:3.5px;height:7.5px;border:solid var( --os-ui-fg-on-accent,#fff );border-width:0 2px 2px 0;transform:translate( -50%,-50% ) rotate( 45deg );animation:os-holo-tick 180ms cubic-bezier( 0.3,1.4,0.6,1 )}input[ type='checkbox' ]:indeterminate::after{content:'';position:absolute;inset-inline-start:50%;top:50%;width:8px;height:2px;border:0;border-radius:1px;background:var( --os-ui-fg-on-accent,#fff );transform:translate( -50%,-50% )}input[ type='radio' ]:checked::after{content:'';position:absolute;inset-inline-start:50%;top:50%;width:6px;height:6px;border-radius:50%;background:var( --os-ui-fg-on-accent,#fff );transform:translate( -50%,-50% );animation:os-holo-tick 180ms cubic-bezier( 0.3,1.4,0.6,1 )}input[ type='checkbox' ]:disabled,input[ type='radio' ]:disabled{cursor:not-allowed}@keyframes os-holo-tick{from{opacity:0;transform:translate( -50%,-50% ) rotate( 45deg ) scale( 0.4 )}}@media ( prefers-reduced-motion:reduce ){input[ type='checkbox' ]:checked::after,input[ type='radio' ]:checked::after{animation:none}}`,pt=g` @keyframes os-holo-drift{0%{background-position:16% 26%}50%{background-position:84% 74%}100%{background-position:16% 26%}}.os-holo-alive{animation:os-holo-drift var( --_holo-t-ambient ) var( --_holo-loop ) infinite}@media ( prefers-reduced-motion:reduce ){.os-holo-alive{animation:none}}`;g` ${j} ${lo} ${ze} ${it} ${at} ${rt} ${lt} ${ct} ${co} ${dt} ${pt} `;const po=g` ${j} ${dt}:host{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var( --os-ui-fg,#1d2327 );cursor:pointer}:host( [ disabled ] ){cursor:not-allowed;opacity:0.55}:host( [ block ] ){display:flex;cursor:default}:host( [ block ] ) label{cursor:pointer}:host( [ block ][ disabled ] ) label{cursor:not-allowed}label{display:inline-flex;align-items:center;gap:6px;cursor:inherit}.os-checkbox__label{line-height:1.3}.os-checkbox__label:empty{display:none}`,te=class te extends w{render(){const e=this.checked!==null,t=this.disabled!==null,s=this.label||"",n=this.value;return p`
44 + ${t?h`<span class="caption" part="caption">${t}</span>`:""}
45 + `}};se.props=["value","label","caption","swatch"],se.styles=[go],se.help=void 0;let Re=se;S("os-stat",Re);const I=b`:host{--_holo-fill:var( --os-ui-holo-fill,${"linear-gradient( 124deg, #afa2e8 0%, #f5a8ea 46%, #8ee9f7 100% )"} );--_holo-ink:var( --os-ui-holo-ink,#0c0b0f );--_holo-sheen:var( --os-ui-holo-sheen,linear-gradient( 124deg,rgba( 159,214,255,0.1 ) 0%,rgba( 236,155,255,0.12 ) 34%,rgba( 242,82,252,0.1 ) 58%,rgba( 147,240,198,0.09 ) 100% ) );--_holo-edge:var( --os-ui-holo-edge,linear-gradient( 124deg,rgba( 154,242,255,0.7 ) 0%,rgba( 236,155,255,0.85 ) 38%,rgba( 242,82,252,0.7 ) 62%,rgba( 159,152,255,0.6 ) 100% ) );--_holo-edge-quiet:var( --os-ui-holo-edge-quiet,linear-gradient( 124deg,rgba( 154,242,255,0.22 ) 0%,rgba( 236,155,255,0.28 ) 38%,rgba( 242,82,252,0.22 ) 62%,rgba( 159,152,255,0.2 ) 100% ) );--_holo-glow:var( --os-ui-holo-glow,0 0 0 1px rgba( 242,82,252,0.28 ),0 2px 10px rgba( 242,82,252,0.22 ) );--_holo-glow-strong:var( --os-ui-holo-glow-strong,0 0 0 1px rgba( 242,82,252,0.42 ),0 4px 18px rgba( 242,82,252,0.38 ),0 1px 3px rgba( 12,11,15,0.6 ) );--_holo-track:var( --os-ui-holo-track,rgba( 255,251,255,0.16 ) );--_holo-track-edge:var( --os-ui-holo-track-edge,#8c8f94 );--_holo-ring-color:var( --os-ui-accent-dim,#2271b1 );--_holo-focus:var( --os-ui-focus-ring,0 0 0 2px rgba( 12,11,15,0.9 ),0 0 0 4px #f252fc,0 0 12px 2px rgba( 242,82,252,0.45 ) );--_holo-focus-field:var( --os-ui-focus-ring-field,0 0 0 1px #f252fc,0 0 0 4px rgba( 242,82,252,0.18 ) );--_holo-t:var( --os-ui-holo-transition,220ms );--_holo-t-fast:var( --os-ui-motion-fast,140ms );--_holo-t-slow:var( --os-ui-motion-slow,340ms );--_holo-t-ambient:var( --os-ui-motion-ambient,12s );--_holo-spring:var( --os-ui-ease-spring,cubic-bezier( 0.32,1.5,0.55,1 ) );--_holo-ease:var( --os-ui-ease-out,cubic-bezier( 0.22,0.9,0.28,1 ) );--_holo-loop:var( --os-ui-ease-loop,cubic-bezier( 0.45,0,0.55,1 ) )}`,bo=b` .os-holo-fill{background-color:transparent;background-image:var( --_holo-fill );background-size:220% 220%;background-position:22% 28%;background-repeat:no-repeat;color:var( --_holo-ink );transition:background-position var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,filter var( --_holo-t ) ease}.os-holo-fill:hover{background-position:74% 66%}.os-holo-fill:active{background-position:88% 82%;filter:brightness( 0.94 )}@media ( prefers-reduced-motion:reduce ){.os-holo-fill{transition-duration:1ms}.os-holo-fill:hover,.os-holo-fill:active{background-position:22% 28%}}`,Le=b` .os-holo-sheen{position:relative;isolation:isolate}.os-holo-sheen::before{content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;background-image:var( --_holo-sheen );background-size:200% 200%;background-position:20% 30%;opacity:0;pointer-events:none;transition:opacity var( --_holo-t ) ease,background-position var( --_holo-t ) ease}.os-holo-sheen:hover::before,.os-holo-sheen:focus-visible::before{opacity:1;background-position:76% 68%}@media ( prefers-reduced-motion:reduce ){.os-holo-sheen::before{transition-duration:1ms}.os-holo-sheen:hover::before,.os-holo-sheen:focus-visible::before{background-position:20% 30%}}`,pt=b` .os-holo-edge{position:relative}.os-holo-edge::after{content:'';position:absolute;inset:0;border-radius:inherit;padding:1px;background-image:var( --_holo-edge-quiet );opacity:0;pointer-events:none;-webkit-mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );-webkit-mask-composite:xor;mask:linear-gradient( #000 0 0 ) content-box,linear-gradient( #000 0 0 );mask-composite:exclude;transition:opacity var( --_holo-t ) ease}.os-holo-edge:hover::after,.os-holo-edge:focus-visible::after{background-image:var( --_holo-edge );opacity:1}.os-holo-edge.is-lit::after{background-image:var( --_holo-edge );opacity:1}@media ( prefers-reduced-motion:reduce ){.os-holo-edge::after{transition-duration:1ms}}`,ht=b` .os-holo-glint{position:absolute;inset:0;border-radius:inherit;overflow:hidden;pointer-events:none}.os-holo-glint::before{content:'';position:absolute;top:-60%;bottom:-60%;width:45%;inset-inline-start:-60%;background:linear-gradient( 90deg,transparent 0%,rgba( 255,251,255,0.14 ) 45%,rgba( 255,251,255,0.22 ) 50%,rgba( 255,251,255,0.14 ) 55%,transparent 100% );transform:rotate( 18deg ) translateX( 0 );opacity:0}:hover>.os-holo-glint::before,:focus-visible>.os-holo-glint::before,:host(:hover )>.os-holo-glint::before,:host(:focus-visible )>.os-holo-glint::before{animation:os-holo-glint var( --_holo-t-slow ) var( --_holo-ease )}@keyframes os-holo-glint{0%{opacity:0;transform:rotate( 18deg ) translateX( 0 )}15%{opacity:1}85%{opacity:1}100%{opacity:0;transform:rotate( 18deg ) translateX( 240vw )}}@media ( prefers-reduced-motion:reduce ){:hover>.os-holo-glint::before,:focus-visible>.os-holo-glint::before,:host(:hover )>.os-holo-glint::before,:host(:focus-visible )>.os-holo-glint::before{animation:none}}`,mt=b` .os-holo-ring{position:absolute;inset:0;border-radius:inherit;box-shadow:0 0 0 0 var( --_holo-ring-color );opacity:0;pointer-events:none}:active:not(:disabled )>.os-holo-ring,:host(:active:not( [ disabled ] ) )>.os-holo-ring{animation:os-holo-ring var( --_holo-t-slow ) var( --_holo-ease )}@keyframes os-holo-ring{0%{opacity:0.45;box-shadow:0 0 0 0 var( --_holo-ring-color )}100%{opacity:0;box-shadow:0 0 0 10px transparent}}@media ( prefers-reduced-motion:reduce ){:active:not(:disabled )>.os-holo-ring,:host(:active:not( [ disabled ] ) )>.os-holo-ring{animation:none}}`,ft=b` .os-holo-shimmer{background-image:var( --_holo-fill );background-size:300% 300%;background-repeat:no-repeat;animation:os-holo-shimmer 2.4s var( --_holo-loop ) infinite}@keyframes os-holo-shimmer{0%{background-position:0% 50%}100%{background-position:100% 50%}}@media ( prefers-reduced-motion:reduce ){.os-holo-shimmer{animation:none;background-position:30% 50%}}`,gt=b` .os-holo-enter{animation:os-holo-enter var( --_holo-t ) var( --_holo-spring )}@keyframes os-holo-enter{from{opacity:0;transform:scale( 0.96 )}}@media ( prefers-reduced-motion:reduce ){.os-holo-enter{animation:none}}`,vo=b` input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ),select,textarea{transition:background-color var( --_holo-t ) ease,border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease}input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ):hover:not(:disabled ),select:hover:not(:disabled ),textarea:hover:not(:disabled ){border-color:var( --os-ui-border-strong,#8c8f94 )}input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ):focus,input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ):focus-visible,select:focus,select:focus-visible,textarea:focus,textarea:focus-visible{outline:none;border-color:var( --os-ui-accent,#2271b1 );box-shadow:var( --_holo-focus-field )}input::placeholder,textarea::placeholder{color:var( --os-ui-fg-faint,#8c8f94 );opacity:1}input::selection,textarea::selection{background:var( --os-ui-selection-bg,rgba( 159,152,255,0.6 ) );color:var( --os-ui-selection-fg,#fffbff )}@media ( prefers-reduced-motion:reduce ){input:where(:not( [ type='checkbox' ] ):not( [ type='radio' ] ) ),select,textarea{transition-duration:1ms}}`,Te=b` input[ type='checkbox' ],input[ type='radio' ]{appearance:none;-webkit-appearance:none;position:relative;flex:0 0 auto;box-sizing:border-box;width:16px;height:16px;margin:0;padding:0;border:1px solid var( --_holo-track-edge );border-radius:4px;background-color:var( --_holo-track );background-image:none;background-repeat:no-repeat;cursor:inherit;transition:background-color var( --_holo-t ) ease,border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease}input[ type='radio' ]{border-radius:50%}input[ type='checkbox' ]:hover:not(:disabled ),input[ type='radio' ]:hover:not(:disabled ){border-color:var( --os-ui-accent,#2271b1 )}input[ type='checkbox' ]:focus-visible,input[ type='radio' ]:focus-visible{outline:none;box-shadow:var( --_holo-focus )}input[ type='checkbox' ]:checked,input[ type='checkbox' ]:indeterminate,input[ type='radio' ]:checked{border-color:transparent;background-color:var( --os-ui-accent,#2271b1 )}input[ type='checkbox' ]:checked:focus-visible,input[ type='radio' ]:checked:focus-visible{box-shadow:var( --_holo-focus )}input[ type='checkbox' ]:checked::after{content:'';position:absolute;inset-inline-start:50%;top:46%;width:3.5px;height:7.5px;border:solid var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) );border-width:0 2px 2px 0;transform:translate( -50%,-50% ) rotate( 45deg );animation:os-holo-tick 180ms cubic-bezier( 0.3,1.4,0.6,1 )}input[ type='checkbox' ]:indeterminate::after{content:'';position:absolute;inset-inline-start:50%;top:50%;width:8px;height:2px;border:0;border-radius:1px;background:var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) );transform:translate( -50%,-50% )}input[ type='radio' ]:checked::after{content:'';position:absolute;inset-inline-start:50%;top:50%;width:6px;height:6px;border-radius:50%;background:var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) );transform:translate( -50%,-50% );animation:os-holo-tick 180ms cubic-bezier( 0.3,1.4,0.6,1 )}input[ type='checkbox' ]:disabled,input[ type='radio' ]:disabled{cursor:not-allowed}@keyframes os-holo-tick{from{opacity:0;transform:translate( -50%,-50% ) rotate( 45deg ) scale( 0.4 )}}@media ( prefers-reduced-motion:reduce ){input[ type='checkbox' ]:checked::after,input[ type='radio' ]:checked::after{animation:none}}`,bt=b` @keyframes os-holo-drift{0%{background-position:16% 26%}50%{background-position:84% 74%}100%{background-position:16% 26%}}.os-holo-alive{animation:os-holo-drift var( --_holo-t-ambient ) var( --_holo-loop ) infinite}@media ( prefers-reduced-motion:reduce ){.os-holo-alive{animation:none}}`;b` ${I} ${bo} ${Le} ${pt} ${ht} ${mt} ${ft} ${gt} ${vo} ${Te} ${bt} `;const _o=b` ${I} ${Te}:host{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var( --os-ui-fg,#1d2327 );cursor:pointer}:host( [ disabled ] ){cursor:not-allowed;opacity:0.55}:host( [ block ] ){display:flex;cursor:default}:host( [ block ] ) label{cursor:pointer}:host( [ block ][ disabled ] ) label{cursor:not-allowed}label{display:inline-flex;align-items:center;gap:6px;cursor:inherit}.os-checkbox__label{line-height:1.3}.os-checkbox__label:empty{display:none}`,ie=class ie extends w{render(){const e=this.checked!==null,t=this.disabled!==null,s=this.label||"",i=this.value;return h`
46 46 <label>
47 47 <input
48 48 type="checkbox"
49 49 .checked=${e}
50 50 ?disabled=${t}
51 - .value=${n??""}
52 - @change=${i=>this._onChange(i)}
51 + .value=${i??""}
52 + @change=${n=>this._onChange(n)}
53 53 />
54 54 <span class="os-checkbox__label">${s}</span>
55 55 </label>
56 - `}_onChange(e){const s=e.target.checked;s?this.setAttribute("checked",""):this.removeAttribute("checked"),this.emit("os-checkbox-change",{checked:s,value:this.value})}};te.props=["checked","value","label","disabled"],te.styles=[po],te.help=void 0;let Se=te;A("os-checkbox",Se);const uo=g` ${j} ${ze} ${it} ${at} ${rt} ${pt}:host{display:inline-flex}:host( [ fill-cell ] ){display:flex;width:100%}button{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:var( --os-ui-button-padding,6px 12px );border-radius:var( --os-ui-button-border-radius,6px );font:inherit;font-weight:500;cursor:pointer;transition:background-color var( --_holo-t ) ease,color var( --_holo-t ) ease,border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,transform 80ms ease;background:var( --os-ui-button-bg,transparent );background-image:var( --os-ui-button-bg-image,none );background-repeat:var( --os-ui-button-bg-image-repeat,repeat );background-size:var( --os-ui-button-bg-image-size,auto );background-position:var( --os-ui-button-bg-image-position,center );color:var( --os-ui-button-fg,var( --os-ui-fg,#1d2327 ) );border:var( --os-ui-button-border,1px solid var( --os-ui-border,#c3c4c7 ) )}:host( [ fill-cell ] ) button{width:100%;min-height:var( --os-ui-button-min-height,44px )}button:disabled{opacity:0.5;cursor:not-allowed}button:active:not(:disabled ){transform:translateY( 1px )}button:hover:not(:disabled ){background-color:var( --os-ui-button-bg-hover,var( --os-ui-hover,rgba( 0,0,0,0.04 ) ) )}button:focus-visible{outline:none;box-shadow:var( --_holo-focus )}button:disabled::before,button:disabled::after,button:disabled .os-holo-glint{opacity:0 !important}:host( [ variant='primary' ] ) button{background-color:var( --os-ui-button-bg,var( --wp-admin-theme-color,#2271b1 ) );color:var( --os-ui-button-fg,var( --os-ui-fg-on-accent,#fff ) );border:var( --os-ui-button-border,1px solid transparent )}:host( [ variant='primary' ] ) button:hover:not(:disabled ){filter:brightness( 1.06 );background-color:var( --os-ui-button-bg,var( --wp-admin-theme-color,#2271b1 ) );box-shadow:var( --_holo-glow )}:host( [ variant='holo' ] ) button{background-color:transparent;background-image:var( --_holo-fill );background-size:220% 220%;background-position:22% 28%;background-repeat:no-repeat;color:var( --os-ui-button-fg,var( --_holo-ink ) );border:var( --os-ui-button-border,1px solid transparent );box-shadow:var( --_holo-glow );font-weight:600;transition:background-position var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,filter var( --_holo-t ) ease,transform 80ms ease}:host( [ variant='holo' ] ) button:hover:not(:disabled ){background-color:transparent;background-position:74% 66%;box-shadow:var( --_holo-glow-strong )}:host( [ variant='holo' ] ) button:active:not(:disabled ){background-position:88% 82%;filter:brightness( 0.94 )}:host( [ variant='holo' ] ) button::before{display:none}@media ( prefers-reduced-motion:reduce ){:host( [ variant='holo' ] ) button:hover:not(:disabled ),:host( [ variant='holo' ] ) button:active:not(:disabled ){background-position:22% 28%}}:host( [ variant='secondary' ] ) button{background-color:var( --os-ui-button-bg,var( --os-ui-hover,rgba( 0,0,0,0.06 ) ) );color:var( --os-ui-button-fg,var( --os-ui-fg,#1d2327 ) );border:var( --os-ui-button-border,1px solid transparent )}:host( [ variant='secondary' ] ) button:hover:not(:disabled ){background-color:var( --os-ui-button-bg-hover,var( --os-ui-hover,rgba( 0,0,0,0.1 ) ) )}:host( [ variant='danger' ] ) button{background-color:var( --os-ui-button-bg,transparent );color:var( --os-ui-button-fg,var( --os-ui-danger,#d63638 ) );border:var( --os-ui-button-border,1px solid currentColor )}:host( [ variant='danger' ] ) button:hover:not(:disabled ){background-color:var( --os-ui-danger,#d63638 );color:var( --os-ui-fg-on-accent,#fff )}:host( [ variant='danger' ] ) button::after{display:none}:host( [ variant='link' ] ) button{background-color:transparent;background-image:none;color:var( --os-ui-button-fg,var( --wp-admin-theme-color,#2271b1 ) );border:0;padding:0;text-decoration:underline}:host( [ variant='link' ] ) button::before,:host( [ variant='link' ] ) button::after,:host( [ variant='link' ] ) .os-holo-glint,:host( [ variant='link' ] ) .os-holo-ring{display:none}:host( [ variant='link' ] ) button:active:not(:disabled ){transform:none}:host( [ busy ] ) button{pointer-events:none;opacity:0.75}:host( [ variant='holo' ][ busy ] ) button{animation:os-holo-drift 12s ease-in-out infinite}@media ( prefers-reduced-motion:reduce ){:host( [ variant='holo' ][ busy ] ) button{animation:none}}.os-button__spinner{box-sizing:border-box;display:inline-block;width:12px;height:12px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:os-button-spin 0.6s linear infinite;flex-shrink:0}@keyframes os-button-spin{to{transform:rotate( 360deg )}}`,oe=class oe extends w{render(){const e=this.disabled!==null,t=this.busy!==null,s=this.type||"button";return p`
56 + `}_onChange(e){const s=e.target.checked;s?this.setAttribute("checked",""):this.removeAttribute("checked"),this.emit("os-checkbox-change",{checked:s,value:this.value})}};ie.props=["checked","value","label","disabled"],ie.styles=[_o],ie.help=void 0;let Ne=ie;S("os-checkbox",Ne);const yo=b` ${I} ${Le} ${pt} ${ht} ${mt} ${bt}:host{display:inline-flex}:host( [ fill-cell ] ){display:flex;width:100%}button{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:var( --os-ui-button-padding,6px 12px );border-radius:var( --os-ui-button-border-radius,6px );font:inherit;font-weight:500;cursor:pointer;transition:background-color var( --_holo-t ) ease,color var( --_holo-t ) ease,border-color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,transform 80ms ease;background:var( --os-ui-button-bg,transparent );background-image:var( --os-ui-button-bg-image,none );background-repeat:var( --os-ui-button-bg-image-repeat,repeat );background-size:var( --os-ui-button-bg-image-size,auto );background-position:var( --os-ui-button-bg-image-position,center );color:var( --os-ui-button-fg,var( --os-ui-fg,#1d2327 ) );border:var( --os-ui-button-border,1px solid var( --os-ui-border,#c3c4c7 ) )}:host( [ fill-cell ] ) button{width:100%;min-height:var( --os-ui-button-min-height,44px )}button:disabled{opacity:0.5;cursor:not-allowed}button:active:not(:disabled ){transform:translateY( 1px )}button:hover:not(:disabled ){background-color:var( --os-ui-button-bg-hover,var( --os-ui-hover,rgba( 0,0,0,0.04 ) ) )}button:focus-visible{outline:none;box-shadow:var( --_holo-focus )}button:disabled::before,button:disabled::after,button:disabled .os-holo-glint{opacity:0 !important}:host( [ variant='primary' ] ) button{background-color:var( --os-ui-button-bg,var( --wp-admin-theme-color,#2271b1 ) );color:var( --os-ui-button-fg,var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) ) );border:var( --os-ui-button-border,1px solid transparent )}:host( [ variant='primary' ] ) button:hover:not(:disabled ){filter:brightness( 1.06 );background-color:var( --os-ui-button-bg,var( --wp-admin-theme-color,#2271b1 ) );box-shadow:var( --_holo-glow )}:host( [ variant='holo' ] ) button{background-color:transparent;background-image:var( --_holo-fill );background-size:220% 220%;background-position:22% 28%;background-repeat:no-repeat;color:var( --os-ui-button-fg,var( --_holo-ink ) );border:var( --os-ui-button-border,1px solid transparent );box-shadow:var( --_holo-glow );font-weight:600;transition:background-position var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,filter var( --_holo-t ) ease,transform 80ms ease}:host( [ variant='holo' ] ) button:hover:not(:disabled ){background-color:transparent;background-position:74% 66%;box-shadow:var( --_holo-glow-strong )}:host( [ variant='holo' ] ) button:active:not(:disabled ){background-position:88% 82%;filter:brightness( 0.94 )}:host( [ variant='holo' ] ) button::before{display:none}@media ( prefers-reduced-motion:reduce ){:host( [ variant='holo' ] ) button:hover:not(:disabled ),:host( [ variant='holo' ] ) button:active:not(:disabled ){background-position:22% 28%}}:host( [ variant='secondary' ] ) button{background-color:var( --os-ui-button-bg,var( --os-ui-hover,rgba( 0,0,0,0.06 ) ) );color:var( --os-ui-button-fg,var( --os-ui-fg,#1d2327 ) );border:var( --os-ui-button-border,1px solid transparent )}:host( [ variant='secondary' ] ) button:hover:not(:disabled ){background-color:var( --os-ui-button-bg-hover,var( --os-ui-hover,rgba( 0,0,0,0.1 ) ) )}:host( [ variant='danger' ] ) button{background-color:var( --os-ui-button-bg,transparent );color:var( --os-ui-button-fg,var( --os-ui-danger,#d63638 ) );border:var( --os-ui-button-border,1px solid currentColor )}:host( [ variant='danger' ] ) button:hover:not(:disabled ){background-color:var( --os-ui-danger,#d63638 );color:var( --os-ui-fg-on-accent,#fff )}:host( [ variant='danger' ] ) button::after{display:none}:host( [ variant='link' ] ) button{background-color:transparent;background-image:none;color:var( --os-ui-button-fg,var( --wp-admin-theme-color,#2271b1 ) );border:0;padding:0;text-decoration:underline}:host( [ variant='link' ] ) button::before,:host( [ variant='link' ] ) button::after,:host( [ variant='link' ] ) .os-holo-glint,:host( [ variant='link' ] ) .os-holo-ring{display:none}:host( [ variant='link' ] ) button:active:not(:disabled ){transform:none}:host( [ busy ] ) button{pointer-events:none;opacity:0.75}:host( [ variant='holo' ][ busy ] ) button{animation:os-holo-drift 12s ease-in-out infinite}@media ( prefers-reduced-motion:reduce ){:host( [ variant='holo' ][ busy ] ) button{animation:none}}.os-button__spinner{box-sizing:border-box;display:inline-block;width:12px;height:12px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:os-button-spin 0.6s linear infinite;flex-shrink:0}@keyframes os-button-spin{to{transform:rotate( 360deg )}}`,ne=class ne extends w{static get observedAttributes(){return[...super.observedAttributes,"aria-label"]}render(){const e=this.disabled!==null,t=this.busy!==null,s=this.type||"button",i=this.getAttribute("aria-label")||"";return h`
57 57 <button
58 58 part="button"
59 59 class="os-holo-edge os-holo-sheen"
60 60 type=${s}
@@ -59,10 +59,11 @@
59 59 class="os-holo-edge os-holo-sheen"
60 60 type=${s}
61 61 ?disabled=${e||t}
62 62 aria-busy=${t?"true":"false"}
63 + aria-label=${i}
63 64 >
64 - ${t?p`<span class="os-button__spinner" aria-hidden="true"></span>`:""}
65 + ${t?h`<span class="os-button__spinner" aria-hidden="true"></span>`:""}
65 66 <slot></slot>
66 67 <!--
67 68 The two motion layers. Elements rather than
68 69 pseudo-elements because the sheen and the hairline
@@ -72,16 +73,16 @@
72 73 -->
73 74 <span class="os-holo-glint" aria-hidden="true"></span>
74 75 <span class="os-holo-ring" aria-hidden="true"></span>
75 76 </button>
76 - `}};oe.props=["variant","disabled","type","busy","fill-cell"],oe.styles=[uo],oe.help=void 0;let Ce=oe;A("os-button",Ce);const ho=g` ${j} ${ct}:host{display:none;position:fixed;min-width:180px;background-color:var( --os-ui-context-menu-bg,#1d2327 );background-image:var( --os-ui-menu-bg-image,none );background-repeat:var( --os-ui-menu-bg-image-repeat,repeat );background-size:var( --os-ui-menu-bg-image-size,auto );background-position:var( --os-ui-menu-bg-image-position,center );color:var( --os-ui-context-menu-fg,var( --os-fg,#fff ) );border:1px solid var( --os-ui-border,rgba( 255,255,255,0.08 ) );border-radius:8px;box-shadow:0 8px 24px rgba( 0,0,0,0.45 );padding:4px;font-size:13px;line-height:1.3;z-index:9999}:host( [ open ] ){display:block;animation:os-holo-enter var( --_holo-t-fast ) var( --_holo-ease );transform-origin:top left;box-sizing:border-box;max-block-size:calc( 100vh - 16px );max-block-size:calc( 100dvh - 16px );overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}:host( [ open ]:dir( rtl ) ){transform-origin:top right}@media ( prefers-reduced-motion:reduce ){:host( [ open ] ){animation:none}}`,mo=g`:host{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:0;background:transparent;color:inherit;text-align:start;cursor:pointer;border-radius:4px;box-sizing:border-box;user-select:none}:host(:hover ),:host( [ active ] ){background:var( --os-ui-hover,rgba( 255,255,255,0.1 ) );outline:none}:host( [ disabled ] ){opacity:0.45;cursor:not-allowed}:host( [ danger ] ){color:var( --os-ui-danger-hover,#ff8a8a )}:host( [ danger ]:hover ){background:var( --os-ui-badge-danger-bg,rgba( 255,90,90,0.18 ) )}:host( [ heading ] ){padding:8px 10px 4px;font-size:10px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var( --os-ui-context-menu-fg-muted,var( --os-ui-fg-muted,rgba( 255,255,255,0.5 ) ) );pointer-events:none}.icon{display:inline-flex;align-items:center;justify-content:center;font-size:18px;width:20px;height:20px}.label{flex:1}.chevron{margin-inline-start:auto;padding-inline-start:8px;font-size:16px;line-height:1;opacity:0.7}.check{display:inline-flex;align-items:center;justify-content:center;width:14px;font-size:13px;line-height:1;opacity:0.95}`,se=class se extends w{render(){return p`
77 + `}};ne.props=["variant","disabled","type","busy","fill-cell"],ne.styles=[yo],ne.help=void 0;let Pe=ne;S("os-button",Pe);const xo=b` ${I} ${gt}:host{display:none;position:fixed;min-width:180px;background-color:var( --os-ui-context-menu-bg,#1d2327 );background-image:var( --os-ui-menu-bg-image,none );background-repeat:var( --os-ui-menu-bg-image-repeat,repeat );background-size:var( --os-ui-menu-bg-image-size,auto );background-position:var( --os-ui-menu-bg-image-position,center );color:var( --os-ui-context-menu-fg,var( --os-fg,#fff ) );border:1px solid var( --os-ui-border,rgba( 255,255,255,0.08 ) );border-radius:8px;box-shadow:0 8px 24px rgba( 0,0,0,0.45 );padding:4px;font-size:13px;line-height:1.3;z-index:9999}:host( [ open ] ){display:block;animation:os-holo-enter var( --_holo-t-fast ) var( --_holo-ease );transform-origin:top left;box-sizing:border-box;max-block-size:calc( 100vh - 16px );max-block-size:calc( 100dvh - 16px );overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}:host( [ open ]:dir( rtl ) ){transform-origin:top right}@media ( prefers-reduced-motion:reduce ){:host( [ open ] ){animation:none}}`,ko=b`:host{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:0;background:transparent;color:inherit;text-align:start;cursor:pointer;border-radius:4px;box-sizing:border-box;user-select:none}:host(:hover ),:host( [ active ] ){background:var( --os-ui-hover,rgba( 255,255,255,0.1 ) );outline:none}:host( [ disabled ] ){opacity:0.45;cursor:not-allowed}:host( [ danger ] ){color:var( --os-ui-danger-hover,#ff8a8a )}:host( [ danger ]:hover ){background:var( --os-ui-badge-danger-bg,rgba( 255,90,90,0.18 ) )}:host( [ heading ] ){padding:8px 10px 4px;font-size:10px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var( --os-ui-context-menu-fg-muted,var( --os-ui-fg-muted,rgba( 255,255,255,0.5 ) ) );pointer-events:none}.icon{display:inline-flex;align-items:center;justify-content:center;font-size:18px;width:20px;height:20px}.label{flex:1}.chevron{margin-inline-start:auto;padding-inline-start:8px;font-size:16px;line-height:1;opacity:0.7}.check{display:inline-flex;align-items:center;justify-content:center;width:14px;font-size:13px;line-height:1;opacity:0.95}`,re=class re extends w{render(){return h`
77 78 <slot></slot>
78 - `}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu")}};se.props=["open"],se.styles=[ho],se.help=void 0;let Ee=se;A("os-context-menu",Ee);const ne=class ne extends w{constructor(){super(...arguments),this._onActivate=e=>{if(this.hasAttribute("disabled")||this.hasAttribute("heading"))return;const t=e.target;t&&t!==this&&t.closest("os-context-menu-option")!==this||this.emit("os-context-menu-pick",{id:this.dataset.menuItemId??this.id??"",value:this.getAttribute("value")??""})},this._onKey=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._onActivate(e))}}connectedCallback(){super.connectedCallback();const e=this.hasAttribute("heading");this.setAttribute("role",e?"presentation":"menuitem"),e||this.setAttribute("tabindex","0"),this.addEventListener("click",this._onActivate),this.addEventListener("keydown",this._onKey)}disconnectedCallback(){this.removeEventListener("click",this._onActivate),this.removeEventListener("keydown",this._onKey)}render(){const e=this.getAttribute("icon"),t=this.hasAttribute("has-children"),s=this.hasAttribute("checked");return p`
79 - ${s?p`<span class="check" aria-hidden="true">✓</span>`:p``}
80 - ${e?p`<span class="icon dashicons ${e}" aria-hidden="true"></span>`:p``}
79 + `}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu")}};re.props=["open"],re.styles=[xo],re.help=void 0;let Me=re;S("os-context-menu",Me);const ae=class ae extends w{constructor(){super(...arguments),this._onActivate=e=>{if(this.hasAttribute("disabled")||this.hasAttribute("heading"))return;const t=e.target;t&&t!==this&&t.closest("os-context-menu-option")!==this||this.emit("os-context-menu-pick",{id:this.dataset.menuItemId??this.id??"",value:this.getAttribute("value")??""})},this._onKey=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._onActivate(e))}}connectedCallback(){super.connectedCallback();const e=this.hasAttribute("heading");this.setAttribute("role",e?"presentation":"menuitem"),e||this.setAttribute("tabindex","0"),this.addEventListener("click",this._onActivate),this.addEventListener("keydown",this._onKey)}disconnectedCallback(){this.removeEventListener("click",this._onActivate),this.removeEventListener("keydown",this._onKey)}render(){const e=this.getAttribute("icon"),t=this.hasAttribute("has-children"),s=this.hasAttribute("checked");return h`
80 + ${s?h`<span class="check" aria-hidden="true">✓</span>`:h``}
81 + ${e?h`<span class="icon dashicons ${e}" aria-hidden="true"></span>`:h``}
81 82 <span class="label"><slot></slot></span>
82 - ${t?p`<span class="chevron" aria-hidden="true">›</span>`:p``}
83 - `}};ne.props=["value","icon","disabled","danger","heading","has-children","checked"],ne.styles=[mo],ne.help={title:"Context menu option",summary:"Single row inside <os-context-menu>. Use `icon` for a leading dashicon, `danger` for destructive items, `heading` for a non-interactive section header, `has-children` to render a trailing chevron.",status:"stable",props:[{name:"value",type:"string",description:"Forwarded as `detail.value` on activation."},{name:"icon",type:"string",description:"Dashicon class (e.g. `dashicons-trash`)."},{name:"disabled",type:"boolean attribute",description:"Renders the option dimmed; clicks are ignored."},{name:"danger",type:"boolean attribute",description:"Destructive styling — red text, red hover."},{name:"heading",type:"boolean attribute",description:"Non-interactive section header. Ignores clicks."},{name:"has-children",type:"boolean attribute",description:"Renders a trailing chevron to suggest a submenu."},{name:"checked",type:"boolean attribute",description:"Renders a leading check mark — for radio-style picks inside a submenu (e.g. the active Sort By order)."}],slots:[{name:"(default)",description:"Visible label."}],events:[{name:"os-context-menu-pick",description:"Bubbled on click / Enter for non-heading non-disabled options. Detail: `{ id, value }`."}],example:p`
83 + ${t?h`<span class="chevron" aria-hidden="true">›</span>`:h``}
84 + `}};ae.props=["value","icon","disabled","danger","heading","has-children","checked"],ae.styles=[ko],ae.help={title:"Context menu option",summary:"Single row inside <os-context-menu>. Use `icon` for a leading dashicon, `danger` for destructive items, `heading` for a non-interactive section header, `has-children` to render a trailing chevron.",status:"stable",props:[{name:"value",type:"string",description:"Forwarded as `detail.value` on activation."},{name:"icon",type:"string",description:"Dashicon class (e.g. `dashicons-trash`)."},{name:"disabled",type:"boolean attribute",description:"Renders the option dimmed; clicks are ignored."},{name:"danger",type:"boolean attribute",description:"Destructive styling — red text, red hover."},{name:"heading",type:"boolean attribute",description:"Non-interactive section header. Ignores clicks."},{name:"has-children",type:"boolean attribute",description:"Renders a trailing chevron to suggest a submenu."},{name:"checked",type:"boolean attribute",description:"Renders a leading check mark — for radio-style picks inside a submenu (e.g. the active Sort By order)."}],slots:[{name:"(default)",description:"Visible label."}],events:[{name:"os-context-menu-pick",description:"Bubbled on click / Enter for non-heading non-disabled options. Detail: `{ id, value }`."}],example:h`
84 85 <os-context-menu open style="position: relative; z-index: 0">
85 86 <os-context-menu-option heading>Every variant</os-context-menu-option>
86 87 <os-context-menu-option value="plain">Plain</os-context-menu-option>
87 88 <os-context-menu-option value="icon" icon="dashicons-admin-page">
@@ -97,55 +98,63 @@
97 98 <os-context-menu-option value="del" danger icon="dashicons-trash">
98 99 Danger
99 100 </os-context-menu-option>
100 101 </os-context-menu>
101 - `};let Te=ne;A("os-context-menu-option",Te);function fo(o,e){o.style.visibility="hidden";const t=()=>{o.isConnected&&(e(o.getBoundingClientRect()),o.style.visibility="")};typeof requestAnimationFrame=="function"?requestAnimationFrame(t):t()}const go=g`:host{display:inline-block}:host([hidden]){display:none}.panel{position:fixed;inset:auto;margin:0;padding:0;border:0;background:transparent;overflow:visible;max-inline-size:calc(100vw - 16px)}.panel[hidden]{display:none}os-context-menu{position:relative;inset:auto;max-inline-size:calc(100vw - 16px)}os-button::part(button){min-block-size:30px}.chevron{display:inline-block;inline-size:5px;block-size:5px;border-inline-end:1.5px solid currentColor;border-block-end:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);margin-inline-start:5px;vertical-align:middle}:host(:dir(rtl)) .chevron{transform:translateY(-2px) rotate(-45deg)}`,ie=class ie extends w{constructor(){super(...arguments),this.opened=!1,this.listeners=null,this.onKey=e=>{if(e.key==="Escape"||e.key==="Tab"){e.key==="Escape"&&(e.preventDefault(),e.stopPropagation()),this.close();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(e.key))return;e.preventDefault(),e.stopPropagation();const t=this.options();let n=t.indexOf(this.ownerDocument.activeElement)+(e.key==="ArrowUp"?-1:1);e.key==="Home"&&(n=0),e.key==="End"&&(n=t.length-1),t[(n+t.length)%t.length]?.focus()}}get panel(){return this.shadowRoot?.querySelector(".panel")??null}get trigger(){return this.shadowRoot?.querySelector("os-button")?.shadowRoot?.querySelector("button")??null}options(){return Array.from(this.querySelectorAll("os-context-menu-option:not([heading]):not([disabled])"))}render(){return p`<os-button variant="ghost" @click=${()=>this.opened?this.close():this.show()} @keydown=${e=>{(e.key==="ArrowDown"||e.key==="ArrowUp")&&(e.preventDefault(),this.show(e.key==="ArrowUp"))}}>${this.getAttribute("text")||"Actions"} <span class="chevron" aria-hidden="true"></span></os-button>
102 - <div class="panel" popover="manual" hidden><os-context-menu open aria-label=${this.getAttribute("label")||"Actions"}><slot></slot></os-context-menu></div>`}requestUpdate(){this.opened&&this.close(!1),super.requestUpdate(),queueMicrotask(()=>queueMicrotask(()=>this.syncTrigger()))}syncTrigger(){this.trigger?.setAttribute("aria-label",this.getAttribute("label")||"Actions"),this.trigger?.setAttribute("aria-haspopup","menu"),this.trigger?.setAttribute("aria-expanded",String(this.opened))}show(e=!1){if(this.opened||!this.panel)return;this.opened=!0,this.panel.hidden=!1,this.panel.showPopover?.(),this.syncTrigger();const t=this.panel;fo(t,n=>{if(!this.opened)return;const i=this.getBoundingClientRect(),r=getComputedStyle(this).direction==="rtl";t.style.left=`${Math.max(8,Math.min(r?i.left:i.right-n.width,window.innerWidth-n.width-8))}px`,t.style.top=`${Math.max(8,Math.min(i.bottom+5+n.height<=window.innerHeight-8?i.bottom+5:i.top-n.height-5,window.innerHeight-n.height-8))}px`;const l=this.options();l[e?l.length-1:0]?.focus({preventScroll:!0})}),this.listeners=new AbortController;const{signal:s}=this.listeners;document.addEventListener("pointerdown",n=>{n.composedPath().includes(this)||this.close(!1)},{capture:!0,signal:s}),document.addEventListener("focusin",n=>{n.composedPath().includes(this)||this.close(!1)},{signal:s}),document.addEventListener("scroll",n=>{n.composedPath().includes(t)||this.close(!1)},{capture:!0,signal:s}),window.addEventListener("resize",()=>this.close(!1),{signal:s}),this.addEventListener("keydown",this.onKey,{signal:s}),this.addEventListener("os-context-menu-pick",()=>this.close(),{capture:!0,signal:s})}close(e=!0){this.opened&&(this.opened=!1,this.listeners?.abort(),this.listeners=null,this.panel?.isConnected&&this.panel.hidePopover?.(),this.panel&&(this.panel.hidden=!0),this.syncTrigger(),e&&this.isConnected&&this.trigger?.focus({preventScroll:!0}))}disconnectedCallback(){this.close(!1)}};ie.props=["label","text"],ie.styles=[go],ie.help=void 0;let Re=ie;A("os-action-menu",Re);const Ne=new Map;async function bo(o){if(!o)return null;let e;try{e=new URL(o,window.location.href)}catch{return o}if(!/gravatar\.com$/i.test(e.hostname))return o;e.searchParams.delete("d"),e.searchParams.delete("s");const t=e.toString(),s=Ne.get(t);if(s!==void 0)return s instanceof Promise,s;const n=new URL(o,window.location.href);n.searchParams.set("d","blank");const i=new Promise(r=>{const l=new Image;l.crossOrigin="anonymous",l.onload=()=>{try{const d=document.createElement("canvas");d.width=1,d.height=1;const c=d.getContext("2d",{willReadFrequently:!0});if(!c){r(o);return}c.drawImage(l,0,0,1,1);const h=c.getImageData(0,0,1,1).data;r(h[3]===0?null:o)}catch{r(o)}},l.onerror=()=>r(null),l.src=n.toString()}).then(r=>(Ne.set(t,r),r));return Ne.set(t,i),i}function ut(o){return o?.["48"]??o?.["96"]??o?.["24"]??""}function ht(o,e){e&&bo(e).then(t=>{o.isConnected&&(t?o.setAttribute("src",t):o.removeAttribute("src"))})}function vo(o){const e=document.createElement("button");e.type="button",e.setAttribute("data-noclick",""),e.setAttribute("aria-label",o.label),e.title=o.label;const t=o.variant==="danger",s=t?"var( --os-ui-danger, #d63638 )":"var( --os-ui-fg-muted, #50575e )",n=t?"var( --os-ui-danger, #d63638 )":"var( --os-ui-border, #c3c4c7 )",i="var( --os-ui-surface, #fff )",r=()=>{e.style.background=i,e.style.color=s,e.style.borderColor=n},l=()=>{t?(e.style.background="var( --os-ui-danger, #d63638 )",e.style.color="var( --os-ui-fg-on-accent, #fff )",e.style.borderColor="var( --os-ui-danger, #d63638 )"):(e.style.background="var( --os-ui-hover, #f0f0f1 )",e.style.color="var( --os-ui-fg, #1d2327 )",e.style.borderColor="var( --os-ui-border-strong, #8c8f94 )")},d=o.labelled===!0;if(e.style.cssText=["display: inline-flex","align-items: center","justify-content: center",d?"gap: 6px":"",d?"flex: 0 0 auto":"flex: 0 0 30px",d?"width: auto":"width: 30px",d?"height: 36px":"height: 30px",d?"padding: 0 12px":"padding: 0",d?"font-size: 13px":"",d?"font-weight: 600":"","margin: 0","border: 1px solid "+n,"border-radius: 6px","background: "+i,"color: "+s,"cursor: pointer","box-sizing: border-box","line-height: 1","font: inherit","transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease"].join(";"),e.addEventListener("mouseenter",l),e.addEventListener("mouseleave",r),e.addEventListener("focus",l),e.addEventListener("blur",r),e.appendChild(o.glyph),d){const c=document.createElement("span");c.textContent=o.label,c.style.cssText="white-space: nowrap; line-height: 1;",e.appendChild(c)}return e.addEventListener("click",c=>{c.stopPropagation(),o.onClick()}),e}const mt="desktop-mode-user-edit";function _o(o,e={}){if(!Number.isFinite(o)||o<=0)return!1;const t=window.wp?.os;return t?.openWindow?.(mt,{source:e.source??"user-edit/open",params:{userId:o}})?(t?.relations?.set?.(mt,{type:"user",id:o}),!0):(e.fallback?.(),!1)}const yo=g`:host{display:inline-flex;align-items:center;justify-content:center;width:var( --os-ui-icon-size,16px );height:var( --os-ui-icon-size,16px );color:inherit;line-height:1}:host( [ hidden ] ){display:none}.os-icon__glyph{font-size:var( --os-ui-icon-size,16px );width:var( --os-ui-icon-size,16px );height:var( --os-ui-icon-size,16px );line-height:1;color:inherit;display:inline-flex;align-items:center;justify-content:center}.os-icon__glyph--char{font-family:dashicons;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none}.os-icon__glyph.dashicons{font-family:dashicons}`;let ge=null;function xo(o){let e=o.trim();if(e==="")return null;(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1));const t=e.match(/^\\([0-9a-f]{1,6})\s?$/i);return t?String.fromCodePoint(parseInt(t[1],16)):e||null}function ft(){const o=new Map;if(typeof document>"u")return o;const e=Array.from(document.styleSheets??[]);for(const t of e){let s=null;try{s=t.cssRules}catch{continue}if(s)for(const n of Array.from(s)){const i=n;if(!i||!i.selectorText)continue;const r=i.selectorText.match(/\.dashicons-([a-z0-9-]+)::?before/i);if(!r)continue;const l=i.style?.content;if(!l)continue;const d=xo(l);d&&o.set(r[1],d)}}return o}function ko(o){ge||(ge=ft());const e=o.startsWith("dashicons-")?o.slice(10):o;return ge.get(e)??null}function $o(){ge=ft()}let gt=!1;function wo(){if(gt||typeof window>"u")return;gt=!0;const o=()=>{$o()};document.readyState==="loading"&&document.addEventListener("DOMContentLoaded",o,{once:!0}),window.addEventListener("load",o,{once:!0})}wo();const ae=class ae extends w{render(){const e=this.name||"",t=e.startsWith("dashicons-")?e.slice(10):e,s=this.size;s&&/^\d+$/.test(s)&&this.style.setProperty("--os-ui-icon-size",`${s}px`);const n=ko(t);return n?p`<span
102 + `};let Ie=ae;S("os-context-menu-option",Ie);function wo(o,e){o.style.visibility="hidden";const t=()=>{o.isConnected&&(e(o.getBoundingClientRect()),o.style.visibility="")};typeof requestAnimationFrame=="function"?requestAnimationFrame(t):t()}const $o=b`:host{display:inline-block}:host([hidden]){display:none}.panel{position:fixed;inset:auto;margin:0;padding:0;border:0;background:transparent;overflow:visible;max-inline-size:calc(100vw - 16px)}.panel[hidden]{display:none}os-context-menu{position:relative;inset:auto;max-inline-size:calc(100vw - 16px)}os-button::part(button){min-block-size:30px}.chevron{display:inline-block;inline-size:5px;block-size:5px;border-inline-end:1.5px solid currentColor;border-block-end:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);margin-inline-start:5px;vertical-align:middle}:host(:dir(rtl)) .chevron{transform:translateY(-2px) rotate(-45deg)}`,le=class le extends w{constructor(){super(...arguments),this.opened=!1,this.listeners=null,this.onKey=e=>{if(e.key==="Escape"||e.key==="Tab"){e.key==="Escape"&&(e.preventDefault(),e.stopPropagation()),this.close();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(e.key))return;e.preventDefault(),e.stopPropagation();const t=this.options();let i=t.indexOf(this.ownerDocument.activeElement)+(e.key==="ArrowUp"?-1:1);e.key==="Home"&&(i=0),e.key==="End"&&(i=t.length-1),t[(i+t.length)%t.length]?.focus()}}get panel(){return this.shadowRoot?.querySelector(".panel")??null}get trigger(){return this.shadowRoot?.querySelector("os-button")?.shadowRoot?.querySelector("button")??null}options(){return Array.from(this.querySelectorAll("os-context-menu-option:not([heading]):not([disabled])"))}render(){return h`<os-button variant="ghost" @click=${()=>this.opened?this.close():this.show()} @keydown=${e=>{(e.key==="ArrowDown"||e.key==="ArrowUp")&&(e.preventDefault(),this.show(e.key==="ArrowUp"))}}>${this.getAttribute("text")||"Actions"} <span class="chevron" aria-hidden="true"></span></os-button>
103 + <div class="panel" popover="manual" hidden><os-context-menu open aria-label=${this.getAttribute("label")||"Actions"}><slot></slot></os-context-menu></div>`}requestUpdate(){this.opened&&this.close(!1),super.requestUpdate(),queueMicrotask(()=>queueMicrotask(()=>this.syncTrigger()))}syncTrigger(){this.trigger?.setAttribute("aria-label",this.getAttribute("label")||"Actions"),this.trigger?.setAttribute("aria-haspopup","menu"),this.trigger?.setAttribute("aria-expanded",String(this.opened))}show(e=!1){if(this.opened||!this.panel)return;this.opened=!0,this.panel.hidden=!1,this.panel.showPopover?.(),this.syncTrigger();const t=this.panel;wo(t,i=>{if(!this.opened)return;const n=this.getBoundingClientRect(),r=getComputedStyle(this).direction==="rtl";t.style.left=`${Math.max(8,Math.min(r?n.left:n.right-i.width,window.innerWidth-i.width-8))}px`,t.style.top=`${Math.max(8,Math.min(n.bottom+5+i.height<=window.innerHeight-8?n.bottom+5:n.top-i.height-5,window.innerHeight-i.height-8))}px`;const a=this.options();a[e?a.length-1:0]?.focus({preventScroll:!0})}),this.listeners=new AbortController;const{signal:s}=this.listeners;document.addEventListener("pointerdown",i=>{i.composedPath().includes(this)||this.close(!1)},{capture:!0,signal:s}),document.addEventListener("focusin",i=>{i.composedPath().includes(this)||this.close(!1)},{signal:s}),document.addEventListener("scroll",i=>{i.composedPath().includes(t)||this.close(!1)},{capture:!0,signal:s}),window.addEventListener("resize",()=>this.close(!1),{signal:s}),this.addEventListener("keydown",this.onKey,{signal:s}),this.addEventListener("os-context-menu-pick",()=>this.close(),{capture:!0,signal:s})}close(e=!0){this.opened&&(this.opened=!1,this.listeners?.abort(),this.listeners=null,this.panel?.isConnected&&this.panel.hidePopover?.(),this.panel&&(this.panel.hidden=!0),this.syncTrigger(),e&&this.isConnected&&this.trigger?.focus({preventScroll:!0}))}disconnectedCallback(){this.close(!1)}};le.props=["label","text"],le.styles=[$o],le.help=void 0;let qe=le;S("os-action-menu",qe);const De=new Map;async function So(o){if(!o)return null;let e;try{e=new URL(o,window.location.href)}catch{return o}if(!/gravatar\.com$/i.test(e.hostname))return o;e.searchParams.delete("d"),e.searchParams.delete("s");const t=e.toString(),s=De.get(t);if(s!==void 0)return s instanceof Promise,s;const i=new URL(o,window.location.href);i.searchParams.set("d","blank");const n=new Promise(r=>{const a=new Image;a.crossOrigin="anonymous",a.onload=()=>{try{const c=document.createElement("canvas");c.width=1,c.height=1;const d=c.getContext("2d",{willReadFrequently:!0});if(!d){r(o);return}d.drawImage(a,0,0,1,1);const p=d.getImageData(0,0,1,1).data;r(p[3]===0?null:o)}catch{r(o)}},a.onerror=()=>r(null),a.src=i.toString()}).then(r=>(De.set(t,r),r));return De.set(t,n),n}function vt(o){return o?.["48"]??o?.["96"]??o?.["24"]??""}function _t(o,e){e&&So(e).then(t=>{o.isConnected&&(t?o.setAttribute("src",t):o.removeAttribute("src"))})}function Ao(o){const e=document.createElement("button");e.type="button",e.setAttribute("data-noclick",""),e.setAttribute("aria-label",o.label),e.title=o.label;const t=o.variant==="danger",s=t?"var( --os-ui-danger, #d63638 )":"var( --os-ui-fg-muted, #50575e )",i=t?"var( --os-ui-danger, #d63638 )":"var( --os-ui-border, #c3c4c7 )",n="var( --os-ui-surface, #fff )",r=()=>{e.style.background=n,e.style.color=s,e.style.borderColor=i},a=()=>{t?(e.style.background="var( --os-ui-danger, #d63638 )",e.style.color="var( --os-ui-fg-on-accent, #fff )",e.style.borderColor="var( --os-ui-danger, #d63638 )"):(e.style.background="var( --os-ui-hover, #f0f0f1 )",e.style.color="var( --os-ui-fg, #1d2327 )",e.style.borderColor="var( --os-ui-border-strong, #8c8f94 )")},c=o.labelled===!0;if(e.style.cssText=["display: inline-flex","align-items: center","justify-content: center",c?"gap: 6px":"",c?"flex: 0 0 auto":"flex: 0 0 30px",c?"width: auto":"width: 30px",c?"height: 36px":"height: 30px",c?"padding: 0 12px":"padding: 0",c?"font-size: 13px":"",c?"font-weight: 600":"","margin: 0","border: 1px solid "+i,"border-radius: 6px","background: "+n,"color: "+s,"cursor: pointer","box-sizing: border-box","line-height: 1","font: inherit","transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease"].join(";"),e.addEventListener("mouseenter",a),e.addEventListener("mouseleave",r),e.addEventListener("focus",a),e.addEventListener("blur",r),e.appendChild(o.glyph),c){const d=document.createElement("span");d.textContent=o.label,d.style.cssText="white-space: nowrap; line-height: 1;",e.appendChild(d)}return e.addEventListener("click",d=>{d.stopPropagation(),o.onClick()}),e}const yt="desktop-mode-user-edit";function Co(o,e={}){if(!Number.isFinite(o)||o<=0)return!1;const t=window.wp?.os;return t?.openWindow?.(yt,{source:e.source??"user-edit/open",params:{userId:o}})?(t?.relations?.set?.(yt,{type:"user",id:o}),!0):(e.fallback?.(),!1)}const zo=b` ${I} ${Te}:host{display:block;--_bg:var( --os-ui-table-bg,var( --os-ui-surface,#fff ) );--_border:var( --os-ui-table-border,var( --os-ui-border,rgba( 0,0,0,0.08 ) ) );--_column-border:var( --os-ui-table-column-border,var( --os-ui-border-strong,rgba( 0,0,0,0.14 ) ) );--_header-bg:var( --os-ui-table-header-bg,var( --os-ui-surface-elevated,#f6f7f7 ) );--_row-hover:var( --os-ui-table-row-hover,var( --os-ui-hover,rgba( 0,0,0,0.04 ) ) );--_stripe:var( --os-ui-table-stripe,var( --os-ui-surface-subtle,rgba( 0,0,0,0.03 ) ) );--_cell-padding:var( --os-ui-table-cell-padding,8px 12px );--_font-size:var( --os-ui-table-font-size,13px );--_max-height:var( --os-ui-table-max-height,none );font-size:var( --_font-size );color:inherit}:host( [ hidden ] ){display:none}.scroll{position:relative;overflow:auto;max-height:var( --_max-height );border:1px solid var( --_border );border-radius:4px;background:var( --_bg )}table{width:100%;border-collapse:separate;border-spacing:0;background:var( --_bg )}thead th{text-align:start;font-weight:600;background-color:var( --_header-bg );background-image:var( --os-ui-table-header-bg-image,none );background-repeat:var( --os-ui-table-header-bg-image-repeat,repeat );background-size:var( --os-ui-table-header-bg-image-size,auto );background-position:var( --os-ui-table-header-bg-image-position,center );padding:var( --_cell-padding );border-bottom:1px solid var( --_border );white-space:nowrap}tbody td{padding:var( --_cell-padding );border-bottom:1px solid var( --_border );background-color:var( --_bg );vertical-align:middle}tbody tr:last-child td{border-bottom:0}:host( [ striped ] ) tbody tr:nth-child( odd ) td{background-image:linear-gradient( var( --_stripe ),var( --_stripe ) )}:host( [ hover ] ) tbody tr:hover td{background-image:linear-gradient( var( --_row-hover ),var( --_row-hover ) )}:host( [ hover ][ striped ] ) tbody tr:nth-child( odd ):hover td{background-image:linear-gradient( var( --_row-hover ),var( --_row-hover ) ),linear-gradient( var( --_stripe ),var( --_stripe ) )}:host( [ compact ] ){--os-ui-table-cell-padding:4px 8px;--os-ui-table-font-size:12px}:host( [ bordered ] ) thead th,:host( [ bordered ] ) tbody td{border-inline-end:1px solid var( --_column-border )}:host( [ bordered ] ) thead th:last-child,:host( [ bordered ] ) tbody td:last-child{border-inline-end:0}th.is-sticky,td.is-sticky{position:sticky;z-index:10}tbody td.is-sticky{background-color:var( --_bg )}thead th.is-sticky{background-color:var( --_header-bg );background-image:var( --os-ui-table-header-bg-image,none );background-repeat:var( --os-ui-table-header-bg-image-repeat,repeat );background-size:var( --os-ui-table-header-bg-image-size,auto );background-position:var( --os-ui-table-header-bg-image-position,center );z-index:30}:host( [ sticky-header ] ) thead th{position:sticky;top:0;z-index:20}:host( [ sticky-header ] ) thead tr.filter-row th{top:var( --os-ui-table-header-height,33px );z-index:20}:host( [ sticky-header ] ) thead th.is-sticky{z-index:40}:host( [ sticky-header ] ) thead tr.filter-row th.is-sticky{z-index:40}th.is-sticky-edge,td.is-sticky-edge{border-inline-end:var( --os-ui-table-sticky-edge,2px solid var( --_border ) )}.align-center{text-align:center}.align-end{text-align:end}.filter-row th{padding:4px 8px;background-color:var( --_header-bg );background-image:var( --os-ui-table-header-bg-image,none );background-repeat:var( --os-ui-table-header-bg-image-repeat,repeat );background-size:var( --os-ui-table-header-bg-image-size,auto );background-position:var( --os-ui-table-header-bg-image-position,center );border-bottom:1px solid var( --_border );font-weight:400}.filter-input,.filter-select{width:100%;min-width:60px;box-sizing:border-box;padding:4px 6px;font:inherit;color:inherit;background-color:var( --_bg );border:1px solid var( --_border );border-radius:3px}.filter-input:focus,.filter-select:focus{outline:none;border-color:var( --os-ui-accent,#2271b1 );box-shadow:var( --_holo-focus-field )}.expander{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;border-radius:3px;font-size:11px;line-height:1}.expander:hover{background:var( --os-ui-hover,rgba( 0,0,0,0.06 ) )}td.col-expander,th.col-expander{width:36px;min-width:36px;padding-left:0;padding-right:0;text-align:center}tr.subtable td{padding:0;background-color:var( --_bg );background-image:linear-gradient( var( --_stripe ),var( --_stripe ) );border-bottom:1px solid var( --_border )}tr.subtable .subtable-inner{padding:8px 12px 8px 32px}tr.empty td{padding:24px;text-align:center;color:var( --os-ui-text-muted,var( --os-ui-fg-muted,rgba( 0,0,0,0.55 ) ) );font-style:italic}thead th.is-sortable{cursor:pointer;user-select:none}thead th.is-sortable:hover{background-image:linear-gradient( var( --_row-hover ),var( --_row-hover ) )}thead th.is-sortable:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var( --os-ui-accent,#2271b1 )}.sort-indicator{font-size:10px;color:var( --os-ui-text-muted,var( --os-ui-fg-muted,rgba( 0,0,0,0.55 ) ) );margin-inline-start:2px}thead th.sort-asc .sort-indicator,thead th.sort-desc .sort-indicator{color:var( --wp-admin-theme-color,#2271b1 )}td.col-select,th.col-select{width:40px;min-width:40px;padding-left:0;padding-right:0;text-align:center}.select-all-checkbox,.select-row-checkbox{cursor:pointer;margin:0}tbody tr.is-selected td{background-color:color-mix( in srgb,var( --wp-admin-theme-color,#2271b1 ) 10%,var( --_bg ) );background-image:none}tbody tr.is-selected:hover td{background-color:color-mix( in srgb,var( --wp-admin-theme-color,#2271b1 ) 16%,var( --_bg ) )}tbody tr.is-selected td:first-child{box-shadow:inset 3px 0 0 0 var( --os-ui-accent,#2271b1 )}tbody:dir( rtl ) tr.is-selected td:first-child{box-shadow:inset -3px 0 0 0 var( --os-ui-accent,#2271b1 )}:host( [ stacked ] ) .scroll{border:0;border-radius:0}:host( [ stacked ] ) table,:host( [ stacked ] ) tbody{display:block;width:100%}:host( [ stacked ] ) colgroup,:host( [ stacked ] ) thead{display:none}:host( [ stacked ] ) tbody tr{display:flex;align-items:flex-start;gap:12px;padding:12px 14px;border-bottom:1px solid var( --_border );background-color:var( --_bg )}:host( [ stacked ] ) tbody tr:last-child{border-bottom:0}:host( [ stacked ] ) tbody td{display:block;padding:0;border:0;background-color:transparent;background-image:none;box-shadow:none;min-width:0;width:auto;vertical-align:baseline}:host( [ stacked ] ) tbody tr.is-selected td,:host( [ stacked ] ) tbody tr.is-selected:hover td,:host( [ stacked ][ striped ] ) tbody tr:nth-child( odd ) td,:host( [ stacked ][ hover ] ) tbody tr:hover td,:host( [ stacked ][ hover ][ striped ] ) tbody tr:nth-child( odd ):hover td,:host( [ stacked ][ bordered ] ) tbody td{padding:0;border:0;background-color:transparent;background-image:none;box-shadow:none}:host( [ stacked ][ hover ] ) tbody tr:hover{background-image:linear-gradient( var( --_row-hover ),var( --_row-hover ) )}:host( [ stacked ] ) tbody tr.is-selected,:host( [ stacked ] ) tbody tr.is-selected:hover{background-color:color-mix( in srgb,var( --wp-admin-theme-color,#2271b1 ) 10%,var( --_bg ) );background-image:none;box-shadow:inset 3px 0 0 0 var( --os-ui-accent,#2271b1 )}:host( [ stacked ] ) tbody:dir( rtl ) tr.is-selected{box-shadow:inset -3px 0 0 0 var( --os-ui-accent,#2271b1 )}:host( [ stacked ] ) tbody td.col-select,:host( [ stacked ] ) tbody td.col-expander{flex:0 0 auto;display:flex;align-items:center;justify-content:center;min-width:0}:host( [ stacked ] ) tbody td.col-select{width:44px;height:44px;margin:-11px 0 -11px -11px;cursor:pointer}:host( [ stacked ] ) .select-row-checkbox{width:22px;height:22px}:host( [ stacked ] ) tbody td.col-expander{width:28px;height:22px;margin-inline-start:-4px}:host( [ stacked ] ) tbody td.stack-body{flex:1 1 auto;display:flex;flex-direction:column;gap:4px;min-width:0}.stack-cell{display:flex;align-items:baseline;gap:6px;min-width:0;line-height:1.4}.stack-title{font-size:15px;font-weight:600;line-height:1.35}.stack-meta{font-size:13px}.stack-label{flex:0 0 auto;font-size:12px;color:var( --os-ui-text-muted,var( --os-ui-fg-muted,rgba( 0,0,0,0.55 ) ) )}.stack-label::after{content:'·';margin-inline-start:6px}.stack-value{flex:1 1 auto;min-width:0;display:flex;align-items:center;flex-wrap:wrap;gap:6px}.stack-actions{margin-block-start:6px}.stack-actions .stack-value{gap:8px}.stack-actions .stack-value>*{justify-content:flex-start;max-width:100%}:host( [ stacked ] ) tr.subtable,:host( [ stacked ] ) tr.empty{display:block;padding:0}:host( [ stacked ] ) tr.subtable td{background-image:linear-gradient( var( --_stripe ),var( --_stripe ) )}:host( [ stacked ] ) tr.subtable .subtable-inner{padding:8px 14px 12px}:host( [ stacked ] ) tr.empty td{padding:24px}:host( [ stacked ] ) tr.skeleton{display:block;padding:14px;border-bottom:1px solid var( --_border )}:host( [ stacked ] ) tr.skeleton td.stack-body{gap:8px}:host( [ stacked ] ) tr.skeleton .skeleton-bar:first-child{height:15px}tbody tr.skeleton td{padding:var( --_cell-padding )}.skeleton-bar{display:block;height:12px;border-radius:3px;background:linear-gradient( 90deg,var( --os-ui-table-skeleton-color,var( --os-ui-hover,rgba( 0,0,0,0.06 ) ) ) 0%,var( --os-ui-table-skeleton-highlight,var( --os-ui-hover,rgba( 0,0,0,0.14 ) ) ) 50%,var( --os-ui-table-skeleton-color,var( --os-ui-hover,rgba( 0,0,0,0.06 ) ) ) 100% );background-size:200% 100%;animation:os-table-skeleton-pulse 1.4s ease-in-out infinite}@keyframes os-table-skeleton-pulse{0%{background-position:200% 50%}100%{background-position:-200% 50%}}@media ( prefers-reduced-motion:reduce ){.skeleton-bar{animation:none}}`,B="__wpd_expander__",K="__wpd_select__",ce=class ce extends w{constructor(){super(...arguments),this._data=[],this._columns=[],this._filters={},this._expanded=new Set,this._subTable=null,this._sort=null,this._selection=new Set,this._getRowId=(e,t)=>t,this._filterCache=new Map,this._paintScheduled=!1,this._stacked=!1,this._stickyHeaderWarned=!1,this._stickyRaceWarned=!1,this._resizeObserver=null,this._stickyMicroScheduled=!1,this._stickyRafHandle=null,this._loadingDesyncWarned=!1,this._lastStickyIndex=-1}get data(){return this._data}set data(e){this._data=Array.isArray(e)?e.slice():[],this._expanded.clear(),this._schedulePaint()}get columns(){return this._columns}set columns(e){this._columns=Array.isArray(e)?e.slice():[];const t=new Set(this._columns.map(s=>s.key));for(const s of Object.keys(this._filters))t.has(s)||delete this._filters[s];for(const s of Array.from(this._filterCache.keys()))t.has(s)||this._filterCache.delete(s);this._sort&&!t.has(this._sort.key)&&(this._sort=null),this._schedulePaint()}get filters(){return{...this._filters}}set filters(e){this._filters=e?{...e}:{},this._schedulePaint()}get sort(){return this._sort?{...this._sort}:null}set sort(e){this._sort=e?{...e}:null,this._schedulePaint()}get selection(){return new Set(this._selection)}set selection(e){this._selection=new Set(e??[]),this._schedulePaint()}get selectedRows(){const e=[];return this._data.forEach((t,s)=>{this._selection.has(this._getRowId(t,s))&&e.push(t)}),e}get visibleRows(){return this._filteredRows().map(e=>e.row)}get getRowId(){return this._getRowId}set getRowId(e){this._getRowId=typeof e=="function"?e:(t,s)=>s,this._schedulePaint()}get subTable(){return this._subTable}set subTable(e){this._subTable=typeof e=="function"?e:null,this._expanded.clear(),this._schedulePaint()}get expanded(){return new Set(this._expanded)}set expanded(e){this._expanded=new Set(e??[]),this._schedulePaint()}expand(e){e<0||e>=this._data.length||this._expanded.has(e)||(this._expanded.add(e),this.emit("os-table-expand-change",{row:this._data[e],index:e,expanded:!0}),this._schedulePaint())}collapse(e){this._expanded.has(e)&&(this._expanded.delete(e),this.emit("os-table-expand-change",{row:this._data[e],index:e,expanded:!1}),this._schedulePaint())}expandAll(){if(!this._subTable)return;let e=!1;for(let t=0;t<this._data.length;t++)this._subTable(this._data[t],t)&&(this._expanded.has(t)||(this._expanded.add(t),e=!0));e&&this._schedulePaint()}collapseAll(){this._expanded.size!==0&&(this._expanded.clear(),this._schedulePaint())}isExpanded(e){return this._expanded.has(e)}clearFilters(){Object.keys(this._filters).length!==0&&(this._filters={},this.emit("os-table-filter-change",{filters:{}}),this._schedulePaint())}clearSort(){this._sort!==null&&(this._sort=null,this.emit("os-table-sort-change",{sort:null}),this._schedulePaint())}select(e){if(this._selection.has(e))return;const t=this._readSelectable(),s=t==="single"?Array.from(this._selection):[];t==="single"&&this._selection.clear(),this._selection.add(e),this._emitSelectionChange(),this._syncSelectionDom([e,...s])}deselect(e){this._selection.delete(e)&&(this._emitSelectionChange(),this._syncSelectionDom([e]))}selectAll(){if(this._readSelectable()==="multi"){for(const{row:e,index:t}of this._filteredRows())this._selection.add(this._getRowId(e,t));this._emitSelectionChange(),this._syncSelectionDom("all")}}clearSelection(){this._selection.size!==0&&(this._selection.clear(),this._emitSelectionChange(),this._syncSelectionDom("all"))}_syncSelectionDom(e){const t=this.shadowRoot;if(!t)return;const s=t.querySelector("tbody");if(!s)return;let i=null;if(e!=="all"){i=new Set;for(const a of e)i.add(String(a))}const n=s.querySelectorAll("tr[data-row-id]");for(const a of n){const c=a.dataset.rowId;if(c===void 0||i&&!i.has(c))continue;const d=Number(a.dataset.rowIndex);if(!Number.isFinite(d))continue;const p=this._data[d];if(p===void 0)continue;const u=this._getRowId(p,d),m=this._selection.has(u);a.classList.toggle("is-selected",m);const f=a.querySelector("input.select-row-checkbox");f&&f.checked!==m&&(f.checked=m)}const r=t.querySelector("thead .select-all-checkbox");if(r){const{total:a,selected:c}=this._visibleSelectionStats();r.checked=a>0&&c===a,r.indeterminate=c>0&&c<a}}scrollToRow(e){const t=this.shadowRoot;if(!t)return;const i=t.querySelectorAll("tbody tr:not(.subtable):not(.empty):not(.skeleton)")[e];i&&i.scrollIntoView({block:"nearest",inline:"nearest"})}connectedCallback(){super.connectedCallback(),this._schedulePaint()}disconnectedCallback(){this._resizeObserver?.disconnect(),this._resizeObserver=null,this._stickyRafHandle!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this._stickyRafHandle),this._stickyRafHandle=null)}recomputeLayout(){this._applyStickyOffsets(),this._measureHeaderHeight()}render(){return h`
104 + <div class="scroll" part="scroll">
105 + <table part="table">
106 + <colgroup></colgroup>
107 + <thead></thead>
108 + <tbody></tbody>
109 + </table>
110 + </div>
111 + `}requestUpdate(){super.requestUpdate(),this._schedulePaint()}_schedulePaint(){this._paintScheduled||!this.isConnected||(this._paintScheduled=!0,queueMicrotask(()=>{this._paintScheduled=!1,this.isConnected&&this._paint()}))}_paint(){const e=this.shadowRoot;if(!e)return;e.querySelector("tbody")||G(this.render(),e);const t=e.querySelector("colgroup"),s=e.querySelector("thead"),i=e.querySelector("tbody");if(!t||!s||!i)return;const n=this._effectiveColumns();this._stacked=this.hasAttribute("stacked");const r=this._readStickyColumns();this._lastStickyIndex=this._computeLastStickyIndex(n,r),this._paintColgroup(t,n),this._paintHead(s,n,r),this._paintBody(i,n,r),this._applyStickyOffsets(),this._measureHeaderHeight(),this._scheduleStickyOffsets(),this._maybeWarnStickyHeader(),this._maybeWarnLoadingDesync(i),this._ensureResizeObserver()}_maybeWarnLoadingDesync(e){this._loadingDesyncWarned||this.hasAttribute("loading")&&(e.querySelector("tr.skeleton")||(this._loadingDesyncWarned=!0,console.warn("[os-table] `loading` attribute is set but no skeleton rows rendered. Either attributeChangedCallback didn't route through requestUpdate (framework regression), or `loading` was set after the most recent paint and no follow-up trigger ran. Toggling `data` will force a paint as a workaround.")))}_scheduleStickyOffsets(){this._stickyMicroScheduled||(this._stickyMicroScheduled=!0,queueMicrotask(()=>{this._stickyMicroScheduled=!1,this.isConnected&&this._applyStickyOffsets()})),this._stickyRafHandle===null&&typeof requestAnimationFrame<"u"&&(this._stickyRafHandle=requestAnimationFrame(()=>{this._stickyRafHandle=null,this.isConnected&&(this._applyStickyOffsets(),this._measureHeaderHeight())}))}_ensureResizeObserver(){if(this._resizeObserver||typeof ResizeObserver>"u")return;const e=this.shadowRoot?.querySelector(".scroll");e&&(this._resizeObserver=new ResizeObserver(()=>{this.isConnected&&(this._applyStickyOffsets(),this._measureHeaderHeight(),this._stickyHeaderWarned=!1,this._maybeWarnStickyHeader())}),this._resizeObserver.observe(e),this._resizeObserver.observe(this))}_paintColgroup(e,t){const s=[];for(const i of t){const n=document.createElement("col");i.width&&(n.style.width=i.width),s.push(n)}e.replaceChildren(...s)}_paintHead(e,t,s){const i=document.createElement("tr");i.setAttribute("part","header-row");for(let c=0;c<t.length;c++)i.appendChild(this._buildHeaderCell(t[c],c,s));const n=e.querySelector(':scope > tr[part="header-row"]');n?e.replaceChild(i,n):e.insertBefore(i,e.firstChild);const r=t.some(c=>c.filter||Array.isArray(c.filterOptions)||typeof c.filterRender=="function");let a=e.querySelector(":scope > tr.filter-row");if(r){const c=[];for(let u=0;u<t.length;u++)c.push(this._buildFilterCell(t[u],u,s));a||(a=document.createElement("tr"),a.classList.add("filter-row"),a.setAttribute("part","filter-row"),e.appendChild(a));const d=Array.from(a.children);let p=d.length===c.length;if(p){for(let u=0;u<c.length;u++)if(d[u]!==c[u]){p=!1;break}}if(!p){const u=new Set(c);for(const m of c)a.appendChild(m);for(const m of Array.from(a.children))u.has(m)||a.removeChild(m)}}else a&&a.remove()}_buildHeaderCell(e,t,s){const i=document.createElement("th");if(i.setAttribute("scope","col"),i.dataset.key=e.key,this._applyCellClasses(i,e,t,s),e.minWidth&&(i.style.minWidth=e.minWidth),e.key===K){if(this._readSelectable()==="multi"){const r=document.createElement("input");r.type="checkbox",r.className="select-all-checkbox",r.setAttribute("data-noclick",""),r.setAttribute("aria-label","Select all rows");const{total:a,selected:c}=this._visibleSelectionStats();r.checked=a>0&&c===a,r.indeterminate=c>0&&c<a,r.addEventListener("change",()=>{r.checked?this.selectAll():this.clearSelection()}),i.appendChild(r)}return i}if(i.textContent=e.label??(e.key===B?"":e.key),e.sortable){i.classList.add("is-sortable");const n=this._sort?.key===e.key,r=document.createElement("span");r.className="sort-indicator";let a="";n&&(a=this._sort.direction==="asc"?" ▲":" ▼"),r.textContent=a,i.appendChild(r),n&&i.classList.add(this._sort.direction==="asc"?"sort-asc":"sort-desc"),i.addEventListener("click",()=>this._cycleSort(e.key))}return i}_buildFilterCell(e,t,s){const i=this._filterCache.get(e.key),n=Array.isArray(e.filterOptions),r=typeof e.filterRender=="function";let a;if(!e.filter&&!n&&!r||e.key===B||e.key===K?a="none":r?a="custom":e.filter==="select"||n?a="select":a="text",i&&i.kind===a){if(i.th.className="",this._applyCellClasses(i.th,e,t,s),a==="select"){const u=i.control,m=this._resolveFilterOptions(e),f=m.map(g=>g.value).join("|");f!==i.optionsKey?(this._populateSelect(u,m,this._filters[e.key]??""),i.optionsKey=f):u.value=this._filters[e.key]??""}else if(a==="text"){const u=i.control,m=this._filters[e.key]??"";u.value!==m&&u.ownerDocument.activeElement!==u&&(u.value=m)}else a==="custom"&&e.filterRender&&e.filterRender(i.th,{value:this._filters[e.key]??"",setValue:u=>this._onFilterChange(e.key,u),col:e});return i.th}const c=document.createElement("th");if(this._applyCellClasses(c,e,t,s),a==="none")return this._filterCache.set(e.key,{th:c,control:null,optionsKey:"",kind:"none"}),c;if(a==="custom"&&e.filterRender)return e.filterRender(c,{value:this._filters[e.key]??"",setValue:u=>this._onFilterChange(e.key,u),col:e}),this._filterCache.set(e.key,{th:c,control:null,optionsKey:"",kind:"custom"}),c;let d,p="";if(a==="select"){const u=document.createElement("select");u.classList.add("filter-select"),u.setAttribute("data-noclick",""),u.setAttribute("aria-label",`Filter ${e.label??e.key}`);const m=this._resolveFilterOptions(e);this._populateSelect(u,m,this._filters[e.key]??""),p=m.map(f=>f.value).join("|"),u.addEventListener("change",()=>{this._onFilterChange(e.key,u.value)}),d=u}else{const u=document.createElement("input");u.type="search",u.classList.add("filter-input"),u.setAttribute("data-noclick",""),u.setAttribute("placeholder","Filter…"),u.setAttribute("aria-label",`Filter ${e.label??e.key}`),u.value=this._filters[e.key]??"",u.addEventListener("input",()=>{this._onFilterChange(e.key,u.value)}),d=u}return c.appendChild(d),this._filterCache.set(e.key,{th:c,control:d,optionsKey:p,kind:a}),c}_populateSelect(e,t,s){e.replaceChildren();const i=document.createElement("option");i.value="",i.textContent="All",e.appendChild(i);for(const n of t){const r=document.createElement("option");r.value=n.value,r.textContent=n.label,n.value===s&&(r.selected=!0),e.appendChild(r)}e.value=s}_resolveFilterOptions(e){return Array.isArray(e.filterOptions)?e.filterOptions:this._uniqueValues(e.key).map(t=>({value:t,label:t}))}_paintBody(e,t,s){if(e.replaceChildren(),this.hasAttribute("loading")){const n=this._readLoadingRows();for(let r=0;r<n;r++)e.appendChild(this._buildSkeletonRow(t,r));return}const i=this._sortedRows(this._filteredRows());if(i.length===0){e.appendChild(this._buildEmptyRow(t.length));return}for(const{row:n,index:r}of i)if(e.appendChild(this._stacked?this._buildStackedRow(n,r,t):this._buildBodyRow(n,r,t,s)),this._expanded.has(r)&&this._subTable){const a=this._subTable(n,r);a&&e.appendChild(this._buildSubTableRow(a,t.length))}}_buildEmptyRow(e){const t=document.createElement("tr");t.classList.add("empty");const s=document.createElement("td");s.colSpan=e;const i=document.createElement("slot");return i.name="empty",i.textContent=this.getAttribute("empty")||"No data",s.appendChild(i),t.appendChild(s),t}_buildSkeletonRow(e,t){const s=document.createElement("tr");if(s.classList.add("skeleton"),s.setAttribute("aria-hidden","true"),this._stacked){s.classList.add("stack-row");const i=document.createElement("td");i.className="stack-body",i.colSpan=Math.max(1,e.length);for(const n of[55+t*7%25,30+t*11%15]){const r=document.createElement("span");r.className="skeleton-bar",r.style.width=`${n}%`,i.appendChild(r)}return s.appendChild(i),s}for(const i of e){const n=document.createElement("td"),r=document.createElement("span");r.className="skeleton-bar";const a=50+(t*7+s.children.length*13)%40;r.style.width=`${a}%`,n.appendChild(r),s.appendChild(n)}return s}_buildBodyRow(e,t,s,i){const n=document.createElement("tr");n.setAttribute("part","row"),n.dataset.rowIndex=String(t);const r=this._getRowId(e,t);n.dataset.rowId=String(r),this._selection.has(r)&&n.classList.add("is-selected"),n.addEventListener("click",a=>{this._onRowClick(e,t,a)});for(let a=0;a<s.length;a++)n.appendChild(this._buildBodyCell(s[a],a,e,t,i));return n}_buildStackedRow(e,t,s){const i=document.createElement("tr");i.setAttribute("part","row"),i.classList.add("stack-row"),i.dataset.rowIndex=String(t);const n=this._getRowId(e,t);i.dataset.rowId=String(n),this._selection.has(n)&&i.classList.add("is-selected"),i.addEventListener("click",d=>{this._onRowClick(e,t,d)});const r=document.createElement("td");r.className="stack-body";let a=0,c=0;for(let d=0;d<s.length;d++){const p=s[d];if(p.key===K||p.key===B){i.appendChild(this._buildBodyCell(p,d,e,t,0));continue}c++;const u=Eo(p,a++);if(u==="hidden")continue;const m=document.createElement("div");if(m.className=`stack-cell stack-${u}`,m.dataset.key=p.key,u==="meta"&&p.label){const v=document.createElement("span");v.className="stack-label",v.textContent=p.label,m.appendChild(v)}const f=document.createElement("span");f.className="stack-value";const g=e[p.key],_=ye(g);p.render?this._mountCellContent(f,p.render(g,e,t)):_!==null?f.appendChild(this._slotFor(_)):g!=null&&(f.textContent=String(g)),m.appendChild(f),r.appendChild(m)}return r.colSpan=Math.max(1,c),i.appendChild(r),i}_buildBodyCell(e,t,s,i,n){const r=document.createElement("td");if(this._applyCellClasses(r,e,t,n),e.minWidth&&(r.style.minWidth=e.minWidth),e.key===K){const d=this._getRowId(s,i),p=document.createElement("input");return p.type="checkbox",p.className="select-row-checkbox",p.setAttribute("data-noclick",""),p.setAttribute("aria-label","Select row"),p.checked=this._selection.has(d),p.addEventListener("change",()=>{p.checked?this.select(d):this.deselect(d)}),r.appendChild(p),this._stacked&&(r.setAttribute("data-noclick",""),r.addEventListener("click",u=>{u.target===r&&(p.checked=!p.checked,p.dispatchEvent(new Event("change")))})),r}if(e.key===B){if(!(this._subTable?!!this._subTable(s,i):!1))return r;const p=this._expanded.has(i),u=document.createElement("button");return u.type="button",u.className="expander",u.setAttribute("data-noclick",""),u.setAttribute("aria-expanded",p?"true":"false"),u.setAttribute("aria-label",p?"Collapse row":"Expand row"),u.textContent=p?"▾":"▸",u.addEventListener("click",m=>{this._toggleRow(i,s,m)}),r.appendChild(u),r}const a=s[e.key],c=ye(a);if(e.render){const d=e.render(a,s,i);this._mountCellContent(r,d)}else c!==null?r.appendChild(this._slotFor(c)):a!=null&&(r.textContent=String(a));return r}_slotFor(e){const t=document.createElement("slot");return t.name=e,t}_buildSubTableRow(e,t){const s=document.createElement("tr");s.classList.add("subtable"),s.setAttribute("part","subtable-row");const i=document.createElement("td");i.colSpan=t;const n=document.createElement("div");if(n.classList.add("subtable-inner"),e instanceof Node)n.appendChild(e);else if(xt(e))G(e,n);else{const r=document.createElement("os-table");r.columns=e.columns,r.data=e.data,e.subTable&&(r.subTable=e.subTable),n.appendChild(r)}return i.appendChild(n),s.appendChild(i),s}_mountCellContent(e,t){if(typeof t=="string"){e.textContent=t;return}if(t instanceof Node){e.appendChild(t);return}xt(t)&&G(t,e)}_onFilterChange(e,t){t===""?delete this._filters[e]:this._filters[e]=t,this.emit("os-table-filter-change",{filters:{...this._filters}});const i=this.shadowRoot?.querySelector("tbody");if(i){const n=this._effectiveColumns(),r=this._readStickyColumns();this._lastStickyIndex=this._computeLastStickyIndex(n,r),this._paintBody(i,n,r),this._applyStickyOffsets()}}_onRowClick(e,t,s){const i=s.composedPath?.()??[];for(const n of i){if(n instanceof Element&&n.hasAttribute("data-noclick"))return;if(n===this)break}this.emit("os-table-row-click",{row:e,index:t,originalEvent:s})}_toggleRow(e,t,s){s.stopPropagation();const i=this._expanded.has(e);i?this._expanded.delete(e):this._expanded.add(e),this.emit("os-table-expand-change",{row:t,index:e,expanded:!i}),this._schedulePaint()}_cycleSort(e){!this._sort||this._sort.key!==e?this._sort={key:e,direction:"asc"}:this._sort.direction==="asc"?this._sort={key:e,direction:"desc"}:this._sort=null,this.emit("os-table-sort-change",{sort:this._sort?{...this._sort}:null}),this._schedulePaint()}_emitSelectionChange(){this.emit("os-table-selection-change",{selection:Array.from(this._selection),rows:this.selectedRows})}_filteredRows(){const e=[],t=Object.keys(this._filters).filter(s=>this._filters[s]!=="");for(let s=0;s<this._data.length;s++){const i=this._data[s];let n=!0;for(const r of t){const a=this._columns.find(u=>u.key===r);if(a&&typeof a.filterRender=="function")continue;const c=this._filters[r]??"",d=i[r],p=We(d);if(a?.filter==="select"){if(p!==c){n=!1;break}}else if(!p.toLowerCase().includes(c.toLowerCase())){n=!1;break}}n&&e.push({row:i,index:s})}return e}_sortedRows(e){if(!this._sort)return e;const t=this._columns.find(n=>n.key===this._sort.key);if(!t)return e;const s=this._sort.direction==="desc"?-1:1,i=e.slice();return i.sort((n,r)=>{const a=n.row[t.key],c=r.row[t.key],d=t.sortValue?t.sortValue(n.row,a):kt(a),p=t.sortValue?t.sortValue(r.row,c):kt(c);return Ro(d,p)*s}),i}_uniqueValues(e){const t=new Set;for(const s of this._data){const i=s[e];i!=null&&t.add(We(i))}return Array.from(t).sort()}_visibleSelectionStats(){let e=0,t=0;for(const{row:s,index:i}of this._filteredRows())e++,this._selection.has(this._getRowId(s,i))&&t++;return{total:e,selected:t}}_readStickyColumns(){const e=parseInt(this.getAttribute("sticky-columns")||"0",10);return Number.isFinite(e)&&e>0?e:0}_readLoadingRows(){const e=parseInt(this.getAttribute("loading-rows")||"5",10);return Number.isFinite(e)&&e>0?Math.min(e,100):5}_readSelectable(){const e=this.getAttribute("selectable");return e==="single"?"single":e==="multi"||e===""?"multi":null}_isStickyIndex(e,t,s){return this._stacked||s.sticky===!1?!1:s.sticky===!0?!0:e<t}_computeLastStickyIndex(e,t){let s=-1;for(let i=0;i<e.length;i++)this._isStickyIndex(i,t,e[i])&&(s=i);return s}_applyCellClasses(e,t,s,i){t.key===B&&e.classList.add("col-expander"),t.key===K&&e.classList.add("col-select"),t.align==="center"&&e.classList.add("align-center"),t.align==="end"&&e.classList.add("align-end"),this._isStickyIndex(s,i,t)&&(e.classList.add("is-sticky"),s===this._lastStickyIndex&&e.classList.add("is-sticky-edge"))}_effectiveColumns(){const e=[];return this._readSelectable()&&e.push({key:K,label:"",width:"40px",align:"center"}),this._subTable&&e.push({key:B,label:"",width:"36px",align:"center"}),e.push(...this._columns),e}_applyStickyOffsets(){const e=this.shadowRoot;if(!e)return;const t=e.querySelector("thead tr");if(!t)return;const s=Array.from(t.children),i=[];let n=0;for(let a=0;a<s.length;a++)i[a]=n,s[a].classList.contains("is-sticky")&&(n+=s[a].offsetWidth);e.querySelectorAll("thead tr, tbody tr:not(.subtable):not(.empty):not(.skeleton)").forEach(a=>{const c=Array.from(a.children);for(let d=0;d<c.length;d++)c[d].classList.contains("is-sticky")&&(c[d].style.insetInlineStart=`${i[d]}px`)}),this._maybeWarnStickyOffsetRace(s,i)}_maybeWarnStickyOffsetRace(e,t){if(this._stickyRaceWarned)return;const s=this._readStickyColumns();if(s<2)return;const i=Math.min(s-1,e.length-1);if(i<=0||t[i]!==0||this.offsetWidth===0)return;this._stickyRaceWarned=!0;const n=e[0]?.offsetWidth??0;console.warn(`[os-table] sticky-columns: column ${i} resolved to inset-inline-start: 0px while the host is visible. ths[0].offsetWidth was ${n}px at measurement time. Likely a layout race — call recomputeLayout() after the panel finishes its mount/transition, or wrap the assignment of \`data\` in a requestAnimationFrame.`)}_measureHeaderHeight(){const e=this.shadowRoot;if(!e)return;const t=e.querySelector("thead tr");if(!t)return;const s=t.offsetHeight;s>0&&this.style.setProperty("--os-ui-table-header-height",`${s}px`)}_maybeWarnStickyHeader(){if(this._stickyHeaderWarned||!this.hasAttribute("sticky-header")||this.hasAttribute("loading")||this._data.length<8)return;const e=this.shadowRoot?.querySelector(".scroll");e&&e.offsetWidth!==0&&e.scrollHeight<=e.clientHeight+1&&(this._stickyHeaderWarned=!0,console.warn("[os-table] sticky-header is set but the table has no scroll container. Set --os-ui-table-max-height on the host (or wrap it in a scrolling parent) so the header has something to stick to."))}};ce.props=["stickyColumns","stickyHeader","striped","hover","compact","bordered","empty","loading","loadingRows","selectable","stacked"],ce.styles=[zo],ce.help=void 0;let Fe=ce;function xt(o){return!!o&&o.__wpdHtml===!0}function Eo(o,e){return o.stack?o.stack:e===0?"title":o.label?"meta":"actions"}function ye(o){return o&&typeof o=="object"&&typeof o.slot=="string"?o.slot:null}function We(o){if(o==null)return"";if(ye(o)!==null){const e=o.text;return e==null?"":String(e)}return String(o)}function kt(o){return ye(o)!==null?We(o):o}function Ro(o,e){if(o===e)return 0;if(o==null)return-1;if(e==null)return 1;if(typeof o=="number"&&typeof e=="number")return o-e;if(o instanceof Date&&e instanceof Date)return o.getTime()-e.getTime();const t=Number(o),s=Number(e);return Number.isFinite(t)&&Number.isFinite(s)?t-s:String(o).localeCompare(String(e))}S("os-table",Fe);const Lo=b`:host{display:inline-flex;align-items:center;justify-content:center;width:var( --os-ui-icon-size,16px );height:var( --os-ui-icon-size,16px );color:inherit;line-height:1}:host( [ hidden ] ){display:none}.os-icon__glyph{font-size:var( --os-ui-icon-size,16px );width:var( --os-ui-icon-size,16px );height:var( --os-ui-icon-size,16px );line-height:1;color:inherit;display:inline-flex;align-items:center;justify-content:center}.os-icon__glyph--char{font-family:dashicons;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;speak:none}.os-icon__glyph.dashicons{font-family:dashicons}`;let xe=null;function To(o){let e=o.trim();if(e==="")return null;(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1));const t=e.match(/^\\([0-9a-f]{1,6})\s?$/i);return t?String.fromCodePoint(parseInt(t[1],16)):e||null}function wt(){const o=new Map;if(typeof document>"u")return o;const e=Array.from(document.styleSheets??[]);for(const t of e){let s=null;try{s=t.cssRules}catch{continue}if(s)for(const i of Array.from(s)){const n=i;if(!n||!n.selectorText)continue;const r=n.selectorText.match(/\.dashicons-([a-z0-9-]+)::?before/i);if(!r)continue;const a=n.style?.content;if(!a)continue;const c=To(a);c&&o.set(r[1],c)}}return o}function No(o){xe||(xe=wt());const e=o.startsWith("dashicons-")?o.slice(10):o;return xe.get(e)??null}function Po(){xe=wt()}let $t=!1;function Mo(){if($t||typeof window>"u")return;$t=!0;const o=()=>{Po()};document.readyState==="loading"&&document.addEventListener("DOMContentLoaded",o,{once:!0}),window.addEventListener("load",o,{once:!0})}Mo();const de=class de extends w{render(){const e=this.name||"",t=e.startsWith("dashicons-")?e.slice(10):e,s=this.size;s&&/^\d+$/.test(s)&&this.style.setProperty("--os-ui-icon-size",`${s}px`);const i=No(t);return i?h`<span
103 112 class="os-icon__glyph os-icon__glyph--char dashicons dashicons-${t}"
104 113 aria-hidden="true"
105 - >${n}</span>`:p`<span
114 + >${i}</span>`:h`<span
106 115 class="os-icon__glyph dashicons dashicons-${t}"
107 116 aria-hidden="true"
108 - ></span>`}};ae.props=["name","size"],ae.styles=[yo],ae.help=void 0;let Le=ae;A("os-icon",Le);const Ao=g`:host{display:inline;color:inherit;font:inherit}`,be=new Set;let K=null;const zo=3e4;function So(){K===null&&(K=window.setInterval(()=>{for(const o of be)o.tick()},zo))}function Co(){K!==null&&be.size===0&&(window.clearInterval(K),K=null)}function Eo(o){if(!o)return null;const e=t=>{const s=new Date(t);return Number.isNaN(s.getTime())?null:s};return To(o)?e(o):e(o.replace(" ","T")+"Z")}function To(o){const e=Math.max(o.indexOf("T"),o.indexOf(" ")),t=e===-1?"":o.slice(e+1);return/(?:[Zz]|[+-]\d{2}:?\d{2})$/.test(t)}let Pe=null,Me=null;function bt(){return typeof navigator<"u"&&navigator.language||"en"}function Ro(){return Pe||(Pe=new Intl.RelativeTimeFormat(bt(),{numeric:"auto"})),Pe}function vt(){return Me||(Me=new Intl.RelativeTimeFormat(bt(),{numeric:"always",style:"narrow"})),Me}function No(o,e){const t=Ro(),s=o.getTime()-e,n=Math.round(s/1e3),i=Math.abs;return i(n)<45?t.format(0,"second"):_t(t,n)}function _t(o,e){const t=Math.abs,s=Math.round(e/60);if(t(s)<45)return o.format(s,"minute");const n=Math.round(s/60);if(t(n)<22)return o.format(n,"hour");const i=Math.round(n/24);if(t(i)<26)return o.format(i,"day");const r=Math.round(i/30);if(t(r)<11)return o.format(r,"month");const l=Math.round(i/365);return o.format(l,"year")}function Lo(o,e){const t=Math.round((o.getTime()-e)/1e3),s=Math.abs;return s(t)<45?vt().format(0,"second"):s(t)>604800?o.toLocaleDateString(void 0,{month:"short",day:"numeric"}):_t(vt(),t)}const re=class re extends w{connectedCallback(){super.connectedCallback(),be.add(this),So()}disconnectedCallback(){be.delete(this),Co()}tick(){this.requestUpdate()}render(){const e=this.datetime,t=Eo(e);if(!t)return p`<span>${e??""}</span>`;const s=Date.now(),n=this.hasAttribute("compact")?Lo(t,s):No(t,s),i=t.toLocaleString();return p`<time datetime=${t.toISOString()} title=${i}
109 - >${n}</time
110 - >`}};re.props=["datetime","compact"],re.styles=[Ao],re.help=void 0;let Ie=re;A("os-relative-time",Ie);function yt(o){if(typeof o=="number")return o>0?o*1e3:NaN;const e=String(o??"");if(!e||e.startsWith("0000-00-00"))return NaN;let t=e.includes(" ")?e.replace(" ","T"):e;!/Z$/.test(t)&&!/[+-]\d{2}:?\d{2}$/.test(t)&&(t+="Z");const s=Date.parse(t);return Number.isFinite(s)?s:NaN}function Po(o){const e=yt(o);if(!Number.isFinite(e)){const s=document.createElement("span");return s.textContent="—",s}const t=document.createElement("os-relative-time");return t.setAttribute("datetime",new Date(e).toISOString()),t.title=Qe(e,"datetime"),t}function Mo(o){et(o).catch(()=>!1)}const Io=()=>[{value:"",label:a("All")},{value:"online",label:a("Online")},{value:"recent",label:a("Active 30d")},{value:"never",label:a("No sign-in recorded")}];function Do(o,e){if(e==="online")return o.filter(t=>t.openstation_presence==="online");if(e==="recent"){const t=Math.floor(Date.now()/1e3);return o.filter(s=>{const n=s.openstation_last_login;return typeof n=="number"&&n>0&&t-n<2592e3})}return e==="never"?o.filter(t=>typeof t.openstation_last_login!="number"||!t.openstation_last_login):o}const qo=new Set(["identity","email","role","last_login","actions"]),Fo={identity:"name",email:"email",registered:"registered_date"};function Uo(o){const e=o.openstation_user_stats;return[o.id,o.name,o.slug,o.email??"",(o.roles??[]).join(","),o.registered_date??"",o.openstation_last_login??"",o.openstation_presence??"",o.openstation_can_edit?1:0,e?`${e.posts}/${e.pages}/${e.comments}`:""].join("|")}function W(o,e,t,s){const n=`${e}::${t}`,i=o.get(n);if(i)return i;const r=s();return o.set(n,r),r}function xt(o,e){for(const t of Array.from(o.keys()))t.startsWith(`${e}::`)&&o.delete(t)}const Y="var( --os-ui-fg-muted, #50575e )",jo="display:inline-flex;align-items:center;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:600;background:var(--os-ui-badge-info-bg, rgba(34,113,177,0.10));color:var(--os-ui-info-fg, #0a4b78);white-space:nowrap;";function Wo(o,e){const t=document.createElement("span");t.style.cssText="display:flex;align-items:center;gap:10px;min-width:0;";const s=document.createElement("os-avatar");s.setAttribute("size","32"),o.name&&s.setAttribute("name",o.name),s.setAttribute("presence",o.openstation_presence??"offline");const n=ut(o.avatar_urls);n&&ht(s,n),t.appendChild(s);const i=document.createElement("span");i.style.cssText="display:flex;flex-direction:column;min-width:0;line-height:1.25;";const r=document.createElement("button");if(r.type="button",r.textContent=o.name||`#${o.id}`,r.title=r.textContent,r.setAttribute("data-noclick",""),r.style.cssText="appearance:none;background:transparent;border:none;padding:0;font:inherit;font-weight:600;color:inherit;cursor:pointer;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px;",r.addEventListener("mouseenter",()=>{r.style.textDecoration="underline"}),r.addEventListener("mouseleave",()=>{r.style.textDecoration="none"}),r.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),V(o.id,e)}),i.appendChild(r),o.slug){const l=document.createElement("span");l.textContent=`@${o.slug}`,l.style.cssText=`font-size:11px;color:${Y};white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px;`,i.appendChild(l)}return t.appendChild(i),t}function V(o,e){_o(o,{source:"users-window/row-click",fallback:()=>{console.error("[openstation:desktop-mode-users] the User Edit window is not registered for this user."),e.toast(a("Profile window not registered — see console."))}})}function Ho(o,e){const t=document.createElement("button");t.type="button";const s=typeof o.email=="string"?o.email:"";return t.textContent=s||"—",t.disabled=s==="",t.title=s?a("Click to copy email"):"",t.style.cssText=["appearance:none","background:transparent","border:none","padding:2px 6px","font:inherit","color:inherit",`cursor:${s?"copy":"default"}`,"text-align:left","font-size:13px","border-radius:4px","max-width:100%","overflow:hidden","text-overflow:ellipsis","white-space:nowrap"].join(";"),t.addEventListener("click",n=>{n.stopPropagation(),s&&et(s).then(i=>{if(!i){e.toast(a("Could not copy the email address."));return}t.textContent=a("Copied!"),t.style.color="var(--wp-admin-theme-color, #2271b1)",setTimeout(()=>{t.textContent=s,t.style.color=""},1200)})}),t}function Oo(o,e){const t=document.createElement("span");t.style.cssText="display:inline-flex;flex-wrap:wrap;gap:4px;min-width:0;";const s=Array.isArray(o.roles)?o.roles:[];if(s.length===0){const i=document.createElement("span");return i.textContent=a("No role"),i.style.cssText=`color:${Y};font-style:italic;`,t.appendChild(i),t}const n=e.allRoles??{};for(const i of s){const r=document.createElement("span");r.textContent=n[i]??i,r.style.cssText=jo,t.appendChild(r)}return t}function Yo(o){const e=o.openstation_user_stats??{posts:0,pages:0,comments:0},t=document.createElement("span");t.style.cssText="display:inline-flex;align-items:center;gap:10px;font-size:12px;font-variant-numeric:tabular-nums;";const s=(n,i,r)=>{const l=document.createElement("span");l.style.cssText="display:inline-flex;align-items:center;gap:3px;",l.title=r;const d=document.createElement("os-icon");d.setAttribute("name",n),d.setAttribute("size","14"),d.style.color=Y;const c=document.createElement("span");return c.textContent=String(i),i===0&&(c.style.color=Y),l.append(d,c),l};return t.append(s("admin-post",e.posts,a("Posts")),s("admin-page",e.pages,a("Pages")),s("admin-comments",e.comments,a("Comments"))),t}function kt(o,e){const t=document.createElement("span");t.style.cssText="font-size:13px;font-variant-numeric:tabular-nums;";const s=yt(o);return Number.isFinite(s)?(t.appendChild(Po(o)),t.title=Qe(s,"datetime"),t):(t.textContent=e,t.style.color=Y,t)}function Xo(o,e,t){const s=document.createElement("span");if(s.style.cssText="display:inline-flex;gap:4px;align-items:center;",e.canEdit!==!0||o.openstation_can_edit!==!0)return s.textContent="—",s.style.color=Y,s;const n=(i,r,l)=>{const d=document.createElement("os-icon");return d.setAttribute("name",r),d.setAttribute("size","18"),vo({label:i,glyph:d,onClick:l})};return s.append(n(a("Send password reset"),"email-alt",()=>t.onSendReset(o)),n(a("Resend welcome email"),"megaphone",()=>t.onResendWelcome(o))),s}function Bo(o,e,t,s=fe()){const n=[{key:"identity",label:a("Name"),sortable:!0,sticky:!0,minWidth:"260px",render:(i,r)=>W(o,r.id,"identity",()=>Wo(r,t))},{key:"email",label:a("Email"),sortable:!0,minWidth:"220px",render:(i,r)=>W(o,r.id,"email",()=>Ho(r,t))},{key:"role",label:a("Role"),width:"180px",render:(i,r)=>W(o,r.id,"role",()=>Oo(r,e))},{key:"stats",label:a("Content"),width:"160px",sortValue:i=>{const r=i.openstation_user_stats;return r?r.posts+r.pages+r.comments:0},render:(i,r)=>W(o,r.id,"stats",()=>Yo(r))},{key:"last_login",label:a("Last login"),width:"140px",sortable:!1,sortValue:i=>typeof i.openstation_last_login=="number"?i.openstation_last_login:0,render:(i,r)=>W(o,r.id,"last_login",()=>kt(r.openstation_last_login,a("Never")))},{key:"registered",label:a("Registered"),width:"140px",sortable:!0,render:(i,r)=>W(o,r.id,"registered",()=>kt(r.registered_date,"—"))}];return e.canEdit===!0&&n.push({key:"actions",label:a("Actions"),stack:"actions",width:"110px",sortable:!1,render:(i,r)=>W(o,r.id,"actions",()=>Xo(r,e,t))}),s?n.filter(i=>qo.has(i.key)):n}const Go=(o,e)=>e.allRoles?.[o]||o||a("No role");function H(o,e=48){return p`<os-avatar data-people-avatar=${ut(o.avatar_urls)||""} name=${o.name} size=${e} presence=${o.openstation_presence||""}></os-avatar>`}function Ko(o){return o.openstation_presence==="online"?a("Online now"):o.openstation_presence==="inactive"?a("Away"):a("Offline")}function Vo(o){return o.openstation_last_login?p`<span>${a("Last sign-in")} <os-relative-time datetime=${new Date(o.openstation_last_login*1e3).toISOString()}></os-relative-time></span>`:a("No sign-in recorded")}function Zo(o,e,t){return p`<os-action-menu text=${a("Actions")} label=${x(a("Actions for %s"),o.name)} @os-context-menu-pick=${s=>{const n=s.detail.id;n==="profile"&&V(o.id,t),!(!e.canEdit||!o.openstation_can_edit)&&(n==="reset"&&t.onSendReset(o),n==="welcome"&&t.onResendWelcome(o))}}>
111 - <os-context-menu-option data-menu-item-id="profile" icon="dashicons-id">${a("View profile")}</os-context-menu-option>
112 - ${e.canEdit&&o.openstation_can_edit?p`
113 - <os-context-menu-option heading>${a("Account emails")}</os-context-menu-option>
114 - <os-context-menu-option data-menu-item-id="reset" icon="dashicons-lock">${a("Send password reset")}</os-context-menu-option>
115 - <os-context-menu-option data-menu-item-id="welcome" icon="dashicons-email-alt">${a("Resend welcome")}</os-context-menu-option>`:""}
116 - </os-action-menu>`}function Jo(o){const e=new Date(o.registered_date||"");return Number.isNaN(e.getTime())?"—":e.toLocaleDateString(void 0,{month:"short",year:"numeric"})}function Qo(o,e,t,s){const{cfg:n,actions:i}=e,r=n.canEdit||n.canPromote||n.canDelete;return p`<div class="os-people__cards" aria-label=${a("People directory")}>
117 - ${o.length?o.map(l=>p`<article class="os-people__card ${e.selected.includes(l.id)?"is-selected":""}" data-person-id=${l.id}>
118 - <header class="os-people__id-header"><span class="os-people__issuer"><span class="dashicons dashicons-id-alt" aria-hidden="true"></span> OPENSTATION <span>/ ${a("MEMBER")}</span></span>
119 - ${l.id===n.currentUserId?p`<span class="os-people__you">${a("You")}</span>`:""}
120 - ${r?p`<os-checkbox class="os-people__select" aria-label=${x(a("Select %s"),l.name)} ?checked=${e.selected.includes(l.id)} @os-checkbox-change=${d=>e.select(l.id,d.detail.checked)}></os-checkbox>`:""}
117 + ></span>`}};de.props=["name","size"],de.styles=[Lo],de.help=void 0;let He=de;S("os-icon",He);const Io=b`:host{display:inline;color:inherit;font:inherit}`,ke=new Set;let J=null;const qo=3e4;function Do(){J===null&&(J=window.setInterval(()=>{for(const o of ke)o.tick()},qo))}function Fo(){J!==null&&ke.size===0&&(window.clearInterval(J),J=null)}function Wo(o){if(!o)return null;const e=t=>{const s=new Date(t);return Number.isNaN(s.getTime())?null:s};return Ho(o)?e(o):e(o.replace(" ","T")+"Z")}function Ho(o){const e=Math.max(o.indexOf("T"),o.indexOf(" ")),t=e===-1?"":o.slice(e+1);return/(?:[Zz]|[+-]\d{2}:?\d{2})$/.test(t)}let Oe=null,Ue=null;function St(){return typeof navigator<"u"&&navigator.language||"en"}function Oo(){return Oe||(Oe=new Intl.RelativeTimeFormat(St(),{numeric:"auto"})),Oe}function At(){return Ue||(Ue=new Intl.RelativeTimeFormat(St(),{numeric:"always",style:"narrow"})),Ue}function Uo(o,e){const t=Oo(),s=o.getTime()-e,i=Math.round(s/1e3),n=Math.abs;return n(i)<45?t.format(0,"second"):Ct(t,i)}function Ct(o,e){const t=Math.abs,s=Math.round(e/60);if(t(s)<45)return o.format(s,"minute");const i=Math.round(s/60);if(t(i)<22)return o.format(i,"hour");const n=Math.round(i/24);if(t(n)<26)return o.format(n,"day");const r=Math.round(n/30);if(t(r)<11)return o.format(r,"month");const a=Math.round(n/365);return o.format(a,"year")}function jo(o,e){const t=Math.round((o.getTime()-e)/1e3),s=Math.abs;return s(t)<45?At().format(0,"second"):s(t)>604800?o.toLocaleDateString(void 0,{month:"short",day:"numeric"}):Ct(At(),t)}const ue=class ue extends w{connectedCallback(){super.connectedCallback(),ke.add(this),Do()}disconnectedCallback(){ke.delete(this),Fo()}tick(){this.requestUpdate()}render(){const e=this.datetime,t=Wo(e);if(!t)return h`<span>${e??""}</span>`;const s=Date.now(),i=this.hasAttribute("compact")?jo(t,s):Uo(t,s),n=t.toLocaleString();return h`<time datetime=${t.toISOString()} title=${n}
118 + >${i}</time
119 + >`}};ue.props=["datetime","compact"],ue.styles=[Io],ue.help=void 0;let je=ue;S("os-relative-time",je);function zt(o){if(typeof o=="number")return o>0?o*1e3:NaN;const e=String(o??"");if(!e||e.startsWith("0000-00-00"))return NaN;let t=e.includes(" ")?e.replace(" ","T"):e;!/Z$/.test(t)&&!/[+-]\d{2}:?\d{2}$/.test(t)&&(t+="Z");const s=Date.parse(t);return Number.isFinite(s)?s:NaN}function Bo(o){const e=zt(o);if(!Number.isFinite(e)){const s=document.createElement("span");return s.textContent="—",s}const t=document.createElement("os-relative-time");return t.setAttribute("datetime",new Date(e).toISOString()),t.title=rt(e,"datetime"),t}function Ko(o){at(o).catch(()=>!1)}const Vo=()=>[{value:"",label:l("All")},{value:"online",label:l("Online")},{value:"recent",label:l("Active 30d")},{value:"never",label:l("No sign-in recorded")}];function Yo(o,e){if(e==="online")return o.filter(t=>t.openstation_presence==="online");if(e==="recent"){const t=Math.floor(Date.now()/1e3);return o.filter(s=>{const i=s.openstation_last_login;return typeof i=="number"&&i>0&&t-i<2592e3})}return e==="never"?o.filter(t=>typeof t.openstation_last_login!="number"||!t.openstation_last_login):o}const Xo=new Set(["identity","email","role","last_login","actions"]),Go={identity:"name",email:"email",registered:"registered_date"};function Zo(o){const e=o.openstation_user_stats;return[o.id,o.name,o.slug,o.email??"",(o.roles??[]).join(","),o.registered_date??"",o.openstation_last_login??"",o.openstation_presence??"",o.openstation_can_edit?1:0,e?`${e.posts}/${e.pages}/${e.comments}`:""].join("|")}function O(o,e,t,s){const i=`${e}::${t}`,n=o.get(i);if(n)return n;const r=s();return o.set(i,r),r}function Et(o,e){for(const t of Array.from(o.keys()))t.startsWith(`${e}::`)&&o.delete(t)}const V="var( --os-ui-fg-muted, #50575e )",Jo="display:inline-flex;align-items:center;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:600;background:var(--os-ui-badge-info-bg, rgba(34,113,177,0.10));color:var(--os-ui-info-fg, #0a4b78);white-space:nowrap;";function Qo(o,e){const t=document.createElement("span");t.style.cssText="display:flex;align-items:center;gap:10px;min-width:0;";const s=document.createElement("os-avatar");s.setAttribute("size","32"),o.name&&s.setAttribute("name",o.name),s.setAttribute("presence",o.openstation_presence??"offline");const i=vt(o.avatar_urls);i&&_t(s,i),t.appendChild(s);const n=document.createElement("span");n.style.cssText="display:flex;flex-direction:column;min-width:0;line-height:1.25;";const r=document.createElement("button");if(r.type="button",r.textContent=o.name||`#${o.id}`,r.title=r.textContent,r.setAttribute("data-noclick",""),r.style.cssText="appearance:none;background:transparent;border:none;padding:0;font:inherit;font-weight:600;color:inherit;cursor:pointer;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px;",r.addEventListener("mouseenter",()=>{r.style.textDecoration="underline"}),r.addEventListener("mouseleave",()=>{r.style.textDecoration="none"}),r.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),Q(o.id,e)}),n.appendChild(r),o.slug){const a=document.createElement("span");a.textContent=`@${o.slug}`,a.style.cssText=`font-size:11px;color:${V};white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px;`,n.appendChild(a)}return t.appendChild(n),t}function Q(o,e){Co(o,{source:"users-window/row-click",fallback:()=>{console.error("[openstation:desktop-mode-users] the User Edit window is not registered for this user."),e.toast(l("Profile window not registered — see console."))}})}function es(o,e){const t=document.createElement("button");t.type="button";const s=typeof o.email=="string"?o.email:"";return t.textContent=s||"—",t.disabled=s==="",t.title=s?l("Click to copy email"):"",t.style.cssText=["appearance:none","background:transparent","border:none","padding:2px 6px","font:inherit","color:inherit",`cursor:${s?"copy":"default"}`,"text-align:left","font-size:13px","border-radius:4px","max-width:100%","overflow:hidden","text-overflow:ellipsis","white-space:nowrap"].join(";"),t.addEventListener("click",i=>{i.stopPropagation(),s&&at(s).then(n=>{if(!n){e.toast(l("Could not copy the email address."));return}t.textContent=l("Copied!"),t.style.color="var(--wp-admin-theme-color, #2271b1)",setTimeout(()=>{t.textContent=s,t.style.color=""},1200)})}),t}function ts(o,e){const t=document.createElement("span");t.style.cssText="display:inline-flex;flex-wrap:wrap;gap:4px;min-width:0;";const s=Array.isArray(o.roles)?o.roles:[];if(s.length===0){const n=document.createElement("span");return n.textContent=l("No role"),n.style.cssText=`color:${V};font-style:italic;`,t.appendChild(n),t}const i=e.allRoles??{};for(const n of s){const r=document.createElement("span");r.textContent=i[n]??n,r.style.cssText=Jo,t.appendChild(r)}return t}function os(o){const e=o.openstation_user_stats??{posts:0,pages:0,comments:0},t=document.createElement("span");t.style.cssText="display:inline-flex;align-items:center;gap:10px;font-size:12px;font-variant-numeric:tabular-nums;";const s=(i,n,r)=>{const a=document.createElement("span");a.style.cssText="display:inline-flex;align-items:center;gap:3px;",a.title=r;const c=document.createElement("os-icon");c.setAttribute("name",i),c.setAttribute("size","14"),c.style.color=V;const d=document.createElement("span");return d.textContent=String(n),n===0&&(d.style.color=V),a.append(c,d),a};return t.append(s("admin-post",e.posts,l("Posts")),s("admin-page",e.pages,l("Pages")),s("admin-comments",e.comments,l("Comments"))),t}function Rt(o,e){const t=document.createElement("span");t.style.cssText="font-size:13px;font-variant-numeric:tabular-nums;";const s=zt(o);return Number.isFinite(s)?(t.appendChild(Bo(o)),t.title=rt(s,"datetime"),t):(t.textContent=e,t.style.color=V,t)}function ss(o,e,t){const s=document.createElement("span");if(s.style.cssText="display:inline-flex;gap:4px;align-items:center;",e.canEdit!==!0||o.openstation_can_edit!==!0)return s.textContent="—",s.style.color=V,s;const i=(n,r,a)=>{const c=document.createElement("os-icon");return c.setAttribute("name",r),c.setAttribute("size","18"),Ao({label:n,glyph:c,onClick:a})};return s.append(i(l("Send password reset"),"email-alt",()=>t.onSendReset(o)),i(l("Resend welcome email"),"megaphone",()=>t.onResendWelcome(o))),s}function is(o,e,t,s=_e()){const i=[{key:"identity",label:l("Name"),sortable:!0,sticky:!0,minWidth:"260px",render:(n,r)=>O(o,r.id,"identity",()=>Qo(r,t))},{key:"email",label:l("Email"),sortable:!0,minWidth:"220px",render:(n,r)=>O(o,r.id,"email",()=>es(r,t))},{key:"role",label:l("Role"),width:"180px",render:(n,r)=>O(o,r.id,"role",()=>ts(r,e))},{key:"stats",label:l("Content"),width:"160px",sortValue:n=>{const r=n.openstation_user_stats;return r?r.posts+r.pages+r.comments:0},render:(n,r)=>O(o,r.id,"stats",()=>os(r))},{key:"last_login",label:l("Last login"),width:"140px",sortable:!1,sortValue:n=>typeof n.openstation_last_login=="number"?n.openstation_last_login:0,render:(n,r)=>O(o,r.id,"last_login",()=>Rt(r.openstation_last_login,l("Never")))},{key:"registered",label:l("Registered"),width:"140px",sortable:!0,render:(n,r)=>O(o,r.id,"registered",()=>Rt(r.registered_date,"—"))}];return e.canEdit===!0&&i.push({key:"actions",label:l("Actions"),stack:"actions",width:"110px",sortable:!1,render:(n,r)=>O(o,r.id,"actions",()=>ss(r,e,t))}),s?i.filter(n=>Xo.has(n.key)):i}const ns=(o,e)=>e.allRoles?.[o]||o||l("No role");function U(o,e=48){return h`<os-avatar data-people-avatar=${vt(o.avatar_urls)||""} name=${o.name} size=${e} presence=${o.openstation_presence||""}></os-avatar>`}function rs(o){return o.openstation_presence==="online"?l("Online now"):o.openstation_presence==="inactive"?l("Away"):l("Offline")}function as(o){return o.openstation_last_login?h`<span>${l("Last sign-in")} <os-relative-time datetime=${new Date(o.openstation_last_login*1e3).toISOString()}></os-relative-time></span>`:l("No sign-in recorded")}function ls(o,e,t){return h`<os-action-menu text=${l("Actions")} label=${x(l("Actions for %s"),o.name)} @os-context-menu-pick=${s=>{const i=s.detail.id;i==="profile"&&Q(o.id,t),!(!e.canEdit||!o.openstation_can_edit)&&(i==="reset"&&t.onSendReset(o),i==="welcome"&&t.onResendWelcome(o))}}>
120 + <os-context-menu-option data-menu-item-id="profile" icon="dashicons-id">${l("View profile")}</os-context-menu-option>
121 + ${e.canEdit&&o.openstation_can_edit?h`
122 + <os-context-menu-option heading>${l("Account emails")}</os-context-menu-option>
123 + <os-context-menu-option data-menu-item-id="reset" icon="dashicons-lock">${l("Send password reset")}</os-context-menu-option>
124 + <os-context-menu-option data-menu-item-id="welcome" icon="dashicons-email-alt">${l("Resend welcome")}</os-context-menu-option>`:""}
125 + </os-action-menu>`}function cs(o){const e=new Date(o.registered_date||"");return Number.isNaN(e.getTime())?"—":e.toLocaleDateString(void 0,{month:"short",year:"numeric"})}function ds(o,e,t,s){const{cfg:i,actions:n}=e,r=i.canEdit||i.canPromote||i.canDelete;return h`<div class="os-people__cards" aria-label=${l("People directory")}>
126 + ${o.length?o.map(a=>h`<article class="os-people__card ${e.selected.includes(a.id)?"is-selected":""}" data-person-id=${a.id}>
127 + <header class="os-people__id-header"><span class="os-people__issuer"><span class="dashicons dashicons-id-alt" aria-hidden="true"></span> OPENSTATION <span>/ ${l("MEMBER")}</span></span>
128 + ${a.id===i.currentUserId?h`<span class="os-people__you">${l("You")}</span>`:""}
129 + ${r?h`<os-checkbox class="os-people__select" aria-label=${x(l("Select %s"),a.name)} ?checked=${e.selected.includes(a.id)} @os-checkbox-change=${c=>e.select(a.id,c.detail.checked)}></os-checkbox>`:""}
121 130 </header>
122 131 <div class="os-people__identity">
123 - <div class="os-people__portrait">${H(l,64)}<span class="os-people__member-number" title=${a("WordPress user ID")}>#${String(l.id).padStart(5,"0")}</span></div>
124 - <div class="os-people__credentials"><h3><os-button variant="ghost" title=${l.name} @click=${()=>V(l.id,i)}>${l.name||l.slug}</os-button></h3>
125 - <p class="os-people__handle">@${l.slug}</p>
126 - <div class="os-people__roles">${(l.roles.length?l.roles:[""]).map(d=>p`<span>${Go(d,n)}</span>`)}</div>
127 - <p class="os-people__email" title=${l.email||""}>${l.email||a("No email available")}</p>
128 - <p class="os-people__joined">${a("Member since")} <time datetime=${l.registered_date||""}>${Jo(l)}</time></p>
132 + <div class="os-people__portrait">${U(a,64)}<span class="os-people__member-number" title=${l("WordPress user ID")}>#${String(a.id).padStart(5,"0")}</span></div>
133 + <div class="os-people__credentials"><h3><os-button variant="ghost" title=${a.name} @click=${()=>Q(a.id,n)}>${a.name||a.slug}</os-button></h3>
134 + <p class="os-people__handle">@${a.slug}</p>
135 + <div class="os-people__roles">${(a.roles.length?a.roles:[""]).map(c=>h`<span>${ns(c,i)}</span>`)}</div>
136 + <p class="os-people__email" title=${a.email||""}>${a.email||l("No email available")}</p>
137 + <p class="os-people__joined">${l("Member since")} <time datetime=${a.registered_date||""}>${cs(a)}</time></p>
129 138 </div>
130 139 </div>
131 - <div class="os-people__stats" aria-label=${a("Published contributions")}>
132 - <os-stat value=${String(l.openstation_user_stats?.posts??"—")} label=${a("Posts")}></os-stat>
133 - <os-stat value=${String(l.openstation_user_stats?.pages??"—")} label=${a("Pages")}></os-stat>
134 - <os-stat value=${String(l.openstation_user_stats?.comments??"—")} label=${a("Comments")}></os-stat>
140 + <div class="os-people__stats" aria-label=${l("Published contributions")}>
141 + <os-stat value=${String(a.openstation_user_stats?.posts??"—")} label=${l("Posts")}></os-stat>
142 + <os-stat value=${String(a.openstation_user_stats?.pages??"—")} label=${l("Pages")}></os-stat>
143 + <os-stat value=${String(a.openstation_user_stats?.comments??"—")} label=${l("Comments")}></os-stat>
135 144 <span class="os-people__seal" aria-hidden="true"><span class="dashicons dashicons-admin-users"></span></span>
136 145 </div>
137 - <footer><span class="os-people__presence" data-presence=${l.openstation_presence||"offline"} title=${a("Current presence")}>${Ko(l)}</span><span class="os-people__last-login">${Vo(l)}</span>${Zo(l,n,i)}</footer>
138 - </article>`):p`<div class="os-people__empty"><span class="dashicons dashicons-admin-users" aria-hidden="true"></span><h3>${a(s?"Meeting your people…":"No people match this view.")}</h3><p>${a("Try another search, presence or role filter.")}</p></div>`}
146 + <footer><span class="os-people__presence" data-presence=${a.openstation_presence||"offline"} title=${l("Current presence")}>${rs(a)}</span><span class="os-people__last-login">${as(a)}</span>${ls(a,i,n)}</footer>
147 + </article>`):h`<div class="os-people__empty"><span class="dashicons dashicons-admin-users" aria-hidden="true"></span><h3>${l(s?"Meeting your people…":"No people match this view.")}</h3><p>${l("Try another search, presence or role filter.")}</p></div>`}
139 148 ${t}
140 - </div>`}function es(o,e){return p`<div class="os-people__role-grid">${o.map(t=>p`<article class="os-people__room">
149 + </div>`}function us(o,e){return h`<div class="os-people__role-grid">${o.map(t=>h`<article class="os-people__room">
141 150 <div class="os-people__orbit"><div class="os-people__orbit-center"><strong>${t.total}</strong><span>${t.label}</span></div>
142 - ${t.members.slice(0,8).map((s,n)=>{const i=n/Math.min(t.members.length,8)*Math.PI*2-Math.PI/2;return p`<span class="os-people__satellite" style=${`inset-inline-start:${50+Math.cos(i)*42}%;inset-block-start:${50+Math.sin(i)*42}%`} title=${s.name}>${H(s,36)}</span>`})}</div>
151 + ${t.members.slice(0,8).map((s,i)=>{const n=i/Math.min(t.members.length,8)*Math.PI*2-Math.PI/2;return h`<span class="os-people__satellite" style=${`inset-inline-start:${50+Math.cos(n)*42}%;inset-block-start:${50+Math.sin(n)*42}%`} title=${s.name}>${U(s,36)}</span>`})}</div>
143 152 <p>${t.members.slice(0,3).map(s=>s.name).join(", ")}${t.total>3?"…":""}</p>
144 - <os-button variant="secondary" ?disabled=${t.total===0} @click=${()=>e(t.role)}>${a("Meet this group")} ↗</os-button>
153 + <os-button variant="secondary" ?disabled=${t.total===0} @click=${()=>e(t.role)}>${l("Meet this group")} ↗</os-button>
145 154 </article>`)}
146 - ${o.length?"":p`<p class="os-people__empty">${a("No role groups found.")}</p>`}
147 - </div>`}function ts(o){queueMicrotask(()=>{o.querySelectorAll("[data-people-avatar]").forEach(e=>{const t=e.getAttribute("data-people-avatar")||"";e.dataset.avatarResolved!==t&&(e.dataset.avatarResolved=t,ht(e,t))}),o.querySelectorAll(".os-people__select, [data-os-users-search]").forEach(e=>e.shadowRoot?.querySelector("input")?.setAttribute("aria-label",e.getAttribute("aria-label")||""))})}const os=g` ${j} ${lt}:host{display:block;--_track-bg:var( --os-ui-progress-track-bg,var( --os-ui-surface-sunken,rgba( 0,0,0,0.08 ) ) );--_fill:var( --os-ui-progress-fill,var( --wp-admin-theme-color,#2271b1 ) );--_height:var( --os-ui-progress-height,6px );--_radius:var( --os-ui-progress-radius,999px );--_label-color:var( --os-ui-progress-label-color,inherit );--_label-size:var( --os-ui-progress-label-size,12px );--_label-gap:var( --os-ui-progress-label-gap,4px );width:100%;font:inherit;color:var( --_label-color )}:host( [ hidden ] ){display:none}.header{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:var( --_label-gap );font-size:var( --_label-size );line-height:1.3}.label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.percent{font-variant-numeric:tabular-nums;opacity:0.75;flex-shrink:0}.track{position:relative;width:100%;height:var( --_height );background:var( --_track-bg );border-radius:var( --_radius );overflow:hidden}.fill{position:absolute;inset-block:0;inset-inline-start:0;width:0;background:var( --_fill );border-radius:inherit;transition:width 0.18s ease-out}:host( [ tone='success' ] ){--os-ui-progress-fill:var( --os-ui-success-fg,#3a8a3a )}:host( [ tone='warning' ] ){--os-ui-progress-fill:var( --os-ui-warning-fg,#dba617 )}:host( [ tone='danger' ] ){--os-ui-progress-fill:var( --os-ui-danger,#d63638 )}:host( [ indeterminate ] ) .fill{width:100%;transition:none;background-image:var( --_fill );background-size:300% 300%;background-repeat:no-repeat;animation:os-holo-shimmer 2.4s var( --_holo-loop ) infinite}:host( [ indeterminate ][ tone ] ) .fill{width:33%;background-image:none;animation:os-progress-sweep 1.1s linear infinite}@keyframes os-progress-sweep{0%{transform:translateX( -120% )}100%{transform:translateX( 320% )}}@media ( prefers-reduced-motion:reduce ){.fill{transition:none}:host( [ indeterminate ] ) .fill,:host( [ indeterminate ][ tone ] ) .fill{animation:none;width:100%;opacity:0.6}}`,le=class le extends w{constructor(){super(...arguments),this._ownedAriaLabel=null}render(){return p`<div class="root" part="root">
155 + ${o.length?"":h`<p class="os-people__empty">${l("No role groups found.")}</p>`}
156 + </div>`}function ps(o){queueMicrotask(()=>{o.querySelectorAll("[data-people-avatar]").forEach(e=>{const t=e.getAttribute("data-people-avatar")||"";e.dataset.avatarResolved!==t&&(e.dataset.avatarResolved=t,_t(e,t))}),o.querySelectorAll(".os-people__select, [data-os-users-search]").forEach(e=>e.shadowRoot?.querySelector("input")?.setAttribute("aria-label",e.getAttribute("aria-label")||""))})}const hs=b` ${I} ${ft}:host{display:block;--_track-bg:var( --os-ui-progress-track-bg,var( --os-ui-surface-sunken,rgba( 0,0,0,0.08 ) ) );--_fill:var( --os-ui-progress-fill,var( --wp-admin-theme-color,#2271b1 ) );--_height:var( --os-ui-progress-height,6px );--_radius:var( --os-ui-progress-radius,999px );--_label-color:var( --os-ui-progress-label-color,inherit );--_label-size:var( --os-ui-progress-label-size,12px );--_label-gap:var( --os-ui-progress-label-gap,4px );width:100%;font:inherit;color:var( --_label-color )}:host( [ hidden ] ){display:none}.header{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:var( --_label-gap );font-size:var( --_label-size );line-height:1.3}.label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.percent{font-variant-numeric:tabular-nums;opacity:0.75;flex-shrink:0}.track{position:relative;width:100%;height:var( --_height );background:var( --_track-bg );border-radius:var( --_radius );overflow:hidden}.fill{position:absolute;inset-block:0;inset-inline-start:0;width:0;background:var( --_fill );border-radius:inherit;transition:width 0.18s ease-out}:host( [ tone='success' ] ){--os-ui-progress-fill:var( --os-ui-success-fg,#3a8a3a )}:host( [ tone='warning' ] ){--os-ui-progress-fill:var( --os-ui-warning-fg,#dba617 )}:host( [ tone='danger' ] ){--os-ui-progress-fill:var( --os-ui-danger,#d63638 )}:host( [ indeterminate ] ) .fill{width:100%;transition:none;background-image:var( --_fill );background-size:300% 300%;background-repeat:no-repeat;animation:os-holo-shimmer 2.4s var( --_holo-loop ) infinite}:host( [ indeterminate ][ tone ] ) .fill{width:33%;background-image:none;animation:os-progress-sweep 1.1s linear infinite}@keyframes os-progress-sweep{0%{transform:translateX( -120% )}100%{transform:translateX( 320% )}}@media ( prefers-reduced-motion:reduce ){.fill{transition:none}:host( [ indeterminate ] ) .fill,:host( [ indeterminate ][ tone ] ) .fill{animation:none;width:100%;opacity:0.6}}`,pe=class pe extends w{constructor(){super(...arguments),this._ownedAriaLabel=null}render(){return h`<div class="root" part="root">
148 157 <div class="header" part="header" hidden>
149 158 <span class="label" part="label"></span>
150 159 <span class="percent" part="percent"></span>
151 160 </div>
@@ -151,22 +160,22 @@
151 160 </div>
152 161 <div class="track" part="track">
153 162 <div class="fill" part="fill"></div>
154 163 </div>
155 - </div>`}requestUpdate(){super.requestUpdate(),queueMicrotask(()=>this._paint())}connectedCallback(){super.connectedCallback(),queueMicrotask(()=>this._paint())}_paint(){const e=this.shadowRoot;if(!e)return;const t=this._readMax(),s=this.hasAttribute("indeterminate")||t<=0,n=s?0:this._readValue(t),i=s?0:n/t,r=Math.round(i*100),l=this.getAttribute("label")??"",d=this.hasAttribute("show-percent"),c=e.querySelector(".fill");c&&!s?c.style.width=`${(i*100).toFixed(2)}%`:c&&s&&c.style.removeProperty("width");const h=e.querySelector(".header"),u=e.querySelector(".label"),m=e.querySelector(".percent");if(h&&u&&m){const b=l||d&&!s;h.hidden=!b,u.textContent=l,m.hidden=!(d&&!s),m.textContent=`${r}%`}this._syncAria(t,n,s,l);const f=e.querySelector(".track");f&&(f.setAttribute("role","progressbar"),f.setAttribute("aria-valuemin","0"),s?(f.removeAttribute("aria-valuenow"),f.removeAttribute("aria-valuemax")):(f.setAttribute("aria-valuemax",String(t)),f.setAttribute("aria-valuenow",String(n))),l?f.setAttribute("aria-label",l):f.removeAttribute("aria-label"))}_syncAria(e,t,s,n){this.setAttribute("role","progressbar"),this.setAttribute("aria-valuemin","0"),s?(this.removeAttribute("aria-valuenow"),this.removeAttribute("aria-valuemax")):(this.setAttribute("aria-valuemax",String(e)),this.setAttribute("aria-valuenow",String(t)));const i=this.getAttribute("aria-label");n?(i===null||i===this._ownedAriaLabel)&&(this.setAttribute("aria-label",n),this._ownedAriaLabel=n):i!==null&&i===this._ownedAriaLabel&&(this.removeAttribute("aria-label"),this._ownedAriaLabel=null)}_readMax(){const e=this.getAttribute("max");if(e===null)return 100;const t=parseFloat(e);return Number.isFinite(t)?t:100}_readValue(e){const t=parseFloat(this.getAttribute("value")??"0");return!Number.isFinite(t)||t<0?0:t>e?e:t}};le.props=["value","max","indeterminate","tone","label","showPercent"],le.styles=[os],le.help=void 0;let De=le;A("os-progress-bar",De);const ss=g`:host{display:block;position:relative;color:var( --os-ui-fg,#1d2327 );font-family:var( --os-ui-font,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif );font-size:12px}.head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-block-end:6px}:host(:not( [legend] ):not( [heading] ) ) .head{display:none}.heading{margin:0;font-size:13px;font-weight:600;color:var( --os-ui-fg,#1d2327 )}.heading[hidden]{display:none}.legend{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-inline-start:auto}:host(:not( [legend] ) ) .legend{display:none}.chip{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border:1px solid var( --os-ui-border,#dcdcde );border-radius:999px;background:transparent;color:var( --os-ui-fg-muted,#646970 );font:inherit;cursor:pointer;transition:opacity 0.12s ease,border-color 0.12s ease}.chip[aria-pressed='false']{opacity:0.45}.chip:hover{border-color:var( --os-ui-border-strong,#8c8f94 );color:var( --os-ui-fg,#1d2327 )}.chip:focus-visible{outline:2px solid var( --os-ui-accent,#2271b1 );outline-offset:1px}.count{font-variant-numeric:tabular-nums;color:var( --os-ui-fg,#1d2327 )}.swatch{display:inline-block;width:10px;height:10px;border-radius:3px;flex:none}.swatch,.seg{background:var( --_tone );fill:var( --_tone )}[data-tone='danger']{--_tone:var( --os-ui-danger,#d63638 )}[data-tone='warning']{--_tone:var( --os-ui-warning,#dba617 )}[data-tone='info']{--_tone:var( --os-ui-info-fg,#72aee6 )}[data-tone='success']{--_tone:var( --os-ui-success,#00a32a )}[data-tone='accent']{--_tone:var( --os-ui-accent,#2271b1 )}[data-tone='neutral']{--_tone:var( --os-ui-fg-muted,#646970 )}.chart{position:relative}svg{display:block;inline-size:100%}.grid{stroke:var( --os-ui-border,#dcdcde );stroke-width:1}.tick{fill:var( --os-ui-fg-muted,#646970 );font-size:10px;font-variant-numeric:tabular-nums}.hit{fill:transparent;cursor:crosshair}.hover{fill:var( --os-ui-surface-raised,rgba( 0,0,0,0.04 ) );pointer-events:none}.empty{padding:40px 0;text-align:center;font-size:13px;color:var( --os-ui-fg-muted,#646970 )}.tooltip{position:absolute;inset-block-start:4px;transform:translateX( -50% );min-inline-size:150px;padding:8px 10px;border-radius:6px;border:1px solid var( --os-ui-border,#dcdcde );background:var( --os-ui-surface-elevated,#fff );box-shadow:var( --os-ui-shadow,0 2px 8px rgba( 0,0,0,0.15 ) );pointer-events:none;z-index:2}.tooltip[hidden]{display:none}.tooltip-head{margin-block-end:6px;color:var( --os-ui-fg-muted,#646970 );font-size:11px}.tooltip-row{display:flex;align-items:center;gap:6px;line-height:1.6}.tooltip-label{flex:1}.tooltip-value{font-variant-numeric:tabular-nums;font-weight:600}`,ns="http://www.w3.org/2000/svg",Z=8,is=20,C=8,as=40,rs=24,qe=2,ls=150,cs=new Set(["danger","warning","info","success","accent","neutral"]);function $t(o,e){if(!o)return e;try{return JSON.parse(o)}catch{return e}}function ds(o){if(o<=5)return Math.max(1,o);const e=Math.pow(10,Math.floor(Math.log10(o)));for(const t of[1,2,5,10])if(t*e>=o)return t*e;return 10*e}function I(o,e){const t=document.createElementNS(ns,o);for(const[s,n]of Object.entries(e))t.setAttribute(s,n);return t}function ps(o,e,t,s){const n=Math.min(3,s/2,t/2);return`M ${o} ${e+s} L ${o} ${e+n} Q ${o} ${e} ${o+n} ${e} L ${o+t-n} ${e} Q ${o+t} ${e} ${o+t} ${e+n} L ${o+t} ${e+s} Z`}const ce=class ce extends w{constructor(){super(...arguments),this._resize=null,this._tooltip=null}connectedCallback(){super.connectedCallback(),typeof ResizeObserver<"u"&&(this._resize=new ResizeObserver(()=>this.paint()),this._resize.observe(this))}disconnectedCallback(){this._resize?.disconnect(),this._resize=null}requestUpdate(){super.requestUpdate(),queueMicrotask(()=>this.paint())}get seriesList(){const e=$t(this.getAttribute("series"),[]);return Array.isArray(e)?e.filter(t=>!!t&&typeof t=="object"&&typeof t.key=="string").map(t=>({key:t.key,label:typeof t.label=="string"?t.label:t.key,tone:t.tone&&cs.has(t.tone)?t.tone:"neutral"})):[]}get columnList(){const e=$t(this.getAttribute("columns"),[]);return Array.isArray(e)?e.map(t=>Array.isArray(t)?t.map(s=>Number.isFinite(Number(s))?Math.max(0,Number(s)):0):[]):[]}get hiddenSet(){return new Set((this.getAttribute("hidden-series")??"").split(",").map(e=>e.trim()).filter(e=>e!==""))}totals(){const e=this.seriesList,t=e.map(()=>0);for(const s of this.columnList)e.forEach((n,i)=>{t[i]+=s[i]??0});return t}toggleSeries(e){const t=this.hiddenSet;t.has(e)?t.delete(e):t.add(e);const s=Array.from(t);s.length>0?this.setAttribute("hidden-series",s.join(",")):this.removeAttribute("hidden-series"),this.emit("os-series-toggle",{key:e,hidden:s})}render(){const e=this.seriesList,t=this.totals(),s=this.hiddenSet,n=this.getAttribute("heading")??"";return p`
164 + </div>`}requestUpdate(){super.requestUpdate(),queueMicrotask(()=>this._paint())}connectedCallback(){super.connectedCallback(),queueMicrotask(()=>this._paint())}_paint(){const e=this.shadowRoot;if(!e)return;const t=this._readMax(),s=this.hasAttribute("indeterminate")||t<=0,i=s?0:this._readValue(t),n=s?0:i/t,r=Math.round(n*100),a=this.getAttribute("label")??"",c=this.hasAttribute("show-percent"),d=e.querySelector(".fill");d&&!s?d.style.width=`${(n*100).toFixed(2)}%`:d&&s&&d.style.removeProperty("width");const p=e.querySelector(".header"),u=e.querySelector(".label"),m=e.querySelector(".percent");if(p&&u&&m){const g=a||c&&!s;p.hidden=!g,u.textContent=a,m.hidden=!(c&&!s),m.textContent=`${r}%`}this._syncAria(t,i,s,a);const f=e.querySelector(".track");f&&(f.setAttribute("role","progressbar"),f.setAttribute("aria-valuemin","0"),s?(f.removeAttribute("aria-valuenow"),f.removeAttribute("aria-valuemax")):(f.setAttribute("aria-valuemax",String(t)),f.setAttribute("aria-valuenow",String(i))),a?f.setAttribute("aria-label",a):f.removeAttribute("aria-label"))}_syncAria(e,t,s,i){this.setAttribute("role","progressbar"),this.setAttribute("aria-valuemin","0"),s?(this.removeAttribute("aria-valuenow"),this.removeAttribute("aria-valuemax")):(this.setAttribute("aria-valuemax",String(e)),this.setAttribute("aria-valuenow",String(t)));const n=this.getAttribute("aria-label");i?(n===null||n===this._ownedAriaLabel)&&(this.setAttribute("aria-label",i),this._ownedAriaLabel=i):n!==null&&n===this._ownedAriaLabel&&(this.removeAttribute("aria-label"),this._ownedAriaLabel=null)}_readMax(){const e=this.getAttribute("max");if(e===null)return 100;const t=parseFloat(e);return Number.isFinite(t)?t:100}_readValue(e){const t=parseFloat(this.getAttribute("value")??"0");return!Number.isFinite(t)||t<0?0:t>e?e:t}};pe.props=["value","max","indeterminate","tone","label","showPercent"],pe.styles=[hs],pe.help=void 0;let Be=pe;S("os-progress-bar",Be);const ms=b`:host{display:block;position:relative;color:var( --os-ui-fg,#1d2327 );font-family:var( --os-ui-font,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif );font-size:12px}.head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-block-end:6px}:host(:not( [legend] ):not( [heading] ) ) .head{display:none}.heading{margin:0;font-size:13px;font-weight:600;color:var( --os-ui-fg,#1d2327 )}.heading[hidden]{display:none}.legend{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-inline-start:auto}:host(:not( [legend] ) ) .legend{display:none}.chip{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border:1px solid var( --os-ui-border,#dcdcde );border-radius:999px;background:transparent;color:var( --os-ui-fg-muted,#646970 );font:inherit;cursor:pointer;transition:opacity 0.12s ease,border-color 0.12s ease}.chip[aria-pressed='false']{opacity:0.45}.chip:hover{border-color:var( --os-ui-border-strong,#8c8f94 );color:var( --os-ui-fg,#1d2327 )}.chip:focus-visible{outline:2px solid var( --os-ui-accent,#2271b1 );outline-offset:1px}.count{font-variant-numeric:tabular-nums;color:var( --os-ui-fg,#1d2327 )}.swatch{display:inline-block;width:10px;height:10px;border-radius:3px;flex:none}.swatch,.seg{background:var( --_tone );fill:var( --_tone )}[data-tone='danger']{--_tone:var( --os-ui-danger,#d63638 )}[data-tone='warning']{--_tone:var( --os-ui-warning,#dba617 )}[data-tone='info']{--_tone:var( --os-ui-info-fg,#72aee6 )}[data-tone='success']{--_tone:var( --os-ui-success,#00a32a )}[data-tone='accent']{--_tone:var( --os-ui-accent,#2271b1 )}[data-tone='neutral']{--_tone:var( --os-ui-fg-muted,#646970 )}.chart{position:relative}svg{display:block;inline-size:100%}.grid{stroke:var( --os-ui-border,#dcdcde );stroke-width:1}.tick{fill:var( --os-ui-fg-muted,#646970 );font-size:10px;font-variant-numeric:tabular-nums}.hit{fill:transparent;cursor:crosshair}.hover{fill:var( --os-ui-surface-raised,rgba( 0,0,0,0.04 ) );pointer-events:none}.empty{padding:40px 0;text-align:center;font-size:13px;color:var( --os-ui-fg-muted,#646970 )}.tooltip{position:absolute;inset-block-start:4px;transform:translateX( -50% );min-inline-size:150px;padding:8px 10px;border-radius:6px;border:1px solid var( --os-ui-border,#dcdcde );background:var( --os-ui-surface-elevated,#fff );box-shadow:var( --os-ui-shadow,0 2px 8px rgba( 0,0,0,0.15 ) );pointer-events:none;z-index:2}.tooltip[hidden]{display:none}.tooltip-head{margin-block-end:6px;color:var( --os-ui-fg-muted,#646970 );font-size:11px}.tooltip-row{display:flex;align-items:center;gap:6px;line-height:1.6}.tooltip-label{flex:1}.tooltip-value{font-variant-numeric:tabular-nums;font-weight:600}`,fs="http://www.w3.org/2000/svg",ee=8,gs=20,z=8,bs=40,vs=24,Ke=2,_s=150,ys=new Set(["danger","warning","info","success","accent","neutral"]);function Lt(o,e){if(!o)return e;try{return JSON.parse(o)}catch{return e}}function xs(o){if(o<=5)return Math.max(1,o);const e=Math.pow(10,Math.floor(Math.log10(o)));for(const t of[1,2,5,10])if(t*e>=o)return t*e;return 10*e}function q(o,e){const t=document.createElementNS(fs,o);for(const[s,i]of Object.entries(e))t.setAttribute(s,i);return t}function ks(o,e,t,s){const i=Math.min(3,s/2,t/2);return`M ${o} ${e+s} L ${o} ${e+i} Q ${o} ${e} ${o+i} ${e} L ${o+t-i} ${e} Q ${o+t} ${e} ${o+t} ${e+i} L ${o+t} ${e+s} Z`}const he=class he extends w{constructor(){super(...arguments),this._resize=null,this._tooltip=null}connectedCallback(){super.connectedCallback(),typeof ResizeObserver<"u"&&(this._resize=new ResizeObserver(()=>this.paint()),this._resize.observe(this))}disconnectedCallback(){this._resize?.disconnect(),this._resize=null}requestUpdate(){super.requestUpdate(),queueMicrotask(()=>this.paint())}get seriesList(){const e=Lt(this.getAttribute("series"),[]);return Array.isArray(e)?e.filter(t=>!!t&&typeof t=="object"&&typeof t.key=="string").map(t=>({key:t.key,label:typeof t.label=="string"?t.label:t.key,tone:t.tone&&ys.has(t.tone)?t.tone:"neutral"})):[]}get columnList(){const e=Lt(this.getAttribute("columns"),[]);return Array.isArray(e)?e.map(t=>Array.isArray(t)?t.map(s=>Number.isFinite(Number(s))?Math.max(0,Number(s)):0):[]):[]}get hiddenSet(){return new Set((this.getAttribute("hidden-series")??"").split(",").map(e=>e.trim()).filter(e=>e!==""))}totals(){const e=this.seriesList,t=e.map(()=>0);for(const s of this.columnList)e.forEach((i,n)=>{t[n]+=s[n]??0});return t}toggleSeries(e){const t=this.hiddenSet;t.has(e)?t.delete(e):t.add(e);const s=Array.from(t);s.length>0?this.setAttribute("hidden-series",s.join(",")):this.removeAttribute("hidden-series"),this.emit("os-series-toggle",{key:e,hidden:s})}render(){const e=this.seriesList,t=this.totals(),s=this.hiddenSet,i=this.getAttribute("heading")??"";return h`
156 165 <div class="head" part="head">
157 - <h2 class="heading" part="heading" ?hidden=${n===""}>${n}</h2>
166 + <h2 class="heading" part="heading" ?hidden=${i===""}>${i}</h2>
158 167 <div class="legend" part="legend" role="group">
159 - ${e.map((i,r)=>p`
168 + ${e.map((n,r)=>h`
160 169 <button
161 170 type="button"
162 171 class="chip"
163 - data-tone=${i.tone??"neutral"}
164 - aria-pressed=${s.has(i.key)?"false":"true"}
165 - @click=${()=>this.toggleSeries(i.key)}
172 + data-tone=${n.tone??"neutral"}
173 + aria-pressed=${s.has(n.key)?"false":"true"}
174 + @click=${()=>this.toggleSeries(n.key)}
166 175 >
167 176 <span class="swatch"></span>
168 - <span class="label">${i.label}</span>
177 + <span class="label">${n.label}</span>
169 178 <span class="count">${t[r].toLocaleString()}</span>
170 179 </button>
171 180 `)}
172 181 </div>
@@ -172,9 +181,9 @@
172 181 </div>
173 182 </div>
174 183 <div class="chart" part="chart"></div>
175 184 <div class="tooltip" part="tooltip" hidden></div>
176 - `}paint(){const e=this.shadowRoot,t=e?.querySelector(".chart"),s=e?.querySelector(".tooltip");if(!t||!s)return;this._tooltip=s,s.hidden=!0,t.textContent="";const n=this.columnList,i=n.some(v=>v.some(k=>k>0));if(n.length===0||!i){const v=document.createElement("div");v.className="empty",v.textContent=this.getAttribute("empty")??"",t.appendChild(v);return}const r=this.seriesList,l=this.hiddenSet,d=r.map((v,k)=>l.has(v.key)?-1:k).filter(v=>v>=0),c=parseInt(this.getAttribute("height")??"",10),h=Number.isFinite(c)&&c>40?c:ls,u=Math.max(280,this.clientWidth||640),m=u-C-as,f=h-Z-is,b=n.length,y=m/b,_=Math.max(2,Math.min(rs,y-qe)),R=n.reduce((v,k)=>{const L=d.reduce((P,ke)=>P+(k[ke]??0),0);return Math.max(v,L)},0),z=ds(R),N=f/z,S=I("svg",{width:String(u),height:String(h),viewBox:`0 0 ${u} ${h}`,role:"img"});for(const v of[0,.5,1]){const k=z*v,L=Z+f-k*N;S.appendChild(I("line",{class:"grid",x1:String(C),y1:String(L),x2:String(C+m),y2:String(L)}));const P=I("text",{class:"tick",x:String(C+m+6),y:String(L+3.5)});P.textContent=Number.isInteger(k)?k.toLocaleString():String(k),S.appendChild(P)}const U=Number(this.getAttribute("start"))||0,ye=Number(this.getAttribute("end"))||U+b,Nt=Math.max(1,(ye-U)/b),Rs=ye-U>36*3600,Lt=v=>new Date(v*1e3).toLocaleString([],Rs?{month:"short",day:"numeric"}:{hour:"2-digit",minute:"2-digit"}),Ns=v=>new Date(v*1e3).toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),Ls=[[U,C,"start"],[U+(ye-U)/2,C+m/2,"middle"],[ye,C+m,"end"]];for(const[v,k,L]of Ls){const P=I("text",{class:"tick",x:String(k),y:String(h-5),"text-anchor":L});P.textContent=Lt(v),S.appendChild(P)}const xe=I("rect",{class:"hover",y:String(Z),width:String(y),height:String(f),visibility:"hidden"});S.appendChild(xe),n.forEach((v,k)=>{const L=C+k*y+(y-_)/2;let P=Z+f;const ke=d.filter(ue=>(v[ue]??0)>0),Ps=ke[ke.length-1];for(const ue of d){const Pt=v[ue]??0;if(Pt===0)continue;const Mt=r[ue].tone??"neutral",Ye=Pt*N,Xe=P-Ye;ue===Ps?S.appendChild(I("path",{class:"seg","data-tone":Mt,d:ps(L,Xe,_,Math.max(1.5,Ye))})):S.appendChild(I("rect",{class:"seg","data-tone":Mt,x:String(L),y:String(Xe+qe),width:String(_),height:String(Math.max(1.5,Ye-qe))})),P=Xe}const Oe=I("rect",{class:"hit",x:String(C+k*y),y:String(Z),width:String(y),height:String(f)});Oe.addEventListener("pointerenter",()=>{xe.setAttribute("x",String(C+k*y)),xe.setAttribute("visibility","visible"),this.showTooltip(k,v,y,u,{head:`${Ns(U+k*Nt)} – ${Lt(U+(k+1)*Nt)}`,series:r,visibleIndexes:d})}),Oe.addEventListener("pointerleave",()=>{xe.setAttribute("visibility","hidden"),s.hidden=!0}),S.appendChild(Oe)}),t.appendChild(S)}showTooltip(e,t,s,n,i){const r=this._tooltip;if(!r)return;r.textContent="";const l=document.createElement("div");l.className="tooltip-head",l.textContent=i.head,r.appendChild(l);let d=0;for(const h of[...i.visibleIndexes].reverse()){const u=t[h]??0;if(u===0)continue;d++;const m=document.createElement("div");m.className="tooltip-row";const f=document.createElement("span");f.className="swatch",f.dataset.tone=i.series[h].tone??"neutral";const b=document.createElement("span");b.className="tooltip-label",b.textContent=i.series[h].label;const y=document.createElement("span");y.className="tooltip-value",y.textContent=u.toLocaleString(),m.append(f,b,y),r.appendChild(m)}if(d===0){const h=document.createElement("div");h.className="tooltip-row",h.textContent="—",r.appendChild(h)}r.hidden=!1;const c=C+e*s+s/2;r.style.left=`${Math.max(60,Math.min(c,n-60))}px`}};ce.props=["heading","series","columns","start","end","hidden-series","legend","empty","height"],ce.styles=[ss],ce.help=void 0;let Fe=ce;A("os-histogram",Fe);const us=g` ${j}:host{display:inline-flex;position:relative;padding:3px;background:var( --os-ui-segmented-bg,var( --os-ui-hover,rgba( 0,0,0,0.05 ) ) );border-radius:8px;gap:2px}.os-segmented__thumb{position:absolute;top:3px;bottom:3px;left:0;width:var( --_thumb-w,0px );border-radius:6px;background-color:var( --os-ui-segmented-selected-bg,var( --os-ui-accent,#2271b1 ) );background-image:var( --os-ui-segmented-selected-image,none );background-size:220% 220%;background-position:22% 28%;background-repeat:no-repeat;transform:translateX( var( --_thumb-x,0px ) );pointer-events:none;opacity:0}:host( [ data-thumb ] ) .os-segmented__thumb{opacity:1}:host( [ data-thumb-ready ] ) .os-segmented__thumb{transition:transform var( --_holo-t-slow ) var( --_holo-spring ),width var( --_holo-t-slow ) var( --_holo-ease ),opacity var( --_holo-t-fast ) linear}@media ( prefers-reduced-motion:reduce ){:host( [ data-thumb-ready ] ) .os-segmented__thumb{transition-duration:1ms}}`,hs=g` ${j} ${ze}:host{flex:1 1 auto;min-width:0}button{appearance:none;display:block;width:100%;padding:6px 13px;background:transparent;border:0;font:inherit;font-size:13px;color:var( --os-ui-fg-muted,#646970 );cursor:pointer;border-radius:6px;transition:background-color var( --_holo-t ) ease,color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,background-position var( --_holo-t ) ease;white-space:nowrap}button:hover{color:var( --os-ui-fg,#1d2327 )}button:focus-visible{outline:none;box-shadow:var( --_holo-focus )}:host( [ aria-checked='true' ] ) button{color:var( --os-ui-segmented-selected-fg,var( --os-ui-fg-on-accent,#fff ) );transition-duration:var( --_holo-t-fast )}:host( [ aria-checked='true' ] ) button::before{display:none}`,de=class de extends w{render(){return this.setAttribute("role","radio"),p`
185 + `}paint(){const e=this.shadowRoot,t=e?.querySelector(".chart"),s=e?.querySelector(".tooltip");if(!t||!s)return;this._tooltip=s,s.hidden=!0,t.textContent="";const i=this.columnList,n=i.some(y=>y.some(k=>k>0));if(i.length===0||!n){const y=document.createElement("div");y.className="empty",y.textContent=this.getAttribute("empty")??"",t.appendChild(y);return}const r=this.seriesList,a=this.hiddenSet,c=r.map((y,k)=>a.has(y.key)?-1:k).filter(y=>y>=0),d=parseInt(this.getAttribute("height")??"",10),p=Number.isFinite(d)&&d>40?d:_s,u=Math.max(280,this.clientWidth||640),m=u-z-bs,f=p-ee-gs,g=i.length,_=m/g,v=Math.max(2,Math.min(vs,_-Ke)),L=i.reduce((y,k)=>{const N=c.reduce((P,Ce)=>P+(k[Ce]??0),0);return Math.max(y,N)},0),A=xs(L),T=f/A,C=q("svg",{width:String(u),height:String(p),viewBox:`0 0 ${u} ${p}`,role:"img"});for(const y of[0,.5,1]){const k=A*y,N=ee+f-k*T;C.appendChild(q("line",{class:"grid",x1:String(z),y1:String(N),x2:String(z+m),y2:String(N)}));const P=q("text",{class:"tick",x:String(z+m+6),y:String(N+3.5)});P.textContent=Number.isInteger(k)?k.toLocaleString():String(k),C.appendChild(P)}const H=Number(this.getAttribute("start"))||0,Se=Number(this.getAttribute("end"))||H+g,Wt=Math.max(1,(Se-H)/g),Us=Se-H>36*3600,Ht=y=>new Date(y*1e3).toLocaleString([],Us?{month:"short",day:"numeric"}:{hour:"2-digit",minute:"2-digit"}),js=y=>new Date(y*1e3).toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),Bs=[[H,z,"start"],[H+(Se-H)/2,z+m/2,"middle"],[Se,z+m,"end"]];for(const[y,k,N]of Bs){const P=q("text",{class:"tick",x:String(k),y:String(p-5),"text-anchor":N});P.textContent=Ht(y),C.appendChild(P)}const Ae=q("rect",{class:"hover",y:String(ee),width:String(_),height:String(f),visibility:"hidden"});C.appendChild(Ae),i.forEach((y,k)=>{const N=z+k*_+(_-v)/2;let P=ee+f;const Ce=c.filter(ge=>(y[ge]??0)>0),Ks=Ce[Ce.length-1];for(const ge of c){const Ot=y[ge]??0;if(Ot===0)continue;const Ut=r[ge].tone??"neutral",Qe=Ot*T,et=P-Qe;ge===Ks?C.appendChild(q("path",{class:"seg","data-tone":Ut,d:ks(N,et,v,Math.max(1.5,Qe))})):C.appendChild(q("rect",{class:"seg","data-tone":Ut,x:String(N),y:String(et+Ke),width:String(v),height:String(Math.max(1.5,Qe-Ke))})),P=et}const Je=q("rect",{class:"hit",x:String(z+k*_),y:String(ee),width:String(_),height:String(f)});Je.addEventListener("pointerenter",()=>{Ae.setAttribute("x",String(z+k*_)),Ae.setAttribute("visibility","visible"),this.showTooltip(k,y,_,u,{head:`${js(H+k*Wt)} – ${Ht(H+(k+1)*Wt)}`,series:r,visibleIndexes:c})}),Je.addEventListener("pointerleave",()=>{Ae.setAttribute("visibility","hidden"),s.hidden=!0}),C.appendChild(Je)}),t.appendChild(C)}showTooltip(e,t,s,i,n){const r=this._tooltip;if(!r)return;r.textContent="";const a=document.createElement("div");a.className="tooltip-head",a.textContent=n.head,r.appendChild(a);let c=0;for(const p of[...n.visibleIndexes].reverse()){const u=t[p]??0;if(u===0)continue;c++;const m=document.createElement("div");m.className="tooltip-row";const f=document.createElement("span");f.className="swatch",f.dataset.tone=n.series[p].tone??"neutral";const g=document.createElement("span");g.className="tooltip-label",g.textContent=n.series[p].label;const _=document.createElement("span");_.className="tooltip-value",_.textContent=u.toLocaleString(),m.append(f,g,_),r.appendChild(m)}if(c===0){const p=document.createElement("div");p.className="tooltip-row",p.textContent="—",r.appendChild(p)}r.hidden=!1;const d=z+e*s+s/2;r.style.left=`${Math.max(60,Math.min(d,i-60))}px`}};he.props=["heading","series","columns","start","end","hidden-series","legend","empty","height"],he.styles=[ms],he.help=void 0;let Ve=he;S("os-histogram",Ve);const ws=b` ${I}:host{display:inline-flex;position:relative;padding:3px;background:var( --os-ui-segmented-bg,var( --os-ui-hover,rgba( 0,0,0,0.05 ) ) );border-radius:8px;gap:2px;box-shadow:var( --os-ui-segmented-edge,none )}.os-segmented__thumb{position:absolute;top:3px;bottom:3px;left:0;width:var( --_thumb-w,0px );border-radius:6px;background-color:var( --os-ui-segmented-selected-bg,color-mix( in srgb,var( --os-ui-accent,#2271b1 ) var( --os-ui-segmented-selected-accent,100% ),var( --os-ui-segmented-selected-base,var( --os-ui-surface,#fff ) ) ) );background-image:var( --os-ui-segmented-selected-image,none );box-shadow:var( --os-ui-segmented-selected-shadow,none );background-size:220% 220%;background-position:22% 28%;background-repeat:no-repeat;transform:translateX( var( --_thumb-x,0px ) );pointer-events:none;opacity:0}:host( [ data-thumb ] ) .os-segmented__thumb{opacity:1}:host( [ data-thumb-ready ] ) .os-segmented__thumb{transition:transform var( --_holo-t-slow ) var( --_holo-spring ),width var( --_holo-t-slow ) var( --_holo-ease ),opacity var( --_holo-t-fast ) linear}@media ( prefers-reduced-motion:reduce ){:host( [ data-thumb-ready ] ) .os-segmented__thumb{transition-duration:1ms}}`,$s=b` ${I} ${Le}:host{flex:1 1 auto;min-width:0;--_holo-sheen:var( --os-ui-segmented-hover-sheen,var( --os-ui-holo-sheen,linear-gradient( 124deg,rgba( 159,214,255,0.1 ) 0%,rgba( 236,155,255,0.12 ) 34%,rgba( 242,82,252,0.1 ) 58%,rgba( 147,240,198,0.09 ) 100% ) ) )}button{appearance:none;display:block;width:100%;padding:6px 13px;background:transparent;border:0;font:inherit;font-size:13px;color:var( --os-ui-fg-muted,#646970 );cursor:pointer;border-radius:6px;transition:background-color var( --_holo-t ) ease,color var( --_holo-t ) ease,box-shadow var( --_holo-t ) ease,background-position var( --_holo-t ) ease;white-space:nowrap}button:hover{color:var( --os-ui-fg,#1d2327 )}:host(:not( [ aria-checked='true' ] ) ) button:hover{background-color:var( --os-ui-segmented-hover-bg,transparent )}button:focus-visible{outline:none;box-shadow:var( --_holo-focus )}:host( [ aria-checked='true' ] ) button{color:var( --os-ui-segmented-selected-fg,color-mix( in srgb,var( --os-ui-accent-ink,var( --os-ui-fg-on-accent,#fff ) ) var( --os-ui-segmented-selected-accent,100% ),var( --os-ui-fg,#1d2327 ) ) );transition-duration:var( --_holo-t-fast )}:host( [ aria-checked='true' ] ) button::before{display:none}`,me=class me extends w{render(){return this.setAttribute("role","radio"),h`
177 186 <button
178 187 type="button"
179 188 class="os-holo-sheen"
180 189 @click=${()=>this._onPick()}
@@ -180,164 +189,165 @@
180 189 @click=${()=>this._onPick()}
181 190 >
182 191 <slot></slot>
183 192 </button>
184 - `}_onPick(){this.emit("os-segment-pick",{value:this.value})}};de.props=["value"],de.styles=[hs],de.help=void 0;let Ue=de;A("os-segment",Ue);const pe=class pe extends w{constructor(){super(...arguments),this._resizeObserver=null}connectedCallback(){super.connectedCallback(),this.addEventListener("os-segment-pick",e=>{const t=e.detail;e.stopPropagation(),this.value=t.value,this.emit("os-pick",{value:t.value})}),typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(()=>this._placeThumb()),this._resizeObserver.observe(this))}disconnectedCallback(){this._resizeObserver?.disconnect(),this._resizeObserver=null}_placeThumb(){if(!this.shadowRoot?.querySelector(".os-segmented__thumb"))return;const t=this.value,s=Array.from(this.querySelectorAll(":scope > os-segment")).find(c=>c.getAttribute("value")===t);if(!s||this.offsetWidth===0){this.removeAttribute("data-thumb");return}const n=this.getBoundingClientRect(),i=n.width/this.offsetWidth,r=Math.abs(i-1)<.02?1:i;if(!(r>0))return;const l=s.getBoundingClientRect(),d=c=>`${Math.round(c*100)/100}px`;this.style.setProperty("--_thumb-x",d((l.left-n.left)/r)),this.style.setProperty("--_thumb-w",d(l.width/r)),this.setAttribute("data-thumb",""),this.hasAttribute("data-thumb-ready")||requestAnimationFrame(()=>this.setAttribute("data-thumb-ready",""))}set items(e){const t=this.querySelectorAll(":scope > os-segment");for(const i of Array.from(t))i.remove();for(const i of e){const r=document.createElement("os-segment");r.setAttribute("value",i.value),r.textContent=i.label,this.appendChild(r)}const s=this.value;!(s!==null&&e.some(i=>i.value===s))&&e.length>0?this.value=e[0].value:this.requestUpdate()}render(){const e=this.label||"";e&&this.setAttribute("aria-label",e),this.setAttribute("role","radiogroup");const t=this.value;return queueMicrotask(()=>{const s=this.querySelectorAll("os-segment");for(const n of Array.from(s)){const i=n.getAttribute("value");n.setAttribute("aria-checked",i===t?"true":"false")}this._placeThumb()}),p`<span class="os-segmented__thumb" aria-hidden="true"></span
185 - ><slot></slot>`}};pe.props=["value","label"],pe.styles=[us],pe.help={title:"Segmented",summary:"iOS-style segmented radio group. Pill-shaped bar of equal-width <os-segment> children where exactly one is active.",status:"stable",props:[{name:"value",type:"string",description:"Currently selected segment value. Mirrored onto child aria-checked."},{name:"label",type:"string",description:"aria-label for the radiogroup."}],slots:[{name:"(default)",description:'<os-segment value="…"> children.'}],events:[{name:"os-pick",description:"Fires when the selected segment changes.",detail:"{ value: string }"}],cssProps:[{name:"--os-window-bg",description:"Pill background."},{name:"--os-ui-fg",description:"Active label colour."},{name:"--os-ui-fg-muted",description:"Inactive label colour."}],example:p`
193 + `}_onPick(){this.emit("os-segment-pick",{value:this.value})}};me.props=["value"],me.styles=[$s],me.help=void 0;let Ye=me;S("os-segment",Ye);const fe=class fe extends w{constructor(){super(...arguments),this._resizeObserver=null}connectedCallback(){super.connectedCallback(),this.addEventListener("os-segment-pick",e=>{const t=e.detail;e.stopPropagation(),this.value=t.value,this.emit("os-pick",{value:t.value})}),typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(()=>this._placeThumb()),this._resizeObserver.observe(this))}disconnectedCallback(){this._resizeObserver?.disconnect(),this._resizeObserver=null}_placeThumb(){if(!this.shadowRoot?.querySelector(".os-segmented__thumb"))return;const t=this.value,s=Array.from(this.querySelectorAll(":scope > os-segment")).find(d=>d.getAttribute("value")===t);if(!s||this.offsetWidth===0){this.removeAttribute("data-thumb");return}const i=this.getBoundingClientRect(),n=i.width/this.offsetWidth,r=Math.abs(n-1)<.02?1:n;if(!(r>0))return;const a=s.getBoundingClientRect(),c=d=>`${Math.round(d*100)/100}px`;this.style.setProperty("--_thumb-x",c((a.left-i.left)/r)),this.style.setProperty("--_thumb-w",c(a.width/r)),this.setAttribute("data-thumb",""),this.hasAttribute("data-thumb-ready")||requestAnimationFrame(()=>this.setAttribute("data-thumb-ready",""))}set items(e){const t=this.querySelectorAll(":scope > os-segment");for(const n of Array.from(t))n.remove();for(const n of e){const r=document.createElement("os-segment");r.setAttribute("value",n.value),r.textContent=n.label,this.appendChild(r)}const s=this.value;!(s!==null&&e.some(n=>n.value===s))&&e.length>0?this.value=e[0].value:this.requestUpdate()}render(){const e=this.label||"";e&&this.setAttribute("aria-label",e),this.setAttribute("role","radiogroup");const t=this.value;return queueMicrotask(()=>{const s=this.querySelectorAll("os-segment");for(const i of Array.from(s)){const n=i.getAttribute("value");i.setAttribute("aria-checked",n===t?"true":"false")}this._placeThumb()}),h`<span class="os-segmented__thumb" aria-hidden="true"></span
194 + ><slot></slot>`}};fe.props=["value","label"],fe.styles=[ws],fe.help={title:"Segmented",summary:"iOS-style segmented radio group. Pill-shaped bar of equal-width <os-segment> children where exactly one is active.",status:"stable",props:[{name:"value",type:"string",description:"Currently selected segment value. Mirrored onto child aria-checked."},{name:"label",type:"string",description:"aria-label for the radiogroup."}],slots:[{name:"(default)",description:'<os-segment value="…"> children.'}],events:[{name:"os-pick",description:"Fires when the selected segment changes.",detail:"{ value: string }"}],cssProps:[{name:"--os-window-bg",description:"Pill background."},{name:"--os-ui-fg",description:"Active label colour."},{name:"--os-ui-fg-muted",description:"Inactive label colour."}],example:h`
186 195 <os-segmented value="md" label="Dock size">
187 196 <os-segment value="sm">Small</os-segment>
188 197 <os-segment value="md">Medium</os-segment>
189 198 <os-segment value="lg">Large</os-segment>
190 199 </os-segmented>
191 - `};let je=pe;A("os-segmented",je);const O=864e5;function X(o){const e=o.registered_date;return e?Date.parse(/(?:Z|[+-]\d\d:\d\d)$/i.test(e)?e:`${e}Z`):NaN}function E(o,e){const t=o.openstation_user_stats?.[e];return typeof t=="number"&&Number.isFinite(t)&&t>0?t:0}function ms(o,e){return o.filter(t=>E(t,e)>0).sort((t,s)=>E(s,e)-E(t,e)||t.name.localeCompare(s.name)||t.id-s.id)}function fs(o,e=Date.now()){const t=o.filter(c=>c.openstation_user_stats),s={posts:0,pages:0,comments:0};for(const c of t)for(const h of["posts","pages","comments"])s[h]+=E(c,h);const n=o.filter(c=>X(c)>0&&X(c)<=e).sort((c,h)=>X(h)-X(c)),i=o.filter(c=>typeof c.openstation_last_login=="number"&&c.openstation_last_login>0&&c.openstation_last_login*1e3<=e).sort((c,h)=>h.openstation_last_login-c.openstation_last_login),r=Math.floor(e/O)*O+O,l=r-56*O,d=Array.from({length:8},()=>[0]);for(const c of n){const h=Math.floor((X(c)-l)/(7*O));h>=0&&h<8&&d[h][0]++}return{totals:s,known:t.length,contributors:t.filter(c=>E(c,"posts")+E(c,"pages")+E(c,"comments")>0).length,online:o.filter(c=>c.openstation_presence==="online"),away:o.filter(c=>c.openstation_presence==="inactive"),unknownPresence:o.filter(c=>!["online","inactive","offline"].includes(c.openstation_presence||"")).length,recent:n.filter(c=>X(c)>=e-30*O).length,registered:n,logins:i,active30:i.filter(c=>c.openstation_last_login*1e3>=e-30*O).length,unrecorded:o.length-i.length,start:l/1e3,end:r/1e3,weeks:d}}const T=o=>o.toLocaleString(),wt=o=>({posts:a("Posts"),pages:a("Pages"),comments:a("Comments")})[o];function J(o,e){return p`<os-button variant="ghost" class="os-community__person" @click=${()=>V(o.id,e)}>${o.name||o.slug}</os-button>`}function ve(o,e,t,s){return p`<article class="os-community__metric"><span class="dashicons ${s}" aria-hidden="true"></span><strong>${o}</strong><div><h3>${e}</h3><p>${t}</p></div></article>`}function gs(o,e,t,s,n){const i=Array.isArray(o)?{...fs(o),total:o.length,onlineCount:o.filter(u=>u.openstation_presence==="online").length,awayCount:o.filter(u=>u.openstation_presence==="inactive").length}:o,r=Array.isArray(o)?ms(o,s):o.leaders[s],l=r[0],d=[...i.online,...i.away],c=l?E(l,s):1,h=i.totals.posts+i.totals.pages;return p`<div class="os-community">
192 - <div class="os-community__metrics" aria-label=${a("Community overview")}>
193 - ${ve(T(i.onlineCount),a("Online now"),x(a("%d away at last refresh"),i.awayCount),"dashicons-admin-users")}
194 - ${ve(T(i.recent),a("New accounts"),a("Registered in the last 30 days"),"dashicons-welcome-add-page")}
195 - ${ve(T(i.active30),a("Checked in"),a("Latest sign-in within 30 days"),"dashicons-clock")}
196 - ${ve(i.known?T(i.contributors):"—",a("Contributors"),a("Published work or approved comments"),"dashicons-edit")}
200 + `};let Xe=fe;S("os-segmented",Xe);const j=864e5;function Y(o){const e=o.registered_date;return e?Date.parse(/(?:Z|[+-]\d\d:\d\d)$/i.test(e)?e:`${e}Z`):NaN}function E(o,e){const t=o.openstation_user_stats?.[e];return typeof t=="number"&&Number.isFinite(t)&&t>0?t:0}function Ss(o,e){return o.filter(t=>E(t,e)>0).sort((t,s)=>E(s,e)-E(t,e)||t.name.localeCompare(s.name)||t.id-s.id)}function As(o,e=Date.now()){const t=o.filter(d=>d.openstation_user_stats),s={posts:0,pages:0,comments:0};for(const d of t)for(const p of["posts","pages","comments"])s[p]+=E(d,p);const i=o.filter(d=>Y(d)>0&&Y(d)<=e).sort((d,p)=>Y(p)-Y(d)),n=o.filter(d=>typeof d.openstation_last_login=="number"&&d.openstation_last_login>0&&d.openstation_last_login*1e3<=e).sort((d,p)=>p.openstation_last_login-d.openstation_last_login),r=Math.floor(e/j)*j+j,a=r-56*j,c=Array.from({length:8},()=>[0]);for(const d of i){const p=Math.floor((Y(d)-a)/(7*j));p>=0&&p<8&&c[p][0]++}return{totals:s,known:t.length,contributors:t.filter(d=>E(d,"posts")+E(d,"pages")+E(d,"comments")>0).length,online:o.filter(d=>d.openstation_presence==="online"),away:o.filter(d=>d.openstation_presence==="inactive"),unknownPresence:o.filter(d=>!["online","inactive","offline"].includes(d.openstation_presence||"")).length,recent:i.filter(d=>Y(d)>=e-30*j).length,registered:i,logins:n,active30:n.filter(d=>d.openstation_last_login*1e3>=e-30*j).length,unrecorded:o.length-n.length,start:a/1e3,end:r/1e3,weeks:c}}const R=o=>o.toLocaleString(),Tt=o=>({posts:l("Posts"),pages:l("Pages"),comments:l("Comments")})[o];function te(o,e){return h`<os-button variant="ghost" class="os-community__person" @click=${()=>Q(o.id,e)}>${o.name||o.slug}</os-button>`}function we(o,e,t,s){return h`<article class="os-community__metric"><span class="dashicons ${s}" aria-hidden="true"></span><strong>${o}</strong><div><h3>${e}</h3><p>${t}</p></div></article>`}function Cs(o,e,t,s,i){const n=Array.isArray(o)?{...As(o),total:o.length,onlineCount:o.filter(u=>u.openstation_presence==="online").length,awayCount:o.filter(u=>u.openstation_presence==="inactive").length}:o,r=Array.isArray(o)?Ss(o,s):o.leaders[s],a=r[0],c=[...n.online,...n.away],d=a?E(a,s):1,p=n.totals.posts+n.totals.pages;return h`<div class="os-community">
201 + <div class="os-community__metrics" aria-label=${l("Community overview")}>
202 + ${we(R(n.onlineCount),l("Online now"),x(l("%d away at last refresh"),n.awayCount),"dashicons-admin-users")}
203 + ${we(R(n.recent),l("New accounts"),l("Registered in the last 30 days"),"dashicons-welcome-add-page")}
204 + ${we(R(n.active30),l("Checked in"),l("Latest sign-in within 30 days"),"dashicons-clock")}
205 + ${we(n.known?R(n.contributors):"—",l("Contributors"),l("Published work or approved comments"),"dashicons-edit")}
197 206 </div>
198 207 <div class="os-community__grid">
199 208 <section class="os-community__panel os-community__work">
200 - <header><div><span class="os-community__eyebrow">${a("MADE BY YOUR PEOPLE")}</span><h3>${a("The work we share")}</h3></div><span class="os-community__stamp" aria-hidden="true">↗</span></header>
201 - <div class="os-community__totals"><div><strong>${i.known?T(h):"—"}</strong><span>${a("published pieces")}</span></div><p>${x(a("%1$s posts · %2$s pages · %3$s approved comments"),i.known?T(i.totals.posts):"—",i.known?T(i.totals.pages):"—",i.known?T(i.totals.comments):"—")}</p></div>
202 - <os-segmented label=${a("Rank contributions by")} value=${s} @os-pick=${u=>{const m=u.detail.value;["posts","pages","comments"].includes(m)&&n(m)}}>${["posts","pages","comments"].map(u=>p`<os-segment value=${u}>${wt(u)}</os-segment>`)}</os-segmented>
203 - ${l?p`<div class="os-community__spotlight">${H(l,58)}<div><span class="os-community__eyebrow">${a("LEADING THIS COMMUNITY")}</span>${J(l,e)}<p>${l.roles.map(u=>t.allRoles?.[u]||u).join(" · ")}</p></div><strong>${T(E(l,s))}<small>${wt(s)}</small></strong></div>`:p`<p class="os-community__empty">${a("No contributions of this kind yet.")}</p>`}
204 - <ol class="os-community__leaders" start="2">${r.slice(1,6).map((u,m)=>p`<li><span class="os-community__rank">${m+2}</span>${H(u,30)}<div>${J(u,e)}<div class="os-community__track" aria-hidden="true"><i style=${`inline-size:${E(u,s)/c*100}%`}></i></div></div><strong>${T(E(u,s))}</strong></li>`)}</ol>
205 - <p class="os-community__footnote">${a("All-time published work and approved comments.")}${i.known<i.total?` ${x(a("Content counts are unavailable for %d profiles."),i.total-i.known)}`:""}</p>
209 + <header><div><span class="os-community__eyebrow">${l("MADE BY YOUR PEOPLE")}</span><h3>${l("The work we share")}</h3></div><span class="os-community__stamp" aria-hidden="true">↗</span></header>
210 + <div class="os-community__totals"><div><strong>${n.known?R(p):"—"}</strong><span>${l("published pieces")}</span></div><p>${x(l("%1$s posts · %2$s pages · %3$s approved comments"),n.known?R(n.totals.posts):"—",n.known?R(n.totals.pages):"—",n.known?R(n.totals.comments):"—")}</p></div>
211 + <os-segmented label=${l("Rank contributions by")} value=${s} @os-pick=${u=>{const m=u.detail.value;["posts","pages","comments"].includes(m)&&i(m)}}>${["posts","pages","comments"].map(u=>h`<os-segment value=${u}>${Tt(u)}</os-segment>`)}</os-segmented>
212 + ${a?h`<div class="os-community__spotlight">${U(a,58)}<div><span class="os-community__eyebrow">${l("LEADING THIS COMMUNITY")}</span>${te(a,e)}<p>${a.roles.map(u=>t.allRoles?.[u]||u).join(" · ")}</p></div><strong>${R(E(a,s))}<small>${Tt(s)}</small></strong></div>`:h`<p class="os-community__empty">${l("No contributions of this kind yet.")}</p>`}
213 + <ol class="os-community__leaders" start="2">${r.slice(1,6).map((u,m)=>h`<li><span class="os-community__rank">${m+2}</span>${U(u,30)}<div>${te(u,e)}<div class="os-community__track" aria-hidden="true"><i style=${`inline-size:${E(u,s)/d*100}%`}></i></div></div><strong>${R(E(u,s))}</strong></li>`)}</ol>
214 + <p class="os-community__footnote">${l("All-time published work and approved comments.")}${n.known<n.total?` ${x(l("Content counts are unavailable for %d profiles."),n.total-n.known)}`:""}</p>
206 215 </section>
207 216 <section class="os-community__panel os-community__presence-panel">
208 - <header><div><span class="os-community__eyebrow">${a("AT LAST REFRESH")}</span><h3>${a("Around the station")}</h3></div><span class="os-community__status-dot" data-online=${i.onlineCount>0} aria-hidden="true"></span></header>
209 - <div class="os-community__presence-summary"><strong>${T(i.onlineCount+i.awayCount)}</strong><p>${a("online or away")}<span>${x(a("%1$d online · %2$d away"),i.onlineCount,i.awayCount)}</span></p></div>
210 - <div class="os-community__present">${d.slice(0,6).map(u=>p`<div>${H(u,38)}<div>${J(u,e)}<p>${u.openstation_presence==="online"?a("Online now"):a("Away")}${u.id===t.currentUserId?` · ${a("You")}`:""}</p></div></div>`)}</div>
211 - ${d.length?"":p`<p class="os-community__empty">${a("A quiet moment. Nobody across this site is marked online or away.")}</p>`}
212 - <p class="os-community__footnote">${i.onlineCount+i.awayCount>6?x(a("And %d more across this site."),i.onlineCount+i.awayCount-6):""}${a("Presence is a snapshot, refreshed with this view.")}${i.unknownPresence?` ${x(a("%d profiles have no presence data."),i.unknownPresence)}`:""}</p>
217 + <header><div><span class="os-community__eyebrow">${l("AT LAST REFRESH")}</span><h3>${l("Around the station")}</h3></div><span class="os-community__status-dot" data-online=${n.onlineCount>0} aria-hidden="true"></span></header>
218 + <div class="os-community__presence-summary"><strong>${R(n.onlineCount+n.awayCount)}</strong><p>${l("online or away")}<span>${x(l("%1$d online · %2$d away"),n.onlineCount,n.awayCount)}</span></p></div>
219 + <div class="os-community__present">${c.slice(0,6).map(u=>h`<div>${U(u,38)}<div>${te(u,e)}<p>${u.openstation_presence==="online"?l("Online now"):l("Away")}${u.id===t.currentUserId?` · ${l("You")}`:""}</p></div></div>`)}</div>
220 + ${c.length?"":h`<p class="os-community__empty">${l("A quiet moment. Nobody across this site is marked online or away.")}</p>`}
221 + <p class="os-community__footnote">${n.onlineCount+n.awayCount>6?x(l("And %d more across this site."),n.onlineCount+n.awayCount-6):""}${l("Presence is a snapshot, refreshed with this view.")}${n.unknownPresence?` ${x(l("%d profiles have no presence data."),n.unknownPresence)}`:""}</p>
213 222 </section>
214 223 <section class="os-community__panel os-community__arrivals">
215 - <header><div><span class="os-community__eyebrow">${a("ROOM FOR SOMEONE NEW")}</span><h3>${a("New faces, new possibilities")}</h3></div><span class="dashicons dashicons-groups" aria-hidden="true"></span></header>
216 - <p class="os-community__description">${a("Account registrations over the last eight weeks. Each bar is one week.")}</p>
217 - <os-histogram height="135" aria-label=${a("Weekly account registrations across this site")} series=${JSON.stringify([{key:"accounts",label:a("New accounts"),tone:"info"}])} columns=${JSON.stringify(i.weeks)} start=${i.start} end=${i.end} empty=${a("No registrations in these eight weeks.")}></os-histogram>
218 - <h4>${a("Newest accounts")}</h4><div class="os-community__newcomers">${i.registered.slice(0,4).map(u=>p`<div>${H(u,34)}<div>${J(u,e)}<p>${a("Registered")} <os-relative-time datetime=${u.registered_date||""}></os-relative-time></p></div></div>`)}</div>
219 - ${i.registered.length?"":p`<p class="os-community__empty">${a("No registration dates available.")}</p>`}
224 + <header><div><span class="os-community__eyebrow">${l("ROOM FOR SOMEONE NEW")}</span><h3>${l("New faces, new possibilities")}</h3></div><span class="dashicons dashicons-groups" aria-hidden="true"></span></header>
225 + <p class="os-community__description">${l("Account registrations over the last eight weeks. Each bar is one week.")}</p>
226 + <os-histogram height="135" aria-label=${l("Weekly account registrations across this site")} series=${JSON.stringify([{key:"accounts",label:l("New accounts"),tone:"info"}])} columns=${JSON.stringify(n.weeks)} start=${n.start} end=${n.end} empty=${l("No registrations in these eight weeks.")}></os-histogram>
227 + <h4>${l("Newest accounts")}</h4><div class="os-community__newcomers">${n.registered.slice(0,4).map(u=>h`<div>${U(u,34)}<div>${te(u,e)}<p>${l("Registered")} <os-relative-time datetime=${u.registered_date||""}></os-relative-time></p></div></div>`)}</div>
228 + ${n.registered.length?"":h`<p class="os-community__empty">${l("No registration dates available.")}</p>`}
220 229 </section>
221 230 <section class="os-community__panel os-community__checkins">
222 - <header><div><span class="os-community__eyebrow">${a("FAMILIAR FACES")}</span><h3>${a("Latest check-ins")}</h3></div><span class="dashicons dashicons-clock" aria-hidden="true"></span></header>
223 - <p class="os-community__description">${a("One latest recorded sign-in per person.")}</p>
224 - <ol class="os-community__timeline">${i.logins.slice(0,6).map(u=>p`<li>${H(u,34)}<div>${J(u,e)}<p><os-relative-time datetime=${new Date(u.openstation_last_login*1e3).toISOString()}></os-relative-time></p></div><span class="os-community__login-mark" aria-hidden="true">↗</span></li>`)}</ol>
225 - ${i.logins.length?"":p`<p class="os-community__empty">${a("No sign-ins recorded across this site yet.")}</p>`}
226 - <p class="os-community__footnote">${x(a("%d profiles have no recorded sign-in. This is not a complete login history."),i.unrecorded)}</p>
231 + <header><div><span class="os-community__eyebrow">${l("FAMILIAR FACES")}</span><h3>${l("Latest check-ins")}</h3></div><span class="dashicons dashicons-clock" aria-hidden="true"></span></header>
232 + <p class="os-community__description">${l("One latest recorded sign-in per person.")}</p>
233 + <ol class="os-community__timeline">${n.logins.slice(0,6).map(u=>h`<li>${U(u,34)}<div>${te(u,e)}<p><os-relative-time datetime=${new Date(u.openstation_last_login*1e3).toISOString()}></os-relative-time></p></div><span class="os-community__login-mark" aria-hidden="true">↗</span></li>`)}</ol>
234 + ${n.logins.length?"":h`<p class="os-community__empty">${l("No sign-ins recorded across this site yet.")}</p>`}
235 + <p class="os-community__footnote">${x(l("%d profiles have no recorded sign-in. This is not a complete login history."),n.unrecorded)}</p>
227 236 </section>
228 237 </div>
229 - </div>`}const bs=g` .os-community__loading{max-inline-size:520px;padding:48px 24px;margin:40px auto;text-align:center;color:var( --os-ui-fg,#1d2327 )}.os-community__loading>.dashicons{font-size:40px;inline-size:40px;block-size:40px;color:var( --os-ui-fg-muted,#646970 )}.os-community__loading h3{font-size:24px;font-weight:500;color:inherit}.os-community__loading p{font-size:12px;line-height:1.7;color:var( --os-ui-fg-muted,#646970 )}.os-community__loading os-progress-bar{display:block;margin-block:24px 12px}.os-community{padding:22px 24px 8px;max-inline-size:1440px;margin-inline:auto}.os-community__metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-block-end:20px}.os-community__metric{display:grid;grid-template-columns:auto 1fr;column-gap:14px;row-gap:8px;padding:18px;border:1px solid var( --os-ui-border,#dcdcde );border-radius:14px;background:var( --os-ui-surface,#fff )}.os-community__metric>.dashicons{grid-column:1 / -1;color:var( --os-ui-fg-muted,#646970 );font-size:18px}.os-community__metric strong{font-size:38px;font-weight:500;line-height:1;letter-spacing:-.05em;font-variant-numeric:tabular-nums;align-self:center}.os-community__metric h3{margin:0 0 3px;font-size:12px;color:inherit}.os-community__metric p{margin:0;font-size:10px;line-height:1.5;color:var( --os-ui-fg-muted,#646970 )}.os-community__grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:20px;align-items:start}.os-community__panel{min-inline-size:0;padding:24px;border:1px solid var( --os-ui-border,#dcdcde );border-radius:18px;background:var( --os-ui-surface,#fff )}.os-community__panel>header{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-block-end:16px}.os-community__panel h3{margin:5px 0 0;font-size:22px;font-weight:500;letter-spacing:-.035em;line-height:1.15;color:inherit}.os-community__eyebrow{font-size:9px;letter-spacing:.13em;color:var( --os-ui-fg-muted,#646970 )}.os-community__stamp{font-size:32px;font-weight:300;color:var( --os-ui-accent,#2271b1 )}.os-community__totals{margin-block:6px 18px}.os-community__totals>div{display:flex;align-items:baseline;gap:10px}.os-community__totals strong{font-size:clamp(40px,4.8cqi,60px);line-height:1;font-weight:500;letter-spacing:-.06em;font-variant-numeric:tabular-nums}.os-community__totals span{font-size:13px}.os-community__totals p,.os-community__description{font-size:11px;line-height:1.6;color:var( --os-ui-fg-muted,#646970 );margin:9px 0 0}.os-community__work os-segmented{display:flex;margin-block-end:18px}.os-community__work os-segment{flex:1}.os-community__spotlight{display:flex;gap:14px;align-items:center;padding:18px;border-radius:12px;background:var( --os-ui-surface-sunken,#f6f7f7 );border-inline-start:3px solid var( --os-ui-accent,#2271b1 )}.os-community__spotlight>div{flex:1;min-inline-size:0}.os-community__person{display:block;max-inline-size:100%;--os-ui-button-padding:0}.os-community__person::part(button){padding:0;min-block-size:0;border:0;background:transparent;color:var( --os-ui-fg,#1d2327 );font-size:13px;font-weight:600;line-height:1.3;text-align:start;white-space:normal;overflow-wrap:anywhere}.os-community__spotlight .os-community__person{margin-block:4px}.os-community__spotlight .os-community__person::part(button){font-size:19px;letter-spacing:-.025em}.os-community__spotlight p{font-size:10px;color:var( --os-ui-fg-muted,#646970 );margin:0}.os-community__spotlight>strong{text-align:end;font-size:30px;font-weight:500;line-height:1;font-variant-numeric:tabular-nums}.os-community__spotlight small{display:block;font-size:9px;font-weight:400;margin-block-start:6px;color:var( --os-ui-fg-muted,#646970 )}.os-community__leaders{list-style:none;padding:0;margin:12px 0}.os-community__leaders li{display:flex;gap:12px;align-items:center;padding-block:9px}.os-community__rank{inline-size:12px;font-size:10px;color:var( --os-ui-fg-muted,#646970 );font-variant-numeric:tabular-nums}.os-community__leaders li>div{flex:1;min-inline-size:0}.os-community__leaders li>strong{font-size:15px;font-weight:500;font-variant-numeric:tabular-nums}.os-community__track{margin-block-start:6px;block-size:4px;border-radius:4px;overflow:hidden;background:var( --os-ui-surface-subtle,#f0f0f1 )}.os-community__track i{display:block;block-size:100%;border-radius:inherit;background:var( --os-ui-accent,#2271b1 )}.os-community__footnote{border-block-start:1px solid var( --os-ui-surface-subtle,#f0f0f1 );padding-block-start:12px;margin:16px 0 0;font-size:10px;line-height:1.6;color:var( --os-ui-fg-muted,#646970 )}.os-community__presence-panel{background:radial-gradient(ellipse at 100% 0,var( --os-ui-surface-subtle,#f0f0f1 ),transparent 70%),var( --os-ui-surface,#fff )}.os-community__status-dot{color:var( --os-ui-fg-muted,#646970 );inline-size:8px;block-size:8px;border-radius:50%;background:currentColor}.os-community__status-dot[data-online="true"]{color:var( --os-ui-success-fg,#008a20 )}.os-community__presence-summary{display:flex;gap:15px;align-items:center;margin-block:20px}.os-community__presence-summary>strong{display:grid;place-items:center;inline-size:90px;block-size:90px;border:1px solid var( --os-ui-border,#dcdcde );border-radius:50%;box-shadow:inset 0 0 0 8px var( --os-ui-surface,#fff );background:var( --os-ui-surface-sunken,#f6f7f7 );font-size:40px;font-weight:500}.os-community__presence-summary p{font-size:16px;margin:0}.os-community__presence-summary span{display:block;font-size:11px;color:var( --os-ui-fg-muted,#646970 );margin-block-start:6px}.os-community__present{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.os-community__present>div,.os-community__newcomers>div{display:flex;align-items:center;gap:10px;min-inline-size:0}.os-community__present>div>div,.os-community__newcomers>div>div{min-inline-size:0}.os-community__present p,.os-community__newcomers p,.os-community__timeline p{font-size:10px;color:var( --os-ui-fg-muted,#646970 );margin:4px 0 0}.os-community__arrivals h4{margin:20px 0 12px;font-size:11px;font-weight:600;color:inherit}.os-community__arrivals os-histogram{display:block;margin-block-start:16px}.os-community__newcomers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.os-community__timeline{padding:0;margin:20px 0 0;list-style:none}.os-community__timeline li{position:relative;display:flex;gap:12px;align-items:center;padding-block-end:19px}.os-community__timeline li:not(:last-child)::before{content:'';position:absolute;inline-size:1px;inset-inline-start:16px;inset-block:34px 0;background:var( --os-ui-border,#dcdcde )}.os-community__timeline li>div{flex:1;min-inline-size:0}.os-community__login-mark{color:var( --os-ui-fg-muted,#646970 )}.os-community__empty{margin:24px 0;padding:16px;border:1px dashed var( --os-ui-border,#dcdcde );border-radius:10px;font-size:12px;line-height:1.6;color:var( --os-ui-fg-muted,#646970 )}@container people (min-width:900px){.os-community__work{grid-column:1;grid-row:1 / 3}.os-community__presence-panel{grid-column:2;grid-row:1}.os-community__checkins{grid-column:2;grid-row:2 / 4}.os-community__arrivals{grid-column:1;grid-row:3}}@container people (max-width:899px){.os-community{padding:16px}.os-community__metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.os-community__grid{grid-template-columns:1fr;gap:14px}.os-community__presence-panel{grid-row:1}.os-community__present{grid-template-columns:repeat(3,minmax(0,1fr))}}@container people (max-width:480px){.os-community{padding:10px 12px}.os-community__metrics{gap:8px;margin-block-end:12px}.os-community__metric{gap:6px 10px;padding:12px}.os-community__metric>.dashicons{display:none}.os-community__metric strong{font-size:29px}.os-community__metric h3{font-size:11px}.os-community__metric p{font-size:9px}.os-community__panel{padding:17px;border-radius:14px}.os-community__panel h3{font-size:20px}.os-community__present,.os-community__newcomers{grid-template-columns:repeat(2,minmax(0,1fr))}.os-community__spotlight{gap:10px;padding:12px;flex-wrap:wrap}.os-community__spotlight .os-community__eyebrow{font-size:8px}.os-community__spotlight .os-community__person::part(button){font-size:16px}}`,vs=g` .desktop-mode-users{container:people / inline-size;color:var( --os-ui-fg,#1d2327 );background:var( --os-ui-surface-sunken,#f6f7f7 )}.desktop-mode-users [hidden]{display:none !important}.os-people__hero{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:25px;background:var( --os-ui-surface,#fff )}.os-people__hero h2{color:inherit;margin:4px 0 8px;font-size:clamp(24px,3.4cqi,37px);font-weight:500;letter-spacing:-.045em;line-height:1.12}.os-people__eyebrow{font-size:10px;letter-spacing:.15em;color:var( --os-ui-fg-muted,#646970 )}.os-people__hero p{margin:0;font-size:12px;color:var( --os-ui-fg-muted,#646970 )}.os-people__tools{display:flex;gap:9px;padding:10px 24px;align-items:center;flex-wrap:wrap;border-block-end:1px solid var( --os-ui-border,#dcdcde );background:var( --os-ui-surface,#fff )}.os-people__tools os-text-field{flex:1;min-inline-size:150px}.os-people__tools os-select{inline-size:140px}.os-people__options{display:none}.os-people__cards{flex:1;min-block-size:0;min-inline-size:0;overflow:auto;padding:20px 24px;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,350px),1fr));gap:18px;align-content:start;overscroll-behavior:contain}.os-people__card{position:relative;isolation:isolate;box-sizing:border-box;display:grid;grid-template-rows:auto 1fr auto auto;gap:10px;aspect-ratio:1.586;min-inline-size:0;border:1px solid var( --os-ui-border,#dcdcde );border-radius:15px;padding:14px 16px 8px;background:var( --os-ui-surface,#fff );box-shadow:0 2px 4px var( --os-ui-surface-subtle,#f0f0f1 )}.os-people__card::before{content:'';position:absolute;z-index:-1;pointer-events:none;inset:0;border-radius:inherit;background:repeating-radial-gradient(ellipse at 105% 15%,transparent 0 8px,var( --os-ui-surface-subtle,#f0f0f1 ) 9px 10px,transparent 11px 16px);opacity:.55;mask-image:linear-gradient(to left,#000,transparent 70%)}.os-people__card::after{content:'';position:absolute;pointer-events:none;inset-block:28px;inset-inline-start:0;inline-size:3px;background:var( --os-ui-accent,#2271b1 );border-start-end-radius:3px;border-end-end-radius:3px;opacity:.65}.os-people__card.is-selected{outline:2px solid var( --os-ui-accent,#2271b1 );outline-offset:-2px}.os-people__id-header{display:flex;align-items:center;gap:8px;min-block-size:18px}.os-people__issuer{display:inline-flex;align-items:center;gap:5px;font-size:9px;font-weight:600;letter-spacing:.12em;color:var( --os-ui-fg,#1d2327 )}.os-people__issuer>span:last-child{font-weight:400;color:var( --os-ui-fg-muted,#646970 )}.os-people__issuer .dashicons{font-size:17px;inline-size:17px;block-size:17px}.os-people__you{font-size:10px;color:var( --os-ui-accent,#2271b1 )}.os-people__select{margin-inline-start:auto;inline-size:18px;block-size:18px;flex:0 0 18px}.os-people__identity{display:grid;grid-template-columns:84px minmax(0,1fr);align-items:center;gap:16px}.os-people__portrait{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:10px 4px 7px;border:1px solid var( --os-ui-border,#dcdcde );border-radius:9px;background:var( --os-ui-surface-sunken,#f6f7f7 )}.os-people__member-number{font:9px/1.2 ui-monospace,monospace;letter-spacing:.13em;color:var( --os-ui-fg-muted,#646970 )}.os-people__credentials{min-inline-size:0}.os-people__identity h3{margin:0;font-size:20px;line-height:1.15;color:inherit}.os-people__identity h3 os-button{font:inherit;--os-ui-button-padding:0}.os-people__identity h3 os-button::part(button){font:inherit;text-align:start;border:0;background:transparent;padding:0;white-space:normal;overflow-wrap:anywhere}.os-people__identity p{margin:4px 0 0;font-size:10px;color:var( --os-ui-fg-muted,#646970 )}.os-people__handle{overflow-wrap:anywhere}.os-people__email{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.os-people__joined time{color:var( --os-ui-fg,#1d2327 )}.os-people__roles{display:flex;flex-wrap:wrap;gap:4px;margin-block:6px}.os-people__roles span{border:1px solid var( --os-ui-border,#dcdcde );border-radius:4px;padding:2px 6px;font-size:9px;color:var( --os-ui-fg-muted,#646970 );background:var( --os-ui-surface,#fff )}.os-people__stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) 28px;gap:8px;align-items:center;padding-block:7px 0;border-block-start:1px solid var( --os-ui-border,#dcdcde );--os-ui-stat-padding:0;--os-ui-stat-border:transparent;--os-ui-stat-value-size:21px;--os-ui-stat-value-color:var( --os-ui-fg,#1d2327 )}.os-people__stats os-stat::part(label){font-size:8px}.os-people__seal{display:grid;place-items:center;inline-size:26px;block-size:26px;border:1px solid var( --os-ui-border,#dcdcde );border-radius:50%;color:var( --os-ui-fg-muted,#646970 );opacity:.5}.os-people__seal .dashicons{font-size:16px;inline-size:16px;block-size:16px}.os-people__card>footer{display:flex;align-items:center;gap:8px;min-inline-size:0}.os-people__last-login{flex:1;min-inline-size:0;font-size:9px;color:var( --os-ui-fg-muted,#646970 )}.os-people__card os-action-menu{margin-inline-start:auto;flex:0 0 auto}.os-people__presence{display:inline-flex;align-items:center;gap:4px;font-size:9px;color:var( --os-ui-fg-muted,#646970 );white-space:nowrap}.os-people__presence::before{content:'';inline-size:5px;block-size:5px;border-radius:50%;background:currentColor}.os-people__presence[data-presence="online"]{color:var( --os-ui-success-fg,#008a20 )}.os-people__presence[data-presence="inactive"]{color:var( --os-ui-warning-fg,#996800 )}.os-people__continuation{grid-column:1 / -1;flex:0 0 auto;padding:14px;text-align:center;font-size:11px;color:var( --os-ui-fg-muted,#646970 )}.os-people__empty{grid-column:1 / -1;padding:50px 20px;text-align:center;color:var( --os-ui-fg-muted,#646970 )}.os-people__scope{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:8px 24px;font-size:11px;color:var( --os-ui-fg-muted,#646970 );border-block-end:1px solid var( --os-ui-border,#dcdcde )}.os-people__role-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px;padding:24px}.os-people__room{border:1px solid var( --os-ui-border,#dcdcde );background:var( --os-ui-surface,#fff );border-radius:18px;padding:24px;text-align:center;min-inline-size:0}.os-people__orbit{position:relative;inline-size:210px;block-size:210px;margin:12px auto 20px;border:1px solid var( --os-ui-border,#dcdcde );border-radius:50%}.os-people__orbit::before{content:'';position:absolute;inset:25px;border:1px dashed var( --os-ui-border,#dcdcde );border-radius:50%}.os-people__orbit-center{position:absolute;inset:45px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:50%;background:var( --os-ui-surface-sunken,#f6f7f7 );gap:6px}.os-people__orbit-center strong{font-size:36px;font-weight:500;line-height:1}.os-people__orbit-center span{font-size:11px;max-inline-size:95px;overflow-wrap:anywhere;color:var( --os-ui-fg-muted,#646970 )}.os-people__satellite{position:absolute;transform:translate(-50%,-50%);background:var( --os-ui-surface,#fff );padding:3px;border-radius:50%}.os-people__room>p{font-size:11px;color:var( --os-ui-fg-muted,#646970 );min-block-size:28px}.os-people__insights{flex:1;min-block-size:0;overflow:auto}.desktop-mode-users .os-app-list__toolbar-right.os-app-list__bulk--footer{flex:0 0 auto;max-block-size:38%;overflow:auto;align-content:start}.desktop-mode-users .os-app-list__bulk--footer .os-app-list__count{flex:0 0 auto}.desktop-mode-users .os-app-list__bulk--footer .os-app-list__bulk-actions{flex:1}@container people (max-width:640px){.os-people__hero{padding:10px 12px;gap:10px}.os-people__hero h2{font-size:20px;margin:0}.os-people__hero p,.os-people__eyebrow{display:none}.os-people__tools{padding:7px 12px;gap:7px}.os-people__options{display:block}.os-people__tools:not(.is-expanded) .os-people__extra{display:none}.os-people__cards{display:block;padding:9px 12px}.os-people__card{aspect-ratio:auto;gap:7px;padding:10px 12px 5px;margin-block-end:10px}.os-people__identity{grid-template-columns:72px minmax(0,1fr);gap:12px}.os-people__portrait{padding:5px 2px;gap:4px}.os-people__identity h3{font-size:17px}.os-people__identity p{font-size:9px;margin-block-start:3px}.os-people__roles{margin-block:4px}.os-people__stats{--os-ui-stat-value-size:18px;padding-block-start:5px}.os-people__last-login{font-size:8px}.os-people__scope{padding:7px 12px}.os-people__role-grid{padding:12px}}`;function _s(o){const e="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz23456789!@#$%^&*-_=+",t=new Uint32Array(o);crypto.getRandomValues(t);let s="";for(let n=0;n<o;n+=1)s+=e[t[n]%e.length];return s}function At(o){return Object.entries(o).map(([e,t])=>p`<os-option value=${e}>${t}</os-option>`)}function ys(o,e){const t=o.defaultRole??"subscriber",s=o.assignableRoles&&Object.keys(o.assignableRoles).length>0?o.assignableRoles:{[t]:t},n=o.locales??{"":a("Site default")},i=r=>{r.preventDefault(),r.stopPropagation();const d=r.currentTarget.closest("os-form")?.querySelector('os-text-field[name="password"]'),c=_s(18);d&&(d.value=c,d.setAttribute("value",c)),Mo(c),e(a("Generated password copied to clipboard."))};return p`<os-form
238 + </div>`}const zs=b` .os-community__loading{max-inline-size:520px;padding:48px 24px;margin:40px auto;text-align:center;color:var( --os-ui-fg,#1d2327 )}.os-community__loading>.dashicons{font-size:40px;inline-size:40px;block-size:40px;color:var( --os-ui-fg-muted,#646970 )}.os-community__loading h3{font-size:24px;font-weight:500;color:inherit}.os-community__loading p{font-size:12px;line-height:1.7;color:var( --os-ui-fg-muted,#646970 )}.os-community__loading os-progress-bar{display:block;margin-block:24px 12px}.os-community{padding:22px 24px 8px;max-inline-size:1440px;margin-inline:auto}.os-community__metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-block-end:20px}.os-community__metric{display:grid;grid-template-columns:auto 1fr;column-gap:14px;row-gap:8px;padding:18px;border:1px solid var( --os-ui-border,#dcdcde );border-radius:14px;background:var( --os-ui-surface,#fff )}.os-community__metric>.dashicons{grid-column:1 / -1;color:var( --os-ui-fg-muted,#646970 );font-size:18px}.os-community__metric strong{font-size:38px;font-weight:500;line-height:1;letter-spacing:-.05em;font-variant-numeric:tabular-nums;align-self:center}.os-community__metric h3{margin:0 0 3px;font-size:12px;color:inherit}.os-community__metric p{margin:0;font-size:10px;line-height:1.5;color:var( --os-ui-fg-muted,#646970 )}.os-community__grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:20px;align-items:start}.os-community__panel{min-inline-size:0;padding:24px;border:1px solid var( --os-ui-border,#dcdcde );border-radius:18px;background:var( --os-ui-surface,#fff )}.os-community__panel>header{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-block-end:16px}.os-community__panel h3{margin:5px 0 0;font-size:22px;font-weight:500;letter-spacing:-.035em;line-height:1.15;color:inherit}.os-community__eyebrow{font-size:9px;letter-spacing:.13em;color:var( --os-ui-fg-muted,#646970 )}.os-community__stamp{font-size:32px;font-weight:300;color:var( --os-ui-accent,#2271b1 )}.os-community__totals{margin-block:6px 18px}.os-community__totals>div{display:flex;align-items:baseline;gap:10px}.os-community__totals strong{font-size:clamp(40px,4.8cqi,60px);line-height:1;font-weight:500;letter-spacing:-.06em;font-variant-numeric:tabular-nums}.os-community__totals span{font-size:13px}.os-community__totals p,.os-community__description{font-size:11px;line-height:1.6;color:var( --os-ui-fg-muted,#646970 );margin:9px 0 0}.os-community__work os-segmented{display:flex;margin-block-end:18px}.os-community__work os-segment{flex:1}.os-community__spotlight{display:flex;gap:14px;align-items:center;padding:18px;border-radius:12px;background:var( --os-ui-surface-sunken,#f6f7f7 );border-inline-start:3px solid var( --os-ui-accent,#2271b1 )}.os-community__spotlight>div{flex:1;min-inline-size:0}.os-community__person{display:block;max-inline-size:100%;--os-ui-button-padding:0}.os-community__person::part(button){padding:0;min-block-size:0;border:0;background:transparent;color:var( --os-ui-fg,#1d2327 );font-size:13px;font-weight:600;line-height:1.3;text-align:start;white-space:normal;overflow-wrap:anywhere}.os-community__spotlight .os-community__person{margin-block:4px}.os-community__spotlight .os-community__person::part(button){font-size:19px;letter-spacing:-.025em}.os-community__spotlight p{font-size:10px;color:var( --os-ui-fg-muted,#646970 );margin:0}.os-community__spotlight>strong{text-align:end;font-size:30px;font-weight:500;line-height:1;font-variant-numeric:tabular-nums}.os-community__spotlight small{display:block;font-size:9px;font-weight:400;margin-block-start:6px;color:var( --os-ui-fg-muted,#646970 )}.os-community__leaders{list-style:none;padding:0;margin:12px 0}.os-community__leaders li{display:flex;gap:12px;align-items:center;padding-block:9px}.os-community__rank{inline-size:12px;font-size:10px;color:var( --os-ui-fg-muted,#646970 );font-variant-numeric:tabular-nums}.os-community__leaders li>div{flex:1;min-inline-size:0}.os-community__leaders li>strong{font-size:15px;font-weight:500;font-variant-numeric:tabular-nums}.os-community__track{margin-block-start:6px;block-size:4px;border-radius:4px;overflow:hidden;background:var( --os-ui-surface-subtle,#f0f0f1 )}.os-community__track i{display:block;block-size:100%;border-radius:inherit;background:var( --os-ui-accent,#2271b1 )}.os-community__footnote{border-block-start:1px solid var( --os-ui-surface-subtle,#f0f0f1 );padding-block-start:12px;margin:16px 0 0;font-size:10px;line-height:1.6;color:var( --os-ui-fg-muted,#646970 )}.os-community__presence-panel{background:radial-gradient(ellipse at 100% 0,var( --os-ui-surface-subtle,#f0f0f1 ),transparent 70%),var( --os-ui-surface,#fff )}.os-community__status-dot{color:var( --os-ui-fg-muted,#646970 );inline-size:8px;block-size:8px;border-radius:50%;background:currentColor}.os-community__status-dot[data-online="true"]{color:var( --os-ui-success-fg,#008a20 )}.os-community__presence-summary{display:flex;gap:15px;align-items:center;margin-block:20px}.os-community__presence-summary>strong{display:grid;place-items:center;inline-size:90px;block-size:90px;border:1px solid var( --os-ui-border,#dcdcde );border-radius:50%;box-shadow:inset 0 0 0 8px var( --os-ui-surface,#fff );background:var( --os-ui-surface-sunken,#f6f7f7 );font-size:40px;font-weight:500}.os-community__presence-summary p{font-size:16px;margin:0}.os-community__presence-summary span{display:block;font-size:11px;color:var( --os-ui-fg-muted,#646970 );margin-block-start:6px}.os-community__present{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.os-community__present>div,.os-community__newcomers>div{display:flex;align-items:center;gap:10px;min-inline-size:0}.os-community__present>div>div,.os-community__newcomers>div>div{min-inline-size:0}.os-community__present p,.os-community__newcomers p,.os-community__timeline p{font-size:10px;color:var( --os-ui-fg-muted,#646970 );margin:4px 0 0}.os-community__arrivals h4{margin:20px 0 12px;font-size:11px;font-weight:600;color:inherit}.os-community__arrivals os-histogram{display:block;margin-block-start:16px}.os-community__newcomers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.os-community__timeline{padding:0;margin:20px 0 0;list-style:none}.os-community__timeline li{position:relative;display:flex;gap:12px;align-items:center;padding-block-end:19px}.os-community__timeline li:not(:last-child)::before{content:'';position:absolute;inline-size:1px;inset-inline-start:16px;inset-block:34px 0;background:var( --os-ui-border,#dcdcde )}.os-community__timeline li>div{flex:1;min-inline-size:0}.os-community__login-mark{color:var( --os-ui-fg-muted,#646970 )}.os-community__empty{margin:24px 0;padding:16px;border:1px dashed var( --os-ui-border,#dcdcde );border-radius:10px;font-size:12px;line-height:1.6;color:var( --os-ui-fg-muted,#646970 )}@container people (min-width:900px){.os-community__work{grid-column:1;grid-row:1 / 3}.os-community__presence-panel{grid-column:2;grid-row:1}.os-community__checkins{grid-column:2;grid-row:2 / 4}.os-community__arrivals{grid-column:1;grid-row:3}}@container people (max-width:899px){.os-community{padding:16px}.os-community__metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.os-community__grid{grid-template-columns:1fr;gap:14px}.os-community__presence-panel{grid-row:1}.os-community__present{grid-template-columns:repeat(3,minmax(0,1fr))}}@container people (max-width:480px){.os-community{padding:10px 12px}.os-community__metrics{gap:8px;margin-block-end:12px}.os-community__metric{gap:6px 10px;padding:12px}.os-community__metric>.dashicons{display:none}.os-community__metric strong{font-size:29px}.os-community__metric h3{font-size:11px}.os-community__metric p{font-size:9px}.os-community__panel{padding:17px;border-radius:14px}.os-community__panel h3{font-size:20px}.os-community__present,.os-community__newcomers{grid-template-columns:repeat(2,minmax(0,1fr))}.os-community__spotlight{gap:10px;padding:12px;flex-wrap:wrap}.os-community__spotlight .os-community__eyebrow{font-size:8px}.os-community__spotlight .os-community__person::part(button){font-size:16px}}`,Es=b` .desktop-mode-users{container:people / inline-size;color:var( --os-ui-fg,#1d2327 );background:var( --os-ui-surface-sunken,#f6f7f7 )}.desktop-mode-users [hidden]{display:none !important}.os-people__hero{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:25px;background:var( --os-ui-surface,#fff )}.os-people__hero h2{color:inherit;margin:4px 0 8px;font-size:clamp(24px,3.4cqi,37px);font-weight:500;letter-spacing:-.045em;line-height:1.12}.os-people__eyebrow{font-size:10px;letter-spacing:.15em;color:var( --os-ui-fg-muted,#646970 )}.os-people__hero p{margin:0;font-size:12px;color:var( --os-ui-fg-muted,#646970 )}.os-people__tools{display:flex;gap:9px;padding:10px 24px;align-items:center;flex-wrap:wrap;border-block-end:1px solid var( --os-ui-border,#dcdcde );background:var( --os-ui-surface,#fff )}.os-people__tools os-text-field{flex:1;min-inline-size:150px}.os-people__tools os-select{inline-size:140px}.os-people__options{display:none}.os-people__cards{flex:1;min-block-size:0;min-inline-size:0;overflow:auto;padding:20px 24px;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,350px),1fr));gap:18px;align-content:start;overscroll-behavior:contain}.os-people__card{position:relative;isolation:isolate;box-sizing:border-box;display:grid;grid-template-rows:auto 1fr auto auto;gap:10px;aspect-ratio:1.586;min-inline-size:0;border:1px solid var( --os-ui-border,#dcdcde );border-radius:15px;padding:14px 16px 8px;background:var( --os-ui-surface,#fff );box-shadow:0 2px 4px var( --os-ui-surface-subtle,#f0f0f1 )}.os-people__card::before{content:'';position:absolute;z-index:-1;pointer-events:none;inset:0;border-radius:inherit;background:repeating-radial-gradient(ellipse at 105% 15%,transparent 0 8px,var( --os-ui-surface-subtle,#f0f0f1 ) 9px 10px,transparent 11px 16px);opacity:.55;mask-image:linear-gradient(to left,#000,transparent 70%)}.os-people__card::after{content:'';position:absolute;pointer-events:none;inset-block:28px;inset-inline-start:0;inline-size:3px;background:var( --os-ui-accent,#2271b1 );border-start-end-radius:3px;border-end-end-radius:3px;opacity:.65}.os-people__card.is-selected{outline:2px solid var( --os-ui-accent,#2271b1 );outline-offset:-2px}.os-people__id-header{display:flex;align-items:center;gap:8px;min-block-size:18px}.os-people__issuer{display:inline-flex;align-items:center;gap:5px;font-size:9px;font-weight:600;letter-spacing:.12em;color:var( --os-ui-fg,#1d2327 )}.os-people__issuer>span:last-child{font-weight:400;color:var( --os-ui-fg-muted,#646970 )}.os-people__issuer .dashicons{font-size:17px;inline-size:17px;block-size:17px}.os-people__you{font-size:10px;color:var( --os-ui-accent,#2271b1 )}.os-people__select{margin-inline-start:auto;inline-size:18px;block-size:18px;flex:0 0 18px}.os-people__identity{display:grid;grid-template-columns:84px minmax(0,1fr);align-items:center;gap:16px}.os-people__portrait{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:10px 4px 7px;border:1px solid var( --os-ui-border,#dcdcde );border-radius:9px;background:var( --os-ui-surface-sunken,#f6f7f7 )}.os-people__member-number{font:9px/1.2 ui-monospace,monospace;letter-spacing:.13em;color:var( --os-ui-fg-muted,#646970 )}.os-people__credentials{min-inline-size:0}.os-people__identity h3{margin:0;font-size:20px;line-height:1.15;color:inherit}.os-people__identity h3 os-button{font:inherit;--os-ui-button-padding:0}.os-people__identity h3 os-button::part(button){font:inherit;text-align:start;border:0;background:transparent;padding:0;white-space:normal;overflow-wrap:anywhere}.os-people__identity p{margin:4px 0 0;font-size:10px;color:var( --os-ui-fg-muted,#646970 )}.os-people__handle{overflow-wrap:anywhere}.os-people__email{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.os-people__joined time{color:var( --os-ui-fg,#1d2327 )}.os-people__roles{display:flex;flex-wrap:wrap;gap:4px;margin-block:6px}.os-people__roles span{border:1px solid var( --os-ui-border,#dcdcde );border-radius:4px;padding:2px 6px;font-size:9px;color:var( --os-ui-fg-muted,#646970 );background:var( --os-ui-surface,#fff )}.os-people__stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) 28px;gap:8px;align-items:center;padding-block:7px 0;border-block-start:1px solid var( --os-ui-border,#dcdcde );--os-ui-stat-padding:0;--os-ui-stat-border:transparent;--os-ui-stat-value-size:21px;--os-ui-stat-value-color:var( --os-ui-fg,#1d2327 )}.os-people__stats os-stat::part(label){font-size:8px}.os-people__seal{display:grid;place-items:center;inline-size:26px;block-size:26px;border:1px solid var( --os-ui-border,#dcdcde );border-radius:50%;color:var( --os-ui-fg-muted,#646970 );opacity:.5}.os-people__seal .dashicons{font-size:16px;inline-size:16px;block-size:16px}.os-people__card>footer{display:flex;align-items:center;gap:8px;min-inline-size:0}.os-people__last-login{flex:1;min-inline-size:0;font-size:9px;color:var( --os-ui-fg-muted,#646970 )}.os-people__card os-action-menu{margin-inline-start:auto;flex:0 0 auto}.os-people__presence{display:inline-flex;align-items:center;gap:4px;font-size:9px;color:var( --os-ui-fg-muted,#646970 );white-space:nowrap}.os-people__presence::before{content:'';inline-size:5px;block-size:5px;border-radius:50%;background:currentColor}.os-people__presence[data-presence="online"]{color:var( --os-ui-success-fg,#008a20 )}.os-people__presence[data-presence="inactive"]{color:var( --os-ui-warning-fg,#996800 )}.os-people__continuation{grid-column:1 / -1;flex:0 0 auto;padding:14px;text-align:center;font-size:11px;color:var( --os-ui-fg-muted,#646970 )}.os-people__empty{grid-column:1 / -1;padding:50px 20px;text-align:center;color:var( --os-ui-fg-muted,#646970 )}.os-people__scope{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:8px 24px;font-size:11px;color:var( --os-ui-fg-muted,#646970 );border-block-end:1px solid var( --os-ui-border,#dcdcde )}.os-people__role-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px;padding:24px}.os-people__room{border:1px solid var( --os-ui-border,#dcdcde );background:var( --os-ui-surface,#fff );border-radius:18px;padding:24px;text-align:center;min-inline-size:0}.os-people__orbit{position:relative;inline-size:210px;block-size:210px;margin:12px auto 20px;border:1px solid var( --os-ui-border,#dcdcde );border-radius:50%}.os-people__orbit::before{content:'';position:absolute;inset:25px;border:1px dashed var( --os-ui-border,#dcdcde );border-radius:50%}.os-people__orbit-center{position:absolute;inset:45px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:50%;background:var( --os-ui-surface-sunken,#f6f7f7 );gap:6px}.os-people__orbit-center strong{font-size:36px;font-weight:500;line-height:1}.os-people__orbit-center span{font-size:11px;max-inline-size:95px;overflow-wrap:anywhere;color:var( --os-ui-fg-muted,#646970 )}.os-people__satellite{position:absolute;transform:translate(-50%,-50%);background:var( --os-ui-surface,#fff );padding:3px;border-radius:50%}.os-people__room>p{font-size:11px;color:var( --os-ui-fg-muted,#646970 );min-block-size:28px}.os-people__insights{flex:1;min-block-size:0;overflow:auto}.desktop-mode-users .os-app-list__toolbar-right.os-app-list__bulk--footer{flex:0 0 auto;max-block-size:38%;overflow:auto;align-content:start}.desktop-mode-users .os-app-list__bulk--footer .os-app-list__count{flex:0 0 auto}.desktop-mode-users .os-app-list__bulk--footer .os-app-list__bulk-actions{flex:1}@container people (max-width:640px){.os-people__hero{padding:10px 12px;gap:10px}.os-people__hero h2{font-size:20px;margin:0}.os-people__hero p,.os-people__eyebrow{display:none}.os-people__tools{padding:7px 12px;gap:7px}.os-people__options{display:block}.os-people__tools:not(.is-expanded) .os-people__extra{display:none}.os-people__cards{display:block;padding:9px 12px}.os-people__card{aspect-ratio:auto;gap:7px;padding:10px 12px 5px;margin-block-end:10px}.os-people__identity{grid-template-columns:72px minmax(0,1fr);gap:12px}.os-people__portrait{padding:5px 2px;gap:4px}.os-people__identity h3{font-size:17px}.os-people__identity p{font-size:9px;margin-block-start:3px}.os-people__roles{margin-block:4px}.os-people__stats{--os-ui-stat-value-size:18px;padding-block-start:5px}.os-people__last-login{font-size:8px}.os-people__scope{padding:7px 12px}.os-people__role-grid{padding:12px}}`;function Rs(o){const e="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjkmnpqrstuvwxyz23456789!@#$%^&*-_=+",t=new Uint32Array(o);crypto.getRandomValues(t);let s="";for(let i=0;i<o;i+=1)s+=e[t[i]%e.length];return s}function Nt(o){return Object.entries(o).map(([e,t])=>h`<os-option value=${e}>${t}</os-option>`)}function Ls(o,e){const t=o.defaultRole??"subscriber",s=o.assignableRoles&&Object.keys(o.assignableRoles).length>0?o.assignableRoles:{[t]:t},i=o.locales??{"":l("Site default")},n=r=>{r.preventDefault(),r.stopPropagation();const c=r.currentTarget.closest("os-form")?.querySelector('os-text-field[name="password"]'),d=Rs(18);c&&(c.value=d,c.setAttribute("value",d)),Ko(d),e(l("Generated password copied to clipboard."))};return h`<os-form
230 239 data-os-users-add-form
231 240 os-action="create"
232 - submit-label=${a("Add user")}
233 - reset-label=${a("Reset")}
241 + submit-label=${l("Add user")}
242 + reset-label=${l("Reset")}
234 243 >
235 244 <div slot="header">
236 - <h2>${a("Add a new user")}</h2>
245 + <h2>${l("Add a new user")}</h2>
237 246 <p class="os-users__form-lede">
238 - ${a("WordPress will create the account and (optionally) email the user a notification with a link to set their own password.")}
247 + ${l("WordPress will create the account and (optionally) email the user a notification with a link to set their own password.")}
239 248 </p>
240 249 </div>
241 - <os-text-field name="username" label=${a("Username (required)")} placeholder=${a("e.g. jane.doe")} autocomplete="off" required></os-text-field>
242 - <os-text-field name="email" type="email" label=${a("Email (required)")} placeholder=${a("[email protected]")} autocomplete="off" required></os-text-field>
243 - <os-text-field name="first_name" label=${a("First name")} autocomplete="off"></os-text-field>
244 - <os-text-field name="last_name" label=${a("Last name")} autocomplete="off"></os-text-field>
245 - <os-text-field name="url" type="url" label=${a("Website")} placeholder="https://example.com" autocomplete="off" full-width></os-text-field>
246 - <os-select name="role" label=${a("Role")} value=${s[t]!==void 0?t:""}>${At(s)}</os-select>
247 - <os-select name="locale" label=${a("Language")}>${At(n)}</os-select>
250 + <os-text-field name="username" label=${l("Username (required)")} placeholder=${l("e.g. jane.doe")} autocomplete="off" required></os-text-field>
251 + <os-text-field name="email" type="email" label=${l("Email (required)")} placeholder=${l("[email protected]")} autocomplete="off" required></os-text-field>
252 + <os-text-field name="first_name" label=${l("First name")} autocomplete="off"></os-text-field>
253 + <os-text-field name="last_name" label=${l("Last name")} autocomplete="off"></os-text-field>
254 + <os-text-field name="url" type="url" label=${l("Website")} placeholder="https://example.com" autocomplete="off" full-width></os-text-field>
255 + <os-select name="role" label=${l("Role")} value=${s[t]!==void 0?t:""}>${Nt(s)}</os-select>
256 + <os-select name="locale" label=${l("Language")}>${Nt(i)}</os-select>
248 257 <os-text-field
249 258 name="password"
250 259 type="password"
251 260 reveal
252 - label=${a("Password")}
253 - placeholder=${a("Auto-generated; click Generate to set one.")}
261 + label=${l("Password")}
262 + placeholder=${l("Auto-generated; click Generate to set one.")}
254 263 autocomplete="new-password"
255 264 full-width
256 265 ></os-text-field>
257 266 <div class="os-users__form-pwd-actions" full-width>
258 - <os-button variant="ghost" type="button" @click=${i}>
267 + <os-button variant="ghost" type="button" @click=${n}>
259 268 <span class="dashicons dashicons-randomize" aria-hidden="true"></span>
260 - ${a("Generate strong password")}
269 + ${l("Generate strong password")}
261 270 </os-button>
262 - <p class="os-users__form-hint">${a("Leave blank to let WordPress generate one and email it to the user.")}</p>
271 + <p class="os-users__form-hint">${l("Leave blank to let WordPress generate one and email it to the user.")}</p>
263 272 </div>
264 - <os-checkbox-label name="send_notification" label=${a("Send the new user an email about their account")} checked full-width></os-checkbox-label>
265 - </os-form>`}function xs(o,e,t){const s=o.querySelector("[data-os-users-add-form]");if(!s)return t;const n={created:e.created,error:e.createError,field:e.createField};return e.created!==t.created?(s.reset(),s.clearErrors(),n):e.createError===t.error&&e.createField===t.field?t:(s.clearErrors(),e.createError&&(s.setError(e.createError),e.createField&&s.setFieldInvalid(e.createField)),n)}const ks="desktop-mode-users",$s={success:5e3,error:8e3,info:void 0},D=()=>({feed:new oo,roles:new to,activity:new eo,view:"people",contribution:"posts",options:!1,cache:new Map,sync:Jt(),selected:[],rows:new Map,bulkRole:"",reassign:null,addForm:{created:0,error:"",field:""},profileWired:!1}),B=o=>o.root.querySelector("[data-os-users-table]"),q=o=>o.extra,_e=(o,e,t)=>{o.host.toast?.(t?{message:e,duration:t}:{message:e})};function We(o){return Array.from(B(o)?.selection??[]).map(e=>Number(e)).filter(e=>e>0)}function He(o){B(o)?.clearSelection(),o.ui(D).selected=[]}async function ws(o){const t=o.ui(D).bulkRole,s=We(o);if(!t||s.length===0)return;await o.dispatch("bulk-role",{ids:s,role:t},{confirm:{title:a("Change role for selected users?"),message:x(a("Set %1$d user(s)' role to %2$s?"),s.length,q(o).assignableRoles?.[t]??t),label:a("Set role")}})&&He(o)}async function As(o){const e=We(o);if(e.length===0)return;const t=q(o),s=o.ui(D),n=t.isMultisite===!0,i=n?null:s.reassign??zt(t);let r;n?r=x(a("Remove %d user(s) from this site? Their network account stays."),e.length):i?r=x(a("Permanently delete %1$d user(s)? Their content is attributed to %2$s. This cannot be undone."),e.length,i.name):r=x(a("Permanently delete %d user(s)? Their content is deleted too. This cannot be undone."),e.length),await o.dispatch("bulk-delete",{ids:e,reassign:i?.id??0},{confirm:{title:a(n?"Remove selected users from this site?":"Delete selected users?"),message:r,label:a(n?"Remove":"Delete"),danger:!0}})&&He(o)}function zt(o){return o.currentUserId?{id:o.currentUserId,name:a("you")}:null}function St(o,e){o.dispatch("send-reset",{id:e.id},{confirm:{title:a("Send password reset email?"),message:x(a("WordPress will email %s a password-reset link."),e.name),label:a("Send reset email")}})}function Ct(o,e){o.dispatch("resend-welcome",{id:e.id},{confirm:{title:a("Resend welcome email?"),message:x(a("WordPress will resend the original welcome email to %s."),e.name),label:a("Resend")}})}function zs(o,e,t){const s=e.reassign??zt(q(o));return p`<span class="os-users__reassign">
266 - <span class="os-users__reassign-label">${a("Attribute content to")}</span>
273 + <os-checkbox-label name="send_notification" label=${l("Send the new user an email about their account")} checked full-width></os-checkbox-label>
274 + </os-form>`}function Ts(o,e,t){const s=o.querySelector("[data-os-users-add-form]");if(!s)return t;const i={created:e.created,error:e.createError,field:e.createField};return e.created!==t.created?(s.reset(),s.clearErrors(),i):e.createError===t.error&&e.createField===t.field?t:(s.clearErrors(),e.createError&&(s.setError(e.createError),e.createField&&s.setFieldInvalid(e.createField)),i)}const Ns="desktop-mode-users",Ps={success:5e3,error:8e3,info:void 0},D=()=>({feed:new uo,roles:new co,activity:new lo,view:"people",contribution:"posts",options:!1,cache:new Map,sync:ro(),selected:[],rows:new Map,bulkRole:"",reassign:null,addForm:{created:0,error:"",field:""},profileWired:!1}),X=o=>o.root.querySelector("[data-os-users-table]"),F=o=>o.extra,Ms=o=>o.extra.menuTabs??[],$e=(o,e,t)=>{o.host.toast?.(t?{message:e,duration:t}:{message:e})};function Ge(o){return Array.from(X(o)?.selection??[]).map(e=>Number(e)).filter(e=>e>0)}function Ze(o){X(o)?.clearSelection(),o.ui(D).selected=[]}async function Is(o){const t=o.ui(D).bulkRole,s=Ge(o);if(!t||s.length===0)return;await o.dispatch("bulk-role",{ids:s,role:t},{confirm:{title:l("Change role for selected users?"),message:x(l("Set %1$d user(s)' role to %2$s?"),s.length,F(o).assignableRoles?.[t]??t),label:l("Set role")}})&&Ze(o)}async function qs(o){const e=Ge(o);if(e.length===0)return;const t=F(o),s=o.ui(D),i=t.isMultisite===!0,n=i?null:s.reassign??Pt(t);let r;i?r=x(l("Remove %d user(s) from this site? Their network account stays."),e.length):n?r=x(l("Permanently delete %1$d user(s)? Their content is attributed to %2$s. This cannot be undone."),e.length,n.name):r=x(l("Permanently delete %d user(s)? Their content is deleted too. This cannot be undone."),e.length),await o.dispatch("bulk-delete",{ids:e,reassign:n?.id??0},{confirm:{title:l(i?"Remove selected users from this site?":"Delete selected users?"),message:r,label:l(i?"Remove":"Delete"),danger:!0}})&&Ze(o)}function Pt(o){return o.currentUserId?{id:o.currentUserId,name:l("you")}:null}function Mt(o,e){o.dispatch("send-reset",{id:e.id},{confirm:{title:l("Send password reset email?"),message:x(l("WordPress will email %s a password-reset link."),e.name),label:l("Send reset email")}})}function It(o,e){o.dispatch("resend-welcome",{id:e.id},{confirm:{title:l("Resend welcome email?"),message:x(l("WordPress will resend the original welcome email to %s."),e.name),label:l("Resend")}})}function Ds(o,e,t){const s=e.reassign??Pt(F(o));return h`<span class="os-users__reassign">
275 + <span class="os-users__reassign-label">${l("Attribute content to")}</span>
267 276 <strong class="os-users__reassign-name">${s?s.name:"—"}</strong>
268 277 <os-user-search
269 278 class="os-users__reassign-search"
270 - placeholder=${a("Change…")}
279 + placeholder=${l("Change…")}
271 280 exclude=${t.join(",")}
272 - @os-user-pick=${n=>{const i=n.detail?.user;i&&(e.reassign={id:i.id,name:i.name},o.repaint())}}
281 + @os-user-pick=${i=>{const n=i.detail?.user;n&&(e.reassign={id:n.id,name:n.name},o.repaint())}}
273 282 ></os-user-search>
274 - </span>`}function Ss(o,e,t){const s=q(o),n=s.assignableRoles??{},i=e.selected.length>0;return p`<div
283 + </span>`}function Fs(o,e,t){const s=F(o),i=s.assignableRoles??{},n=e.selected.length>0;return h`<div
275 284 class="os-app-list__toolbar-right ${"os-app-list__bulk--footer"}"
276 285 data-os-users-bulk
277 - ?hidden=${!i}
286 + ?hidden=${!n}
278 287 >
279 - <span class="os-app-list__count" data-os-users-count>${x(a("%d selected"),e.selected.length)}</span>
280 - <os-button variant="ghost" @click=${()=>{He(o),o.repaint()}}>${a("Clear selection")}</os-button>
288 + <span class="os-app-list__count" data-os-users-count>${x(l("%d selected"),e.selected.length)}</span>
289 + <os-button variant="ghost" @click=${()=>{Ze(o),o.repaint()}}>${l("Clear selection")}</os-button>
281 290 <span class="os-app-list__bulk-actions" data-os-users-bulk-actions>
282 - ${s.canPromote&&Object.keys(n).length>0?p`<span class="os-users__bulk-group">
291 + ${s.canPromote&&Object.keys(i).length>0?h`<span class="os-users__bulk-group">
283 292 <os-select
284 293 class="os-users__bulk-role"
285 - aria-label=${a("Set role to…")}
294 + aria-label=${l("Set role to…")}
286 295 .value=${e.bulkRole}
287 - placeholder=${a("Set role to…")}
296 + placeholder=${l("Set role to…")}
288 297 @os-pick=${r=>{e.bulkRole=String(r.detail?.value??"")}}
289 298 >
290 - <os-option .value=${""}>${a("Set role to…")}</os-option>
291 - ${Object.entries(n).map(([r,l])=>p`<os-option value=${r}>${l}</os-option>`)}
299 + <os-option .value=${""}>${l("Set role to…")}</os-option>
300 + ${Object.entries(i).map(([r,a])=>h`<os-option value=${r}>${a}</os-option>`)}
292 301 </os-select>
293 - <os-button variant="primary" @click=${()=>void ws(o)}>${a("Apply")}</os-button>
302 + <os-button variant="primary" @click=${()=>void Is(o)}>${l("Apply")}</os-button>
294 303 </span>`:""}
295 - ${s.canDelete?p`<span class="os-users__bulk-group">
296 - ${s.isMultisite?"":zs(o,e,e.selected)}
297 - <os-button variant="danger" @click=${()=>void As(o)}>
304 + ${s.canDelete?h`<span class="os-users__bulk-group">
305 + ${s.isMultisite?"":Ds(o,e,e.selected)}
306 + <os-button variant="danger" @click=${()=>void qs(o)}>
298 307 <span class="dashicons dashicons-trash" aria-hidden="true"></span>
299 - ${s.isMultisite?a("Remove from site"):a("Delete")}
308 + ${s.isMultisite?l("Remove from site"):l("Delete")}
300 309 </os-button>
301 310 </span>`:""}
302 311 </span>
303 - </div>`}function Et(o){return{onSendReset:e=>St(o,e),onResendWelcome:e=>Ct(o,e),toast:e=>_e(o,e)}}function Tt(o,e){return Do(e.feed.items,o.state.status)}function Cs(o,e){o.state.role=e===""?"none":e,o.dispatch("filter",{})}function Es(o,e,t,s){const{state:n,data:i}=o,r=q(o),l=r.canEdit===!0||r.canPromote===!0||r.canDelete===!0;return p`<os-tabpanel for="all" class="os-app-list__panel" ?hidden=${n.tab!=="all"}>
304 - <header class="os-people__hero"><div><span class="os-people__eyebrow">${a("YOUR COMMUNITY")}</span><h2>${a("The people behind it.")}</h2><p>${a("Get to know the names. See what everyone brings.")}</p></div>
305 - ${r.canCreate?p`<os-button variant="holo" data-os-users-new os-action="tab" os-arg-value="add-new">+ ${a("Add person")}</os-button>`:""}</header>
312 + </div>`}function qt(o){return{onSendReset:e=>Mt(o,e),onResendWelcome:e=>It(o,e),toast:e=>$e(o,e)}}function Dt(o,e){return Yo(e.feed.items,o.state.status)}function Ws(o,e){o.state.role=e===""?"none":e,o.dispatch("filter",{})}function Hs(o,e,t,s){const{state:i,data:n}=o,r=F(o),a=r.canEdit===!0||r.canPromote===!0||r.canDelete===!0;return h`<os-tabpanel for="all" class="os-app-list__panel" ?hidden=${i.tab!=="all"}>
313 + <header class="os-people__hero"><div><span class="os-people__eyebrow">${l("YOUR COMMUNITY")}</span><h2>${l("The people behind it.")}</h2><p>${l("Get to know the names. See what everyone brings.")}</p></div>
314 + ${r.canCreate?h`<os-button variant="holo" data-os-users-new os-action="tab" os-arg-value="add-new">+ ${l("Add person")}</os-button>`:""}</header>
306 315 <div class="os-people__tools ${e.options?"is-expanded":""}" data-os-users-toolbar>
307 - <os-text-field id=${`${o.windowId}-people-search`} class="os-app-list__search" data-os-users-search type="search" os-bind="search" os-action="filter" os-debounce="250" value=${n.search} aria-label=${a("Search people")} placeholder=${a("Search name, username, email…")}></os-text-field>
308 - <os-button class="os-people__options" variant="secondary" @click=${()=>{e.options=!e.options,o.repaint()}}>${a("Options")}</os-button>
309 - <os-select class="os-people__extra" aria-label=${a("Filter by role")} os-bind="role" os-action="filter" .value=${n.role} data-os-users-role>
310 - <os-option .value=${""}>${a("Every role")}</os-option><os-option value="none">${a("No role")}</os-option>${Object.entries(r.allRoles||{}).map(([d,c])=>p`<os-option value=${d}>${c}</os-option>`)}
316 + <os-text-field id=${`${o.windowId}-people-search`} class="os-app-list__search" data-os-users-search type="search" os-bind="search" os-action="filter" os-debounce="250" value=${i.search} aria-label=${l("Search people")} placeholder=${l("Search name, username, email…")}></os-text-field>
317 + <os-button class="os-people__options" variant="secondary" @click=${()=>{e.options=!e.options,o.repaint()}}>${l("Options")}</os-button>
318 + <os-select class="os-people__extra" aria-label=${l("Filter by role")} os-bind="role" os-action="filter" .value=${i.role} data-os-users-role>
319 + <os-option .value=${""}>${l("Every role")}</os-option><os-option value="none">${l("No role")}</os-option>${Object.entries(r.allRoles||{}).map(([c,d])=>h`<os-option value=${c}>${d}</os-option>`)}
311 320 </os-select>
312 - <os-select class="os-people__extra" aria-label=${a("Directory view")} value=${e.view} @os-pick=${d=>{e.view=String(d.detail.value),o.repaint()}}><os-option value="people">${a("People cards")}</os-option><os-option value="table">${a("Details table")}</os-option></os-select>
313 - <os-select class="os-people__extra" aria-label=${a("Sort people")} value=${`${n.orderby}:${n.order}`} @os-pick=${d=>{const[c,h]=String(d.detail.value).split(":");o.dispatch("sort",{orderby:c,order:h})}}><os-option value="name:asc">${a("Name A–Z")}</os-option><os-option value="name:desc">${a("Name Z–A")}</os-option><os-option value="registered_date:desc">${a("Newest members")}</os-option><os-option value="registered_date:asc">${a("Longest standing")}</os-option><os-option value="email:asc">${a("Email A–Z")}</os-option></os-select>
314 - <span class="os-people__extra">${Vt({segments:Io(),value:n.status,bind:"status",action:"filter",label:a("Filter users"),phone:t})}</span>
315 - <os-button class="os-people__extra" variant="ghost" os-action="refresh" data-os-users-refresh>${a("Refresh")}</os-button>
321 + <os-select class="os-people__extra" aria-label=${l("Directory view")} value=${e.view} @os-pick=${c=>{e.view=String(c.detail.value),o.repaint()}}><os-option value="people">${l("People cards")}</os-option><os-option value="table">${l("Details table")}</os-option></os-select>
322 + <os-select class="os-people__extra" aria-label=${l("Sort people")} value=${`${i.orderby}:${i.order}`} @os-pick=${c=>{const[d,p]=String(c.detail.value).split(":");o.dispatch("sort",{orderby:d,order:p})}}><os-option value="name:asc">${l("Name A–Z")}</os-option><os-option value="name:desc">${l("Name Z–A")}</os-option><os-option value="registered_date:desc">${l("Newest members")}</os-option><os-option value="registered_date:asc">${l("Longest standing")}</os-option><os-option value="email:asc">${l("Email A–Z")}</os-option></os-select>
323 + <span class="os-people__extra">${io({segments:Vo(),value:i.status,bind:"status",action:"filter",label:l("Filter users"),phone:t})}</span>
324 + <os-button class="os-people__extra" variant="ghost" os-action="refresh" data-os-users-refresh>${l("Refresh")}</os-button>
316 325 </div>
317 - ${i.list.error?p`<os-notice tone="danger">${a("Could not load users. Try Refresh.")} ${i.list.error}</os-notice>`:""}
318 - <div class="os-people__scope"><span>${x(a("%1$d of %2$d people loaded"),e.feed.items.length,i.list.total)}${n.status||n.role?` · ${s.length} ${a("match filters")}`:""}</span>${n.role?p`<os-button variant="ghost" data-os-users-clear-role @click=${()=>{o.state.role="",o.dispatch("filter",{})}}>${a("Clear role")}</os-button>`:""}</div>
319 - <div class="os-people__card-host" ?hidden=${e.view!=="people"} style="display:flex;flex:1;min-height:0;">${Qo(n.tab==="all"?s:[],{cfg:r,actions:Et(o),selected:e.selected,select:(d,c)=>{c?B(o)?.select(d):B(o)?.deselect(d)}},e.feed.tail(),o.loading)}</div>
320 - <div class="os-app-list__body" data-os-users-body ?hidden=${e.view!=="table"}><os-table data-os-users-table os-preserve selectable=${l?"multi":""} sticky-header sticky-columns="1" hover striped bordered><div slot="empty" class="os-app-list__empty"><p>${a("No users found.")}</p></div></os-table></div>
326 + ${n.list.error?h`<os-notice tone="danger">${l("Could not load users. Try Refresh.")} ${n.list.error}</os-notice>`:""}
327 + <div class="os-people__scope"><span>${x(l("%1$d of %2$d people loaded"),e.feed.items.length,n.list.total)}${i.status||i.role?` · ${s.length} ${l("match filters")}`:""}</span>${i.role?h`<os-button variant="ghost" data-os-users-clear-role @click=${()=>{o.state.role="",o.dispatch("filter",{})}}>${l("Clear role")}</os-button>`:""}</div>
328 + <div class="os-people__card-host" ?hidden=${e.view!=="people"} style="display:flex;flex:1;min-height:0;">${ds(i.tab==="all"?s:[],{cfg:r,actions:qt(o),selected:e.selected,select:(c,d)=>{d?X(o)?.select(c):X(o)?.deselect(c)}},e.feed.tail(),o.loading)}</div>
329 + <div class="os-app-list__body" data-os-users-body ?hidden=${e.view!=="table"}><os-table data-os-users-table os-preserve selectable=${a?"multi":""} sticky-header sticky-columns="1" hover striped bordered><div slot="empty" class="os-app-list__empty"><p>${l("No users found.")}</p></div></os-table></div>
321 330 ${e.view==="table"?e.feed.tail():""}
322 - ${Ss(o,e)}
323 - </os-tabpanel>`}function Rt(o,e,t){const s=e.roles,n=t==="roles";let i,r;if(n)i=s.data?x(a("%d people across this site. Up to 8 faces per role; people can belong to more than one group."),s.data.total):a("Gathering your role groups…"),r=s.data?es(s.data.groups,l=>{o.local("tab",{value:"all"}),Cs(o,l)}):p`<p class="os-people__empty" role="status">${s.error?a("Role groups are unavailable."):a("Loading all roles…")}</p>`;else{const l=e.activity.data;i=l?x(a("%d people across this site."),l.total):a("Gathering the complete community overview"),r=l?gs(l,Et(o),q(o),e.contribution,d=>{e.contribution=d,o.repaint()}):p`<section class="os-community__loading" role="status"><h3>${e.activity.error?a("The overview could not load. Use Refresh to retry."):a("Bringing everyone together…")}</h3></section>`}return p`<os-tabpanel for=${t} class="os-app-list__panel" ?hidden=${o.state.tab!==t}>
324 - <header class="os-people__hero"><div><span class="os-people__eyebrow">${a(n?"A PLACE FOR EVERYONE":"THE HUMAN SIDE OF YOUR SITE")}</span><h2>${a(n?"Different roles. One community.":"A community, in motion.")}</h2><p>${a(n?"Explore the groups that make your site work.":"The people showing up, joining in, and making things happen.")}</p></div></header>
325 - <div class="os-people__scope"><span>${i}</span>
326 - ${n?p`<os-button variant="ghost" ?disabled=${s.loading} @click=${()=>void s.load(o)}>${s.loading?a("Refreshing…"):a("Refresh")}</os-button>`:p`<os-button variant="ghost" ?disabled=${e.activity.loading} @click=${()=>void e.activity.load(o)}>${a("Refresh")}</os-button>`}</div>
327 - ${(n?s.error:e.activity.error)?p`<os-notice tone="danger">${a("Could not refresh this overview. Try Refresh.")}</os-notice>`:""}
331 + ${Fs(o,e)}
332 + </os-tabpanel>`}function Ft(o,e,t){const s=e.roles,i=t==="roles";let n,r;if(i)n=s.data?x(l("%d people across this site. Up to 8 faces per role; people can belong to more than one group."),s.data.total):l("Gathering your role groups…"),r=s.data?us(s.data.groups,a=>{o.local("tab",{value:"all"}),Ws(o,a)}):h`<p class="os-people__empty" role="status">${s.error?l("Role groups are unavailable."):l("Loading all roles…")}</p>`;else{const a=e.activity.data;n=a?x(l("%d people across this site."),a.total):l("Gathering the complete community overview"),r=a?Cs(a,qt(o),F(o),e.contribution,c=>{e.contribution=c,o.repaint()}):h`<section class="os-community__loading" role="status"><h3>${e.activity.error?l("The overview could not load. Use Refresh to retry."):l("Bringing everyone together…")}</h3></section>`}return h`<os-tabpanel for=${t} class="os-app-list__panel" ?hidden=${o.state.tab!==t}>
333 + <header class="os-people__hero"><div><span class="os-people__eyebrow">${l(i?"A PLACE FOR EVERYONE":"THE HUMAN SIDE OF YOUR SITE")}</span><h2>${l(i?"Different roles. One community.":"A community, in motion.")}</h2><p>${l(i?"Explore the groups that make your site work.":"The people showing up, joining in, and making things happen.")}</p></div></header>
334 + <div class="os-people__scope"><span>${n}</span>
335 + ${i?h`<os-button variant="ghost" ?disabled=${s.loading} @click=${()=>void s.load(o)}>${s.loading?l("Refreshing…"):l("Refresh")}</os-button>`:h`<os-button variant="ghost" ?disabled=${e.activity.loading} @click=${()=>void e.activity.load(o)}>${l("Refresh")}</os-button>`}</div>
336 + ${(i?s.error:e.activity.error)?h`<os-notice tone="danger">${l("Could not refresh this overview. Try Refresh.")}</os-notice>`:""}
328 337 <div class="os-people__insights">${r}</div>
329 - </os-tabpanel>`}const Ts=Qt(ks,{local:{tab:(o,e)=>{o.tab=String(e.value??"all")}},placeholder:o=>({list:{items:[],total:0,pages:0,page:o.page,perPage:o.perPage}}),view:o=>{const{state:e}=o,t=q(o),s=o.ui(D),n=fe();s.feed.reconcile(o);const i=Tt(o,s);return p`<div class="os-app-list desktop-mode-users" data-os-users-root><style>${vs.cssText}${bs.cssText}</style>
330 - <os-tabs value=${e.tab} os-bind="tab" class="os-app-list__tabs os-users__tabs" label=${a("Users")} data-os-users-tabs>
331 - <os-tab value="all">${a("People")}</os-tab><os-tab value="roles">${a("Roles")}</os-tab><os-tab value="activity">${a("Activity")}</os-tab>
332 - ${t.canCreate?p`<os-tab value="add-new">${a("Add new")}</os-tab>`:""}
333 - <os-tab value="edit" data-os-users-edit-tab>${a("Profile")}</os-tab>
338 + </os-tabpanel>`}const Os=ao(Ns,{local:{tab:(o,e)=>{o.tab=String(e.value??"all")}},placeholder:o=>({list:{items:[],total:0,pages:0,page:o.page,perPage:o.perPage}}),view:o=>{const{state:e}=o,t=F(o),s=o.ui(D),i=_e();s.feed.reconcile(o);const n=Dt(o,s);return h`<div class="os-app-list desktop-mode-users" data-os-users-root><style>${Es.cssText}${zs.cssText}</style>
339 + <os-tabs value=${e.tab} os-bind="tab" class="os-app-list__tabs os-users__tabs" label=${l("Users")} data-os-users-tabs>
340 + ${Ms(o).map(r=>h`<os-tab
341 + value=${r.id}
342 + data-os-users-tab=${r.id}
343 + >${r.label}</os-tab>`)}
334 344 </os-tabs>
335 - ${Es(o,s,n,i)}
336 - ${Rt(o,s,"roles")}
337 - ${Rt(o,s,"activity")}
338 - ${t.canCreate?p`<os-tabpanel for="add-new" class="os-users__add-panel" ?hidden=${e.tab!=="add-new"}>
339 - ${ys(t,r=>_e(o,r))}
345 + ${Hs(o,s,i,n)}
346 + ${Ft(o,s,"roles")}
347 + ${Ft(o,s,"activity")}
348 + ${t.canCreate?h`<os-tabpanel for="add-new" class="os-users__add-panel" ?hidden=${e.tab!=="add-new"}>
349 + ${Ls(t,r=>$e(o,r))}
340 350 </os-tabpanel>`:""}
341 351 <os-tabpanel for="edit" class="os-users__edit-panel" ?hidden=${e.tab!=="edit"}>
342 352 <os-user-profile
343 353 os-preserve
@@ -344,6 +354,6 @@
344 354 data-os-user-profile-self
345 355 user-id=${e.tab==="edit"&&t.currentUserId?String(t.currentUserId):""}
346 356 ></os-user-profile>
347 357 </os-tabpanel>
348 - </div>`},mounted:o=>{const e=()=>o.repaint();return document.addEventListener("os-mode-changed",e),()=>{document.removeEventListener("os-mode-changed",e),o.ui(D).feed.dispose(),o.ui(D).roles.dispose(),o.ui(D).activity.dispose()}},updated:o=>{const e=o.ui(D),{state:t}=o,s=q(o);e.addForm=xs(o.root,t,e.addForm);const n=o.root.querySelector("os-user-profile");if(n&&!e.profileWired&&(e.profileWired=!0,n.config=s,n.fetch=o.fetch,n.toast=(d,c)=>_e(o,d,$s[c??"info"])),ts(o.root),e.roles.update(o),e.feed.observe(o.root),e.activity.update(o),t.tab!=="all")return;const i=Tt(o,e),r=new Map(i.map(d=>[d.id,Uo(d)]));for(const[d,c]of r)e.rows.get(d)!==c&&xt(e.cache,d);for(const d of e.rows.keys())r.has(d)||xt(e.cache,d);e.rows=r;const l={onSendReset:d=>St(o,d),onResendWelcome:d=>Ct(o,d),toast:d=>_e(o,d)};B(o)?.toggleAttribute("loading",o.loading),e.sync.sync({table:B(o),rows:i,listKey:`${t.perPage}|${t.search}|${t.role}|${t.status}|${t.orderby}|${t.order}`,fingerprint:Array.from(r.values()).join(`
349 -`),columns:d=>Bo(e.cache,s,l,d),wire:d=>{const c=d;c.getRowId=h=>h.id,c.sort={key:"identity",direction:t.order==="desc"?"desc":"asc"},c.addEventListener("os-table-selection-change",()=>{e.selected=We(o),o.repaint()}),c.addEventListener("os-table-sort-change",h=>{const u=h.detail?.sort;o.dispatch("sort",{orderby:u?Fo[u.key]??"name":"name",order:u?.direction??"asc"})}),c.addEventListener("os-table-row-click",h=>{const u=h.detail?.row?.id;typeof u=="number"&&u>0&&V(u,l)})},onSelection:d=>{e.selected=d.map(Number),queueMicrotask(()=>o.repaint())}})}});return $e.default=Ts,Object.defineProperties($e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),$e}({});
358 + </div>`},mounted:o=>{const e=()=>o.repaint();return document.addEventListener("os-mode-changed",e),()=>{document.removeEventListener("os-mode-changed",e),o.ui(D).feed.dispose(),o.ui(D).roles.dispose(),o.ui(D).activity.dispose()}},updated:o=>{const e=o.ui(D),{state:t}=o,s=F(o);e.addForm=Ts(o.root,t,e.addForm);const i=o.root.querySelector("os-user-profile");if(i&&!e.profileWired&&(e.profileWired=!0,i.config=s,i.fetch=o.fetch,i.toast=(c,d)=>$e(o,c,Ps[d??"info"])),ps(o.root),e.roles.update(o),e.feed.observe(o.root),e.activity.update(o),t.tab!=="all")return;const n=Dt(o,e),r=new Map(n.map(c=>[c.id,Zo(c)]));for(const[c,d]of r)e.rows.get(c)!==d&&Et(e.cache,c);for(const c of e.rows.keys())r.has(c)||Et(e.cache,c);e.rows=r;const a={onSendReset:c=>Mt(o,c),onResendWelcome:c=>It(o,c),toast:c=>$e(o,c)};X(o)?.toggleAttribute("loading",o.loading),e.sync.sync({table:X(o),rows:n,listKey:`${t.perPage}|${t.search}|${t.role}|${t.status}|${t.orderby}|${t.order}`,fingerprint:Array.from(r.values()).join(`
359 +`),columns:c=>is(e.cache,s,a,c),wire:c=>{const d=c;d.getRowId=p=>p.id,d.sort={key:"identity",direction:t.order==="desc"?"desc":"asc"},d.addEventListener("os-table-selection-change",()=>{e.selected=Ge(o),o.repaint()}),d.addEventListener("os-table-sort-change",p=>{const u=p.detail?.sort;o.dispatch("sort",{orderby:u?Go[u.key]??"name":"name",order:u?.direction??"asc"})}),d.addEventListener("os-table-row-click",p=>{const u=p.detail?.row?.id;typeof u=="number"&&u>0&&Q(u,a)})},onSelection:c=>{e.selected=c.map(Number),queueMicrotask(()=>o.repaint())}})}});return ze.default=Os,Object.defineProperties(ze,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),ze}({});