@hotosm/ui 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +15 -5
  2. package/dist/chunks/{chunk.MKQTK2RW.js → chunk.347QGSW2.js} +1 -1
  3. package/dist/chunks/{chunk.IKKWEPSE.js → chunk.45EZ2EC2.js} +1 -1
  4. package/dist/chunks/{chunk.DNXHV7I7.js → chunk.54C4CCIE.js} +1 -1
  5. package/dist/chunks/{chunk.V5BQICX2.js → chunk.6HIYAU2K.js} +1 -1
  6. package/dist/chunks/{chunk.L7KUSNV7.js → chunk.AYSFL7J5.js} +1 -1
  7. package/dist/chunks/{chunk.N7SRHM5F.js → chunk.B3F7XGIL.js} +1 -1
  8. package/dist/chunks/{chunk.NCBKWO6J.js → chunk.B77WIT2F.js} +1 -1
  9. package/dist/chunks/{chunk.UB7NXUCE.js → chunk.BWW4EBSJ.js} +33 -39
  10. package/dist/chunks/{chunk.WENKDNDZ.js → chunk.DMESFENF.js} +1 -1
  11. package/dist/chunks/{chunk.ZETV7TDG.js → chunk.DVVFVLNQ.js} +1 -1
  12. package/dist/chunks/{chunk.NZMGMJCM.js → chunk.GP3AB7RO.js} +1 -1
  13. package/dist/chunks/{chunk.THIZOVTW.js → chunk.GQ4LISAU.js} +1 -1
  14. package/dist/chunks/{chunk.QABMDRWR.js → chunk.HOF672RD.js} +1 -1
  15. package/dist/chunks/chunk.HQKELQDW.js +144 -0
  16. package/dist/chunks/{chunk.ZZ7X3H3S.js → chunk.HZNHTKN6.js} +1 -1
  17. package/dist/chunks/{chunk.IASKXF74.js → chunk.IV3UXIV2.js} +1 -1
  18. package/dist/chunks/{chunk.M2F6Z3GI.js → chunk.IVW6CBE7.js} +1 -1
  19. package/dist/chunks/{chunk.SOBALH23.js → chunk.LH3TTPVQ.js} +1 -1
  20. package/dist/chunks/{chunk.ZKUACKKG.js → chunk.LIASDRWH.js} +1 -1
  21. package/dist/chunks/{chunk.34AG3B2Y.js → chunk.LJ4XIP4K.js} +1 -1
  22. package/dist/chunks/{chunk.L2GREEZE.js → chunk.N2MY7EL5.js} +1 -1
  23. package/dist/chunks/{chunk.UVBWHOA2.js → chunk.TJOQKPXN.js} +1 -1
  24. package/dist/chunks/{chunk.ZG2J5SU5.js → chunk.TMPPHKMO.js} +1 -1
  25. package/dist/chunks/{chunk.TUEFHEUN.js → chunk.VSRVTIBV.js} +1 -1
  26. package/dist/components/announcement/announcement.component.js +1 -1
  27. package/dist/components/announcement/announcement.js +1 -1
  28. package/dist/components/consent/consent.component.js +1 -1
  29. package/dist/components/consent/consent.js +1 -1
  30. package/dist/components/consent/consent.styles.js +1 -1
  31. package/dist/components/file-input-dropzone/file-input-dropzone.component.js +1 -1
  32. package/dist/components/file-input-dropzone/file-input-dropzone.js +1 -1
  33. package/dist/components/file-input-dropzone/file-input-dropzone.styles.js +1 -1
  34. package/dist/components/header/header.component.d.ts +13 -28
  35. package/dist/components/header/header.component.js +1 -1
  36. package/dist/components/header/header.js +1 -1
  37. package/dist/components/header/header.styles.js +1 -1
  38. package/dist/components/list-card/list-card.component.js +1 -1
  39. package/dist/components/list-card/list-card.js +1 -1
  40. package/dist/components/list-card/list-card.styles.js +1 -1
  41. package/dist/components/logo/logo.component.js +1 -1
  42. package/dist/components/logo/logo.js +1 -1
  43. package/dist/components/logo/logo.styles.js +1 -1
  44. package/dist/components/tool-menu/tool-menu.component.js +1 -1
  45. package/dist/components/tool-menu/tool-menu.js +1 -1
  46. package/dist/components/tool-menu/tool-menu.styles.js +1 -1
  47. package/dist/components/tracking/tracking.component.js +1 -1
  48. package/dist/components/tracking/tracking.js +1 -1
  49. package/dist/hotosm-ui.js +1 -1
  50. package/package.json +1 -1
  51. package/dist/chunks/chunk.LLGJXBVH.js +0 -163
package/README.md CHANGED
@@ -188,9 +188,11 @@ already included in `style.css`).
188
188
 
189
189
  ### Via CDN / Plain HTML / HTMX
190
190
 
191
- Use jsDelivr's `/+esm` endpoint, which rewrites bare-module specifiers
192
- server-side - no import map needed. Same strategy as bundlers: register
193
- everything before anything renders.
191
+ Load the raw dist files, with an import map to resolve the bare
192
+ `@awesome.me/webawesome/...` imports in `webawesome-all.js`. The map's
193
+ WebAwesome pin must match the version this `@hotosm/ui` release was
194
+ built against. Do not use jsDelivr's `/+esm` URLs - they duplicate
195
+ element registrations and most `wa-*` elements never register.
194
196
 
195
197
  <!-- markdownlint-disable MD013 -->
196
198
 
@@ -204,14 +206,22 @@ everything before anything renders.
204
206
  <!-- WebAwesome base styles + HOT theme, self-contained -->
205
207
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hotosm/ui@1.0.0/dist/style.css" />
206
208
 
209
+ <script type="importmap">
210
+ {
211
+ "imports": {
212
+ "@awesome.me/webawesome/dist/components/": "https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3.11.0/dist-cdn/components/"
213
+ }
214
+ }
215
+ </script>
216
+
207
217
  <!-- Register every wa-* element, then the hot-* components -->
208
218
  <script
209
219
  type="module"
210
- src="https://cdn.jsdelivr.net/npm/@hotosm/ui@1.0.0/dist/webawesome-all.js/+esm"
220
+ src="https://cdn.jsdelivr.net/npm/@hotosm/ui@1.0.0/dist/webawesome-all.js"
211
221
  ></script>
212
222
  <script
213
223
  type="module"
214
- src="https://cdn.jsdelivr.net/npm/@hotosm/ui@1.0.0/dist/hotosm-ui.js/+esm"
224
+ src="https://cdn.jsdelivr.net/npm/@hotosm/ui@1.0.0/dist/hotosm-ui.js"
215
225
  ></script>
216
226
  </head>
217
227
 
@@ -1 +1 @@
1
- import{b as t}from"./chunk.NCBKWO6J.js";var a=t;customElements.get("hot-list-card")||customElements.define("hot-list-card",t);export{a};
1
+ import{b as t}from"./chunk.B77WIT2F.js";var a=t;customElements.get("hot-list-card")||customElements.define("hot-list-card",t);export{a};
@@ -1,4 +1,4 @@
1
- import{a as M}from"./chunk.L7KUSNV7.js";import{a as f,b as m,c as z}from"./chunk.ZETV7TDG.js";import{d as h,e as x,f as F}from"./chunk.QABMDRWR.js";import{d as n,e as o,f as d,g as c}from"./chunk.N2W26RCT.js";var E={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},y=l=>(...a)=>({_$litDirective$:l,values:a}),$=class{constructor(a){}get _$AU(){return this._$AM._$AU}_$AT(a,e,i){this._$Ct=a,this._$AM=e,this._$Ci=i}_$AS(a,e){return this.update(a,e)}update(a,e){return this.render(...e)}};var _=y(class extends ${constructor(l){var a;if(super(l),l.type!==E.ATTRIBUTE||l.name!=="class"||((a=l.strings)==null?void 0:a.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(l){return" "+Object.keys(l).filter(a=>l[a]).join(" ")+" "}update(l,[a]){var i,s;if(this.st===void 0){this.st=new Set,l.strings!==void 0&&(this.nt=new Set(l.strings.join(" ").split(/\s/).filter(t=>t!=="")));for(let t in a)a[t]&&!((i=this.nt)!=null&&i.has(t))&&this.st.add(t);return this.render(a)}let e=l.element.classList;for(let t of this.st)t in a||(e.remove(t),this.st.delete(t));for(let t in a){let p=!!a[t];p===this.st.has(t)||(s=this.nt)!=null&&s.has(t)||(p?(e.add(t),this.st.add(t)):(e.remove(t),this.st.delete(t)))}return x}});Promise.allSettled([import("@awesome.me/webawesome/dist/components/icon/icon.js"),import("@awesome.me/webawesome/dist/components/divider/divider.js")]);var S,T,C,D,P,A,B,L,k,W,I,O,r=class extends F{constructor(){super(...arguments);this.name="hot-file-input-dropzone";d(this,S,!1);d(this,T,"");d(this,C,0);d(this,D,!1);d(this,P,!1);d(this,A,"");d(this,B,"traditional");d(this,L,!1);d(this,k,[]);d(this,W,"");d(this,I,"");d(this,O)}get multiple(){return o(this,S)}set multiple(e){c(this,S,e)}get accept(){return o(this,T)}set accept(e){c(this,T,e)}get maxSize(){return o(this,C)}set maxSize(e){c(this,C,e)}get showPreview(){return o(this,D)}set showPreview(e){c(this,D,e)}get disabled(){return o(this,P)}set disabled(e){c(this,P,e)}get label(){return o(this,A)}set label(e){c(this,A,e)}get variant(){return o(this,B)}set variant(e){c(this,B,e)}get isDragging(){return o(this,L)}set isDragging(e){c(this,L,e)}get selectedFiles(){return o(this,k)}set selectedFiles(e){c(this,k,e)}get errorMessage(){return o(this,W)}set errorMessage(e){c(this,W,e)}get statusMessage(){return o(this,I)}set statusMessage(e){c(this,I,e)}get fileInput(){return o(this,O)}set fileInput(e){c(this,O,e)}_generateId(){return`file-${Date.now()}-${Math.random().toString(36).substring(2,11)}`}_handleDragOver(e){e.preventDefault(),e.stopPropagation(),this.disabled||(this.isDragging=!0)}_handleDragLeave(e){e.preventDefault(),e.stopPropagation(),this.isDragging=!1}_handleDrop(e){var s;if(e.preventDefault(),e.stopPropagation(),this.isDragging=!1,this.disabled)return;let i=Array.from(((s=e.dataTransfer)==null?void 0:s.files)||[]);this._processFiles(i)}_handleClick(){this.disabled||this.fileInput.click()}_handleKeyDown(e){!this.disabled&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.fileInput.click())}_handleFileInputChange(e){let i=e.target,s=Array.from(i.files||[]);this._processFiles(s)}_processFiles(e){if(this.errorMessage="",!this.multiple&&e.length>1){this.errorMessage="Only one file can be selected";return}if(this.accept){let t=this.accept.split(",").map(u=>u.trim().toLowerCase()),p=e.filter(u=>{let b=u.name.toLowerCase(),g=u.type.toLowerCase();return!t.some(v=>{if(v.startsWith("."))return b.endsWith(v);if(v.endsWith("/*")){let w=v.split("/")[0];if(g)return g.startsWith(w+"/");let j=b.substring(b.lastIndexOf("."));return this._getFileIcon(j).includes(w)}return g?g===v:!1})});if(p.length>0){this.errorMessage=`Invalid file type(s): ${p.map(u=>u.name).join(", ")}`;return}}if(this.maxSize>0){let t=e.filter(p=>p.size>this.maxSize);if(t.length>0){this.errorMessage=`File(s) exceed maximum size of ${this._formatFileSize(this.maxSize)}: ${t.map(p=>p.name).join(", ")}`;return}}let i=e.map(t=>({file:t,id:this._generateId()}));this.multiple?this.selectedFiles=[...i,...this.selectedFiles]:this.selectedFiles=i,this.dispatchEvent(new CustomEvent("hot-file-change",{detail:{files:this.selectedFiles.map(t=>t.file)},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("hot-files-selected",{detail:{files:i.map(t=>t.file),allFiles:this.selectedFiles.map(t=>t.file)},bubbles:!0,composed:!0}));let s=i.length;this.statusMessage=`${s} ${s===1?"file":"files"} selected: ${i.map(t=>t.file.name).join(", ")}`}_removeFile(e){let i=this.selectedFiles.find(s=>s.id===e);this.selectedFiles=this.selectedFiles.filter(s=>s.id!==e),this.fileInput&&(this.fileInput.value=""),this.dispatchEvent(new CustomEvent("hot-file-change",{detail:{files:this.selectedFiles.map(s=>s.file)},bubbles:!0,composed:!0})),i&&(this.statusMessage=`File removed: ${i.file.name}. ${this.selectedFiles.length} ${this.selectedFiles.length===1?"file":"files"} remaining.`)}_formatFileSize(e){if(e===0)return"0 Bytes";let i=1e3,s=["Bytes","KB","MB","GB"],t=Math.floor(Math.log(e)/Math.log(i)),p=e/Math.pow(i,t);return`${Math.round(p*10)/10} ${s[t]}`}_getFileIcon(e){return e.startsWith("image/")?"file-image":e.startsWith("video/")?"file-video":e.startsWith("audio/")?"file-audio":e==="application/pdf"?"file-pdf":e.includes("word")?"file-word":e.includes("sheet")||e.includes("excel")?"file-excel":e.includes("zip")||e.includes("rar")||e.includes("7z")?"file-archive":e.includes("text")?"file-text":"file"}clearFiles(){this.selectedFiles=[],this.errorMessage="",this.fileInput&&(this.fileInput.value="")}getFiles(){return this.selectedFiles.map(e=>e.file)}render(){let e={dropzone:!0,"dropzone--dragging":this.isDragging,"dropzone--disabled":this.disabled,"dropzone--has-files":this.selectedFiles.length>0,"dropzone--compact":this.variant==="compact"},i=this.variant==="compact";return h`
1
+ import{a as M}from"./chunk.AYSFL7J5.js";import{a as f,b as m,c as z}from"./chunk.DVVFVLNQ.js";import{d as h,e as x,g as F}from"./chunk.HOF672RD.js";import{d as n,e as o,f as d,g as c}from"./chunk.N2W26RCT.js";var E={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},y=l=>(...a)=>({_$litDirective$:l,values:a}),$=class{constructor(a){}get _$AU(){return this._$AM._$AU}_$AT(a,e,i){this._$Ct=a,this._$AM=e,this._$Ci=i}_$AS(a,e){return this.update(a,e)}update(a,e){return this.render(...e)}};var _=y(class extends ${constructor(l){var a;if(super(l),l.type!==E.ATTRIBUTE||l.name!=="class"||((a=l.strings)==null?void 0:a.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(l){return" "+Object.keys(l).filter(a=>l[a]).join(" ")+" "}update(l,[a]){var i,s;if(this.st===void 0){this.st=new Set,l.strings!==void 0&&(this.nt=new Set(l.strings.join(" ").split(/\s/).filter(t=>t!=="")));for(let t in a)a[t]&&!((i=this.nt)!=null&&i.has(t))&&this.st.add(t);return this.render(a)}let e=l.element.classList;for(let t of this.st)t in a||(e.remove(t),this.st.delete(t));for(let t in a){let p=!!a[t];p===this.st.has(t)||(s=this.nt)!=null&&s.has(t)||(p?(e.add(t),this.st.add(t)):(e.remove(t),this.st.delete(t)))}return x}});Promise.allSettled([import("@awesome.me/webawesome/dist/components/icon/icon.js"),import("@awesome.me/webawesome/dist/components/divider/divider.js")]);var S,T,C,D,P,A,B,L,k,W,I,O,r=class extends F{constructor(){super(...arguments);this.name="hot-file-input-dropzone";d(this,S,!1);d(this,T,"");d(this,C,0);d(this,D,!1);d(this,P,!1);d(this,A,"");d(this,B,"traditional");d(this,L,!1);d(this,k,[]);d(this,W,"");d(this,I,"");d(this,O)}get multiple(){return o(this,S)}set multiple(e){c(this,S,e)}get accept(){return o(this,T)}set accept(e){c(this,T,e)}get maxSize(){return o(this,C)}set maxSize(e){c(this,C,e)}get showPreview(){return o(this,D)}set showPreview(e){c(this,D,e)}get disabled(){return o(this,P)}set disabled(e){c(this,P,e)}get label(){return o(this,A)}set label(e){c(this,A,e)}get variant(){return o(this,B)}set variant(e){c(this,B,e)}get isDragging(){return o(this,L)}set isDragging(e){c(this,L,e)}get selectedFiles(){return o(this,k)}set selectedFiles(e){c(this,k,e)}get errorMessage(){return o(this,W)}set errorMessage(e){c(this,W,e)}get statusMessage(){return o(this,I)}set statusMessage(e){c(this,I,e)}get fileInput(){return o(this,O)}set fileInput(e){c(this,O,e)}_generateId(){return`file-${Date.now()}-${Math.random().toString(36).substring(2,11)}`}_handleDragOver(e){e.preventDefault(),e.stopPropagation(),this.disabled||(this.isDragging=!0)}_handleDragLeave(e){e.preventDefault(),e.stopPropagation(),this.isDragging=!1}_handleDrop(e){var s;if(e.preventDefault(),e.stopPropagation(),this.isDragging=!1,this.disabled)return;let i=Array.from(((s=e.dataTransfer)==null?void 0:s.files)||[]);this._processFiles(i)}_handleClick(){this.disabled||this.fileInput.click()}_handleKeyDown(e){!this.disabled&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.fileInput.click())}_handleFileInputChange(e){let i=e.target,s=Array.from(i.files||[]);this._processFiles(s)}_processFiles(e){if(this.errorMessage="",!this.multiple&&e.length>1){this.errorMessage="Only one file can be selected";return}if(this.accept){let t=this.accept.split(",").map(u=>u.trim().toLowerCase()),p=e.filter(u=>{let b=u.name.toLowerCase(),g=u.type.toLowerCase();return!t.some(v=>{if(v.startsWith("."))return b.endsWith(v);if(v.endsWith("/*")){let w=v.split("/")[0];if(g)return g.startsWith(w+"/");let j=b.substring(b.lastIndexOf("."));return this._getFileIcon(j).includes(w)}return g?g===v:!1})});if(p.length>0){this.errorMessage=`Invalid file type(s): ${p.map(u=>u.name).join(", ")}`;return}}if(this.maxSize>0){let t=e.filter(p=>p.size>this.maxSize);if(t.length>0){this.errorMessage=`File(s) exceed maximum size of ${this._formatFileSize(this.maxSize)}: ${t.map(p=>p.name).join(", ")}`;return}}let i=e.map(t=>({file:t,id:this._generateId()}));this.multiple?this.selectedFiles=[...i,...this.selectedFiles]:this.selectedFiles=i,this.dispatchEvent(new CustomEvent("hot-file-change",{detail:{files:this.selectedFiles.map(t=>t.file)},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("hot-files-selected",{detail:{files:i.map(t=>t.file),allFiles:this.selectedFiles.map(t=>t.file)},bubbles:!0,composed:!0}));let s=i.length;this.statusMessage=`${s} ${s===1?"file":"files"} selected: ${i.map(t=>t.file.name).join(", ")}`}_removeFile(e){let i=this.selectedFiles.find(s=>s.id===e);this.selectedFiles=this.selectedFiles.filter(s=>s.id!==e),this.fileInput&&(this.fileInput.value=""),this.dispatchEvent(new CustomEvent("hot-file-change",{detail:{files:this.selectedFiles.map(s=>s.file)},bubbles:!0,composed:!0})),i&&(this.statusMessage=`File removed: ${i.file.name}. ${this.selectedFiles.length} ${this.selectedFiles.length===1?"file":"files"} remaining.`)}_formatFileSize(e){if(e===0)return"0 Bytes";let i=1e3,s=["Bytes","KB","MB","GB"],t=Math.floor(Math.log(e)/Math.log(i)),p=e/Math.pow(i,t);return`${Math.round(p*10)/10} ${s[t]}`}_getFileIcon(e){return e.startsWith("image/")?"file-image":e.startsWith("video/")?"file-video":e.startsWith("audio/")?"file-audio":e==="application/pdf"?"file-pdf":e.includes("word")?"file-word":e.includes("sheet")||e.includes("excel")?"file-excel":e.includes("zip")||e.includes("rar")||e.includes("7z")?"file-archive":e.includes("text")?"file-text":"file"}clearFiles(){this.selectedFiles=[],this.errorMessage="",this.fileInput&&(this.fileInput.value="")}getFiles(){return this.selectedFiles.map(e=>e.file)}render(){let e={dropzone:!0,"dropzone--dragging":this.isDragging,"dropzone--disabled":this.disabled,"dropzone--has-files":this.selectedFiles.length>0,"dropzone--compact":this.variant==="compact"},i=this.variant==="compact";return h`
2
2
  <div class="file-input-dropzone">
3
3
  ${this.label&&this.variant==="traditional"?h`<label class="label" id="dropzone-label">${this.label}</label>`:""}
4
4
  ${this.variant==="traditional"?h`
@@ -1,4 +1,4 @@
1
- import{a as l,b as r}from"./chunk.ZETV7TDG.js";import{a as g,d as h,f as b}from"./chunk.QABMDRWR.js";import{d as t,e as s,f as n,g as i}from"./chunk.N2W26RCT.js";Promise.allSettled([import("@awesome.me/webawesome/dist/components/callout/callout.js"),import("@awesome.me/webawesome/dist/components/icon/icon.js"),import("@awesome.me/webawesome/dist/components/button/button.js"),import("@awesome.me/webawesome/dist/components/dialog/dialog.js")]);var m,w,v,f,x,a=class extends b{constructor(){super(...arguments);this.name="hot-tracking";n(this,m,"");n(this,w,"");n(this,v,"https://matomo.hotosm.org");n(this,f,!0);n(this,x,"We use cookies and similar technologies to help personalize content, tailor and measure ads, and provide a better experience. By clicking 'Accept', you consent to our use of cookies and tracking technologies.");this.consentGiven=!1;this.consentShown=!1;this.errorMessage="";this.showError=!1;this.successMessage="";this.showSuccess=!1;this.infoMessage="";this.showInfo=!1}get siteId(){return s(this,m)}set siteId(e){i(this,m,e)}get domain(){return s(this,w)}set domain(e){i(this,w,e)}get matomoURL(){return s(this,v)}set matomoURL(e){i(this,v,e)}get showConsent(){return s(this,f)}set showConsent(e){i(this,f,e)}get consentMessage(){return s(this,x)}set consentMessage(e){i(this,x,e)}get consentKey(){return`hot-matomo-consent-${this.siteId}`}getStoredConsent(){let e=localStorage.getItem(this.consentKey);return e===null?null:e==="true"}setStoredConsent(e){localStorage.setItem(this.consentKey,String(e))}agree(){this.consentGiven=!0,this.consentShown=!1,this.setStoredConsent(!0);let e=window._paq=window._paq||[];e.push(["rememberConsentGiven"]),e.push(["trackPageView"]),this.showSuccessCallout("Tracking consent granted. Thank you!")}disagree(){this.consentGiven=!1,this.consentShown=!1,this.setStoredConsent(!1),(window._paq=window._paq||[]).push(["forgetConsentGiven"]),this.showInfoCallout("Tracking disabled. You can change this preference later.")}showConsentBanner(){this.showConsent&&!this.consentGiven&&!this.consentShown&&(this.consentShown=!0)}showErrorCallout(e){this.errorMessage=e,this.showError=!0,setTimeout(()=>{this.showError=!1},1e4)}showSuccessCallout(e){this.successMessage=e,this.showSuccess=!0,setTimeout(()=>{this.showSuccess=!1},5e3)}showInfoCallout(e){this.infoMessage=e,this.showInfo=!0,setTimeout(()=>{this.showInfo=!1},5e3)}render(){return h`
1
+ import{a as l,b as r}from"./chunk.DVVFVLNQ.js";import{a as g,d as h,g as b}from"./chunk.HOF672RD.js";import{d as t,e as s,f as n,g as i}from"./chunk.N2W26RCT.js";Promise.allSettled([import("@awesome.me/webawesome/dist/components/callout/callout.js"),import("@awesome.me/webawesome/dist/components/icon/icon.js"),import("@awesome.me/webawesome/dist/components/button/button.js"),import("@awesome.me/webawesome/dist/components/dialog/dialog.js")]);var m,w,v,f,x,a=class extends b{constructor(){super(...arguments);this.name="hot-tracking";n(this,m,"");n(this,w,"");n(this,v,"https://matomo.hotosm.org");n(this,f,!0);n(this,x,"We use cookies and similar technologies to help personalize content, tailor and measure ads, and provide a better experience. By clicking 'Accept', you consent to our use of cookies and tracking technologies.");this.consentGiven=!1;this.consentShown=!1;this.errorMessage="";this.showError=!1;this.successMessage="";this.showSuccess=!1;this.infoMessage="";this.showInfo=!1}get siteId(){return s(this,m)}set siteId(e){i(this,m,e)}get domain(){return s(this,w)}set domain(e){i(this,w,e)}get matomoURL(){return s(this,v)}set matomoURL(e){i(this,v,e)}get showConsent(){return s(this,f)}set showConsent(e){i(this,f,e)}get consentMessage(){return s(this,x)}set consentMessage(e){i(this,x,e)}get consentKey(){return`hot-matomo-consent-${this.siteId}`}getStoredConsent(){let e=localStorage.getItem(this.consentKey);return e===null?null:e==="true"}setStoredConsent(e){localStorage.setItem(this.consentKey,String(e))}agree(){this.consentGiven=!0,this.consentShown=!1,this.setStoredConsent(!0);let e=window._paq=window._paq||[];e.push(["rememberConsentGiven"]),e.push(["trackPageView"]),this.showSuccessCallout("Tracking consent granted. Thank you!")}disagree(){this.consentGiven=!1,this.consentShown=!1,this.setStoredConsent(!1),(window._paq=window._paq||[]).push(["forgetConsentGiven"]),this.showInfoCallout("Tracking disabled. You can change this preference later.")}showConsentBanner(){this.showConsent&&!this.consentGiven&&!this.consentShown&&(this.consentShown=!0)}showErrorCallout(e){this.errorMessage=e,this.showError=!0,setTimeout(()=>{this.showError=!1},1e4)}showSuccessCallout(e){this.successMessage=e,this.showSuccess=!0,setTimeout(()=>{this.showSuccess=!1},5e3)}showInfoCallout(e){this.infoMessage=e,this.showInfo=!0,setTimeout(()=>{this.showInfo=!1},5e3)}render(){return h`
2
2
  ${this.showError?h`
3
3
  <div class="error-banner">
4
4
  <wa-callout style="padding: 1rem;" variant="danger" appearance="outlined filled" size="large">
@@ -1 +1 @@
1
- import{b as t}from"./chunk.DNXHV7I7.js";var a=t;customElements.get("hot-tracking")||customElements.define("hot-tracking",t);export{a};
1
+ import{b as t}from"./chunk.54C4CCIE.js";var a=t;customElements.get("hot-tracking")||customElements.define("hot-tracking",t);export{a};
@@ -1,4 +1,4 @@
1
- import{a as o}from"./chunk.QABMDRWR.js";var e=o`
1
+ import{a as o}from"./chunk.HOF672RD.js";var e=o`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1 +1 @@
1
- import{b as e}from"./chunk.ZZ7X3H3S.js";var n=e;customElements.get("hot-consent")||customElements.define("hot-consent",e);export{n as a};
1
+ import{b as e}from"./chunk.HZNHTKN6.js";var n=e;customElements.get("hot-consent")||customElements.define("hot-consent",e);export{n as a};
@@ -1,4 +1,4 @@
1
- import{a as r}from"./chunk.UVBWHOA2.js";import{a as n}from"./chunk.ZETV7TDG.js";import{d as a,f as c}from"./chunk.QABMDRWR.js";import{d as t,e as s,f as o,g as i}from"./chunk.N2W26RCT.js";Promise.allSettled([import("@awesome.me/webawesome/dist/components/icon/icon.js")]);var h,m,d,v,u,y,e=class extends c{constructor(){super(...arguments);this.name="hot-list-card";o(this,h,"");o(this,m,"");o(this,d,"");o(this,v,"");o(this,u,!1);o(this,y,!1)}get title(){return s(this,h)}set title(l){i(this,h,l)}get subtitle(){return s(this,m)}set subtitle(l){i(this,m,l)}get icon(){return s(this,d)}set icon(l){i(this,d,l)}get itemId(){return s(this,v)}set itemId(l){i(this,v,l)}get showRemove(){return s(this,u)}set showRemove(l){i(this,u,l)}get showIcon(){return s(this,y)}set showIcon(l){i(this,y,l)}_handleRemove(){this.dispatchEvent(new CustomEvent("hot-remove",{detail:{id:this.itemId},bubbles:!0,composed:!0}))}_handleKeyDown(l){(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),this._handleRemove())}render(){let l=this.showIcon&&this.icon;return a`
1
+ import{a as r}from"./chunk.TJOQKPXN.js";import{a as n}from"./chunk.DVVFVLNQ.js";import{d as a,g as c}from"./chunk.HOF672RD.js";import{d as t,e as s,f as o,g as i}from"./chunk.N2W26RCT.js";Promise.allSettled([import("@awesome.me/webawesome/dist/components/icon/icon.js")]);var h,m,d,v,u,y,e=class extends c{constructor(){super(...arguments);this.name="hot-list-card";o(this,h,"");o(this,m,"");o(this,d,"");o(this,v,"");o(this,u,!1);o(this,y,!1)}get title(){return s(this,h)}set title(l){i(this,h,l)}get subtitle(){return s(this,m)}set subtitle(l){i(this,m,l)}get icon(){return s(this,d)}set icon(l){i(this,d,l)}get itemId(){return s(this,v)}set itemId(l){i(this,v,l)}get showRemove(){return s(this,u)}set showRemove(l){i(this,u,l)}get showIcon(){return s(this,y)}set showIcon(l){i(this,y,l)}_handleRemove(){this.dispatchEvent(new CustomEvent("hot-remove",{detail:{id:this.itemId},bubbles:!0,composed:!0}))}_handleKeyDown(l){(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),this._handleRemove())}render(){let l=this.showIcon&&this.icon;return a`
2
2
  <div class="list-item" role="listitem">
3
3
  ${l?a`<wa-icon name=${this.icon} class="list-icon" aria-hidden="true"></wa-icon>`:""}
4
4
  <div class="list-info">
@@ -1,4 +1,4 @@
1
- import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26RCT.js";function f(a){var t,e,r="";if(typeof a=="string"||typeof a=="number")r+=a;else if(typeof a=="object")if(Array.isArray(a)){var o=a.length;for(t=0;t<o;t++)a[t]&&(e=f(a[t]))&&(r&&(r+=" "),r+=e)}else for(e in a)a[e]&&(r&&(r+=" "),r+=e);return r}function x(){for(var a,t,e=0,r="",o=arguments.length;e<o;e++)(a=arguments[e])&&(t=f(a))&&(r&&(r+=" "),r+=t);return r}var b=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,w=x,y=(a,t)=>e=>{var r;if((t==null?void 0:t.variants)==null)return w(a,e==null?void 0:e.class,e==null?void 0:e.className);let{variants:o,defaultVariants:d}=t,z=Object.keys(o).map(i=>{let n=e==null?void 0:e[i],s=d==null?void 0:d[i];if(n===null)return null;let l=b(n)||b(s);return o[i][l]}),g=e&&Object.entries(e).reduce((i,n)=>{let[s,l]=n;return l===void 0||(i[s]=l),i},{}),k=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((i,n)=>{let c=n,{class:s,className:l}=c,j=v(c,["class","className"]);return Object.entries(j).every(V=>{let[p,m]=V;return Array.isArray(m)?m.includes(h(h({},d),g)[p]):h(h({},d),g)[p]===m})?[...i,s,l]:i},[]);return w(a,z,k,e==null?void 0:e.class,e==null?void 0:e.className)};var T=y("header",{variants:{size:{small:"header--size-small",medium:"header--size-medium",large:"header--size-large"}}}),D=u`
1
+ import{a as v}from"./chunk.HOF672RD.js";import{a as h,c as u}from"./chunk.N2W26RCT.js";function f(a){var r,e,t="";if(typeof a=="string"||typeof a=="number")t+=a;else if(typeof a=="object")if(Array.isArray(a)){var i=a.length;for(r=0;r<i;r++)a[r]&&(e=f(a[r]))&&(t&&(t+=" "),t+=e)}else for(e in a)a[e]&&(t&&(t+=" "),t+=e);return t}function x(){for(var a,r,e=0,t="",i=arguments.length;e<i;e++)(a=arguments[e])&&(r=f(a))&&(t&&(t+=" "),t+=r);return t}var b=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,w=x,y=(a,r)=>e=>{var t;if((r==null?void 0:r.variants)==null)return w(a,e==null?void 0:e.class,e==null?void 0:e.className);let{variants:i,defaultVariants:d}=r,z=Object.keys(i).map(o=>{let n=e==null?void 0:e[o],s=d==null?void 0:d[o];if(n===null)return null;let l=b(n)||b(s);return i[o][l]}),g=e&&Object.entries(e).reduce((o,n)=>{let[s,l]=n;return l===void 0||(o[s]=l),o},{}),k=r==null||(t=r.compoundVariants)===null||t===void 0?void 0:t.reduce((o,n)=>{let c=n,{class:s,className:l}=c,j=u(c,["class","className"]);return Object.entries(j).every(V=>{let[p,m]=V;return Array.isArray(m)?m.includes(h(h({},d),g)[p]):h(h({},d),g)[p]===m})?[...o,s,l]:o},[]);return w(a,z,k,e==null?void 0:e.class,e==null?void 0:e.className)};var T=y("header",{variants:{size:{small:"header--size-small",medium:"header--size-medium",large:"header--size-large"}}}),U=v`
2
2
  /* ================================================================
3
3
  * Layout
4
4
  * ================================================================ */
@@ -87,6 +87,7 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
87
87
  * Logo / title link
88
88
  * ================================================================ */
89
89
 
90
+ /* Allow long titles to truncate without shrinking the logo. */
90
91
  .header--link {
91
92
  text-decoration: none;
92
93
  display: flex;
@@ -94,12 +95,14 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
94
95
  justify-content: flex-start;
95
96
  padding-right: var(--hot-spacing-2x-small);
96
97
  gap: var(--hot-spacing-x-small);
97
- flex-shrink: 0;
98
+ flex-shrink: 1;
99
+ min-width: 0;
98
100
  }
99
101
 
100
102
  .header--link hot-logo {
101
103
  display: flex;
102
104
  align-items: center;
105
+ flex-shrink: 0;
103
106
  }
104
107
 
105
108
  .header--link .header--logo-img {
@@ -108,6 +111,7 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
108
111
  display: block;
109
112
  object-fit: contain;
110
113
  vertical-align: middle;
114
+ flex-shrink: 0;
111
115
  }
112
116
 
113
117
  .header--title {
@@ -117,10 +121,13 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
117
121
  margin: 0;
118
122
  line-height: 1;
119
123
  white-space: nowrap;
124
+ min-width: 0;
125
+ overflow: hidden;
126
+ text-overflow: ellipsis;
120
127
  }
121
128
 
122
129
  /* ================================================================
123
- * Navigation (desktop tabs with horizontal scroll arrows)
130
+ * Navigation (desktop tabs, with wa-tab-group's own scroll controls)
124
131
  * Hidden on mobile; shown via media query below.
125
132
  * ================================================================ */
126
133
 
@@ -146,32 +153,16 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
146
153
  display: none;
147
154
  }
148
155
 
149
- .header--nav-arrow {
150
- background: transparent;
151
- border: none;
156
+ /* Style WebAwesome's built-in overflow controls. */
157
+ .header--tab-group::part(scroll-button) {
152
158
  color: var(--hot-color-neutral-500);
153
- cursor: pointer;
154
- padding: 0;
155
- font-size: var(--hot-font-size-medium);
156
- line-height: 1;
157
- display: flex;
158
- align-items: center;
159
- justify-content: center;
160
159
  flex-shrink: 0;
161
160
  }
162
161
 
163
- .header--nav-arrow:hover {
162
+ .header--tab-group::part(scroll-button):hover {
164
163
  color: var(--hot-color-neutral-800);
165
164
  }
166
165
 
167
- .header--nav-arrow[disabled] {
168
- opacity: 0;
169
- pointer-events: none;
170
- width: 0;
171
- padding: 0;
172
- overflow: hidden;
173
- }
174
-
175
166
  .header--nav-mobile {
176
167
  display: block;
177
168
  width: 100%;
@@ -182,7 +173,7 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
182
173
  * Tabs
183
174
  * ================================================================ */
184
175
 
185
- .header--tab-group::part(base) {
176
+ .header--tab-group::part(tab-group) {
186
177
  --track-color: transparent;
187
178
  --indicator-color: transparent;
188
179
  }
@@ -196,7 +187,7 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
196
187
  justify-content: center;
197
188
  }
198
189
 
199
- .header--tab::part(base) {
190
+ .header--tab::part(tab) {
200
191
  font-size: var(--hot-font-size-medium);
201
192
  font-weight: var(--hot-font-weight-bold);
202
193
  color: var(--hot-color-neutral-600);
@@ -208,17 +199,17 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
208
199
  white-space: nowrap;
209
200
  }
210
201
 
211
- .header--tab[active]::part(base) {
202
+ .header--tab[active]::part(tab) {
212
203
  color: var(--hot-color-neutral-800);
213
204
  border-bottom-color: var(--hot-color-neutral-800);
214
205
  }
215
206
 
216
- .header--tab:hover::part(base) {
207
+ .header--tab:hover::part(tab) {
217
208
  color: var(--hot-color-neutral-800);
218
209
  border-bottom-color: var(--hot-color-neutral-300);
219
210
  }
220
211
 
221
- .header--tab[active]:hover::part(base) {
212
+ .header--tab[active]:hover::part(tab) {
222
213
  color: var(--hot-color-neutral-900);
223
214
  border-bottom-color: var(--hot-color-neutral-900);
224
215
  }
@@ -235,8 +226,7 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
235
226
  flex-shrink: 0;
236
227
  }
237
228
 
238
- /* Slots in the right rail are hidden on mobile and instead projected
239
- * through their drawer-* counterparts inside the sidebar. */
229
+ /* Use the drawer-specific auth and language slots on mobile. */
240
230
  @media (max-width: 768px) {
241
231
  .header--lang-slot,
242
232
  .header--auth-slot {
@@ -258,10 +248,7 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
258
248
  padding: 0.5rem;
259
249
  }
260
250
 
261
- /*
262
- * When drawer is not explicitly enabled but tabs exist, show the
263
- * hamburger only on mobile so users can still reach the nav items.
264
- */
251
+ /* Hide the automatic tab drawer button on desktop. */
265
252
  .header--drawer-mobile-only {
266
253
  display: inline-flex;
267
254
  }
@@ -366,7 +353,7 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
366
353
  font-size: var(--hot-font-size-medium);
367
354
  }
368
355
 
369
- .header--size-small .header--tab::part(base) {
356
+ .header--size-small .header--tab::part(tab) {
370
357
  font-size: var(--hot-font-size-small);
371
358
  padding: var(--hot-spacing-x-small);
372
359
  }
@@ -377,7 +364,7 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
377
364
  gap: var(--hot-spacing-2x-small);
378
365
  }
379
366
 
380
- .header--size-small .login-button::part(base) {
367
+ .header--size-small .login-button::part(button) {
381
368
  padding: var(--hot-spacing-3x-small) var(--hot-spacing-x-small);
382
369
  font-size: var(--hot-font-size-small);
383
370
  }
@@ -388,7 +375,7 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
388
375
  padding: 0;
389
376
  }
390
377
 
391
- .header--size-small .header--right-section wa-button[appearance="outlined"]::part(base) {
378
+ .header--size-small .header--right-section wa-button[appearance="outlined"]::part(button) {
392
379
  min-width: 1.5rem;
393
380
  min-height: 1.5rem;
394
381
  padding: var(--hot-spacing-3x-small);
@@ -413,7 +400,7 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
413
400
  max-height: 2.25rem;
414
401
  }
415
402
 
416
- .header--size-medium .login-button::part(base) {
403
+ .header--size-medium .login-button::part(button) {
417
404
  padding: var(--hot-spacing-2x-small) var(--hot-spacing-x-small);
418
405
  font-size: var(--hot-font-size-small);
419
406
  }
@@ -424,7 +411,7 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
424
411
  padding: 0;
425
412
  }
426
413
 
427
- .header--size-medium .header--right-section wa-button[appearance="outlined"]::part(base) {
414
+ .header--size-medium .header--right-section wa-button[appearance="outlined"]::part(button) {
428
415
  min-width: 2rem;
429
416
  min-height: 2rem;
430
417
  padding: var(--hot-spacing-2x-small);
@@ -554,6 +541,13 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
554
541
  color: var(--hot-color-primary-600);
555
542
  }
556
543
 
544
+ /* Mirror of the desktop underline, so the drawer shows the current page too */
545
+ .drawer-nav-button--active {
546
+ font-weight: var(--hot-font-weight-bold);
547
+ box-shadow: inset 3px 0 0 0 var(--hot-color-neutral-800);
548
+ padding-left: var(--hot-spacing-x-small);
549
+ }
550
+
557
551
  .drawer-separator {
558
552
  border: 0;
559
553
  border-top: 1px solid var(--hot-color-neutral-100);
@@ -592,4 +586,4 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
592
586
  display: none;
593
587
  }
594
588
  }
595
- `;export{T as a,D as b};
589
+ `;export{T as a,U as b};
@@ -1,4 +1,4 @@
1
- import{a as l,b as g}from"./chunk.ZETV7TDG.js";import{a as f,d as u,f as v}from"./chunk.QABMDRWR.js";import{d as s,e as r,f as a,g as o}from"./chunk.N2W26RCT.js";Promise.allSettled([import("@awesome.me/webawesome/dist/components/callout/callout.js"),import("@awesome.me/webawesome/dist/components/icon/icon.js"),import("@awesome.me/webawesome/dist/components/button/button.js")]);var $=["brand","success","neutral","warning"],N=new RegExp(`\\[([^\\]]+)\\]\\((https?:\\/\\/[^\\s)]+)\\)|(?<=^|[\\s(])(https?:\\/\\/[^\\s<"]+[^\\s<".,:;')\\]])`,"g");function y(h){if(typeof h!="string"||h.length===0)return null;let m=new Date(h);return Number.isNaN(m.getTime())?null:m}var w,x,A,k,C,S,V,e=class extends v{constructor(){super(...arguments);this.name="hot-announcement";a(this,w,"");a(this,x,"");a(this,A,"");a(this,k,"brand");a(this,C,"Dismiss");a(this,S,"hot-announcement");a(this,V,"");this.visible=!1;this.startsAt=null;this.endsAt=null;this.fetchAbort=null}get version(){return r(this,w)}set version(t){o(this,w,t)}get title(){return r(this,x)}set title(t){o(this,x,t)}get message(){return r(this,A)}set message(t){o(this,A,t)}get variant(){return r(this,k)}set variant(t){o(this,k,t)}get dismissLabel(){return r(this,C)}set dismissLabel(t){o(this,C,t)}get storageKey(){return r(this,S)}set storageKey(t){o(this,S,t)}get src(){return r(this,V)}set src(t){o(this,V,t)}storageFullKey(){return`${this.storageKey}-${this.version}-dismissed`}dismiss(){this.version.length>0&&localStorage.setItem(this.storageFullKey(),"true"),this.visible=!1,this.dispatchEvent(new CustomEvent("dismiss",{detail:{version:this.version},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this._evaluateVisibility()}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.fetchAbort)==null||t.abort(),this.fetchAbort=null}willUpdate(t){if(t.has("src")&&this.src.length>0){this._loadRemoteConfig();return}(t.has("version")||t.has("storageKey"))&&this._evaluateVisibility()}async _loadRemoteConfig(){var i;(i=this.fetchAbort)==null||i.abort();let t=new AbortController;this.fetchAbort=t,this.visible=!1;try{let n=await fetch(this.src,{signal:t.signal});if(!n.ok)return;let d=await n.text();if(d.trim().length===0)return;let c=JSON.parse(d);this._applyRemoteConfig(c)}catch(n){if(n.name==="AbortError")return}finally{this.fetchAbort===t&&(this.fetchAbort=null)}}_applyRemoteConfig(t){typeof t.version=="string"&&(this.version=t.version),typeof t.title=="string"&&(this.title=t.title),typeof t.message=="string"&&(this.message=t.message),typeof t.variant=="string"&&$.includes(t.variant)&&(this.variant=t.variant),this.startsAt=y(t.startsAt),this.endsAt=y(t.endsAt),this._evaluateVisibility()}_evaluateVisibility(){if(this.version.length===0){this.src.length===0&&console.warn("[hot-announcement] `version` is required so dismissal can be keyed per release. Banner hidden."),this.visible=!1;return}let t=Date.now();if(this.startsAt&&t<this.startsAt.getTime()){this.visible=!1;return}if(this.endsAt&&t>this.endsAt.getTime()){this.visible=!1;return}let i=localStorage.getItem(this.storageFullKey())==="true";this.visible=!i}renderMessage(){let t=[],i=0;for(let n of this.message.matchAll(N)){let[d,c,p,b]=n,R=p!=null?p:b;t.push(this.message.slice(i,n.index)),t.push(u`<a href="${R}" target="_blank" rel="noopener noreferrer"
1
+ import{a as l,b as g}from"./chunk.DVVFVLNQ.js";import{a as f,d as u,g as v}from"./chunk.HOF672RD.js";import{d as s,e as r,f as a,g as o}from"./chunk.N2W26RCT.js";Promise.allSettled([import("@awesome.me/webawesome/dist/components/callout/callout.js"),import("@awesome.me/webawesome/dist/components/icon/icon.js"),import("@awesome.me/webawesome/dist/components/button/button.js")]);var $=["brand","success","neutral","warning"],N=new RegExp(`\\[([^\\]]+)\\]\\((https?:\\/\\/[^\\s)]+)\\)|(?<=^|[\\s(])(https?:\\/\\/[^\\s<"]+[^\\s<".,:;')\\]])`,"g");function y(h){if(typeof h!="string"||h.length===0)return null;let m=new Date(h);return Number.isNaN(m.getTime())?null:m}var w,x,A,k,C,S,V,e=class extends v{constructor(){super(...arguments);this.name="hot-announcement";a(this,w,"");a(this,x,"");a(this,A,"");a(this,k,"brand");a(this,C,"Dismiss");a(this,S,"hot-announcement");a(this,V,"");this.visible=!1;this.startsAt=null;this.endsAt=null;this.fetchAbort=null}get version(){return r(this,w)}set version(t){o(this,w,t)}get title(){return r(this,x)}set title(t){o(this,x,t)}get message(){return r(this,A)}set message(t){o(this,A,t)}get variant(){return r(this,k)}set variant(t){o(this,k,t)}get dismissLabel(){return r(this,C)}set dismissLabel(t){o(this,C,t)}get storageKey(){return r(this,S)}set storageKey(t){o(this,S,t)}get src(){return r(this,V)}set src(t){o(this,V,t)}storageFullKey(){return`${this.storageKey}-${this.version}-dismissed`}dismiss(){this.version.length>0&&localStorage.setItem(this.storageFullKey(),"true"),this.visible=!1,this.dispatchEvent(new CustomEvent("dismiss",{detail:{version:this.version},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this._evaluateVisibility()}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.fetchAbort)==null||t.abort(),this.fetchAbort=null}willUpdate(t){if(t.has("src")&&this.src.length>0){this._loadRemoteConfig();return}(t.has("version")||t.has("storageKey"))&&this._evaluateVisibility()}async _loadRemoteConfig(){var i;(i=this.fetchAbort)==null||i.abort();let t=new AbortController;this.fetchAbort=t,this.visible=!1;try{let n=await fetch(this.src,{signal:t.signal});if(!n.ok)return;let d=await n.text();if(d.trim().length===0)return;let c=JSON.parse(d);this._applyRemoteConfig(c)}catch(n){if(n.name==="AbortError")return}finally{this.fetchAbort===t&&(this.fetchAbort=null)}}_applyRemoteConfig(t){typeof t.version=="string"&&(this.version=t.version),typeof t.title=="string"&&(this.title=t.title),typeof t.message=="string"&&(this.message=t.message),typeof t.variant=="string"&&$.includes(t.variant)&&(this.variant=t.variant),this.startsAt=y(t.startsAt),this.endsAt=y(t.endsAt),this._evaluateVisibility()}_evaluateVisibility(){if(this.version.length===0){this.src.length===0&&console.warn("[hot-announcement] `version` is required so dismissal can be keyed per release. Banner hidden."),this.visible=!1;return}let t=Date.now();if(this.startsAt&&t<this.startsAt.getTime()){this.visible=!1;return}if(this.endsAt&&t>this.endsAt.getTime()){this.visible=!1;return}let i=localStorage.getItem(this.storageFullKey())==="true";this.visible=!i}renderMessage(){let t=[],i=0;for(let n of this.message.matchAll(N)){let[d,c,p,b]=n,R=p!=null?p:b;t.push(this.message.slice(i,n.index)),t.push(u`<a href="${R}" target="_blank" rel="noopener noreferrer"
2
2
  >${c!=null?c:b}</a
3
3
  >`),i=n.index+d.length}return t.length===0?this.message:(t.push(this.message.slice(i)),t)}render(){return this.visible?u`
4
4
  <div class="announcement-banner" role="status">
@@ -1,4 +1,4 @@
1
- import{b as d,c as m}from"./chunk.QABMDRWR.js";import{a as l,b as p}from"./chunk.N2W26RCT.js";var y={attribute:!0,type:String,converter:d,reflect:!1,hasChanged:m},g=(e=y,s,t)=>{let{kind:a,metadata:c}=t,i=globalThis.litPropertyMetadata.get(c);if(i===void 0&&globalThis.litPropertyMetadata.set(c,i=new Map),a==="setter"&&((e=Object.create(e)).wrapped=!0),i.set(t.name,e),a==="accessor"){let{name:n}=t;return{set(o){let r=s.get.call(this);s.set.call(this,o),this.requestUpdate(n,r,e,!0,o)},init(o){return o!==void 0&&this.C(n,void 0,e,o),o}}}if(a==="setter"){let{name:n}=t;return function(o){let r=this[n];s.call(this,o),this.requestUpdate(n,r,e,!0,o)}}throw Error("Unsupported decorator location: "+a)};function f(e){return(s,t)=>typeof t=="object"?g(e,s,t):((a,c,i)=>{let n=c.hasOwnProperty(i);return c.constructor.createProperty(i,a),n?Object.getOwnPropertyDescriptor(c,i):void 0})(e,s,t)}function v(e){return f(p(l({},e),{state:!0,attribute:!1}))}var u=(e,s,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof s!="object"&&Object.defineProperty(e,s,t),t);function S(e,s){return(t,a,c)=>{let i=n=>{var o,r;return(r=(o=n.renderRoot)==null?void 0:o.querySelector(e))!=null?r:null};if(s){let{get:n,set:o}=typeof a=="object"?t:c!=null?c:(()=>{let r=Symbol();return{get(){return this[r]},set(h){this[r]=h}}})();return u(t,a,{get(){let r=n.call(this);return r===void 0&&(r=i(this),(r!==null||this.hasUpdated)&&o.call(this,r)),r}})}return u(t,a,{get(){return i(this)}})}}export{f as a,v as b,S as c};
1
+ import{b as d,c as m}from"./chunk.HOF672RD.js";import{a as l,b as p}from"./chunk.N2W26RCT.js";var y={attribute:!0,type:String,converter:d,reflect:!1,hasChanged:m},g=(e=y,s,t)=>{let{kind:a,metadata:c}=t,i=globalThis.litPropertyMetadata.get(c);if(i===void 0&&globalThis.litPropertyMetadata.set(c,i=new Map),a==="setter"&&((e=Object.create(e)).wrapped=!0),i.set(t.name,e),a==="accessor"){let{name:n}=t;return{set(o){let r=s.get.call(this);s.set.call(this,o),this.requestUpdate(n,r,e,!0,o)},init(o){return o!==void 0&&this.C(n,void 0,e,o),o}}}if(a==="setter"){let{name:n}=t;return function(o){let r=this[n];s.call(this,o),this.requestUpdate(n,r,e,!0,o)}}throw Error("Unsupported decorator location: "+a)};function f(e){return(s,t)=>typeof t=="object"?g(e,s,t):((a,c,i)=>{let n=c.hasOwnProperty(i);return c.constructor.createProperty(i,a),n?Object.getOwnPropertyDescriptor(c,i):void 0})(e,s,t)}function v(e){return f(p(l({},e),{state:!0,attribute:!1}))}var u=(e,s,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof s!="object"&&Object.defineProperty(e,s,t),t);function S(e,s){return(t,a,c)=>{let i=n=>{var o,r;return(r=(o=n.renderRoot)==null?void 0:o.querySelector(e))!=null?r:null};if(s){let{get:n,set:o}=typeof a=="object"?t:c!=null?c:(()=>{let r=Symbol();return{get(){return this[r]},set(h){this[r]=h}}})();return u(t,a,{get(){let r=n.call(this);return r===void 0&&(r=i(this),(r!==null||this.hasUpdated)&&o.call(this,r)),r}})}return u(t,a,{get(){return i(this)}})}}export{f as a,v as b,S as c};
2
2
  /*! Bundled license information:
3
3
 
4
4
  @lit/reactive-element/decorators/property.js:
@@ -1 +1 @@
1
- import{b as e}from"./chunk.IKKWEPSE.js";var t=e;customElements.get("hot-file-input-dropzone")||customElements.define("hot-file-input-dropzone",e);export{t as a};
1
+ import{b as e}from"./chunk.45EZ2EC2.js";var t=e;customElements.get("hot-file-input-dropzone")||customElements.define("hot-file-input-dropzone",e);export{t as a};
@@ -1 +1 @@
1
- import{b as o}from"./chunk.SOBALH23.js";var t=o;customElements.get("hotosm-tool-menu")||customElements.define("hotosm-tool-menu",o);export{t as a};
1
+ import{b as o}from"./chunk.LH3TTPVQ.js";var t=o;customElements.get("hotosm-tool-menu")||customElements.define("hotosm-tool-menu",o);export{t as a};
@@ -1,6 +1,6 @@
1
1
  var R=globalThis,L=R.ShadowRoot&&(R.ShadyCSS===void 0||R.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,D=Symbol(),X=new WeakMap,w=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==D)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(L&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=X.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&X.set(e,t))}return t}toString(){return this.cssText}},Y=o=>new w(typeof o=="string"?o:o+"",void 0,D),St=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((s,i,n)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1],o[0]);return new w(e,o,D)},tt=(o,t)=>{if(L)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),i=R.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},j=L?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return Y(e)})(o):o;var{is:Et,defineProperty:bt,getOwnPropertyDescriptor:Ct,getOwnPropertyNames:wt,getOwnPropertySymbols:xt,getPrototypeOf:Pt}=Object,f=globalThis,et=f.trustedTypes,Ut=et?et.emptyScript:"",z=f.reactiveElementPolyfillSupport,x=(o,t)=>o,B={toAttribute(o,t){switch(t){case Boolean:o=o?Ut:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch(s){e=null}}return e}},nt=(o,t)=>!Et(o,t),st={attribute:!0,type:String,converter:B,reflect:!1,useDefault:!1,hasChanged:nt},it,ot;(it=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(ot=f.litPropertyMetadata)!=null||(f.litPropertyMetadata=new WeakMap);var $=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=st){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&bt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){var r;let{get:i,set:n}=(r=Ct(this.prototype,t))!=null?r:{get(){return this[e]},set(a){this[e]=a}};return{get:i,set(a){let h=i==null?void 0:i.call(this);n==null||n.call(this,a),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:st}static _$Ei(){if(this.hasOwnProperty(x("elementProperties")))return;let t=Pt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(x("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(x("properties"))){let e=this.properties,s=[...wt(e),...xt(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(j(i))}else t!==void 0&&e.push(j(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s: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(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var e;let t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return tt(t,this.constructor.elementStyles),t}connectedCallback(){var t,e;(t=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let r=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:B).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){var n,r,a;let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let h=s.getPropertyOptions(i),l=typeof h.converter=="function"?{fromAttribute:h.converter}:((n=h.converter)==null?void 0:n.fromAttribute)!==void 0?h.converter:B;this._$Em=i;let c=l.fromAttribute(e,h.type);this[i]=(a=c!=null?c:(r=this._$Ej)==null?void 0:r.get(i))!=null?a:c,this._$Em=null}}requestUpdate(t,e,s,i=!1,n){var r,a;if(t!==void 0){let h=this.constructor;if(i===!1&&(n=this[t]),s!=null||(s=h.getPropertyOptions(t)),!(((r=s.hasChanged)!=null?r:nt)(n,e)||s.useDefault&&s.reflect&&n===((a=this._$Ej)==null?void 0:a.get(t))&&!this.hasAttribute(h._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},r){var a,h,l;s&&!((a=this._$Ej)!=null?a:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,(h=r!=null?r:e)!=null?h:this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&((l=this._$Eq)!=null?l:this._$Eq=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((s=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[r,a]of this._$Ep)this[r]=a;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[r,a]of n){let{wrapped:h}=a,l=this[r];h!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,a,l)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(n=>{var r;return(r=n.hostUpdate)==null?void 0:r.call(n)}),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}},rt;$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[x("elementProperties")]=new Map,$[x("finalized")]=new Map,z==null||z({ReactiveElement:$}),((rt=f.reactiveElementVersions)!=null?rt:f.reactiveElementVersions=[]).push("2.1.2");var U=globalThis,ht=o=>o,k=U.trustedTypes,at=k?k.createPolicy("lit-html",{createHTML:o=>o}):void 0,_t="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,ft="?"+A,Ot=`<${ft}>`,y=document,O=()=>y.createComment(""),H=o=>o===null||typeof o!="object"&&typeof o!="function",Z=Array.isArray,Ht=o=>Z(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",I=`[
2
2
  \f\r]`,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lt=/-->/g,ct=/>/g,m=RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),dt=/'/g,pt=/"/g,At=/^(?:script|style|textarea|title)$/i,G=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),kt=G(1),Dt=G(2),jt=G(3),v=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),ut=new WeakMap,g=y.createTreeWalker(y,129);function mt(o,t){if(!Z(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return at!==void 0?at.createHTML(t):t}var Mt=(o,t)=>{let e=o.length-1,s=[],i,n=t===2?"<svg>":t===3?"<math>":"",r=P;for(let a=0;a<e;a++){let h=o[a],l,c,d=-1,u=0;for(;u<h.length&&(r.lastIndex=u,c=r.exec(h),c!==null);)u=r.lastIndex,r===P?c[1]==="!--"?r=lt:c[1]!==void 0?r=ct:c[2]!==void 0?(At.test(c[2])&&(i=RegExp("</"+c[2],"g")),r=m):c[3]!==void 0&&(r=m):r===m?c[0]===">"?(r=i!=null?i:P,d=-1):c[1]===void 0?d=-2:(d=r.lastIndex-c[2].length,l=c[1],r=c[3]===void 0?m:c[3]==='"'?pt:dt):r===pt||r===dt?r=m:r===lt||r===ct?r=P:(r=m,i=void 0);let _=r===m&&o[a+1].startsWith("/>")?" ":"";n+=r===P?h+Ot:d>=0?(s.push(l),h.slice(0,d)+_t+h.slice(d)+A+_):h+A+(d===-2?a:_)}return[mt(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},M=class o{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0,a=t.length-1,h=this.parts,[l,c]=Mt(t,e);if(this.el=o.createElement(l,s),g.currentNode=this.el.content,e===2||e===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=g.nextNode())!==null&&h.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let d of i.getAttributeNames())if(d.endsWith(_t)){let u=c[r++],_=i.getAttribute(d).split(A),T=/([.?@])?(.*)/.exec(u);h.push({type:1,index:n,name:T[2],strings:_,ctor:T[1]==="."?q:T[1]==="?"?K:T[1]==="@"?F:b}),i.removeAttribute(d)}else d.startsWith(A)&&(h.push({type:6,index:n}),i.removeAttribute(d));if(At.test(i.tagName)){let d=i.textContent.split(A),u=d.length-1;if(u>0){i.textContent=k?k.emptyScript:"";for(let _=0;_<u;_++)i.append(d[_],O()),g.nextNode(),h.push({type:2,index:++n});i.append(d[u],O())}}}else if(i.nodeType===8)if(i.data===ft)h.push({type:2,index:n});else{let d=-1;for(;(d=i.data.indexOf(A,d+1))!==-1;)h.push({type:7,index:n}),d+=A.length-1}n++}}static createElement(t,e){let s=y.createElement("template");return s.innerHTML=t,s}};function E(o,t,e=o,s){var r,a,h;if(t===v)return t;let i=s!==void 0?(r=e._$Co)==null?void 0:r[s]:e._$Cl,n=H(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,s)),s!==void 0?((h=e._$Co)!=null?h:e._$Co=[])[s]=i:e._$Cl=i),i!==void 0&&(t=E(o,i._$AS(o,t.values),i,s)),t}var W=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var l;let{el:{content:e},parts:s}=this._$AD,i=((l=t==null?void 0:t.creationScope)!=null?l:y).importNode(e,!0);g.currentNode=i;let n=g.nextNode(),r=0,a=0,h=s[0];for(;h!==void 0;){if(r===h.index){let c;h.type===2?c=new N(n,n.nextSibling,this,t):h.type===1?c=new h.ctor(n,h.name,h.strings,this,t):h.type===6&&(c=new J(n,this,t)),this._$AV.push(c),h=s[++a]}r!==(h==null?void 0:h.index)&&(n=g.nextNode(),r++)}return g.currentNode=y,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},N=class o{get _$AU(){var t,e;return(e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,s,i){var n;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(n=i==null?void 0:i.isConnected)!=null?n:!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),H(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==v&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ht(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&H(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){var n;let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=M.createElement(mt(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{let r=new W(i,this),a=r.u(this.options);r.p(e),this.T(a),this._$AH=r}}_$AC(t){let e=ut.get(t.strings);return e===void 0&&ut.set(t.strings,e=new M(t)),e}k(t){Z(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new o(this.O(O()),this.O(O()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){let i=ht(t).nextSibling;ht(t).remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}},b=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,i){let n=this.strings,r=!1;if(n===void 0)t=E(this,t,e,0),r=!H(t)||t!==this._$AH&&t!==v,r&&(this._$AH=t);else{let a=t,h,l;for(t=n[0],h=0;h<n.length-1;h++)l=E(this,a[s+h],e,h),l===v&&(l=this._$AH[h]),r||(r=!H(l)||l!==this._$AH[h]),l===p?t=p:t!==p&&(t+=(l!=null?l:"")+n[h+1]),this._$AH[h]=l}r&&!i&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},q=class extends b{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}},K=class extends b{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}},F=class extends b{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var r;if((t=(r=E(this,t,e,0))!=null?r:p)===v)return;let s=this._$AH,i=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==p&&(s===p||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)==null?void 0:e.host)!=null?s:this.element,t):this._$AH.handleEvent(t)}},J=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}};var V=U.litHtmlPolyfillSupport,$t;V==null||V(M,N),(($t=U.litHtmlVersions)!=null?$t:U.litHtmlVersions=[]).push("3.3.2");var gt=(o,t,e)=>{var n,r;let s=(n=e==null?void 0:e.renderBefore)!=null?n:t,i=s._$litPart$;if(i===void 0){let a=(r=e==null?void 0:e.renderBefore)!=null?r:null;s._$litPart$=i=new N(t.insertBefore(O(),a),a,void 0,e!=null?e:{})}return i._$AI(o),i};var S=globalThis,C=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,s;let t=super.createRenderRoot();return(s=(e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=gt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return v}},yt;C._$litElement$=!0,C.finalized=!0,(yt=S.litElementHydrateSupport)==null||yt.call(S,{LitElement:C});var Q=S.litElementPolyfillSupport;Q==null||Q({LitElement:C});var vt;((vt=S.litElementVersions)!=null?vt:S.litElementVersions=[]).push("4.2.2");export{St as a,B as b,nt as c,kt as d,v as e,C as f};
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),dt=/'/g,pt=/"/g,At=/^(?:script|style|textarea|title)$/i,G=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),kt=G(1),Dt=G(2),jt=G(3),v=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),ut=new WeakMap,g=y.createTreeWalker(y,129);function mt(o,t){if(!Z(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return at!==void 0?at.createHTML(t):t}var Mt=(o,t)=>{let e=o.length-1,s=[],i,n=t===2?"<svg>":t===3?"<math>":"",r=P;for(let a=0;a<e;a++){let h=o[a],l,c,d=-1,u=0;for(;u<h.length&&(r.lastIndex=u,c=r.exec(h),c!==null);)u=r.lastIndex,r===P?c[1]==="!--"?r=lt:c[1]!==void 0?r=ct:c[2]!==void 0?(At.test(c[2])&&(i=RegExp("</"+c[2],"g")),r=m):c[3]!==void 0&&(r=m):r===m?c[0]===">"?(r=i!=null?i:P,d=-1):c[1]===void 0?d=-2:(d=r.lastIndex-c[2].length,l=c[1],r=c[3]===void 0?m:c[3]==='"'?pt:dt):r===pt||r===dt?r=m:r===lt||r===ct?r=P:(r=m,i=void 0);let _=r===m&&o[a+1].startsWith("/>")?" ":"";n+=r===P?h+Ot:d>=0?(s.push(l),h.slice(0,d)+_t+h.slice(d)+A+_):h+A+(d===-2?a:_)}return[mt(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},M=class o{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0,a=t.length-1,h=this.parts,[l,c]=Mt(t,e);if(this.el=o.createElement(l,s),g.currentNode=this.el.content,e===2||e===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=g.nextNode())!==null&&h.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let d of i.getAttributeNames())if(d.endsWith(_t)){let u=c[r++],_=i.getAttribute(d).split(A),T=/([.?@])?(.*)/.exec(u);h.push({type:1,index:n,name:T[2],strings:_,ctor:T[1]==="."?q:T[1]==="?"?K:T[1]==="@"?F:b}),i.removeAttribute(d)}else d.startsWith(A)&&(h.push({type:6,index:n}),i.removeAttribute(d));if(At.test(i.tagName)){let d=i.textContent.split(A),u=d.length-1;if(u>0){i.textContent=k?k.emptyScript:"";for(let _=0;_<u;_++)i.append(d[_],O()),g.nextNode(),h.push({type:2,index:++n});i.append(d[u],O())}}}else if(i.nodeType===8)if(i.data===ft)h.push({type:2,index:n});else{let d=-1;for(;(d=i.data.indexOf(A,d+1))!==-1;)h.push({type:7,index:n}),d+=A.length-1}n++}}static createElement(t,e){let s=y.createElement("template");return s.innerHTML=t,s}};function E(o,t,e=o,s){var r,a,h;if(t===v)return t;let i=s!==void 0?(r=e._$Co)==null?void 0:r[s]:e._$Cl,n=H(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,s)),s!==void 0?((h=e._$Co)!=null?h:e._$Co=[])[s]=i:e._$Cl=i),i!==void 0&&(t=E(o,i._$AS(o,t.values),i,s)),t}var W=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var l;let{el:{content:e},parts:s}=this._$AD,i=((l=t==null?void 0:t.creationScope)!=null?l:y).importNode(e,!0);g.currentNode=i;let n=g.nextNode(),r=0,a=0,h=s[0];for(;h!==void 0;){if(r===h.index){let c;h.type===2?c=new N(n,n.nextSibling,this,t):h.type===1?c=new h.ctor(n,h.name,h.strings,this,t):h.type===6&&(c=new J(n,this,t)),this._$AV.push(c),h=s[++a]}r!==(h==null?void 0:h.index)&&(n=g.nextNode(),r++)}return g.currentNode=y,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},N=class o{get _$AU(){var t,e;return(e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,s,i){var n;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(n=i==null?void 0:i.isConnected)!=null?n:!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),H(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==v&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ht(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&H(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){var n;let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=M.createElement(mt(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{let r=new W(i,this),a=r.u(this.options);r.p(e),this.T(a),this._$AH=r}}_$AC(t){let e=ut.get(t.strings);return e===void 0&&ut.set(t.strings,e=new M(t)),e}k(t){Z(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new o(this.O(O()),this.O(O()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){let i=ht(t).nextSibling;ht(t).remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}},b=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,i){let n=this.strings,r=!1;if(n===void 0)t=E(this,t,e,0),r=!H(t)||t!==this._$AH&&t!==v,r&&(this._$AH=t);else{let a=t,h,l;for(t=n[0],h=0;h<n.length-1;h++)l=E(this,a[s+h],e,h),l===v&&(l=this._$AH[h]),r||(r=!H(l)||l!==this._$AH[h]),l===p?t=p:t!==p&&(t+=(l!=null?l:"")+n[h+1]),this._$AH[h]=l}r&&!i&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},q=class extends b{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}},K=class extends b{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}},F=class extends b{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var r;if((t=(r=E(this,t,e,0))!=null?r:p)===v)return;let s=this._$AH,i=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==p&&(s===p||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)==null?void 0:e.host)!=null?s:this.element,t):this._$AH.handleEvent(t)}},J=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}};var V=U.litHtmlPolyfillSupport,$t;V==null||V(M,N),(($t=U.litHtmlVersions)!=null?$t:U.litHtmlVersions=[]).push("3.3.2");var gt=(o,t,e)=>{var n,r;let s=(n=e==null?void 0:e.renderBefore)!=null?n:t,i=s._$litPart$;if(i===void 0){let a=(r=e==null?void 0:e.renderBefore)!=null?r:null;s._$litPart$=i=new N(t.insertBefore(O(),a),a,void 0,e!=null?e:{})}return i._$AI(o),i};var S=globalThis,C=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,s;let t=super.createRenderRoot();return(s=(e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=gt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return v}},yt;C._$litElement$=!0,C.finalized=!0,(yt=S.litElementHydrateSupport)==null||yt.call(S,{LitElement:C});var Q=S.litElementPolyfillSupport;Q==null||Q({LitElement:C});var vt;((vt=S.litElementVersions)!=null?vt:S.litElementVersions=[]).push("4.2.2");export{St as a,B as b,nt as c,kt as d,v as e,p as f,C as g};
4
4
  /*! Bundled license information:
5
5
 
6
6
  @lit/reactive-element/css-tag.js:
@@ -0,0 +1,144 @@
1
+ import{a as f,b as m}from"./chunk.BWW4EBSJ.js";import{a as k}from"./chunk.KO4EOD3I.js";import{a as d}from"./chunk.DVVFVLNQ.js";import{d as r,f as w,g as y}from"./chunk.HOF672RD.js";import{d as o,e as l,f as c,g as h}from"./chunk.N2W26RCT.js";Promise.allSettled([import("@awesome.me/webawesome/dist/components/tab-group/tab-group.js"),import("@awesome.me/webawesome/dist/components/icon/icon.js"),import("@awesome.me/webawesome/dist/components/drawer/drawer.js"),import("@awesome.me/webawesome/dist/components/dropdown/dropdown.js"),import("@awesome.me/webawesome/dist/components/dropdown-item/dropdown-item.js")]);k();var T,$,L,E,S,I,_,C,x,A,M,P,a=class a extends y{constructor(){super(...arguments);this.name="hot-header";c(this,T,"");c(this,$,"Mapping our world together");c(this,L,"Humanitarian OpenStreetMap Team Website");c(this,E,"https://www.hotosm.org");c(this,S,"");c(this,I,!1);c(this,_,[]);c(this,C,[]);c(this,x,"small");c(this,A,!1);c(this,M,0);c(this,P,0);this._boundLocationSync=null;this._desktopQuery=null;this._boundDesktopChange=null;this._syncedTabIndex=0}get title(){return l(this,T)}set title(t){h(this,T,t)}get topTagline(){return l(this,$)}set topTagline(t){h(this,$,t)}get topLinkLabel(){return l(this,L)}set topLinkLabel(t){h(this,L,t)}get topLinkHref(){return l(this,E)}set topLinkHref(t){h(this,E,t)}get logo(){return l(this,S)}set logo(t){h(this,S,t)}get drawer(){return l(this,I)}set drawer(t){h(this,I,t)}get tabs(){return l(this,_)}set tabs(t){h(this,_,t)}get drawerLinks(){return l(this,C)}set drawerLinks(t){h(this,C,t)}get size(){return l(this,x)}set size(t){h(this,x,t)}get tabsCenterAlign(){return l(this,A)}set tabsCenterAlign(t){h(this,A,t)}get selectedTab(){return l(this,M)}set selectedTab(t){h(this,M,t)}get activeTabIndex(){return l(this,P)}set activeTabIndex(t){h(this,P,t)}async connectedCallback(){super.connectedCallback(),this._boundLocationSync=()=>this.syncActiveTab(),window.addEventListener("popstate",this._boundLocationSync),window.addEventListener("hot-locationchange",this._boundLocationSync),window.addEventListener("htmx:pushedIntoHistory",this._boundLocationSync),typeof window.matchMedia=="function"&&(this._desktopQuery=window.matchMedia("(min-width: 769px)"),this._boundDesktopChange=t=>{t.matches&&this._closeDrawer()},this._desktopQuery.addEventListener("change",this._boundDesktopChange))}disconnectedCallback(){super.disconnectedCallback(),this._boundLocationSync&&(window.removeEventListener("popstate",this._boundLocationSync),window.removeEventListener("hot-locationchange",this._boundLocationSync),window.removeEventListener("htmx:pushedIntoHistory",this._boundLocationSync),this._boundLocationSync=null),this._desktopQuery&&this._boundDesktopChange&&(this._desktopQuery.removeEventListener("change",this._boundDesktopChange),this._desktopQuery=null,this._boundDesktopChange=null)}firstUpdated(t){this.syncActiveTab()}willUpdate(t){let e=this._syncedTabIndex;this.activeTabIndex!==this._syncedTabIndex?e=this.activeTabIndex:this.selectedTab!==this._syncedTabIndex&&(e=this.selectedTab),(e!==this._syncedTabIndex||this.activeTabIndex!==e||this.selectedTab!==e)&&(this._syncedTabIndex=e,this.activeTabIndex=e,this.selectedTab=e)}updated(t){super.updated(t),t.has("tabs")&&this.syncActiveTab()}selectTab(t){if(t!==this.selectedTab&&t>=0&&t<this.tabs.length){let e=this.selectedTab;this.selectedTab=t,this.activeTabIndex=t,this.dispatchEvent(new CustomEvent("tab-change",{detail:{selectedIndex:t,previousIndex:e,tab:this.tabs[t]},bubbles:!0})),this.requestUpdate()}}syncActiveTab(){var i;if(typeof window=="undefined"||!((i=this.tabs)!=null&&i.length))return;let t=a._normalisePath(window.location.pathname),e=-1,s=-1,n=!1;this.tabs.forEach((p,v)=>{if(p!=null&&p.href)try{let b=new URL(p.href,window.location.origin);if(b.origin!==window.location.origin)return;let u=a._normalisePath(b.pathname);n=!0,t===u?(e=v,s=Number.MAX_SAFE_INTEGER):s<Number.MAX_SAFE_INTEGER&&u!=="/"&&t.startsWith(`${u}/`)&&u.length>s&&(e=v,s=u.length)}catch(b){}}),n&&(a._patchHistory(),e!==this.activeTabIndex&&(this.selectedTab=e,this.activeTabIndex=e,this.requestUpdate()))}get _activePanel(){let t=this.tabs[this.activeTabIndex];return t?`${t.label}-${this.activeTabIndex}`:a._noActivePanel}static _normalisePath(t){return t.replace(/\/+$/,"")||"/"}static _patchHistory(){if(a._historyPatched||typeof window=="undefined")return;a._historyPatched=!0;let t=history.pushState.bind(history),e=history.replaceState.bind(history);history.pushState=function(s,n,i){t(s,n,i),window.dispatchEvent(new Event("hot-locationchange"))},history.replaceState=function(s,n,i){e(s,n,i),window.dispatchEvent(new Event("hot-locationchange"))}}render(){let t=typeof this.logo=="string"||this.logo instanceof URL?typeof this.logo=="string"?this.logo:this.logo.href:"";return r`
2
+ <div class="header-container">
3
+ ${this.size!=="small"?r`
4
+ <div class="header--top">
5
+ <div class="header--top-left">
6
+ ${this.topTagline?r`
7
+ <span class="header--top-tagline">
8
+ ${this.topTagline}
9
+ </span>
10
+ `:null}
11
+ </div>
12
+ <div class="header--top-right">
13
+ ${this.topLinkHref&&this.topLinkLabel?r`
14
+ <a
15
+ href="${this.topLinkHref}"
16
+ class="header--top-link"
17
+ target="_blank"
18
+ rel="noopener noreferrer"
19
+ >
20
+ <span class="header--top-link-full">${this.topLinkLabel}</span>
21
+ <span class="header--top-link-short">HOT Website</span>
22
+ <svg width="11" height="11" viewBox="0 0 11 11" class="header--external-icon" aria-hidden="true"><path fill="currentColor" d="M9.778 9.778H1.222V1.222H5.5V0H1.222C.544 0 0 .55 0 1.222v8.556C0 10.45.544 11 1.222 11h8.556C10.45 11 11 10.45 11 9.778V5.5H9.778v4.278zM6.722 0v1.222h2.194L2.91 7.23l.862.862 6.007-6.007v2.194H11V0H6.722z"></path></svg>
23
+ </a>
24
+ `:null}
25
+ </div>
26
+ </div>
27
+ `:null}
28
+
29
+ <header
30
+ class=${f({size:this.size})}
31
+ >
32
+ <a href="/" class="header--link">
33
+ ${t.length>0?r`
34
+ <img
35
+ id="logo"
36
+ src="${this.logo}"
37
+ alt="Logo"
38
+ class="header--logo-img"
39
+ />
40
+ `:r`
41
+ <hot-logo
42
+ ?icon-only=${this.title.length>0}
43
+ >
44
+ </hot-logo>
45
+ `}
46
+ ${this.title.length>0?r`
47
+ <h1 class="header--title">
48
+ ${this.title}
49
+ </h1>
50
+ `:null}
51
+ </a>
52
+
53
+ ${""}
54
+ <nav class="header--nav ${this.tabsCenterAlign?"header--nav-center":""}">
55
+ ${this.tabs.length>0?r`
56
+ <div class="header--nav-wrapper">
57
+
58
+ <div class="header--nav-scroll">
59
+ <wa-tab-group
60
+ class="header--tab-group"
61
+ active="${this._activePanel}"
62
+ @wa-tab-show=${e=>this._handleTabShow(e)}
63
+ >
64
+ ${this.tabs.map((e,s)=>{let n=this.activeTabIndex===s;return r`
65
+ <wa-tab
66
+ panel="${e.label}-${s}"
67
+ class="header--tab"
68
+ slot="nav"
69
+ ?active=${n}
70
+ data-index="${s}"
71
+ @click=${i=>this._tabClick(i,e.clickEvent,s)}
72
+ >
73
+ ${e.label}
74
+ </wa-tab>
75
+ `})}
76
+ </wa-tab-group>
77
+ </div>
78
+
79
+ </div>
80
+ `:null}
81
+ </nav>
82
+
83
+
84
+
85
+ <div id="right-section" class="header--right-section">
86
+ <slot name="lang" class="header--lang-slot"></slot>
87
+ <slot name="auth" class="header--auth-slot"></slot>
88
+ ${this._showDrawer?r`
89
+ <wa-drawer label=" " id="drawer-overview">
90
+ <div class="drawer-content">
91
+ ${this.tabs.length?r`
92
+ <div class="drawer-nav">
93
+ <ul class="drawer-nav-list">
94
+ ${this.tabs.map((e,s)=>{let n=this.activeTabIndex===s;return r`
95
+ <li class="drawer-nav-item">
96
+ <button
97
+ class="drawer-nav-button ${n?"drawer-nav-button--active":""}"
98
+ aria-current=${n?"page":w}
99
+ data-index="${s}"
100
+ @click=${i=>this._tabClick(i,e.clickEvent,s)}
101
+ >
102
+ ${e.label}
103
+ </button>
104
+ </li>
105
+ `})}
106
+ </ul>
107
+ <hr class="drawer-separator" />
108
+ </div>
109
+ `:null}
110
+
111
+ <ul class="drawer-link-list">
112
+ ${this.drawerLinks.map(e=>r`
113
+ <li class="drawer-link-item">
114
+ <a
115
+ href="${e.href}"
116
+ data-drawer="close"
117
+ class="drawer-link"
118
+ >
119
+ ${e.label}
120
+ </a>
121
+ </li>
122
+ `)}
123
+ </ul>
124
+
125
+ <div class="drawer-extras">
126
+ <slot name="drawer-lang" class="drawer-lang-slot"></slot>
127
+ <slot name="drawer-auth" class="drawer-auth-slot"></slot>
128
+ </div>
129
+ </div>
130
+ </wa-drawer>
131
+ <wa-button
132
+ appearance="outlined"
133
+ class="${this.drawer?"":"header--drawer-mobile-only"}"
134
+ @click=${()=>this._handleDrawerOpen()}
135
+ aria-label="Open Sidebar"
136
+ >
137
+ <wa-icon name="bars"></wa-icon>
138
+ </wa-button>
139
+ `:null}
140
+ </div>
141
+
142
+ </header>
143
+ </div>
144
+ `}async _tabClick(t,e,s){t.preventDefault(),t.stopPropagation();try{this.selectTab(s),this._closeDrawer(),setTimeout(async()=>{try{typeof e=="function"&&await e()}catch(n){console.error("Error during navigation:",n)}},0)}catch(n){console.error("Error handling tab click:",n);try{typeof e=="function"&&e()}catch(i){console.error("Fallback navigation also failed:",i)}}}_handleTabShow(t){var e,s,n,i;try{let p=(e=t.detail)==null?void 0:e.name;if(!p)return;let b=Array.from((n=(s=this.renderRoot)==null?void 0:s.querySelectorAll("wa-tab"))!=null?n:[]).find(D=>D.getAttribute("panel")===p);if(!b)return;let u=parseInt((i=b.getAttribute("data-index"))!=null?i:"",10);!isNaN(u)&&u>=0&&u<this.tabs.length&&this.selectTab(u)}catch(p){console.error("Error handling tab show event:",p)}}get _showDrawer(){return this.drawer||this.tabs.length>0}_closeDrawer(){var e;let t=(e=this.renderRoot)==null?void 0:e.querySelector("#drawer-overview");t!=null&&t.open&&(t.open=!1)}_handleDrawerOpen(){var e;let t=(e=this.renderRoot)==null?void 0:e.querySelector("#drawer-overview");t&&(t.open=!0)}};T=new WeakMap,$=new WeakMap,L=new WeakMap,E=new WeakMap,S=new WeakMap,I=new WeakMap,_=new WeakMap,C=new WeakMap,x=new WeakMap,A=new WeakMap,M=new WeakMap,P=new WeakMap,a.styles=[m],a._noActivePanel="hot-header-no-active-tab",a._historyPatched=!1,o([d({type:String})],a.prototype,"title",1),o([d({type:String,attribute:"top-tagline"})],a.prototype,"topTagline",1),o([d({type:String,attribute:"top-link-label"})],a.prototype,"topLinkLabel",1),o([d({type:String,attribute:"top-link-href"})],a.prototype,"topLinkHref",1),o([d({type:String})],a.prototype,"logo",1),o([d({type:Boolean})],a.prototype,"drawer",1),o([d({type:Array})],a.prototype,"tabs",1),o([d({type:Array})],a.prototype,"drawerLinks",1),o([d({type:String})],a.prototype,"size",1),o([d({type:Boolean,attribute:"tabs-center-align"})],a.prototype,"tabsCenterAlign",1),o([d({type:Number})],a.prototype,"selectedTab",1),o([d({type:Number})],a.prototype,"activeTabIndex",1);var g=a,V=g;export{g as a,V as b};