diff --git a/examples/Button/index.html b/examples/Button/index.html index fd747f4e..28d7ddbf 100644 --- a/examples/Button/index.html +++ b/examples/Button/index.html @@ -39,7 +39,7 @@ - + diff --git a/examples/Checkbox/index.html b/examples/Checkbox/index.html index 3e79e4ae..ec48a08b 100644 --- a/examples/Checkbox/index.html +++ b/examples/Checkbox/index.html @@ -19,7 +19,7 @@ - + diff --git a/examples/ClassificationsTree/index.html b/examples/ClassificationsTree/index.html index d16e9beb..37dbe6fa 100644 --- a/examples/ClassificationsTree/index.html +++ b/examples/ClassificationsTree/index.html @@ -24,10 +24,10 @@ - - + + - + diff --git a/examples/ColorInput/index.html b/examples/ColorInput/index.html index 8f096cfc..4f923eb6 100644 --- a/examples/ColorInput/index.html +++ b/examples/ColorInput/index.html @@ -23,7 +23,7 @@ - + diff --git a/examples/Component/index.html b/examples/Component/index.html index a8c20d72..29bfc59d 100644 --- a/examples/Component/index.html +++ b/examples/Component/index.html @@ -21,7 +21,7 @@ - + diff --git a/examples/ContextMenu/index.html b/examples/ContextMenu/index.html index 0359002d..f2d8c306 100644 --- a/examples/ContextMenu/index.html +++ b/examples/ContextMenu/index.html @@ -32,7 +32,7 @@ - + diff --git a/examples/Dropdown/index.html b/examples/Dropdown/index.html index 33f0db7c..3368ed0d 100644 --- a/examples/Dropdown/index.html +++ b/examples/Dropdown/index.html @@ -29,7 +29,7 @@ - + diff --git a/examples/ElementProperties/index.html b/examples/ElementProperties/index.html index 9443b57d..d6a89aa7 100644 --- a/examples/ElementProperties/index.html +++ b/examples/ElementProperties/index.html @@ -28,9 +28,9 @@ - + - + diff --git a/examples/EntityAttributes/index.html b/examples/EntityAttributes/index.html index 075785dc..49d4da7e 100644 --- a/examples/EntityAttributes/index.html +++ b/examples/EntityAttributes/index.html @@ -34,9 +34,9 @@ - + - + diff --git a/examples/Grid/index.html b/examples/Grid/index.html index 99f3072c..b0e29cc9 100644 --- a/examples/Grid/index.html +++ b/examples/Grid/index.html @@ -40,7 +40,7 @@ - + diff --git a/examples/Label/index.html b/examples/Label/index.html index 22e7fd07..4af2456b 100644 --- a/examples/Label/index.html +++ b/examples/Label/index.html @@ -24,7 +24,7 @@ - + diff --git a/examples/ModelsList/index.html b/examples/ModelsList/index.html index 7d8dce8e..c363fbc7 100644 --- a/examples/ModelsList/index.html +++ b/examples/ModelsList/index.html @@ -24,10 +24,10 @@ - - + + - + diff --git a/examples/NumberInput/index.html b/examples/NumberInput/index.html index 9d2369b8..4825b14b 100644 --- a/examples/NumberInput/index.html +++ b/examples/NumberInput/index.html @@ -23,7 +23,7 @@ - + diff --git a/examples/Panel/index.html b/examples/Panel/index.html index 77665e17..e3eae43d 100644 --- a/examples/Panel/index.html +++ b/examples/Panel/index.html @@ -46,7 +46,7 @@ - + diff --git a/examples/RelationsTree/index.html b/examples/RelationsTree/index.html index 07f7a5b4..b2cba698 100644 --- a/examples/RelationsTree/index.html +++ b/examples/RelationsTree/index.html @@ -24,10 +24,10 @@ - - + + - + diff --git a/examples/Selector/index.html b/examples/Selector/index.html index 0cad01c7..61062df4 100644 --- a/examples/Selector/index.html +++ b/examples/Selector/index.html @@ -23,7 +23,7 @@ - + diff --git a/examples/Table/DataTransform/index.html b/examples/Table/DataTransform/index.html index ef1f37a9..76dcc0d1 100644 --- a/examples/Table/DataTransform/index.html +++ b/examples/Table/DataTransform/index.html @@ -26,7 +26,7 @@ - + diff --git a/examples/Table/ExportingData/index.html b/examples/Table/ExportingData/index.html index 1a0f42ab..69cba376 100644 --- a/examples/Table/ExportingData/index.html +++ b/examples/Table/ExportingData/index.html @@ -26,7 +26,7 @@ - + diff --git a/examples/Table/LoadFunction/index.html b/examples/Table/LoadFunction/index.html index 6876ba82..4151e53f 100644 --- a/examples/Table/LoadFunction/index.html +++ b/examples/Table/LoadFunction/index.html @@ -26,7 +26,7 @@ - + diff --git a/examples/Table/Searching/index.html b/examples/Table/Searching/index.html index 52b0929b..5cd9bb68 100644 --- a/examples/Table/Searching/index.html +++ b/examples/Table/Searching/index.html @@ -26,7 +26,7 @@ - + diff --git a/examples/Table/index.html b/examples/Table/index.html index 335e9d02..5560ee4a 100644 --- a/examples/Table/index.html +++ b/examples/Table/index.html @@ -26,7 +26,7 @@ - + diff --git a/examples/Tabs/index.html b/examples/Tabs/index.html index 8a32dc37..5d4d8e06 100644 --- a/examples/Tabs/index.html +++ b/examples/Tabs/index.html @@ -36,7 +36,7 @@ - + diff --git a/examples/TextInput/index.html b/examples/TextInput/index.html index 9d67ea3d..9ab5304c 100644 --- a/examples/TextInput/index.html +++ b/examples/TextInput/index.html @@ -26,7 +26,7 @@ - + diff --git a/examples/Toolbar/index.html b/examples/Toolbar/index.html index 3f7f105d..95a38ff6 100644 --- a/examples/Toolbar/index.html +++ b/examples/Toolbar/index.html @@ -23,7 +23,7 @@ - + diff --git a/examples/TopicForm/index.html b/examples/TopicForm/index.html index 21dbf32a..21b81866 100644 --- a/examples/TopicForm/index.html +++ b/examples/TopicForm/index.html @@ -27,7 +27,7 @@ - + diff --git a/examples/TopicsList/index.html b/examples/TopicsList/index.html index 4458c0e2..a3eab12b 100644 --- a/examples/TopicsList/index.html +++ b/examples/TopicsList/index.html @@ -38,7 +38,7 @@ - + diff --git a/examples/ViewCube/index.html b/examples/ViewCube/index.html index 2d017a6b..63cdc1a7 100644 --- a/examples/ViewCube/index.html +++ b/examples/ViewCube/index.html @@ -17,11 +17,11 @@ - + - + diff --git a/examples/World/index.html b/examples/World/index.html index e0b1e929..25bdcf4e 100644 --- a/examples/World/index.html +++ b/examples/World/index.html @@ -19,11 +19,11 @@ - + - + diff --git a/examples/World2D/index.html b/examples/World2D/index.html index dcf22715..603efd19 100644 --- a/examples/World2D/index.html +++ b/examples/World2D/index.html @@ -18,11 +18,11 @@ - + - + diff --git a/examples/WorldsConfiguration/index.html b/examples/WorldsConfiguration/index.html index 45a5efc5..9a2b169a 100644 --- a/examples/WorldsConfiguration/index.html +++ b/examples/WorldsConfiguration/index.html @@ -28,9 +28,9 @@ - + - + diff --git a/examples/assets/button.js b/examples/assets/button.js index f668c2a0..ec1c763f 100644 --- a/examples/assets/button.js +++ b/examples/assets/button.js @@ -1 +1 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as t}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";t.init();const e=document.body.querySelector("bim-button");e.addEventListener("click",()=>{alert("Your schedule has been created!")});const n=document.getElementById("context-btn");n.addEventListener("click",()=>{console.log("asdasd")}); +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as t}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";t.init();const e=document.body.querySelector("bim-button");e.addEventListener("click",()=>{alert("Your schedule has been created!")});const n=document.getElementById("context-btn");n.addEventListener("click",()=>{console.log("asdasd")}); diff --git a/examples/assets/checkbox.js b/examples/assets/checkbox.js index f7e9326c..ef0d146e 100644 --- a/examples/assets/checkbox.js +++ b/examples/assets/checkbox.js @@ -1 +1 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as t}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";t.init();const e=document.body.querySelector("bim-checkbox");e.addEventListener("change",()=>{const{checked:o}=e;alert(o?"You want BIM Tiles! :)":"You don't want BIM Tiles :(")}); +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as t}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";t.init();const e=document.body.querySelector("bim-checkbox");e.addEventListener("change",()=>{const{checked:o}=e;alert(o?"You want BIM Tiles! :)":"You don't want BIM Tiles :(")}); diff --git a/examples/assets/classificationsTree.js b/examples/assets/classificationsTree.js index e594faee..0293f367 100644 --- a/examples/assets/classificationsTree.js +++ b/examples/assets/classificationsTree.js @@ -1,4 +1,4 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{T as l,C as p,W as d,S as f,a as b,b as g,G as w,I as y,F as u,t as C,l as T,m as v}from"./index-N2x2mgv3.js";import{b as L}from"./index-DAXFTtA6.js";import{t as E}from"./index-BazQpUSZ.js";import"./lit-html-paDGiEfB.js";l.init();const e=new p,n=document.createElement("bim-viewport");n.name="viewer";const I=e.get(d),t=I.create(),o=new f(e);o.setup();t.scene=o;const r=new b(e,n);t.renderer=r;const c=new g(e);t.camera=c;n.addEventListener("resize",()=>{r.resize(),c.updateAspect()});const S=e.get(w);S.create(t);e.init();const F=e.get(y);await F.setup();const m=e.get(u);m.onFragmentsLoaded.add(s=>{t.scene&&t.scene.three.add(s)});const[G,z]=E.classificationTree({components:e,classifications:[]}),i=e.get(C);m.onFragmentsLoaded.add(async s=>{i.byEntity(s),await i.byPredefinedType(s),z({classifications:[{system:"entities",label:"Entities"},{system:"predefinedTypes",label:"Predefined Types"}]})});const M=T.create(()=>{const[s]=L.loadIfc({components:e});return v` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{T as l,C as p,W as d,S as f,a as b,b as g,G as w,I as y,F as u,t as C,l as T,m as v}from"./index-D2hR2zBN.js";import{b as L}from"./index-Cc7BUWEv.js";import{t as E}from"./index-CCTT9UP1.js";import"./lit-html-paDGiEfB.js";l.init();const e=new p,n=document.createElement("bim-viewport");n.name="viewer";const I=e.get(d),t=I.create(),o=new f(e);o.setup();t.scene=o;const r=new b(e,n);t.renderer=r;const c=new g(e);t.camera=c;n.addEventListener("resize",()=>{r.resize(),c.updateAspect()});const S=e.get(w);S.create(t);e.init();const F=e.get(y);await F.setup();const m=e.get(u);m.onFragmentsLoaded.add(s=>{t.scene&&t.scene.three.add(s)});const[G,z]=E.classificationTree({components:e,classifications:[]}),i=e.get(C);m.onFragmentsLoaded.add(async s=>{i.byEntity(s),await i.byPredefinedType(s),z({classifications:[{system:"entities",label:"Entities"},{system:"predefinedTypes",label:"Predefined Types"}]})});const M=T.create(()=>{const[s]=L.loadIfc({components:e});return v` ${s} diff --git a/examples/assets/colorInput.js b/examples/assets/colorInput.js index 256d1946..c2e640cc 100644 --- a/examples/assets/colorInput.js +++ b/examples/assets/colorInput.js @@ -1 +1 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as r}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";r.init();const o=document.body.querySelector("bim-color-input");o.addEventListener("input",()=>{const{color:t}=o;console.log(t)}); +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as r}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";r.init();const o=document.body.querySelector("bim-color-input");o.addEventListener("input",()=>{const{color:t}=o;console.log(t)}); diff --git a/examples/assets/component.js b/examples/assets/component.js index 65c88006..9c2e8910 100644 --- a/examples/assets/component.js +++ b/examples/assets/component.js @@ -1,4 +1,4 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as c,C as t}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import{x as n}from"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";c.init();const b=t.create(()=>n` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as c,C as t}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import{x as n}from"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";c.init();const b=t.create(()=>n` diff --git a/examples/assets/contextMenu.js b/examples/assets/contextMenu.js index 205a3c47..78f5a488 100644 --- a/examples/assets/contextMenu.js +++ b/examples/assets/contextMenu.js @@ -1 +1 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as i}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";i.init(); +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as i}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";i.init(); diff --git a/examples/assets/dataTransform.js b/examples/assets/dataTransform.js index 730949b4..c7f84290 100644 --- a/examples/assets/dataTransform.js +++ b/examples/assets/dataTransform.js @@ -1,4 +1,4 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as s,C as m,a as f,T as b}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import{x as t}from"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";s.init();const d=[{data:{Class:"IfcWall",PredefinedType:"EXTERNAL",Name:"Exterior Wall",Description:"Main structural exterior wall",LoadBearing:!0,Area:45.5}},{data:{Class:"IfcDoor",PredefinedType:"SINGLE_SWING_RIGHT",Name:"Entrance Door",Description:"Main entrance door",LoadBearing:!1,Area:2.1}},{data:{Class:"IfcWindow",PredefinedType:"STANDARD",Name:"Office Window",Description:"Double-pane office window",LoadBearing:!1,Area:3.6}},{data:{Class:"IfcColumn",PredefinedType:"ROUND",Name:"Support Column",Description:"Load-bearing column in lobby",LoadBearing:!0,Area:1.2}},{data:{Class:"IfcSlab",PredefinedType:"FLOOR",Name:"Main Floor Slab",Description:"Primary floor slab for ground level",LoadBearing:!0,Area:150}}],o=document.createElement("bim-table");o.data=d;const r=document.createElement("bim-table");r.data=d;r.dataTransform.Area=e=>`${e} m²`;r.dataTransform.LoadBearing=(e,a)=>t` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as s,C as m,a as f,T as b}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import{x as t}from"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";s.init();const d=[{data:{Class:"IfcWall",PredefinedType:"EXTERNAL",Name:"Exterior Wall",Description:"Main structural exterior wall",LoadBearing:!0,Area:45.5}},{data:{Class:"IfcDoor",PredefinedType:"SINGLE_SWING_RIGHT",Name:"Entrance Door",Description:"Main entrance door",LoadBearing:!1,Area:2.1}},{data:{Class:"IfcWindow",PredefinedType:"STANDARD",Name:"Office Window",Description:"Double-pane office window",LoadBearing:!1,Area:3.6}},{data:{Class:"IfcColumn",PredefinedType:"ROUND",Name:"Support Column",Description:"Load-bearing column in lobby",LoadBearing:!0,Area:1.2}},{data:{Class:"IfcSlab",PredefinedType:"FLOOR",Name:"Main Floor Slab",Description:"Primary floor slab for ground level",LoadBearing:!0,Area:150}}],o=document.createElement("bim-table");o.data=d;const r=document.createElement("bim-table");r.data=d;r.dataTransform.Area=e=>`${e} m²`;r.dataTransform.LoadBearing=(e,a)=>t` {const n=l.target;n instanceof f&&(a.LoadBearing=n.checked,window.alert(`${a.Name} changed to LoadBearing = ${n.checked}`),o.requestUpdate())}} .checked=${e}> `;r.dataTransform.Class=e=>{const a="padding: 0.125rem 0.375rem; border-radius: 999px";return e==="IfcDoor"||e==="IfcSlab"?t` diff --git a/examples/assets/dropdown.js b/examples/assets/dropdown.js index 627fbe9b..d7127339 100644 --- a/examples/assets/dropdown.js +++ b/examples/assets/dropdown.js @@ -1 +1 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as d}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";d.init();const t=document.getElementById("my-dropdown-1");t.addEventListener("change",()=>{const e=t.value;alert(`You've selected: ${e.join(", ")}.`)});const n=document.getElementById("my-dropdown-2");for(let e=0;e<300;e++){const o=document.createElement("bim-option");o.label=`Option ${e}`,o.value=e,n.append(o)}n.value=[100]; +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as d}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";d.init();const t=document.getElementById("my-dropdown-1");t.addEventListener("change",()=>{const e=t.value;alert(`You've selected: ${e.join(", ")}.`)});const n=document.getElementById("my-dropdown-2");for(let e=0;e<300;e++){const o=document.createElement("bim-option");o.label=`Option ${e}`,o.value=e,n.append(o)}n.value=[100]; diff --git a/examples/assets/elementProperties.js b/examples/assets/elementProperties.js index ef6734a4..80d36702 100644 --- a/examples/assets/elementProperties.js +++ b/examples/assets/elementProperties.js @@ -1,4 +1,4 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{T as w,C as x,W as y,S as v,a as h,b as C,G as S,I as T,p as I,u as E,l as P,m as A}from"./index-N2x2mgv3.js";import{t as L}from"./index-BazQpUSZ.js";import"./lit-html-paDGiEfB.js";w.init();const s=document.createElement("bim-viewport"),e=new x,$=e.get(y),n=$.create(),c=new v(e);c.setup();n.scene=c;const d=new h(e,s);n.renderer=d;const i=new C(e);n.camera=i;i.controls.setLookAt(10,5.5,5,-4,-1,-6.5);s.addEventListener("resize",()=>{d.resize(),i.updateAspect()});e.init();const k=e.get(S);k.create(n);const m=e.get(T);await m.setup();const z=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),G=await z.arrayBuffer(),M=new Uint8Array(G),u=await m.load(M);n.scene.three.add(u);const R=e.get(I);await R.process(u);const[t,b]=L.elementProperties({components:e,fragmentIdMap:{}});t.preserveStructureOnFilter=!0;t.indentationInText=!1;const p=e.get(E);p.setup({world:n});p.events.select.onHighlight.add(o=>{b({fragmentIdMap:o})});p.events.select.onClear.add(()=>b({fragmentIdMap:{}}));const V=P.create(()=>{const o=r=>{const a=r.target;t.queryString=a.value!==""?a.value:null},g=r=>{const a=r.target;t.expanded=!t.expanded,a.label=t.expanded?"Collapse":"Expand"},f=async()=>{await navigator.clipboard.writeText(t.tsv)};return A` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{T as w,C as x,W as y,S as v,a as h,b as C,G as S,I as T,p as I,u as E,l as P,m as A}from"./index-D2hR2zBN.js";import{t as L}from"./index-CCTT9UP1.js";import"./lit-html-paDGiEfB.js";w.init();const s=document.createElement("bim-viewport"),e=new x,$=e.get(y),n=$.create(),c=new v(e);c.setup();n.scene=c;const d=new h(e,s);n.renderer=d;const i=new C(e);n.camera=i;i.controls.setLookAt(10,5.5,5,-4,-1,-6.5);s.addEventListener("resize",()=>{d.resize(),i.updateAspect()});e.init();const k=e.get(S);k.create(n);const m=e.get(T);await m.setup();const z=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),G=await z.arrayBuffer(),M=new Uint8Array(G),u=await m.load(M);n.scene.three.add(u);const R=e.get(I);await R.process(u);const[t,b]=L.elementProperties({components:e,fragmentIdMap:{}});t.preserveStructureOnFilter=!0;t.indentationInText=!1;const p=e.get(E);p.setup({world:n});p.events.select.onHighlight.add(o=>{b({fragmentIdMap:o})});p.events.select.onClear.add(()=>b({fragmentIdMap:{}}));const V=P.create(()=>{const o=r=>{const a=r.target;t.queryString=a.value!==""?a.value:null},g=r=>{const a=r.target;t.expanded=!t.expanded,a.label=t.expanded?"Collapse":"Expand"},f=async()=>{await navigator.clipboard.writeText(t.tsv)};return A`
diff --git a/examples/assets/entityAttributes.js b/examples/assets/entityAttributes.js index b280bfd9..e1a9dbc1 100644 --- a/examples/assets/entityAttributes.js +++ b/examples/assets/entityAttributes.js @@ -1,4 +1,4 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{T as v,C as T,W as k,S as A,a as P,b as $,G as E,I as L,p as W,u as N,l as R,m as p,$ as b,x as H,E as M}from"./index-N2x2mgv3.js";import{t as O}from"./index-BazQpUSZ.js";import"./lit-html-paDGiEfB.js";v.init();const o=new T,V=o.get(k),a=V.create(),S=new A(o);S.setup();a.scene=S;const d=document.createElement("bim-viewport"),w=new P(o,d);a.renderer=w;const m=new $(o);a.camera=m;m.controls.setLookAt(10,5.5,5,-4,-1,-6.5);d.addEventListener("resize",()=>{w.resize(),m.updateAspect()});o.init();const B=o.get(E);B.create(a);const C=o.get(L);await C.setup();const D=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),F=await D.arrayBuffer(),G=new Uint8Array(F),x=await C.load(G);a.scene.three.add(x);const J=o.get(W);await J.process(x);const l={padding:"0.25rem",borderRadius:"0.25rem"},z={Entity:t=>{let e={};return t===H[M]&&(e={...l,backgroundColor:"purple",color:"white"}),String(t).includes("IFCWALL")&&(e={...l,backgroundColor:"green",color:"white"}),p`${t}`},PredefinedType:t=>{const e=["#1c8d83","#3c1c8d","#386c19","#837c24"],c=Math.floor(Math.random()*e.length),g=e[c],f={...l,backgroundColor:g,color:"white"};return p`${t}`},NominalValue:t=>{let e={};return typeof t=="boolean"&&t===!1&&(e={...l,backgroundColor:"#b13535",color:"white"}),typeof t=="boolean"&&t===!0&&(e={...l,backgroundColor:"#18882c",color:"white"}),p`${t}`}},[n,u]=O.entityAttributes({components:o,fragmentIdMap:{},tableDefinition:z,attributesToInclude:()=>["Name","ContainedInStructure","HasProperties","HasPropertySets",e=>e.includes("Value"),e=>e.startsWith("Material"),e=>e.startsWith("Relating"),e=>{const c=["IsGroupedBy","IsDecomposedBy"];return e.startsWith("Is")&&!c.includes(e)}]});n.expanded=!0;n.indentationInText=!0;n.preserveStructureOnFilter=!0;const h=o.get(N);h.setup({world:a});h.events.select.onHighlight.add(t=>{u({fragmentIdMap:t})});h.events.select.onClear.add(()=>u({fragmentIdMap:{}}));const j=R.create(()=>p` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{T as v,C as T,W as k,S as A,a as P,b as $,G as E,I as L,p as W,u as N,l as R,m as p,$ as b,x as H,E as M}from"./index-D2hR2zBN.js";import{t as O}from"./index-CCTT9UP1.js";import"./lit-html-paDGiEfB.js";v.init();const o=new T,V=o.get(k),a=V.create(),S=new A(o);S.setup();a.scene=S;const d=document.createElement("bim-viewport"),w=new P(o,d);a.renderer=w;const m=new $(o);a.camera=m;m.controls.setLookAt(10,5.5,5,-4,-1,-6.5);d.addEventListener("resize",()=>{w.resize(),m.updateAspect()});o.init();const B=o.get(E);B.create(a);const C=o.get(L);await C.setup();const D=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),F=await D.arrayBuffer(),G=new Uint8Array(F),x=await C.load(G);a.scene.three.add(x);const J=o.get(W);await J.process(x);const l={padding:"0.25rem",borderRadius:"0.25rem"},z={Entity:t=>{let e={};return t===H[M]&&(e={...l,backgroundColor:"purple",color:"white"}),String(t).includes("IFCWALL")&&(e={...l,backgroundColor:"green",color:"white"}),p`${t}`},PredefinedType:t=>{const e=["#1c8d83","#3c1c8d","#386c19","#837c24"],c=Math.floor(Math.random()*e.length),g=e[c],f={...l,backgroundColor:g,color:"white"};return p`${t}`},NominalValue:t=>{let e={};return typeof t=="boolean"&&t===!1&&(e={...l,backgroundColor:"#b13535",color:"white"}),typeof t=="boolean"&&t===!0&&(e={...l,backgroundColor:"#18882c",color:"white"}),p`${t}`}},[n,u]=O.entityAttributes({components:o,fragmentIdMap:{},tableDefinition:z,attributesToInclude:()=>["Name","ContainedInStructure","HasProperties","HasPropertySets",e=>e.includes("Value"),e=>e.startsWith("Material"),e=>e.startsWith("Relating"),e=>{const c=["IsGroupedBy","IsDecomposedBy"];return e.startsWith("Is")&&!c.includes(e)}]});n.expanded=!0;n.indentationInText=!0;n.preserveStructureOnFilter=!0;const h=o.get(N);h.setup({world:a});h.events.select.onHighlight.add(t=>{u({fragmentIdMap:t})});h.events.select.onClear.add(()=>u({fragmentIdMap:{}}));const j=R.create(()=>p`
diff --git a/examples/assets/exportingData.js b/examples/assets/exportingData.js index fca44408..5b0b08db 100644 --- a/examples/assets/exportingData.js +++ b/examples/assets/exportingData.js @@ -1,4 +1,4 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as c,C as n,T as d,a as s}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import{x as a}from"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";c.init();const o=document.createElement("bim-table");o.expanded=!0;o.data=[{data:{Class:"IfcWall",PredefinedType:"EXTERNAL",Name:"Exterior Wall",Description:"Main structural exterior wall",LoadBearing:!0,Area:45.5},children:[{data:{Class:"IfcWindow",PredefinedType:"STANDARD",Name:"Office Window",Description:"Double-pane office window",LoadBearing:!1,Area:3.6}}]},{data:{Class:"IfcDoor",PredefinedType:"SINGLE_SWING_RIGHT",Name:"Entrance Door",Description:"Main entrance door",LoadBearing:!1,Area:2.1}},{data:{Class:"IfcColumn",PredefinedType:"ROUND",Name:"Support Column",Description:"Load-bearing column in lobby",LoadBearing:!0,Area:1.2}},{data:{Class:"IfcSlab",PredefinedType:"FLOOR",Name:"Main Floor Slab",Description:"Primary floor slab for ground level",LoadBearing:!0,Area:150}}];const p=n.create(()=>a` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as c,C as n,T as d,a as s}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import{x as a}from"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";c.init();const o=document.createElement("bim-table");o.expanded=!0;o.data=[{data:{Class:"IfcWall",PredefinedType:"EXTERNAL",Name:"Exterior Wall",Description:"Main structural exterior wall",LoadBearing:!0,Area:45.5},children:[{data:{Class:"IfcWindow",PredefinedType:"STANDARD",Name:"Office Window",Description:"Double-pane office window",LoadBearing:!1,Area:3.6}}]},{data:{Class:"IfcDoor",PredefinedType:"SINGLE_SWING_RIGHT",Name:"Entrance Door",Description:"Main entrance door",LoadBearing:!1,Area:2.1}},{data:{Class:"IfcColumn",PredefinedType:"ROUND",Name:"Support Column",Description:"Load-bearing column in lobby",LoadBearing:!0,Area:1.2}},{data:{Class:"IfcSlab",PredefinedType:"FLOOR",Name:"Main Floor Slab",Description:"Primary floor slab for ground level",LoadBearing:!0,Area:150}}];const p=n.create(()=>a` {const t=e.target;t instanceof d&&(o.queryString=t.value)}} placeholder="Search..."> `),l=n.create(()=>a` diff --git a/examples/assets/grid.js b/examples/assets/grid.js index 2e133b30..34369981 100644 --- a/examples/assets/grid.js +++ b/examples/assets/grid.js @@ -1,4 +1,4 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as p,C as s}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import{T as g,x as b}from"./lit-html-paDGiEfB.js";import{a as h,i as D,t as T,n as y}from"./ref-CInB0H-f.js";/** +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as p,C as s}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import{T as g,x as b}from"./lit-html-paDGiEfB.js";import{a as h,i as D,t as T,n as y}from"./ref-CInB0H-f.js";/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause diff --git a/examples/assets/index-BazQpUSZ.js b/examples/assets/index-CCTT9UP1.js similarity index 99% rename from examples/assets/index-BazQpUSZ.js rename to examples/assets/index-CCTT9UP1.js index 445a87e7..f5f7a8e0 100644 --- a/examples/assets/index-BazQpUSZ.js +++ b/examples/assets/index-CCTT9UP1.js @@ -1,4 +1,4 @@ -import{F as M,m as C,a0 as _,H as te,s as be,l as v,p as $,x as Y,t as he,N as ne,Y as oe,X as ie,_ as ye,E as se,J as re,R as Ce,K as Ie,Q as we,U as Ne,Z as xe,u as Te,y as Ae,W as ae,P as z,v as j,i as R,w as Re,D as Ee,A as $e,k as U,G as Se,$ as q,q as ce,T as le,r as ue}from"./index-N2x2mgv3.js";import"./lit-html-paDGiEfB.js";const De=n=>{const{components:i,actions:t,tags:l}=n,a=(t==null?void 0:t.dispose)??!0,c=(t==null?void 0:t.download)??!0,s=(t==null?void 0:t.visibility)??!0,d=(l==null?void 0:l.schema)??!0,r=(l==null?void 0:l.viewDefinition)??!0,o=i.get(M),p=({detail:f})=>{const{cell:e}=f;e.style.padding="0.25rem 0"};return C` +import{F as M,m as C,a0 as _,H as te,s as be,l as v,p as $,x as Y,t as he,N as ne,Y as oe,X as ie,_ as ye,E as se,J as re,R as Ce,K as Ie,Q as we,U as Ne,Z as xe,u as Te,y as Ae,W as ae,P as z,v as j,i as R,w as Re,D as Ee,A as $e,k as U,G as Se,$ as q,q as ce,T as le,r as ue}from"./index-D2hR2zBN.js";import"./lit-html-paDGiEfB.js";const De=n=>{const{components:i,actions:t,tags:l}=n,a=(t==null?void 0:t.dispose)??!0,c=(t==null?void 0:t.download)??!0,s=(t==null?void 0:t.visibility)??!0,d=(l==null?void 0:l.schema)??!0,r=(l==null?void 0:l.viewDefinition)??!0,o=i.get(M),p=({detail:f})=>{const{cell:e}=f;e.style.padding="0.25rem 0"};return C` {if(!f)return;const e=f;e.hiddenColumns=["modelID"];const m=[];for(const[,h]of o.groups){if(!h)continue;const N={data:{Name:h.name||h.uuid,modelID:h.uuid}};m.push(N)}e.dataTransform={Name:(h,N)=>{const{modelID:w}=N;if(typeof w!="string")return h;const x=o.groups.get(w);if(!x)return w;const g={};for(const S of x.items)g[S.id]=S.ids;let b;const{schema:y}=x.ifcMetadata;d&&y&&(b=C` ${y} `);let I;if(r&&"viewDefinition"in x.ifcMetadata){const S=x.ifcMetadata.viewDefinition;I=C` diff --git a/examples/assets/index-DAXFTtA6.js b/examples/assets/index-Cc7BUWEv.js similarity index 90% rename from examples/assets/index-DAXFTtA6.js rename to examples/assets/index-Cc7BUWEv.js index 28b55643..70c9dc13 100644 --- a/examples/assets/index-DAXFTtA6.js +++ b/examples/assets/index-Cc7BUWEv.js @@ -1,4 +1,4 @@ -import{I as r,m as f,l as s}from"./index-N2x2mgv3.js";const m=t=>{const{components:n}=t,c=n.get(r);return f` +import{I as r,m as f,l as s}from"./index-D2hR2zBN.js";const m=t=>{const{components:n}=t,c=n.get(r);return f` t in e?Eue(e,t,{enumerable:!0,configu .caret svg { fill: var(--bim-ui_bg-contrast-60); } - `;let Ble=Ule;tfe([un({type:Boolean,attribute:"children-hidden",reflect:!0})],Ble.prototype,"childrenHidden");var nfe=Object.defineProperty,JF=(e,t,n,s)=>{for(var l=void 0,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=a(t,n,l)||l);return l&&nfe(t,n,l),l};const Hle=class extends fr{constructor(){super(...arguments),this.selected=!1,this.columns=[],this.hiddenColumns=[],this.data={},this.isHeader=!1,this.table=this.closest("bim-table"),this.onTableColumnsChange=()=>{this.table&&(this.columns=this.table.columns)},this.onTableColumnsHidden=()=>{this.table&&(this.hiddenColumns=this.table.hiddenColumns)},this._observer=new IntersectionObserver(t=>{this._intersecting=t[0].isIntersecting},{rootMargin:"36px"})}get _columnNames(){return this.columns.filter(t=>!this.hiddenColumns.includes(t.name)).map(t=>t.name)}get _columnWidths(){return this.columns.filter(t=>!this.hiddenColumns.includes(t.name)).map(t=>t.width)}get _isSelected(){var t;return(t=this.table)==null?void 0:t.selection.has(this.data)}onSelectionChange(t){if(!this.table)return;const n=t.target;this.selected=n.value,n.value?(this.table.selection.add(this.data),this.table.dispatchEvent(new CustomEvent("rowselected",{detail:{data:this.data}}))):(this.table.selection.delete(this.data),this.table.dispatchEvent(new CustomEvent("rowdeselected",{detail:{data:this.data}})))}connectedCallback(){super.connectedCallback(),this._observer.observe(this),this.table&&(this.columns=this.table.columns,this.hiddenColumns=this.table.hiddenColumns,this.table.addEventListener("columnschange",this.onTableColumnsChange),this.table.addEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",this._isSelected))}disconnectedCallback(){super.disconnectedCallback(),this._observer.unobserve(this),this.table&&(this.columns=[],this.hiddenColumns=[],this.table.removeEventListener("columnschange",this.onTableColumnsChange),this.table.removeEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",!1))}compute(){if(!this.table)throw new Error("TableRow: parent table wasn't found!");const t=this.table.getRowIndentation(this.data)??0,n=this.isHeader?this.data:this.table.applyDataTransform(this.data)??this.data,s=[];for(const l in n){if(this.hiddenColumns.includes(l))continue;const r=n[l];let a;if(typeof r=="string"||typeof r=="boolean"||typeof r=="number"?(a=document.createElement("bim-label"),a.textContent=String(r)):r instanceof HTMLElement?a=r:(a=document.createDocumentFragment(),CF(r,a)),!a)continue;const c=document.createElement("bim-table-cell");c.append(a),c.column=l,this._columnNames.indexOf(l)===0&&(c.style.marginLeft=`${this.table.noIndentation?0:t+.75}rem`);const h=this._columnNames.indexOf(l);c.setAttribute("data-column-index",String(h)),c.toggleAttribute("data-no-indentation",h===0&&this.table.noIndentation),c.toggleAttribute("data-cell-header",this.isHeader),c.rowData=this.data,this.table.dispatchEvent(new CustomEvent("cellcreated",{detail:{cell:c}})),s.push(c)}return this.style.gridTemplateAreas=`"${this.table.selectableRows?"Selection":""} ${this._columnNames.join(" ")}"`,this.style.gridTemplateColumns=`${this.table.selectableRows?"1.6rem":""} ${this._columnWidths.join(" ")}`,ls` - ${!this.isHeader&&this.table.selectableRows?ls`{for(var l=void 0,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=a(t,n,l)||l);return l&&nfe(t,n,l),l};const Hle=class extends fr{constructor(){super(...arguments),this.selected=!1,this.columns=[],this.hiddenColumns=[],this.data={},this.isHeader=!1,this.table=this.closest("bim-table"),this.onTableColumnsChange=()=>{this.table&&(this.columns=this.table.columns)},this.onTableColumnsHidden=()=>{this.table&&(this.hiddenColumns=this.table.hiddenColumns)},this._observer=new IntersectionObserver(t=>{this._intersecting=t[0].isIntersecting},{rootMargin:"36px"})}get _columnNames(){return this.columns.filter(t=>!this.hiddenColumns.includes(t.name)).map(t=>t.name)}get _columnWidths(){return this.columns.filter(t=>!this.hiddenColumns.includes(t.name)).map(t=>t.width)}get _isSelected(){var t;return(t=this.table)==null?void 0:t.selection.has(this.data)}onSelectionChange(t){if(!this.table)return;const n=t.target;this.selected=n.value,n.value?(this.table.selection.add(this.data),this.table.dispatchEvent(new CustomEvent("rowselected",{detail:{data:this.data}}))):(this.table.selection.delete(this.data),this.table.dispatchEvent(new CustomEvent("rowdeselected",{detail:{data:this.data}})))}connectedCallback(){super.connectedCallback(),this._observer.observe(this),this.table&&(this.columns=this.table.columns,this.hiddenColumns=this.table.hiddenColumns,this.table.addEventListener("columnschange",this.onTableColumnsChange),this.table.addEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",this._isSelected))}disconnectedCallback(){super.disconnectedCallback(),this._observer.unobserve(this),this.table&&(this.columns=[],this.hiddenColumns=[],this.table.removeEventListener("columnschange",this.onTableColumnsChange),this.table.removeEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",!1))}findAllCheckboxes(t,n=[]){return t&&(t.querySelectorAll("bim-checkbox").forEach(s=>{var l;const r=(l=s.shadowRoot)==null?void 0:l.querySelector('input[type="checkbox"]');r&&n.push(r)}),t.querySelectorAll("*").forEach(s=>{s.shadowRoot&&this.findAllCheckboxes(s.shadowRoot,n)})),n}toggleAll(t){if(!this.table)return;const n=this.findAllCheckboxes(this.table.shadowRoot);n.length!==0&&n.forEach(s=>{s.checked=t,s.dispatchEvent(new Event("change"))})}compute(){if(!this.table)throw new Error("TableRow: parent table wasn't found!");const t=this.table.getRowIndentation(this.data)??0,n=this.isHeader?this.data:this.table.applyDataTransform(this.data)??this.data,s=[];for(const l in n){if(this.hiddenColumns.includes(l))continue;const r=n[l];let a;if(typeof r=="string"||typeof r=="boolean"||typeof r=="number"?(a=document.createElement("bim-label"),a.textContent=String(r)):r instanceof HTMLElement?a=r:(a=document.createDocumentFragment(),CF(r,a)),!a)continue;const c=document.createElement("bim-table-cell");c.append(a),c.column=l,this._columnNames.indexOf(l)===0&&(c.style.marginLeft=`${this.table.noIndentation?0:t+.75}rem`);const h=this._columnNames.indexOf(l);c.setAttribute("data-column-index",String(h)),c.toggleAttribute("data-no-indentation",h===0&&this.table.noIndentation),c.toggleAttribute("data-cell-header",this.isHeader),c.rowData=this.data,this.table.dispatchEvent(new CustomEvent("cellcreated",{detail:{cell:c}})),s.push(c)}return this.style.gridTemplateAreas=`"${this.table.selectableRows?"Selection":""} ${this._columnNames.join(" ")}"`,this.style.gridTemplateColumns=`${this.table.selectableRows?"1.6rem":""} ${this._columnWidths.join(" ")}`,this.table.selectableRows=!0,this.isHeader&&this.toggleAll(!!this._isSelected),ls` + ${this.table.selectableRows?ls`this.maxRegenerateRetrys)throw new Error("Grid could not be regenerated");setTimeout(()=>this.regenerate,this._regenerateDelay);return}this._regenerateCounter=0,this._camera.updateMatrix(),this._camera.updateMatrixWorld();const e=this._frustumMat.multiplyMatrices(this._camera.projectionMatrix,this._camera.matrixWorldInverse);this._frustum.setFromProjectionMatrix(e);const{planes:i}=this._frustum,s=i[0].constant*-i[0].normal.x,r=i[1].constant*-i[1].normal.x,o=i[2].constant*-i[2].normal.y,k=i[3].constant*-i[3].normal.y,v=Math.abs(s-r),w=Math.abs(k-o),{clientWidth:Z,clientHeight:I}=this._container,U=Math.max(Z,I),M=Math.max(v,w)/U,q=Math.ceil(Math.log10(v/this.scaleX)),J=Math.ceil(Math.log10(w/this.scaleY)),p=10**(q-2)*this.scaleX,g=10**(J-2)*this.scaleY,d=p*this.gridsFactor,b=g*this.gridsFactor,K=Math.ceil(w/b),B=Math.ceil(v/d),Q=Math.ceil(w/g),tt=Math.ceil(v/p),et=p*Math.ceil(r/p),st=g*Math.ceil(o/g),R=d*Math.ceil(r/d),it=b*Math.ceil(o/b),rt=[...this.numbers.children];for(const a of rt)a.removeFromParent();this.numbers.children=[];const $=[],ot=9*M,u=1e4,F=R+this._offsetX,nt=Math.round(Math.abs(F/this.scaleX)*u)/u,at=(B-1)*d,ct=Math.round(Math.abs((F+at)/this.scaleX)*u)/u,lt=Math.max(nt,ct).toString().length*ot;let S=Math.ceil(lt/d)*d;for(let a=0;a.01)continue;const Y=this.newNumber((n+this._offsetX)/this.scaleX),mt=12*M;Y.position.set(n,o+mt,0)}for(let a=0;a{for(var s=Dt(t,e),r=l.length-1,o;r>=0;r--)(o=l[r])&&(s=o(t,e,s)||s);return s&&Yt(t,e,s),s};const L=class L extends E{constructor(){super(...arguments),this._grid=null,this._world=null,this.resize=()=>{this._world&&this._grid&&this._grid.regenerate()}}set gridColor(t){if(this._gridColor=t,!(t&&this._grid))return;const e=Number(t.replace("#","0x"));Number.isNaN(e)||this._grid.material.color.setHex(e)}get gridColor(){return this._gridColor}set gridScaleX(t){this._gridScaleX=t,t&&this._grid&&(this._grid.scaleX=t)}get gridScaleX(){return this._gridScaleX}set gridScaleY(t){this._gridScaleY=t,t&&this._grid&&(this._grid.scaleY=t)}get gridScaleY(){return this._gridScaleY}get gridOffsetX(){var t;return((t=this._grid)==null?void 0:t.offsetX)||0}set gridOffsetX(t){this._grid&&(this._grid.offsetX=t)}get gridOffsetY(){var t;return((t=this._grid)==null?void 0:t.offsetY)||0}set gridOffsetY(t){this._grid&&(this._grid.offsetY=t)}set components(t){this.dispose();const i=t.get(H).create();this._world=i,i.scene=new V(t),i.scene.setup(),i.renderer=new wt(t,this);const s=new W(t);i.camera=s;const r=new Ot(s.threeOrtho,this);this._grid=r,i.scene.three.add(r.get()),s.controls.addEventListener("update",()=>r.regenerate()),setTimeout(async()=>{i.camera.updateAspect(),s.set("Plan"),await s.controls.setLookAt(0,0,100,0,0,0),await s.projection.set("Orthographic"),s.controls.dollySpeed=3,s.controls.draggingSmoothTime=.085,s.controls.maxZoom=1e3,s.controls.zoom(4)})}get world(){return this._world}dispose(){var t;(t=this.world)==null||t.dispose(),this._world=null,this._grid=null}connectedCallback(){super.connectedCallback(),new ResizeObserver(this.resize).observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.dispose()}render(){return P``}};L.styles=T` +import{c as pt,V as gt,d as z,M as C,e as j,f as bt,L as _t,B as A,g as xt,h as vt,W as H,S as V,j as wt,O as W,i as yt,G as Ct,k as kt,T as D}from"./index-D2hR2zBN.js";import{r as E,i as T,n as c,a as Mt}from"./state-DYefyXr3.js";import{x as P}from"./lit-html-paDGiEfB.js";import{e as $t,n as St}from"./ref-CInB0H-f.js";class Xt extends pt{constructor(t=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=t,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new gt(.5,.5),this.addEventListener("removed",function(){this.traverse(function(e){e.element instanceof Element&&e.element.parentNode!==null&&e.element.parentNode.removeChild(e.element)})})}copy(t,e){return super.copy(t,e),this.element=t.element.cloneNode(!0),this.center=t.center,this}}new z;new C;new C;new z;new z;class Ot{constructor(t,e){this._group=new j,this._frustum=new bt,this._frustumMat=new C,this._regenerateDelay=200,this._regenerateCounter=0,this.material=new _t({color:"#2e3338"}),this.numbers=new j,this.maxRegenerateRetrys=4,this.gridsFactor=5,this._scaleX=1,this._scaleY=1,this._offsetX=0,this._offsetY=0,this._camera=t,this._container=e;const i=this.newGrid(-1),s=this.newGrid(-2);this.grids={main:i,secondary:s},this._group.add(s,i,this.numbers)}set scaleX(t){this._scaleX=t,this.regenerate()}get scaleX(){return this._scaleX}set scaleY(t){this._scaleY=t,this.regenerate()}get scaleY(){return this._scaleY}set offsetX(t){this._offsetX=t,this.regenerate()}get offsetX(){return this._offsetX}set offsetY(t){this._offsetY=t,this.regenerate()}get offsetY(){return this._offsetY}get(){return this._group}dispose(){const{main:t,secondary:e}=this.grids;t.removeFromParent(),e.removeFromParent(),t.geometry.dispose(),t.material.dispose(),e.geometry.dispose(),e.material.dispose()}regenerate(){if(!this.isGridReady()){if(this._regenerateCounter++,this._regenerateCounter>this.maxRegenerateRetrys)throw new Error("Grid could not be regenerated");setTimeout(()=>this.regenerate,this._regenerateDelay);return}this._regenerateCounter=0,this._camera.updateMatrix(),this._camera.updateMatrixWorld();const e=this._frustumMat.multiplyMatrices(this._camera.projectionMatrix,this._camera.matrixWorldInverse);this._frustum.setFromProjectionMatrix(e);const{planes:i}=this._frustum,s=i[0].constant*-i[0].normal.x,r=i[1].constant*-i[1].normal.x,o=i[2].constant*-i[2].normal.y,k=i[3].constant*-i[3].normal.y,v=Math.abs(s-r),w=Math.abs(k-o),{clientWidth:Z,clientHeight:I}=this._container,U=Math.max(Z,I),M=Math.max(v,w)/U,q=Math.ceil(Math.log10(v/this.scaleX)),J=Math.ceil(Math.log10(w/this.scaleY)),p=10**(q-2)*this.scaleX,g=10**(J-2)*this.scaleY,d=p*this.gridsFactor,b=g*this.gridsFactor,K=Math.ceil(w/b),B=Math.ceil(v/d),Q=Math.ceil(w/g),tt=Math.ceil(v/p),et=p*Math.ceil(r/p),st=g*Math.ceil(o/g),R=d*Math.ceil(r/d),it=b*Math.ceil(o/b),rt=[...this.numbers.children];for(const a of rt)a.removeFromParent();this.numbers.children=[];const $=[],ot=9*M,u=1e4,F=R+this._offsetX,nt=Math.round(Math.abs(F/this.scaleX)*u)/u,at=(B-1)*d,ct=Math.round(Math.abs((F+at)/this.scaleX)*u)/u,lt=Math.max(nt,ct).toString().length*ot;let S=Math.ceil(lt/d)*d;for(let a=0;a.01)continue;const Y=this.newNumber((n+this._offsetX)/this.scaleX),mt=12*M;Y.position.set(n,o+mt,0)}for(let a=0;a{for(var s=Dt(t,e),r=l.length-1,o;r>=0;r--)(o=l[r])&&(s=o(t,e,s)||s);return s&&Yt(t,e,s),s};const L=class L extends E{constructor(){super(...arguments),this._grid=null,this._world=null,this.resize=()=>{this._world&&this._grid&&this._grid.regenerate()}}set gridColor(t){if(this._gridColor=t,!(t&&this._grid))return;const e=Number(t.replace("#","0x"));Number.isNaN(e)||this._grid.material.color.setHex(e)}get gridColor(){return this._gridColor}set gridScaleX(t){this._gridScaleX=t,t&&this._grid&&(this._grid.scaleX=t)}get gridScaleX(){return this._gridScaleX}set gridScaleY(t){this._gridScaleY=t,t&&this._grid&&(this._grid.scaleY=t)}get gridScaleY(){return this._gridScaleY}get gridOffsetX(){var t;return((t=this._grid)==null?void 0:t.offsetX)||0}set gridOffsetX(t){this._grid&&(this._grid.offsetX=t)}get gridOffsetY(){var t;return((t=this._grid)==null?void 0:t.offsetY)||0}set gridOffsetY(t){this._grid&&(this._grid.offsetY=t)}set components(t){this.dispose();const i=t.get(H).create();this._world=i,i.scene=new V(t),i.scene.setup(),i.renderer=new wt(t,this);const s=new W(t);i.camera=s;const r=new Ot(s.threeOrtho,this);this._grid=r,i.scene.three.add(r.get()),s.controls.addEventListener("update",()=>r.regenerate()),setTimeout(async()=>{i.camera.updateAspect(),s.set("Plan"),await s.controls.setLookAt(0,0,100,0,0,0),await s.projection.set("Orthographic"),s.controls.dollySpeed=3,s.controls.draggingSmoothTime=.085,s.controls.maxZoom=1e3,s.controls.zoom(4)})}get world(){return this._world}dispose(){var t;(t=this.world)==null||t.dispose(),this._world=null,this._grid=null}connectedCallback(){super.connectedCallback(),new ResizeObserver(this.resize).observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.dispose()}render(){return P``}};L.styles=T` :host { position: relative; display: flex; diff --git a/examples/assets/index-CcrzIsUO.js b/examples/assets/index-DyXslpcX.js similarity index 98% rename from examples/assets/index-CcrzIsUO.js rename to examples/assets/index-DyXslpcX.js index 14bf7282..e7129a8d 100644 --- a/examples/assets/index-CcrzIsUO.js +++ b/examples/assets/index-DyXslpcX.js @@ -1302,8 +1302,8 @@ var qn=Object.defineProperty;var Wn=(i,t,e)=>t in i?qn(i,t,{enumerable:!0,config .caret svg { fill: var(--bim-ui_bg-contrast-60); } - `;let me=mi;no([u({type:Boolean,attribute:"children-hidden",reflect:!0})],me.prototype,"childrenHidden");var so=Object.defineProperty,jt=(i,t,e,s)=>{for(var n=void 0,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=o(t,e,n)||n);return n&&so(t,e,n),n};const bi=class bi extends ${constructor(){super(...arguments),this.selected=!1,this.columns=[],this.hiddenColumns=[],this.data={},this.isHeader=!1,this.table=this.closest("bim-table"),this.onTableColumnsChange=()=>{this.table&&(this.columns=this.table.columns)},this.onTableColumnsHidden=()=>{this.table&&(this.hiddenColumns=this.table.hiddenColumns)},this._observer=new IntersectionObserver(t=>{this._intersecting=t[0].isIntersecting},{rootMargin:"36px"})}get _columnNames(){return this.columns.filter(s=>!this.hiddenColumns.includes(s.name)).map(s=>s.name)}get _columnWidths(){return this.columns.filter(s=>!this.hiddenColumns.includes(s.name)).map(s=>s.width)}get _isSelected(){var t;return(t=this.table)==null?void 0:t.selection.has(this.data)}onSelectionChange(t){if(!this.table)return;const e=t.target;this.selected=e.value,e.value?(this.table.selection.add(this.data),this.table.dispatchEvent(new CustomEvent("rowselected",{detail:{data:this.data}}))):(this.table.selection.delete(this.data),this.table.dispatchEvent(new CustomEvent("rowdeselected",{detail:{data:this.data}})))}connectedCallback(){super.connectedCallback(),this._observer.observe(this),this.table&&(this.columns=this.table.columns,this.hiddenColumns=this.table.hiddenColumns,this.table.addEventListener("columnschange",this.onTableColumnsChange),this.table.addEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",this._isSelected))}disconnectedCallback(){super.disconnectedCallback(),this._observer.unobserve(this),this.table&&(this.columns=[],this.hiddenColumns=[],this.table.removeEventListener("columnschange",this.onTableColumnsChange),this.table.removeEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",!1))}compute(){if(!this.table)throw new Error("TableRow: parent table wasn't found!");const t=this.table.getRowIndentation(this.data)??0,e=this.isHeader?this.data:this.table.applyDataTransform(this.data)??this.data,s=[];for(const n in e){if(this.hiddenColumns.includes(n))continue;const r=e[n];let o;if(typeof r=="string"||typeof r=="boolean"||typeof r=="number"?(o=document.createElement("bim-label"),o.textContent=String(r)):r instanceof HTMLElement?o=r:(o=document.createDocumentFragment(),Ht(r,o)),!o)continue;const l=document.createElement("bim-table-cell");l.append(o),l.column=n,this._columnNames.indexOf(n)===0&&(l.style.marginLeft=`${this.table.noIndentation?0:t+.75}rem`);const a=this._columnNames.indexOf(n);l.setAttribute("data-column-index",String(a)),l.toggleAttribute("data-no-indentation",a===0&&this.table.noIndentation),l.toggleAttribute("data-cell-header",this.isHeader),l.rowData=this.data,this.table.dispatchEvent(new CustomEvent("cellcreated",{detail:{cell:l}})),s.push(l)}return this.style.gridTemplateAreas=`"${this.table.selectableRows?"Selection":""} ${this._columnNames.join(" ")}"`,this.style.gridTemplateColumns=`${this.table.selectableRows?"1.6rem":""} ${this._columnWidths.join(" ")}`,p` - ${!this.isHeader&&this.table.selectableRows?p`{for(var n=void 0,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=o(t,e,n)||n);return n&&so(t,e,n),n};const bi=class bi extends ${constructor(){super(...arguments),this.selected=!1,this.columns=[],this.hiddenColumns=[],this.data={},this.isHeader=!1,this.table=this.closest("bim-table"),this.onTableColumnsChange=()=>{this.table&&(this.columns=this.table.columns)},this.onTableColumnsHidden=()=>{this.table&&(this.hiddenColumns=this.table.hiddenColumns)},this._observer=new IntersectionObserver(t=>{this._intersecting=t[0].isIntersecting},{rootMargin:"36px"})}get _columnNames(){return this.columns.filter(s=>!this.hiddenColumns.includes(s.name)).map(s=>s.name)}get _columnWidths(){return this.columns.filter(s=>!this.hiddenColumns.includes(s.name)).map(s=>s.width)}get _isSelected(){var t;return(t=this.table)==null?void 0:t.selection.has(this.data)}onSelectionChange(t){if(!this.table)return;const e=t.target;this.selected=e.value,e.value?(this.table.selection.add(this.data),this.table.dispatchEvent(new CustomEvent("rowselected",{detail:{data:this.data}}))):(this.table.selection.delete(this.data),this.table.dispatchEvent(new CustomEvent("rowdeselected",{detail:{data:this.data}})))}connectedCallback(){super.connectedCallback(),this._observer.observe(this),this.table&&(this.columns=this.table.columns,this.hiddenColumns=this.table.hiddenColumns,this.table.addEventListener("columnschange",this.onTableColumnsChange),this.table.addEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",this._isSelected))}disconnectedCallback(){super.disconnectedCallback(),this._observer.unobserve(this),this.table&&(this.columns=[],this.hiddenColumns=[],this.table.removeEventListener("columnschange",this.onTableColumnsChange),this.table.removeEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",!1))}findAllCheckboxes(t,e=[]){return t&&(t.querySelectorAll("bim-checkbox").forEach(n=>{var o;const r=(o=n.shadowRoot)==null?void 0:o.querySelector('input[type="checkbox"]');r&&e.push(r)}),t.querySelectorAll("*").forEach(n=>{n.shadowRoot&&this.findAllCheckboxes(n.shadowRoot,e)})),e}toggleAll(t){if(!this.table)return;const e=this.findAllCheckboxes(this.table.shadowRoot);e.length!==0&&e.forEach(s=>{s.checked=t,s.dispatchEvent(new Event("change"))})}compute(){if(!this.table)throw new Error("TableRow: parent table wasn't found!");const t=this.table.getRowIndentation(this.data)??0,e=this.isHeader?this.data:this.table.applyDataTransform(this.data)??this.data,s=[];for(const n in e){if(this.hiddenColumns.includes(n))continue;const r=e[n];let o;if(typeof r=="string"||typeof r=="boolean"||typeof r=="number"?(o=document.createElement("bim-label"),o.textContent=String(r)):r instanceof HTMLElement?o=r:(o=document.createDocumentFragment(),Ht(r,o)),!o)continue;const l=document.createElement("bim-table-cell");l.append(o),l.column=n,this._columnNames.indexOf(n)===0&&(l.style.marginLeft=`${this.table.noIndentation?0:t+.75}rem`);const a=this._columnNames.indexOf(n);l.setAttribute("data-column-index",String(a)),l.toggleAttribute("data-no-indentation",a===0&&this.table.noIndentation),l.toggleAttribute("data-cell-header",this.isHeader),l.rowData=this.data,this.table.dispatchEvent(new CustomEvent("cellcreated",{detail:{cell:l}})),s.push(l)}return this.style.gridTemplateAreas=`"${this.table.selectableRows?"Selection":""} ${this._columnNames.join(" ")}"`,this.style.gridTemplateColumns=`${this.table.selectableRows?"1.6rem":""} ${this._columnWidths.join(" ")}`,this.table.selectableRows=!0,this.isHeader&&this.toggleAll(!!this._isSelected),p` + ${this.table.selectableRows?p`a` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as n,C as e}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import{x as a}from"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";n.init();const t=document.createElement("bim-table"),r=e.create(()=>a` diff --git a/examples/assets/modelsList.js b/examples/assets/modelsList.js index 6391cacc..7ade02ac 100644 --- a/examples/assets/modelsList.js +++ b/examples/assets/modelsList.js @@ -1,4 +1,4 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{T as m,C as c,W as l,S as d,a as p,b,G as f,I as g,F as w,l as u,m as L}from"./index-N2x2mgv3.js";import{b as C}from"./index-DAXFTtA6.js";import{t as v}from"./index-BazQpUSZ.js";import"./lit-html-paDGiEfB.js";m.init();const e=new c,I=e.get(l),n=I.create(),s=new d(e);s.setup();n.scene=s;const a=document.createElement("bim-viewport"),r=new p(e,a);n.renderer=r;const i=new b(e);n.camera=i;a.addEventListener("resize",()=>{r.resize(),i.updateAspect()});const S=e.get(f);S.create(n);e.init();const F=e.get(g);await F.setup();const M=e.get(w);M.onFragmentsLoaded.add(t=>{n.scene&&n.scene.three.add(t)});const[y]=v.modelsList({components:e,tags:{schema:!0,viewDefinition:!1},actions:{download:!1}}),E=u.create(()=>{const[t]=C.loadIfc({components:e});return L` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{T as m,C as c,W as l,S as d,a as p,b,G as f,I as g,F as w,l as u,m as L}from"./index-D2hR2zBN.js";import{b as C}from"./index-Cc7BUWEv.js";import{t as v}from"./index-CCTT9UP1.js";import"./lit-html-paDGiEfB.js";m.init();const e=new c,I=e.get(l),n=I.create(),s=new d(e);s.setup();n.scene=s;const a=document.createElement("bim-viewport"),r=new p(e,a);n.renderer=r;const i=new b(e);n.camera=i;a.addEventListener("resize",()=>{r.resize(),i.updateAspect()});const S=e.get(f);S.create(n);e.init();const F=e.get(g);await F.setup();const M=e.get(w);M.onFragmentsLoaded.add(t=>{n.scene&&n.scene.three.add(t)});const[y]=v.modelsList({components:e,tags:{schema:!0,viewDefinition:!1},actions:{download:!1}}),E=u.create(()=>{const[t]=C.loadIfc({components:e});return L` ${t} diff --git a/examples/assets/numberInput.js b/examples/assets/numberInput.js index 74b4fb02..15ba84de 100644 --- a/examples/assets/numberInput.js +++ b/examples/assets/numberInput.js @@ -1 +1 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as t}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";t.init();const e=document.body.querySelector("bim-number-input");e.addEventListener("change",()=>{const o=e.value;console.log("Value is:",o)}); +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as t}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";t.init();const e=document.body.querySelector("bim-number-input");e.addEventListener("change",()=>{const o=e.value;console.log("Value is:",o)}); diff --git a/examples/assets/panel.js b/examples/assets/panel.js index 02d7e0b2..a3b6c1b2 100644 --- a/examples/assets/panel.js +++ b/examples/assets/panel.js @@ -1 +1 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as o}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";o.init();const r=document.getElementById("activation-buttons"),a=document.body.querySelector("bim-panel[name='panelA']"),c=document.getElementById("log-vector");c.addEventListener("click",()=>{alert(`Your vector is: ${JSON.stringify(a.value)}`)});const i=document.querySelectorAll("bim-panel");for(const t of i){const{activationButton:e}=t;e.labelHidden=!0,r.append(e)}const n=document.body.querySelector("bim-panel[name='panelB']");n.valueTransform={date:t=>t.trim()===""?t:new Date(t)};console.log(n); +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as o}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";o.init();const r=document.getElementById("activation-buttons"),a=document.body.querySelector("bim-panel[name='panelA']"),c=document.getElementById("log-vector");c.addEventListener("click",()=>{alert(`Your vector is: ${JSON.stringify(a.value)}`)});const i=document.querySelectorAll("bim-panel");for(const t of i){const{activationButton:e}=t;e.labelHidden=!0,r.append(e)}const n=document.body.querySelector("bim-panel[name='panelB']");n.valueTransform={date:t=>t.trim()===""?t:new Date(t)};console.log(n); diff --git a/examples/assets/relationsTree.js b/examples/assets/relationsTree.js index 363b1bcb..43e74064 100644 --- a/examples/assets/relationsTree.js +++ b/examples/assets/relationsTree.js @@ -1,4 +1,4 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{T as u,C as g,W as b,S as f,a as w,b as S,G as h,I as v,u as I,F as T,p as y,l as C,m as L}from"./index-N2x2mgv3.js";import{b as F}from"./index-DAXFTtA6.js";import{t as x}from"./index-BazQpUSZ.js";import"./lit-html-paDGiEfB.js";u.init();const e=new g,z=e.get(b),t=z.create(),o=new f(e);o.setup();t.scene=o;const r=document.createElement("bim-viewport"),s=new w(e,r);t.renderer=s;const i=new S(e);t.camera=i;r.addEventListener("resize",()=>{s.resize(),i.updateAspect()});const E=e.get(h);E.create(t);e.init();const G=e.get(v);await G.setup();const c=e.get(I);c.setup({world:t});c.zoomToSelection=!0;const p=e.get(T);p.onFragmentsLoaded.add(async n=>{t.scene&&t.scene.three.add(n)});const M=e.get(y);p.onFragmentsLoaded.add(async n=>{n.hasProperties&&await M.process(n)});const[a]=x.relationsTree({components:e,models:[]});a.preserveStructureOnFilter=!0;const R=C.create(()=>{const[n]=F.loadIfc({components:e});return L` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{T as u,C as g,W as b,S as f,a as w,b as S,G as h,I as v,u as I,F as T,p as y,l as C,m as L}from"./index-D2hR2zBN.js";import{b as F}from"./index-Cc7BUWEv.js";import{t as x}from"./index-CCTT9UP1.js";import"./lit-html-paDGiEfB.js";u.init();const e=new g,z=e.get(b),t=z.create(),o=new f(e);o.setup();t.scene=o;const r=document.createElement("bim-viewport"),s=new w(e,r);t.renderer=s;const i=new S(e);t.camera=i;r.addEventListener("resize",()=>{s.resize(),i.updateAspect()});const E=e.get(h);E.create(t);e.init();const G=e.get(v);await G.setup();const c=e.get(I);c.setup({world:t});c.zoomToSelection=!0;const p=e.get(T);p.onFragmentsLoaded.add(async n=>{t.scene&&t.scene.three.add(n)});const M=e.get(y);p.onFragmentsLoaded.add(async n=>{n.hasProperties&&await M.process(n)});const[a]=x.relationsTree({components:e,models:[]});a.preserveStructureOnFilter=!0;const R=C.create(()=>{const[n]=F.loadIfc({components:e});return L` ${n} diff --git a/examples/assets/searching.js b/examples/assets/searching.js index 97dd3405..9537e013 100644 --- a/examples/assets/searching.js +++ b/examples/assets/searching.js @@ -1,4 +1,4 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as s,C as t,T as l,a as c}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import{x as n}from"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";s.init();const a=t.create(()=>n` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as s,C as t,T as l,a as c}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import{x as n}from"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";s.init();const a=t.create(()=>n`
No data to display! diff --git a/examples/assets/selector.js b/examples/assets/selector.js index d9bfd468..3b5fc713 100644 --- a/examples/assets/selector.js +++ b/examples/assets/selector.js @@ -1 +1 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as e}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";e.init();const t=document.body.querySelector("bim-selector"),r=t.querySelector("bim-option[label='Custom']"),i={data:"Hi!"};r.value=i;t.addEventListener("change",()=>{const o=t.value;alert(`Your new camera projection is: ${JSON.stringify(o)}.`)}); +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as e}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";e.init();const t=document.body.querySelector("bim-selector"),r=t.querySelector("bim-option[label='Custom']"),i={data:"Hi!"};r.value=i;t.addEventListener("change",()=>{const o=t.value;alert(`Your new camera projection is: ${JSON.stringify(o)}.`)}); diff --git a/examples/assets/table.js b/examples/assets/table.js index b4acb28c..b36bff86 100644 --- a/examples/assets/table.js +++ b/examples/assets/table.js @@ -1,4 +1,4 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as u,C as o,B as c}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import{x as i}from"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";u.init();const e=document.createElement("bim-table");e.data=[{data:{Name:"Juan Hoyos",Age:28,Job:"BIM Software Developer",Company:"That Open Company",Bio:"Juan is a very cool guy, writing this tutorial so you know how to use a really powerful table in your projects."}},{data:{Name:"Ana Garcia",Age:32,Job:"Structural Engineer",Company:"Skyline Structures",Bio:"Ana is a meticulous engineer with a knack for ensuring that every project is structurally sound."}},{data:{Name:"Carlos Fernandez",Age:40,Job:"Project Manager",Company:"BuildSmart Ltd.",Bio:"Carlos coordinates projects from start to finish, making sure everything is on track and on budget."}},{data:{Name:"Elena Rios",Age:26,Job:"Architect",Company:"EcoDesign Studio",Bio:"Elena is a creative architect focused on sustainable designs that blend functionality and beauty."}},{data:{Name:"Diego Martinez",Age:35,Job:"Quantity Surveyor",Company:"CostControl Solutions",Bio:"Diego provides accurate cost estimates, helping projects stay within financial boundaries."}}];const a={data:{Name:"Sophia Wang",Age:29,Job:"MEP Engineer",Company:"FutureFlow Systems",Bio:"Sophia designs efficient mechanical, electrical, and plumbing systems for complex buildings."}};e.data.push(a);e.requestUpdate();const m=o.create(()=>i` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as u,C as o,B as c}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import{x as i}from"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";u.init();const e=document.createElement("bim-table");e.data=[{data:{Name:"Juan Hoyos",Age:28,Job:"BIM Software Developer",Company:"That Open Company",Bio:"Juan is a very cool guy, writing this tutorial so you know how to use a really powerful table in your projects."}},{data:{Name:"Ana Garcia",Age:32,Job:"Structural Engineer",Company:"Skyline Structures",Bio:"Ana is a meticulous engineer with a knack for ensuring that every project is structurally sound."}},{data:{Name:"Carlos Fernandez",Age:40,Job:"Project Manager",Company:"BuildSmart Ltd.",Bio:"Carlos coordinates projects from start to finish, making sure everything is on track and on budget."}},{data:{Name:"Elena Rios",Age:26,Job:"Architect",Company:"EcoDesign Studio",Bio:"Elena is a creative architect focused on sustainable designs that blend functionality and beauty."}},{data:{Name:"Diego Martinez",Age:35,Job:"Quantity Surveyor",Company:"CostControl Solutions",Bio:"Diego provides accurate cost estimates, helping projects stay within financial boundaries."}}];const a={data:{Name:"Sophia Wang",Age:29,Job:"MEP Engineer",Company:"FutureFlow Systems",Bio:"Sophia designs efficient mechanical, electrical, and plumbing systems for complex buildings."}};e.data.push(a);e.requestUpdate();const m=o.create(()=>i` {if(typeof a.data.Bio!="string")return;const t=prompt(`Enter a new Bio for ${a.data.Name}:`,a.data.Bio);t&&t.trim()!==""&&(a.data.Bio=t,e.requestUpdate())}} label="Change ${a.data.Name} Bio"> `),p=o.create(()=>i` {const n=t.target;if(!(n instanceof c))return;const l=e.data.filter(d=>d.data.Name!=="Elena Rios");e.data=l,n.disabled=!0}} label="Delete Elena Rios Record"> diff --git a/examples/assets/tabs.js b/examples/assets/tabs.js index 205a3c47..78f5a488 100644 --- a/examples/assets/tabs.js +++ b/examples/assets/tabs.js @@ -1 +1 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as i}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";i.init(); +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as i}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";i.init(); diff --git a/examples/assets/textInput.js b/examples/assets/textInput.js index 4c9de4ab..02701bc9 100644 --- a/examples/assets/textInput.js +++ b/examples/assets/textInput.js @@ -1 +1 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as e}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";e.init();const t=document.querySelector("bim-text-input[name='name']");t.addEventListener("input",()=>{console.log(t.value)}); +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as e}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";e.init();const t=document.querySelector("bim-text-input[name='name']");t.addEventListener("input",()=>{console.log(t.value)}); diff --git a/examples/assets/toolbar.js b/examples/assets/toolbar.js index 205a3c47..78f5a488 100644 --- a/examples/assets/toolbar.js +++ b/examples/assets/toolbar.js @@ -1 +1 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as i}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";i.init(); +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as i}from"./index-DyXslpcX.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";i.init(); diff --git a/examples/assets/topicForm.js b/examples/assets/topicForm.js index a263ac80..a05bcf4c 100644 --- a/examples/assets/topicForm.js +++ b/examples/assets/topicForm.js @@ -1,4 +1,4 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{q as R,z as s,T as g,m as r,a0 as I,a1 as H,l as M,C as N}from"./index-N2x2mgv3.js";import"./lit-html-paDGiEfB.js";import{e as B}from"./ref-CInB0H-f.js";const U={dueDate:t=>{if(typeof t=="string"&&t.trim()!=="")return new Date(t)},status:t=>{if(Array.isArray(t)&&t.length!==0)return t[0]},type:t=>{if(Array.isArray(t)&&t.length!==0)return t[0]},priority:t=>{if(Array.isArray(t)&&t.length!==0)return t[0]},stage:t=>{if(Array.isArray(t)&&t.length!==0)return t[0]},assignedTo:t=>{if(Array.isArray(t)&&t.length!==0)return t[0]},labels:t=>{if(Array.isArray(t))return new Set(t)}},E=t=>{const{components:$,topic:e,value:n,onCancel:C,onSubmit:_,styles:d}=t,w=_??(()=>{}),a=$.get(R),j=(n==null?void 0:n.title)??(e==null?void 0:e.title)??s.default.title,m=(n==null?void 0:n.status)??(e==null?void 0:e.status)??s.default.status,p=(n==null?void 0:n.type)??(e==null?void 0:e.type)??s.default.type,b=(n==null?void 0:n.priority)??(e==null?void 0:e.priority)??s.default.priority,u=(n==null?void 0:n.assignedTo)??(e==null?void 0:e.assignedTo)??s.default.assignedTo,c=(n==null?void 0:n.labels)??(e==null?void 0:e.labels)??s.default.labels,f=(n==null?void 0:n.stage)??(e==null?void 0:e.stage)??s.default.stage,q=(n==null?void 0:n.description)??(e==null?void 0:e.description)??s.default.description,L=e!=null&&e.dueDate?e.dueDate.toISOString().split("T")[0]:null,T=new Set([...a.config.statuses]);m&&T.add(m);const S=new Set([...a.config.types]);p&&S.add(p);const x=new Set([...a.config.priorities]);b&&x.add(b);const h=new Set([...a.config.users]);u&&h.add(u);const A=new Set([...a.config.labels]);if(c)for(const i of c)A.add(i);const D=new Set([...a.config.stages]);f&&D.add(f);const v=B(),O=async()=>{const{value:i}=v;if(!i)return;const o=H(i,U);if(e)e.set(o),await w(e);else{const l=a.create(o);await w(l)}},k=B(),z=i=>{const{value:o}=k;if(!o)return;const l=i.target;o.disabled=l.value.trim()===""},F=`btn-${g.newRandomId()}`,y=`btn-${g.newRandomId()}`;return r` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{q as R,z as s,T as g,m as r,a0 as I,a1 as H,l as M,C as N}from"./index-D2hR2zBN.js";import"./lit-html-paDGiEfB.js";import{e as B}from"./ref-CInB0H-f.js";const U={dueDate:t=>{if(typeof t=="string"&&t.trim()!=="")return new Date(t)},status:t=>{if(Array.isArray(t)&&t.length!==0)return t[0]},type:t=>{if(Array.isArray(t)&&t.length!==0)return t[0]},priority:t=>{if(Array.isArray(t)&&t.length!==0)return t[0]},stage:t=>{if(Array.isArray(t)&&t.length!==0)return t[0]},assignedTo:t=>{if(Array.isArray(t)&&t.length!==0)return t[0]},labels:t=>{if(Array.isArray(t))return new Set(t)}},E=t=>{const{components:$,topic:e,value:n,onCancel:C,onSubmit:_,styles:d}=t,w=_??(()=>{}),a=$.get(R),j=(n==null?void 0:n.title)??(e==null?void 0:e.title)??s.default.title,m=(n==null?void 0:n.status)??(e==null?void 0:e.status)??s.default.status,p=(n==null?void 0:n.type)??(e==null?void 0:e.type)??s.default.type,b=(n==null?void 0:n.priority)??(e==null?void 0:e.priority)??s.default.priority,u=(n==null?void 0:n.assignedTo)??(e==null?void 0:e.assignedTo)??s.default.assignedTo,c=(n==null?void 0:n.labels)??(e==null?void 0:e.labels)??s.default.labels,f=(n==null?void 0:n.stage)??(e==null?void 0:e.stage)??s.default.stage,q=(n==null?void 0:n.description)??(e==null?void 0:e.description)??s.default.description,L=e!=null&&e.dueDate?e.dueDate.toISOString().split("T")[0]:null,T=new Set([...a.config.statuses]);m&&T.add(m);const S=new Set([...a.config.types]);p&&S.add(p);const x=new Set([...a.config.priorities]);b&&x.add(b);const h=new Set([...a.config.users]);u&&h.add(u);const A=new Set([...a.config.labels]);if(c)for(const i of c)A.add(i);const D=new Set([...a.config.stages]);f&&D.add(f);const v=B(),O=async()=>{const{value:i}=v;if(!i)return;const o=H(i,U);if(e)e.set(o),await w(e);else{const l=a.create(o);await w(l)}},k=B(),z=i=>{const{value:o}=k;if(!o)return;const l=i.target;o.disabled=l.value.trim()===""},F=`btn-${g.newRandomId()}`,y=`btn-${g.newRandomId()}`;return r`
diff --git a/examples/assets/topicsList.js b/examples/assets/topicsList.js index 4d11f008..de96485e 100644 --- a/examples/assets/topicsList.js +++ b/examples/assets/topicsList.js @@ -1,4 +1,4 @@ -import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as zi,d as Tn,W as Xe,S as On,j as pa,O as ss,i as M,G as In,k as be,F as qt,p as mt,q as Je,r as Di,e as io,f as ma,L as ba,B as no,g as fa,h as ga,I as rs,H as as,s as va,t as ya,u as _a,P as pi,v as Se,w as wa,D as $a,A as xa,c as Ca,V as Aa,x as $i,y as Ea,z as _t,R as Sa,E as ls,J as cs,K as ka,N as ds,Q as Ta,U as Oa,X as us,Y as hs,Z as Ia,_ as Na,T as Pa,C as Ma,a as Ra,b as La,l as Qe,m as ut}from"./index-N2x2mgv3.js";var ja=Object.defineProperty,za=(e,t,i)=>t in e?ja(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Rt=(e,t,i)=>(za(e,typeof t!="symbol"?t+"":t,i),i);const oe=Math.min,ft=Math.max,xi=Math.round,At=e=>({x:e,y:e}),Da={left:"right",right:"left",bottom:"top",top:"bottom"},Fa={start:"end",end:"start"};function oo(e,t,i){return ft(e,oe(t,i))}function Ze(e,t){return typeof e=="function"?e(t):e}function gt(e){return e.split("-")[0]}function Fi(e){return e.split("-")[1]}function ps(e){return e==="x"?"y":"x"}function ms(e){return e==="y"?"height":"width"}function Ut(e){return["top","bottom"].includes(gt(e))?"y":"x"}function bs(e){return ps(Ut(e))}function Ha(e,t,i){i===void 0&&(i=!1);const n=Fi(e),o=bs(e),s=ms(o);let r=o==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Ci(r)),[r,Ci(r)]}function Ba(e){const t=Ci(e);return[hn(e),t,hn(t)]}function hn(e){return e.replace(/start|end/g,t=>Fa[t])}function Ua(e,t,i){const n=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return i?t?o:n:t?n:o;case"left":case"right":return t?s:r;default:return[]}}function Va(e,t,i,n){const o=Fi(e);let s=Ua(gt(e),i==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(hn)))),s}function Ci(e){return e.replace(/left|right|bottom|top/g,t=>Da[t])}function Wa(e){return{top:0,right:0,bottom:0,left:0,...e}}function fs(e){return typeof e!="number"?Wa(e):{top:e,right:e,bottom:e,left:e}}function se(e){const{x:t,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:t,right:t+n,bottom:i+o,x:t,y:i}}function so(e,t,i){let{reference:n,floating:o}=e;const s=Ut(t),r=bs(t),l=ms(r),a=gt(t),d=s==="y",u=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2,h=n[l]/2-o[l]/2;let p;switch(a){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:c};break;case"left":p={x:n.x-o.width,y:c};break;default:p={x:n.x,y:n.y}}switch(Fi(t)){case"start":p[r]-=h*(i&&d?-1:1);break;case"end":p[r]+=h*(i&&d?-1:1);break}return p}const Ga=async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=i,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t));let d=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:c}=so(d,n,a),h=n,p={},f=0;for(let w=0;wx<=0)){var B,q;const x=(((B=s.flip)==null?void 0:B.index)||0)+1,L=O[x];if(L)return{data:{index:x,overflows:E},reset:{placement:L}};let V=(q=E.filter(tt=>tt.overflows[0]<=0).sort((tt,et)=>tt.overflows[1]-et.overflows[1])[0])==null?void 0:q.placement;if(!V)switch(p){case"bestFit":{var W;const tt=(W=E.filter(et=>{if(C){const dt=Ut(et.placement);return dt===y||dt==="y"}return!0}).map(et=>[et.placement,et.overflows.filter(dt=>dt>0).reduce((dt,Ae)=>dt+Ae,0)]).sort((et,dt)=>et[1]-dt[1])[0])==null?void 0:W[0];tt&&(V=tt);break}case"initialPlacement":V=l;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function vs(e){const t=oe(...e.map(s=>s.left)),i=oe(...e.map(s=>s.top)),n=ft(...e.map(s=>s.right)),o=ft(...e.map(s=>s.bottom));return{x:t,y:i,width:n-t,height:o-i}}function Ya(e){const t=e.slice().sort((o,s)=>o.y-s.y),i=[];let n=null;for(let o=0;on.height/2?i.push([s]):i[i.length-1].push(s),n=s}return i.map(o=>se(vs(o)))}const Xa=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:i,elements:n,rects:o,platform:s,strategy:r}=t,{padding:l=2,x:a,y:d}=Ze(e,t),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(n.reference))||[]),c=Ya(u),h=se(vs(u)),p=fs(l);function f(){if(c.length===2&&c[0].left>c[1].right&&a!=null&&d!=null)return c.find(v=>a>v.left-p.left&&av.top-p.top&&d=2){if(Ut(i)==="y"){const E=c[0],B=c[c.length-1],q=gt(i)==="top",W=E.top,x=B.bottom,L=q?E.left:B.left,V=q?E.right:B.right,tt=V-L,et=x-W;return{top:W,bottom:x,left:L,right:V,width:tt,height:et,x:L,y:W}}const v=gt(i)==="left",b=ft(...c.map(E=>E.right)),y=oe(...c.map(E=>E.left)),_=c.filter(E=>v?E.left===y:E.right===b),$=_[0].top,A=_[_.length-1].bottom,C=y,O=b,P=O-C,S=A-$;return{top:$,bottom:A,left:C,right:O,width:P,height:S,x:C,y:$}}return h}const w=await s.getElementRects({reference:{getBoundingClientRect:f},floating:n.floating,strategy:r});return o.reference.x!==w.reference.x||o.reference.y!==w.reference.y||o.reference.width!==w.reference.width||o.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}};async function Ja(e,t){const{placement:i,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),r=gt(i),l=Fi(i),a=Ut(i)==="y",d=["left","top"].includes(r)?-1:1,u=s&&a?-1:1,c=Ze(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return l&&typeof f=="number"&&(p=l==="end"?f*-1:f),a?{x:p*u,y:h*d}:{x:h*d,y:p*u}}const ys=function(e){return{name:"offset",options:e,async fn(t){var i,n;const{x:o,y:s,placement:r,middlewareData:l}=t,a=await Ja(t,e);return r===((i=l.offset)==null?void 0:i.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:{...a,placement:r}}}}},Qa=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:v=>{let{x:b,y}=v;return{x:b,y}}},...a}=Ze(e,t),d={x:i,y:n},u=await gs(t,a),c=Ut(gt(o)),h=ps(c);let p=d[h],f=d[c];if(s){const v=h==="y"?"top":"left",b=h==="y"?"bottom":"right",y=p+u[v],_=p-u[b];p=oo(y,p,_)}if(r){const v=c==="y"?"top":"left",b=c==="y"?"bottom":"right",y=f+u[v],_=f-u[b];f=oo(y,f,_)}const w=l.fn({...t,[h]:p,[c]:f});return{...w,data:{x:w.x-i,y:w.y-n,enabled:{[h]:s,[c]:r}}}}}};function Hi(){return typeof window<"u"}function Et(e){return _s(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kt(e){var t;return(t=(_s(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _s(e){return Hi()?e instanceof Node||e instanceof Q(e).Node:!1}function ht(e){return Hi()?e instanceof Element||e instanceof Q(e).Element:!1}function pt(e){return Hi()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function ro(e){return!Hi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function Ke(e){const{overflow:t,overflowX:i,overflowY:n,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&!["inline","contents"].includes(o)}function Za(e){return["table","td","th"].includes(Et(e))}function Ka(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Nn(e){const t=Pn(),i=ht(e)?it(e):e;return i.transform!=="none"||i.perspective!=="none"||(i.containerType?i.containerType!=="normal":!1)||!t&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!t&&(i.filter?i.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(i.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(i.contain||"").includes(n))}function tl(e){let t=re(e);for(;pt(t)&&!Bi(t);){if(Nn(t))return t;if(Ka(t))return null;t=re(t)}return null}function Pn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Bi(e){return["html","body","#document"].includes(Et(e))}function it(e){return Q(e).getComputedStyle(e)}function Ui(e){return ht(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function re(e){if(Et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ro(e)&&e.host||kt(e);return ro(t)?t.host:t}function ws(e){const t=re(e);return Bi(t)?e.ownerDocument?e.ownerDocument.body:e.body:pt(t)&&Ke(t)?t:ws(t)}function pn(e,t,i){var n;t===void 0&&(t=[]),i===void 0&&(i=!0);const o=ws(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),r=Q(o);if(s){const l=el(r);return t.concat(r,r.visualViewport||[],Ke(o)?o:[],l&&i?pn(l):[])}return t.concat(o,pn(o,[],i))}function el(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $s(e){const t=it(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=pt(e),s=o?e.offsetWidth:i,r=o?e.offsetHeight:n,l=xi(i)!==s||xi(n)!==r;return l&&(i=s,n=r),{width:i,height:n,$:l}}function xs(e){return ht(e)?e:e.contextElement}function te(e){const t=xs(e);if(!pt(t))return At(1);const i=t.getBoundingClientRect(),{width:n,height:o,$:s}=$s(t);let r=(s?xi(i.width):i.width)/n,l=(s?xi(i.height):i.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const il=At(0);function Cs(e){const t=Q(e);return!Pn()||!t.visualViewport?il:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nl(e,t,i){return t===void 0&&(t=!1),!i||t&&i!==Q(e)?!1:t}function ze(e,t,i,n){t===void 0&&(t=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),s=xs(e);let r=At(1);t&&(n?ht(n)&&(r=te(n)):r=te(e));const l=nl(s,i,n)?Cs(s):At(0);let a=(o.left+l.x)/r.x,d=(o.top+l.y)/r.y,u=o.width/r.x,c=o.height/r.y;if(s){const h=Q(s),p=n&&ht(n)?Q(n):n;let f=h,w=f.frameElement;for(;w&&n&&p!==f;){const v=te(w),b=w.getBoundingClientRect(),y=it(w),_=b.left+(w.clientLeft+parseFloat(y.paddingLeft))*v.x,$=b.top+(w.clientTop+parseFloat(y.paddingTop))*v.y;a*=v.x,d*=v.y,u*=v.x,c*=v.y,a+=_,d+=$,f=Q(w),w=f.frameElement}}return se({width:u,height:c,x:a,y:d})}const ol=[":popover-open",":modal"];function As(e){return ol.some(t=>{try{return e.matches(t)}catch{return!1}})}function sl(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e;const s=o==="fixed",r=kt(n),l=t?As(t.floating):!1;if(n===r||l&&s)return i;let a={scrollLeft:0,scrollTop:0},d=At(1);const u=At(0),c=pt(n);if((c||!c&&!s)&&((Et(n)!=="body"||Ke(r))&&(a=Ui(n)),pt(n))){const h=ze(n);d=te(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-a.scrollLeft*d.x+u.x,y:i.y*d.y-a.scrollTop*d.y+u.y}}function rl(e){return Array.from(e.getClientRects())}function Es(e){return ze(kt(e)).left+Ui(e).scrollLeft}function al(e){const t=kt(e),i=Ui(e),n=e.ownerDocument.body,o=ft(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=ft(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+Es(e);const l=-i.scrollTop;return it(n).direction==="rtl"&&(r+=ft(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:r,y:l}}function ll(e,t){const i=Q(e),n=kt(e),o=i.visualViewport;let s=n.clientWidth,r=n.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;const d=Pn();(!d||d&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function cl(e,t){const i=ze(e,!0,t==="fixed"),n=i.top+e.clientTop,o=i.left+e.clientLeft,s=pt(e)?te(e):At(1),r=e.clientWidth*s.x,l=e.clientHeight*s.y,a=o*s.x,d=n*s.y;return{width:r,height:l,x:a,y:d}}function ao(e,t,i){let n;if(t==="viewport")n=ll(e,i);else if(t==="document")n=al(kt(e));else if(ht(t))n=cl(t,i);else{const o=Cs(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return se(n)}function Ss(e,t){const i=re(e);return i===t||!ht(i)||Bi(i)?!1:it(i).position==="fixed"||Ss(i,t)}function dl(e,t){const i=t.get(e);if(i)return i;let n=pn(e,[],!1).filter(l=>ht(l)&&Et(l)!=="body"),o=null;const s=it(e).position==="fixed";let r=s?re(e):e;for(;ht(r)&&!Bi(r);){const l=it(r),a=Nn(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&o&&["absolute","fixed"].includes(o.position)||Ke(r)&&!a&&Ss(e,r))?n=n.filter(d=>d!==r):o=l,r=re(r)}return t.set(e,n),n}function ul(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const s=[...i==="clippingAncestors"?dl(t,this._c):[].concat(i),n],r=s[0],l=s.reduce((a,d)=>{const u=ao(t,d,o);return a.top=ft(u.top,a.top),a.right=oe(u.right,a.right),a.bottom=oe(u.bottom,a.bottom),a.left=ft(u.left,a.left),a},ao(t,r,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hl(e){const{width:t,height:i}=$s(e);return{width:t,height:i}}function pl(e,t,i){const n=pt(t),o=kt(t),s=i==="fixed",r=ze(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const a=At(0);if(n||!n&&!s)if((Et(t)!=="body"||Ke(o))&&(l=Ui(t)),n){const c=ze(t,!0,s,t);a.x=c.x+t.clientLeft,a.y=c.y+t.clientTop}else o&&(a.x=Es(o));const d=r.left+l.scrollLeft-a.x,u=r.top+l.scrollTop-a.y;return{x:d,y:u,width:r.width,height:r.height}}function lo(e,t){return!pt(e)||it(e).position==="fixed"?null:t?t(e):e.offsetParent}function ks(e,t){const i=Q(e);if(!pt(e)||As(e))return i;let n=lo(e,t);for(;n&&Za(n)&&it(n).position==="static";)n=lo(n,t);return n&&(Et(n)==="html"||Et(n)==="body"&&it(n).position==="static"&&!Nn(n))?i:n||tl(e)||i}const ml=async function(e){const t=this.getOffsetParent||ks,i=this.getDimensions;return{reference:pl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await i(e.floating)}}};function bl(e){return it(e).direction==="rtl"}const fl={convertOffsetParentRelativeRectToViewportRelativeRect:sl,getDocumentElement:kt,getClippingRect:ul,getOffsetParent:ks,getElementRects:ml,getClientRects:rl,getDimensions:hl,getScale:te,isElement:ht,isRTL:bl},Ts=Qa,Os=qa,Is=Xa,Ns=(e,t,i)=>{const n=new Map,o={platform:fl,...i},s={...o.platform,_c:n};return Ga(e,t,{...o,platform:s})};/** +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as zi,d as Tn,W as Xe,S as On,j as pa,O as ss,i as M,G as In,k as be,F as qt,p as mt,q as Je,r as Di,e as io,f as ma,L as ba,B as no,g as fa,h as ga,I as rs,H as as,s as va,t as ya,u as _a,P as pi,v as Se,w as wa,D as xa,A as $a,c as Ca,V as Aa,x as xi,y as Ea,z as _t,R as Sa,E as ls,J as cs,K as ka,N as ds,Q as Ta,U as Oa,X as us,Y as hs,Z as Ia,_ as Na,T as Pa,C as Ma,a as Ra,b as La,l as Qe,m as ut}from"./index-D2hR2zBN.js";var ja=Object.defineProperty,za=(e,t,i)=>t in e?ja(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Rt=(e,t,i)=>(za(e,typeof t!="symbol"?t+"":t,i),i);const oe=Math.min,ft=Math.max,$i=Math.round,At=e=>({x:e,y:e}),Da={left:"right",right:"left",bottom:"top",top:"bottom"},Fa={start:"end",end:"start"};function oo(e,t,i){return ft(e,oe(t,i))}function Ze(e,t){return typeof e=="function"?e(t):e}function gt(e){return e.split("-")[0]}function Fi(e){return e.split("-")[1]}function ps(e){return e==="x"?"y":"x"}function ms(e){return e==="y"?"height":"width"}function Ut(e){return["top","bottom"].includes(gt(e))?"y":"x"}function bs(e){return ps(Ut(e))}function Ha(e,t,i){i===void 0&&(i=!1);const n=Fi(e),o=bs(e),s=ms(o);let r=o==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Ci(r)),[r,Ci(r)]}function Ba(e){const t=Ci(e);return[hn(e),t,hn(t)]}function hn(e){return e.replace(/start|end/g,t=>Fa[t])}function Ua(e,t,i){const n=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return i?t?o:n:t?n:o;case"left":case"right":return t?s:r;default:return[]}}function Va(e,t,i,n){const o=Fi(e);let s=Ua(gt(e),i==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(hn)))),s}function Ci(e){return e.replace(/left|right|bottom|top/g,t=>Da[t])}function Wa(e){return{top:0,right:0,bottom:0,left:0,...e}}function fs(e){return typeof e!="number"?Wa(e):{top:e,right:e,bottom:e,left:e}}function se(e){const{x:t,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:t,right:t+n,bottom:i+o,x:t,y:i}}function so(e,t,i){let{reference:n,floating:o}=e;const s=Ut(t),r=bs(t),l=ms(r),a=gt(t),d=s==="y",u=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2,h=n[l]/2-o[l]/2;let p;switch(a){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:c};break;case"left":p={x:n.x-o.width,y:c};break;default:p={x:n.x,y:n.y}}switch(Fi(t)){case"start":p[r]-=h*(i&&d?-1:1);break;case"end":p[r]+=h*(i&&d?-1:1);break}return p}const Ga=async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=i,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t));let d=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:c}=so(d,n,a),h=n,p={},f=0;for(let w=0;w$<=0)){var B,q;const $=(((B=s.flip)==null?void 0:B.index)||0)+1,L=O[$];if(L)return{data:{index:$,overflows:E},reset:{placement:L}};let V=(q=E.filter(tt=>tt.overflows[0]<=0).sort((tt,et)=>tt.overflows[1]-et.overflows[1])[0])==null?void 0:q.placement;if(!V)switch(p){case"bestFit":{var W;const tt=(W=E.filter(et=>{if(C){const dt=Ut(et.placement);return dt===y||dt==="y"}return!0}).map(et=>[et.placement,et.overflows.filter(dt=>dt>0).reduce((dt,Ae)=>dt+Ae,0)]).sort((et,dt)=>et[1]-dt[1])[0])==null?void 0:W[0];tt&&(V=tt);break}case"initialPlacement":V=l;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function vs(e){const t=oe(...e.map(s=>s.left)),i=oe(...e.map(s=>s.top)),n=ft(...e.map(s=>s.right)),o=ft(...e.map(s=>s.bottom));return{x:t,y:i,width:n-t,height:o-i}}function Ya(e){const t=e.slice().sort((o,s)=>o.y-s.y),i=[];let n=null;for(let o=0;on.height/2?i.push([s]):i[i.length-1].push(s),n=s}return i.map(o=>se(vs(o)))}const Xa=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:i,elements:n,rects:o,platform:s,strategy:r}=t,{padding:l=2,x:a,y:d}=Ze(e,t),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(n.reference))||[]),c=Ya(u),h=se(vs(u)),p=fs(l);function f(){if(c.length===2&&c[0].left>c[1].right&&a!=null&&d!=null)return c.find(v=>a>v.left-p.left&&av.top-p.top&&d=2){if(Ut(i)==="y"){const E=c[0],B=c[c.length-1],q=gt(i)==="top",W=E.top,$=B.bottom,L=q?E.left:B.left,V=q?E.right:B.right,tt=V-L,et=$-W;return{top:W,bottom:$,left:L,right:V,width:tt,height:et,x:L,y:W}}const v=gt(i)==="left",b=ft(...c.map(E=>E.right)),y=oe(...c.map(E=>E.left)),_=c.filter(E=>v?E.left===y:E.right===b),x=_[0].top,A=_[_.length-1].bottom,C=y,O=b,P=O-C,S=A-x;return{top:x,bottom:A,left:C,right:O,width:P,height:S,x:C,y:x}}return h}const w=await s.getElementRects({reference:{getBoundingClientRect:f},floating:n.floating,strategy:r});return o.reference.x!==w.reference.x||o.reference.y!==w.reference.y||o.reference.width!==w.reference.width||o.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}};async function Ja(e,t){const{placement:i,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),r=gt(i),l=Fi(i),a=Ut(i)==="y",d=["left","top"].includes(r)?-1:1,u=s&&a?-1:1,c=Ze(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return l&&typeof f=="number"&&(p=l==="end"?f*-1:f),a?{x:p*u,y:h*d}:{x:h*d,y:p*u}}const ys=function(e){return{name:"offset",options:e,async fn(t){var i,n;const{x:o,y:s,placement:r,middlewareData:l}=t,a=await Ja(t,e);return r===((i=l.offset)==null?void 0:i.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:{...a,placement:r}}}}},Qa=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:v=>{let{x:b,y}=v;return{x:b,y}}},...a}=Ze(e,t),d={x:i,y:n},u=await gs(t,a),c=Ut(gt(o)),h=ps(c);let p=d[h],f=d[c];if(s){const v=h==="y"?"top":"left",b=h==="y"?"bottom":"right",y=p+u[v],_=p-u[b];p=oo(y,p,_)}if(r){const v=c==="y"?"top":"left",b=c==="y"?"bottom":"right",y=f+u[v],_=f-u[b];f=oo(y,f,_)}const w=l.fn({...t,[h]:p,[c]:f});return{...w,data:{x:w.x-i,y:w.y-n,enabled:{[h]:s,[c]:r}}}}}};function Hi(){return typeof window<"u"}function Et(e){return _s(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kt(e){var t;return(t=(_s(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _s(e){return Hi()?e instanceof Node||e instanceof Q(e).Node:!1}function ht(e){return Hi()?e instanceof Element||e instanceof Q(e).Element:!1}function pt(e){return Hi()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function ro(e){return!Hi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function Ke(e){const{overflow:t,overflowX:i,overflowY:n,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&!["inline","contents"].includes(o)}function Za(e){return["table","td","th"].includes(Et(e))}function Ka(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Nn(e){const t=Pn(),i=ht(e)?it(e):e;return i.transform!=="none"||i.perspective!=="none"||(i.containerType?i.containerType!=="normal":!1)||!t&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!t&&(i.filter?i.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(i.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(i.contain||"").includes(n))}function tl(e){let t=re(e);for(;pt(t)&&!Bi(t);){if(Nn(t))return t;if(Ka(t))return null;t=re(t)}return null}function Pn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Bi(e){return["html","body","#document"].includes(Et(e))}function it(e){return Q(e).getComputedStyle(e)}function Ui(e){return ht(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function re(e){if(Et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ro(e)&&e.host||kt(e);return ro(t)?t.host:t}function ws(e){const t=re(e);return Bi(t)?e.ownerDocument?e.ownerDocument.body:e.body:pt(t)&&Ke(t)?t:ws(t)}function pn(e,t,i){var n;t===void 0&&(t=[]),i===void 0&&(i=!0);const o=ws(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),r=Q(o);if(s){const l=el(r);return t.concat(r,r.visualViewport||[],Ke(o)?o:[],l&&i?pn(l):[])}return t.concat(o,pn(o,[],i))}function el(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xs(e){const t=it(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=pt(e),s=o?e.offsetWidth:i,r=o?e.offsetHeight:n,l=$i(i)!==s||$i(n)!==r;return l&&(i=s,n=r),{width:i,height:n,$:l}}function $s(e){return ht(e)?e:e.contextElement}function te(e){const t=$s(e);if(!pt(t))return At(1);const i=t.getBoundingClientRect(),{width:n,height:o,$:s}=xs(t);let r=(s?$i(i.width):i.width)/n,l=(s?$i(i.height):i.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const il=At(0);function Cs(e){const t=Q(e);return!Pn()||!t.visualViewport?il:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nl(e,t,i){return t===void 0&&(t=!1),!i||t&&i!==Q(e)?!1:t}function ze(e,t,i,n){t===void 0&&(t=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),s=$s(e);let r=At(1);t&&(n?ht(n)&&(r=te(n)):r=te(e));const l=nl(s,i,n)?Cs(s):At(0);let a=(o.left+l.x)/r.x,d=(o.top+l.y)/r.y,u=o.width/r.x,c=o.height/r.y;if(s){const h=Q(s),p=n&&ht(n)?Q(n):n;let f=h,w=f.frameElement;for(;w&&n&&p!==f;){const v=te(w),b=w.getBoundingClientRect(),y=it(w),_=b.left+(w.clientLeft+parseFloat(y.paddingLeft))*v.x,x=b.top+(w.clientTop+parseFloat(y.paddingTop))*v.y;a*=v.x,d*=v.y,u*=v.x,c*=v.y,a+=_,d+=x,f=Q(w),w=f.frameElement}}return se({width:u,height:c,x:a,y:d})}const ol=[":popover-open",":modal"];function As(e){return ol.some(t=>{try{return e.matches(t)}catch{return!1}})}function sl(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e;const s=o==="fixed",r=kt(n),l=t?As(t.floating):!1;if(n===r||l&&s)return i;let a={scrollLeft:0,scrollTop:0},d=At(1);const u=At(0),c=pt(n);if((c||!c&&!s)&&((Et(n)!=="body"||Ke(r))&&(a=Ui(n)),pt(n))){const h=ze(n);d=te(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-a.scrollLeft*d.x+u.x,y:i.y*d.y-a.scrollTop*d.y+u.y}}function rl(e){return Array.from(e.getClientRects())}function Es(e){return ze(kt(e)).left+Ui(e).scrollLeft}function al(e){const t=kt(e),i=Ui(e),n=e.ownerDocument.body,o=ft(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=ft(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+Es(e);const l=-i.scrollTop;return it(n).direction==="rtl"&&(r+=ft(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:r,y:l}}function ll(e,t){const i=Q(e),n=kt(e),o=i.visualViewport;let s=n.clientWidth,r=n.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;const d=Pn();(!d||d&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function cl(e,t){const i=ze(e,!0,t==="fixed"),n=i.top+e.clientTop,o=i.left+e.clientLeft,s=pt(e)?te(e):At(1),r=e.clientWidth*s.x,l=e.clientHeight*s.y,a=o*s.x,d=n*s.y;return{width:r,height:l,x:a,y:d}}function ao(e,t,i){let n;if(t==="viewport")n=ll(e,i);else if(t==="document")n=al(kt(e));else if(ht(t))n=cl(t,i);else{const o=Cs(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return se(n)}function Ss(e,t){const i=re(e);return i===t||!ht(i)||Bi(i)?!1:it(i).position==="fixed"||Ss(i,t)}function dl(e,t){const i=t.get(e);if(i)return i;let n=pn(e,[],!1).filter(l=>ht(l)&&Et(l)!=="body"),o=null;const s=it(e).position==="fixed";let r=s?re(e):e;for(;ht(r)&&!Bi(r);){const l=it(r),a=Nn(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&o&&["absolute","fixed"].includes(o.position)||Ke(r)&&!a&&Ss(e,r))?n=n.filter(d=>d!==r):o=l,r=re(r)}return t.set(e,n),n}function ul(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const s=[...i==="clippingAncestors"?dl(t,this._c):[].concat(i),n],r=s[0],l=s.reduce((a,d)=>{const u=ao(t,d,o);return a.top=ft(u.top,a.top),a.right=oe(u.right,a.right),a.bottom=oe(u.bottom,a.bottom),a.left=ft(u.left,a.left),a},ao(t,r,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hl(e){const{width:t,height:i}=xs(e);return{width:t,height:i}}function pl(e,t,i){const n=pt(t),o=kt(t),s=i==="fixed",r=ze(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const a=At(0);if(n||!n&&!s)if((Et(t)!=="body"||Ke(o))&&(l=Ui(t)),n){const c=ze(t,!0,s,t);a.x=c.x+t.clientLeft,a.y=c.y+t.clientTop}else o&&(a.x=Es(o));const d=r.left+l.scrollLeft-a.x,u=r.top+l.scrollTop-a.y;return{x:d,y:u,width:r.width,height:r.height}}function lo(e,t){return!pt(e)||it(e).position==="fixed"?null:t?t(e):e.offsetParent}function ks(e,t){const i=Q(e);if(!pt(e)||As(e))return i;let n=lo(e,t);for(;n&&Za(n)&&it(n).position==="static";)n=lo(n,t);return n&&(Et(n)==="html"||Et(n)==="body"&&it(n).position==="static"&&!Nn(n))?i:n||tl(e)||i}const ml=async function(e){const t=this.getOffsetParent||ks,i=this.getDimensions;return{reference:pl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await i(e.floating)}}};function bl(e){return it(e).direction==="rtl"}const fl={convertOffsetParentRelativeRectToViewportRelativeRect:sl,getDocumentElement:kt,getClippingRect:ul,getOffsetParent:ks,getElementRects:ml,getClientRects:rl,getDimensions:hl,getScale:te,isElement:ht,isRTL:bl},Ts=Qa,Os=qa,Is=Xa,Ns=(e,t,i)=>{const n=new Map,o={platform:fl,...i},s={...o.platform,_c:n};return Ga(e,t,{...o,platform:s})};/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause @@ -6,17 +6,17 @@ import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as zi,d as Tn,W as Xe,S as * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const{is:yl,defineProperty:_l,getOwnPropertyDescriptor:wl,getOwnPropertyNames:$l,getOwnPropertySymbols:xl,getPrototypeOf:Cl}=Object,ae=globalThis,ho=ae.trustedTypes,Al=ho?ho.emptyScript:"",po=ae.reactiveElementPolyfillSupport,Ne=(e,t)=>e,Ai={toAttribute(e,t){switch(t){case Boolean:e=e?Al:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=e!==null;break;case Number:i=e===null?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch{i=null}}return i}},Ln=(e,t)=>!yl(e,t),mo={attribute:!0,type:String,converter:Ai,reflect:!1,hasChanged:Ln};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),ae.litPropertyMetadata??(ae.litPropertyMetadata=new WeakMap);class Zt extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,i=mo){if(i.state&&(i.attribute=!1),this._$Ei(),this.elementProperties.set(t,i),!i.noAccessor){const n=Symbol(),o=this.getPropertyDescriptor(t,n,i);o!==void 0&&_l(this.prototype,t,o)}}static getPropertyDescriptor(t,i,n){const{get:o,set:s}=wl(this.prototype,t)??{get(){return this[i]},set(r){this[i]=r}};return{get(){return o==null?void 0:o.call(this)},set(r){const l=o==null?void 0:o.call(this);s.call(this,r),this.requestUpdate(t,l,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??mo}static _$Ei(){if(this.hasOwnProperty(Ne("elementProperties")))return;const t=Cl(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ne("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ne("properties"))){const i=this.properties,n=[...$l(i),...xl(i)];for(const o of n)this.createProperty(o,i[o])}const t=this[Symbol.metadata];if(t!==null){const i=litPropertyMetadata.get(t);if(i!==void 0)for(const[n,o]of i)this.elementProperties.set(n,o)}this._$Eh=new Map;for(const[i,n]of this.elementProperties){const o=this._$Eu(i,n);o!==void 0&&this._$Eh.set(o,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const o of n)i.unshift(uo(o))}else t!==void 0&&i.push(uo(t));return i}static _$Eu(t,i){const n=i.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(i=>this.enableUpdating=i),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(i=>i(this))}addController(t){var i;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)==null||i.call(t))}removeController(t){var i;(i=this._$EO)==null||i.delete(t)}_$E_(){const t=new Map,i=this.constructor.elementProperties;for(const n of i.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return vl(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(i=>{var n;return(n=i.hostConnected)==null?void 0:n.call(i)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(i=>{var n;return(n=i.hostDisconnected)==null?void 0:n.call(i)})}attributeChangedCallback(t,i,n){this._$AK(t,n)}_$EC(t,i){var n;const o=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,o);if(s!==void 0&&o.reflect===!0){const r=(((n=o.converter)==null?void 0:n.toAttribute)!==void 0?o.converter:Ai).toAttribute(i,o.type);this._$Em=t,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,i){var n;const o=this.constructor,s=o._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const r=o.getPropertyOptions(s),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((n=r.converter)==null?void 0:n.fromAttribute)!==void 0?r.converter:Ai;this._$Em=s,this[s]=l.fromAttribute(i,r.type),this._$Em=null}}requestUpdate(t,i,n){if(t!==void 0){if(n??(n=this.constructor.getPropertyOptions(t)),!(n.hasChanged??Ln)(this[t],i))return;this.P(t,i,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,i,n){this._$AL.has(t)||this._$AL.set(t,i),n.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[s,r]of o)r.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],r)}let i=!1;const n=this._$AL;try{i=this.shouldUpdate(n),i?(this.willUpdate(n),(t=this._$EO)==null||t.forEach(o=>{var s;return(s=o.hostUpdate)==null?void 0:s.call(o)}),this.update(n)):this._$EU()}catch(o){throw i=!1,this._$EU(),o}i&&this._$AE(n)}willUpdate(t){}_$AE(t){var i;(i=this._$EO)==null||i.forEach(n=>{var o;return(o=n.hostUpdated)==null?void 0:o.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(i=>this._$EC(i,this[i]))),this._$EU()}updated(t){}firstUpdated(t){}}Zt.elementStyles=[],Zt.shadowRootOptions={mode:"open"},Zt[Ne("elementProperties")]=new Map,Zt[Ne("finalized")]=new Map,po==null||po({ReactiveElement:Zt}),(ae.reactiveElementVersions??(ae.reactiveElementVersions=[])).push("2.0.4");/** + */const{is:yl,defineProperty:_l,getOwnPropertyDescriptor:wl,getOwnPropertyNames:xl,getOwnPropertySymbols:$l,getPrototypeOf:Cl}=Object,ae=globalThis,ho=ae.trustedTypes,Al=ho?ho.emptyScript:"",po=ae.reactiveElementPolyfillSupport,Ne=(e,t)=>e,Ai={toAttribute(e,t){switch(t){case Boolean:e=e?Al:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=e!==null;break;case Number:i=e===null?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch{i=null}}return i}},Ln=(e,t)=>!yl(e,t),mo={attribute:!0,type:String,converter:Ai,reflect:!1,hasChanged:Ln};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),ae.litPropertyMetadata??(ae.litPropertyMetadata=new WeakMap);class Zt extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,i=mo){if(i.state&&(i.attribute=!1),this._$Ei(),this.elementProperties.set(t,i),!i.noAccessor){const n=Symbol(),o=this.getPropertyDescriptor(t,n,i);o!==void 0&&_l(this.prototype,t,o)}}static getPropertyDescriptor(t,i,n){const{get:o,set:s}=wl(this.prototype,t)??{get(){return this[i]},set(r){this[i]=r}};return{get(){return o==null?void 0:o.call(this)},set(r){const l=o==null?void 0:o.call(this);s.call(this,r),this.requestUpdate(t,l,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??mo}static _$Ei(){if(this.hasOwnProperty(Ne("elementProperties")))return;const t=Cl(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ne("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ne("properties"))){const i=this.properties,n=[...xl(i),...$l(i)];for(const o of n)this.createProperty(o,i[o])}const t=this[Symbol.metadata];if(t!==null){const i=litPropertyMetadata.get(t);if(i!==void 0)for(const[n,o]of i)this.elementProperties.set(n,o)}this._$Eh=new Map;for(const[i,n]of this.elementProperties){const o=this._$Eu(i,n);o!==void 0&&this._$Eh.set(o,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const o of n)i.unshift(uo(o))}else t!==void 0&&i.push(uo(t));return i}static _$Eu(t,i){const n=i.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(i=>this.enableUpdating=i),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(i=>i(this))}addController(t){var i;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)==null||i.call(t))}removeController(t){var i;(i=this._$EO)==null||i.delete(t)}_$E_(){const t=new Map,i=this.constructor.elementProperties;for(const n of i.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return vl(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(i=>{var n;return(n=i.hostConnected)==null?void 0:n.call(i)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(i=>{var n;return(n=i.hostDisconnected)==null?void 0:n.call(i)})}attributeChangedCallback(t,i,n){this._$AK(t,n)}_$EC(t,i){var n;const o=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,o);if(s!==void 0&&o.reflect===!0){const r=(((n=o.converter)==null?void 0:n.toAttribute)!==void 0?o.converter:Ai).toAttribute(i,o.type);this._$Em=t,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,i){var n;const o=this.constructor,s=o._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const r=o.getPropertyOptions(s),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((n=r.converter)==null?void 0:n.fromAttribute)!==void 0?r.converter:Ai;this._$Em=s,this[s]=l.fromAttribute(i,r.type),this._$Em=null}}requestUpdate(t,i,n){if(t!==void 0){if(n??(n=this.constructor.getPropertyOptions(t)),!(n.hasChanged??Ln)(this[t],i))return;this.P(t,i,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,i,n){this._$AL.has(t)||this._$AL.set(t,i),n.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[s,r]of o)r.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],r)}let i=!1;const n=this._$AL;try{i=this.shouldUpdate(n),i?(this.willUpdate(n),(t=this._$EO)==null||t.forEach(o=>{var s;return(s=o.hostUpdate)==null?void 0:s.call(o)}),this.update(n)):this._$EU()}catch(o){throw i=!1,this._$EU(),o}i&&this._$AE(n)}willUpdate(t){}_$AE(t){var i;(i=this._$EO)==null||i.forEach(n=>{var o;return(o=n.hostUpdated)==null?void 0:o.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(i=>this._$EC(i,this[i]))),this._$EU()}updated(t){}firstUpdated(t){}}Zt.elementStyles=[],Zt.shadowRootOptions={mode:"open"},Zt[Ne("elementProperties")]=new Map,Zt[Ne("finalized")]=new Map,po==null||po({ReactiveElement:Zt}),(ae.reactiveElementVersions??(ae.reactiveElementVersions=[])).push("2.0.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Ei=globalThis,Si=Ei.trustedTypes,bo=Si?Si.createPolicy("lit-html",{createHTML:e=>e}):void 0,Ms="$lit$",xt=`lit$${Math.random().toFixed(9).slice(2)}$`,Rs="?"+xt,El=`<${Rs}>`,Vt=document,De=()=>Vt.createComment(""),Fe=e=>e===null||typeof e!="object"&&typeof e!="function",jn=Array.isArray,Sl=e=>jn(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",on=`[ + */const Ei=globalThis,Si=Ei.trustedTypes,bo=Si?Si.createPolicy("lit-html",{createHTML:e=>e}):void 0,Ms="$lit$",$t=`lit$${Math.random().toFixed(9).slice(2)}$`,Rs="?"+$t,El=`<${Rs}>`,Vt=document,De=()=>Vt.createComment(""),Fe=e=>e===null||typeof e!="object"&&typeof e!="function",jn=Array.isArray,Sl=e=>jn(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",on=`[ \f\r]`,ke=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,fo=/-->/g,go=/>/g,Lt=RegExp(`>|${on}(?:([^\\s"'>=/]+)(${on}*=${on}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),vo=/'/g,yo=/"/g,Ls=/^(?:script|style|textarea|title)$/i,kl=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),m=kl(1),Wt=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),_o=new WeakMap,zt=Vt.createTreeWalker(Vt,129);function js(e,t){if(!jn(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return bo!==void 0?bo.createHTML(t):t}const Tl=(e,t)=>{const i=e.length-1,n=[];let o,s=t===2?"":t===3?"":"",r=ke;for(let l=0;l"?(r=o??ke,c=-1):u[1]===void 0?c=-2:(c=r.lastIndex-u[2].length,d=u[1],r=u[3]===void 0?Lt:u[3]==='"'?yo:vo):r===yo||r===vo?r=Lt:r===fo||r===go?r=ke:(r=Lt,o=void 0);const p=r===Lt&&e[l+1].startsWith("/>")?" ":"";s+=r===ke?a+El:c>=0?(n.push(d),a.slice(0,c)+Ms+a.slice(c)+xt+p):a+xt+(c===-2?l:p)}return[js(e,s+(e[i]||"")+(t===2?"":t===3?"":"")),n]};class He{constructor({strings:t,_$litType$:i},n){let o;this.parts=[];let s=0,r=0;const l=t.length-1,a=this.parts,[d,u]=Tl(t,i);if(this.el=He.createElement(d,n),zt.currentNode=this.el.content,i===2||i===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(o=zt.nextNode())!==null&&a.length0){o.textContent=Si?Si.emptyScript:"";for(let p=0;p2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=R}_$AI(t,i=this,n,o){const s=this.strings;let r=!1;if(s===void 0)t=le(this,t,i,0),r=!Fe(t)||t!==this._$AH&&t!==Wt,r&&(this._$AH=t);else{const l=t;let a,d;for(t=s[0],a=0;a{const n=(i==null?void 0:i.renderBefore)??t;let o=n._$litPart$;if(o===void 0){const s=(i==null?void 0:i.renderBefore)??null;n._$litPart$=o=new ti(t.insertBefore(De(),s),s,void 0,i??{})}return o._$AI(e),o};/** +\f\r"'\`<>=]|("|')|))|$)`,"g"),vo=/'/g,yo=/"/g,Ls=/^(?:script|style|textarea|title)$/i,kl=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),m=kl(1),Wt=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),_o=new WeakMap,zt=Vt.createTreeWalker(Vt,129);function js(e,t){if(!jn(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return bo!==void 0?bo.createHTML(t):t}const Tl=(e,t)=>{const i=e.length-1,n=[];let o,s=t===2?"":t===3?"":"",r=ke;for(let l=0;l"?(r=o??ke,c=-1):u[1]===void 0?c=-2:(c=r.lastIndex-u[2].length,d=u[1],r=u[3]===void 0?Lt:u[3]==='"'?yo:vo):r===yo||r===vo?r=Lt:r===fo||r===go?r=ke:(r=Lt,o=void 0);const p=r===Lt&&e[l+1].startsWith("/>")?" ":"";s+=r===ke?a+El:c>=0?(n.push(d),a.slice(0,c)+Ms+a.slice(c)+$t+p):a+$t+(c===-2?l:p)}return[js(e,s+(e[i]||"")+(t===2?"":t===3?"":"")),n]};class He{constructor({strings:t,_$litType$:i},n){let o;this.parts=[];let s=0,r=0;const l=t.length-1,a=this.parts,[d,u]=Tl(t,i);if(this.el=He.createElement(d,n),zt.currentNode=this.el.content,i===2||i===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(o=zt.nextNode())!==null&&a.length0){o.textContent=Si?Si.emptyScript:"";for(let p=0;p2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=R}_$AI(t,i=this,n,o){const s=this.strings;let r=!1;if(s===void 0)t=le(this,t,i,0),r=!Fe(t)||t!==this._$AH&&t!==Wt,r&&(this._$AH=t);else{const l=t;let a,d;for(t=s[0],a=0;a{const n=(i==null?void 0:i.renderBefore)??t;let o=n._$litPart$;if(o===void 0){const s=(i==null?void 0:i.renderBefore)??null;n._$litPart$=o=new ti(t.insertBefore(De(),s),s,void 0,i??{})}return o._$AI(e),o};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */let T=class extends Zt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ce(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return Wt}};var $o;T._$litElement$=!0,T.finalized=!0,($o=globalThis.litElementHydrateSupport)==null||$o.call(globalThis,{LitElement:T});const xo=globalThis.litElementPolyfillSupport;xo==null||xo({LitElement:T});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/** + */let T=class extends Zt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ce(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return Wt}};var xo;T._$litElement$=!0,T.finalized=!0,(xo=globalThis.litElementHydrateSupport)==null||xo.call(globalThis,{LitElement:T});const $o=globalThis.litElementPolyfillSupport;$o==null||$o({LitElement:T});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause @@ -50,7 +50,7 @@ import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as zi,d as Tn,W as Xe,S as * * @license MIT * @version 2.0.0 -*/const Bs=Object.freeze({left:0,top:0,width:16,height:16}),Ti=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ei=Object.freeze({...Bs,...Ti}),mn=Object.freeze({...ei,body:"",hidden:!1}),Ul=Object.freeze({width:null,height:null}),Us=Object.freeze({...Ul,...Ti});function Vl(e,t=0){const i=e.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(i===""){const o=parseInt(e);return isNaN(o)?0:n(o)}else if(i!==e){let o=0;switch(i){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-i.length));return isNaN(s)?0:(s=s/o,s%1===0?n(s):0)}}return t}const Wl=/[\s,]+/;function Gl(e,t){t.split(Wl).forEach(i=>{switch(i.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Vs={...Us,preserveAspectRatio:""};function Co(e){const t={...Vs},i=(n,o)=>e.getAttribute(n)||o;return t.width=i("width",null),t.height=i("height",null),t.rotate=Vl(i("rotate","")),Gl(t,i("flip","")),t.preserveAspectRatio=i("preserveAspectRatio",i("preserveaspectratio","")),t}function ql(e,t){for(const i in Vs)if(e[i]!==t[i])return!0;return!1}const Me=/^[a-z0-9]+(-[a-z0-9]+)*$/,ii=(e,t,i,n="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),a=o.pop(),d={provider:o.length>0?o[0]:n,prefix:a,name:l};return t&&!yi(d)?null:d}const s=o[0],r=s.split("-");if(r.length>1){const l={provider:n,prefix:r.shift(),name:r.join("-")};return t&&!yi(l)?null:l}if(i&&n===""){const l={provider:n,prefix:"",name:s};return t&&!yi(l,i)?null:l}return null},yi=(e,t)=>e?!!((e.provider===""||e.provider.match(Me))&&(t&&e.prefix===""||e.prefix.match(Me))&&e.name.match(Me)):!1;function Yl(e,t){const i={};!e.hFlip!=!t.hFlip&&(i.hFlip=!0),!e.vFlip!=!t.vFlip&&(i.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(i.rotate=n),i}function Ao(e,t){const i=Yl(e,t);for(const n in mn)n in Ti?n in e&&!(n in i)&&(i[n]=Ti[n]):n in t?i[n]=t[n]:n in e&&(i[n]=e[n]);return i}function Xl(e,t){const i=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);function s(r){if(i[r])return o[r]=[];if(!(r in o)){o[r]=null;const l=n[r]&&n[r].parent,a=l&&s(l);a&&(o[r]=[l].concat(a))}return o[r]}return Object.keys(i).concat(Object.keys(n)).forEach(s),o}function Jl(e,t,i){const n=e.icons,o=e.aliases||Object.create(null);let s={};function r(l){s=Ao(n[l]||o[l],s)}return r(t),i.forEach(r),Ao(e,s)}function Ws(e,t){const i=[];if(typeof e!="object"||typeof e.icons!="object")return i;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),i.push(o)});const n=Xl(e);for(const o in n){const s=n[o];s&&(t(o,Jl(e,o,s)),i.push(o))}return i}const Ql={provider:"",aliases:{},not_found:{},...Bs};function rn(e,t){for(const i in t)if(i in e&&typeof e[i]!=typeof t[i])return!1;return!0}function Gs(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!rn(e,Ql))return null;const i=t.icons;for(const o in i){const s=i[o];if(!o.match(Me)||typeof s.body!="string"||!rn(s,mn))return null}const n=t.aliases||Object.create(null);for(const o in n){const s=n[o],r=s.parent;if(!o.match(Me)||typeof r!="string"||!i[r]&&!n[r]||!rn(s,mn))return null}return t}const Oi=Object.create(null);function Zl(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function St(e,t){const i=Oi[e]||(Oi[e]=Object.create(null));return i[t]||(i[t]=Zl(e,t))}function zn(e,t){return Gs(t)?Ws(t,(i,n)=>{n?e.icons[i]=n:e.missing.add(i)}):[]}function Kl(e,t,i){try{if(typeof i.body=="string")return e.icons[t]={...i},!0}catch{}return!1}function tc(e,t){let i=[];return(typeof e=="string"?[e]:Object.keys(Oi)).forEach(n=>{(typeof n=="string"&&typeof t=="string"?[t]:Object.keys(Oi[n]||{})).forEach(o=>{const s=St(n,o);i=i.concat(Object.keys(s.icons).map(r=>(n!==""?"@"+n+":":"")+o+":"+r))})}),i}let Be=!1;function qs(e){return typeof e=="boolean"&&(Be=e),Be}function Ue(e){const t=typeof e=="string"?ii(e,!0,Be):e;if(t){const i=St(t.provider,t.prefix),n=t.name;return i.icons[n]||(i.missing.has(n)?null:void 0)}}function Ys(e,t){const i=ii(e,!0,Be);if(!i)return!1;const n=St(i.provider,i.prefix);return Kl(n,i.name,t)}function Eo(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Be&&!t&&!e.prefix){let o=!1;return Gs(e)&&(e.prefix="",Ws(e,(s,r)=>{r&&Ys(s,r)&&(o=!0)})),o}const i=e.prefix;if(!yi({provider:t,prefix:i,name:"a"}))return!1;const n=St(t,i);return!!zn(n,e)}function So(e){return!!Ue(e)}function ec(e){const t=Ue(e);return t?{...ei,...t}:null}function ic(e){const t={loaded:[],missing:[],pending:[]},i=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let n={provider:"",prefix:"",name:""};return e.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const s=o.provider,r=o.prefix,l=o.name,a=i[s]||(i[s]=Object.create(null)),d=a[r]||(a[r]=St(s,r));let u;l in d.icons?u=t.loaded:r===""||d.missing.has(l)?u=t.missing:u=t.pending;const c={provider:s,prefix:r,name:l};u.push(c)}),t}function Xs(e,t){e.forEach(i=>{const n=i.loaderCallbacks;n&&(i.loaderCallbacks=n.filter(o=>o.id!==t))})}function nc(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let i=!1;const n=e.provider,o=e.prefix;t.forEach(s=>{const r=s.icons,l=r.pending.length;r.pending=r.pending.filter(a=>{if(a.prefix!==o)return!0;const d=a.name;if(e.icons[d])r.loaded.push({provider:n,prefix:o,name:d});else if(e.missing.has(d))r.missing.push({provider:n,prefix:o,name:d});else return i=!0,!0;return!1}),r.pending.length!==l&&(i||Xs([e],s.id),s.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),s.abort))})}))}let oc=0;function sc(e,t,i){const n=oc++,o=Xs.bind(null,i,n);if(!t.pending.length)return o;const s={id:n,icons:t,callback:e,abort:o};return i.forEach(r=>{(r.loaderCallbacks||(r.loaderCallbacks=[])).push(s)}),o}const bn=Object.create(null);function ko(e,t){bn[e]=t}function fn(e){return bn[e]||bn[""]}function rc(e,t=!0,i=!1){const n=[];return e.forEach(o=>{const s=typeof o=="string"?ii(o,t,i):o;s&&n.push(s)}),n}var ac={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function lc(e,t,i,n){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let r;if(e.random){let C=e.resources.slice(0);for(r=[];C.length>1;){const O=Math.floor(Math.random()*C.length);r.push(C[O]),C=C.slice(0,O).concat(C.slice(O+1))}r=r.concat(C)}else r=e.resources.slice(s).concat(e.resources.slice(0,s));const l=Date.now();let a="pending",d=0,u,c=null,h=[],p=[];typeof n=="function"&&p.push(n);function f(){c&&(clearTimeout(c),c=null)}function w(){a==="pending"&&(a="aborted"),f(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function v(C,O){O&&(p=[]),typeof C=="function"&&p.push(C)}function b(){return{startTime:l,payload:t,status:a,queriesSent:d,queriesPending:h.length,subscribe:v,abort:w}}function y(){a="failed",p.forEach(C=>{C(void 0,u)})}function _(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function $(C,O,P){const S=O!=="success";switch(h=h.filter(E=>E!==C),a){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(O==="abort"){u=P,y();return}if(S){u=P,h.length||(r.length?A():y());return}if(f(),_(),!e.random){const E=e.resources.indexOf(C.resource);E!==-1&&E!==e.index&&(e.index=E)}a="completed",p.forEach(E=>{E(P)})}function A(){if(a!=="pending")return;f();const C=r.shift();if(C===void 0){if(h.length){c=setTimeout(()=>{f(),a==="pending"&&(_(),y())},e.timeout);return}y();return}const O={status:"pending",resource:C,callback:(P,S)=>{$(O,P,S)}};h.push(O),d++,c=setTimeout(A,e.rotate),i(C,t,O.callback)}return setTimeout(A),b}function Js(e){const t={...ac,...e};let i=[];function n(){i=i.filter(r=>r().status==="pending")}function o(r,l,a){const d=lc(t,r,l,(u,c)=>{n(),a&&a(u,c)});return i.push(d),d}function s(r){return i.find(l=>r(l))||null}return{query:o,find:s,setIndex:r=>{t.index=r},getIndex:()=>t.index,cleanup:n}}function Dn(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Wi=Object.create(null),mi=["https://api.simplesvg.com","https://api.unisvg.com"],gn=[];for(;mi.length>0;)mi.length===1||Math.random()>.5?gn.push(mi.shift()):gn.push(mi.pop());Wi[""]=Dn({resources:["https://api.iconify.design"].concat(gn)});function To(e,t){const i=Dn(t);return i===null?!1:(Wi[e]=i,!0)}function Gi(e){return Wi[e]}function cc(){return Object.keys(Wi)}function Oo(){}const an=Object.create(null);function dc(e){if(!an[e]){const t=Gi(e);if(!t)return;const i=Js(t),n={config:t,redundancy:i};an[e]=n}return an[e]}function Qs(e,t,i){let n,o;if(typeof e=="string"){const s=fn(e);if(!s)return i(void 0,424),Oo;o=s.send;const r=dc(e);r&&(n=r.redundancy)}else{const s=Dn(e);if(s){n=Js(s);const r=e.resources?e.resources[0]:"",l=fn(r);l&&(o=l.send)}}return!n||!o?(i(void 0,424),Oo):n.query(t,o,i)().abort}const Io="iconify2",Ve="iconify",Zs=Ve+"-count",No=Ve+"-version",Ks=36e5,uc=168,hc=50;function vn(e,t){try{return e.getItem(t)}catch{}}function Fn(e,t,i){try{return e.setItem(t,i),!0}catch{}}function Po(e,t){try{e.removeItem(t)}catch{}}function yn(e,t){return Fn(e,Zs,t.toString())}function _n(e){return parseInt(vn(e,Zs))||0}const Ft={local:!0,session:!0},tr={local:new Set,session:new Set};let Hn=!1;function pc(e){Hn=e}let bi=typeof window>"u"?{}:window;function er(e){const t=e+"Storage";try{if(bi&&bi[t]&&typeof bi[t].length=="number")return bi[t]}catch{}Ft[e]=!1}function ir(e,t){const i=er(e);if(!i)return;const n=vn(i,No);if(n!==Io){if(n){const l=_n(i);for(let a=0;a{const a=Ve+l.toString(),d=vn(i,a);if(typeof d=="string"){try{const u=JSON.parse(d);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,l))return!0}catch{}Po(i,a)}};let r=_n(i);for(let l=r-1;l>=0;l--)s(l)||(l===r-1?(r--,yn(i,r)):tr[e].add(l))}function nr(){if(!Hn){pc(!0);for(const e in Ft)ir(e,t=>{const i=t.data,n=t.provider,o=i.prefix,s=St(n,o);if(!zn(s,i).length)return!1;const r=i.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,r):r,!0})}}function mc(e,t){const i=e.lastModifiedCached;if(i&&i>=t)return i===t;if(e.lastModifiedCached=t,i)for(const n in Ft)ir(n,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function bc(e,t){Hn||nr();function i(n){let o;if(!Ft[n]||!(o=er(n)))return;const s=tr[n];let r;if(s.size)s.delete(r=Array.from(s).shift());else if(r=_n(o),r>=hc||!yn(o,r+1))return;const l={cached:Math.floor(Date.now()/Ks),provider:e.provider,data:t};return Fn(o,Ve+r.toString(),JSON.stringify(l))}t.lastModified&&!mc(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),i("local")||i("session"))}function Mo(){}function fc(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,nc(e)}))}function gc(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:i,prefix:n}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;!o||!(s=fn(i))||s.prepare(i,n,o).forEach(r=>{Qs(i,r,l=>{if(typeof l!="object")r.icons.forEach(a=>{e.missing.add(a)});else try{const a=zn(e,l);if(!a.length)return;const d=e.pendingIcons;d&&a.forEach(u=>{d.delete(u)}),bc(e,l)}catch(a){console.error(a)}fc(e)})})}))}const Bn=(e,t)=>{const i=rc(e,!0,qs()),n=ic(i);if(!n.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(n.loaded,n.missing,n.pending,Mo)}),()=>{a=!1}}const o=Object.create(null),s=[];let r,l;return n.pending.forEach(a=>{const{provider:d,prefix:u}=a;if(u===l&&d===r)return;r=d,l=u,s.push(St(d,u));const c=o[d]||(o[d]=Object.create(null));c[u]||(c[u]=[])}),n.pending.forEach(a=>{const{provider:d,prefix:u,name:c}=a,h=St(d,u),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(c)||(p.add(c),o[d][u].push(c))}),s.forEach(a=>{const{provider:d,prefix:u}=a;o[d][u].length&&gc(a,o[d][u])}),t?sc(t,n,s):Mo},vc=e=>new Promise((t,i)=>{const n=typeof e=="string"?ii(e,!0):e;if(!n){i(e);return}Bn([n||e],o=>{if(o.length&&n){const s=Ue(n);if(s){t({...ei,...s});return}}i(e)})});function yc(e){try{const t=typeof e=="string"?JSON.parse(e):e;if(typeof t.body=="string")return{...t}}catch{}}function _c(e,t){const i=typeof e=="string"?ii(e,!0,!0):null;if(!i){const s=yc(e);return{value:e,data:s}}const n=Ue(i);if(n!==void 0||!i.prefix)return{value:e,name:i,data:n};const o=Bn([i],()=>t(e,i,Ue(i)));return{value:e,name:i,loading:o}}function ln(e){return e.hasAttribute("inline")}let or=!1;try{or=navigator.vendor.indexOf("Apple")===0}catch{}function wc(e,t){switch(t){case"svg":case"bg":case"mask":return t}return t!=="style"&&(or||e.indexOf("=0;){const o=e.indexOf(">",n),s=e.indexOf("",s);if(r===-1)break;i+=e.slice(o+1,s).trim(),e=e.slice(0,n).trim()+e.slice(r+1)}return{defs:i,content:e}}function Ac(e,t){return e?""+e+""+t:t}function Ec(e,t,i){const n=Cc(e);return Ac(n.defs,t+n.content+i)}const Sc=e=>e==="unset"||e==="undefined"||e==="none";function sr(e,t){const i={...ei,...e},n={...Us,...t},o={left:i.left,top:i.top,width:i.width,height:i.height};let s=i.body;[i,n].forEach(w=>{const v=[],b=w.hFlip,y=w.vFlip;let _=w.rotate;b?y?_+=2:(v.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),v.push("scale(-1 1)"),o.top=o.left=0):y&&(v.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),v.push("scale(1 -1)"),o.top=o.left=0);let $;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:$=o.height/2+o.top,v.unshift("rotate(90 "+$.toString()+" "+$.toString()+")");break;case 2:v.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:$=o.width/2+o.left,v.unshift("rotate(-90 "+$.toString()+" "+$.toString()+")");break}_%2===1&&(o.left!==o.top&&($=o.left,o.left=o.top,o.top=$),o.width!==o.height&&($=o.width,o.width=o.height,o.height=$)),v.length&&(s=Ec(s,'',""))});const r=n.width,l=n.height,a=o.width,d=o.height;let u,c;r===null?(c=l===null?"1em":l==="auto"?d:l,u=wn(c,a/d)):(u=r==="auto"?a:r,c=l===null?wn(u,d/a):l==="auto"?d:l);const h={},p=(w,v)=>{Sc(v)||(h[w]=v.toString())};p("width",u),p("height",c);const f=[o.left,o.top,a,d];return h.viewBox=f.join(" "),{attributes:h,viewBox:f,body:s}}function Un(e,t){let i=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)i+=" "+n+'="'+t[n]+'"';return'"+e+""}function kc(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function Tc(e){return"data:image/svg+xml,"+kc(e)}function rr(e){return'url("'+Tc(e)+'")'}const Oc=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ii=Oc();function Ic(e){Ii=e}function Nc(){return Ii}function Pc(e,t){const i=Gi(e);if(!i)return 0;let n;if(!i.maxURL)n=0;else{let o=0;i.resources.forEach(r=>{o=Math.max(o,r.length)});const s=t+".json?icons=";n=i.maxURL-o-i.path.length-s.length}return n}function Mc(e){return e===404}const Rc=(e,t,i)=>{const n=[],o=Pc(e,t),s="icons";let r={type:s,provider:e,prefix:t,icons:[]},l=0;return i.forEach((a,d)=>{l+=a.length+1,l>=o&&d>0&&(n.push(r),r={type:s,provider:e,prefix:t,icons:[]},l=a.length),r.icons.push(a)}),n.push(r),n};function Lc(e){if(typeof e=="string"){const t=Gi(e);if(t)return t.path}return"/"}const jc=(e,t,i)=>{if(!Ii){i("abort",424);return}let n=Lc(t.provider);switch(t.type){case"icons":{const s=t.prefix,r=t.icons.join(","),l=new URLSearchParams({icons:r});n+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;n+=s.slice(0,1)==="/"?s.slice(1):s;break}default:i("abort",400);return}let o=503;Ii(e+n).then(s=>{const r=s.status;if(r!==200){setTimeout(()=>{i(Mc(r)?"abort":"next",r)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?i("abort",s):i("next",o)});return}setTimeout(()=>{i("success",s)})}).catch(()=>{i("next",o)})},zc={prepare:Rc,send:jc};function Ro(e,t){switch(e){case"local":case"session":Ft[e]=t;break;case"all":for(const i in Ft)Ft[i]=t;break}}const cn="data-style";let ar="";function Dc(e){ar=e}function Lo(e,t){let i=Array.from(e.childNodes).find(n=>n.hasAttribute&&n.hasAttribute(cn));i||(i=document.createElement("style"),i.setAttribute(cn,cn),e.appendChild(i)),i.textContent=":host{display:inline-block;vertical-align:"+(t?"-0.125em":"0")+"}span,svg{display:block}"+ar}function lr(){ko("",zc),qs(!0);let e;try{e=window}catch{}if(e){if(nr(),e.IconifyPreload!==void 0){const t=e.IconifyPreload,i="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Eo(n))&&console.error(i)}catch{console.error(i)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const i in t){const n="IconifyProviders["+i+"] is invalid.";try{const o=t[i];if(typeof o!="object"||!o||o.resources===void 0)continue;To(i,o)||console.error(n)}catch{console.error(n)}}}}return{enableCache:t=>Ro(t,!0),disableCache:t=>Ro(t,!1),iconLoaded:So,iconExists:So,getIcon:ec,listIcons:tc,addIcon:Ys,addCollection:Eo,calculateSize:wn,buildIcon:sr,iconToHTML:Un,svgToURL:rr,loadIcons:Bn,loadIcon:vc,addAPIProvider:To,appendCustomStyle:Dc,_api:{getAPIConfig:Gi,setAPIModule:ko,sendAPIQuery:Qs,setFetch:Ic,getFetch:Nc,listAPIProviders:cc}}}const $n={"background-color":"currentColor"},cr={"background-color":"transparent"},jo={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},zo={"-webkit-mask":$n,mask:$n,background:cr};for(const e in zo){const t=zo[e];for(const i in jo)t[e+"-"+i]=jo[i]}function Do(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Fc(e,t,i){const n=document.createElement("span");let o=e.body;o.indexOf("");const s=e.attributes,r=Un(o,{...s,width:t.width+"",height:t.height+""}),l=rr(r),a=n.style,d={"--svg":l,width:Do(s.width),height:Do(s.height),...i?$n:cr};for(const u in d)a.setProperty(u,d[u]);return n}let Re;function Hc(){try{Re=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Re=null}}function Bc(e){return Re===void 0&&Hc(),Re?Re.createHTML(e):e}function Uc(e){const t=document.createElement("span"),i=e.attributes;let n="";i.width||(n="width: inherit;"),i.height||(n+="height: inherit;"),n&&(i.style=n);const o=Un(e.body,i);return t.innerHTML=Bc(o),t.firstChild}function xn(e){return Array.from(e.childNodes).find(t=>{const i=t.tagName&&t.tagName.toUpperCase();return i==="SPAN"||i==="SVG"})}function Fo(e,t){const i=t.icon.data,n=t.customisations,o=sr(i,n);n.preserveAspectRatio&&(o.attributes.preserveAspectRatio=n.preserveAspectRatio);const s=t.renderedMode;let r;switch(s){case"svg":r=Uc(o);break;default:r=Fc(o,{...ei,...i},s==="mask")}const l=xn(e);l?r.tagName==="SPAN"&&l.tagName===r.tagName?l.setAttribute("style",r.getAttribute("style")):e.replaceChild(r,l):e.appendChild(r)}function Ho(e,t,i){const n=i&&(i.rendered?i:i.lastRender);return{rendered:!1,inline:t,icon:e,lastRender:n}}function Vc(e="iconify-icon"){let t,i;try{t=window.customElements,i=window.HTMLElement}catch{return}if(!t||!i)return;const n=t.get(e);if(n)return n;const o=["icon","mode","inline","observe","width","height","rotate","flip"],s=class extends i{constructor(){super(),Rt(this,"_shadowRoot"),Rt(this,"_initialised",!1),Rt(this,"_state"),Rt(this,"_checkQueued",!1),Rt(this,"_connected",!1),Rt(this,"_observer",null),Rt(this,"_visible",!0);const l=this._shadowRoot=this.attachShadow({mode:"open"}),a=ln(this);Lo(l,a),this._state=Ho({value:""},a),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(l){switch(l){case"inline":{const a=ln(this),d=this._state;a!==d.inline&&(d.inline=a,Lo(this._shadowRoot,a));break}case"observer":{this.observer?this.startObserver():this.stopObserver();break}default:this._queueCheck()}}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return ln(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}get observer(){return this.hasAttribute("observer")}set observer(l){l?this.setAttribute("observer","true"):this.removeAttribute("observer")}restartAnimation(){const l=this._state;if(l.rendered){const a=this._shadowRoot;if(l.renderedMode==="svg")try{a.lastChild.setCurrentTime(0);return}catch{}Fo(a,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,a=this.getAttribute("icon");if(a!==l.icon.value){this._iconChanged(a);return}if(!l.rendered||!this._visible)return;const d=this.getAttribute("mode"),u=Co(this);(l.attrMode!==d||ql(l.customisations,u)||!xn(this._shadowRoot))&&this._renderIcon(l.icon,u,d)}_iconChanged(l){const a=_c(l,(d,u,c)=>{const h=this._state;if(h.rendered||this.getAttribute("icon")!==d)return;const p={value:d,name:u,data:c};p.data?this._gotIconData(p):h.icon=p});a.data?this._gotIconData(a):this._state=Ho(a,this._state.inline,this._state)}_forceRender(){if(!this._visible){const l=xn(this._shadowRoot);l&&this._shadowRoot.removeChild(l);return}this._queueCheck()}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,Co(this),this.getAttribute("mode"))}_renderIcon(l,a,d){const u=wc(l.data.body,d),c=this._state.inline;Fo(this._shadowRoot,this._state={rendered:!0,icon:l,inline:c,customisations:a,attrMode:d,renderedMode:u})}startObserver(){if(!this._observer)try{this._observer=new IntersectionObserver(l=>{const a=l.some(d=>d.isIntersecting);a!==this._visible&&(this._visible=a,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};o.forEach(l=>{l in s.prototype||Object.defineProperty(s.prototype,l,{get:function(){return this.getAttribute(l)},set:function(a){a!==null?this.setAttribute(l,a):this.removeAttribute(l)}})});const r=lr();for(const l in r)s[l]=s.prototype[l]=r[l];return t.define(e,s),s}Vc()||lr();const Wc=I` +*/const Bs=Object.freeze({left:0,top:0,width:16,height:16}),Ti=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ei=Object.freeze({...Bs,...Ti}),mn=Object.freeze({...ei,body:"",hidden:!1}),Ul=Object.freeze({width:null,height:null}),Us=Object.freeze({...Ul,...Ti});function Vl(e,t=0){const i=e.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(i===""){const o=parseInt(e);return isNaN(o)?0:n(o)}else if(i!==e){let o=0;switch(i){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-i.length));return isNaN(s)?0:(s=s/o,s%1===0?n(s):0)}}return t}const Wl=/[\s,]+/;function Gl(e,t){t.split(Wl).forEach(i=>{switch(i.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Vs={...Us,preserveAspectRatio:""};function Co(e){const t={...Vs},i=(n,o)=>e.getAttribute(n)||o;return t.width=i("width",null),t.height=i("height",null),t.rotate=Vl(i("rotate","")),Gl(t,i("flip","")),t.preserveAspectRatio=i("preserveAspectRatio",i("preserveaspectratio","")),t}function ql(e,t){for(const i in Vs)if(e[i]!==t[i])return!0;return!1}const Me=/^[a-z0-9]+(-[a-z0-9]+)*$/,ii=(e,t,i,n="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),a=o.pop(),d={provider:o.length>0?o[0]:n,prefix:a,name:l};return t&&!yi(d)?null:d}const s=o[0],r=s.split("-");if(r.length>1){const l={provider:n,prefix:r.shift(),name:r.join("-")};return t&&!yi(l)?null:l}if(i&&n===""){const l={provider:n,prefix:"",name:s};return t&&!yi(l,i)?null:l}return null},yi=(e,t)=>e?!!((e.provider===""||e.provider.match(Me))&&(t&&e.prefix===""||e.prefix.match(Me))&&e.name.match(Me)):!1;function Yl(e,t){const i={};!e.hFlip!=!t.hFlip&&(i.hFlip=!0),!e.vFlip!=!t.vFlip&&(i.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(i.rotate=n),i}function Ao(e,t){const i=Yl(e,t);for(const n in mn)n in Ti?n in e&&!(n in i)&&(i[n]=Ti[n]):n in t?i[n]=t[n]:n in e&&(i[n]=e[n]);return i}function Xl(e,t){const i=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);function s(r){if(i[r])return o[r]=[];if(!(r in o)){o[r]=null;const l=n[r]&&n[r].parent,a=l&&s(l);a&&(o[r]=[l].concat(a))}return o[r]}return Object.keys(i).concat(Object.keys(n)).forEach(s),o}function Jl(e,t,i){const n=e.icons,o=e.aliases||Object.create(null);let s={};function r(l){s=Ao(n[l]||o[l],s)}return r(t),i.forEach(r),Ao(e,s)}function Ws(e,t){const i=[];if(typeof e!="object"||typeof e.icons!="object")return i;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),i.push(o)});const n=Xl(e);for(const o in n){const s=n[o];s&&(t(o,Jl(e,o,s)),i.push(o))}return i}const Ql={provider:"",aliases:{},not_found:{},...Bs};function rn(e,t){for(const i in t)if(i in e&&typeof e[i]!=typeof t[i])return!1;return!0}function Gs(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!rn(e,Ql))return null;const i=t.icons;for(const o in i){const s=i[o];if(!o.match(Me)||typeof s.body!="string"||!rn(s,mn))return null}const n=t.aliases||Object.create(null);for(const o in n){const s=n[o],r=s.parent;if(!o.match(Me)||typeof r!="string"||!i[r]&&!n[r]||!rn(s,mn))return null}return t}const Oi=Object.create(null);function Zl(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function St(e,t){const i=Oi[e]||(Oi[e]=Object.create(null));return i[t]||(i[t]=Zl(e,t))}function zn(e,t){return Gs(t)?Ws(t,(i,n)=>{n?e.icons[i]=n:e.missing.add(i)}):[]}function Kl(e,t,i){try{if(typeof i.body=="string")return e.icons[t]={...i},!0}catch{}return!1}function tc(e,t){let i=[];return(typeof e=="string"?[e]:Object.keys(Oi)).forEach(n=>{(typeof n=="string"&&typeof t=="string"?[t]:Object.keys(Oi[n]||{})).forEach(o=>{const s=St(n,o);i=i.concat(Object.keys(s.icons).map(r=>(n!==""?"@"+n+":":"")+o+":"+r))})}),i}let Be=!1;function qs(e){return typeof e=="boolean"&&(Be=e),Be}function Ue(e){const t=typeof e=="string"?ii(e,!0,Be):e;if(t){const i=St(t.provider,t.prefix),n=t.name;return i.icons[n]||(i.missing.has(n)?null:void 0)}}function Ys(e,t){const i=ii(e,!0,Be);if(!i)return!1;const n=St(i.provider,i.prefix);return Kl(n,i.name,t)}function Eo(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Be&&!t&&!e.prefix){let o=!1;return Gs(e)&&(e.prefix="",Ws(e,(s,r)=>{r&&Ys(s,r)&&(o=!0)})),o}const i=e.prefix;if(!yi({provider:t,prefix:i,name:"a"}))return!1;const n=St(t,i);return!!zn(n,e)}function So(e){return!!Ue(e)}function ec(e){const t=Ue(e);return t?{...ei,...t}:null}function ic(e){const t={loaded:[],missing:[],pending:[]},i=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let n={provider:"",prefix:"",name:""};return e.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const s=o.provider,r=o.prefix,l=o.name,a=i[s]||(i[s]=Object.create(null)),d=a[r]||(a[r]=St(s,r));let u;l in d.icons?u=t.loaded:r===""||d.missing.has(l)?u=t.missing:u=t.pending;const c={provider:s,prefix:r,name:l};u.push(c)}),t}function Xs(e,t){e.forEach(i=>{const n=i.loaderCallbacks;n&&(i.loaderCallbacks=n.filter(o=>o.id!==t))})}function nc(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let i=!1;const n=e.provider,o=e.prefix;t.forEach(s=>{const r=s.icons,l=r.pending.length;r.pending=r.pending.filter(a=>{if(a.prefix!==o)return!0;const d=a.name;if(e.icons[d])r.loaded.push({provider:n,prefix:o,name:d});else if(e.missing.has(d))r.missing.push({provider:n,prefix:o,name:d});else return i=!0,!0;return!1}),r.pending.length!==l&&(i||Xs([e],s.id),s.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),s.abort))})}))}let oc=0;function sc(e,t,i){const n=oc++,o=Xs.bind(null,i,n);if(!t.pending.length)return o;const s={id:n,icons:t,callback:e,abort:o};return i.forEach(r=>{(r.loaderCallbacks||(r.loaderCallbacks=[])).push(s)}),o}const bn=Object.create(null);function ko(e,t){bn[e]=t}function fn(e){return bn[e]||bn[""]}function rc(e,t=!0,i=!1){const n=[];return e.forEach(o=>{const s=typeof o=="string"?ii(o,t,i):o;s&&n.push(s)}),n}var ac={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function lc(e,t,i,n){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let r;if(e.random){let C=e.resources.slice(0);for(r=[];C.length>1;){const O=Math.floor(Math.random()*C.length);r.push(C[O]),C=C.slice(0,O).concat(C.slice(O+1))}r=r.concat(C)}else r=e.resources.slice(s).concat(e.resources.slice(0,s));const l=Date.now();let a="pending",d=0,u,c=null,h=[],p=[];typeof n=="function"&&p.push(n);function f(){c&&(clearTimeout(c),c=null)}function w(){a==="pending"&&(a="aborted"),f(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function v(C,O){O&&(p=[]),typeof C=="function"&&p.push(C)}function b(){return{startTime:l,payload:t,status:a,queriesSent:d,queriesPending:h.length,subscribe:v,abort:w}}function y(){a="failed",p.forEach(C=>{C(void 0,u)})}function _(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function x(C,O,P){const S=O!=="success";switch(h=h.filter(E=>E!==C),a){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(O==="abort"){u=P,y();return}if(S){u=P,h.length||(r.length?A():y());return}if(f(),_(),!e.random){const E=e.resources.indexOf(C.resource);E!==-1&&E!==e.index&&(e.index=E)}a="completed",p.forEach(E=>{E(P)})}function A(){if(a!=="pending")return;f();const C=r.shift();if(C===void 0){if(h.length){c=setTimeout(()=>{f(),a==="pending"&&(_(),y())},e.timeout);return}y();return}const O={status:"pending",resource:C,callback:(P,S)=>{x(O,P,S)}};h.push(O),d++,c=setTimeout(A,e.rotate),i(C,t,O.callback)}return setTimeout(A),b}function Js(e){const t={...ac,...e};let i=[];function n(){i=i.filter(r=>r().status==="pending")}function o(r,l,a){const d=lc(t,r,l,(u,c)=>{n(),a&&a(u,c)});return i.push(d),d}function s(r){return i.find(l=>r(l))||null}return{query:o,find:s,setIndex:r=>{t.index=r},getIndex:()=>t.index,cleanup:n}}function Dn(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Wi=Object.create(null),mi=["https://api.simplesvg.com","https://api.unisvg.com"],gn=[];for(;mi.length>0;)mi.length===1||Math.random()>.5?gn.push(mi.shift()):gn.push(mi.pop());Wi[""]=Dn({resources:["https://api.iconify.design"].concat(gn)});function To(e,t){const i=Dn(t);return i===null?!1:(Wi[e]=i,!0)}function Gi(e){return Wi[e]}function cc(){return Object.keys(Wi)}function Oo(){}const an=Object.create(null);function dc(e){if(!an[e]){const t=Gi(e);if(!t)return;const i=Js(t),n={config:t,redundancy:i};an[e]=n}return an[e]}function Qs(e,t,i){let n,o;if(typeof e=="string"){const s=fn(e);if(!s)return i(void 0,424),Oo;o=s.send;const r=dc(e);r&&(n=r.redundancy)}else{const s=Dn(e);if(s){n=Js(s);const r=e.resources?e.resources[0]:"",l=fn(r);l&&(o=l.send)}}return!n||!o?(i(void 0,424),Oo):n.query(t,o,i)().abort}const Io="iconify2",Ve="iconify",Zs=Ve+"-count",No=Ve+"-version",Ks=36e5,uc=168,hc=50;function vn(e,t){try{return e.getItem(t)}catch{}}function Fn(e,t,i){try{return e.setItem(t,i),!0}catch{}}function Po(e,t){try{e.removeItem(t)}catch{}}function yn(e,t){return Fn(e,Zs,t.toString())}function _n(e){return parseInt(vn(e,Zs))||0}const Ft={local:!0,session:!0},tr={local:new Set,session:new Set};let Hn=!1;function pc(e){Hn=e}let bi=typeof window>"u"?{}:window;function er(e){const t=e+"Storage";try{if(bi&&bi[t]&&typeof bi[t].length=="number")return bi[t]}catch{}Ft[e]=!1}function ir(e,t){const i=er(e);if(!i)return;const n=vn(i,No);if(n!==Io){if(n){const l=_n(i);for(let a=0;a{const a=Ve+l.toString(),d=vn(i,a);if(typeof d=="string"){try{const u=JSON.parse(d);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,l))return!0}catch{}Po(i,a)}};let r=_n(i);for(let l=r-1;l>=0;l--)s(l)||(l===r-1?(r--,yn(i,r)):tr[e].add(l))}function nr(){if(!Hn){pc(!0);for(const e in Ft)ir(e,t=>{const i=t.data,n=t.provider,o=i.prefix,s=St(n,o);if(!zn(s,i).length)return!1;const r=i.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,r):r,!0})}}function mc(e,t){const i=e.lastModifiedCached;if(i&&i>=t)return i===t;if(e.lastModifiedCached=t,i)for(const n in Ft)ir(n,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function bc(e,t){Hn||nr();function i(n){let o;if(!Ft[n]||!(o=er(n)))return;const s=tr[n];let r;if(s.size)s.delete(r=Array.from(s).shift());else if(r=_n(o),r>=hc||!yn(o,r+1))return;const l={cached:Math.floor(Date.now()/Ks),provider:e.provider,data:t};return Fn(o,Ve+r.toString(),JSON.stringify(l))}t.lastModified&&!mc(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),i("local")||i("session"))}function Mo(){}function fc(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,nc(e)}))}function gc(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:i,prefix:n}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;!o||!(s=fn(i))||s.prepare(i,n,o).forEach(r=>{Qs(i,r,l=>{if(typeof l!="object")r.icons.forEach(a=>{e.missing.add(a)});else try{const a=zn(e,l);if(!a.length)return;const d=e.pendingIcons;d&&a.forEach(u=>{d.delete(u)}),bc(e,l)}catch(a){console.error(a)}fc(e)})})}))}const Bn=(e,t)=>{const i=rc(e,!0,qs()),n=ic(i);if(!n.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(n.loaded,n.missing,n.pending,Mo)}),()=>{a=!1}}const o=Object.create(null),s=[];let r,l;return n.pending.forEach(a=>{const{provider:d,prefix:u}=a;if(u===l&&d===r)return;r=d,l=u,s.push(St(d,u));const c=o[d]||(o[d]=Object.create(null));c[u]||(c[u]=[])}),n.pending.forEach(a=>{const{provider:d,prefix:u,name:c}=a,h=St(d,u),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(c)||(p.add(c),o[d][u].push(c))}),s.forEach(a=>{const{provider:d,prefix:u}=a;o[d][u].length&&gc(a,o[d][u])}),t?sc(t,n,s):Mo},vc=e=>new Promise((t,i)=>{const n=typeof e=="string"?ii(e,!0):e;if(!n){i(e);return}Bn([n||e],o=>{if(o.length&&n){const s=Ue(n);if(s){t({...ei,...s});return}}i(e)})});function yc(e){try{const t=typeof e=="string"?JSON.parse(e):e;if(typeof t.body=="string")return{...t}}catch{}}function _c(e,t){const i=typeof e=="string"?ii(e,!0,!0):null;if(!i){const s=yc(e);return{value:e,data:s}}const n=Ue(i);if(n!==void 0||!i.prefix)return{value:e,name:i,data:n};const o=Bn([i],()=>t(e,i,Ue(i)));return{value:e,name:i,loading:o}}function ln(e){return e.hasAttribute("inline")}let or=!1;try{or=navigator.vendor.indexOf("Apple")===0}catch{}function wc(e,t){switch(t){case"svg":case"bg":case"mask":return t}return t!=="style"&&(or||e.indexOf("=0;){const o=e.indexOf(">",n),s=e.indexOf("",s);if(r===-1)break;i+=e.slice(o+1,s).trim(),e=e.slice(0,n).trim()+e.slice(r+1)}return{defs:i,content:e}}function Ac(e,t){return e?""+e+""+t:t}function Ec(e,t,i){const n=Cc(e);return Ac(n.defs,t+n.content+i)}const Sc=e=>e==="unset"||e==="undefined"||e==="none";function sr(e,t){const i={...ei,...e},n={...Us,...t},o={left:i.left,top:i.top,width:i.width,height:i.height};let s=i.body;[i,n].forEach(w=>{const v=[],b=w.hFlip,y=w.vFlip;let _=w.rotate;b?y?_+=2:(v.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),v.push("scale(-1 1)"),o.top=o.left=0):y&&(v.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),v.push("scale(1 -1)"),o.top=o.left=0);let x;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:x=o.height/2+o.top,v.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:v.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:x=o.width/2+o.left,v.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}_%2===1&&(o.left!==o.top&&(x=o.left,o.left=o.top,o.top=x),o.width!==o.height&&(x=o.width,o.width=o.height,o.height=x)),v.length&&(s=Ec(s,'',""))});const r=n.width,l=n.height,a=o.width,d=o.height;let u,c;r===null?(c=l===null?"1em":l==="auto"?d:l,u=wn(c,a/d)):(u=r==="auto"?a:r,c=l===null?wn(u,d/a):l==="auto"?d:l);const h={},p=(w,v)=>{Sc(v)||(h[w]=v.toString())};p("width",u),p("height",c);const f=[o.left,o.top,a,d];return h.viewBox=f.join(" "),{attributes:h,viewBox:f,body:s}}function Un(e,t){let i=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)i+=" "+n+'="'+t[n]+'"';return'"+e+""}function kc(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function Tc(e){return"data:image/svg+xml,"+kc(e)}function rr(e){return'url("'+Tc(e)+'")'}const Oc=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ii=Oc();function Ic(e){Ii=e}function Nc(){return Ii}function Pc(e,t){const i=Gi(e);if(!i)return 0;let n;if(!i.maxURL)n=0;else{let o=0;i.resources.forEach(r=>{o=Math.max(o,r.length)});const s=t+".json?icons=";n=i.maxURL-o-i.path.length-s.length}return n}function Mc(e){return e===404}const Rc=(e,t,i)=>{const n=[],o=Pc(e,t),s="icons";let r={type:s,provider:e,prefix:t,icons:[]},l=0;return i.forEach((a,d)=>{l+=a.length+1,l>=o&&d>0&&(n.push(r),r={type:s,provider:e,prefix:t,icons:[]},l=a.length),r.icons.push(a)}),n.push(r),n};function Lc(e){if(typeof e=="string"){const t=Gi(e);if(t)return t.path}return"/"}const jc=(e,t,i)=>{if(!Ii){i("abort",424);return}let n=Lc(t.provider);switch(t.type){case"icons":{const s=t.prefix,r=t.icons.join(","),l=new URLSearchParams({icons:r});n+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;n+=s.slice(0,1)==="/"?s.slice(1):s;break}default:i("abort",400);return}let o=503;Ii(e+n).then(s=>{const r=s.status;if(r!==200){setTimeout(()=>{i(Mc(r)?"abort":"next",r)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?i("abort",s):i("next",o)});return}setTimeout(()=>{i("success",s)})}).catch(()=>{i("next",o)})},zc={prepare:Rc,send:jc};function Ro(e,t){switch(e){case"local":case"session":Ft[e]=t;break;case"all":for(const i in Ft)Ft[i]=t;break}}const cn="data-style";let ar="";function Dc(e){ar=e}function Lo(e,t){let i=Array.from(e.childNodes).find(n=>n.hasAttribute&&n.hasAttribute(cn));i||(i=document.createElement("style"),i.setAttribute(cn,cn),e.appendChild(i)),i.textContent=":host{display:inline-block;vertical-align:"+(t?"-0.125em":"0")+"}span,svg{display:block}"+ar}function lr(){ko("",zc),qs(!0);let e;try{e=window}catch{}if(e){if(nr(),e.IconifyPreload!==void 0){const t=e.IconifyPreload,i="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Eo(n))&&console.error(i)}catch{console.error(i)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const i in t){const n="IconifyProviders["+i+"] is invalid.";try{const o=t[i];if(typeof o!="object"||!o||o.resources===void 0)continue;To(i,o)||console.error(n)}catch{console.error(n)}}}}return{enableCache:t=>Ro(t,!0),disableCache:t=>Ro(t,!1),iconLoaded:So,iconExists:So,getIcon:ec,listIcons:tc,addIcon:Ys,addCollection:Eo,calculateSize:wn,buildIcon:sr,iconToHTML:Un,svgToURL:rr,loadIcons:Bn,loadIcon:vc,addAPIProvider:To,appendCustomStyle:Dc,_api:{getAPIConfig:Gi,setAPIModule:ko,sendAPIQuery:Qs,setFetch:Ic,getFetch:Nc,listAPIProviders:cc}}}const xn={"background-color":"currentColor"},cr={"background-color":"transparent"},jo={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},zo={"-webkit-mask":xn,mask:xn,background:cr};for(const e in zo){const t=zo[e];for(const i in jo)t[e+"-"+i]=jo[i]}function Do(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Fc(e,t,i){const n=document.createElement("span");let o=e.body;o.indexOf("");const s=e.attributes,r=Un(o,{...s,width:t.width+"",height:t.height+""}),l=rr(r),a=n.style,d={"--svg":l,width:Do(s.width),height:Do(s.height),...i?xn:cr};for(const u in d)a.setProperty(u,d[u]);return n}let Re;function Hc(){try{Re=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Re=null}}function Bc(e){return Re===void 0&&Hc(),Re?Re.createHTML(e):e}function Uc(e){const t=document.createElement("span"),i=e.attributes;let n="";i.width||(n="width: inherit;"),i.height||(n+="height: inherit;"),n&&(i.style=n);const o=Un(e.body,i);return t.innerHTML=Bc(o),t.firstChild}function $n(e){return Array.from(e.childNodes).find(t=>{const i=t.tagName&&t.tagName.toUpperCase();return i==="SPAN"||i==="SVG"})}function Fo(e,t){const i=t.icon.data,n=t.customisations,o=sr(i,n);n.preserveAspectRatio&&(o.attributes.preserveAspectRatio=n.preserveAspectRatio);const s=t.renderedMode;let r;switch(s){case"svg":r=Uc(o);break;default:r=Fc(o,{...ei,...i},s==="mask")}const l=$n(e);l?r.tagName==="SPAN"&&l.tagName===r.tagName?l.setAttribute("style",r.getAttribute("style")):e.replaceChild(r,l):e.appendChild(r)}function Ho(e,t,i){const n=i&&(i.rendered?i:i.lastRender);return{rendered:!1,inline:t,icon:e,lastRender:n}}function Vc(e="iconify-icon"){let t,i;try{t=window.customElements,i=window.HTMLElement}catch{return}if(!t||!i)return;const n=t.get(e);if(n)return n;const o=["icon","mode","inline","observe","width","height","rotate","flip"],s=class extends i{constructor(){super(),Rt(this,"_shadowRoot"),Rt(this,"_initialised",!1),Rt(this,"_state"),Rt(this,"_checkQueued",!1),Rt(this,"_connected",!1),Rt(this,"_observer",null),Rt(this,"_visible",!0);const l=this._shadowRoot=this.attachShadow({mode:"open"}),a=ln(this);Lo(l,a),this._state=Ho({value:""},a),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(l){switch(l){case"inline":{const a=ln(this),d=this._state;a!==d.inline&&(d.inline=a,Lo(this._shadowRoot,a));break}case"observer":{this.observer?this.startObserver():this.stopObserver();break}default:this._queueCheck()}}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return ln(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}get observer(){return this.hasAttribute("observer")}set observer(l){l?this.setAttribute("observer","true"):this.removeAttribute("observer")}restartAnimation(){const l=this._state;if(l.rendered){const a=this._shadowRoot;if(l.renderedMode==="svg")try{a.lastChild.setCurrentTime(0);return}catch{}Fo(a,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,a=this.getAttribute("icon");if(a!==l.icon.value){this._iconChanged(a);return}if(!l.rendered||!this._visible)return;const d=this.getAttribute("mode"),u=Co(this);(l.attrMode!==d||ql(l.customisations,u)||!$n(this._shadowRoot))&&this._renderIcon(l.icon,u,d)}_iconChanged(l){const a=_c(l,(d,u,c)=>{const h=this._state;if(h.rendered||this.getAttribute("icon")!==d)return;const p={value:d,name:u,data:c};p.data?this._gotIconData(p):h.icon=p});a.data?this._gotIconData(a):this._state=Ho(a,this._state.inline,this._state)}_forceRender(){if(!this._visible){const l=$n(this._shadowRoot);l&&this._shadowRoot.removeChild(l);return}this._queueCheck()}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,Co(this),this.getAttribute("mode"))}_renderIcon(l,a,d){const u=wc(l.data.body,d),c=this._state.inline;Fo(this._shadowRoot,this._state={rendered:!0,icon:l,inline:c,customisations:a,attrMode:d,renderedMode:u})}startObserver(){if(!this._observer)try{this._observer=new IntersectionObserver(l=>{const a=l.some(d=>d.isIntersecting);a!==this._visible&&(this._visible=a,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};o.forEach(l=>{l in s.prototype||Object.defineProperty(s.prototype,l,{get:function(){return this.getAttribute(l)},set:function(a){a!==null?this.setAttribute(l,a):this.removeAttribute(l)}})});const r=lr();for(const l in r)s[l]=s.prototype[l]=r[l];return t.define(e,s),s}Vc()||lr();const Wc=I` ::-webkit-scrollbar { width: 0.4rem; height: 0.4rem; @@ -995,7 +995,7 @@ import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as zi,d as Tn,W as Xe,S as ::slotted(bim-panel-section:not(:last-child)) { border-bottom: 1px solid var(--bim-ui_bg-contrast-20); } - `];let Xt=wr;ri([g({type:String,reflect:!0})],Xt.prototype,"icon",2);ri([g({type:String,reflect:!0})],Xt.prototype,"name",2);ri([g({type:String,reflect:!0})],Xt.prototype,"label",2);ri([g({type:Boolean,reflect:!0})],Xt.prototype,"hidden",1);ri([g({type:Boolean,attribute:"header-hidden",reflect:!0})],Xt.prototype,"headerHidden",2);var pd=Object.defineProperty,ai=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&pd(t,i,o),o};const $r=class extends T{constructor(){super(...arguments),this.onValueChange=new Event("change"),this.valueTransform={}}get value(){const e=this.parentElement;let t;return e instanceof Xt&&(t=e.valueTransform),Object.values(this.valueTransform).length!==0&&(t=this.valueTransform),We(this,t)}set value(e){const t=[...this.children];for(const i in e){const n=t.find(s=>{const r=s;return r.name===i||r.label===i});if(!n)continue;const o=n;o.value=e[i]}}onHeaderClick(){this.fixed||(this.collapsed=!this.collapsed)}render(){const e=this.label||this.icon||this.name||this.fixed,t=m`{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&pd(t,i,o),o};const xr=class extends T{constructor(){super(...arguments),this.onValueChange=new Event("change"),this.valueTransform={}}get value(){const e=this.parentElement;let t;return e instanceof Xt&&(t=e.valueTransform),Object.values(this.valueTransform).length!==0&&(t=this.valueTransform),We(this,t)}set value(e){const t=[...this.children];for(const i in e){const n=t.find(s=>{const r=s;return r.name===i||r.label===i});if(!n)continue;const o=n;o.value=e[i]}}onHeaderClick(){this.fixed||(this.collapsed=!this.collapsed)}render(){const e=this.label||this.icon||this.name||this.fixed,t=m`
- `}};$r.styles=[Tt.scrollbar,I` + `}};xr.styles=[Tt.scrollbar,I` :host { display: block; pointer-events: auto; @@ -1083,7 +1083,7 @@ import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as zi,d as Tn,W as Xe,S as bim-label { pointer-events: none; } - `];let _e=$r;ai([g({type:String,reflect:!0})],_e.prototype,"icon");ai([g({type:String,reflect:!0})],_e.prototype,"label");ai([g({type:String,reflect:!0})],_e.prototype,"name");ai([g({type:Boolean,reflect:!0})],_e.prototype,"fixed");ai([g({type:Boolean,reflect:!0})],_e.prototype,"collapsed");var md=Object.defineProperty,li=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&md(t,i,o),o};const xr=class extends T{constructor(){super(...arguments),this.vertical=!1,this.onValueChange=new Event("change"),this._canEmitEvents=!1,this._value=document.createElement("bim-option"),this.onOptionClick=e=>{this._value=e.target,this.dispatchEvent(this.onValueChange);for(const t of this.children)t instanceof H&&(t.checked=t===e.target)}}get _options(){return[...this.querySelectorAll("bim-option")]}set value(e){const t=this.findOption(e);if(t){for(const i of this._options)i.checked=i===t;this._value=t,this._canEmitEvents&&this.dispatchEvent(this.onValueChange)}}get value(){return this._value.value}onSlotChange(e){const t=e.target.assignedElements();for(const i of t)i instanceof H&&(i.noMark=!0,i.removeEventListener("click",this.onOptionClick),i.addEventListener("click",this.onOptionClick))}findOption(e){return this._options.find(t=>t instanceof H?t.label===e||t.value===e:!1)}firstUpdated(){const e=[...this.children].find(t=>t instanceof H&&t.checked);e&&(this._value=e)}render(){return m` + `];let _e=xr;ai([g({type:String,reflect:!0})],_e.prototype,"icon");ai([g({type:String,reflect:!0})],_e.prototype,"label");ai([g({type:String,reflect:!0})],_e.prototype,"name");ai([g({type:Boolean,reflect:!0})],_e.prototype,"fixed");ai([g({type:Boolean,reflect:!0})],_e.prototype,"collapsed");var md=Object.defineProperty,li=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&md(t,i,o),o};const $r=class extends T{constructor(){super(...arguments),this.vertical=!1,this.onValueChange=new Event("change"),this._canEmitEvents=!1,this._value=document.createElement("bim-option"),this.onOptionClick=e=>{this._value=e.target,this.dispatchEvent(this.onValueChange);for(const t of this.children)t instanceof H&&(t.checked=t===e.target)}}get _options(){return[...this.querySelectorAll("bim-option")]}set value(e){const t=this.findOption(e);if(t){for(const i of this._options)i.checked=i===t;this._value=t,this._canEmitEvents&&this.dispatchEvent(this.onValueChange)}}get value(){return this._value.value}onSlotChange(e){const t=e.target.assignedElements();for(const i of t)i instanceof H&&(i.noMark=!0,i.removeEventListener("click",this.onOptionClick),i.addEventListener("click",this.onOptionClick))}findOption(e){return this._options.find(t=>t instanceof H?t.label===e||t.value===e:!1)}firstUpdated(){const e=[...this.children].find(t=>t instanceof H&&t.checked);e&&(this._value=e)}render(){return m` - `}};xr.styles=I` + `}};$r.styles=I` :host { --bim-input--bgc: var(--bim-ui_bg-contrast-20); --bim-input--g: 0; @@ -1108,7 +1108,7 @@ import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as zi,d as Tn,W as Xe,S as --bim-label--c: var(--bim-ui_main-contrast); background-color: var(--bim-ui_main-base); } - `;let we=xr;li([g({type:String,reflect:!0})],we.prototype,"name");li([g({type:String,reflect:!0})],we.prototype,"icon");li([g({type:String,reflect:!0})],we.prototype,"label");li([g({type:Boolean,reflect:!0})],we.prototype,"vertical");li([fe()],we.prototype,"_value");const bd=()=>m` + `;let we=$r;li([g({type:String,reflect:!0})],we.prototype,"name");li([g({type:String,reflect:!0})],we.prototype,"icon");li([g({type:String,reflect:!0})],we.prototype,"label");li([g({type:Boolean,reflect:!0})],we.prototype,"vertical");li([fe()],we.prototype,"_value");const bd=()=>m`