@brightspot/ui 6.4.2 → 6.4.3-pr.366.2026.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +499 -499
- package/dist/storybook/assets/{ActionBar.stories-S00Ek6J4.js → ActionBar.stories-0ScNWOC4.js} +1 -1
- package/dist/storybook/assets/{ActionItem.stories-D4F9yCyV.js → ActionItem.stories-DXJ_yKW3.js} +1 -1
- package/dist/storybook/assets/{AiSparkle.stories-vC8jum9o.js → AiSparkle.stories-Z_5khRM7.js} +1 -1
- package/dist/storybook/assets/{Avatar.stories-BvCzPIfr.js → Avatar.stories-C9XcQNHg.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-VRTsctUo.js → AvatarGroup.stories-Cdy_mkeq.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-DPaTwNDd.js → Badge.stories-BUdXSprE.js} +1 -1
- package/dist/storybook/assets/{Banner.stories-Ki6o6Qnz.js → Banner.stories-D71fgNb5.js} +1 -1
- package/dist/storybook/assets/{Button-BVkUpjw-.js → Button-D7pK-2at.js} +1 -1
- package/dist/storybook/assets/{Button.stories-B4Cajufa.js → Button.stories-B6WKuxXx.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup.stories--XdEhkoR.js → ButtonGroup.stories-CwiRfEal.js} +1 -1
- package/dist/storybook/assets/{Card.stories-DdaTXloZ.js → Card.stories-CxCcO9k6.js} +1 -1
- package/dist/storybook/assets/{Celebrate.stories-5krJLBnV.js → Celebrate.stories-DNVFUrhg.js} +1 -1
- package/dist/storybook/assets/{Checkbox.stories-DJiir-4S.js → Checkbox.stories-SuP4ltMI.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-FoLbJ02D.js → CircularProgress.stories-BB0twcGv.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-C_Y93Vvc.js → ClipboardMixin.stories-DaPV19jG.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-Cal-f26G.js → Color-6BZIO3FS-DQ34tmQu.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-BIOYpAZL.js → Colors.stories-CMFJai_a.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-z1_xU5i7.js → CombinedEffects.stories-BIHfDsN0.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-DCnHVb7T.js → ComponentStatesMixin-Bq-OGuus.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-Crysvxtr.js → ComponentStatesMixin.stories-DMxDqidh.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-CMpzwyh6.js → CopyToClipboard.stories-CkdYHm8U.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-C2FgBZXP.js → Debounce.stories-CZSMfS-h.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-CxHYlXfz.js → DocsRenderer-LL677BLK-CCAvPHmY.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-DhBn1nVs.js → Dropdown.stories-BTqSRQiC.js} +1 -1
- package/dist/storybook/assets/{EmptyState.stories-CBIvJ1Tk.js → EmptyState.stories-CjIkNVv4.js} +1 -1
- package/dist/storybook/assets/{EscaAvatar.stories-DKPhkhvA.js → EscaAvatar.stories-ORFCzxQw.js} +1 -1
- package/dist/storybook/assets/{Events.stories-DLbfdSXr.js → Events.stories-DHFT6dZM.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-B6CIwwiJ.js → Heading.stories-CRgKl3Ve.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-C8E72qX_.js → HueRipple.stories-YiQHrWPS.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-YUubIb9i.js → Icon.stories-Bv4QRZNL.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-07ADapHQ.js → IconButton.stories-ErFc860x.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-DZk0i6LC.js → LinearProgress.stories-DUAAMzdt.js} +1 -1
- package/dist/storybook/assets/{Message.stories-BaTncCPY.js → Message.stories-DxJEEd1I.js} +1 -1
- package/dist/storybook/assets/{OnFindMixin.stories-BKgCI6zb.js → OnFindMixin.stories-CoKUEhb4.js} +1 -1
- package/dist/storybook/assets/{Pagination.stories-BrD-TcnC.js → Pagination.stories-6k02-Zb5.js} +1 -1
- package/dist/storybook/assets/{Popover.stories-CUe375fR.js → Popover.stories-Cd7P1nw_.js} +1 -1
- package/dist/storybook/assets/{ReadyMixin-XQ_tHzRU.js → ReadyMixin-BL65bbm_.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin.stories-BBc7zdjl.js → RovingTabindexMixin.stories-CvtQ9Om6.js} +1 -1
- package/dist/storybook/assets/{Rtc.stories-CkEgMrqd.js → Rtc.stories-BBmO6Ses.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-DdOKLFJ5.js → ScrollShadow.stories-BUiypzkp.js} +1 -1
- package/dist/storybook/assets/{Switch.stories-Dw9Jic7Y.js → Switch.stories-BndbX0N7.js} +1 -1
- package/dist/storybook/assets/{Tab.stories-CUAvvpwI.js → Tab.stories-DVMyUFjq.js} +1 -1
- package/dist/storybook/assets/{Tabs.stories--iRj2mWu.js → Tabs.stories-BQPYcQ6j.js} +1 -1
- package/dist/storybook/assets/{Throttle.stories-BDuNJMQg.js → Throttle.stories-CKYOCVnj.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-RaSZ71_I.js → Tooltip.stories-B3DmBl8X.js} +1 -1
- package/dist/storybook/assets/{Upload.stories-hhhR_V85.js → Upload.stories-nzkKN-_d.js} +1 -1
- package/dist/storybook/assets/{UploadItem.stories-B-1lkPzO.js → UploadItem.stories-CL3oKT8D.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-BycQWbzd.js → Welcome.stories-DfHnb5cA.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-BDcpbQXU.js → Widget.stories-CcVwc0wv.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-CHL0JiUq.js → WithTooltip-65CFNBJE-CxSJYFKf.js} +1 -1
- package/dist/storybook/assets/{blocks-DllEBdtP.js → blocks-A7XjcsrR.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-LrYXshB9.js → formatter-EIJCOSYU-BJ6Z7p9H.js} +1 -1
- package/dist/storybook/assets/if-defined-C9mNa1xD.js +1 -0
- package/dist/storybook/assets/{iframe-Bp7-_nUZ.js → iframe-ChxxW2FZ.js} +4 -4
- package/dist/storybook/assets/iframe-DI_vgyKl.css +1 -0
- package/dist/storybook/assets/{index-Cc3M657Z.js → index-ChSJHRK6.js} +1 -1
- package/dist/storybook/assets/{onFind-Du4z1ObO.js → onFind-C-gvwlyW.js} +1 -1
- package/dist/storybook/assets/{onFind.stories-BCUiC6a9.js → onFind.stories-8tPEGWhS.js} +1 -1
- package/dist/storybook/assets/{onRemove.stories-B-ICGMhl.js → onRemove.stories-CSuoNbAk.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-DijYge1X.js → onVisible.stories-LFpM1FnE.js} +1 -1
- package/dist/storybook/assets/{style-map-DaohL-ne.js → style-map-4fqj8G4H.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-CH5_k0Po.js → syntaxhighlighter-ED5Y7EFY-DCcLcHdT.js} +1 -1
- package/dist/storybook/iframe.html +2 -2
- package/dist/storybook/project.json +1 -1
- package/dist/tailwind-plugin-badge.js +2 -1
- package/dist/tailwind-plugin-badge.js.map +1 -1
- package/dist/tailwind-plugin-badge.ts +2 -1
- package/dist/tailwind-plugin-message.js +3 -0
- package/dist/tailwind-plugin-message.js.map +1 -1
- package/dist/tailwind-plugin-message.ts +3 -0
- package/package.json +1 -1
- package/src/legacy/tool-ui/src/Conversation.css +14 -3
- package/src/legacy/tool-ui/src/Conversation.ts +3 -0
- package/src/legacy/tool-ui/src/Entry.ts +4 -3
- package/src/legacy/tool-ui/src/SharePreview.css +209 -4
- package/src/legacy/tool-ui/src/SharePreviewCommenting.ts +659 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/LocationMap.8c328ae48113c22fec31.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.ef21fd86df209b8f772b.js → RTEProseMirror.e4cbe3b9e2e8f938cf1a.js} +5 -5
- package/src/legacy/tool-ui/src/main/webapp/dist/RegionMap.17d7cd9f92c923b593d5.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/{v4.83bc23585a616647b793.js → v4.56e25b6f00e10789ff37.js} +8 -8
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.22ce1a2b135f2c813878.css +5 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/{v5.dae3cbc9fb1335ca0f1f.js → v5.85bedd855e1e6f2c2caa.js} +6 -6
- package/dist/storybook/assets/if-defined-DONC-k_n.js +0 -1
- package/dist/storybook/assets/iframe-D7jBrFjV.css +0 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/LocationMap.72a510c0f5ff236f596e.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/RegionMap.f6f963eda2cb616b9661.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.d87bbcc711f912ae68db.css +0 -5
- /package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.ef21fd86df209b8f772b.js.LICENSE.txt → RTEProseMirror.e4cbe3b9e2e8f938cf1a.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.83bc23585a616647b793.js.LICENSE.txt → v4.56e25b6f00e10789ff37.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.dae3cbc9fb1335ca0f1f.js.LICENSE.txt → v5.85bedd855e1e6f2c2caa.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkbrightspot_cms=self.webpackChunkbrightspot_cms||[]).push([[1888],{95628(t,a,e){function o(t,a){return t?(Array.isArray(a)&&(a=a.join(",")),t.querySelector(a)):null}e.d(a,{A:()=>o}),Object.defineProperty(o,"name",{value:"default",configurable:!0})},60021(t,a,e){function o(t,a){return t?(Array.isArray(a)&&(a=a.join(",")),t.querySelector(a)):null}e.d(a,{A:()=>o}),Object.defineProperty(o,"name",{value:"default",configurable:!0})},83814(t,a,e){e.d(a,{default:()=>l}),e(84978),e(91672),e(92191),e(68690),e(45299);var o=e(53608),n=e.n(o),r=e(80907);if(7717==e.j)var i=e(95628);class l{constructor(t){if(this._container=t,this._latInput=(0,i.A)(t,".locationMapLatitude"),this._lngInput=(0,i.A)(t,".locationMapLongitude"),this._zoomInput=(0,i.A)(t,".locationMapZoom"),!this._latInput||!this._lngInput||!this._zoomInput)return;const a=this._latInput.value,e=this._lngInput.value,o=""!==a&&""!==e,l=o?new(n().LatLng)(parseFloat(a),parseFloat(e)):new(n().LatLng)(38.95498,-77.365057);this._map=n().map(t,{center:l,zoom:parseFloat(this._zoomInput.value)||6,layers:[n().tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://openstreetmap.org">OpenStreetMap</a> contributors'})]}),this._map.on("click",t=>{t.originalEvent.srcElement.classList.contains("locationMap")&&this.updateMarker(t.latlng)}),this._map.on("zoomend",()=>{this._zoomInput.value=this._map.getZoom()}),o&&this.updateMarker(l,""),new r.Vn({provider:new r.F6,retainZoomLevel:!0,showMarker:!1}).addTo(this._map),this._map.on("geosearch/showlocation",t=>{t.location&&this.updateMarker(new(n().LatLng)(parseFloat(t.location.y),parseFloat(t.location.x)),t.location.label)}),n().control.locate({drawCircle:!1,markerStyle:{weight:2,radius:6},keepCurrentZoomLevel:!0,icon:"LocationMap-locateControl",iconLoading:"LocationMap-locateControl is-loading",strings:{title:"Set marker to your current location",popup:"<b>Current location</b><br/>(within {distance} {unit})"}}).addTo(this._map),this._map.on("locationfound",t=>{this.updateMarker(t.latlng,"")}),new(n().Control.extend({onAdd:()=>{const t=n().DomUtil.create("div");t.className="leaflet-bar leaflet-control";const a=n().DomUtil.create("a");return a.className="LocationMap-removeMarker",a.onclick=t=>{t.preventDefault(),t.stopPropagation(),this._marker&&(this._map.removeLayer(this._marker),this._marker=null,this._latInput.value=null,this._lngInput.value=null,this._container.classList.remove("is-marked"))},t.appendChild(a),t}}))({position:"topleft"}).addTo(this._map)}updateValue(t){this._latInput.value=t.lat,this._lngInput.value=t.lng}updateMarker(t,a){if(this._marker)this._marker.setLatLng(t),this._marker.bindPopup(a||t.toString());else{const e=n().divIcon({className:"LocationMap-marker",iconSize:[36,36],iconAnchor:[18,36],popupAnchor:[0,-30]});this._marker=n().marker(t,{draggable:!0,autoPan:!0,icon:e}).bindPopup(a||t.toString()),this._marker.on("moveend",t=>{this.updateValue(t.target._latlng),this._marker.bindPopup(t.target._latlng.toString())}),this._marker.addTo(this._map)}this._container.classList.add("is-marked"),this.updateValue(t)}}},48207(t,a,e){e.d(a,{default:()=>l}),e(49371),e(56065),e(79382),e(81499),e(80489);var o=e(66417),n=e.n(o),r=e(68098);if(3324==e.j)var i=e(60021);class l{constructor(t){if(this._container=t,this._latInput=(0,i.A)(t,".locationMapLatitude"),this._lngInput=(0,i.A)(t,".locationMapLongitude"),this._zoomInput=(0,i.A)(t,".locationMapZoom"),!this._latInput||!this._lngInput||!this._zoomInput)return;const a=this._latInput.value,e=this._lngInput.value,o=""!==a&&""!==e,l=o?new(n().LatLng)(parseFloat(a),parseFloat(e)):new(n().LatLng)(38.95498,-77.365057);this._map=n().map(t,{center:l,zoom:parseFloat(this._zoomInput.value)||6,layers:[n().tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://openstreetmap.org">OpenStreetMap</a> contributors'})]}),this._map.on("click",t=>{t.originalEvent.srcElement.classList.contains("locationMap")&&this.updateMarker(t.latlng)}),this._map.on("zoomend",()=>{this._zoomInput.value=this._map.getZoom()}),o&&this.updateMarker(l,""),new r.Vn({provider:new r.F6,retainZoomLevel:!0,showMarker:!1}).addTo(this._map),this._map.on("geosearch/showlocation",t=>{t.location&&this.updateMarker(new(n().LatLng)(parseFloat(t.location.y),parseFloat(t.location.x)),t.location.label)}),n().control.locate({drawCircle:!1,markerStyle:{weight:2,radius:6},keepCurrentZoomLevel:!0,icon:"LocationMap-locateControl",iconLoading:"LocationMap-locateControl is-loading",strings:{title:"Set marker to your current location",popup:"<b>Current location</b><br/>(within {distance} {unit})"}}).addTo(this._map),this._map.on("locationfound",t=>{this.updateMarker(t.latlng,"")}),new(n().Control.extend({onAdd:()=>{const t=n().DomUtil.create("div");t.className="leaflet-bar leaflet-control";const a=n().DomUtil.create("a");return a.className="LocationMap-removeMarker",a.onclick=t=>{t.preventDefault(),t.stopPropagation(),this._marker&&(this._map.removeLayer(this._marker),this._marker=null,this._latInput.value=null,this._lngInput.value=null,this._container.classList.remove("is-marked"))},t.appendChild(a),t}}))({position:"topleft"}).addTo(this._map)}updateValue(t){this._latInput.value=t.lat,this._lngInput.value=t.lng}updateMarker(t,a){if(this._marker)this._marker.setLatLng(t),this._marker.bindPopup(a||t.toString());else{const e=n().divIcon({className:"LocationMap-marker",iconSize:[36,36],iconAnchor:[18,36],popupAnchor:[0,-30]});this._marker=n().marker(t,{draggable:!0,autoPan:!0,icon:e}).bindPopup(a||t.toString()),this._marker.on("moveend",t=>{this.updateValue(t.target._latlng),this._marker.bindPopup(t.target._latlng.toString())}),this._marker.addTo(this._map)}this._container.classList.add("is-marked"),this.updateValue(t)}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkbrightspot_cms=self.webpackChunkbrightspot_cms||[]).push([[6379],{95628(e,t,o){function r(e,t){return e?(Array.isArray(t)&&(t=t.join(",")),e.querySelector(t)):null}o.d(t,{A:()=>r}),Object.defineProperty(r,"name",{value:"default",configurable:!0})},60021(e,t,o){function r(e,t){return e?(Array.isArray(t)&&(t=t.join(",")),e.querySelector(t)):null}o.d(t,{A:()=>r}),Object.defineProperty(r,"name",{value:"default",configurable:!0})},35657(e,t,o){o.d(t,{default:()=>s}),o(44764),o(50144),o(84978),o(25809),o(91672),o(92191),o(68690),o(45299),o(94768),o(62128);var r=o(53608),a=o.n(r),i=o(80907);if(7717==o.j)var n=o(95628);class s{constructor(e){if(this._zoomInput=(0,n.A)(e,".regionMapZoom"),this._centerInput=(0,n.A)(e,".regionMapCenter"),this._geoJsonInput=(0,n.A)(e,".regionMapGeoJson"),!this._zoomInput||!this._centerInput||!this._geoJsonInput)return;const t=JSON.parse(this._centerInput.value),o=JSON.parse(this._geoJsonInput.value);this._map=a().map(e,{center:t,zoom:parseFloat(this._zoomInput.value),layers:[a().tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://openstreetmap.org">OpenStreetMap</a> contributors',referrerPolicy:"strict-origin-when-cross-origin"})]}),this._regionLayer=new(a().FeatureGroup),this._map.addLayer(this._regionLayer);const r={color:"#3a87ad",opacity:1,weight:4,fillColor:"#3a87ad",fillOpacity:.5};o.geometries&&o.geometries.forEach((e,t)=>{"MultiPolygon"===e.type&&o.geometries.splice(t,1)[0].coordinates.forEach(e=>{const t={type:"Polygon",coordinates:e};o.geometries.push(t)}),"Circle"===e.type&&(e.type="Point",Array.isArray(e.coordinates)&&e.coordinates.length>0&&Array.isArray(e.coordinates[0])&&e.coordinates[0].length>1&&(e.coordinates=[e.coordinates[0][1],e.coordinates[0][0]]))});const s=a().GeoJSON.geometryToLayer(o,{pointToLayer:(e,t)=>e.geometry&&"Point"===e.geometry.type&&e.geometry.radius>0?new(a().Circle)(t,e.geometry.radius):new(a().Marker)(t)});for(const e in s.getLayers()){const t=s.getLayers()[e];t.setStyle&&t.setStyle(r),this._regionLayer.addLayer(t)}this._regionLayer.setStyle(r),this._map.addControl(new(a().Control.Draw)({draw:{polyline:!1,rectangle:!1,marker:!1,circlemarker:!1,polygon:{allowIntersection:!1,shapeOptions:r},circle:{shapeOptions:r}},edit:{featureGroup:this._regionLayer,remove:!0}})),new i.Vn({provider:new i.F6,retainZoomLevel:!0,showMarker:!1}).addTo(this._map),this._map.on("geosearch/showlocation",e=>{e.location&&this.updateMarker(new(a().LatLng)(parseFloat(e.location.y),parseFloat(e.location.x)),e.location.label)}),a().control.locate({drawCircle:!1,markerStyle:{weight:2,radius:6},keepCurrentZoomLevel:!0,icon:"LocationMap-locateControl",iconLoading:"LocationMap-locateControl is-loading",strings:{title:"Set marker to your current location",popup:"<b>Current location</b><br/>(within {distance} {unit})"}}).addTo(this._map);var p=a().Circle.prototype.toGeoJSON;a().Circle.include({toGeoJSON(){var e=p.call(this);return e.geometry={type:"Circle",coordinates:[[this.getLatLng().lat,this.getLatLng().lng]],radius:this.getRadius()},e}}),this._map.on("draw:created",e=>{this._regionLayer.addLayer(e.layer),this.updateGeoJSON()}),this._map.on("draw:deleted",this.updateGeoJSON.bind(this)),this._map.on("draw:edited",this.updateGeoJSON.bind(this)),this._map.on("dragend",this.updateMapPosition.bind(this)),this._map.on("zoomend",this.updateMapPosition.bind(this))}updateGeoJSON(){const e=this._regionLayer.toGeoJSON();this._geoJsonInput.value=JSON.stringify(e)}updateMarker(e,t){if(this._marker)this._marker.setLatLng(e),this._marker.bindPopup(t||e.toString());else{const o=a().divIcon({className:"LocationMap-marker",iconSize:[36,36],iconAnchor:[18,36],popupAnchor:[0,-30]});this._marker=a().marker(e,{draggable:!0,autoPan:!0,icon:o}).bindPopup(t||e.toString()),this._marker.on("moveend",e=>{this._marker.bindPopup(e.target._latlng.toString())}),this._marker.addTo(this._map)}}updateMapPosition(){this._zoomInput.value=this._map.getZoom(),this._centerInput.value=JSON.stringify(this._map.getCenter())}}},22848(e,t,o){o.d(t,{default:()=>s}),o(57573),o(62953),o(49371),o(96648),o(56065),o(79382),o(81499),o(80489),o(7577),o(74937);var r=o(66417),a=o.n(r),i=o(68098);if(3324==o.j)var n=o(60021);class s{constructor(e){if(this._zoomInput=(0,n.A)(e,".regionMapZoom"),this._centerInput=(0,n.A)(e,".regionMapCenter"),this._geoJsonInput=(0,n.A)(e,".regionMapGeoJson"),!this._zoomInput||!this._centerInput||!this._geoJsonInput)return;const t=JSON.parse(this._centerInput.value),o=JSON.parse(this._geoJsonInput.value);this._map=a().map(e,{center:t,zoom:parseFloat(this._zoomInput.value),layers:[a().tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://openstreetmap.org">OpenStreetMap</a> contributors',referrerPolicy:"strict-origin-when-cross-origin"})]}),this._regionLayer=new(a().FeatureGroup),this._map.addLayer(this._regionLayer);const r={color:"#3a87ad",opacity:1,weight:4,fillColor:"#3a87ad",fillOpacity:.5};o.geometries&&o.geometries.forEach((e,t)=>{"MultiPolygon"===e.type&&o.geometries.splice(t,1)[0].coordinates.forEach(e=>{const t={type:"Polygon",coordinates:e};o.geometries.push(t)}),"Circle"===e.type&&(e.type="Point",Array.isArray(e.coordinates)&&e.coordinates.length>0&&Array.isArray(e.coordinates[0])&&e.coordinates[0].length>1&&(e.coordinates=[e.coordinates[0][1],e.coordinates[0][0]]))});const s=a().GeoJSON.geometryToLayer(o,{pointToLayer:(e,t)=>e.geometry&&"Point"===e.geometry.type&&e.geometry.radius>0?new(a().Circle)(t,e.geometry.radius):new(a().Marker)(t)});for(const e in s.getLayers()){const t=s.getLayers()[e];t.setStyle&&t.setStyle(r),this._regionLayer.addLayer(t)}this._regionLayer.setStyle(r),this._map.addControl(new(a().Control.Draw)({draw:{polyline:!1,rectangle:!1,marker:!1,circlemarker:!1,polygon:{allowIntersection:!1,shapeOptions:r},circle:{shapeOptions:r}},edit:{featureGroup:this._regionLayer,remove:!0}})),new i.Vn({provider:new i.F6,retainZoomLevel:!0,showMarker:!1}).addTo(this._map),this._map.on("geosearch/showlocation",e=>{e.location&&this.updateMarker(new(a().LatLng)(parseFloat(e.location.y),parseFloat(e.location.x)),e.location.label)}),a().control.locate({drawCircle:!1,markerStyle:{weight:2,radius:6},keepCurrentZoomLevel:!0,icon:"LocationMap-locateControl",iconLoading:"LocationMap-locateControl is-loading",strings:{title:"Set marker to your current location",popup:"<b>Current location</b><br/>(within {distance} {unit})"}}).addTo(this._map);var p=a().Circle.prototype.toGeoJSON;a().Circle.include({toGeoJSON(){var e=p.call(this);return e.geometry={type:"Circle",coordinates:[[this.getLatLng().lat,this.getLatLng().lng]],radius:this.getRadius()},e}}),this._map.on("draw:created",e=>{this._regionLayer.addLayer(e.layer),this.updateGeoJSON()}),this._map.on("draw:deleted",this.updateGeoJSON.bind(this)),this._map.on("draw:edited",this.updateGeoJSON.bind(this)),this._map.on("dragend",this.updateMapPosition.bind(this)),this._map.on("zoomend",this.updateMapPosition.bind(this))}updateGeoJSON(){const e=this._regionLayer.toGeoJSON();this._geoJsonInput.value=JSON.stringify(e)}updateMarker(e,t){if(this._marker)this._marker.setLatLng(e),this._marker.bindPopup(t||e.toString());else{const o=a().divIcon({className:"LocationMap-marker",iconSize:[36,36],iconAnchor:[18,36],popupAnchor:[0,-30]});this._marker=a().marker(e,{draggable:!0,autoPan:!0,icon:o}).bindPopup(t||e.toString()),this._marker.on("moveend",e=>{this._marker.bindPopup(e.target._latlng.toString())}),this._marker.addTo(this._map)}}updateMapPosition(){this._zoomInput.value=this._map.getZoom(),this._centerInput.value=JSON.stringify(this._map.getCenter())}}}}]);
|