1import{r as B,j as f,ae as G,B as q,aA as z}from"./index-Cz_6F7O7.js";import{u as X,a as K,b as J,M as P}from"./store-Bza-bNAW.js";function Q(t,e){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;const r=document.implementation.createHTMLDocument(),n=r.createElement("base"),i=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(i),e&&(n.href=e),i.href=t,i.href}const Y=(()=>{let t=0;const e=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${e()}${t}`)})();function g(t){const e=[];for(let r=0,n=t.length;r<n;r++)e.push(t[r]);return e}let d=null;function k(t={}){return d||(t.includeStyleProperties?(d=t.includeStyleProperties,d):(d=g(window.getComputedStyle(document.documentElement)),d))}function y(t,e){const n=(t.ownerDocument.defaultView||window).getComputedStyle(t).getPropertyValue(e);return n?parseFloat(n.replace("px","")):0}function Z(t){const e=y(t,"border-left-width"),r=y(t,"border-right-width");return t.clientWidth+e+r}function N(t){const e=y(t,"border-top-width"),r=y(t,"border-bottom-width");return t.clientHeight+e+r}function D(t,e={}){const r=e.width||Z(t),n=e.height||N(t);return{width:r,height:n}}function tt(){let t,e;try{e=process}catch{}const r=e&&e.env?e.env.devicePixelRatio:null;return r&&(t=parseInt(r,10),Number.isNaN(t)&&(t=1)),t||window.devicePixelRatio||1}const u=16384;function et(t){(t.width>u||t.height>u)&&(t.width>u&&t.height>u?t.width>t.height?(t.height*=u/t.width,t.width=u):(t.width*=u/t.height,t.height=u):t.width>u?(t.height*=u/t.width,t.width=u):(t.width*=u/t.height,t.height=u))}function p(t){return new Promise((e,r)=>{const n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>e(n))})},n.onerror=r,n.crossOrigin="anonymous",n.decoding="async",n.src=t})}async function rt(t){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function nt(t,e,r){const n="http://www.w3.org/2000/svg",i=document.createElementNS(n,"svg"),s=document.createElementNS(n,"foreignObject");return i.setAttribute("width",`${e}`),i.setAttribute("height",`${r}`),i.setAttribute("viewBox",`0 0 ${e} ${r}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),i.appendChild(s),s.appendChild(t),rt(i)}const l=(t,e)=>{if(t instanceof e)return!0;const r=Object.getPrototypeOf(t);return r===null?!1:r.constructor.name===e.name||l(r,e)};function st(t){const e=t.getPropertyValue("content");return`${t.cssText} content: '${e.replace(/'|"/g,"")}';`}function it(t,e){return k(e).map(r=>{const n=t.getPropertyValue(r),i=t.getPropertyPriority(r);return`${r}: ${n}${i?" !important":""};`}).join(" ")}function at(t,e,r,n){const i=`.${t}:${e}`,s=r.cssText?st(r):it(r,n);return document.createTextNode(`${i}{${s}}`)}function $(t,e,r,n){const i=window.getComputedStyle(t,r),s=i.getPropertyValue("content");if(s===""||s==="none")return;const a=Y();try{e.className=`${e.className} ${a}`}catch{return}const c=document.createElement("style");c.appendChild(at(a,r,i,n)),e.appendChild(c)}function ct(t,e,r){$(t,e,":before",r),$(t,e,":after",r)}const T="application/font-woff",L="image/jpeg",ot={woff:T,woff2:T,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:L,jpeg:L,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function lt(t){const e=/\.([^./]*?)$/g.exec(t);return e?e[1]:""}function R(t){const e=lt(t).toLowerCase();return ot[e]||""}function ut(t){return t.split(/,/)[1]}function E(t){return t.search(/^(data:)/)!==-1}function ft(t,e){return`data:${e};base64,${t}`}async function M(t,e,r){const n=await fetch(t,e);if(n.status===404)throw new Error(`Resource "${n.url}" not found`);const i=await n.blob();return new Promise((s,a)=>{const c=new FileReader;c.onerror=a,c.onloadend=()=>{try{s(r({res:n,result:c.result}))}catch(o){a(o)}},c.readAsDataURL(i)})}const x={};function ht(t,e,r){let n=t.replace(/\?.*/,"");return r&&(n=t),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),e?`[${e}
1]${n}`:n}async function C(t,e,r){const n=ht(t,e,r.includeQueryParams);if(x[n]!=null)return x[n];r.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+new Date().getTime());let i;try{const s=await M(t,r.fetchRequestInit,({res:a,result:c})=>(e||(e=a.headers.get("Content-Type")||""),ut(c)));i=ft(s,e)}catch(s){i=r.imagePlaceholder||"";let a=`Failed to fetch resource: ${t}`;s&&(a=typeof s=="string"?s:s.message),a&&console.warn(a)}return x[n]=i,i}async function mt(t){const e=t.toDataURL();return e==="data:,"?t.cloneNode(!1):p(e)}async function gt(t,e){if(t.currentSrc){const s=document.createElement("canvas"),a=s.getContext("2d");s.width=t.clientWidth,s.height=t.clientHeight,a==null||a.drawImage(t,0,0,s.width,s.height);const c=s.toDataURL();return p(c)}const r=t.poster,n=R(r),i=await C(r,n,e);return p(i)}async function dt(t,e){var r;try{if(!((r=t==null?void 0:t.contentDocument)===null||r===void 0)&&r.body)return await b(t.contentDocument.body,e,!0)}catch{}return t.cloneNode(!1)}async function wt(t,e){return l(t,HTMLCanvasElement)?mt(t):l(t,HTMLVideoElement)?gt(t,e):l(t,HTMLIFrameElement)?dt(t,e):t.cloneNode(U(t))}const yt=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SLOT",U=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SVG";async function pt(t,e,r){var n,i;if(U(e))return e;let s=[];return yt(t)&&t.assignedNodes?s=g(t.assignedNodes()):l(t,HTMLIFrameElement)&&(!((n=t.contentDocument)===null||n===void 0)&&n.body)?s=g(t.contentDocument.body.childNodes):s=g(((i=t.shadowRoot)!==null&&i!==void 0?i:t).childNodes),s.length===0||l(t,HTMLVideoElement)||await s.reduce((a,c)=>a.then(()=>b(c,r)).then(o=>{o&&e.appendChild(o)}),Promise.resolve()),e}function bt(t,e,r){const n=e.style;if(!n)return;const i=window.getComputedStyle(t);i.cssText?(n.cssText=i.cssText,n.transformOrigin=i.transformOrigin):k(r).forEach(s=>{let a=i.getPropertyValue(s);s==="font-size"&&a.endsWith("px")&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),l(t,HTMLIFrameElement)&&s==="display"&&a==="inline"&&(a="block"),s==="d"&&e.getAttribute("d")&&(a=`path(${e.getAttribute("d")})`),n.setProperty(s,a,i.getPropertyPriority(s))})}function St(t,e){l(t,HTMLTextAreaElement)&&(e.innerHTML=t.value),l(t,HTMLInputElement)&&e.setAttribute("value",t.value)}function xt(t,e){if(l(t,HTMLSelectElement)){const r=e,n=Array.from(r.children).find(i=>t.value===i.getAttribute("value"));n&&n.setAttribute("selected","")}}function Et(t,e,r){return l(e,Element)&&(bt(t,e,r),ct(t,e,r),St(t,e),xt(t,e)),e}async function Rt(t,e){const r=t.querySelectorAll?t.querySelectorAll("use"):[];if(r.length===0)return t;const n={};for(let s=0;s<r.length;s++){const c=r[s].getAttribute("xlink:href");if(c){const o=t.querySelector(c),h=document.querySelector(c);!o&&h&&!n[c]&&(n[c]=await b(h,e,!0))}}const i=Object.values(n);if(i.length){const s="http://www.w3.org/1999/xhtml",a=document.createElementNS(s,"svg");a.setAttribute("xmlns",s),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";const c=document.createElementNS(s,"defs");a.appendChild(c);for(let o=0;o<i.length;o++)c.appendChild(i[o]);t.appendChild(a)}return t}async function b(t,e,r){return!r&&e.filter&&!e.filter(t)?null:Promise.resolve(t).then(n=>wt(n,e)).then(n=>pt(t,n,e)).then(n=>Et(t,n,e)).then(n=>Rt(n,e))}const j=/url\((['"]?)([^'"]+?)\1\)/g,Ct=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Pt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function $t(t){const e=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")}function Tt(t){const e=[];return t.replace(j,(r,n,i)=>(e.push(i),r)),e.filter(r=>!E(r))}async function Lt(t,e,r,n,i){try{const s=r?Q(e,r):e,a=R(e);let c;return i||(c=await C(s,a,n)),t.replace($t(e),`$1${c}$3`)}catch{}return t}function Ft(t,{preferredFontFormat:e}){return e?t.replace(Pt,r=>{for(;;){const[n,,i]=Ct.exec(r)||[];if(!i)return"";if(i===e)return`src: ${n};`}}):t}function H(t){return t.search(j)!==-1}async function V(t,e,r){if(!H(t))return t;const n=Ft(t,r);return Tt(n).reduce((s,a)=>s.then(c=>Lt(c,a,e,r)),Promise.resolve(n))}async function w(t,e,r){var n;const i=(n=e.style)===null||n===void 0?void 0:n.getPropertyValue(t);if(i){const s=await V(i,null,r);return e.style.setProperty(t,s,e.style.getPropertyPriority(t)),!0}return!1}async function It(t,e){await w("background",t,e)||await w("background-image",t,e),await w("mask",t,e)||await w("-webkit-mask",t,e)||await w("mask-image",t,e)||await w("-webkit-mask-image",t,e)}async function At(t,e){const r=l(t,HTMLImageElement);if(!(r&&!E(t.src))&&!(l(t,SVGImageElement)&&!E(t.href.baseVal)))return;const n=r?t.src:t.href.baseVal,i=await C(n,R(n),e);await new Promise((s,a)=>{t.onload=s,t.onerror=e.onImageErrorHandler?(...o)=>{try{s(e.onImageErrorHandler(...o))}catch(h){a(h)}}:a;const c=t;c.decode&&(c.decode=s),c.loading==="lazy"&&(c.loading="eager"),r?(t.srcset="",t.src=i):t.href.baseVal=i})}async function vt(t,e){const n=g(t.childNodes).map(i=>O(i,e));await Promise.all(n).then(()=>t)}async function O(t,e){l(t,Element)&&(await It(t,e),await At(t,e),await vt(t,e))}function kt(t,e){const{style:r}=t;e.backgroundColor&&(r.backgroundColor=e.backgroundColor),e.width&&(r.width=`${e.width}px`),e.height&&(r.height=`${e.height}px`);const n=e.style;
1return n!=null&&Object.keys(n).forEach(i=>{r[i]=n[i]}),t}const F={};async function I(t){let e=F[t];if(e!=null)return e;const n=await(await fetch(t)).text();return e={url:t,cssText:n},F[t]=e,e}async function A(t,e){let r=t.cssText;const n=/url\(["']?([^"')]+)["']?\)/g,s=(r.match(/url\([^)]+\)/g)||[]).map(async a=>{let c=a.replace(n,"$1");return c.startsWith("https://")||(c=new URL(c,t.url).href),M(c,e.fetchRequestInit,({result:o})=>(r=r.replace(a,`url(${o})`),[a,o]))});return Promise.all(s).then(()=>r)}function v(t){if(t==null)return[];const e=[],r=/(\/\*[\s\S]*?\*\/)/gi;let n=t.replace(r,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const o=i.exec(n);if(o===null)break;e.push(o[0])}n=n.replace(i,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(a,"gi");for(;;){let o=s.exec(n);if(o===null){if(o=c.exec(n),o===null)break;s.lastIndex=c.lastIndex}else c.lastIndex=s.lastIndex;e.push(o[0])}return e}async function Dt(t,e){const r=[],n=[];return t.forEach(i=>{if("cssRules"in i)try{g(i.cssRules||[]).forEach((s,a)=>
1{if(s.type===CSSRule.IMPORT_RULE){let c=a+1;const o=s.href,h=I(o).then(m=>A(m,e)).then(m=>v(m).forEach(S=>{try{i.insertRule(S,S.startsWith("@import")?c+=1:i.cssRules.length)}catch(W){console.error("Error inserting rule from remote css",{rule:S,error:W})}})).catch(m=>{console.error("Error loading remote css",m.toString())});n.push(h)}})}catch(s){const a=t.find(c=>c.href==null)||document.styleSheets[0];i.href!=null&&n.push(I(i.href).then(c=>A(c,e)).then(c=>v(c).forEach(o=>{a.insertRule(o,a.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",s)}}),Promise.all(n).then(()=>(t.forEach(i=>{if("cssRules"in i)try{g(i.cssRules||[]).forEach(s=>{r.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${i.href}`,s)}}),r))}function Mt(t){return t.filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>H(e.style.getPropertyValue("src")))}async function Ut(t,e){if(t.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=g(t.ownerDocument.styleSheets),n=await Dt(r,e);return Mt(n)}function _(t){return t.trim().replace(/["']/g,"")}function jt(t){const e=new Set;function r(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(s=>{e.add(_(s))}),Array.from(n.children).forEach(s=>{s instanceof HTMLElement&&r(s)})}return r(t),e}async function Ht(t,e){const r=await Ut(t,e),n=jt(t);return(await Promise.all(r.filter(s=>n.has(_(s.style.fontFamily))).map(s=>{const a=s.parentStyleSheet?s.parentStyleSheet.href:null;return V(s.cssText,a,e)}))).join(` 2`)}async function Vt(t,e){const r=e.fontEmbedCSS!=null?e.fontEmbedCSS:e.skipFonts?null:await Ht(t,e);if(r){const n=document.createElement("style"),i=document.createTextNode(r);n.appendChild(i),t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)}}async function Ot(t,e={}){const{width:r,height:n}=D(t,e),i=await b(t,e,!0);return await Vt(i,e),await O(i,e),kt(i,e),await nt(i,r,n)}async function _t(t,e={}){const{width:r,height:n}=D(t,e),i=await Ot(t,e),s=await p(i),a=document.createElement("canvas"),c=a.getContext("2d"),o=e.pixelRatio||tt(),h=e.canvasWidth||r,m=e.canvasHeight||n;return a.width=h*o,a.height=m*o,e.skipAutoScale||et(a),a.style.width=`${h}`,a.style.height=`${m}`,e.backgroundColor&&(c.fillStyle=e.backgroundColor,c.fillRect(0,0,a.width,a.height)),c.drawImage(s,0,0,a.width,a.height),a}async function Wt(t,e={}){return(await _t(t,e)).toDataURL()}function qt(){const t=X(P),e=K(P),r=B.useRef(null),n=async()=>{if(!r.current)return;const i=await Wt(r.current,{pixelRatio:3,cacheBust:!0,backgroundColor:"#ffffff"}),s=document.createElement("a");s.href=i,s.download="sons-guadalupe-map-numbered.png",s.click()};return f.jsxs(f.Fragment,{children:[f.jsx(G,{title:"Numbered map export",description:"Numbered placements export",noIndex:!0}),f.jsxs("div",{className:"min-h-screen bg-white flex flex-col",children:[f.jsxs("div",{className:"p-3 flex items-center justify-between border-b",children:[f.jsx("h1",{className:"font-serif text-lg font-bold text-primary",children:"Numbered map"}),f.jsxs(q,{size:"sm",onClick:n,children:[f.jsx(z,{className:"w-4 h-4 mr-1"}),"Download PNG"]})]}),f.jsx("div",{className:"flex-1 p-4",children:f.jsx("div",{ref:r,className:"w-full max-w-[1800px] mx-auto",children:f.jsx(J,{placements:t,globalScale:e,fullBleed:!0,showLabels:!0})})})]})]})}export{qt as default}; 3//# sourceMappingURL=Map5EditorNumbered-BCt8nPmY.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.