@bluepic/embed 0.1.50 → 0.1.52

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.
@@ -2509,7 +2509,7 @@ ${He.vertexSource}`,this.forceManualRenderingForInstanceIDShaders&&(Yi=Yi.replac
2509
2509
  translate(${ke.x}px,${ke.y}px)
2510
2510
  `}_calculateXYTransform(){const xe=this._pos,ke=this._map,He=this.getPitchAlignment();if(!ke||!xe||He!=="map")return"";if(!ke._showingGlobe()){const Li=ke.getPitch();return Li?`rotateX(${Li}deg)`:""}const ri=ie.c4(ie.dI(ke.transform,this._lngLat)),ai=xe.sub(ie.dJ(ke.transform)),vi=Math.abs(ai.x)+Math.abs(ai.y);if(vi===0)return"";const Si=ri/vi;return`rotateX(${-ai.y*Si}deg) rotateY(${ai.x*Si}deg)`}_calculateZTransform(){const xe=this._pos,ke=this._map;if(!ke||!xe)return"";let He=0;const ri=this.getRotationAlignment();if(ri==="map")if(ke._showingGlobe()){const ai=ke.project(new ie.bO(this._lngLat.lng,this._lngLat.lat+.001)),vi=ke.project(new ie.bO(this._lngLat.lng,this._lngLat.lat-.001)).sub(ai);He=ie.c4(Math.atan2(vi.y,vi.x))-90}else He=-ke.getBearing();else if(ri==="horizon"){const ai=ie.ac(4,6,ke.getZoom()),vi=ie.dJ(ke.transform);vi.y+=ai*ke.transform.height;const Si=xe.sub(vi),Li=ie.c4(Math.atan2(Si.y,Si.x));He=(Li>90?Li-270:Li+90)*(1-ai)}return He+=this._rotation,He?`rotateZ(${He}deg)`:""}_update(xe){cancelAnimationFrame(this._updateFrameId);const ke=this._map;ke&&(ke.transform.renderWorldCopies&&(this._lngLat=i0(this._lngLat,this._pos,ke.transform)),this._pos=ke.project(this._lngLat),xe===!0?this._updateFrameId=requestAnimationFrame(()=>{this._element&&this._pos&&this._anchor&&(this._pos=this._pos.round(),this._updateDOM())}):this._pos=this._pos.round(),ke._requestDomTask(()=>{this._map&&(this._element&&this._pos&&this._anchor&&this._updateDOM(),(ke._showingGlobe()||ke.getTerrain()||ke.getFog())&&!this._fadeTimer&&(this._fadeTimer=window.setTimeout(this._evaluateOpacity.bind(this),60)))}))}getOffset(){return this._offset}setOffset(xe){return this._offset=ie.P.convert(xe),this._update(),this}addClassName(xe){return this._element.classList.add(xe),this}removeClassName(xe){return this._element.classList.remove(xe),this}toggleClassName(xe){return this._element.classList.toggle(xe)}_onMove(xe){const ke=this._map;if(!ke)return;const He=this._pointerdownPos,ri=this._positionDelta;if(He&&ri){if(!this._isDragging){const ai=this._clickTolerance||ke._clickTolerance;if(xe.point.dist(He)<ai)return;this._isDragging=!0}this._pos=xe.point.sub(ri),this._lngLat=ke.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new ie.z("dragstart"))),this.fire(new ie.z("drag"))}}_onUp(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1;const xe=this._map;xe&&(xe.off("mousemove",this._onMove),xe.off("touchmove",this._onMove)),this._state==="active"&&this.fire(new ie.z("dragend")),this._state="inactive"}_addDragHandler(xe){const ke=this._map,He=this._pos;ke&&He&&this._element.contains(xe.originalEvent.target)&&(xe.preventDefault(),this._positionDelta=xe.point.sub(He),this._pointerdownPos=xe.point,this._state="pending",ke.on("mousemove",this._onMove),ke.on("touchmove",this._onMove),ke.once("mouseup",this._onUp),ke.once("touchend",this._onUp))}setDraggable(xe){this._draggable=!!xe;const ke=this._map;return ke&&(xe?(ke.on("mousedown",this._addDragHandler),ke.on("touchstart",this._addDragHandler)):(ke.off("mousedown",this._addDragHandler),ke.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(xe){return this._rotation=xe||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(xe){return this._rotationAlignment=xe||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment==="auto"||this._rotationAlignment==="horizon"&&this._map&&!this._map._showingGlobe()?"viewport":this._rotationAlignment}setPitchAlignment(xe){return this._pitchAlignment=xe||"auto",this._update(),this}getPitchAlignment(){return this._pitchAlignment==="auto"?this.getRotationAlignment():this._pitchAlignment}setOccludedOpacity(xe){return this._occludedOpacity=xe||.2,this._update(),this}getOccludedOpacity(){return this._occludedOpacity}}const Fu={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0,showUserHeading:!1},vu={maxWidth:100,unit:"metric"},As={kilometer:"km",meter:"m",mile:"mi",foot:"ft","nautical-mile":"nm"},xs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Fs=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function em(qe=new ie.P(0,0),xe="bottom"){if(typeof qe=="number"){const ke=Math.round(Math.sqrt(.5*Math.pow(qe,2)));switch(xe){case"top":return new ie.P(0,qe);case"top-left":return new ie.P(ke,ke);case"top-right":return new ie.P(-ke,ke);case"bottom":return new ie.P(0,-qe);case"bottom-left":return new ie.P(ke,-ke);case"bottom-right":return new ie.P(-ke,-ke);case"left":return new ie.P(qe,0);case"right":return new ie.P(-qe,0)}return new ie.P(0,0)}return qe instanceof ie.P||Array.isArray(qe)?ie.P.convert(qe):ie.P.convert(qe[xe]||[0,0])}return{version:ii,supported:Ti.supported,setRTLTextPlugin:ie.dK,getRTLTextPluginStatus:ie.dL,Map:class extends ud{constructor(qe){li.mark(di.create);const xe=qe;if((qe=ie.l({},Qp,qe)).minZoom!=null&&qe.maxZoom!=null&&qe.minZoom>qe.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(qe.minPitch!=null&&qe.maxPitch!=null&&qe.minPitch>qe.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(qe.minPitch!=null&&qe.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(qe.maxPitch!=null&&qe.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(qe.antialias&&ie.dF(window)&&(qe.antialias=!1,ie.w("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new Bf(qe.minZoom,qe.maxZoom,qe.minPitch,qe.maxPitch,qe.renderWorldCopies),qe),this._repaint=!!qe.repaint,this._interactive=qe.interactive,this._minTileCacheSize=qe.minTileCacheSize,this._maxTileCacheSize=qe.maxTileCacheSize,this._failIfMajorPerformanceCaveat=qe.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=qe.preserveDrawingBuffer,this._antialias=qe.antialias,this._trackResize=qe.trackResize,this._bearingSnap=qe.bearingSnap,this._refreshExpiredTiles=qe.refreshExpiredTiles,this._fadeDuration=qe.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=qe.crossSourceCollisions,this._collectResourceTiming=qe.collectResourceTiming,this._language=this._parseLanguage(qe.language),this._worldview=qe.worldview,this._renderTaskQueue=new Yc,this._domRenderTaskQueue=new Yc,this._controls=[],this._markers=[],this._popups=[],this._mapId=ie.aV(),this._locale=ie.l({},cl,qe.locale),this._clickTolerance=qe.clickTolerance,this._cooperativeGestures=qe.cooperativeGestures,this._performanceMetricsCollection=qe.performanceMetricsCollection,this._tessellationStep=qe.tessellationStep,this._containerWidth=0,this._containerHeight=0,this._showParseStatus=!0,this._precompilePrograms=qe.precompilePrograms,this._scaleFactorChanged=!1,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new cf(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._frameId=0,this._scaleFactor=qe.scaleFactor,this._requestManager=new Ue(qe.transformRequest,qe.accessToken,qe.testMode),this._silenceAuthErrors=!!qe.testMode,this._contextCreateOptions=qe.contextCreateOptions?{...qe.contextCreateOptions}:{},typeof qe.container=="string"){const ke=document.getElementById(qe.container);if(!ke)throw new Error(`Container '${qe.container.toString()}' not found.`);this._container=ke}else{if(!(qe.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=qe.container}if(this._container.childNodes.length>0&&ie.w("The map container element should be empty, otherwise the map's interactivity will be negatively impacted. If you want to display a message when WebGL is not supported, use the Mapbox GL Supported plugin instead."),qe.maxBounds&&this.setMaxBounds(qe.maxBounds),this._spriteFormat=qe.spriteFormat,ie.aP(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._tp||(this._tp=new jl),this._tp.registerParameter(this,["Debug"],"showOverdrawInspector"),this._tp.registerParameter(this,["Debug"],"showTileBoundaries"),this._tp.registerParameter(this,["Debug"],"showParseStatus"),this._tp.registerParameter(this,["Debug"],"repaint"),this._tp.registerParameter(this,["Debug"],"showTileAABBs"),this._tp.registerParameter(this,["Debug"],"showPadding"),this._tp.registerParameter(this,["Debug"],"showCollisionBoxes",{noSave:!0}),this._tp.registerParameter(this.transform,["Debug"],"freezeTileCoverage",{noSave:!0},()=>{this._update()}),this._tp.registerParameter(this,["Debug","Wireframe"],"showTerrainWireframe"),this._tp.registerParameter(this,["Debug","Wireframe"],"showLayers2DWireframe"),this._tp.registerParameter(this,["Debug","Wireframe"],"showLayers3DWireframe"),this._tp.registerParameter(this,["Scaling"],"_scaleFactor",{min:.1,max:10,step:.1},()=>{this.setScaleFactor(this._scaleFactor)}),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");if(this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this._fullscreenchangeEvent="onfullscreenchange"in document?"fullscreenchange":"webkitfullscreenchange",window.addEventListener("online",this._onWindowOnline,!1),window.addEventListener("resize",this._onWindowResize,!1),window.addEventListener("orientationchange",this._onWindowResize,!1),window.addEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),window.addEventListener("visibilitychange",this._onVisibilityChange,!1),this.handlers=new cp(this,qe),this._localFontFamily=qe.localFontFamily,this._localIdeographFontFamily=qe.localIdeographFontFamily,(qe.style||!qe.testMode)&&this.setStyle(qe.style||ie.e.DEFAULT_STYLE,{config:qe.config,localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),qe.projection&&this.setProjection(qe.projection),this.indoor=new Dm(this),qe.hash&&(this._hash=new Bc(typeof qe.hash=="string"&&qe.hash||void 0).addTo(this)),!this._hash||!this._hash._onHashChange()){xe.center==null&&xe.zoom==null||(this.transform._unmodified=!1),this.jumpTo({center:qe.center,zoom:qe.zoom,bearing:qe.bearing,pitch:qe.pitch});const ke=qe.bounds;ke&&(this.resize(),this.fitBounds(ke,ie.l({},qe.fitBoundsOptions,{duration:0})))}this.resize(),qe.attributionControl&&this.addControl(new Ou({customAttribution:qe.customAttribution})),this._logoControl=new pa,this.addControl(this._logoControl,qe.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this._postStyleLoadEvent()}),this.on("data",ke=>{this._update(ke.dataType==="style"),this.fire(new ie.z(`${ke.dataType}data`,ke))}),this.on("dataloading",ke=>{this.fire(new ie.z(`${ke.dataType}dataloading`,ke))}),this._interactions=new zu(this)}_getMapId(){return this._mapId}addControl(qe,xe){if(xe===void 0&&(xe=qe.getDefaultPosition?qe.getDefaultPosition():"top-right"),!qe||!qe.onAdd)return this.fire(new ie.y(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const ke=qe.onAdd(this);this._controls.push(qe);const He=this._controlPositions[xe];return xe.indexOf("bottom")!==-1?He.insertBefore(ke,He.firstChild):He.appendChild(ke),this}removeControl(qe){if(!qe||!qe.onRemove)return this.fire(new ie.y(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const xe=this._controls.indexOf(qe);return xe>-1&&this._controls.splice(xe,1),qe.onRemove(this),this}hasControl(qe){return this._controls.indexOf(qe)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(qe){if(this._updateContainerDimensions(),this._containerWidth===this.transform.width&&this._containerHeight===this.transform.height)return this;this._resizeCanvas(this._containerWidth,this._containerHeight),this.transform.resize(this._containerWidth,this._containerHeight),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight));const xe=!this._moving;return xe&&this.fire(new ie.z("movestart",qe)).fire(new ie.z("move",qe)),this.fire(new ie.z("resize",qe)),xe&&this.fire(new ie.z("moveend",qe)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(qe){return this.transform.setMaxBounds(ie.az.convert(qe)),this._update()}setMinZoom(qe){if((qe=qe??-2)>=-2&&qe<=this.transform.maxZoom)return this.transform.minZoom=qe,this._update(),this.getZoom()<qe?this.setZoom(qe):this.fire(new ie.z("zoomstart")).fire(new ie.z("zoom")).fire(new ie.z("zoomend")),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(qe){if((qe=qe??22)>=this.transform.minZoom)return this.transform.maxZoom=qe,this._update(),this.getZoom()>qe?this.setZoom(qe):this.fire(new ie.z("zoomstart")).fire(new ie.z("zoom")).fire(new ie.z("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(qe){if((qe=qe??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(qe>=0&&qe<=this.transform.maxPitch)return this.transform.minPitch=qe,this._update(),this.getPitch()<qe?this.setPitch(qe):this.fire(new ie.z("pitchstart")).fire(new ie.z("pitch")).fire(new ie.z("pitchend")),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(qe){if((qe=qe??85)>85)throw new Error("maxPitch must be less than or equal to 85");if(qe>=this.transform.minPitch)return this.transform.maxPitch=qe,this._update(),this.getPitch()>qe?this.setPitch(qe):this.fire(new ie.z("pitchstart")).fire(new ie.z("pitch")).fire(new ie.z("pitchend")),this;throw new Error("maxPitch must be greater than or equal to minPitch")}getMaxPitch(){return this.transform.maxPitch}getScaleFactor(){return this._scaleFactor}setScaleFactor(qe){return this._scaleFactor=qe,this.painter.scaleFactor=qe,this._tp.refreshUI(),this._scaleFactorChanged=!0,this.style._updateFilteredLayers(xe=>xe.type==="symbol"),this._update(!0),this}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(qe){return this.transform.renderWorldCopies=qe,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(qe){return qe==="auto"?navigator.language:Array.isArray(qe)?qe.length===0?void 0:qe.map(xe=>xe==="auto"?navigator.language:xe):qe}setLanguage(qe){const xe=this._parseLanguage(qe);if(!this.style||xe===this._language)return this;this._language=xe,this.style.reloadSources();for(const ke of this._controls)ke._setLanguage&&ke._setLanguage(this._language);return this}getWorldview(){return this._worldview}setWorldview(qe){return this.style&&qe!==this._worldview?(this._worldview=qe,this.style.reloadSources(),this):this}getProjection(){return this.transform.mercatorFromTransition?{name:"globe",center:[0,0]}:this.transform.getProjection()}_showingGlobe(){return this.transform.projection.name==="globe"}setProjection(qe){return this._lazyInitEmptyStyle(),qe?typeof qe=="string"&&(qe={name:qe}):qe=null,this._useExplicitProjection=!!qe,this._prioritizeAndUpdateProjection(qe,this.style.projection)}_updateProjectionTransition(){if(this.getProjection().name!=="globe")return;const qe=this.transform,xe=qe.projection.name;let ke;xe==="globe"&&qe.zoom>=ie.bY?(qe.setMercatorFromTransition(),ke=!0):xe==="mercator"&&qe.zoom<ie.bY&&(qe.setProjection({name:"globe"}),ke=!0),ke&&(this.style.applyProjectionUpdate(),this.style._forceSymbolLayerUpdate())}_prioritizeAndUpdateProjection(qe,xe){return this._updateProjection(qe||xe||{name:"mercator"})}_updateProjection(qe){let xe;return xe=qe.name==="globe"&&this.transform.zoom>=ie.bY?this.transform.setMercatorFromTransition():this.transform.setProjection(qe),this.style.applyProjectionUpdate(),xe&&(this.painter.clearBackgroundTiles(),this.style.clearSources(),this._update(!0),this._forceMarkerAndPopupUpdate(!0)),this}project(qe){return this.transform.locationPoint3D(ie.bO.convert(qe))}unproject(qe){return this.transform.pointLocation3D(ie.P.convert(qe))}isMoving(){return this._moving||this.handlers&&this.handlers.isMoving()||!1}isZooming(){return this._zooming||this.handlers&&this.handlers.isZooming()||!1}isRotating(){return this._rotating||this.handlers&&this.handlers.isRotating()||!1}_isDragging(){return this.handlers&&this.handlers._isDragging()||!1}_createDelegatedListener(qe,xe,ke){const He=ri=>{let ai=[];if(Array.isArray(xe)){const vi=xe.filter(Si=>this.getLayer(Si));ai=vi.length?this.queryRenderedFeatures(ri,{layers:vi}):[]}else ai=this.queryRenderedFeatures(ri,{target:xe});return ai};if(qe==="mouseenter"||qe==="mouseover"){let ri=!1;return{listener:ke,targets:xe,delegates:{mousemove:vi=>{const Si=He(vi.point);Si.length?ri||(ri=!0,ke.call(this,new Il(qe,this,vi.originalEvent,{features:Si}))):ri=!1},mouseout:()=>{ri=!1}}}}if(qe==="mouseleave"||qe==="mouseout"){let ri=!1;return{listener:ke,targets:xe,delegates:{mousemove:Si=>{He(Si.point).length?ri=!0:ri&&(ri=!1,ke.call(this,new Il(qe,this,Si.originalEvent)))},mouseout:Si=>{ri&&(ri=!1,ke.call(this,new Il(qe,this,Si.originalEvent)))}}}}{const ri=ai=>{const vi=He(ai.point);vi.length&&(ai.features=vi,ke.call(this,ai),delete ai.features)};return{listener:ke,targets:xe,delegates:{[qe]:ri}}}}on(qe,xe,ke){if(typeof xe=="function"||ke===void 0)return super.on(qe,xe);if(typeof xe=="string"&&(xe=[xe]),!this._areTargetsValid(xe))return this;const He=this._createDelegatedListener(qe,xe,ke);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[qe]=this._delegatedListeners[qe]||[],this._delegatedListeners[qe].push(He);for(const ri in He.delegates)this.on(ri,He.delegates[ri]);return this}once(qe,xe,ke){if(typeof xe=="function"||ke===void 0)return super.once(qe,xe);if(typeof xe=="string"&&(xe=[xe]),!this._areTargetsValid(xe))return this;const He=this._createDelegatedListener(qe,xe,ke);for(const ri in He.delegates)this.once(ri,He.delegates[ri]);return this}off(qe,xe,ke){if(typeof xe=="function"||ke===void 0)return super.off(qe,xe);if(typeof xe=="string"&&(xe=[xe]),!this._areTargetsValid(xe))return this;const He=this._delegatedListeners?this._delegatedListeners[qe]:void 0;return He&&(ri=>{for(let ai=0;ai<ri.length;ai++){const vi=ri[ai];if(vi.listener===ke&&zs(vi.targets,xe)){for(const Si in vi.delegates)this.off(Si,vi.delegates[Si]);return ri.splice(ai,1),this}}})(He),this}queryRenderedFeatures(qe,xe){if(!this.style)return[];if(qe===void 0||qe instanceof ie.P||Array.isArray(qe)||xe!==void 0||(xe=qe,qe=void 0),qe=qe||[[0,0],[this.transform.width,this.transform.height]],!xe){const ai=this.style.queryRenderedFeatures(qe,void 0,this.transform),vi=this.style.queryRenderedFeatureset(qe,void 0,this.transform);return ai.concat(vi)}let ke=!0;if(xe.target&&(ke=this._isTargetValid(xe.target),ke&&!xe.layers))return this.style.queryRenderedFeatureset(qe,xe,this.transform);let He=!0;if(xe.layers&&Array.isArray(xe.layers)){for(const ai of xe.layers)if(!this._isValidId(ai)){He=!1;break}if(He&&!xe.target)return this.style.queryRenderedFeatures(qe,xe,this.transform)}let ri=[];return He&&(ri=ri.concat(this.style.queryRenderedFeatures(qe,xe,this.transform))),ke&&(ri=ri.concat(this.style.queryRenderedFeatureset(qe,xe,this.transform))),ri}querySourceFeatures(qe,xe){return!qe||typeof qe=="string"&&!this._isValidId(qe)?[]:this.style.querySourceFeatures(qe,xe)}isPointOnSurface(qe){const{name:xe}=this.transform.projection;return xe!=="globe"&&xe!=="mercator"&&ie.w(`${xe} projection does not support isPointOnSurface, this API may behave unexpectedly.`),this.transform.isPointOnSurface(ie.P.convert(qe))}addInteraction(qe,xe){return this._interactions.add(qe,xe),this}removeInteraction(qe){return this._interactions.remove(qe),this}setStyle(qe,xe){return xe=ie.l({},{localIdeographFontFamily:this._localIdeographFontFamily,localFontFamily:this._localFontFamily},xe),this.style&&qe&&xe.diff!==!1&&xe.localFontFamily===this._localFontFamily&&xe.localIdeographFontFamily===this._localIdeographFontFamily&&!xe.config?(this.style._diffStyle(qe,(ke,He)=>{ke?(ie.w(`Unable to perform style diff: ${String(ke.message||ke.error||ke)}. Rebuilding the style from scratch.`),this._updateStyle(qe,xe)):He&&this._update(!0)},()=>{this._postStyleLoadEvent()}),this):(this._localIdeographFontFamily=xe.localIdeographFontFamily,this._localFontFamily=xe.localFontFamily,this._updateStyle(qe,xe))}_getUIString(qe){const xe=this._locale[qe];if(xe==null)throw new Error(`Missing UI string '${qe}'`);return xe}_updateStyle(qe,xe){if(this.style&&(this.style.setEventedParent(null),this.style._remove(),this.style=void 0),qe){const ke=ie.l({},xe);xe&&xe.config&&(ke.initialConfig=xe.config,delete ke.config),this.style=new za(this,ke).load(qe),this.style.setEventedParent(this,{style:this.style})}return this._updateTerrain(),this}_lazyInitEmptyStyle(){this.style||(this.style=new za(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():(ie.w("There is no style added to the map."),!1)}_isValidId(qe){return qe==null?(this.fire(new ie.y(new Error("IDs can't be empty."))),!1):!ie.cr(qe)||(this.fire(new ie.y(new Error(`IDs can't contain special symbols: "${qe}".`))),!1)}_isTargetValid(qe){return"featuresetId"in qe?this._isValidId("importId"in qe?qe.importId:qe.featuresetId):"layerId"in qe&&this._isValidId(qe.layerId)}_areTargetsValid(qe){if(Array.isArray(qe)){for(const xe of qe)if(!this._isValidId(xe))return!1;return!0}return this._isTargetValid(qe)}addSource(qe,xe){return this._isValidId(qe)?(this._lazyInitEmptyStyle(),this.style.addSource(qe,xe),this._update(!0)):this}isSourceLoaded(qe){return!!this._isValidId(qe)&&!!this.style&&this.style._isSourceCacheLoaded(qe)}areTilesLoaded(){return this.style.areTilesLoaded()}addSourceType(qe,xe,ke){this._lazyInitEmptyStyle(),this.style.addSourceType(qe,xe,ke)}removeSource(qe){return this._isValidId(qe)?(this.style.removeSource(qe),this._updateTerrain(),this._update(!0)):this}getSource(qe){return this._isValidId(qe)?this.style.getOwnSource(qe):null}addImage(qe,xe,{pixelRatio:ke=1,sdf:He=!1,stretchX:ri,stretchY:ai,content:vi}={}){if(this._lazyInitEmptyStyle(),xe instanceof HTMLImageElement||ImageBitmap&&xe instanceof ImageBitmap){const{width:Si,height:Li,data:Pi}=ie.q.getImageData(xe);this.style.addImage(qe,{data:new ie.r({width:Si,height:Li},Pi),pixelRatio:ke,stretchX:ri,stretchY:ai,content:vi,sdf:He,version:0,usvg:!1})}else if(xe.width===void 0||xe.height===void 0)this.fire(new ie.y(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));else{const{width:Si,height:Li}=xe,Pi=xe;this.style.addImage(qe,{data:new ie.r({width:Si,height:Li},new Uint8Array(Pi.data)),pixelRatio:ke,stretchX:ri,stretchY:ai,content:vi,sdf:He,usvg:!1,version:0,userImage:Pi}),Pi.onAdd&&Pi.onAdd(this,qe)}}updateImage(qe,xe){this._lazyInitEmptyStyle();const ke=this.style.getImage(qe);if(!ke)return void this.fire(new ie.y(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const He=xe instanceof HTMLImageElement||ImageBitmap&&xe instanceof ImageBitmap?ie.q.getImageData(xe):xe,{width:ri,height:ai,data:vi}=He;if(ri===void 0||ai===void 0)return void this.fire(new ie.y(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(ri!==(ke.usvg?ke.icon.usvg_tree.width:ke.data.width)||ai!==(ke.usvg?ke.icon.usvg_tree.height:ke.data.height))return void this.fire(new ie.y(new Error(`The width and height of the updated image (${ri}, ${ai})
2511
2511
  must be that same as the previous version of the image
2512
- (${ke.data.width}, ${ke.data.height})`)));const Si=!(xe instanceof HTMLImageElement||ImageBitmap&&xe instanceof ImageBitmap);let Li=!1;ke.usvg?(ke.data=new ie.r({width:ri,height:ai},new Uint8Array(vi)),ke.usvg=!1,ke.icon=void 0,Li=!0):ke.data.replace(vi,Si),this.style.updateImage(qe,ke,Li)}hasImage(qe){return qe?!!this.style&&!!this.style.getImage(qe):(this.fire(new ie.y(new Error("Missing required image id"))),!1)}removeImage(qe){this.style.removeImage(qe)}loadImage(qe,xe){ie.o(this._requestManager.transformRequest(qe,ie.R.Image),(ke,He)=>{xe(ke,He instanceof HTMLImageElement?ie.q.getImageData(He):He)})}listImages(){return this.style.listImages()}addModel(qe,xe){this._lazyInitEmptyStyle(),this.style.addModel(qe,xe)}hasModel(qe){return qe?this.style.hasModel(qe):(this.fire(new ie.y(new Error("Missing required model id"))),!1)}removeModel(qe){this.style.removeModel(qe)}listModels(){return this.style.listModels()}addLayer(qe,xe){return this._isValidId(qe.id)?(this._lazyInitEmptyStyle(),this.style.addLayer(qe,xe),this._update(!0)):this}getSlot(qe){const xe=this.getLayer(qe);return xe&&xe.slot||null}setSlot(qe,xe){return this.style.setSlot(qe,xe),this.style.mergeLayers(),this._update(!0)}addImport(qe,xe){return this.style.addImport(qe,xe),this}updateImport(qe,xe){return typeof xe!="string"&&xe.id!==qe?(this.removeImport(qe),this.addImport(xe)):(this.style.updateImport(qe,xe),this._update(!0))}removeImport(qe){return this.style.removeImport(qe),this}moveImport(qe,xe){return this.style.moveImport(qe,xe),this._update(!0)}moveLayer(qe,xe){return this._isValidId(qe)?(this.style.moveLayer(qe,xe),this._update(!0)):this}removeLayer(qe){return this._isValidId(qe)?(this.style.removeLayer(qe),this._update(!0)):this}getLayer(qe){if(!this._isValidId(qe))return null;const xe=this.style.getOwnLayer(qe);return xe?xe.type==="custom"?xe.implementation:xe.serialize():void 0}getSlots(){return this.style.getSlots()}setLayerZoomRange(qe,xe,ke){return this._isValidId(qe)?(this.style.setLayerZoomRange(qe,xe,ke),this._update(!0)):this}setFilter(qe,xe,ke={}){return this._isValidId(qe)?(this.style.setFilter(qe,xe,ke),this._update(!0)):this}getFilter(qe){return this._isValidId(qe)?this.style.getFilter(qe):null}setPaintProperty(qe,xe,ke,He={}){return this._isValidId(qe)?(this.style.setPaintProperty(qe,xe,ke,He),this._update(!0)):this}getPaintProperty(qe,xe){return this._isValidId(qe)?this.style.getPaintProperty(qe,xe):null}setLayoutProperty(qe,xe,ke,He={}){return this._isValidId(qe)?(this.style.setLayoutProperty(qe,xe,ke,He),this._update(!0)):this}getLayoutProperty(qe,xe){return this._isValidId(qe)?this.style.getLayoutProperty(qe,xe):null}getSchema(qe){return this.style.getSchema(qe)}setSchema(qe,xe){return this.style.setSchema(qe,xe),this._update(!0)}getConfig(qe){return this.style.getConfig(qe)}setConfig(qe,xe){return this.style.setConfig(qe,xe),this._update(!0)}getConfigProperty(qe,xe){return this.style.getConfigProperty(qe,xe)}setConfigProperty(qe,xe,ke){return this.style.setConfigProperty(qe,xe,ke),this._update(!0)}getFeaturesetDescriptors(qe){return this.style.getFeaturesetDescriptors(qe)}setLights(qe){if(this._lazyInitEmptyStyle(),qe&&qe.length===1&&qe[0].type==="flat"){const xe=qe[0];xe.properties?this.style.setFlatLight(xe.properties,xe.id,{}):this.style.setFlatLight({},"flat")}else this.style.setLights(qe),this.painter.terrain&&(this.painter.terrain.invalidateRenderCache=!0);return this._update(!0)}getLights(){const qe=this.style.getLights()||[];return qe.length===0&&qe.push({id:this.style.light.id,type:"flat",properties:this.style.getFlatLight()}),qe}setLight(qe,xe={}){return console.log("The `map.setLight` function is deprecated, prefer using `map.setLights` with `flat` light type instead."),this.setLights([{id:"flat",type:"flat",properties:qe}])}getLight(){return console.log("The `map.getLight` function is deprecated, prefer using `map.getLights` instead."),this.style.getFlatLight()}setTerrain(qe){return this._lazyInitEmptyStyle(),!qe&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(qe),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(qe){return this._lazyInitEmptyStyle(),this.style.setFog(qe),this._update(!0)}getFog(){return this.style?this.style.getFog():null}setSnow(qe){return this._lazyInitEmptyStyle(),this.style.setSnow(qe),this._update(!0)}getSnow(){return this.style?this.style.getSnow():null}setRain(qe){return this._lazyInitEmptyStyle(),this.style.setRain(qe),this._update(!0)}getRain(){return this.style?this.style.getRain():null}setColorTheme(qe){return this._lazyInitEmptyStyle(),this.style.setColorTheme(qe),this._update(!0)}setImportColorTheme(qe,xe){return this._lazyInitEmptyStyle(),this.style.setImportColorTheme(qe,xe),this._update(!0)}setCamera(qe){return this.style.setCamera(qe),this._triggerCameraUpdate(qe)}_triggerCameraUpdate(qe){return this._update(this.transform.setOrthographicProjectionAtLowPitch(qe["camera-projection"]==="orthographic"))}getCamera(){return this.style.camera}_queryFogOpacity(qe){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(ie.bO.convert(qe),this.transform):0}setFeatureState(qe,xe){return qe.source&&!this._isValidId(qe.source)?this:(this.style.setFeatureState(qe,xe),this._update())}removeFeatureState(qe,xe){return qe.source&&!this._isValidId(qe.source)?this:(this.style.removeFeatureState(qe,xe),this._update())}getFeatureState(qe){return qe.source&&!this._isValidId(qe.source)?null:this.style.getFeatureState(qe)}_updateContainerDimensions(){if(!this._container)return;const qe=this._container.getBoundingClientRect().width||400,xe=this._container.getBoundingClientRect().height||300;let ke,He,ri,ai=this._container;for(;ai&&(!He||!ri);){const vi=window.getComputedStyle(ai).transform;vi&&vi!=="none"&&(ke=vi.match(/matrix.*\((.+)\)/)[1].split(", "),ke[0]&&ke[0]!=="0"&&ke[0]!=="1"&&(He=ke[0]),ke[3]&&ke[3]!=="0"&&ke[3]!=="1"&&(ri=ke[3])),ai=ai.parentElement}this._containerWidth=He?Math.abs(qe/He):qe,this._containerHeight=ri?Math.abs(xe/ri):xe}_detectMissingCSS(){window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&ie.w("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const qe=this._container;qe.classList.add("mapboxgl-map"),(this._missingCSSCanary=Ii("div","mapboxgl-canary",qe)).style.visibility="hidden",this._detectMissingCSS();const xe=this._canvasContainer=Ii("div","mapboxgl-canvas-container",qe);this._canvas=Ii("canvas","mapboxgl-canvas",xe),this._interactive&&(xe.classList.add("mapboxgl-interactive"),this._canvas.setAttribute("tabindex","0")),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const ke=this._controlContainer=Ii("div","mapboxgl-control-container",qe),He=this._controlPositions={};["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"].forEach(ri=>{He[ri]=Ii("div",`mapboxgl-ctrl-${ri}`,ke)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(qe,xe){const ke=ie.q.devicePixelRatio||1;this._canvas.width=ke*Math.ceil(qe),this._canvas.height=ke*Math.ceil(xe),this._canvas.style.width=`${qe}px`,this._canvas.style.height=`${xe}px`}_addMarker(qe){this._markers.push(qe)}_removeMarker(qe){const xe=this._markers.indexOf(qe);xe!==-1&&this._markers.splice(xe,1)}_addPopup(qe){this._popups.push(qe)}_removePopup(qe){const xe=this._popups.indexOf(qe);xe!==-1&&this._popups.splice(xe,1)}_setupPainter(){const qe=ie.l({},Ti.supported.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),xe=this._canvas.getContext("webgl2",qe);xe?(vr(xe,!0),this.painter=new ef(xe,this._contextCreateOptions,this.transform,this._scaleFactor,this._tp),this.on("data",ke=>{ke.dataType==="source"&&this.painter.setTileLoadedFlag(!0)}),ie.m.testSupport(xe)):this.fire(new ie.y(new Error("Failed to initialize WebGL")))}_contextLost(qe){qe.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new ie.z("webglcontextlost",{originalEvent:qe}))}_contextRestored(qe){this._setupPainter(),this.resize(),this._update(),this.fire(new ie.z("webglcontextrestored",{originalEvent:qe}))}_onMapScroll(qe){if(qe.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}idle(){return!this.isMoving()&&this.loaded()}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}frameReady(){return this.loaded()&&!this._placementDirty}_update(qe){return this.style?(this._styleDirty=this._styleDirty||qe,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(qe){return this._update(),this._renderTaskQueue.add(qe)}_cancelRenderFrame(qe){this._renderTaskQueue.remove(qe)}_requestDomTask(qe){!this.loaded()||this.loaded()&&!this.isMoving()?qe():this._domRenderTaskQueue.add(qe)}_render(qe){let xe;this.fire(new ie.z("renderstart")),++this._frameId;const ke=this.painter.context.extTimerQuery,He=ie.q.now(),ri=this.painter.context.gl;if(this.listens("gpu-timing-frame")&&(xe=ri.createQuery(),ri.beginQuery(ke.TIME_ELAPSED_EXT,xe)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],performance.now())),this._renderTaskQueue.run(qe),this._domRenderTaskQueue.run(qe),this._removed)return;this._updateProjectionTransition();const ai=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const Pi=this.transform.zoom,Oi=this.transform.pitch,Gi=ie.q.now(),qi=new ie.a8(Pi,{now:Gi,fadeDuration:ai,pitch:Oi,transition:this.style.transition});this.style.update(qi)}this.style&&this.style.hasFogTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let vi=!1;this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),vi=this._updateAverageElevation(He),this.style.updateSources(this.transform),this._forceMarkerAndPopupUpdate()):vi=this._updateAverageElevation(He);const Si=this.style&&this.style._updatePlacement(this.painter,this.painter.transform,this.showCollisionBoxes,ai,this._crossSourceCollisions,this.painter.replacementSource,this._scaleFactorChanged);if(this._scaleFactorChanged&&(this._scaleFactorChanged=!1),Si&&(this._placementDirty=Si.needsRerender),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showParseStatus:this.showParseStatus,wireframe:{terrain:this.showTerrainWireframe,layers2D:this.showLayers2DWireframe,layers3D:this.showLayers3DWireframe},showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:ai,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new ie.z("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,li.mark(di.load),this.fire(new ie.z("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&(this.style.snow||this.style.rain)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),xe){const Pi=ie.q.now()-He;ri.endQuery(ke.TIME_ELAPSED_EXT),setTimeout(()=>{const Oi=ri.getQueryParameter(xe,ri.QUERY_RESULT)/1e6;ri.deleteQuery(xe),this.fire(new ie.z("gpu-timing-frame",{cpuTime:Pi,gpuTime:Oi}))},50)}if(this.listens("gpu-timing-layer")){const Pi=this.painter.collectGpuTimers();setTimeout(()=>{const Oi=this.painter.queryGpuTimers(Pi);this.fire(new ie.z("gpu-timing-layer",{layerTimes:Oi}))},50)}if(this.listens("gpu-timing-deferred-render")){const Pi=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{const Oi=this.painter.queryGpuTimeDeferredRender(Pi);this.fire(new ie.z("gpu-timing-deferred-render",{gpuTime:Oi}))},50)}const Li=this._sourcesDirty||this._styleDirty||this._placementDirty||vi;if(Li||this._repaint)this.triggerRepaint();else{const Pi=this.idle();if(Pi&&(vi=this._updateAverageElevation(He,!0)),vi)this.triggerRepaint();else if(this._triggerFrame(!1),Pi&&(this.fire(new ie.z("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const Oi=this._calculateSpeedIndex();this.fire(new ie.z("speedindexcompleted",{speedIndex:Oi})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||Li||(this._fullyLoaded=!0,li.mark(di.fullLoad),this._performanceMetricsCollection&&br(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(qe){for(const xe of this._markers)qe&&!this.getRenderWorldCopies()&&(xe._lngLat=xe._lngLat.wrap()),xe._update();for(const xe of this._popups)!qe||this.getRenderWorldCopies()||xe._trackPointer||(xe._lngLat=xe._lngLat.wrap()),xe._update()}_updateAverageElevation(qe,xe=!1){const ke=ri=>(this.transform.averageElevation=ri,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return this.transform.averageElevation!==0&&ke(0);const He=this.transform.elevation&&this.transform.elevation.exaggeration()!==this._averageElevationExaggeration;if(He||(xe||qe-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(qe)){const ri=this.transform.averageElevation;let ai=this.transform.sampleAverageElevation();this.transform.elevation!=null&&(this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(ai)?ai=0:this._averageElevationLastSampledAt=qe;const vi=Math.abs(ri-ai);if(vi>1){if(this._isInitialLoad||He)return this._averageElevation.jumpTo(ai),ke(ai);this._averageElevation.easeTo(ai,qe,300)}else if(vi>1e-4)return this._averageElevation.jumpTo(ai),ke(ai)}return!!this._averageElevation.isEasing(qe)&&ke(this._averageElevation.getValue(qe))}_authenticate(){Xi(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,qe=>{if(qe&&(qe.message===ze||qe.status===401)){const xe=this.painter.context.gl;vr(xe,!1),this._logoControl instanceof pa&&this._logoControl._updateLogo(),xe&&xe.clear(xe.DEPTH_BUFFER_BIT|xe.COLOR_BUFFER_BIT|xe.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new ie.y(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),fr(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_postStyleLoadEvent(){this.style.globalId&&wr(this._requestManager._customAccessToken,{map:this,skuToken:this._requestManager._skuToken,style:this.style.globalId,importedStyles:this.style.getImportGlobalIds()})}_updateTerrain(){const qe=this._isDragging();this.painter.updateTerrain(this.style,qe)}_calculateSpeedIndex(){const qe=this.painter.canvasCopy(),xe=this.painter.getCanvasCopiesAndTimestamps();xe.timeStamps.push(performance.now());const ke=this.painter.context.gl,He=ke.createFramebuffer();function ri(ai){ke.framebufferTexture2D(ke.FRAMEBUFFER,ke.COLOR_ATTACHMENT0,ke.TEXTURE_2D,ai,0);const vi=new Uint8Array(ke.drawingBufferWidth*ke.drawingBufferHeight*4);return ke.readPixels(0,0,ke.drawingBufferWidth,ke.drawingBufferHeight,ke.RGBA,ke.UNSIGNED_BYTE,vi),vi}return ke.bindFramebuffer(ke.FRAMEBUFFER,He),this._canvasPixelComparison(ri(qe),xe.canvasCopies.map(ri),xe.timeStamps)}_canvasPixelComparison(qe,xe,ke){let He=ke[1]-ke[0];const ri=qe.length/4;for(let ai=0;ai<xe.length;ai++){const vi=xe[ai];let Si=0;for(let Li=0;Li<vi.length;Li+=4)vi[Li]===qe[Li]&&vi[Li+1]===qe[Li+1]&&vi[Li+2]===qe[Li+2]&&vi[Li+3]===qe[Li+3]&&(Si+=1);He+=(ke[ai+2]-ke[ai+1])*(1-Si/ri)}return He}remove(){this._hash&&this._hash.remove();for(const xe of this._controls)xe.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this._domRenderTaskQueue.clear(),this.style&&this.style.destroy(),this.indoor.destroy(),this.painter.destroy(),this.handlers&&this.handlers.destroy(),this.handlers=void 0,this.setStyle(null),window.removeEventListener("resize",this._onWindowResize,!1),window.removeEventListener("orientationchange",this._onWindowResize,!1),window.removeEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),window.removeEventListener("online",this._onWindowOnline,!1),window.removeEventListener("visibilitychange",this._onVisibilityChange,!1);const qe=this.painter.context.gl.getExtension("WEBGL_lose_context");qe&&qe.loseContext(),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._missingCSSCanary.remove(),this._canvas=void 0,this._canvasContainer=void 0,this._controlContainer=void 0,this._missingCSSCanary=void 0,this._container.classList.remove("mapboxgl-map"),this._container.removeEventListener("scroll",this._onMapScroll,!1),xr.delete(this.painter.context.gl),er.remove(),Hi.remove(),this._removed=!0,this.fire(new ie.z("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(qe){this._renderNextFrame=this._renderNextFrame||qe,this.style&&!this._frame&&(this._frame=ie.q.frame(xe=>{const ke=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,ke&&this._render(xe)}))}_preloadTiles(qe){const xe=this.style?this.style.getSourceCaches():[];return ie.bl(xe,(ke,He)=>ke._preloadTiles(qe,He),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(qe){this._trackResize&&this.resize({originalEvent:qe})._update()}_onVisibilityChange(){document.visibilityState==="hidden"&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(qe){this._showTileBoundaries!==qe&&(this._showTileBoundaries=qe,this._tp.refreshUI(),this._update())}get showParseStatus(){return!!this._showParseStatus}set showParseStatus(qe){this._showParseStatus!==qe&&(this._showParseStatus=qe,this._tp.refreshUI(),this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(qe){this._showTerrainWireframe!==qe&&(this._showTerrainWireframe=qe,this._tp.refreshUI(),this._update())}get showLayers2DWireframe(){return!!this._showLayers2DWireframe}set showLayers2DWireframe(qe){this._showLayers2DWireframe!==qe&&(this._showLayers2DWireframe=qe,this._tp.refreshUI(),this._update())}get showLayers3DWireframe(){return!!this._showLayers3DWireframe}set showLayers3DWireframe(qe){this._showLayers3DWireframe!==qe&&(this._showLayers3DWireframe=qe,this._tp.refreshUI(),this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(qe){this._speedIndexTiming!==qe&&(this._speedIndexTiming=qe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(qe){this._showPadding!==qe&&(this._showPadding=qe,this._tp.refreshUI(),this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(qe){this._showCollisionBoxes!==qe&&(this._showCollisionBoxes=qe,this._tp.refreshUI(),qe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(qe){this._showOverdrawInspector!==qe&&(this._showOverdrawInspector=qe,this._tp.refreshUI(),this._update())}get repaint(){return!!this._repaint}set repaint(qe){this._repaint!==qe&&(this._repaint=qe,this._tp.refreshUI(),this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(qe){this._vertices=qe,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(qe){this._showTileAABBs!==qe&&(this._showTileAABBs=qe,this._tp.refreshUI(),qe&&this._update())}_setCacheLimits(qe,xe){ie.dG(qe,xe)}get version(){return ii}},NavigationControl:class{constructor(qe={}){this.options=ie.l({},Ia,qe),this._container=Ii("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",xe=>xe.preventDefault()),this.options.showZoom&&(ie.aP(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",xe=>{this._map&&this._map.zoomIn({},{originalEvent:xe})}),Ii("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",xe=>{this._map&&this._map.zoomOut({},{originalEvent:xe})}),Ii("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(ie.aP(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",xe=>{const ke=this._map;ke&&(this.options.visualizePitch?ke.resetNorthPitch({},{originalEvent:xe}):ke.resetNorth({},{originalEvent:xe}))}),this._compassIcon=Ii("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const qe=this._map;if(!qe)return;const xe=qe.getZoom(),ke=xe===qe.getMaxZoom(),He=xe===qe.getMinZoom();this._zoomInButton.disabled=ke,this._zoomOutButton.disabled=He,this._zoomInButton.setAttribute("aria-disabled",ke.toString()),this._zoomOutButton.setAttribute("aria-disabled",He.toString())}_rotateCompassArrow(){const qe=this._map;if(!qe)return;const xe=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(qe.transform.pitch*(Math.PI/180)),.5)}) rotateX(${qe.transform.pitch}deg) rotateZ(${qe.transform.angle*(180/Math.PI)}deg)`:`rotate(${qe.transform.angle*(180/Math.PI)}deg)`;qe._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=xe)})}onAdd(qe){return this._map=qe,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),qe.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&qe.on("pitch",this._rotateCompassArrow),qe.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new mu(qe,this._compass,this.options.visualizePitch)),this._container}onRemove(){const qe=this._map;qe&&(this._container.remove(),this.options.showZoom&&qe.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&qe.off("pitch",this._rotateCompassArrow),qe.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(qe,xe){const ke=Ii("button",qe,this._container);return ke.type="button",ke.addEventListener("click",xe),ke}_setButtonTitle(qe,xe){if(!this._map)return;const ke=this._map._getUIString(`NavigationControl.${xe}`);qe.setAttribute("aria-label",ke),qe.firstElementChild&&qe.firstElementChild.setAttribute("title",ke)}},GeolocateControl:class extends ie.E{constructor(qe={}){super();const xe=navigator.geolocation;this.options=ie.l({geolocation:xe},Fu,qe),ie.aP(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=od(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(qe){return this._map=qe,this._container=Ii("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){this._geolocationWatchID!==void 0&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(qe){const xe=(ke=!!this.options.geolocation)=>{this._supportsGeolocation=ke,qe(ke)};this._supportsGeolocation!==void 0?qe(this._supportsGeolocation):navigator.permissions!==void 0?navigator.permissions.query({name:"geolocation"}).then(ke=>xe(ke.state!=="denied")).catch(()=>xe()):xe()}_isOutOfMapMaxBounds(qe){const xe=this._map.getMaxBounds(),ke=qe.coords;return!!xe&&(ke.longitude<xe.getWest()||ke.longitude>xe.getEast()||ke.latitude<xe.getSouth()||ke.latitude>xe.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(qe){if(this._map){if(this._isOutOfMapMaxBounds(qe))return this._setErrorState(),this.fire(new ie.z("outofmaxbounds",qe)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=qe,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(qe),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(qe),this.options.showUserLocation&&this._userLocationDotMarker.removeClassName("mapboxgl-user-location-dot-stale"),this.fire(new ie.z("geolocate",qe)),this._finish()}}_updateCamera(qe){const xe=new ie.bO(qe.coords.longitude,qe.coords.latitude),ke=qe.coords.accuracy,He=this._map.getBearing(),ri=ie.l({bearing:He},this.options.fitBoundsOptions);this._map.fitBounds(xe.toBounds(ke),ri,{geolocateSource:!0})}_updateMarker(qe){if(qe){const xe=new ie.bO(qe.coords.longitude,qe.coords.latitude);this._accuracyCircleMarker.setLngLat(xe).addTo(this._map),this._userLocationDotMarker.setLngLat(xe).addTo(this._map),this._accuracy=qe.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const qe=this._map.transform,xe=ie.bH(1,qe._center.lat)*qe.worldSize,ke=Math.ceil(2*this._accuracy*xe);this._circleElement.style.width=`${ke}px`,this._circleElement.style.height=`${ke}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&typeof this._heading=="number"?(this._userLocationDotMarker.setRotation(this._heading),this._userLocationDotMarker.addClassName("mapboxgl-user-location-show-heading")):(this._userLocationDotMarker.removeClassName("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(qe){if(this._map){if(this.options.trackUserLocation)if(qe.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const xe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",xe),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",xe),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(qe.code===3&&this._noTimeout)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._userLocationDotMarker.addClassName("mapboxgl-user-location-dot-stale"),this.fire(new ie.z("error",qe)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(qe){if(this._map!==void 0){if(this._container.addEventListener("contextmenu",xe=>xe.preventDefault()),this._geolocateButton=Ii("button","mapboxgl-ctrl-geolocate",this._container),Ii("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",qe===!1){ie.w("Geolocation support is not available so the GeolocateControl will be disabled.");const xe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",xe),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",xe)}else{const xe=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",xe),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",xe)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=Ii("div","mapboxgl-user-location"),this._dotElement.appendChild(Ii("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(Ii("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new uf({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=Ii("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new uf({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",xe=>{xe.geolocateSource||this._watchState!=="ACTIVE_LOCK"||xe.originalEvent&&xe.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new ie.z("trackuserlocationend")))})}}_onDeviceOrientation(qe){this._userLocationDotMarker&&(qe.webkitCompassHeading?this._heading=qe.webkitCompassHeading:qe.absolute===!0&&(this._heading=-1*qe.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return ie.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new ie.z("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new ie.z("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new ie.z("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let qe;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(qe={maximumAge:6e5,timeout:0},this._noTimeout=!0):(qe=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,qe),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=window.setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const qe=()=>{"ondeviceorientationabsolute"in window?window.addEventListener("deviceorientationabsolute",this._onDeviceOrientation):window.addEventListener("deviceorientation",this._onDeviceOrientation)};typeof DeviceMotionEvent<"u"&&typeof DeviceMotionEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(xe=>{xe==="granted"&&qe()}).catch(console.error):qe()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),window.removeEventListener("deviceorientation",this._onDeviceOrientation),window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Ou,ScaleControl:class{constructor(qe={}){this.options=ie.l({},vu,qe),this._isNumberFormatSupported=function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch{return!1}}(),ie.aP(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const qe=this.options.maxWidth||100,xe=this._map,ke=xe._containerHeight/2,He=xe._containerWidth/2-qe/2,ri=xe.unproject([He,ke]),ai=xe.unproject([He+qe,ke]),vi=ri.distanceTo(ai);if(this.options.unit==="imperial"){const Si=3.2808*vi;Si>5280?this._setScale(qe,Si/5280,"mile"):this._setScale(qe,Si,"foot")}else this.options.unit==="nautical"?this._setScale(qe,vi/1852,"nautical-mile"):vi>=1e3?this._setScale(qe,vi/1e3,"kilometer"):this._setScale(qe,vi,"meter")}_setScale(qe,xe,ke){this._map._requestDomTask(()=>{const He=function(ai){const vi=Math.pow(10,`${Math.floor(ai)}`.length-1);let Si=ai/vi;return Si=Si>=10?10:Si>=5?5:Si>=3?3:Si>=2?2:Si>=1?1:function(Li){const Pi=Math.pow(10,Math.ceil(-Math.log(Li)/Math.LN10));return Math.round(Li*Pi)/Pi}(Si),vi*Si}(xe),ri=He/xe;this._container.innerHTML=this._isNumberFormatSupported&&ke!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:ke}).format(He):`${He}&nbsp;${As[ke]}`,this._container.style.width=qe*ri+"px"})}onAdd(qe){return this._map=qe,this._language=qe.getLanguage(),this._container=Ii("div","mapboxgl-ctrl mapboxgl-ctrl-scale",qe.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(qe){this._language=qe,this._update()}setUnit(qe){this.options.unit=qe,this._update()}},FullscreenControl:class{constructor(qe={}){this._fullscreen=!1,qe&&qe.container&&(qe.container instanceof HTMLElement?this._container=qe.container:ie.w("Full screen control 'container' must be a DOM element.")),ie.aP(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(qe){return this._map=qe,this._container||(this._container=this._map.getContainer()),this._controlContainer=Ii("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",ie.w("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)}_setupUI(){const qe=this._fullscreenButton=Ii("button","mapboxgl-ctrl-fullscreen",this._controlContainer);Ii("span","mapboxgl-ctrl-icon",qe).setAttribute("aria-hidden","true"),qe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const qe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",qe),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",qe)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(document.fullscreenElement||document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},Popup:class extends ie.E{constructor(qe){super(),this.options=ie.l(Object.create(xs),qe),ie.aP(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(qe&&qe.className?qe.className.trim().split(/\s+/):[])}addTo(qe){return this._map&&this.remove(),this._map=qe,this.options.closeOnClick&&qe.on("preclick",this._onClose),this.options.closeOnMove&&qe.on("move",this._onClose),qe.on("remove",this.remove),this._update(),qe._addPopup(this),this._focusFirstElement(),this._trackPointer?(qe.on("mousemove",this._onMouseEvent),qe.on("mouseup",this._onMouseEvent),qe._canvasContainer.classList.add("mapboxgl-track-pointer")):qe.on("move",this._update),this.fire(new ie.z("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const qe=this._map;return qe&&(qe.off("move",this._update),qe.off("move",this._onClose),qe.off("preclick",this._onClose),qe.off("click",this._onClose),qe.off("remove",this.remove),qe.off("mousemove",this._onMouseEvent),qe.off("mouseup",this._onMouseEvent),qe.off("drag",this._onMouseEvent),qe._canvasContainer&&qe._canvasContainer.classList.remove("mapboxgl-track-pointer"),qe._removePopup(this),this._map=void 0),this.fire(new ie.z("close")),this}getLngLat(){return this._lngLat}setLngLat(qe){this._lngLat=ie.bO.convert(qe),this._pos=null,this._trackPointer=!1,this._update();const xe=this._map;return xe&&(xe.on("move",this._update),xe.off("mousemove",this._onMouseEvent),xe._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const qe=this._map;return qe&&(qe.off("move",this._update),qe.on("mousemove",this._onMouseEvent),qe.on("drag",this._onMouseEvent),qe._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(qe){return this.setDOMContent(document.createTextNode(qe))}setHTML(qe){const xe=document.createDocumentFragment(),ke=document.createElement("body");let He;for(ke.innerHTML=qe;He=ke.firstChild,He;)xe.appendChild(He);return this.setDOMContent(xe)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(qe){return this.options.maxWidth=qe,this._update(),this}setDOMContent(qe){let xe=this._content;if(xe)for(;xe.hasChildNodes();)xe.firstChild&&xe.removeChild(xe.firstChild);else xe=this._content=Ii("div","mapboxgl-popup-content",this._container||void 0);if(xe.appendChild(qe),this.options.closeButton){const ke=this._closeButton=Ii("button","mapboxgl-popup-close-button",xe);ke.type="button",ke.setAttribute("aria-label","Close popup"),ke.setAttribute("aria-hidden","true"),ke.innerHTML="&#215;",ke.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(qe){return this._classList.add(qe),this._updateClassList(),this}removeClassName(qe){return this._classList.delete(qe),this._updateClassList(),this}setOffset(qe){return this.options.offset=qe,this._update(),this}toggleClassName(qe){let xe;return this._classList.delete(qe)?xe=!1:(this._classList.add(qe),xe=!0),this._updateClassList(),xe}_onMouseEvent(qe){this._update(qe.point)}_getAnchor(qe){if(this.options.anchor)return this.options.anchor;const xe=this._map,ke=this._container,He=this._pos;if(!xe||!ke||!He)return"bottom";const ri=ke.offsetWidth,ai=ke.offsetHeight,vi=He.x<ri/2,Si=He.x>xe.transform.width-ri/2;if(He.y+qe<ai)return vi?"top-left":Si?"top-right":"top";if(He.y>xe.transform.height-ai){if(vi)return"bottom-left";if(Si)return"bottom-right"}return vi?"left":Si?"right":"bottom"}_updateClassList(){const qe=this._container;if(!qe)return;const xe=[...this._classList];xe.push("mapboxgl-popup"),this._anchor&&xe.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&xe.push("mapboxgl-popup-track-pointer"),qe.className=xe.join(" ")}_update(qe){const xe=this._map,ke=this._content;if(!xe||!this._lngLat&&!this._trackPointer||!ke)return;let He=this._container;if(He||(He=this._container=Ii("div","mapboxgl-popup",xe.getContainer()),this._tip=Ii("div","mapboxgl-popup-tip",He),He.appendChild(ke)),this.options.maxWidth&&He.style.maxWidth!==this.options.maxWidth&&(He.style.maxWidth=this.options.maxWidth),xe.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=i0(this._lngLat,this._pos,xe.transform)),!this._trackPointer||qe){const ri=this._pos=this._trackPointer&&qe instanceof ie.P?qe:xe.project(this._lngLat),ai=em(this.options.offset),vi=this._anchor=this._getAnchor(ai.y),Si=em(this.options.offset,vi),Li=ri.add(Si).round();xe._requestDomTask(()=>{this._container&&vi&&(this._container.style.transform=`${up[vi]} translate(${Li.x}px,${Li.y}px)`)})}if(!this._marker&&xe._showingGlobe()){const ri=ie.dH(xe.transform,this._lngLat)?0:1;this._setOpacity(ri)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const qe=this._container.querySelector(Fs);qe&&qe.focus()}_onClose(){this.remove()}_setOpacity(qe){this._container&&(this._container.style.opacity=`${qe}`),this._content&&(this._content.style.pointerEvents=qe?"auto":"none")}},Marker:uf,Style:za,LngLat:ie.bO,LngLatBounds:ie.az,Point:ie.P,MercatorCoordinate:ie.aa,FreeCameraOptions:Oh,Evented:ie.E,config:ie.e,prewarm:ie.dM,clearPrewarmedResources:ie.dN,get accessToken(){return ie.e.ACCESS_TOKEN},set accessToken(qe){ie.e.ACCESS_TOKEN=qe},get baseApiUrl(){return ie.e.API_URL},set baseApiUrl(qe){ie.e.API_URL=qe},get workerCount(){return ie.dO.workerCount},set workerCount(qe){ie.dO.workerCount=qe},get maxParallelImageRequests(){return ie.e.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(qe){ie.e.MAX_PARALLEL_IMAGE_REQUESTS=qe},clearStorage(qe){ie.dP(qe)},get workerUrl(){return ie.dQ.workerUrl},set workerUrl(qe){ie.dQ.workerUrl=qe},get workerClass(){return ie.dQ.workerClass},set workerClass(qe){ie.dQ.workerClass=qe},get workerParams(){return ie.dQ.workerParams},set workerParams(qe){ie.dQ.workerParams=qe},get dracoUrl(){return ie.dR()},set dracoUrl(qe){ie.dS(qe)},get meshoptUrl(){return ie.dT()},set meshoptUrl(qe){ie.dU(qe)},setNow:ie.q.setNow,restoreNow:ie.q.restoreNow}});var Ze=Pe;return Ze})})(mapboxGl);const mapboxgl=getDefaultExportFromCjs$1(mapboxGl.exports);function debounce(m,c){let ne=null;const we=this;return()=>{clearTimeout(ne);var Pe=arguments;ne=setTimeout(()=>{m.apply(we,Pe)},c)}}const _hoisted_1$r={class:"map"},_sfc_main$A=vue.defineComponent({__name:"MapboxMap",props:{bounds:{},padding:{},mapboxAccessToken:{},mapboxStyle:{},projection:{},bearing:{},pitch:{},synchronousPrecision:{},ratio:{}},emits:["update:bounds"],setup(m,{emit:c}){const ne=m,we=c;function Pe(Ti){return{left:Ti[0],top:Ti[1],right:Ti[2],bottom:Ti[3]}}const Me=vue.ref(),{width:Ze,height:ie}=useElementBounding(Me);let ii;const di=()=>{ii?.fitBounds(ne.bounds,{padding:Pe(ne.padding),pitch:ne.pitch,bearing:ne.bearing})},li=()=>{if(Ci.value&&ii){const{x:Ti,y:Ii,width:Di,height:Zi}=Ci.value,Fi=ii.unproject([Ti+Di,Ii]),Ui=ii.unproject([Ti,Ii+Zi]);Ai.value=[Ui.lng,Ui.lat,Fi.lng,Fi.lat].map(Wi=>Number(Wi.toFixed(ne.synchronousPrecision)))}};vue.onMounted(()=>{ii=new mapboxgl.Map({container:Me.value,style:ne.mapboxStyle,bounds:ne.bounds,accessToken:ne.mapboxAccessToken,projection:ne.projection,bearing:ne.bearing,pitch:ne.pitch}),ii.on("render",li),ii.on("load",()=>{di()})}),vue.watch(()=>ne.mapboxStyle,()=>{ii?.setStyle(ne.mapboxStyle)}),vue.watch(()=>ne.projection,()=>{ii?.setProjection(ne.projection)}),vue.watch(()=>ne.bearing,()=>{ii?.setBearing(ne.bearing)}),vue.watch(()=>ne.pitch,()=>{ii?.setPitch(ne.pitch)}),vue.watch([()=>ne.bounds,()=>ne.padding],di);const mi=vue.computed(()=>Ze.value&&ie.value?Ze.value/ie.value:1),Ci=vue.computed(()=>{const Ti=Ze.value-ne.padding[0]-ne.padding[2],Ii=ie.value-ne.padding[1]-ne.padding[3];if(mi.value>=ne.ratio){const Di=Ii*ne.ratio;return{x:ne.padding[0]+(Ti-Di)/2,y:ne.padding[1]+0,width:Di,height:Ii}}else{const Di=Ti/ne.ratio;return{x:ne.padding[0]+0,y:ne.padding[1]+(Ii-Di)/2,width:Ti,height:Di}}}),Ai=vue.ref();return vue.watch(Ai,debounce(()=>{!isEqual(Ai.value,ne.bounds)&&Ai.value&&we("update:bounds",Ai.value)},100)),(Ti,Ii)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$r,[vue.createElementVNode("div",{ref_key:"mapboxMapRef",ref:Me,class:"mapbox-map"},null,512),Ci.value?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"layer",style:vue.normalizeStyle({"--x":`${Ci.value.x}px`,"--y":`${Ci.value.y}px`,"--width":`${Ci.value.width}px`,"--height":`${Ci.value.height}px`})},[vue.renderSlot(Ti.$slots,"layer",{bounds:Ai.value,bbox:Ci.value,map:vue.unref(ii)},void 0,!0)],4)):vue.createCommentVNode("",!0)]))}}),MapboxMap_vue_vue_type_style_index_0_scoped_8f6ef37a_lang="",MapboxMap=_export_sfc(_sfc_main$A,[["__scopeId","data-v-8f6ef37a"]]),_hoisted_1$q={class:"preview-image"},_hoisted_2$i=["src"],_hoisted_3$b={class:"map-wrapper"},_sfc_main$z=vue.defineComponent({__name:"Map",props:{modelValue:{},padding:{default:0},mapStyle:{default:"mapbox://styles/mapbox/streets-v11"},mapboxAccessToken:{},type:{default:"popup"},aspectRatio:{}},emits:["update:model-value"],setup(m,{emit:c}){const ne=m,we=c,Pe=vue.ref(),{width:Me}=useElementBounding(Pe),Ze=vue.ref(!1);vue.watch(Ze,()=>{Ze.value||(ie.value=ii.value,we("update:model-value",ie.value))});const ie=vue.ref(ne.modelValue),ii=vue.ref(ne.modelValue),di=debounce(Ci=>{ii.value=Ci,ne.type==="inline"&&we("update:model-value",ii.value)},500);function li(){const Ci=ne.mapStyle?.replace("mapbox://styles/",""),Ai=Math.round(Me.value??200);return`https://api.mapbox.com/styles/v1/${Ci}/static/[${ie.value.join(",")}]/${Ai}x${Math.round(Ai/ne.aspectRatio)}@2x?access_token=${ne.mapboxAccessToken}`}const mi=vue.ref(li());return vue.watch(ie,debounce(()=>{mi.value=li()},500)),(Ci,Ai)=>(vue.openBlock(),vue.createElementBlock("div",{ref_key:"mapFieldRef",ref:Pe,class:vue.normalizeClass(["field-map",{["type-"+Ci.type]:!0}]),style:vue.normalizeStyle({"--aspect-ratio":Ci.aspectRatio})},[Ci.type==="inline"?(vue.openBlock(),vue.createBlock(MapboxMap,{key:0,bounds:Ci.modelValue,"onUpdate:bounds":vue.unref(di),bearing:0,pitch:0,"mapbox-access-token":Ci.mapboxAccessToken,"mapbox-style":Ci.mapStyle,padding:[Ci.padding,Ci.padding,Ci.padding,Ci.padding],projection:{name:"globe"},ratio:Ci.aspectRatio,"synchronous-precision":8},{layer:vue.withCtx(({bounds:Ti,map:Ii,bbox:Di})=>[Ti&&Ii?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"layer-wrapper",style:vue.normalizeStyle({"--x":`${Ii.project([Ti[0],Ti[1]]).x}px`,"--y":`${Ii.project([Ti[2],Ti[3]]).y}px`,"--width":`${Ii.project([Ti[2],Ti[3]]).x-Ii.project([Ti[0],Ti[1]]).x}px`,"--height":`${Ii.project([Ti[0],Ti[1]]).y-Ii.project([Ti[2],Ti[3]]).y}px`})},Ai[1]||(Ai[1]=[vue.createElementVNode("div",{class:"overlay"},null,-1),vue.createElementVNode("div",{class:"viewport-border"},null,-1)]),4)):vue.createCommentVNode("",!0)]),_:1},8,["bounds","onUpdate:bounds","mapbox-access-token","mapbox-style","padding","ratio"])):(vue.openBlock(),vue.createBlock(_sfc_main$17,{key:1,type:"layer",transculent:"",show:Ze.value,"onUpdate:show":Ai[0]||(Ai[0]=Ti=>Ze.value=Ti)},{trigger:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$q,[vue.createElementVNode("img",{src:mi.value},null,8,_hoisted_2$i)])]),"close-btn":vue.withCtx(()=>[vue.createVNode(BxButton,{round:"",tertiary:"",class:"close-btn"},{default:vue.withCtx(()=>Ai[2]||(Ai[2]=[vue.createTextVNode(" Done ")])),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_3$b,[vue.createVNode(MapboxMap,{bounds:Ci.modelValue,"onUpdate:bounds":vue.unref(di),bearing:0,pitch:0,"mapbox-access-token":Ci.mapboxAccessToken,"mapbox-style":Ci.mapStyle,padding:[Ci.padding,Ci.padding,Ci.padding,Ci.padding],projection:{name:"globe"},ratio:Ci.aspectRatio,"synchronous-precision":8},{layer:vue.withCtx(({bounds:Ti,map:Ii,bbox:Di})=>[Ti&&Ii?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"layer-wrapper",style:vue.normalizeStyle({"--x":`${Ii.project([Ti[0],Ti[1]]).x}px`,"--y":`${Ii.project([Ti[2],Ti[3]]).y}px`,"--width":`${Ii.project([Ti[2],Ti[3]]).x-Ii.project([Ti[0],Ti[1]]).x}px`,"--height":`${Ii.project([Ti[0],Ti[1]]).y-Ii.project([Ti[2],Ti[3]]).y}px`})},Ai[3]||(Ai[3]=[vue.createElementVNode("div",{class:"overlay"},null,-1),vue.createElementVNode("div",{class:"viewport-border"},null,-1),vue.createElementVNode("div",{class:"marker"},[vue.createElementVNode("svg",{version:"1.0",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 64 64","enable-background":"new 0 0 64 64","xml:space":"preserve"},[vue.createElementVNode("path",{d:"M32,0C18.746,0,8,10.746,8,24c0,5.219,1.711,10.008,4.555,13.93c0.051,0.094,0.059,0.199,0.117,0.289l16,24 C29.414,63.332,30.664,64,32,64s2.586-0.668,3.328-1.781l16-24c0.059-0.09,0.066-0.195,0.117-0.289C54.289,34.008,56,29.219,56,24 C56,10.746,45.254,0,32,0z M32,32c-4.418,0-8-3.582-8-8s3.582-8,8-8s8,3.582,8,8S36.418,32,32,32z"})])],-1)]),4)):vue.createCommentVNode("",!0)]),_:1},8,["bounds","onUpdate:bounds","mapbox-access-token","mapbox-style","padding","ratio"])])]),_:1},8,["show"]))],6))}}),Map_vue_vue_type_style_index_0_scoped_2e4a6276_lamng_scss_lang="",Map_vue_vue_type_style_index_1_lang="",Map$1=_export_sfc(_sfc_main$z,[["__scopeId","data-v-2e4a6276"]]),_hoisted_1$p={class:"field-color"},_sfc_main$y=vue.defineComponent({__name:"Color",props:vue.mergeModels({alpha:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const c=vue.useModel(m,"modelValue");return(ne,we)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$p,[vue.withDirectives(vue.createElementVNode("input",{type:"color","onUpdate:modelValue":we[0]||(we[0]=Pe=>c.value=Pe)},null,512),[[vue.vModelText,c.value]])]))}}),Color_vue_vue_type_style_index_0_scoped_14e2dc54_lang="",Color$1=_export_sfc(_sfc_main$y,[["__scopeId","data-v-14e2dc54"]]);function e$1(m,c,ne=1e3,we){let Pe,Me=0;const Ze=()=>{Pe&&clearTimeout(Pe)};return vue.watch(m,async(ie,ii)=>{we&&we(ie,ii);const di=()=>(Ze(),Me=Date.now(),c(ie,ii)),li=Date.now()-Me;li>=ne?di():(Ze(),Pe=setTimeout(di,ne-li))})}const _sfc_main$x=vue.defineComponent({__name:"BxSlider",props:vue.mergeModels({min:{},max:{},step:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const c=vue.inject("darkmode"),ne=vue.useModel(m,"modelValue"),we=m,Pe=vue.ref(),{left:Me,width:Ze}=useElementBounding(Pe),ie=vue.computed(()=>isNaN(ne.value)?we.min:Math.min(we.max,Math.max(we.min,ne.value))),ii=vue.computed(()=>we.max-we.min),di=vue.computed(()=>(ie.value-we.min)/ii.value),li=vue.ref();function mi(Ii){if(Ii.preventDefault(),Ii.target?.closest(".slider-thumb"))Ii.type==="mousedown"?li.value={x:Ii.clientX,value:ie.value}:li.value={x:Ii.touches[0].clientX,value:ie.value};else{const Di=Ii.type==="mousedown"?Ii.clientX:Ii.touches[0].clientX,Ui=(Di-Me.value)/Ze.value*ii.value,Wi=we.min+Ui;ne.value=Math.min(we.max,Math.max(we.min,Wi-Wi%we.step)),li.value={x:Di,value:Wi}}}const Ci=vue.ref({x:0,y:0});e$1(()=>Ci.value,()=>{if(!li.value)return;const Zi=(li.value.x-Ci.value.x)/Ze.value*ii.value,Fi=li.value.value-Zi;ne.value=Math.min(we.max,Math.max(we.min,Fi-Fi%we.step))},16,()=>{});function Ai(Ii){!li.value||(Ii.preventDefault(),Ii.type==="mousemove"?Ci.value={x:Ii.clientX,y:Ii.clientY}:Ci.value={x:Ii.touches[0].clientX,y:Ii.touches[0].clientY})}function Ti(Ii){li.value&&Ii.preventDefault(),li.value=void 0}return window.addEventListener("mousemove",Ai),window.addEventListener("mouseup",Ti),window.addEventListener("touchmove",Ai),window.addEventListener("touchend",Ti),vue.onUnmounted(()=>{window.removeEventListener("mousemove",Ai),window.removeEventListener("mouseup",Ti),window.removeEventListener("touchmove",Ai),window.removeEventListener("touchend",Ti)}),(Ii,Di)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["bx-slider swiper-no-swiping",{darkmode:vue.unref(c)}]),style:vue.normalizeStyle({"--value-relative":di.value}),onMousedown:mi,onTouchstart:mi},[vue.createElementVNode("div",{class:"slider-body",ref_key:"sliderBodyRef",ref:Pe},Di[0]||(Di[0]=[vue.createElementVNode("div",{class:"slider-value"},null,-1)]),512),Di[1]||(Di[1]=vue.createElementVNode("div",{class:"slider-thumb"},null,-1))],38))}}),BxSlider_vue_vue_type_style_index_0_scoped_27197875_lang="",BxSlider=_export_sfc(_sfc_main$x,[["__scopeId","data-v-27197875"]]),_hoisted_1$o={class:"field-number"},_hoisted_2$h=["min","max","step"],_sfc_main$w=vue.defineComponent({__name:"Number",props:vue.mergeModels({min:{},max:{},step:{},type:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const c=vue.useModel(m,"modelValue"),ne=vue.computed({get(){return Number(c.value)},set(we){c.value=Number(we)}});return(we,Pe)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$o,[we.type==="slider"?(vue.openBlock(),vue.createBlock(BxSlider,{key:0,type:"range",modelValue:ne.value,"onUpdate:modelValue":Pe[0]||(Pe[0]=Me=>ne.value=Me),min:we.min,max:we.max,step:we.step},null,8,["modelValue","min","max","step"])):vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{key:1,type:"number","onUpdate:modelValue":Pe[1]||(Pe[1]=Me=>ne.value=Me),min:we.min,max:we.max,step:we.step},null,8,_hoisted_2$h)),[[vue.vModelText,ne.value]])]))}}),Number_vue_vue_type_style_index_0_scoped_7b17f563_lang="",Number$1=_export_sfc(_sfc_main$w,[["__scopeId","data-v-7b17f563"]]),_hoisted_1$n={key:0,class:"select-dropdown-wrapper"},_hoisted_2$g=["onClick"],_hoisted_3$a={class:"preview-wrapper"},_hoisted_4$6={key:0,class:"label-wrapper"},_sfc_main$v=vue.defineComponent({__name:"SelectItem",props:vue.mergeModels({options:{},layout:{},size:{},showLabels:{type:Boolean},mobile:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const c=vue.useModel(m,"modelValue"),ne=m;vue.useSlots();const we=vue.computed(()=>ne.options.map(Pe=>({label:Pe.label,value:Pe.value,icon:Pe.image?()=>vue.h("img",{src:Pe.image,style:{"object-fit":"cover",width:"19px",height:"19px"}}):void 0})));return(Pe,Me)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["select-item-wrapper",{[`size-${Pe.size}`]:!0,["swiper-no-swiping"]:Pe.mobile&&Pe.layout==="carroussel"}])},[Pe.layout==="dropdown"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$n,[vue.createVNode(BxSelect,{modelValue:c.value,"onUpdate:modelValue":Me[0]||(Me[0]=Ze=>c.value=Ze),options:we.value,"placeholder-active-label":"Select option"},null,8,["modelValue","options"])])):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(["select-buttons-wrapper",{carroussel:Pe.layout==="carroussel"}])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(Pe.options,Ze=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["select-option-button",{selected:Ze.value===c.value}]),onClick:ie=>c.value=Ze.value},[vue.createElementVNode("div",_hoisted_3$a,[vue.renderSlot(Pe.$slots,"preview",{option:Ze,selected:c.value===Ze.value},void 0,!0)]),Ze.label?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$6,vue.toDisplayString(Ze.label),1)):vue.createCommentVNode("",!0)],10,_hoisted_2$g))),256))],2))],2))}}),SelectItem_vue_vue_type_style_index_0_scoped_0aeb4f24_lang="",SelectItem=_export_sfc(_sfc_main$v,[["__scopeId","data-v-0aeb4f24"]]),_hoisted_1$m={class:"select-text-field"},_sfc_main$u=vue.defineComponent({__name:"SelectText",props:vue.mergeModels({options:{},layout:{},imageDisplay:{},showLabels:{type:Boolean},size:{},mobile:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const c=vue.useModel(m,"modelValue"),ne=m,we=vue.computed(()=>ne.layout==="button"&&ne.mobile?"carroussel":ne.layout);return(Pe,Me)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$m,[vue.createVNode(SelectItem,{modelValue:c.value,"onUpdate:modelValue":Me[0]||(Me[0]=Ze=>c.value=Ze),options:Pe.options,layout:we.value,"image-display":Pe.imageDisplay,"show-labels":Pe.showLabels,size:Pe.size,mobile:Pe.mobile},null,8,["modelValue","options","layout","image-display","show-labels","size","mobile"])]))}}),SelectText_vue_vue_type_style_index_0_scoped_cb108a08_lang="",SelectText=_export_sfc(_sfc_main$u,[["__scopeId","data-v-cb108a08"]]),_sfc_main$t=vue.defineComponent({__name:"SelectColor",props:vue.mergeModels({options:{},layout:{},imageDisplay:{},showLabels:{type:Boolean},size:{},mobile:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const c=vue.useModel(m,"modelValue"),ne=useDarkmode(),we=m,Pe=vue.computed(()=>we.layout==="button"&&we.mobile?"carroussel":we.layout),Me=vue.computed(()=>we.layout==="dropdown"?we.options.map(Ze=>({label:Ze.label||Ze.value,value:Ze.value,image:`data:image/svg+xml;base64,${window.btoa(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50%" cy="50%" r="50%" style="fill: ${Ze.image};" /></svg>`)}`})):we.options);return(Ze,ie)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["select-color-field",{darkmode:vue.unref(ne)}])},[vue.createVNode(SelectItem,{modelValue:c.value,"onUpdate:modelValue":ie[0]||(ie[0]=ii=>c.value=ii),options:Me.value,layout:Pe.value,"image-display":Ze.imageDisplay,"show-labels":Ze.showLabels,size:Ze.size,mobile:Ze.mobile},{preview:vue.withCtx(({option:ii,selected:di})=>[vue.createElementVNode("div",{class:vue.normalizeClass(["preview-color",{selected:di}]),style:vue.normalizeStyle({"--color":ii.image||ii.value})},null,6)]),_:1},8,["modelValue","options","layout","image-display","show-labels","size","mobile"])],2))}}),SelectColor_vue_vue_type_style_index_0_scoped_eb8315a9_lang="",SelectColor=_export_sfc(_sfc_main$t,[["__scopeId","data-v-eb8315a9"]]),_hoisted_1$l=["src"],_sfc_main$s=vue.defineComponent({__name:"SelectImage",props:vue.mergeModels({options:{},layout:{},imageDisplay:{},showLabels:{type:Boolean},size:{},mobile:{type:Boolean,default:!1}},{modelValue:{required:!0,default:()=>({src:"https://picsum.photos/536/354",scale:1,innerPos:[0,0],innerRotate:0})},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const c=useDarkmode(),ne=vue.useModel(m,"modelValue"),we=m,Pe=vue.computed(()=>we.layout==="button"&&we.mobile?"carroussel":we.layout),Me=vue.computed({get(){return typeof ne.value=="string"?ne.value:ne.value.src},set(Ze){typeof ne.value=="string"?ne.value=Ze:ne.value={...ne.value,src:Ze}}});return(Ze,ie)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["select-image-field",{mobile:Ze.mobile,darkmode:vue.unref(c)}])},[vue.createVNode(SelectItem,{modelValue:Me.value,"onUpdate:modelValue":ie[0]||(ie[0]=ii=>Me.value=ii),options:Ze.options,layout:Pe.value,"image-display":Ze.imageDisplay,"show-labels":Ze.showLabels,size:Ze.size,mobile:Ze.mobile},{preview:vue.withCtx(({option:ii,selected:di})=>[vue.createElementVNode("img",{class:vue.normalizeClass(["preview-image",{[`image-display-${Ze.imageDisplay}`]:!0,selected:di}]),src:ii.image},null,10,_hoisted_1$l)]),_:1},8,["modelValue","options","layout","image-display","show-labels","size","mobile"])],2))}}),SelectImage_vue_vue_type_style_index_0_scoped_d55f1edb_lang="",SelectImage=_export_sfc(_sfc_main$s,[["__scopeId","data-v-d55f1edb"]]),style$1="",_hoisted_1$k={key:0,class:"info-symbol-wrapper"},_hoisted_2$f={class:"instruction-text"},_hoisted_3$9={class:"detailed-description-text"},_sfc_main$r=vue.defineComponent({__name:"Instruction",props:{instruction:{},description:{},detailedDescription:{}},setup(m){const c=useDarkmode();return(ne,we)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["instruction-field",{darkmode:vue.unref(c)}])},[ne.description===void 0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$k,[vue.createVNode(BxIcon,null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(InformationCircleOutline))]),_:1})])):vue.createCommentVNode("",!0),vue.createElementVNode("main",null,[vue.createElementVNode("div",_hoisted_2$f,vue.toDisplayString(ne.instruction),1),vue.createElementVNode("div",_hoisted_3$9,vue.toDisplayString(ne.detailedDescription),1)])],2))}}),Instruction_vue_vue_type_style_index_0_scoped_d63c188c_lang="",Instruction=_export_sfc(_sfc_main$r,[["__scopeId","data-v-d63c188c"]]),BluepciFieldComponents=Object.freeze(Object.defineProperty({__proto__:null,ImageEdit,Image:Image$1,Group,Text,ImageAdjust,Select,Checkbox,Collection,Map:Map$1,Color:Color$1,Number:Number$1,SelectText,SelectColor,SelectImage,Instruction},Symbol.toStringTag,{value:"Module"})),_hoisted_1$j={class:"inner"},_hoisted_2$e={key:1},_sfc_main$q=vue.defineComponent({__name:"FieldsList",props:{layout:{default:"list"},fields:{},isRoot:{type:Boolean}},setup(m){const c=vue.inject("darkmode"),ne=m,we=vue.inject("bridge"),Pe=vue.inject("data"),Me=vue.inject("computedPropEvaluator");Me||console.error("computedPropEvaluator is not provided");const Ze=di=>{if("pos"in di&&"scale"in di){const mi=di.image,Ci=di.pos,Ai=di.scale;return{image:Pe.value[mi],"onUpdate:image":Ii=>{Pe.value[mi]=Ii},adjust:{scale:Pe.value[Ai],innerPos:Pe.value[Ci]},"onUpdate:adjust":Ii=>{Pe.value[Ai]=Ii.scale,Pe.value[Ci]=Ii.innerPos}}}return{...Object.fromEntries(Object.entries(di).map(([mi,Ci])=>[mi,Pe.value[Ci]])),...Object.fromEntries(Object.entries(di).map(([mi])=>[`onUpdate:${mi}`,Ci=>{Pe.value[di[mi]]=Ci}]))}};function ie(di){return Object.fromEntries(Object.entries(di).map(([li,mi])=>typeof mi=="function"?[li,Me(mi)]:[li,mi]))}const ii=di=>{const li=ne.fields.indexOf(di),mi=ne.fields.slice(0,li).filter(Ci=>Ci.type==="Instruction");return li-mi.length+1};return(di,li)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["bluepic-fields",{["layout-"+di.layout]:!0,darkmode:vue.unref(c)}])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(di.fields,(mi,Ci)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["field",{"is-root":di.isRoot,["field-type-"+mi.type.toLowerCase()]:!0,"field-has-card":mi.type==="Group"&&mi.props.card}]),style:vue.normalizeStyle({"--min-width":mi.layout?.minWidth,"--max-width":mi.layout?.maxWidth})},[mi.type!=="Group"&&mi.description?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(["description",{"no-detailed-description":!mi.detailedDescription,"text-overlaying-description":!di.isRoot&&mi.type==="Text"}])},[vue.createElementVNode("div",_hoisted_1$j,[di.isRoot?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(["root-index",{}])},[mi.type==="Instruction"?(vue.openBlock(),vue.createBlock(BxIcon,{key:0},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(InformationOutline))]),_:1})):(vue.openBlock(),vue.createElementBlock("span",_hoisted_2$e,vue.toDisplayString(ii(mi)),1))])):vue.createCommentVNode("",!0),vue.createElementVNode("span",null,vue.toDisplayString(mi.description),1),mi.detailedDescription&&mi.type!=="Instruction"?(vue.openBlock(),vue.createBlock(BxTooltip,{key:1,trigger:"hover",darkmode:vue.unref(c)},{trigger:vue.withCtx(()=>[vue.createVNode(BxIcon,null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(HelpOutline))]),_:1})]),content:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(mi.detailedDescription),1)]),_:2},1032,["darkmode"])):vue.createCommentVNode("",!0)])],2)):vue.createCommentVNode("",!0),(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(BluepciFieldComponents[mi.type]),vue.mergeProps({bridge:vue.unref(we),index:Ci,"is-root":di.isRoot,ref_for:!0},{...ie(mi.props),...Ze(mi.model),field:mi,description:mi.description,detailedDescription:mi.detailedDescription,...(()=>{if(mi.type==="Text")return{...mi.layout}})()}),null,16,["bridge","index","is-root"]))],6))),256))],2))}}),FieldsList_vue_vue_type_style_index_0_scoped_50eeb93e_lang="",FieldsList=_export_sfc(_sfc_main$q,[["__scopeId","data-v-50eeb93e"]]),_hoisted_1$i={class:"bx-fields"},_sfc_main$p=vue.defineComponent({__name:"Fields",props:{fields:{}},setup(m){return(c,ne)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$i,[vue.createVNode(FieldsList,{fields:c.fields,"is-root":""},null,8,["fields"])]))}}),_sfc_main$o=vue.defineComponent({__name:"PopupProvider",setup(m,{expose:c}){const ne=vue.ref([]);function we(li,mi,Ci){ne.value.push({id:li,render:mi,type:Ci.type,close:Ci.close,handleClickOutside:Ci.handleClickOutside,disableBackgroundEffect:Ci.disableBackgroundEffect,wrapperCustomClasses:Ci.wrapperCustomClasses})}function Pe(li){const mi=ne.value.findIndex(Ci=>Ci.id===li);mi!==-1&&ne.value.splice(mi,1)}function Me(li){return ne.value.some(mi=>mi.id===li)}const Ze=vue.computed(()=>ne.value.length>0),ie=vue.ref(["a","b","c"]);window.tPush=()=>ie.value.push("d"),window.tPull=()=>ie.value=ie.value.slice(0,-1);const ii=vue.computed(()=>ne.value.filter(li=>!li.disableBackgroundEffect));vue.watch([Ze,ii],()=>{const li=document.querySelector(GLOBAL_APP_WRAPPER_SELECTOR);!li||(Ze.value&&ii.value.length>0&&li.classList.add("bluepic-popup-app-wrapper-in-background"),Ze.value||li.classList.remove("bluepic-popup-app-wrapper-in-background"))});function di(li){li.close()}return c({isVisible:Me,push:we,pull:Pe}),(li,mi)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["bluepic-popup-provider",{visible:Ze.value}])},[vue.createVNode(vue.TransitionGroup,{name:"slide-popup-element"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(ne.value,(Ci,Ai)=>(vue.openBlock(),vue.createElementBlock("div",{key:Ci.id,class:vue.normalizeClass(["popup-wrapper",{["type-"+Ci.type]:!0,...Object.fromEntries(Ci.wrapperCustomClasses.map(Ti=>[Ti,!0]))}])},[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(Ci.render),{onClickOutside:Ti=>di(Ci),onClose:Ci.close,style:vue.normalizeStyle({"--level":-(Ai-(ne.value.length-1))})},null,40,["onClickOutside","onClose","style"]))],2))),128))]),_:1})],2))}}),PopupProvider_vue_vue_type_style_index_0_scoped_bc5c5238_lang="",PopupProvider=_export_sfc(_sfc_main$o,[["__scopeId","data-v-bc5c5238"]]),_sfc_main$n=vue.defineComponent({__name:"PopoverProvider",setup(m,{expose:c}){const ne=vue.ref([]),we=vue.computed(()=>ne.value.length>0);function Pe(ii,di,li){ne.value.push({id:ii,render:di,darkenBackground:li.darkenBackground,handleClickOutside:li.handleClickOutside})}function Me(ii){console.log("pull",ii);const di=ne.value.findIndex(li=>li.id===ii);di!==-1&&ne.value.splice(di,1)}function Ze(ii){return ne.value.some(di=>di.id===ii)}vue.watch(we,()=>{});function ie(ii){ii.handleClickOutside()}return c({isVisible:Ze,push:Pe,pull:Me}),(ii,di)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["bluepic-popover-provider",{visible:we.value,"darken-background":ne.value.filter(li=>li.darkenBackground).length>0}])},[vue.createVNode(vue.TransitionGroup,{name:"show-popover-element"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(ne.value,(li,mi)=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(li.render),{key:li.id,onClickOutside:Ci=>ie(li)},null,40,["onClickOutside"]))),128))]),_:1})],2))}}),PopoverProvider_vue_vue_type_style_index_0_scoped_c7215d57_lang="",PopoverProvider=_export_sfc(_sfc_main$n,[["__scopeId","data-v-c7215d57"]]);class BluepicPopupProvider{popupProviderRef;popoverProviderRef;constructor(){const c=document.createElement("div");c.classList.add("bluepic-popup-provider__wrapper");const ne=document.createElement("style");ne.setAttribute("type","text/css"),ne.setAttribute("data-bluepic-popup-app-wrapper","true"),ne.innerHTML=`
2512
+ (${ke.data.width}, ${ke.data.height})`)));const Si=!(xe instanceof HTMLImageElement||ImageBitmap&&xe instanceof ImageBitmap);let Li=!1;ke.usvg?(ke.data=new ie.r({width:ri,height:ai},new Uint8Array(vi)),ke.usvg=!1,ke.icon=void 0,Li=!0):ke.data.replace(vi,Si),this.style.updateImage(qe,ke,Li)}hasImage(qe){return qe?!!this.style&&!!this.style.getImage(qe):(this.fire(new ie.y(new Error("Missing required image id"))),!1)}removeImage(qe){this.style.removeImage(qe)}loadImage(qe,xe){ie.o(this._requestManager.transformRequest(qe,ie.R.Image),(ke,He)=>{xe(ke,He instanceof HTMLImageElement?ie.q.getImageData(He):He)})}listImages(){return this.style.listImages()}addModel(qe,xe){this._lazyInitEmptyStyle(),this.style.addModel(qe,xe)}hasModel(qe){return qe?this.style.hasModel(qe):(this.fire(new ie.y(new Error("Missing required model id"))),!1)}removeModel(qe){this.style.removeModel(qe)}listModels(){return this.style.listModels()}addLayer(qe,xe){return this._isValidId(qe.id)?(this._lazyInitEmptyStyle(),this.style.addLayer(qe,xe),this._update(!0)):this}getSlot(qe){const xe=this.getLayer(qe);return xe&&xe.slot||null}setSlot(qe,xe){return this.style.setSlot(qe,xe),this.style.mergeLayers(),this._update(!0)}addImport(qe,xe){return this.style.addImport(qe,xe),this}updateImport(qe,xe){return typeof xe!="string"&&xe.id!==qe?(this.removeImport(qe),this.addImport(xe)):(this.style.updateImport(qe,xe),this._update(!0))}removeImport(qe){return this.style.removeImport(qe),this}moveImport(qe,xe){return this.style.moveImport(qe,xe),this._update(!0)}moveLayer(qe,xe){return this._isValidId(qe)?(this.style.moveLayer(qe,xe),this._update(!0)):this}removeLayer(qe){return this._isValidId(qe)?(this.style.removeLayer(qe),this._update(!0)):this}getLayer(qe){if(!this._isValidId(qe))return null;const xe=this.style.getOwnLayer(qe);return xe?xe.type==="custom"?xe.implementation:xe.serialize():void 0}getSlots(){return this.style.getSlots()}setLayerZoomRange(qe,xe,ke){return this._isValidId(qe)?(this.style.setLayerZoomRange(qe,xe,ke),this._update(!0)):this}setFilter(qe,xe,ke={}){return this._isValidId(qe)?(this.style.setFilter(qe,xe,ke),this._update(!0)):this}getFilter(qe){return this._isValidId(qe)?this.style.getFilter(qe):null}setPaintProperty(qe,xe,ke,He={}){return this._isValidId(qe)?(this.style.setPaintProperty(qe,xe,ke,He),this._update(!0)):this}getPaintProperty(qe,xe){return this._isValidId(qe)?this.style.getPaintProperty(qe,xe):null}setLayoutProperty(qe,xe,ke,He={}){return this._isValidId(qe)?(this.style.setLayoutProperty(qe,xe,ke,He),this._update(!0)):this}getLayoutProperty(qe,xe){return this._isValidId(qe)?this.style.getLayoutProperty(qe,xe):null}getSchema(qe){return this.style.getSchema(qe)}setSchema(qe,xe){return this.style.setSchema(qe,xe),this._update(!0)}getConfig(qe){return this.style.getConfig(qe)}setConfig(qe,xe){return this.style.setConfig(qe,xe),this._update(!0)}getConfigProperty(qe,xe){return this.style.getConfigProperty(qe,xe)}setConfigProperty(qe,xe,ke){return this.style.setConfigProperty(qe,xe,ke),this._update(!0)}getFeaturesetDescriptors(qe){return this.style.getFeaturesetDescriptors(qe)}setLights(qe){if(this._lazyInitEmptyStyle(),qe&&qe.length===1&&qe[0].type==="flat"){const xe=qe[0];xe.properties?this.style.setFlatLight(xe.properties,xe.id,{}):this.style.setFlatLight({},"flat")}else this.style.setLights(qe),this.painter.terrain&&(this.painter.terrain.invalidateRenderCache=!0);return this._update(!0)}getLights(){const qe=this.style.getLights()||[];return qe.length===0&&qe.push({id:this.style.light.id,type:"flat",properties:this.style.getFlatLight()}),qe}setLight(qe,xe={}){return console.log("The `map.setLight` function is deprecated, prefer using `map.setLights` with `flat` light type instead."),this.setLights([{id:"flat",type:"flat",properties:qe}])}getLight(){return console.log("The `map.getLight` function is deprecated, prefer using `map.getLights` instead."),this.style.getFlatLight()}setTerrain(qe){return this._lazyInitEmptyStyle(),!qe&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(qe),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(qe){return this._lazyInitEmptyStyle(),this.style.setFog(qe),this._update(!0)}getFog(){return this.style?this.style.getFog():null}setSnow(qe){return this._lazyInitEmptyStyle(),this.style.setSnow(qe),this._update(!0)}getSnow(){return this.style?this.style.getSnow():null}setRain(qe){return this._lazyInitEmptyStyle(),this.style.setRain(qe),this._update(!0)}getRain(){return this.style?this.style.getRain():null}setColorTheme(qe){return this._lazyInitEmptyStyle(),this.style.setColorTheme(qe),this._update(!0)}setImportColorTheme(qe,xe){return this._lazyInitEmptyStyle(),this.style.setImportColorTheme(qe,xe),this._update(!0)}setCamera(qe){return this.style.setCamera(qe),this._triggerCameraUpdate(qe)}_triggerCameraUpdate(qe){return this._update(this.transform.setOrthographicProjectionAtLowPitch(qe["camera-projection"]==="orthographic"))}getCamera(){return this.style.camera}_queryFogOpacity(qe){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(ie.bO.convert(qe),this.transform):0}setFeatureState(qe,xe){return qe.source&&!this._isValidId(qe.source)?this:(this.style.setFeatureState(qe,xe),this._update())}removeFeatureState(qe,xe){return qe.source&&!this._isValidId(qe.source)?this:(this.style.removeFeatureState(qe,xe),this._update())}getFeatureState(qe){return qe.source&&!this._isValidId(qe.source)?null:this.style.getFeatureState(qe)}_updateContainerDimensions(){if(!this._container)return;const qe=this._container.getBoundingClientRect().width||400,xe=this._container.getBoundingClientRect().height||300;let ke,He,ri,ai=this._container;for(;ai&&(!He||!ri);){const vi=window.getComputedStyle(ai).transform;vi&&vi!=="none"&&(ke=vi.match(/matrix.*\((.+)\)/)[1].split(", "),ke[0]&&ke[0]!=="0"&&ke[0]!=="1"&&(He=ke[0]),ke[3]&&ke[3]!=="0"&&ke[3]!=="1"&&(ri=ke[3])),ai=ai.parentElement}this._containerWidth=He?Math.abs(qe/He):qe,this._containerHeight=ri?Math.abs(xe/ri):xe}_detectMissingCSS(){window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&ie.w("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const qe=this._container;qe.classList.add("mapboxgl-map"),(this._missingCSSCanary=Ii("div","mapboxgl-canary",qe)).style.visibility="hidden",this._detectMissingCSS();const xe=this._canvasContainer=Ii("div","mapboxgl-canvas-container",qe);this._canvas=Ii("canvas","mapboxgl-canvas",xe),this._interactive&&(xe.classList.add("mapboxgl-interactive"),this._canvas.setAttribute("tabindex","0")),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const ke=this._controlContainer=Ii("div","mapboxgl-control-container",qe),He=this._controlPositions={};["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"].forEach(ri=>{He[ri]=Ii("div",`mapboxgl-ctrl-${ri}`,ke)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(qe,xe){const ke=ie.q.devicePixelRatio||1;this._canvas.width=ke*Math.ceil(qe),this._canvas.height=ke*Math.ceil(xe),this._canvas.style.width=`${qe}px`,this._canvas.style.height=`${xe}px`}_addMarker(qe){this._markers.push(qe)}_removeMarker(qe){const xe=this._markers.indexOf(qe);xe!==-1&&this._markers.splice(xe,1)}_addPopup(qe){this._popups.push(qe)}_removePopup(qe){const xe=this._popups.indexOf(qe);xe!==-1&&this._popups.splice(xe,1)}_setupPainter(){const qe=ie.l({},Ti.supported.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),xe=this._canvas.getContext("webgl2",qe);xe?(vr(xe,!0),this.painter=new ef(xe,this._contextCreateOptions,this.transform,this._scaleFactor,this._tp),this.on("data",ke=>{ke.dataType==="source"&&this.painter.setTileLoadedFlag(!0)}),ie.m.testSupport(xe)):this.fire(new ie.y(new Error("Failed to initialize WebGL")))}_contextLost(qe){qe.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new ie.z("webglcontextlost",{originalEvent:qe}))}_contextRestored(qe){this._setupPainter(),this.resize(),this._update(),this.fire(new ie.z("webglcontextrestored",{originalEvent:qe}))}_onMapScroll(qe){if(qe.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}idle(){return!this.isMoving()&&this.loaded()}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}frameReady(){return this.loaded()&&!this._placementDirty}_update(qe){return this.style?(this._styleDirty=this._styleDirty||qe,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(qe){return this._update(),this._renderTaskQueue.add(qe)}_cancelRenderFrame(qe){this._renderTaskQueue.remove(qe)}_requestDomTask(qe){!this.loaded()||this.loaded()&&!this.isMoving()?qe():this._domRenderTaskQueue.add(qe)}_render(qe){let xe;this.fire(new ie.z("renderstart")),++this._frameId;const ke=this.painter.context.extTimerQuery,He=ie.q.now(),ri=this.painter.context.gl;if(this.listens("gpu-timing-frame")&&(xe=ri.createQuery(),ri.beginQuery(ke.TIME_ELAPSED_EXT,xe)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],performance.now())),this._renderTaskQueue.run(qe),this._domRenderTaskQueue.run(qe),this._removed)return;this._updateProjectionTransition();const ai=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const Pi=this.transform.zoom,Oi=this.transform.pitch,Gi=ie.q.now(),qi=new ie.a8(Pi,{now:Gi,fadeDuration:ai,pitch:Oi,transition:this.style.transition});this.style.update(qi)}this.style&&this.style.hasFogTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let vi=!1;this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),vi=this._updateAverageElevation(He),this.style.updateSources(this.transform),this._forceMarkerAndPopupUpdate()):vi=this._updateAverageElevation(He);const Si=this.style&&this.style._updatePlacement(this.painter,this.painter.transform,this.showCollisionBoxes,ai,this._crossSourceCollisions,this.painter.replacementSource,this._scaleFactorChanged);if(this._scaleFactorChanged&&(this._scaleFactorChanged=!1),Si&&(this._placementDirty=Si.needsRerender),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showParseStatus:this.showParseStatus,wireframe:{terrain:this.showTerrainWireframe,layers2D:this.showLayers2DWireframe,layers3D:this.showLayers3DWireframe},showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:ai,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new ie.z("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,li.mark(di.load),this.fire(new ie.z("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&(this.style.snow||this.style.rain)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),xe){const Pi=ie.q.now()-He;ri.endQuery(ke.TIME_ELAPSED_EXT),setTimeout(()=>{const Oi=ri.getQueryParameter(xe,ri.QUERY_RESULT)/1e6;ri.deleteQuery(xe),this.fire(new ie.z("gpu-timing-frame",{cpuTime:Pi,gpuTime:Oi}))},50)}if(this.listens("gpu-timing-layer")){const Pi=this.painter.collectGpuTimers();setTimeout(()=>{const Oi=this.painter.queryGpuTimers(Pi);this.fire(new ie.z("gpu-timing-layer",{layerTimes:Oi}))},50)}if(this.listens("gpu-timing-deferred-render")){const Pi=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{const Oi=this.painter.queryGpuTimeDeferredRender(Pi);this.fire(new ie.z("gpu-timing-deferred-render",{gpuTime:Oi}))},50)}const Li=this._sourcesDirty||this._styleDirty||this._placementDirty||vi;if(Li||this._repaint)this.triggerRepaint();else{const Pi=this.idle();if(Pi&&(vi=this._updateAverageElevation(He,!0)),vi)this.triggerRepaint();else if(this._triggerFrame(!1),Pi&&(this.fire(new ie.z("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const Oi=this._calculateSpeedIndex();this.fire(new ie.z("speedindexcompleted",{speedIndex:Oi})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||Li||(this._fullyLoaded=!0,li.mark(di.fullLoad),this._performanceMetricsCollection&&br(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(qe){for(const xe of this._markers)qe&&!this.getRenderWorldCopies()&&(xe._lngLat=xe._lngLat.wrap()),xe._update();for(const xe of this._popups)!qe||this.getRenderWorldCopies()||xe._trackPointer||(xe._lngLat=xe._lngLat.wrap()),xe._update()}_updateAverageElevation(qe,xe=!1){const ke=ri=>(this.transform.averageElevation=ri,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return this.transform.averageElevation!==0&&ke(0);const He=this.transform.elevation&&this.transform.elevation.exaggeration()!==this._averageElevationExaggeration;if(He||(xe||qe-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(qe)){const ri=this.transform.averageElevation;let ai=this.transform.sampleAverageElevation();this.transform.elevation!=null&&(this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(ai)?ai=0:this._averageElevationLastSampledAt=qe;const vi=Math.abs(ri-ai);if(vi>1){if(this._isInitialLoad||He)return this._averageElevation.jumpTo(ai),ke(ai);this._averageElevation.easeTo(ai,qe,300)}else if(vi>1e-4)return this._averageElevation.jumpTo(ai),ke(ai)}return!!this._averageElevation.isEasing(qe)&&ke(this._averageElevation.getValue(qe))}_authenticate(){Xi(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,qe=>{if(qe&&(qe.message===ze||qe.status===401)){const xe=this.painter.context.gl;vr(xe,!1),this._logoControl instanceof pa&&this._logoControl._updateLogo(),xe&&xe.clear(xe.DEPTH_BUFFER_BIT|xe.COLOR_BUFFER_BIT|xe.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new ie.y(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),fr(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_postStyleLoadEvent(){this.style.globalId&&wr(this._requestManager._customAccessToken,{map:this,skuToken:this._requestManager._skuToken,style:this.style.globalId,importedStyles:this.style.getImportGlobalIds()})}_updateTerrain(){const qe=this._isDragging();this.painter.updateTerrain(this.style,qe)}_calculateSpeedIndex(){const qe=this.painter.canvasCopy(),xe=this.painter.getCanvasCopiesAndTimestamps();xe.timeStamps.push(performance.now());const ke=this.painter.context.gl,He=ke.createFramebuffer();function ri(ai){ke.framebufferTexture2D(ke.FRAMEBUFFER,ke.COLOR_ATTACHMENT0,ke.TEXTURE_2D,ai,0);const vi=new Uint8Array(ke.drawingBufferWidth*ke.drawingBufferHeight*4);return ke.readPixels(0,0,ke.drawingBufferWidth,ke.drawingBufferHeight,ke.RGBA,ke.UNSIGNED_BYTE,vi),vi}return ke.bindFramebuffer(ke.FRAMEBUFFER,He),this._canvasPixelComparison(ri(qe),xe.canvasCopies.map(ri),xe.timeStamps)}_canvasPixelComparison(qe,xe,ke){let He=ke[1]-ke[0];const ri=qe.length/4;for(let ai=0;ai<xe.length;ai++){const vi=xe[ai];let Si=0;for(let Li=0;Li<vi.length;Li+=4)vi[Li]===qe[Li]&&vi[Li+1]===qe[Li+1]&&vi[Li+2]===qe[Li+2]&&vi[Li+3]===qe[Li+3]&&(Si+=1);He+=(ke[ai+2]-ke[ai+1])*(1-Si/ri)}return He}remove(){this._hash&&this._hash.remove();for(const xe of this._controls)xe.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this._domRenderTaskQueue.clear(),this.style&&this.style.destroy(),this.indoor.destroy(),this.painter.destroy(),this.handlers&&this.handlers.destroy(),this.handlers=void 0,this.setStyle(null),window.removeEventListener("resize",this._onWindowResize,!1),window.removeEventListener("orientationchange",this._onWindowResize,!1),window.removeEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),window.removeEventListener("online",this._onWindowOnline,!1),window.removeEventListener("visibilitychange",this._onVisibilityChange,!1);const qe=this.painter.context.gl.getExtension("WEBGL_lose_context");qe&&qe.loseContext(),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._missingCSSCanary.remove(),this._canvas=void 0,this._canvasContainer=void 0,this._controlContainer=void 0,this._missingCSSCanary=void 0,this._container.classList.remove("mapboxgl-map"),this._container.removeEventListener("scroll",this._onMapScroll,!1),xr.delete(this.painter.context.gl),er.remove(),Hi.remove(),this._removed=!0,this.fire(new ie.z("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(qe){this._renderNextFrame=this._renderNextFrame||qe,this.style&&!this._frame&&(this._frame=ie.q.frame(xe=>{const ke=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,ke&&this._render(xe)}))}_preloadTiles(qe){const xe=this.style?this.style.getSourceCaches():[];return ie.bl(xe,(ke,He)=>ke._preloadTiles(qe,He),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(qe){this._trackResize&&this.resize({originalEvent:qe})._update()}_onVisibilityChange(){document.visibilityState==="hidden"&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(qe){this._showTileBoundaries!==qe&&(this._showTileBoundaries=qe,this._tp.refreshUI(),this._update())}get showParseStatus(){return!!this._showParseStatus}set showParseStatus(qe){this._showParseStatus!==qe&&(this._showParseStatus=qe,this._tp.refreshUI(),this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(qe){this._showTerrainWireframe!==qe&&(this._showTerrainWireframe=qe,this._tp.refreshUI(),this._update())}get showLayers2DWireframe(){return!!this._showLayers2DWireframe}set showLayers2DWireframe(qe){this._showLayers2DWireframe!==qe&&(this._showLayers2DWireframe=qe,this._tp.refreshUI(),this._update())}get showLayers3DWireframe(){return!!this._showLayers3DWireframe}set showLayers3DWireframe(qe){this._showLayers3DWireframe!==qe&&(this._showLayers3DWireframe=qe,this._tp.refreshUI(),this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(qe){this._speedIndexTiming!==qe&&(this._speedIndexTiming=qe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(qe){this._showPadding!==qe&&(this._showPadding=qe,this._tp.refreshUI(),this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(qe){this._showCollisionBoxes!==qe&&(this._showCollisionBoxes=qe,this._tp.refreshUI(),qe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(qe){this._showOverdrawInspector!==qe&&(this._showOverdrawInspector=qe,this._tp.refreshUI(),this._update())}get repaint(){return!!this._repaint}set repaint(qe){this._repaint!==qe&&(this._repaint=qe,this._tp.refreshUI(),this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(qe){this._vertices=qe,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(qe){this._showTileAABBs!==qe&&(this._showTileAABBs=qe,this._tp.refreshUI(),qe&&this._update())}_setCacheLimits(qe,xe){ie.dG(qe,xe)}get version(){return ii}},NavigationControl:class{constructor(qe={}){this.options=ie.l({},Ia,qe),this._container=Ii("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",xe=>xe.preventDefault()),this.options.showZoom&&(ie.aP(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",xe=>{this._map&&this._map.zoomIn({},{originalEvent:xe})}),Ii("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",xe=>{this._map&&this._map.zoomOut({},{originalEvent:xe})}),Ii("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(ie.aP(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",xe=>{const ke=this._map;ke&&(this.options.visualizePitch?ke.resetNorthPitch({},{originalEvent:xe}):ke.resetNorth({},{originalEvent:xe}))}),this._compassIcon=Ii("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const qe=this._map;if(!qe)return;const xe=qe.getZoom(),ke=xe===qe.getMaxZoom(),He=xe===qe.getMinZoom();this._zoomInButton.disabled=ke,this._zoomOutButton.disabled=He,this._zoomInButton.setAttribute("aria-disabled",ke.toString()),this._zoomOutButton.setAttribute("aria-disabled",He.toString())}_rotateCompassArrow(){const qe=this._map;if(!qe)return;const xe=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(qe.transform.pitch*(Math.PI/180)),.5)}) rotateX(${qe.transform.pitch}deg) rotateZ(${qe.transform.angle*(180/Math.PI)}deg)`:`rotate(${qe.transform.angle*(180/Math.PI)}deg)`;qe._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=xe)})}onAdd(qe){return this._map=qe,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),qe.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&qe.on("pitch",this._rotateCompassArrow),qe.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new mu(qe,this._compass,this.options.visualizePitch)),this._container}onRemove(){const qe=this._map;qe&&(this._container.remove(),this.options.showZoom&&qe.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&qe.off("pitch",this._rotateCompassArrow),qe.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(qe,xe){const ke=Ii("button",qe,this._container);return ke.type="button",ke.addEventListener("click",xe),ke}_setButtonTitle(qe,xe){if(!this._map)return;const ke=this._map._getUIString(`NavigationControl.${xe}`);qe.setAttribute("aria-label",ke),qe.firstElementChild&&qe.firstElementChild.setAttribute("title",ke)}},GeolocateControl:class extends ie.E{constructor(qe={}){super();const xe=navigator.geolocation;this.options=ie.l({geolocation:xe},Fu,qe),ie.aP(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=od(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(qe){return this._map=qe,this._container=Ii("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){this._geolocationWatchID!==void 0&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(qe){const xe=(ke=!!this.options.geolocation)=>{this._supportsGeolocation=ke,qe(ke)};this._supportsGeolocation!==void 0?qe(this._supportsGeolocation):navigator.permissions!==void 0?navigator.permissions.query({name:"geolocation"}).then(ke=>xe(ke.state!=="denied")).catch(()=>xe()):xe()}_isOutOfMapMaxBounds(qe){const xe=this._map.getMaxBounds(),ke=qe.coords;return!!xe&&(ke.longitude<xe.getWest()||ke.longitude>xe.getEast()||ke.latitude<xe.getSouth()||ke.latitude>xe.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(qe){if(this._map){if(this._isOutOfMapMaxBounds(qe))return this._setErrorState(),this.fire(new ie.z("outofmaxbounds",qe)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=qe,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(qe),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(qe),this.options.showUserLocation&&this._userLocationDotMarker.removeClassName("mapboxgl-user-location-dot-stale"),this.fire(new ie.z("geolocate",qe)),this._finish()}}_updateCamera(qe){const xe=new ie.bO(qe.coords.longitude,qe.coords.latitude),ke=qe.coords.accuracy,He=this._map.getBearing(),ri=ie.l({bearing:He},this.options.fitBoundsOptions);this._map.fitBounds(xe.toBounds(ke),ri,{geolocateSource:!0})}_updateMarker(qe){if(qe){const xe=new ie.bO(qe.coords.longitude,qe.coords.latitude);this._accuracyCircleMarker.setLngLat(xe).addTo(this._map),this._userLocationDotMarker.setLngLat(xe).addTo(this._map),this._accuracy=qe.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const qe=this._map.transform,xe=ie.bH(1,qe._center.lat)*qe.worldSize,ke=Math.ceil(2*this._accuracy*xe);this._circleElement.style.width=`${ke}px`,this._circleElement.style.height=`${ke}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&typeof this._heading=="number"?(this._userLocationDotMarker.setRotation(this._heading),this._userLocationDotMarker.addClassName("mapboxgl-user-location-show-heading")):(this._userLocationDotMarker.removeClassName("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(qe){if(this._map){if(this.options.trackUserLocation)if(qe.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const xe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",xe),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",xe),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(qe.code===3&&this._noTimeout)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._userLocationDotMarker.addClassName("mapboxgl-user-location-dot-stale"),this.fire(new ie.z("error",qe)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(qe){if(this._map!==void 0){if(this._container.addEventListener("contextmenu",xe=>xe.preventDefault()),this._geolocateButton=Ii("button","mapboxgl-ctrl-geolocate",this._container),Ii("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",qe===!1){ie.w("Geolocation support is not available so the GeolocateControl will be disabled.");const xe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",xe),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",xe)}else{const xe=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",xe),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",xe)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=Ii("div","mapboxgl-user-location"),this._dotElement.appendChild(Ii("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(Ii("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new uf({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=Ii("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new uf({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",xe=>{xe.geolocateSource||this._watchState!=="ACTIVE_LOCK"||xe.originalEvent&&xe.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new ie.z("trackuserlocationend")))})}}_onDeviceOrientation(qe){this._userLocationDotMarker&&(qe.webkitCompassHeading?this._heading=qe.webkitCompassHeading:qe.absolute===!0&&(this._heading=-1*qe.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return ie.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new ie.z("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new ie.z("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new ie.z("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let qe;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(qe={maximumAge:6e5,timeout:0},this._noTimeout=!0):(qe=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,qe),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=window.setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const qe=()=>{"ondeviceorientationabsolute"in window?window.addEventListener("deviceorientationabsolute",this._onDeviceOrientation):window.addEventListener("deviceorientation",this._onDeviceOrientation)};typeof DeviceMotionEvent<"u"&&typeof DeviceMotionEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(xe=>{xe==="granted"&&qe()}).catch(console.error):qe()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),window.removeEventListener("deviceorientation",this._onDeviceOrientation),window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Ou,ScaleControl:class{constructor(qe={}){this.options=ie.l({},vu,qe),this._isNumberFormatSupported=function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch{return!1}}(),ie.aP(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const qe=this.options.maxWidth||100,xe=this._map,ke=xe._containerHeight/2,He=xe._containerWidth/2-qe/2,ri=xe.unproject([He,ke]),ai=xe.unproject([He+qe,ke]),vi=ri.distanceTo(ai);if(this.options.unit==="imperial"){const Si=3.2808*vi;Si>5280?this._setScale(qe,Si/5280,"mile"):this._setScale(qe,Si,"foot")}else this.options.unit==="nautical"?this._setScale(qe,vi/1852,"nautical-mile"):vi>=1e3?this._setScale(qe,vi/1e3,"kilometer"):this._setScale(qe,vi,"meter")}_setScale(qe,xe,ke){this._map._requestDomTask(()=>{const He=function(ai){const vi=Math.pow(10,`${Math.floor(ai)}`.length-1);let Si=ai/vi;return Si=Si>=10?10:Si>=5?5:Si>=3?3:Si>=2?2:Si>=1?1:function(Li){const Pi=Math.pow(10,Math.ceil(-Math.log(Li)/Math.LN10));return Math.round(Li*Pi)/Pi}(Si),vi*Si}(xe),ri=He/xe;this._container.innerHTML=this._isNumberFormatSupported&&ke!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:ke}).format(He):`${He}&nbsp;${As[ke]}`,this._container.style.width=qe*ri+"px"})}onAdd(qe){return this._map=qe,this._language=qe.getLanguage(),this._container=Ii("div","mapboxgl-ctrl mapboxgl-ctrl-scale",qe.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(qe){this._language=qe,this._update()}setUnit(qe){this.options.unit=qe,this._update()}},FullscreenControl:class{constructor(qe={}){this._fullscreen=!1,qe&&qe.container&&(qe.container instanceof HTMLElement?this._container=qe.container:ie.w("Full screen control 'container' must be a DOM element.")),ie.aP(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(qe){return this._map=qe,this._container||(this._container=this._map.getContainer()),this._controlContainer=Ii("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",ie.w("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)}_setupUI(){const qe=this._fullscreenButton=Ii("button","mapboxgl-ctrl-fullscreen",this._controlContainer);Ii("span","mapboxgl-ctrl-icon",qe).setAttribute("aria-hidden","true"),qe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const qe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",qe),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",qe)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(document.fullscreenElement||document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},Popup:class extends ie.E{constructor(qe){super(),this.options=ie.l(Object.create(xs),qe),ie.aP(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(qe&&qe.className?qe.className.trim().split(/\s+/):[])}addTo(qe){return this._map&&this.remove(),this._map=qe,this.options.closeOnClick&&qe.on("preclick",this._onClose),this.options.closeOnMove&&qe.on("move",this._onClose),qe.on("remove",this.remove),this._update(),qe._addPopup(this),this._focusFirstElement(),this._trackPointer?(qe.on("mousemove",this._onMouseEvent),qe.on("mouseup",this._onMouseEvent),qe._canvasContainer.classList.add("mapboxgl-track-pointer")):qe.on("move",this._update),this.fire(new ie.z("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const qe=this._map;return qe&&(qe.off("move",this._update),qe.off("move",this._onClose),qe.off("preclick",this._onClose),qe.off("click",this._onClose),qe.off("remove",this.remove),qe.off("mousemove",this._onMouseEvent),qe.off("mouseup",this._onMouseEvent),qe.off("drag",this._onMouseEvent),qe._canvasContainer&&qe._canvasContainer.classList.remove("mapboxgl-track-pointer"),qe._removePopup(this),this._map=void 0),this.fire(new ie.z("close")),this}getLngLat(){return this._lngLat}setLngLat(qe){this._lngLat=ie.bO.convert(qe),this._pos=null,this._trackPointer=!1,this._update();const xe=this._map;return xe&&(xe.on("move",this._update),xe.off("mousemove",this._onMouseEvent),xe._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const qe=this._map;return qe&&(qe.off("move",this._update),qe.on("mousemove",this._onMouseEvent),qe.on("drag",this._onMouseEvent),qe._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(qe){return this.setDOMContent(document.createTextNode(qe))}setHTML(qe){const xe=document.createDocumentFragment(),ke=document.createElement("body");let He;for(ke.innerHTML=qe;He=ke.firstChild,He;)xe.appendChild(He);return this.setDOMContent(xe)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(qe){return this.options.maxWidth=qe,this._update(),this}setDOMContent(qe){let xe=this._content;if(xe)for(;xe.hasChildNodes();)xe.firstChild&&xe.removeChild(xe.firstChild);else xe=this._content=Ii("div","mapboxgl-popup-content",this._container||void 0);if(xe.appendChild(qe),this.options.closeButton){const ke=this._closeButton=Ii("button","mapboxgl-popup-close-button",xe);ke.type="button",ke.setAttribute("aria-label","Close popup"),ke.setAttribute("aria-hidden","true"),ke.innerHTML="&#215;",ke.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(qe){return this._classList.add(qe),this._updateClassList(),this}removeClassName(qe){return this._classList.delete(qe),this._updateClassList(),this}setOffset(qe){return this.options.offset=qe,this._update(),this}toggleClassName(qe){let xe;return this._classList.delete(qe)?xe=!1:(this._classList.add(qe),xe=!0),this._updateClassList(),xe}_onMouseEvent(qe){this._update(qe.point)}_getAnchor(qe){if(this.options.anchor)return this.options.anchor;const xe=this._map,ke=this._container,He=this._pos;if(!xe||!ke||!He)return"bottom";const ri=ke.offsetWidth,ai=ke.offsetHeight,vi=He.x<ri/2,Si=He.x>xe.transform.width-ri/2;if(He.y+qe<ai)return vi?"top-left":Si?"top-right":"top";if(He.y>xe.transform.height-ai){if(vi)return"bottom-left";if(Si)return"bottom-right"}return vi?"left":Si?"right":"bottom"}_updateClassList(){const qe=this._container;if(!qe)return;const xe=[...this._classList];xe.push("mapboxgl-popup"),this._anchor&&xe.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&xe.push("mapboxgl-popup-track-pointer"),qe.className=xe.join(" ")}_update(qe){const xe=this._map,ke=this._content;if(!xe||!this._lngLat&&!this._trackPointer||!ke)return;let He=this._container;if(He||(He=this._container=Ii("div","mapboxgl-popup",xe.getContainer()),this._tip=Ii("div","mapboxgl-popup-tip",He),He.appendChild(ke)),this.options.maxWidth&&He.style.maxWidth!==this.options.maxWidth&&(He.style.maxWidth=this.options.maxWidth),xe.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=i0(this._lngLat,this._pos,xe.transform)),!this._trackPointer||qe){const ri=this._pos=this._trackPointer&&qe instanceof ie.P?qe:xe.project(this._lngLat),ai=em(this.options.offset),vi=this._anchor=this._getAnchor(ai.y),Si=em(this.options.offset,vi),Li=ri.add(Si).round();xe._requestDomTask(()=>{this._container&&vi&&(this._container.style.transform=`${up[vi]} translate(${Li.x}px,${Li.y}px)`)})}if(!this._marker&&xe._showingGlobe()){const ri=ie.dH(xe.transform,this._lngLat)?0:1;this._setOpacity(ri)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const qe=this._container.querySelector(Fs);qe&&qe.focus()}_onClose(){this.remove()}_setOpacity(qe){this._container&&(this._container.style.opacity=`${qe}`),this._content&&(this._content.style.pointerEvents=qe?"auto":"none")}},Marker:uf,Style:za,LngLat:ie.bO,LngLatBounds:ie.az,Point:ie.P,MercatorCoordinate:ie.aa,FreeCameraOptions:Oh,Evented:ie.E,config:ie.e,prewarm:ie.dM,clearPrewarmedResources:ie.dN,get accessToken(){return ie.e.ACCESS_TOKEN},set accessToken(qe){ie.e.ACCESS_TOKEN=qe},get baseApiUrl(){return ie.e.API_URL},set baseApiUrl(qe){ie.e.API_URL=qe},get workerCount(){return ie.dO.workerCount},set workerCount(qe){ie.dO.workerCount=qe},get maxParallelImageRequests(){return ie.e.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(qe){ie.e.MAX_PARALLEL_IMAGE_REQUESTS=qe},clearStorage(qe){ie.dP(qe)},get workerUrl(){return ie.dQ.workerUrl},set workerUrl(qe){ie.dQ.workerUrl=qe},get workerClass(){return ie.dQ.workerClass},set workerClass(qe){ie.dQ.workerClass=qe},get workerParams(){return ie.dQ.workerParams},set workerParams(qe){ie.dQ.workerParams=qe},get dracoUrl(){return ie.dR()},set dracoUrl(qe){ie.dS(qe)},get meshoptUrl(){return ie.dT()},set meshoptUrl(qe){ie.dU(qe)},setNow:ie.q.setNow,restoreNow:ie.q.restoreNow}});var Ze=Pe;return Ze})})(mapboxGl);const mapboxgl=getDefaultExportFromCjs$1(mapboxGl.exports);function debounce(m,c){let ne=null;const we=this;return()=>{clearTimeout(ne);var Pe=arguments;ne=setTimeout(()=>{m.apply(we,Pe)},c)}}const _hoisted_1$r={class:"map"},_sfc_main$A=vue.defineComponent({__name:"MapboxMap",props:{bounds:{},padding:{},mapboxAccessToken:{},mapboxStyle:{},projection:{},bearing:{},pitch:{},synchronousPrecision:{},ratio:{}},emits:["update:bounds"],setup(m,{emit:c}){const ne=m,we=c;function Pe(Ti){return{left:Ti[0],top:Ti[1],right:Ti[2],bottom:Ti[3]}}const Me=vue.ref(),{width:Ze,height:ie}=useElementBounding(Me);let ii;const di=()=>{ii?.fitBounds(ne.bounds,{padding:Pe(ne.padding),pitch:ne.pitch,bearing:ne.bearing})},li=()=>{if(Ci.value&&ii){const{x:Ti,y:Ii,width:Di,height:Zi}=Ci.value,Fi=ii.unproject([Ti+Di,Ii]),Ui=ii.unproject([Ti,Ii+Zi]);Ai.value=[Ui.lng,Ui.lat,Fi.lng,Fi.lat].map(Wi=>Number(Wi.toFixed(ne.synchronousPrecision)))}};vue.onMounted(()=>{ii=new mapboxgl.Map({container:Me.value,style:ne.mapboxStyle,bounds:ne.bounds,accessToken:ne.mapboxAccessToken,projection:ne.projection,bearing:ne.bearing,pitch:ne.pitch}),ii.on("render",li),ii.on("load",()=>{di()})}),vue.watch(()=>ne.mapboxStyle,()=>{ii?.setStyle(ne.mapboxStyle)}),vue.watch(()=>ne.projection,()=>{ii?.setProjection(ne.projection)}),vue.watch(()=>ne.bearing,()=>{ii?.setBearing(ne.bearing)}),vue.watch(()=>ne.pitch,()=>{ii?.setPitch(ne.pitch)}),vue.watch([()=>ne.bounds,()=>ne.padding],di);const mi=vue.computed(()=>Ze.value&&ie.value?Ze.value/ie.value:1),Ci=vue.computed(()=>{const Ti=Ze.value-ne.padding[0]-ne.padding[2],Ii=ie.value-ne.padding[1]-ne.padding[3];if(mi.value>=ne.ratio){const Di=Ii*ne.ratio;return{x:ne.padding[0]+(Ti-Di)/2,y:ne.padding[1]+0,width:Di,height:Ii}}else{const Di=Ti/ne.ratio;return{x:ne.padding[0]+0,y:ne.padding[1]+(Ii-Di)/2,width:Ti,height:Di}}}),Ai=vue.ref();return vue.watch(Ai,debounce(()=>{!isEqual(Ai.value,ne.bounds)&&Ai.value&&we("update:bounds",Ai.value)},100)),(Ti,Ii)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$r,[vue.createElementVNode("div",{ref_key:"mapboxMapRef",ref:Me,class:"mapbox-map"},null,512),Ci.value?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"layer",style:vue.normalizeStyle({"--x":`${Ci.value.x}px`,"--y":`${Ci.value.y}px`,"--width":`${Ci.value.width}px`,"--height":`${Ci.value.height}px`})},[vue.renderSlot(Ti.$slots,"layer",{bounds:Ai.value,bbox:Ci.value,map:vue.unref(ii)},void 0,!0)],4)):vue.createCommentVNode("",!0)]))}}),MapboxMap_vue_vue_type_style_index_0_scoped_8f6ef37a_lang="",MapboxMap=_export_sfc(_sfc_main$A,[["__scopeId","data-v-8f6ef37a"]]),_hoisted_1$q={class:"preview-image"},_hoisted_2$i=["src"],_hoisted_3$b={class:"map-wrapper"},_sfc_main$z=vue.defineComponent({__name:"Map",props:{modelValue:{},padding:{default:0},mapStyle:{default:"mapbox://styles/mapbox/streets-v11"},mapboxAccessToken:{},type:{default:"popup"},aspectRatio:{}},emits:["update:model-value"],setup(m,{emit:c}){const ne=m,we=c,Pe=vue.ref(),{width:Me}=useElementBounding(Pe),Ze=vue.ref(!1);vue.watch(Ze,()=>{Ze.value||(ie.value=ii.value,we("update:model-value",ie.value))});const ie=vue.ref(ne.modelValue),ii=vue.ref(ne.modelValue),di=debounce(Ci=>{ii.value=Ci,ne.type==="inline"&&we("update:model-value",ii.value)},500);function li(){const Ci=ne.mapStyle?.replace("mapbox://styles/",""),Ai=Math.round(Me.value??200);return`https://api.mapbox.com/styles/v1/${Ci}/static/[${ie.value.join(",")}]/${Ai}x${Math.round(Ai/ne.aspectRatio)}@2x?access_token=${ne.mapboxAccessToken}`}const mi=vue.ref(li());return vue.watch(ie,debounce(()=>{mi.value=li()},500)),(Ci,Ai)=>(vue.openBlock(),vue.createElementBlock("div",{ref_key:"mapFieldRef",ref:Pe,class:vue.normalizeClass(["field-map",{["type-"+Ci.type]:!0}]),style:vue.normalizeStyle({"--aspect-ratio":Ci.aspectRatio})},[Ci.type==="inline"?(vue.openBlock(),vue.createBlock(MapboxMap,{key:0,bounds:Ci.modelValue,"onUpdate:bounds":vue.unref(di),bearing:0,pitch:0,"mapbox-access-token":Ci.mapboxAccessToken,"mapbox-style":Ci.mapStyle,padding:[Ci.padding,Ci.padding,Ci.padding,Ci.padding],projection:{name:"globe"},ratio:Ci.aspectRatio,"synchronous-precision":8},{layer:vue.withCtx(({bounds:Ti,map:Ii,bbox:Di})=>[Ti&&Ii?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"layer-wrapper",style:vue.normalizeStyle({"--x":`${Ii.project([Ti[0],Ti[1]]).x}px`,"--y":`${Ii.project([Ti[2],Ti[3]]).y}px`,"--width":`${Ii.project([Ti[2],Ti[3]]).x-Ii.project([Ti[0],Ti[1]]).x}px`,"--height":`${Ii.project([Ti[0],Ti[1]]).y-Ii.project([Ti[2],Ti[3]]).y}px`})},Ai[1]||(Ai[1]=[vue.createElementVNode("div",{class:"overlay"},null,-1),vue.createElementVNode("div",{class:"viewport-border"},null,-1)]),4)):vue.createCommentVNode("",!0)]),_:1},8,["bounds","onUpdate:bounds","mapbox-access-token","mapbox-style","padding","ratio"])):(vue.openBlock(),vue.createBlock(_sfc_main$17,{key:1,type:"layer",transculent:"",show:Ze.value,"onUpdate:show":Ai[0]||(Ai[0]=Ti=>Ze.value=Ti)},{trigger:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$q,[vue.createElementVNode("img",{src:mi.value},null,8,_hoisted_2$i)])]),"close-btn":vue.withCtx(()=>[vue.createVNode(BxButton,{round:"",tertiary:"",class:"close-btn"},{default:vue.withCtx(()=>Ai[2]||(Ai[2]=[vue.createTextVNode(" Done ")])),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_3$b,[vue.createVNode(MapboxMap,{bounds:Ci.modelValue,"onUpdate:bounds":vue.unref(di),bearing:0,pitch:0,"mapbox-access-token":Ci.mapboxAccessToken,"mapbox-style":Ci.mapStyle,padding:[Ci.padding,Ci.padding,Ci.padding,Ci.padding],projection:{name:"globe"},ratio:Ci.aspectRatio,"synchronous-precision":8},{layer:vue.withCtx(({bounds:Ti,map:Ii,bbox:Di})=>[Ti&&Ii?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"layer-wrapper",style:vue.normalizeStyle({"--x":`${Ii.project([Ti[0],Ti[1]]).x}px`,"--y":`${Ii.project([Ti[2],Ti[3]]).y}px`,"--width":`${Ii.project([Ti[2],Ti[3]]).x-Ii.project([Ti[0],Ti[1]]).x}px`,"--height":`${Ii.project([Ti[0],Ti[1]]).y-Ii.project([Ti[2],Ti[3]]).y}px`})},Ai[3]||(Ai[3]=[vue.createElementVNode("div",{class:"overlay"},null,-1),vue.createElementVNode("div",{class:"viewport-border"},null,-1),vue.createElementVNode("div",{class:"marker"},[vue.createElementVNode("svg",{version:"1.0",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 64 64","enable-background":"new 0 0 64 64","xml:space":"preserve"},[vue.createElementVNode("path",{d:"M32,0C18.746,0,8,10.746,8,24c0,5.219,1.711,10.008,4.555,13.93c0.051,0.094,0.059,0.199,0.117,0.289l16,24 C29.414,63.332,30.664,64,32,64s2.586-0.668,3.328-1.781l16-24c0.059-0.09,0.066-0.195,0.117-0.289C54.289,34.008,56,29.219,56,24 C56,10.746,45.254,0,32,0z M32,32c-4.418,0-8-3.582-8-8s3.582-8,8-8s8,3.582,8,8S36.418,32,32,32z"})])],-1)]),4)):vue.createCommentVNode("",!0)]),_:1},8,["bounds","onUpdate:bounds","mapbox-access-token","mapbox-style","padding","ratio"])])]),_:1},8,["show"]))],6))}}),Map_vue_vue_type_style_index_0_scoped_2e4a6276_lamng_scss_lang="",Map_vue_vue_type_style_index_1_lang="",Map$1=_export_sfc(_sfc_main$z,[["__scopeId","data-v-2e4a6276"]]),_hoisted_1$p={class:"field-color"},_sfc_main$y=vue.defineComponent({__name:"Color",props:vue.mergeModels({alpha:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const c=vue.useModel(m,"modelValue");return(ne,we)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$p,[vue.withDirectives(vue.createElementVNode("input",{type:"color","onUpdate:modelValue":we[0]||(we[0]=Pe=>c.value=Pe)},null,512),[[vue.vModelText,c.value]])]))}}),Color_vue_vue_type_style_index_0_scoped_14e2dc54_lang="",Color$1=_export_sfc(_sfc_main$y,[["__scopeId","data-v-14e2dc54"]]);function e$1(m,c,ne=1e3,we){let Pe,Me=0;const Ze=()=>{Pe&&clearTimeout(Pe)};return vue.watch(m,async(ie,ii)=>{we&&we(ie,ii);const di=()=>(Ze(),Me=Date.now(),c(ie,ii)),li=Date.now()-Me;li>=ne?di():(Ze(),Pe=setTimeout(di,ne-li))})}const _sfc_main$x=vue.defineComponent({__name:"BxSlider",props:vue.mergeModels({min:{},max:{},step:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const c=vue.inject("darkmode"),ne=vue.useModel(m,"modelValue"),we=m,Pe=vue.ref(),{left:Me,width:Ze}=useElementBounding(Pe),ie=vue.computed(()=>isNaN(ne.value)?we.min:Math.min(we.max,Math.max(we.min,ne.value))),ii=vue.computed(()=>we.max-we.min),di=vue.computed(()=>(ie.value-we.min)/ii.value),li=vue.ref();function mi(Ii){if(Ii.preventDefault(),Ii.target?.closest(".slider-thumb"))Ii.type==="mousedown"?li.value={x:Ii.clientX,value:ie.value}:li.value={x:Ii.touches[0].clientX,value:ie.value};else{const Di=Ii.type==="mousedown"?Ii.clientX:Ii.touches[0].clientX,Ui=(Di-Me.value)/Ze.value*ii.value,Wi=we.min+Ui;ne.value=Math.min(we.max,Math.max(we.min,Wi-Wi%we.step)),li.value={x:Di,value:Wi}}}const Ci=vue.ref({x:0,y:0});e$1(()=>Ci.value,()=>{if(!li.value)return;const Zi=(li.value.x-Ci.value.x)/Ze.value*ii.value,Fi=li.value.value-Zi;ne.value=Math.min(we.max,Math.max(we.min,Fi-Fi%we.step))},16,()=>{});function Ai(Ii){!li.value||(Ii.preventDefault(),Ii.type==="mousemove"?Ci.value={x:Ii.clientX,y:Ii.clientY}:Ci.value={x:Ii.touches[0].clientX,y:Ii.touches[0].clientY})}function Ti(Ii){li.value&&Ii.preventDefault(),li.value=void 0}return window.addEventListener("mousemove",Ai),window.addEventListener("mouseup",Ti),window.addEventListener("touchmove",Ai),window.addEventListener("touchend",Ti),vue.onUnmounted(()=>{window.removeEventListener("mousemove",Ai),window.removeEventListener("mouseup",Ti),window.removeEventListener("touchmove",Ai),window.removeEventListener("touchend",Ti)}),(Ii,Di)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["bx-slider swiper-no-swiping",{darkmode:vue.unref(c)}]),style:vue.normalizeStyle({"--value-relative":di.value}),onMousedown:mi,onTouchstart:mi},[vue.createElementVNode("div",{class:"slider-body",ref_key:"sliderBodyRef",ref:Pe},Di[0]||(Di[0]=[vue.createElementVNode("div",{class:"slider-value"},null,-1)]),512),Di[1]||(Di[1]=vue.createElementVNode("div",{class:"slider-thumb"},null,-1))],38))}}),BxSlider_vue_vue_type_style_index_0_scoped_27197875_lang="",BxSlider=_export_sfc(_sfc_main$x,[["__scopeId","data-v-27197875"]]),_hoisted_1$o={class:"field-number"},_hoisted_2$h=["min","max","step"],_sfc_main$w=vue.defineComponent({__name:"Number",props:vue.mergeModels({min:{},max:{},step:{},type:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const c=vue.useModel(m,"modelValue"),ne=vue.computed({get(){return Number(c.value)},set(we){c.value=Number(we)}});return(we,Pe)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$o,[we.type==="slider"?(vue.openBlock(),vue.createBlock(BxSlider,{key:0,type:"range",modelValue:ne.value,"onUpdate:modelValue":Pe[0]||(Pe[0]=Me=>ne.value=Me),min:we.min,max:we.max,step:we.step},null,8,["modelValue","min","max","step"])):vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{key:1,type:"number","onUpdate:modelValue":Pe[1]||(Pe[1]=Me=>ne.value=Me),min:we.min,max:we.max,step:we.step},null,8,_hoisted_2$h)),[[vue.vModelText,ne.value]])]))}}),Number_vue_vue_type_style_index_0_scoped_7b17f563_lang="",Number$1=_export_sfc(_sfc_main$w,[["__scopeId","data-v-7b17f563"]]),_hoisted_1$n={key:0,class:"select-dropdown-wrapper"},_hoisted_2$g=["onClick"],_hoisted_3$a={class:"preview-wrapper"},_hoisted_4$6={key:0,class:"label-wrapper"},_sfc_main$v=vue.defineComponent({__name:"SelectItem",props:vue.mergeModels({options:{},layout:{},size:{},showLabels:{type:Boolean},mobile:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const c=vue.useModel(m,"modelValue"),ne=m;vue.useSlots();const we=vue.computed(()=>ne.options.map(Pe=>({label:Pe.label,value:Pe.value,icon:Pe.image?()=>vue.h("img",{src:Pe.image,style:{"object-fit":"cover",width:"19px",height:"19px"}}):void 0})));return(Pe,Me)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["select-item-wrapper",{[`size-${Pe.size}`]:!0,["swiper-no-swiping"]:Pe.mobile&&Pe.layout==="carroussel"}])},[Pe.layout==="dropdown"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$n,[vue.createVNode(BxSelect,{modelValue:c.value,"onUpdate:modelValue":Me[0]||(Me[0]=Ze=>c.value=Ze),options:we.value,"placeholder-active-label":"Select option"},null,8,["modelValue","options"])])):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(["select-buttons-wrapper",{carroussel:Pe.layout==="carroussel"}])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(Pe.options,Ze=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["select-option-button",{selected:Ze.value===c.value}]),onClick:ie=>c.value=Ze.value},[vue.createElementVNode("div",_hoisted_3$a,[vue.renderSlot(Pe.$slots,"preview",{option:Ze,selected:c.value===Ze.value},void 0,!0)]),Ze.label?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$6,vue.toDisplayString(Ze.label),1)):vue.createCommentVNode("",!0)],10,_hoisted_2$g))),256))],2))],2))}}),SelectItem_vue_vue_type_style_index_0_scoped_0aeb4f24_lang="",SelectItem=_export_sfc(_sfc_main$v,[["__scopeId","data-v-0aeb4f24"]]),_hoisted_1$m={class:"select-text-field"},_sfc_main$u=vue.defineComponent({__name:"SelectText",props:vue.mergeModels({options:{},layout:{},imageDisplay:{},showLabels:{type:Boolean},size:{},mobile:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const c=vue.useModel(m,"modelValue"),ne=m,we=vue.computed(()=>ne.layout==="button"&&ne.mobile?"carroussel":ne.layout);return(Pe,Me)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$m,[vue.createVNode(SelectItem,{modelValue:c.value,"onUpdate:modelValue":Me[0]||(Me[0]=Ze=>c.value=Ze),options:Pe.options,layout:we.value,"image-display":Pe.imageDisplay,"show-labels":Pe.showLabels,size:Pe.size,mobile:Pe.mobile},null,8,["modelValue","options","layout","image-display","show-labels","size","mobile"])]))}}),SelectText_vue_vue_type_style_index_0_scoped_cb108a08_lang="",SelectText=_export_sfc(_sfc_main$u,[["__scopeId","data-v-cb108a08"]]),_sfc_main$t=vue.defineComponent({__name:"SelectColor",props:vue.mergeModels({options:{},layout:{},imageDisplay:{},showLabels:{type:Boolean},size:{},mobile:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const c=vue.useModel(m,"modelValue"),ne=useDarkmode(),we=m,Pe=vue.computed(()=>we.layout==="button"&&we.mobile?"carroussel":we.layout),Me=vue.computed(()=>we.layout==="dropdown"?we.options.map(Ze=>({label:Ze.label||Ze.value,value:Ze.value,image:`data:image/svg+xml;base64,${window.btoa(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50%" cy="50%" r="50%" style="fill: ${Ze.image};" /></svg>`)}`})):we.options);return(Ze,ie)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["select-color-field",{darkmode:vue.unref(ne)}])},[vue.createVNode(SelectItem,{modelValue:c.value,"onUpdate:modelValue":ie[0]||(ie[0]=ii=>c.value=ii),options:Me.value,layout:Pe.value,"image-display":Ze.imageDisplay,"show-labels":Ze.showLabels,size:Ze.size,mobile:Ze.mobile},{preview:vue.withCtx(({option:ii,selected:di})=>[vue.createElementVNode("div",{class:vue.normalizeClass(["preview-color",{selected:di}]),style:vue.normalizeStyle({"--color":ii.image||ii.value})},null,6)]),_:1},8,["modelValue","options","layout","image-display","show-labels","size","mobile"])],2))}}),SelectColor_vue_vue_type_style_index_0_scoped_eb8315a9_lang="",SelectColor=_export_sfc(_sfc_main$t,[["__scopeId","data-v-eb8315a9"]]),_hoisted_1$l=["src"],_sfc_main$s=vue.defineComponent({__name:"SelectImage",props:vue.mergeModels({options:{},layout:{},imageDisplay:{},showLabels:{type:Boolean},size:{},mobile:{type:Boolean,default:!1}},{modelValue:{required:!0,default:()=>({src:"https://picsum.photos/536/354",scale:1,innerPos:[0,0],innerRotate:0})},modelModifiers:{}}),emits:["update:modelValue"],setup(m){const c=useDarkmode(),ne=vue.useModel(m,"modelValue"),we=m,Pe=vue.computed(()=>we.layout==="button"&&we.mobile?"carroussel":we.layout),Me=vue.computed({get(){return typeof ne.value=="string"?ne.value:ne.value.src},set(Ze){typeof ne.value=="string"?ne.value=Ze:ne.value={...ne.value,src:Ze}}});return(Ze,ie)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["select-image-field",{mobile:Ze.mobile,darkmode:vue.unref(c)}])},[vue.createVNode(SelectItem,{modelValue:Me.value,"onUpdate:modelValue":ie[0]||(ie[0]=ii=>Me.value=ii),options:Ze.options,layout:Pe.value,"image-display":Ze.imageDisplay,"show-labels":Ze.showLabels,size:Ze.size,mobile:Ze.mobile},{preview:vue.withCtx(({option:ii,selected:di})=>[vue.createElementVNode("img",{class:vue.normalizeClass(["preview-image",{[`image-display-${Ze.imageDisplay}`]:!0,selected:di}]),src:ii.image},null,10,_hoisted_1$l)]),_:1},8,["modelValue","options","layout","image-display","show-labels","size","mobile"])],2))}}),SelectImage_vue_vue_type_style_index_0_scoped_d55f1edb_lang="",SelectImage=_export_sfc(_sfc_main$s,[["__scopeId","data-v-d55f1edb"]]),style$1="",_hoisted_1$k={key:0,class:"info-symbol-wrapper"},_hoisted_2$f={class:"instruction-text"},_hoisted_3$9={class:"detailed-description-text"},_sfc_main$r=vue.defineComponent({__name:"Instruction",props:{instruction:{},description:{},detailedDescription:{}},setup(m){const c=useDarkmode();return(ne,we)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["instruction-field",{darkmode:vue.unref(c)}])},[ne.description===void 0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$k,[vue.createVNode(BxIcon,null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(InformationCircleOutline))]),_:1})])):vue.createCommentVNode("",!0),vue.createElementVNode("main",null,[vue.createElementVNode("div",_hoisted_2$f,vue.toDisplayString(ne.instruction),1),vue.createElementVNode("div",_hoisted_3$9,vue.toDisplayString(ne.detailedDescription),1)])],2))}}),Instruction_vue_vue_type_style_index_0_scoped_d63c188c_lang="",Instruction=_export_sfc(_sfc_main$r,[["__scopeId","data-v-d63c188c"]]),BluepciFieldComponents=Object.freeze(Object.defineProperty({__proto__:null,ImageEdit,Image:Image$1,Group,Text,ImageAdjust,Select,Checkbox,Collection,Map:Map$1,Color:Color$1,Number:Number$1,SelectText,SelectColor,SelectImage,Instruction},Symbol.toStringTag,{value:"Module"})),_hoisted_1$j={class:"inner"},_hoisted_2$e={key:1},_sfc_main$q=vue.defineComponent({__name:"FieldsList",props:{layout:{default:"list"},fields:{},isRoot:{type:Boolean}},setup(m){const c=vue.inject("darkmode"),ne=m,we=vue.inject("bridge"),Pe=vue.inject("data"),Me=vue.inject("computedPropEvaluator");Me||console.error("computedPropEvaluator is not provided");const Ze=di=>{if("pos"in di&&"scale"in di){const mi=di.image,Ci=di.pos,Ai=di.scale;return{image:Pe.value[mi],"onUpdate:image":Ii=>{Pe.value[mi]=Ii},adjust:{scale:Pe.value[Ai],innerPos:Pe.value[Ci]},"onUpdate:adjust":Ii=>{Pe.value[Ai]=Ii.scale,Pe.value[Ci]=Ii.innerPos}}}return{...Object.fromEntries(Object.entries(di).map(([mi,Ci])=>[mi,Pe.value[Ci]])),...Object.fromEntries(Object.entries(di).map(([mi])=>[`onUpdate:${mi}`,Ci=>{Pe.value[di[mi]]=Ci}]))}};function ie(di){return Object.fromEntries(Object.entries(di).map(([li,mi])=>typeof mi=="function"?[li,Me(mi)]:[li,mi]))}const ii=di=>{const li=ne.fields.indexOf(di),mi=ne.fields.slice(0,li).filter(Ci=>Ci.type==="Instruction");return li-mi.length+1};return(di,li)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["bluepic-fields",{["layout-"+di.layout]:!0,darkmode:vue.unref(c)}])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(di.fields,(mi,Ci)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["field",{"is-root":di.isRoot,["field-type-"+mi.type.toLowerCase()]:!0,"field-has-card":mi.type==="Group"&&mi.props.card}]),style:vue.normalizeStyle({"--min-width":mi.layout?.minWidth,"--max-width":mi.layout?.maxWidth})},[mi.type!=="Group"&&mi.description?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(["description",{"no-detailed-description":!mi.detailedDescription,"text-overlaying-description":!di.isRoot&&mi.type==="Text"}])},[vue.createElementVNode("div",_hoisted_1$j,[di.isRoot?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(["root-index",{}])},[mi.type==="Instruction"?(vue.openBlock(),vue.createBlock(BxIcon,{key:0},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(InformationOutline))]),_:1})):(vue.openBlock(),vue.createElementBlock("span",_hoisted_2$e,vue.toDisplayString(ii(mi)),1))])):vue.createCommentVNode("",!0),vue.createElementVNode("span",null,vue.toDisplayString(mi.description),1),mi.detailedDescription&&mi.type!=="Instruction"?(vue.openBlock(),vue.createBlock(BxTooltip,{key:1,trigger:"hover",darkmode:vue.unref(c)},{trigger:vue.withCtx(()=>[vue.createVNode(BxIcon,null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(HelpOutline))]),_:1})]),content:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(mi.detailedDescription),1)]),_:2},1032,["darkmode"])):vue.createCommentVNode("",!0)])],2)):vue.createCommentVNode("",!0),(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(BluepciFieldComponents[mi.type]),vue.mergeProps({bridge:vue.unref(we),index:Ci,"is-root":di.isRoot,ref_for:!0},{...ie(mi.props),...Ze(mi.model),field:mi,description:mi.description,detailedDescription:mi.detailedDescription,...(()=>{if(mi.type==="Text")return{...mi.layout}})()}),null,16,["bridge","index","is-root"]))],6))),256))],2))}}),FieldsList_vue_vue_type_style_index_0_scoped_d180b0a4_lang="",FieldsList=_export_sfc(_sfc_main$q,[["__scopeId","data-v-d180b0a4"]]),_hoisted_1$i={class:"bx-fields"},_sfc_main$p=vue.defineComponent({__name:"Fields",props:{fields:{}},setup(m){return(c,ne)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$i,[vue.createVNode(FieldsList,{fields:c.fields,"is-root":""},null,8,["fields"])]))}}),_sfc_main$o=vue.defineComponent({__name:"PopupProvider",setup(m,{expose:c}){const ne=vue.ref([]);function we(li,mi,Ci){ne.value.push({id:li,render:mi,type:Ci.type,close:Ci.close,handleClickOutside:Ci.handleClickOutside,disableBackgroundEffect:Ci.disableBackgroundEffect,wrapperCustomClasses:Ci.wrapperCustomClasses})}function Pe(li){const mi=ne.value.findIndex(Ci=>Ci.id===li);mi!==-1&&ne.value.splice(mi,1)}function Me(li){return ne.value.some(mi=>mi.id===li)}const Ze=vue.computed(()=>ne.value.length>0),ie=vue.ref(["a","b","c"]);window.tPush=()=>ie.value.push("d"),window.tPull=()=>ie.value=ie.value.slice(0,-1);const ii=vue.computed(()=>ne.value.filter(li=>!li.disableBackgroundEffect));vue.watch([Ze,ii],()=>{const li=document.querySelector(GLOBAL_APP_WRAPPER_SELECTOR);!li||(Ze.value&&ii.value.length>0&&li.classList.add("bluepic-popup-app-wrapper-in-background"),Ze.value||li.classList.remove("bluepic-popup-app-wrapper-in-background"))});function di(li){li.close()}return c({isVisible:Me,push:we,pull:Pe}),(li,mi)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["bluepic-popup-provider",{visible:Ze.value}])},[vue.createVNode(vue.TransitionGroup,{name:"slide-popup-element"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(ne.value,(Ci,Ai)=>(vue.openBlock(),vue.createElementBlock("div",{key:Ci.id,class:vue.normalizeClass(["popup-wrapper",{["type-"+Ci.type]:!0,...Object.fromEntries(Ci.wrapperCustomClasses.map(Ti=>[Ti,!0]))}])},[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(Ci.render),{onClickOutside:Ti=>di(Ci),onClose:Ci.close,style:vue.normalizeStyle({"--level":-(Ai-(ne.value.length-1))})},null,40,["onClickOutside","onClose","style"]))],2))),128))]),_:1})],2))}}),PopupProvider_vue_vue_type_style_index_0_scoped_bc5c5238_lang="",PopupProvider=_export_sfc(_sfc_main$o,[["__scopeId","data-v-bc5c5238"]]),_sfc_main$n=vue.defineComponent({__name:"PopoverProvider",setup(m,{expose:c}){const ne=vue.ref([]),we=vue.computed(()=>ne.value.length>0);function Pe(ii,di,li){ne.value.push({id:ii,render:di,darkenBackground:li.darkenBackground,handleClickOutside:li.handleClickOutside})}function Me(ii){console.log("pull",ii);const di=ne.value.findIndex(li=>li.id===ii);di!==-1&&ne.value.splice(di,1)}function Ze(ii){return ne.value.some(di=>di.id===ii)}vue.watch(we,()=>{});function ie(ii){ii.handleClickOutside()}return c({isVisible:Ze,push:Pe,pull:Me}),(ii,di)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["bluepic-popover-provider",{visible:we.value,"darken-background":ne.value.filter(li=>li.darkenBackground).length>0}])},[vue.createVNode(vue.TransitionGroup,{name:"show-popover-element"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(ne.value,(li,mi)=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(li.render),{key:li.id,onClickOutside:Ci=>ie(li)},null,40,["onClickOutside"]))),128))]),_:1})],2))}}),PopoverProvider_vue_vue_type_style_index_0_scoped_c7215d57_lang="",PopoverProvider=_export_sfc(_sfc_main$n,[["__scopeId","data-v-c7215d57"]]);class BluepicPopupProvider{popupProviderRef;popoverProviderRef;constructor(){const c=document.createElement("div");c.classList.add("bluepic-popup-provider__wrapper");const ne=document.createElement("style");ne.setAttribute("type","text/css"),ne.setAttribute("data-bluepic-popup-app-wrapper","true"),ne.innerHTML=`
2513
2513
  .bluepic-popup-body {
2514
2514
 
2515
2515
  }
@@ -2592,7 +2592,7 @@ return new Buffer$C(Ze,"base64").toString("binary")}:typeof c.base64js=="object"
2592
2592
  * MIT Licensed
2593
2593
  */(function(m){var c=mimeDb.exports,ne=pathBrowserify.extname,we=/^\s*([^;\s]*)(?:;|\s|$)/,Pe=/^text\//i;m.charset=Me,m.charsets={lookup:Me},m.contentType=Ze,m.extension=ie,m.extensions=Object.create(null),m.lookup=ii,m.types=Object.create(null),di(m.extensions,m.types);function Me(li){if(!li||typeof li!="string")return!1;var mi=we.exec(li),Ci=mi&&c[mi[1].toLowerCase()];return Ci&&Ci.charset?Ci.charset:mi&&Pe.test(mi[1])?"UTF-8":!1}function Ze(li){if(!li||typeof li!="string")return!1;var mi=li.indexOf("/")===-1?m.lookup(li):li;if(!mi)return!1;if(mi.indexOf("charset")===-1){var Ci=m.charset(mi);Ci&&(mi+="; charset="+Ci.toLowerCase())}return mi}function ie(li){if(!li||typeof li!="string")return!1;var mi=we.exec(li),Ci=mi&&m.extensions[mi[1].toLowerCase()];return!Ci||!Ci.length?!1:Ci[0]}function ii(li){if(!li||typeof li!="string")return!1;var mi=ne("x."+li).toLowerCase().substr(1);return mi&&m.types[mi]||!1}function di(li,mi){var Ci=["nginx","apache",void 0,"iana"];Object.keys(c).forEach(function(Ti){var Ii=c[Ti],Di=Ii.extensions;if(!(!Di||!Di.length)){li[Ti]=Di;for(var Zi=0;Zi<Di.length;Zi++){var Fi=Di[Zi];if(mi[Fi]){var Ui=Ci.indexOf(c[mi[Fi]].source),Wi=Ci.indexOf(Ii.source);if(mi[Fi]!=="application/octet-stream"&&(Ui>Wi||Ui===Wi&&mi[Fi].substr(0,12)==="application/"))continue}mi[Fi]=Ti}}})}})(mimeTypes),"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(m,c,ne){const we=Number(0xffffffffn&c),Pe=Number(c>>32n);this.setUint32(m+(ne?0:4),we,ne),this.setUint32(m+(ne?4:0),Pe,ne)}});var e=m=>new DataView(new ArrayBuffer(m)),n=m=>new Uint8Array(m.buffer||m),t=m=>new TextEncoder().encode(String(m)),i=m=>Math.min(4294967295,Number(m)),r=m=>Math.min(65535,Number(m));function o(m,c,ne){c===void 0||c instanceof Date||(c=new Date(c));const we=m!==void 0;if(ne||(ne=we?436:509),m instanceof File)return{isFile:we,t:c||new Date(m.lastModified),bytes:m.stream(),mode:ne};if(m instanceof Response)return{isFile:we,t:c||new Date(m.headers.get("Last-Modified")||Date.now()),bytes:m.body,mode:ne};if(c===void 0)c=new Date;else if(isNaN(c))throw new Error("Invalid modification date.");if(!we)return{isFile:we,t:c,mode:ne};if(typeof m=="string")return{isFile:we,t:c,bytes:t(m),mode:ne};if(m instanceof Blob)return{isFile:we,t:c,bytes:m.stream(),mode:ne};if(m instanceof Uint8Array||m instanceof ReadableStream)return{isFile:we,t:c,bytes:m,mode:ne};if(m instanceof ArrayBuffer||ArrayBuffer.isView(m))return{isFile:we,t:c,bytes:n(m),mode:ne};if(Symbol.asyncIterator in m)return{isFile:we,t:c,bytes:f(m[Symbol.asyncIterator]()),mode:ne};throw new TypeError("Unsupported input format.")}function f(m,c=m){return new ReadableStream({async pull(ne){let we=0;for(;ne.desiredSize>we;){const Pe=await m.next();if(!Pe.value){ne.close();break}{const Me=a(Pe.value);ne.enqueue(Me),we+=Me.byteLength}}},cancel(ne){c.throw?.(ne)}})}function a(m){return typeof m=="string"?t(m):m instanceof Uint8Array?m:n(m)}function s(m,c,ne){let[we,Pe]=function(Me){return Me?Me instanceof Uint8Array?[Me,1]:ArrayBuffer.isView(Me)||Me instanceof ArrayBuffer?[n(Me),1]:[t(Me),0]:[void 0,0]}(c);if(m instanceof File)return{i:d(we||t(m.name)),o:BigInt(m.size),u:Pe};if(m instanceof Response){const Me=m.headers.get("content-disposition"),Ze=Me&&Me.match(/;\s*filename\*?\s*=\s*(?:UTF-\d+''|)["']?([^;"'\r\n]*)["']?(?:;|$)/i),ie=Ze&&Ze[1]||m.url&&new URL(m.url).pathname.split("/").findLast(Boolean),ii=ie&&decodeURIComponent(ie),di=ne||+m.headers.get("content-length");return{i:d(we||t(ii)),o:BigInt(di),u:Pe}}return we=d(we,m!==void 0||ne!==void 0),typeof m=="string"?{i:we,o:BigInt(t(m).length),u:Pe}:m instanceof Blob?{i:we,o:BigInt(m.size),u:Pe}:m instanceof ArrayBuffer||ArrayBuffer.isView(m)?{i:we,o:BigInt(m.byteLength),u:Pe}:{i:we,o:u(m,ne),u:Pe}}function u(m,c){return c>-1?BigInt(c):m?void 0:0n}function d(m,c=1){if(!m||m.every(ne=>ne===47))throw new Error("The file must have a name.");if(c)for(;m[m.length-1]===47;)m=m.subarray(0,-1);else m[m.length-1]!==47&&(m=new Uint8Array([...m,47]));return m}var l=new Uint32Array(256);for(let m=0;m<256;++m){let c=m;for(let ne=0;ne<8;++ne)c=c>>>1^(1&c&&3988292384);l[m]=c}function y(m,c=0){c=~c;for(var ne=0,we=m.length;ne<we;ne++)c=c>>>8^l[255&c^m[ne]];return~c>>>0}function w(m,c,ne=0){const we=m.getSeconds()>>1|m.getMinutes()<<5|m.getHours()<<11,Pe=m.getDate()|m.getMonth()+1<<5|m.getFullYear()-1980<<9;c.setUint16(ne,we,1),c.setUint16(ne+2,Pe,1)}function B({i:m,u:c},ne){return 8*(!c||(ne??function(we){try{b.decode(we)}catch{return 0}return 1}(m)))}var b=new TextDecoder("utf8",{fatal:1});function p(m,c=0){const ne=e(30);return ne.setUint32(0,1347093252),ne.setUint32(4,754976768|c),w(m.t,ne,10),ne.setUint16(26,m.i.length,1),n(ne)}async function*g(m){let{bytes:c}=m;if("then"in c&&(c=await c),c instanceof Uint8Array)yield c,m.l=y(c,0),m.o=BigInt(c.length);else{m.o=0n;const ne=c.getReader();for(;;){const{value:we,done:Pe}=await ne.read();if(Pe)break;m.l=y(we,m.l),m.o+=BigInt(we.length),yield we}}}function I(m,c){const ne=e(16+(c?8:0));return ne.setUint32(0,1347094280),ne.setUint32(4,m.isFile?m.l:0,1),c?(ne.setBigUint64(8,m.o,1),ne.setBigUint64(16,m.o,1)):(ne.setUint32(8,i(m.o),1),ne.setUint32(12,i(m.o),1)),n(ne)}function v(m,c,ne=0,we=0){const Pe=e(46);return Pe.setUint32(0,1347092738),Pe.setUint32(4,755182848),Pe.setUint16(8,2048|ne),w(m.t,Pe,12),Pe.setUint32(16,m.isFile?m.l:0,1),Pe.setUint32(20,i(m.o),1),Pe.setUint32(24,i(m.o),1),Pe.setUint16(28,m.i.length,1),Pe.setUint16(30,we,1),Pe.setUint16(40,m.mode|(m.isFile?32768:16384),1),Pe.setUint32(42,i(c),1),n(Pe)}function h(m,c,ne){const we=e(ne);return we.setUint16(0,1,1),we.setUint16(2,ne-4,1),16&ne&&(we.setBigUint64(4,m.o,1),we.setBigUint64(12,m.o,1)),we.setBigUint64(ne-8,c,1),n(we)}function D(m){return m instanceof File||m instanceof Response?[[m],[m]]:[[m.input,m.name,m.size],[m.input,m.lastModified,m.mode]]}var S=m=>function(c){let ne=BigInt(22),we=0n,Pe=0;for(const Me of c){if(!Me.i)throw new Error("Every file must have a non-empty name.");if(Me.o===void 0)throw new Error(`Missing size for file "${new TextDecoder().decode(Me.i)}".`);const Ze=Me.o>=0xffffffffn,ie=we>=0xffffffffn;we+=BigInt(46+Me.i.length+(Ze&&8))+Me.o,ne+=BigInt(Me.i.length+46+(12*ie|28*Ze)),Pe||(Pe=Ze)}return(Pe||we>=0xffffffffn)&&(ne+=BigInt(76)),ne+we}(function*(c){for(const ne of c)yield s(...D(ne)[0])}(m));function A(m,c={}){const ne={"Content-Type":"application/zip","Content-Disposition":"attachment"};return(typeof c.length=="bigint"||Number.isInteger(c.length))&&c.length>0&&(ne["Content-Length"]=String(c.length)),c.metadata&&(ne["Content-Length"]=String(S(c.metadata))),new Response(N(m,c),{headers:ne})}function N(m,c={}){const ne=function(we){const Pe=we[Symbol.iterator in we?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const Me=await Pe.next();if(Me.done)return Me;const[Ze,ie]=D(Me.value);return{done:0,value:Object.assign(o(...ie),s(...Ze))}},throw:Pe.throw?.bind(Pe),[Symbol.asyncIterator](){return this}}}(m);return f(async function*(we,Pe){const Me=[];let Ze=0n,ie=0n,ii=0;for await(const mi of we){const Ci=B(mi,Pe.buffersAreUTF8);yield p(mi,Ci),yield new Uint8Array(mi.i),mi.isFile&&(yield*g(mi));const Ai=mi.o>=0xffffffffn,Ti=12*(Ze>=0xffffffffn)|28*Ai;yield I(mi,Ai),Me.push(v(mi,Ze,Ci,Ti)),Me.push(mi.i),Ti&&Me.push(h(mi,Ze,Ti)),Ai&&(Ze+=8n),ie++,Ze+=BigInt(46+mi.i.length)+mi.o,ii||(ii=Ai)}let di=0n;for(const mi of Me)yield mi,di+=BigInt(mi.length);if(ii||Ze>=0xffffffffn){const mi=e(76);mi.setUint32(0,1347094022),mi.setBigUint64(4,BigInt(44),1),mi.setUint32(12,755182848),mi.setBigUint64(24,ie,1),mi.setBigUint64(32,ie,1),mi.setBigUint64(40,di,1),mi.setBigUint64(48,Ze,1),mi.setUint32(56,1347094023),mi.setBigUint64(64,Ze+di,1),mi.setUint32(72,1,1),yield n(mi)}const li=e(22);li.setUint32(0,1347093766),li.setUint16(8,r(ie),1),li.setUint16(10,r(ie),1),li.setUint32(12,i(di),1),li.setUint32(16,i(Ze),1),yield n(li)}(ne,c),ne)}var download$1={exports:{}};(function(m,c){(function(ne,we){m.exports=we()})(commonjsGlobal,function(){return function ne(we,Pe,Me){var Ze=window,ie="application/octet-stream",ii=Me||ie,di=we,li=!Pe&&!Me&&di,mi=document.createElement("a"),Ci=function(ur){return String(ur)},Ai=Ze.Blob||Ze.MozBlob||Ze.WebKitBlob||Ci,Ti=Pe||"download",Ii,Di;if(Ai=Ai.call?Ai.bind(Ze):Blob,String(this)==="true"&&(di=[di,ii],ii=di[0],di=di[1]),li&&li.length<2048&&(Ti=li.split("/").pop().split("?")[0],mi.href=li,mi.href.indexOf(li)!==-1)){var Zi=new XMLHttpRequest;return Zi.open("GET",li,!0),Zi.responseType="blob",Zi.onload=function(ur){ne(ur.target.response,Ti,ie)},setTimeout(function(){Zi.send()},0),Zi}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(di))if(di.length>1024*1024*1.999&&Ai!==Ci)di=ar(di),ii=di.type||ie;else return navigator.msSaveBlob?navigator.msSaveBlob(ar(di),Ti):nr(di);else if(/([\x80-\xff])/.test(di)){var Fi=0,Ui=new Uint8Array(di.length),Wi=Ui.length;for(Fi;Fi<Wi;++Fi)Ui[Fi]=di.charCodeAt(Fi);di=new Ai([Ui],{type:ii})}Ii=di instanceof Ai?di:new Ai([di],{type:ii});function ar(ur){var lr=ur.split(/[:;,]/),ir=lr[1],cr=lr[2]=="base64"?atob:decodeURIComponent,fi=cr(lr.pop()),Ae=fi.length,ze=0,Ue=new Uint8Array(Ae);for(ze;ze<Ae;++ze)Ue[ze]=fi.charCodeAt(ze);return new Ai([Ue],{type:ir})}function nr(ur,lr){if("download"in mi)return mi.href=ur,mi.setAttribute("download",Ti),mi.className="download-js-link",mi.innerHTML="downloading...",mi.style.display="none",document.body.appendChild(mi),setTimeout(function(){mi.click(),document.body.removeChild(mi),lr===!0&&setTimeout(function(){Ze.URL.revokeObjectURL(mi.href)},250)},66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(ur)&&(ur="data:"+ur.replace(/^data:([\w\/\-\+]+)/,ie)),window.open(ur)||confirm(`Displaying New Document
2594
2594
 
2595
- Use Save As... to download, then click back to return to this page.`)&&(location.href=ur),!0;var ir=document.createElement("iframe");document.body.appendChild(ir),!lr&&/^data:/.test(ur)&&(ur="data:"+ur.replace(/^data:([\w\/\-\+]+)/,ie)),ir.src=ur,setTimeout(function(){document.body.removeChild(ir)},333)}if(navigator.msSaveBlob)return navigator.msSaveBlob(Ii,Ti);if(Ze.URL)nr(Ze.URL.createObjectURL(Ii),!0);else{if(typeof Ii=="string"||Ii.constructor===Ci)try{return nr("data:"+ii+";base64,"+Ze.btoa(Ii))}catch{return nr("data:"+ii+","+encodeURIComponent(Ii))}Di=new FileReader,Di.onload=function(ur){nr(this.result)},Di.readAsDataURL(Ii)}return!0}})})(download$1);const download=download$1.exports,types$1={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.autodesk.fbx":["fbx"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dcmp+xml":["dcmp"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.drawing":["gdraw"],"application/vnd.google-apps.form":["gform"],"application/vnd.google-apps.jam":["gjam"],"application/vnd.google-apps.map":["gmap"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.script":["gscript"],"application/vnd.google-apps.site":["gsite"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-visio.viewer":["vdx"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.procrate.brushset":["brushset"],"application/vnd.procreate.brush":["brush"],"application/vnd.procreate.dream":["drm"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw","vsdx","vtx"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blender":["blend"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-compressed":["*rar"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-ipynb+json":["ipynb"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zip-compressed":["*zip"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-adobe-dng":["dng"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(types$1);const types={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/dicom":["dcm"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg","one","onea"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"application/zip+dotlottie":["lottie"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a","m4b"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/ief":["ief"],"image/jaii":["jaii"],"image/jais":["jais"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpg","jpeg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/pjpeg":["jfif"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime","mht","mhtml"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step":["step","stp","stpnc","p21","210"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(types);var __classPrivateFieldGet=globalThis&&globalThis.__classPrivateFieldGet||function(m,c,ne,we){if(ne==="a"&&!we)throw new TypeError("Private accessor was defined without a getter");if(typeof c=="function"?m!==c||!we:!c.has(m))throw new TypeError("Cannot read private member from an object whose class did not declare it");return ne==="m"?we:ne==="a"?we.call(m):we?we.value:c.get(m)},_Mime_extensionToType,_Mime_typeToExtension,_Mime_typeToExtensions;class Mime{constructor(...c){_Mime_extensionToType.set(this,new Map),_Mime_typeToExtension.set(this,new Map),_Mime_typeToExtensions.set(this,new Map);for(const ne of c)this.define(ne)}define(c,ne=!1){for(let[we,Pe]of Object.entries(c)){we=we.toLowerCase(),Pe=Pe.map(ie=>ie.toLowerCase()),__classPrivateFieldGet(this,_Mime_typeToExtensions,"f").has(we)||__classPrivateFieldGet(this,_Mime_typeToExtensions,"f").set(we,new Set);const Me=__classPrivateFieldGet(this,_Mime_typeToExtensions,"f").get(we);let Ze=!0;for(let ie of Pe){const ii=ie.startsWith("*");if(ie=ii?ie.slice(1):ie,Me?.add(ie),Ze&&__classPrivateFieldGet(this,_Mime_typeToExtension,"f").set(we,ie),Ze=!1,ii)continue;const di=__classPrivateFieldGet(this,_Mime_extensionToType,"f").get(ie);if(di&&di!=we&&!ne)throw new Error(`"${we} -> ${ie}" conflicts with "${di} -> ${ie}". Pass \`force=true\` to override this definition.`);__classPrivateFieldGet(this,_Mime_extensionToType,"f").set(ie,we)}}return this}getType(c){if(typeof c!="string")return null;const ne=c.replace(/^.*[/\\]/s,"").toLowerCase(),we=ne.replace(/^.*\./s,"").toLowerCase(),Pe=ne.length<c.length;return!(we.length<ne.length-1)&&Pe?null:__classPrivateFieldGet(this,_Mime_extensionToType,"f").get(we)??null}getExtension(c){return typeof c!="string"?null:(c=c?.split?.(";")[0],(c&&__classPrivateFieldGet(this,_Mime_typeToExtension,"f").get(c.trim().toLowerCase()))??null)}getAllExtensions(c){return typeof c!="string"?null:__classPrivateFieldGet(this,_Mime_typeToExtensions,"f").get(c.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(const c of __classPrivateFieldGet(this,_Mime_typeToExtensions,"f").values())Object.freeze(c);return this}_getTestState(){return{types:__classPrivateFieldGet(this,_Mime_extensionToType,"f"),extensions:__classPrivateFieldGet(this,_Mime_typeToExtension,"f")}}}_Mime_extensionToType=new WeakMap,_Mime_typeToExtension=new WeakMap,_Mime_typeToExtensions=new WeakMap;const mime=new Mime(types,types$1)._freeze();function dataUrlToArrayBuffer(m){const[c,ne]=m.split(",");if(!c||!ne)throw new Error("invalid data url");const we=atob(ne),Pe=new ArrayBuffer(we.length),Me=new Uint8Array(Pe);for(let Ze=0;Ze<we.length;Ze++)Me[Ze]=we.charCodeAt(Ze);return Pe}async function ensureAllImagesLoaded(m){const ne=Array.from(m.querySelectorAll("image")).map(we=>{const Pe=we.getAttributeNS("http://www.w3.org/1999/xlink","href")||we.getAttribute("href");return Pe?.startsWith("data:")?new Promise((Me,Ze)=>{const ie=new Image;ie.src=Pe,ie.onload=()=>Me(),ie.onerror=()=>Ze(new Error(`Fehler beim Laden des Bildes: ${Pe}`))}):Promise.resolve()});await Promise.all(ne)}function renderSVG(m,c="image/png",ne="arrayBuffer",we=150){return ensureAllImagesLoaded(m).then(()=>new Promise((Pe,Me)=>{const Ze=m.getAttribute("viewBox")?.split(" ").map(mi=>parseFloat(mi))??[0,0,100,100],ie=document.createElement("canvas");ie.style.position="absolute",ie.style.top="-1000%",ie.style.left="-1000%",document.body.appendChild(ie),ie.width=Ze[2],ie.height=Ze[3];const ii=ie.getContext("2d");if(!ii)return Me(new Error("Failed to get 2d context"));const di=new XMLSerializer().serializeToString(m),li=new Image;li.src=`data:image/svg+xml;base64,${btoa(di)}`,li.addEventListener("load",async()=>{if(await new Promise(mi=>setTimeout(mi,we)),ii.drawImage(li,0,0),ne==="arrayBuffer"){const mi=dataUrlToArrayBuffer(ie.toDataURL(c));Pe(mi),document.body.removeChild(ie)}else ie.toBlob(mi=>{mi?Pe(mi):Me(new Error("Failed to convert canvas to blob")),document.body.removeChild(ie)},c)})}))}function applyColorMatrixToColor({r:m,g:c,b:ne,a:we},Pe){const Me=Pe[0]*m+Pe[1]*c+Pe[2]*ne+Pe[3]*we+Pe[4]*255,Ze=Pe[5]*m+Pe[6]*c+Pe[7]*ne+Pe[8]*we+Pe[9]*255,ie=Pe[10]*m+Pe[11]*c+Pe[12]*ne+Pe[13]*we+Pe[14]*255,ii=Pe[15]*m+Pe[16]*c+Pe[17]*ne+Pe[18]*we+Pe[19]*255;return{r:Math.min(255,Math.max(0,Math.round(Me))),g:Math.min(255,Math.max(0,Math.round(Ze))),b:Math.min(255,Math.max(0,Math.round(ie))),a:Math.min(255,Math.max(0,Math.round(ii)))}}async function applyColorMatricesToImage(m,c){return new Promise((ne,we)=>{const Pe=new Blob([m],{type:"image/png"}),Me=new Image;Me.src=URL.createObjectURL(Pe),Me.addEventListener("load",()=>{const Ze=document.createElement("canvas");Ze.width=Me.width,Ze.height=Me.height;const ie=Ze.getContext("2d");if(!ie){we("Canvas-Kontext konnte nicht erstellt werden.");return}ie.drawImage(Me,0,0);const ii=ie.getImageData(0,0,Me.width,Me.height),{data:di,width:li,height:mi}=ii;for(let Ci=0;Ci<mi;Ci++)for(let Ai=0;Ai<li;Ai++){const Ti=(Ci*li+Ai)*4;for(const Ii of c){const[Di,Zi,Fi,Ui]=[di[Ti],di[Ti+1],di[Ti+2],di[Ti+3]],{r:Wi,g:ar,b:nr,a:ur}=applyColorMatrixToColor({r:Di,g:Zi,b:Fi,a:Ui},Ii);di[Ti]=Wi,di[Ti+1]=ar,di[Ti+2]=nr,di[Ti+3]=ur}}ie.putImageData(ii,0,0),Ze.toBlob(Ci=>{if(Ci){const Ai=new FileReader;Ai.onloadend=()=>{Ai.result?ne(Ai.result):we("Fehler beim Lesen des Blob-Inhalts.")},Ai.onerror=we,Ai.readAsArrayBuffer(Ci)}else we("Canvas konnte nicht in Blob konvertiert werden.")},"image/png")}),Me.onerror=()=>{we("Bild konnte nicht geladen werden.")}})}async function getVisibleBBox(m){return new Promise((c,ne)=>{const we=new Blob([m],{type:"image/png"}),Pe=new Image;Pe.src=URL.createObjectURL(we),Pe.onload=()=>{const Me=document.createElement("canvas");Me.width=Pe.width,Me.height=Pe.height;const Ze=Me.getContext("2d");if(!Ze){ne("Canvas-Kontext konnte nicht erstellt werden.");return}Ze.drawImage(Pe,0,0);const ie=Ze.getImageData(0,0,Pe.width,Pe.height),{data:ii,width:di,height:li}=ie;let mi=di,Ci=li,Ai=0,Ti=0,Ii=!1;for(let Zi=0;Zi<li;Zi++)for(let Fi=0;Fi<di;Fi++){const Ui=(Zi*di+Fi)*4;ii[Ui+3]>0&&(Ii=!0,mi=Math.min(mi,Fi),Ci=Math.min(Ci,Zi),Ai=Math.max(Ai,Fi),Ti=Math.max(Ti,Zi))}if(!Ii){c(void 0);return}const Di={left:mi,top:Ci,width:Ai-mi+1,height:Ti-Ci+1};c(Di)},Pe.onerror=()=>{ne("Bild konnte nicht geladen werden.")}})}async function cropToVisibleBBox(m,c){return new Promise((ne,we)=>{const Pe=new Blob([m],{type:"image/png"}),Me=new Image;Me.src=URL.createObjectURL(Pe),Me.onload=()=>{const Ze=document.createElement("canvas");Ze.width=c.width,Ze.height=c.height;const ie=Ze.getContext("2d");if(!ie){we("Canvas-Kontext konnte nicht erstellt werden.");return}ie.drawImage(Me,c.left,c.top,c.width,c.height,0,0,c.width,c.height),Ze.toBlob(ii=>{if(ii){const di=new FileReader;di.onloadend=()=>{di.result?ne(di.result):we("Fehler beim Lesen des Blob-Inhalts.")},di.onerror=we,di.readAsArrayBuffer(ii)}else we("Canvas konnte nicht in Blob konvertiert werden.")},"image/png")},Me.onerror=()=>{we("Bild konnte nicht geladen werden.")}})}async function rasterize(m){const c=await renderSVG(m,"image/png","arrayBuffer"),ne=await getVisibleBBox(c);if(!ne){console.error("Failed to get visible bbox");return}return{left:ne?.left,top:ne?.top,width:ne?.width,height:ne?.height,buffer:await cropToVisibleBBox(c,ne)}}async function applyColorMatrix(m,c){return m}pLimit(1);async function renderRemote(m,c,ne,we,Pe,Me,Ze,ie,ii,di,li){const mi=`${m}/api/export/${c}?${new URLSearchParams({env:"prod"})}`,Ci={templateId:ne,data:we,width:Pe,height:Me,format:Ze,frames:di},Ai=await fetch(mi,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ci)});if(!Ai.ok)throw new Error(`Failed to start rendering: ${Ai.status}`);return await Ai.json()}function getSessionState(m,c,ne,we,Pe,Me,Ze){return hash$1({templateId:m,data:c,format:ne,width:we,height:Pe,quality:Me})}const renderCache=new Map;async function renderRemoteWithRetry(m,c,ne,we,Pe,Me,Ze,ie,ii,di,li=3){const mi=getSessionState(ne,we,Pe,Me,Ze,ie);if(renderCache.has(mi)){const Ai=renderCache.get(mi);if(Ai)return await Ai}const Ci=new Promise(async(Ai,Ti)=>{let Ii=0;for(;;)try{Ii>0&&console.info(`Retrying ${Ii}/${li}`);const Di=await renderRemote(m,c,ne,we,Me,Ze,Pe,ie,di,ii);return Ai(Di)}catch(Di){if(Ii++,console.error(`Rendering failed (${ne})`,Di),Ii>li)return Ti(Di)}});renderCache.set(mi,Ci);try{return await Ci}catch(Ai){throw renderCache.delete(mi),Ai}}async function renderLocal(m,c){const ne=await import("flat-svg");c.watermark;const we=await ne.simplifySVG(m,{rasterizeAllMasks:!1,vectorizeAllTexts:c.format!=="image/svg+xml",rasterize,applyColorMatrix,keepGroupTransforms:!1}),Pe=new XMLSerializer().serializeToString(we);if(c.format==="image/svg+xml"){const Me=new Blob([Pe],{type:"image/svg+xml"});return[{name:`render.${mimeTypes.extension(Me.type)}`,blob:Me}]}else if(c.format==="application/vnd.adobe.indesign-idml-package"){const Me=await import("idml"),{idml:Ze,collectedFonts:ie}=await Me.svg2idml(m,rasterize,applyColorMatrix,{keepGroupTransforms:c.idmlOptions.keepGroupTransforms??!1,vectorizeAllTexts:c.idmlOptions.vectorizeAllTexts??!1}),ii=await Ze.export();return[{name:`${c.fileBasename}.idml`,blob:new Blob([ii],{type:"application/vnd.adobe.indesign-idml-package"})},...ie.map(di=>{const li=(()=>{if(di.src.startsWith("data:")){const Ci=di.src.split(";")[0].split(":")[1];return mimeTypes.extension(Ci)||"otf"}else return new URL(di.src).pathname.split(".").pop()})(),mi=li?{ttf:"font/ttf",otf:"font/otf",woff2:"font/woff2",woff:"font/woff"}[li]:void 0;return{name:`${di.fullName}.${li}`,blob:new Blob([di.data],{type:mi})}})]}else{const Me=c.frames?.x??1,Ze=c.frames?.y??1,ie=Me*Ze,ii=Array(ie).fill(0).map((Ai,Ti)=>{const Ii=Ti%Me,Di=Math.floor(Ti/Me),Zi=c.width/Me,Fi=c.height/Ze;return{x:Ii*Zi,y:Di*Fi,width:Zi,height:Fi}}),li=await(await import("flat-svg")).simplifySVG(m,{rasterizeAllMasks:!1,vectorizeAllTexts:!0,rasterize,applyColorMatrix,keepGroupTransforms:!1}),mi=c.format,Ci=await renderSVG(li.querySelector("svg"),mime.getType(mi),"blob");if(ii.length>1){const Ai=URL.createObjectURL(Ci);return(await Promise.all(ii.map(({x:Ti,y:Ii,width:Di,height:Zi})=>cropImage({imageSource:Ai,cropX:Ti,cropY:Ii,cropWidth:Di,cropHeight:Zi,type:mime.getType(mi),quality:1},"blob"))).then(Ti=>(URL.revokeObjectURL(Ai),Ti))).map((Ti,Ii)=>({name:`${c.fileBasename}_${Ii+1}.${mimeTypes.extension(Ti.type)}`,blob:Ti}))}else return[{name:`${c.fileBasename}.${mimeTypes.extension(Ci.type)}`,blob:Ci}]}}function renderVideoRemote(m,c,ne,we,Pe,Me,Ze,ie,ii){return new Promise(async(di,li)=>{let mi,Ci,Ai;function Ti(ar){try{const nr=JSON.parse(ar);if(nr.type==="end"&&(mi=nr.sessionId,Ci=nr.creditsConsumed,Ai=nr.files),nr.type==="error")throw console.error("Error in video rendering",nr),new Error(nr.message);nr.type!=="end"&&ii(nr)}catch{}}const Ii=`https://api.bluepic.io/api/export/${m}?${new URLSearchParams({env:"prod"})}`,Di={templateId:c,data:ne,width:we,height:Pe,format:"mp4",quality:.85,fps:30,duration:Ze,vcodec:"libx264",pixFmt:"yuv420p",audio:[],minParallel:16,maxParallel:16},Zi=await fetch(Ii,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Di)});if(!Zi.body)throw new Error(`Failed to start video rendering: ${Zi.status}`);const Fi=Zi.body.getReader();let Ui="";const Wi=new TextDecoder;for(;;){const{value:ar,done:nr}=await Fi.read();if(nr)break;Ui+=Wi.decode(ar,{stream:!0});let ur=Ui.indexOf(`
2595
+ Use Save As... to download, then click back to return to this page.`)&&(location.href=ur),!0;var ir=document.createElement("iframe");document.body.appendChild(ir),!lr&&/^data:/.test(ur)&&(ur="data:"+ur.replace(/^data:([\w\/\-\+]+)/,ie)),ir.src=ur,setTimeout(function(){document.body.removeChild(ir)},333)}if(navigator.msSaveBlob)return navigator.msSaveBlob(Ii,Ti);if(Ze.URL)nr(Ze.URL.createObjectURL(Ii),!0);else{if(typeof Ii=="string"||Ii.constructor===Ci)try{return nr("data:"+ii+";base64,"+Ze.btoa(Ii))}catch{return nr("data:"+ii+","+encodeURIComponent(Ii))}Di=new FileReader,Di.onload=function(ur){nr(this.result)},Di.readAsDataURL(Ii)}return!0}})})(download$1);const download=download$1.exports,types$1={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.autodesk.fbx":["fbx"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dcmp+xml":["dcmp"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.drawing":["gdraw"],"application/vnd.google-apps.form":["gform"],"application/vnd.google-apps.jam":["gjam"],"application/vnd.google-apps.map":["gmap"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.script":["gscript"],"application/vnd.google-apps.site":["gsite"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-visio.viewer":["vdx"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.procrate.brushset":["brushset"],"application/vnd.procreate.brush":["brush"],"application/vnd.procreate.dream":["drm"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw","vsdx","vtx"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blender":["blend"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-compressed":["*rar"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-ipynb+json":["ipynb"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zip-compressed":["*zip"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-adobe-dng":["dng"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(types$1);const types={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/dicom":["dcm"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg","one","onea"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"application/zip+dotlottie":["lottie"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a","m4b"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/ief":["ief"],"image/jaii":["jaii"],"image/jais":["jais"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpg","jpeg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/pjpeg":["jfif"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime","mht","mhtml"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step":["step","stp","stpnc","p21","210"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(types);var __classPrivateFieldGet=globalThis&&globalThis.__classPrivateFieldGet||function(m,c,ne,we){if(ne==="a"&&!we)throw new TypeError("Private accessor was defined without a getter");if(typeof c=="function"?m!==c||!we:!c.has(m))throw new TypeError("Cannot read private member from an object whose class did not declare it");return ne==="m"?we:ne==="a"?we.call(m):we?we.value:c.get(m)},_Mime_extensionToType,_Mime_typeToExtension,_Mime_typeToExtensions;class Mime{constructor(...c){_Mime_extensionToType.set(this,new Map),_Mime_typeToExtension.set(this,new Map),_Mime_typeToExtensions.set(this,new Map);for(const ne of c)this.define(ne)}define(c,ne=!1){for(let[we,Pe]of Object.entries(c)){we=we.toLowerCase(),Pe=Pe.map(ie=>ie.toLowerCase()),__classPrivateFieldGet(this,_Mime_typeToExtensions,"f").has(we)||__classPrivateFieldGet(this,_Mime_typeToExtensions,"f").set(we,new Set);const Me=__classPrivateFieldGet(this,_Mime_typeToExtensions,"f").get(we);let Ze=!0;for(let ie of Pe){const ii=ie.startsWith("*");if(ie=ii?ie.slice(1):ie,Me?.add(ie),Ze&&__classPrivateFieldGet(this,_Mime_typeToExtension,"f").set(we,ie),Ze=!1,ii)continue;const di=__classPrivateFieldGet(this,_Mime_extensionToType,"f").get(ie);if(di&&di!=we&&!ne)throw new Error(`"${we} -> ${ie}" conflicts with "${di} -> ${ie}". Pass \`force=true\` to override this definition.`);__classPrivateFieldGet(this,_Mime_extensionToType,"f").set(ie,we)}}return this}getType(c){if(typeof c!="string")return null;const ne=c.replace(/^.*[/\\]/s,"").toLowerCase(),we=ne.replace(/^.*\./s,"").toLowerCase(),Pe=ne.length<c.length;return!(we.length<ne.length-1)&&Pe?null:__classPrivateFieldGet(this,_Mime_extensionToType,"f").get(we)??null}getExtension(c){return typeof c!="string"?null:(c=c?.split?.(";")[0],(c&&__classPrivateFieldGet(this,_Mime_typeToExtension,"f").get(c.trim().toLowerCase()))??null)}getAllExtensions(c){return typeof c!="string"?null:__classPrivateFieldGet(this,_Mime_typeToExtensions,"f").get(c.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(const c of __classPrivateFieldGet(this,_Mime_typeToExtensions,"f").values())Object.freeze(c);return this}_getTestState(){return{types:__classPrivateFieldGet(this,_Mime_extensionToType,"f"),extensions:__classPrivateFieldGet(this,_Mime_typeToExtension,"f")}}}_Mime_extensionToType=new WeakMap,_Mime_typeToExtension=new WeakMap,_Mime_typeToExtensions=new WeakMap;const mime=new Mime(types,types$1)._freeze();function dataUrlToArrayBuffer(m){const[c,ne]=m.split(",");if(!c||!ne)throw new Error("invalid data url");const we=atob(ne),Pe=new ArrayBuffer(we.length),Me=new Uint8Array(Pe);for(let Ze=0;Ze<we.length;Ze++)Me[Ze]=we.charCodeAt(Ze);return Pe}async function ensureAllImagesLoaded(m){const ne=Array.from(m.querySelectorAll("image")).map(we=>{const Pe=we.getAttributeNS("http://www.w3.org/1999/xlink","href")||we.getAttribute("href");return Pe?.startsWith("data:")?new Promise((Me,Ze)=>{const ie=new Image;ie.src=Pe,ie.onload=()=>Me(),ie.onerror=()=>Ze(new Error(`Fehler beim Laden des Bildes: ${Pe}`))}):Promise.resolve()});await Promise.all(ne)}function renderSVG(m,c="image/png",ne="arrayBuffer",we=150){return ensureAllImagesLoaded(m).then(()=>new Promise((Pe,Me)=>{const Ze=m.getAttribute("viewBox")?.split(" ").map(mi=>parseFloat(mi))??[0,0,100,100],ie=document.createElement("canvas");ie.style.position="absolute",ie.style.top="-1000%",ie.style.left="-1000%",document.body.appendChild(ie),ie.width=Ze[2],ie.height=Ze[3];const ii=ie.getContext("2d");if(!ii)return Me(new Error("Failed to get 2d context"));const di=new XMLSerializer().serializeToString(m),li=new Image;li.src=`data:image/svg+xml;base64,${btoa(di)}`,li.addEventListener("load",async()=>{if(await new Promise(mi=>setTimeout(mi,we)),ii.drawImage(li,0,0),ne==="arrayBuffer"){const mi=dataUrlToArrayBuffer(ie.toDataURL(c));Pe(mi),document.body.removeChild(ie)}else ie.toBlob(mi=>{mi?Pe(mi):Me(new Error("Failed to convert canvas to blob")),document.body.removeChild(ie)},c)})}))}function applyColorMatrixToColor({r:m,g:c,b:ne,a:we},Pe){const Me=Pe[0]*m+Pe[1]*c+Pe[2]*ne+Pe[3]*we+Pe[4]*255,Ze=Pe[5]*m+Pe[6]*c+Pe[7]*ne+Pe[8]*we+Pe[9]*255,ie=Pe[10]*m+Pe[11]*c+Pe[12]*ne+Pe[13]*we+Pe[14]*255,ii=Pe[15]*m+Pe[16]*c+Pe[17]*ne+Pe[18]*we+Pe[19]*255;return{r:Math.min(255,Math.max(0,Math.round(Me))),g:Math.min(255,Math.max(0,Math.round(Ze))),b:Math.min(255,Math.max(0,Math.round(ie))),a:Math.min(255,Math.max(0,Math.round(ii)))}}async function applyColorMatricesToImage(m,c){return new Promise((ne,we)=>{const Pe=new Blob([m],{type:"image/png"}),Me=new Image;Me.src=URL.createObjectURL(Pe),Me.addEventListener("load",()=>{const Ze=document.createElement("canvas");Ze.width=Me.width,Ze.height=Me.height;const ie=Ze.getContext("2d");if(!ie){we("Canvas-Kontext konnte nicht erstellt werden.");return}ie.drawImage(Me,0,0);const ii=ie.getImageData(0,0,Me.width,Me.height),{data:di,width:li,height:mi}=ii;for(let Ci=0;Ci<mi;Ci++)for(let Ai=0;Ai<li;Ai++){const Ti=(Ci*li+Ai)*4;for(const Ii of c){const[Di,Zi,Fi,Ui]=[di[Ti],di[Ti+1],di[Ti+2],di[Ti+3]],{r:Wi,g:ar,b:nr,a:ur}=applyColorMatrixToColor({r:Di,g:Zi,b:Fi,a:Ui},Ii);di[Ti]=Wi,di[Ti+1]=ar,di[Ti+2]=nr,di[Ti+3]=ur}}ie.putImageData(ii,0,0),Ze.toBlob(Ci=>{if(Ci){const Ai=new FileReader;Ai.onloadend=()=>{Ai.result?ne(Ai.result):we("Fehler beim Lesen des Blob-Inhalts.")},Ai.onerror=we,Ai.readAsArrayBuffer(Ci)}else we("Canvas konnte nicht in Blob konvertiert werden.")},"image/png")}),Me.onerror=()=>{we("Bild konnte nicht geladen werden.")}})}async function getVisibleBBox(m){return new Promise((c,ne)=>{const we=new Blob([m],{type:"image/png"}),Pe=new Image;Pe.src=URL.createObjectURL(we),Pe.onload=()=>{const Me=document.createElement("canvas");Me.width=Pe.width,Me.height=Pe.height;const Ze=Me.getContext("2d");if(!Ze){ne("Canvas-Kontext konnte nicht erstellt werden.");return}Ze.drawImage(Pe,0,0);const ie=Ze.getImageData(0,0,Pe.width,Pe.height),{data:ii,width:di,height:li}=ie;let mi=di,Ci=li,Ai=0,Ti=0,Ii=!1;for(let Zi=0;Zi<li;Zi++)for(let Fi=0;Fi<di;Fi++){const Ui=(Zi*di+Fi)*4;ii[Ui+3]>0&&(Ii=!0,mi=Math.min(mi,Fi),Ci=Math.min(Ci,Zi),Ai=Math.max(Ai,Fi),Ti=Math.max(Ti,Zi))}if(!Ii){c(void 0);return}const Di={left:mi,top:Ci,width:Ai-mi+1,height:Ti-Ci+1};c(Di)},Pe.onerror=()=>{ne("Bild konnte nicht geladen werden.")}})}async function cropToVisibleBBox(m,c){return new Promise((ne,we)=>{const Pe=new Blob([m],{type:"image/png"}),Me=new Image;Me.src=URL.createObjectURL(Pe),Me.onload=()=>{const Ze=document.createElement("canvas");Ze.width=c.width,Ze.height=c.height;const ie=Ze.getContext("2d");if(!ie){we("Canvas-Kontext konnte nicht erstellt werden.");return}ie.drawImage(Me,c.left,c.top,c.width,c.height,0,0,c.width,c.height),Ze.toBlob(ii=>{if(ii){const di=new FileReader;di.onloadend=()=>{di.result?ne(di.result):we("Fehler beim Lesen des Blob-Inhalts.")},di.onerror=we,di.readAsArrayBuffer(ii)}else we("Canvas konnte nicht in Blob konvertiert werden.")},"image/png")},Me.onerror=()=>{we("Bild konnte nicht geladen werden.")}})}async function rasterize(m){const c=await renderSVG(m,"image/png","arrayBuffer"),ne=await getVisibleBBox(c);if(!ne){console.error("Failed to get visible bbox");return}return{left:ne?.left,top:ne?.top,width:ne?.width,height:ne?.height,buffer:await cropToVisibleBBox(c,ne)}}async function applyColorMatrix(m,c){return m}async function renderRemote(m,c,ne,we,Pe,Me,Ze,ie,ii,di,li){const mi=`${m}/api/export/${c}?${new URLSearchParams({env:"prod"})}`,Ci={templateId:ne,data:we,width:Pe,height:Me,format:Ze,frames:di},Ai=await fetch(mi,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ci)});if(!Ai.ok)throw new Error(`Failed to start rendering: ${Ai.status}`);return await Ai.json()}function getSessionState(m,c,ne,we,Pe,Me,Ze){return hash$1({templateId:m,data:c,format:ne,width:we,height:Pe,quality:Me})}const renderCache=new Map;async function renderRemoteWithRetry(m,c,ne,we,Pe,Me,Ze,ie,ii,di,li=3){const mi=getSessionState(ne,we,Pe,Me,Ze,ie);if(renderCache.has(mi)){const Ai=renderCache.get(mi);if(Ai)return await Ai}const Ci=new Promise(async(Ai,Ti)=>{let Ii=0;for(;;)try{Ii>0&&console.info(`Retrying ${Ii}/${li}`);const Di=await renderRemote(m,c,ne,we,Me,Ze,Pe,ie,di,ii);return Ai(Di)}catch(Di){if(Ii++,console.error(`Rendering failed (${ne})`,Di),Ii>li)return Ti(Di)}});renderCache.set(mi,Ci);try{return await Ci}catch(Ai){throw renderCache.delete(mi),Ai}}async function renderLocal(m,c){const ne=await import("flat-svg");c.watermark;const we=await ne.simplifySVG(m,{rasterizeAllMasks:!1,vectorizeAllTexts:c.format!=="image/svg+xml",rasterize,applyColorMatrix,keepGroupTransforms:!1}),Pe=new XMLSerializer().serializeToString(we);if(c.format==="image/svg+xml"){const Me=new Blob([Pe],{type:"image/svg+xml"});return[{name:`render.${mimeTypes.extension(Me.type)}`,blob:Me}]}else if(c.format==="application/vnd.adobe.indesign-idml-package"){const Me=await import("idml"),{idml:Ze,collectedFonts:ie}=await Me.svg2idml(m,rasterize,applyColorMatrix,{keepGroupTransforms:c.idmlOptions.keepGroupTransforms??!1,vectorizeAllTexts:c.idmlOptions.vectorizeAllTexts??!1}),ii=await Ze.export();return[{name:`${c.fileBasename}.idml`,blob:new Blob([ii],{type:"application/vnd.adobe.indesign-idml-package"})},...ie.map(di=>{const li=(()=>{if(di.src.startsWith("data:")){const Ci=di.src.split(";")[0].split(":")[1];return mimeTypes.extension(Ci)||"otf"}else return new URL(di.src).pathname.split(".").pop()})(),mi=li?{ttf:"font/ttf",otf:"font/otf",woff2:"font/woff2",woff:"font/woff"}[li]:void 0;return{name:`${di.fullName}.${li}`,blob:new Blob([di.data],{type:mi})}})]}else{const Me=c.frames?.x??1,Ze=c.frames?.y??1,ie=Me*Ze,ii=Array(ie).fill(0).map((Ai,Ti)=>{const Ii=Ti%Me,Di=Math.floor(Ti/Me),Zi=c.width/Me,Fi=c.height/Ze;return{x:Ii*Zi,y:Di*Fi,width:Zi,height:Fi}}),li=await(await import("flat-svg")).simplifySVG(m,{rasterizeAllMasks:!1,vectorizeAllTexts:!0,rasterize,applyColorMatrix,keepGroupTransforms:!1}),mi=c.format,Ci=await renderSVG(li.querySelector("svg"),mime.getType(mi),"blob");if(ii.length>1){const Ai=URL.createObjectURL(Ci);return(await Promise.all(ii.map(({x:Ti,y:Ii,width:Di,height:Zi})=>cropImage({imageSource:Ai,cropX:Ti,cropY:Ii,cropWidth:Di,cropHeight:Zi,type:mime.getType(mi),quality:1},"blob"))).then(Ti=>(URL.revokeObjectURL(Ai),Ti))).map((Ti,Ii)=>({name:`${c.fileBasename}_${Ii+1}.${mimeTypes.extension(Ti.type)}`,blob:Ti}))}else return[{name:`${c.fileBasename}.${mimeTypes.extension(Ci.type)}`,blob:Ci}]}}function renderVideoRemote(m,c,ne,we,Pe,Me,Ze,ie,ii){return new Promise(async(di,li)=>{let mi,Ci,Ai;function Ti(ar){try{const nr=JSON.parse(ar);if(nr.type==="end"&&(mi=nr.sessionId,Ci=nr.creditsConsumed,Ai=nr.files),nr.type==="error")throw console.error("Error in video rendering",nr),new Error(nr.message);nr.type!=="end"&&ii(nr)}catch{}}const Ii=`https://api.bluepic.io/api/export/${m}?${new URLSearchParams({env:"prod"})}`,Di={templateId:c,data:ne,width:we,height:Pe,format:"mp4",quality:.85,fps:30,duration:Ze,vcodec:"libx264",pixFmt:"yuv420p",audio:[],minParallel:16,maxParallel:16},Zi=await fetch(Ii,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Di)});if(!Zi.body)throw new Error(`Failed to start video rendering: ${Zi.status}`);const Fi=Zi.body.getReader();let Ui="";const Wi=new TextDecoder;for(;;){const{value:ar,done:nr}=await Fi.read();if(nr)break;Ui+=Wi.decode(ar,{stream:!0});let ur=Ui.indexOf(`
2596
2596
 
2597
2597
  `);for(;ur!==-1;){const lr=Ui.slice(0,ur).trim();Ui=Ui.slice(ur+2),ur=Ui.indexOf(`
2598
2598
 
@@ -2602,7 +2602,7 @@ Use Save As... to download, then click back to return to this page.`)&&(location
2602
2602
  Use "options.replacer" or "options.ignoreUnknown"
2603
2603
  `)},_domwindow:function(){return ir("domwindow")},_bigint:function(cr){return ir("bigint:"+cr.toString())},_process:function(){return ir("process")},_timer:function(){return ir("timer")},_pipe:function(){return ir("pipe")},_tcp:function(){return ir("tcp")},_udp:function(){return ir("udp")},_tty:function(){return ir("tty")},_statwatcher:function(){return ir("statwatcher")},_securecontext:function(){return ir("securecontext")},_connection:function(){return ir("connection")},_zlib:function(){return ir("zlib")},_context:function(){return ir("context")},_nodescript:function(){return ir("nodescript")},_httpparser:function(){return ir("httpparser")},_dataview:function(){return ir("dataview")},_signal:function(){return ir("signal")},_fsevent:function(){return ir("fsevent")},_tlswrap:function(){return ir("tlswrap")}}}function ar(){return{buf:"",write:function(nr){this.buf+=nr},end:function(nr){this.buf+=nr},read:function(){return this.buf}}}Pe.writeToStream=function(nr,ur,lr){return lr===void 0&&(lr=ur,ur={}),Wi(ur=Fi(nr,ur),lr).dispatch(nr)}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(ne,we,Pe){(function(Me,Ze,ie,ii,di,li,mi,Ci,Ai){(function(Ti){var Ii=typeof Uint8Array<"u"?Uint8Array:Array,Di="+".charCodeAt(0),Zi="/".charCodeAt(0),Fi="0".charCodeAt(0),Ui="a".charCodeAt(0),Wi="A".charCodeAt(0),ar="-".charCodeAt(0),nr="_".charCodeAt(0);function ur(lr){return lr=lr.charCodeAt(0),lr===Di||lr===ar?62:lr===Zi||lr===nr?63:lr<Fi?-1:lr<Fi+10?lr-Fi+26+26:lr<Wi+26?lr-Wi:lr<Ui+26?lr-Ui+26:void 0}Ti.toByteArray=function(lr){var ir,cr;if(0<lr.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var fi=lr.length,fi=lr.charAt(fi-2)==="="?2:lr.charAt(fi-1)==="="?1:0,Ae=new Ii(3*lr.length/4-fi),ze=0<fi?lr.length-4:lr.length,Ue=0;function ti(oi){Ae[Ue++]=oi}for(ir=0;ir<ze;ir+=4,0)ti((16711680&(cr=ur(lr.charAt(ir))<<18|ur(lr.charAt(ir+1))<<12|ur(lr.charAt(ir+2))<<6|ur(lr.charAt(ir+3))))>>16),ti((65280&cr)>>8),ti(255&cr);return fi==2?ti(255&(cr=ur(lr.charAt(ir))<<2|ur(lr.charAt(ir+1))>>4)):fi==1&&(ti((cr=ur(lr.charAt(ir))<<10|ur(lr.charAt(ir+1))<<4|ur(lr.charAt(ir+2))>>2)>>8&255),ti(255&cr)),Ae},Ti.fromByteArray=function(lr){var ir,cr,fi,Ae,ze=lr.length%3,Ue="";function ti(oi){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(oi)}for(ir=0,fi=lr.length-ze;ir<fi;ir+=3)cr=(lr[ir]<<16)+(lr[ir+1]<<8)+lr[ir+2],Ue+=ti((Ae=cr)>>18&63)+ti(Ae>>12&63)+ti(Ae>>6&63)+ti(63&Ae);switch(ze){case 1:Ue=(Ue+=ti((cr=lr[lr.length-1])>>2))+ti(cr<<4&63)+"==";break;case 2:Ue=(Ue=(Ue+=ti((cr=(lr[lr.length-2]<<8)+lr[lr.length-1])>>10))+ti(cr>>4&63))+ti(cr<<2&63)+"="}return Ue}})(Pe===void 0?this.base64js={}:Pe)}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(ne,we,Pe){(function(Me,Ze,Di,ii,di,li,mi,Ci,Ai){var Ti=ne("base64-js"),Ii=ne("ieee754");function Di(er,Xi,xr){if(!(this instanceof Di))return new Di(er,Xi,xr);var vr,Dr,Ur,dn,sn=typeof er;if(Xi==="base64"&&sn=="string")for(er=(dn=er).trim?dn.trim():dn.replace(/^\s+|\s+$/g,"");er.length%4!=0;)er+="=";if(sn=="number")vr=gi(er);else if(sn=="string")vr=Di.byteLength(er,Xi);else{if(sn!="object")throw new Error("First argument needs to be a number, array or string.");vr=gi(er.length)}if(Di._useTypedArrays?Dr=Di._augment(new Uint8Array(vr)):((Dr=this).length=vr,Dr._isBuffer=!0),Di._useTypedArrays&&typeof er.byteLength=="number")Dr._set(er);else if(ni(dn=er)||Di.isBuffer(dn)||dn&&typeof dn=="object"&&typeof dn.length=="number")for(Ur=0;Ur<vr;Ur++)Di.isBuffer(er)?Dr[Ur]=er.readUInt8(Ur):Dr[Ur]=er[Ur];else if(sn=="string")Dr.write(er,0,Xi);else if(sn=="number"&&!Di._useTypedArrays&&!xr)for(Ur=0;Ur<vr;Ur++)Dr[Ur]=0;return Dr}function Zi(er,Xi,xr,vr){return Di._charsWritten=Hi(function(Dr){for(var Ur=[],dn=0;dn<Dr.length;dn++)Ur.push(255&Dr.charCodeAt(dn));return Ur}(Xi),er,xr,vr)}function Fi(er,Xi,xr,vr){return Di._charsWritten=Hi(function(Dr){for(var Ur,dn,sn=[],Zn=0;Zn<Dr.length;Zn++)dn=Dr.charCodeAt(Zn),Ur=dn>>8,dn=dn%256,sn.push(dn),sn.push(Ur);return sn}(Xi),er,xr,vr)}function Ui(er,Xi,xr){var vr="";xr=Math.min(er.length,xr);for(var Dr=Xi;Dr<xr;Dr++)vr+=String.fromCharCode(er[Dr]);return vr}function Wi(er,Xi,xr,Ur){Ur||(br(typeof xr=="boolean","missing or invalid endian"),br(Xi!=null,"missing offset"),br(Xi+1<er.length,"Trying to read beyond buffer length"));var Dr,Ur=er.length;if(!(Ur<=Xi))return xr?(Dr=er[Xi],Xi+1<Ur&&(Dr|=er[Xi+1]<<8)):(Dr=er[Xi]<<8,Xi+1<Ur&&(Dr|=er[Xi+1])),Dr}function ar(er,Xi,xr,Ur){Ur||(br(typeof xr=="boolean","missing or invalid endian"),br(Xi!=null,"missing offset"),br(Xi+3<er.length,"Trying to read beyond buffer length"));var Dr,Ur=er.length;if(!(Ur<=Xi))return xr?(Xi+2<Ur&&(Dr=er[Xi+2]<<16),Xi+1<Ur&&(Dr|=er[Xi+1]<<8),Dr|=er[Xi],Xi+3<Ur&&(Dr+=er[Xi+3]<<24>>>0)):(Xi+1<Ur&&(Dr=er[Xi+1]<<16),Xi+2<Ur&&(Dr|=er[Xi+2]<<8),Xi+3<Ur&&(Dr|=er[Xi+3]),Dr+=er[Xi]<<24>>>0),Dr}function nr(er,Xi,xr,vr){if(vr||(br(typeof xr=="boolean","missing or invalid endian"),br(Xi!=null,"missing offset"),br(Xi+1<er.length,"Trying to read beyond buffer length")),!(er.length<=Xi))return vr=Wi(er,Xi,xr,!0),32768&vr?-1*(65535-vr+1):vr}function ur(er,Xi,xr,vr){if(vr||(br(typeof xr=="boolean","missing or invalid endian"),br(Xi!=null,"missing offset"),br(Xi+3<er.length,"Trying to read beyond buffer length")),!(er.length<=Xi))return vr=ar(er,Xi,xr,!0),2147483648&vr?-1*(4294967295-vr+1):vr}function lr(er,Xi,xr,vr){return vr||(br(typeof xr=="boolean","missing or invalid endian"),br(Xi+3<er.length,"Trying to read beyond buffer length")),Ii.read(er,Xi,xr,23,4)}function ir(er,Xi,xr,vr){return vr||(br(typeof xr=="boolean","missing or invalid endian"),br(Xi+7<er.length,"Trying to read beyond buffer length")),Ii.read(er,Xi,xr,52,8)}function cr(er,Xi,xr,vr,Dr){if(Dr||(br(Xi!=null,"missing value"),br(typeof vr=="boolean","missing or invalid endian"),br(xr!=null,"missing offset"),br(xr+1<er.length,"trying to write beyond buffer length"),Cr(Xi,65535)),Dr=er.length,!(Dr<=xr))for(var Ur=0,dn=Math.min(Dr-xr,2);Ur<dn;Ur++)er[xr+Ur]=(Xi&255<<8*(vr?Ur:1-Ur))>>>8*(vr?Ur:1-Ur)}function fi(er,Xi,xr,vr,Dr){if(Dr||(br(Xi!=null,"missing value"),br(typeof vr=="boolean","missing or invalid endian"),br(xr!=null,"missing offset"),br(xr+3<er.length,"trying to write beyond buffer length"),Cr(Xi,4294967295)),Dr=er.length,!(Dr<=xr))for(var Ur=0,dn=Math.min(Dr-xr,4);Ur<dn;Ur++)er[xr+Ur]=Xi>>>8*(vr?Ur:3-Ur)&255}function Ae(er,Xi,xr,vr,Dr){Dr||(br(Xi!=null,"missing value"),br(typeof vr=="boolean","missing or invalid endian"),br(xr!=null,"missing offset"),br(xr+1<er.length,"Trying to write beyond buffer length"),wr(Xi,32767,-32768)),er.length<=xr||cr(er,0<=Xi?Xi:65535+Xi+1,xr,vr,Dr)}function ze(er,Xi,xr,vr,Dr){Dr||(br(Xi!=null,"missing value"),br(typeof vr=="boolean","missing or invalid endian"),br(xr!=null,"missing offset"),br(xr+3<er.length,"Trying to write beyond buffer length"),wr(Xi,2147483647,-2147483648)),er.length<=xr||fi(er,0<=Xi?Xi:4294967295+Xi+1,xr,vr,Dr)}function Ue(er,Xi,xr,vr,Dr){Dr||(br(Xi!=null,"missing value"),br(typeof vr=="boolean","missing or invalid endian"),br(xr!=null,"missing offset"),br(xr+3<er.length,"Trying to write beyond buffer length"),rr(Xi,34028234663852886e22,-34028234663852886e22)),er.length<=xr||Ii.write(er,Xi,xr,vr,23,4)}function ti(er,Xi,xr,vr,Dr){Dr||(br(Xi!=null,"missing value"),br(typeof vr=="boolean","missing or invalid endian"),br(xr!=null,"missing offset"),br(xr+7<er.length,"Trying to write beyond buffer length"),rr(Xi,17976931348623157e292,-17976931348623157e292)),er.length<=xr||Ii.write(er,Xi,xr,vr,52,8)}Pe.Buffer=Di,Pe.SlowBuffer=Di,Pe.INSPECT_MAX_BYTES=50,Di.poolSize=8192,Di._useTypedArrays=function(){try{var er=new ArrayBuffer(0),Xi=new Uint8Array(er);return Xi.foo=function(){return 42},Xi.foo()===42&&typeof Xi.subarray=="function"}catch{return!1}}(),Di.isEncoding=function(er){switch(String(er).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Di.isBuffer=function(er){return!(er==null||!er._isBuffer)},Di.byteLength=function(er,Xi){var xr;switch(er+="",Xi||"utf8"){case"hex":xr=er.length/2;break;case"utf8":case"utf-8":xr=ci(er).length;break;case"ascii":case"binary":case"raw":xr=er.length;break;case"base64":xr=Bi(er).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":xr=2*er.length;break;default:throw new Error("Unknown encoding")}return xr},Di.concat=function(er,Xi){if(br(ni(er),`Usage: Buffer.concat(list, [totalLength])
2604
2604
  list should be an Array.`),er.length===0)return new Di(0);if(er.length===1)return er[0];if(typeof Xi!="number")for(Dr=Xi=0;Dr<er.length;Dr++)Xi+=er[Dr].length;for(var xr=new Di(Xi),vr=0,Dr=0;Dr<er.length;Dr++){var Ur=er[Dr];Ur.copy(xr,vr),vr+=Ur.length}return xr},Di.prototype.write=function(er,Xi,xr,vr){isFinite(Xi)?isFinite(xr)||(vr=xr,xr=void 0):(Zn=vr,vr=Xi,Xi=xr,xr=Zn),Xi=Number(Xi)||0;var Dr,Ur,dn,sn,Zn=this.length-Xi;switch((!xr||Zn<(xr=Number(xr)))&&(xr=Zn),vr=String(vr||"utf8").toLowerCase()){case"hex":Dr=function(Xr,Vr,Rn,xn){Rn=Number(Rn)||0;var Tn=Xr.length-Rn;(!xn||Tn<(xn=Number(xn)))&&(xn=Tn),br((Tn=Vr.length)%2==0,"Invalid hex string"),Tn/2<xn&&(xn=Tn/2);for(var Co=0;Co<xn;Co++){var vn=parseInt(Vr.substr(2*Co,2),16);br(!isNaN(vn),"Invalid hex string"),Xr[Rn+Co]=vn}return Di._charsWritten=2*Co,Co}(this,er,Xi,xr);break;case"utf8":case"utf-8":Ur=this,dn=Xi,sn=xr,Dr=Di._charsWritten=Hi(ci(er),Ur,dn,sn);break;case"ascii":case"binary":Dr=Zi(this,er,Xi,xr);break;case"base64":Ur=this,dn=Xi,sn=xr,Dr=Di._charsWritten=Hi(Bi(er),Ur,dn,sn);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":Dr=Fi(this,er,Xi,xr);break;default:throw new Error("Unknown encoding")}return Dr},Di.prototype.toString=function(er,Xi,xr){var vr,Dr,Ur,dn,sn=this;if(er=String(er||"utf8").toLowerCase(),Xi=Number(Xi)||0,(xr=xr!==void 0?Number(xr):sn.length)===Xi)return"";switch(er){case"hex":vr=function(Zn,Xr,Vr){var Rn=Zn.length;(!Xr||Xr<0)&&(Xr=0),(!Vr||Vr<0||Rn<Vr)&&(Vr=Rn);for(var xn="",Tn=Xr;Tn<Vr;Tn++)xn+=$e(Zn[Tn]);return xn}(sn,Xi,xr);break;case"utf8":case"utf-8":vr=function(Zn,Xr,Vr){var Rn="",xn="";Vr=Math.min(Zn.length,Vr);for(var Tn=Xr;Tn<Vr;Tn++)Zn[Tn]<=127?(Rn+=fr(xn)+String.fromCharCode(Zn[Tn]),xn=""):xn+="%"+Zn[Tn].toString(16);return Rn+fr(xn)}(sn,Xi,xr);break;case"ascii":case"binary":vr=Ui(sn,Xi,xr);break;case"base64":Dr=sn,dn=xr,vr=(Ur=Xi)===0&&dn===Dr.length?Ti.fromByteArray(Dr):Ti.fromByteArray(Dr.slice(Ur,dn));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":vr=function(Zn,Xr,Vr){for(var Rn=Zn.slice(Xr,Vr),xn="",Tn=0;Tn<Rn.length;Tn+=2)xn+=String.fromCharCode(Rn[Tn]+256*Rn[Tn+1]);return xn}(sn,Xi,xr);break;default:throw new Error("Unknown encoding")}return vr},Di.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},Di.prototype.copy=function(er,Xi,xr,vr){if(Xi=Xi||0,(vr=vr||vr===0?vr:this.length)!==(xr=xr||0)&&er.length!==0&&this.length!==0){br(xr<=vr,"sourceEnd < sourceStart"),br(0<=Xi&&Xi<er.length,"targetStart out of bounds"),br(0<=xr&&xr<this.length,"sourceStart out of bounds"),br(0<=vr&&vr<=this.length,"sourceEnd out of bounds"),vr>this.length&&(vr=this.length);var Dr=(vr=er.length-Xi<vr-xr?er.length-Xi+xr:vr)-xr;if(Dr<100||!Di._useTypedArrays)for(var Ur=0;Ur<Dr;Ur++)er[Ur+Xi]=this[Ur+xr];else er._set(this.subarray(xr,xr+Dr),Xi)}},Di.prototype.slice=function(er,Xi){var xr=this.length;if(er=pi(er,xr,0),Xi=pi(Xi,xr,xr),Di._useTypedArrays)return Di._augment(this.subarray(er,Xi));for(var vr=Xi-er,Dr=new Di(vr,void 0,!0),Ur=0;Ur<vr;Ur++)Dr[Ur]=this[Ur+er];return Dr},Di.prototype.get=function(er){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(er)},Di.prototype.set=function(er,Xi){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(er,Xi)},Di.prototype.readUInt8=function(er,Xi){if(Xi||(br(er!=null,"missing offset"),br(er<this.length,"Trying to read beyond buffer length")),!(er>=this.length))return this[er]},Di.prototype.readUInt16LE=function(er,Xi){return Wi(this,er,!0,Xi)},Di.prototype.readUInt16BE=function(er,Xi){return Wi(this,er,!1,Xi)},Di.prototype.readUInt32LE=function(er,Xi){return ar(this,er,!0,Xi)},Di.prototype.readUInt32BE=function(er,Xi){return ar(this,er,!1,Xi)},Di.prototype.readInt8=function(er,Xi){if(Xi||(br(er!=null,"missing offset"),br(er<this.length,"Trying to read beyond buffer length")),!(er>=this.length))return 128&this[er]?-1*(255-this[er]+1):this[er]},Di.prototype.readInt16LE=function(er,Xi){return nr(this,er,!0,Xi)},Di.prototype.readInt16BE=function(er,Xi){return nr(this,er,!1,Xi)},Di.prototype.readInt32LE=function(er,Xi){return ur(this,er,!0,Xi)},Di.prototype.readInt32BE=function(er,Xi){return ur(this,er,!1,Xi)},Di.prototype.readFloatLE=function(er,Xi){return lr(this,er,!0,Xi)},Di.prototype.readFloatBE=function(er,Xi){return lr(this,er,!1,Xi)},Di.prototype.readDoubleLE=function(er,Xi){return ir(this,er,!0,Xi)},Di.prototype.readDoubleBE=function(er,Xi){return ir(this,er,!1,Xi)},Di.prototype.writeUInt8=function(er,Xi,xr){xr||(br(er!=null,"missing value"),br(Xi!=null,"missing offset"),br(Xi<this.length,"trying to write beyond buffer length"),Cr(er,255)),Xi>=this.length||(this[Xi]=er)},Di.prototype.writeUInt16LE=function(er,Xi,xr){cr(this,er,Xi,!0,xr)},Di.prototype.writeUInt16BE=function(er,Xi,xr){cr(this,er,Xi,!1,xr)},Di.prototype.writeUInt32LE=function(er,Xi,xr){fi(this,er,Xi,!0,xr)},Di.prototype.writeUInt32BE=function(er,Xi,xr){fi(this,er,Xi,!1,xr)},Di.prototype.writeInt8=function(er,Xi,xr){xr||(br(er!=null,"missing value"),br(Xi!=null,"missing offset"),br(Xi<this.length,"Trying to write beyond buffer length"),wr(er,127,-128)),Xi>=this.length||(0<=er?this.writeUInt8(er,Xi,xr):this.writeUInt8(255+er+1,Xi,xr))},Di.prototype.writeInt16LE=function(er,Xi,xr){Ae(this,er,Xi,!0,xr)},Di.prototype.writeInt16BE=function(er,Xi,xr){Ae(this,er,Xi,!1,xr)},Di.prototype.writeInt32LE=function(er,Xi,xr){ze(this,er,Xi,!0,xr)},Di.prototype.writeInt32BE=function(er,Xi,xr){ze(this,er,Xi,!1,xr)},Di.prototype.writeFloatLE=function(er,Xi,xr){Ue(this,er,Xi,!0,xr)},Di.prototype.writeFloatBE=function(er,Xi,xr){Ue(this,er,Xi,!1,xr)},Di.prototype.writeDoubleLE=function(er,Xi,xr){ti(this,er,Xi,!0,xr)},Di.prototype.writeDoubleBE=function(er,Xi,xr){ti(this,er,Xi,!1,xr)},Di.prototype.fill=function(er,Xi,xr){if(Xi=Xi||0,xr=xr||this.length,br(typeof(er=typeof(er=er||0)=="string"?er.charCodeAt(0):er)=="number"&&!isNaN(er),"value is not a number"),br(Xi<=xr,"end < start"),xr!==Xi&&this.length!==0){br(0<=Xi&&Xi<this.length,"start out of bounds"),br(0<=xr&&xr<=this.length,"end out of bounds");for(var vr=Xi;vr<xr;vr++)this[vr]=er}},Di.prototype.inspect=function(){for(var er=[],Xi=this.length,xr=0;xr<Xi;xr++)if(er[xr]=$e(this[xr]),xr===Pe.INSPECT_MAX_BYTES){er[xr+1]="...";break}return"<Buffer "+er.join(" ")+">"},Di.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(Di._useTypedArrays)return new Di(this).buffer;for(var er=new Uint8Array(this.length),Xi=0,xr=er.length;Xi<xr;Xi+=1)er[Xi]=this[Xi];return er.buffer};var oi=Di.prototype;function pi(er,Xi,xr){return typeof er!="number"?xr:Xi<=(er=~~er)?Xi:0<=er||0<=(er+=Xi)?er:0}function gi(er){return(er=~~Math.ceil(+er))<0?0:er}function ni(er){return(Array.isArray||function(Xi){return Object.prototype.toString.call(Xi)==="[object Array]"})(er)}function $e(er){return er<16?"0"+er.toString(16):er.toString(16)}function ci(er){for(var Xi=[],xr=0;xr<er.length;xr++){var vr=er.charCodeAt(xr);if(vr<=127)Xi.push(er.charCodeAt(xr));else for(var Dr=xr,Ur=(55296<=vr&&vr<=57343&&xr++,encodeURIComponent(er.slice(Dr,xr+1)).substr(1).split("%")),dn=0;dn<Ur.length;dn++)Xi.push(parseInt(Ur[dn],16))}return Xi}function Bi(er){return Ti.toByteArray(er)}function Hi(er,Xi,xr,vr){for(var Dr=0;Dr<vr&&!(Dr+xr>=Xi.length||Dr>=er.length);Dr++)Xi[Dr+xr]=er[Dr];return Dr}function fr(er){try{return decodeURIComponent(er)}catch{return String.fromCharCode(65533)}}function Cr(er,Xi){br(typeof er=="number","cannot write a non-number as a number"),br(0<=er,"specified a negative value for writing an unsigned value"),br(er<=Xi,"value is larger than maximum value for type"),br(Math.floor(er)===er,"value has a fractional component")}function wr(er,Xi,xr){br(typeof er=="number","cannot write a non-number as a number"),br(er<=Xi,"value larger than maximum allowed value"),br(xr<=er,"value smaller than minimum allowed value"),br(Math.floor(er)===er,"value has a fractional component")}function rr(er,Xi,xr){br(typeof er=="number","cannot write a non-number as a number"),br(er<=Xi,"value larger than maximum allowed value"),br(xr<=er,"value smaller than minimum allowed value")}function br(er,Xi){if(!er)throw new Error(Xi||"Failed assertion")}Di._augment=function(er){return er._isBuffer=!0,er._get=er.get,er._set=er.set,er.get=oi.get,er.set=oi.set,er.write=oi.write,er.toString=oi.toString,er.toLocaleString=oi.toString,er.toJSON=oi.toJSON,er.copy=oi.copy,er.slice=oi.slice,er.readUInt8=oi.readUInt8,er.readUInt16LE=oi.readUInt16LE,er.readUInt16BE=oi.readUInt16BE,er.readUInt32LE=oi.readUInt32LE,er.readUInt32BE=oi.readUInt32BE,er.readInt8=oi.readInt8,er.readInt16LE=oi.readInt16LE,er.readInt16BE=oi.readInt16BE,er.readInt32LE=oi.readInt32LE,er.readInt32BE=oi.readInt32BE,er.readFloatLE=oi.readFloatLE,er.readFloatBE=oi.readFloatBE,er.readDoubleLE=oi.readDoubleLE,er.readDoubleBE=oi.readDoubleBE,er.writeUInt8=oi.writeUInt8,er.writeUInt16LE=oi.writeUInt16LE,er.writeUInt16BE=oi.writeUInt16BE,er.writeUInt32LE=oi.writeUInt32LE,er.writeUInt32BE=oi.writeUInt32BE,er.writeInt8=oi.writeInt8,er.writeInt16LE=oi.writeInt16LE,er.writeInt16BE=oi.writeInt16BE,er.writeInt32LE=oi.writeInt32LE,er.writeInt32BE=oi.writeInt32BE,er.writeFloatLE=oi.writeFloatLE,er.writeFloatBE=oi.writeFloatBE,er.writeDoubleLE=oi.writeDoubleLE,er.writeDoubleBE=oi.writeDoubleBE,er.fill=oi.fill,er.inspect=oi.inspect,er.toArrayBuffer=oi.toArrayBuffer,er}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(ne,we,Pe){(function(Me,Ze,Ti,ii,di,li,mi,Ci,Ai){var Ti=ne("buffer").Buffer,Ii=4,Di=new Ti(Ii);Di.fill(0),we.exports={hash:function(Zi,Fi,Ui,Wi){for(var ar=Fi(function(cr,fi){cr.length%Ii!=0&&(Ae=cr.length+(Ii-cr.length%Ii),cr=Ti.concat([cr,Di],Ae));for(var Ae,ze=[],Ue=fi?cr.readInt32BE:cr.readInt32LE,ti=0;ti<cr.length;ti+=Ii)ze.push(Ue.call(cr,ti));return ze}(Zi=Ti.isBuffer(Zi)?Zi:new Ti(Zi),Wi),8*Zi.length),Fi=Wi,nr=new Ti(Ui),ur=Fi?nr.writeInt32BE:nr.writeInt32LE,lr=0;lr<ar.length;lr++)ur.call(nr,ar[lr],4*lr,!0);return nr}}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],5:[function(ne,we,Pe){(function(Me,Ze,Ti,ii,di,li,mi,Ci,Ai){var Ti=ne("buffer").Buffer,Ii=ne("./sha"),Di=ne("./sha256"),Zi=ne("./rng"),Fi={sha1:Ii,sha256:Di,md5:ne("./md5")},Ui=64,Wi=new Ti(Ui);function ar(cr,fi){var Ae=Fi[cr=cr||"sha1"],ze=[];return Ae||nr("algorithm:",cr,"is not yet supported"),{update:function(Ue){return Ti.isBuffer(Ue)||(Ue=new Ti(Ue)),ze.push(Ue),Ue.length,this},digest:function(Ue){var ti=Ti.concat(ze),ti=fi?function(oi,pi,gi){Ti.isBuffer(pi)||(pi=new Ti(pi)),Ti.isBuffer(gi)||(gi=new Ti(gi)),pi.length>Ui?pi=oi(pi):pi.length<Ui&&(pi=Ti.concat([pi,Wi],Ui));for(var ni=new Ti(Ui),$e=new Ti(Ui),ci=0;ci<Ui;ci++)ni[ci]=54^pi[ci],$e[ci]=92^pi[ci];return gi=oi(Ti.concat([ni,gi])),oi(Ti.concat([$e,gi]))}(Ae,fi,ti):Ae(ti);return ze=null,Ue?ti.toString(Ue):ti}}}function nr(){var cr=[].slice.call(arguments).join(" ");throw new Error([cr,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
2605
- `))}Wi.fill(0),Pe.createHash=function(cr){return ar(cr)},Pe.createHmac=ar,Pe.randomBytes=function(cr,fi){if(!fi||!fi.call)return new Ti(Zi(cr));try{fi.call(this,void 0,new Ti(Zi(cr)))}catch(Ae){fi(Ae)}};var ur,lr=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],ir=function(cr){Pe[cr]=function(){nr("sorry,",cr,"is not implemented yet")}};for(ur in lr)ir(lr[ur])}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(ne,we,Pe){(function(Me,Ze,ie,ii,di,li,mi,Ci,Ai){var Ti=ne("./helpers");function Ii(nr,ur){nr[ur>>5]|=128<<ur%32,nr[14+(ur+64>>>9<<4)]=ur;for(var lr=1732584193,ir=-271733879,cr=-1732584194,fi=271733878,Ae=0;Ae<nr.length;Ae+=16){var ze=lr,Ue=ir,ti=cr,oi=fi,lr=Zi(lr,ir,cr,fi,nr[Ae+0],7,-680876936),fi=Zi(fi,lr,ir,cr,nr[Ae+1],12,-389564586),cr=Zi(cr,fi,lr,ir,nr[Ae+2],17,606105819),ir=Zi(ir,cr,fi,lr,nr[Ae+3],22,-1044525330);lr=Zi(lr,ir,cr,fi,nr[Ae+4],7,-176418897),fi=Zi(fi,lr,ir,cr,nr[Ae+5],12,1200080426),cr=Zi(cr,fi,lr,ir,nr[Ae+6],17,-1473231341),ir=Zi(ir,cr,fi,lr,nr[Ae+7],22,-45705983),lr=Zi(lr,ir,cr,fi,nr[Ae+8],7,1770035416),fi=Zi(fi,lr,ir,cr,nr[Ae+9],12,-1958414417),cr=Zi(cr,fi,lr,ir,nr[Ae+10],17,-42063),ir=Zi(ir,cr,fi,lr,nr[Ae+11],22,-1990404162),lr=Zi(lr,ir,cr,fi,nr[Ae+12],7,1804603682),fi=Zi(fi,lr,ir,cr,nr[Ae+13],12,-40341101),cr=Zi(cr,fi,lr,ir,nr[Ae+14],17,-1502002290),lr=Fi(lr,ir=Zi(ir,cr,fi,lr,nr[Ae+15],22,1236535329),cr,fi,nr[Ae+1],5,-165796510),fi=Fi(fi,lr,ir,cr,nr[Ae+6],9,-1069501632),cr=Fi(cr,fi,lr,ir,nr[Ae+11],14,643717713),ir=Fi(ir,cr,fi,lr,nr[Ae+0],20,-373897302),lr=Fi(lr,ir,cr,fi,nr[Ae+5],5,-701558691),fi=Fi(fi,lr,ir,cr,nr[Ae+10],9,38016083),cr=Fi(cr,fi,lr,ir,nr[Ae+15],14,-660478335),ir=Fi(ir,cr,fi,lr,nr[Ae+4],20,-405537848),lr=Fi(lr,ir,cr,fi,nr[Ae+9],5,568446438),fi=Fi(fi,lr,ir,cr,nr[Ae+14],9,-1019803690),cr=Fi(cr,fi,lr,ir,nr[Ae+3],14,-187363961),ir=Fi(ir,cr,fi,lr,nr[Ae+8],20,1163531501),lr=Fi(lr,ir,cr,fi,nr[Ae+13],5,-1444681467),fi=Fi(fi,lr,ir,cr,nr[Ae+2],9,-51403784),cr=Fi(cr,fi,lr,ir,nr[Ae+7],14,1735328473),lr=Ui(lr,ir=Fi(ir,cr,fi,lr,nr[Ae+12],20,-1926607734),cr,fi,nr[Ae+5],4,-378558),fi=Ui(fi,lr,ir,cr,nr[Ae+8],11,-2022574463),cr=Ui(cr,fi,lr,ir,nr[Ae+11],16,1839030562),ir=Ui(ir,cr,fi,lr,nr[Ae+14],23,-35309556),lr=Ui(lr,ir,cr,fi,nr[Ae+1],4,-1530992060),fi=Ui(fi,lr,ir,cr,nr[Ae+4],11,1272893353),cr=Ui(cr,fi,lr,ir,nr[Ae+7],16,-155497632),ir=Ui(ir,cr,fi,lr,nr[Ae+10],23,-1094730640),lr=Ui(lr,ir,cr,fi,nr[Ae+13],4,681279174),fi=Ui(fi,lr,ir,cr,nr[Ae+0],11,-358537222),cr=Ui(cr,fi,lr,ir,nr[Ae+3],16,-722521979),ir=Ui(ir,cr,fi,lr,nr[Ae+6],23,76029189),lr=Ui(lr,ir,cr,fi,nr[Ae+9],4,-640364487),fi=Ui(fi,lr,ir,cr,nr[Ae+12],11,-421815835),cr=Ui(cr,fi,lr,ir,nr[Ae+15],16,530742520),lr=Wi(lr,ir=Ui(ir,cr,fi,lr,nr[Ae+2],23,-995338651),cr,fi,nr[Ae+0],6,-198630844),fi=Wi(fi,lr,ir,cr,nr[Ae+7],10,1126891415),cr=Wi(cr,fi,lr,ir,nr[Ae+14],15,-1416354905),ir=Wi(ir,cr,fi,lr,nr[Ae+5],21,-57434055),lr=Wi(lr,ir,cr,fi,nr[Ae+12],6,1700485571),fi=Wi(fi,lr,ir,cr,nr[Ae+3],10,-1894986606),cr=Wi(cr,fi,lr,ir,nr[Ae+10],15,-1051523),ir=Wi(ir,cr,fi,lr,nr[Ae+1],21,-2054922799),lr=Wi(lr,ir,cr,fi,nr[Ae+8],6,1873313359),fi=Wi(fi,lr,ir,cr,nr[Ae+15],10,-30611744),cr=Wi(cr,fi,lr,ir,nr[Ae+6],15,-1560198380),ir=Wi(ir,cr,fi,lr,nr[Ae+13],21,1309151649),lr=Wi(lr,ir,cr,fi,nr[Ae+4],6,-145523070),fi=Wi(fi,lr,ir,cr,nr[Ae+11],10,-1120210379),cr=Wi(cr,fi,lr,ir,nr[Ae+2],15,718787259),ir=Wi(ir,cr,fi,lr,nr[Ae+9],21,-343485551),lr=ar(lr,ze),ir=ar(ir,Ue),cr=ar(cr,ti),fi=ar(fi,oi)}return Array(lr,ir,cr,fi)}function Di(nr,ur,lr,ir,cr,fi){return ar((ur=ar(ar(ur,nr),ar(ir,fi)))<<cr|ur>>>32-cr,lr)}function Zi(nr,ur,lr,ir,cr,fi,Ae){return Di(ur&lr|~ur&ir,nr,ur,cr,fi,Ae)}function Fi(nr,ur,lr,ir,cr,fi,Ae){return Di(ur&ir|lr&~ir,nr,ur,cr,fi,Ae)}function Ui(nr,ur,lr,ir,cr,fi,Ae){return Di(ur^lr^ir,nr,ur,cr,fi,Ae)}function Wi(nr,ur,lr,ir,cr,fi,Ae){return Di(lr^(ur|~ir),nr,ur,cr,fi,Ae)}function ar(nr,ur){var lr=(65535&nr)+(65535&ur);return(nr>>16)+(ur>>16)+(lr>>16)<<16|65535&lr}we.exports=function(nr){return Ti.hash(nr,Ii,16)}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(ne,we,Pe){(function(Me,Ze,ie,ii,di,li,mi,Ci,Ai){we.exports=function(Ti){for(var Ii,Di=new Array(Ti),Zi=0;Zi<Ti;Zi++)(3&Zi)==0&&(Ii=4294967296*Math.random()),Di[Zi]=Ii>>>((3&Zi)<<3)&255;return Di}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(ne,we,Pe){(function(Me,Ze,ie,ii,di,li,mi,Ci,Ai){var Ti=ne("./helpers");function Ii(Fi,Ui){Fi[Ui>>5]|=128<<24-Ui%32,Fi[15+(Ui+64>>9<<4)]=Ui;for(var Wi,ar,nr,ur=Array(80),lr=1732584193,ir=-271733879,cr=-1732584194,fi=271733878,Ae=-1009589776,ze=0;ze<Fi.length;ze+=16){for(var Ue=lr,ti=ir,oi=cr,pi=fi,gi=Ae,ni=0;ni<80;ni++){ur[ni]=ni<16?Fi[ze+ni]:Zi(ur[ni-3]^ur[ni-8]^ur[ni-14]^ur[ni-16],1);var $e=Di(Di(Zi(lr,5),($e=ir,ar=cr,nr=fi,(Wi=ni)<20?$e&ar|~$e&nr:!(Wi<40)&&Wi<60?$e&ar|$e&nr|ar&nr:$e^ar^nr)),Di(Di(Ae,ur[ni]),(Wi=ni)<20?1518500249:Wi<40?1859775393:Wi<60?-1894007588:-899497514)),Ae=fi,fi=cr,cr=Zi(ir,30),ir=lr,lr=$e}lr=Di(lr,Ue),ir=Di(ir,ti),cr=Di(cr,oi),fi=Di(fi,pi),Ae=Di(Ae,gi)}return Array(lr,ir,cr,fi,Ae)}function Di(Fi,Ui){var Wi=(65535&Fi)+(65535&Ui);return(Fi>>16)+(Ui>>16)+(Wi>>16)<<16|65535&Wi}function Zi(Fi,Ui){return Fi<<Ui|Fi>>>32-Ui}we.exports=function(Fi){return Ti.hash(Fi,Ii,20,!0)}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(ne,we,Pe){(function(Me,Ze,ie,ii,di,li,mi,Ci,Ai){function Ti(Ui,Wi){var ar=(65535&Ui)+(65535&Wi);return(Ui>>16)+(Wi>>16)+(ar>>16)<<16|65535&ar}function Ii(Ui,Wi){var ar,nr=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),ur=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),lr=new Array(64);Ui[Wi>>5]|=128<<24-Wi%32,Ui[15+(Wi+64>>9<<4)]=Wi;for(var ir,cr,fi=0;fi<Ui.length;fi+=16){for(var Ae=ur[0],ze=ur[1],Ue=ur[2],ti=ur[3],oi=ur[4],pi=ur[5],gi=ur[6],ni=ur[7],$e=0;$e<64;$e++)lr[$e]=$e<16?Ui[$e+fi]:Ti(Ti(Ti((cr=lr[$e-2],Zi(cr,17)^Zi(cr,19)^Fi(cr,10)),lr[$e-7]),(cr=lr[$e-15],Zi(cr,7)^Zi(cr,18)^Fi(cr,3))),lr[$e-16]),ar=Ti(Ti(Ti(Ti(ni,Zi(cr=oi,6)^Zi(cr,11)^Zi(cr,25)),oi&pi^~oi&gi),nr[$e]),lr[$e]),ir=Ti(Zi(ir=Ae,2)^Zi(ir,13)^Zi(ir,22),Ae&ze^Ae&Ue^ze&Ue),ni=gi,gi=pi,pi=oi,oi=Ti(ti,ar),ti=Ue,Ue=ze,ze=Ae,Ae=Ti(ar,ir);ur[0]=Ti(Ae,ur[0]),ur[1]=Ti(ze,ur[1]),ur[2]=Ti(Ue,ur[2]),ur[3]=Ti(ti,ur[3]),ur[4]=Ti(oi,ur[4]),ur[5]=Ti(pi,ur[5]),ur[6]=Ti(gi,ur[6]),ur[7]=Ti(ni,ur[7])}return ur}var Di=ne("./helpers"),Zi=function(Ui,Wi){return Ui>>>Wi|Ui<<32-Wi},Fi=function(Ui,Wi){return Ui>>>Wi};we.exports=function(Ui){return Di.hash(Ui,Ii,32,!0)}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(ne,we,Pe){(function(Me,Ze,ie,ii,di,li,mi,Ci,Ai){Pe.read=function(Ti,Ii,Di,Zi,fi){var Ui,Wi,ar=8*fi-Zi-1,nr=(1<<ar)-1,ur=nr>>1,lr=-7,ir=Di?fi-1:0,cr=Di?-1:1,fi=Ti[Ii+ir];for(ir+=cr,Ui=fi&(1<<-lr)-1,fi>>=-lr,lr+=ar;0<lr;Ui=256*Ui+Ti[Ii+ir],ir+=cr,lr-=8);for(Wi=Ui&(1<<-lr)-1,Ui>>=-lr,lr+=Zi;0<lr;Wi=256*Wi+Ti[Ii+ir],ir+=cr,lr-=8);if(Ui===0)Ui=1-ur;else{if(Ui===nr)return Wi?NaN:1/0*(fi?-1:1);Wi+=Math.pow(2,Zi),Ui-=ur}return(fi?-1:1)*Wi*Math.pow(2,Ui-Zi)},Pe.write=function(Ti,Ii,Di,Zi,Fi,Ae){var Wi,ar,nr=8*Ae-Fi-1,ur=(1<<nr)-1,lr=ur>>1,ir=Fi===23?Math.pow(2,-24)-Math.pow(2,-77):0,cr=Zi?0:Ae-1,fi=Zi?1:-1,Ae=Ii<0||Ii===0&&1/Ii<0?1:0;for(Ii=Math.abs(Ii),isNaN(Ii)||Ii===1/0?(ar=isNaN(Ii)?1:0,Wi=ur):(Wi=Math.floor(Math.log(Ii)/Math.LN2),Ii*(Zi=Math.pow(2,-Wi))<1&&(Wi--,Zi*=2),2<=(Ii+=1<=Wi+lr?ir/Zi:ir*Math.pow(2,1-lr))*Zi&&(Wi++,Zi/=2),ur<=Wi+lr?(ar=0,Wi=ur):1<=Wi+lr?(ar=(Ii*Zi-1)*Math.pow(2,Fi),Wi+=lr):(ar=Ii*Math.pow(2,lr-1)*Math.pow(2,Fi),Wi=0));8<=Fi;Ti[Di+cr]=255&ar,cr+=fi,ar/=256,Fi-=8);for(Wi=Wi<<Fi|ar,nr+=Fi;0<nr;Ti[Di+cr]=255&Wi,cr+=fi,Wi/=256,nr-=8);Ti[Di+cr-fi]|=128*Ae}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/ieee754")},{buffer:3,lYpoI2:11}],11:[function(ne,we,Pe){(function(Me,Ze,ie,ii,di,li,mi,Ci,Ai){var Ti,Ii,Di;function Zi(){}(Me=we.exports={}).nextTick=(Ii=typeof window<"u"&&window.setImmediate,Di=typeof window<"u"&&window.postMessage&&window.addEventListener,Ii?function(Fi){return window.setImmediate(Fi)}:Di?(Ti=[],window.addEventListener("message",function(Fi){var Ui=Fi.source;Ui!==window&&Ui!==null||Fi.data!=="process-tick"||(Fi.stopPropagation(),0<Ti.length&&Ti.shift()())},!0),function(Fi){Ti.push(Fi),window.postMessage("process-tick","*")}):function(Fi){setTimeout(Fi,0)}),Me.title="browser",Me.browser=!0,Me.env={},Me.argv=[],Me.on=Zi,Me.addListener=Zi,Me.once=Zi,Me.off=Zi,Me.removeListener=Zi,Me.removeAllListeners=Zi,Me.emit=Zi,Me.binding=function(Fi){throw new Error("process.binding is not supported")},Me.cwd=function(){return"/"},Me.chdir=function(Fi){throw new Error("process.chdir is not supported")}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:11}]},{},[1])(1)})})(object_hash);const hash=object_hash.exports,embedAPIV2BaseUrl={}.V_EMBEDV2_BACKEDND_URL,IMAGE_TTL_IN_SECONDS=60*60*24*1;function parseCloudflareImagesDeliveryUrl(m){try{const c=new URL(m);if(c.hostname==="imagedelivery.net"){const[,ne,we,Pe]=c.pathname.split("/")||[];if(ne&&we&&Pe)return{scopeId:ne,imageId:we,variant:Pe};throw new Error("Invalid Cloudflare Images URL")}throw new Error("Invalid Cloudflare Images URL")}catch{throw new Error("Invalid URL")}}async function uploadImage(m,c,ne,we,Pe){const Me=`${embedAPIV2BaseUrl}/api/image/session?${new URLSearchParams({key:hash({field:c.field,templateId:m}),ttl:String(IMAGE_TTL_IN_SECONDS)})}`,Ze=new FormData;Ze.append("file",ne,we);const ie=await fetchWithProgressV1({url:Me,method:"POST",data:Ze,onUploadProgress:Pe});if(ie.type==="application/json")return JSON.parse(await ie.text());throw new Error("Invalid response from Cloudflare Images")}const colorNames={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},reverseNames=Object.create(null);for(const m in colorNames)Object.hasOwn(colorNames,m)&&(reverseNames[colorNames[m]]=m);const cs={to:{},get:{}};cs.get=function(m){const c=m.slice(0,3).toLowerCase();let ne,we;switch(c){case"hsl":{ne=cs.get.hsl(m),we="hsl";break}case"hwb":{ne=cs.get.hwb(m),we="hwb";break}default:{ne=cs.get.rgb(m),we="rgb";break}}return ne?{model:we,value:ne}:null},cs.get.rgb=function(m){if(!m)return null;const c=/^#([a-f\d]{3,4})$/i,ne=/^#([a-f\d]{6})([a-f\d]{2})?$/i,we=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,Pe=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,Me=/^(\w+)$/;let Ze=[0,0,0,1],ie,ii,di;if(ie=m.match(ne)){for(di=ie[2],ie=ie[1],ii=0;ii<3;ii++){const li=ii*2;Ze[ii]=Number.parseInt(ie.slice(li,li+2),16)}di&&(Ze[3]=Number.parseInt(di,16)/255)}else if(ie=m.match(c)){for(ie=ie[1],di=ie[3],ii=0;ii<3;ii++)Ze[ii]=Number.parseInt(ie[ii]+ie[ii],16);di&&(Ze[3]=Number.parseInt(di+di,16)/255)}else if(ie=m.match(we)){for(ii=0;ii<3;ii++)Ze[ii]=Number.parseInt(ie[ii+1],10);ie[4]&&(Ze[3]=ie[5]?Number.parseFloat(ie[4])*.01:Number.parseFloat(ie[4]))}else if(ie=m.match(Pe)){for(ii=0;ii<3;ii++)Ze[ii]=Math.round(Number.parseFloat(ie[ii+1])*2.55);ie[4]&&(Ze[3]=ie[5]?Number.parseFloat(ie[4])*.01:Number.parseFloat(ie[4]))}else return(ie=m.match(Me))?ie[1]==="transparent"?[0,0,0,0]:Object.hasOwn(colorNames,ie[1])?(Ze=colorNames[ie[1]],Ze[3]=1,Ze):null:null;for(ii=0;ii<3;ii++)Ze[ii]=clamp(Ze[ii],0,255);return Ze[3]=clamp(Ze[3],0,1),Ze},cs.get.hsl=function(m){if(!m)return null;const c=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,ne=m.match(c);if(ne){const we=Number.parseFloat(ne[4]),Pe=(Number.parseFloat(ne[1])%360+360)%360,Me=clamp(Number.parseFloat(ne[2]),0,100),Ze=clamp(Number.parseFloat(ne[3]),0,100),ie=clamp(Number.isNaN(we)?1:we,0,1);return[Pe,Me,Ze,ie]}return null},cs.get.hwb=function(m){if(!m)return null;const c=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d.]+)%\s*,\s*([+-]?[\d.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,ne=m.match(c);if(ne){const we=Number.parseFloat(ne[4]),Pe=(Number.parseFloat(ne[1])%360+360)%360,Me=clamp(Number.parseFloat(ne[2]),0,100),Ze=clamp(Number.parseFloat(ne[3]),0,100),ie=clamp(Number.isNaN(we)?1:we,0,1);return[Pe,Me,Ze,ie]}return null},cs.to.hex=function(...m){return"#"+hexDouble(m[0])+hexDouble(m[1])+hexDouble(m[2])+(m[3]<1?hexDouble(Math.round(m[3]*255)):"")},cs.to.rgb=function(...m){return m.length<4||m[3]===1?"rgb("+Math.round(m[0])+", "+Math.round(m[1])+", "+Math.round(m[2])+")":"rgba("+Math.round(m[0])+", "+Math.round(m[1])+", "+Math.round(m[2])+", "+m[3]+")"},cs.to.rgb.percent=function(...m){const c=Math.round(m[0]/255*100),ne=Math.round(m[1]/255*100),we=Math.round(m[2]/255*100);return m.length<4||m[3]===1?"rgb("+c+"%, "+ne+"%, "+we+"%)":"rgba("+c+"%, "+ne+"%, "+we+"%, "+m[3]+")"},cs.to.hsl=function(...m){return m.length<4||m[3]===1?"hsl("+m[0]+", "+m[1]+"%, "+m[2]+"%)":"hsla("+m[0]+", "+m[1]+"%, "+m[2]+"%, "+m[3]+")"},cs.to.hwb=function(...m){let c="";return m.length>=4&&m[3]!==1&&(c=", "+m[3]),"hwb("+m[0]+", "+m[1]+"%, "+m[2]+"%"+c+")"},cs.to.keyword=function(...m){return reverseNames[m.slice(0,3)]};function clamp(m,c,ne){return Math.min(Math.max(c,m),ne)}function hexDouble(m){const c=Math.round(m).toString(16).toUpperCase();return c.length<2?"0"+c:c}const cssKeywords={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},reverseKeywords={};for(const m of Object.keys(cssKeywords))reverseKeywords[cssKeywords[m]]=m;const convert$1={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},LAB_FT=(6/29)**3;for(const m of Object.keys(convert$1)){if(!("channels"in convert$1[m]))throw new Error("missing channels property: "+m);if(!("labels"in convert$1[m]))throw new Error("missing channel labels property: "+m);if(convert$1[m].labels.length!==convert$1[m].channels)throw new Error("channel and label counts mismatch: "+m);const{channels:c,labels:ne}=convert$1[m];delete convert$1[m].channels,delete convert$1[m].labels,Object.defineProperty(convert$1[m],"channels",{value:c}),Object.defineProperty(convert$1[m],"labels",{value:ne})}convert$1.rgb.hsl=function(m){const c=m[0]/255,ne=m[1]/255,we=m[2]/255,Pe=Math.min(c,ne,we),Me=Math.max(c,ne,we),Ze=Me-Pe;let ie,ii;switch(Me){case Pe:{ie=0;break}case c:{ie=(ne-we)/Ze;break}case ne:{ie=2+(we-c)/Ze;break}case we:{ie=4+(c-ne)/Ze;break}}ie=Math.min(ie*60,360),ie<0&&(ie+=360);const di=(Pe+Me)/2;return Me===Pe?ii=0:di<=.5?ii=Ze/(Me+Pe):ii=Ze/(2-Me-Pe),[ie,ii*100,di*100]},convert$1.rgb.hsv=function(m){let c,ne,we,Pe,Me;const Ze=m[0]/255,ie=m[1]/255,ii=m[2]/255,di=Math.max(Ze,ie,ii),li=di-Math.min(Ze,ie,ii),mi=function(Ci){return(di-Ci)/6/li+1/2};if(li===0)Pe=0,Me=0;else{switch(Me=li/di,c=mi(Ze),ne=mi(ie),we=mi(ii),di){case Ze:{Pe=we-ne;break}case ie:{Pe=1/3+c-we;break}case ii:{Pe=2/3+ne-c;break}}Pe<0?Pe+=1:Pe>1&&(Pe-=1)}return[Pe*360,Me*100,di*100]},convert$1.rgb.hwb=function(m){const c=m[0],ne=m[1];let we=m[2];const Pe=convert$1.rgb.hsl(m)[0],Me=1/255*Math.min(c,Math.min(ne,we));return we=1-1/255*Math.max(c,Math.max(ne,we)),[Pe,Me*100,we*100]},convert$1.rgb.cmyk=function(m){const c=m[0]/255,ne=m[1]/255,we=m[2]/255,Pe=Math.min(1-c,1-ne,1-we),Me=(1-c-Pe)/(1-Pe)||0,Ze=(1-ne-Pe)/(1-Pe)||0,ie=(1-we-Pe)/(1-Pe)||0;return[Me*100,Ze*100,ie*100,Pe*100]};function comparativeDistance(m,c){return(m[0]-c[0])**2+(m[1]-c[1])**2+(m[2]-c[2])**2}convert$1.rgb.keyword=function(m){const c=reverseKeywords[m];if(c)return c;let ne=Number.POSITIVE_INFINITY,we;for(const Pe of Object.keys(cssKeywords)){const Me=cssKeywords[Pe],Ze=comparativeDistance(m,Me);Ze<ne&&(ne=Ze,we=Pe)}return we},convert$1.keyword.rgb=function(m){return cssKeywords[m]},convert$1.rgb.xyz=function(m){let c=m[0]/255,ne=m[1]/255,we=m[2]/255;c=c>.04045?((c+.055)/1.055)**2.4:c/12.92,ne=ne>.04045?((ne+.055)/1.055)**2.4:ne/12.92,we=we>.04045?((we+.055)/1.055)**2.4:we/12.92;const Pe=c*.4124564+ne*.3575761+we*.1804375,Me=c*.2126729+ne*.7151522+we*.072175,Ze=c*.0193339+ne*.119192+we*.9503041;return[Pe*100,Me*100,Ze*100]},convert$1.rgb.lab=function(m){const c=convert$1.rgb.xyz(m);let ne=c[0],we=c[1],Pe=c[2];ne/=95.047,we/=100,Pe/=108.883,ne=ne>LAB_FT?ne**(1/3):7.787*ne+16/116,we=we>LAB_FT?we**(1/3):7.787*we+16/116,Pe=Pe>LAB_FT?Pe**(1/3):7.787*Pe+16/116;const Me=116*we-16,Ze=500*(ne-we),ie=200*(we-Pe);return[Me,Ze,ie]},convert$1.hsl.rgb=function(m){const c=m[0]/360,ne=m[1]/100,we=m[2]/100;let Pe,Me;if(ne===0)return Me=we*255,[Me,Me,Me];const Ze=we<.5?we*(1+ne):we+ne-we*ne,ie=2*we-Ze,ii=[0,0,0];for(let di=0;di<3;di++)Pe=c+1/3*-(di-1),Pe<0&&Pe++,Pe>1&&Pe--,6*Pe<1?Me=ie+(Ze-ie)*6*Pe:2*Pe<1?Me=Ze:3*Pe<2?Me=ie+(Ze-ie)*(2/3-Pe)*6:Me=ie,ii[di]=Me*255;return ii},convert$1.hsl.hsv=function(m){const c=m[0];let ne=m[1]/100,we=m[2]/100,Pe=ne;const Me=Math.max(we,.01);we*=2,ne*=we<=1?we:2-we,Pe*=Me<=1?Me:2-Me;const Ze=(we+ne)/2,ie=we===0?2*Pe/(Me+Pe):2*ne/(we+ne);return[c,ie*100,Ze*100]},convert$1.hsv.rgb=function(m){const c=m[0]/60,ne=m[1]/100;let we=m[2]/100;const Pe=Math.floor(c)%6,Me=c-Math.floor(c),Ze=255*we*(1-ne),ie=255*we*(1-ne*Me),ii=255*we*(1-ne*(1-Me));switch(we*=255,Pe){case 0:return[we,ii,Ze];case 1:return[ie,we,Ze];case 2:return[Ze,we,ii];case 3:return[Ze,ie,we];case 4:return[ii,Ze,we];case 5:return[we,Ze,ie]}},convert$1.hsv.hsl=function(m){const c=m[0],ne=m[1]/100,we=m[2]/100,Pe=Math.max(we,.01);let Me,Ze;Ze=(2-ne)*we;const ie=(2-ne)*Pe;return Me=ne*Pe,Me/=ie<=1?ie:2-ie,Me=Me||0,Ze/=2,[c,Me*100,Ze*100]},convert$1.hwb.rgb=function(m){const c=m[0]/360;let ne=m[1]/100,we=m[2]/100;const Pe=ne+we;let Me;Pe>1&&(ne/=Pe,we/=Pe);const Ze=Math.floor(6*c),ie=1-we;Me=6*c-Ze,(Ze&1)!==0&&(Me=1-Me);const ii=ne+Me*(ie-ne);let di,li,mi;switch(Ze){default:case 6:case 0:{di=ie,li=ii,mi=ne;break}case 1:{di=ii,li=ie,mi=ne;break}case 2:{di=ne,li=ie,mi=ii;break}case 3:{di=ne,li=ii,mi=ie;break}case 4:{di=ii,li=ne,mi=ie;break}case 5:{di=ie,li=ne,mi=ii;break}}return[di*255,li*255,mi*255]},convert$1.cmyk.rgb=function(m){const c=m[0]/100,ne=m[1]/100,we=m[2]/100,Pe=m[3]/100,Me=1-Math.min(1,c*(1-Pe)+Pe),Ze=1-Math.min(1,ne*(1-Pe)+Pe),ie=1-Math.min(1,we*(1-Pe)+Pe);return[Me*255,Ze*255,ie*255]},convert$1.xyz.rgb=function(m){const c=m[0]/100,ne=m[1]/100,we=m[2]/100;let Pe,Me,Ze;return Pe=c*3.2404542+ne*-1.5371385+we*-.4985314,Me=c*-.969266+ne*1.8760108+we*.041556,Ze=c*.0556434+ne*-.2040259+we*1.0572252,Pe=Pe>.0031308?1.055*Pe**(1/2.4)-.055:Pe*12.92,Me=Me>.0031308?1.055*Me**(1/2.4)-.055:Me*12.92,Ze=Ze>.0031308?1.055*Ze**(1/2.4)-.055:Ze*12.92,Pe=Math.min(Math.max(0,Pe),1),Me=Math.min(Math.max(0,Me),1),Ze=Math.min(Math.max(0,Ze),1),[Pe*255,Me*255,Ze*255]},convert$1.xyz.lab=function(m){let c=m[0],ne=m[1],we=m[2];c/=95.047,ne/=100,we/=108.883,c=c>LAB_FT?c**(1/3):7.787*c+16/116,ne=ne>LAB_FT?ne**(1/3):7.787*ne+16/116,we=we>LAB_FT?we**(1/3):7.787*we+16/116;const Pe=116*ne-16,Me=500*(c-ne),Ze=200*(ne-we);return[Pe,Me,Ze]},convert$1.lab.xyz=function(m){const c=m[0],ne=m[1],we=m[2];let Pe,Me,Ze;Me=(c+16)/116,Pe=ne/500+Me,Ze=Me-we/200;const ie=Me**3,ii=Pe**3,di=Ze**3;return Me=ie>LAB_FT?ie:(Me-16/116)/7.787,Pe=ii>LAB_FT?ii:(Pe-16/116)/7.787,Ze=di>LAB_FT?di:(Ze-16/116)/7.787,Pe*=95.047,Me*=100,Ze*=108.883,[Pe,Me,Ze]},convert$1.lab.lch=function(m){const c=m[0],ne=m[1],we=m[2];let Pe;Pe=Math.atan2(we,ne)*360/2/Math.PI,Pe<0&&(Pe+=360);const Ze=Math.sqrt(ne*ne+we*we);return[c,Ze,Pe]},convert$1.lch.lab=function(m){const c=m[0],ne=m[1],Pe=m[2]/360*2*Math.PI,Me=ne*Math.cos(Pe),Ze=ne*Math.sin(Pe);return[c,Me,Ze]},convert$1.rgb.ansi16=function(m,c=null){const[ne,we,Pe]=m;let Me=c===null?convert$1.rgb.hsv(m)[2]:c;if(Me=Math.round(Me/50),Me===0)return 30;let Ze=30+(Math.round(Pe/255)<<2|Math.round(we/255)<<1|Math.round(ne/255));return Me===2&&(Ze+=60),Ze},convert$1.hsv.ansi16=function(m){return convert$1.rgb.ansi16(convert$1.hsv.rgb(m),m[2])},convert$1.rgb.ansi256=function(m){const c=m[0],ne=m[1],we=m[2];return c>>4===ne>>4&&ne>>4===we>>4?c<8?16:c>248?231:Math.round((c-8)/247*24)+232:16+36*Math.round(c/255*5)+6*Math.round(ne/255*5)+Math.round(we/255*5)},convert$1.ansi16.rgb=function(m){m=m[0];let c=m%10;if(c===0||c===7)return m>50&&(c+=3.5),c=c/10.5*255,[c,c,c];const ne=(Math.trunc(m>50)+1)*.5,we=(c&1)*ne*255,Pe=(c>>1&1)*ne*255,Me=(c>>2&1)*ne*255;return[we,Pe,Me]},convert$1.ansi256.rgb=function(m){if(m=m[0],m>=232){const Me=(m-232)*10+8;return[Me,Me,Me]}m-=16;let c;const ne=Math.floor(m/36)/5*255,we=Math.floor((c=m%36)/6)/5*255,Pe=c%6/5*255;return[ne,we,Pe]},convert$1.rgb.hex=function(m){const ne=(((Math.round(m[0])&255)<<16)+((Math.round(m[1])&255)<<8)+(Math.round(m[2])&255)).toString(16).toUpperCase();return"000000".slice(ne.length)+ne},convert$1.hex.rgb=function(m){const c=m.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!c)return[0,0,0];let ne=c[0];c[0].length===3&&(ne=[...ne].map(ie=>ie+ie).join(""));const we=Number.parseInt(ne,16),Pe=we>>16&255,Me=we>>8&255,Ze=we&255;return[Pe,Me,Ze]},convert$1.rgb.hcg=function(m){const c=m[0]/255,ne=m[1]/255,we=m[2]/255,Pe=Math.max(Math.max(c,ne),we),Me=Math.min(Math.min(c,ne),we),Ze=Pe-Me;let ie;const ii=Ze<1?Me/(1-Ze):0;return Ze<=0?ie=0:Pe===c?ie=(ne-we)/Ze%6:Pe===ne?ie=2+(we-c)/Ze:ie=4+(c-ne)/Ze,ie/=6,ie%=1,[ie*360,Ze*100,ii*100]},convert$1.hsl.hcg=function(m){const c=m[1]/100,ne=m[2]/100,we=ne<.5?2*c*ne:2*c*(1-ne);let Pe=0;return we<1&&(Pe=(ne-.5*we)/(1-we)),[m[0],we*100,Pe*100]},convert$1.hsv.hcg=function(m){const c=m[1]/100,ne=m[2]/100,we=c*ne;let Pe=0;return we<1&&(Pe=(ne-we)/(1-we)),[m[0],we*100,Pe*100]},convert$1.hcg.rgb=function(m){const c=m[0]/360,ne=m[1]/100,we=m[2]/100;if(ne===0)return[we*255,we*255,we*255];const Pe=[0,0,0],Me=c%1*6,Ze=Me%1,ie=1-Ze;let ii=0;switch(Math.floor(Me)){case 0:{Pe[0]=1,Pe[1]=Ze,Pe[2]=0;break}case 1:{Pe[0]=ie,Pe[1]=1,Pe[2]=0;break}case 2:{Pe[0]=0,Pe[1]=1,Pe[2]=Ze;break}case 3:{Pe[0]=0,Pe[1]=ie,Pe[2]=1;break}case 4:{Pe[0]=Ze,Pe[1]=0,Pe[2]=1;break}default:Pe[0]=1,Pe[1]=0,Pe[2]=ie}return ii=(1-ne)*we,[(ne*Pe[0]+ii)*255,(ne*Pe[1]+ii)*255,(ne*Pe[2]+ii)*255]},convert$1.hcg.hsv=function(m){const c=m[1]/100,ne=m[2]/100,we=c+ne*(1-c);let Pe=0;return we>0&&(Pe=c/we),[m[0],Pe*100,we*100]},convert$1.hcg.hsl=function(m){const c=m[1]/100,we=m[2]/100*(1-c)+.5*c;let Pe=0;return we>0&&we<.5?Pe=c/(2*we):we>=.5&&we<1&&(Pe=c/(2*(1-we))),[m[0],Pe*100,we*100]},convert$1.hcg.hwb=function(m){const c=m[1]/100,ne=m[2]/100,we=c+ne*(1-c);return[m[0],(we-c)*100,(1-we)*100]},convert$1.hwb.hcg=function(m){const c=m[1]/100,we=1-m[2]/100,Pe=we-c;let Me=0;return Pe<1&&(Me=(we-Pe)/(1-Pe)),[m[0],Pe*100,Me*100]},convert$1.apple.rgb=function(m){return[m[0]/65535*255,m[1]/65535*255,m[2]/65535*255]},convert$1.rgb.apple=function(m){return[m[0]/255*65535,m[1]/255*65535,m[2]/255*65535]},convert$1.gray.rgb=function(m){return[m[0]/100*255,m[0]/100*255,m[0]/100*255]},convert$1.gray.hsl=function(m){return[0,0,m[0]]},convert$1.gray.hsv=convert$1.gray.hsl,convert$1.gray.hwb=function(m){return[0,100,m[0]]},convert$1.gray.cmyk=function(m){return[0,0,0,m[0]]},convert$1.gray.lab=function(m){return[m[0],0,0]},convert$1.gray.hex=function(m){const c=Math.round(m[0]/100*255)&255,we=((c<<16)+(c<<8)+c).toString(16).toUpperCase();return"000000".slice(we.length)+we},convert$1.rgb.gray=function(m){return[(m[0]+m[1]+m[2])/3/255*100]};function buildGraph(){const m={},c=Object.keys(convert$1);for(let{length:ne}=c,we=0;we<ne;we++)m[c[we]]={distance:-1,parent:null};return m}function deriveBFS(m){const c=buildGraph(),ne=[m];for(c[m].distance=0;ne.length>0;){const we=ne.pop(),Pe=Object.keys(convert$1[we]);for(let{length:Me}=Pe,Ze=0;Ze<Me;Ze++){const ie=Pe[Ze],ii=c[ie];ii.distance===-1&&(ii.distance=c[we].distance+1,ii.parent=we,ne.unshift(ie))}}return c}function link(m,c){return function(ne){return c(m(ne))}}function wrapConversion(m,c){const ne=[c[m].parent,m];let we=convert$1[c[m].parent][m],Pe=c[m].parent;for(;c[Pe].parent;)ne.unshift(c[Pe].parent),we=link(convert$1[c[Pe].parent][Pe],we),Pe=c[Pe].parent;return we.conversion=ne,we}function route(m){const c=deriveBFS(m),ne={},we=Object.keys(c);for(let{length:Pe}=we,Me=0;Me<Pe;Me++){const Ze=we[Me];c[Ze].parent!==null&&(ne[Ze]=wrapConversion(Ze,c))}return ne}const convert={},models=Object.keys(convert$1);function wrapRaw(m){const c=function(...ne){const we=ne[0];return we==null?we:(we.length>1&&(ne=we),m(ne))};return"conversion"in m&&(c.conversion=m.conversion),c}function wrapRounded(m){const c=function(...ne){const we=ne[0];if(we==null)return we;we.length>1&&(ne=we);const Pe=m(ne);if(typeof Pe=="object")for(let{length:Me}=Pe,Ze=0;Ze<Me;Ze++)Pe[Ze]=Math.round(Pe[Ze]);return Pe};return"conversion"in m&&(c.conversion=m.conversion),c}for(const m of models){convert[m]={},Object.defineProperty(convert[m],"channels",{value:convert$1[m].channels}),Object.defineProperty(convert[m],"labels",{value:convert$1[m].labels});const c=route(m),ne=Object.keys(c);for(const we of ne){const Pe=c[we];convert[m][we]=wrapRounded(Pe),convert[m][we].raw=wrapRaw(Pe)}}const skippedModels=["keyword","gray","hex"],hashedModelKeys={};for(const m of Object.keys(convert))hashedModelKeys[[...convert[m].labels].sort().join("")]=m;const limiters={};function Color(m,c){if(!(this instanceof Color))return new Color(m,c);if(c&&c in skippedModels&&(c=null),c&&!(c in convert))throw new Error("Unknown model: "+c);let ne,we;if(m==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(m instanceof Color)this.model=m.model,this.color=[...m.color],this.valpha=m.valpha;else if(typeof m=="string"){const Pe=cs.get(m);if(Pe===null)throw new Error("Unable to parse color from string: "+m);this.model=Pe.model,we=convert[this.model].channels,this.color=Pe.value.slice(0,we),this.valpha=typeof Pe.value[we]=="number"?Pe.value[we]:1}else if(m.length>0){this.model=c||"rgb",we=convert[this.model].channels;const Pe=Array.prototype.slice.call(m,0,we);this.color=zeroArray(Pe,we),this.valpha=typeof m[we]=="number"?m[we]:1}else if(typeof m=="number")this.model="rgb",this.color=[m>>16&255,m>>8&255,m&255],this.valpha=1;else{this.valpha=1;const Pe=Object.keys(m);"alpha"in m&&(Pe.splice(Pe.indexOf("alpha"),1),this.valpha=typeof m.alpha=="number"?m.alpha:0);const Me=Pe.sort().join("");if(!(Me in hashedModelKeys))throw new Error("Unable to parse color from object: "+JSON.stringify(m));this.model=hashedModelKeys[Me];const{labels:Ze}=convert[this.model],ie=[];for(ne=0;ne<Ze.length;ne++)ie.push(m[Ze[ne]]);this.color=zeroArray(ie)}if(limiters[this.model])for(we=convert[this.model].channels,ne=0;ne<we;ne++){const Pe=limiters[this.model][ne];Pe&&(this.color[ne]=Pe(this.color[ne]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Color.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(m){let c=this.model in cs.to?this:this.rgb();c=c.round(typeof m=="number"?m:1);const ne=c.valpha===1?c.color:[...c.color,this.valpha];return cs.to[c.model](...ne)},percentString(m){const c=this.rgb().round(typeof m=="number"?m:1),ne=c.valpha===1?c.color:[...c.color,this.valpha];return cs.to.rgb.percent(...ne)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const m={},{channels:c}=convert[this.model],{labels:ne}=convert[this.model];for(let we=0;we<c;we++)m[ne[we]]=this.color[we];return this.valpha!==1&&(m.alpha=this.valpha),m},unitArray(){const m=this.rgb().color;return m[0]/=255,m[1]/=255,m[2]/=255,this.valpha!==1&&m.push(this.valpha),m},unitObject(){const m=this.rgb().object();return m.r/=255,m.g/=255,m.b/=255,this.valpha!==1&&(m.alpha=this.valpha),m},round(m){return m=Math.max(m||0,0),new Color([...this.color.map(roundToPlace(m)),this.valpha],this.model)},alpha(m){return m!==void 0?new Color([...this.color,Math.max(0,Math.min(1,m))],this.model):this.valpha},red:getset("rgb",0,maxfn(255)),green:getset("rgb",1,maxfn(255)),blue:getset("rgb",2,maxfn(255)),hue:getset(["hsl","hsv","hsl","hwb","hcg"],0,m=>(m%360+360)%360),saturationl:getset("hsl",1,maxfn(100)),lightness:getset("hsl",2,maxfn(100)),saturationv:getset("hsv",1,maxfn(100)),value:getset("hsv",2,maxfn(100)),chroma:getset("hcg",1,maxfn(100)),gray:getset("hcg",2,maxfn(100)),white:getset("hwb",1,maxfn(100)),wblack:getset("hwb",2,maxfn(100)),cyan:getset("cmyk",0,maxfn(100)),magenta:getset("cmyk",1,maxfn(100)),yellow:getset("cmyk",2,maxfn(100)),black:getset("cmyk",3,maxfn(100)),x:getset("xyz",0,maxfn(95.047)),y:getset("xyz",1,maxfn(100)),z:getset("xyz",2,maxfn(108.833)),l:getset("lab",0,maxfn(100)),a:getset("lab",1),b:getset("lab",2),keyword(m){return m!==void 0?new Color(m):convert[this.model].keyword(this.color)},hex(m){return m!==void 0?new Color(m):cs.to.hex(...this.rgb().round().color)},hexa(m){if(m!==void 0)return new Color(m);const c=this.rgb().round().color;let ne=Math.round(this.valpha*255).toString(16).toUpperCase();return ne.length===1&&(ne="0"+ne),cs.to.hex(...c)+ne},rgbNumber(){const m=this.rgb().color;return(m[0]&255)<<16|(m[1]&255)<<8|m[2]&255},luminosity(){const m=this.rgb().color,c=[];for(const[ne,we]of m.entries()){const Pe=we/255;c[ne]=Pe<=.04045?Pe/12.92:((Pe+.055)/1.055)**2.4}return .2126*c[0]+.7152*c[1]+.0722*c[2]},contrast(m){const c=this.luminosity(),ne=m.luminosity();return c>ne?(c+.05)/(ne+.05):(ne+.05)/(c+.05)},level(m){const c=this.contrast(m);return c>=7?"AAA":c>=4.5?"AA":""},isDark(){const m=this.rgb().color;return(m[0]*2126+m[1]*7152+m[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const m=this.rgb();for(let c=0;c<3;c++)m.color[c]=255-m.color[c];return m},lighten(m){const c=this.hsl();return c.color[2]+=c.color[2]*m,c},darken(m){const c=this.hsl();return c.color[2]-=c.color[2]*m,c},saturate(m){const c=this.hsl();return c.color[1]+=c.color[1]*m,c},desaturate(m){const c=this.hsl();return c.color[1]-=c.color[1]*m,c},whiten(m){const c=this.hwb();return c.color[1]+=c.color[1]*m,c},blacken(m){const c=this.hwb();return c.color[2]+=c.color[2]*m,c},grayscale(){const m=this.rgb().color,c=m[0]*.3+m[1]*.59+m[2]*.11;return Color.rgb(c,c,c)},fade(m){return this.alpha(this.valpha-this.valpha*m)},opaquer(m){return this.alpha(this.valpha+this.valpha*m)},rotate(m){const c=this.hsl();let ne=c.color[0];return ne=(ne+m)%360,ne=ne<0?360+ne:ne,c.color[0]=ne,c},mix(m,c){if(!m||!m.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof m);const ne=m.rgb(),we=this.rgb(),Pe=c===void 0?.5:c,Me=2*Pe-1,Ze=ne.alpha()-we.alpha(),ie=((Me*Ze===-1?Me:(Me+Ze)/(1+Me*Ze))+1)/2,ii=1-ie;return Color.rgb(ie*ne.red()+ii*we.red(),ie*ne.green()+ii*we.green(),ie*ne.blue()+ii*we.blue(),ne.alpha()*Pe+we.alpha()*(1-Pe))}};for(const m of Object.keys(convert)){if(skippedModels.includes(m))continue;const{channels:c}=convert[m];Color.prototype[m]=function(...ne){return this.model===m?new Color(this):ne.length>0?new Color(ne,m):new Color([...assertArray(convert[this.model][m].raw(this.color)),this.valpha],m)},Color[m]=function(...ne){let we=ne[0];return typeof we=="number"&&(we=zeroArray(ne,c)),new Color(we,m)}}function roundTo(m,c){return Number(m.toFixed(c))}function roundToPlace(m){return function(c){return roundTo(c,m)}}function getset(m,c,ne){m=Array.isArray(m)?m:[m];for(const we of m)(limiters[we]||=[])[c]=ne;return m=m[0],function(we){let Pe;return we!==void 0?(ne&&(we=ne(we)),Pe=this[m](),Pe.color[c]=we,Pe):(Pe=this[m]().color[c],ne&&(Pe=ne(Pe)),Pe)}}function maxfn(m){return function(c){return Math.max(0,Math.min(m,c))}}function assertArray(m){return Array.isArray(m)?m:[m]}function zeroArray(m,c){for(let ne=0;ne<c;ne++)typeof m[ne]!="number"&&(m[ne]=0);return m}class BluepicEmbed extends EventTarget{constructor(c,ne,we,Pe){if(super(),this.embedProjectId=we,!ne&&!this.embedProjectId)throw new Error("Either templateId or embedProjectId must be provided");if(typeof c=="string"){const Me=document.querySelector(c);if(!Me||!(Me instanceof HTMLElement))throw new Error(`Element with selector "${c}" not found or not an HTMLElement`);this.element=Me}else if(c instanceof HTMLElement)this.element=c;else throw new Error("Invalid element or selector provided");this.init(),this.displayMode.value=Pe?.displayMode??this.displayMode.value,this.darkmode.value=Pe?.darkmode??this.darkmode.value,this.allowPanAndZoom.value=Pe?.allowPanAndZoom??this.allowPanAndZoom.value,this.studioResourcesBaseUrl.value=Pe?.studioResourcesBaseUrl??this.studioResourcesBaseUrl.value,this.cloudflarePagesHostname.value=Pe?.cloudflarePagesHostname??this.cloudflarePagesHostname.value,this.bxCoreVersion.value=Pe?.bxCoreVersion??this.bxCoreVersion.value,this.publishedSlug.value=Pe?.publishedSlug??this.publishedSlug.value,this.theme.value=Pe?.theme??this.theme.value,this.branding.value=Pe?.branding??this.branding.value,this.stripeEnv.value=Pe?.stripeEnv??this.stripeEnv.value,this.data.value=Pe?.initData??this.data.value,vue.watch(this.ready,(Me,Ze)=>{if(Me&&!Ze){const ie=new CustomEvent("ready",{detail:{templateId:this.templateId.value,data:vue.unref(this.data.value)}});this.dispatchEvent(ie)}}),vue.watch(this.data,()=>{const Me=new CustomEvent("data",{detail:{data:vue.unref(this.data.value)}});this.dispatchEvent(Me)},{deep:!0})}element;studioResourcesBaseUrl=vue.ref("https://studio-resources.c2.bluepic.io");cloudflarePagesHostname=vue.ref("bluepic-core-sandbox.pages.dev");editorRef=vue.ref();templateId=vue.ref();data=vue.ref();serial=vue.ref();allowPanAndZoom=vue.ref(!1);darkmode=vue.ref(!0);ready=vue.ref(!1);displayMode=vue.ref("auto");bxCoreVersion=vue.ref("auto");publishedSlug=vue.ref("latest");theme=vue.ref();branding=vue.ref(!0);stripeEnv=vue.ref("prod");init(){const c=`bluepic-app-${nanoid()}`;this.embedProjectId&&getProjectWithRetries("live.bluepic.io",this.embedProjectId,3,2e3,this.stripeEnv.value).then(({embedProject:Pe})=>{const Me=Color(Pe.config.backgroundColor).isDark();this.darkmode.value=Me,this.displayMode.value=Pe.config.layout,this.allowPanAndZoom.value=Pe.config.allowPanAndZoom,this.theme.value=(()=>{if(Pe.config.backgroundColor){const Ze=Pe.config.backgroundColor,ie=Me?Color(Ze).darken(.1).hex():Color(Ze).lighten(.1).hex();return{fieldsViewBackgroundColor:Ze,editorViewBackgroundColor:ie}}})(),this.branding.value=Pe.isAllowedToDisableBranding?Pe.config.bluepicBranding:!0,this.templateId.value=Pe.templates[0]});const ne=document.createElement("style");ne.textContent=`
2605
+ `))}Wi.fill(0),Pe.createHash=function(cr){return ar(cr)},Pe.createHmac=ar,Pe.randomBytes=function(cr,fi){if(!fi||!fi.call)return new Ti(Zi(cr));try{fi.call(this,void 0,new Ti(Zi(cr)))}catch(Ae){fi(Ae)}};var ur,lr=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],ir=function(cr){Pe[cr]=function(){nr("sorry,",cr,"is not implemented yet")}};for(ur in lr)ir(lr[ur])}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(ne,we,Pe){(function(Me,Ze,ie,ii,di,li,mi,Ci,Ai){var Ti=ne("./helpers");function Ii(nr,ur){nr[ur>>5]|=128<<ur%32,nr[14+(ur+64>>>9<<4)]=ur;for(var lr=1732584193,ir=-271733879,cr=-1732584194,fi=271733878,Ae=0;Ae<nr.length;Ae+=16){var ze=lr,Ue=ir,ti=cr,oi=fi,lr=Zi(lr,ir,cr,fi,nr[Ae+0],7,-680876936),fi=Zi(fi,lr,ir,cr,nr[Ae+1],12,-389564586),cr=Zi(cr,fi,lr,ir,nr[Ae+2],17,606105819),ir=Zi(ir,cr,fi,lr,nr[Ae+3],22,-1044525330);lr=Zi(lr,ir,cr,fi,nr[Ae+4],7,-176418897),fi=Zi(fi,lr,ir,cr,nr[Ae+5],12,1200080426),cr=Zi(cr,fi,lr,ir,nr[Ae+6],17,-1473231341),ir=Zi(ir,cr,fi,lr,nr[Ae+7],22,-45705983),lr=Zi(lr,ir,cr,fi,nr[Ae+8],7,1770035416),fi=Zi(fi,lr,ir,cr,nr[Ae+9],12,-1958414417),cr=Zi(cr,fi,lr,ir,nr[Ae+10],17,-42063),ir=Zi(ir,cr,fi,lr,nr[Ae+11],22,-1990404162),lr=Zi(lr,ir,cr,fi,nr[Ae+12],7,1804603682),fi=Zi(fi,lr,ir,cr,nr[Ae+13],12,-40341101),cr=Zi(cr,fi,lr,ir,nr[Ae+14],17,-1502002290),lr=Fi(lr,ir=Zi(ir,cr,fi,lr,nr[Ae+15],22,1236535329),cr,fi,nr[Ae+1],5,-165796510),fi=Fi(fi,lr,ir,cr,nr[Ae+6],9,-1069501632),cr=Fi(cr,fi,lr,ir,nr[Ae+11],14,643717713),ir=Fi(ir,cr,fi,lr,nr[Ae+0],20,-373897302),lr=Fi(lr,ir,cr,fi,nr[Ae+5],5,-701558691),fi=Fi(fi,lr,ir,cr,nr[Ae+10],9,38016083),cr=Fi(cr,fi,lr,ir,nr[Ae+15],14,-660478335),ir=Fi(ir,cr,fi,lr,nr[Ae+4],20,-405537848),lr=Fi(lr,ir,cr,fi,nr[Ae+9],5,568446438),fi=Fi(fi,lr,ir,cr,nr[Ae+14],9,-1019803690),cr=Fi(cr,fi,lr,ir,nr[Ae+3],14,-187363961),ir=Fi(ir,cr,fi,lr,nr[Ae+8],20,1163531501),lr=Fi(lr,ir,cr,fi,nr[Ae+13],5,-1444681467),fi=Fi(fi,lr,ir,cr,nr[Ae+2],9,-51403784),cr=Fi(cr,fi,lr,ir,nr[Ae+7],14,1735328473),lr=Ui(lr,ir=Fi(ir,cr,fi,lr,nr[Ae+12],20,-1926607734),cr,fi,nr[Ae+5],4,-378558),fi=Ui(fi,lr,ir,cr,nr[Ae+8],11,-2022574463),cr=Ui(cr,fi,lr,ir,nr[Ae+11],16,1839030562),ir=Ui(ir,cr,fi,lr,nr[Ae+14],23,-35309556),lr=Ui(lr,ir,cr,fi,nr[Ae+1],4,-1530992060),fi=Ui(fi,lr,ir,cr,nr[Ae+4],11,1272893353),cr=Ui(cr,fi,lr,ir,nr[Ae+7],16,-155497632),ir=Ui(ir,cr,fi,lr,nr[Ae+10],23,-1094730640),lr=Ui(lr,ir,cr,fi,nr[Ae+13],4,681279174),fi=Ui(fi,lr,ir,cr,nr[Ae+0],11,-358537222),cr=Ui(cr,fi,lr,ir,nr[Ae+3],16,-722521979),ir=Ui(ir,cr,fi,lr,nr[Ae+6],23,76029189),lr=Ui(lr,ir,cr,fi,nr[Ae+9],4,-640364487),fi=Ui(fi,lr,ir,cr,nr[Ae+12],11,-421815835),cr=Ui(cr,fi,lr,ir,nr[Ae+15],16,530742520),lr=Wi(lr,ir=Ui(ir,cr,fi,lr,nr[Ae+2],23,-995338651),cr,fi,nr[Ae+0],6,-198630844),fi=Wi(fi,lr,ir,cr,nr[Ae+7],10,1126891415),cr=Wi(cr,fi,lr,ir,nr[Ae+14],15,-1416354905),ir=Wi(ir,cr,fi,lr,nr[Ae+5],21,-57434055),lr=Wi(lr,ir,cr,fi,nr[Ae+12],6,1700485571),fi=Wi(fi,lr,ir,cr,nr[Ae+3],10,-1894986606),cr=Wi(cr,fi,lr,ir,nr[Ae+10],15,-1051523),ir=Wi(ir,cr,fi,lr,nr[Ae+1],21,-2054922799),lr=Wi(lr,ir,cr,fi,nr[Ae+8],6,1873313359),fi=Wi(fi,lr,ir,cr,nr[Ae+15],10,-30611744),cr=Wi(cr,fi,lr,ir,nr[Ae+6],15,-1560198380),ir=Wi(ir,cr,fi,lr,nr[Ae+13],21,1309151649),lr=Wi(lr,ir,cr,fi,nr[Ae+4],6,-145523070),fi=Wi(fi,lr,ir,cr,nr[Ae+11],10,-1120210379),cr=Wi(cr,fi,lr,ir,nr[Ae+2],15,718787259),ir=Wi(ir,cr,fi,lr,nr[Ae+9],21,-343485551),lr=ar(lr,ze),ir=ar(ir,Ue),cr=ar(cr,ti),fi=ar(fi,oi)}return Array(lr,ir,cr,fi)}function Di(nr,ur,lr,ir,cr,fi){return ar((ur=ar(ar(ur,nr),ar(ir,fi)))<<cr|ur>>>32-cr,lr)}function Zi(nr,ur,lr,ir,cr,fi,Ae){return Di(ur&lr|~ur&ir,nr,ur,cr,fi,Ae)}function Fi(nr,ur,lr,ir,cr,fi,Ae){return Di(ur&ir|lr&~ir,nr,ur,cr,fi,Ae)}function Ui(nr,ur,lr,ir,cr,fi,Ae){return Di(ur^lr^ir,nr,ur,cr,fi,Ae)}function Wi(nr,ur,lr,ir,cr,fi,Ae){return Di(lr^(ur|~ir),nr,ur,cr,fi,Ae)}function ar(nr,ur){var lr=(65535&nr)+(65535&ur);return(nr>>16)+(ur>>16)+(lr>>16)<<16|65535&lr}we.exports=function(nr){return Ti.hash(nr,Ii,16)}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(ne,we,Pe){(function(Me,Ze,ie,ii,di,li,mi,Ci,Ai){we.exports=function(Ti){for(var Ii,Di=new Array(Ti),Zi=0;Zi<Ti;Zi++)(3&Zi)==0&&(Ii=4294967296*Math.random()),Di[Zi]=Ii>>>((3&Zi)<<3)&255;return Di}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(ne,we,Pe){(function(Me,Ze,ie,ii,di,li,mi,Ci,Ai){var Ti=ne("./helpers");function Ii(Fi,Ui){Fi[Ui>>5]|=128<<24-Ui%32,Fi[15+(Ui+64>>9<<4)]=Ui;for(var Wi,ar,nr,ur=Array(80),lr=1732584193,ir=-271733879,cr=-1732584194,fi=271733878,Ae=-1009589776,ze=0;ze<Fi.length;ze+=16){for(var Ue=lr,ti=ir,oi=cr,pi=fi,gi=Ae,ni=0;ni<80;ni++){ur[ni]=ni<16?Fi[ze+ni]:Zi(ur[ni-3]^ur[ni-8]^ur[ni-14]^ur[ni-16],1);var $e=Di(Di(Zi(lr,5),($e=ir,ar=cr,nr=fi,(Wi=ni)<20?$e&ar|~$e&nr:!(Wi<40)&&Wi<60?$e&ar|$e&nr|ar&nr:$e^ar^nr)),Di(Di(Ae,ur[ni]),(Wi=ni)<20?1518500249:Wi<40?1859775393:Wi<60?-1894007588:-899497514)),Ae=fi,fi=cr,cr=Zi(ir,30),ir=lr,lr=$e}lr=Di(lr,Ue),ir=Di(ir,ti),cr=Di(cr,oi),fi=Di(fi,pi),Ae=Di(Ae,gi)}return Array(lr,ir,cr,fi,Ae)}function Di(Fi,Ui){var Wi=(65535&Fi)+(65535&Ui);return(Fi>>16)+(Ui>>16)+(Wi>>16)<<16|65535&Wi}function Zi(Fi,Ui){return Fi<<Ui|Fi>>>32-Ui}we.exports=function(Fi){return Ti.hash(Fi,Ii,20,!0)}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(ne,we,Pe){(function(Me,Ze,ie,ii,di,li,mi,Ci,Ai){function Ti(Ui,Wi){var ar=(65535&Ui)+(65535&Wi);return(Ui>>16)+(Wi>>16)+(ar>>16)<<16|65535&ar}function Ii(Ui,Wi){var ar,nr=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),ur=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),lr=new Array(64);Ui[Wi>>5]|=128<<24-Wi%32,Ui[15+(Wi+64>>9<<4)]=Wi;for(var ir,cr,fi=0;fi<Ui.length;fi+=16){for(var Ae=ur[0],ze=ur[1],Ue=ur[2],ti=ur[3],oi=ur[4],pi=ur[5],gi=ur[6],ni=ur[7],$e=0;$e<64;$e++)lr[$e]=$e<16?Ui[$e+fi]:Ti(Ti(Ti((cr=lr[$e-2],Zi(cr,17)^Zi(cr,19)^Fi(cr,10)),lr[$e-7]),(cr=lr[$e-15],Zi(cr,7)^Zi(cr,18)^Fi(cr,3))),lr[$e-16]),ar=Ti(Ti(Ti(Ti(ni,Zi(cr=oi,6)^Zi(cr,11)^Zi(cr,25)),oi&pi^~oi&gi),nr[$e]),lr[$e]),ir=Ti(Zi(ir=Ae,2)^Zi(ir,13)^Zi(ir,22),Ae&ze^Ae&Ue^ze&Ue),ni=gi,gi=pi,pi=oi,oi=Ti(ti,ar),ti=Ue,Ue=ze,ze=Ae,Ae=Ti(ar,ir);ur[0]=Ti(Ae,ur[0]),ur[1]=Ti(ze,ur[1]),ur[2]=Ti(Ue,ur[2]),ur[3]=Ti(ti,ur[3]),ur[4]=Ti(oi,ur[4]),ur[5]=Ti(pi,ur[5]),ur[6]=Ti(gi,ur[6]),ur[7]=Ti(ni,ur[7])}return ur}var Di=ne("./helpers"),Zi=function(Ui,Wi){return Ui>>>Wi|Ui<<32-Wi},Fi=function(Ui,Wi){return Ui>>>Wi};we.exports=function(Ui){return Di.hash(Ui,Ii,32,!0)}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(ne,we,Pe){(function(Me,Ze,ie,ii,di,li,mi,Ci,Ai){Pe.read=function(Ti,Ii,Di,Zi,fi){var Ui,Wi,ar=8*fi-Zi-1,nr=(1<<ar)-1,ur=nr>>1,lr=-7,ir=Di?fi-1:0,cr=Di?-1:1,fi=Ti[Ii+ir];for(ir+=cr,Ui=fi&(1<<-lr)-1,fi>>=-lr,lr+=ar;0<lr;Ui=256*Ui+Ti[Ii+ir],ir+=cr,lr-=8);for(Wi=Ui&(1<<-lr)-1,Ui>>=-lr,lr+=Zi;0<lr;Wi=256*Wi+Ti[Ii+ir],ir+=cr,lr-=8);if(Ui===0)Ui=1-ur;else{if(Ui===nr)return Wi?NaN:1/0*(fi?-1:1);Wi+=Math.pow(2,Zi),Ui-=ur}return(fi?-1:1)*Wi*Math.pow(2,Ui-Zi)},Pe.write=function(Ti,Ii,Di,Zi,Fi,Ae){var Wi,ar,nr=8*Ae-Fi-1,ur=(1<<nr)-1,lr=ur>>1,ir=Fi===23?Math.pow(2,-24)-Math.pow(2,-77):0,cr=Zi?0:Ae-1,fi=Zi?1:-1,Ae=Ii<0||Ii===0&&1/Ii<0?1:0;for(Ii=Math.abs(Ii),isNaN(Ii)||Ii===1/0?(ar=isNaN(Ii)?1:0,Wi=ur):(Wi=Math.floor(Math.log(Ii)/Math.LN2),Ii*(Zi=Math.pow(2,-Wi))<1&&(Wi--,Zi*=2),2<=(Ii+=1<=Wi+lr?ir/Zi:ir*Math.pow(2,1-lr))*Zi&&(Wi++,Zi/=2),ur<=Wi+lr?(ar=0,Wi=ur):1<=Wi+lr?(ar=(Ii*Zi-1)*Math.pow(2,Fi),Wi+=lr):(ar=Ii*Math.pow(2,lr-1)*Math.pow(2,Fi),Wi=0));8<=Fi;Ti[Di+cr]=255&ar,cr+=fi,ar/=256,Fi-=8);for(Wi=Wi<<Fi|ar,nr+=Fi;0<nr;Ti[Di+cr]=255&Wi,cr+=fi,Wi/=256,nr-=8);Ti[Di+cr-fi]|=128*Ae}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/ieee754")},{buffer:3,lYpoI2:11}],11:[function(ne,we,Pe){(function(Me,Ze,ie,ii,di,li,mi,Ci,Ai){var Ti,Ii,Di;function Zi(){}(Me=we.exports={}).nextTick=(Ii=typeof window<"u"&&window.setImmediate,Di=typeof window<"u"&&window.postMessage&&window.addEventListener,Ii?function(Fi){return window.setImmediate(Fi)}:Di?(Ti=[],window.addEventListener("message",function(Fi){var Ui=Fi.source;Ui!==window&&Ui!==null||Fi.data!=="process-tick"||(Fi.stopPropagation(),0<Ti.length&&Ti.shift()())},!0),function(Fi){Ti.push(Fi),window.postMessage("process-tick","*")}):function(Fi){setTimeout(Fi,0)}),Me.title="browser",Me.browser=!0,Me.env={},Me.argv=[],Me.on=Zi,Me.addListener=Zi,Me.once=Zi,Me.off=Zi,Me.removeListener=Zi,Me.removeAllListeners=Zi,Me.emit=Zi,Me.binding=function(Fi){throw new Error("process.binding is not supported")},Me.cwd=function(){return"/"},Me.chdir=function(Fi){throw new Error("process.chdir is not supported")}}).call(this,ne("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},ne("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:11}]},{},[1])(1)})})(object_hash);const hash=object_hash.exports,IMAGE_TTL_IN_SECONDS=60*60*24*1;function parseCloudflareImagesDeliveryUrl(m){try{const c=new URL(m);if(c.hostname==="imagedelivery.net"){const[,ne,we,Pe]=c.pathname.split("/")||[];if(ne&&we&&Pe)return{scopeId:ne,imageId:we,variant:Pe};throw new Error("Invalid Cloudflare Images URL")}throw new Error("Invalid Cloudflare Images URL")}catch{throw new Error("Invalid URL")}}async function uploadImage(m,c,ne,we,Pe,Me){const Ze=`${m}/api/image/session?${new URLSearchParams({key:hash({field:ne.field,templateId:c}),ttl:String(IMAGE_TTL_IN_SECONDS)})}`,ie=new FormData;ie.append("file",we,Pe);const ii=await fetchWithProgressV1({url:Ze,method:"POST",data:ie,onUploadProgress:Me});if(ii.type==="application/json")return JSON.parse(await ii.text());throw new Error("Invalid response from Cloudflare Images")}const colorNames={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},reverseNames=Object.create(null);for(const m in colorNames)Object.hasOwn(colorNames,m)&&(reverseNames[colorNames[m]]=m);const cs={to:{},get:{}};cs.get=function(m){const c=m.slice(0,3).toLowerCase();let ne,we;switch(c){case"hsl":{ne=cs.get.hsl(m),we="hsl";break}case"hwb":{ne=cs.get.hwb(m),we="hwb";break}default:{ne=cs.get.rgb(m),we="rgb";break}}return ne?{model:we,value:ne}:null},cs.get.rgb=function(m){if(!m)return null;const c=/^#([a-f\d]{3,4})$/i,ne=/^#([a-f\d]{6})([a-f\d]{2})?$/i,we=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,Pe=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,Me=/^(\w+)$/;let Ze=[0,0,0,1],ie,ii,di;if(ie=m.match(ne)){for(di=ie[2],ie=ie[1],ii=0;ii<3;ii++){const li=ii*2;Ze[ii]=Number.parseInt(ie.slice(li,li+2),16)}di&&(Ze[3]=Number.parseInt(di,16)/255)}else if(ie=m.match(c)){for(ie=ie[1],di=ie[3],ii=0;ii<3;ii++)Ze[ii]=Number.parseInt(ie[ii]+ie[ii],16);di&&(Ze[3]=Number.parseInt(di+di,16)/255)}else if(ie=m.match(we)){for(ii=0;ii<3;ii++)Ze[ii]=Number.parseInt(ie[ii+1],10);ie[4]&&(Ze[3]=ie[5]?Number.parseFloat(ie[4])*.01:Number.parseFloat(ie[4]))}else if(ie=m.match(Pe)){for(ii=0;ii<3;ii++)Ze[ii]=Math.round(Number.parseFloat(ie[ii+1])*2.55);ie[4]&&(Ze[3]=ie[5]?Number.parseFloat(ie[4])*.01:Number.parseFloat(ie[4]))}else return(ie=m.match(Me))?ie[1]==="transparent"?[0,0,0,0]:Object.hasOwn(colorNames,ie[1])?(Ze=colorNames[ie[1]],Ze[3]=1,Ze):null:null;for(ii=0;ii<3;ii++)Ze[ii]=clamp(Ze[ii],0,255);return Ze[3]=clamp(Ze[3],0,1),Ze},cs.get.hsl=function(m){if(!m)return null;const c=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,ne=m.match(c);if(ne){const we=Number.parseFloat(ne[4]),Pe=(Number.parseFloat(ne[1])%360+360)%360,Me=clamp(Number.parseFloat(ne[2]),0,100),Ze=clamp(Number.parseFloat(ne[3]),0,100),ie=clamp(Number.isNaN(we)?1:we,0,1);return[Pe,Me,Ze,ie]}return null},cs.get.hwb=function(m){if(!m)return null;const c=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d.]+)%\s*,\s*([+-]?[\d.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,ne=m.match(c);if(ne){const we=Number.parseFloat(ne[4]),Pe=(Number.parseFloat(ne[1])%360+360)%360,Me=clamp(Number.parseFloat(ne[2]),0,100),Ze=clamp(Number.parseFloat(ne[3]),0,100),ie=clamp(Number.isNaN(we)?1:we,0,1);return[Pe,Me,Ze,ie]}return null},cs.to.hex=function(...m){return"#"+hexDouble(m[0])+hexDouble(m[1])+hexDouble(m[2])+(m[3]<1?hexDouble(Math.round(m[3]*255)):"")},cs.to.rgb=function(...m){return m.length<4||m[3]===1?"rgb("+Math.round(m[0])+", "+Math.round(m[1])+", "+Math.round(m[2])+")":"rgba("+Math.round(m[0])+", "+Math.round(m[1])+", "+Math.round(m[2])+", "+m[3]+")"},cs.to.rgb.percent=function(...m){const c=Math.round(m[0]/255*100),ne=Math.round(m[1]/255*100),we=Math.round(m[2]/255*100);return m.length<4||m[3]===1?"rgb("+c+"%, "+ne+"%, "+we+"%)":"rgba("+c+"%, "+ne+"%, "+we+"%, "+m[3]+")"},cs.to.hsl=function(...m){return m.length<4||m[3]===1?"hsl("+m[0]+", "+m[1]+"%, "+m[2]+"%)":"hsla("+m[0]+", "+m[1]+"%, "+m[2]+"%, "+m[3]+")"},cs.to.hwb=function(...m){let c="";return m.length>=4&&m[3]!==1&&(c=", "+m[3]),"hwb("+m[0]+", "+m[1]+"%, "+m[2]+"%"+c+")"},cs.to.keyword=function(...m){return reverseNames[m.slice(0,3)]};function clamp(m,c,ne){return Math.min(Math.max(c,m),ne)}function hexDouble(m){const c=Math.round(m).toString(16).toUpperCase();return c.length<2?"0"+c:c}const cssKeywords={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},reverseKeywords={};for(const m of Object.keys(cssKeywords))reverseKeywords[cssKeywords[m]]=m;const convert$1={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},LAB_FT=(6/29)**3;for(const m of Object.keys(convert$1)){if(!("channels"in convert$1[m]))throw new Error("missing channels property: "+m);if(!("labels"in convert$1[m]))throw new Error("missing channel labels property: "+m);if(convert$1[m].labels.length!==convert$1[m].channels)throw new Error("channel and label counts mismatch: "+m);const{channels:c,labels:ne}=convert$1[m];delete convert$1[m].channels,delete convert$1[m].labels,Object.defineProperty(convert$1[m],"channels",{value:c}),Object.defineProperty(convert$1[m],"labels",{value:ne})}convert$1.rgb.hsl=function(m){const c=m[0]/255,ne=m[1]/255,we=m[2]/255,Pe=Math.min(c,ne,we),Me=Math.max(c,ne,we),Ze=Me-Pe;let ie,ii;switch(Me){case Pe:{ie=0;break}case c:{ie=(ne-we)/Ze;break}case ne:{ie=2+(we-c)/Ze;break}case we:{ie=4+(c-ne)/Ze;break}}ie=Math.min(ie*60,360),ie<0&&(ie+=360);const di=(Pe+Me)/2;return Me===Pe?ii=0:di<=.5?ii=Ze/(Me+Pe):ii=Ze/(2-Me-Pe),[ie,ii*100,di*100]},convert$1.rgb.hsv=function(m){let c,ne,we,Pe,Me;const Ze=m[0]/255,ie=m[1]/255,ii=m[2]/255,di=Math.max(Ze,ie,ii),li=di-Math.min(Ze,ie,ii),mi=function(Ci){return(di-Ci)/6/li+1/2};if(li===0)Pe=0,Me=0;else{switch(Me=li/di,c=mi(Ze),ne=mi(ie),we=mi(ii),di){case Ze:{Pe=we-ne;break}case ie:{Pe=1/3+c-we;break}case ii:{Pe=2/3+ne-c;break}}Pe<0?Pe+=1:Pe>1&&(Pe-=1)}return[Pe*360,Me*100,di*100]},convert$1.rgb.hwb=function(m){const c=m[0],ne=m[1];let we=m[2];const Pe=convert$1.rgb.hsl(m)[0],Me=1/255*Math.min(c,Math.min(ne,we));return we=1-1/255*Math.max(c,Math.max(ne,we)),[Pe,Me*100,we*100]},convert$1.rgb.cmyk=function(m){const c=m[0]/255,ne=m[1]/255,we=m[2]/255,Pe=Math.min(1-c,1-ne,1-we),Me=(1-c-Pe)/(1-Pe)||0,Ze=(1-ne-Pe)/(1-Pe)||0,ie=(1-we-Pe)/(1-Pe)||0;return[Me*100,Ze*100,ie*100,Pe*100]};function comparativeDistance(m,c){return(m[0]-c[0])**2+(m[1]-c[1])**2+(m[2]-c[2])**2}convert$1.rgb.keyword=function(m){const c=reverseKeywords[m];if(c)return c;let ne=Number.POSITIVE_INFINITY,we;for(const Pe of Object.keys(cssKeywords)){const Me=cssKeywords[Pe],Ze=comparativeDistance(m,Me);Ze<ne&&(ne=Ze,we=Pe)}return we},convert$1.keyword.rgb=function(m){return cssKeywords[m]},convert$1.rgb.xyz=function(m){let c=m[0]/255,ne=m[1]/255,we=m[2]/255;c=c>.04045?((c+.055)/1.055)**2.4:c/12.92,ne=ne>.04045?((ne+.055)/1.055)**2.4:ne/12.92,we=we>.04045?((we+.055)/1.055)**2.4:we/12.92;const Pe=c*.4124564+ne*.3575761+we*.1804375,Me=c*.2126729+ne*.7151522+we*.072175,Ze=c*.0193339+ne*.119192+we*.9503041;return[Pe*100,Me*100,Ze*100]},convert$1.rgb.lab=function(m){const c=convert$1.rgb.xyz(m);let ne=c[0],we=c[1],Pe=c[2];ne/=95.047,we/=100,Pe/=108.883,ne=ne>LAB_FT?ne**(1/3):7.787*ne+16/116,we=we>LAB_FT?we**(1/3):7.787*we+16/116,Pe=Pe>LAB_FT?Pe**(1/3):7.787*Pe+16/116;const Me=116*we-16,Ze=500*(ne-we),ie=200*(we-Pe);return[Me,Ze,ie]},convert$1.hsl.rgb=function(m){const c=m[0]/360,ne=m[1]/100,we=m[2]/100;let Pe,Me;if(ne===0)return Me=we*255,[Me,Me,Me];const Ze=we<.5?we*(1+ne):we+ne-we*ne,ie=2*we-Ze,ii=[0,0,0];for(let di=0;di<3;di++)Pe=c+1/3*-(di-1),Pe<0&&Pe++,Pe>1&&Pe--,6*Pe<1?Me=ie+(Ze-ie)*6*Pe:2*Pe<1?Me=Ze:3*Pe<2?Me=ie+(Ze-ie)*(2/3-Pe)*6:Me=ie,ii[di]=Me*255;return ii},convert$1.hsl.hsv=function(m){const c=m[0];let ne=m[1]/100,we=m[2]/100,Pe=ne;const Me=Math.max(we,.01);we*=2,ne*=we<=1?we:2-we,Pe*=Me<=1?Me:2-Me;const Ze=(we+ne)/2,ie=we===0?2*Pe/(Me+Pe):2*ne/(we+ne);return[c,ie*100,Ze*100]},convert$1.hsv.rgb=function(m){const c=m[0]/60,ne=m[1]/100;let we=m[2]/100;const Pe=Math.floor(c)%6,Me=c-Math.floor(c),Ze=255*we*(1-ne),ie=255*we*(1-ne*Me),ii=255*we*(1-ne*(1-Me));switch(we*=255,Pe){case 0:return[we,ii,Ze];case 1:return[ie,we,Ze];case 2:return[Ze,we,ii];case 3:return[Ze,ie,we];case 4:return[ii,Ze,we];case 5:return[we,Ze,ie]}},convert$1.hsv.hsl=function(m){const c=m[0],ne=m[1]/100,we=m[2]/100,Pe=Math.max(we,.01);let Me,Ze;Ze=(2-ne)*we;const ie=(2-ne)*Pe;return Me=ne*Pe,Me/=ie<=1?ie:2-ie,Me=Me||0,Ze/=2,[c,Me*100,Ze*100]},convert$1.hwb.rgb=function(m){const c=m[0]/360;let ne=m[1]/100,we=m[2]/100;const Pe=ne+we;let Me;Pe>1&&(ne/=Pe,we/=Pe);const Ze=Math.floor(6*c),ie=1-we;Me=6*c-Ze,(Ze&1)!==0&&(Me=1-Me);const ii=ne+Me*(ie-ne);let di,li,mi;switch(Ze){default:case 6:case 0:{di=ie,li=ii,mi=ne;break}case 1:{di=ii,li=ie,mi=ne;break}case 2:{di=ne,li=ie,mi=ii;break}case 3:{di=ne,li=ii,mi=ie;break}case 4:{di=ii,li=ne,mi=ie;break}case 5:{di=ie,li=ne,mi=ii;break}}return[di*255,li*255,mi*255]},convert$1.cmyk.rgb=function(m){const c=m[0]/100,ne=m[1]/100,we=m[2]/100,Pe=m[3]/100,Me=1-Math.min(1,c*(1-Pe)+Pe),Ze=1-Math.min(1,ne*(1-Pe)+Pe),ie=1-Math.min(1,we*(1-Pe)+Pe);return[Me*255,Ze*255,ie*255]},convert$1.xyz.rgb=function(m){const c=m[0]/100,ne=m[1]/100,we=m[2]/100;let Pe,Me,Ze;return Pe=c*3.2404542+ne*-1.5371385+we*-.4985314,Me=c*-.969266+ne*1.8760108+we*.041556,Ze=c*.0556434+ne*-.2040259+we*1.0572252,Pe=Pe>.0031308?1.055*Pe**(1/2.4)-.055:Pe*12.92,Me=Me>.0031308?1.055*Me**(1/2.4)-.055:Me*12.92,Ze=Ze>.0031308?1.055*Ze**(1/2.4)-.055:Ze*12.92,Pe=Math.min(Math.max(0,Pe),1),Me=Math.min(Math.max(0,Me),1),Ze=Math.min(Math.max(0,Ze),1),[Pe*255,Me*255,Ze*255]},convert$1.xyz.lab=function(m){let c=m[0],ne=m[1],we=m[2];c/=95.047,ne/=100,we/=108.883,c=c>LAB_FT?c**(1/3):7.787*c+16/116,ne=ne>LAB_FT?ne**(1/3):7.787*ne+16/116,we=we>LAB_FT?we**(1/3):7.787*we+16/116;const Pe=116*ne-16,Me=500*(c-ne),Ze=200*(ne-we);return[Pe,Me,Ze]},convert$1.lab.xyz=function(m){const c=m[0],ne=m[1],we=m[2];let Pe,Me,Ze;Me=(c+16)/116,Pe=ne/500+Me,Ze=Me-we/200;const ie=Me**3,ii=Pe**3,di=Ze**3;return Me=ie>LAB_FT?ie:(Me-16/116)/7.787,Pe=ii>LAB_FT?ii:(Pe-16/116)/7.787,Ze=di>LAB_FT?di:(Ze-16/116)/7.787,Pe*=95.047,Me*=100,Ze*=108.883,[Pe,Me,Ze]},convert$1.lab.lch=function(m){const c=m[0],ne=m[1],we=m[2];let Pe;Pe=Math.atan2(we,ne)*360/2/Math.PI,Pe<0&&(Pe+=360);const Ze=Math.sqrt(ne*ne+we*we);return[c,Ze,Pe]},convert$1.lch.lab=function(m){const c=m[0],ne=m[1],Pe=m[2]/360*2*Math.PI,Me=ne*Math.cos(Pe),Ze=ne*Math.sin(Pe);return[c,Me,Ze]},convert$1.rgb.ansi16=function(m,c=null){const[ne,we,Pe]=m;let Me=c===null?convert$1.rgb.hsv(m)[2]:c;if(Me=Math.round(Me/50),Me===0)return 30;let Ze=30+(Math.round(Pe/255)<<2|Math.round(we/255)<<1|Math.round(ne/255));return Me===2&&(Ze+=60),Ze},convert$1.hsv.ansi16=function(m){return convert$1.rgb.ansi16(convert$1.hsv.rgb(m),m[2])},convert$1.rgb.ansi256=function(m){const c=m[0],ne=m[1],we=m[2];return c>>4===ne>>4&&ne>>4===we>>4?c<8?16:c>248?231:Math.round((c-8)/247*24)+232:16+36*Math.round(c/255*5)+6*Math.round(ne/255*5)+Math.round(we/255*5)},convert$1.ansi16.rgb=function(m){m=m[0];let c=m%10;if(c===0||c===7)return m>50&&(c+=3.5),c=c/10.5*255,[c,c,c];const ne=(Math.trunc(m>50)+1)*.5,we=(c&1)*ne*255,Pe=(c>>1&1)*ne*255,Me=(c>>2&1)*ne*255;return[we,Pe,Me]},convert$1.ansi256.rgb=function(m){if(m=m[0],m>=232){const Me=(m-232)*10+8;return[Me,Me,Me]}m-=16;let c;const ne=Math.floor(m/36)/5*255,we=Math.floor((c=m%36)/6)/5*255,Pe=c%6/5*255;return[ne,we,Pe]},convert$1.rgb.hex=function(m){const ne=(((Math.round(m[0])&255)<<16)+((Math.round(m[1])&255)<<8)+(Math.round(m[2])&255)).toString(16).toUpperCase();return"000000".slice(ne.length)+ne},convert$1.hex.rgb=function(m){const c=m.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!c)return[0,0,0];let ne=c[0];c[0].length===3&&(ne=[...ne].map(ie=>ie+ie).join(""));const we=Number.parseInt(ne,16),Pe=we>>16&255,Me=we>>8&255,Ze=we&255;return[Pe,Me,Ze]},convert$1.rgb.hcg=function(m){const c=m[0]/255,ne=m[1]/255,we=m[2]/255,Pe=Math.max(Math.max(c,ne),we),Me=Math.min(Math.min(c,ne),we),Ze=Pe-Me;let ie;const ii=Ze<1?Me/(1-Ze):0;return Ze<=0?ie=0:Pe===c?ie=(ne-we)/Ze%6:Pe===ne?ie=2+(we-c)/Ze:ie=4+(c-ne)/Ze,ie/=6,ie%=1,[ie*360,Ze*100,ii*100]},convert$1.hsl.hcg=function(m){const c=m[1]/100,ne=m[2]/100,we=ne<.5?2*c*ne:2*c*(1-ne);let Pe=0;return we<1&&(Pe=(ne-.5*we)/(1-we)),[m[0],we*100,Pe*100]},convert$1.hsv.hcg=function(m){const c=m[1]/100,ne=m[2]/100,we=c*ne;let Pe=0;return we<1&&(Pe=(ne-we)/(1-we)),[m[0],we*100,Pe*100]},convert$1.hcg.rgb=function(m){const c=m[0]/360,ne=m[1]/100,we=m[2]/100;if(ne===0)return[we*255,we*255,we*255];const Pe=[0,0,0],Me=c%1*6,Ze=Me%1,ie=1-Ze;let ii=0;switch(Math.floor(Me)){case 0:{Pe[0]=1,Pe[1]=Ze,Pe[2]=0;break}case 1:{Pe[0]=ie,Pe[1]=1,Pe[2]=0;break}case 2:{Pe[0]=0,Pe[1]=1,Pe[2]=Ze;break}case 3:{Pe[0]=0,Pe[1]=ie,Pe[2]=1;break}case 4:{Pe[0]=Ze,Pe[1]=0,Pe[2]=1;break}default:Pe[0]=1,Pe[1]=0,Pe[2]=ie}return ii=(1-ne)*we,[(ne*Pe[0]+ii)*255,(ne*Pe[1]+ii)*255,(ne*Pe[2]+ii)*255]},convert$1.hcg.hsv=function(m){const c=m[1]/100,ne=m[2]/100,we=c+ne*(1-c);let Pe=0;return we>0&&(Pe=c/we),[m[0],Pe*100,we*100]},convert$1.hcg.hsl=function(m){const c=m[1]/100,we=m[2]/100*(1-c)+.5*c;let Pe=0;return we>0&&we<.5?Pe=c/(2*we):we>=.5&&we<1&&(Pe=c/(2*(1-we))),[m[0],Pe*100,we*100]},convert$1.hcg.hwb=function(m){const c=m[1]/100,ne=m[2]/100,we=c+ne*(1-c);return[m[0],(we-c)*100,(1-we)*100]},convert$1.hwb.hcg=function(m){const c=m[1]/100,we=1-m[2]/100,Pe=we-c;let Me=0;return Pe<1&&(Me=(we-Pe)/(1-Pe)),[m[0],Pe*100,Me*100]},convert$1.apple.rgb=function(m){return[m[0]/65535*255,m[1]/65535*255,m[2]/65535*255]},convert$1.rgb.apple=function(m){return[m[0]/255*65535,m[1]/255*65535,m[2]/255*65535]},convert$1.gray.rgb=function(m){return[m[0]/100*255,m[0]/100*255,m[0]/100*255]},convert$1.gray.hsl=function(m){return[0,0,m[0]]},convert$1.gray.hsv=convert$1.gray.hsl,convert$1.gray.hwb=function(m){return[0,100,m[0]]},convert$1.gray.cmyk=function(m){return[0,0,0,m[0]]},convert$1.gray.lab=function(m){return[m[0],0,0]},convert$1.gray.hex=function(m){const c=Math.round(m[0]/100*255)&255,we=((c<<16)+(c<<8)+c).toString(16).toUpperCase();return"000000".slice(we.length)+we},convert$1.rgb.gray=function(m){return[(m[0]+m[1]+m[2])/3/255*100]};function buildGraph(){const m={},c=Object.keys(convert$1);for(let{length:ne}=c,we=0;we<ne;we++)m[c[we]]={distance:-1,parent:null};return m}function deriveBFS(m){const c=buildGraph(),ne=[m];for(c[m].distance=0;ne.length>0;){const we=ne.pop(),Pe=Object.keys(convert$1[we]);for(let{length:Me}=Pe,Ze=0;Ze<Me;Ze++){const ie=Pe[Ze],ii=c[ie];ii.distance===-1&&(ii.distance=c[we].distance+1,ii.parent=we,ne.unshift(ie))}}return c}function link(m,c){return function(ne){return c(m(ne))}}function wrapConversion(m,c){const ne=[c[m].parent,m];let we=convert$1[c[m].parent][m],Pe=c[m].parent;for(;c[Pe].parent;)ne.unshift(c[Pe].parent),we=link(convert$1[c[Pe].parent][Pe],we),Pe=c[Pe].parent;return we.conversion=ne,we}function route(m){const c=deriveBFS(m),ne={},we=Object.keys(c);for(let{length:Pe}=we,Me=0;Me<Pe;Me++){const Ze=we[Me];c[Ze].parent!==null&&(ne[Ze]=wrapConversion(Ze,c))}return ne}const convert={},models=Object.keys(convert$1);function wrapRaw(m){const c=function(...ne){const we=ne[0];return we==null?we:(we.length>1&&(ne=we),m(ne))};return"conversion"in m&&(c.conversion=m.conversion),c}function wrapRounded(m){const c=function(...ne){const we=ne[0];if(we==null)return we;we.length>1&&(ne=we);const Pe=m(ne);if(typeof Pe=="object")for(let{length:Me}=Pe,Ze=0;Ze<Me;Ze++)Pe[Ze]=Math.round(Pe[Ze]);return Pe};return"conversion"in m&&(c.conversion=m.conversion),c}for(const m of models){convert[m]={},Object.defineProperty(convert[m],"channels",{value:convert$1[m].channels}),Object.defineProperty(convert[m],"labels",{value:convert$1[m].labels});const c=route(m),ne=Object.keys(c);for(const we of ne){const Pe=c[we];convert[m][we]=wrapRounded(Pe),convert[m][we].raw=wrapRaw(Pe)}}const skippedModels=["keyword","gray","hex"],hashedModelKeys={};for(const m of Object.keys(convert))hashedModelKeys[[...convert[m].labels].sort().join("")]=m;const limiters={};function Color(m,c){if(!(this instanceof Color))return new Color(m,c);if(c&&c in skippedModels&&(c=null),c&&!(c in convert))throw new Error("Unknown model: "+c);let ne,we;if(m==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(m instanceof Color)this.model=m.model,this.color=[...m.color],this.valpha=m.valpha;else if(typeof m=="string"){const Pe=cs.get(m);if(Pe===null)throw new Error("Unable to parse color from string: "+m);this.model=Pe.model,we=convert[this.model].channels,this.color=Pe.value.slice(0,we),this.valpha=typeof Pe.value[we]=="number"?Pe.value[we]:1}else if(m.length>0){this.model=c||"rgb",we=convert[this.model].channels;const Pe=Array.prototype.slice.call(m,0,we);this.color=zeroArray(Pe,we),this.valpha=typeof m[we]=="number"?m[we]:1}else if(typeof m=="number")this.model="rgb",this.color=[m>>16&255,m>>8&255,m&255],this.valpha=1;else{this.valpha=1;const Pe=Object.keys(m);"alpha"in m&&(Pe.splice(Pe.indexOf("alpha"),1),this.valpha=typeof m.alpha=="number"?m.alpha:0);const Me=Pe.sort().join("");if(!(Me in hashedModelKeys))throw new Error("Unable to parse color from object: "+JSON.stringify(m));this.model=hashedModelKeys[Me];const{labels:Ze}=convert[this.model],ie=[];for(ne=0;ne<Ze.length;ne++)ie.push(m[Ze[ne]]);this.color=zeroArray(ie)}if(limiters[this.model])for(we=convert[this.model].channels,ne=0;ne<we;ne++){const Pe=limiters[this.model][ne];Pe&&(this.color[ne]=Pe(this.color[ne]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Color.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(m){let c=this.model in cs.to?this:this.rgb();c=c.round(typeof m=="number"?m:1);const ne=c.valpha===1?c.color:[...c.color,this.valpha];return cs.to[c.model](...ne)},percentString(m){const c=this.rgb().round(typeof m=="number"?m:1),ne=c.valpha===1?c.color:[...c.color,this.valpha];return cs.to.rgb.percent(...ne)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const m={},{channels:c}=convert[this.model],{labels:ne}=convert[this.model];for(let we=0;we<c;we++)m[ne[we]]=this.color[we];return this.valpha!==1&&(m.alpha=this.valpha),m},unitArray(){const m=this.rgb().color;return m[0]/=255,m[1]/=255,m[2]/=255,this.valpha!==1&&m.push(this.valpha),m},unitObject(){const m=this.rgb().object();return m.r/=255,m.g/=255,m.b/=255,this.valpha!==1&&(m.alpha=this.valpha),m},round(m){return m=Math.max(m||0,0),new Color([...this.color.map(roundToPlace(m)),this.valpha],this.model)},alpha(m){return m!==void 0?new Color([...this.color,Math.max(0,Math.min(1,m))],this.model):this.valpha},red:getset("rgb",0,maxfn(255)),green:getset("rgb",1,maxfn(255)),blue:getset("rgb",2,maxfn(255)),hue:getset(["hsl","hsv","hsl","hwb","hcg"],0,m=>(m%360+360)%360),saturationl:getset("hsl",1,maxfn(100)),lightness:getset("hsl",2,maxfn(100)),saturationv:getset("hsv",1,maxfn(100)),value:getset("hsv",2,maxfn(100)),chroma:getset("hcg",1,maxfn(100)),gray:getset("hcg",2,maxfn(100)),white:getset("hwb",1,maxfn(100)),wblack:getset("hwb",2,maxfn(100)),cyan:getset("cmyk",0,maxfn(100)),magenta:getset("cmyk",1,maxfn(100)),yellow:getset("cmyk",2,maxfn(100)),black:getset("cmyk",3,maxfn(100)),x:getset("xyz",0,maxfn(95.047)),y:getset("xyz",1,maxfn(100)),z:getset("xyz",2,maxfn(108.833)),l:getset("lab",0,maxfn(100)),a:getset("lab",1),b:getset("lab",2),keyword(m){return m!==void 0?new Color(m):convert[this.model].keyword(this.color)},hex(m){return m!==void 0?new Color(m):cs.to.hex(...this.rgb().round().color)},hexa(m){if(m!==void 0)return new Color(m);const c=this.rgb().round().color;let ne=Math.round(this.valpha*255).toString(16).toUpperCase();return ne.length===1&&(ne="0"+ne),cs.to.hex(...c)+ne},rgbNumber(){const m=this.rgb().color;return(m[0]&255)<<16|(m[1]&255)<<8|m[2]&255},luminosity(){const m=this.rgb().color,c=[];for(const[ne,we]of m.entries()){const Pe=we/255;c[ne]=Pe<=.04045?Pe/12.92:((Pe+.055)/1.055)**2.4}return .2126*c[0]+.7152*c[1]+.0722*c[2]},contrast(m){const c=this.luminosity(),ne=m.luminosity();return c>ne?(c+.05)/(ne+.05):(ne+.05)/(c+.05)},level(m){const c=this.contrast(m);return c>=7?"AAA":c>=4.5?"AA":""},isDark(){const m=this.rgb().color;return(m[0]*2126+m[1]*7152+m[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const m=this.rgb();for(let c=0;c<3;c++)m.color[c]=255-m.color[c];return m},lighten(m){const c=this.hsl();return c.color[2]+=c.color[2]*m,c},darken(m){const c=this.hsl();return c.color[2]-=c.color[2]*m,c},saturate(m){const c=this.hsl();return c.color[1]+=c.color[1]*m,c},desaturate(m){const c=this.hsl();return c.color[1]-=c.color[1]*m,c},whiten(m){const c=this.hwb();return c.color[1]+=c.color[1]*m,c},blacken(m){const c=this.hwb();return c.color[2]+=c.color[2]*m,c},grayscale(){const m=this.rgb().color,c=m[0]*.3+m[1]*.59+m[2]*.11;return Color.rgb(c,c,c)},fade(m){return this.alpha(this.valpha-this.valpha*m)},opaquer(m){return this.alpha(this.valpha+this.valpha*m)},rotate(m){const c=this.hsl();let ne=c.color[0];return ne=(ne+m)%360,ne=ne<0?360+ne:ne,c.color[0]=ne,c},mix(m,c){if(!m||!m.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof m);const ne=m.rgb(),we=this.rgb(),Pe=c===void 0?.5:c,Me=2*Pe-1,Ze=ne.alpha()-we.alpha(),ie=((Me*Ze===-1?Me:(Me+Ze)/(1+Me*Ze))+1)/2,ii=1-ie;return Color.rgb(ie*ne.red()+ii*we.red(),ie*ne.green()+ii*we.green(),ie*ne.blue()+ii*we.blue(),ne.alpha()*Pe+we.alpha()*(1-Pe))}};for(const m of Object.keys(convert)){if(skippedModels.includes(m))continue;const{channels:c}=convert[m];Color.prototype[m]=function(...ne){return this.model===m?new Color(this):ne.length>0?new Color(ne,m):new Color([...assertArray(convert[this.model][m].raw(this.color)),this.valpha],m)},Color[m]=function(...ne){let we=ne[0];return typeof we=="number"&&(we=zeroArray(ne,c)),new Color(we,m)}}function roundTo(m,c){return Number(m.toFixed(c))}function roundToPlace(m){return function(c){return roundTo(c,m)}}function getset(m,c,ne){m=Array.isArray(m)?m:[m];for(const we of m)(limiters[we]||=[])[c]=ne;return m=m[0],function(we){let Pe;return we!==void 0?(ne&&(we=ne(we)),Pe=this[m](),Pe.color[c]=we,Pe):(Pe=this[m]().color[c],ne&&(Pe=ne(Pe)),Pe)}}function maxfn(m){return function(c){return Math.max(0,Math.min(m,c))}}function assertArray(m){return Array.isArray(m)?m:[m]}function zeroArray(m,c){for(let ne=0;ne<c;ne++)typeof m[ne]!="number"&&(m[ne]=0);return m}class BluepicEmbed extends EventTarget{constructor(c,ne,we,Pe){if(super(),this.embedProjectId=we,!ne&&!this.embedProjectId)throw new Error("Either templateId or embedProjectId must be provided");if(typeof c=="string"){const Me=document.querySelector(c);if(!Me||!(Me instanceof HTMLElement))throw new Error(`Element with selector "${c}" not found or not an HTMLElement`);this.element=Me}else if(c instanceof HTMLElement)this.element=c;else throw new Error("Invalid element or selector provided");this.init(),this.displayMode.value=Pe?.displayMode??this.displayMode.value,this.darkmode.value=Pe?.darkmode??this.darkmode.value,this.allowPanAndZoom.value=Pe?.allowPanAndZoom??this.allowPanAndZoom.value,this.studioResourcesBaseUrl.value=Pe?.studioResourcesBaseUrl??this.studioResourcesBaseUrl.value,this.cloudflarePagesHostname.value=Pe?.cloudflarePagesHostname??this.cloudflarePagesHostname.value,this.bxCoreVersion.value=Pe?.bxCoreVersion??this.bxCoreVersion.value,this.publishedSlug.value=Pe?.publishedSlug??this.publishedSlug.value,this.theme.value=Pe?.theme??this.theme.value,this.branding.value=Pe?.branding??this.branding.value,this.stripeEnv.value=Pe?.stripeEnv??this.stripeEnv.value,this.data.value=Pe?.initData??this.data.value,vue.watch(this.ready,(Me,Ze)=>{if(Me&&!Ze){const ie=new CustomEvent("ready",{detail:{templateId:this.templateId.value,data:vue.unref(this.data.value)}});this.dispatchEvent(ie)}}),vue.watch(this.data,()=>{const Me=new CustomEvent("data",{detail:{data:vue.unref(this.data.value)}});this.dispatchEvent(Me)},{deep:!0})}element;studioResourcesBaseUrl=vue.ref("https://studio-resources.c2.bluepic.io");cloudflarePagesHostname=vue.ref("bluepic-core-sandbox.pages.dev");editorRef=vue.ref();templateId=vue.ref();data=vue.ref();serial=vue.ref();allowPanAndZoom=vue.ref(!1);darkmode=vue.ref(!0);ready=vue.ref(!1);displayMode=vue.ref("auto");bxCoreVersion=vue.ref("auto");publishedSlug=vue.ref("latest");theme=vue.ref();branding=vue.ref(!0);stripeEnv=vue.ref("prod");init(){const c=`bluepic-app-${nanoid()}`;this.embedProjectId&&getProjectWithRetries("live.bluepic.io",this.embedProjectId,3,2e3,this.stripeEnv.value).then(({embedProject:Pe,isAllowedToDisableBranding:Me})=>{const Ze=Color(Pe.config.backgroundColor).isDark();this.darkmode.value=Ze,this.displayMode.value=Pe.config.layout,this.allowPanAndZoom.value=Pe.config.allowPanAndZoom,this.theme.value=(()=>{if(Pe.config.backgroundColor){const ie=Pe.config.backgroundColor,ii=Ze?Color(ie).darken(.1).hex():Color(ie).lighten(.1).hex();return{fieldsViewBackgroundColor:ie,editorViewBackgroundColor:ii}}})(),this.branding.value=Me?Pe.config.bluepicBranding:!0,this.templateId.value=Pe.templates[0]});const ne=document.createElement("style");ne.textContent=`
2606
2606
  #${c} .fade-spinner-enter-active,
2607
2607
  #${c} .fade-spinner-leave-active {
2608
2608
  transition: opacity .3s ease;
@@ -2642,4 +2642,4 @@ list should be an Array.`),er.length===0)return new Di(0);if(er.length===1)retur
2642
2642
  </transition>
2643
2643
 
2644
2644
  </div>
2645
- `;const we=this;vue.nextTick(()=>{vue.createApp({components:{BluepicEmbeddedEditor,BluepicSpinner},setup(){return vue.provide("darkmode",we.darkmode),{bridge:{async handleUpload({blob:Me,context:Ze,width:ie,height:ii,name:di,onProgress:li}){const{variants:mi,filename:Ci,id:Ai}=await uploadImage(we.templateId.value,Ze,Me,di,(Ii,Di)=>{li(Ii/Di)}),Ti=mi.find(Ii=>parseCloudflareImagesDeliveryUrl(Ii).variant==="public");if(!Ti)throw new Error("No public variant");return{width:ie,height:ii,key:Ai,name:Ci,src:Ti}}},editorRef:we.editorRef,theme:we.theme,allowPanAndZoom:we.allowPanAndZoom,darkmode:we.darkmode,templateId:we.templateId,studioResourcesBaseUrl:we.studioResourcesBaseUrl,cloudflarePagesHostname:we.cloudflarePagesHostname,data:we.data,serial:we.serial,ready:we.ready,displayMode:we.displayMode,bxCoreVersion:we.bxCoreVersion,publishedSlug:we.publishedSlug}}}).mount(`#${c}`)})}setVariable(c,ne){this.data.value||(this.data.value={}),this.data.value[c]=ne}setData(c,ne=!1){if(ne)this.data.value=c;else{this.data.value||(this.data.value={});for(const we in c)this.setVariable(we,c[we])}}}async function getProjectWithRetries(m,c,ne,we,Pe){let Me=0;for(;Me<ne;){try{console.log(`\u{1F504} Versuch ${Me+1}/${ne}: Hole Public Config...`);const Ze=await fetch(`https://embed-api-v2.bluepic.workers.dev/api/public/project?${new URLSearchParams({hostname:m,slug:c,env:Pe})}`,{method:"GET"});return console.log(`\u2705 Erfolgreich nach ${Me+1} Versuchen`),await Ze.json()}catch(Ze){if(console.error(`\u274C Fehler bei Versuch ${Me+1}:`,Ze),Me<ne-1)console.log(`\u23F3 Warte ${we}ms vor erneutem Versuch...`),await new Promise(ie=>setTimeout(ie,we));else throw console.error(`\u{1F6A8} Maximalanzahl von ${ne} Versuchen erreicht. Abbruch.`),Ze}Me++}throw new Error("Unbekannter Fehler in getPublicConfigWithRetries")}window.addEventListener("load",async()=>{const m=document.querySelectorAll(".bluepic-embed");console.log("Auto-BluepicEmbed elements",m);for(const c of m){const ne=c.getAttribute("data-embed-project-id"),we=c.getAttribute("data-template-id");c.getAttribute("data-stripe-env");const Pe=c.getAttribute("data-init-data"),Me=c.getAttribute("data-studio-resources-base-url")??void 0,Ze=c.getAttribute("data-cloudflare-pages-hostname")??void 0,ie=c.getAttribute("data-display-mode"),ii=c.getAttribute("data-allow-pan-and-zoom"),di=c.getAttribute("data-darkmode"),li=c.getAttribute("data-bx-core-version")??void 0,mi=c.getAttribute("data-published-slug")??void 0,Ci=c.getAttribute("data-theme"),Ai=Pe?JSON.parse(Pe):void 0,Ti=Ci?JSON.parse(Ci):void 0,Ii=ii==="true",Di=di==="true",Zi=ie==="mobile"?"mobile":ie==="stack"?"stack":"auto",Fi=c.getAttribute("data-branding")==="false",Ui=new BluepicEmbed(c,we,ne,{initData:Ai,displayMode:Zi,allowPanAndZoom:Ii,darkmode:Di,studioResourcesBaseUrl:Me,cloudflarePagesHostname:Ze,bxCoreVersion:li,publishedSlug:mi,theme:Ti,branding:Fi});console.log("!",c,Ui)}});const GLOBAL_APP_WRAPPER_CLASS="bluepic-app-wrapper",GLOBAL_APP_WRAPPER_SELECTOR=`.${GLOBAL_APP_WRAPPER_CLASS}`;window.bluepicPopupProvider=new BluepicPopupProvider;function haha(){console.log("haha")}exports.AdjustImage=AdjustImage,exports.BluepicBatchEditor=BluepicBatchEditor,exports.BluepicEmbed=BluepicEmbed,exports.BluepicEmbedded=BluepicEmbedded,exports.BluepicEmbeddedEditor=BluepicEmbeddedEditor,exports.BluepicFieldComponents=BluepciFieldComponents,exports.BluepicSpinner=BluepicSpinner,exports.BxAvatar=BxAvatar,exports.BxButton=BxButton,exports.BxCard=BxCard,exports.BxCheckbox=BxCheckbox,exports.BxColorPicker=BxColorPicker,exports.BxDropdown=BxDropdown,exports.BxFields=_sfc_main$p,exports.BxIcon=BxIcon,exports.BxInput=BxInput,exports.BxList=BxList,exports.BxListItem=BxListItem,exports.BxMenu=BxMenu,exports.BxPopover=BxPopover,exports.BxPopup=_sfc_main$17,exports.BxRadio=BxRadio,exports.BxRadioGroup=BxRadioGroup,exports.BxSelect=BxSelect,exports.BxSlider=BxSlider,exports.BxSpin=BxSpin,exports.BxSwitch=BxSwitch,exports.BxTab=BxTab,exports.BxTabs=BxTabs,exports.BxTag=BxTag,exports.BxTooltip=BxTooltip,exports.BxUserMenu=BxUserMenu,exports.GLOBAL_APP_WRAPPER_CLASS=GLOBAL_APP_WRAPPER_CLASS,exports.GLOBAL_APP_WRAPPER_SELECTOR=GLOBAL_APP_WRAPPER_SELECTOR,exports.MapboxMap=MapboxMap,exports.SlidesNavigation=SlidesNavigation,exports.applyColorMatricesToImage=applyColorMatricesToImage,exports.applyColorMatrix=applyColorMatrix,exports.applyColorMatrixToColor=applyColorMatrixToColor,exports.convertDeprecatedField=convertDeprecatedField,exports.createMessage=createMessage,exports.createPopup=createPopup,exports.cropImage=cropImage,exports.cropToVisibleBBox=cropToVisibleBBox,exports.getDefaultValueForFieldModel=getDefaultValueForFieldModel,exports.getTemplateLiveUrl=getTemplateLiveUrl,exports.getTemplateSerialUrl=getTemplateSerialUrl,exports.getVisibleBBox=getVisibleBBox,exports.groupFeatureByLinebreaks=groupFeatureByLinebreaks$1,exports.haha=haha,exports.normalizeAdjust=normalizeAdjust,exports.normalizeCrop=normalizeCrop,exports.rasterize=rasterize,exports.realizeField=realizeField,exports.renderFieldIcon=renderFieldIcon,exports.renderSVG=renderSVG,exports.stringifyField=stringifyField,exports.ungroupFeaturesDividedByLinebreaks=ungroupFeaturesDividedByLinebreaks,exports.waitUntil=waitUntil,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
2645
+ `;const we=this;vue.nextTick(()=>{vue.createApp({components:{BluepicEmbeddedEditor,BluepicSpinner},setup(){return vue.provide("darkmode",we.darkmode),{bridge:{async handleUpload({blob:Me,context:Ze,width:ie,height:ii,name:di,onProgress:li}){const{variants:mi,filename:Ci,id:Ai}=await uploadImage("https://embed-api-v2.bluepic.workers.dev",we.templateId.value,Ze,Me,di,(Ii,Di)=>{li(Ii/Di)}),Ti=mi.find(Ii=>parseCloudflareImagesDeliveryUrl(Ii).variant==="public");if(!Ti)throw new Error("No public variant");return{width:ie,height:ii,key:Ai,name:Ci,src:Ti}}},editorRef:we.editorRef,theme:we.theme,allowPanAndZoom:we.allowPanAndZoom,darkmode:we.darkmode,templateId:we.templateId,studioResourcesBaseUrl:we.studioResourcesBaseUrl,cloudflarePagesHostname:we.cloudflarePagesHostname,data:we.data,serial:we.serial,ready:we.ready,displayMode:we.displayMode,bxCoreVersion:we.bxCoreVersion,publishedSlug:we.publishedSlug}}}).mount(`#${c}`)})}setVariable(c,ne){this.data.value||(this.data.value={}),this.data.value[c]=ne}setData(c,ne=!1){if(ne)this.data.value=c;else{this.data.value||(this.data.value={});for(const we in c)this.setVariable(we,c[we])}}}async function getProjectWithRetries(m,c,ne,we,Pe){let Me=0;for(;Me<ne;){try{console.log(`\u{1F504} Versuch ${Me+1}/${ne}: Hole Public Config...`);const Ze=await fetch(`https://embed-api-v2.bluepic.workers.dev/api/public/project?${new URLSearchParams({hostname:m,slug:c,env:Pe})}`,{method:"GET"});return console.log(`\u2705 Erfolgreich nach ${Me+1} Versuchen`),await Ze.json()}catch(Ze){if(console.error(`\u274C Fehler bei Versuch ${Me+1}:`,Ze),Me<ne-1)console.log(`\u23F3 Warte ${we}ms vor erneutem Versuch...`),await new Promise(ie=>setTimeout(ie,we));else throw console.error(`\u{1F6A8} Maximalanzahl von ${ne} Versuchen erreicht. Abbruch.`),Ze}Me++}throw new Error("Unbekannter Fehler in getPublicConfigWithRetries")}window.addEventListener("load",async()=>{const m=document.querySelectorAll(".bluepic-embed");console.log("Auto-BluepicEmbed elements",m);for(const c of m){const ne=c.getAttribute("data-embed-project-id"),we=c.getAttribute("data-template-id");c.getAttribute("data-stripe-env");const Pe=c.getAttribute("data-init-data"),Me=c.getAttribute("data-studio-resources-base-url")??void 0,Ze=c.getAttribute("data-cloudflare-pages-hostname")??void 0,ie=c.getAttribute("data-display-mode"),ii=c.getAttribute("data-allow-pan-and-zoom"),di=c.getAttribute("data-darkmode"),li=c.getAttribute("data-bx-core-version")??void 0,mi=c.getAttribute("data-published-slug")??void 0,Ci=c.getAttribute("data-theme"),Ai=Pe?JSON.parse(Pe):void 0,Ti=Ci?JSON.parse(Ci):void 0,Ii=ii==="true",Di=di==="true",Zi=ie==="mobile"?"mobile":ie==="stack"?"stack":"auto",Fi=c.getAttribute("data-branding")==="false",Ui=new BluepicEmbed(c,we,ne,{initData:Ai,displayMode:Zi,allowPanAndZoom:Ii,darkmode:Di,studioResourcesBaseUrl:Me,cloudflarePagesHostname:Ze,bxCoreVersion:li,publishedSlug:mi,theme:Ti,branding:Fi});console.log("!",c,Ui)}});const GLOBAL_APP_WRAPPER_CLASS="bluepic-app-wrapper",GLOBAL_APP_WRAPPER_SELECTOR=`.${GLOBAL_APP_WRAPPER_CLASS}`;window.bluepicPopupProvider=new BluepicPopupProvider;function haha(){console.log("haha")}exports.AdjustImage=AdjustImage,exports.BluepicBatchEditor=BluepicBatchEditor,exports.BluepicEmbed=BluepicEmbed,exports.BluepicEmbedded=BluepicEmbedded,exports.BluepicEmbeddedEditor=BluepicEmbeddedEditor,exports.BluepicFieldComponents=BluepciFieldComponents,exports.BluepicSpinner=BluepicSpinner,exports.BxAvatar=BxAvatar,exports.BxButton=BxButton,exports.BxCard=BxCard,exports.BxCheckbox=BxCheckbox,exports.BxColorPicker=BxColorPicker,exports.BxDropdown=BxDropdown,exports.BxFields=_sfc_main$p,exports.BxIcon=BxIcon,exports.BxInput=BxInput,exports.BxList=BxList,exports.BxListItem=BxListItem,exports.BxMenu=BxMenu,exports.BxPopover=BxPopover,exports.BxPopup=_sfc_main$17,exports.BxRadio=BxRadio,exports.BxRadioGroup=BxRadioGroup,exports.BxSelect=BxSelect,exports.BxSlider=BxSlider,exports.BxSpin=BxSpin,exports.BxSwitch=BxSwitch,exports.BxTab=BxTab,exports.BxTabs=BxTabs,exports.BxTag=BxTag,exports.BxTooltip=BxTooltip,exports.BxUserMenu=BxUserMenu,exports.GLOBAL_APP_WRAPPER_CLASS=GLOBAL_APP_WRAPPER_CLASS,exports.GLOBAL_APP_WRAPPER_SELECTOR=GLOBAL_APP_WRAPPER_SELECTOR,exports.MapboxMap=MapboxMap,exports.SlidesNavigation=SlidesNavigation,exports.applyColorMatricesToImage=applyColorMatricesToImage,exports.applyColorMatrix=applyColorMatrix,exports.applyColorMatrixToColor=applyColorMatrixToColor,exports.convertDeprecatedField=convertDeprecatedField,exports.createMessage=createMessage,exports.createPopup=createPopup,exports.cropImage=cropImage,exports.cropToVisibleBBox=cropToVisibleBBox,exports.getDefaultValueForFieldModel=getDefaultValueForFieldModel,exports.getTemplateLiveUrl=getTemplateLiveUrl,exports.getTemplateSerialUrl=getTemplateSerialUrl,exports.getVisibleBBox=getVisibleBBox,exports.groupFeatureByLinebreaks=groupFeatureByLinebreaks$1,exports.haha=haha,exports.normalizeAdjust=normalizeAdjust,exports.normalizeCrop=normalizeCrop,exports.rasterize=rasterize,exports.realizeField=realizeField,exports.renderFieldIcon=renderFieldIcon,exports.renderSVG=renderSVG,exports.stringifyField=stringifyField,exports.ungroupFeaturesDividedByLinebreaks=ungroupFeaturesDividedByLinebreaks,exports.waitUntil=waitUntil,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});