@mappedin/react-ui 6.9.0-beta.0 → 6.9.1-beta.0
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.
- package/lib/esm/{chunk-6PPDNG4B.js → chunk-E3KRW6U5.js} +1 -1
- package/lib/esm/{chunk-R4VVGLYZ.js → chunk-HHLRVMBX.js} +1 -1
- package/lib/esm/{chunk-GJWKDIUL.js → chunk-HSR66YU6.js} +1 -1
- package/lib/esm/{chunk-CSLA67FZ.js → chunk-LUNEX6XS.js} +1 -1
- package/lib/esm/{chunk-WBXN5D5G.js → chunk-RX62PM76.js} +1 -1
- package/lib/esm/{chunk-APRH4CAT.js → chunk-S3SNLAZ2.js} +1 -1
- package/lib/esm/{chunk-GJIP2NMB.js → chunk-TPBVLR4S.js} +1 -1
- package/lib/esm/{chunk-GPW4PJ7Q.js → chunk-TY6GBURX.js} +1 -1
- package/lib/esm/{chunk-GXFJG6ET.js → chunk-VB2SNF5E.js} +1 -1
- package/lib/esm/{chunk-W6FAYJPU.js → chunk-VSEMIYX2.js} +1 -1
- package/lib/esm/components/floor-selector/index.js +1 -1
- package/lib/esm/components/location-list/index.js +1 -1
- package/lib/esm/components/search/index.js +1 -1
- package/lib/esm/components/search-bar/index.js +1 -1
- package/lib/esm/components/zoom-controls/index.js +1 -1
- package/lib/esm/index.d.ts +5 -5
- package/lib/esm/index.js +1 -1
- package/lib/esm/themes/basic.js +1 -1
- package/lib/esm/themes/mappedin-dark.js +1 -1
- package/lib/esm/themes/mappedin-light.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as J,d as Q,e as ee}from"./chunk-GPW4PJ7Q.js";import{a as Z}from"./chunk-GJWKDIUL.js";import{c as L,d as K,e as E}from"./chunk-W6FAYJPU.js";import{a as h,b as v,c as l,d as j,f as b}from"./chunk-APRH4CAT.js";import{useEffect as We,useMemo as Xe,useRef as Ye}from"react";import Ie,{cloneElement as De,isValidElement as Re,useCallback as I,useEffect as D,useReducer as Ne,useRef as q,useState as Ce}from"react";import*as re from"react";var ve=l(t=>typeof t!="string"?{}:t.split(/ ?; ?/).reduce((e,r)=>{let[n,i]=r.split(/ ?: ?/).map((c,a)=>a===0?c.replace(/\s+/g,""):c.trim());if(n&&i){let c=n.replace(/(\w)-(\w)/g,(u,s,o)=>"".concat(s).concat(o.toUpperCase())),a=i.trim();Number.isNaN(Number(i))||(a=Number(i)),e[n.startsWith("-")?n:c]=a}return e},{}),"styleToObject");function ke(t=6){let e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r="";for(let n=t;n>0;--n)r+=e[Math.round(Math.random()*(e.length-1))];return r}l(ke,"randomString");var we=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],te={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",typemustmatch:"typeMustMatch",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"};function xe(t,e){var a,u;let c=e,{key:r,level:n}=c,i=j(c,["key","level"]);switch(t.nodeType){case 1:return re.createElement(Le(t.nodeName),be(t,r),ne(t.childNodes,n,i));case 3:{let s=(u=(a=t.nodeValue)==null?void 0:a.toString())!=null?u:"";if(!i.allowWhiteSpaces&&/^\s+$/.test(s)&&!/[\u00A0\u202F]/.test(s))return null;if(!t.parentNode)return s;let o=t.parentNode.nodeName.toLowerCase();return we.includes(o)?(/\S/.test(s)&&console.warn("A textNode is not allowed inside '".concat(o,"'. Your text \"").concat(s,'" will be ignored')),null):s}case 8:return null;case 11:return ne(t.childNodes,n,e);default:return null}}l(xe,"getReactNode");function be(t,e){let r={key:e};if(t instanceof Element){let n=t.getAttribute("class");n&&(r.className=n),[...t.attributes].forEach(i=>{switch(i.name){case"class":break;case"style":r[i.name]=ve(i.value);break;case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"readonly":case"required":case"reversed":case"selected":case"typemustmatch":r[te[i.name]||i.name]=!0;break;default:r[te[i.name]||i.name]=i.value}})}return r}l(be,"parseAttributes");function ne(t,e,r){let n=[...t].map((i,c)=>M(i,v(h({},r),{index:c,level:e+1}))).filter(Boolean);return n.length?n:null}l(ne,"parseChildren");function Le(t){return/[a-z]+[A-Z]+[a-z]+/.test(t)?t:t.toLowerCase()}l(Le,"parseName");function H(t,e={}){return typeof t=="string"?Ee(t,e):t instanceof Node?M(t,e):null}l(H,"convert");function M(t,e={}){if(!t||!(t instanceof Node))return null;let{actions:r=[],index:n=0,level:i=0,randomKey:c}=e,a=t,u="".concat(i,"-").concat(n),s=[];return c&&i===0&&(u="".concat(ke(),"-").concat(u)),Array.isArray(r)&&r.forEach(o=>{o.condition(a,u,i)&&(typeof o.pre=="function"&&(a=o.pre(a,u,i),a instanceof Node||(a=t,b.env.NODE_ENV!=="production"&&console.warn("The `pre` method always must return a valid DomNode (instanceof Node) - your modification will be ignored (Hint: if you want to render a React-component, use the `post` method instead)"))),typeof o.post=="function"&&s.push(o.post(a,u,i)))}),s.length?s:xe(a,h({key:u,level:i},e))}l(M,"convertFromNode");function Ee(t,e={}){if(!t||typeof t!="string")return null;let{includeAllNodes:r=!1,nodeOnly:n=!1,selector:i="body > *",type:c="text/html"}=e;try{let u=new DOMParser().parseFromString(t,c);if(r){let{childNodes:o}=u.body;return n?o:[...o].map(g=>M(g,e))}let s=u.querySelector(i)||u.body.childNodes[0];if(!(s instanceof Node))throw new TypeError("Error parsing input");return n?s:M(s,e)}catch(a){b.env.NODE_ENV!=="production"&&console.error(a)}return null}l(Ee,"convertFromString");import{useEffect as Ve,useRef as qe}from"react";var Se=Object.defineProperty,Ae=l((t,e,r)=>e in t?Se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,"__defNormalProp"),z=l((t,e,r)=>Ae(t,typeof e!="symbol"?e+"":e,r),"__publicField"),ie="react-inlinesvg",Pe=10,d={IDLE:"idle",LOADING:"loading",LOADED:"loaded",FAILED:"failed",READY:"ready",UNSUPPORTED:"unsupported"};function Te(t){return t[Math.floor(Math.random()*t.length)]}l(Te,"randomCharacter");function O(){var t;return!!(typeof window<"u"&&((t=window.document)!=null&&t.createElement))}l(O,"canUseDOM");function Oe(){return Ue()&&typeof window<"u"&&window!==null}l(Oe,"isSupportedEnvironment");function Me(t,...e){let r={};for(let n in t)({}).hasOwnProperty.call(t,n)&&(e.includes(n)||(r[n]=t[n]));return r}l(Me,"omit");function He(t){let e="abcdefghijklmnopqrstuvwxyz",n="".concat(e).concat(e.toUpperCase()).concat("1234567890"),i="";for(let c=0;c<t;c++)i+=Te(n);return i}l(He,"randomString");async function ae(t,e){let r=await fetch(t,e),n=r.headers.get("content-type"),[i]=(n!=null?n:"").split(/ ?; ?/);if(r.status>299)throw new Error("Not found");if(!["image/svg+xml","text/plain"].some(c=>i.includes(c)))throw new Error("Content type isn't valid: ".concat(i));return r.text()}l(ae,"request");function ze(t=1){return new Promise(e=>{setTimeout(e,t*1e3)})}l(ze,"sleep");function Ue(){if(!document)return!1;let t=document.createElement("div");t.innerHTML="<svg />";let e=t.firstChild;return!!e&&e.namespaceURI==="http://www.w3.org/2000/svg"}l(Ue,"supportsInlineSVG");var N,Fe=(N=class{constructor(){var n;z(this,"cacheApi"),z(this,"cacheStore"),z(this,"subscribers",[]),z(this,"isReady",!1),this.cacheStore=new Map;let e=ie,r=!1;O()&&(e=(n=window.REACT_INLINESVG_CACHE_NAME)!=null?n:ie,r=!!window.REACT_INLINESVG_PERSISTENT_CACHE&&"caches"in window),r?caches.open(e).then(i=>{this.cacheApi=i}).catch(i=>{console.error("Failed to open cache: ".concat(i.message)),this.cacheApi=void 0}).finally(()=>{this.isReady=!0;let i=[...this.subscribers];this.subscribers.length=0,i.forEach(c=>{try{c()}catch(a){console.error("Error in CacheStore subscriber callback: ".concat(a.message))}})}):this.isReady=!0}onReady(e){this.isReady?e():this.subscribers.push(e)}async get(e,r){var n,i;return await(this.cacheApi?this.fetchAndAddToPersistentCache(e,r):this.fetchAndAddToInternalCache(e,r)),(i=(n=this.cacheStore.get(e))==null?void 0:n.content)!=null?i:""}set(e,r){this.cacheStore.set(e,r)}isCached(e){var r;return((r=this.cacheStore.get(e))==null?void 0:r.status)===d.LOADED}async fetchAndAddToInternalCache(e,r){let n=this.cacheStore.get(e);if((n==null?void 0:n.status)===d.LOADING){await this.handleLoading(e,async()=>{this.cacheStore.set(e,{content:"",status:d.IDLE}),await this.fetchAndAddToInternalCache(e,r)});return}if(!(n!=null&&n.content)){this.cacheStore.set(e,{content:"",status:d.LOADING});try{let i=await ae(e,r);this.cacheStore.set(e,{content:i,status:d.LOADED})}catch(i){throw this.cacheStore.set(e,{content:"",status:d.FAILED}),i}}}async fetchAndAddToPersistentCache(e,r){var c,a,u,s;let n=this.cacheStore.get(e);if((n==null?void 0:n.status)===d.LOADED)return;if((n==null?void 0:n.status)===d.LOADING){await this.handleLoading(e,async()=>{this.cacheStore.set(e,{content:"",status:d.IDLE}),await this.fetchAndAddToPersistentCache(e,r)});return}this.cacheStore.set(e,{content:"",status:d.LOADING});let i=await((c=this.cacheApi)==null?void 0:c.match(e));if(i){let o=await i.text();this.cacheStore.set(e,{content:o,status:d.LOADED});return}try{await((a=this.cacheApi)==null?void 0:a.add(new Request(e,r)));let o=await((u=this.cacheApi)==null?void 0:u.match(e)),g=(s=await(o==null?void 0:o.text()))!=null?s:"";this.cacheStore.set(e,{content:g,status:d.LOADED})}catch(o){throw this.cacheStore.set(e,{content:"",status:d.FAILED}),o}}async handleLoading(e,r){var n;for(let i=0;i<Pe;i++){if(((n=this.cacheStore.get(e))==null?void 0:n.status)!==d.LOADING)return;await ze(.1)}await r()}keys(){return[...this.cacheStore.keys()]}data(){return[...this.cacheStore.entries()].map(([e,r])=>({[e]:r}))}async delete(e){this.cacheApi&&await this.cacheApi.delete(e),this.cacheStore.delete(e)}async clear(){if(this.cacheApi){let e=await this.cacheApi.keys();await Promise.allSettled(e.map(r=>this.cacheApi.delete(r)))}this.cacheStore.clear()}},l(N,"CacheStore"),N);function oe(t){let e=qe(void 0);return Ve(()=>{e.current=t}),e.current}l(oe,"usePrevious");function Ge(t){let{baseURL:e,content:r,description:n,handleError:i,hash:c,preProcessor:a,title:u,uniquifyIDs:s=!1}=t;try{let o=$e(r,a),g=H(o,{nodeOnly:!0});if(!g||!(g instanceof SVGSVGElement))throw new Error("Could not convert the src to a DOM Node");let f=se(g,{baseURL:e,hash:c,uniquifyIDs:s});if(n){let m=f.querySelector("desc");m!=null&&m.parentNode&&m.parentNode.removeChild(m);let y=document.createElementNS("http://www.w3.org/2000/svg","desc");y.innerHTML=n,f.prepend(y)}if(typeof u<"u"){let m=f.querySelector("title");if(m!=null&&m.parentNode&&m.parentNode.removeChild(m),u){let y=document.createElementNS("http://www.w3.org/2000/svg","title");y.innerHTML=u,f.prepend(y)}}return f}catch(o){return i(o)}}l(Ge,"getNode");function $e(t,e){return e?e(t):t}l($e,"processSVG");function se(t,e){let{baseURL:r="",hash:n,uniquifyIDs:i}=e,c=["id","href","xlink:href","xlink:role","xlink:arcrole"],a=["href","xlink:href"],u=l((s,o)=>a.includes(s)&&(o?!o.includes("#"):!1),"isDataValue");return i&&[...t.children].forEach(s=>{var o;if((o=s.attributes)!=null&&o.length){let g=Object.values(s.attributes).map(f=>{let m=f,y=/url\((.*?)\)/.exec(f.value);return y!=null&&y[1]&&(m.value=f.value.replace(y[0],"url(".concat(r).concat(y[1],"__").concat(n,")"))),m});c.forEach(f=>{let m=g.find(y=>y.name===f);m&&!u(f,m.value)&&(m.value="".concat(m.value,"__").concat(n))})}return s.children.length?se(s,e):s}),t}l(se,"updateSVGAttributes");var R;function _e(t){let{cacheRequests:e=!0,children:r=null,description:n,fetchOptions:i,innerRef:c,loader:a=null,onError:u,onLoad:s,src:o,title:g,uniqueHash:f}=t,[m,y]=Ne((p,k)=>h(h({},p),k),{content:"",element:null,isCached:e&&R.isCached(t.src),status:d.IDLE}),{content:$,element:_,isCached:B,status:S}=m,w=oe(t),C=oe(m),ge=q(f!=null?f:He(8)),P=q(!1),W=q(!1),x=I(p=>{P.current&&(y({status:p.message==="Browser does not support SVG"?d.UNSUPPORTED:d.FAILED}),u==null||u(p))},[u]),T=I((p,k=!1)=>{P.current&&y({content:p,isCached:k,status:d.LOADED})},[]),X=I(async()=>{let p=await ae(o,i);T(p)},[i,T,o]),A=I(()=>{try{let p=Ge(v(h({},t),{handleError:x,hash:ge.current,content:$})),k=H(p);if(!k||!Re(k))throw new Error("Could not convert the src to a React element");y({element:k,status:d.READY})}catch(p){x(p)}},[$,x,t]),Y=I(async()=>{let p=new RegExp("^data:image\\/svg[^,]*?(;base64)?,(.*)","u").exec(o),k;if(p?k=p[1]?window.atob(p[2]):decodeURIComponent(p[2]):o.includes("<svg")&&(k=o),k){T(k);return}try{if(e){let V=await R.get(o,i);T(V,!0)}else await X()}catch(V){x(V)}},[e,X,i,x,T,o]),F=I(async()=>{P.current&&y({content:"",element:null,isCached:!1,status:d.LOADING})},[]);D(()=>{if(P.current=!0,!(!O()||W.current)){try{if(S===d.IDLE){if(!Oe())throw new Error("Browser does not support SVG");if(!o)throw new Error("Missing src");F()}}catch(p){x(p)}return W.current=!0,()=>{P.current=!1}}},[]),D(()=>{if(!(!O()||!w)&&w.src!==o){if(!o){x(new Error("Missing src"));return}F()}},[x,F,w,o]),D(()=>{S===d.LOADED&&A()},[S,A]),D(()=>{!O()||!w||w.src!==o||(w.title!==g||w.description!==n)&&A()},[n,A,w,o,g]),D(()=>{if(C)switch(S){case d.LOADING:{C.status!==d.LOADING&&Y();break}case d.LOADED:{C.status!==d.LOADED&&A();break}case d.READY:{C.status!==d.READY&&(s==null||s(o,B));break}}},[Y,A,B,s,C,o,S]);let ye=Me(t,"baseURL","cacheRequests","children","description","fetchOptions","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs");return O()?_?De(_,h({ref:c},ye)):[d.UNSUPPORTED,d.FAILED].includes(S)?r:a:a}l(_e,"ReactInlineSVG");function ce(t){R||(R=new Fe);let{loader:e}=t,[r,n]=Ce(R.isReady);return D(()=>{r||R.onReady(()=>{n(!0)})},[r]),r?Ie.createElement(_e,h({},t)):e}l(ce,"InlineSVG");import{createElement as Be}from"react";import{jsx as U,jsxs as le}from"react/jsx-runtime";var ue=l(({listId:t,index:e,locations:r,props:n,onClick:i,item:c})=>{var g;let{ref:a}=Q(t,e,()=>i==null?void 0:i(r[e])),{ref:u}=Z("locationId",r[e].id),s=r[e].logo,o=(g=r[e].categories[0])==null?void 0:g.icon;return U("li",v(h({},E({className:"location-list-item-wrapper",role:"button",onClick:l(()=>i==null?void 0:i(r[e]),"onClick"),ref:K(a,u)},n==null?void 0:n.listItemWrapper)),{id:"".concat(t!=null?t:"location-list","-").concat(r[e].id),children:c?Be(c,{location:r[e]}):le("div",v(h({},E({className:"location-list-item-content"},n==null?void 0:n.listItemContent)),{children:[(s||o)&&le("div",v(h({},E({className:"location-list-item-image"},n==null?void 0:n.listItemImage)),{children:[s&&U("img",{className:L("location-list-item-image-img"),src:s,alt:r[e].name}),o&&!s&&U(ce,{className:L("location-list-item-image-svg"),src:o})]})),U("span",v(h({},E({className:"location-list-item-name"},n==null?void 0:n.listItemName)),{children:r[e].name}))]}))}))},"LocationListItem");import{forwardRef as de}from"react";import{jsx as G}from"react/jsx-runtime";var he=l(({index:t,style:e,data:r})=>{var n,i,c;return G(ue,v(h({index:t},r),{props:v(h({},r.props),{listItemWrapper:h({style:h(h({},e),(i=(n=r.props)==null?void 0:n.listItemWrapper)==null?void 0:i.style)},(c=r.props)==null?void 0:c.listItemWrapper)})}))},"LocationListItemRenderer"),me=de((t,e)=>G("div",h({ref:e,tabIndex:-1},t))),fe=de((t,e)=>G("ul",v(h({ref:e,className:L("location-list-inner")},t),{style:h({display:"block"},t.style)})));import{jsx as pe}from"react/jsx-runtime";var Rt=l(({id:t,locations:e=[],onLocationSelected:r,maxHeight:n,item:i,itemSize:c=40,props:a})=>{var g,f;let{ref:u}=ee(t),s=Xe(()=>{let m=e.length*c;return n==null?Math.min(m,window.innerHeight*.8):Math.min(m,n)},[n,e,c]),o=Ye(e);return We(()=>{o.current=e},[e]),pe("div",v(h({},E({className:"location-list-wrapper",style:{height:"100vh",maxHeight:"".concat(s,"px")}},a==null?void 0:a.wrapper)),{role:"listbox",id:t,children:pe(J,v(h({ref:u,className:L("location-list",(g=a==null?void 0:a.list)==null?void 0:g.className),height:s,width:"100%",layout:"vertical",itemSize:c,itemCount:e.length,outerElementType:me,itemData:{locations:e,props:a,onClick:r,listId:t,item:i},innerElementType:fe},(f=a==null?void 0:a.list)!=null?f:{}),{children:he}))}))},"LocationList");export{Rt as a};
|
|
1
|
+
import{a as J,d as Q,e as ee}from"./chunk-TY6GBURX.js";import{a as Z}from"./chunk-HSR66YU6.js";import{c as L,d as K,e as E}from"./chunk-VSEMIYX2.js";import{a as h,b as v,c as l,d as j,f as b}from"./chunk-S3SNLAZ2.js";import{useEffect as We,useMemo as Xe,useRef as Ye}from"react";import Ie,{cloneElement as De,isValidElement as Re,useCallback as I,useEffect as D,useReducer as Ne,useRef as q,useState as Ce}from"react";import*as re from"react";var ve=l(t=>typeof t!="string"?{}:t.split(/ ?; ?/).reduce((e,r)=>{let[n,i]=r.split(/ ?: ?/).map((c,a)=>a===0?c.replace(/\s+/g,""):c.trim());if(n&&i){let c=n.replace(/(\w)-(\w)/g,(u,s,o)=>"".concat(s).concat(o.toUpperCase())),a=i.trim();Number.isNaN(Number(i))||(a=Number(i)),e[n.startsWith("-")?n:c]=a}return e},{}),"styleToObject");function ke(t=6){let e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r="";for(let n=t;n>0;--n)r+=e[Math.round(Math.random()*(e.length-1))];return r}l(ke,"randomString");var we=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],te={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",typemustmatch:"typeMustMatch",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"};function xe(t,e){var a,u;let c=e,{key:r,level:n}=c,i=j(c,["key","level"]);switch(t.nodeType){case 1:return re.createElement(Le(t.nodeName),be(t,r),ne(t.childNodes,n,i));case 3:{let s=(u=(a=t.nodeValue)==null?void 0:a.toString())!=null?u:"";if(!i.allowWhiteSpaces&&/^\s+$/.test(s)&&!/[\u00A0\u202F]/.test(s))return null;if(!t.parentNode)return s;let o=t.parentNode.nodeName.toLowerCase();return we.includes(o)?(/\S/.test(s)&&console.warn("A textNode is not allowed inside '".concat(o,"'. Your text \"").concat(s,'" will be ignored')),null):s}case 8:return null;case 11:return ne(t.childNodes,n,e);default:return null}}l(xe,"getReactNode");function be(t,e){let r={key:e};if(t instanceof Element){let n=t.getAttribute("class");n&&(r.className=n),[...t.attributes].forEach(i=>{switch(i.name){case"class":break;case"style":r[i.name]=ve(i.value);break;case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"readonly":case"required":case"reversed":case"selected":case"typemustmatch":r[te[i.name]||i.name]=!0;break;default:r[te[i.name]||i.name]=i.value}})}return r}l(be,"parseAttributes");function ne(t,e,r){let n=[...t].map((i,c)=>M(i,v(h({},r),{index:c,level:e+1}))).filter(Boolean);return n.length?n:null}l(ne,"parseChildren");function Le(t){return/[a-z]+[A-Z]+[a-z]+/.test(t)?t:t.toLowerCase()}l(Le,"parseName");function H(t,e={}){return typeof t=="string"?Ee(t,e):t instanceof Node?M(t,e):null}l(H,"convert");function M(t,e={}){if(!t||!(t instanceof Node))return null;let{actions:r=[],index:n=0,level:i=0,randomKey:c}=e,a=t,u="".concat(i,"-").concat(n),s=[];return c&&i===0&&(u="".concat(ke(),"-").concat(u)),Array.isArray(r)&&r.forEach(o=>{o.condition(a,u,i)&&(typeof o.pre=="function"&&(a=o.pre(a,u,i),a instanceof Node||(a=t,b.env.NODE_ENV!=="production"&&console.warn("The `pre` method always must return a valid DomNode (instanceof Node) - your modification will be ignored (Hint: if you want to render a React-component, use the `post` method instead)"))),typeof o.post=="function"&&s.push(o.post(a,u,i)))}),s.length?s:xe(a,h({key:u,level:i},e))}l(M,"convertFromNode");function Ee(t,e={}){if(!t||typeof t!="string")return null;let{includeAllNodes:r=!1,nodeOnly:n=!1,selector:i="body > *",type:c="text/html"}=e;try{let u=new DOMParser().parseFromString(t,c);if(r){let{childNodes:o}=u.body;return n?o:[...o].map(g=>M(g,e))}let s=u.querySelector(i)||u.body.childNodes[0];if(!(s instanceof Node))throw new TypeError("Error parsing input");return n?s:M(s,e)}catch(a){b.env.NODE_ENV!=="production"&&console.error(a)}return null}l(Ee,"convertFromString");import{useEffect as Ve,useRef as qe}from"react";var Se=Object.defineProperty,Ae=l((t,e,r)=>e in t?Se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,"__defNormalProp"),z=l((t,e,r)=>Ae(t,typeof e!="symbol"?e+"":e,r),"__publicField"),ie="react-inlinesvg",Pe=10,d={IDLE:"idle",LOADING:"loading",LOADED:"loaded",FAILED:"failed",READY:"ready",UNSUPPORTED:"unsupported"};function Te(t){return t[Math.floor(Math.random()*t.length)]}l(Te,"randomCharacter");function O(){var t;return!!(typeof window<"u"&&((t=window.document)!=null&&t.createElement))}l(O,"canUseDOM");function Oe(){return Ue()&&typeof window<"u"&&window!==null}l(Oe,"isSupportedEnvironment");function Me(t,...e){let r={};for(let n in t)({}).hasOwnProperty.call(t,n)&&(e.includes(n)||(r[n]=t[n]));return r}l(Me,"omit");function He(t){let e="abcdefghijklmnopqrstuvwxyz",n="".concat(e).concat(e.toUpperCase()).concat("1234567890"),i="";for(let c=0;c<t;c++)i+=Te(n);return i}l(He,"randomString");async function ae(t,e){let r=await fetch(t,e),n=r.headers.get("content-type"),[i]=(n!=null?n:"").split(/ ?; ?/);if(r.status>299)throw new Error("Not found");if(!["image/svg+xml","text/plain"].some(c=>i.includes(c)))throw new Error("Content type isn't valid: ".concat(i));return r.text()}l(ae,"request");function ze(t=1){return new Promise(e=>{setTimeout(e,t*1e3)})}l(ze,"sleep");function Ue(){if(!document)return!1;let t=document.createElement("div");t.innerHTML="<svg />";let e=t.firstChild;return!!e&&e.namespaceURI==="http://www.w3.org/2000/svg"}l(Ue,"supportsInlineSVG");var N,Fe=(N=class{constructor(){var n;z(this,"cacheApi"),z(this,"cacheStore"),z(this,"subscribers",[]),z(this,"isReady",!1),this.cacheStore=new Map;let e=ie,r=!1;O()&&(e=(n=window.REACT_INLINESVG_CACHE_NAME)!=null?n:ie,r=!!window.REACT_INLINESVG_PERSISTENT_CACHE&&"caches"in window),r?caches.open(e).then(i=>{this.cacheApi=i}).catch(i=>{console.error("Failed to open cache: ".concat(i.message)),this.cacheApi=void 0}).finally(()=>{this.isReady=!0;let i=[...this.subscribers];this.subscribers.length=0,i.forEach(c=>{try{c()}catch(a){console.error("Error in CacheStore subscriber callback: ".concat(a.message))}})}):this.isReady=!0}onReady(e){this.isReady?e():this.subscribers.push(e)}async get(e,r){var n,i;return await(this.cacheApi?this.fetchAndAddToPersistentCache(e,r):this.fetchAndAddToInternalCache(e,r)),(i=(n=this.cacheStore.get(e))==null?void 0:n.content)!=null?i:""}set(e,r){this.cacheStore.set(e,r)}isCached(e){var r;return((r=this.cacheStore.get(e))==null?void 0:r.status)===d.LOADED}async fetchAndAddToInternalCache(e,r){let n=this.cacheStore.get(e);if((n==null?void 0:n.status)===d.LOADING){await this.handleLoading(e,async()=>{this.cacheStore.set(e,{content:"",status:d.IDLE}),await this.fetchAndAddToInternalCache(e,r)});return}if(!(n!=null&&n.content)){this.cacheStore.set(e,{content:"",status:d.LOADING});try{let i=await ae(e,r);this.cacheStore.set(e,{content:i,status:d.LOADED})}catch(i){throw this.cacheStore.set(e,{content:"",status:d.FAILED}),i}}}async fetchAndAddToPersistentCache(e,r){var c,a,u,s;let n=this.cacheStore.get(e);if((n==null?void 0:n.status)===d.LOADED)return;if((n==null?void 0:n.status)===d.LOADING){await this.handleLoading(e,async()=>{this.cacheStore.set(e,{content:"",status:d.IDLE}),await this.fetchAndAddToPersistentCache(e,r)});return}this.cacheStore.set(e,{content:"",status:d.LOADING});let i=await((c=this.cacheApi)==null?void 0:c.match(e));if(i){let o=await i.text();this.cacheStore.set(e,{content:o,status:d.LOADED});return}try{await((a=this.cacheApi)==null?void 0:a.add(new Request(e,r)));let o=await((u=this.cacheApi)==null?void 0:u.match(e)),g=(s=await(o==null?void 0:o.text()))!=null?s:"";this.cacheStore.set(e,{content:g,status:d.LOADED})}catch(o){throw this.cacheStore.set(e,{content:"",status:d.FAILED}),o}}async handleLoading(e,r){var n;for(let i=0;i<Pe;i++){if(((n=this.cacheStore.get(e))==null?void 0:n.status)!==d.LOADING)return;await ze(.1)}await r()}keys(){return[...this.cacheStore.keys()]}data(){return[...this.cacheStore.entries()].map(([e,r])=>({[e]:r}))}async delete(e){this.cacheApi&&await this.cacheApi.delete(e),this.cacheStore.delete(e)}async clear(){if(this.cacheApi){let e=await this.cacheApi.keys();await Promise.allSettled(e.map(r=>this.cacheApi.delete(r)))}this.cacheStore.clear()}},l(N,"CacheStore"),N);function oe(t){let e=qe(void 0);return Ve(()=>{e.current=t}),e.current}l(oe,"usePrevious");function Ge(t){let{baseURL:e,content:r,description:n,handleError:i,hash:c,preProcessor:a,title:u,uniquifyIDs:s=!1}=t;try{let o=$e(r,a),g=H(o,{nodeOnly:!0});if(!g||!(g instanceof SVGSVGElement))throw new Error("Could not convert the src to a DOM Node");let f=se(g,{baseURL:e,hash:c,uniquifyIDs:s});if(n){let m=f.querySelector("desc");m!=null&&m.parentNode&&m.parentNode.removeChild(m);let y=document.createElementNS("http://www.w3.org/2000/svg","desc");y.innerHTML=n,f.prepend(y)}if(typeof u<"u"){let m=f.querySelector("title");if(m!=null&&m.parentNode&&m.parentNode.removeChild(m),u){let y=document.createElementNS("http://www.w3.org/2000/svg","title");y.innerHTML=u,f.prepend(y)}}return f}catch(o){return i(o)}}l(Ge,"getNode");function $e(t,e){return e?e(t):t}l($e,"processSVG");function se(t,e){let{baseURL:r="",hash:n,uniquifyIDs:i}=e,c=["id","href","xlink:href","xlink:role","xlink:arcrole"],a=["href","xlink:href"],u=l((s,o)=>a.includes(s)&&(o?!o.includes("#"):!1),"isDataValue");return i&&[...t.children].forEach(s=>{var o;if((o=s.attributes)!=null&&o.length){let g=Object.values(s.attributes).map(f=>{let m=f,y=/url\((.*?)\)/.exec(f.value);return y!=null&&y[1]&&(m.value=f.value.replace(y[0],"url(".concat(r).concat(y[1],"__").concat(n,")"))),m});c.forEach(f=>{let m=g.find(y=>y.name===f);m&&!u(f,m.value)&&(m.value="".concat(m.value,"__").concat(n))})}return s.children.length?se(s,e):s}),t}l(se,"updateSVGAttributes");var R;function _e(t){let{cacheRequests:e=!0,children:r=null,description:n,fetchOptions:i,innerRef:c,loader:a=null,onError:u,onLoad:s,src:o,title:g,uniqueHash:f}=t,[m,y]=Ne((p,k)=>h(h({},p),k),{content:"",element:null,isCached:e&&R.isCached(t.src),status:d.IDLE}),{content:$,element:_,isCached:B,status:S}=m,w=oe(t),C=oe(m),ge=q(f!=null?f:He(8)),P=q(!1),W=q(!1),x=I(p=>{P.current&&(y({status:p.message==="Browser does not support SVG"?d.UNSUPPORTED:d.FAILED}),u==null||u(p))},[u]),T=I((p,k=!1)=>{P.current&&y({content:p,isCached:k,status:d.LOADED})},[]),X=I(async()=>{let p=await ae(o,i);T(p)},[i,T,o]),A=I(()=>{try{let p=Ge(v(h({},t),{handleError:x,hash:ge.current,content:$})),k=H(p);if(!k||!Re(k))throw new Error("Could not convert the src to a React element");y({element:k,status:d.READY})}catch(p){x(p)}},[$,x,t]),Y=I(async()=>{let p=new RegExp("^data:image\\/svg[^,]*?(;base64)?,(.*)","u").exec(o),k;if(p?k=p[1]?window.atob(p[2]):decodeURIComponent(p[2]):o.includes("<svg")&&(k=o),k){T(k);return}try{if(e){let V=await R.get(o,i);T(V,!0)}else await X()}catch(V){x(V)}},[e,X,i,x,T,o]),F=I(async()=>{P.current&&y({content:"",element:null,isCached:!1,status:d.LOADING})},[]);D(()=>{if(P.current=!0,!(!O()||W.current)){try{if(S===d.IDLE){if(!Oe())throw new Error("Browser does not support SVG");if(!o)throw new Error("Missing src");F()}}catch(p){x(p)}return W.current=!0,()=>{P.current=!1}}},[]),D(()=>{if(!(!O()||!w)&&w.src!==o){if(!o){x(new Error("Missing src"));return}F()}},[x,F,w,o]),D(()=>{S===d.LOADED&&A()},[S,A]),D(()=>{!O()||!w||w.src!==o||(w.title!==g||w.description!==n)&&A()},[n,A,w,o,g]),D(()=>{if(C)switch(S){case d.LOADING:{C.status!==d.LOADING&&Y();break}case d.LOADED:{C.status!==d.LOADED&&A();break}case d.READY:{C.status!==d.READY&&(s==null||s(o,B));break}}},[Y,A,B,s,C,o,S]);let ye=Me(t,"baseURL","cacheRequests","children","description","fetchOptions","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs");return O()?_?De(_,h({ref:c},ye)):[d.UNSUPPORTED,d.FAILED].includes(S)?r:a:a}l(_e,"ReactInlineSVG");function ce(t){R||(R=new Fe);let{loader:e}=t,[r,n]=Ce(R.isReady);return D(()=>{r||R.onReady(()=>{n(!0)})},[r]),r?Ie.createElement(_e,h({},t)):e}l(ce,"InlineSVG");import{createElement as Be}from"react";import{jsx as U,jsxs as le}from"react/jsx-runtime";var ue=l(({listId:t,index:e,locations:r,props:n,onClick:i,item:c})=>{var g;let{ref:a}=Q(t,e,()=>i==null?void 0:i(r[e])),{ref:u}=Z("locationId",r[e].id),s=r[e].logo,o=(g=r[e].categories[0])==null?void 0:g.icon;return U("li",v(h({},E({className:"location-list-item-wrapper",role:"button",onClick:l(()=>i==null?void 0:i(r[e]),"onClick"),ref:K(a,u)},n==null?void 0:n.listItemWrapper)),{id:"".concat(t!=null?t:"location-list","-").concat(r[e].id),children:c?Be(c,{location:r[e]}):le("div",v(h({},E({className:"location-list-item-content"},n==null?void 0:n.listItemContent)),{children:[(s||o)&&le("div",v(h({},E({className:"location-list-item-image"},n==null?void 0:n.listItemImage)),{children:[s&&U("img",{className:L("location-list-item-image-img"),src:s,alt:r[e].name}),o&&!s&&U(ce,{className:L("location-list-item-image-svg"),src:o})]})),U("span",v(h({},E({className:"location-list-item-name"},n==null?void 0:n.listItemName)),{children:r[e].name}))]}))}))},"LocationListItem");import{forwardRef as de}from"react";import{jsx as G}from"react/jsx-runtime";var he=l(({index:t,style:e,data:r})=>{var n,i,c;return G(ue,v(h({index:t},r),{props:v(h({},r.props),{listItemWrapper:h({style:h(h({},e),(i=(n=r.props)==null?void 0:n.listItemWrapper)==null?void 0:i.style)},(c=r.props)==null?void 0:c.listItemWrapper)})}))},"LocationListItemRenderer"),me=de((t,e)=>G("div",h({ref:e,tabIndex:-1},t))),fe=de((t,e)=>G("ul",v(h({ref:e,className:L("location-list-inner")},t),{style:h({display:"block"},t.style)})));import{jsx as pe}from"react/jsx-runtime";var Rt=l(({id:t,locations:e=[],onLocationSelected:r,maxHeight:n,item:i,itemSize:c=40,props:a})=>{var g,f;let{ref:u}=ee(t),s=Xe(()=>{let m=e.length*c;return n==null?Math.min(m,window.innerHeight*.8):Math.min(m,n)},[n,e,c]),o=Ye(e);return We(()=>{o.current=e},[e]),pe("div",v(h({},E({className:"location-list-wrapper",style:{height:"100vh",maxHeight:"".concat(s,"px")}},a==null?void 0:a.wrapper)),{role:"listbox",id:t,children:pe(J,v(h({ref:u,className:L("location-list",(g=a==null?void 0:a.list)==null?void 0:g.className),height:s,width:"100%",layout:"vertical",itemSize:c,itemCount:e.length,outerElementType:me,itemData:{locations:e,props:a,onClick:r,listId:t,item:i},innerElementType:fe},(f=a==null?void 0:a.list)!=null?f:{}),{children:he}))}))},"LocationList");export{Rt as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i,b as R,c}from"./chunk-
|
|
1
|
+
import{a as i,b as R,c}from"./chunk-S3SNLAZ2.js";var f="mappedin__",l="".concat(f,"keyboard-focus"),u="mappedin";var r=c((...s)=>s.filter(t=>t!=null).filter(t=>t!=="").map(t=>t.trim()).map(t=>t.startsWith(f)?t:"".concat(f).concat(t)).join(" "),"classNames");var T=c((...s)=>t=>{s.filter(e=>e!=null).forEach(e=>{typeof e=="function"?e(t):e&&(e.current=t)})},"combineRefs");var N=c((s,t)=>{if(!t&&!s)return{};let e=R(i({},s),{className:r(s.className)});return t&&Object.entries(t).forEach(([n,o])=>{e[n]==null?e[n]=o:n==="className"?e[n]=e[n]+" "+o:n==="ref"?e[n]=T(e[n],o):typeof e[n]=="object"&&typeof o=="object"?e[n]=i(i({},e[n]),o):typeof e[n]=="function"&&typeof o=="function"?e[n]=(...m)=>{s[n](...m),o(...m)}:e[n]=o}),e},"componentProps");export{l as a,u as b,r as c,T as d,N as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-LUNEX6XS.js";import"../../chunk-TY6GBURX.js";import"../../chunk-RX62PM76.js";import"../../chunk-HSR66YU6.js";import"../../chunk-VSEMIYX2.js";import"../../chunk-S3SNLAZ2.js";export{a as FloorSelector};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-VB2SNF5E.js";import"../../chunk-TY6GBURX.js";import"../../chunk-HSR66YU6.js";import"../../chunk-VSEMIYX2.js";import"../../chunk-S3SNLAZ2.js";export{a as LocationList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-TPBVLR4S.js";import"../../chunk-VB2SNF5E.js";import"../../chunk-TY6GBURX.js";import"../../chunk-HHLRVMBX.js";import"../../chunk-RX62PM76.js";import"../../chunk-HSR66YU6.js";import"../../chunk-VSEMIYX2.js";import"../../chunk-S3SNLAZ2.js";export{a as Search};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-HHLRVMBX.js";import"../../chunk-RX62PM76.js";import"../../chunk-HSR66YU6.js";import"../../chunk-VSEMIYX2.js";import"../../chunk-S3SNLAZ2.js";export{a as SearchBar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-E3KRW6U5.js";import"../../chunk-VSEMIYX2.js";import"../../chunk-S3SNLAZ2.js";export{a as ZoomControls};
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Floor, LocationProfile } from "@mappedin/mappedin-js";
|
|
2
2
|
import { FixedSizeList, VariableSizeList } from "react-window";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react4 from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/utils/props.d.ts
|
|
6
6
|
type Prop<T extends keyof React.JSX.IntrinsicElements> = React.ComponentProps<T>;
|
|
@@ -343,7 +343,7 @@ interface FloorSelectorListProps {
|
|
|
343
343
|
/**
|
|
344
344
|
* The list of selectable floors in the {@link FloorSelector}.
|
|
345
345
|
*/
|
|
346
|
-
declare const FloorSelectorList:
|
|
346
|
+
declare const FloorSelectorList: react4.ForwardRefExoticComponent<FloorSelectorListProps & react4.RefAttributes<HTMLUListElement>>;
|
|
347
347
|
//#endregion
|
|
348
348
|
//#region src/components/floor-selector/floor-selector.d.ts
|
|
349
349
|
/**
|
|
@@ -473,7 +473,7 @@ interface AccessibleListOptions {
|
|
|
473
473
|
* @category Hook
|
|
474
474
|
*/
|
|
475
475
|
declare const useKeyboardListController: <T extends HTMLElement>(listId: string | undefined, options?: AccessibleListOptions) => {
|
|
476
|
-
ref:
|
|
476
|
+
ref: react4.Dispatch<react4.SetStateAction<T | null>>;
|
|
477
477
|
activeItemId: string | null;
|
|
478
478
|
activeItemIndex: number | null;
|
|
479
479
|
};
|
|
@@ -500,7 +500,7 @@ interface AccessibleListItemOptions {
|
|
|
500
500
|
*/
|
|
501
501
|
declare const useKeyboardListItem: <T extends HTMLElement>(listId: string | undefined, index: number, onSelect: () => void, options?: AccessibleListItemOptions) => {
|
|
502
502
|
isActive: boolean;
|
|
503
|
-
ref:
|
|
503
|
+
ref: react4.RefObject<T | null>;
|
|
504
504
|
};
|
|
505
505
|
//#endregion
|
|
506
506
|
//#region src/hooks/accessibility/use-keyboard-virtual-list.d.ts
|
|
@@ -524,7 +524,7 @@ interface AccessibleVirtualListOptions {
|
|
|
524
524
|
* @category Hook
|
|
525
525
|
*/
|
|
526
526
|
declare const useKeyboardVirtualList: <T extends VariableSizeList | FixedSizeList | unknown>(listId: string | undefined, options?: AccessibleVirtualListOptions) => {
|
|
527
|
-
ref:
|
|
527
|
+
ref: react4.RefObject<T | null>;
|
|
528
528
|
};
|
|
529
529
|
//#endregion
|
|
530
530
|
export { AccessibleListItemOptions, AccessibleListOptions, AccessibleVirtualListOptions, FloorSelector, FloorSelectorProps, LocationList, LocationListProps, Search, SearchBar, SearchBarProps, SearchProps, ZoomControls, ZoomControlsProps, useKeyboardListController, useKeyboardListItem, useKeyboardVirtualList };
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as x}from"./chunk-
|
|
1
|
+
import{a as x}from"./chunk-E3KRW6U5.js";import{a as t}from"./chunk-LUNEX6XS.js";import{a as p}from"./chunk-TPBVLR4S.js";import{a as m}from"./chunk-VB2SNF5E.js";import{b as r,d as e,e as f}from"./chunk-TY6GBURX.js";import{a as o}from"./chunk-HHLRVMBX.js";import"./chunk-RX62PM76.js";import"./chunk-HSR66YU6.js";import"./chunk-VSEMIYX2.js";import"./chunk-S3SNLAZ2.js";export{t as FloorSelector,m as LocationList,p as Search,o as SearchBar,x as ZoomControls,r as useKeyboardListController,e as useKeyboardListItem,f as useKeyboardVirtualList};
|
package/lib/esm/themes/basic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-IIQHZPWU.js";import"../chunk-
|
|
1
|
+
import"../chunk-IIQHZPWU.js";import"../chunk-S3SNLAZ2.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-OU6YBVSW.js";import"../chunk-IIQHZPWU.js";import"../chunk-
|
|
1
|
+
import"../chunk-OU6YBVSW.js";import"../chunk-IIQHZPWU.js";import"../chunk-S3SNLAZ2.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-OU6YBVSW.js";import"../chunk-IIQHZPWU.js";import"../chunk-
|
|
1
|
+
import"../chunk-OU6YBVSW.js";import"../chunk-IIQHZPWU.js";import"../chunk-S3SNLAZ2.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mappedin/react-ui",
|
|
3
|
-
"version": "6.9.
|
|
3
|
+
"version": "6.9.1-beta.0",
|
|
4
4
|
"homepage": "https://developer.mappedin.com/",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "lib/esm/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"react": ">=16.8.0",
|
|
56
56
|
"react-dom": ">=16.8.0",
|
|
57
|
-
"@mappedin/mappedin-js": "^6.9.
|
|
57
|
+
"@mappedin/mappedin-js": "^6.9.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {},
|
|
60
60
|
"volta": {
|