From 2efde93a313f05be1f1a1bde2c3e089e81d85326 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Tue, 29 Sep 2026 15:02:05 +0000 Subject: [PATCH] Rebuild the five composites the handoff merges touched BUNDLE= bun x vite build for cities-internet, gospel-internet, gospel-resources, plugin-studio and rudder-voice, then bun run tree and fix:sri. Regenerated on this tip, never merged: the scan refused the previous sha with gospel-internet stale (committed 7361a689e3a6 against a rebuild of ce15dd0ba73f). --- public/dx-maps/doxa-maps-spa/manifest.json | 10 ++-- .../gospel-internet/board/board/index.html | 2 +- .../dx-maps/gospel-internet/board/index.html | 2 +- .../board/india-china/index.html | 2 +- .../board/language-tree/index.html | 2 +- .../board/platforms/index.html | 2 +- .../board/project-700/index.html | 2 +- .../gospel-internet/board/zero/index.html | 2 +- .../gospel-internet/gospel-internet.js | 46 +++++++++---------- public/dx-maps/index.html | 2 +- public/dx-maps/manifest.json | 10 ++-- public/dx-maps/plugin-studio/plugin-studio.js | 3 +- .../plugin-studio/plugin-studio/index.html | 2 +- .../plugin-studio/studio/index.html | 2 +- public/dx-maps/rudder-voice/rudder-voice.js | 37 +++++++++++++++ 15 files changed, 82 insertions(+), 44 deletions(-) create mode 100644 public/dx-maps/rudder-voice/rudder-voice.js diff --git a/public/dx-maps/doxa-maps-spa/manifest.json b/public/dx-maps/doxa-maps-spa/manifest.json index 99b3bb6c0..0c7749d9e 100644 --- a/public/dx-maps/doxa-maps-spa/manifest.json +++ b/public/dx-maps/doxa-maps-spa/manifest.json @@ -653,7 +653,7 @@ "bundle": "gospel-internet", "scriptUrl": "./gospel-internet/gospel-internet.js", "output": "dx-maps/gospel-internet/gospel-internet.js", - "integrity": "sha384-WM1WXMNql6OFR+HuiW8Iq05DFyygqdCVmTgvZsHa2qjAC43V2QI1QrB4wwkVfXgO", + "integrity": "sha384-6AYJ02B+ScAmrqRRmVNDWbPsY+LHm0DK/GMzCCa0RIiVrORAQs2Dsg1ZWyGehHBY", "elements": [ "gospel-internet-board" ], @@ -674,8 +674,8 @@ "scriptUrl": "./gospel-internet/gospel-internet.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" }, "instances": [ { @@ -1010,7 +1010,7 @@ "bundle": "plugin-studio", "scriptUrl": "./plugin-studio/plugin-studio.js", "output": "dx-maps/plugin-studio/plugin-studio.js", - "integrity": "sha384-z28lk+j2l0xxtIiyBZr6EYjWlS/10epdE9ty6TRkVfHt6UuBj2Tq+V7Gf4+neaFm", + "integrity": "sha384-6eNQ4BMIc6DDKJRaAQJzMuWWdYDN2+Ipj+RA1Q9Jxc8T2HZqr+ECC+mm63knNIL6", "elements": [ "plugin-studio" ], @@ -1041,7 +1041,7 @@ "scriptUrl": "./plugin-studio/plugin-studio.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" }, "instances": [ { diff --git a/public/dx-maps/gospel-internet/board/board/index.html b/public/dx-maps/gospel-internet/board/board/index.html index 272dbb315..5a2646599 100644 --- a/public/dx-maps/gospel-internet/board/board/index.html +++ b/public/dx-maps/gospel-internet/board/board/index.html @@ -65,7 +65,7 @@ - + - + - + - + - + - + - + + diff --git a/public/dx-maps/manifest.json b/public/dx-maps/manifest.json index 99b3bb6c0..0c7749d9e 100644 --- a/public/dx-maps/manifest.json +++ b/public/dx-maps/manifest.json @@ -653,7 +653,7 @@ "bundle": "gospel-internet", "scriptUrl": "./gospel-internet/gospel-internet.js", "output": "dx-maps/gospel-internet/gospel-internet.js", - "integrity": "sha384-WM1WXMNql6OFR+HuiW8Iq05DFyygqdCVmTgvZsHa2qjAC43V2QI1QrB4wwkVfXgO", + "integrity": "sha384-6AYJ02B+ScAmrqRRmVNDWbPsY+LHm0DK/GMzCCa0RIiVrORAQs2Dsg1ZWyGehHBY", "elements": [ "gospel-internet-board" ], @@ -674,8 +674,8 @@ "scriptUrl": "./gospel-internet/gospel-internet.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" }, "instances": [ { @@ -1010,7 +1010,7 @@ "bundle": "plugin-studio", "scriptUrl": "./plugin-studio/plugin-studio.js", "output": "dx-maps/plugin-studio/plugin-studio.js", - "integrity": "sha384-z28lk+j2l0xxtIiyBZr6EYjWlS/10epdE9ty6TRkVfHt6UuBj2Tq+V7Gf4+neaFm", + "integrity": "sha384-6eNQ4BMIc6DDKJRaAQJzMuWWdYDN2+Ipj+RA1Q9Jxc8T2HZqr+ECC+mm63knNIL6", "elements": [ "plugin-studio" ], @@ -1041,7 +1041,7 @@ "scriptUrl": "./plugin-studio/plugin-studio.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" }, "instances": [ { diff --git a/public/dx-maps/plugin-studio/plugin-studio.js b/public/dx-maps/plugin-studio/plugin-studio.js index 49eb2bbf1..8c495f9d8 100644 --- a/public/dx-maps/plugin-studio/plugin-studio.js +++ b/public/dx-maps/plugin-studio/plugin-studio.js @@ -219,7 +219,7 @@ [data-wb-icon]{display:grid;place-items:center;flex:none;color:#38bdf8} [data-wb-icon] svg,[data-wb-chev] svg{width:20px;height:20px;display:block} [data-wb-text]{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis} -[data-widget-bubble][data-listening="true"]{width:min(300px,calc(100vw - 32px))} +[data-widget-bubble][data-listening="true"]{width:min(300px,calc(100vw - 32px));min-width:min(300px,calc(100vw - 32px));max-width:min(300px,calc(100vw - 32px))} [data-widget-bubble][data-listening="true"] [data-wb-text]{flex:1 1 auto} [data-wb-dot],[data-wb-chev]{display:none;flex:none} [data-wb-dot]{width:10px;height:10px;border-radius:50%;background:#ef4444} @@ -237,4 +237,5 @@ [data-studio-widgets$="left"]{left:max(8px,env(safe-area-inset-left))} [data-widget-panel]{width:calc(100vw - 16px);max-width:none;height:60vh;height:60dvh} [data-widget-bubble]{max-width:calc(100vw - 16px)} + [data-widget-bubble][data-listening="true"]{width:min(300px,calc(100vw - 16px));min-width:min(300px,calc(100vw - 16px));max-width:min(300px,calc(100vw - 16px))} }`,td=''+''+""+''+"",od=mo({name:"PluginStudio",inheritAttrs:!1,components:{VerticalTabsLayout:cp,StudioTree:Bp},props:{treeBase:{type:String,default:""},profileConfig:{type:[String,Object],default:""},provider:{type:String,default:""},heading:{type:String,default:""},tokenUrl:{type:String,default:""},tk:{type:String,default:""}},setup(){return En(Yp,"plugin-studio"),{injectedBase:Pt("psTreeBase","")}},data(){return{activeKey:"",embedOpen:!1,locale:this.initialLocale(),localeOpen:!1,settingsOpen:!1,headerHidden:kt(ta)==="1",engineOpen:!1,userProvider:kt(oa),tokenBusy:!1,tokenErr:"",tokenDraft:kt(Eo),urlDraft:kt(Fo),userTk:kt(Eo),userTokenUrl:kt(Fo),fetchedTk:"",bakedTk:"",hostProvider:"",switcherLangs:Ao,rows:[],manifestBundles:[]}},computed:{cfg(){let e=this.profileConfig;if(typeof e=="string")try{e=e?JSON.parse(e):{}}catch{e={}}return e&&typeof e=="object"?e:{}},base(){const e=(this.treeBase||this.cfg.treeBase||this.injectedBase||"").trim();return e?e.replace(/\/+$/,"")+"/":""},flatRows(){return this.rows},groups(){const e={};for(const t of this.rows)(e[t.cap]=e[t.cap]||[]).push(t);return[5,4,3,2,1].filter(t=>e[t]&&e[t].length).map(t=>({cap:t,label:Jp[t]||"capability "+t,rows:e[t]}))},treeSections(){const e=new Map(this.compositionTrees.map(s=>[s.nodes[0].selects,s])),t=new Map;for(const s of this.rows)t.has(s.bundle)||t.set(s.bundle,[]),t.get(s.bundle).push(s);const o=[...t.entries()].map(([s,i])=>({bundle:s,rows:i,cap:Math.max(...i.map(a=>a.cap))}));return[5,4,3,2,1].map(s=>({cap:s,group:o.filter(i=>i.cap===s).sort((i,a)=>i.bundle.localeCompare(a.bundle))})).map(({cap:s,group:i})=>{if(!i.length)return null;const a=[],r=(l,p,d)=>{const f=e.get(l.key);if(a.push({id:l.key,parent:d,depth:p,label:l.label,desc:(l.stage==="production"?"":this.tr("stageExperimental")+" · ")+"cap "+l.cap+" · "+l.tag,icon:l.icon,target:l.key,canonical:!0,kids:f?f.nodes[0].kids:0,title:l.label+" · <"+l.tag+"> · CAP "+l.cap+" "+this.tr("cap"+l.cap)}),!f)return;const k=y=>y===0?l.key:l.key+">"+y;for(const y of f.nodes.slice(1))a.push({id:k(y.id),parent:k(y.ancestors[y.ancestors.length-1]),depth:p+y.depth,label:y.label,part:!!y.part,target:y.selects||"",canonical:!1,icon:y.part?"dots":Wn[y.cap]||"embed",desc:y.part?this.tr("noStandalone"):"cap "+y.cap+" · "+y.tag,kids:y.kids||0,title:y.part?y.label+" · "+this.tr("partOf",{name:l.label}):y.label+" · <"+y.tag+"> · CAP "+y.cap+" "+this.tr("cap"+y.cap)})};for(const l of i){const p=[...l.rows].sort((f,k)=>k.cap-f.cap||f.label.localeCompare(k.label));if(p.length===1){r(p[0],0,"");continue}const d="bundle:"+l.bundle;a.push({id:d,parent:"",depth:0,label:l.bundle,desc:this.tr("elementsCount",{n:p.length}),icon:"folder",target:p[0].key,canonical:!1,folder:!0,kids:p.length,title:l.bundle+" · plugin-designs/"+l.bundle+"/ · "+p.length+" "+this.tr("elements")});for(const f of p)r(f,1,d)}return{id:"cap-"+s,cap:s,label:this.tr("cap"+s),title:this.tr("cap"+s)+" · "+(Zp[s]||""),icon:Wn[s]||"embed",nodes:a}}).filter(Boolean)},compositionTrees(){const e=[],t=(o,n,s,i,a)=>{const r=this.manifestBundles.find(k=>k.bundle===o.bundle),l=o.cap>=4&&r&&r.composes||[],p=[],d=[],f=new Set;for(const k of l){const y=this.resolveRef(k,o.bundle);if(!y){d.push(k);continue}y.key===o.key||f.has(y.key)||(f.add(y.key),p.push(y))}p.sort((k,y)=>y.cap-k.cap||k.label.localeCompare(y.label));for(const k of p){const y={id:i.length,label:k.label,tag:k.tag,cap:k.cap,selects:k.key,depth:n+1,ancestors:a,kids:0};i.push(y);const W=i.length;s.has(k.key)||t(k,n+1,new Set([...s,k.key]),i,[...a,y.id]),y.kids=i.filter((F,ee)=>ee>=W&&F.depth===n+2).length}for(const k of d)i.push({id:i.length,label:k,part:!0,selects:o.key,depth:n+1,ancestors:a,kids:0})};for(const o of this.manifestBundles){if(!o.composes||!o.composes.length||ia.has(o.bundle))continue;const n=this.rows.find(i=>i.bundle===o.bundle);if(!n)continue;const s=[{id:0,label:n.label,tag:n.tag,cap:n.cap,selects:n.key,depth:0,ancestors:[]}];t(n,0,new Set([n.key]),s,[0]),s[0].kids=s.filter(i=>i.depth===1).length,s.length>1&&e.push({bundle:o.bundle,nodes:s})}return e},active(){return this.rows.find(e=>e.key===this.activeKey)||null},effectiveTk(){return this.userTk||this.fetchedTk||this.tk||this.cfg.tk||this.bakedTk||""},effectiveProvider(){const e=String(this.userProvider||this.provider||this.cfg.provider||"").toLowerCase().trim();return e==="maplibre"||e==="mapbox"?e:""},engines(){return[{id:"",label:this.tr("engineDefault"),note:""},{id:"mapbox",label:"Mapbox",note:this.tr("engineMapboxNote")},{id:"maplibre",label:"MapLibre",note:this.tr("engineMaplibreNote")}]},engineLabel(){return this.userProvider==="mapbox"?"Mapbox":this.userProvider==="maplibre"?"MapLibre":this.tr("engineDefault")},tokenSource(){return this.userTk?"yours":this.fetchedTk?"url":this.tk||this.cfg.tk||this.bakedTk?"built":"none"},tokenStatus(){return this.effectiveProvider==="maplibre"?this.tr("tokenNotNeeded"):this.tokenSource==="yours"?this.tr("tokenSourceYours"):this.tokenSource==="url"?this.tr("tokenSourceUrl",{url:this.userTokenUrl}):this.tokenSource==="built"?this.tr("tokenSourceBuilt"):this.tr("tokenSourceNone")},countLabel(){const e=new Set(this.rows.map(t=>t.bundle)).size;return this.tr("countLabel",{bundles:e,elements:this.rows.length})},activeLang(){return jp(this.locale)||{code:this.locale,flag:"🌐",nativeName:this.locale}},uiDir(){return(this.activeLang&&this.activeLang.dir)==="rtl"?"rtl":"ltr"}},mounted(){this.bakedTk=typeof window<"u"&&window.MAP_TOKEN||"",this.hostProvider=typeof window<"u"&&typeof window.MAP_PROVIDER=="string"?window.MAP_PROVIDER:"",this.publishProvider(),this.userTk?this.publishToken():(this.userTokenUrl||this.tokenUrl||this.cfg.tokenUrl)&&this.fetchToken(this.userTokenUrl||this.tokenUrl||this.cfg.tokenUrl).then(e=>{e&&e!==this.fetchedTk&&(this.fetchedTk=e,this.publishToken(),this.remountPanes())}).catch(()=>{}),this.loadManifest()},beforeUnmount(){const e=window.__doxaStudioWidgets;if(e&&e.hosts)for(const t of Object.values(e.hosts))try{t.remove()}catch{}delete window.__doxaStudioWidgets},methods:{async fetchToken(e){if(!/^https?:\/\//i.test(e))throw new Error("not an http(s) URL");let t;try{t=await fetch(e,{cache:"no-store",credentials:"same-origin"})}catch{throw new Error("the request was blocked or the server did not answer (cross-origin rules can do this)")}if(!t.ok)throw new Error("HTTP "+t.status);const o=(await t.text()).trim();let n=o;try{const s=JSON.parse(o);n=s&&(s.token||s.tk||s.accessToken)||(typeof s=="string"?s:"")}catch{}if(n=String(n||"").trim(),n.startsWith("sk."))throw new Error(this.tr("tokenSecret"));if(!n.startsWith("pk."))throw new Error(this.tr("tokenNotPk"));return n},async applyToken(){this.tokenErr="";const e=this.tokenDraft,t=this.urlDraft;if(e.startsWith("sk.")){this.tokenErr=this.tr("tokenSecret");return}if(e&&!e.startsWith("pk.")){this.tokenErr=this.tr("tokenNotPk");return}this.tokenBusy=!0;try{let o="";if(!e&&t)try{o=await this.fetchToken(t)}catch(n){this.tokenErr=this.tr("tokenUrlFailed",{why:n.message});return}this.userTk=e,this.userTokenUrl=e?"":t,this.fetchedTk=o,yt(Eo,this.userTk),yt(Fo,this.userTokenUrl),this.publishToken(),this.remountPanes(),this.settingsOpen=!1}finally{this.tokenBusy=!1}},setHeaderHidden(e){this.headerHidden=!!e,this.settingsOpen=!1,this.engineOpen=!1,this.localeOpen=!1,yt(ta,e?"1":"")},setProvider(e){this.engineOpen=!1,e!==this.userProvider&&(this.userProvider=e,yt(oa,e),this.publishProvider(),this.remountPanes())},publishProvider(){typeof window>"u"||(this.effectiveProvider?window.MAP_PROVIDER=this.effectiveProvider:this.hostProvider?window.MAP_PROVIDER=this.hostProvider:"MAP_PROVIDER"in window&&delete window.MAP_PROVIDER)},clearToken(){this.tokenDraft="",this.urlDraft="",this.tokenErr="",this.userTk="",this.userTokenUrl="",this.fetchedTk="",yt(Eo,""),yt(Fo,""),this.publishToken(),this.remountPanes()},publishToken(){typeof window>"u"||(this.effectiveTk?(Qi(this.effectiveTk),window.MAP_TOKEN!==this.effectiveTk&&(window.MAP_TOKEN=this.effectiveTk)):qp())},remountPanes(){for(const t of this.rows)t.mounted&&this.releaseRow(t);const e=this.active;e&&this.$nextTick(()=>{this.activeKey===e.key&&this.mountElement(e)})},tr(e,t){const o=(this.locale||"en").split("-")[0];let n=(Io[this.locale]||{})[e]||(Io[o]||{})[e]||(Io.en||{})[e]||e;if(t)for(const s in t)n=n.split("{"+s+"}").join(String(t[s]));return n},resolveRef(e,t){return t&&this.rows.find(o=>o.key===t+"/"+e)||this.rows.find(o=>o.key===e)||this.rows.find(o=>o.tag===e)||this.rows.find(o=>o.bundle===e)||null},setSlot(e,t){t&&(this._slots=Object.assign(this._slots||{},{[e]:t}))},initialLocale(){let e=this.profileConfig;if(typeof e=="string")try{e=e?JSON.parse(e):{}}catch{e={}}let t="";try{const n=new URLSearchParams(window.location.search);t=n.get("lang")||n.get("locale")||""}catch{}const o=e&&(e.locale||e.lang)||t;return o?Hn(o):Vp()},paneConfig(e,t){const o={profile:e.profile,instanceId:"ps-"+e.key.replace(/\//g,"-"),locale:t};this.effectiveTk&&(o.tk=this.effectiveTk);const n=this.userTokenUrl||this.tokenUrl||this.cfg.tokenUrl;return n&&(o.tokenUrl=n),this.effectiveProvider&&(o.provider=this.effectiveProvider),this.base&&(o.treeBase=this.base),o},setLocale(e){this.locale=e,this.localeOpen=!1,Kp(e);try{for(const t of this.rows){if(!t.mounted)continue;const o=this._slots&&this._slots[t.key],n=o&&o.firstElementChild;n&&n.setAttribute&&n.setAttribute("profile-config",JSON.stringify(this.paneConfig(t,e)))}}catch{}},resolve(e){const t=String(e);if(/^(https?:)?\/\//.test(t)||t.startsWith("/"))return t;const o=t.replace(/^\.\//,"");return this.base?this.base.replace(/\/+$/,"")+"/"+o:"../"+o},loadManifest(){const e=o=>{this.manifestBundles=o&&o.bundles||[],this.rows=this.rowsFromManifest(o),this.setupWidgets(),this.route()},t=typeof window<"u"&&window.__psBaked||null;if(typeof fetch=="function"&&typeof location<"u"&&location.protocol!=="file:"){const o=this.base?this.resolve("manifest.json"):"../manifest.json";fetch(o,{cache:"no-cache"}).then(n=>n.ok?n.json():null).then(n=>e(n||t||{bundles:[]})).catch(()=>e(t||{bundles:[]}))}else e(t||{bundles:[]})},rowsFromManifest(e){const t=[];for(const o of e.bundles||[])if(!(o.bundle==="plugin-studio"||ia.has(o.bundle)))for(const n of o.profiles||[]){const s=o.elements&&o.elements.length?o.elements:null,i=(n.element&&(!s||s.includes(n.element))?n.element:null)||s&&s[0]||n.element||o.bundle,a=Xp(n.type||"single"),r=sa.has(i)||sa.has(o.bundle)||n.heavy===!0;t.push({key:o.bundle+"/"+n.profile,bundle:o.bundle,stage:o.stage==="production"?"production":"experimental",label:Qp(o.bundle,n),profile:n.profile,tag:i,cap:a,icon:Wn[a]||"embed",description:n.description||"",widget:n.widget&&["bottom-right","bottom-left","top-right","top-left"].includes(n.widget.corner)?n.widget.corner:"",heavy:r,bundleJs:o.scriptUrl||o.bundle+"/"+o.bundle+".js",embed:n.embed&&n.embed.script||"",mounted:!1,state:"idle",error:""})}return t.sort((o,n)=>n.cap-o.cap||o.bundle.localeCompare(n.bundle)||o.label.localeCompare(n.label)),t},route(){const e=(typeof location<"u"&&location.hash||"").replace(/^#\/?/,"");if(e&&this.rows.some(o=>o.key===e)){this.select(e);return}const t=this.readLastTab();if(t&&this.rows.some(o=>o.key===t)){this.select(t);return}this.rows.length&&this.select(this.rows[0].key)},storageKey(){return"dx-studio-tab:"+(typeof location<"u"&&location.pathname||"")},readLastTab(){try{return window.localStorage.getItem(this.storageKey())||""}catch{return""}},writeLastTab(e){try{window.localStorage.setItem(this.storageKey(),e)}catch{}},select(e){if(!this.rows.some(s=>s.key===e))return;const t=this.rows.find(s=>s.key===e);if(t&&t.widget){this.openWidget(t,!0);return}const o=this.activeKey;if(this.activeKey=e,this.embedOpen=!1,o&&o!==e){const s=this.rows.find(i=>i.key===o);s&&s.heavy&&s.mounted&&this.releaseRow(s)}const n=this.rows.find(s=>s.key===e);n&&(this.writeLastTab(e),n.mounted||this.$nextTick(()=>{this.activeKey===n.key&&this.mountElement(n)}))},releaseRow(e){try{const t=this._slots&&this._slots[e.key];t&&(t.innerHTML="")}catch{}this._slots&&delete this._slots[e.key],e.mounted=!1,e.state="idle",e.error=""},widgetStore(){return window.__doxaStudioWidgets||(window.__doxaStudioWidgets={hosts:{},els:{}}),window.__doxaStudioWidgets},widgetHost(e){const t=this.widgetStore();if(!document.getElementById("studio-widget-css")){const n=document.createElement("style");n.id="studio-widget-css",n.textContent=ed,document.head.appendChild(n)}if(t.hosts[e]&&t.hosts[e].isConnected)return t.hosts[e];const o=document.createElement("div");return o.setAttribute("data-studio-widgets",e),document.body.appendChild(o),t.hosts[e]=o,o},setupWidgets(){for(const e of this.rows.filter(t=>t.widget)){const t=this.widgetStore(),o=this.widgetHost(e.widget);let n=o.querySelector(`[data-widget="${e.key}"]`);if(!n){n=document.createElement("div"),n.setAttribute("data-widget",e.key);const i=document.createElement("div");i.setAttribute("data-widget-panel","");const a=document.createElement("button");a.type="button",a.setAttribute("data-widget-bubble","");const r="widget:"+e.key,l=this.tr(r);a.setAttribute("aria-label",l!==r?l:e.label),a.title=a.getAttribute("aria-label"),a.setAttribute("aria-expanded","false"),a.innerHTML=td,a.querySelector("[data-wb-text]").textContent=a.getAttribute("aria-label"),a.addEventListener("click",()=>this.openWidget(e,!i.hasAttribute("data-open"))),n.appendChild(i),n.appendChild(a),o.appendChild(n)}t.els[e.key]&&!n.querySelector(e.tag)&&n.querySelector("[data-widget-panel]").appendChild(t.els[e.key]);let s=!1;try{s=localStorage.getItem("plugin-studio:widget-open:"+e.key)==="1"}catch{}s&&this.openWidget(e,!0)}},openWidget(e,t){const n=this.widgetHost(e.widget).querySelector(`[data-widget="${e.key}"]`);if(!n){this.setupWidgets();return}const s=n.querySelector("[data-widget-panel]"),i=n.querySelector("[data-widget-bubble]");t?s.setAttribute("data-open",""):s.removeAttribute("data-open"),i.setAttribute("aria-expanded",t?"true":"false");try{localStorage.setItem("plugin-studio:widget-open:"+e.key,t?"1":"0")}catch{}const a=this.widgetStore();!t||a.els[e.key]||Rn(this.resolve(e.bundleJs)).then(()=>Yi(e.tag)).then(()=>{if(a.els[e.key])return;const r=document.createElement(e.tag);r.setAttribute("profile-config",JSON.stringify(this.paneConfig(e,this.locale))),r.setAttribute("variant","widget"),this.base&&r.setAttribute("tree-base",this.base.replace(/\/+$/,"")),r.style.cssText="display:block;position:absolute;inset:0;width:100%;height:100%;overflow-y:auto;overscroll-behavior:contain;";const l=n.querySelector("[data-widget-bubble]"),p=l.querySelector("[data-wb-text]");r.addEventListener("recording",d=>{const f=!!(Array.isArray(d.detail)?d.detail[0]:d.detail);l.setAttribute("data-listening",f?"true":"false"),f?p.textContent="":(l.setAttribute("data-speaking","false"),p.textContent=l.getAttribute("aria-label"))}),r.addEventListener("activity",d=>{const f=(Array.isArray(d.detail)?d.detail[0]:d.detail)||{};if(l.getAttribute("data-listening")!=="true")return;l.setAttribute("data-speaking",f.speaking?"true":"false");const k=f.words||"";p.textContent=k.length>34?"…"+k.slice(-33):k}),a.els[e.key]=r,s.appendChild(r)}).catch(r=>{s.textContent=r&&r.message||String(r)})},mountElement(e){e.mounted=!0,e.state="loading";const t=this.resolve(e.bundleJs);Rn(t).then(()=>Yi(e.tag)).then(()=>{try{if(e.heavy&&this.activeKey!==e.key){e.mounted=!1,e.state="idle";return}const o=this._slots&&this._slots[e.key];if(!o){e.state="error",e.error="no slot";return}o.innerHTML="";const n=document.createElement(e.tag);n.setAttribute("profile-config",JSON.stringify(this.paneConfig(e,this.locale))),this.base&&n.setAttribute("tree-base",this.base.replace(/\/+$/,"")),n.style.cssText="display:block;position:absolute;inset:0;width:100%;height:100%;",o.appendChild(n),e.state="ready"}catch(o){e.state="error",e.error="mount failed: "+(o&&o.message||String(o))}}).catch(o=>{e.state="error",e.error=o&&o.message||String(o)})},copyText(e,t){const o=()=>{const n=t.textContent;t.textContent=this.tr("copied"),setTimeout(()=>{t.textContent=n},1200)};if(navigator.clipboard&&navigator.clipboard.writeText)navigator.clipboard.writeText(e).then(o,()=>{});else try{const n=document.createElement("textarea");n.value=e,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),o()}catch{}}}}),nd={class:"ps-count"},sd={class:"ps-locale"},id=["aria-expanded","aria-label"],ad={class:"ps-flag"},rd={class:"ps-locale-name"},ld={key:0,class:"ps-locale-menu",role:"listbox"},cd=["aria-selected"],pd=["onClick"],dd={class:"ps-flag"},ud={class:"ps-locale-name"},fd={class:"ps-locale-en"},hd={class:"ps-locale ps-engine"},gd=["aria-expanded","aria-label","title"],$d={class:"ps-locale-name"},md=["aria-label"],bd=["aria-selected"],vd=["onClick"],kd={class:"ps-locale-name"},yd={class:"ps-locale-en"},_d={class:"ps-token"},wd=["aria-expanded","title"],xd={class:"ps-locale-name"},Sd={class:"ps-token-head"},Md={class:"ps-token-label"},Ld={class:"ps-token-label"},Td={class:"ps-token-row"},Cd=["disabled"],Od={class:"ps-token-note"},Pd=["title","aria-label"],Ad={class:"ps-locale-name"},Nd={key:0,class:"ps-toolbar"},Ed={class:"ps-bar"},Fd={class:"ps-bar-t"},Id={class:"ps-bar-sub"},Rd={key:0},Dd=["aria-expanded"],Hd={key:0,class:"ps-embed"},Wd=["value"],Ud=["title","aria-label"],zd={class:"ps-stage"},Bd=["hidden"],jd={key:0,class:"ps-hint"},Vd={key:1,class:"ps-hint err"},Kd={key:0,class:"ps-hint"};function qd(e,t,o,n,s,i){const a=gn("StudioTree"),r=gn("VerticalTabsLayout");return M(),Rt(r,{title:e.heading||e.tr("title"),dir:e.uiDir,"nav-label":e.tr("navLabel"),labels:{toggleList:e.tr("toggleList"),openViews:e.tr("openViews"),expandList:e.tr("expandList"),collapseList:e.tr("collapseList"),collapse:e.tr("collapse")},header:!e.headerHidden,active:e.activeKey,"onUpdate:active":e.select},{rail:ht(({collapsed:l,expand:p,pick:d})=>[ve(a,{sections:e.treeSections,active:e.activeKey,collapsed:l,expand:p,pick:d,strings:{filterPlaceholder:e.tr("filterPlaceholder"),collapseAll:e.tr("collapseAll"),noMatch:e.tr("noMatch"),treeLabel:e.tr("navLabel"),openSection:e.tr("openSection"),part:e.tr("part")}},null,8,["sections","active","collapsed","expand","pick","strings"])]),brand:ht(()=>[...t[11]||(t[11]=[v("span",{class:"ps-logo","aria-hidden":"true"},[v("svg",{viewBox:"0 0 24 24",width:"22",height:"22",fill:"none",stroke:"#92b195","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[v("path",{d:"M10 3v3M14 3v3M7 6h10v5a5 5 0 0 1-10 0V6Z"}),v("path",{d:"M12 16v5"})])],-1)])]),meta:ht(()=>[v("span",nd,T(e.countLabel),1),v("span",sd,[v("button",{type:"button",class:"ps-locale-btn","aria-expanded":String(e.localeOpen),"aria-label":e.tr("changeLanguage"),onClick:t[0]||(t[0]=l=>{e.localeOpen=!e.localeOpen,e.engineOpen=!1,e.settingsOpen=!1})},[v("span",ad,T(e.activeLang.flag),1),v("span",rd,T(e.activeLang.nativeName),1),t[12]||(t[12]=v("span",{class:"ps-dots","aria-hidden":"true"},"⋮",-1))],8,id),e.localeOpen?(M(),L("ul",ld,[(M(!0),L(Y,null,Oe(e.switcherLangs,l=>(M(),L("li",{key:l.code,role:"option","aria-selected":String(l.code===e.locale)},[v("button",{type:"button",class:he(["ps-locale-opt",{active:l.code===e.locale}]),onClick:p=>e.setLocale(l.code)},[v("span",dd,T(l.flag),1),v("span",ud,T(l.nativeName),1),v("span",fd,T(l.name),1)],10,pd)],8,cd))),128))])):V("",!0)]),v("span",hd,[v("button",{type:"button",class:"ps-locale-btn","aria-expanded":String(e.engineOpen),"aria-label":e.tr("mapEngine"),title:e.tr("mapEngine"),onClick:t[1]||(t[1]=l=>{e.engineOpen=!e.engineOpen,e.localeOpen=!1,e.settingsOpen=!1})},[t[13]||(t[13]=v("span",{"aria-hidden":"true"},"🗺",-1)),v("span",$d,T(e.engineLabel),1),t[14]||(t[14]=v("span",{class:"ps-dots","aria-hidden":"true"},"⋮",-1))],8,gd),e.engineOpen?(M(),L("ul",{key:0,class:"ps-locale-menu",role:"listbox","aria-label":e.tr("mapEngine")},[(M(!0),L(Y,null,Oe(e.engines,l=>(M(),L("li",{key:l.id||"default",role:"option","aria-selected":String(l.id===e.userProvider)},[v("button",{type:"button",class:he(["ps-locale-opt",{active:l.id===e.userProvider}]),onClick:p=>e.setProvider(l.id)},[v("span",kd,T(l.label),1),v("span",yd,T(l.note),1)],10,vd)],8,bd))),128))],8,md)):V("",!0)]),v("span",_d,[v("button",{type:"button",class:"ps-locale-btn ps-token-btn","aria-expanded":String(e.settingsOpen),title:e.tokenStatus,onClick:t[2]||(t[2]=l=>{e.settingsOpen=!e.settingsOpen,e.localeOpen=!1,e.engineOpen=!1})},[v("span",xd,T(e.tr("mapboxToken")),1),v("span",{class:he(["ps-token-dot","is-"+e.tokenSource]),"aria-hidden":"true"},null,2)],8,wd),e.settingsOpen?(M(),L("form",{key:0,class:"ps-token-panel",onSubmit:t[6]||(t[6]=Ii((...l)=>e.applyToken&&e.applyToken(...l),["prevent"]))},[v("p",Sd,T(e.tr("mapToken")),1),v("label",Md,[Ae(T(e.tr("tokenPaste"))+" ",1),gt(v("input",{class:"ps-token-input","onUpdate:modelValue":t[3]||(t[3]=l=>e.tokenDraft=l),placeholder:"pk.eyJ…",autocomplete:"off",spellcheck:"false"},null,512),[[Nn,e.tokenDraft,void 0,{trim:!0}]])]),v("label",Ld,[Ae(T(e.tr("tokenUrlLabel"))+" ",1),gt(v("input",{class:"ps-token-input","onUpdate:modelValue":t[4]||(t[4]=l=>e.urlDraft=l),type:"url",placeholder:"https://doxa.life/api/maps/token",autocomplete:"off",spellcheck:"false"},null,512),[[Nn,e.urlDraft,void 0,{trim:!0}]])]),v("div",Td,[v("button",{type:"submit",class:"ps-token-apply",disabled:e.tokenBusy},T(e.tr("tokenApply")),9,Cd),v("button",{type:"button",class:"ps-token-clear",onClick:t[5]||(t[5]=(...l)=>e.clearToken&&e.clearToken(...l))},T(e.tr("tokenClear")),1)]),v("p",{class:he(["ps-token-status",{err:!!e.tokenErr}]),role:"status"},T(e.tokenErr||e.tokenStatus),3),v("p",Od,T(e.tr("tokenStoredHere")),1)],32)):V("",!0)]),v("button",{type:"button",class:"ps-locale-btn ps-hide-header",title:e.tr("hideHeader"),"aria-label":e.tr("hideHeader"),onClick:t[7]||(t[7]=l=>e.setHeaderHidden(!0))},[t[15]||(t[15]=v("span",{"aria-hidden":"true"},"⌃",-1)),v("span",Ad,T(e.tr("hideHeader")),1)],8,Pd)]),toolbar:ht(()=>[e.active?(M(),L("div",Nd,[v("div",Ed,[v("div",Fd,[v("b",null,T(e.active.label),1),v("span",Id,[Ae(T(e.active.bundle)+" · <"+T(e.active.tag)+">",1),e.active.description?(M(),L("span",Rd," · "+T(e.active.description),1)):V("",!0)])]),e.active.embed?(M(),L("button",{key:0,type:"button",class:"ps-btn","aria-expanded":String(e.embedOpen),onClick:t[8]||(t[8]=l=>e.embedOpen=!e.embedOpen)},T(e.tr("copyEmbed")),9,Dd)):V("",!0)]),e.embedOpen&&e.active.embed?(M(),L("div",Hd,[v("label",null,[Ae(T(e.tr("scriptEmbed"))+" ",1),v("button",{type:"button",class:"ps-btn",onClick:t[9]||(t[9]=l=>e.copyText(e.active.embed,l.target))},T(e.tr("copy")),1)]),v("textarea",{readonly:"",value:e.active.embed},null,8,Wd)])):V("",!0)])):V("",!0)]),default:ht(()=>[e.headerHidden?(M(),L("button",{key:0,type:"button",class:"ps-show-header",title:e.tr("showHeader"),"aria-label":e.tr("showHeader"),onClick:t[10]||(t[10]=l=>e.setHeaderHidden(!1))},[t[16]||(t[16]=v("span",{"aria-hidden":"true"},"⌄",-1)),Ae(" "+T(e.tr("showHeader")),1)],8,Ud)):V("",!0),v("div",zd,[(M(!0),L(Y,null,Oe(e.flatRows,l=>gt((M(),L("section",{key:l.key,class:"ps-pane",hidden:l.key!==e.activeKey},[!l.heavy||l.key===e.activeKey?(M(),L(Y,{key:0},[v("div",{class:"ps-slot",ref_for:!0,ref:p=>e.setSlot(l.key,p)},null,512),l.state==="loading"?(M(),L("div",jd,T(e.tr("loading",{name:l.label})),1)):l.state==="error"?(M(),L("div",Vd,[Ae(T(e.tr("couldNotLoad",{name:l.label})),1),t[17]||(t[17]=v("br",null,null,-1)),v("small",null,T(l.error),1)])):V("",!0)],64)):V("",!0)],8,Bd)),[[Tn,l.key===e.activeKey]])),128)),e.activeKey?V("",!0):(M(),L("div",Kd,T(e.tr("chooseElement")),1))])]),_:1},8,["title","dir","nav-label","labels","header","active","onUpdate:active"])}const Gd=Po(od,[["render",qd],["styles",[Gp]]]),Yd=dc(),Jd=Ol(Gd,{configureApp(e){e.provide("psTreeBase",Yd)}});typeof customElements<"u"&&!customElements.get("plugin-studio")&&customElements.define("plugin-studio",Jd)})(); diff --git a/public/dx-maps/plugin-studio/plugin-studio/index.html b/public/dx-maps/plugin-studio/plugin-studio/index.html index a7cc52421..5b0965a6c 100644 --- a/public/dx-maps/plugin-studio/plugin-studio/index.html +++ b/public/dx-maps/plugin-studio/plugin-studio/index.html @@ -61,7 +61,7 @@ - + - +