Gutenberg Blocks and Template Library by Otter - Version 1.7.4

Version Description

Download this release

Release Info

Developer themeisle
Plugin Icon wp plugin Gutenberg Blocks and Template Library by Otter
Version 1.7.4
Comparing to
See all releases

Code changes from version 1.7.3 to 1.7.4

CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  ##### [Version 1.7.3](https://github.com/Codeinwp/otter-blocks/compare/v1.7.2...v1.7.3) (2021-11-18)
2
 
3
 
1
+ ##### [Version 1.7.4](https://github.com/Codeinwp/otter-blocks/compare/v1.7.3...v1.7.4) (2021-12-02)
2
+
3
+ - Fix Leaflet scripts not loading properly
4
+ - Fix blocks causing errors on widgets
5
+ - Fix Blocks CSS not working properly
6
+ - Fix Blocks Animation causing the debugging error
7
+
8
  ##### [Version 1.7.3](https://github.com/Codeinwp/otter-blocks/compare/v1.7.2...v1.7.3) (2021-11-18)
9
 
10
 
assets/leaflet/leaflet-gesture-handling.min.js CHANGED
@@ -1,2 +1 @@
1
  !function(a,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("leafletGestureHandling",["exports"],t):t(a.leafletGestureHandling={})}(this,function(a){"use strict";var o={ar:{touch:"استخدم إصبعين لتحريك الخريطة",scroll:"‏استخدم ctrl + scroll لتصغير/تكبير الخريطة",scrollMac:"يمكنك استخدام ⌘ + التمرير لتكبير/تصغير الخريطة"},bg:{touch:"Използвайте два пръста, за да преместите картата",scroll:"Задръжте бутона Ctrl натиснат, докато превъртате, за да промените мащаба на картата",scrollMac:"Задръжте бутона ⌘ натиснат, докато превъртате, за да промените мащаба на картата"},bn:{touch:"মানচিত্রটিকে সরাতে দুটি আঙ্গুল ব্যবহার করুন",scroll:"ম্যাপ জুম করতে ctrl + scroll ব্যবহার করুন",scrollMac:"ম্যাপে জুম করতে ⌘ বোতাম টিপে স্ক্রল করুন"},ca:{touch:"Fes servir dos dits per moure el mapa",scroll:"Prem la tecla Control mentre et desplaces per apropar i allunyar el mapa",scrollMac:"Prem la tecla ⌘ mentre et desplaces per apropar i allunyar el mapa"},cs:{touch:"K posunutí mapy použijte dva prsty",scroll:"Velikost zobrazení mapy změňte podržením klávesy Ctrl a posouváním kolečka myši",scrollMac:"Velikost zobrazení mapy změníte podržením klávesy ⌘ a posunutím kolečka myši / touchpadu"},da:{touch:"Brug to fingre til at flytte kortet",scroll:"Brug ctrl + rullefunktionen til at zoome ind og ud på kortet",scrollMac:"Brug ⌘ + rullefunktionen til at zoome ind og ud på kortet"},de:{touch:"Verschieben der Karte mit zwei Fingern",scroll:"Verwende Strg+Scrollen zum Zoomen der Karte",scrollMac:"⌘"},el:{touch:"Χρησιμοποιήστε δύο δάχτυλα για μετακίνηση στον χάρτη",scroll:"Χρησιμοποιήστε το πλήκτρο Ctrl και κύλιση, για να μεγεθύνετε τον χάρτη",scrollMac:"Χρησιμοποιήστε το πλήκτρο ⌘ + κύλιση για εστίαση στον χάρτη"},en:{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},"en-AU":{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},"en-GB":{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},es:{touch:"Para mover el mapa, utiliza dos dedos",scroll:"Mantén pulsada la tecla Ctrl mientras te desplazas para acercar o alejar el mapa",scrollMac:"Mantén pulsada la tecla ⌘ mientras te desplazas para acercar o alejar el mapa"},eu:{touch:"Erabili bi hatz mapa mugitzeko",scroll:"Mapan zooma aplikatzeko, sakatu Ktrl eta egin gora edo behera",scrollMac:"Eduki sakatuta ⌘ eta egin gora eta behera mapa handitu eta txikitzeko"},fa:{touch:"برای حرکت دادن نقشه از دو انگشت استفاده کنید.",scroll:"‏برای بزرگ‌نمایی نقشه از ctrl + scroll استفاده کنید",scrollMac:"برای بزرگ‌نمایی نقشه، از ⌘ + پیمایش استفاده کنید."},fi:{touch:"Siirrä karttaa kahdella sormella.",scroll:"Zoomaa karttaa painamalla Ctrl-painiketta ja vierittämällä.",scrollMac:"Zoomaa karttaa pitämällä painike ⌘ painettuna ja vierittämällä."},fil:{touch:"Gumamit ng dalawang daliri upang iusog ang mapa",scroll:"Gamitin ang ctrl + scroll upang i-zoom ang mapa",scrollMac:"Gamitin ang ⌘ + scroll upang i-zoom ang mapa"},fr:{touch:"Utilisez deux doigts pour déplacer la carte",scroll:"Vous pouvez zoomer sur la carte à l'aide de CTRL+Molette de défilement",scrollMac:"Vous pouvez zoomer sur la carte à l'aide de ⌘+Molette de défilement"},gl:{touch:"Utiliza dous dedos para mover o mapa",scroll:"Preme Ctrl mentres te desprazas para ampliar o mapa",scrollMac:"Preme ⌘ e desprázate para ampliar o mapa"},gu:{touch:"નકશો ખસેડવા બે આંગળીઓનો ઉપયોગ કરો",scroll:"નકશાને ઝૂમ કરવા માટે ctrl + સ્ક્રોલનો ઉપયોગ કરો",scrollMac:"નકશાને ઝૂમ કરવા ⌘ + સ્ક્રોલનો ઉપયોગ કરો"},hi:{touch:"मैप एक जगह से दूसरी जगह ले जाने के लिए दो उंगलियों का इस्तेमाल करें",scroll:"मैप को ज़ूम करने के लिए ctrl + स्क्रोल का उपयोग करें",scrollMac:"मैप को ज़ूम करने के लिए ⌘ + स्क्रोल का उपयोग करें"},hr:{touch:"Pomičite kartu pomoću dva prsta",scroll:"Upotrijebite Ctrl i klizač miša da biste zumirali kartu",scrollMac:"Upotrijebite gumb ⌘ dok se pomičete za zumiranje karte"},hu:{touch:"Két ujjal mozgassa a térképet",scroll:"A térkép a ctrl + görgetés használatával nagyítható",scrollMac:"A térkép a ⌘ + görgetés használatával nagyítható"},id:{touch:"Gunakan dua jari untuk menggerakkan peta",scroll:"Gunakan ctrl + scroll untuk memperbesar atau memperkecil peta",scrollMac:"Gunakan ⌘ + scroll untuk memperbesar atau memperkecil peta"},it:{touch:"Utilizza due dita per spostare la mappa",scroll:"Utilizza CTRL + scorrimento per eseguire lo zoom della mappa",scrollMac:"Utilizza ⌘ + scorrimento per eseguire lo zoom della mappa"},iw:{touch:"הזז את המפה באמצעות שתי אצבעות",scroll:"‏אפשר לשנות את מרחק התצוגה במפה באמצעות מקש ctrl וגלילה",scrollMac:"אפשר לשנות את מרחק התצוגה במפה באמצעות מקש ⌘ וגלילה"},ja:{touch:"地図を移動させるには指 2 本で操作します",scroll:"地図をズームするには、Ctrl キーを押しながらスクロールしてください",scrollMac:"地図をズームするには、⌘ キーを押しながらスクロールしてください"},kn:{touch:"Use two fingers to move the map",scroll:"Use Ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},ko:{touch:"지도를 움직이려면 두 손가락을 사용하세요.",scroll:"지도를 확대/축소하려면 Ctrl을 누른 채 스크롤하세요.",scrollMac:"지도를 확대하려면 ⌘ + 스크롤 사용"},lt:{touch:"Perkelkite žemėlapį dviem pirštais",scroll:"Slinkite nuspaudę klavišą „Ctrl“, kad pakeistumėte žemėlapio mastelį",scrollMac:"Paspauskite klavišą ⌘ ir slinkite, kad priartintumėte žemėlapį"},lv:{touch:"Lai pārvietotu karti, bīdiet to ar diviem pirkstiem",scroll:"Kartes tālummaiņai izmantojiet ctrl + ritināšanu",scrollMac:"Lai veiktu kartes tālummaiņu, izmantojiet ⌘ + ritināšanu"},ml:{touch:"മാപ്പ് നീക്കാൻ രണ്ട് വിരലുകൾ ഉപയോഗിക്കുക",scroll:"കൺട്രോൾ + സ്‌ക്രോൾ ഉപയോഗിച്ച് ‌മാപ്പ് ‌സൂം ചെയ്യുക",scrollMac:"⌘ + സ്‌ക്രോൾ ഉപയോഗിച്ച് ‌മാപ്പ് ‌സൂം ചെയ്യുക"},mr:{touch:"नकाशा हलविण्यासाठी दोन बोटे वापरा",scroll:"नकाशा झूम करण्यासाठी ctrl + scroll वापरा",scrollMac:"नकाशावर झूम करण्यासाठी ⌘ + स्क्रोल वापरा"},nl:{touch:"Gebruik twee vingers om de kaart te verplaatsen",scroll:"Gebruik Ctrl + scrollen om in- en uit te zoomen op de kaart",scrollMac:"Gebruik ⌘ + scrollen om in en uit te zoomen op de kaart"},no:{touch:"Bruk to fingre for å flytte kartet",scroll:"Hold ctrl-tasten inne og rull for å zoome på kartet",scrollMac:"Hold inne ⌘-tasten og rull for å zoome på kartet"},pl:{touch:"Przesuń mapę dwoma palcami",scroll:"Naciśnij CTRL i przewiń, by przybliżyć mapę",scrollMac:"Naciśnij ⌘ i przewiń, by przybliżyć mapę"},pt:{touch:"Use dois dedos para mover o mapa",scroll:"Pressione Ctrl e role a tela simultaneamente para aplicar zoom no mapa",scrollMac:"Use ⌘ e role a tela simultaneamente para aplicar zoom no mapa"},"pt-BR":{touch:"Use dois dedos para mover o mapa",scroll:"Pressione Ctrl e role a tela simultaneamente para aplicar zoom no mapa",scrollMac:"Use ⌘ e role a tela simultaneamente para aplicar zoom no mapa"},"pt-PT":{touch:"Utilize dois dedos para mover o mapa",scroll:"Utilizar ctrl + deslocar para aumentar/diminuir zoom do mapa",scrollMac:"Utilize ⌘ + deslocar para aumentar/diminuir o zoom do mapa"},ro:{touch:"Folosiți două degete pentru a deplasa harta",scroll:"Apăsați tasta ctrl și derulați simultan pentru a mări harta",scrollMac:"Folosiți ⌘ și derulați pentru a mări/micșora harta"},ru:{touch:"Чтобы переместить карту, проведите по ней двумя пальцами",scroll:"Чтобы изменить масштаб, прокручивайте карту, удерживая клавишу Ctrl.",scrollMac:"Чтобы изменить масштаб, нажмите ⌘ + прокрутка"},sk:{touch:"Mapu môžete posunúť dvoma prstami",scroll:"Ak chcete priblížiť mapu, stlačte kláves ctrl a posúvajte",scrollMac:"Ak chcete priblížiť mapu, stlačte kláves ⌘ a posúvajte kolieskom myši"},sl:{touch:"Premaknite zemljevid z dvema prstoma",scroll:"Zemljevid povečate tako, da držite tipko Ctrl in vrtite kolesce na miški",scrollMac:"Uporabite ⌘ + funkcijo pomika, da povečate ali pomanjšate zemljevid"},sr:{touch:"Мапу померајте помоћу два прста",scroll:"Притисните ctrl тастер док померате да бисте зумирали мапу",scrollMac:"Притисните тастер ⌘ док померате да бисте зумирали мапу"},sv:{touch:"Använd två fingrar för att flytta kartan",scroll:"Använd ctrl + rulla för att zooma kartan",scrollMac:"Använd ⌘ + rulla för att zooma på kartan"},ta:{touch:"மேப்பை நகர்த்த இரண்டு விரல்களைப் பயன்படுத்தவும்",scroll:"மேப்பை பெரிதாக்கி/சிறிதாக்கிப் பார்க்க, ctrl பட்டனைப் பிடித்தபடி, மேலே/கீழே ஸ்க்ரால் செய்யவும்",scrollMac:"மேப்பை பெரிதாக்கி/சிறிதாக்கிப் பார்க்க, ⌘ பட்டனைப் பிடித்தபடி, மேலே/கீழே ஸ்க்ரால் செய்யவும்"},te:{touch:"మ్యాప్‌ని తరలించడం కోసం రెండు వేళ్లను ఉపయోగించండి",scroll:"మ్యాప్‌ని జూమ్ చేయడానికి ctrl బటన్‌ను నొక్కి ఉంచి, స్క్రోల్ చేయండి",scrollMac:"మ్యాప్ జూమ్ చేయాలంటే ⌘ + స్క్రోల్ ఉపయోగించండి"},th:{touch:"ใช้ 2 นิ้วเพื่อเลื่อนแผนที่",scroll:"กด Ctrl ค้างไว้ แล้วเลื่อนหน้าจอเพื่อซูมแผนที่",scrollMac:"กด ⌘ แล้วเลื่อนหน้าจอเพื่อซูมแผนที่"},tl:{touch:"Gumamit ng dalawang daliri upang iusog ang mapa",scroll:"Gamitin ang ctrl + scroll upang i-zoom ang mapa",scrollMac:"Gamitin ang ⌘ + scroll upang i-zoom ang mapa"},tr:{touch:"Haritada gezinmek için iki parmağınızı kullanın",scroll:"Haritayı yakınlaştırmak için ctrl + kaydırma kombinasyonunu kullanın",scrollMac:"Haritayı yakınlaştırmak için ⌘ tuşuna basıp ekranı kaydırın"},uk:{touch:"Переміщуйте карту двома пальцями",scroll:"Щоб змінювати масштаб карти, прокручуйте коліщатко миші, утримуючи клавішу Ctrl",scrollMac:"Щоб змінити масштаб карти, використовуйте ⌘ + прокручування"},vi:{touch:"Sử dụng hai ngón tay để di chuyển bản đồ",scroll:"Sử dụng ctrl + cuộn để thu phóng bản đồ",scrollMac:"Sử dụng ⌘ + cuộn để thu phóng bản đồ"},"zh-CN":{touch:"使用双指移动地图",scroll:"按住 Ctrl 并滚动鼠标滚轮才可缩放地图",scrollMac:"按住 ⌘ 并滚动鼠标滚轮才可缩放地图"},"zh-TW":{touch:"同時以兩指移動地圖",scroll:"按住 ctrl 鍵加上捲動滑鼠可以縮放地圖",scrollMac:"按 ⌘ 加上滾動捲軸可以縮放地圖"}};L.Map.mergeOptions({gestureHandlingOptions:{text:{},duration:1e3}});var t=!1,e=L.Handler.extend({addHooks:function(){this._handleTouch=this._handleTouch.bind(this),this._setupPluginOptions(),this._setLanguageContent(),this._disableInteractions(),this._map._container.addEventListener("touchstart",this._handleTouch),this._map._container.addEventListener("touchmove",this._handleTouch),this._map._container.addEventListener("touchend",this._handleTouch),this._map._container.addEventListener("touchcancel",this._handleTouch),this._map._container.addEventListener("click",this._handleTouch),L.DomEvent.on(this._map._container,"wheel",this._handleScroll,this),L.DomEvent.on(this._map,"mouseover",this._handleMouseOver,this),L.DomEvent.on(this._map,"mouseout",this._handleMouseOut,this),L.DomEvent.on(this._map,"movestart",this._handleDragging,this),L.DomEvent.on(this._map,"move",this._handleDragging,this),L.DomEvent.on(this._map,"moveend",this._handleDragging,this)},removeHooks:function(){this._enableInteractions(),this._map._container.removeEventListener("touchstart",this._handleTouch),this._map._container.removeEventListener("touchmove",this._handleTouch),this._map._container.removeEventListener("touchend",this._handleTouch),this._map._container.removeEventListener("touchcancel",this._handleTouch),this._map._container.removeEventListener("click",this._handleTouch),L.DomEvent.off(this._map._container,"wheel",this._handleScroll,this),L.DomEvent.off(this._map,"mouseover",this._handleMouseOver,this),L.DomEvent.off(this._map,"mouseout",this._handleMouseOut,this),L.DomEvent.off(this._map,"movestart",this._handleDragging,this),L.DomEvent.off(this._map,"move",this._handleDragging,this),L.DomEvent.off(this._map,"moveend",this._handleDragging,this)},_handleDragging:function(a){"movestart"==a.type||"move"==a.type?t=!0:"moveend"==a.type&&(t=!1)},_disableInteractions:function(){this._map.dragging.disable(),this._map.scrollWheelZoom.disable(),this._map.tap&&this._map.tap.disable()},_enableInteractions:function(){this._map.dragging.enable(),this._map.scrollWheelZoom.enable(),this._map.tap&&this._map.tap.enable()},_setupPluginOptions:function(){this._map.options.gestureHandlingText&&(this._map.options.gestureHandlingOptions.text=this._map.options.gestureHandlingText)},_setLanguageContent:function(){var a,t=this._map.options.gestureHandlingOptions&&this._map.options.gestureHandlingOptions.text&&this._map.options.gestureHandlingOptions.text.touch&&this._map.options.gestureHandlingOptions.text.scroll&&this._map.options.gestureHandlingOptions.text.scrollMac?this._map.options.gestureHandlingOptions.text:(a=this._getUserLanguage(),o[a=a||"en"]&&(t=o[a]),t||-1===a.indexOf("-")||(a=a.split("-")[0],t=o[a]),t||o[a="en"]),e=!1;0<=navigator.platform.toUpperCase().indexOf("MAC")&&(e=!0);var l=t.scroll;e&&(l=t.scrollMac),this._map._container.setAttribute("data-gesture-handling-touch-content",t.touch),this._map._container.setAttribute("data-gesture-handling-scroll-content",l)},_getUserLanguage:function(){return navigator.languages?navigator.languages[0]:navigator.language||navigator.userLanguage},_handleTouch:function(a){for(var t=["leaflet-control-minimap","leaflet-interactive","leaflet-popup-content","leaflet-popup-content-wrapper","leaflet-popup-close-button","leaflet-control-zoom-in","leaflet-control-zoom-out"],e=!1,l=0;l<t.length;l++)L.DomUtil.hasClass(a.target,t[l])&&(e=!0);e?L.DomUtil.hasClass(a.target,"leaflet-interactive")&&"touchmove"===a.type&&1===a.touches.length?(L.DomUtil.addClass(this._map._container,"leaflet-gesture-handling-touch-warning"),this._disableInteractions()):L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-touch-warning"):"touchmove"===a.type||"touchstart"===a.type?1===a.touches.length?(L.DomUtil.addClass(this._map._container,"leaflet-gesture-handling-touch-warning"),this._disableInteractions()):(this._enableInteractions(),L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-touch-warning")):L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-touch-warning")},_isScrolling:!1,_handleScroll:function(a){a.metaKey||a.ctrlKey?(a.preventDefault(),L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-scroll-warning"),this._map.scrollWheelZoom.enable()):(L.DomUtil.addClass(this._map._container,"leaflet-gesture-handling-scroll-warning"),this._map.scrollWheelZoom.disable(),clearTimeout(this._isScrolling),this._isScrolling=setTimeout(function(){for(var a=document.getElementsByClassName("leaflet-gesture-handling-scroll-warning"),t=0;t<a.length;t++)L.DomUtil.removeClass(a[t],"leaflet-gesture-handling-scroll-warning")},this._map.options.gestureHandlingOptions.duration))},_handleMouseOver:function(a){this._enableInteractions()},_handleMouseOut:function(a){t||this._disableInteractions()}});L.Map.addInitHook("addHandler","gestureHandling",e),a.GestureHandling=e,a.default=e,Object.defineProperty(a,"__esModule",{value:!0})});
2
- //# sourceMappingURL=leaflet-gesture-handling.min.js.map
1
  !function(a,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("leafletGestureHandling",["exports"],t):t(a.leafletGestureHandling={})}(this,function(a){"use strict";var o={ar:{touch:"استخدم إصبعين لتحريك الخريطة",scroll:"‏استخدم ctrl + scroll لتصغير/تكبير الخريطة",scrollMac:"يمكنك استخدام ⌘ + التمرير لتكبير/تصغير الخريطة"},bg:{touch:"Използвайте два пръста, за да преместите картата",scroll:"Задръжте бутона Ctrl натиснат, докато превъртате, за да промените мащаба на картата",scrollMac:"Задръжте бутона ⌘ натиснат, докато превъртате, за да промените мащаба на картата"},bn:{touch:"মানচিত্রটিকে সরাতে দুটি আঙ্গুল ব্যবহার করুন",scroll:"ম্যাপ জুম করতে ctrl + scroll ব্যবহার করুন",scrollMac:"ম্যাপে জুম করতে ⌘ বোতাম টিপে স্ক্রল করুন"},ca:{touch:"Fes servir dos dits per moure el mapa",scroll:"Prem la tecla Control mentre et desplaces per apropar i allunyar el mapa",scrollMac:"Prem la tecla ⌘ mentre et desplaces per apropar i allunyar el mapa"},cs:{touch:"K posunutí mapy použijte dva prsty",scroll:"Velikost zobrazení mapy změňte podržením klávesy Ctrl a posouváním kolečka myši",scrollMac:"Velikost zobrazení mapy změníte podržením klávesy ⌘ a posunutím kolečka myši / touchpadu"},da:{touch:"Brug to fingre til at flytte kortet",scroll:"Brug ctrl + rullefunktionen til at zoome ind og ud på kortet",scrollMac:"Brug ⌘ + rullefunktionen til at zoome ind og ud på kortet"},de:{touch:"Verschieben der Karte mit zwei Fingern",scroll:"Verwende Strg+Scrollen zum Zoomen der Karte",scrollMac:"⌘"},el:{touch:"Χρησιμοποιήστε δύο δάχτυλα για μετακίνηση στον χάρτη",scroll:"Χρησιμοποιήστε το πλήκτρο Ctrl και κύλιση, για να μεγεθύνετε τον χάρτη",scrollMac:"Χρησιμοποιήστε το πλήκτρο ⌘ + κύλιση για εστίαση στον χάρτη"},en:{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},"en-AU":{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},"en-GB":{touch:"Use two fingers to move the map",scroll:"Use ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},es:{touch:"Para mover el mapa, utiliza dos dedos",scroll:"Mantén pulsada la tecla Ctrl mientras te desplazas para acercar o alejar el mapa",scrollMac:"Mantén pulsada la tecla ⌘ mientras te desplazas para acercar o alejar el mapa"},eu:{touch:"Erabili bi hatz mapa mugitzeko",scroll:"Mapan zooma aplikatzeko, sakatu Ktrl eta egin gora edo behera",scrollMac:"Eduki sakatuta ⌘ eta egin gora eta behera mapa handitu eta txikitzeko"},fa:{touch:"برای حرکت دادن نقشه از دو انگشت استفاده کنید.",scroll:"‏برای بزرگ‌نمایی نقشه از ctrl + scroll استفاده کنید",scrollMac:"برای بزرگ‌نمایی نقشه، از ⌘ + پیمایش استفاده کنید."},fi:{touch:"Siirrä karttaa kahdella sormella.",scroll:"Zoomaa karttaa painamalla Ctrl-painiketta ja vierittämällä.",scrollMac:"Zoomaa karttaa pitämällä painike ⌘ painettuna ja vierittämällä."},fil:{touch:"Gumamit ng dalawang daliri upang iusog ang mapa",scroll:"Gamitin ang ctrl + scroll upang i-zoom ang mapa",scrollMac:"Gamitin ang ⌘ + scroll upang i-zoom ang mapa"},fr:{touch:"Utilisez deux doigts pour déplacer la carte",scroll:"Vous pouvez zoomer sur la carte à l'aide de CTRL+Molette de défilement",scrollMac:"Vous pouvez zoomer sur la carte à l'aide de ⌘+Molette de défilement"},gl:{touch:"Utiliza dous dedos para mover o mapa",scroll:"Preme Ctrl mentres te desprazas para ampliar o mapa",scrollMac:"Preme ⌘ e desprázate para ampliar o mapa"},gu:{touch:"નકશો ખસેડવા બે આંગળીઓનો ઉપયોગ કરો",scroll:"નકશાને ઝૂમ કરવા માટે ctrl + સ્ક્રોલનો ઉપયોગ કરો",scrollMac:"નકશાને ઝૂમ કરવા ⌘ + સ્ક્રોલનો ઉપયોગ કરો"},hi:{touch:"मैप एक जगह से दूसरी जगह ले जाने के लिए दो उंगलियों का इस्तेमाल करें",scroll:"मैप को ज़ूम करने के लिए ctrl + स्क्रोल का उपयोग करें",scrollMac:"मैप को ज़ूम करने के लिए ⌘ + स्क्रोल का उपयोग करें"},hr:{touch:"Pomičite kartu pomoću dva prsta",scroll:"Upotrijebite Ctrl i klizač miša da biste zumirali kartu",scrollMac:"Upotrijebite gumb ⌘ dok se pomičete za zumiranje karte"},hu:{touch:"Két ujjal mozgassa a térképet",scroll:"A térkép a ctrl + görgetés használatával nagyítható",scrollMac:"A térkép a ⌘ + görgetés használatával nagyítható"},id:{touch:"Gunakan dua jari untuk menggerakkan peta",scroll:"Gunakan ctrl + scroll untuk memperbesar atau memperkecil peta",scrollMac:"Gunakan ⌘ + scroll untuk memperbesar atau memperkecil peta"},it:{touch:"Utilizza due dita per spostare la mappa",scroll:"Utilizza CTRL + scorrimento per eseguire lo zoom della mappa",scrollMac:"Utilizza ⌘ + scorrimento per eseguire lo zoom della mappa"},iw:{touch:"הזז את המפה באמצעות שתי אצבעות",scroll:"‏אפשר לשנות את מרחק התצוגה במפה באמצעות מקש ctrl וגלילה",scrollMac:"אפשר לשנות את מרחק התצוגה במפה באמצעות מקש ⌘ וגלילה"},ja:{touch:"地図を移動させるには指 2 本で操作します",scroll:"地図をズームするには、Ctrl キーを押しながらスクロールしてください",scrollMac:"地図をズームするには、⌘ キーを押しながらスクロールしてください"},kn:{touch:"Use two fingers to move the map",scroll:"Use Ctrl + scroll to zoom the map",scrollMac:"Use ⌘ + scroll to zoom the map"},ko:{touch:"지도를 움직이려면 두 손가락을 사용하세요.",scroll:"지도를 확대/축소하려면 Ctrl을 누른 채 스크롤하세요.",scrollMac:"지도를 확대하려면 ⌘ + 스크롤 사용"},lt:{touch:"Perkelkite žemėlapį dviem pirštais",scroll:"Slinkite nuspaudę klavišą „Ctrl“, kad pakeistumėte žemėlapio mastelį",scrollMac:"Paspauskite klavišą ⌘ ir slinkite, kad priartintumėte žemėlapį"},lv:{touch:"Lai pārvietotu karti, bīdiet to ar diviem pirkstiem",scroll:"Kartes tālummaiņai izmantojiet ctrl + ritināšanu",scrollMac:"Lai veiktu kartes tālummaiņu, izmantojiet ⌘ + ritināšanu"},ml:{touch:"മാപ്പ് നീക്കാൻ രണ്ട് വിരലുകൾ ഉപയോഗിക്കുക",scroll:"കൺട്രോൾ + സ്‌ക്രോൾ ഉപയോഗിച്ച് ‌മാപ്പ് ‌സൂം ചെയ്യുക",scrollMac:"⌘ + സ്‌ക്രോൾ ഉപയോഗിച്ച് ‌മാപ്പ് ‌സൂം ചെയ്യുക"},mr:{touch:"नकाशा हलविण्यासाठी दोन बोटे वापरा",scroll:"नकाशा झूम करण्यासाठी ctrl + scroll वापरा",scrollMac:"नकाशावर झूम करण्यासाठी ⌘ + स्क्रोल वापरा"},nl:{touch:"Gebruik twee vingers om de kaart te verplaatsen",scroll:"Gebruik Ctrl + scrollen om in- en uit te zoomen op de kaart",scrollMac:"Gebruik ⌘ + scrollen om in en uit te zoomen op de kaart"},no:{touch:"Bruk to fingre for å flytte kartet",scroll:"Hold ctrl-tasten inne og rull for å zoome på kartet",scrollMac:"Hold inne ⌘-tasten og rull for å zoome på kartet"},pl:{touch:"Przesuń mapę dwoma palcami",scroll:"Naciśnij CTRL i przewiń, by przybliżyć mapę",scrollMac:"Naciśnij ⌘ i przewiń, by przybliżyć mapę"},pt:{touch:"Use dois dedos para mover o mapa",scroll:"Pressione Ctrl e role a tela simultaneamente para aplicar zoom no mapa",scrollMac:"Use ⌘ e role a tela simultaneamente para aplicar zoom no mapa"},"pt-BR":{touch:"Use dois dedos para mover o mapa",scroll:"Pressione Ctrl e role a tela simultaneamente para aplicar zoom no mapa",scrollMac:"Use ⌘ e role a tela simultaneamente para aplicar zoom no mapa"},"pt-PT":{touch:"Utilize dois dedos para mover o mapa",scroll:"Utilizar ctrl + deslocar para aumentar/diminuir zoom do mapa",scrollMac:"Utilize ⌘ + deslocar para aumentar/diminuir o zoom do mapa"},ro:{touch:"Folosiți două degete pentru a deplasa harta",scroll:"Apăsați tasta ctrl și derulați simultan pentru a mări harta",scrollMac:"Folosiți ⌘ și derulați pentru a mări/micșora harta"},ru:{touch:"Чтобы переместить карту, проведите по ней двумя пальцами",scroll:"Чтобы изменить масштаб, прокручивайте карту, удерживая клавишу Ctrl.",scrollMac:"Чтобы изменить масштаб, нажмите ⌘ + прокрутка"},sk:{touch:"Mapu môžete posunúť dvoma prstami",scroll:"Ak chcete priblížiť mapu, stlačte kláves ctrl a posúvajte",scrollMac:"Ak chcete priblížiť mapu, stlačte kláves ⌘ a posúvajte kolieskom myši"},sl:{touch:"Premaknite zemljevid z dvema prstoma",scroll:"Zemljevid povečate tako, da držite tipko Ctrl in vrtite kolesce na miški",scrollMac:"Uporabite ⌘ + funkcijo pomika, da povečate ali pomanjšate zemljevid"},sr:{touch:"Мапу померајте помоћу два прста",scroll:"Притисните ctrl тастер док померате да бисте зумирали мапу",scrollMac:"Притисните тастер ⌘ док померате да бисте зумирали мапу"},sv:{touch:"Använd två fingrar för att flytta kartan",scroll:"Använd ctrl + rulla för att zooma kartan",scrollMac:"Använd ⌘ + rulla för att zooma på kartan"},ta:{touch:"மேப்பை நகர்த்த இரண்டு விரல்களைப் பயன்படுத்தவும்",scroll:"மேப்பை பெரிதாக்கி/சிறிதாக்கிப் பார்க்க, ctrl பட்டனைப் பிடித்தபடி, மேலே/கீழே ஸ்க்ரால் செய்யவும்",scrollMac:"மேப்பை பெரிதாக்கி/சிறிதாக்கிப் பார்க்க, ⌘ பட்டனைப் பிடித்தபடி, மேலே/கீழே ஸ்க்ரால் செய்யவும்"},te:{touch:"మ్యాప్‌ని తరలించడం కోసం రెండు వేళ్లను ఉపయోగించండి",scroll:"మ్యాప్‌ని జూమ్ చేయడానికి ctrl బటన్‌ను నొక్కి ఉంచి, స్క్రోల్ చేయండి",scrollMac:"మ్యాప్ జూమ్ చేయాలంటే ⌘ + స్క్రోల్ ఉపయోగించండి"},th:{touch:"ใช้ 2 นิ้วเพื่อเลื่อนแผนที่",scroll:"กด Ctrl ค้างไว้ แล้วเลื่อนหน้าจอเพื่อซูมแผนที่",scrollMac:"กด ⌘ แล้วเลื่อนหน้าจอเพื่อซูมแผนที่"},tl:{touch:"Gumamit ng dalawang daliri upang iusog ang mapa",scroll:"Gamitin ang ctrl + scroll upang i-zoom ang mapa",scrollMac:"Gamitin ang ⌘ + scroll upang i-zoom ang mapa"},tr:{touch:"Haritada gezinmek için iki parmağınızı kullanın",scroll:"Haritayı yakınlaştırmak için ctrl + kaydırma kombinasyonunu kullanın",scrollMac:"Haritayı yakınlaştırmak için ⌘ tuşuna basıp ekranı kaydırın"},uk:{touch:"Переміщуйте карту двома пальцями",scroll:"Щоб змінювати масштаб карти, прокручуйте коліщатко миші, утримуючи клавішу Ctrl",scrollMac:"Щоб змінити масштаб карти, використовуйте ⌘ + прокручування"},vi:{touch:"Sử dụng hai ngón tay để di chuyển bản đồ",scroll:"Sử dụng ctrl + cuộn để thu phóng bản đồ",scrollMac:"Sử dụng ⌘ + cuộn để thu phóng bản đồ"},"zh-CN":{touch:"使用双指移动地图",scroll:"按住 Ctrl 并滚动鼠标滚轮才可缩放地图",scrollMac:"按住 ⌘ 并滚动鼠标滚轮才可缩放地图"},"zh-TW":{touch:"同時以兩指移動地圖",scroll:"按住 ctrl 鍵加上捲動滑鼠可以縮放地圖",scrollMac:"按 ⌘ 加上滾動捲軸可以縮放地圖"}};L.Map.mergeOptions({gestureHandlingOptions:{text:{},duration:1e3}});var t=!1,e=L.Handler.extend({addHooks:function(){this._handleTouch=this._handleTouch.bind(this),this._setupPluginOptions(),this._setLanguageContent(),this._disableInteractions(),this._map._container.addEventListener("touchstart",this._handleTouch),this._map._container.addEventListener("touchmove",this._handleTouch),this._map._container.addEventListener("touchend",this._handleTouch),this._map._container.addEventListener("touchcancel",this._handleTouch),this._map._container.addEventListener("click",this._handleTouch),L.DomEvent.on(this._map._container,"wheel",this._handleScroll,this),L.DomEvent.on(this._map,"mouseover",this._handleMouseOver,this),L.DomEvent.on(this._map,"mouseout",this._handleMouseOut,this),L.DomEvent.on(this._map,"movestart",this._handleDragging,this),L.DomEvent.on(this._map,"move",this._handleDragging,this),L.DomEvent.on(this._map,"moveend",this._handleDragging,this)},removeHooks:function(){this._enableInteractions(),this._map._container.removeEventListener("touchstart",this._handleTouch),this._map._container.removeEventListener("touchmove",this._handleTouch),this._map._container.removeEventListener("touchend",this._handleTouch),this._map._container.removeEventListener("touchcancel",this._handleTouch),this._map._container.removeEventListener("click",this._handleTouch),L.DomEvent.off(this._map._container,"wheel",this._handleScroll,this),L.DomEvent.off(this._map,"mouseover",this._handleMouseOver,this),L.DomEvent.off(this._map,"mouseout",this._handleMouseOut,this),L.DomEvent.off(this._map,"movestart",this._handleDragging,this),L.DomEvent.off(this._map,"move",this._handleDragging,this),L.DomEvent.off(this._map,"moveend",this._handleDragging,this)},_handleDragging:function(a){"movestart"==a.type||"move"==a.type?t=!0:"moveend"==a.type&&(t=!1)},_disableInteractions:function(){this._map.dragging.disable(),this._map.scrollWheelZoom.disable(),this._map.tap&&this._map.tap.disable()},_enableInteractions:function(){this._map.dragging.enable(),this._map.scrollWheelZoom.enable(),this._map.tap&&this._map.tap.enable()},_setupPluginOptions:function(){this._map.options.gestureHandlingText&&(this._map.options.gestureHandlingOptions.text=this._map.options.gestureHandlingText)},_setLanguageContent:function(){var a,t=this._map.options.gestureHandlingOptions&&this._map.options.gestureHandlingOptions.text&&this._map.options.gestureHandlingOptions.text.touch&&this._map.options.gestureHandlingOptions.text.scroll&&this._map.options.gestureHandlingOptions.text.scrollMac?this._map.options.gestureHandlingOptions.text:(a=this._getUserLanguage(),o[a=a||"en"]&&(t=o[a]),t||-1===a.indexOf("-")||(a=a.split("-")[0],t=o[a]),t||o[a="en"]),e=!1;0<=navigator.platform.toUpperCase().indexOf("MAC")&&(e=!0);var l=t.scroll;e&&(l=t.scrollMac),this._map._container.setAttribute("data-gesture-handling-touch-content",t.touch),this._map._container.setAttribute("data-gesture-handling-scroll-content",l)},_getUserLanguage:function(){return navigator.languages?navigator.languages[0]:navigator.language||navigator.userLanguage},_handleTouch:function(a){for(var t=["leaflet-control-minimap","leaflet-interactive","leaflet-popup-content","leaflet-popup-content-wrapper","leaflet-popup-close-button","leaflet-control-zoom-in","leaflet-control-zoom-out"],e=!1,l=0;l<t.length;l++)L.DomUtil.hasClass(a.target,t[l])&&(e=!0);e?L.DomUtil.hasClass(a.target,"leaflet-interactive")&&"touchmove"===a.type&&1===a.touches.length?(L.DomUtil.addClass(this._map._container,"leaflet-gesture-handling-touch-warning"),this._disableInteractions()):L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-touch-warning"):"touchmove"===a.type||"touchstart"===a.type?1===a.touches.length?(L.DomUtil.addClass(this._map._container,"leaflet-gesture-handling-touch-warning"),this._disableInteractions()):(this._enableInteractions(),L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-touch-warning")):L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-touch-warning")},_isScrolling:!1,_handleScroll:function(a){a.metaKey||a.ctrlKey?(a.preventDefault(),L.DomUtil.removeClass(this._map._container,"leaflet-gesture-handling-scroll-warning"),this._map.scrollWheelZoom.enable()):(L.DomUtil.addClass(this._map._container,"leaflet-gesture-handling-scroll-warning"),this._map.scrollWheelZoom.disable(),clearTimeout(this._isScrolling),this._isScrolling=setTimeout(function(){for(var a=document.getElementsByClassName("leaflet-gesture-handling-scroll-warning"),t=0;t<a.length;t++)L.DomUtil.removeClass(a[t],"leaflet-gesture-handling-scroll-warning")},this._map.options.gestureHandlingOptions.duration))},_handleMouseOver:function(a){this._enableInteractions()},_handleMouseOut:function(a){t||this._disableInteractions()}});L.Map.addInitHook("addHandler","gestureHandling",e),a.GestureHandling=e,a.default=e,Object.defineProperty(a,"__esModule",{value:!0})});
 
assets/leaflet/leaflet.css CHANGED
@@ -1,640 +1 @@
1
- /* required styles */
2
-
3
- .leaflet-pane,
4
- .leaflet-tile,
5
- .leaflet-marker-icon,
6
- .leaflet-marker-shadow,
7
- .leaflet-tile-container,
8
- .leaflet-pane > svg,
9
- .leaflet-pane > canvas,
10
- .leaflet-zoom-box,
11
- .leaflet-image-layer,
12
- .leaflet-layer {
13
- position: absolute;
14
- left: 0;
15
- top: 0;
16
- }
17
- .leaflet-container {
18
- overflow: hidden;
19
- }
20
- .leaflet-tile,
21
- .leaflet-marker-icon,
22
- .leaflet-marker-shadow {
23
- -webkit-user-select: none;
24
- -moz-user-select: none;
25
- user-select: none;
26
- -webkit-user-drag: none;
27
- }
28
- /* Prevents IE11 from highlighting tiles in blue */
29
- .leaflet-tile::selection {
30
- background: transparent;
31
- }
32
- /* Safari renders non-retina tile on retina better with this, but Chrome is worse */
33
- .leaflet-safari .leaflet-tile {
34
- image-rendering: -webkit-optimize-contrast;
35
- }
36
- /* hack that prevents hw layers "stretching" when loading new tiles */
37
- .leaflet-safari .leaflet-tile-container {
38
- width: 1600px;
39
- height: 1600px;
40
- -webkit-transform-origin: 0 0;
41
- }
42
- .leaflet-marker-icon,
43
- .leaflet-marker-shadow {
44
- display: block;
45
- }
46
- /* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
47
- /* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
48
- .leaflet-container .leaflet-overlay-pane svg,
49
- .leaflet-container .leaflet-marker-pane img,
50
- .leaflet-container .leaflet-shadow-pane img,
51
- .leaflet-container .leaflet-tile-pane img,
52
- .leaflet-container img.leaflet-image-layer,
53
- .leaflet-container .leaflet-tile {
54
- max-width: none !important;
55
- max-height: none !important;
56
- }
57
-
58
- .leaflet-container.leaflet-touch-zoom {
59
- -ms-touch-action: pan-x pan-y;
60
- touch-action: pan-x pan-y;
61
- }
62
- .leaflet-container.leaflet-touch-drag {
63
- -ms-touch-action: pinch-zoom;
64
- /* Fallback for FF which doesn't support pinch-zoom */
65
- touch-action: none;
66
- touch-action: pinch-zoom;
67
- }
68
- .leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
69
- -ms-touch-action: none;
70
- touch-action: none;
71
- }
72
- .leaflet-container {
73
- -webkit-tap-highlight-color: transparent;
74
- }
75
- .leaflet-container a {
76
- -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
77
- }
78
- .leaflet-tile {
79
- filter: inherit;
80
- visibility: hidden;
81
- }
82
- .leaflet-tile-loaded {
83
- visibility: inherit;
84
- }
85
- .leaflet-zoom-box {
86
- width: 0;
87
- height: 0;
88
- -moz-box-sizing: border-box;
89
- box-sizing: border-box;
90
- z-index: 800;
91
- }
92
- /* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
93
- .leaflet-overlay-pane svg {
94
- -moz-user-select: none;
95
- }
96
-
97
- .leaflet-pane { z-index: 400; }
98
-
99
- .leaflet-tile-pane { z-index: 200; }
100
- .leaflet-overlay-pane { z-index: 400; }
101
- .leaflet-shadow-pane { z-index: 500; }
102
- .leaflet-marker-pane { z-index: 600; }
103
- .leaflet-tooltip-pane { z-index: 650; }
104
- .leaflet-popup-pane { z-index: 700; }
105
-
106
- .leaflet-map-pane canvas { z-index: 100; }
107
- .leaflet-map-pane svg { z-index: 200; }
108
-
109
- .leaflet-vml-shape {
110
- width: 1px;
111
- height: 1px;
112
- }
113
- .lvml {
114
- behavior: url(#default#VML);
115
- display: inline-block;
116
- position: absolute;
117
- }
118
-
119
-
120
- /* control positioning */
121
-
122
- .leaflet-control {
123
- position: relative;
124
- z-index: 800;
125
- pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
126
- pointer-events: auto;
127
- }
128
- .leaflet-top,
129
- .leaflet-bottom {
130
- position: absolute;
131
- z-index: 1000;
132
- pointer-events: none;
133
- }
134
- .leaflet-top {
135
- top: 0;
136
- }
137
- .leaflet-right {
138
- right: 0;
139
- }
140
- .leaflet-bottom {
141
- bottom: 0;
142
- }
143
- .leaflet-left {
144
- left: 0;
145
- }
146
- .leaflet-control {
147
- float: left;
148
- clear: both;
149
- }
150
- .leaflet-right .leaflet-control {
151
- float: right;
152
- }
153
- .leaflet-top .leaflet-control {
154
- margin-top: 10px;
155
- }
156
- .leaflet-bottom .leaflet-control {
157
- margin-bottom: 10px;
158
- }
159
- .leaflet-left .leaflet-control {
160
- margin-left: 10px;
161
- }
162
- .leaflet-right .leaflet-control {
163
- margin-right: 10px;
164
- }
165
-
166
-
167
- /* zoom and fade animations */
168
-
169
- .leaflet-fade-anim .leaflet-tile {
170
- will-change: opacity;
171
- }
172
- .leaflet-fade-anim .leaflet-popup {
173
- opacity: 0;
174
- -webkit-transition: opacity 0.2s linear;
175
- -moz-transition: opacity 0.2s linear;
176
- transition: opacity 0.2s linear;
177
- }
178
- .leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
179
- opacity: 1;
180
- }
181
- .leaflet-zoom-animated {
182
- -webkit-transform-origin: 0 0;
183
- -ms-transform-origin: 0 0;
184
- transform-origin: 0 0;
185
- }
186
- .leaflet-zoom-anim .leaflet-zoom-animated {
187
- will-change: transform;
188
- }
189
- .leaflet-zoom-anim .leaflet-zoom-animated {
190
- -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
191
- -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
192
- transition: transform 0.25s cubic-bezier(0,0,0.25,1);
193
- }
194
- .leaflet-zoom-anim .leaflet-tile,
195
- .leaflet-pan-anim .leaflet-tile {
196
- -webkit-transition: none;
197
- -moz-transition: none;
198
- transition: none;
199
- }
200
-
201
- .leaflet-zoom-anim .leaflet-zoom-hide {
202
- visibility: hidden;
203
- }
204
-
205
-
206
- /* cursors */
207
-
208
- .leaflet-interactive {
209
- cursor: pointer;
210
- }
211
- .leaflet-grab {
212
- cursor: -webkit-grab;
213
- cursor: -moz-grab;
214
- cursor: grab;
215
- }
216
- .leaflet-crosshair,
217
- .leaflet-crosshair .leaflet-interactive {
218
- cursor: crosshair;
219
- }
220
- .leaflet-popup-pane,
221
- .leaflet-control {
222
- cursor: auto;
223
- }
224
- .leaflet-dragging .leaflet-grab,
225
- .leaflet-dragging .leaflet-grab .leaflet-interactive,
226
- .leaflet-dragging .leaflet-marker-draggable {
227
- cursor: move;
228
- cursor: -webkit-grabbing;
229
- cursor: -moz-grabbing;
230
- cursor: grabbing;
231
- }
232
-
233
- /* marker & overlays interactivity */
234
- .leaflet-marker-icon,
235
- .leaflet-marker-shadow,
236
- .leaflet-image-layer,
237
- .leaflet-pane > svg path,
238
- .leaflet-tile-container {
239
- pointer-events: none;
240
- }
241
-
242
- .leaflet-marker-icon.leaflet-interactive,
243
- .leaflet-image-layer.leaflet-interactive,
244
- .leaflet-pane > svg path.leaflet-interactive,
245
- svg.leaflet-image-layer.leaflet-interactive path {
246
- pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
247
- pointer-events: auto;
248
- }
249
-
250
- /* visual tweaks */
251
-
252
- .leaflet-container {
253
- background: #ddd;
254
- outline: 0;
255
- }
256
- .leaflet-container a {
257
- color: #0078A8;
258
- }
259
- .leaflet-container a.leaflet-active {
260
- outline: 2px solid orange;
261
- }
262
- .leaflet-zoom-box {
263
- border: 2px dotted #38f;
264
- background: rgba(255,255,255,0.5);
265
- }
266
-
267
-
268
- /* general typography */
269
- .leaflet-container {
270
- font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
271
- }
272
-
273
-
274
- /* general toolbar styles */
275
-
276
- .leaflet-bar {
277
- box-shadow: 0 1px 5px rgba(0,0,0,0.65);
278
- border-radius: 4px;
279
- }
280
- .leaflet-bar a,
281
- .leaflet-bar a:hover {
282
- background-color: #fff;
283
- border-bottom: 1px solid #ccc;
284
- width: 26px;
285
- height: 26px;
286
- line-height: 26px;
287
- display: block;
288
- text-align: center;
289
- text-decoration: none;
290
- color: black;
291
- }
292
- .leaflet-bar a,
293
- .leaflet-control-layers-toggle {
294
- background-position: 50% 50%;
295
- background-repeat: no-repeat;
296
- display: block;
297
- }
298
- .leaflet-bar a:hover {
299
- background-color: #f4f4f4;
300
- }
301
- .leaflet-bar a:first-child {
302
- border-top-left-radius: 4px;
303
- border-top-right-radius: 4px;
304
- }
305
- .leaflet-bar a:last-child {
306
- border-bottom-left-radius: 4px;
307
- border-bottom-right-radius: 4px;
308
- border-bottom: none;
309
- }
310
- .leaflet-bar a.leaflet-disabled {
311
- cursor: default;
312
- background-color: #f4f4f4;
313
- color: #bbb;
314
- }
315
-
316
- .leaflet-touch .leaflet-bar a {
317
- width: 30px;
318
- height: 30px;
319
- line-height: 30px;
320
- }
321
- .leaflet-touch .leaflet-bar a:first-child {
322
- border-top-left-radius: 2px;
323
- border-top-right-radius: 2px;
324
- }
325
- .leaflet-touch .leaflet-bar a:last-child {
326
- border-bottom-left-radius: 2px;
327
- border-bottom-right-radius: 2px;
328
- }
329
-
330
- /* zoom control */
331
-
332
- .leaflet-control-zoom-in,
333
- .leaflet-control-zoom-out {
334
- font: bold 18px 'Lucida Console', Monaco, monospace;
335
- text-indent: 1px;
336
- }
337
-
338
- .leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
339
- font-size: 22px;
340
- }
341
-
342
-
343
- /* layers control */
344
-
345
- .leaflet-control-layers {
346
- box-shadow: 0 1px 5px rgba(0,0,0,0.4);
347
- background: #fff;
348
- border-radius: 5px;
349
- }
350
- .leaflet-control-layers-toggle {
351
- background-image: url(images/layers.png);
352
- width: 36px;
353
- height: 36px;
354
- }
355
- .leaflet-retina .leaflet-control-layers-toggle {
356
- background-image: url(images/layers-2x.png);
357
- background-size: 26px 26px;
358
- }
359
- .leaflet-touch .leaflet-control-layers-toggle {
360
- width: 44px;
361
- height: 44px;
362
- }
363
- .leaflet-control-layers .leaflet-control-layers-list,
364
- .leaflet-control-layers-expanded .leaflet-control-layers-toggle {
365
- display: none;
366
- }
367
- .leaflet-control-layers-expanded .leaflet-control-layers-list {
368
- display: block;
369
- position: relative;
370
- }
371
- .leaflet-control-layers-expanded {
372
- padding: 6px 10px 6px 6px;
373
- color: #333;
374
- background: #fff;
375
- }
376
- .leaflet-control-layers-scrollbar {
377
- overflow-y: scroll;
378
- overflow-x: hidden;
379
- padding-right: 5px;
380
- }
381
- .leaflet-control-layers-selector {
382
- margin-top: 2px;
383
- position: relative;
384
- top: 1px;
385
- }
386
- .leaflet-control-layers label {
387
- display: block;
388
- }
389
- .leaflet-control-layers-separator {
390
- height: 0;
391
- border-top: 1px solid #ddd;
392
- margin: 5px -10px 5px -6px;
393
- }
394
-
395
- /* Default icon URLs */
396
- .leaflet-default-icon-path {
397
- background-image: url(images/marker-icon.png);
398
- }
399
-
400
-
401
- /* attribution and scale controls */
402
-
403
- .leaflet-container .leaflet-control-attribution {
404
- background: #fff;
405
- background: rgba(255, 255, 255, 0.7);
406
- margin: 0;
407
- }
408
- .leaflet-control-attribution,
409
- .leaflet-control-scale-line {
410
- padding: 0 5px;
411
- color: #333;
412
- }
413
- .leaflet-control-attribution a {
414
- text-decoration: none;
415
- }
416
- .leaflet-control-attribution a:hover {
417
- text-decoration: underline;
418
- }
419
- .leaflet-container .leaflet-control-attribution,
420
- .leaflet-container .leaflet-control-scale {
421
- font-size: 11px;
422
- }
423
- .leaflet-left .leaflet-control-scale {
424
- margin-left: 5px;
425
- }
426
- .leaflet-bottom .leaflet-control-scale {
427
- margin-bottom: 5px;
428
- }
429
- .leaflet-control-scale-line {
430
- border: 2px solid #777;
431
- border-top: none;
432
- line-height: 1.1;
433
- padding: 2px 5px 1px;
434
- font-size: 11px;
435
- white-space: nowrap;
436
- overflow: hidden;
437
- -moz-box-sizing: border-box;
438
- box-sizing: border-box;
439
-
440
- background: #fff;
441
- background: rgba(255, 255, 255, 0.5);
442
- }
443
- .leaflet-control-scale-line:not(:first-child) {
444
- border-top: 2px solid #777;
445
- border-bottom: none;
446
- margin-top: -2px;
447
- }
448
- .leaflet-control-scale-line:not(:first-child):not(:last-child) {
449
- border-bottom: 2px solid #777;
450
- }
451
-
452
- .leaflet-touch .leaflet-control-attribution,
453
- .leaflet-touch .leaflet-control-layers,
454
- .leaflet-touch .leaflet-bar {
455
- box-shadow: none;
456
- }
457
- .leaflet-touch .leaflet-control-layers,
458
- .leaflet-touch .leaflet-bar {
459
- border: 2px solid rgba(0,0,0,0.2);
460
- background-clip: padding-box;
461
- }
462
-
463
-
464
- /* popup */
465
-
466
- .leaflet-popup {
467
- position: absolute;
468
- text-align: center;
469
- margin-bottom: 20px;
470
- }
471
- .leaflet-popup-content-wrapper {
472
- padding: 1px;
473
- text-align: left;
474
- border-radius: 12px;
475
- }
476
- .leaflet-popup-content {
477
- margin: 13px 19px;
478
- line-height: 1.4;
479
- }
480
- .leaflet-popup-content p {
481
- margin: 18px 0;
482
- }
483
- .leaflet-popup-tip-container {
484
- width: 40px;
485
- height: 20px;
486
- position: absolute;
487
- left: 50%;
488
- margin-left: -20px;
489
- overflow: hidden;
490
- pointer-events: none;
491
- }
492
- .leaflet-popup-tip {
493
- width: 17px;
494
- height: 17px;
495
- padding: 1px;
496
-
497
- margin: -10px auto 0;
498
-
499
- -webkit-transform: rotate(45deg);
500
- -moz-transform: rotate(45deg);
501
- -ms-transform: rotate(45deg);
502
- transform: rotate(45deg);
503
- }
504
- .leaflet-popup-content-wrapper,
505
- .leaflet-popup-tip {
506
- background: white;
507
- color: #333;
508
- box-shadow: 0 3px 14px rgba(0,0,0,0.4);
509
- }
510
- .leaflet-container a.leaflet-popup-close-button {
511
- position: absolute;
512
- top: 0;
513
- right: 0;
514
- padding: 4px 4px 0 0;
515
- border: none;
516
- text-align: center;
517
- width: 18px;
518
- height: 14px;
519
- font: 16px/14px Tahoma, Verdana, sans-serif;
520
- color: #c3c3c3;
521
- text-decoration: none;
522
- font-weight: bold;
523
- background: transparent;
524
- }
525
- .leaflet-container a.leaflet-popup-close-button:hover {
526
- color: #999;
527
- }
528
- .leaflet-popup-scrolled {
529
- overflow: auto;
530
- border-bottom: 1px solid #ddd;
531
- border-top: 1px solid #ddd;
532
- }
533
-
534
- .leaflet-oldie .leaflet-popup-content-wrapper {
535
- -ms-zoom: 1;
536
- }
537
- .leaflet-oldie .leaflet-popup-tip {
538
- width: 24px;
539
- margin: 0 auto;
540
-
541
- -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
542
- filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
543
- }
544
- .leaflet-oldie .leaflet-popup-tip-container {
545
- margin-top: -1px;
546
- }
547
-
548
- .leaflet-oldie .leaflet-control-zoom,
549
- .leaflet-oldie .leaflet-control-layers,
550
- .leaflet-oldie .leaflet-popup-content-wrapper,
551
- .leaflet-oldie .leaflet-popup-tip {
552
- border: 1px solid #999;
553
- }
554
-
555
-
556
- /* div icon */
557
-
558
- .leaflet-div-icon {
559
- background: #fff;
560
- border: 1px solid #666;
561
- }
562
-
563
-
564
- /* Tooltip */
565
- /* Base styles for the element that has a tooltip */
566
- .leaflet-tooltip {
567
- position: absolute;
568
- padding: 6px;
569
- background-color: #fff;
570
- border: 1px solid #fff;
571
- border-radius: 3px;
572
- color: #222;
573
- white-space: nowrap;
574
- -webkit-user-select: none;
575
- -moz-user-select: none;
576
- -ms-user-select: none;
577
- user-select: none;
578
- pointer-events: none;
579
- box-shadow: 0 1px 3px rgba(0,0,0,0.4);
580
- }
581
- .leaflet-tooltip.leaflet-clickable {
582
- cursor: pointer;
583
- pointer-events: auto;
584
- }
585
- .leaflet-tooltip-top:before,
586
- .leaflet-tooltip-bottom:before,
587
- .leaflet-tooltip-left:before,
588
- .leaflet-tooltip-right:before {
589
- position: absolute;
590
- pointer-events: none;
591
- border: 6px solid transparent;
592
- background: transparent;
593
- content: "";
594
- }
595
-
596
- /* Directions */
597
-
598
- .leaflet-tooltip-bottom {
599
- margin-top: 6px;
600
- }
601
- .leaflet-tooltip-top {
602
- margin-top: -6px;
603
- }
604
- .leaflet-tooltip-bottom:before,
605
- .leaflet-tooltip-top:before {
606
- left: 50%;
607
- margin-left: -6px;
608
- }
609
- .leaflet-tooltip-top:before {
610
- bottom: 0;
611
- margin-bottom: -12px;
612
- border-top-color: #fff;
613
- }
614
- .leaflet-tooltip-bottom:before {
615
- top: 0;
616
- margin-top: -12px;
617
- margin-left: -6px;
618
- border-bottom-color: #fff;
619
- }
620
- .leaflet-tooltip-left {
621
- margin-left: -6px;
622
- }
623
- .leaflet-tooltip-right {
624
- margin-left: 6px;
625
- }
626
- .leaflet-tooltip-left:before,
627
- .leaflet-tooltip-right:before {
628
- top: 50%;
629
- margin-top: -6px;
630
- }
631
- .leaflet-tooltip-left:before {
632
- right: 0;
633
- margin-right: -12px;
634
- border-left-color: #fff;
635
- }
636
- .leaflet-tooltip-right:before {
637
- left: 0;
638
- margin-left: -12px;
639
- border-right-color: #fff;
640
- }
1
+ .leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:0 0}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-overlay-pane svg,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-width:none!important;max-height:none!important}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-bottom,.leaflet-top{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-tile{will-change:opacity}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.leaflet-zoom-anim .leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline:0}.leaflet-container a{color:#0078a8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,.5)}.leaflet-container{font:12px/1.5 "Helvetica Neue",Arial,Helvetica,sans-serif}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,.65);border-radius:4px}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px 'Lucida Console',Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255,255,255,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;font-size:11px;white-space:nowrap;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;background:rgba(255,255,255,.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 19px;line-height:1.4}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px rgba(0,0,0,.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;padding:4px 4px 0 0;border:none;text-align:center;width:18px;height:14px;font:16px/14px Tahoma,Verdana,sans-serif;color:#c3c3c3;text-decoration:none;font-weight:700;background:0 0}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,.4)}.leaflet-tooltip.leaflet-clickable{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{position:absolute;pointer-events:none;border:6px solid transparent;background:0 0;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/leaflet/leaflet.js CHANGED
@@ -2,5 +2,4 @@
2
  * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com
3
  * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
4
  */
5
- !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.L={})}(this,function(t){"use strict";function h(t){for(var i,e,n=1,o=arguments.length;n<o;n++)for(i in e=arguments[n])t[i]=e[i];return t}var s=Object.create||function(t){return i.prototype=t,new i};function i(){}function p(t,i){var e=Array.prototype.slice;if(t.bind)return t.bind.apply(t,e.call(arguments,1));var n=e.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(e.call(arguments)):arguments)}}var e=0;function m(t){return t._leaflet_id=t._leaflet_id||++e,t._leaflet_id}function n(t,i,e){var n,o,s=function(){n=!1,o&&(r.apply(e,o),o=!1)},r=function(){n?o=arguments:(t.apply(e,arguments),setTimeout(s,i),n=!0)};return r}function o(t,i,e){var n=i[1],o=i[0],s=n-o;return t===n&&e?t:((t-o)%s+s)%s+o}function a(){return!1}function r(t,i){var e=Math.pow(10,void 0===i?6:i);return Math.round(t*e)/e}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function l(t){return u(t).split(/\s+/)}function c(t,i){for(var e in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?s(t.options):{}),i)t.options[e]=i[e];return t.options}function _(t,i,e){var n=[];for(var o in t)n.push(encodeURIComponent(e?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")}var d=/\{ *([\w_-]+) *\}/g;function f(t,n){return t.replace(d,function(t,i){var e=n[i];if(void 0===e)throw new Error("No value provided for variable "+t);return"function"==typeof e&&(e=e(n)),e})}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,i){for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1}var y="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function x(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function P(t){var i=+new Date,e=Math.max(0,16-(i-w));return w=i+e,window.setTimeout(t,e)}var b=window.requestAnimationFrame||x("RequestAnimationFrame")||P,T=window.cancelAnimationFrame||x("CancelAnimationFrame")||x("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function M(t,i,e){if(!e||b!==P)return b.call(window,p(t,i));t.call(i)}function z(t){t&&T.call(window,t)}var C={extend:h,create:s,bind:p,lastId:e,stamp:m,throttle:n,wrapNum:o,falseFn:a,formatNum:r,trim:u,splitWords:l,setOptions:c,getParamString:_,template:f,isArray:g,indexOf:v,emptyImageUrl:y,requestFn:b,cancelFn:T,requestAnimFrame:M,cancelAnimFrame:z};function S(){}S.extend=function(t){function i(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var e=i.__super__=this.prototype,n=s(e);for(var o in(n.constructor=i).prototype=n,this)Object.prototype.hasOwnProperty.call(this,o)&&"prototype"!==o&&"__super__"!==o&&(i[o]=this[o]);return t.statics&&(h(i,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"==typeof L||!L||!L.Mixin)return;t=g(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}(t.includes),h.apply(null,[n].concat(t.includes)),delete t.includes),n.options&&(t.options=h(s(n.options),t.options)),h(n,t),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){e.callInitHooks&&e.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=n._initHooks.length;t<i;t++)n._initHooks[t].call(this)}},i},S.include=function(t){return h(this.prototype,t),this},S.mergeOptions=function(t){return h(this.prototype.options,t),this},S.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),e="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(e),this};var Z={on:function(t,i,e){if("object"==typeof t)for(var n in t)this._on(n,t[n],i);else for(var o=0,s=(t=l(t)).length;o<s;o++)this._on(t[o],i,e);return this},off:function(t,i,e){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],i);else for(var o=0,s=(t=l(t)).length;o<s;o++)this._off(t[o],i,e);else delete this._events;return this},_on:function(t,i,e){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),e===this&&(e=void 0);for(var o={fn:i,ctx:e},s=n,r=0,a=s.length;r<a;r++)if(s[r].fn===i&&s[r].ctx===e)return;s.push(o)},_off:function(t,i,e){var n,o,s;if(this._events&&(n=this._events[t]))if(i){if(e===this&&(e=void 0),n)for(o=0,s=n.length;o<s;o++){var r=n[o];if(r.ctx===e&&r.fn===i)return r.fn=a,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(o,1)}}else{for(o=0,s=n.length;o<s;o++)n[o].fn=a;delete this._events[t]}},fire:function(t,i,e){if(!this.listens(t,e))return this;var n=h({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,r=o.length;s<r;s++){var a=o[s];a.fn.call(a.ctx||this,n)}this._firingCount--}}return e&&this._propagateEvent(n),this},listens:function(t,i){var e=this._events&&this._events[t];if(e&&e.length)return!0;if(i)for(var n in this._eventParents)if(this._eventParents[n].listens(t,i))return!0;return!1},once:function(t,i,e){if("object"==typeof t){for(var n in t)this.once(n,t[n],i);return this}var o=p(function(){this.off(t,i,e).off(t,o,e)},this);return this.on(t,i,e).on(t,o,e)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[m(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[m(t)],this},_propagateEvent:function(t){for(var i in this._eventParents)this._eventParents[i].fire(t.type,h({layer:t.target,propagatedFrom:t.target},t),!0)}};Z.addEventListener=Z.on,Z.removeEventListener=Z.clearAllEventListeners=Z.off,Z.addOneTimeEventListener=Z.once,Z.fireEvent=Z.fire,Z.hasEventListeners=Z.listens;var E=S.extend(Z);function k(t,i,e){this.x=e?Math.round(t):t,this.y=e?Math.round(i):i}var B=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};function A(t,i,e){return t instanceof k?t:g(t)?new k(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new k(t.x,t.y):new k(t,i,e)}function I(t,i){if(t)for(var e=i?[t,i]:t,n=0,o=e.length;n<o;n++)this.extend(e[n])}function O(t,i){return!t||t instanceof I?t:new I(t,i)}function R(t,i){if(t)for(var e=i?[t,i]:t,n=0,o=e.length;n<o;n++)this.extend(e[n])}function N(t,i){return t instanceof R?t:new R(t,i)}function D(t,i,e){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==e&&(this.alt=+e)}function j(t,i,e){return t instanceof D?t:g(t)&&"object"!=typeof t[0]?3===t.length?new D(t[0],t[1],t[2]):2===t.length?new D(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new D(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new D(t,i,e)}k.prototype={clone:function(){return new k(this.x,this.y)},add:function(t){return this.clone()._add(A(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(A(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new k(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new k(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=B(this.x),this.y=B(this.y),this},distanceTo:function(t){var i=(t=A(t)).x-this.x,e=t.y-this.y;return Math.sqrt(i*i+e*e)},equals:function(t){return(t=A(t)).x===this.x&&t.y===this.y},contains:function(t){return t=A(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+r(this.x)+", "+r(this.y)+")"}},I.prototype={extend:function(t){return t=A(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new k((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new k(this.min.x,this.max.y)},getTopRight:function(){return new k(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var i,e;return(t=("number"==typeof t[0]||t instanceof k?A:O)(t))instanceof I?(i=t.min,e=t.max):i=e=t,i.x>=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=O(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>=i.x&&n.x<=e.x,r=o.y>=i.y&&n.y<=e.y;return s&&r},overlaps:function(t){t=O(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>i.x&&n.x<e.x,r=o.y>i.y&&n.y<e.y;return s&&r},isValid:function(){return!(!this.min||!this.max)}},R.prototype={extend:function(t){var i,e,n=this._southWest,o=this._northEast;if(t instanceof D)e=i=t;else{if(!(t instanceof R))return t?this.extend(j(t)||N(t)):this;if(i=t._southWest,e=t._northEast,!i||!e)return this}return n||o?(n.lat=Math.min(i.lat,n.lat),n.lng=Math.min(i.lng,n.lng),o.lat=Math.max(e.lat,o.lat),o.lng=Math.max(e.lng,o.lng)):(this._southWest=new D(i.lat,i.lng),this._northEast=new D(e.lat,e.lng)),this},pad:function(t){var i=this._southWest,e=this._northEast,n=Math.abs(i.lat-e.lat)*t,o=Math.abs(i.lng-e.lng)*t;return new R(new D(i.lat-n,i.lng-o),new D(e.lat+n,e.lng+o))},getCenter:function(){return new D((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new D(this.getNorth(),this.getWest())},getSouthEast:function(){return new D(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t=("number"==typeof t[0]||t instanceof D||"lat"in t?j:N)(t);var i,e,n=this._southWest,o=this._northEast;return t instanceof R?(i=t.getSouthWest(),e=t.getNorthEast()):i=e=t,i.lat>=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=N(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&n.lat<=e.lat,r=o.lng>=i.lng&&n.lng<=e.lng;return s&&r},overlaps:function(t){t=N(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&n.lat<e.lat,r=o.lng>i.lng&&n.lng<e.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=N(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}};var W,H={latLngToPoint:function(t,i){var e=this.projection.project(t),n=this.scale(i);return this.transformation._transform(e,n)},pointToLatLng:function(t,i){var e=this.scale(i),n=this.transformation.untransform(t,e);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var i=this.projection.bounds,e=this.scale(t);return new I(this.transformation.transform(i.min,e),this.transformation.transform(i.max,e))},infinite:!(D.prototype={equals:function(t,i){return!!t&&(t=j(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===i?1e-9:i))},toString:function(t){return"LatLng("+r(this.lat,t)+", "+r(this.lng,t)+")"},distanceTo:function(t){return F.distance(this,j(t))},wrap:function(){return F.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,e=i/Math.cos(Math.PI/180*this.lat);return N([this.lat-i,this.lng-e],[this.lat+i,this.lng+e])},clone:function(){return new D(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var i=this.wrapLng?o(t.lng,this.wrapLng,!0):t.lng;return new D(this.wrapLat?o(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),e=this.wrapLatLng(i),n=i.lat-e.lat,o=i.lng-e.lng;if(0==n&&0==o)return t;var s=t.getSouthWest(),r=t.getNorthEast();return new R(new D(s.lat-n,s.lng-o),new D(r.lat-n,r.lng-o))}},F=h({},H,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var e=Math.PI/180,n=t.lat*e,o=i.lat*e,s=Math.sin((i.lat-t.lat)*e/2),r=Math.sin((i.lng-t.lng)*e/2),a=s*s+Math.cos(n)*Math.cos(o)*r*r,h=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*h}}),U=6378137,V={R:U,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,e=this.MAX_LATITUDE,n=Math.max(Math.min(e,t.lat),-e),o=Math.sin(n*i);return new k(this.R*t.lng*i,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var i=180/Math.PI;return new D((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:new I([-(W=U*Math.PI),-W],[W,W])};function q(t,i,e,n){if(g(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=i,this._c=e,this._d=n}function G(t,i,e,n){return new q(t,i,e,n)}q.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){return i=i||1,t.x=i*(this._a*t.x+this._b),t.y=i*(this._c*t.y+this._d),t},untransform:function(t,i){return i=i||1,new k((t.x/i-this._b)/this._a,(t.y/i-this._d)/this._c)}};var K,Y=h({},F,{code:"EPSG:3857",projection:V,transformation:G(K=.5/(Math.PI*V.R),.5,-K,.5)}),X=h({},Y,{code:"EPSG:900913"});function J(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function $(t,i){for(var e,n,o,s,r="",a=0,h=t.length;a<h;a++){for(e=0,n=(o=t[a]).length;e<n;e++)r+=(e?"L":"M")+(s=o[e]).x+" "+s.y;r+=i?Zt?"z":"x":""}return r||"M0 0"}var Q=document.documentElement.style,tt="ActiveXObject"in window,it=tt&&!document.addEventListener,et="msLaunchUri"in navigator&&!("documentMode"in document),nt=kt("webkit"),ot=kt("android"),st=kt("android 2")||kt("android 3"),rt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=ot&&kt("Google")&&rt<537&&!("AudioNode"in window),ht=!!window.opera,ut=!et&&kt("chrome"),lt=kt("gecko")&&!nt&&!ht&&!tt,ct=!ut&&kt("safari"),_t=kt("phantom"),dt="OTransition"in Q,pt=0===navigator.platform.indexOf("Win"),mt=tt&&"transition"in Q,ft="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!st,gt="MozPerspective"in Q,vt=!window.L_DISABLE_3D&&(mt||ft||gt)&&!dt&&!_t,yt="undefined"!=typeof orientation||kt("mobile"),xt=yt&&nt,wt=yt&&ft,Pt=!window.PointerEvent&&window.MSPointerEvent,Lt=!(!window.PointerEvent&&!Pt),bt=!window.L_NO_TOUCH&&(Lt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Tt=yt&&ht,Mt=yt&&lt,zt=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),Ct=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",a,i),window.removeEventListener("testPassiveEventSupport",a,i)}catch(t){}return t}(),St=!!document.createElement("canvas").getContext,Zt=!(!document.createElementNS||!J("svg").createSVGRect),Et=!Zt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}();function kt(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var Bt={ie:tt,ielt9:it,edge:et,webkit:nt,android:ot,android23:st,androidStock:at,opera:ht,chrome:ut,gecko:lt,safari:ct,phantom:_t,opera12:dt,win:pt,ie3d:mt,webkit3d:ft,gecko3d:gt,any3d:vt,mobile:yt,mobileWebkit:xt,mobileWebkit3d:wt,msPointer:Pt,pointer:Lt,touch:bt,mobileOpera:Tt,mobileGecko:Mt,retina:zt,passiveEvents:Ct,canvas:St,svg:Zt,vml:Et},At=Pt?"MSPointerDown":"pointerdown",It=Pt?"MSPointerMove":"pointermove",Ot=Pt?"MSPointerUp":"pointerup",Rt=Pt?"MSPointerCancel":"pointercancel",Nt={},Dt=!1;function jt(t,i,e,n){function o(t){Ut(t,r)}var s,r,a,h,u,l,c,_;function d(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Ut(t,h)}return"touchstart"===i?(u=t,l=e,c=n,_=p(function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Ri(t),Ut(t,l)}),u["_leaflet_touchstart"+c]=_,u.addEventListener(At,_,!1),Dt||(document.addEventListener(At,Wt,!0),document.addEventListener(It,Ht,!0),document.addEventListener(Ot,Ft,!0),document.addEventListener(Rt,Ft,!0),Dt=!0)):"touchmove"===i?(h=e,(a=t)["_leaflet_touchmove"+n]=d,a.addEventListener(It,d,!1)):"touchend"===i&&(r=e,(s=t)["_leaflet_touchend"+n]=o,s.addEventListener(Ot,o,!1),s.addEventListener(Rt,o,!1)),this}function Wt(t){Nt[t.pointerId]=t}function Ht(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function Ft(t){delete Nt[t.pointerId]}function Ut(t,i){for(var e in t.touches=[],Nt)t.touches.push(Nt[e]);t.changedTouches=[t],i(t)}var Vt=Pt?"MSPointerDown":Lt?"pointerdown":"touchstart",qt=Pt?"MSPointerUp":Lt?"pointerup":"touchend",Gt="_leaflet_";var Kt,Yt,Xt,Jt,$t,Qt,ti=fi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ii=fi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ei="webkitTransition"===ii||"OTransition"===ii?ii+"End":"transitionend";function ni(t){return"string"==typeof t?document.getElementById(t):t}function oi(t,i){var e,n=t.style[i]||t.currentStyle&&t.currentStyle[i];return n&&"auto"!==n||!document.defaultView||(n=(e=document.defaultView.getComputedStyle(t,null))?e[i]:null),"auto"===n?null:n}function si(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function ri(t){var i=t.parentNode;i&&i.removeChild(t)}function ai(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function hi(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function ui(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function li(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=pi(t);return 0<e.length&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function ci(t,i){var e;if(void 0!==t.classList)for(var n=l(i),o=0,s=n.length;o<s;o++)t.classList.add(n[o]);else li(t,i)||di(t,((e=pi(t))?e+" ":"")+i)}function _i(t,i){void 0!==t.classList?t.classList.remove(i):di(t,u((" "+pi(t)+" ").replace(" "+i+" "," ")))}function di(t,i){void 0===t.className.baseVal?t.className=i:t.className.baseVal=i}function pi(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function mi(t,i){"opacity"in t.style?t.style.opacity=i:"filter"in t.style&&function(t,i){var e=!1,n="DXImageTransform.Microsoft.Alpha";try{e=t.filters.item(n)}catch(t){if(1===i)return}i=Math.round(100*i),e?(e.Enabled=100!==i,e.Opacity=i):t.style.filter+=" progid:"+n+"(opacity="+i+")"}(t,i)}function fi(t){for(var i=document.documentElement.style,e=0;e<t.length;e++)if(t[e]in i)return t[e];return!1}function gi(t,i,e){var n=i||new k(0,0);t.style[ti]=(mt?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")}function vi(t,i){t._leaflet_pos=i,vt?gi(t,i):(t.style.left=i.x+"px",t.style.top=i.y+"px")}function yi(t){return t._leaflet_pos||new k(0,0)}function xi(){zi(window,"dragstart",Ri)}function wi(){Si(window,"dragstart",Ri)}function Pi(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Li(),Qt=($t=t).style.outline,t.style.outline="none",zi(window,"keydown",Li))}function Li(){$t&&($t.style.outline=Qt,Qt=$t=void 0,Si(window,"keydown",Li))}function bi(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function Ti(t){var i=t.getBoundingClientRect();return{x:i.width/t.offsetWidth||1,y:i.height/t.offsetHeight||1,boundingClientRect:i}}Jt="onselectstart"in document?(Xt=function(){zi(window,"selectstart",Ri)},function(){Si(window,"selectstart",Ri)}):(Yt=fi(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),Xt=function(){var t;Yt&&(t=document.documentElement.style,Kt=t[Yt],t[Yt]="none")},function(){Yt&&(document.documentElement.style[Yt]=Kt,Kt=void 0)});var Mi={TRANSFORM:ti,TRANSITION:ii,TRANSITION_END:ei,get:ni,getStyle:oi,create:si,remove:ri,empty:ai,toFront:hi,toBack:ui,hasClass:li,addClass:ci,removeClass:_i,setClass:di,getClass:pi,setOpacity:mi,testProp:fi,setTransform:gi,setPosition:vi,getPosition:yi,disableTextSelection:Xt,enableTextSelection:Jt,disableImageDrag:xi,enableImageDrag:wi,preventOutline:Pi,restoreOutline:Li,getSizedParentNode:bi,getScale:Ti};function zi(t,i,e,n){if("object"==typeof i)for(var o in i)ki(t,o,i[o],e);else for(var s=0,r=(i=l(i)).length;s<r;s++)ki(t,i[s],e,n);return this}var Ci="_leaflet_events";function Si(t,i,e,n){if("object"==typeof i)for(var o in i)Bi(t,o,i[o],e);else if(i)for(var s=0,r=(i=l(i)).length;s<r;s++)Bi(t,i[s],e,n);else{for(var a in t[Ci])Bi(t,a,t[Ci][a]);delete t[Ci]}return this}function Zi(){return Lt&&(!et&&!ct)}var Ei={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function ki(i,t,e,n){var o=t+m(e)+(n?"_"+m(n):"");if(i[Ci]&&i[Ci][o])return this;var s,r,a,h,u,l,c=function(t){return e.call(n||i,t||window.event)},_=c;function d(t){if(Lt){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(1<t.touches.length)return;var i=Date.now(),e=i-(h||i);u=t.touches?t.touches[0]:t,l=0<e&&e<=250,h=i}function p(t){if(l&&!u.cancelBubble){if(Lt){if("mouse"===t.pointerType)return;var i,e,n={};for(e in u)i=u[e],n[e]=i&&i.bind?i.bind(u):i;u=n}u.type="dblclick",u.button=0,r(u),h=null}}Lt&&0===t.indexOf("touch")?jt(i,t,c,o):bt&&"dblclick"===t&&!Zi()?(r=c,l=!1,(s=i)[Gt+Vt+(a=o)]=d,s[Gt+qt+a]=p,s[Gt+"dblclick"+a]=r,s.addEventListener(Vt,d,!!Ct&&{passive:!1}),s.addEventListener(qt,p,!!Ct&&{passive:!1}),s.addEventListener("dblclick",r,!1)):"addEventListener"in i?"touchstart"===t||"touchmove"===t||"wheel"===t||"mousewheel"===t?i.addEventListener(Ei[t]||t,c,!!Ct&&{passive:!1}):"mouseenter"===t||"mouseleave"===t?(c=function(t){t=t||window.event,Vi(i,t)&&_(t)},i.addEventListener(Ei[t],c,!1)):i.addEventListener(t,_,!1):"attachEvent"in i&&i.attachEvent("on"+t,c),i[Ci]=i[Ci]||{},i[Ci][o]=c}function Bi(t,i,e,n){var o,s,r,a,h,u,l,c,_=i+m(e)+(n?"_"+m(n):""),d=t[Ci]&&t[Ci][_];if(!d)return this;Lt&&0===i.indexOf("touch")?(c=(u=t)["_leaflet_"+(l=i)+_],"touchstart"===l?u.removeEventListener(At,c,!1):"touchmove"===l?u.removeEventListener(It,c,!1):"touchend"===l&&(u.removeEventListener(Ot,c,!1),u.removeEventListener(Rt,c,!1))):bt&&"dblclick"===i&&!Zi()?(r=(o=t)[Gt+Vt+(s=_)],a=o[Gt+qt+s],h=o[Gt+"dblclick"+s],o.removeEventListener(Vt,r,!!Ct&&{passive:!1}),o.removeEventListener(qt,a,!!Ct&&{passive:!1}),o.removeEventListener("dblclick",h,!1)):"removeEventListener"in t?t.removeEventListener(Ei[i]||i,d,!1):"detachEvent"in t&&t.detachEvent("on"+i,d),t[Ci][_]=null}function Ai(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Ui(t),this}function Ii(t){return ki(t,"wheel",Ai),this}function Oi(t){return zi(t,"mousedown touchstart dblclick",Ai),ki(t,"click",Fi),this}function Ri(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ni(t){return Ri(t),Ai(t),this}function Di(t,i){if(!i)return new k(t.clientX,t.clientY);var e=Ti(i),n=e.boundingClientRect;return new k((t.clientX-n.left)/e.x-i.clientLeft,(t.clientY-n.top)/e.y-i.clientTop)}var ji=pt&&ut?2*window.devicePixelRatio:lt?window.devicePixelRatio:1;function Wi(t){return et?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/ji:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var Hi={};function Fi(t){Hi[t.type]=!0}function Ui(t){var i=Hi[t.type];return Hi[t.type]=!1,i}function Vi(t,i){var e=i.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(t){return!1}return e!==t}var qi={on:zi,off:Si,stopPropagation:Ai,disableScrollPropagation:Ii,disableClickPropagation:Oi,preventDefault:Ri,stop:Ni,getMousePosition:Di,getWheelDelta:Wi,fakeStop:Fi,skipped:Ui,isExternalTarget:Vi,addListener:zi,removeListener:Si},Gi=E.extend({run:function(t,i,e,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=yi(t),this._offset=i.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=M(this._animate,this),this._step()},_step:function(t){var i=new Date-this._startTime,e=1e3*this._duration;i<e?this._runFrame(this._easeOut(i/e),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){var e=this._startPos.add(this._offset.multiplyBy(t));i&&e._round(),vi(this._el,e),this.fire("step")},_complete:function(){z(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ki=E.extend({options:{crs:Y,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,i){i=c(this,i),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=p(this._onResize,this),this._initEvents(),i.maxBounds&&this.setMaxBounds(i.maxBounds),void 0!==i.zoom&&(this._zoom=this._limitZoom(i.zoom)),i.center&&void 0!==i.zoom&&this.setView(j(i.center),i.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ii&&vt&&!Tt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),zi(this._proxy,ei,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,i,e){if((i=void 0===i?this._zoom:this._limitZoom(i),t=this._limitCenter(j(t),i,this.options.maxBounds),e=e||{},this._stop(),this._loaded&&!e.reset&&!0!==e)&&(void 0!==e.animate&&(e.zoom=h({animate:e.animate},e.zoom),e.pan=h({animate:e.animate,duration:e.duration},e.pan)),this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,e.zoom):this._tryAnimatedPan(t,e.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(t,i),this},setZoom:function(t,i){return this._loaded?this.setView(this.getCenter(),t,{zoom:i}):(this._zoom=t,this)},zoomIn:function(t,i){return t=t||(vt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,i)},zoomOut:function(t,i){return t=t||(vt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,i)},setZoomAround:function(t,i,e){var n=this.getZoomScale(i),o=this.getSize().divideBy(2),s=(t instanceof k?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),r=this.containerPointToLatLng(o.add(s));return this.setView(r,i,{zoom:e})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():N(t);var e=A(i.paddingTopLeft||i.padding||[0,0]),n=A(i.paddingBottomRight||i.padding||[0,0]),o=this.getBoundsZoom(t,!1,e.add(n));if((o="number"==typeof i.maxZoom?Math.min(i.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var s=n.subtract(e).divideBy(2),r=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(r.add(a).divideBy(2).add(s),o),zoom:o}},fitBounds:function(t,i){if(!(t=N(t)).isValid())throw new Error("Bounds are not valid.");var e=this._getBoundsCenterZoom(t,i);return this.setView(e.center,e.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){return i=i||{},(t=A(t).round()).x||t.y?(!0===i.animate||this.getSize().contains(t)?(this._panAnim||(this._panAnim=new Gi,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate?(ci(this._mapPane,"leaflet-pan-anim"),e=this._getMapPanePos().subtract(t).round(),this._panAnim.run(this._mapPane,e,i.duration||.25,i.easeLinearity)):(this._rawPanBy(t),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this):this.fire("moveend");var e},flyTo:function(s,r,t){if(!1===(t=t||{}).animate||!vt)return this.setView(s,r,t);this._stop();var a=this.project(this.getCenter()),h=this.project(s),i=this.getSize(),u=this._zoom;s=j(s),r=void 0===r?u:r;var l=Math.max(i.x,i.y),n=l*this.getZoomScale(u,r),c=h.distanceTo(a)||1,_=1.42,o=_*_;function e(t){var i=(n*n-l*l+(t?-1:1)*o*o*c*c)/(2*(t?n:l)*o*c),e=Math.sqrt(i*i+1)-i;return e<1e-9?-18:Math.log(e)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var m=e(0);function f(t){return l*(p(m)*(d(i=m+_*t)/p(i))-d(m))/o;var i}var g=Date.now(),v=(e(1)-m)/_,y=t.duration?1e3*t.duration:1e3*v*.8;return this._moveStart(!0,t.noMoveStart),function t(){var i,e,n=(Date.now()-g)/y,o=(i=n,(1-Math.pow(1-i,1.5))*v);n<=1?(this._flyToFrame=M(t,this),this._move(this.unproject(a.add(h.subtract(a).multiplyBy(f(o)/c)),u),this.getScaleZoom(l/(e=o,l*(p(m)/p(m+_*e))),u),{flyTo:!0})):this._move(s,r)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,i){var e=this._getBoundsCenterZoom(t,i);return this.flyTo(e.center,e.zoom,i)},setMaxBounds:function(t){return(t=N(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var i=this.options.minZoom;return this.options.minZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var i=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,N(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e,n,o=A((i=i||{}).paddingTopLeft||i.padding||[0,0]),s=A(i.paddingBottomRight||i.padding||[0,0]),r=this.getCenter(),a=this.project(r),h=this.project(t),u=this.getPixelBounds(),l=u.getSize().divideBy(2),c=O([u.min.add(o),u.max.subtract(s)]);return c.contains(h)||(this._enforcingBounds=!0,e=a.subtract(h),n=A(h.x+e.x,h.y+e.y),(h.x<c.min.x||h.x>c.max.x)&&(n.x=a.x-e.x,0<e.x?n.x+=l.x-o.x:n.x-=l.x-s.x),(h.y<c.min.y||h.y>c.max.y)&&(n.y=a.y-e.y,0<e.y?n.y+=l.y-o.y:n.y-=l.y-s.y),this.panTo(this.unproject(n),i),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=h({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var e=this.getSize(),n=i.divideBy(2).round(),o=e.divideBy(2).round(),s=n.subtract(o);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(p(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:e})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=h({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=p(this._handleGeolocationResponse,this),e=p(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,e,t):navigator.geolocation.getCurrentPosition(i,e,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var i=t.code,e=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+e+"."})},_handleGeolocationResponse:function(t){var i,e=new D(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),o=this._locateOptions;o.setView&&(i=this.getBoundsZoom(n),this.setView(e,o.maxZoom?Math.min(i,o.maxZoom):i));var s={latlng:e,bounds:n,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)},addHandler:function(t,i){if(!i)return this;var e=this[t]=new i(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ri(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ri(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var e=si("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new R(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,e){t=N(t),e=A(e||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(e),u=O(this.project(a,n),this.project(r,n)).getSize(),l=vt?this.options.zoomSnap:1,c=h.x/u.x,_=h.y/u.y,d=i?Math.max(c,_):Math.min(c,_),n=this.getScaleZoom(d,n);return l&&(n=Math.round(n/(l/100))*(l/100),n=i?Math.ceil(n/l)*l:Math.floor(n/l)*l),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new k(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var e=this._getTopLeftPoint(t,i);return new I(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs;i=void 0===i?this._zoom:i;var n=e.zoom(t*e.scale(i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(j(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(A(t),i)},layerPointToLatLng:function(t){var i=A(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(j(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(j(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(N(t))},distance:function(t,i){return this.options.crs.distance(j(t),j(i))},containerPointToLayerPoint:function(t){return A(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return A(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(A(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(j(t)))},mouseEventToContainerPoint:function(t){return Di(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var i=this._container=ni(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");zi(i,"scroll",this._onScroll,this),this._containerId=m(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&vt,ci(t,"leaflet-container"+(bt?" leaflet-touch":"")+(zt?" leaflet-retina":"")+(it?" leaflet-oldie":"")+(ct?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=oi(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),vi(this._mapPane,new k(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ci(t.markerPane,"leaflet-zoom-hide"),ci(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i){vi(this._mapPane,new k(0,0));var e=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var n=this._zoom!==i;this._moveStart(n,!1)._move(t,i)._moveEnd(n),this.fire("viewreset"),e&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,e){void 0===i&&(i=this._zoom);var n=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){vi(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var i=t?Si:zi;i((this._targets[m(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),vt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=M(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,n=[],o="mouseout"===i||"mouseover"===i,s=t.target||t.srcElement,r=!1;s;){if((e=this._targets[m(s)])&&("click"===i||"preclick"===i)&&!t._simulated&&this._draggableMoved(e)){r=!0;break}if(e&&e.listens(i,!0)){if(o&&!Vi(s,t))break;if(n.push(e),o)break}if(s===this._container)break;s=s.parentNode}return n.length||r||o||!Vi(s,t)||(n=[this]),n},_handleDOMEvent:function(t){var i;this._loaded&&!Ui(t)&&("mousedown"!==(i=t.type)&&"keypress"!==i&&"keyup"!==i&&"keydown"!==i||Pi(t.target||t.srcElement),this._fireDOMEvent(t,i))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,e){var n;if("click"===t.type&&((n=h({},t)).type="preclick",this._fireDOMEvent(n,n.type,e)),!t._stopped&&(e=(e||[]).concat(this._findEventTargets(t,i))).length){var o=e[0];"contextmenu"===i&&o.listens(i,!0)&&Ri(t);var s,r={originalEvent:t};"keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(s=o.getLatLng&&(!o._radius||o._radius<=10),r.containerPoint=s?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=s?o.getLatLng():this.layerPointToLatLng(r.layerPoint));for(var a=0;a<e.length;a++)if(e[a].fire(i,r,!0),r.originalEvent._stopped||!1===e[a].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,i))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,i=this._handlers.length;t<i;t++)this._handlers[t].disable()},whenReady:function(t,i){return this._loaded?t.call(i||this,{target:this}):this.on("load",t,i),this},_getMapPanePos:function(){return yi(this._mapPane)||new k(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,i){return(t&&void 0!==i?this._getNewPixelOrigin(t,i):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,i){var e=this.getSize()._divideBy(2);return this.project(t,i)._subtract(e)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return this.project(t,i)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return O([this.project(t.getSouthWest(),i)._subtract(n),this.project(t.getNorthWest(),i)._subtract(n),this.project(t.getSouthEast(),i)._subtract(n),this.project(t.getNorthEast(),i)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,e){if(!e)return t;var n=this.project(t,i),o=this.getSize().divideBy(2),s=new I(n.subtract(o),n.add(o)),r=this._getBoundsOffset(s,e,i);return r.round().equals([0,0])?t:this.unproject(n.add(r),i)},_limitOffset:function(t,i){if(!i)return t;var e=this.getPixelBounds(),n=new I(e.min.add(t),e.max.add(t));return t.add(this._getBoundsOffset(n,i))},_getBoundsOffset:function(t,i,e){var n=O(this.project(i.getNorthEast(),e),this.project(i.getSouthWest(),e)),o=n.min.subtract(t.min),s=n.max.subtract(t.max);return new k(this._rebound(o.x,-s.x),this._rebound(o.y,-s.y))},_rebound:function(t,i){return 0<t+i?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),n=vt?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){_i(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var e=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(e))&&(this.panBy(e,i),!0)},_createAnimProxy:function(){var t=this._proxy=si("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var i=ti,e=this._proxy.style[i];gi(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ri(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),i=this.getZoom();gi(this._proxy,this.project(t,i),this.getZoomScale(i,1))},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(o))&&(M(function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)},this),!0)},_animateZoom:function(t,i,e,n){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,ci(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:n}),setTimeout(p(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_i(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),M(function(){this._moveEnd(!0)},this))}});function Yi(t){return new Xi(t)}var Xi=S.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return ci(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ri(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}});Ki.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var n=this._controlCorners={},o="leaflet-",s=this._controlContainer=si("div",o+"control-container",this._container);function t(t,i){var e=o+t+" "+o+i;n[t+i]=si("div",e,s)}t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ri(this._controlCorners[t]);ri(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ji=Xi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,n){return e<n?-1:n<e?1:0}},initialize:function(t,i,e){for(var n in c(this,e),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in i)this._addLayer(i[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Xi.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,i){return this._addLayer(t,i),this._map?this._update():this},addOverlay:function(t,i){return this._addLayer(t,i,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var i=this._getLayer(m(t));return i&&this._layers.splice(this._layers.indexOf(i),1),this._map?this._update():this},expand:function(){ci(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(ci(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):_i(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return _i(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",i=this._container=si("div",t),e=this.options.collapsed;i.setAttribute("aria-haspopup",!0),Oi(i),Ii(i);var n=this._section=si("section",t+"-list");e&&(this._map.on("click",this.collapse,this),ot||zi(i,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=si("a",t+"-toggle",i);o.href="#",o.title="Layers",bt?(zi(o,"click",Ni),zi(o,"click",this.expand,this)):zi(o,"focus",this.expand,this),e||this.expand(),this._baseLayersList=si("div",t+"-base",n),this._separator=si("div",t+"-separator",n),this._overlaysList=si("div",t+"-overlays",n),i.appendChild(n)},_getLayer:function(t){for(var i=0;i<this._layers.length;i++)if(this._layers[i]&&m(this._layers[i].layer)===t)return this._layers[i]},_addLayer:function(t,i,e){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:e}),this.options.sortLayers&&this._layers.sort(p(function(t,i){return this.options.sortFunction(t.layer,i.layer,t.name,i.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ai(this._baseLayersList),ai(this._overlaysList),this._layerControlInputs=[];for(var t,i,e,n=0,o=0;o<this._layers.length;o++)e=this._layers[o],this._addItem(e),i=i||e.overlay,t=t||!e.overlay,n+=e.overlay?0:1;return this.options.hideSingleBase&&(t=t&&1<n,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(m(t.target)),e=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;e&&this._map.fire(e,i)},_createRadioElement:function(t,i){var e='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+m(this),n),this._layerControlInputs.push(i),i.layerId=m(t.layer),zi(i,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");return e.appendChild(s),s.appendChild(i),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;0<=s;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])||this._map.addLayer(n[s]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,i,e=this._layerControlInputs,n=this._map.getZoom(),o=e.length-1;0<=o;o--)t=e[o],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&n<i.options.minZoom||void 0!==i.options.maxZoom&&n>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),$i=Xi.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=si("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,o){var s=si("a",e,n);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),Oi(s),zi(s,"click",Ni),zi(s,"click",o,this),zi(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";_i(this._zoomInButton,i),_i(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMinZoom()||ci(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMaxZoom()||ci(this._zoomInButton,i)}});Ki.mergeOptions({zoomControl:!0}),Ki.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new $i,this.addControl(this.zoomControl))});var Qi=Xi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=si("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=si("div",i,e)),t.imperial&&(this._iScale=si("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),e=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,e,i/t)},_updateImperial:function(t){var i,e,n,o=3.2808399*t;5280<o?(i=o/5280,e=this._getRoundNum(i),this._updateScale(this._iScale,e+" mi",e/i)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),e=t/i;return i*(e=10<=e?10:5<=e?5:3<=e?3:2<=e?2:1)}}),te=Xi.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var i in(t.attributionControl=this)._container=si("div","leaflet-control-attribution"),Oi(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(" | ")}}});Ki.mergeOptions({attributionControl:!0}),Ki.addInitHook(function(){this.options.attributionControl&&(new te).addTo(this)});Xi.Layers=Ji,Xi.Zoom=$i,Xi.Scale=Qi,Xi.Attribution=te,Yi.layers=function(t,i,e){return new Ji(t,i,e)},Yi.zoom=function(t){return new $i(t)},Yi.scale=function(t){return new Qi(t)},Yi.attribution=function(t){return new te(t)};var ie=S.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});ie.addTo=function(t,i){return t.addHandler(i,this),this};var ee,ne={Events:Z},oe=bt?"touchstart mousedown":"mousedown",se={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},re={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ae=E.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){c(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(zi(this._dragStartTarget,oe,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ae._dragging===this&&this.finishDrag(),Si(this._dragStartTarget,oe,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var i,e;!t._simulated&&this._enabled&&(this._moved=!1,li(this._element,"leaflet-zoom-anim")||ae._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((ae._dragging=this)._preventOutline&&Pi(this._element),xi(),Xt(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=bi(this._element),this._startPoint=new k(i.clientX,i.clientY),this._parentScale=Ti(e),zi(document,re[t.type],this._onMove,this),zi(document,se[t.type],this._onUp,this))))},_onMove:function(t){var i,e;!t._simulated&&this._enabled&&(t.touches&&1<t.touches.length?this._moved=!0:((e=new k((i=t.touches&&1===t.touches.length?t.touches[0]:t).clientX,i.clientY)._subtract(this._startPoint)).x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,Ri(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=yi(this._element).subtract(e),ci(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ci(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,z(this._animRequest),this._lastEvent=t,this._animRequest=M(this._updatePosition,this,!0))))},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),vi(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in _i(document.body,"leaflet-dragging"),this._lastTarget&&(_i(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),re)Si(document,re[t],this._onMove,this),Si(document,se[t],this._onUp,this);wi(),Jt(),this._moved&&this._moving&&(z(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,ae._dragging=!1}});function he(t,i){if(!i||!t.length)return t.slice();var e=i*i;return t=function(t,i){var e=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(e);n[0]=n[e-1]=1,function t(i,e,n,o,s){var r,a,h,u=0;for(a=o+1;a<=s-1;a++)h=de(i[a],i[o],i[s],!0),u<h&&(r=a,u=h);n<u&&(e[r]=1,t(i,e,n,o,r),t(i,e,n,r,s))}(t,n,i,0,e-1);var o,s=[];for(o=0;o<e;o++)n[o]&&s.push(t[o]);return s}(t=function(t,i){for(var e=[t[0]],n=1,o=0,s=t.length;n<s;n++)(function(t,i){var e=i.x-t.x,n=i.y-t.y;return e*e+n*n})(t[n],t[o])>i&&(e.push(t[n]),o=n);o<s-1&&e.push(t[s-1]);return e}(t,e),e)}function ue(t,i,e){return Math.sqrt(de(t,i,e,!0))}function le(t,i,e,n,o){var s,r,a,h=n?ee:_e(t,e),u=_e(i,e);for(ee=u;;){if(!(h|u))return[t,i];if(h&u)return!1;a=_e(r=ce(t,i,s=h||u,e,o),e),s===h?(t=r,h=a):(i=r,u=a)}}function ce(t,i,e,n,o){var s,r,a=i.x-t.x,h=i.y-t.y,u=n.min,l=n.max;return 8&e?(s=t.x+a*(l.y-t.y)/h,r=l.y):4&e?(s=t.x+a*(u.y-t.y)/h,r=u.y):2&e?(s=l.x,r=t.y+h*(l.x-t.x)/a):1&e&&(s=u.x,r=t.y+h*(u.x-t.x)/a),new k(s,r,o)}function _e(t,i){var e=0;return t.x<i.min.x?e|=1:t.x>i.max.x&&(e|=2),t.y<i.min.y?e|=4:t.y>i.max.y&&(e|=8),e}function de(t,i,e,n){var o,s=i.x,r=i.y,a=e.x-s,h=e.y-r,u=a*a+h*h;return 0<u&&(1<(o=((t.x-s)*a+(t.y-r)*h)/u)?(s=e.x,r=e.y):0<o&&(s+=a*o,r+=h*o)),a=t.x-s,h=t.y-r,n?a*a+h*h:new k(s,r)}function pe(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function me(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),pe(t)}var fe={simplify:he,pointToSegmentDistance:ue,closestPointOnSegment:function(t,i,e){return de(t,i,e)},clipSegment:le,_getEdgeIntersection:ce,_getBitCode:_e,_sqClosestPointOnSegment:de,isFlat:pe,_flat:me};function ge(t,i,e){for(var n,o,s,r,a,h,u,l=[1,4,2,8],c=0,_=t.length;c<_;c++)t[c]._code=_e(t[c],i);for(s=0;s<4;s++){for(h=l[s],n=[],c=0,o=(_=t.length)-1;c<_;o=c++)r=t[c],a=t[o],r._code&h?a._code&h||((u=ce(a,r,h,i,e))._code=_e(u,i),n.push(u)):(a._code&h&&((u=ce(a,r,h,i,e))._code=_e(u,i),n.push(u)),n.push(r));t=n}return t}var ve,ye={clipPolygon:ge},xe={project:function(t){return new k(t.lng,t.lat)},unproject:function(t){return new D(t.y,t.x)},bounds:new I([-180,-90],[180,90])},we={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,e=this.R,n=t.lat*i,o=this.R_MINOR/e,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2),n=-e*Math.log(Math.max(a,1e-10));return new k(t.lng*i*e,n)},unproject:function(t){for(var i,e=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),h=0,u=.1;h<15&&1e-7<Math.abs(u);h++)i=s*Math.sin(a),i=Math.pow((1-i)/(1+i),s/2),a+=u=Math.PI/2-2*Math.atan(r*i)-a;return new D(a*e,t.x*e/n)}},Pe={LonLat:xe,Mercator:we,SphericalMercator:V},Le=h({},F,{code:"EPSG:3395",projection:we,transformation:G(ve=.5/(Math.PI*we.R),.5,-ve,.5)}),be=h({},F,{code:"EPSG:4326",projection:xe,transformation:G(1/180,1,-1/180,.5)}),Te=h({},H,{projection:xe,transformation:G(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(e*e+n*n)},infinite:!0});H.Earth=F,H.EPSG3395=Le,H.EPSG3857=Y,H.EPSG900913=X,H.EPSG4326=be,H.Simple=Te;var Me=E.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[m(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[m(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i,e=t.target;e.hasLayer(this)&&(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents&&(i=this.getEvents(),e.on(i,this),this.once("remove",function(){e.off(i,this)},this)),this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this}))}});Ki.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=m(t);return this._layers[i]||((this._layers[i]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var i=m(t);return this._layers[i]&&(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return!!t&&m(t)in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){for(var i=0,e=(t=t?g(t)?t:[t]:[]).length;i<e;i++)this.addLayer(t[i])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[m(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var i=m(t);this._zoomBoundLayers[i]&&(delete this._zoomBoundLayers[i],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,i=-1/0,e=this._getZoomSpan();for(var n in this._zoomBoundLayers)var o=this._zoomBoundLayers[n].options,t=void 0===o.minZoom?t:Math.min(t,o.minZoom),i=void 0===o.maxZoom?i:Math.max(i,o.maxZoom);this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=t===1/0?void 0:t,e!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ze=Me.extend({initialize:function(t,i){var e,n;if(c(this,i),this._layers={},t)for(e=0,n=t.length;e<n;e++)this.addLayer(t[e])},addLayer:function(t){var i=this.getLayerId(t);return this._layers[i]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var i=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[i]&&this._map.removeLayer(this._layers[i]),delete this._layers[i],this},hasLayer:function(t){return!!t&&("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var i,e,n=Array.prototype.slice.call(arguments,1);for(i in this._layers)(e=this._layers[i])[t]&&e[t].apply(e,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:m}),Ce=ze.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ze.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),ze.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new R;for(var i in this._layers){var e=this._layers[i];t.extend(e.getBounds?e.getBounds():e.getLatLng())}return t}}),Se=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){c(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,i){var e=this._getIconUrl(t);if(!e){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(e,i&&"IMG"===i.tagName?i:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,i){var e=this.options,n=e[i+"Size"];"number"==typeof n&&(n=[n,n]);var o=A(n),s=A("shadow"===i&&e.shadowAnchor||e.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+i+" "+(e.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,i){return(i=i||document.createElement("img")).src=t,i},_getIconUrl:function(t){return zt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});var Ze=Se.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Ze.imagePath||(Ze.imagePath=this._detectIconPath()),(this.options.imagePath||Ze.imagePath)+Se.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=si("div","leaflet-default-icon-path",document.body),i=oi(t,"background-image")||oi(t,"backgroundImage");return document.body.removeChild(t),i=null===i||0!==i.indexOf("url")?"":i.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Ee=ie.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ae(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ci(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&_i(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var i,e=this._marker,n=e._map,o=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,r=yi(e._icon),a=n.getPixelBounds(),h=n.getPixelOrigin(),u=O(a.min._subtract(h).add(s),a.max._subtract(h).subtract(s));u.contains(r)||(i=A((Math.max(u.max.x,r.x)-u.max.x)/(a.max.x-u.max.x)-(Math.min(u.min.x,r.x)-u.min.x)/(a.min.x-u.min.x),(Math.max(u.max.y,r.y)-u.max.y)/(a.max.y-u.max.y)-(Math.min(u.min.y,r.y)-u.min.y)/(a.min.y-u.min.y)).multiplyBy(o),n.panBy(i,{animate:!1}),this._draggable._newPos._add(i),this._draggable._startPos._add(i),vi(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=M(this._adjustPan.bind(this,t)))},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(z(this._panRequest),this._panRequest=M(this._adjustPan.bind(this,t)))},_onDrag:function(t){var i=this._marker,e=i._shadow,n=yi(i._icon),o=i._map.layerPointToLatLng(n);e&&vi(e,n),i._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,i.fire("move",t).fire("drag",t)},_onDragEnd:function(t){z(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),ke=Me.extend({options:{icon:new Ze,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,i){c(this,i),this._latlng=j(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var i=this._latlng;return this._latlng=j(t),this.update(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){var t;return this._icon&&this._map&&(t=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(t)),this},_initIcon:function(){var t=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),e=t.icon.createIcon(this._icon),n=!1;e!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(e.title=t.title),"IMG"===e.tagName&&(e.alt=t.alt||"")),ci(e,i),t.keyboard&&(e.tabIndex="0"),this._icon=e,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),s=!1;o!==this._shadow&&(this._removeShadow(),s=!0),o&&(ci(o,i),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&s&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ri(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ri(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&vi(this._icon,t),this._shadow&&vi(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(i)},_initInteraction:function(){var t;this.options.interactive&&(ci(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ee&&(t=this.options.draggable,this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ee(this),t&&this.dragging.enable()))},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&mi(this._icon,t),this._shadow&&mi(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});var Be=Me.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return c(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),Ae=Be.extend({options:{fill:!0,radius:10},initialize:function(t,i){c(this,i),this._latlng=j(t),this._radius=this.options.radius},setLatLng:function(t){var i=this._latlng;return this._latlng=j(t),this.redraw(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var i=t&&t.radius||this._radius;return Be.prototype.setStyle.call(this,t),this.setRadius(i),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,i=this._radiusY||t,e=this._clickTolerance(),n=[t+e,i+e];this._pxBounds=new I(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});var Ie=Ae.extend({initialize:function(t,i,e){if("number"==typeof i&&(i=h({},e,{radius:i})),c(this,i),this._latlng=j(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new R(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Be.prototype.setStyle,_project:function(){var t,i,e,n,o,s,r,a,h=this._latlng.lng,u=this._latlng.lat,l=this._map,c=l.options.crs;c.distance===F.distance?(t=Math.PI/180,i=this._mRadius/F.R/t,e=l.project([u+i,h]),n=l.project([u-i,h]),o=e.add(n).divideBy(2),s=l.unproject(o).lat,r=Math.acos((Math.cos(i*t)-Math.sin(u*t)*Math.sin(s*t))/(Math.cos(u*t)*Math.cos(s*t)))/t,!isNaN(r)&&0!==r||(r=i/Math.cos(Math.PI/180*u)),this._point=o.subtract(l.getPixelOrigin()),this._radius=isNaN(r)?0:o.x-l.project([s,h-r]).x,this._radiusY=o.y-e.y):(a=c.unproject(c.project(this._latlng).subtract([this._mRadius,0])),this._point=l.latLngToLayerPoint(this._latlng),this._radius=this._point.x-l.latLngToLayerPoint(a).x),this._updateBounds()}});var Oe=Be.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,i){c(this,i),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var i,e,n=1/0,o=null,s=de,r=0,a=this._parts.length;r<a;r++)for(var h=this._parts[r],u=1,l=h.length;u<l;u++){var c=s(t,i=h[u-1],e=h[u],!0);c<n&&(n=c,o=s(t,i,e))}return o&&(o.distance=Math.sqrt(n)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,o,s,r,a=this._rings[0],h=a.length;if(!h)return null;for(i=t=0;t<h-1;t++)i+=a[t].distanceTo(a[t+1])/2;if(0===i)return this._map.layerPointToLatLng(a[0]);for(n=t=0;t<h-1;t++)if(o=a[t],s=a[t+1],i<(n+=e=o.distanceTo(s)))return r=(n-i)/e,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=j(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new R,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return pe(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],e=pe(t),n=0,o=t.length;n<o;n++)e?(i[n]=j(t[n]),this._bounds.extend(i[n])):i[n]=this._convertLatLngs(t[n]);return i},_project:function(){var t=new I;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),i=new k(t,t);this._pxBounds=new I([this._rawPxBounds.min.subtract(i),this._rawPxBounds.max.add(i)])},_projectLatlngs:function(t,i,e){var n,o,s=t[0]instanceof D,r=t.length;if(s){for(o=[],n=0;n<r;n++)o[n]=this._map.latLngToLayerPoint(t[n]),e.extend(o[n]);i.push(o)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],i,e)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,e,n,o,s=this._parts,r=0,a=0,h=this._rings.length;r<h;r++)for(i=0,e=(o=this._rings[r]).length;i<e-1;i++)(n=le(o[i],o[i+1],t,i,!0))&&(s[a]=s[a]||[],s[a].push(n[0]),n[1]===o[i+1]&&i!==e-2||(s[a].push(n[1]),a++))},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,e=0,n=t.length;e<n;e++)t[e]=he(t[e],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var e,n,o,s,r,a,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(e=0,s=this._parts.length;e<s;e++)for(n=0,o=(r=(a=this._parts[e]).length)-1;n<r;o=n++)if((i||0!==n)&&ue(t,a[o],a[n])<=h)return!0;return!1}});Oe._flat=me;var Re=Oe.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,o,s,r,a,h,u=this._rings[0],l=u.length;if(!l)return null;for(t=s=r=a=0,i=l-1;t<l;i=t++)e=u[t],n=u[i],o=e.y*n.x-n.y*e.x,r+=(e.x+n.x)*o,a+=(e.y+n.y)*o,s+=3*o;return h=0===s?u[0]:[r/s,a/s],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var i=Oe.prototype._convertLatLngs.call(this,t),e=i.length;return 2<=e&&i[0]instanceof D&&i[0].equals(i[e-1])&&i.pop(),i},_setLatLngs:function(t){Oe.prototype._setLatLngs.call(this,t),pe(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return pe(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,e=new k(i,i),t=new I(t.min.subtract(e),t.max.add(e));if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,s=this._rings.length;o<s;o++)(n=ge(this._rings[o],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,e,n,o,s,r,a,h,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(h=(i=this._parts[o]).length)-1;s<h;r=s++)e=i[s],n=i[r],e.y>t.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(u=!u);return u||Oe.prototype._containsPoint.call(this,t,!0)}});var Ne=Ce.extend({initialize:function(t,i){c(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=g(t)?t:t.features;if(o){for(i=0,e=o.length;i<e;i++)((n=o[i]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=De(t,s);return r?(r.feature=qe(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=h({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(i){return this.eachLayer(function(t){this._setLayerStyle(t,i)},this)},_setLayerStyle:function(t,i){t.setStyle&&("function"==typeof i&&(i=i(t.feature)),t.setStyle(i))}});function De(t,i){var e,n,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,h=[],u=i&&i.pointToLayer,l=i&&i.coordsToLatLng||We;if(!a&&!r)return null;switch(r.type){case"Point":return je(u,t,e=l(a),i);case"MultiPoint":for(o=0,s=a.length;o<s;o++)e=l(a[o]),h.push(je(u,t,e,i));return new Ce(h);case"LineString":case"MultiLineString":return n=He(a,"LineString"===r.type?0:1,l),new Oe(n,i);case"Polygon":case"MultiPolygon":return n=He(a,"Polygon"===r.type?1:2,l),new Re(n,i);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var c=De({geometry:r.geometries[o],type:"Feature",properties:t.properties},i);c&&h.push(c)}return new Ce(h);default:throw new Error("Invalid GeoJSON object.")}}function je(t,i,e,n){return t?t(i,e):new ke(e,n&&n.markersInheritOptions&&n)}function We(t){return new D(t[1],t[0],t[2])}function He(t,i,e){for(var n,o=[],s=0,r=t.length;s<r;s++)n=i?He(t[s],i-1,e):(e||We)(t[s]),o.push(n);return o}function Fe(t,i){return i="number"==typeof i?i:6,void 0!==t.alt?[r(t.lng,i),r(t.lat,i),r(t.alt,i)]:[r(t.lng,i),r(t.lat,i)]}function Ue(t,i,e,n){for(var o=[],s=0,r=t.length;s<r;s++)o.push(i?Ue(t[s],i-1,e,n):Fe(t[s],n));return!i&&e&&o.push(o[0]),o}function Ve(t,i){return t.feature?h({},t.feature,{geometry:i}):qe(i)}function qe(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Ge={toGeoJSON:function(t){return Ve(this,{type:"Point",coordinates:Fe(this.getLatLng(),t)})}};function Ke(t,i){return new Ne(t,i)}ke.include(Ge),Ie.include(Ge),Ae.include(Ge),Oe.include({toGeoJSON:function(t){var i=!pe(this._latlngs);return Ve(this,{type:(i?"Multi":"")+"LineString",coordinates:Ue(this._latlngs,i?1:0,!1,t)})}}),Re.include({toGeoJSON:function(t){var i=!pe(this._latlngs),e=i&&!pe(this._latlngs[0]),n=Ue(this._latlngs,e?2:i?1:0,!0,t);return i||(n=[n]),Ve(this,{type:(e?"Multi":"")+"Polygon",coordinates:n})}}),ze.include({toMultiPoint:function(i){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON(i).geometry.coordinates)}),Ve(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(n){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(n);var o="GeometryCollection"===t,s=[];return this.eachLayer(function(t){var i,e;t.toGeoJSON&&(i=t.toGeoJSON(n),o?s.push(i.geometry):"FeatureCollection"===(e=qe(i)).type?s.push.apply(s,e.features):s.push(e))}),o?Ve(this,{geometries:s,type:"GeometryCollection"}):{type:"FeatureCollection",features:s}}});var Ye=Ke,Xe=Me.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,e){this._url=t,this._bounds=N(i),c(this,e)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ci(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ri(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&hi(this._image),this},bringToBack:function(){return this._map&&ui(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=N(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,i=this._image=t?this._url:si("img");ci(i,"leaflet-image-layer"),this._zoomAnimated&&ci(i,"leaflet-zoom-animated"),this.options.className&&ci(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onload=p(this.fire,this,"load"),i.onerror=p(this._overlayOnError,this,"error"),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=i.src:(i.src=this._url,i.alt=this.options.alt)},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;gi(this._image,e,i)},_reset:function(){var t=this._image,i=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=i.getSize();vi(t,i.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){mi(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),Je=Xe.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:si("video");if(ci(i,"leaflet-image-layer"),this._zoomAnimated&&ci(i,"leaflet-zoom-animated"),this.options.className&&ci(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onloadeddata=p(this.fire,this,"load"),t){for(var e=i.getElementsByTagName("source"),n=[],o=0;o<e.length;o++)n.push(e[o].src);this._url=0<e.length?n:[i.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(i.style,"objectFit")&&(i.style.objectFit="fill"),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop,i.muted=!!this.options.muted;for(var s=0;s<this._url.length;s++){var r=si("source");r.src=this._url[s],i.appendChild(r)}}}});var $e=Xe.extend({_initImage:function(){var t=this._image=this._url;ci(t,"leaflet-image-layer"),this._zoomAnimated&&ci(t,"leaflet-zoom-animated"),this.options.className&&ci(t,this.options.className),t.onselectstart=a,t.onmousemove=a}});var Qe=Me.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,i){c(this,t),this._source=i},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&mi(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&mi(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(mi(this._container,0),this._removeTimeout=setTimeout(p(ri,void 0,this._container),200)):ri(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=j(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&hi(this._container),this},bringToBack:function(){return this._map&&ui(this._container),this},_prepareOpen:function(t,i,e){if(i instanceof Me||(e=i,i=t),i instanceof Ce)for(var n in t._layers){i=t._layers[n];break}if(!e)if(i.getCenter)e=i.getCenter();else{if(!i.getLatLng)throw new Error("Unable to get source layer LatLng.");e=i.getLatLng()}return this._source=i,this.update(),e},_updateContent:function(){if(this._content){var t=this._contentNode,i="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof i)t.innerHTML=i;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(i)}this.fire("contentupdate")}},_updatePosition:function(){var t,i,e,n,o;this._map&&(t=this._map.latLngToLayerPoint(this._latlng),i=A(this.options.offset),e=this._getAnchor(),this._zoomAnimated?vi(this._container,t.add(e)):i=i.add(t).add(e),n=this._containerBottom=-i.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+i.x,this._container.style.bottom=n+"px",this._container.style.left=o+"px")},_getAnchor:function(){return[0,0]}}),tn=Qe.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Qe.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Be||this._source.on("preclick",Ai))},onRemove:function(t){Qe.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Be||this._source.off("preclick",Ai))},getEvents:function(){var t=Qe.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t,i="leaflet-popup",e=this._container=si("div",i+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=si("div",i+"-content-wrapper",e);this._contentNode=si("div",i+"-content",n),Oi(e),Ii(this._contentNode),zi(e,"contextmenu",Ai),this._tipContainer=si("div",i+"-tip-container",e),this._tip=si("div",i+"-tip",this._tipContainer),this.options.closeButton&&((t=this._closeButton=si("a",i+"-close-button",e)).href="#close",t.innerHTML="&#215;",zi(t,"click",this._onCloseButtonClick,this))},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var e=t.offsetWidth,e=Math.min(e,this.options.maxWidth);e=Math.max(e,this.options.minWidth),i.width=e+1+"px",i.whiteSpace="",i.height="";var n=t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&o<n?(i.height=o+"px",ci(t,s)):_i(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();vi(this._container,i.add(e))},_adjustPan:function(){var t,i,e,n,o,s,r,a,h,u,l,c;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),t=this._map,i=parseInt(oi(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+i,n=this._containerWidth,(o=new k(this._containerLeft,-e-this._containerBottom))._add(yi(this._container)),s=t.layerPointToContainerPoint(o),r=A(this.options.autoPanPadding),a=A(this.options.autoPanPaddingTopLeft||r),h=A(this.options.autoPanPaddingBottomRight||r),u=t.getSize(),c=l=0,s.x+n+h.x>u.x&&(l=s.x+n-u.x+h.x),s.x-l-a.x<0&&(l=s.x-a.x),s.y+e+h.y>u.y&&(c=s.y+e-u.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c]))},_onCloseButtonClick:function(t){this._close(),Ni(t)},_getAnchor:function(){return A(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ki.mergeOptions({closePopupOnClick:!0}),Ki.include({openPopup:function(t,i,e){return t instanceof tn||(t=new tn(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Me.include({bindPopup:function(t,i){return t instanceof tn?(c(t,i),(this._popup=t)._source=this):(this._popup&&!i||(this._popup=new tn(i,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,i){return this._popup&&this._map&&(i=this._popup._prepareOpen(this,t,i),this._map.openPopup(this._popup,i)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var i=t.layer||t.target;this._popup&&this._map&&(Ni(t),i instanceof Be?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===i?this.closePopup():this.openPopup(i,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var en=Qe.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Qe.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Qe.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Qe.prototype.getEvents.call(this);return bt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=si("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e=this._map,n=this._container,o=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),r=this.options.direction,a=n.offsetWidth,h=n.offsetHeight,u=A(this.options.offset),l=this._getAnchor(),c="top"===r?(i=a/2,h):"bottom"===r?(i=a/2,0):(i="center"===r?a/2:"right"===r?0:"left"===r?a:s.x<o.x?(r="right",0):(r="left",a+2*(u.x+l.x)),h/2);t=t.subtract(A(i,c,!0)).add(u).add(l),_i(n,"leaflet-tooltip-right"),_i(n,"leaflet-tooltip-left"),_i(n,"leaflet-tooltip-top"),_i(n,"leaflet-tooltip-bottom"),ci(n,"leaflet-tooltip-"+r),vi(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&mi(this._container,t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(i)},_getAnchor:function(){return A(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ki.include({openTooltip:function(t,i,e){return t instanceof en||(t=new en(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Me.include({bindTooltip:function(t,i){return t instanceof en?(c(t,i),(this._tooltip=t)._source=this):(this._tooltip&&!i||(this._tooltip=new en(i,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){var i,e;!t&&this._tooltipHandlersAdded||(i=t?"off":"on",e={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?e.add=this._openTooltip:(e.mouseover=this._openTooltip,e.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(e.mousemove=this._moveTooltip),bt&&(e.click=this._openTooltip)),this[i](e),this._tooltipHandlersAdded=!t)},openTooltip:function(t,i){return this._tooltip&&this._map&&(i=this._tooltip._prepareOpen(this,t,i),this._map.openTooltip(this._tooltip,i),this._tooltip.options.interactive&&this._tooltip._container&&(ci(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(_i(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var i=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(i,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var i,e,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),e=this._map.containerPointToLayerPoint(i),n=this._map.layerPointToLatLng(e)),this._tooltip.setLatLng(n)}});var nn=Se.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i,e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;return n.html instanceof Element?(ai(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos&&(i=A(n.bgPos),e.style.backgroundPosition=-i.x+"px "+-i.y+"px"),this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Se.Default=Ze;var on=Me.extend({options:{tileSize:256,opacity:1,updateWhenIdle:yt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){c(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ri(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(hi(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ui(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=n(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof k?t:new k(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var i,e=this.getPane().children,n=-t(-1/0,1/0),o=0,s=e.length;o<s;o++)i=e[o].style.zIndex,e[o]!==this._container&&i&&(n=t(n,+i));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!it){mi(this._container,this.options.opacity);var t=+new Date,i=!1,e=!1;for(var n in this._tiles){var o,s=this._tiles[n];s.current&&s.loaded&&(o=Math.min(1,(t-s.loaded)/200),mi(s.el,o),o<1?i=!0:(s.active?e=!0:this._onOpaqueTile(s),s.active=!0))}e&&!this._noPrune&&this._pruneTiles(),i&&(z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=si("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,i=this.options.maxZoom;if(void 0!==t){for(var e in this._levels)e=Number(e),this._levels[e].el.children.length||e===t?(this._levels[e].el.style.zIndex=i-Math.abs(t-e),this._onUpdateLevel(e)):(ri(this._levels[e].el),this._removeTilesAtZoom(e),this._onRemoveLevel(e),delete this._levels[e]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=si("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=i,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),a(n.el.offsetWidth),this._onCreateLevel(n)),this._level=n}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,i,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles){(e=this._tiles[t]).current&&!e.active&&(i=e.coords,this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2))}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var i in this._tiles)this._tiles[i].coords.z===t&&this._removeTile(i)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ri(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,i,e,n){var o=Math.floor(t/2),s=Math.floor(i/2),r=e-1,a=new k(+o,+s);a.z=+r;var h=this._tileCoordsToKey(a),u=this._tiles[h];return u&&u.active?u.retain=!0:(u&&u.loaded&&(u.retain=!0),n<r&&this._retainParent(o,s,r,n))},_retainChildren:function(t,i,e,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*i;s<2*i+2;s++){var r=new k(o,s);r.z=e+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),e+1<n&&this._retainChildren(o,s,e+1,n))}},_resetView:function(t){var i=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var i=this.options;return void 0!==i.minNativeZoom&&t<i.minNativeZoom?i.minNativeZoom:void 0!==i.maxNativeZoom&&i.maxNativeZoom<t?i.maxNativeZoom:t},_setView:function(t,i,e,n){var o=Math.round(i),o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o),s=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),e||this._pruneTiles(),this._noPrune=!!e),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var e in this._levels)this._setZoomTransform(this._levels[e],t,i)},_setZoomTransform:function(t,i,e){var n=this._map.getZoomScale(e,t.zoom),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(i,e)).round();vt?gi(t.el,o,n):vi(t.el,o)},_resetGrid:function(){var t=this._map,i=t.options.crs,e=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,i.wrapLng[0]],n).x/e.x),Math.ceil(t.project([0,i.wrapLng[1]],n).x/e.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],n).y/e.x),Math.ceil(t.project([i.wrapLat[1],0],n).y/e.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,e=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),n=i.getZoomScale(e,this._tileZoom),o=i.project(t,this._tileZoom).floor(),s=i.getSize().divideBy(2*n);return new I(o.subtract(s),o.add(s))},_update:function(t){var i=this._map;if(i){var e=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),s=o.getCenter(),r=[],a=this.options.keepBuffer,h=new I(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var l=this._tiles[u].coords;l.z===this._tileZoom&&h.contains(new k(l.x,l.y))||(this._tiles[u].current=!1)}if(1<Math.abs(e-this._tileZoom))this._setView(t,e);else{for(var c=o.min.y;c<=o.max.y;c++)for(var _=o.min.x;_<=o.max.x;_++){var d,p=new k(_,c);p.z=this._tileZoom,this._isValidTile(p)&&((d=this._tiles[this._tileCoordsToKey(p)])?d.current=!0:r.push(p))}if(r.sort(function(t,i){return t.distanceTo(s)-i.distanceTo(s)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));for(var m=document.createDocumentFragment(),_=0;_<r.length;_++)this._addTile(r[_],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var i=this._map.options.crs;if(!i.infinite){var e=this._globalTileRange;if(!i.wrapLng&&(t.x<e.min.x||t.x>e.max.x)||!i.wrapLat&&(t.y<e.min.y||t.y>e.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return N(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),o=n.add(e);return[i.unproject(n,t.z),i.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new R(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new k(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(ri(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ci(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=a,t.onmousemove=a,it&&this.options.opacity<1&&mi(t,this.options.opacity),ot&&!st&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,i){var e=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),p(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(p(this._tileReady,this,t,null,o)),vi(o,e),this._tiles[n]={el:o,coords:t,current:!0},i.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var n=this._tileCoordsToKey(t);(e=this._tiles[n])&&(e.loaded=+new Date,this._map._fadeAnimated?(mi(e.el,0),z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(ci(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),it||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(p(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new k(this._wrapX?o(t.x,this._wrapX):t.x,this._wrapY?o(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new I(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var sn=on.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,i){this._url=t,(i=c(this,i)).detectRetina&&zt&&0<i.maxZoom&&(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom++):(i.zoomOffset++,i.maxZoom--),i.minZoom=Math.max(0,i.minZoom)),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),ot||this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url===t&&void 0===i&&(i=!0),this._url=t,i||this.redraw(),this},createTile:function(t,i){var e=document.createElement("img");return zi(e,"load",p(this._tileOnLoad,this,i,e)),zi(e,"error",p(this._tileOnError,this,i,e)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),e.alt="",e.setAttribute("role","presentation"),e.src=this.getTileUrl(t),e},getTileUrl:function(t){var i,e={r:zt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(i=this._globalTileRange.max.y-t.y,this.options.tms&&(e.y=i),e["-y"]=i),f(this._url,h(e,this.options))},_tileOnLoad:function(t,i){it?setTimeout(p(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var n=this.options.errorTileUrl;n&&i.getAttribute("src")!==n&&(i.src=n),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,i=this.options.maxZoom;return this.options.zoomReverse&&(t=i-t),t+this.options.zoomOffset},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=a,i.onerror=a,i.complete||(i.src=y,ri(i),delete this._tiles[t]))},_removeTile:function(t){var i=this._tiles[t];if(i)return at||i.el.setAttribute("src",y),on.prototype._removeTile.call(this,t)},_tileReady:function(t,i,e){if(this._map&&(!e||e.getAttribute("src")!==y))return on.prototype._tileReady.call(this,t,i,e)}});function rn(t,i){return new sn(t,i)}var an=sn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,i){this._url=t;var e=h({},this.defaultWmsParams);for(var n in i)n in this.options||(e[n]=i[n]);var o=(i=c(this,i)).detectRetina&&zt?2:1,s=this.getTileSize();e.width=s.x*o,e.height=s.y*o,this.wmsParams=e},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var i=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[i]=this._crs.code,sn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),e=this._crs,n=O(e.project(i[0]),e.project(i[1])),o=n.min,s=n.max,r=(1.3<=this._wmsVersion&&this._crs===be?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=sn.prototype.getTileUrl.call(this,t);return a+_(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,i){return h(this.wmsParams,t),i||this.redraw(),this}});sn.WMS=an,rn.wms=function(t,i){return new an(t,i)};var hn=Me.extend({options:{padding:.1,tolerance:0},initialize:function(t){c(this,t),m(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ci(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var e=this._map.getZoomScale(i,this._zoom),n=yi(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,i),r=this._map.project(t,i).subtract(s),a=o.multiplyBy(-e).add(n).add(o).subtract(r);vt?gi(this._container,a,e):vi(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new I(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),un=hn.extend({getEvents:function(){var t=hn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){hn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");zi(t,"mousemove",this._onMouseMove,this),zi(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),zi(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,ri(this._container),Si(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){var t,i,e,n;this._map._animatingZoom&&this._bounds||(hn.prototype._update.call(this),t=this._bounds,i=this._container,e=t.getSize(),n=zt?2:1,vi(i,t.min),i.width=n*e.x,i.height=n*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",zt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update"))},_reset:function(){hn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t);var i=(this._layers[m(t)]=t)._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,n=i.prev;e?e.prev=n:this._drawLast=n,n?n.next=e:this._drawFirst=e,delete t._order,delete this._layers[m(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){for(var i,e=t.options.dashArray.split(/[, ]+/),n=[],o=0;o<e.length;o++){if(i=Number(e[o]),isNaN(i))return;n.push(i)}t.options._dashArray=n}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||M(this._redraw,this))},_extendRedrawBounds:function(t){var i;t._pxBounds&&(i=(t.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new I,this._redrawBounds.extend(t._pxBounds.min.subtract([i,i])),this._redrawBounds.extend(t._pxBounds.max.add([i,i])))},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t,i=this._redrawBounds;i?(t=i.getSize(),this._ctx.clearRect(i.min.x,i.min.y,t.x,t.y)):(this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore())},_draw:function(){var t,i,e=this._redrawBounds;this._ctx.save(),e&&(i=e.getSize(),this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()),this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,i){if(this._drawing){var e,n,o,s,r=t._parts,a=r.length,h=this._ctx;if(a){for(h.beginPath(),e=0;e<a;e++){for(n=0,o=r[e].length;n<o;n++)s=r[e][n],h[n?"lineTo":"moveTo"](s.x,s.y);i&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){var i,e,n,o;this._drawing&&!t._empty()&&(i=t._point,e=this._ctx,n=Math.max(Math.round(t._radius),1),1!=(o=(Math.max(Math.round(t._radiusY),1)||n)/n)&&(e.save(),e.scale(1,o)),e.beginPath(),e.arc(i.x,i.y/o,n,0,2*Math.PI,!1),1!=o&&e.restore(),this._fillStroke(e,t))},_fillStroke:function(t,i){var e=i.options;e.fill&&(t.globalAlpha=e.fillOpacity,t.fillStyle=e.fillColor||e.color,t.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=e.opacity,t.lineWidth=e.weight,t.strokeStyle=e.color,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.stroke())},_onClick:function(t){for(var i,e,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(n)&&(("click"===t.type||"preclick"!==t.type)&&this._map._draggableMoved(i)||(e=i));e&&(Fi(t),this._fireEvent([e],t))},_onMouseMove:function(t){var i;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(i=this._map.mouseEventToLayerPoint(t),this._handleMouseHover(t,i))},_handleMouseOut:function(t){var i=this._hoveredLayer;i&&(_i(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,i){if(!this._mouseHoverThrottled){for(var e,n,o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&(n=e);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(ci(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(p(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,i,e){this._map._fireDOMEvent(i,e||i.type,t)},_bringToFront:function(t){var i,e,n=t._order;n&&(i=n.next,e=n.prev,i&&((i.prev=e)?e.next=i:i&&(this._drawFirst=i),n.prev=this._drawLast,(this._drawLast.next=n).next=null,this._drawLast=n,this._requestRedraw(t)))},_bringToBack:function(t){var i,e,n=t._order;n&&(i=n.next,(e=n.prev)&&((e.next=i)?i.prev=e:e&&(this._drawLast=e),n.prev=null,n.next=this._drawFirst,this._drawFirst.prev=n,this._drawFirst=n,this._requestRedraw(t)))}});function ln(t){return St?new un(t):null}var cn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_n={_initContainer:function(){this._container=si("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(hn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=cn("shape");ci(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=cn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;ri(i),t.removeInteractiveTarget(i),delete this._layers[m(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i=i||(t._stroke=cn("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e=e||(t._fill=cn("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){hi(t._container)},_bringToBack:function(t){ui(t._container)}},dn=Et?cn:J,pn=hn.extend({getEvents:function(){var t=hn.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=dn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=dn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ri(this._container),Si(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){var t,i,e;this._map._animatingZoom&&this._bounds||(hn.prototype._update.call(this),i=(t=this._bounds).getSize(),e=this._container,this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),vi(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update"))},_initPath:function(t){var i=t._path=dn("path");t.options.className&&ci(i,t.options.className),t.options.interactive&&ci(i,"leaflet-interactive"),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ri(t._path),t.removeInteractiveTarget(t._path),delete this._layers[m(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,$(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,o)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){hi(t._path)},_bringToBack:function(t){ui(t._path)}});function mn(t){return Zt||Et?new pn(t):null}Et&&pn.include(_n),Ki.include({getRenderer:function(t){var i=(i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&ln(t)||mn(t)}});var fn=Re.extend({initialize:function(t,i){Re.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=N(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});pn.create=dn,pn.pointsToPath=$,Ne.geometryToLayer=De,Ne.coordsToLatLng=We,Ne.coordsToLatLngs=He,Ne.latLngToCoords=Fe,Ne.latLngsToCoords=Ue,Ne.getFeature=Ve,Ne.asFeature=qe,Ki.mergeOptions({boxZoom:!0});var gn=ie.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){zi(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Si(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ri(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Xt(),xi(),this._startPoint=this._map.mouseEventToContainerPoint(t),zi(document,{contextmenu:Ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=si("div","leaflet-zoom-box",this._container),ci(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new I(this._point,this._startPoint),e=i.getSize();vi(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(ri(this._box),_i(this._container,"leaflet-crosshair")),Jt(),wi(),Si(document,{contextmenu:Ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){var i;1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(p(this._resetState,this),0),i=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})))},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ki.addInitHook("addHandler","boxZoom",gn),Ki.mergeOptions({doubleClickZoom:!0});var vn=ie.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,o=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(o):i.setZoomAround(t.containerPoint,o)}});Ki.addInitHook("addHandler","doubleClickZoom",vn),Ki.mergeOptions({dragging:!0,inertia:!st,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var yn=ie.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new ae(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),ci(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_i(this._map._container,"leaflet-grab"),_i(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,i=this._map;i._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=N(this._map.options.maxBounds),this._offsetLimit=O(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,i.fire("movestart").fire("dragstart"),i.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var i,e;this._map.options.inertia&&(i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(e),this._times.push(i),this._prunePositions(i)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){var t,i;this._viscosity&&this._offsetLimit&&(t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit,t.x<i.min.x&&(t.x=this._viscousLimit(t.x,i.min.x)),t.y<i.min.y&&(t.y=this._viscousLimit(t.y,i.min.y)),t.x>i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,s=(n+i+e)%t-i-e,r=Math.abs(o+e)<Math.abs(s+e)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var i,e,n,o,s,r,a,h,u,l=this._map,c=l.options,_=!c.inertia||this._times.length<2;l.fire("dragend",t),_?l.fire("moveend"):(this._prunePositions(+new Date),i=this._lastPos.subtract(this._positions[0]),e=(this._lastTime-this._times[0])/1e3,n=c.easeLinearity,s=(o=i.multiplyBy(n/e)).distanceTo([0,0]),r=Math.min(c.inertiaMaxSpeed,s),a=o.multiplyBy(r/s),h=r/(c.inertiaDeceleration*n),(u=a.multiplyBy(-h/2).round()).x||u.y?(u=l._limitOffset(u,l.options.maxBounds),M(function(){l.panBy(u,{duration:h,easeLinearity:n,noMoveStart:!0,animate:!0})})):l.fire("moveend"))}});Ki.addInitHook("addHandler","dragging",yn),Ki.mergeOptions({keyboard:!0,keyboardPanDelta:80});var xn=ie.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),zi(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Si(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){var t,i,e,n;this._focused||(t=document.body,i=document.documentElement,e=t.scrollTop||i.scrollTop,n=t.scrollLeft||i.scrollLeft,this._map._container.focus(),window.scrollTo(n,e))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){for(var i=this._panKeys={},e=this.keyCodes,n=0,o=e.left.length;n<o;n++)i[e.left[n]]=[-1*t,0];for(n=0,o=e.right.length;n<o;n++)i[e.right[n]]=[t,0];for(n=0,o=e.down.length;n<o;n++)i[e.down[n]]=[0,t];for(n=0,o=e.up.length;n<o;n++)i[e.up[n]]=[0,-1*t]},_setZoomDelta:function(t){for(var i=this._zoomKeys={},e=this.keyCodes,n=0,o=e.zoomIn.length;n<o;n++)i[e.zoomIn[n]]=t;for(n=0,o=e.zoomOut.length;n<o;n++)i[e.zoomOut[n]]=-t},_addHooks:function(){zi(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Si(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var i,e=t.keyCode,n=this._map;if(e in this._panKeys)n._panAnim&&n._panAnim._inProgress||(i=this._panKeys[e],t.shiftKey&&(i=A(i).multiplyBy(3)),n.panBy(i),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(e in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if(27!==e||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Ni(t)}}});Ki.addInitHook("addHandler","keyboard",xn),Ki.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var wn=ie.extend({addHooks:function(){zi(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Si(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var i=Wi(t),e=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(e-(new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(p(this._performZoom,this),n),Ni(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),e=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,s=e?Math.ceil(o/e)*e:o,r=t._limitZoom(i+(0<this._delta?s:-s))-i;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(i+r):t.setZoomAround(this._lastMousePos,i+r))}});Ki.addInitHook("addHandler","scrollWheelZoom",wn),Ki.mergeOptions({tap:!0,tapTolerance:15});var Pn=ie.extend({addHooks:function(){zi(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Si(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Ri(t),this._fireClick=!0,1<t.touches.length)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],e=i.target;this._startPos=this._newPos=new k(i.clientX,i.clientY),e.tagName&&"a"===e.tagName.toLowerCase()&&ci(e,"leaflet-active"),this._holdTimeout=setTimeout(p(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),this._simulateEvent("mousedown",i),zi(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){var i,e;clearTimeout(this._holdTimeout),Si(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches&&((e=(i=t.changedTouches[0]).target)&&e.tagName&&"a"===e.tagName.toLowerCase()&&_i(e,"leaflet-active"),this._simulateEvent("mouseup",i),this._isTapValid()&&this._simulateEvent("click",i))},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var i=t.touches[0];this._newPos=new k(i.clientX,i.clientY),this._simulateEvent("mousemove",i)},_simulateEvent:function(t,i){var e=document.createEvent("MouseEvents");e._simulated=!0,i.target._simulatedClick=!0,e.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),i.target.dispatchEvent(e)}});!bt||Lt&&!ct||Ki.addInitHook("addHandler","tap",Pn),Ki.mergeOptions({touchZoom:bt&&!st,bounceAtZoomLimits:!0});var Ln=ie.extend({addHooks:function(){ci(this._map._container,"leaflet-touch-zoom"),zi(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){_i(this._map._container,"leaflet-touch-zoom"),Si(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i,e,n=this._map;!t.touches||2!==t.touches.length||n._animatingZoom||this._zooming||(i=n.mouseEventToContainerPoint(t.touches[0]),e=n.mouseEventToContainerPoint(t.touches[1]),this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),"center"!==n.options.touchZoom&&(this._pinchStartLatLng=n.containerPointToLatLng(i.add(e)._divideBy(2))),this._startDist=i.distanceTo(e),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),zi(document,"touchmove",this._onTouchMove,this),zi(document,"touchend",this._onTouchEnd,this),Ri(t))},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]),o=e.distanceTo(n)/this._startDist;if(this._zoom=i.getScaleZoom(o,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&o<1||this._zoom>i.getMaxZoom()&&1<o)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1==o)return}else{var s=e._add(n)._divideBy(2)._subtract(this._centerPoint);if(1==o&&0===s.x&&0===s.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var r=p(i._move,i,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=M(r,this,!0),Ri(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,z(this._animRequest),Si(document,"touchmove",this._onTouchMove,this),Si(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ki.addInitHook("addHandler","touchZoom",Ln),Ki.BoxZoom=gn,Ki.DoubleClickZoom=vn,Ki.Drag=yn,Ki.Keyboard=xn,Ki.ScrollWheelZoom=wn,Ki.Tap=Pn,Ki.TouchZoom=Ln,t.version="1.7.1",t.Control=Xi,t.control=Yi,t.Browser=Bt,t.Evented=E,t.Mixin=ne,t.Util=C,t.Class=S,t.Handler=ie,t.extend=h,t.bind=p,t.stamp=m,t.setOptions=c,t.DomEvent=qi,t.DomUtil=Mi,t.PosAnimation=Gi,t.Draggable=ae,t.LineUtil=fe,t.PolyUtil=ye,t.Point=k,t.point=A,t.Bounds=I,t.bounds=O,t.Transformation=q,t.transformation=G,t.Projection=Pe,t.LatLng=D,t.latLng=j,t.LatLngBounds=R,t.latLngBounds=N,t.CRS=H,t.GeoJSON=Ne,t.geoJSON=Ke,t.geoJson=Ye,t.Layer=Me,t.LayerGroup=ze,t.layerGroup=function(t,i){return new ze(t,i)},t.FeatureGroup=Ce,t.featureGroup=function(t,i){return new Ce(t,i)},t.ImageOverlay=Xe,t.imageOverlay=function(t,i,e){return new Xe(t,i,e)},t.VideoOverlay=Je,t.videoOverlay=function(t,i,e){return new Je(t,i,e)},t.SVGOverlay=$e,t.svgOverlay=function(t,i,e){return new $e(t,i,e)},t.DivOverlay=Qe,t.Popup=tn,t.popup=function(t,i){return new tn(t,i)},t.Tooltip=en,t.tooltip=function(t,i){return new en(t,i)},t.Icon=Se,t.icon=function(t){return new Se(t)},t.DivIcon=nn,t.divIcon=function(t){return new nn(t)},t.Marker=ke,t.marker=function(t,i){return new ke(t,i)},t.TileLayer=sn,t.tileLayer=rn,t.GridLayer=on,t.gridLayer=function(t){return new on(t)},t.SVG=pn,t.svg=mn,t.Renderer=hn,t.Canvas=un,t.canvas=ln,t.Path=Be,t.CircleMarker=Ae,t.circleMarker=function(t,i){return new Ae(t,i)},t.Circle=Ie,t.circle=function(t,i,e){return new Ie(t,i,e)},t.Polyline=Oe,t.polyline=function(t,i){return new Oe(t,i)},t.Polygon=Re,t.polygon=function(t,i){return new Re(t,i)},t.Rectangle=fn,t.rectangle=function(t,i){return new fn(t,i)},t.Map=Ki,t.map=function(t,i){return new Ki(t,i)};var bn=window.L;t.noConflict=function(){return window.L=bn,this},window.L=t});
6
- //# sourceMappingURL=leaflet.js.map
2
  * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com
3
  * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
4
  */
5
+ !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.L={})}(this,function(t){"use strict";function h(t){for(var i,e,n=1,o=arguments.length;n<o;n++)for(i in e=arguments[n])t[i]=e[i];return t}var s=Object.create||function(t){return i.prototype=t,new i};function i(){}function p(t,i){var e=Array.prototype.slice;if(t.bind)return t.bind.apply(t,e.call(arguments,1));var n=e.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(e.call(arguments)):arguments)}}var e=0;function m(t){return t._leaflet_id=t._leaflet_id||++e,t._leaflet_id}function n(t,i,e){var n,o,s=function(){n=!1,o&&(r.apply(e,o),o=!1)},r=function(){n?o=arguments:(t.apply(e,arguments),setTimeout(s,i),n=!0)};return r}function o(t,i,e){var n=i[1],o=i[0],s=n-o;return t===n&&e?t:((t-o)%s+s)%s+o}function a(){return!1}function r(t,i){var e=Math.pow(10,void 0===i?6:i);return Math.round(t*e)/e}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function l(t){return u(t).split(/\s+/)}function c(t,i){for(var e in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?s(t.options):{}),i)t.options[e]=i[e];return t.options}function _(t,i,e){var n=[];for(var o in t)n.push(encodeURIComponent(e?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")}var d=/\{ *([\w_-]+) *\}/g;function f(t,n){return t.replace(d,function(t,i){var e=n[i];if(void 0===e)throw new Error("No value provided for variable "+t);return"function"==typeof e&&(e=e(n)),e})}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,i){for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1}var y="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function x(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function P(t){var i=+new Date,e=Math.max(0,16-(i-w));return w=i+e,window.setTimeout(t,e)}var b=window.requestAnimationFrame||x("RequestAnimationFrame")||P,T=window.cancelAnimationFrame||x("CancelAnimationFrame")||x("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function M(t,i,e){if(!e||b!==P)return b.call(window,p(t,i));t.call(i)}function z(t){t&&T.call(window,t)}var C={extend:h,create:s,bind:p,lastId:e,stamp:m,throttle:n,wrapNum:o,falseFn:a,formatNum:r,trim:u,splitWords:l,setOptions:c,getParamString:_,template:f,isArray:g,indexOf:v,emptyImageUrl:y,requestFn:b,cancelFn:T,requestAnimFrame:M,cancelAnimFrame:z};function S(){}S.extend=function(t){function i(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var e=i.__super__=this.prototype,n=s(e);for(var o in(n.constructor=i).prototype=n,this)Object.prototype.hasOwnProperty.call(this,o)&&"prototype"!==o&&"__super__"!==o&&(i[o]=this[o]);return t.statics&&(h(i,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"==typeof L||!L||!L.Mixin)return;t=g(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}(t.includes),h.apply(null,[n].concat(t.includes)),delete t.includes),n.options&&(t.options=h(s(n.options),t.options)),h(n,t),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){e.callInitHooks&&e.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=n._initHooks.length;t<i;t++)n._initHooks[t].call(this)}},i},S.include=function(t){return h(this.prototype,t),this},S.mergeOptions=function(t){return h(this.prototype.options,t),this},S.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),e="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(e),this};var Z={on:function(t,i,e){if("object"==typeof t)for(var n in t)this._on(n,t[n],i);else for(var o=0,s=(t=l(t)).length;o<s;o++)this._on(t[o],i,e);return this},off:function(t,i,e){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],i);else for(var o=0,s=(t=l(t)).length;o<s;o++)this._off(t[o],i,e);else delete this._events;return this},_on:function(t,i,e){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),e===this&&(e=void 0);for(var o={fn:i,ctx:e},s=n,r=0,a=s.length;r<a;r++)if(s[r].fn===i&&s[r].ctx===e)return;s.push(o)},_off:function(t,i,e){var n,o,s;if(this._events&&(n=this._events[t]))if(i){if(e===this&&(e=void 0),n)for(o=0,s=n.length;o<s;o++){var r=n[o];if(r.ctx===e&&r.fn===i)return r.fn=a,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(o,1)}}else{for(o=0,s=n.length;o<s;o++)n[o].fn=a;delete this._events[t]}},fire:function(t,i,e){if(!this.listens(t,e))return this;var n=h({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,r=o.length;s<r;s++){var a=o[s];a.fn.call(a.ctx||this,n)}this._firingCount--}}return e&&this._propagateEvent(n),this},listens:function(t,i){var e=this._events&&this._events[t];if(e&&e.length)return!0;if(i)for(var n in this._eventParents)if(this._eventParents[n].listens(t,i))return!0;return!1},once:function(t,i,e){if("object"==typeof t){for(var n in t)this.once(n,t[n],i);return this}var o=p(function(){this.off(t,i,e).off(t,o,e)},this);return this.on(t,i,e).on(t,o,e)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[m(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[m(t)],this},_propagateEvent:function(t){for(var i in this._eventParents)this._eventParents[i].fire(t.type,h({layer:t.target,propagatedFrom:t.target},t),!0)}};Z.addEventListener=Z.on,Z.removeEventListener=Z.clearAllEventListeners=Z.off,Z.addOneTimeEventListener=Z.once,Z.fireEvent=Z.fire,Z.hasEventListeners=Z.listens;var E=S.extend(Z);function k(t,i,e){this.x=e?Math.round(t):t,this.y=e?Math.round(i):i}var B=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};function A(t,i,e){return t instanceof k?t:g(t)?new k(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new k(t.x,t.y):new k(t,i,e)}function I(t,i){if(t)for(var e=i?[t,i]:t,n=0,o=e.length;n<o;n++)this.extend(e[n])}function O(t,i){return!t||t instanceof I?t:new I(t,i)}function R(t,i){if(t)for(var e=i?[t,i]:t,n=0,o=e.length;n<o;n++)this.extend(e[n])}function N(t,i){return t instanceof R?t:new R(t,i)}function D(t,i,e){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==e&&(this.alt=+e)}function j(t,i,e){return t instanceof D?t:g(t)&&"object"!=typeof t[0]?3===t.length?new D(t[0],t[1],t[2]):2===t.length?new D(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new D(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new D(t,i,e)}k.prototype={clone:function(){return new k(this.x,this.y)},add:function(t){return this.clone()._add(A(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(A(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new k(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new k(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=B(this.x),this.y=B(this.y),this},distanceTo:function(t){var i=(t=A(t)).x-this.x,e=t.y-this.y;return Math.sqrt(i*i+e*e)},equals:function(t){return(t=A(t)).x===this.x&&t.y===this.y},contains:function(t){return t=A(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+r(this.x)+", "+r(this.y)+")"}},I.prototype={extend:function(t){return t=A(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new k((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new k(this.min.x,this.max.y)},getTopRight:function(){return new k(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var i,e;return(t=("number"==typeof t[0]||t instanceof k?A:O)(t))instanceof I?(i=t.min,e=t.max):i=e=t,i.x>=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=O(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>=i.x&&n.x<=e.x,r=o.y>=i.y&&n.y<=e.y;return s&&r},overlaps:function(t){t=O(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>i.x&&n.x<e.x,r=o.y>i.y&&n.y<e.y;return s&&r},isValid:function(){return!(!this.min||!this.max)}},R.prototype={extend:function(t){var i,e,n=this._southWest,o=this._northEast;if(t instanceof D)e=i=t;else{if(!(t instanceof R))return t?this.extend(j(t)||N(t)):this;if(i=t._southWest,e=t._northEast,!i||!e)return this}return n||o?(n.lat=Math.min(i.lat,n.lat),n.lng=Math.min(i.lng,n.lng),o.lat=Math.max(e.lat,o.lat),o.lng=Math.max(e.lng,o.lng)):(this._southWest=new D(i.lat,i.lng),this._northEast=new D(e.lat,e.lng)),this},pad:function(t){var i=this._southWest,e=this._northEast,n=Math.abs(i.lat-e.lat)*t,o=Math.abs(i.lng-e.lng)*t;return new R(new D(i.lat-n,i.lng-o),new D(e.lat+n,e.lng+o))},getCenter:function(){return new D((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new D(this.getNorth(),this.getWest())},getSouthEast:function(){return new D(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t=("number"==typeof t[0]||t instanceof D||"lat"in t?j:N)(t);var i,e,n=this._southWest,o=this._northEast;return t instanceof R?(i=t.getSouthWest(),e=t.getNorthEast()):i=e=t,i.lat>=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=N(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&n.lat<=e.lat,r=o.lng>=i.lng&&n.lng<=e.lng;return s&&r},overlaps:function(t){t=N(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&n.lat<e.lat,r=o.lng>i.lng&&n.lng<e.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=N(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}};var W,H={latLngToPoint:function(t,i){var e=this.projection.project(t),n=this.scale(i);return this.transformation._transform(e,n)},pointToLatLng:function(t,i){var e=this.scale(i),n=this.transformation.untransform(t,e);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var i=this.projection.bounds,e=this.scale(t);return new I(this.transformation.transform(i.min,e),this.transformation.transform(i.max,e))},infinite:!(D.prototype={equals:function(t,i){return!!t&&(t=j(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===i?1e-9:i))},toString:function(t){return"LatLng("+r(this.lat,t)+", "+r(this.lng,t)+")"},distanceTo:function(t){return F.distance(this,j(t))},wrap:function(){return F.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,e=i/Math.cos(Math.PI/180*this.lat);return N([this.lat-i,this.lng-e],[this.lat+i,this.lng+e])},clone:function(){return new D(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var i=this.wrapLng?o(t.lng,this.wrapLng,!0):t.lng;return new D(this.wrapLat?o(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),e=this.wrapLatLng(i),n=i.lat-e.lat,o=i.lng-e.lng;if(0==n&&0==o)return t;var s=t.getSouthWest(),r=t.getNorthEast();return new R(new D(s.lat-n,s.lng-o),new D(r.lat-n,r.lng-o))}},F=h({},H,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var e=Math.PI/180,n=t.lat*e,o=i.lat*e,s=Math.sin((i.lat-t.lat)*e/2),r=Math.sin((i.lng-t.lng)*e/2),a=s*s+Math.cos(n)*Math.cos(o)*r*r,h=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*h}}),U=6378137,V={R:U,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,e=this.MAX_LATITUDE,n=Math.max(Math.min(e,t.lat),-e),o=Math.sin(n*i);return new k(this.R*t.lng*i,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var i=180/Math.PI;return new D((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:new I([-(W=U*Math.PI),-W],[W,W])};function q(t,i,e,n){if(g(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=i,this._c=e,this._d=n}function G(t,i,e,n){return new q(t,i,e,n)}q.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){return i=i||1,t.x=i*(this._a*t.x+this._b),t.y=i*(this._c*t.y+this._d),t},untransform:function(t,i){return i=i||1,new k((t.x/i-this._b)/this._a,(t.y/i-this._d)/this._c)}};var K,Y=h({},F,{code:"EPSG:3857",projection:V,transformation:G(K=.5/(Math.PI*V.R),.5,-K,.5)}),X=h({},Y,{code:"EPSG:900913"});function J(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function $(t,i){for(var e,n,o,s,r="",a=0,h=t.length;a<h;a++){for(e=0,n=(o=t[a]).length;e<n;e++)r+=(e?"L":"M")+(s=o[e]).x+" "+s.y;r+=i?Zt?"z":"x":""}return r||"M0 0"}var Q=document.documentElement.style,tt="ActiveXObject"in window,it=tt&&!document.addEventListener,et="msLaunchUri"in navigator&&!("documentMode"in document),nt=kt("webkit"),ot=kt("android"),st=kt("android 2")||kt("android 3"),rt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=ot&&kt("Google")&&rt<537&&!("AudioNode"in window),ht=!!window.opera,ut=!et&&kt("chrome"),lt=kt("gecko")&&!nt&&!ht&&!tt,ct=!ut&&kt("safari"),_t=kt("phantom"),dt="OTransition"in Q,pt=0===navigator.platform.indexOf("Win"),mt=tt&&"transition"in Q,ft="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!st,gt="MozPerspective"in Q,vt=!window.L_DISABLE_3D&&(mt||ft||gt)&&!dt&&!_t,yt="undefined"!=typeof orientation||kt("mobile"),xt=yt&&nt,wt=yt&&ft,Pt=!window.PointerEvent&&window.MSPointerEvent,Lt=!(!window.PointerEvent&&!Pt),bt=!window.L_NO_TOUCH&&(Lt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Tt=yt&&ht,Mt=yt&&lt,zt=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),Ct=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",a,i),window.removeEventListener("testPassiveEventSupport",a,i)}catch(t){}return t}(),St=!!document.createElement("canvas").getContext,Zt=!(!document.createElementNS||!J("svg").createSVGRect),Et=!Zt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}();function kt(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var Bt={ie:tt,ielt9:it,edge:et,webkit:nt,android:ot,android23:st,androidStock:at,opera:ht,chrome:ut,gecko:lt,safari:ct,phantom:_t,opera12:dt,win:pt,ie3d:mt,webkit3d:ft,gecko3d:gt,any3d:vt,mobile:yt,mobileWebkit:xt,mobileWebkit3d:wt,msPointer:Pt,pointer:Lt,touch:bt,mobileOpera:Tt,mobileGecko:Mt,retina:zt,passiveEvents:Ct,canvas:St,svg:Zt,vml:Et},At=Pt?"MSPointerDown":"pointerdown",It=Pt?"MSPointerMove":"pointermove",Ot=Pt?"MSPointerUp":"pointerup",Rt=Pt?"MSPointerCancel":"pointercancel",Nt={},Dt=!1;function jt(t,i,e,n){function o(t){Ut(t,r)}var s,r,a,h,u,l,c,_;function d(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Ut(t,h)}return"touchstart"===i?(u=t,l=e,c=n,_=p(function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Ri(t),Ut(t,l)}),u["_leaflet_touchstart"+c]=_,u.addEventListener(At,_,!1),Dt||(document.addEventListener(At,Wt,!0),document.addEventListener(It,Ht,!0),document.addEventListener(Ot,Ft,!0),document.addEventListener(Rt,Ft,!0),Dt=!0)):"touchmove"===i?(h=e,(a=t)["_leaflet_touchmove"+n]=d,a.addEventListener(It,d,!1)):"touchend"===i&&(r=e,(s=t)["_leaflet_touchend"+n]=o,s.addEventListener(Ot,o,!1),s.addEventListener(Rt,o,!1)),this}function Wt(t){Nt[t.pointerId]=t}function Ht(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function Ft(t){delete Nt[t.pointerId]}function Ut(t,i){for(var e in t.touches=[],Nt)t.touches.push(Nt[e]);t.changedTouches=[t],i(t)}var Vt=Pt?"MSPointerDown":Lt?"pointerdown":"touchstart",qt=Pt?"MSPointerUp":Lt?"pointerup":"touchend",Gt="_leaflet_";var Kt,Yt,Xt,Jt,$t,Qt,ti=fi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ii=fi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ei="webkitTransition"===ii||"OTransition"===ii?ii+"End":"transitionend";function ni(t){return"string"==typeof t?document.getElementById(t):t}function oi(t,i){var e,n=t.style[i]||t.currentStyle&&t.currentStyle[i];return n&&"auto"!==n||!document.defaultView||(n=(e=document.defaultView.getComputedStyle(t,null))?e[i]:null),"auto"===n?null:n}function si(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function ri(t){var i=t.parentNode;i&&i.removeChild(t)}function ai(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function hi(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function ui(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function li(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=pi(t);return 0<e.length&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function ci(t,i){var e;if(void 0!==t.classList)for(var n=l(i),o=0,s=n.length;o<s;o++)t.classList.add(n[o]);else li(t,i)||di(t,((e=pi(t))?e+" ":"")+i)}function _i(t,i){void 0!==t.classList?t.classList.remove(i):di(t,u((" "+pi(t)+" ").replace(" "+i+" "," ")))}function di(t,i){void 0===t.className.baseVal?t.className=i:t.className.baseVal=i}function pi(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function mi(t,i){"opacity"in t.style?t.style.opacity=i:"filter"in t.style&&function(t,i){var e=!1,n="DXImageTransform.Microsoft.Alpha";try{e=t.filters.item(n)}catch(t){if(1===i)return}i=Math.round(100*i),e?(e.Enabled=100!==i,e.Opacity=i):t.style.filter+=" progid:"+n+"(opacity="+i+")"}(t,i)}function fi(t){for(var i=document.documentElement.style,e=0;e<t.length;e++)if(t[e]in i)return t[e];return!1}function gi(t,i,e){var n=i||new k(0,0);t.style[ti]=(mt?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")}function vi(t,i){t._leaflet_pos=i,vt?gi(t,i):(t.style.left=i.x+"px",t.style.top=i.y+"px")}function yi(t){return t._leaflet_pos||new k(0,0)}function xi(){zi(window,"dragstart",Ri)}function wi(){Si(window,"dragstart",Ri)}function Pi(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Li(),Qt=($t=t).style.outline,t.style.outline="none",zi(window,"keydown",Li))}function Li(){$t&&($t.style.outline=Qt,Qt=$t=void 0,Si(window,"keydown",Li))}function bi(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function Ti(t){var i=t.getBoundingClientRect();return{x:i.width/t.offsetWidth||1,y:i.height/t.offsetHeight||1,boundingClientRect:i}}Jt="onselectstart"in document?(Xt=function(){zi(window,"selectstart",Ri)},function(){Si(window,"selectstart",Ri)}):(Yt=fi(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),Xt=function(){var t;Yt&&(t=document.documentElement.style,Kt=t[Yt],t[Yt]="none")},function(){Yt&&(document.documentElement.style[Yt]=Kt,Kt=void 0)});var Mi={TRANSFORM:ti,TRANSITION:ii,TRANSITION_END:ei,get:ni,getStyle:oi,create:si,remove:ri,empty:ai,toFront:hi,toBack:ui,hasClass:li,addClass:ci,removeClass:_i,setClass:di,getClass:pi,setOpacity:mi,testProp:fi,setTransform:gi,setPosition:vi,getPosition:yi,disableTextSelection:Xt,enableTextSelection:Jt,disableImageDrag:xi,enableImageDrag:wi,preventOutline:Pi,restoreOutline:Li,getSizedParentNode:bi,getScale:Ti};function zi(t,i,e,n){if("object"==typeof i)for(var o in i)ki(t,o,i[o],e);else for(var s=0,r=(i=l(i)).length;s<r;s++)ki(t,i[s],e,n);return this}var Ci="_leaflet_events";function Si(t,i,e,n){if("object"==typeof i)for(var o in i)Bi(t,o,i[o],e);else if(i)for(var s=0,r=(i=l(i)).length;s<r;s++)Bi(t,i[s],e,n);else{for(var a in t[Ci])Bi(t,a,t[Ci][a]);delete t[Ci]}return this}function Zi(){return Lt&&(!et&&!ct)}var Ei={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function ki(i,t,e,n){var o=t+m(e)+(n?"_"+m(n):"");if(i[Ci]&&i[Ci][o])return this;var s,r,a,h,u,l,c=function(t){return e.call(n||i,t||window.event)},_=c;function d(t){if(Lt){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(1<t.touches.length)return;var i=Date.now(),e=i-(h||i);u=t.touches?t.touches[0]:t,l=0<e&&e<=250,h=i}function p(t){if(l&&!u.cancelBubble){if(Lt){if("mouse"===t.pointerType)return;var i,e,n={};for(e in u)i=u[e],n[e]=i&&i.bind?i.bind(u):i;u=n}u.type="dblclick",u.button=0,r(u),h=null}}Lt&&0===t.indexOf("touch")?jt(i,t,c,o):bt&&"dblclick"===t&&!Zi()?(r=c,l=!1,(s=i)[Gt+Vt+(a=o)]=d,s[Gt+qt+a]=p,s[Gt+"dblclick"+a]=r,s.addEventListener(Vt,d,!!Ct&&{passive:!1}),s.addEventListener(qt,p,!!Ct&&{passive:!1}),s.addEventListener("dblclick",r,!1)):"addEventListener"in i?"touchstart"===t||"touchmove"===t||"wheel"===t||"mousewheel"===t?i.addEventListener(Ei[t]||t,c,!!Ct&&{passive:!1}):"mouseenter"===t||"mouseleave"===t?(c=function(t){t=t||window.event,Vi(i,t)&&_(t)},i.addEventListener(Ei[t],c,!1)):i.addEventListener(t,_,!1):"attachEvent"in i&&i.attachEvent("on"+t,c),i[Ci]=i[Ci]||{},i[Ci][o]=c}function Bi(t,i,e,n){var o,s,r,a,h,u,l,c,_=i+m(e)+(n?"_"+m(n):""),d=t[Ci]&&t[Ci][_];if(!d)return this;Lt&&0===i.indexOf("touch")?(c=(u=t)["_leaflet_"+(l=i)+_],"touchstart"===l?u.removeEventListener(At,c,!1):"touchmove"===l?u.removeEventListener(It,c,!1):"touchend"===l&&(u.removeEventListener(Ot,c,!1),u.removeEventListener(Rt,c,!1))):bt&&"dblclick"===i&&!Zi()?(r=(o=t)[Gt+Vt+(s=_)],a=o[Gt+qt+s],h=o[Gt+"dblclick"+s],o.removeEventListener(Vt,r,!!Ct&&{passive:!1}),o.removeEventListener(qt,a,!!Ct&&{passive:!1}),o.removeEventListener("dblclick",h,!1)):"removeEventListener"in t?t.removeEventListener(Ei[i]||i,d,!1):"detachEvent"in t&&t.detachEvent("on"+i,d),t[Ci][_]=null}function Ai(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Ui(t),this}function Ii(t){return ki(t,"wheel",Ai),this}function Oi(t){return zi(t,"mousedown touchstart dblclick",Ai),ki(t,"click",Fi),this}function Ri(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ni(t){return Ri(t),Ai(t),this}function Di(t,i){if(!i)return new k(t.clientX,t.clientY);var e=Ti(i),n=e.boundingClientRect;return new k((t.clientX-n.left)/e.x-i.clientLeft,(t.clientY-n.top)/e.y-i.clientTop)}var ji=pt&&ut?2*window.devicePixelRatio:lt?window.devicePixelRatio:1;function Wi(t){return et?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/ji:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var Hi={};function Fi(t){Hi[t.type]=!0}function Ui(t){var i=Hi[t.type];return Hi[t.type]=!1,i}function Vi(t,i){var e=i.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(t){return!1}return e!==t}var qi={on:zi,off:Si,stopPropagation:Ai,disableScrollPropagation:Ii,disableClickPropagation:Oi,preventDefault:Ri,stop:Ni,getMousePosition:Di,getWheelDelta:Wi,fakeStop:Fi,skipped:Ui,isExternalTarget:Vi,addListener:zi,removeListener:Si},Gi=E.extend({run:function(t,i,e,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=yi(t),this._offset=i.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=M(this._animate,this),this._step()},_step:function(t){var i=new Date-this._startTime,e=1e3*this._duration;i<e?this._runFrame(this._easeOut(i/e),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){var e=this._startPos.add(this._offset.multiplyBy(t));i&&e._round(),vi(this._el,e),this.fire("step")},_complete:function(){z(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ki=E.extend({options:{crs:Y,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,i){i=c(this,i),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=p(this._onResize,this),this._initEvents(),i.maxBounds&&this.setMaxBounds(i.maxBounds),void 0!==i.zoom&&(this._zoom=this._limitZoom(i.zoom)),i.center&&void 0!==i.zoom&&this.setView(j(i.center),i.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ii&&vt&&!Tt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),zi(this._proxy,ei,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,i,e){if((i=void 0===i?this._zoom:this._limitZoom(i),t=this._limitCenter(j(t),i,this.options.maxBounds),e=e||{},this._stop(),this._loaded&&!e.reset&&!0!==e)&&(void 0!==e.animate&&(e.zoom=h({animate:e.animate},e.zoom),e.pan=h({animate:e.animate,duration:e.duration},e.pan)),this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,e.zoom):this._tryAnimatedPan(t,e.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(t,i),this},setZoom:function(t,i){return this._loaded?this.setView(this.getCenter(),t,{zoom:i}):(this._zoom=t,this)},zoomIn:function(t,i){return t=t||(vt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,i)},zoomOut:function(t,i){return t=t||(vt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,i)},setZoomAround:function(t,i,e){var n=this.getZoomScale(i),o=this.getSize().divideBy(2),s=(t instanceof k?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),r=this.containerPointToLatLng(o.add(s));return this.setView(r,i,{zoom:e})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():N(t);var e=A(i.paddingTopLeft||i.padding||[0,0]),n=A(i.paddingBottomRight||i.padding||[0,0]),o=this.getBoundsZoom(t,!1,e.add(n));if((o="number"==typeof i.maxZoom?Math.min(i.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var s=n.subtract(e).divideBy(2),r=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(r.add(a).divideBy(2).add(s),o),zoom:o}},fitBounds:function(t,i){if(!(t=N(t)).isValid())throw new Error("Bounds are not valid.");var e=this._getBoundsCenterZoom(t,i);return this.setView(e.center,e.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){return i=i||{},(t=A(t).round()).x||t.y?(!0===i.animate||this.getSize().contains(t)?(this._panAnim||(this._panAnim=new Gi,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate?(ci(this._mapPane,"leaflet-pan-anim"),e=this._getMapPanePos().subtract(t).round(),this._panAnim.run(this._mapPane,e,i.duration||.25,i.easeLinearity)):(this._rawPanBy(t),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this):this.fire("moveend");var e},flyTo:function(s,r,t){if(!1===(t=t||{}).animate||!vt)return this.setView(s,r,t);this._stop();var a=this.project(this.getCenter()),h=this.project(s),i=this.getSize(),u=this._zoom;s=j(s),r=void 0===r?u:r;var l=Math.max(i.x,i.y),n=l*this.getZoomScale(u,r),c=h.distanceTo(a)||1,_=1.42,o=_*_;function e(t){var i=(n*n-l*l+(t?-1:1)*o*o*c*c)/(2*(t?n:l)*o*c),e=Math.sqrt(i*i+1)-i;return e<1e-9?-18:Math.log(e)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var m=e(0);function f(t){return l*(p(m)*(d(i=m+_*t)/p(i))-d(m))/o;var i}var g=Date.now(),v=(e(1)-m)/_,y=t.duration?1e3*t.duration:1e3*v*.8;return this._moveStart(!0,t.noMoveStart),function t(){var i,e,n=(Date.now()-g)/y,o=(i=n,(1-Math.pow(1-i,1.5))*v);n<=1?(this._flyToFrame=M(t,this),this._move(this.unproject(a.add(h.subtract(a).multiplyBy(f(o)/c)),u),this.getScaleZoom(l/(e=o,l*(p(m)/p(m+_*e))),u),{flyTo:!0})):this._move(s,r)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,i){var e=this._getBoundsCenterZoom(t,i);return this.flyTo(e.center,e.zoom,i)},setMaxBounds:function(t){return(t=N(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var i=this.options.minZoom;return this.options.minZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var i=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,N(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e,n,o=A((i=i||{}).paddingTopLeft||i.padding||[0,0]),s=A(i.paddingBottomRight||i.padding||[0,0]),r=this.getCenter(),a=this.project(r),h=this.project(t),u=this.getPixelBounds(),l=u.getSize().divideBy(2),c=O([u.min.add(o),u.max.subtract(s)]);return c.contains(h)||(this._enforcingBounds=!0,e=a.subtract(h),n=A(h.x+e.x,h.y+e.y),(h.x<c.min.x||h.x>c.max.x)&&(n.x=a.x-e.x,0<e.x?n.x+=l.x-o.x:n.x-=l.x-s.x),(h.y<c.min.y||h.y>c.max.y)&&(n.y=a.y-e.y,0<e.y?n.y+=l.y-o.y:n.y-=l.y-s.y),this.panTo(this.unproject(n),i),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=h({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var e=this.getSize(),n=i.divideBy(2).round(),o=e.divideBy(2).round(),s=n.subtract(o);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(p(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:e})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=h({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=p(this._handleGeolocationResponse,this),e=p(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,e,t):navigator.geolocation.getCurrentPosition(i,e,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var i=t.code,e=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+e+"."})},_handleGeolocationResponse:function(t){var i,e=new D(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),o=this._locateOptions;o.setView&&(i=this.getBoundsZoom(n),this.setView(e,o.maxZoom?Math.min(i,o.maxZoom):i));var s={latlng:e,bounds:n,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)},addHandler:function(t,i){if(!i)return this;var e=this[t]=new i(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ri(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ri(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var e=si("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new R(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,e){t=N(t),e=A(e||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(e),u=O(this.project(a,n),this.project(r,n)).getSize(),l=vt?this.options.zoomSnap:1,c=h.x/u.x,_=h.y/u.y,d=i?Math.max(c,_):Math.min(c,_),n=this.getScaleZoom(d,n);return l&&(n=Math.round(n/(l/100))*(l/100),n=i?Math.ceil(n/l)*l:Math.floor(n/l)*l),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new k(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var e=this._getTopLeftPoint(t,i);return new I(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs;i=void 0===i?this._zoom:i;var n=e.zoom(t*e.scale(i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(j(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(A(t),i)},layerPointToLatLng:function(t){var i=A(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(j(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(j(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(N(t))},distance:function(t,i){return this.options.crs.distance(j(t),j(i))},containerPointToLayerPoint:function(t){return A(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return A(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(A(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(j(t)))},mouseEventToContainerPoint:function(t){return Di(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var i=this._container=ni(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");zi(i,"scroll",this._onScroll,this),this._containerId=m(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&vt,ci(t,"leaflet-container"+(bt?" leaflet-touch":"")+(zt?" leaflet-retina":"")+(it?" leaflet-oldie":"")+(ct?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=oi(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),vi(this._mapPane,new k(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ci(t.markerPane,"leaflet-zoom-hide"),ci(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i){vi(this._mapPane,new k(0,0));var e=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var n=this._zoom!==i;this._moveStart(n,!1)._move(t,i)._moveEnd(n),this.fire("viewreset"),e&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,e){void 0===i&&(i=this._zoom);var n=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){vi(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var i=t?Si:zi;i((this._targets[m(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),vt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=M(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,n=[],o="mouseout"===i||"mouseover"===i,s=t.target||t.srcElement,r=!1;s;){if((e=this._targets[m(s)])&&("click"===i||"preclick"===i)&&!t._simulated&&this._draggableMoved(e)){r=!0;break}if(e&&e.listens(i,!0)){if(o&&!Vi(s,t))break;if(n.push(e),o)break}if(s===this._container)break;s=s.parentNode}return n.length||r||o||!Vi(s,t)||(n=[this]),n},_handleDOMEvent:function(t){var i;this._loaded&&!Ui(t)&&("mousedown"!==(i=t.type)&&"keypress"!==i&&"keyup"!==i&&"keydown"!==i||Pi(t.target||t.srcElement),this._fireDOMEvent(t,i))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,e){var n;if("click"===t.type&&((n=h({},t)).type="preclick",this._fireDOMEvent(n,n.type,e)),!t._stopped&&(e=(e||[]).concat(this._findEventTargets(t,i))).length){var o=e[0];"contextmenu"===i&&o.listens(i,!0)&&Ri(t);var s,r={originalEvent:t};"keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(s=o.getLatLng&&(!o._radius||o._radius<=10),r.containerPoint=s?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=s?o.getLatLng():this.layerPointToLatLng(r.layerPoint));for(var a=0;a<e.length;a++)if(e[a].fire(i,r,!0),r.originalEvent._stopped||!1===e[a].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,i))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,i=this._handlers.length;t<i;t++)this._handlers[t].disable()},whenReady:function(t,i){return this._loaded?t.call(i||this,{target:this}):this.on("load",t,i),this},_getMapPanePos:function(){return yi(this._mapPane)||new k(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,i){return(t&&void 0!==i?this._getNewPixelOrigin(t,i):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,i){var e=this.getSize()._divideBy(2);return this.project(t,i)._subtract(e)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return this.project(t,i)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return O([this.project(t.getSouthWest(),i)._subtract(n),this.project(t.getNorthWest(),i)._subtract(n),this.project(t.getSouthEast(),i)._subtract(n),this.project(t.getNorthEast(),i)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,e){if(!e)return t;var n=this.project(t,i),o=this.getSize().divideBy(2),s=new I(n.subtract(o),n.add(o)),r=this._getBoundsOffset(s,e,i);return r.round().equals([0,0])?t:this.unproject(n.add(r),i)},_limitOffset:function(t,i){if(!i)return t;var e=this.getPixelBounds(),n=new I(e.min.add(t),e.max.add(t));return t.add(this._getBoundsOffset(n,i))},_getBoundsOffset:function(t,i,e){var n=O(this.project(i.getNorthEast(),e),this.project(i.getSouthWest(),e)),o=n.min.subtract(t.min),s=n.max.subtract(t.max);return new k(this._rebound(o.x,-s.x),this._rebound(o.y,-s.y))},_rebound:function(t,i){return 0<t+i?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),n=vt?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){_i(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var e=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(e))&&(this.panBy(e,i),!0)},_createAnimProxy:function(){var t=this._proxy=si("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var i=ti,e=this._proxy.style[i];gi(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ri(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),i=this.getZoom();gi(this._proxy,this.project(t,i),this.getZoomScale(i,1))},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(o))&&(M(function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)},this),!0)},_animateZoom:function(t,i,e,n){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,ci(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:n}),setTimeout(p(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_i(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),M(function(){this._moveEnd(!0)},this))}});function Yi(t){return new Xi(t)}var Xi=S.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return ci(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ri(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}});Ki.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var n=this._controlCorners={},o="leaflet-",s=this._controlContainer=si("div",o+"control-container",this._container);function t(t,i){var e=o+t+" "+o+i;n[t+i]=si("div",e,s)}t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ri(this._controlCorners[t]);ri(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ji=Xi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,n){return e<n?-1:n<e?1:0}},initialize:function(t,i,e){for(var n in c(this,e),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in i)this._addLayer(i[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Xi.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,i){return this._addLayer(t,i),this._map?this._update():this},addOverlay:function(t,i){return this._addLayer(t,i,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var i=this._getLayer(m(t));return i&&this._layers.splice(this._layers.indexOf(i),1),this._map?this._update():this},expand:function(){ci(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(ci(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):_i(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return _i(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",i=this._container=si("div",t),e=this.options.collapsed;i.setAttribute("aria-haspopup",!0),Oi(i),Ii(i);var n=this._section=si("section",t+"-list");e&&(this._map.on("click",this.collapse,this),ot||zi(i,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=si("a",t+"-toggle",i);o.href="#",o.title="Layers",bt?(zi(o,"click",Ni),zi(o,"click",this.expand,this)):zi(o,"focus",this.expand,this),e||this.expand(),this._baseLayersList=si("div",t+"-base",n),this._separator=si("div",t+"-separator",n),this._overlaysList=si("div",t+"-overlays",n),i.appendChild(n)},_getLayer:function(t){for(var i=0;i<this._layers.length;i++)if(this._layers[i]&&m(this._layers[i].layer)===t)return this._layers[i]},_addLayer:function(t,i,e){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:e}),this.options.sortLayers&&this._layers.sort(p(function(t,i){return this.options.sortFunction(t.layer,i.layer,t.name,i.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ai(this._baseLayersList),ai(this._overlaysList),this._layerControlInputs=[];for(var t,i,e,n=0,o=0;o<this._layers.length;o++)e=this._layers[o],this._addItem(e),i=i||e.overlay,t=t||!e.overlay,n+=e.overlay?0:1;return this.options.hideSingleBase&&(t=t&&1<n,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(m(t.target)),e=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;e&&this._map.fire(e,i)},_createRadioElement:function(t,i){var e='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+m(this),n),this._layerControlInputs.push(i),i.layerId=m(t.layer),zi(i,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");return e.appendChild(s),s.appendChild(i),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;0<=s;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])||this._map.addLayer(n[s]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,i,e=this._layerControlInputs,n=this._map.getZoom(),o=e.length-1;0<=o;o--)t=e[o],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&n<i.options.minZoom||void 0!==i.options.maxZoom&&n>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),$i=Xi.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=si("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,o){var s=si("a",e,n);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),Oi(s),zi(s,"click",Ni),zi(s,"click",o,this),zi(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";_i(this._zoomInButton,i),_i(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMinZoom()||ci(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMaxZoom()||ci(this._zoomInButton,i)}});Ki.mergeOptions({zoomControl:!0}),Ki.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new $i,this.addControl(this.zoomControl))});var Qi=Xi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=si("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=si("div",i,e)),t.imperial&&(this._iScale=si("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),e=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,e,i/t)},_updateImperial:function(t){var i,e,n,o=3.2808399*t;5280<o?(i=o/5280,e=this._getRoundNum(i),this._updateScale(this._iScale,e+" mi",e/i)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),e=t/i;return i*(e=10<=e?10:5<=e?5:3<=e?3:2<=e?2:1)}}),te=Xi.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var i in(t.attributionControl=this)._container=si("div","leaflet-control-attribution"),Oi(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(" | ")}}});Ki.mergeOptions({attributionControl:!0}),Ki.addInitHook(function(){this.options.attributionControl&&(new te).addTo(this)});Xi.Layers=Ji,Xi.Zoom=$i,Xi.Scale=Qi,Xi.Attribution=te,Yi.layers=function(t,i,e){return new Ji(t,i,e)},Yi.zoom=function(t){return new $i(t)},Yi.scale=function(t){return new Qi(t)},Yi.attribution=function(t){return new te(t)};var ie=S.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});ie.addTo=function(t,i){return t.addHandler(i,this),this};var ee,ne={Events:Z},oe=bt?"touchstart mousedown":"mousedown",se={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},re={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ae=E.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){c(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(zi(this._dragStartTarget,oe,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ae._dragging===this&&this.finishDrag(),Si(this._dragStartTarget,oe,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var i,e;!t._simulated&&this._enabled&&(this._moved=!1,li(this._element,"leaflet-zoom-anim")||ae._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((ae._dragging=this)._preventOutline&&Pi(this._element),xi(),Xt(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=bi(this._element),this._startPoint=new k(i.clientX,i.clientY),this._parentScale=Ti(e),zi(document,re[t.type],this._onMove,this),zi(document,se[t.type],this._onUp,this))))},_onMove:function(t){var i,e;!t._simulated&&this._enabled&&(t.touches&&1<t.touches.length?this._moved=!0:((e=new k((i=t.touches&&1===t.touches.length?t.touches[0]:t).clientX,i.clientY)._subtract(this._startPoint)).x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,Ri(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=yi(this._element).subtract(e),ci(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ci(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,z(this._animRequest),this._lastEvent=t,this._animRequest=M(this._updatePosition,this,!0))))},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),vi(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in _i(document.body,"leaflet-dragging"),this._lastTarget&&(_i(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),re)Si(document,re[t],this._onMove,this),Si(document,se[t],this._onUp,this);wi(),Jt(),this._moved&&this._moving&&(z(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,ae._dragging=!1}});function he(t,i){if(!i||!t.length)return t.slice();var e=i*i;return t=function(t,i){var e=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(e);n[0]=n[e-1]=1,function t(i,e,n,o,s){var r,a,h,u=0;for(a=o+1;a<=s-1;a++)h=de(i[a],i[o],i[s],!0),u<h&&(r=a,u=h);n<u&&(e[r]=1,t(i,e,n,o,r),t(i,e,n,r,s))}(t,n,i,0,e-1);var o,s=[];for(o=0;o<e;o++)n[o]&&s.push(t[o]);return s}(t=function(t,i){for(var e=[t[0]],n=1,o=0,s=t.length;n<s;n++)(function(t,i){var e=i.x-t.x,n=i.y-t.y;return e*e+n*n})(t[n],t[o])>i&&(e.push(t[n]),o=n);o<s-1&&e.push(t[s-1]);return e}(t,e),e)}function ue(t,i,e){return Math.sqrt(de(t,i,e,!0))}function le(t,i,e,n,o){var s,r,a,h=n?ee:_e(t,e),u=_e(i,e);for(ee=u;;){if(!(h|u))return[t,i];if(h&u)return!1;a=_e(r=ce(t,i,s=h||u,e,o),e),s===h?(t=r,h=a):(i=r,u=a)}}function ce(t,i,e,n,o){var s,r,a=i.x-t.x,h=i.y-t.y,u=n.min,l=n.max;return 8&e?(s=t.x+a*(l.y-t.y)/h,r=l.y):4&e?(s=t.x+a*(u.y-t.y)/h,r=u.y):2&e?(s=l.x,r=t.y+h*(l.x-t.x)/a):1&e&&(s=u.x,r=t.y+h*(u.x-t.x)/a),new k(s,r,o)}function _e(t,i){var e=0;return t.x<i.min.x?e|=1:t.x>i.max.x&&(e|=2),t.y<i.min.y?e|=4:t.y>i.max.y&&(e|=8),e}function de(t,i,e,n){var o,s=i.x,r=i.y,a=e.x-s,h=e.y-r,u=a*a+h*h;return 0<u&&(1<(o=((t.x-s)*a+(t.y-r)*h)/u)?(s=e.x,r=e.y):0<o&&(s+=a*o,r+=h*o)),a=t.x-s,h=t.y-r,n?a*a+h*h:new k(s,r)}function pe(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function me(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),pe(t)}var fe={simplify:he,pointToSegmentDistance:ue,closestPointOnSegment:function(t,i,e){return de(t,i,e)},clipSegment:le,_getEdgeIntersection:ce,_getBitCode:_e,_sqClosestPointOnSegment:de,isFlat:pe,_flat:me};function ge(t,i,e){for(var n,o,s,r,a,h,u,l=[1,4,2,8],c=0,_=t.length;c<_;c++)t[c]._code=_e(t[c],i);for(s=0;s<4;s++){for(h=l[s],n=[],c=0,o=(_=t.length)-1;c<_;o=c++)r=t[c],a=t[o],r._code&h?a._code&h||((u=ce(a,r,h,i,e))._code=_e(u,i),n.push(u)):(a._code&h&&((u=ce(a,r,h,i,e))._code=_e(u,i),n.push(u)),n.push(r));t=n}return t}var ve,ye={clipPolygon:ge},xe={project:function(t){return new k(t.lng,t.lat)},unproject:function(t){return new D(t.y,t.x)},bounds:new I([-180,-90],[180,90])},we={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,e=this.R,n=t.lat*i,o=this.R_MINOR/e,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2),n=-e*Math.log(Math.max(a,1e-10));return new k(t.lng*i*e,n)},unproject:function(t){for(var i,e=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),h=0,u=.1;h<15&&1e-7<Math.abs(u);h++)i=s*Math.sin(a),i=Math.pow((1-i)/(1+i),s/2),a+=u=Math.PI/2-2*Math.atan(r*i)-a;return new D(a*e,t.x*e/n)}},Pe={LonLat:xe,Mercator:we,SphericalMercator:V},Le=h({},F,{code:"EPSG:3395",projection:we,transformation:G(ve=.5/(Math.PI*we.R),.5,-ve,.5)}),be=h({},F,{code:"EPSG:4326",projection:xe,transformation:G(1/180,1,-1/180,.5)}),Te=h({},H,{projection:xe,transformation:G(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(e*e+n*n)},infinite:!0});H.Earth=F,H.EPSG3395=Le,H.EPSG3857=Y,H.EPSG900913=X,H.EPSG4326=be,H.Simple=Te;var Me=E.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[m(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[m(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i,e=t.target;e.hasLayer(this)&&(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents&&(i=this.getEvents(),e.on(i,this),this.once("remove",function(){e.off(i,this)},this)),this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this}))}});Ki.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=m(t);return this._layers[i]||((this._layers[i]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var i=m(t);return this._layers[i]&&(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return!!t&&m(t)in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){for(var i=0,e=(t=t?g(t)?t:[t]:[]).length;i<e;i++)this.addLayer(t[i])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[m(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var i=m(t);this._zoomBoundLayers[i]&&(delete this._zoomBoundLayers[i],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,i=-1/0,e=this._getZoomSpan();for(var n in this._zoomBoundLayers)var o=this._zoomBoundLayers[n].options,t=void 0===o.minZoom?t:Math.min(t,o.minZoom),i=void 0===o.maxZoom?i:Math.max(i,o.maxZoom);this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=t===1/0?void 0:t,e!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ze=Me.extend({initialize:function(t,i){var e,n;if(c(this,i),this._layers={},t)for(e=0,n=t.length;e<n;e++)this.addLayer(t[e])},addLayer:function(t){var i=this.getLayerId(t);return this._layers[i]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var i=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[i]&&this._map.removeLayer(this._layers[i]),delete this._layers[i],this},hasLayer:function(t){return!!t&&("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var i,e,n=Array.prototype.slice.call(arguments,1);for(i in this._layers)(e=this._layers[i])[t]&&e[t].apply(e,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:m}),Ce=ze.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ze.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),ze.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new R;for(var i in this._layers){var e=this._layers[i];t.extend(e.getBounds?e.getBounds():e.getLatLng())}return t}}),Se=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){c(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,i){var e=this._getIconUrl(t);if(!e){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(e,i&&"IMG"===i.tagName?i:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,i){var e=this.options,n=e[i+"Size"];"number"==typeof n&&(n=[n,n]);var o=A(n),s=A("shadow"===i&&e.shadowAnchor||e.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+i+" "+(e.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,i){return(i=i||document.createElement("img")).src=t,i},_getIconUrl:function(t){return zt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});var Ze=Se.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Ze.imagePath||(Ze.imagePath=this._detectIconPath()),(this.options.imagePath||Ze.imagePath)+Se.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=si("div","leaflet-default-icon-path",document.body),i=oi(t,"background-image")||oi(t,"backgroundImage");return document.body.removeChild(t),i=null===i||0!==i.indexOf("url")?"":i.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Ee=ie.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ae(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ci(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&_i(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var i,e=this._marker,n=e._map,o=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,r=yi(e._icon),a=n.getPixelBounds(),h=n.getPixelOrigin(),u=O(a.min._subtract(h).add(s),a.max._subtract(h).subtract(s));u.contains(r)||(i=A((Math.max(u.max.x,r.x)-u.max.x)/(a.max.x-u.max.x)-(Math.min(u.min.x,r.x)-u.min.x)/(a.min.x-u.min.x),(Math.max(u.max.y,r.y)-u.max.y)/(a.max.y-u.max.y)-(Math.min(u.min.y,r.y)-u.min.y)/(a.min.y-u.min.y)).multiplyBy(o),n.panBy(i,{animate:!1}),this._draggable._newPos._add(i),this._draggable._startPos._add(i),vi(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=M(this._adjustPan.bind(this,t)))},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(z(this._panRequest),this._panRequest=M(this._adjustPan.bind(this,t)))},_onDrag:function(t){var i=this._marker,e=i._shadow,n=yi(i._icon),o=i._map.layerPointToLatLng(n);e&&vi(e,n),i._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,i.fire("move",t).fire("drag",t)},_onDragEnd:function(t){z(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),ke=Me.extend({options:{icon:new Ze,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,i){c(this,i),this._latlng=j(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var i=this._latlng;return this._latlng=j(t),this.update(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){var t;return this._icon&&this._map&&(t=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(t)),this},_initIcon:function(){var t=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),e=t.icon.createIcon(this._icon),n=!1;e!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(e.title=t.title),"IMG"===e.tagName&&(e.alt=t.alt||"")),ci(e,i),t.keyboard&&(e.tabIndex="0"),this._icon=e,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),s=!1;o!==this._shadow&&(this._removeShadow(),s=!0),o&&(ci(o,i),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&s&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ri(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ri(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&vi(this._icon,t),this._shadow&&vi(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(i)},_initInteraction:function(){var t;this.options.interactive&&(ci(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ee&&(t=this.options.draggable,this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ee(this),t&&this.dragging.enable()))},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&mi(this._icon,t),this._shadow&&mi(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});var Be=Me.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return c(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),Ae=Be.extend({options:{fill:!0,radius:10},initialize:function(t,i){c(this,i),this._latlng=j(t),this._radius=this.options.radius},setLatLng:function(t){var i=this._latlng;return this._latlng=j(t),this.redraw(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var i=t&&t.radius||this._radius;return Be.prototype.setStyle.call(this,t),this.setRadius(i),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,i=this._radiusY||t,e=this._clickTolerance(),n=[t+e,i+e];this._pxBounds=new I(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});var Ie=Ae.extend({initialize:function(t,i,e){if("number"==typeof i&&(i=h({},e,{radius:i})),c(this,i),this._latlng=j(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new R(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Be.prototype.setStyle,_project:function(){var t,i,e,n,o,s,r,a,h=this._latlng.lng,u=this._latlng.lat,l=this._map,c=l.options.crs;c.distance===F.distance?(t=Math.PI/180,i=this._mRadius/F.R/t,e=l.project([u+i,h]),n=l.project([u-i,h]),o=e.add(n).divideBy(2),s=l.unproject(o).lat,r=Math.acos((Math.cos(i*t)-Math.sin(u*t)*Math.sin(s*t))/(Math.cos(u*t)*Math.cos(s*t)))/t,!isNaN(r)&&0!==r||(r=i/Math.cos(Math.PI/180*u)),this._point=o.subtract(l.getPixelOrigin()),this._radius=isNaN(r)?0:o.x-l.project([s,h-r]).x,this._radiusY=o.y-e.y):(a=c.unproject(c.project(this._latlng).subtract([this._mRadius,0])),this._point=l.latLngToLayerPoint(this._latlng),this._radius=this._point.x-l.latLngToLayerPoint(a).x),this._updateBounds()}});var Oe=Be.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,i){c(this,i),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var i,e,n=1/0,o=null,s=de,r=0,a=this._parts.length;r<a;r++)for(var h=this._parts[r],u=1,l=h.length;u<l;u++){var c=s(t,i=h[u-1],e=h[u],!0);c<n&&(n=c,o=s(t,i,e))}return o&&(o.distance=Math.sqrt(n)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,o,s,r,a=this._rings[0],h=a.length;if(!h)return null;for(i=t=0;t<h-1;t++)i+=a[t].distanceTo(a[t+1])/2;if(0===i)return this._map.layerPointToLatLng(a[0]);for(n=t=0;t<h-1;t++)if(o=a[t],s=a[t+1],i<(n+=e=o.distanceTo(s)))return r=(n-i)/e,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=j(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new R,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return pe(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],e=pe(t),n=0,o=t.length;n<o;n++)e?(i[n]=j(t[n]),this._bounds.extend(i[n])):i[n]=this._convertLatLngs(t[n]);return i},_project:function(){var t=new I;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),i=new k(t,t);this._pxBounds=new I([this._rawPxBounds.min.subtract(i),this._rawPxBounds.max.add(i)])},_projectLatlngs:function(t,i,e){var n,o,s=t[0]instanceof D,r=t.length;if(s){for(o=[],n=0;n<r;n++)o[n]=this._map.latLngToLayerPoint(t[n]),e.extend(o[n]);i.push(o)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],i,e)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,e,n,o,s=this._parts,r=0,a=0,h=this._rings.length;r<h;r++)for(i=0,e=(o=this._rings[r]).length;i<e-1;i++)(n=le(o[i],o[i+1],t,i,!0))&&(s[a]=s[a]||[],s[a].push(n[0]),n[1]===o[i+1]&&i!==e-2||(s[a].push(n[1]),a++))},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,e=0,n=t.length;e<n;e++)t[e]=he(t[e],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var e,n,o,s,r,a,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(e=0,s=this._parts.length;e<s;e++)for(n=0,o=(r=(a=this._parts[e]).length)-1;n<r;o=n++)if((i||0!==n)&&ue(t,a[o],a[n])<=h)return!0;return!1}});Oe._flat=me;var Re=Oe.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,o,s,r,a,h,u=this._rings[0],l=u.length;if(!l)return null;for(t=s=r=a=0,i=l-1;t<l;i=t++)e=u[t],n=u[i],o=e.y*n.x-n.y*e.x,r+=(e.x+n.x)*o,a+=(e.y+n.y)*o,s+=3*o;return h=0===s?u[0]:[r/s,a/s],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var i=Oe.prototype._convertLatLngs.call(this,t),e=i.length;return 2<=e&&i[0]instanceof D&&i[0].equals(i[e-1])&&i.pop(),i},_setLatLngs:function(t){Oe.prototype._setLatLngs.call(this,t),pe(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return pe(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,e=new k(i,i),t=new I(t.min.subtract(e),t.max.add(e));if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,s=this._rings.length;o<s;o++)(n=ge(this._rings[o],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,e,n,o,s,r,a,h,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(h=(i=this._parts[o]).length)-1;s<h;r=s++)e=i[s],n=i[r],e.y>t.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(u=!u);return u||Oe.prototype._containsPoint.call(this,t,!0)}});var Ne=Ce.extend({initialize:function(t,i){c(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=g(t)?t:t.features;if(o){for(i=0,e=o.length;i<e;i++)((n=o[i]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=De(t,s);return r?(r.feature=qe(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=h({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(i){return this.eachLayer(function(t){this._setLayerStyle(t,i)},this)},_setLayerStyle:function(t,i){t.setStyle&&("function"==typeof i&&(i=i(t.feature)),t.setStyle(i))}});function De(t,i){var e,n,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,h=[],u=i&&i.pointToLayer,l=i&&i.coordsToLatLng||We;if(!a&&!r)return null;switch(r.type){case"Point":return je(u,t,e=l(a),i);case"MultiPoint":for(o=0,s=a.length;o<s;o++)e=l(a[o]),h.push(je(u,t,e,i));return new Ce(h);case"LineString":case"MultiLineString":return n=He(a,"LineString"===r.type?0:1,l),new Oe(n,i);case"Polygon":case"MultiPolygon":return n=He(a,"Polygon"===r.type?1:2,l),new Re(n,i);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var c=De({geometry:r.geometries[o],type:"Feature",properties:t.properties},i);c&&h.push(c)}return new Ce(h);default:throw new Error("Invalid GeoJSON object.")}}function je(t,i,e,n){return t?t(i,e):new ke(e,n&&n.markersInheritOptions&&n)}function We(t){return new D(t[1],t[0],t[2])}function He(t,i,e){for(var n,o=[],s=0,r=t.length;s<r;s++)n=i?He(t[s],i-1,e):(e||We)(t[s]),o.push(n);return o}function Fe(t,i){return i="number"==typeof i?i:6,void 0!==t.alt?[r(t.lng,i),r(t.lat,i),r(t.alt,i)]:[r(t.lng,i),r(t.lat,i)]}function Ue(t,i,e,n){for(var o=[],s=0,r=t.length;s<r;s++)o.push(i?Ue(t[s],i-1,e,n):Fe(t[s],n));return!i&&e&&o.push(o[0]),o}function Ve(t,i){return t.feature?h({},t.feature,{geometry:i}):qe(i)}function qe(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Ge={toGeoJSON:function(t){return Ve(this,{type:"Point",coordinates:Fe(this.getLatLng(),t)})}};function Ke(t,i){return new Ne(t,i)}ke.include(Ge),Ie.include(Ge),Ae.include(Ge),Oe.include({toGeoJSON:function(t){var i=!pe(this._latlngs);return Ve(this,{type:(i?"Multi":"")+"LineString",coordinates:Ue(this._latlngs,i?1:0,!1,t)})}}),Re.include({toGeoJSON:function(t){var i=!pe(this._latlngs),e=i&&!pe(this._latlngs[0]),n=Ue(this._latlngs,e?2:i?1:0,!0,t);return i||(n=[n]),Ve(this,{type:(e?"Multi":"")+"Polygon",coordinates:n})}}),ze.include({toMultiPoint:function(i){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON(i).geometry.coordinates)}),Ve(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(n){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(n);var o="GeometryCollection"===t,s=[];return this.eachLayer(function(t){var i,e;t.toGeoJSON&&(i=t.toGeoJSON(n),o?s.push(i.geometry):"FeatureCollection"===(e=qe(i)).type?s.push.apply(s,e.features):s.push(e))}),o?Ve(this,{geometries:s,type:"GeometryCollection"}):{type:"FeatureCollection",features:s}}});var Ye=Ke,Xe=Me.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,e){this._url=t,this._bounds=N(i),c(this,e)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ci(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ri(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&hi(this._image),this},bringToBack:function(){return this._map&&ui(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=N(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,i=this._image=t?this._url:si("img");ci(i,"leaflet-image-layer"),this._zoomAnimated&&ci(i,"leaflet-zoom-animated"),this.options.className&&ci(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onload=p(this.fire,this,"load"),i.onerror=p(this._overlayOnError,this,"error"),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=i.src:(i.src=this._url,i.alt=this.options.alt)},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;gi(this._image,e,i)},_reset:function(){var t=this._image,i=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=i.getSize();vi(t,i.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){mi(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),Je=Xe.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:si("video");if(ci(i,"leaflet-image-layer"),this._zoomAnimated&&ci(i,"leaflet-zoom-animated"),this.options.className&&ci(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onloadeddata=p(this.fire,this,"load"),t){for(var e=i.getElementsByTagName("source"),n=[],o=0;o<e.length;o++)n.push(e[o].src);this._url=0<e.length?n:[i.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(i.style,"objectFit")&&(i.style.objectFit="fill"),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop,i.muted=!!this.options.muted;for(var s=0;s<this._url.length;s++){var r=si("source");r.src=this._url[s],i.appendChild(r)}}}});var $e=Xe.extend({_initImage:function(){var t=this._image=this._url;ci(t,"leaflet-image-layer"),this._zoomAnimated&&ci(t,"leaflet-zoom-animated"),this.options.className&&ci(t,this.options.className),t.onselectstart=a,t.onmousemove=a}});var Qe=Me.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,i){c(this,t),this._source=i},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&mi(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&mi(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(mi(this._container,0),this._removeTimeout=setTimeout(p(ri,void 0,this._container),200)):ri(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=j(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&hi(this._container),this},bringToBack:function(){return this._map&&ui(this._container),this},_prepareOpen:function(t,i,e){if(i instanceof Me||(e=i,i=t),i instanceof Ce)for(var n in t._layers){i=t._layers[n];break}if(!e)if(i.getCenter)e=i.getCenter();else{if(!i.getLatLng)throw new Error("Unable to get source layer LatLng.");e=i.getLatLng()}return this._source=i,this.update(),e},_updateContent:function(){if(this._content){var t=this._contentNode,i="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof i)t.innerHTML=i;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(i)}this.fire("contentupdate")}},_updatePosition:function(){var t,i,e,n,o;this._map&&(t=this._map.latLngToLayerPoint(this._latlng),i=A(this.options.offset),e=this._getAnchor(),this._zoomAnimated?vi(this._container,t.add(e)):i=i.add(t).add(e),n=this._containerBottom=-i.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+i.x,this._container.style.bottom=n+"px",this._container.style.left=o+"px")},_getAnchor:function(){return[0,0]}}),tn=Qe.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Qe.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Be||this._source.on("preclick",Ai))},onRemove:function(t){Qe.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Be||this._source.off("preclick",Ai))},getEvents:function(){var t=Qe.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t,i="leaflet-popup",e=this._container=si("div",i+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=si("div",i+"-content-wrapper",e);this._contentNode=si("div",i+"-content",n),Oi(e),Ii(this._contentNode),zi(e,"contextmenu",Ai),this._tipContainer=si("div",i+"-tip-container",e),this._tip=si("div",i+"-tip",this._tipContainer),this.options.closeButton&&((t=this._closeButton=si("a",i+"-close-button",e)).href="#close",t.innerHTML="&#215;",zi(t,"click",this._onCloseButtonClick,this))},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var e=t.offsetWidth,e=Math.min(e,this.options.maxWidth);e=Math.max(e,this.options.minWidth),i.width=e+1+"px",i.whiteSpace="",i.height="";var n=t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&o<n?(i.height=o+"px",ci(t,s)):_i(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();vi(this._container,i.add(e))},_adjustPan:function(){var t,i,e,n,o,s,r,a,h,u,l,c;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),t=this._map,i=parseInt(oi(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+i,n=this._containerWidth,(o=new k(this._containerLeft,-e-this._containerBottom))._add(yi(this._container)),s=t.layerPointToContainerPoint(o),r=A(this.options.autoPanPadding),a=A(this.options.autoPanPaddingTopLeft||r),h=A(this.options.autoPanPaddingBottomRight||r),u=t.getSize(),c=l=0,s.x+n+h.x>u.x&&(l=s.x+n-u.x+h.x),s.x-l-a.x<0&&(l=s.x-a.x),s.y+e+h.y>u.y&&(c=s.y+e-u.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c]))},_onCloseButtonClick:function(t){this._close(),Ni(t)},_getAnchor:function(){return A(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ki.mergeOptions({closePopupOnClick:!0}),Ki.include({openPopup:function(t,i,e){return t instanceof tn||(t=new tn(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Me.include({bindPopup:function(t,i){return t instanceof tn?(c(t,i),(this._popup=t)._source=this):(this._popup&&!i||(this._popup=new tn(i,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,i){return this._popup&&this._map&&(i=this._popup._prepareOpen(this,t,i),this._map.openPopup(this._popup,i)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var i=t.layer||t.target;this._popup&&this._map&&(Ni(t),i instanceof Be?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===i?this.closePopup():this.openPopup(i,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var en=Qe.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Qe.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Qe.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Qe.prototype.getEvents.call(this);return bt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=si("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e=this._map,n=this._container,o=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),r=this.options.direction,a=n.offsetWidth,h=n.offsetHeight,u=A(this.options.offset),l=this._getAnchor(),c="top"===r?(i=a/2,h):"bottom"===r?(i=a/2,0):(i="center"===r?a/2:"right"===r?0:"left"===r?a:s.x<o.x?(r="right",0):(r="left",a+2*(u.x+l.x)),h/2);t=t.subtract(A(i,c,!0)).add(u).add(l),_i(n,"leaflet-tooltip-right"),_i(n,"leaflet-tooltip-left"),_i(n,"leaflet-tooltip-top"),_i(n,"leaflet-tooltip-bottom"),ci(n,"leaflet-tooltip-"+r),vi(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&mi(this._container,t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(i)},_getAnchor:function(){return A(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ki.include({openTooltip:function(t,i,e){return t instanceof en||(t=new en(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Me.include({bindTooltip:function(t,i){return t instanceof en?(c(t,i),(this._tooltip=t)._source=this):(this._tooltip&&!i||(this._tooltip=new en(i,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){var i,e;!t&&this._tooltipHandlersAdded||(i=t?"off":"on",e={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?e.add=this._openTooltip:(e.mouseover=this._openTooltip,e.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(e.mousemove=this._moveTooltip),bt&&(e.click=this._openTooltip)),this[i](e),this._tooltipHandlersAdded=!t)},openTooltip:function(t,i){return this._tooltip&&this._map&&(i=this._tooltip._prepareOpen(this,t,i),this._map.openTooltip(this._tooltip,i),this._tooltip.options.interactive&&this._tooltip._container&&(ci(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(_i(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var i=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(i,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var i,e,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),e=this._map.containerPointToLayerPoint(i),n=this._map.layerPointToLatLng(e)),this._tooltip.setLatLng(n)}});var nn=Se.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i,e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;return n.html instanceof Element?(ai(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos&&(i=A(n.bgPos),e.style.backgroundPosition=-i.x+"px "+-i.y+"px"),this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Se.Default=Ze;var on=Me.extend({options:{tileSize:256,opacity:1,updateWhenIdle:yt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){c(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ri(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(hi(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ui(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=n(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof k?t:new k(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var i,e=this.getPane().children,n=-t(-1/0,1/0),o=0,s=e.length;o<s;o++)i=e[o].style.zIndex,e[o]!==this._container&&i&&(n=t(n,+i));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!it){mi(this._container,this.options.opacity);var t=+new Date,i=!1,e=!1;for(var n in this._tiles){var o,s=this._tiles[n];s.current&&s.loaded&&(o=Math.min(1,(t-s.loaded)/200),mi(s.el,o),o<1?i=!0:(s.active?e=!0:this._onOpaqueTile(s),s.active=!0))}e&&!this._noPrune&&this._pruneTiles(),i&&(z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=si("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,i=this.options.maxZoom;if(void 0!==t){for(var e in this._levels)e=Number(e),this._levels[e].el.children.length||e===t?(this._levels[e].el.style.zIndex=i-Math.abs(t-e),this._onUpdateLevel(e)):(ri(this._levels[e].el),this._removeTilesAtZoom(e),this._onRemoveLevel(e),delete this._levels[e]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=si("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=i,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),a(n.el.offsetWidth),this._onCreateLevel(n)),this._level=n}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,i,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles){(e=this._tiles[t]).current&&!e.active&&(i=e.coords,this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2))}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var i in this._tiles)this._tiles[i].coords.z===t&&this._removeTile(i)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ri(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,i,e,n){var o=Math.floor(t/2),s=Math.floor(i/2),r=e-1,a=new k(+o,+s);a.z=+r;var h=this._tileCoordsToKey(a),u=this._tiles[h];return u&&u.active?u.retain=!0:(u&&u.loaded&&(u.retain=!0),n<r&&this._retainParent(o,s,r,n))},_retainChildren:function(t,i,e,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*i;s<2*i+2;s++){var r=new k(o,s);r.z=e+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),e+1<n&&this._retainChildren(o,s,e+1,n))}},_resetView:function(t){var i=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var i=this.options;return void 0!==i.minNativeZoom&&t<i.minNativeZoom?i.minNativeZoom:void 0!==i.maxNativeZoom&&i.maxNativeZoom<t?i.maxNativeZoom:t},_setView:function(t,i,e,n){var o=Math.round(i),o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o),s=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),e||this._pruneTiles(),this._noPrune=!!e),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var e in this._levels)this._setZoomTransform(this._levels[e],t,i)},_setZoomTransform:function(t,i,e){var n=this._map.getZoomScale(e,t.zoom),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(i,e)).round();vt?gi(t.el,o,n):vi(t.el,o)},_resetGrid:function(){var t=this._map,i=t.options.crs,e=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,i.wrapLng[0]],n).x/e.x),Math.ceil(t.project([0,i.wrapLng[1]],n).x/e.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],n).y/e.x),Math.ceil(t.project([i.wrapLat[1],0],n).y/e.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,e=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),n=i.getZoomScale(e,this._tileZoom),o=i.project(t,this._tileZoom).floor(),s=i.getSize().divideBy(2*n);return new I(o.subtract(s),o.add(s))},_update:function(t){var i=this._map;if(i){var e=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),s=o.getCenter(),r=[],a=this.options.keepBuffer,h=new I(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var l=this._tiles[u].coords;l.z===this._tileZoom&&h.contains(new k(l.x,l.y))||(this._tiles[u].current=!1)}if(1<Math.abs(e-this._tileZoom))this._setView(t,e);else{for(var c=o.min.y;c<=o.max.y;c++)for(var _=o.min.x;_<=o.max.x;_++){var d,p=new k(_,c);p.z=this._tileZoom,this._isValidTile(p)&&((d=this._tiles[this._tileCoordsToKey(p)])?d.current=!0:r.push(p))}if(r.sort(function(t,i){return t.distanceTo(s)-i.distanceTo(s)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));for(var m=document.createDocumentFragment(),_=0;_<r.length;_++)this._addTile(r[_],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var i=this._map.options.crs;if(!i.infinite){var e=this._globalTileRange;if(!i.wrapLng&&(t.x<e.min.x||t.x>e.max.x)||!i.wrapLat&&(t.y<e.min.y||t.y>e.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return N(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),o=n.add(e);return[i.unproject(n,t.z),i.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new R(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new k(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(ri(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ci(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=a,t.onmousemove=a,it&&this.options.opacity<1&&mi(t,this.options.opacity),ot&&!st&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,i){var e=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),p(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(p(this._tileReady,this,t,null,o)),vi(o,e),this._tiles[n]={el:o,coords:t,current:!0},i.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var n=this._tileCoordsToKey(t);(e=this._tiles[n])&&(e.loaded=+new Date,this._map._fadeAnimated?(mi(e.el,0),z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(ci(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),it||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(p(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new k(this._wrapX?o(t.x,this._wrapX):t.x,this._wrapY?o(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new I(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var sn=on.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,i){this._url=t,(i=c(this,i)).detectRetina&&zt&&0<i.maxZoom&&(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom++):(i.zoomOffset++,i.maxZoom--),i.minZoom=Math.max(0,i.minZoom)),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),ot||this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url===t&&void 0===i&&(i=!0),this._url=t,i||this.redraw(),this},createTile:function(t,i){var e=document.createElement("img");return zi(e,"load",p(this._tileOnLoad,this,i,e)),zi(e,"error",p(this._tileOnError,this,i,e)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),e.alt="",e.setAttribute("role","presentation"),e.src=this.getTileUrl(t),e},getTileUrl:function(t){var i,e={r:zt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(i=this._globalTileRange.max.y-t.y,this.options.tms&&(e.y=i),e["-y"]=i),f(this._url,h(e,this.options))},_tileOnLoad:function(t,i){it?setTimeout(p(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var n=this.options.errorTileUrl;n&&i.getAttribute("src")!==n&&(i.src=n),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,i=this.options.maxZoom;return this.options.zoomReverse&&(t=i-t),t+this.options.zoomOffset},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=a,i.onerror=a,i.complete||(i.src=y,ri(i),delete this._tiles[t]))},_removeTile:function(t){var i=this._tiles[t];if(i)return at||i.el.setAttribute("src",y),on.prototype._removeTile.call(this,t)},_tileReady:function(t,i,e){if(this._map&&(!e||e.getAttribute("src")!==y))return on.prototype._tileReady.call(this,t,i,e)}});function rn(t,i){return new sn(t,i)}var an=sn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,i){this._url=t;var e=h({},this.defaultWmsParams);for(var n in i)n in this.options||(e[n]=i[n]);var o=(i=c(this,i)).detectRetina&&zt?2:1,s=this.getTileSize();e.width=s.x*o,e.height=s.y*o,this.wmsParams=e},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var i=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[i]=this._crs.code,sn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),e=this._crs,n=O(e.project(i[0]),e.project(i[1])),o=n.min,s=n.max,r=(1.3<=this._wmsVersion&&this._crs===be?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=sn.prototype.getTileUrl.call(this,t);return a+_(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,i){return h(this.wmsParams,t),i||this.redraw(),this}});sn.WMS=an,rn.wms=function(t,i){return new an(t,i)};var hn=Me.extend({options:{padding:.1,tolerance:0},initialize:function(t){c(this,t),m(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ci(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var e=this._map.getZoomScale(i,this._zoom),n=yi(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,i),r=this._map.project(t,i).subtract(s),a=o.multiplyBy(-e).add(n).add(o).subtract(r);vt?gi(this._container,a,e):vi(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new I(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),un=hn.extend({getEvents:function(){var t=hn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){hn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");zi(t,"mousemove",this._onMouseMove,this),zi(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),zi(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,ri(this._container),Si(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){var t,i,e,n;this._map._animatingZoom&&this._bounds||(hn.prototype._update.call(this),t=this._bounds,i=this._container,e=t.getSize(),n=zt?2:1,vi(i,t.min),i.width=n*e.x,i.height=n*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",zt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update"))},_reset:function(){hn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t);var i=(this._layers[m(t)]=t)._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,n=i.prev;e?e.prev=n:this._drawLast=n,n?n.next=e:this._drawFirst=e,delete t._order,delete this._layers[m(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){for(var i,e=t.options.dashArray.split(/[, ]+/),n=[],o=0;o<e.length;o++){if(i=Number(e[o]),isNaN(i))return;n.push(i)}t.options._dashArray=n}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||M(this._redraw,this))},_extendRedrawBounds:function(t){var i;t._pxBounds&&(i=(t.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new I,this._redrawBounds.extend(t._pxBounds.min.subtract([i,i])),this._redrawBounds.extend(t._pxBounds.max.add([i,i])))},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t,i=this._redrawBounds;i?(t=i.getSize(),this._ctx.clearRect(i.min.x,i.min.y,t.x,t.y)):(this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore())},_draw:function(){var t,i,e=this._redrawBounds;this._ctx.save(),e&&(i=e.getSize(),this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()),this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,i){if(this._drawing){var e,n,o,s,r=t._parts,a=r.length,h=this._ctx;if(a){for(h.beginPath(),e=0;e<a;e++){for(n=0,o=r[e].length;n<o;n++)s=r[e][n],h[n?"lineTo":"moveTo"](s.x,s.y);i&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){var i,e,n,o;this._drawing&&!t._empty()&&(i=t._point,e=this._ctx,n=Math.max(Math.round(t._radius),1),1!=(o=(Math.max(Math.round(t._radiusY),1)||n)/n)&&(e.save(),e.scale(1,o)),e.beginPath(),e.arc(i.x,i.y/o,n,0,2*Math.PI,!1),1!=o&&e.restore(),this._fillStroke(e,t))},_fillStroke:function(t,i){var e=i.options;e.fill&&(t.globalAlpha=e.fillOpacity,t.fillStyle=e.fillColor||e.color,t.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=e.opacity,t.lineWidth=e.weight,t.strokeStyle=e.color,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.stroke())},_onClick:function(t){for(var i,e,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(n)&&(("click"===t.type||"preclick"!==t.type)&&this._map._draggableMoved(i)||(e=i));e&&(Fi(t),this._fireEvent([e],t))},_onMouseMove:function(t){var i;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(i=this._map.mouseEventToLayerPoint(t),this._handleMouseHover(t,i))},_handleMouseOut:function(t){var i=this._hoveredLayer;i&&(_i(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,i){if(!this._mouseHoverThrottled){for(var e,n,o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&(n=e);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(ci(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(p(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,i,e){this._map._fireDOMEvent(i,e||i.type,t)},_bringToFront:function(t){var i,e,n=t._order;n&&(i=n.next,e=n.prev,i&&((i.prev=e)?e.next=i:i&&(this._drawFirst=i),n.prev=this._drawLast,(this._drawLast.next=n).next=null,this._drawLast=n,this._requestRedraw(t)))},_bringToBack:function(t){var i,e,n=t._order;n&&(i=n.next,(e=n.prev)&&((e.next=i)?i.prev=e:e&&(this._drawLast=e),n.prev=null,n.next=this._drawFirst,this._drawFirst.prev=n,this._drawFirst=n,this._requestRedraw(t)))}});function ln(t){return St?new un(t):null}var cn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_n={_initContainer:function(){this._container=si("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(hn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=cn("shape");ci(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=cn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;ri(i),t.removeInteractiveTarget(i),delete this._layers[m(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i=i||(t._stroke=cn("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e=e||(t._fill=cn("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){hi(t._container)},_bringToBack:function(t){ui(t._container)}},dn=Et?cn:J,pn=hn.extend({getEvents:function(){var t=hn.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=dn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=dn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ri(this._container),Si(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){var t,i,e;this._map._animatingZoom&&this._bounds||(hn.prototype._update.call(this),i=(t=this._bounds).getSize(),e=this._container,this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),vi(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update"))},_initPath:function(t){var i=t._path=dn("path");t.options.className&&ci(i,t.options.className),t.options.interactive&&ci(i,"leaflet-interactive"),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ri(t._path),t.removeInteractiveTarget(t._path),delete this._layers[m(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,$(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,o)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){hi(t._path)},_bringToBack:function(t){ui(t._path)}});function mn(t){return Zt||Et?new pn(t):null}Et&&pn.include(_n),Ki.include({getRenderer:function(t){var i=(i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&ln(t)||mn(t)}});var fn=Re.extend({initialize:function(t,i){Re.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=N(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});pn.create=dn,pn.pointsToPath=$,Ne.geometryToLayer=De,Ne.coordsToLatLng=We,Ne.coordsToLatLngs=He,Ne.latLngToCoords=Fe,Ne.latLngsToCoords=Ue,Ne.getFeature=Ve,Ne.asFeature=qe,Ki.mergeOptions({boxZoom:!0});var gn=ie.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){zi(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Si(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ri(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Xt(),xi(),this._startPoint=this._map.mouseEventToContainerPoint(t),zi(document,{contextmenu:Ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=si("div","leaflet-zoom-box",this._container),ci(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new I(this._point,this._startPoint),e=i.getSize();vi(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(ri(this._box),_i(this._container,"leaflet-crosshair")),Jt(),wi(),Si(document,{contextmenu:Ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){var i;1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(p(this._resetState,this),0),i=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})))},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ki.addInitHook("addHandler","boxZoom",gn),Ki.mergeOptions({doubleClickZoom:!0});var vn=ie.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,o=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(o):i.setZoomAround(t.containerPoint,o)}});Ki.addInitHook("addHandler","doubleClickZoom",vn),Ki.mergeOptions({dragging:!0,inertia:!st,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var yn=ie.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new ae(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),ci(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_i(this._map._container,"leaflet-grab"),_i(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,i=this._map;i._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=N(this._map.options.maxBounds),this._offsetLimit=O(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,i.fire("movestart").fire("dragstart"),i.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var i,e;this._map.options.inertia&&(i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(e),this._times.push(i),this._prunePositions(i)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){var t,i;this._viscosity&&this._offsetLimit&&(t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit,t.x<i.min.x&&(t.x=this._viscousLimit(t.x,i.min.x)),t.y<i.min.y&&(t.y=this._viscousLimit(t.y,i.min.y)),t.x>i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,s=(n+i+e)%t-i-e,r=Math.abs(o+e)<Math.abs(s+e)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var i,e,n,o,s,r,a,h,u,l=this._map,c=l.options,_=!c.inertia||this._times.length<2;l.fire("dragend",t),_?l.fire("moveend"):(this._prunePositions(+new Date),i=this._lastPos.subtract(this._positions[0]),e=(this._lastTime-this._times[0])/1e3,n=c.easeLinearity,s=(o=i.multiplyBy(n/e)).distanceTo([0,0]),r=Math.min(c.inertiaMaxSpeed,s),a=o.multiplyBy(r/s),h=r/(c.inertiaDeceleration*n),(u=a.multiplyBy(-h/2).round()).x||u.y?(u=l._limitOffset(u,l.options.maxBounds),M(function(){l.panBy(u,{duration:h,easeLinearity:n,noMoveStart:!0,animate:!0})})):l.fire("moveend"))}});Ki.addInitHook("addHandler","dragging",yn),Ki.mergeOptions({keyboard:!0,keyboardPanDelta:80});var xn=ie.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),zi(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Si(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){var t,i,e,n;this._focused||(t=document.body,i=document.documentElement,e=t.scrollTop||i.scrollTop,n=t.scrollLeft||i.scrollLeft,this._map._container.focus(),window.scrollTo(n,e))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){for(var i=this._panKeys={},e=this.keyCodes,n=0,o=e.left.length;n<o;n++)i[e.left[n]]=[-1*t,0];for(n=0,o=e.right.length;n<o;n++)i[e.right[n]]=[t,0];for(n=0,o=e.down.length;n<o;n++)i[e.down[n]]=[0,t];for(n=0,o=e.up.length;n<o;n++)i[e.up[n]]=[0,-1*t]},_setZoomDelta:function(t){for(var i=this._zoomKeys={},e=this.keyCodes,n=0,o=e.zoomIn.length;n<o;n++)i[e.zoomIn[n]]=t;for(n=0,o=e.zoomOut.length;n<o;n++)i[e.zoomOut[n]]=-t},_addHooks:function(){zi(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Si(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var i,e=t.keyCode,n=this._map;if(e in this._panKeys)n._panAnim&&n._panAnim._inProgress||(i=this._panKeys[e],t.shiftKey&&(i=A(i).multiplyBy(3)),n.panBy(i),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(e in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if(27!==e||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Ni(t)}}});Ki.addInitHook("addHandler","keyboard",xn),Ki.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var wn=ie.extend({addHooks:function(){zi(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Si(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var i=Wi(t),e=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(e-(new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(p(this._performZoom,this),n),Ni(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),e=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,s=e?Math.ceil(o/e)*e:o,r=t._limitZoom(i+(0<this._delta?s:-s))-i;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(i+r):t.setZoomAround(this._lastMousePos,i+r))}});Ki.addInitHook("addHandler","scrollWheelZoom",wn),Ki.mergeOptions({tap:!0,tapTolerance:15});var Pn=ie.extend({addHooks:function(){zi(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Si(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Ri(t),this._fireClick=!0,1<t.touches.length)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],e=i.target;this._startPos=this._newPos=new k(i.clientX,i.clientY),e.tagName&&"a"===e.tagName.toLowerCase()&&ci(e,"leaflet-active"),this._holdTimeout=setTimeout(p(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),this._simulateEvent("mousedown",i),zi(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){var i,e;clearTimeout(this._holdTimeout),Si(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches&&((e=(i=t.changedTouches[0]).target)&&e.tagName&&"a"===e.tagName.toLowerCase()&&_i(e,"leaflet-active"),this._simulateEvent("mouseup",i),this._isTapValid()&&this._simulateEvent("click",i))},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var i=t.touches[0];this._newPos=new k(i.clientX,i.clientY),this._simulateEvent("mousemove",i)},_simulateEvent:function(t,i){var e=document.createEvent("MouseEvents");e._simulated=!0,i.target._simulatedClick=!0,e.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),i.target.dispatchEvent(e)}});!bt||Lt&&!ct||Ki.addInitHook("addHandler","tap",Pn),Ki.mergeOptions({touchZoom:bt&&!st,bounceAtZoomLimits:!0});var Ln=ie.extend({addHooks:function(){ci(this._map._container,"leaflet-touch-zoom"),zi(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){_i(this._map._container,"leaflet-touch-zoom"),Si(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i,e,n=this._map;!t.touches||2!==t.touches.length||n._animatingZoom||this._zooming||(i=n.mouseEventToContainerPoint(t.touches[0]),e=n.mouseEventToContainerPoint(t.touches[1]),this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),"center"!==n.options.touchZoom&&(this._pinchStartLatLng=n.containerPointToLatLng(i.add(e)._divideBy(2))),this._startDist=i.distanceTo(e),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),zi(document,"touchmove",this._onTouchMove,this),zi(document,"touchend",this._onTouchEnd,this),Ri(t))},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]),o=e.distanceTo(n)/this._startDist;if(this._zoom=i.getScaleZoom(o,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&o<1||this._zoom>i.getMaxZoom()&&1<o)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1==o)return}else{var s=e._add(n)._divideBy(2)._subtract(this._centerPoint);if(1==o&&0===s.x&&0===s.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var r=p(i._move,i,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=M(r,this,!0),Ri(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,z(this._animRequest),Si(document,"touchmove",this._onTouchMove,this),Si(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ki.addInitHook("addHandler","touchZoom",Ln),Ki.BoxZoom=gn,Ki.DoubleClickZoom=vn,Ki.Drag=yn,Ki.Keyboard=xn,Ki.ScrollWheelZoom=wn,Ki.Tap=Pn,Ki.TouchZoom=Ln,t.version="1.7.1",t.Control=Xi,t.control=Yi,t.Browser=Bt,t.Evented=E,t.Mixin=ne,t.Util=C,t.Class=S,t.Handler=ie,t.extend=h,t.bind=p,t.stamp=m,t.setOptions=c,t.DomEvent=qi,t.DomUtil=Mi,t.PosAnimation=Gi,t.Draggable=ae,t.LineUtil=fe,t.PolyUtil=ye,t.Point=k,t.point=A,t.Bounds=I,t.bounds=O,t.Transformation=q,t.transformation=G,t.Projection=Pe,t.LatLng=D,t.latLng=j,t.LatLngBounds=R,t.latLngBounds=N,t.CRS=H,t.GeoJSON=Ne,t.geoJSON=Ke,t.geoJson=Ye,t.Layer=Me,t.LayerGroup=ze,t.layerGroup=function(t,i){return new ze(t,i)},t.FeatureGroup=Ce,t.featureGroup=function(t,i){return new Ce(t,i)},t.ImageOverlay=Xe,t.imageOverlay=function(t,i,e){return new Xe(t,i,e)},t.VideoOverlay=Je,t.videoOverlay=function(t,i,e){return new Je(t,i,e)},t.SVGOverlay=$e,t.svgOverlay=function(t,i,e){return new $e(t,i,e)},t.DivOverlay=Qe,t.Popup=tn,t.popup=function(t,i){return new tn(t,i)},t.Tooltip=en,t.tooltip=function(t,i){return new en(t,i)},t.Icon=Se,t.icon=function(t){return new Se(t)},t.DivIcon=nn,t.divIcon=function(t){return new nn(t)},t.Marker=ke,t.marker=function(t,i){return new ke(t,i)},t.TileLayer=sn,t.tileLayer=rn,t.GridLayer=on,t.gridLayer=function(t){return new on(t)},t.SVG=pn,t.svg=mn,t.Renderer=hn,t.Canvas=un,t.canvas=ln,t.Path=Be,t.CircleMarker=Ae,t.circleMarker=function(t,i){return new Ae(t,i)},t.Circle=Ie,t.circle=function(t,i,e){return new Ie(t,i,e)},t.Polyline=Oe,t.polyline=function(t,i){return new Oe(t,i)},t.Polygon=Re,t.polygon=function(t,i){return new Re(t,i)},t.Rectangle=fn,t.rectangle=function(t,i){return new fn(t,i)},t.Map=Ki,t.map=function(t,i){return new Ki(t,i)};var bn=window.L;t.noConflict=function(){return window.L=bn,this},window.L=t});
 
build/animation/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '369ab3c84c44e8607b7429cc6a63a9b4');
1
+ <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '320f8b86c53de81778f99e51123bbceb');
build/animation/index.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var e=window.wp.element,t=window.wp.i18n,l=window.wp.blocks,o=window.wp.components,a=window.wp.compose,n=window.wp.blockEditor,u=window.wp.hooks;const s=[{label:(0,t.__)("None","otter-blocks"),value:"none"},{label:(0,t.__)("Bounce","otter-blocks"),value:"bounce"},{label:(0,t.__)("Bounce In","otter-blocks"),value:"bounceIn"},{label:(0,t.__)("Bounce In Down","otter-blocks"),value:"bounceInDown"},{label:(0,t.__)("Bounce In Left","otter-blocks"),value:"bounceInLeft"},{label:(0,t.__)("Bounce In Right","otter-blocks"),value:"bounceInRight"},{label:(0,t.__)("Bounce In Up","otter-blocks"),value:"bounceInUp"},{label:(0,t.__)("Bounce Out","otter-blocks"),value:"bounceOut"},{label:(0,t.__)("Bounce Out Down","otter-blocks"),value:"bounceOutDown"},{label:(0,t.__)("Bounce Out Left","otter-blocks"),value:"bounceOutLeft"},{label:(0,t.__)("Bounce Out Right","otter-blocks"),value:"bounceOutRight"},{label:(0,t.__)("Bounce Out Up","otter-blocks"),value:"bounceOutUp"},{label:(0,t.__)("Fade In","otter-blocks"),value:"fadeIn"},{label:(0,t.__)("Fade In Down","otter-blocks"),value:"fadeInDown"},{label:(0,t.__)("Fade In Down Big","otter-blocks"),value:"fadeInDownBig"},{label:(0,t.__)("Fade In Left","otter-blocks"),value:"fadeInLeft"},{label:(0,t.__)("Fade In Left Big","otter-blocks"),value:"fadeInLeftBig"},{label:(0,t.__)("Fade In Right","otter-blocks"),value:"fadeInRight"},{label:(0,t.__)("Fade In Right Big","otter-blocks"),value:"fadeInRightBig"},{label:(0,t.__)("Fade In Up","otter-blocks"),value:"fadeInUp"},{label:(0,t.__)("Fade Out","otter-blocks"),value:"fadeOut"},{label:(0,t.__)("Fade Out Down","otter-blocks"),value:"fadeOutDown"},{label:(0,t.__)("Fade Out Down Big","otter-blocks"),value:"fadeOutDownBig"},{label:(0,t.__)("Fade Out Left","otter-blocks"),value:"fadeOutLeft"},{label:(0,t.__)("Fade Out Left Big","otter-blocks"),value:"fadeOutLeftBig"},{label:(0,t.__)("Fade Out Right","otter-blocks"),value:"fadeOutRight"},{label:(0,t.__)("Fade Out Right Big","otter-blocks"),value:"fadeOutRightBig"},{label:(0,t.__)("Fade Out Up","otter-blocks"),value:"fadeOutUp"},{label:(0,t.__)("Fade Out Up Big","otter-blocks"),value:"fadeOutUpBig"},{label:(0,t.__)("Flip","otter-blocks"),value:"flip"},{label:(0,t.__)("Flip In X","otter-blocks"),value:"flipInX"},{label:(0,t.__)("Flip In Y","otter-blocks"),value:"flipInY"},{label:(0,t.__)("Flip Out X","otter-blocks"),value:"flipOutX"},{label:(0,t.__)("Flip Out Y","otter-blocks"),value:"flipOutY"},{label:(0,t.__)("Rotate In","otter-blocks"),value:"rotateIn"},{label:(0,t.__)("Rotate In Down Left","otter-blocks"),value:"rotateInDownLeft"},{label:(0,t.__)("Rotate In Down Right","otter-blocks"),value:"rotateInDownRight"},{label:(0,t.__)("Rotate In Up Left","otter-blocks"),value:"rotateInUpLeft"},{label:(0,t.__)("Rotate In Up Right","otter-blocks"),value:"rotateInUpRight"},{label:(0,t.__)("Rotate Out","otter-blocks"),value:"rotateOut"},{label:(0,t.__)("Rotate Out Down Left","otter-blocks"),value:"rotateOutDownLeft"},{label:(0,t.__)("Rotate Out Down Right","otter-blocks"),value:"rotateOutDownRight"},{label:(0,t.__)("Rotate Out Up Left","otter-blocks"),value:"rotateOutUpLeft"},{label:(0,t.__)("Rotate Out Up Right","otter-blocks"),value:"rotateOutUpRight"},{label:(0,t.__)("Slide In Down","otter-blocks"),value:"slideInDown"},{label:(0,t.__)("Slide In Left","otter-blocks"),value:"slideInLeft"},{label:(0,t.__)("Slide In Right","otter-blocks"),value:"slideInRight"},{label:(0,t.__)("Slide In Up","otter-blocks"),value:"slideInUp"},{label:(0,t.__)("Slide Out Down","otter-blocks"),value:"slideOutDown"},{label:(0,t.__)("Slide Out Left","otter-blocks"),value:"slideOutLeft"},{label:(0,t.__)("Slide Out Right","otter-blocks"),value:"slideOutRight"},{label:(0,t.__)("Slide Out Up","otter-blocks"),value:"slideOutUp"},{label:(0,t.__)("Zoom In","otter-blocks"),value:"zoomIn"},{label:(0,t.__)("Zoom In Down","otter-blocks"),value:"zoomInDown"},{label:(0,t.__)("Zoom In Left","otter-blocks"),value:"zoomInLeft"},{label:(0,t.__)("Zoom In Right","otter-blocks"),value:"zoomInRight"},{label:(0,t.__)("Zoom In Up","otter-blocks"),value:"zoomInUp"},{label:(0,t.__)("Zoom Out","otter-blocks"),value:"zoomOut"},{label:(0,t.__)("Zoom Out Down","otter-blocks"),value:"zoomOutDown"},{label:(0,t.__)("Zoom Out Left","otter-blocks"),value:"zoomOutLeft"},{label:(0,t.__)("Zoom Out Right","otter-blocks"),value:"zoomOutRight"},{label:(0,t.__)("Zoom Out Up","otter-blocks"),value:"zoomOutUp"},{label:(0,t.__)("Roll In","otter-blocks"),value:"rollIn"},{label:(0,t.__)("Roll Out","otter-blocks"),value:"rollOut"},{label:(0,t.__)("Light Speed In","otter-blocks"),value:"lightSpeedIn"},{label:(0,t.__)("Light Speed Out","otter-blocks"),value:"lightSpeedOut"},{label:(0,t.__)("Flash","otter-blocks"),value:"flash"},{label:(0,t.__)("Pulse","otter-blocks"),value:"pulse"},{label:(0,t.__)("Rubber Band","otter-blocks"),value:"rubberBand"},{label:(0,t.__)("Shake","otter-blocks"),value:"shake"},{label:(0,t.__)("Head Shake","otter-blocks"),value:"headShake"},{label:(0,t.__)("Swing","otter-blocks"),value:"swing"},{label:(0,t.__)("TaDa","otter-blocks"),value:"tada"},{label:(0,t.__)("Wobble","otter-blocks"),value:"wobble"},{label:(0,t.__)("Jello","otter-blocks"),value:"jello"},{label:(0,t.__)("Heart Beat","otter-blocks"),value:"heartBeat"},{label:(0,t.__)("Hinge","otter-blocks"),value:"hinge"},{label:(0,t.__)("Jack In The Box","otter-blocks"),value:"jackInTheBox"}],b=[{label:(0,t.__)("Bouncing","otter-blocks"),value:"bounce"},{label:(0,t.__)("Fading","otter-blocks"),value:"fadeIn"},{label:(0,t.__)("Flipping","otter-blocks"),value:"flip"},{label:(0,t.__)("Rotating","otter-blocks"),value:"rotateIn"},{label:(0,t.__)("Sliding","otter-blocks"),value:"slideInDown"},{label:(0,t.__)("Zooming","otter-blocks"),value:"zoomIn"},{label:(0,t.__)("Rolling","otter-blocks"),value:"rollIn"},{label:(0,t.__)("Other","otter-blocks"),value:"lightSpeedIn"}],r=["bounceOut","bounceOutDown","bounceOutLeft","bounceOutRight","bounceOutUp","fadeOut","fadeOutDown","fadeOutDownBig","fadeOutLeft","fadeOutLeftBig","fadeOutRight","fadeOutRightBig","fadeOutUp","fadeOutUpBig","flipOutX","flipOutY","lightSpeedOut","rotateOut","rotateOutDownLeft","rotateOutDownRight","rotateOutUpLeft","rotateOutUpRight","slideOutDown","slideOutLeft","slideOutRight","slideOutUp","zoomOut","zoomOutDown","zoomOutLeft","zoomOutRight","zoomOutUp","rollOut"],c=[{label:(0,t.__)("None","otter-blocks"),value:"none"},{label:(0,t.__)("100 Milliseconds","otter-blocks"),value:"delay-100ms"},{label:(0,t.__)("200 Milliseconds","otter-blocks"),value:"delay-200ms"},{label:(0,t.__)("500 Milliseconds","otter-blocks"),value:"delay-500ms"},{label:(0,t.__)("One Second","otter-blocks"),value:"delay-1s"},{label:(0,t.__)("Two Second","otter-blocks"),value:"delay-2s"},{label:(0,t.__)("Three Second","otter-blocks"),value:"delay-3s"},{label:(0,t.__)("Four Second","otter-blocks"),value:"delay-4s"},{label:(0,t.__)("Five Second","otter-blocks"),value:"delay-5s"}],i=[{label:(0,t.__)("Default","otter-blocks"),value:"none"},{label:(0,t.__)("Slow","otter-blocks"),value:"slow"},{label:(0,t.__)("Slower","otter-blocks"),value:"slower"},{label:(0,t.__)("Fast","otter-blocks"),value:"fast"},{label:(0,t.__)("Faster","otter-blocks"),value:"faster"}];var _=function l({animationsList:n,updateAnimation:u,currentAnimationLabel:s,setCurrentAnimationLabel:r}){const c=(0,a.useInstanceId)(l),[i,_]=(0,e.useState)(""),[d,v]=(0,e.useState)(!1),m=`inspector-themeisle-animations-control-${c}`;return(0,e.createElement)(o.BaseControl,{label:(0,t.__)("Animation","otter-blocks"),id:m},(0,e.createElement)(o.Dropdown,{contentClassName:"themeisle-animations-control__popover",position:"bottom center",renderToggle:({isOpen:t,onToggle:l})=>(0,e.createElement)(o.Button,{isLarge:!0,className:"themeisle-animations-control__button",id:m,onClick:l,"aria-expanded":t},s),renderContent:({onToggle:l})=>(0,e.createElement)(o.MenuGroup,{label:(0,t.__)("Animations","otter-blocks")},(0,e.createElement)(o.TextControl,{placeholder:(0,t.__)("Search","otter-blocks"),value:i,onChange:e=>{_(e),v(!1)}}),(0,e.createElement)("div",{className:"components-popover__items"},n.map((t=>(0,e.createElement)(e.Fragment,null,""===i&&b.map((l=>l.value===t.value?(0,e.createElement)("div",{className:"themeisle-animations-control__category"},l.label):"")),((t,l)=>{let a=!0;return i&&i.toLowerCase().split(" ").forEach((e=>{t.label.toLowerCase().includes(e)||(a=!1)})),a&&!d&&v(!0),a&&(0,e.createElement)(o.MenuItem,{className:s===t.label?"is-selected":"",onClick:()=>{r(t.label),u(t.value),l()}},t.label)})(t,l)))),!d&&(0,e.createElement)("div",null,(0,t.__)("Nothing found. Try searching for something else!","otter-blocks"))))}))},d=function({attributes:l,clientId:a,setAttributes:n}){(0,e.useEffect)((()=>{let e;if(l.className){e=l.className,e=e.split(" ");const t=Array.from(s).find((t=>e.find((e=>e===t.value)))),o=Array.from(c).find((t=>e.find((e=>e===t.value)))),a=Array.from(i).find((t=>e.find((e=>e===t.value))));b(t?t.value:"none"),v(o?o.value:"default"),k(a?a.value:"default"),f(t?t.label:"none")}}),[]);const[u,b]=(0,e.useState)("none"),[d,v]=(0,e.useState)("default"),[m,k]=(0,e.useState)("default"),[p,f]=(0,e.useState)("none");return(0,e.createElement)("div",{className:"themeisle-animations-control"},(0,e.createElement)(_,{animationsList:s,updateAnimation:e=>{let t,o="none"!==e?e:"";if(l.className){t=l.className,t=t.split(" ");const e=t.find((e=>e===u));t.find((e=>"animated"===e))||t.push("animated"),e?t=t.join(" ").replace(u,o):(t.push(o),t=t.join(" "))}else t=`animated ${o}`;"none"===e&&(t=t.replace("animated","").replace(d,"").replace(m,""),v("default"),k("default")),t=t.replace(/\s+/g," ").trim(),""===t&&(t=void 0),b(e),n({className:t});let s=document.querySelector(`#block-${a} .animated`);s&&r.forEach((e=>{s.className.includes(e)&&s.addEventListener("animationend",(()=>{s.classList.remove(e),s.addEventListener("animationstart",(()=>{s.classList.remove(e)}))}))}))},currentAnimationLabel:p,setCurrentAnimationLabel:f}),"none"!==u&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o.SelectControl,{label:(0,t.__)("Delay","otter-blocks"),value:d||"default",options:c,onChange:e=>{let t,o="none"!==e?e:"";l.className?(t=l.className,t=t.split(" "),t.find((e=>e===d))?t=t.join(" ").replace(d,o):(t.push(o),t=t.join(" "))):t=o,t=t.replace(/\s+/g," "),v(e),n({className:t})}}),(0,e.createElement)(o.SelectControl,{label:(0,t.__)("Speed","otter-blocks"),value:m||"default",options:i,onChange:e=>{let t,o="none"!==e?e:"";l.className?(t=l.className,t=t.split(" "),t.find((e=>e===m))?t=t.join(" ").replace(m,o):(t.push(o),t=t.join(" "))):t=o,t=t.replace(/\s+/g," "),k(e),n({className:t})}})))};const v=(0,a.createHigherOrderComponent)((a=>u=>(0,l.hasBlockSupport)(u.name,"customClassName",!0)&&u.isSelected?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a,u),(0,e.createElement)(n.InspectorControls,null,(0,e.createElement)(o.PanelBody,{title:(0,t.__)("Animations","otter-blocks"),initialOpen:!1},(0,e.createElement)(d,{clientId:u.clientId,setAttributes:u.setAttributes,attributes:u.attributes})))):(0,e.createElement)(a,u)),"withInspectorControl");(0,u.addFilter)("editor.BlockEdit","themeisle-custom-css/with-inspector-controls",v)}();
1
+ !function(){"use strict";var e=window.wp.element,t=window.wp.i18n,l=window.wp.blocks,o=window.wp.components,a=window.wp.compose,n=window.wp.blockEditor,u=window.wp.hooks;const s=[{label:(0,t.__)("None","otter-blocks"),value:"none"},{label:(0,t.__)("Bounce","otter-blocks"),value:"bounce"},{label:(0,t.__)("Bounce In","otter-blocks"),value:"bounceIn"},{label:(0,t.__)("Bounce In Down","otter-blocks"),value:"bounceInDown"},{label:(0,t.__)("Bounce In Left","otter-blocks"),value:"bounceInLeft"},{label:(0,t.__)("Bounce In Right","otter-blocks"),value:"bounceInRight"},{label:(0,t.__)("Bounce In Up","otter-blocks"),value:"bounceInUp"},{label:(0,t.__)("Bounce Out","otter-blocks"),value:"bounceOut"},{label:(0,t.__)("Bounce Out Down","otter-blocks"),value:"bounceOutDown"},{label:(0,t.__)("Bounce Out Left","otter-blocks"),value:"bounceOutLeft"},{label:(0,t.__)("Bounce Out Right","otter-blocks"),value:"bounceOutRight"},{label:(0,t.__)("Bounce Out Up","otter-blocks"),value:"bounceOutUp"},{label:(0,t.__)("Fade In","otter-blocks"),value:"fadeIn"},{label:(0,t.__)("Fade In Down","otter-blocks"),value:"fadeInDown"},{label:(0,t.__)("Fade In Down Big","otter-blocks"),value:"fadeInDownBig"},{label:(0,t.__)("Fade In Left","otter-blocks"),value:"fadeInLeft"},{label:(0,t.__)("Fade In Left Big","otter-blocks"),value:"fadeInLeftBig"},{label:(0,t.__)("Fade In Right","otter-blocks"),value:"fadeInRight"},{label:(0,t.__)("Fade In Right Big","otter-blocks"),value:"fadeInRightBig"},{label:(0,t.__)("Fade In Up","otter-blocks"),value:"fadeInUp"},{label:(0,t.__)("Fade Out","otter-blocks"),value:"fadeOut"},{label:(0,t.__)("Fade Out Down","otter-blocks"),value:"fadeOutDown"},{label:(0,t.__)("Fade Out Down Big","otter-blocks"),value:"fadeOutDownBig"},{label:(0,t.__)("Fade Out Left","otter-blocks"),value:"fadeOutLeft"},{label:(0,t.__)("Fade Out Left Big","otter-blocks"),value:"fadeOutLeftBig"},{label:(0,t.__)("Fade Out Right","otter-blocks"),value:"fadeOutRight"},{label:(0,t.__)("Fade Out Right Big","otter-blocks"),value:"fadeOutRightBig"},{label:(0,t.__)("Fade Out Up","otter-blocks"),value:"fadeOutUp"},{label:(0,t.__)("Fade Out Up Big","otter-blocks"),value:"fadeOutUpBig"},{label:(0,t.__)("Flip","otter-blocks"),value:"flip"},{label:(0,t.__)("Flip In X","otter-blocks"),value:"flipInX"},{label:(0,t.__)("Flip In Y","otter-blocks"),value:"flipInY"},{label:(0,t.__)("Flip Out X","otter-blocks"),value:"flipOutX"},{label:(0,t.__)("Flip Out Y","otter-blocks"),value:"flipOutY"},{label:(0,t.__)("Rotate In","otter-blocks"),value:"rotateIn"},{label:(0,t.__)("Rotate In Down Left","otter-blocks"),value:"rotateInDownLeft"},{label:(0,t.__)("Rotate In Down Right","otter-blocks"),value:"rotateInDownRight"},{label:(0,t.__)("Rotate In Up Left","otter-blocks"),value:"rotateInUpLeft"},{label:(0,t.__)("Rotate In Up Right","otter-blocks"),value:"rotateInUpRight"},{label:(0,t.__)("Rotate Out","otter-blocks"),value:"rotateOut"},{label:(0,t.__)("Rotate Out Down Left","otter-blocks"),value:"rotateOutDownLeft"},{label:(0,t.__)("Rotate Out Down Right","otter-blocks"),value:"rotateOutDownRight"},{label:(0,t.__)("Rotate Out Up Left","otter-blocks"),value:"rotateOutUpLeft"},{label:(0,t.__)("Rotate Out Up Right","otter-blocks"),value:"rotateOutUpRight"},{label:(0,t.__)("Slide In Down","otter-blocks"),value:"slideInDown"},{label:(0,t.__)("Slide In Left","otter-blocks"),value:"slideInLeft"},{label:(0,t.__)("Slide In Right","otter-blocks"),value:"slideInRight"},{label:(0,t.__)("Slide In Up","otter-blocks"),value:"slideInUp"},{label:(0,t.__)("Slide Out Down","otter-blocks"),value:"slideOutDown"},{label:(0,t.__)("Slide Out Left","otter-blocks"),value:"slideOutLeft"},{label:(0,t.__)("Slide Out Right","otter-blocks"),value:"slideOutRight"},{label:(0,t.__)("Slide Out Up","otter-blocks"),value:"slideOutUp"},{label:(0,t.__)("Zoom In","otter-blocks"),value:"zoomIn"},{label:(0,t.__)("Zoom In Down","otter-blocks"),value:"zoomInDown"},{label:(0,t.__)("Zoom In Left","otter-blocks"),value:"zoomInLeft"},{label:(0,t.__)("Zoom In Right","otter-blocks"),value:"zoomInRight"},{label:(0,t.__)("Zoom In Up","otter-blocks"),value:"zoomInUp"},{label:(0,t.__)("Zoom Out","otter-blocks"),value:"zoomOut"},{label:(0,t.__)("Zoom Out Down","otter-blocks"),value:"zoomOutDown"},{label:(0,t.__)("Zoom Out Left","otter-blocks"),value:"zoomOutLeft"},{label:(0,t.__)("Zoom Out Right","otter-blocks"),value:"zoomOutRight"},{label:(0,t.__)("Zoom Out Up","otter-blocks"),value:"zoomOutUp"},{label:(0,t.__)("Roll In","otter-blocks"),value:"rollIn"},{label:(0,t.__)("Roll Out","otter-blocks"),value:"rollOut"},{label:(0,t.__)("Light Speed In","otter-blocks"),value:"lightSpeedIn"},{label:(0,t.__)("Light Speed Out","otter-blocks"),value:"lightSpeedOut"},{label:(0,t.__)("Flash","otter-blocks"),value:"flash"},{label:(0,t.__)("Pulse","otter-blocks"),value:"pulse"},{label:(0,t.__)("Rubber Band","otter-blocks"),value:"rubberBand"},{label:(0,t.__)("Shake","otter-blocks"),value:"shake"},{label:(0,t.__)("Head Shake","otter-blocks"),value:"headShake"},{label:(0,t.__)("Swing","otter-blocks"),value:"swing"},{label:(0,t.__)("TaDa","otter-blocks"),value:"tada"},{label:(0,t.__)("Wobble","otter-blocks"),value:"wobble"},{label:(0,t.__)("Jello","otter-blocks"),value:"jello"},{label:(0,t.__)("Heart Beat","otter-blocks"),value:"heartBeat"},{label:(0,t.__)("Hinge","otter-blocks"),value:"hinge"},{label:(0,t.__)("Jack In The Box","otter-blocks"),value:"jackInTheBox"}],b=[{label:(0,t.__)("Bouncing","otter-blocks"),value:"bounce"},{label:(0,t.__)("Fading","otter-blocks"),value:"fadeIn"},{label:(0,t.__)("Flipping","otter-blocks"),value:"flip"},{label:(0,t.__)("Rotating","otter-blocks"),value:"rotateIn"},{label:(0,t.__)("Sliding","otter-blocks"),value:"slideInDown"},{label:(0,t.__)("Zooming","otter-blocks"),value:"zoomIn"},{label:(0,t.__)("Rolling","otter-blocks"),value:"rollIn"},{label:(0,t.__)("Other","otter-blocks"),value:"lightSpeedIn"}],r=["bounceOut","bounceOutDown","bounceOutLeft","bounceOutRight","bounceOutUp","fadeOut","fadeOutDown","fadeOutDownBig","fadeOutLeft","fadeOutLeftBig","fadeOutRight","fadeOutRightBig","fadeOutUp","fadeOutUpBig","flipOutX","flipOutY","lightSpeedOut","rotateOut","rotateOutDownLeft","rotateOutDownRight","rotateOutUpLeft","rotateOutUpRight","slideOutDown","slideOutLeft","slideOutRight","slideOutUp","zoomOut","zoomOutDown","zoomOutLeft","zoomOutRight","zoomOutUp","rollOut"],c=[{label:(0,t.__)("None","otter-blocks"),value:"none"},{label:(0,t.__)("100 Milliseconds","otter-blocks"),value:"delay-100ms"},{label:(0,t.__)("200 Milliseconds","otter-blocks"),value:"delay-200ms"},{label:(0,t.__)("500 Milliseconds","otter-blocks"),value:"delay-500ms"},{label:(0,t.__)("One Second","otter-blocks"),value:"delay-1s"},{label:(0,t.__)("Two Second","otter-blocks"),value:"delay-2s"},{label:(0,t.__)("Three Second","otter-blocks"),value:"delay-3s"},{label:(0,t.__)("Four Second","otter-blocks"),value:"delay-4s"},{label:(0,t.__)("Five Second","otter-blocks"),value:"delay-5s"}],i=[{label:(0,t.__)("Default","otter-blocks"),value:"none"},{label:(0,t.__)("Slow","otter-blocks"),value:"slow"},{label:(0,t.__)("Slower","otter-blocks"),value:"slower"},{label:(0,t.__)("Fast","otter-blocks"),value:"fast"},{label:(0,t.__)("Faster","otter-blocks"),value:"faster"}];var _=function l({animationsList:n,updateAnimation:u,currentAnimationLabel:s,setCurrentAnimationLabel:r}){const c=(0,a.useInstanceId)(l),[i,_]=(0,e.useState)(""),[d,v]=(0,e.useState)(!1),m=`inspector-themeisle-animations-control-${c}`;return(0,e.createElement)(o.BaseControl,{label:(0,t.__)("Animation","otter-blocks"),id:m},(0,e.createElement)(o.Dropdown,{contentClassName:"themeisle-animations-control__popover",position:"bottom center",renderToggle:({isOpen:t,onToggle:l})=>(0,e.createElement)(o.Button,{className:"themeisle-animations-control__button",id:m,onClick:l,"aria-expanded":t},s),renderContent:({onToggle:l})=>(0,e.createElement)(o.MenuGroup,{label:(0,t.__)("Animations","otter-blocks")},(0,e.createElement)(o.TextControl,{placeholder:(0,t.__)("Search","otter-blocks"),value:i,onChange:e=>{_(e),v(!1)}}),(0,e.createElement)("div",{className:"components-popover__items"},n.map((t=>(0,e.createElement)(e.Fragment,null,""===i&&b.map((l=>l.value===t.value?(0,e.createElement)("div",{className:"themeisle-animations-control__category"},l.label):"")),((t,l)=>{let a=!0;return i&&i.toLowerCase().split(" ").forEach((e=>{t.label.toLowerCase().includes(e)||(a=!1)})),a&&!d&&v(!0),a&&(0,e.createElement)(o.MenuItem,{className:s===t.label?"is-selected":"",onClick:()=>{r(t.label),u(t.value),l()}},t.label)})(t,l)))),!d&&(0,e.createElement)("div",null,(0,t.__)("Nothing found. Try searching for something else!","otter-blocks"))))}))},d=function({attributes:l,clientId:a,setAttributes:n}){(0,e.useEffect)((()=>{let e;if(l.className){e=l.className,e=e.split(" ");const t=Array.from(s).find((t=>e.find((e=>e===t.value)))),o=Array.from(c).find((t=>e.find((e=>e===t.value)))),a=Array.from(i).find((t=>e.find((e=>e===t.value))));b(t?t.value:"none"),v(o?o.value:"default"),k(a?a.value:"default"),f(t?t.label:"none")}}),[]);const[u,b]=(0,e.useState)("none"),[d,v]=(0,e.useState)("default"),[m,k]=(0,e.useState)("default"),[p,f]=(0,e.useState)("none");return(0,e.createElement)("div",{className:"themeisle-animations-control"},(0,e.createElement)(_,{animationsList:s,updateAnimation:e=>{let t,o="none"!==e?e:"";if(l.className){t=l.className,t=t.split(" ");const e=t.find((e=>e===u));t.find((e=>"animated"===e))||t.push("animated"),e?t=t.join(" ").replace(u,o):(t.push(o),t=t.join(" "))}else t=`animated ${o}`;"none"===e&&(t=t.replace("animated","").replace(d,"").replace(m,""),v("default"),k("default")),t=t.replace(/\s+/g," ").trim(),""===t&&(t=void 0),b(e),n({className:t});let s=document.querySelector(`#block-${a} .animated`);s&&r.forEach((e=>{s.className.includes(e)&&s.addEventListener("animationend",(()=>{s.classList.remove(e),s.addEventListener("animationstart",(()=>{s.classList.remove(e)}))}))}))},currentAnimationLabel:p,setCurrentAnimationLabel:f}),"none"!==u&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o.SelectControl,{label:(0,t.__)("Delay","otter-blocks"),value:d||"default",options:c,onChange:e=>{let t,o="none"!==e?e:"";l.className?(t=l.className,t=t.split(" "),t.find((e=>e===d))?t=t.join(" ").replace(d,o):(t.push(o),t=t.join(" "))):t=o,t=t.replace(/\s+/g," "),v(e),n({className:t})}}),(0,e.createElement)(o.SelectControl,{label:(0,t.__)("Speed","otter-blocks"),value:m||"default",options:i,onChange:e=>{let t,o="none"!==e?e:"";l.className?(t=l.className,t=t.split(" "),t.find((e=>e===m))?t=t.join(" ").replace(m,o):(t.push(o),t=t.join(" "))):t=o,t=t.replace(/\s+/g," "),k(e),n({className:t})}})))};const v=(0,a.createHigherOrderComponent)((a=>u=>(0,l.hasBlockSupport)(u.name,"customClassName",!0)&&u.isSelected?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a,u),(0,e.createElement)(n.InspectorControls,null,(0,e.createElement)(o.PanelBody,{title:(0,t.__)("Animations","otter-blocks"),initialOpen:!1},(0,e.createElement)(d,{clientId:u.clientId,setAttributes:u.setAttributes,attributes:u.attributes})))):(0,e.createElement)(a,u)),"withInspectorControl");(0,u.addFilter)("editor.BlockEdit","themeisle-custom-css/with-inspector-controls",v)}();
build/blocks/blocks.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-api', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render'), 'version' => 'a88fd752d209436638ba0183ac67f5a7');
1
+ <?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-api', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render'), 'version' => '1b4b289959834b7a833d2752337ac702');
build/blocks/blocks.js CHANGED
@@ -13,7 +13,7 @@
13
  background: ${e.contentBackground};
14
  border-color: ${e.borderColor};
15
  }
16
- `;return(0,d.tZ)(c.Fragment,null,(0,d.tZ)(u,{attributes:e,setAttributes:t}),(0,d.tZ)("div",{id:e.id,className:s()(l,{[`is-${e.gap}-gap`]:e.gap}),css:r},(0,d.tZ)(m.InnerBlocks,{allowedBlocks:["themeisle-blocks/accordion-item"],template:[["themeisle-blocks/accordion-item"]],renderAppender:a?m.InnerBlocks.ButtonBlockAppender:""})))},save:({attributes:e,className:t})=>(0,c.createElement)("div",{id:e.id,className:s()(t,{[`is-${e.gap}-gap`]:e.gap})},(0,c.createElement)(m.InnerBlocks.Content,null))})},7767:function(e,t,l){l(6299),l(3443)},3443:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9307),c=l(6015),i=l(3904),s=l(2175),d=l(5609),m=({attributes:e,setAttributes:t})=>(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(d.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,n.createElement)(d.ToggleControl,{label:(0,o.__)("Initially Open","otter-blocks"),checked:e.initialOpen,onChange:e=>t({initialOpen:e})})));(0,a.registerBlockType)("themeisle-blocks/accordion-item",{title:(0,o.__)("Accordion Item","otter-blocks"),description:(0,o.__)("Vertically collapsing accordions perfect for displaying your FAQs.","otter-blocks"),parent:["themeisle-blocks/accordion"],icon:r.Se,category:"themeisle-blocks",keywords:["accordions","collapse","faq"],attributes:{title:{type:"string"},initialOpen:{type:"boolean",default:!1}},supports:{reusable:!1},edit:({attributes:e,className:t,setAttributes:l})=>{const[a,r]=(0,n.useState)(!0);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(m,{attributes:e,setAttributes:l}),(0,n.createElement)("div",{className:t},(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-accordion-item__title",onClick:e=>{"string"==typeof e.target.className&&e.target.className.includes("block-editor-rich-text__editable")?r(!0):r(!a)}},(0,n.createElement)(s.RichText,{placeholder:(0,o.__)("Add text…","otter-blocks"),value:e.title,onChange:e=>{a||r(!0),l({title:e})},tagName:"span"}),(0,n.createElement)(d.Icon,{icon:a?c.Z:i.Z,size:24})),a&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-accordion-item__content"},(0,n.createElement)(s.InnerBlocks,{template:[["core/paragraph"]]}))))},save:({attributes:e,className:t})=>(0,n.createElement)("details",{className:t,open:!!e.initialOpen},(0,n.createElement)("summary",{className:"wp-block-themeisle-blocks-accordion-item__title"},(0,n.createElement)(s.RichText.Content,{tagName:"div",value:e.title})),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-accordion-item__content"},(0,n.createElement)(s.InnerBlocks.Content,null)))})},4933:function(e,t,l){var o=l(9307),a=l(5736),r=l(4981),n=l(5609),c=l(1526),i={product:{type:"number"}},s=l(8423),d=l.n(s),m=l(4779);Boolean(window.themeisleGutenberg.hasNeveSupport.isBoosterActive)&&Boolean(window.themeisleGutenberg.hasWooCommerce)?(0,r.registerBlockType)("themeisle-blocks/add-to-cart-button",{title:(0,a.__)("Add to Cart Button","otter-blocks"),description:(0,a.__)("Display an Add to Cart button for your WooCommerce products.","otter-blocks"),icon:c.Z,category:"themeisle-blocks",keywords:["woocommerce","add to cart","products"],attributes:i,styles:[{name:"default",label:(0,a.__)("Default","otter-blocks"),isDefault:!0},{name:"primary",label:(0,a.__)("Primary","otter-blocks")},{name:"secondary",label:(0,a.__)("Secondary","otter-blocks")}],edit:({attributes:e,setAttributes:t})=>e.product?(0,o.createElement)(n.Disabled,null,(0,o.createElement)(d(),{block:"themeisle-blocks/add-to-cart-button",attributes:{...e}})):(0,o.createElement)(n.Placeholder,{icon:c.Z,label:(0,a.__)("Add to Cart Button","otter-blocks"),instructions:(0,a.__)("Select a WooCommerce product for the Add to Cart button.","otter-blocks")},(0,o.createElement)(m.Z,{label:(0,a.__)("Select Product","otter-blocks"),hideLabelFromVision:!0,value:e.product,onChange:e=>t({product:Number(e)})})),save:()=>null}):(0,r.registerBlockType)("themeisle-blocks/add-to-cart-button",{title:(0,a.__)("Add to Cart Button","otter-blocks"),description:(0,a.__)("Display an Add to Cart button for your WooCommerce products.","otter-blocks"),icon:c.Z,category:"themeisle-blocks",keywords:["woocommerce","add to cart","products"],attributes:i,supports:{inserter:!1},edit:()=>(0,o.createElement)(n.Placeholder,null,(0,a.__)("You need to have Neve Pro & WooCommerce installed to edit Add to Cart Button block.","otter-blocks")),save:()=>null})},2093:function(e,t,l){var o=l(5736),a=l(4981),r=l(9307),n=l(6713),c=window.wp.richText,i=l(2175);const s="themeisle-blocks/highlight";(0,c.registerFormatType)(s,{name:s,title:(0,o.__)("Highlight","otter-blocks"),tagName:"span",className:"highlight",edit:({isActive:e,value:t,onChange:l})=>{const a=()=>l((0,c.toggleFormat)(t,{type:s}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.RichTextShortcut,{type:"primary",character:"h",onUse:a}),(0,r.createElement)(i.RichTextToolbarButton,{icon:n.Z,title:(0,o.__)("Highlight","otter-blocks"),onClick:a,isActive:e,shortcutType:"access",shortcutCharacter:"h"}))}});var d=l(340),m={id:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6,div,p,span",default:""},tag:{default:"h2",type:"string"},align:{type:"string"},alignTablet:{type:"string"},alignMobile:{type:"string"},headingColor:{type:"string",default:"#000000"},highlightColor:{type:"string"},highlightBackground:{type:"string"},fontSize:{type:"number"},fontSizeTablet:{type:"number"},fontSizeMobile:{type:"number"},fontFamily:{type:"string"},fontVariant:{type:"string"},fontStyle:{type:"string"},textTransform:{type:"string"},lineHeight:{type:"number"},letterSpacing:{type:"number"},textShadow:{type:"boolean",default:!1},textShadowColor:{type:"string",default:"#000000"},textShadowColorOpacity:{type:"number",default:50},textShadowBlur:{type:"number",default:5},textShadowHorizontal:{type:"number",default:0},textShadowVertical:{type:"number",default:0},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:0},paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTop:{type:"number",default:0},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRight:{type:"number",default:0},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottom:{type:"number",default:0},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeft:{type:"number",default:0},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:0},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTop:{type:"number",default:0},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginBottom:{type:"number",default:25},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"}},b=l(4184),u=l.n(b),p=l(80),g=l.n(p);var h=[{attributes:{id:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6,div,p,span",default:""},tag:{default:"h2",type:"string"},align:{type:"string"},alignTablet:{type:"string"},alignMobile:{type:"string"},headingColor:{type:"string",default:"#000000"},highlightColor:{type:"string"},highlightBackground:{type:"string"},fontSize:{type:"number"},fontSizeTablet:{type:"number"},fontSizeMobile:{type:"number"},fontFamily:{type:"string"},fontVariant:{type:"string"},fontStyle:{type:"string",default:"normal"},textTransform:{type:"string",default:"none"},lineHeight:{type:"number"},letterSpacing:{type:"number"},textShadow:{type:"boolean",default:!1},textShadowColor:{type:"string",default:"#000000"},textShadowColorOpacity:{type:"number",default:50},textShadowBlur:{type:"number",default:5},textShadowHorizontal:{type:"number",default:0},textShadowVertical:{type:"number",default:0},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:0},paddingTablet:{type:"number",default:0},paddingMobile:{type:"number",default:0},paddingTop:{type:"number",default:0},paddingTopTablet:{type:"number",default:0},paddingTopMobile:{type:"number",default:0},paddingRight:{type:"number",default:0},paddingRightTablet:{type:"number",default:0},paddingRightMobile:{type:"number",default:0},paddingBottom:{type:"number",default:0},paddingBottomTablet:{type:"number",default:0},paddingBottomMobile:{type:"number",default:0},paddingLeft:{type:"number",default:0},paddingLeftTablet:{type:"number",default:0},paddingLeftMobile:{type:"number",default:0},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:0},marginTablet:{type:"number",default:0},marginMobile:{type:"number",default:0},marginTop:{type:"number",default:0},marginTopTablet:{type:"number",default:0},marginTopMobile:{type:"number",default:0},marginBottom:{type:"number",default:25},marginBottomTablet:{type:"number",default:25},marginBottomMobile:{type:"number",default:20}},save:({attributes:e,className:t})=>{let l;e.textShadow&&(l={textShadow:`${e.textShadowHorizontal}px ${e.textShadowVertical}px ${e.textShadowBlur}px ${g()(e.textShadowColor?e.textShadowColor:"#000000",e.textShadowColorOpacity)}`});const o={color:e.headingColor,fontFamily:e.fontFamily,fontWeight:"regular"===e.fontVariant?"normal":e.fontVariant,fontStyle:e.fontStyle,textTransform:e.textTransform,lineHeight:e.lineHeight&&`${e.lineHeight}px`,letterSpacing:e.letterSpacing&&`${e.letterSpacing}px`,...l};return(0,r.createElement)(i.RichText.Content,{tagName:e.tag,value:e.content,id:e.id,className:u()(e.id,t),style:o})}}],k={from:[{type:"block",blocks:["core/heading"],transform:({content:e})=>(0,a.createBlock)("themeisle-blocks/advanced-heading",{content:e})},{type:"block",blocks:["core/paragraph"],transform:({content:e})=>(0,a.createBlock)("themeisle-blocks/advanced-heading",{content:e})}],to:[{type:"block",blocks:["core/paragraph"],transform:({content:e})=>(0,a.createBlock)("core/paragraph",{content:e})}]},v=l(5988),y=l(2819),_=l(4333),w=l(9818),f=l(5225),C=l(5609),E=l(9977),T=({attributes:e,setAttributes:t})=>{const l=e=>{t(e?{fontFamily:e,fontVariant:"normal",fontStyle:"normal"}:{fontFamily:e,fontVariant:e})},a=e=>{switch(e){case"h1":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H1"));case"h2":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H2"));case"h3":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H3"));case"h4":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H4"));case"h5":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H5"));case"h6":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H6"));case"div":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"DIV"));case"p":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{x:"0",y:"15"},"P"));case"span":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"SPAN"));default:return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"DEFAULT"))}},n=e=>{t({tag:e})};return(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(C.DropdownMenu,{icon:a(e.tag),label:(0,o.__)("Select tag","otter-blocks"),className:"components-toolbar",controls:[{title:(0,o.__)("Heading","otter-blocks")+" 1",icon:a("h1"),onClick:()=>n("h1")},{title:(0,o.__)("Heading","otter-blocks")+" 2",icon:a("h2"),onClick:()=>n("h2")},{title:(0,o.__)("Heading","otter-blocks")+" 3",icon:a("h3"),onClick:()=>n("h3")},{title:(0,o.__)("Heading","otter-blocks")+" 4",icon:a("h4"),onClick:()=>n("h4")},{title:(0,o.__)("Heading","otter-blocks")+" 5",icon:a("h5"),onClick:()=>n("h5")},{title:(0,o.__)("Heading","otter-blocks")+" 6",icon:a("h6"),onClick:()=>n("h6")},{title:(0,o.__)("Division","otter-blocks"),icon:a("div"),onClick:()=>n("div")},{title:(0,o.__)("Paragraph","otter-blocks"),icon:a("p"),onClick:()=>n("p")},{title:(0,o.__)("Span Tag","otter-blocks"),icon:a("span"),onClick:()=>n("span")}]}),(0,r.createElement)(C.Toolbar,null,(0,r.createElement)(C.Dropdown,{contentClassName:"wp-themesiel-blocks-advanced-heading-popover-content",position:"bottom center",renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(C.Button,{className:"components-dropdown-menu__toggle",icon:"editor-textcolor",onClick:t,"aria-haspopup":"true","aria-expanded":e,label:(0,o.__)("Typography Settings","otter-blocks"),showTooltip:!0},(0,r.createElement)("span",{className:"components-dropdown-menu__indicator"})),renderContent:()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(E.Z,{label:(0,o.__)("Font Family","otter-blocks"),value:e.fontFamily,onChangeFontFamily:l,valueVariant:e.fontVariant,onChangeFontVariant:e=>t({fontVariant:e}),valueStyle:e.fontStyle,onChangeFontStyle:e=>t({fontStyle:e}),valueTransform:e.textTransform,onChangeTextTransform:e=>t({textTransform:e})}),(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Line Height","otter-blocks"),value:e.lineHeight,onChange:e=>t({lineHeight:e}),min:0,step:.1,max:3}),(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Letter Spacing","otter-blocks"),value:e.letterSpacing,onChange:e=>t({letterSpacing:e}),min:-50,max:100}))})))},x=l(6778),M=l(2136),S=l(6993),B=l(2372),z=l(1661),P=({values:e,setAttributes:t})=>(0,r.createElement)("div",{className:"otter-clear-button"},(0,r.createElement)(C.Button,{isSmall:!0,isSecondary:!0,onClick:()=>{const l=((0,y.isArray)(e)?e:[e]).map((e=>{if((0,y.isString)(e))return e;if((0,y.isObject)(e)){const t=Object.keys(e);if(1===t.length)return e[t[0]]?t[0]:void 0}})).filter(y.isString).reduce(((e,t)=>(e[t]=void 0,e)),{});t(l)}},(0,o.__)("Clear","otter-blocks"))),N=({attributes:e,setAttributes:t})=>{const l=(0,w.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=!!e("core/edit-post")&&e("core/edit-post");return l?l():t()}),[]),[a,n]=(0,r.useState)("style"),c={top:"paddingTop",right:"paddingRight",bottom:"paddingBottom",left:"paddingLeft"},s={top:"paddingTopTablet",right:"paddingRightTablet",bottom:"paddingBottomTablet",left:"paddingLeftTablet"},d={top:"paddingTopMobile",right:"paddingRightMobile",bottom:"paddingBottomMobile",left:"paddingLeftMobile"},m=t=>{if("top"==t)switch(l){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingTop;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingTopTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingTopMobile}else if("right"==t)switch(l){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingRight;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingRightTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingRightMobile}else if("bottom"==t)switch(l){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingBottom;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingBottomTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingBottomMobile}else if("left"==t)switch(l){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingLeft;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingLeftTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingLeftMobile}},b={top:"marginTop",bottom:"marginBottom"},p={top:"marginTopTablet",bottom:"marginBottomTablet"},g={top:"marginTopMobile",bottom:"marginBottomMobile"},h=t=>{if("top"==t)switch(l){case"Desktop":return"linked"===e.marginType?e.margin:e.marginTop;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginTopTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginTopMobile}else if("bottom"==t)switch(l){case"Desktop":return"linked"===e.marginType?e.margin:e.marginBottom;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginBottomTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginBottomMobile}};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(C.PanelBody,{className:"wp-block-themeisle-blocks-advanced-heading-header-panel"},(0,r.createElement)(C.Button,{className:u()("header-tab",{"is-selected":"style"===a}),onClick:()=>n("style")},(0,r.createElement)("span",null,(0,r.createElement)(C.Dashicon,{icon:"admin-customizer"}),(0,o.__)("Style","otter-blocks"))),(0,r.createElement)(C.Button,{className:u()("header-tab",{"is-selected":"advanced"===a}),onClick:()=>n("advanced")},(0,r.createElement)("span",null,(0,r.createElement)(C.Dashicon,{icon:"admin-generic"}),(0,o.__)("Advanced","otter-blocks")))),"style"===a&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(C.PanelBody,{title:(0,o.__)("General Settings","otter-blocks"),className:"o-adv-h-panel"},(0,r.createElement)(x.Z,{label:(0,o.__)("Heading Color","otter-blocks"),colorValue:e.headingColor},(0,r.createElement)(i.ColorPalette,{label:(0,o.__)("Heading Color","otter-blocks"),value:e.headingColor,onChange:e=>t({headingColor:e})})),(0,r.createElement)(S.Z,{label:(0,o.__)("Font Size","otter-blocks")},(0,r.createElement)(C.RangeControl,{value:(()=>{switch(l){case"Desktop":return e.fontSize;case"Tablet":return e.fontSizeTablet;case"Mobile":return e.fontSizeMobile;default:return}})()||"",onChange:e=>{"Desktop"===l?t({fontSize:e}):"Tablet"===l?t({fontSizeTablet:e}):"Mobile"===l&&t({fontSizeMobile:e})},min:1,max:500,allowReset:!0})),(0,r.createElement)(S.Z,{label:(0,o.__)("Alignment","otter-blocks")},(0,r.createElement)(i.AlignmentToolbar,{value:(()=>{switch(l){case"Desktop":return e.align;case"Tablet":return e.alignTablet;case"Mobile":return e.alignMobile;default:return}})(),onChange:e=>{"Desktop"===l?t({align:e}):"Tablet"===l?t({alignTablet:e}):"Mobile"===l&&t({alignMobile:e})},isCollapsed:!1}))),(0,r.createElement)(C.PanelBody,{title:(0,o.__)("Typography Settings","otter-blocks"),initialOpen:!1},(0,r.createElement)(E.Z,{label:(0,o.__)("Font Family","otter-blocks"),value:e.fontFamily,onChangeFontFamily:e=>{t(e?{fontFamily:e,fontVariant:"normal",fontStyle:"normal"}:{fontFamily:e,fontVariant:e})},valueVariant:e.fontVariant,onChangeFontVariant:e=>t({fontVariant:e}),valueStyle:e.fontStyle,onChangeFontStyle:e=>t({fontStyle:e}),valueTransform:e.textTransform,onChangeTextTransform:e=>t({textTransform:e})}),(0,r.createElement)(P,{values:["fontFamily","fontVariant","fontStyle","textTransform"],setAttributes:t}),(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Line Height","otter-blocks"),value:e.lineHeight,onChange:e=>t({lineHeight:e}),min:0,step:.1,max:3,allowReset:!0}),(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Letter Spacing","otter-blocks"),value:e.letterSpacing,onChange:e=>t({letterSpacing:e}),min:-50,max:100,allowReset:!0}),(0,r.createElement)(C.ToggleControl,{label:(0,o.__)("Shadow Properties","otter-blocks"),checked:e.textShadow,onChange:e=>t({textShadow:e})}),e.textShadow&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(x.Z,{label:(0,o.__)("Color","otter-blocks"),colorValue:e.textShadowColor},(0,r.createElement)(i.ColorPalette,{label:(0,o.__)("Color","otter-blocks"),value:e.textShadowColor,onChange:e=>t({textShadowColor:e})})),(0,r.createElement)(M.Z,{label:(0,o.__)("Shadow Properties","otter-blocks")},(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:e.textShadowColorOpacity,onChange:e=>t({textShadowColorOpacity:e}),min:0,max:100}),(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:e.textShadowBlur,onChange:e=>t({textShadowBlur:e}),min:0,max:100}),(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:e.textShadowHorizontal,onChange:e=>t({textShadowHorizontal:e}),min:-100,max:100}),(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:e.textShadowVertical,onChange:e=>t({textShadowVertical:e}),min:-100,max:100})))))||"advanced"===a&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(C.PanelBody,{title:(0,o.__)("Highlight Color","otter-blocks")},(0,r.createElement)(x.Z,{label:(0,o.__)("Highlight Color","otter-blocks"),colorValue:e.highlightColor},(0,r.createElement)(i.ColorPalette,{label:(0,o.__)("Highlight Color","otter-blocks"),value:e.highlightColor,onChange:e=>t({highlightColor:e})})),(0,r.createElement)(x.Z,{label:(0,o.__)("Highlight Background","otter-blocks"),colorValue:e.highlightBackground},(0,r.createElement)(i.ColorPalette,{label:(0,o.__)("Highlight Background","otter-blocks"),value:e.highlightBackground,onChange:e=>t({highlightBackground:e})}))),(0,r.createElement)(C.PanelBody,{title:(0,o.__)("Spacing","otter-blocks"),initialOpen:!1},(0,r.createElement)(S.Z,{label:(0,o.__)("Padding","otter-blocks")},(0,r.createElement)(B.Z,{type:(()=>{switch(l){case"Desktop":return e.paddingType;case"Tablet":return e.paddingTypeTablet;case"Mobile":return e.paddingTypeMobile;default:return}})(),min:0,max:500,changeType:e=>{"Desktop"===l?t({paddingType:e}):"Tablet"===l?t({paddingTypeTablet:e}):"Mobile"===l&&t({paddingTypeMobile:e})},onChange:(o,a)=>{switch(l){case"Desktop":"linked"===e.paddingType?t({padding:a}):t({[c[o]]:a});break;case"Tablet":"linked"===e.paddingTypeTablet?t({paddingTablet:a}):t({[s[o]]:a});break;case"Mobile":"linked"===e.paddingTypeMobile?t({paddingMobile:a}):t({[d[o]]:a})}},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:m("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:m("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:m("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:m("left")}]})),(0,r.createElement)(P,{values:[{padding:"Desktop"===l&&"linked"===e.paddingType},{paddingTablet:"Tablet"===l&&"linked"===e.paddingType},{paddingMobile:"Mobile"===l&&"linked"===e.paddingType},{paddingRight:"Desktop"===l&&"linked"!==e.paddingType},{paddingRightTablet:"Tablet"===l&&"linked"!==e.paddingType},{paddingRightMobile:"Mobile"===l&&"linked"!==e.paddingType},{paddingTop:"Desktop"===l&&"linked"!==e.paddingType},{paddingTopTablet:"Tablet"===l&&"linked"!==e.paddingType},{paddingTopMobile:"Mobile"===l&&"linked"!==e.paddingType},{paddingBottom:"Desktop"===l&&"linked"!==e.paddingType},{paddingBottomTablet:"Tablet"===l&&"linked"!==e.paddingType},{paddingBottomMobile:"Mobile"===l&&"linked"!==e.paddingType},{paddingLeft:"Desktop"===l&&"linked"!==e.paddingType},{paddingLeftTablet:"Tablet"===l&&"linked"!==e.paddingType},{paddingLeftMobile:"Mobile"===l&&"linked"!==e.paddingType}],setAttributes:t}),(0,r.createElement)(S.Z,{label:(0,o.__)("Margin","otter-blocks")},(0,r.createElement)(B.Z,{type:(()=>{switch(l){case"Desktop":return e.marginType;case"Tablet":return e.marginTypeTablet;case"Mobile":return e.marginTypeMobile;default:return}})(),min:-500,max:500,changeType:e=>{switch(l){case"Desktop":t({marginType:e});break;case"Tablet":t({marginTypeTablet:e});break;case"Mobile":t({marginTypeMobile:e})}},onChange:(o,a)=>{switch(l){case"Desktop":"linked"===e.marginType?t({margin:a}):t({[b[o]]:a});break;case"Tablet":"linked"===e.marginTypeTablet?t({marginTablet:a}):t({[p[o]]:a});break;case"Mobile":"linked"===e.marginTypeMobile?t({marginMobile:a}):t({[g[o]]:a})}},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:h("top")},{label:(0,o.__)("Right","otter-blocks"),disabled:!0},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:h("bottom")},{label:(0,o.__)("Left","otter-blocks"),disabled:!0}]})),(0,r.createElement)(P,{values:[{margin:"Desktop"===l&&"linked"===e.marginType},{marginTablet:"Tablet"===l&&"linked"===e.marginType},{marginMobile:"Mobile"===l&&"linked"===e.marginType},{marginTop:"Desktop"===l&&"linked"!==e.marginType},{marginTopTablet:"Tablet"===l&&"linked"!==e.marginType},{marginTopMobile:"Mobile"===l&&"linked"!==e.marginType},{marginBottom:"Desktop"===l&&"linked"!==e.marginType},{marginBottomTablet:"Tablet"===l&&"linked"!==e.marginType},{marginBottomMobile:"Mobile"===l&&"linked"!==e.marginType}],setAttributes:t})))),(0,r.createElement)(z.Z,{value:e.id,onChange:e=>t({id:e})}))};(0,a.registerBlockType)("themeisle-blocks/advanced-heading",{title:(0,o.__)("Advanced Heading","otter-blocks"),description:(0,o.__)("Advanced Heading gives a spin to editor's Heading block with much needed customization options.","otter-blocks"),icon:d.cZ,category:"themeisle-blocks",keywords:["heading","title","advanced Heading"],attributes:m,deprecated:h,transforms:k,edit:({attributes:e,setAttributes:t,className:l,clientId:n,mergeBlocks:c,insertBlocksAfter:s,onReplace:d})=>{const{isViewportAvailable:b,isPreviewDesktop:p,isPreviewTablet:h,isPreviewMobile:k}=(0,w.useSelect)((e=>{const{__experimentalGetPreviewDeviceType:t}=!!e("core/edit-post")&&e("core/edit-post");return{isViewportAvailable:!!t,isPreviewDesktop:!!t&&"Desktop"===t(),isPreviewTablet:!!t&&"Tablet"===t(),isPreviewMobile:!!t&&"Mobile"===t()}}),[]),C=(0,_.useViewportMatch)("large",">="),E=(0,_.useViewportMatch)("large","<="),x=(0,_.useViewportMatch)("small",">="),M=(0,_.useViewportMatch)("small","<=");(0,r.useEffect)((()=>{const t=(0,f.WX)(n,m);return()=>t(e.id)}),[e.id]);let S,B,z,P=C&&!E&&x&&!M,L=!C&&!E&&x&&!M,R=!(C||E||x||M);b&&!R&&(P=p,L=h,R=k),P&&(S={fontSize:e.fontSize?`${e.fontSize}px`:void 0},B={textAlign:e.align,paddingTop:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingTop}px`,paddingRight:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingRight}px`,paddingBottom:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingBottom}px`,paddingLeft:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingLeft}px`,marginTop:"linked"===e.marginType?`${e.margin}px`:`${e.marginTop}px`,marginBottom:"linked"===e.marginType?`${e.margin}px`:`${e.marginBottom}px`}),L&&(S={fontSize:e.fontSizeTablet?`${e.fontSizeTablet}px`:void 0},B={textAlign:e.alignTablet,paddingTop:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingTopTablet}px`,paddingRight:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingRightTablet}px`,paddingBottom:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingBottomTablet}px`,paddingLeft:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingLeftTablet}px`,marginTop:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginTopTablet}px`,marginBottom:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginBottomTablet}px`}),R&&(S={fontSize:e.fontSizeMobile?`${e.fontSizeMobile}px`:void 0},B={textAlign:e.alignMobile,paddingTop:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingTopMobile}px`,paddingRight:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingRightMobile}px`,paddingBottom:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingBottomMobile}px`,paddingLeft:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingLeftMobile}px`,marginTop:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginTopMobile}px`,marginBottom:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginBottomMobile}px`}),e.textShadow&&(z={textShadow:`${e.textShadowHorizontal}px ${e.textShadowVertical}px ${e.textShadowBlur}px ${g()(e.textShadowColor?e.textShadowColor:"#000000",0<=e.textShadowColorOpacity?e.textShadowColorOpacity||1e-5:1)}`});const V=(0,y.omitBy)({color:e.headingColor,...S,fontFamily:e.fontFamily||void 0,fontWeight:"regular"===e.fontVariant?"normal":e.fontVariant,fontStyle:e.fontStyle||void 0,textTransform:e.textTransform||void 0,lineHeight:(3<e.lineHeight?e.lineHeight+"px":e.lineHeight)||void 0,letterSpacing:e.letterSpacing&&`${e.letterSpacing}px`,...B,...z},(e=>{var t;return null==e||null===(t=e.includes)||void 0===t?void 0:t.call(e,"undefined")}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("style",null,`.${e.id} mark, .${e.id} .highlight {\n\t\t\t\t\t\tcolor: ${e.highlightColor};\n\t\t\t\t\t\tbackground: ${e.highlightBackground};\n\t\t\t\t\t}`),e.fontFamily&&(0,r.createElement)(v.Z,{fonts:[{font:e.fontFamily,weights:e.fontVariant&&[e.fontVariant+("italic"===e.fontStyle?":i":"")]}]}),(0,r.createElement)(T,{attributes:e,setAttributes:t}),(0,r.createElement)(N,{attributes:e,setAttributes:t}),(0,r.createElement)(i.RichText,{identifier:"content",className:u()(e.id,l),value:e.content,placeholder:(0,o.__)("Write heading…","otter-blocks"),tagName:e.tag,formattingControls:["bold","italic","link","strikethrough","highlight"],allowedFormats:["core/bold","core/italic","core/link","core/strikethrough","themeisle-blocks/highlight"],onMerge:c,unstableOnSplit:s?(e,l,...o)=>{t({content:e}),s([...o,(0,a.createBlock)("core/paragraph",{content:l})])}:void 0,onRemove:()=>d([]),style:V,onChange:e=>{t({content:e})}}))},save:({attributes:e,className:t})=>(0,r.createElement)(i.RichText.Content,{tagName:e.tag,value:e.content,id:e.id,className:u()(e.id,t)})})},58:function(e,t,l){var o=l(9307),a=l(5736),r=l(4981),n=l(5609),c=l(6779),i={id:{type:"string"},title:{type:"string"},titleAlignment:{type:"string"},titleFontSize:{type:"number"},titleColor:{type:"string"},itemsFontSize:{type:"number"},backgroundColor:{type:"string"},gap:{type:"number"},borderWidth:{type:"number"},borderColor:{type:"string"},borderRadius:{type:"number"}},s=l(1216),d=l(2175),m=l(5225),b=({attributes:e,setAttributes:t})=>{const l=d.AlignmentControl||d.AlignmentToolbar;return(0,o.createElement)(d.BlockControls,null,(0,o.createElement)(l,{value:e.titleAlignment,onChange:e=>t({titleAlignment:e})}))},u=({attributes:e,setAttributes:t})=>(0,o.createElement)(d.InspectorControls,null,(0,o.createElement)(n.PanelBody,{title:(0,a.__)("Settings","otter-blocks")},(0,o.createElement)(n.RangeControl,{label:(0,a.__)("Gap","otter-blocks"),value:e.gap,onChange:e=>t({gap:Number(e)}),min:0,max:60}),(0,o.createElement)(n.RangeControl,{label:(0,a.__)("Title Font Size","otter-blocks"),value:e.titleFontSize,onChange:e=>t({titleFontSize:Number(e)}),min:0,max:60}),(0,o.createElement)(n.RangeControl,{label:(0,a.__)("Items Font Size","otter-blocks"),value:e.itemsFontSize,onChange:e=>t({itemsFontSize:Number(e)}),min:0,max:60}),(0,o.createElement)(n.RangeControl,{label:(0,a.__)("Border Radius","otter-blocks"),value:e.borderRadius,onChange:e=>t({borderRadius:Number(e)}),min:0,max:60}),(0,o.createElement)(n.RangeControl,{label:(0,a.__)("Border Width","otter-blocks"),value:e.borderWidth,onChange:e=>t({borderWidth:Number(e)}),min:0,max:120})),(0,o.createElement)(d.PanelColorSettings,{title:(0,a.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:e.titleColor,onChange:e=>t({titleColor:e}),label:(0,a.__)("Title","otter-blocks")},{value:e.backgroundColor,onChange:e=>t({backgroundColor:e}),label:(0,a.__)("Background","otter-blocks")},{value:e.borderColor,onChange:e=>t({borderColor:e}),label:(0,a.__)("Border","otter-blocks")}]},(0,o.createElement)(d.ContrastChecker,{textColor:e.titleColor,backgroundColor:e.backgroundColor}))),p=({attributes:e,className:t})=>(0,o.createElement)("div",{className:t,id:e.id},(0,o.createElement)("div",{className:"otter-business-hour__container"},(0,o.createElement)("div",{className:"otter-business-hour__title"},(0,o.createElement)(d.RichText.Content,{value:e.title,tagName:"span"})),(0,o.createElement)("div",{className:"otter-business-hour__content"},(0,o.createElement)(d.InnerBlocks.Content,null))));Boolean(window.themeisleGutenberg.hasNeveSupport.isBoosterActive)?(0,r.registerBlockType)("themeisle-blocks/business-hours",{title:(0,a.__)("Business Hours","otter-blocks"),description:(0,a.__)("Display your business schedule on your website.","otter-blocks"),icon:c.Z,category:"themeisle-blocks",keywords:["business","schedule","time"],attributes:i,supports:{align:["wide","full"]},styles:[{name:"default",label:(0,a.__)("default","otter-blocks"),isDefault:!0},{name:"black-white",label:(0,a.__)("Black & White","otter-blocks")}],edit:({attributes:e,setAttributes:t,className:l,isSelected:r,clientId:n})=>{(0,o.useEffect)((()=>{const t=(0,m.WX)(n,i);return()=>t(e.id)}),[e.id]);const c={container:{backgroundColor:e.backgroundColor,borderRadius:e.borderRadius+"px",border:e.borderWidth&&`${e.borderWidth}px solid ${e.borderColor||"#000000"}`},title:{textAlign:e.titleAlignment,fontSize:e.titleFontSize+"px",color:e.titleColor}},p=s.iv`
17
  .otter-business-hour__container .otter-business-hour__content .wp-block-themeisle-blocks-business-hours-item {
18
  font-size: ${e.itemsFontSize}px;
19
  padding-top: ${e.gap}px;
@@ -34,17 +34,17 @@
34
  &:hover svg {
35
  fill: ${e.hoverColor} !important;
36
  }
37
- `,E={fill:e.color,width:m.fontSize&&`${m.fontSize}px`},T=w.ZP.icons[e.icon];return(0,i.tZ)(c.Fragment,null,(0,i.tZ)(h,{attributes:e,setAttributes:t,isSelected:a}),(0,i.tZ)(_,{attributes:e,setAttributes:t}),(0,i.tZ)("div",{id:e.id,className:d()(l,"wp-block-button"),style:{}},"none"!==e.iconType?(0,i.tZ)("div",{className:"wp-block-button__link",style:y,css:C},("left"===e.iconType||"only"===e.iconType)&&("themeisle-icons"===e.library&&e.icon?(0,i.tZ)(T,{className:d()({"margin-right":"left"===e.iconType}),style:E}):(0,i.tZ)("i",{className:d()(e.prefix,"fa-fw",`fa-${e.icon}`,{"margin-right":"left"===e.iconType})})),"only"!==e.iconType&&(0,i.tZ)(u.RichText,{placeholder:(0,o.__)("Add text…","otter-blocks"),value:e.text,onChange:e=>t({text:e}),tagName:"div",withoutInteractiveFormatting:!0}),"right"===e.iconType&&("themeisle-icons"===e.library&&e.icon?(0,i.tZ)(T,{className:"margin-left",style:E}):(0,i.tZ)("i",{className:`${e.prefix} fa-fw fa-${e.icon} margin-left`}))):(0,i.tZ)(u.RichText,{placeholder:(0,o.__)("Add text…","otter-blocks"),value:e.text,onChange:e=>t({text:e}),tagName:"div",withoutInteractiveFormatting:!0,className:"wp-block-button__link",style:y,css:C})))},save:({attributes:e,className:t})=>{const l=w.ZP.icons[e.icon];return(0,c.createElement)("div",{id:e.id,className:d()(t,"wp-block-button")},(0,c.createElement)("a",{href:e.link,target:e.newTab?"_blank":"_self",rel:"noopener noreferrer",className:"wp-block-button__link"},("left"===e.iconType||"only"===e.iconType)&&("themeisle-icons"===e.library&&e.icon?(0,c.createElement)(l,{className:d()({"margin-right":"left"===e.iconType})}):(0,c.createElement)("i",{className:d()(e.prefix,"fa-fw",`fa-${e.icon}`,{"margin-right":"left"===e.iconType})})),"only"!==e.iconType&&(0,c.createElement)(u.RichText.Content,{tagName:"span",value:e.text}),"right"===e.iconType&&("themeisle-icons"===e.library&&e.icon?(0,c.createElement)(l,{className:"margin-left"}):(0,c.createElement)("i",{className:`${e.prefix} fa-fw fa-${e.icon} margin-left`}))))}})},2756:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},align:{type:"string"},spacing:{type:"number",default:20},paddingTopBottom:{type:"number"},paddingLeftRight:{type:"number"},collapse:{type:"string",default:"collapse-none"},fontSize:{type:"number"},fontFamily:{type:"string"},fontVariant:{type:"string"},textTransform:{type:"string"},fontStyle:{type:"string"},lineHeight:{type:"number"}},c=l(9307),i=l(4184),s=l.n(i),d=l(2819),m=l(2175);const b={id:{type:"string"},buttons:{type:"number",default:2},align:{type:"string"},spacing:{type:"number",default:20},collapse:{type:"string",default:"collapse-none"},fontSize:{type:"number",default:18},fontFamily:{type:"string"},fontVariant:{type:"string"},textTransform:{type:"string"},fontStyle:{type:"string",default:"normal"},lineHeight:{type:"number"},data:{type:"array",default:[{text:"",link:"",newTab:!1,color:"#ffffff",background:"#32373c",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:0,borderRadius:0,boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:12,paddingLeftRight:24},{text:"",link:"",newTab:!1,color:"#ffffff",background:"#32373c",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:0,borderRadius:0,boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:12,paddingLeftRight:24}]}};var u=[{attributes:b,save:({attributes:e,className:t})=>{const l="collapse-none"!==e.collapse?e.collapse:"",o={fontSize:`${e.fontSize}px`,fontFamily:e.fontFamily,fontWeight:e.fontVariant,fontStyle:e.fontStyle,textTransform:e.textTransform,lineHeight:e.lineHeight&&`${e.lineHeight}px`};return(0,c.createElement)("div",{id:e.id,className:s()(t,l),style:{justifyContent:e.align,alignItems:e.align?e.align:"flex-start"}},(0,d.times)(e.buttons,(t=>(t=>{const l={...o,borderWidth:`${e.data[t].borderSize}px`,borderRadius:`${e.data[t].borderRadius}px`,padding:`${e.data[t].paddingTopBottom}px ${e.data[t].paddingLeftRight}px`};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("a",{href:e.data[t].link,target:e.data[t].newTab?"_blank":"_self",className:s()("wp-block-themeisle-blocks-button",`wp-block-themeisle-blocks-button-${t}`),style:l},("left"===e.data[t].iconType||"only"===e.data[t].iconType)&&(0,c.createElement)("i",{className:s()(e.data[t].prefix,"fa-fw",`fa-${e.data[t].icon}`,{"margin-right":"left"===e.data[t].iconType})}),"only"!==e.data[t].iconType&&(0,c.createElement)(m.RichText.Content,{tagName:"span",value:e.data[t].text}),"right"===e.data[t].iconType&&(0,c.createElement)("i",{className:`${e.data[t].prefix} fa-fw fa-${e.data[t].icon} margin-left`})))})(t))))}},{attributes:b,save:({attributes:e,className:t})=>{const l="collapse-none"!==e.collapse?e.collapse:"",o={fontSize:`${e.fontSize}px`,fontFamily:e.fontFamily,fontWeight:e.fontVariant,fontStyle:e.fontStyle,textTransform:e.textTransform,lineHeight:e.lineHeight&&`${e.lineHeight}px`};return(0,c.createElement)("div",{id:e.id,className:s()(t,l),style:{justifyContent:e.align,alignItems:e.align?e.align:"flex-start"}},(0,d.times)(e.buttons,(t=>(t=>{const l={...o,borderWidth:`${e.data[t].borderSize}px`,borderRadius:`${e.data[t].borderRadius}px`,padding:`${e.data[t].paddingTopBottom}px ${e.data[t].paddingLeftRight}px`};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("a",{href:e.data[t].link,target:e.data[t].newTab?"_blank":"_self",className:s()("wp-block-themeisle-blocks-button",`wp-block-themeisle-blocks-button-${t}`),style:l,rel:"noopener noreferrer"},("left"===e.data[t].iconType||"only"===e.data[t].iconType)&&(0,c.createElement)("i",{className:s()(e.data[t].prefix,"fa-fw",`fa-${e.data[t].icon}`,{"margin-right":"left"===e.data[t].iconType})}),"only"!==e.data[t].iconType&&(0,c.createElement)(m.RichText.Content,{tagName:"span",value:e.data[t].text}),"right"===e.data[t].iconType&&(0,c.createElement)("i",{className:`${e.data[t].prefix} fa-fw fa-${e.data[t].icon} margin-left`})))})(t))))}},{attributes:{...b,fontSize:{type:"number"},fontStyle:{type:"string"},data:{type:"array",default:[{text:"",link:"",newTab:!1,color:"",background:"",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:"",borderRadius:"",boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:"",paddingLeftRight:""},{text:"",link:"",newTab:!1,color:"",background:"",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:"",borderRadius:"",boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:"",paddingLeftRight:""}]}},migrate:(e,t)=>{let l,o,r;return"flex-start"===e.align&&(l="left"),"center"===e.align&&(l="center"),"flex-end"===e.align&&(l="right"),e.data&&(o=(0,d.pick)(e.data[0],["paddingLeftRight","paddingTopBottom"]),1<=Object.keys(o).length&&(o=(0,d.pick)(o,Object.keys(o).filter((e=>""!==o[e])))),r=e.data.filter(((t,l)=>l<e.buttons)).map((e=>{const t=(0,d.omit)(e,["paddingLeftRight","paddingTopBottom"]);return(0,a.createBlock)("themeisle-blocks/button",{...t})}))),[{...(0,d.omit)(e,["buttons","data"]),align:l,...o},[...r,...t]]},save:({attributes:e,className:t})=>{const l="collapse-none"!==e.collapse?e.collapse:"";return(0,c.createElement)("div",{id:e.id,className:s()(t,l,"wp-block-button")},(0,d.times)(e.buttons,(t=>(t=>(0,c.createElement)("a",{href:e.data[t].link,target:e.data[t].newTab?"_blank":"_self",className:s()("wp-block-themeisle-blocks-button",`wp-block-themeisle-blocks-button-${t}`,"wp-block-button__link"),rel:"noopener noreferrer"},("left"===e.data[t].iconType||"only"===e.data[t].iconType)&&(0,c.createElement)("i",{className:s()(e.data[t].prefix,"fa-fw",`fa-${e.data[t].icon}`,{"margin-right":"left"===e.data[t].iconType})}),"only"!==e.data[t].iconType&&(0,c.createElement)(m.RichText.Content,{tagName:"span",value:e.data[t].text}),"right"===e.data[t].iconType&&(0,c.createElement)("i",{className:`${e.data[t].prefix} fa-fw fa-${e.data[t].icon} margin-left`})))(t))))}}],p=l(5988),g=l(1216),h=l(4333),k=l(9818),v=l(1150),y=l(8065),_=l(199),w=({attributes:e,setAttributes:t})=>(0,c.createElement)(m.BlockControls,null,(0,c.createElement)(m.AlignmentToolbar,{value:e.align,onChange:e=>t({align:e}),alignmentControls:[{icon:v.Z,title:(0,o.__)("Align left","otter-blocks"),align:"left"},{icon:y.Z,title:(0,o.__)("Align center","otter-blocks"),align:"center"},{icon:_.Z,title:(0,o.__)("Align right","otter-blocks"),align:"right"}]})),f=l(5609),C=l(9977),E=l(2372),T=({attributes:e,setAttributes:t})=>(0,c.createElement)(m.InspectorControls,null,(0,c.createElement)(f.PanelBody,{title:(0,o.__)("Spacing","otter-blocks")},(0,c.createElement)(E.Z,{label:(0,o.__)("Padding","otter-blocks"),min:0,max:100,onChange:(e,l)=>{"top"!==e&&"bottom"!==e||t({paddingTopBottom:l}),"right"!==e&&"left"!==e||t({paddingLeftRight:l})},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:e.paddingTopBottom},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:e.paddingLeftRight},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:e.paddingTopBottom},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:e.paddingLeftRight}]}),(0,c.createElement)(f.RangeControl,{label:(0,o.__)("Spacing","otter-blocks"),value:e.spacing,onChange:e=>t({spacing:e}),min:0,max:50}),(0,c.createElement)(f.SelectControl,{label:(0,o.__)("Collapse On","otter-blocks"),value:e.collapse,options:[{label:(0,o.__)("None","otter-blocks"),value:"collapse-none"},{label:(0,o.__)("Desktop","otter-blocks"),value:"collapse-desktop"},{label:(0,o.__)("Tablet","otter-blocks"),value:"collapse-tablet"},{label:(0,o.__)("Mobile","otter-blocks"),value:"collapse-mobile"}],onChange:e=>t({collapse:e})})),(0,c.createElement)(f.PanelBody,{title:(0,o.__)("Typography Settings","otter-blocks"),initialOpen:!1},(0,c.createElement)(f.RangeControl,{label:(0,o.__)("Font Size","otter-blocks"),value:e.fontSize,onChange:e=>t({fontSize:e}),min:0,max:50}),(0,c.createElement)(C.Z,{label:(0,o.__)("Font Family","otter-blocks"),value:e.fontFamily,onChangeFontFamily:e=>{t(e?{fontFamily:e,fontVariant:"normal",fontStyle:"normal"}:{fontFamily:void 0,fontVariant:void 0,fontStyle:void 0})},valueVariant:e.fontVariant,onChangeFontVariant:e=>t({fontVariant:e}),valueStyle:e.fontStyle,onChangeFontStyle:e=>t({fontStyle:e}),valueTransform:e.textTransform,onChangeTextTransform:e=>t({textTransform:e})}),(0,c.createElement)(f.RangeControl,{label:(0,o.__)("Line Height","otter-blocks"),value:e.lineHeight,onChange:e=>t({lineHeight:e}),min:0,max:200}))),x=l(5225);(0,a.registerBlockType)("themeisle-blocks/button-group",{title:(0,o.__)("Button Group","otter-blocks"),description:(0,o.__)("Prompt visitors to take action with a button group.","otter-blocks"),icon:r.Se,category:"themeisle-blocks",keywords:["button","buttons","button group"],attributes:n,deprecated:u,edit:({attributes:e,setAttributes:t,className:l,clientId:o})=>{const{isViewportAvailable:a,isPreviewDesktop:r,isPreviewTablet:i,isPreviewMobile:d}=(0,k.useSelect)((e=>{const{__experimentalGetPreviewDeviceType:t}=!!e("core/edit-post")&&e("core/edit-post");return{isViewportAvailable:!!t,isPreviewDesktop:!!t&&"Desktop"===t(),isPreviewTablet:!!t&&"Tablet"===t(),isPreviewMobile:!!t&&"Mobile"===t()}}),[e.id]),b=(0,h.useViewportMatch)("large",">="),u=(0,h.useViewportMatch)("large","<="),v=(0,h.useViewportMatch)("small",">="),y=(0,h.useViewportMatch)("small","<=");(0,c.useEffect)((()=>{const t=(0,x.WX)(o,n);return()=>t(e.id)}),[]);let _=b&&!u&&v&&!y,f=!b&&!u&&v&&!y,C=!(b||u||v||y);return a&&!C&&(_=r,f=i,C=d),(0,g.tZ)(c.Fragment,null,e.fontFamily&&(0,g.tZ)(p.Z,{fonts:[{font:e.fontFamily,weights:e.fontVariant&&[e.fontVariant+("italic"===e.fontStyle?":i":"")]}]}),(0,g.tZ)(w,{attributes:e,setAttributes:t}),(0,g.tZ)(T,{attributes:e,setAttributes:t}),(0,g.tZ)("div",{id:e.id,className:s()(l,"wp-block-buttons",{[`align-${e.align}`]:e.align,collapse:"collapse-desktop"===e.collapse&&(_||f||C)||"collapse-tablet"===e.collapse&&(f||C)||"collapse-mobile"===e.collapse&&C}),css:g.iv`
38
  .block-editor-block-list__layout {
39
  column-gap: ${e.spacing}px;
40
  }
41
- `},(0,g.tZ)(m.InnerBlocks,{allowedBlocks:["themeisle-blocks/button"],__experimentalMoverDirection:"horizontal",orientation:"horizontal",template:[["themeisle-blocks/button"]],renderAppender:m.InnerBlocks.DefaultAppender})))},save:({attributes:e,className:t})=>{const l="collapse-none"!==e.collapse?e.collapse:"";return(0,c.createElement)("div",{id:e.id,className:s()(t,l,"wp-block-buttons",{[`align-${e.align}`]:e.align})},(0,c.createElement)(m.InnerBlocks.Content,null))}})},3312:function(e,t,l){l(2756),l(3986)},1941:function(e,t,l){var o=l(269),a=l(5736),r=l(4981),n={id:{type:"string"},title:{type:"string",default:(0,a.__)("Skill","otter-blocks")},percentage:{type:"number",default:50},duration:{type:"number",default:2},titleStyle:{type:"string",default:"default"},height:{type:"number",default:100},fontSizeTitle:{type:"number"},fontSizePercent:{type:"number"},strokeWidth:{type:"number",default:10},backgroundColor:{type:"string"},progressColor:{type:"string"},titleColor:{type:"string"}},c=l(9307),i=l(4184),s=l.n(i),d=l(2819),m=l(5609),b=l(2175),u=({attributes:e,setAttributes:t,onHeightChange:l})=>(0,c.createElement)(b.InspectorControls,null,(0,c.createElement)(m.PanelBody,{title:(0,a.__)("Settings","otter-blocks"),initialOpen:!0},(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Percentage","otter-blocks"),help:(0,a.__)("The value of the counter.","otter-blocks"),value:e.percentage,onChange:e=>{void 0!==e&&(e=(0,d.clamp)(e,0,100),t({percentage:e}))},min:0,max:100}),(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Duration","otter-blocks"),help:(0,a.__)("The duration of the animation.","otter-blocks"),value:e.duration,onChange:e=>{void 0!==e&&(e=(0,d.clamp)(e,0,3),t({duration:e}))},min:0,max:3,step:.1}),(0,c.createElement)(m.SelectControl,{label:(0,a.__)("Title Style","otter-blocks"),value:e.titleStyle,options:[{label:(0,a.__)("Default","otter-blocks"),value:"default"},{label:(0,a.__)("Hide","otter-blocks"),value:"hide"},{label:(0,a.__)("Bottom","otter-blocks"),value:"bottom"}],onChange:e=>{t({titleStyle:e})}})),(0,c.createElement)(m.PanelBody,{title:(0,a.__)("Style","otter-blocks")},(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Height","otter-blocks"),help:(0,a.__)("The height of the circle counter.","otter-blocks"),value:e.height,onChange:l,min:0,max:240}),(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Circle Thickness","otter-blocks"),help:(0,a.__)("Change the thickness (stroke width) of the circle.","otter-blocks"),value:e.strokeWidth,onChange:e=>{t({strokeWidth:e})},initialPosition:10,min:0,max:20}),(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Font Size Title","otter-blocks"),help:(0,a.__)("Change the font size of the title.","otter-blocks"),value:e.fontSizeTitle,onChange:e=>{t({fontSizeTitle:e})},initialPosition:37,min:0,max:Math.round(.6*e.height)}),(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Font Size Percent","otter-blocks"),help:(0,a.__)("Change the font size of the inner text.","otter-blocks"),value:e.fontSizePercent,onChange:e=>{t({fontSizePercent:e})},initialPosition:27,min:0,max:Math.round(.27*e.height)}),"hide"!==e.titleStyle&&(0,c.createElement)(b.__experimentalColorGradientControl,{label:(0,a.__)("Title Color","otter-blocks"),colorValue:e.titleColor,onColorChange:e=>{t({titleColor:e})}}),(0,c.createElement)(b.__experimentalColorGradientControl,{label:(0,a.__)("Progress Color","otter-blocks"),colorValue:e.progressColor,onColorChange:e=>{t({progressColor:e})}}),(0,c.createElement)(b.__experimentalColorGradientControl,{label:(0,a.__)("Background Color","otter-blocks"),colorValue:e.backgroundColor,onColorChange:e=>{t({backgroundColor:e})}}))),p=({attributes:e,progressRef:t,valueRef:l})=>{const o=e.height,a=o/2,r=o/2-e.strokeWidth/2,n=2*Math.PI*r;return 0>r?(0,c.createElement)("div",null):(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter__bar",style:{height:o+"px",width:o+"px"}},(0,c.createElement)("svg",{className:"wp-block-themeisle-blocks-circle-counter-container",width:o,height:o},(0,c.createElement)("circle",{className:"wp-block-themeisle-blocks-circle-counter-bg",cx:a,cy:a,r:r,strokeWidth:e.strokeWidth,style:{stroke:e.backgroundColor}}),(0,c.createElement)("circle",{ref:t,className:"wp-block-themeisle-blocks-circle-counter-progress",cx:a,cy:a,r:r,strokeWidth:e.strokeWidth,strokeDasharray:n,style:{stroke:e.progressColor}}),(0,c.createElement)("text",{ref:l,className:"wp-block-themeisle-blocks-circle-counter-text",x:"50%",y:"50%",style:{fill:e.progressColor,fontSize:e.fontSizePercent+"px"}},e.percentage,"%")))},g=l(5225);const{clamp:h,omit:k}=lodash;var v={to:[{type:"block",blocks:["themeisle-blocks/progress-bar"],transform:e=>{const t=k(e,["titleStyle","height","fontSize","strokeWidth","progressColor"]);return(0,r.createBlock)("themeisle-blocks/progress-bar",{...t,barBackgroundColor:e.progressColor,height:h(e.height/4,0,100),titleStyle:"default"})}}]};(0,r.registerBlockType)("themeisle-blocks/circle-counter",{title:(0,a.__)("Circle Counter","otter-blocks"),description:(0,a.__)("Show your progress with a beautiful Circle Counter block.","otter-blocks"),icon:o.Z,category:"themeisle-blocks",keywords:["progress","circle","counter"],attributes:n,transforms:v,edit:({clientId:e,attributes:t,setAttributes:l,isSelected:o,toggleSelection:r,className:i})=>{(0,c.useEffect)((()=>{const l=(0,g.WX)(e,n);return()=>l(t.id)}),[t.id]);const h=(0,c.useRef)(null),k=(0,c.useRef)(null),[v,y]=(0,c.useState)({}),_=t.height/2-t.strokeWidth/2,w=2*Math.PI*_;(0,c.useEffect)((()=>{if(!h.current||!h.current||0===t.duration)return;const e=t.percentage/(1e3*t.duration),l=(0,d.range)(0,1e3*t.duration+20,20).map((t=>t*e)).reverse();v&&clearInterval(v),h.current.style.strokeDashoffset=w,k.current.innerText="0%";const o=setInterval((()=>{if(!h.current)return void clearInterval(o);const e=Math.round(l.pop());h.current.style.strokeDashoffset=(100-e)/100*w,k.current.innerHTML=e+"%",0===l.length&&clearInterval(o)}),20);y(o)}),[t.duration]),(0,c.useEffect)((()=>{h.current&&h.current&&(h.current.style.strokeDashoffset=(100-t.percentage)/100*w,k.current.innerHTML=t.percentage+"%",clearInterval(v))}),[t.percentage,t.height]);const f=e=>{const o=(t.fontSizePercent||27)/t.height,a=(t.fontSizeTitle||37)/t.height;l({height:e,fontSizePercent:Math.round(e*o),fontSizeTitle:Math.round(e*a)})},C=e=>{l({title:e})};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(u,{attributes:t,setAttributes:l,onHeightChange:f}),(0,c.createElement)("div",{className:s()(i),id:t.id},"default"===t.titleStyle&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,c.createElement)(b.RichText,{tagName:"span",allowedFormats:[],className:"wp-block-themeisle-blocks-circle-counter-title__value",placeholder:o?(0,a.__)("Write caption…","otter-blocks"):null,value:t.title,onChange:C,multiline:!1,style:{color:t.titleColor,fontSize:t.fontSizeTitle+"px"}})),(0,c.createElement)(m.ResizableBox,{size:{height:t.height,width:t.height},minHeight:0,maxHeight:240,enable:{top:!1,right:!1,bottom:!0,left:!1},showHandle:o,onResizeStop:(e,l,o,a)=>{f(parseInt(t.height+a.height,10)),r(!0)},onResizeStart:()=>{r(!1)}},(0,c.createElement)(p,{attributes:t,progressRef:h,valueRef:k})),"bottom"===t.titleStyle&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,c.createElement)(b.RichText,{tagName:"span",allowedFormats:[],className:"wp-block-themeisle-blocks-circle-counter-title__value",placeholder:o?(0,a.__)("Write caption…","otter-blocks"):null,value:t.title,onChange:C,multiline:!1,style:{color:t.titleColor,fontSize:t.fontSizeTitle+"px"}}))))},save:({attributes:e,className:t})=>(0,c.createElement)("div",{className:t,id:e.id,"data-percentage":e.percentage,"data-duration":e.duration,"data-height":e.height,"data-stroke-width":e.strokeWidth,"data-font-size-percent":e.fontSizePercent,"data-background-stroke":e.backgroundColor,"data-progress-stroke":e.progressColor},"default"===e.titleStyle&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,c.createElement)("span",{className:"wp-block-themeisle-blocks-circle-counter-title__value"},e.title)),(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter__bar"}),"bottom"===e.titleStyle&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,c.createElement)("span",{className:"wp-block-themeisle-blocks-circle-counter-title__value"},e.title)))})},3954:function(e,t,l){var o=l(2506),a=l(5736),r=l(4981),n={id:{type:"string"},date:{type:"string"},exclude:{type:"array"},backgroundColor:{type:"string"},valueColor:{type:"string"},labelColor:{type:"string"},labelDistance:{type:"number"},gap:{type:"number"},gapTablet:{type:"number"},gapMobile:{type:"number"},width:{type:"number"},widthTablet:{type:"number"},widthMobile:{type:"number"},height:{type:"number"},heightTablet:{type:"number"},heightMobile:{type:"number"},borderRadius:{type:"number",default:0},borderRadiusType:{type:"string",default:"linked"},borderRadiusTopRight:{type:"number",default:0},borderRadiusTopLeft:{type:"number",default:0},borderRadiusBottomRight:{type:"number",default:0},borderRadiusBottomLeft:{type:"number",default:0},borderWidth:{type:"number"},borderWidthTablet:{type:"number"},borderWidthMobile:{type:"number"},borderColor:{type:"string"},valueFontSize:{type:"number"},valueFontSizeTablet:{type:"number"},valueFontSizeMobile:{type:"number"},labelFontSize:{type:"number"},labelFontSizeTablet:{type:"number"},labelFontSizeMobile:{type:"number"},hasSeparators:{type:"boolean"}},c=l(9307),i=l(4333),s=l(9818),d=window.moment,m=l.n(d),b=l(5225),u=l(2175),p=l(5609),g=l(9771),h=l(6993),k=l(2372),v=({attributes:e,setAttributes:t})=>{var l,o,r,n;const i=(0,s.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=e("core/edit-post");return l?l():t()}),[]),d=(l,o)=>{var a;t(l?{exclude:null==e||null===(a=e.exclude)||void 0===a?void 0:a.filter((e=>e!==o))}:{exclude:null!=e&&e.exclude?[...null==e?void 0:e.exclude,o]:[o]})},m=t=>{let l;return"top-right"===t&&(l="linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusTopRight),"top-left"===t&&(l="linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusTopLeft),"bottom-right"===t&&(l="linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusBottomRight),"bottom-left"===t&&(l="linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusBottomLeft),l},b={"top-right":"borderRadiusTopRight","top-left":"borderRadiusTopLeft","bottom-left":"borderRadiusBottomLeft","bottom-right":"borderRadiusBottomRight"},v=(0,g.__experimentalGetSettings)();return(0,c.createElement)(u.InspectorControls,null,(0,c.createElement)(p.PanelBody,{title:(0,a.__)("Time","otter-blocks"),initialOpen:!0},(0,c.createElement)(p.Dropdown,{position:"bottom left",headerTitle:(0,a.__)("Select the date for the deadline","otter-blocks"),renderToggle:({onToggle:t,isOpen:l})=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.Button,{onClick:t,isSecondary:!0,"aria-expanded":l},e.date?(0,g.format)(v.formats.datetime,e.date):(0,a.__)("Select Date","otter-blocks"))),renderContent:()=>(0,c.createElement)(p.DateTimePicker,{currentDate:e.date,onChange:e=>t({date:e})})})),(0,c.createElement)(p.PanelBody,{title:(0,a.__)("Settings","otter-blocks"),initialOpen:!0},(0,c.createElement)(p.ToggleControl,{label:(0,a.__)("Display Days","otter-blocks"),checked:!(null!=e&&null!==(l=e.exclude)&&void 0!==l&&l.includes("day")),onChange:e=>d(e,"day")}),(0,c.createElement)(p.ToggleControl,{label:(0,a.__)("Display Hours","otter-blocks"),checked:!(null!=e&&null!==(o=e.exclude)&&void 0!==o&&o.includes("hour")),onChange:e=>d(e,"hour")}),(0,c.createElement)(p.ToggleControl,{label:(0,a.__)("Display Minutes","otter-blocks"),checked:!(null!=e&&null!==(r=e.exclude)&&void 0!==r&&r.includes("minute")),onChange:e=>d(e,"minute")}),(0,c.createElement)(p.ToggleControl,{label:(0,a.__)("Display Seconds","otter-blocks"),checked:!(null!=e&&null!==(n=e.exclude)&&void 0!==n&&n.includes("second")),onChange:e=>d(e,"second")}),(0,c.createElement)(p.ToggleControl,{label:(0,a.__)("Display Separators","otter-blocks"),checked:null==e?void 0:e.hasSeparators,onChange:e=>t({hasSeparators:e})}),(0,c.createElement)(h.Z,{label:(0,a.__)("Box Spacing","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:"Mobile"===i?e.gapMobile:"Tablet"===i?e.gapTablet:e.gap,onChange:e=>{"Desktop"===i&&t({gap:Number(e)}),"Tablet"===i&&t({gapTablet:Number(e)}),"Mobile"===i&&t({gapMobile:Number(e)})},min:0,max:100})),(0,c.createElement)(h.Z,{label:(0,a.__)("Box Height","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:"Mobile"===i?e.heightMobile:"Tablet"===i?e.heightTablet:e.height,onChange:e=>{"Desktop"===i&&t({height:Number(e)}),"Tablet"===i&&t({heightTablet:Number(e)}),"Mobile"===i&&t({heightMobile:Number(e)})},min:40,max:300})),(0,c.createElement)(h.Z,{label:(0,a.__)("Box Width","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:"Mobile"===i?e.widthMobile:"Tablet"===i?e.widthTablet:e.width,onChange:e=>{"Desktop"===i&&t({width:Number(e)}),"Tablet"===i&&t({widthTablet:Number(e)}),"Mobile"===i&&t({widthMobile:Number(e)})},min:40,max:300})),(0,c.createElement)(h.Z,{label:(0,a.__)("Border Width","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:"Mobile"===i?e.borderWidthMobile:"Tablet"===i?e.borderWidthTablet:e.borderWidth,onChange:e=>{"Desktop"===i&&t({borderWidth:Number(e)}),"Tablet"===i&&t({borderWidthTablet:Number(e)}),"Mobile"===i&&t({borderWidthMobile:Number(e)})},min:0,max:50})),(0,c.createElement)(h.Z,{label:(0,a.__)("Time Value Font Size","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:"Mobile"===i?e.valueFontSizeMobile:"Tablet"===i?e.valueFontSizeTablet:e.valueFontSize,onChange:e=>{"Desktop"===i&&t({valueFontSize:Number(e)}),"Tablet"===i&&t({valueFontSizeTablet:Number(e)}),"Mobile"===i&&t({valueFontSizeMobile:Number(e)})},min:0,max:64})),(0,c.createElement)(h.Z,{label:(0,a.__)("Label Font Size","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:"Mobile"===i?e.labelFontSizeMobile:"Tablet"===i?e.labelFontSizeTablet:e.labelFontSize,onChange:e=>{"Desktop"===i&&t({labelFontSize:Number(e)}),"Tablet"===i&&t({labelFontSizeTablet:Number(e)}),"Mobile"===i&&t({labelFontSizeMobile:Number(e)})},min:0,max:64})),(0,c.createElement)(k.Z,{label:(0,a.__)("Border Radius (%)","otter-blocks"),type:e.borderRadiusType,min:0,max:100,changeType:e=>{t({borderRadiusType:e})},onChange:(l,o)=>{"linked"===e.borderRadiusType?t({borderRadius:o}):t({[b[l]]:o})},options:[{label:(0,a.__)("Top Left","otter-blocks"),type:"top-left",value:m("top-left")},{label:(0,a.__)("Top Right","otter-blocks"),type:"top-right",value:m("top-right")},{label:(0,a.__)("Bottom Right","otter-blocks"),type:"bottom-right",value:m("bottom-right")},{label:(0,a.__)("Bottom Left","otter-blocks"),type:"bottom-left",value:m("bottom-left")}]})),(0,c.createElement)(u.PanelColorSettings,{title:(0,a.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:e.backgroundColor,onChange:e=>{t({backgroundColor:e})},label:(0,a.__)("Background","otter-blocks")},{value:e.labelColor,onChange:e=>{t({labelColor:e})},label:(0,a.__)("Label","otter-blocks")},{value:e.valueColor,onChange:e=>{t({valueColor:e})},label:(0,a.__)("Value","otter-blocks")},{value:e.borderColor,onChange:e=>{t({borderColor:e})},label:(0,a.__)("Border","otter-blocks")}]},(0,c.createElement)(u.ContrastChecker,{textColor:e.backgroundColor,backgroundColor:e.valueColor})))},y=l(4715),_=l(7462),w=l(4184),f=l.n(w);const C=({name:e,value:t,tag:l,key:o,styles:a})=>{const r="sep"!==e?{...a.allComponents,...a.mainComponents}:a.allComponents;return(0,c.createElement)("div",{key:o,style:r,name:l,className:f()("otter-countdown__display-area",{"is-main-component":"separator"!==l})},(0,c.createElement)("div",{style:a.value,className:"otter-countdown__value"},t),(0,c.createElement)("div",{style:a.label,className:"otter-countdown__label"},e))};var E=({time:e,hasSeparators:t,styles:l})=>{const o=t?(0,y.S3)(e,{name:"sep",value:":",tag:"separator"}):e,a=null==o?void 0:o.map(((e,t)=>(0,c.createElement)(C,(0,_.Z)({},e,{key:t,styles:l}))));return void 0!==e?(0,c.createElement)("div",{className:"otter-countdown__container"},(0,c.createElement)("div",{style:l.display,className:"otter-countdown__display"},a)):(0,c.createElement)(c.Fragment,null)};const T=e=>e?`${e}px`:e;const x=({name:e,value:t,tag:l,key:o})=>(0,c.createElement)("div",{key:o,name:l,className:f()("otter-countdown__display-area",{"is-main-component":"separator"!==l})},(0,c.createElement)("div",{className:"otter-countdown__value"},t),(0,c.createElement)("div",{className:"otter-countdown__label"},e)),M=({time:e,hasSeparators:t})=>{const l=t?(0,y.S3)(e,{name:"sep",value:":",tag:"separator"}):e,o=null==l?void 0:l.map(((e,t)=>(0,c.createElement)(x,(0,_.Z)({},e,{key:t}))));return void 0!==e?(0,c.createElement)("div",{className:"otter-countdown__container"},(0,c.createElement)("div",{className:"otter-countdown__display"},o)):(0,c.createElement)(c.Fragment,null)};(0,r.registerBlockType)("themeisle-blocks/countdown",{title:(0,a.__)("Countdown","otter-blocks"),description:(0,a.__)("Set a countdown for a date.","otter-blocks"),icon:o.Z,category:"themeisle-blocks",keywords:["countdown","time","counter"],supports:{align:["wide","full"]},attributes:n,edit:({attributes:e,setAttributes:t,className:l,clientId:o})=>{const[a,r]=(0,c.useState)(0);(0,c.useEffect)((()=>{const t=(0,b.WX)(o,n);return()=>t(e.id)}),[e.id]),(0,c.useEffect)((()=>{const t=setInterval((()=>{if(e.date){let t=e.date+(0,y.EP)();t=1e3*m()(t).unix(),r(new Date(t)-new Date)}}),500);return()=>{clearInterval(t)}}),[e.date]);const{isViewportAvailable:d,isPreviewDesktop:u,isPreviewTablet:p,isPreviewMobile:g}=(0,s.useSelect)((e=>{const{__experimentalGetPreviewDeviceType:t}=!!e("core/edit-post")&&e("core/edit-post");return{isViewportAvailable:!!t,isPreviewDesktop:!!t&&"Desktop"===t(),isPreviewTablet:!!t&&"Tablet"===t(),isPreviewMobile:!!t&&"Mobile"===t()}}),[]),h=(0,i.useViewportMatch)("large",">="),k=(0,i.useViewportMatch)("large","<="),_=(0,i.useViewportMatch)("small",">="),w=(0,i.useViewportMatch)("small","<=");let f,C=h&&!k&&_&&!w,x=!h&&!k&&_&&!w,M=!(h||k||_||w);return d&&!M&&(C=u,x=p,M=g),x?f={value:{color:e.valueColor,fontSize:T(null==e?void 0:e.valueFontSizeTablet)},label:{color:e.labelColor,fontSize:T(null==e?void 0:e.labelFontSizeTablet)},display:{gap:T(e.gapTablet)},allComponents:{height:T(null==e?void 0:e.heightTablet)},mainComponents:{backgroundColor:e.backgroundColor,width:T(null==e?void 0:e.widthTablet),borderWidth:T(e.borderWidthTablet),borderColor:e.borderColor}}:M?f={value:{color:e.valueColor,fontSize:T(e.valueFontSizeMobile)},label:{color:e.labelColor,fontSize:T(e.labelFontSizeMobile)},display:{gap:T(e.gapMobile)},allComponents:{height:T(null==e?void 0:e.heightMobile)},mainComponents:{backgroundColor:e.backgroundColor,width:T(null==e?void 0:e.widthMobile),borderWidth:T(e.borderWidthMobile),borderColor:e.borderColor}}:C&&(f={value:{color:e.valueColor,fontSize:T(e.valueFontSize)},label:{color:e.labelColor,fontSize:T(e.labelFontSize)},display:{gap:T(e.gap)},allComponents:{height:T(e.height)},mainComponents:{backgroundColor:e.backgroundColor,width:T(e.width),borderWidth:T(e.borderWidth),borderColor:e.borderColor}}),f.mainComponents.borderRadius="linked"===e.borderRadiusType?e.borderRadius+"%":`${e.borderRadiusTopLeft}% ${e.borderRadiusTopRight}% ${e.borderRadiusBottomRight}% ${e.borderRadiusBottomLeft}%`,(0,c.createElement)(c.Fragment,null,(0,c.createElement)(v,{attributes:e,setAttributes:t}),(0,c.createElement)("div",{id:e.id,className:l},(0,c.createElement)(E,{time:(0,y.Mg)(a,{exclude:null==e?void 0:e.exclude}),styles:f,hasSeparators:e.hasSeparators})))},save:({attributes:e,className:t})=>(0,c.createElement)("div",{id:e.id,className:t,"data-date":e.date},(0,c.createElement)(M,{time:(0,y.Mg)(0,{exclude:null==e?void 0:e.exclude}),hasSeparators:null==e?void 0:e.hasSeparators}))})},173:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},align:{type:"string"},library:{type:"string",default:"fontawesome"},prefix:{type:"string",default:"fab"},icon:{type:"string",default:"themeisle"},link:{type:"string"},newTab:{type:"boolean",default:!1},fontSize:{type:"number",default:16},padding:{type:"number",default:5},margin:{type:"number",default:5},backgroundColor:{type:"string"},textColor:{type:"string"},borderColor:{type:"string"},backgroundColorHover:{type:"string"},textColorHover:{type:"string"},borderColorHover:{type:"string"},borderSize:{type:"number",default:0},borderRadius:{type:"number",default:0}},c=l(9307);const i={prefix:{type:"string",default:"fab"},icon:{type:"string",default:"themeisle"},fontSize:{type:"number",default:16},padding:{type:"number",default:5},margin:{type:"number",default:5},backgroundColor:{type:"string"},textColor:{type:"string"},borderColor:{type:"string"},borderSize:{type:"number",default:0},borderRadius:{type:"number",default:0}};var s=[{attributes:i,supports:{align:["left","center","right"]},migrate:e=>{let t="center";return e.className.includes("alignleft")&&(t="left"),e.className.includes("aligncenter")&&(t="center"),e.className.includes("alignright")&&(t="right"),{...e,align:t,className:""}},save:({attributes:e,className:t})=>{const l={borderRadius:e.borderRadius+"%",fontSize:e.fontSize+"px",padding:e.padding+"px"},o={color:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderRadius:e.borderRadius+"%",borderStyle:"solid",borderWidth:e.borderSize+"px",display:"inline-block",margin:e.margin+"px"};return(0,c.createElement)("p",{className:t,style:{textAlign:e.align}},(0,c.createElement)("span",{className:`${t}-container`,style:o},(0,c.createElement)("i",{className:`${e.prefix} fa-${e.icon}`,style:l})))}},{attributes:{...i,align:{type:"string"}},save:({attributes:e,className:t})=>{const l={borderRadius:e.borderRadius+"%",fontSize:e.fontSize+"px",padding:e.padding+"px"},o={color:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderRadius:e.borderRadius+"%",borderStyle:"solid",borderWidth:e.borderSize+"px",display:"inline-block",margin:e.margin+"px"};return(0,c.createElement)("p",{className:t,style:{textAlign:e.align}},(0,c.createElement)("span",{className:"undefined-container",style:o},(0,c.createElement)("i",{className:`${e.prefix} fa-${e.icon}`,style:l})))}},{attributes:{...i,id:{type:"string"},align:{type:"string"},link:{type:"string"},newTab:{type:"boolean",default:!1},backgroundColorHover:{type:"string"},textColorHover:{type:"string"},borderColorHover:{type:"string"}},save:({attributes:e,className:t})=>{const l={borderRadius:e.borderRadius+"%",borderStyle:"solid",borderWidth:e.borderSize+"px",display:"inline-block",margin:e.margin+"px"},o={borderRadius:e.borderRadius+"%",fontSize:e.fontSize+"px",padding:e.padding+"px"},a=()=>(0,c.createElement)("i",{className:`${e.prefix} fa-${e.icon}`,style:o});return(0,c.createElement)("p",{className:t,id:e.id,style:{textAlign:e.align}},(0,c.createElement)("span",{className:"wp-block-themeisle-blocks-font-awesome-icons-container",style:l},e.link?(0,c.createElement)("a",{href:e.link,target:e.newTab?"_blank":"_self",style:{color:e.textColor},rel:"noopener noreferrer"},(0,c.createElement)(a,null)):(0,c.createElement)(a,null)))}}],d=l(2175),m=l(8504),b=({attributes:e,setAttributes:t,isSelected:l})=>(0,c.createElement)(d.BlockControls,null,(0,c.createElement)(d.AlignmentToolbar,{value:e.align,onChange:e=>t({align:e})}),(0,c.createElement)(m.Z,{isSelected:l,setAttributes:t,url:e.link,opensInNewTab:e.newTab})),u=l(5609),p=l(6778);const g=(0,c.lazy)((()=>Promise.all([l.e(189),l.e(765)]).then(l.bind(l,3765))));var h=({attributes:e,setAttributes:t})=>{const[l,a]=(0,c.useState)(!1);return(0,c.createElement)(d.InspectorControls,null,(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Icon","otter-blocks")},(0,c.createElement)(c.Suspense,{fallback:(0,c.createElement)(u.Placeholder,null,(0,c.createElement)(u.Spinner,null))},(0,c.createElement)(g,{label:(0,o.__)("Icon Picker","otter-blocks"),library:e.library,prefix:e.prefix,icon:e.icon,changeLibrary:e=>{t({library:e,icon:"fontawesome"===e?"themeisle":"balance",prefix:"fab"})},onChange:e=>{t("object"==typeof e?{icon:e.name,prefix:e.prefix}:{icon:e})}}))),(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Icon Sizes","otter-blocks"),initialOpen:!1},(0,c.createElement)(u.RangeControl,{label:(0,o.__)("Icon Size","otter-blocks"),value:e.fontSize||"",initialPosition:16,onChange:e=>t({fontSize:e}),min:12,max:140}),(0,c.createElement)(u.RangeControl,{label:(0,o.__)("Padding","otter-blocks"),value:e.padding||"",initialPosition:5,onChange:e=>t({padding:e}),min:0,max:100}),(0,c.createElement)(u.RangeControl,{label:(0,o.__)("Margin","otter-blocks"),value:e.margin||"",initialPosition:5,onChange:e=>t({margin:e}),min:0,max:100})),(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1},(0,c.createElement)(u.ButtonGroup,null,(0,c.createElement)(u.Button,{isSmall:!0,isSecondary:l,isPrimary:!l,onClick:()=>a(!1)},(0,o.__)("Normal","otter-blocks")),(0,c.createElement)(u.Button,{isSmall:!0,isSecondary:!l,isPrimary:l,onClick:()=>a(!0)},(0,o.__)("Hover","otter-blocks"))),l?(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.Z,{label:(0,o.__)("Hover Background","otter-blocks"),colorValue:e.backgroundColorHover},(0,c.createElement)(d.ColorPalette,{label:(0,o.__)("Hover Background","otter-blocks"),value:e.backgroundColorHover,onChange:e=>t({backgroundColorHover:e})})),(0,c.createElement)(p.Z,{label:(0,o.__)("Hover Icon","otter-blocks"),colorValue:e.textColorHover},(0,c.createElement)(d.ColorPalette,{label:(0,o.__)("Hover Icon","otter-blocks"),value:e.textColorHover,onChange:e=>t({textColorHover:e})})),(0,c.createElement)(p.Z,{label:(0,o.__)("Hover Border","otter-blocks"),colorValue:e.borderColorHover},(0,c.createElement)(d.ColorPalette,{label:(0,o.__)("Hover Border","otter-blocks"),value:e.borderColorHover,onChange:e=>t({borderColorHover:e})})),(0,c.createElement)(d.ContrastChecker,{textColor:e.textColorHover,backgroundColor:e.backgroundColorHover})):(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.Z,{label:(0,o.__)("Background","otter-blocks"),colorValue:e.backgroundColor},(0,c.createElement)(d.ColorPalette,{label:(0,o.__)("Background","otter-blocks"),value:e.backgroundColor,onChange:e=>t({backgroundColor:e})})),(0,c.createElement)(p.Z,{label:(0,o.__)("Icon","otter-blocks"),colorValue:e.textColor},(0,c.createElement)(d.ColorPalette,{label:(0,o.__)("Icon","otter-blocks"),value:e.textColor,onChange:e=>t({textColor:e})})),(0,c.createElement)(p.Z,{label:(0,o.__)("Border","otter-blocks"),colorValue:e.borderColor},(0,c.createElement)(d.ColorPalette,{label:(0,o.__)("Border","otter-blocks"),value:e.borderColor,onChange:e=>t({borderColor:e})})),(0,c.createElement)(d.ContrastChecker,{textColor:e.textColor,backgroundColor:e.backgroundColor}))),(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Border Settings","otter-blocks"),initialOpen:!1},(0,c.createElement)(u.RangeControl,{label:(0,o.__)("Border Size","otter-blocks"),value:e.borderSize,onChange:e=>t({borderSize:e}),min:0,max:120}),(0,c.createElement)(u.RangeControl,{label:(0,o.__)("Border Radius","otter-blocks"),value:e.borderRadius,onChange:e=>t({borderRadius:e}),min:0,max:100})))},k=l(48),v=l(5225);(0,a.registerBlockType)("themeisle-blocks/font-awesome-icons",{title:(0,o.__)("Icon","otter-blocks"),description:(0,o.__)("Add icons from Font Awesome or ThemeIsle Icons library to your website.","otter-blocks"),icon:r.rL,category:"themeisle-blocks",keywords:["font awesome","dashicons","icons"],attributes:n,deprecated:s,edit:({attributes:e,setAttributes:t,className:l,isSelected:o,clientId:a})=>{(0,c.useEffect)((()=>{const t=(0,v.WX)(a,n);return()=>t(e.id)}),[e.id]);let r={borderRadius:e.borderRadius+"%",fontSize:e.fontSize+"px",padding:e.padding+"px"};"themeisle-icons"===e.library&&(r={fill:e.textColor,padding:e.padding+"px",width:e.fontSize+2*e.padding+2*e.borderSize});const i={color:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderRadius:e.borderRadius+"%",borderStyle:"solid",borderWidth:e.borderSize+"px",margin:e.margin+"px",width:e.fontSize+2*e.padding+2*e.borderSize},s=k.ZP.icons[e.icon];return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(b,{attributes:e,setAttributes:t,isSelected:o}),(0,c.createElement)(h,{attributes:e,setAttributes:t}),(0,c.createElement)("style",null,`#${e.id} .${l}-container:hover {\n\t\t\t\t\t\tcolor: ${e.textColorHover?e.textColorHover:e.textColor} !important;\n\t\t\t\t\t\tbackground: ${e.backgroundColorHover?e.backgroundColorHover:e.backgroundColor} !important;\n\t\t\t\t\t\tborder-color: ${e.borderColorHover?e.borderColorHover:e.borderColor} !important;\n\t\t\t\t\t}\n\n\t\t\t\t\t#${e.id} .${l}-container:hover svg {\n\t\t\t\t\t\tfill: ${e.textColorHover?e.textColorHover:e.textColor} !important;\n\t\t\t\t\t}`),(0,c.createElement)("p",{className:l,id:e.id,style:{textAlign:e.align}},(0,c.createElement)("span",{className:"wp-block-themeisle-blocks-font-awesome-icons-container",style:i},"themeisle-icons"===e.library?(0,c.createElement)(s,{style:r}):(0,c.createElement)("i",{className:`${e.prefix} fa-${e.icon}`,style:r}))))},save:({attributes:e,className:t})=>{const l=k.ZP.icons[e.icon];return(0,c.createElement)("p",{className:t,id:e.id},(0,c.createElement)("span",{className:"wp-block-themeisle-blocks-font-awesome-icons-container"},e.link?(0,c.createElement)("a",{href:e.link,target:e.newTab?"_blank":"_self",rel:"noopener noreferrer"},"themeisle-icons"===e.library?(0,c.createElement)(l,null):(0,c.createElement)("i",{className:`${e.prefix} fa-${e.icon}`})):"themeisle-icons"===e.library?(0,c.createElement)(l,null):(0,c.createElement)("i",{className:`${e.prefix} fa-${e.icon}`})))}})},2219:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},subject:{type:"string"},emailTo:{type:"string"},optionName:{type:"string"},hasCaptcha:{type:"boolean"},provider:{type:"string",default:""},apiKey:{type:"string"},listId:{type:"string"},action:{type:"string",default:"subscribe"}},c=l(9307),i=l(2819),s=window.wp.api,d=l.n(s),m=l(2175),b=l(9818),u=l(5225),p=l(5609),g=({attributes:e,setAttributes:t})=>{const{createNotice:l}=(0,b.dispatch)("core/notices"),[a,r]=(0,c.useState)(""),[n,i]=(0,c.useState)(""),[s,u]=(0,c.useState)(!0),[g,h]=(0,c.useState)([{label:(0,o.__)("None","otter-blocks"),value:""}]),[k,v]=(0,c.useState)("loading");return(0,c.useEffect)((()=>{e.optionName&&d().loadPromise.then((()=>{(new(d().models.Settings)).fetch().done((t=>{var l,o;null===(l=t.themeisle_blocks_form_emails)||void 0===l||null===(o=l.filter((({form:t})=>t===e.optionName)))||void 0===o||o.forEach((e=>{i(null==e?void 0:e.email),u(!0),r(null==e?void 0:e.email)}))}))}))}),[e.optionName]),(0,c.useEffect)((()=>{var t,a,r,n;e.apiKey&&e.provider&&(t=e.provider,a=e.apiKey,r=t=>{t.splice(0,0,{label:(0,o.__)("None","otter-blocks"),value:""}),h(t),v("ready");const a=1===t.map((({value:e})=>e)).filter((t=>t===e.listId)).length;e.listId&&!a&&l("error",(0,o.__)("The current contact list is invalid! Please choose a new contact list.","otter-blocks"),{isDismissible:!0,type:"snackbar"})},n=e=>{l("error",null==e?void 0:e.error,{isDismissible:!0,type:"snackbar",id:"themeisle-form-server-error"}),v("error")},window.wp.apiFetch({path:"otter/v1/integration",method:"POST",data:{provider:t,apiKey:a}}).then((e=>{if(null!=e&&e.success){var t;const l=(null==e||null===(t=e.list_id)||void 0===t?void 0:t.map((e=>{var t;return{label:e.name,value:null===(t=e.id)||void 0===t?void 0:t.toString()}})))||[];r(l)}else n(e)})).catch((e=>{console.log(e)})))}),[e.provider,e.apiKey]),(0,c.createElement)(m.InspectorControls,null,(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,c.createElement)(p.TextControl,{label:(0,o.__)("Email Subject","otter-blocks"),placeholder:(0,o.__)("A new submission","otter-blocks"),value:e.subject,onChange:e=>t({subject:e}),help:(0,o.__)("Customize the email title send by this form.","otter-blocks")}),(0,c.createElement)(p.TextControl,{label:(0,o.__)("Email To","otter-blocks"),placeholder:(0,o.__)("Default is to admin site","otter-blocks"),value:n,onChange:e=>i(e),help:(0,o.__)("Send form data to another email. (Admin is default).","otter-blocks")}),(0,c.createElement)(p.Button,{isPrimary:!0,onClick:()=>{(new(d().models.Settings)).fetch().done((t=>{const a=t.themeisle_blocks_form_emails?t.themeisle_blocks_form_emails:[];let c=!0,i=!1;if(null==a||a.forEach((({form:t},l)=>{t===e.optionName&&(a[l].email!==n&&(a[l].email=n,i=!0),c=!1)})),c&&a.push({form:e.optionName,email:n}),c||i){const t=new(d().models.Settings)({themeisle_blocks_form_emails:a});u(!1),t.save().then((t=>{var a;null===(a=t.themeisle_blocks_form_emails)||void 0===a||a.filter((({form:t})=>t===e.optionName)).forEach((e=>{u(!0),r(null==e?void 0:e.email),l("info",(0,o.__)("Email has been saved!","otter-blocks"),{isDismissible:!0,type:"snackbar"})}))}))}}))},disabled:n===a},(0,c.createElement)(c.Fragment,null,!s&&(0,c.createElement)(p.Spinner,null),(0,o.__)("Save","otter-blocks"))),(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Add captcha checkbox","otter-blocks"),checked:e.hasCaptcha,onChange:e=>t({hasCaptcha:e}),help:(0,o.__)("Add Google reCaptcha V2 for protection againts bots.","otter-blocks")}),e.hasCaptcha&&(0,o.__)("You can change the API Keys in Settings > Otter","otter-blocks")),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Integration","otter-blocks"),initialOpen:!1},(0,o.__)("Add your client email to a Digital Marketing provider.","otter-blocks"),(0,c.createElement)("br",null)," ",(0,c.createElement)("br",null),(0,c.createElement)("b",null," ",(0,o.__)("You need to have at least one email field in your form. For multiple email fields, only the first will be used.","otter-blocks")," "),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Provider","otter-blocks"),value:e.provider,options:[{label:(0,o.__)("None","otter-blocks"),value:""},{label:(0,o.__)("Mailchimp","otter-blocks"),value:"mailchimp"},{label:(0,o.__)("Sendinblue","otter-blocks"),value:"sendinblue"}],onChange:e=>{t({provider:e,apiKey:"",listId:""})}}),e.provider&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.TextControl,{label:(0,o.__)("API Key","otter-blocks"),help:(0,o.__)("You can find the key in the provider's website","otter-blocks"),value:e.apiKey,onChange:e=>{v("loading"),h([]),t({apiKey:e,listId:""})}}),e.apiKey&&2>g.length&&"loading"===k&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.Spinner,null),(0,o.__)("Fetching data from provider.","otter-blocks")),e.apiKey&&"ready"===k&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Contact List","otter-blocks"),value:e.listId,options:g,onChange:e=>t({listId:e})}),2<=(null==g?void 0:g.length)&&e.listId&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Action","otter-blocks"),value:e.action,options:[{label:(0,o.__)("None","otter-blocks"),value:""},{label:(0,o.__)("Subscribe","otter-blocks"),value:"subscribe"},{label:(0,o.__)("Submit & Subscribe","otter-blocks"),value:"submit-subscribe"}],onChange:e=>t({action:e})}),"submit-subscribe"===e.action&&(0,o.__)("This action will add the client to the contact list and send a separata email with the form data to administrator or to the email mentioned in 'Form to' field. A checkbox for data-sharing consent with third-party will be added on form.","otter-blocks"))))))},h=({className:e,isAPILoaded:t,isAPISaved:l,isSaving:a,saveAPIKey:r,siteKey:n,secretKey:i,setSiteKey:s,setSecretKey:d})=>t?l?void 0:(0,c.createElement)(p.Placeholder,{icon:"admin-site",label:(0,o.__)("Google reCaptcha","otter-blocks"),instructions:(0,o.__)("A Google reCaptcha V2 API keys are required, please enter one below.","otter-blocks"),className:e},(0,c.createElement)("div",{className:"components-placeholder__actions"},(0,c.createElement)(p.TextControl,{type:"text",label:(0,o.__)("Site Key","otter-blocks"),value:n,className:"components-placeholder__input",onChange:s}),(0,c.createElement)(p.TextControl,{type:"text",label:(0,o.__)("Secret Key","otter-blocks"),value:i,className:"components-placeholder__input",onChange:d}),(0,c.createElement)(p.Button,{isLarge:!0,isPrimary:!0,type:"submit",onClick:r,isBusy:a,disabled:""===n||""===i},(0,o.__)("Save","otter-blocks"))),(0,c.createElement)("div",{className:"components-placeholder__learn-more"},(0,o.__)("You need to activate reCaptcha API.","otter-blocks")," ",(0,c.createElement)(p.ExternalLink,{href:"http://www.google.com/recaptcha/admin"},(0,o.__)("Need an API key? Get one here.","otter-blocks")))):(0,c.createElement)(c.Fragment,null,(0,c.createElement)("br",null),(0,c.createElement)(p.Placeholder,null,(0,c.createElement)("div",null,(0,c.createElement)(p.Spinner,null),(0,o.__)("Checking the API Keys for reCaptcha","otter-blocks")))),k=l(4184),v=l.n(k);(0,a.registerBlockType)("themeisle-blocks/form",{title:(0,o.__)("Form","otter-blocks"),description:(0,o.__)("Display a form for your clients.","otter-blocks"),icon:r.XQ,category:"themeisle-blocks",keywords:["business","form","email"],attributes:n,supports:{align:["wide","full"]},edit:({attributes:e,setAttributes:t,className:l,clientId:r,name:s})=>{const[p,k]=(0,c.useState)(""),[v,y]=(0,c.useState)(""),[_,w]=(0,c.useState)(!1),[f,C]=(0,c.useState)(!1),E=(0,c.useRef)(null),[T,x]=(0,c.useState)(!1),{insertBlock:M,removeBlock:S}=(0,b.useDispatch)("core/block-editor"),{replaceInnerBlocks:B}=(0,b.useDispatch)("core/block-editor"),{createNotice:z}=(0,b.dispatch)("core/notices"),P=(0,b.useSelect)((e=>0<e("core/block-editor").getBlocks(r).length),[r]),{blockType:N,defaultVariation:L,variations:R}=(0,b.useSelect)((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:o}=e("core/blocks");return{blockType:l(s),defaultVariation:o(s,"block"),variations:t(s,"block")}}),[s]),V=(0,b.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t(r).innerBlocks}));(0,c.useEffect)((()=>{const t=(0,u.WX)(r,n);return()=>t(e.id)}),[e.id]),(0,c.useEffect)((()=>{var l;e.id&&(0,b.select)("core/edit-widgets")?t({optionName:`widget_${e.id.slice(-8)}`}):e.id&&Boolean(window.themeisleGutenberg.isBlockEditor)&&null!==(l=(0,b.select)("core/editor"))&&void 0!==l&&l.getCurrentPostId()&&t({optionName:`${(0,b.select)("core/editor").getCurrentPostId()}_${e.id.slice(-8)}`})}),[e.id]),(0,c.useEffect)((()=>{if(V){const e=V.filter((({name:e})=>"themeisle-blocks/form-nonce"===e));if(2<=(null==e?void 0:e.length))e.slice(1).forEach((e=>{S(e.clientId,!1)}));else if(0===(null==e?void 0:e.length)&&r){const e=(0,a.createBlock)("themeisle-blocks/form-nonce");e&&(null==M||M(e,(null==V?void 0:V.length)||0,r,!1))}}}),[V]),(0,c.useEffect)((()=>{d().loadPromise.then((()=>{E.current=new(d().models.Settings),x(!0)}))}),[]),(0,c.useEffect)((()=>{var t;void 0!==e.hasCaptcha&&(null==E||null===(t=E.current)||void 0===t||t.fetch().done((t=>{const l=t.themeisle_blocks_form_emails?t.themeisle_blocks_form_emails:[];let a=!0,r=!1;null==l||l.forEach((({form:t},o)=>{t===e.optionName&&(l[o].hasCaptcha!==e.hasCaptcha&&(r=!0),l[o].hasCaptcha=e.hasCaptcha,a=!1)})),a&&l.push({form:e.optionName,hasCaptcha:e.hasCaptcha}),(a||r)&&(new(d().models.Settings)({themeisle_blocks_form_emails:l}).save(),z("info",(0,o.__)("Form preference has been saved.","otter-blocks"),{isDismissible:!0,type:"snackbar"}))})))}),[e.hasCaptcha,E.current]),(0,c.useEffect)((()=>{T&&e.hasCaptcha&&!f&&(async()=>{var e;_||null==E||null===(e=E.current)||void 0===e||e.fetch().then((e=>{w(!0),""!==e.themeisle_google_captcha_api_site_key&&""!==e.themeisle_google_captcha_api_secret_key&&C(!0)}))})()}),[T,_,f,e.hasCaptcha]),(0,c.useEffect)((()=>{var t;null==E||null===(t=E.current)||void 0===t||t.fetch().done((t=>{const l=t.themeisle_blocks_form_emails?t.themeisle_blocks_form_emails:[];let a=!0,r=!1,n=!1;null==l||l.forEach((({form:t},o)=>{var c;t===e.optionName&&(null!==(c=l[o])&&void 0!==c&&c.integration||(l[o].integration={}),r=l[o].integration.provider!==e.provider||l[o].integration.apiKey!==e.apiKey||l[o].integration.listId!==e.listId||l[o].integration.action!==e.action,a=!1,n=e.apiKey&&(l[o].integration.listId!==e.listId||l[o].integration.action!==e.action),l[o].integration.provider=e.provider,l[o].integration.apiKey=e.apiKey,l[o].integration.listId=e.listId,l[o].integration.action=e.action)})),a&&l.push({form:e.optionName,integration:{provider:e.provider,apiKey:e.apiKey,listId:e.listId,action:e.action}}),(a||r)&&new(d().models.Settings)({themeisle_blocks_form_emails:l}).save().then((()=>{n&&z("info",(0,o.__)("Integration details have been saved.","otter-blocks"),{isDismissible:!0,type:"snackbar"})}))}))}),[e.optionName,e.provider,e.apiKey,e.listId,e.action,E.current]);const H=e.provider&&e.apiKey&&e.listId;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(g,{attributes:e,setAttributes:t}),(0,c.createElement)("div",{className:l,id:e.id},P?(0,c.createElement)("div",{className:"otter-form__container"},(0,c.createElement)(m.InnerBlocks,null),e.hasCaptcha&&(!_||!f)&&(0,c.createElement)(h,{className:"otter-form-captcha",isAPILoaded:_,isAPISaved:f,saveAPIKey:()=>{new window.wp.api.models.Settings({themeisle_google_captcha_api_site_key:p,themeisle_google_captcha_api_secret_key:v}).save().then((e=>{let t=!1;""!==e.themeisle_google_captcha_api_site_key&&""!==e.themeisle_google_captcha_api_secret_key&&(t=!0),C(t),y(""),k(""),z("info",(0,o.__)("API Keys have been saved.","otter-blocks"),{isDismissible:!0,type:"snackbar"})}))},siteKey:p,secretKey:v,setSiteKey:k,setSecretKey:y}),(0,c.createElement)("div",{className:"wp-block-button"},(0,c.createElement)("button",{className:"wp-block-button__link"},H&&"subscribe"===e.action?(0,o.__)("Subscribe","otter-blocks"):(0,o.__)("Submit","otter-blocks")))):(0,c.createElement)(m.__experimentalBlockVariationPicker,{icon:(0,i.get)(N,["icon","src"]),label:(0,i.get)(N,["title"]),variations:R,onSelect:(e=L)=>{e&&B(r,(0,a.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0)},allowSkip:!0})))},save:({attributes:e,className:t})=>{const l=e.provider&&e.apiKey&&e.listId;return(0,c.createElement)("div",{id:e.id,className:v()(t,{"is-subscription":l&&"subscribe"===e.action,"can-submit-and-subscribe":l&&"submit-subscribe"===e.action,"has-captcha":e.hasCaptcha}),"data-email-subject":e.subject,"data-option-name":e.optionName},(0,c.createElement)("div",{className:"otter-form__container"},(0,c.createElement)(m.InnerBlocks.Content,null),(0,c.createElement)("div",{className:"wp-block-button"},(0,c.createElement)("button",{className:"wp-block-button__link"},"subscribe"===e.action?(0,o.__)("Subscribe","otter-blocks"):(0,o.__)("Submit","otter-blocks")))))},variations:[{name:"themeisle-blocks/form-contact",description:(0,o.__)("Contact form for clients","otter-blocks"),icon:r.XQ,title:(0,o.__)("Contact Form","otter-blocks"),innerBlocks:[["themeisle-blocks/form-input",{label:(0,o.__)("Name","otter-blocks"),type:"text",isRequired:!0}],["themeisle-blocks/form-input",{label:(0,o.__)("Email","otter-blocks"),type:"email",isRequired:!0}],["themeisle-blocks/form-textarea",{label:(0,o.__)("Message","otter-blocks")}],["core/paragraph",{content:(0,o.__)("You agree to receive email communication from us by submitting this form and understand that your contact information will be stored with us.","otter-blocks"),fontSize:"extra-small"}]]},{name:"themeisle-blocks/form-subscribe",description:(0,o.__)("Add the clients to your subscription list","otter-blocks"),icon:r.XQ,title:(0,o.__)("Subscribe Form","otter-blocks"),innerBlocks:[["themeisle-blocks/form-input",{label:(0,o.__)("Name","otter-blocks"),type:"text",isRequired:!0}],["themeisle-blocks/form-input",{label:(0,o.__)("Email","otter-blocks"),type:"email",isRequired:!0}],["core/paragraph",{content:(0,o.__)("You agree to receive email communication from us by submitting this form and understand that your contact information will be stored with us.","otter-blocks"),fontSize:"extra-small"}]]}]})},2124:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},type:{type:"string",default:"text"},label:{type:"string"},placeholder:{type:"string"},isRequired:{type:"boolean"},mappedName:{type:"string"}},c=l(9307),i=l(2175),s=l(5225),d=l(5609),m=({attributes:e,setAttributes:t})=>(0,c.createElement)(i.InspectorControls,null,(0,c.createElement)(d.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,c.createElement)(d.SelectControl,{label:(0,o.__)("Field Type","otter-blocks"),value:e.type,options:[{label:(0,o.__)("Text","otter-blocks"),value:"text"},{label:(0,o.__)("Email","otter-blocks"),value:"email"},{label:(0,o.__)("Date","otter-blocks"),value:"date"},{label:(0,o.__)("Text","otter-blocks"),value:"text"},{label:(0,o.__)("Number","otter-blocks"),value:"number"}],onChange:e=>t({type:e})}),(0,c.createElement)(d.TextControl,{label:(0,o.__)("Label","otter-blocks"),value:e.label,onChange:e=>t({label:e})}),(0,c.createElement)(d.TextControl,{label:(0,o.__)("Placeholder","otter-blocks"),value:e.placeholer,onChange:e=>t({placeholder:e})}),(0,c.createElement)(d.ToggleControl,{label:(0,o.__)("Is this field required?","otter-blocks"),help:(0,o.__)("If true, the input field must be filled out before submitting the form.","otter-blocks"),checked:e.isRequired,onChange:e=>t({isRequired:e})})));(0,a.registerBlockType)("themeisle-blocks/form-input",{title:(0,o.__)("Text Field","otter-blocks"),description:(0,o.__)("Display a contact form for your clients.","otter-blocks"),icon:r.Bd,parent:["themeisle-blocks/form"],category:"themeisle-blocks",keywords:["input","text","email"],attributes:n,supports:{align:["wide","full"]},variations:[{name:"themeisle-blocks/form-input-email",description:(0,o.__)("Insert an email field","otter-blocks"),icon:"email",title:(0,o.__)("Email Field","otter-blocks"),attributes:{type:"email"}},{name:"themeisle-blocks/form-input-number",description:(0,o.__)("Insert a number field","otter-blocks"),icon:"calculator",title:(0,o.__)("Number Field","otter-blocks"),attributes:{type:"number"}},{name:"themeisle-blocks/form-input-date",description:(0,o.__)("Insert a date field","otter-blocks"),icon:"calendar-alt",title:(0,o.__)("Date Field","otter-blocks"),attributes:{type:"date"}}],edit:({attributes:e,setAttributes:t,className:l,clientId:a})=>((0,c.useEffect)((()=>{const t=(0,s.WX)(a,n);return()=>t(e.id)}),[e.id]),(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m,{attributes:e,setAttributes:t}),(0,c.createElement)("div",{className:l},(0,c.createElement)("label",{htmlFor:e.id,className:"otter-form-input-label"},(0,c.createElement)(i.RichText,{placeholder:(0,o.__)("Type here…","otter-blocks"),className:"otter-form-input-label__label",value:e.label,onChange:e=>t({label:e}),tagName:"span"}),e.isRequired&&(0,c.createElement)("span",{className:"required"},(0,o.__)("(required)","otter-blocks"))),(0,c.createElement)("input",{type:e.type,placeholder:e.placeholder,name:e.id,id:e.id,required:e.isRequired,disabled:!0,className:"otter-form-input components-text-control__input"})))),save:({attributes:e,className:t})=>(0,c.createElement)("div",{className:t},(0,c.createElement)("label",{htmlFor:e.id,className:"otter-form-input-label"},(0,c.createElement)(i.RichText.Content,{value:e.label,className:"otter-form-input-label__label",tagName:"span"}),e.isRequired&&(0,c.createElement)("span",{className:"required"},(0,o.__)("(required)","otter-blocks"))),(0,c.createElement)("input",{type:e.type,name:e.mappedName,id:e.id,required:e.isRequired,placeholder:e.placeholder,className:"otter-form-input"}))})},315:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9818),c=l(9307);(0,a.registerBlockType)("themeisle-blocks/form-nonce",{title:(0,o.__)("Nonce Field","otter-blocks"),description:(0,o.__)("Protect the form from CSRF.","otter-blocks"),icon:r.Bd,parent:["themeisle-blocks/form"],category:"themeisle-blocks",keywords:["protection","csrf","field"],attributes:{formId:{type:"string"}},supports:{align:["wide","full"],inserter:!1},edit:({setAttributes:e,clientId:t})=>{const{parent:l}=(0,n.useSelect)((e=>{const{getBlock:l,getBlockRootClientId:o}=e("core/block-editor");return{parent:l(o(t))}}));return(0,c.useEffect)((()=>{l&&e({formId:l.attributes.id})}),[l]),null},save:()=>null})},6950:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},label:{type:"string"},placeholder:{type:"string"},isRequired:{type:"boolean"},mappedName:{type:"string"}},c=l(9307),i=l(2175),s=l(5225),d=l(5609),m=({attributes:e,setAttributes:t})=>(0,c.createElement)(i.InspectorControls,null,(0,c.createElement)(d.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,c.createElement)(d.TextControl,{label:(0,o.__)("Label","otter-blocks"),value:e.label,onChange:e=>t({label:e})}),(0,c.createElement)(d.TextControl,{label:(0,o.__)("Placeholder","otter-blocks"),value:e.placeholer,onChange:e=>t({placeholder:e})}),(0,c.createElement)(d.ToggleControl,{label:(0,o.__)("Is this field required?","otter-blocks"),help:(0,o.__)("If true, the input field must be filled out before submitting the form.","otter-blocks"),checked:e.isRequired,onChange:e=>t({isRequired:e})})));(0,a.registerBlockType)("themeisle-blocks/form-textarea",{title:(0,o.__)("Textarea Field","otter-blocks"),description:(0,o.__)("Display a contact form for your clients.","otter-blocks"),icon:r.Bd,parent:["themeisle-blocks/form"],category:"themeisle-blocks",keywords:["textarea","message","input"],attributes:n,supports:{align:["wide","full"]},edit:({attributes:e,setAttributes:t,className:l,clientId:a})=>((0,c.useEffect)((()=>{const t=(0,s.WX)(a,n);return()=>t(e.id)}),[e.id]),(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m,{attributes:e,setAttributes:t}),(0,c.createElement)("div",{className:l},(0,c.createElement)("label",{htmlFor:e.id,className:"otter-form-textarea-label"},(0,c.createElement)(i.RichText,{placeholder:(0,o.__)("Type here…","otter-blocks"),className:"otter-form-textarea-label__label",value:e.label,onChange:e=>t({label:e}),tagName:"span"}),e.isRequired&&(0,c.createElement)("span",{className:"required"},(0,o.__)("(required)","otter-blocks"))),(0,c.createElement)("textarea",{placeholder:e.placeholder,name:e.id,id:e.id,required:e.isRequired,disabled:!0,rows:10,className:"otter-form-textarea-input components-textarea-control__input"})))),save:({attributes:e,className:t})=>(0,c.createElement)("div",{className:t},(0,c.createElement)("label",{htmlFor:e.id,className:"otter-form-textarea-label"},(0,c.createElement)(i.RichText.Content,{value:e.label,className:"otter-form-textarea-label__label",tagName:"span"}),e.isRequired&&(0,c.createElement)("span",{className:"required"},(0,o.__)("(required)","otter-blocks"))),(0,c.createElement)("textarea",{name:e.mappedName,id:e.id,required:e.isRequired,placeholder:e.placeholder,rows:10,className:"otter-form-textarea-input"}))})},5530:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},style:{type:"string",default:"standard"},location:{type:"string",default:"La Sagrada Familia, Barcelona, Spain"},latitude:{type:"string"},longitude:{type:"string"},type:{type:"string",default:"roadmap"},zoom:{type:"number",default:15},height:{type:"number",default:400},draggable:{type:"boolean",default:!0},mapTypeControl:{type:"boolean",default:!0},zoomControl:{type:"boolean",default:!0},fullscreenControl:{type:"boolean",default:!0},streetViewControl:{type:"boolean",default:!0},markers:{type:"array",default:[]}},c=l(9307),i=l(4184),s=l.n(i),d=l(4586),m=l(5609),b=({className:e,api:t,isAPILoaded:l,isAPISaved:a,isSaving:r,changeAPI:n,saveAPIKey:i})=>l?a?void 0:(0,c.createElement)(m.Placeholder,{icon:"admin-site",label:(0,o.__)("Google Maps","otter-blocks"),instructions:(0,o.__)("A Google Maps API key is required, please enter one below.","otter-blocks"),className:e},(0,c.createElement)("div",{className:"components-placeholder__actions"},(0,c.createElement)(m.TextControl,{type:"text",placeholder:(0,o.__)("Google Maps API Key","otter-blocks"),value:t,className:"components-placeholder__input",onChange:n}),(0,c.createElement)(m.Button,{isLarge:!0,isPrimary:!0,type:"submit",onClick:i,isBusy:r,disabled:""===t},(0,o.__)("Save","otter-blocks"))),(0,c.createElement)("div",{className:"components-placeholder__learn-more"},(0,o.__)("You need to activate Maps and Places API.","otter-blocks")," ",(0,c.createElement)(m.ExternalLink,{href:"https://developers.google.com/maps/documentation/javascript/get-api-key"},(0,o.__)("Need an API key? Get one here.","otter-blocks")))):(0,c.createElement)(m.Placeholder,null,(0,c.createElement)(m.Spinner,null),(0,o.__)("Loading…","otter-blocks")),u=l(2175),p=l(5241),g=l(4333);const h=({value:e,onChange:t})=>{const l=(0,g.useInstanceId)(h);(0,c.useEffect)((()=>{window.wp.oldEditor.initialize(r.current.id,{tinymce:{classic_block_editor:!0,plugins:"lists,media,paste,tabfocus,wordpress,wpautoresize,wpeditimage,wpgallery,wplink,wpdialogs,wptextpattern,wpview",toolbar1:"formatselect,bold,italic,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,spellchecker,wp_add_media"}});const e=window.tinymce.get(r.current.id);return e.on("change",(()=>t(e.getContent()))),()=>window.wp.oldEditor.remove(r.current.id)}),[]);const a=`inspector-textarea-control-${l}`,r=(0,c.useRef)(null);return(0,c.createElement)(m.BaseControl,{id:a,label:(0,o.__)("Description","otter-blocks")},(0,c.createElement)("textarea",{id:a,className:"components-textarea-control__input",rows:4,value:e,onChange:e=>t(e.target.value),ref:r}))};var k=h,v=({marker:e,isOpen:t,isPlaceAPIAvailable:l,openMarker:a,removeMarker:r,changeMarkerProp:n})=>{const i=(0,c.useRef)(null);return(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-google-map-marker"},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-google-map-marker-title-area"},(0,c.createElement)(m.Button,{className:"wp-block-themeisle-blocks-google-map-marker-title",onClick:()=>a(e.id)},e.title||(0,o.__)("Custom Marker","otter-blocks")),(0,c.createElement)(m.Button,{icon:"no-alt",label:(0,o.__)("Remove Marker","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-google-map-marker-remove",onClick:()=>r(e.id)})),(0,c.createElement)("div",{className:s()("wp-block-themeisle-blocks-google-map-marker-control-area",{opened:e.id===t})},(0,c.createElement)(m.BaseControl,{label:(0,o.__)("Location","otter-blocks"),id:`themeisle-location-search-${e.id}`},(0,c.createElement)("input",{type:"text",id:`themeisle-location-search-${e.id}`,placeholder:(0,o.__)("Enter a location…","otter-blocks"),value:e.location,className:"wp-block-themeisle-blocks-google-map-search",ref:i,onFocus:()=>{const t=document.getElementsByClassName("pac-container");Object.keys(t).forEach((e=>t[e].remove()));const l=new window.google.maps.places.SearchBox(i.current);l.addListener("places_changed",(()=>{const t=l.getPlaces();t&&0<t.length&&t.forEach((t=>{const l=t.formatted_address||t.name,o=t.geometry.location.lat(),a=t.geometry.location.lng();n(e.id,"location",l),n(e.id,"latitude",o),n(e.id,"longitude",a)}))}))},onChange:t=>n(e.id,"location",t.target.value),disabled:!l}),!l&&(0,c.createElement)("p",null,(0,o.__)("To enable locations earch, please ensure Places API is activated in the Google Developers Console.","otter-blocks")+" ",(0,c.createElement)(m.ExternalLink,{href:"https://developers.google.com/places/web-service/intro"},(0,o.__)("More info.","otter-blocks")))),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",value:e.latitude,onChange:t=>n(e.id,"latitude",t)}),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",value:e.longitude,onChange:t=>n(e.id,"longitude",t)}),(0,c.createElement)(m.SelectControl,{label:(0,o.__)("Map Icon","otter-blocks"),value:e.icon||"https://maps.google.com/mapfiles/ms/icons/red-dot.png",options:[{label:(0,o.__)("Red","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/red-dot.png"},{label:(0,o.__)("Blue","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/blue-dot.png"},{label:(0,o.__)("Yellow","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/yellow-dot.png"},{label:(0,o.__)("Green","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/green-dot.png"},{label:(0,o.__)("Orange","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/orange-dot.png"}],onChange:t=>n(e.id,"icon",t)}),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",value:e.title,onChange:t=>n(e.id,"title",t)}),(0,c.createElement)(k,{label:(0,o.__)("Description","otter-blocks"),type:"text",value:e.description,onChange:t=>n(e.id,"description",t)})))},y=({initialOpen:e,markers:t,isPlaceAPIAvailable:l,addMarker:a,removeMarker:r,changeMarkerProp:n})=>{(0,c.useEffect)((()=>{!1!==e&&s(e)}),[e]);const[i,s]=(0,c.useState)(null),d=e=>{i===e&&(e=null),s(e)};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-google-map-marker-group"},t.map((e=>(0,c.createElement)(v,{key:e.id,marker:e,isOpen:i,isPlaceAPIAvailable:l,openMarker:d,removeMarker:r,changeMarkerProp:n})))),(0,c.createElement)(m.Button,{isSecondary:!0,isLarge:!0,className:"wp-block-themeisle-blocks-google-map-marker-add",onClick:a},(0,o.__)("Add Marker","otter-blocks")))},_=({attributes:e,setAttributes:t,map:l,changeStyle:a,isPlaceAPIAvailable:r,isMarkerOpen:n,setMarkerOpen:i,removeMarker:s,changeMarkerProp:d,addMarkerManual:b,api:g,isSaving:h,changeAPI:k,saveAPIKey:v})=>{const _=(0,c.useRef)(null);return(0,c.createElement)(u.InspectorControls,null,(0,c.createElement)(m.PanelBody,{title:(0,o.__)("Styles","otter-blocks"),initialOpen:!1},(0,c.createElement)(p.V,{value:e.style,options:[{label:(0,o.__)("Standard","otter-blocks"),value:"standard",image:window.themeisleGutenberg.assetsPath+"/icons/map-standard.png"},{label:(0,o.__)("Silver","otter-blocks"),value:"silver",image:window.themeisleGutenberg.assetsPath+"/icons/map-silver.png"},{label:(0,o.__)("Retro","otter-blocks"),value:"retro",image:window.themeisleGutenberg.assetsPath+"/icons/map-retro.png"},{label:(0,o.__)("Dark","otter-blocks"),value:"dark",image:window.themeisleGutenberg.assetsPath+"/icons/map-dark.png"},{label:(0,o.__)("Night","otter-blocks"),value:"night",image:window.themeisleGutenberg.assetsPath+"/icons/map-night.png"},{label:(0,o.__)("Aubergine","otter-blocks"),value:"aubergine",image:window.themeisleGutenberg.assetsPath+"/icons/map-aubergine.png"}],onChange:a})),(0,c.createElement)(m.PanelBody,{title:(0,o.__)("Location","otter-blocks")},(0,c.createElement)(m.BaseControl,{label:(0,o.__)("Location"),id:"wp-block-themeisle-blocks-google-map-search"},(0,c.createElement)("input",{type:"text",id:"wp-block-themeisle-blocks-google-map-search",placeholder:(0,o.__)("Enter a location…","otter-blocks"),value:e.location,className:"wp-block-themeisle-blocks-google-map-search",ref:_,onFocus:()=>{const e=document.getElementsByClassName("pac-container");Object.keys(e).forEach((t=>e[t].remove()));const o=new window.google.maps.places.SearchBox(_.current);o.addListener("places_changed",(()=>{const e=o.getPlaces();e&&0<e.length&&e.forEach((e=>{const o=e.geometry.location.lat(),a=e.geometry.location.lng(),r=new window.google.maps.LatLng(o,a);l.setCenter(r),t({location:e.formatted_address||e.name,latitude:o.toString(),longitude:a.toString()})}))}))},onChange:e=>{t({location:e.target.value})},disabled:!r}),!r&&(0,c.createElement)("p",null,(0,o.__)("To enable locations earch, please ensure Places API is activated in the Google Developers Console.","otter-blocks")+" ",(0,c.createElement)(m.ExternalLink,{href:"https://developers.google.com/places/web-service/intro"},(0,o.__)("More info.","otter-blocks")))),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter latitude…","otter-blocks"),value:e.latitude,onChange:o=>{t({latitude:o.toString()});const a=Number(o),r=e.longitude,n=new window.google.maps.LatLng(a,r);l.setCenter(n)}}),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter longitude","otter-blocks"),value:e.longitude,onChange:o=>{t({longitude:o.toString()});const a=e.latitude,r=Number(o),n=new window.google.maps.LatLng(a,r);l.setCenter(n)}})),(0,c.createElement)(m.PanelBody,{title:(0,o.__)("Positioning & Zooming","otter-blocks"),initialOpen:!1},(0,c.createElement)(m.SelectControl,{label:(0,o.__)("Map Type","otter-blocks"),value:e.type,options:[{label:(0,o.__)("Road Map","otter-blocks"),value:"roadmap"},{label:(0,o.__)("Satellite View","otter-blocks"),value:"satellite"},{label:(0,o.__)("Hybrid","otter-blocks"),value:"hybrid"},{label:(0,o.__)("Terrain","otter-blocks"),value:"terrain"}],onChange:e=>{t({type:e}),l.setMapTypeId(window.google.maps.MapTypeId[e.toUpperCase()])}}),(0,c.createElement)(m.RangeControl,{label:(0,o.__)("Map Zoom Level","otter-blocks"),value:e.zoom,onChange:e=>{t({zoom:e}),l.setZoom(e)},min:0,max:20}),(0,c.createElement)(m.RangeControl,{label:(0,o.__)("Map Height","otter-blocks"),value:e.height,onChange:e=>{t({height:e})},min:100,max:1400})),(0,c.createElement)(m.PanelBody,{title:(0,o.__)("Controls","otter-blocks"),initialOpen:!1},(0,c.createElement)(m.BaseControl,null,(0,o.__)("The following changes will not affect block preview during the editing process. You can click outside the block to see the changes take effect.","otter-blocks")),(0,c.createElement)(m.ToggleControl,{label:(0,o.__)("Draggable Map","otter-blocks"),checked:e.draggable,onChange:()=>{t({draggable:!e.draggable})}}),(0,c.createElement)(m.ToggleControl,{label:(0,o.__)("Map Type Control","otter-blocks"),checked:e.mapTypeControl,onChange:()=>{t({mapTypeControl:!e.mapTypeControl})}}),(0,c.createElement)(m.ToggleControl,{label:(0,o.__)("Zoom Control","otter-blocks"),checked:e.zoomControl,onChange:()=>{t({zoomControl:!e.zoomControl})}}),(0,c.createElement)(m.ToggleControl,{label:(0,o.__)("Full Screen Control","otter-blocks"),checked:e.fullscreenControl,onChange:()=>{t({fullscreenControl:!e.fullscreenControl})}}),(0,c.createElement)(m.ToggleControl,{label:(0,o.__)("Streen View Control","otter-blocks"),checked:e.streetViewControl,onChange:()=>{t({streetViewControl:!e.streetViewControl})}})),(0,c.createElement)(m.PanelBody,{title:(0,o.__)("Markers","otter-blocks"),initialOpen:!1,opened:!1!==n||void 0,onToggle:()=>{!1!==n&&i(!0)}},(0,c.createElement)(y,{markers:e.markers,removeMarker:s,changeMarkerProp:d,addMarker:b,isPlaceAPIAvailable:r,initialOpen:n})),(0,c.createElement)(m.PanelBody,{title:(0,o.__)("Global Settings","otter-blocks"),initialOpen:!1},(0,c.createElement)(m.TextControl,{label:(0,o.__)("Google Maps API Key","otter-blocks"),type:"text",placeholder:(0,o.__)("Google Maps API Key","otter-blocks"),value:g,className:"components-placeholder__input",onChange:k,help:(0,o.__)("Changing the API key effects all Google Map Embed blocks. You will have to refresh the page after changing your API keys.","otter-blocks")}),(0,c.createElement)(m.Button,{isLarge:!0,isSecondary:!0,type:"submit",onClick:v,isBusy:h},(0,o.__)("Save API Key","otter-blocks"))))},w=({marker:e,isAdvanced:t,isPlaceAPIAvailable:l,addMarker:a,close:r})=>{(0,c.useEffect)((()=>{s(e.id),b(e.location),p(e.title),h(e.icon),y(e.description),w(e.latitude),C(e.longitude)}),[e]);const n=(0,c.useRef)(null),[i,s]=(0,c.useState)(e.id),[d,b]=(0,c.useState)(e.location),[u,p]=(0,c.useState)(e.title),[g,h]=(0,c.useState)(e.icon),[v,y]=(0,c.useState)(e.description),[_,w]=(0,c.useState)(e.latitude),[f,C]=(0,c.useState)(e.longitude);return(0,c.createElement)(m.Modal,{title:(0,o.__)("Add Marker","otter-blocks"),onRequestClose:r,shouldCloseOnClickOutside:!1},t&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.BaseControl,{label:(0,o.__)("Location","otter-blocks"),id:`themeisle-location-search-${e.id}`},(0,c.createElement)("input",{type:"text",id:`themeisle-location-search-${i}`,placeholder:(0,o.__)("Enter a location…","otter-blocks"),value:d,className:"wp-block-themeisle-blocks-google-map-search",ref:n,onFocus:()=>{const e=document.getElementsByClassName("pac-container");Object.keys(e).forEach((t=>e[t].remove()));const t=new window.google.maps.places.SearchBox(n.current);t.addListener("places_changed",(()=>{const e=t.getPlaces();e&&0<e.length&&e.forEach((e=>{const t=e.formatted_address||e.name,l=e.geometry.location.lat(),o=e.geometry.location.lng();b(t),w(l),C(o)}))}))},onChange:e=>b(e.target.value),disabled:!l})),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",value:_,onChange:w}),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",value:f,onChange:C})),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",value:u,onChange:p}),(0,c.createElement)(k,{label:(0,o.__)("Description","otter-blocks"),type:"text",value:v,onChange:y}),(0,c.createElement)(m.SelectControl,{label:(0,o.__)("Map Icon","otter-blocks"),value:g||"https://maps.google.com/mapfiles/ms/icons/red-dot.png",options:[{label:(0,o.__)("Red","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/red-dot.png"},{label:(0,o.__)("Blue","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/blue-dot.png"},{label:(0,o.__)("Yellow","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/yellow-dot.png"},{label:(0,o.__)("Green","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/green-dot.png"},{label:(0,o.__)("Orange","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/orange-dot.png"}],onChange:h}),(0,c.createElement)(m.ButtonGroup,null,(0,c.createElement)(m.Button,{isLarge:!0,isPrimary:!0,onClick:()=>a(d,u,g,v,_,f)},(0,o.__)("Add","otter-blocks")),(0,c.createElement)(m.Button,{isLarge:!0,isSecondary:!0,onClick:r},(0,o.__)("Cancel","otter-blocks"))))},f=({attributes:e,className:t,initMap:l,displayMap:a,isMapLoaded:r,selectMarker:n,isSelectingMarker:i})=>((0,c.useEffect)((()=>{a&&l()}),[a]),(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{id:e.id,className:s()(t,{"is-selecting-marker":i}),style:{height:e.height+"px"}}),r&&(0,c.createElement)(m.Button,{className:"wp-block-themeisle-blocks-google-map-marker-button",title:(0,o.__)("Add Button","otter-blocks"),onClick:n},(0,c.createElement)("span",{className:"dashicons dashicons-sticky"})))),C={standard:[],silver:[{elementType:"geometry",stylers:[{color:"#f5f5f5"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#dadada"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#c9c9c9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],retro:[{elementType:"geometry",stylers:[{color:"#ebe3cd"}]},{elementType:"labels.text.fill",stylers:[{color:"#523735"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f1e6"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#c9b2a6"}]},{featureType:"administrative.land_parcel",elementType:"geometry.stroke",stylers:[{color:"#dcd2be"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#ae9e90"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#93817c"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#a5b076"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#447530"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#f5f1e6"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#fdfcf8"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#f8c967"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#e9bc62"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#e98d58"}]},{featureType:"road.highway.controlled_access",elementType:"geometry.stroke",stylers:[{color:"#db8555"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#806b63"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"transit.line",elementType:"labels.text.fill",stylers:[{color:"#8f7d77"}]},{featureType:"transit.line",elementType:"labels.text.stroke",stylers:[{color:"#ebe3cd"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#b9d3c2"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#92998d"}]}],dark:[{elementType:"geometry",stylers:[{color:"#212121"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#212121"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#757575"}]},{featureType:"administrative.country",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"administrative.land_parcel",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"poi.park",elementType:"labels.text.stroke",stylers:[{color:"#1b1b1b"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#373737"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#4e4e4e"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}],night:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}],aubergine:[{elementType:"geometry",stylers:[{color:"#1d2c4d"}]},{elementType:"labels.text.fill",stylers:[{color:"#8ec3b9"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a3646"}]},{featureType:"administrative.country",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#64779e"}]},{featureType:"administrative.province",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"landscape.man_made",elementType:"geometry.stroke",stylers:[{color:"#334e87"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#023e58"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#283d6a"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#6f9ba5"}]},{featureType:"poi",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#023e58"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#3C7680"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#304a7d"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"road",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#2c6675"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#255763"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#b0d5ce"}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{color:"#023e58"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"transit",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"transit.line",elementType:"geometry.fill",stylers:[{color:"#283d6a"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#3a4762"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0e1626"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#4e6d70"}]}]},E=l(5225),T=l(2819);var x={to:[{type:"block",blocks:["themeisle-blocks/leaflet-map"],transform:e=>{const t=(0,T.omit)(e,["style","mapTypeControl","fullscreenControl","streetViewControl"]);return(0,a.createBlock)("themeisle-blocks/leaflet-map",{...t})}}]};(0,a.registerBlockType)("themeisle-blocks/google-map",{title:(0,o.__)("Google Maps","otter-blocks"),description:(0,o.__)("Display Google Maps on your website with Google Map block.","otter-blocks"),icon:r.aD,category:"themeisle-blocks",keywords:["map","google","orbitfox"],attributes:n,supports:{align:["wide","full"],html:!1},transforms:x,edit:({attributes:e,setAttributes:t,className:l,clientId:a,isSelected:r,toggleSelection:i})=>{(0,c.useEffect)((()=>{const t=(0,E.WX)(a,n);return()=>t(e.id)}),[e.id]),(0,c.useEffect)((()=>{(async()=>{await window.wp.api.loadPromise.then((()=>{g.current=new window.wp.api.models.Settings})),!1===Boolean(window.themeisleGutenberg.mapsAPI)?M||g.current.fetch().then((e=>{x(e.themeisle_google_map_block_api_key),S(!0),""!==e.themeisle_google_map_block_api_key&&(z(!0),K(e.themeisle_google_map_block_api_key))})):M||(x(window.themeisleGutenberg.mapsAPI),S(!0),z(!0),K(window.themeisleGutenberg.mapsAPI))})(),window.isMapLoaded=window.isMapLoaded||!1,window[`removeMarker_${a.substr(0,8)}`]=J,h.current=document.createElement("script"),h.current.type="text/javascript",h.current.async=!0,h.current.defer=!0,h.current.id="themeisle-google-map-api-loading"}),[]),(0,c.useEffect)((()=>{!1!==B&&void 0!==window.google&&k.current.setOptions({mapTypeControl:!!r||e.mapTypeControl,zoomControl:!!r||e.zoomControl,fullscreenControl:!!r||e.fullscreenControl,streetViewControl:!!r||e.streetViewControl})}),[r]),(0,c.useEffect)((()=>{y.current=[...e.markers]}),[e.markers]);const u=(0,c.useRef)([]),g=(0,c.useRef)(null),h=(0,c.useRef)(null),k=(0,c.useRef)(null),v=(0,c.useRef)(null),y=(0,c.useRef)([...e.markers]),[T,x]=(0,c.useState)(""),[M,S]=(0,c.useState)(!1),[B,z]=(0,c.useState)(!1),[P,N]=(0,c.useState)(!1),[L,R]=(0,c.useState)(!1),[V,H]=(0,c.useState)(!0),[I,A]=(0,c.useState)(!1),[$,O]=(0,c.useState)(!1),[G,D]=(0,c.useState)(!1),[Z,F]=(0,c.useState)(!1),[W,q]=(0,c.useState)(!1),[U,j]=(0,c.useState)({}),K=e=>{window.isMapLoaded||(window.isMapLoaded=!0,h.current.onload=()=>{document.getElementById("themeisle-google-map-api-loading").id="themeisle-google-map-api",A(!0)},h.current.src=`https://maps.googleapis.com/maps/api/js?key=${e}&libraries=places&cache=${Math.random()}`,document.head.appendChild(h.current)),document.getElementById("themeisle-google-map-api")&&A(!0)},Q=(e,t,l,r)=>{const n=`<div class="wp-block-themeisle-blocks-map-overview"><h6 class="wp-block-themeisle-blocks-map-overview-title">${l}</h6><div class="wp-block-themeisle-blocks-map-overview-content">${r?`<p>${r}</p>`:""}<a class="wp-block-themeisle-blocks-map-overview-delete" onclick="removeMarker_${a.substr(0,8)}( '${t}' )">${(0,o.__)("Delete Marker","otter-blocks")}</a></div></div>`,c=new window.google.maps.InfoWindow({content:n});e.addListener("click",(()=>{v.current=c,c.open(k.current,e)})),window.google.maps.event.addListener(c,"domready",(()=>{O(t)})),window.google.maps.event.addListener(c,"closeclick",(()=>{O(!1)}))},X=e=>{e.forEach((e=>{const t=e.latitude,l=e.longitude,o=new window.google.maps.LatLng(t,l),a=new window.google.maps.Marker({position:o,map:k.current,title:e.title,draggable:!0,icon:e.icon||"https://maps.google.com/mapfiles/ms/icons/red-dot.png"});window.google.maps.event.addListener(a,"dragend",(t=>{const l=t.latLng.lat(),o=t.latLng.lng();Y(e.id,"latitude",l),Y(e.id,"longitude",o)})),u.current.push(a),window.google.maps.event.addListener(a,"click",(()=>{v.current&&v.current.close()})),Q(a,e.id,e.title,e.description)}))},Y=(e,l,o)=>{const a=[...y.current];a.find((t=>t.id===e))[l]=o.toString(),ee(),X(a),t({markers:a})},J=e=>{let l=[...y.current];l=l.filter((t=>t.id!==e)),t({markers:l}),ee(),O(!1),0<l.length&&X(l)},ee=()=>{for(let e=0;e<u.current.length;e++)u.current[e].setMap(null);u.current=[]},te=()=>{!1===Boolean(window.themeisleGutenberg.mapsAPI)&&(R(!0),new window.wp.api.models.Settings({themeisle_google_map_block_api_key:T}).save().then((e=>{let t=!1;""!==e.themeisle_google_map_block_api_key&&(t=!0),R(!1),z(t),""!==e.themeisle_google_map_block_api_key&&(window.isMapLoaded=!1,K(e.themeisle_google_map_block_api_key))})))},le=e=>{t({style:e}),k.current.setOptions({styles:C[e]})};return M&&B?(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.d,{label:(0,o.__)("Block Styles","otter-blocks"),value:e.style,options:[{label:(0,o.__)("Standard","otter-blocks"),value:"standard",image:window.themeisleGutenberg.assetsPath+"/icons/map-standard.png"},{label:(0,o.__)("Silver","otter-blocks"),value:"silver",image:window.themeisleGutenberg.assetsPath+"/icons/map-silver.png"},{label:(0,o.__)("Retro","otter-blocks"),value:"retro",image:window.themeisleGutenberg.assetsPath+"/icons/map-retro.png"},{label:(0,o.__)("Dark","otter-blocks"),value:"dark",image:window.themeisleGutenberg.assetsPath+"/icons/map-dark.png"},{label:(0,o.__)("Night","otter-blocks"),value:"night",image:window.themeisleGutenberg.assetsPath+"/icons/map-night.png"},{label:(0,o.__)("Aubergine","otter-blocks"),value:"aubergine",image:window.themeisleGutenberg.assetsPath+"/icons/map-aubergine.png"}],onChange:le}),(0,c.createElement)(_,{attributes:e,setAttributes:t,map:k.current,changeStyle:le,isPlaceAPIAvailable:V,isMarkerOpen:$,setMarkerOpen:O,removeMarker:J,changeMarkerProp:Y,addMarkerManual:()=>{const e=(0,d.Z)(),t=(0,o.__)("Custom Marker","otter-blocks"),l=k.current.getCenter(),a=l.lat(),r=l.lng();F(!0),q(!0),j({id:e,location:"",title:t,icon:"https://maps.google.com/mapfiles/ms/icons/red-dot.png",description:"",latitude:a,longitude:r})},api:T,isSaving:L,changeAPI:x,saveAPIKey:te}),Z&&(0,c.createElement)(w,{marker:U,isAdvanced:W,isPlaceAPIAvailable:V,close:()=>F(!1),addMarker:(l,o,a,r,n,c)=>{const i=new window.google.maps.LatLng(n,c),s=(0,d.Z)(),m=new window.google.maps.Marker({position:i,map:k.current,title:o,draggable:!0,icon:a});window.google.maps.event.addListener(m,"dragend",(e=>{const t=e.latLng.lat(),l=e.latLng.lng();Y(s,"latitude",t),Y(s,"longitude",l)})),u.current.push(m);const b=[...e.markers],p={id:s,location:l,title:o,icon:a,description:r,latitude:n,longitude:c};b.push(p),t({markers:b}),window.google.maps.event.addListener(m,"click",(()=>{v.current&&v.current.close()})),Q(m,p.id,o,r),F(!1),D(!1)}}),(0,c.createElement)(m.ResizableBox,{size:{height:e.height},enable:{top:!1,right:!1,bottom:!0,left:!1},minHeight:100,maxHeight:1400,onResizeStart:()=>{i(!1)},onResizeStop:(l,o,a,r)=>{t({height:parseInt(e.height+r.height,10)}),i(!0)},className:s()("wp-block-themeisle-blocks-google-map-resizer",{"is-focused":r})},(0,c.createElement)(f,{attributes:e,className:l,initMap:()=>{if(k.current=new window.google.maps.Map(document.getElementById(e.id),{center:{lat:Number(e.latitude)||41.4036299,lng:Number(e.longitude)||2.1743558000000576},gestureHandling:"cooperative",zoom:e.zoom,mapTypeId:e.type,styles:C[e.style]}),e.location&&void 0===e.latitude&&void 0===e.longitude){const t={query:e.location,fields:["name","geometry"]};new window.google.maps.places.PlacesService(k.current).findPlaceFromQuery(t,((e,t)=>{t===window.google.maps.places.PlacesServiceStatus.OK&&0<e.length&&k.current.setCenter(e[0].geometry.location)}))}window.google.maps.event.addListenerOnce(k.current,"idle",(()=>{N(!0)})),k.current.addListener("zoom_changed",(()=>{const e=k.current.getZoom();t({zoom:e})})),k.current.addListener("maptypeid_changed",(()=>{const e=k.current.getMapTypeId();t({type:e})})),k.current.addListener("bounds_changed",(()=>{const e=k.current.getCenter(),l=e.lat(),o=e.lng();t({latitude:l.toString(),longitude:o.toString()})})),0<e.markers.length&&X(e.markers);const l={query:e.location,fields:["name","geometry"]};new window.google.maps.places.PlacesService(k.current).findPlaceFromQuery(l,((e,t)=>{"REQUEST_DENIED"===t&&H(!1)}))},displayMap:I,isMapLoaded:P,selectMarker:()=>{D(!G),G?window.google.maps.event.clearListeners(k.current,"click"):k.current.addListener("click",(e=>{window.google.maps.event.clearListeners(k.current,"click");const t=(0,d.Z)(),l=(0,o.__)("Custom Marker","otter-blocks"),a=e.latLng.lat(),r=e.latLng.lng();F(!0),q(!1),j({id:t,location:"",title:l,icon:"https://maps.google.com/mapfiles/ms/icons/red-dot.png",description:"",latitude:a,longitude:r})}))},isSelectingMarker:G}))):(0,c.createElement)(b,{className:l,api:T,isAPILoaded:M,isAPISaved:B,changeAPI:x,saveAPIKey:te})},save:()=>null})},4441:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},defaultLibrary:{type:"string",default:"fontawesome"},defaultIconPrefix:{type:"string",default:"fas"},defaultIcon:{type:"string",default:"angle-right"},defaultContentColor:{type:"string"},defaultIconColor:{type:"string"},defaultSize:{type:"number",default:20},gap:{type:"number",default:5},horizontalAlign:{type:"string"}},c=l(9307),i=l(2175),s=l(1216),d=l(5225),m=({attributes:e,setAttributes:t})=>(0,c.createElement)(i.BlockControls,null,(0,c.createElement)(i.AlignmentToolbar,{value:e.horizontalAlign,onChange:e=>{switch(e){case"left":t({horizontalAlign:"flex-start"});break;case"center":t({horizontalAlign:"center"});break;case"right":t({horizontalAlign:"flex-end"})}}})),b=l(5609);const u=(0,c.lazy)((()=>Promise.all([l.e(189),l.e(765)]).then(l.bind(l,3765))));var p=({attributes:e,setAttributes:t})=>(0,c.createElement)(i.InspectorControls,null,(0,c.createElement)(b.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,c.createElement)(c.Suspense,{fallback:(0,c.createElement)(b.Placeholder,null,(0,c.createElement)(b.Spinner,null))},(0,c.createElement)(u,{label:(0,o.__)("Icon Picker","otter-blocks"),library:e.defaultLibrary,prefix:e.defaultPrefix,icon:e.defaultIcon,changeLibrary:e=>{t({defaultLibrary:e,defaultIcon:void 0,defaultPrefix:"fas"})},onChange:e=>{t("object"==typeof e?{defaultIcon:e.name,defaultPrefix:e.prefix}:{defaultIcon:e})}})),(0,c.createElement)(b.RangeControl,{label:(0,o.__)("Font Size","otter-blocks"),help:(0,o.__)("The size of the font size of the content and icon.","otter-blocks"),value:e.defaultSize,onChange:e=>{t({defaultSize:e})},min:0,max:60,allowReset:!0}),(0,c.createElement)(b.RangeControl,{label:(0,o.__)("Gap","otter-blocks"),help:(0,o.__)("The distance between the items.","otter-blocks"),value:e.gap,onChange:e=>{t({gap:e})},min:0,max:60,allowReset:!0}),(0,c.createElement)(i.__experimentalColorGradientControl,{label:(0,o.__)("Content Color","otter-blocks"),colorValue:e.defaultContentColor,onColorChange:e=>{t({defaultContentColor:e})}}),(0,c.createElement)(i.__experimentalColorGradientControl,{label:(0,o.__)("Icon Color","otter-blocks"),colorValue:e.defaultIconColor,onColorChange:e=>{t({defaultIconColor:e})}})));(0,a.registerBlockType)("themeisle-blocks/icon-list",{title:(0,o.__)("Icon List","otter-blocks"),description:(0,o.__)("Display an icon list in a beautiful layout.","otter-blocks"),icon:r.rL,category:"themeisle-blocks",keywords:["icon","list","items"],attributes:n,styles:[{name:"vertical",label:(0,o.__)("Vertical","otter-blocks"),isDefault:!0},{name:"horizontal",label:(0,o.__)("Horizontal","otter-blocks")}],edit:({attributes:e,setAttributes:t,clientId:l,className:o})=>((0,c.useEffect)((()=>{const t=(0,d.WX)(l,n);return()=>t(e.id)}),[e.id]),(0,s.tZ)(c.Fragment,null,(0,s.tZ)(m,{attributes:e,setAttributes:t}),(0,s.tZ)(p,{attributes:e,setAttributes:t}),(0,s.tZ)("div",{id:e.id,className:o,css:s.iv`
42
  .block-editor-block-list__layout {
43
  align-items: ${e.horizontalAlign||"unset"} !important;
44
  justify-content: ${e.horizontalAlign||"unset"} !important;
45
  gap: ${e.gap}px;
46
  }
47
- `},(0,s.tZ)(i.InnerBlocks,{allowedBlocks:["themeisle-blocks/icon-list-item"],__experimentalMoverDirection:"vertical",orientation:"vertical",template:[["themeisle-blocks/icon-list-item"]],renderAppender:i.InnerBlocks.DefaultAppender})))),save:({attributes:e,className:t})=>(0,c.createElement)("div",{className:t,id:e.id},(0,c.createElement)(i.InnerBlocks.Content,null))})},7970:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},content:{type:"string"},contentColor:{type:"string"},iconColor:{type:"string"},library:{type:"string"},iconPrefix:{type:"string"},icon:{type:"string"}},c=l(9307),i=l(4184),s=l.n(i),d=l(2175),m=l(9818),b=l(5609);const u=(0,c.lazy)((()=>Promise.all([l.e(189),l.e(765)]).then(l.bind(l,3765))));var p=({attributes:e,setAttributes:t})=>(0,c.createElement)(d.InspectorControls,null,(0,c.createElement)(b.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,c.createElement)(c.Suspense,{fallback:(0,c.createElement)(b.Placeholder,null,(0,c.createElement)(b.Spinner,null))},(0,c.createElement)(u,{label:(0,o.__)("Icon Picker","otter-blocks"),library:e.library,prefix:e.iconPrefix,icon:e.icon,changeLibrary:e=>{t({library:e,icon:void 0,iconPrefix:"fab"})},onChange:e=>{t("object"==typeof e?{icon:e.name,iconPrefix:e.prefix}:{icon:e})}})),(0,c.createElement)(d.__experimentalColorGradientControl,{label:(0,o.__)("Content Color","otter-blocks"),colorValue:e.contentColor,onColorChange:e=>{t({contentColor:e})}}),(0,c.createElement)(d.__experimentalColorGradientControl,{label:(0,o.__)("Icon Color","otter-blocks"),colorValue:e.iconColor,onColorChange:e=>{t({iconColor:e})}}))),g=l(48),h=l(5225);(0,a.registerBlockType)("themeisle-blocks/icon-list-item",{title:(0,o.__)("Icon List Item","otter-blocks"),description:(0,o.__)("Display an item for the icon list.","otter-blocks"),icon:r.rL,attributes:n,category:"themeisle-blocks",parent:["themeisle-blocks/icon-list"],keywords:["item","icon","list"],merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:({attributes:e,setAttributes:t,className:l,name:r,clientId:i,onReplace:b,onRemove:u,mergeBlocks:k})=>{const{hasParent:v,parentClass:y,parentAttributes:_}=(0,m.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:l}=e("core/block-editor"),o=t(l(i));return{hasParent:!!o,parentClass:o.attributes.className||"",parentAttributes:o?o.attributes:{}}}),[]);(0,c.useEffect)((()=>{const t=(0,h.WX)(i,n);return()=>t(e.id)}),[e.id]);const w=g.ZP.icons[e.icon],f=`${e.iconPrefix||_.defaultIconPrefix} fa-${e.icon||_.defaultIcon}`,C={color:e.contentColor||_.defaultContentColor,fontSize:_.defaultSize+"px"},E={color:e.iconColor||_.defaultIconColor,fill:e.iconColor||_.defaultIconColor,fontSize:_.defaultSize+"px"};return!v||e.iconPrefix&&e.library||t({library:e.library||_.defaultLibrary,icon:e.icon||_.defaultIcon,iconPrefix:e.iconPrefix||_.defaultIconPrefix}),(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p,{attributes:e,setAttributes:t}),(0,c.createElement)("div",{className:l},"themeisle-icons"===e.library&&e.icon&&void 0!==w?(0,c.createElement)(w,{className:s()({"wp-block-themeisle-blocks-icon-list-item-icon":!e.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":e.iconColor}),style:{...E,width:_.defaultSize+"px"}}):(0,c.createElement)("i",{className:s()(f,{"wp-block-themeisle-blocks-icon-list-item-icon":!e.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":e.iconColor}),style:E}),(0,c.createElement)(d.RichText,{identifier:"content",tagName:"p",placeholder:(0,o.__)("Write your content…","otter-blocks"),className:s()({"wp-block-themeisle-blocks-icon-list-item-content":!e.contentColor},{"wp-block-themeisle-blocks-icon-list-item-content-custom":e.contentColor}),style:C,value:e.content,onChange:e=>{t({content:e})},onSplit:t=>t?(0,a.createBlock)(r,{...e,content:t}):(0,a.createBlock)(r),onMerge:k,onReplace:b,onRemove:u,keepPlaceholderOnFocus:!0})))},save:({attributes:e,className:t})=>{const l=`${e.iconPrefix} fa-${e.icon}`,o=g.ZP.icons[e.icon];return(0,c.createElement)("div",{className:t,id:e.id},"themeisle-icons"===e.library&&e.icon?(0,c.createElement)(o,{className:s()({"wp-block-themeisle-blocks-icon-list-item-icon":!e.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":e.iconColor})}):(0,c.createElement)("i",{className:s()(l,{"wp-block-themeisle-blocks-icon-list-item-icon":!e.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":e.iconColor})}),(0,c.createElement)(d.RichText.Content,{tagName:"p",className:s()({"wp-block-themeisle-blocks-icon-list-item-content":!e.contentColor},{"wp-block-themeisle-blocks-icon-list-item-content-custom":e.contentColor}),value:e.content}))}})},5303:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},location:{type:"string",default:"La Sagrada Familia, Barcelona, Spain"},latitude:{type:"string",default:"41.4034789"},longitude:{type:"string",default:"2.174410333009705"},bbox:{type:"string",default:"2.1207046508789067%2C41.34807736149302%2C2.2288513183593754%2C41.45816618938139"},zoom:{type:"number",default:13},height:{type:"number",default:400},markers:{type:"array",default:[]},zoomControl:{type:"boolean",default:!0},draggable:{type:"boolean",default:!0}},c=l(9307),i=l(4586),s=l(4184),d=l.n(s),m=l(2819),b=l(5609),u=l(2175);async function p(e){const t=await async function(e){if("string"!=typeof e)throw(0,o.__)("Location must be a string","otter-blocks");const t="https://nominatim.openstreetmap.org/search?q="+e.split(" ").map((e=>encodeURIComponent(e))).join("+")+"&format=geojson",l=await fetch(t);return l.ok&&200===l.status?l.json():console.warn((0,o.__)("An error has occured: ","otter-blocks")+l.status)}(e);if(null!=t&&t.features.length){var l;const e=t.features[0];if(null!=e&&null!==(l=e.geometry)&&void 0!==l&&l.coordinates.length)return{longitude:e.geometry.coordinates[0],latitude:e.geometry.coordinates[1]}}return null}var g=l(4333);const h=({value:e,onChange:t})=>{const l=(0,g.useInstanceId)(h);(0,c.useEffect)((()=>{wp.oldEditor.initialize(r.current.id,{tinymce:{classic_block_editor:!0,plugins:"lists,media,paste,tabfocus,wordpress,wpautoresize,wpeditimage,wpgallery,wplink,wpdialogs,wptextpattern,wpview",toolbar1:"formatselect,bold,italic,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,spellchecker,wp_add_media"}});const e=window.tinymce.get(r.current.id);return e.on("change",(()=>t(e.getContent()))),()=>wp.oldEditor.remove(r.current.id)}),[]);const a=`inspector-textarea-control-${l}`,r=(0,c.useRef)(null);return(0,c.createElement)(b.BaseControl,{id:a,label:(0,o.__)("Description","otter-blocks")},(0,c.createElement)("textarea",{id:a,className:"components-textarea-control__input",rows:4,value:e,onChange:e=>t(e.target.value),ref:r}))};var k=h,v=({marker:e,isOpen:t,openMarker:l,dispatch:a})=>{const[r,n]=(0,c.useState)(e.location),[i,s]=(0,c.useState)(e.longitude),[m,u]=(0,c.useState)(e.latitude),[g,h]=(0,c.useState)(e.title),[v,y]=(0,c.useState)(e.description),[_,w]=(0,c.useState)({target:"",reason:""});return(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker"},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker-title-area"},(0,c.createElement)(b.Button,{className:"wp-block-themeisle-blocks-leaflet-map-marker-title",onClick:()=>l()},e.title||(0,o.__)("Custom Marker","otter-blocks")),(0,c.createElement)(b.Button,{icon:"no-alt",label:(0,o.__)("Remove Marker","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-leaflet-map-marker-remove",onClick:()=>a({type:f.REMOVE,ids:[e.id]})})),t&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker-control-area"},(0,c.createElement)(b.TextControl,{label:(0,o.__)("Location","otter-blocks"),type:"text",className:d()({"wp-block-themeisle-blocks-leaflet-map-input-error":"LOCATION"===_.target}),value:r,onChange:e=>{n(e)},help:(0,o.__)("Press Enter to search the location","otter-blocks"),onKeyDown:t=>((t,l)=>{t.key===l&&(async()=>{const t=await p(r);t?(a({type:f.UPDATE,ids:[e.id],updatedProps:{location:r,latitude:t.latitude,longitude:t.longitude}}),u(t.latitude),s(t.longitude),"LOCATION"===_.target&&w({})):w({target:"LOCATION",reason:(0,o.__)("Location couldn't been found!","otter-blocks")})})()})(t,"Enter")}),(0,c.createElement)(b.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",value:m,onChange:t=>{u(t),a({type:f.UPDATE,ids:[e.id],updatedProps:{latitude:t}})}}),(0,c.createElement)(b.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",value:i,onChange:t=>{s(t),a({type:f.UPDATE,ids:[e.id],updatedProps:{longitude:t}})}}),(0,c.createElement)(b.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",value:g,onChange:t=>{h(t),a({type:f.UPDATE,ids:[e.id],updatedProps:{title:t}})}}),(0,c.createElement)(k,{label:(0,o.__)("Description","otter-blocks"),type:"text",value:e.description,onChange:t=>{y(v),a({type:f.UPDATE,ids:[e.id],updatedProps:{description:t}})}})))},y=({markers:e,dispatch:t,markersInteraction:l})=>{const{openMarker:a,setOpenMarker:r}=l;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker-group"},e.map((e=>(0,c.createElement)(v,{key:e.id,marker:e,isOpen:a===e.id,openMarker:()=>r(l.openMarker!==e.id?e.id:null),dispatch:t})))),(0,c.createElement)(b.Button,{isSecondary:!0,isLarge:!0,className:"wp-block-themeisle-blocks-leaflet-map-marker-add",onClick:()=>{t({type:f.ADD,marker:{id:(0,i.Z)()},dispatch:t})}},(0,o.__)("Add Marker","otter-blocks")))},_=({attributes:e,setAttributes:t,dispatch:l,markersInteraction:a})=>{const[r,n]=(0,c.useState)(e.location),[i,s]=(0,c.useState)({target:"",reason:""});return(0,c.createElement)(u.InspectorControls,null,(0,c.createElement)(b.PanelBody,{title:(0,o.__)("Location","otter-blocks")},(0,c.createElement)(b.TextControl,{label:(0,o.__)("Location","otter-blocks"),type:"text",className:d()({"wp-block-themeisle-blocks-leaflet-map-input-error":"LOCATION"===i.target}),placeholder:(0,o.__)("Enter location. E.g: La Sagrada Familia, Barcelona, Spain","otter-blocks"),help:(0,o.__)("Press Enter to search the location","otter-blocks"),value:r,onChange:n,onKeyDown:e=>((e,l)=>{e.key===l&&(async()=>{t({location:r});const e=await p(r);e?(t({latitude:e.latitude.toString(),longitude:e.longitude.toString()}),"LOCATION"===i.target&&s({})):s({target:"LOCATION",reason:(0,o.__)("Location couldn't been found!","otter-blocks")})})()})(e,"Enter")}),(0,c.createElement)(b.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter latitude…","otter-blocks"),value:e.latitude,onChange:e=>{t({latitude:e.toString()})}}),(0,c.createElement)(b.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter longitude","otter-blocks"),value:e.longitude,onChange:e=>{t({longitude:e.toString()})}})),(0,c.createElement)(b.PanelBody,{title:(0,o.__)("Positioning & Zooming","otter-blocks"),initialOpen:!1},(0,c.createElement)(b.RangeControl,{label:(0,o.__)("Map Zoom Level","otter-blocks"),value:e.zoom,onChange:e=>{t({zoom:e})},min:0,max:20}),(0,c.createElement)(b.RangeControl,{label:(0,o.__)("Map Height","otter-blocks"),value:e.height,onChange:e=>{t({height:e})},min:100,max:1400})),(0,c.createElement)(b.PanelBody,{title:(0,o.__)("Controls","otter-blocks"),initialOpen:!1},(0,c.createElement)(b.BaseControl,null,(0,o.__)("The following changes will not affect block preview during the editing process. You can click outside the block to see the changes take effect.","otter-blocks")),(0,c.createElement)(b.ToggleControl,{label:(0,o.__)("Draggable Map","otter-blocks"),checked:e.draggable,onChange:()=>{t({draggable:!e.draggable})}}),(0,c.createElement)(b.ToggleControl,{label:(0,o.__)("Zoom Control","otter-blocks"),checked:e.zoomControl,onChange:()=>{t({zoomControl:!e.zoomControl})}})),(0,c.createElement)(b.PanelBody,{title:(0,o.__)("Markers","otter-blocks"),initialOpen:!0},(0,c.createElement)(y,{markers:e.markers,dispatch:l,markersInteraction:a})))},w=l(5225);const f={ADD:"ADD",ADD_MANUAL:"ADD_MANUAL",REMOVE:"REMOVE",UPDATE:"UPDATE",INIT:"INIT"};var C={to:[{type:"block",blocks:["themeisle-blocks/google-map"],transform:e=>{const t=e;return(0,a.createBlock)("themeisle-blocks/google-map",{...t})}}]};(0,a.registerBlockType)("themeisle-blocks/leaflet-map",{title:(0,o.__)("Maps","otter-blocks"),description:(0,o.__)("Display Open Street Maps on your website with Maps block.","otter-blocks"),icon:r.aD,category:"themeisle-blocks",keywords:["map","opeenstreetmap","location"],attributes:n,supports:{align:["wide","full"],html:!1},transforms:C,edit:({clientId:e,attributes:t,setAttributes:l,className:a,isSelected:r,toggleSelection:s})=>{(0,c.useEffect)((()=>{const l=(0,w.WX)(e,n);return()=>l(t.id)}),[t.id]);const u=(0,c.useRef)(null),[p,g]=(0,c.useState)(null),[h,k]=(0,c.useState)(!1),[v,y]=(0,c.useState)(null),C=(e,t)=>{if(window.L&&p&&t&&e){var l,a,r,n,c;null!==(l=e.id)&&void 0!==l||(e.id=(0,i.Z)()),null!==(a=e.latitude)&&void 0!==a||(e.latitude=p.getCenter().lat),null!==(r=e.longitude)&&void 0!==r||(e.longitude=p.getCenter().lng),null!==(n=e.title)&&void 0!==n||(e.title=(0,o.__)("Add a title","otter-blocks")),null!==(c=e.description)&&void 0!==c||(e.description="");const s=window.L.marker([e.latitude,e.longitude]||0,{draggable:!0});return s.on("movestart",(()=>{s.closeTooltip(),s.closePopup()})),s.on("moveend",(()=>{const l=s.getLatLng();t({type:f.UPDATE,ids:[e.id],updatedProps:{latitude:l.lat,longitude:l.lng}})})),s.on("click",(()=>{y(e.id)})),s.markerProps=e,s}return null},[E,T]=(0,c.useReducer)(((e,t)=>{switch(t.type){case f.ADD:const l=C(t.marker,t.dispatch);return[...e,l];case f.ADD_MANUAL:if(h){const l=C(t.marker,t.dispatch);return[...e,l]}return e;case f.REMOVE:return e.filter((({markerProps:e})=>t.ids.includes(e.id))).forEach((e=>{p.hasLayer(e)&&p.removeLayer(e)})),e.filter((({markerProps:e})=>!t.ids.includes(e.id)));case f.INIT:const a=t.markers.map((e=>C(e,t.dispatch)));return[...e,...a];case f.UPDATE:return e.map((e=>{const l=e.markerProps;return t.ids.includes(l.id)&&(e.markerProps=(0,m.merge)(e.markerProps,t.updatedProps)),e}));default:console.warn((0,o.__)("The action for the leaflet block do not have a defined action in marker's reducer: ","otter-blocks")+t.type)}return e}),[]);return(0,c.useEffect)((()=>{(()=>{if(!u.current&&!window.L)return;u.current.innerHTML="";const e=window.L.map(u.current,{gestureHandling:!0,gestureHandlingOptions:{text:{touch:(0,o.__)("Use two fingers to move the map","otter-blocks"),scroll:(0,o.__)("Use ctrl + scroll to zoom the map","otter-blocks"),scrollMac:(0,o.__)("Use ⌘ + scroll to zoom the map","otter-blocks")}}});window.L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:["a","b","c"]}).addTo(e),e.on("zoom",(()=>{l({zoom:e.getZoom()})})),e.on("moveend",(()=>{const t=e.getCenter();l({latitude:t.lat.toString(),longitude:t.lng.toString()})})),e.on("click",(e=>{T({type:f.ADD_MANUAL,marker:{latitude:e.latlng.lat,longitude:e.latlng.lng},dispatch:T}),k(!1)})),window.L.Control.AddMarker=window.L.Control.extend({onAdd:()=>{const e=window.L.DomUtil.create("button","wp-block-themeisle-blocks-leaflet-map-marker-button"),t=window.L.DomUtil.create("span","dashicons dashicons-sticky",e);return window.L.DomEvent.on(e,"click",(e=>{window.L.DomEvent.stopPropagation(e),k(!h)})),e.title=(0,o.__)("Add marker on the map with a click","otter-blocks"),e.appendChild(t),e},onRemove:()=>{}}),window.L.control.addmarker=e=>new window.L.Control.AddMarker(e),window.L.control.addmarker({position:"bottomleft"}).addTo(e),g(e),T({type:f.INIT,markers:t.markers,dispatch:T})})()}),[]),(0,c.useEffect)((()=>{t.height&&p&&p.invalidateSize(!0)}),[t.height,p]),(0,c.useEffect)((()=>{t.latitude&&t.longitude&&p&&p.setView([t.latitude,t.longitude],t.zoom||13)}),[t.latitude,t.longitude,t.zoom,p]),(0,c.useEffect)((()=>{var e;null===(e=u.current)||void 0===e||e.classList.toggle("is-selecting-location",h)}),[h]),(0,c.useEffect)((()=>{t.latitude&&t.longitude&&p&&l({bbox:p.getBounds().toBBoxString()})}),[t.latitude,t.longitude,p]),(0,c.useEffect)((()=>{E&&(l({markers:E.map((({markerProps:e})=>e))}),E.forEach((e=>{p.hasLayer(e)||p.addLayer(e);const{markerProps:t}=e;e.setLatLng([t.latitude,t.longitude]),e.closeTooltip(),e.unbindTooltip(),e.bindTooltip(t.title,{direction:"auto"}),e.closePopup(),e.unbindPopup(),e.bindPopup(((e,t)=>{const l=document.createElement("div"),a=document.createElement("h6"),r=document.createElement("div"),n=document.createElement("p"),c=document.createElement("button");return a.innerHTML=e.title,n.innerHTML=e.description,c.onclick=()=>t({type:f.REMOVE,ids:[e.id]}),c.innerHTML=(0,o.__)("Delete Marker","otter-blocks"),l.classList.add("wp-block-themeisle-blocks-map-overview"),r.classList.add("wp-block-themeisle-blocks-map-overview-content"),a.classList.add("wp-block-themeisle-blocks-map-overview-title"),c.classList.add("wp-block-themeisle-blocks-map-overview-delete"),l.appendChild(a),l.appendChild(r),l.appendChild(c),r.appendChild(n),l})(t,T))})))}),[E]),(0,c.createElement)(c.Fragment,null,(0,c.createElement)(_,{attributes:t,setAttributes:l,dispatch:T,markersInteraction:{openMarker:v,setOpenMarker:y}}),(0,c.createElement)(b.ResizableBox,{size:{height:t.height},enable:{top:!1,right:!1,bottom:!0,left:!1},minHeight:100,maxHeight:1400,onResizeStart:()=>{s(!1)},onResizeStop:(e,o,a,r)=>{l({height:parseInt(t.height+r.height,10)}),s(!0)},className:d()("wp-block-themeisle-blocks-leaflet-map-resizer",{"is-focused":r})},(0,c.createElement)("div",{className:a},(0,c.createElement)("div",{id:t.id,ref:u,style:{width:"100%",height:t.height||400}}))))},save:()=>null})},2793:function(e,t,l){var o=l(2553),a=l(5736),r=l(4981),n=l(9307),c=l(2819),i=l(2175),s=l(5609),d=({className:e,file:t,onChange:l,isJSONAllowed:r,attributes:c})=>{var d;const[m,b]=(0,n.useState)((null===(d=c.file)||void 0===d?void 0:d.url)||null),[u,p]=(0,n.useState)(!1);return r&&!Boolean(window.themeisleGutenberg.isWPVIP)?(0,n.createElement)(i.MediaPlaceholder,{labels:{title:(0,a.__)("Lottie","otter-blocks"),instructions:(0,a.__)("Add Lottie animations and files to your website.","otter-blocks")},icon:(0,n.createElement)(i.BlockIcon,{icon:o.Z}),accept:["application/json"],allowedTypes:["application/json"],value:{...t},onSelectURL:l,onSelect:l}):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.Placeholder,{label:(0,a.__)("Lottie","otter-blocks"),instructions:(0,a.__)("Add Lottie animations and files to your website.","otter-blocks"),icon:(0,n.createElement)(i.BlockIcon,{icon:o.Z}),className:e},(0,n.createElement)("form",{onSubmit:e=>(e&&e.preventDefault(),l(m))},(0,n.createElement)("input",{type:"url",value:m,className:"components-placeholder__input","aria-label":(0,a.__)("Lottie","otter-blocks"),placeholder:(0,a.__)("Enter URL to embed here…","otter-blocks"),onChange:e=>b(e.target.value)}),(0,n.createElement)(s.Button,{isPrimary:!0,disabled:!m,type:"submit"},(0,a.__)("Embed","otter-blocks")),!Boolean(window.themeisleGutenberg.isWPVIP)&&(0,n.createElement)(s.Button,{isSecondary:!0,onClick:()=>p(!0)},(0,a.__)("Upload","otter-blocks")))),u&&(0,n.createElement)(s.Modal,{title:(0,a.__)("Allow JSON Uploads","otter-blocks"),closeLabel:(0,a.__)("Close"),onRequestClose:()=>p(!1),overlayClassName:"wp-block-themeisle-blocks-lottie-modal"},(0,a.__)("This file type is not permitted for security reasons. Would you still like to enable JSON uploads?","otter-blocks"),(0,n.createElement)("br",null),(0,n.createElement)("br",null),(0,n.createElement)(s.ExternalLink,{href:window.themeisleGutenberg.optionsPath},(0,a.__)("You can enable JSON uploads from Otter.","otter-blocks")),(0,n.createElement)("br",null),(0,n.createElement)("br",null),(0,a.__)("You will have to refresh the page after changing JSON upload settings.","otter-blocks")))},m=({attributes:e,setAttributes:t,playerRef:l})=>(0,n.createElement)(i.InspectorControls,null,(0,n.createElement)(s.PanelBody,{title:(0,a.__)("Settings","otter-blocks"),initialOpen:!0},(0,n.createElement)(s.SelectControl,{label:(0,a.__)("Trigger","otter-blocks"),help:(0,a.__)("Animation trigger. This will only work on the front-end.","otter-blocks"),value:e.trigger,options:[{label:(0,a.__)("None","otter-blocks"),value:"none"},{label:(0,a.__)("Scroll","otter-blocks"),value:"scroll"},{label:(0,a.__)("Hover","otter-blocks"),value:"hover"},{label:(0,a.__)("Click","otter-blocks"),value:"click"}],onChange:e=>{t({trigger:e})}}),"scroll"!==e.trigger&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.ToggleControl,{label:(0,a.__)("Loop","otter-blocks"),help:(0,a.__)("Whether to loop animation.","otter-blocks"),checked:e.loop,onChange:o=>{t({loop:o}),l.current.setLooping(o),e.direction&&l.current.seek("100%"),l.current.play()}}),e.loop&&(0,n.createElement)(s.TextControl,{label:(0,a.__)("Numbers of loops","otter-blocks"),help:(0,a.__)("Number of times to loop animation.","otter-blocks"),type:"number",value:e.count,onChange:o=>{t({count:Number(o)}),l.current.load(e.file.url)}}),(0,n.createElement)(s.RangeControl,{label:(0,a.__)("Speed","otter-blocks"),help:(0,a.__)("Animation speed.","otter-blocks"),value:e.speed,onChange:e=>{t({speed:Number(e)}),l.current.setSpeed(e)},step:.1,min:.1,max:5}),(0,n.createElement)(s.ToggleControl,{label:(0,a.__)("Reverse","otter-blocks"),help:(0,a.__)("Direction of animation.","otter-blocks"),checked:e.direction,onChange:e=>{t({direction:e}),l.current.setDirection(e?-1:1),l.current.seek(e?"100%":0)}})),(0,n.createElement)(s.RangeControl,{label:(0,a.__)("Width","otter-blocks"),help:(0,a.__)("Container width in pixels.","otter-blocks"),value:e.width,onChange:e=>{t({width:Number(e)})},min:100,max:1e3}))),b=({isEditing:e,setEditing:t})=>(0,n.createElement)(i.BlockControls,null,(0,n.createElement)(s.Toolbar,null,(0,n.createElement)(s.Tooltip,{text:e?(0,a.__)("Save","otter-blocks"):(0,a.__)("Edit","otter-blocks")},(0,n.createElement)(s.Button,{onClick:()=>t(!e)},(0,n.createElement)(s.Dashicon,{icon:e?"yes":"edit"}))))),u=({attributes:e,className:t,isSelected:l,playerRef:o})=>{(0,n.useEffect)((()=>{!(0,c.isEmpty)(e.file)&&e.loop&&null!==o.current&&o.current.addEventListener("complete",a)}),[]),(0,n.useEffect)((()=>{l?(o.current.play(),e.direction&&o.current.seek("100%")):o.current.stop()}),[l]);const a=()=>{o.current&&(o.current.setLooping(e.loop),o.current.play(),o.current.removeEventListener("complete",a))};return(0,n.createElement)("lottie-player",{id:e.id,className:t,ref:o,src:e.file.url,autoplay:!0,count:e.count,speed:e.speed,direction:e.direction?-1:1,style:{width:e.width,height:"auto"},mode:"normal"})},p=l(5225),g={id:{type:"string"},file:{type:"object"},trigger:{type:"string",default:"none"},loop:{type:"boolean",default:!1},count:{type:"number",default:0},speed:{type:"number",default:1},direction:{type:"boolean",default:!1},width:{type:"number"}};(0,r.registerBlockType)("themeisle-blocks/lottie",{title:(0,a.__)("Lottie Animation","otter-blocks"),description:(0,a.__)("Add Lottie animations to your WordPress.","otter-blocks"),icon:o.Z,category:"themeisle-blocks",keywords:["media","lottie","animation"],attributes:g,supports:{align:["left","center","right"]},edit:({attributes:e,setAttributes:t,className:l,isSelected:o,clientId:a})=>{const r=(0,n.useRef)(null),[i,s]=(0,n.useState)(!Boolean(e.file));(0,n.useEffect)((()=>{const t=(0,p.WX)(a,g);return()=>t(e.id)}),[e.id]),(0,n.useEffect)((()=>{window.wp.api.loadPromise.then((()=>{(new window.wp.api.models.Settings).fetch().then((e=>{e.themeisle_allow_json_upload&&k(e.themeisle_allow_json_upload)}))}))}),[]);const[h,k]=(0,n.useState)(!1);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(b,{isEditing:i,setEditing:s}),((0,c.isEmpty)(e.file)||i)&&(0,n.createElement)(d,{className:l,value:e.file,onChange:e=>{if(""===e||null===e)return;const l=(0,c.pick)(e,["id","url"]);(0,c.isEmpty)(l)&&(l.url=e),t({file:{...l}}),s(!1)},isJSONAllowed:h,attributes:e}),!((0,c.isEmpty)(e.file)||i)&&(0,n.createElement)(m,{attributes:e,setAttributes:t,playerRef:r}),!((0,c.isEmpty)(e.file)||i)&&(0,n.createElement)(u,{attributes:e,className:l,isSelected:o,playerRef:r}))},save:({attributes:e,className:t})=>"scroll"===e.trigger?(0,n.createElement)("lottie-player",{id:e.id,className:t,src:e.file?e.file.url:"",trigger:e.trigger,width:e.width}):(0,n.createElement)("lottie-player",{id:e.id,className:t,src:e.file?e.file.url:"",autoplay:!0,loop:!0,count:e.direction?-1*e.count:e.count,speed:e.speed,direction:e.direction?-1:1,trigger:e.trigger,width:e.width,"data-loop":e.loop,mode:"normal"})})},6433:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9307),c=l(5609),i=l(8423),s=l.n(i),d=l(4932),m=l(2819),b=l(6989),u=l.n(b),p=l(9630),g=({setAttributes:e,hasError:t,setError:l,className:a})=>{const r=(0,n.useRef)(null);let i=!1;const s=[],[b,g]=(0,n.useState)(!1),[h,k]=(0,n.useState)(""),[v,y]=(0,n.useState)({}),[_,w]=(0,n.useState)(null);(0,n.useEffect)((()=>{null===_||i||(i=!0,(0,d.Z)(s[_],r.current,{onlyScrollIfNeeded:!0}),s[_].focus(),setTimeout((()=>{i=!1}),100))}),[_]);const f=e=>{if(Object.keys(v).length){e.stopPropagation(),e.preventDefault();const t=_?_-1:Object.keys(v).length-1;w(t)}},C=e=>{if(Object.keys(v).length){e.stopPropagation(),e.preventDefault();const t=null===_||_===Object.keys(v).length-1?0:_+1;w(t)}},E=t=>{e({slug:t.slug}),y({})};return(0,n.createElement)(c.Placeholder,{icon:"admin-plugins",label:(0,o.__)("Plugin Card","otter-blocks"),instructions:(0,o.__)("Search for the plugin you want to display.","otter-blocks"),className:a},(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-plugin-cards-search-field"},(0,n.createElement)(c.Dashicon,{icon:"search"}),b&&(0,n.createElement)(c.Spinner,null),(0,n.createElement)(c.TextControl,{type:"text",placeholder:(0,o.__)("Search for plugin…","otter-blocks"),value:h,onChange:k,onKeyDown:t=>{switch(t.keyCode){case p.UP:f(t);break;case p.DOWN:C(t);break;case p.TAB:Object.keys(v).length&&!t.shiftKey&&w(0);break;case p.ENTER:(async t=>{e({slug:""}),g(!0),l(!1);const o=await u()({path:`otter/v1/plugins?search=${encodeURIComponent(t)}`});if(o.data.errors)return l(!0),g(!1),w(null),void y({});g(!1),w(null),y(o.data.plugins)})(t.target.value)}},onFocus:()=>w(null)}),v&&(0,n.createElement)("div",{tabIndex:"-1",className:"wp-block-themeisle-blocks-plugin-cards-search-results",ref:r},Object.keys(v).map((e=>{const t=v[e];let l;return t.icons.svg&&(l=t.icons.svg),t.icons["2x"]&&(l=t.icons["2x"]),t.icons["1x"]&&(l=t.icons["1x"]),t.icons.default&&(l=t.icons.default),(0,n.createElement)("button",{className:"wp-block-themeisle-blocks-plugin-cards-list-item",key:e,ref:(o=e,e=>{s[o]=e}),onClick:e=>{e.preventDefault(),E(t)},onKeyDown:e=>((e,t)=>{switch(e.keyCode){case p.UP:f(e);break;case p.DOWN:C(e);break;case p.TAB:if(e.shiftKey){0!==_&&f(e);break}if(_===Object.keys(v).length-1)break;C(e);break;case p.ENTER:E(t)}})(e,t)},(0,n.createElement)("img",{src:l}),(0,n.createElement)("span",{dangerouslySetInnerHTML:{__html:(0,m.unescape)(t.name)}}));var o})))),t&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-plugin-cards-error"},(0,n.createElement)("span",null,(0,o.__)("There seems to be an error. Make sure your internet is working properly.","otter-blocks"))))},h=l(2175),k=({setAttributes:e})=>(0,n.createElement)(h.BlockControls,null,(0,n.createElement)(c.Toolbar,null,(0,n.createElement)(c.Tooltip,{text:(0,o.__)("Edit","otter-blocks")},(0,n.createElement)(c.Button,{className:"components-icon-button components-toolbar__control wp-block-themeisle-blocks-plugin-cards-edit-plugin-card",onClick:()=>e({slug:void 0})},(0,n.createElement)(c.Dashicon,{icon:"edit"})))));(0,a.registerBlockType)("themeisle-blocks/plugin-cards",{title:(0,o.__)("Plugin Card","otter-blocks"),description:(0,o.__)("Plugin Card block lets you display plugins data in your blog posts.","otter-blocks"),icon:r.ZV,category:"themeisle-blocks",keywords:["plugin","card","orbitfox"],attributes:{slug:{type:"string"}},supports:{html:!1},edit:({attributes:e,setAttributes:t,className:l})=>{const[o,a]=(0,n.useState)(!1);return e.slug?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(k,{setAttributes:t}),(0,n.createElement)(c.Disabled,null,(0,n.createElement)(s(),{block:"themeisle-blocks/plugin-cards",className:e.className,attributes:{...e}}))):(0,n.createElement)(g,{attributes:e,setAttributes:t,hasError:o,setError:a,className:l})},save:()=>null})},6585:function(e,t,l){var o=l(7682),a=l(5736),r=l(4981),n={id:{type:"string"},minWidth:{type:"number"},trigger:{type:"string"},wait:{type:"number"},anchor:{type:"string"},scroll:{type:"number"},showClose:{type:"boolean",default:!0},outsideClose:{type:"boolean",default:!0},anchorClose:{type:"boolean",default:!1},closeAnchor:{type:"string"},recurringClose:{type:"boolean",default:!1},recurringTime:{type:"number"},backgroundColor:{type:"string"},closeColor:{type:"string"},overlayColor:{type:"string"},overlayOpacity:{type:"number"}},c=l(9307),i=l(6755),s=l(7231),d=l(2175),m=l(5609);const b=({attributes:e,setAttributes:t})=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.ToggleControl,{label:(0,a.__)("Close On Anchor Click","otter-blocks"),checked:e.anchorClose,onChange:()=>t({anchorClose:!e.anchorClose})}),e.anchorClose&&(0,c.createElement)(m.TextControl,{label:(0,a.__)("Close Anchor","otter-blocks"),help:(0,a.__)("You can use this anchor as an anchor link anywhere on the page to close the popup.","otter-blocks"),value:e.closeAnchor,onChange:e=>t({closeAnchor:e.replace(/[^a-zA-Z]/g,"")})}),"onClick"!==e.trigger&&(0,c.createElement)(m.ToggleControl,{label:(0,a.__)("Dismiss for Recurring Visitors","otter-blocks"),checked:e.recurringClose,onChange:()=>t({recurringClose:!e.recurringClose})}),e.recurringClose&&"onClick"!==e.trigger&&(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Display Interval","otter-blocks"),help:(0,a.__)("Number of days until the popup is shown again.","otter-blocks"),min:0,max:100,value:e.recurringTime,onChange:e=>t({recurringTime:Number(e)})}));var u=({attributes:e,setAttributes:t})=>{let l=[{label:(0,a.__)("On Load","otter-blocks"),value:"onLoad"}];return Boolean(window.themeisleGutenberg.hasNeveSupport.hasNeve)&&(l=[{label:(0,a.__)("On Load","otter-blocks"),value:"onLoad"},{label:(0,a.__)("On Anchor Click","otter-blocks"),value:"onClick",disabled:!Boolean(window.themeisleGutenberg.hasNeveSupport.hasNevePro)},{label:(0,a.__)("On Scroll","otter-blocks"),value:"onScroll",disabled:!Boolean(window.themeisleGutenberg.hasNeveSupport.hasNevePro)},{label:(0,a.__)("On Exit","otter-blocks"),value:"onExit",disabled:!Boolean(window.themeisleGutenberg.hasNeveSupport.hasNevePro)}]),(0,c.createElement)(d.InspectorControls,null,(0,c.createElement)(m.PanelBody,{title:(0,a.__)("Settings","otter-blocks")},(0,c.createElement)(m.SelectControl,{label:(0,a.__)("Open Trigger","otter-blocks"),help:Boolean(window.themeisleGutenberg.hasNeveSupport.hasNeve)&&!Boolean(window.themeisleGutenberg.hasNeveSupport.hasNevePro)&&(0,a.__)("You need to have Neve Pro to activate Pro features.","otter-blocks"),options:l,value:e.trigger,onChange:e=>t({trigger:e})}),(void 0===e.trigger||"onLoad"===e.trigger)&&(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Wait Time","otter-blocks"),help:(0,a.__)("How much time to wait before showing the popup. Leave it empty to open instantly","otter-blocks"),min:0,max:100,value:e.wait,onChange:e=>t({wait:Number(e)})}),"onClick"===e.trigger&&(0,c.createElement)(m.TextControl,{label:(0,a.__)("Anchor","otter-blocks"),help:(0,a.__)("You can use this anchor as an anchor link anywhere on the page to open the popup.","otter-blocks"),value:e.anchor,onChange:e=>t({anchor:e.replace(/[^a-zA-Z]/g,"")})}),"onScroll"===e.trigger&&(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Scroll Distance","otter-blocks"),help:(0,a.__)("Show the modal when this percentage of the page has been scrolled.","otter-blocks"),min:0,max:100,value:e.scroll,onChange:e=>t({scroll:Number(e)})}),"onExit"===e.trigger&&(0,c.createElement)("p",null,(0,a.__)("Shows the modal when the user moves the mouse outside of the top of the window.","otter-blocks")),(0,c.createElement)(m.ToggleControl,{label:(0,a.__)("Show Close Button","otter-blocks"),checked:e.showClose,onChange:()=>t({showClose:!e.showClose})}),(0,c.createElement)(m.ToggleControl,{label:(0,a.__)("Close on Click Outside","otter-blocks"),checked:e.outsideClose,onChange:()=>t({outsideClose:!e.outsideClose})}),Boolean(window.themeisleGutenberg.hasNeveSupport.hasNeve)&&!Boolean(window.themeisleGutenberg.hasNeveSupport.hasNevePro)&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.Disabled,null,(0,c.createElement)(b,{attributes:e,setAttributes:t})),(0,c.createElement)(m.ExternalLink,{href:"https://themeisle.com/themes/neve/pricing"},(0,a.__)("Extend Popup block functionalities with more options in Neve Pro.","otter-blocks"))),Boolean(window.themeisleGutenberg.hasNeveSupport.isBoosterActive)&&(0,c.createElement)(b,{attributes:e,setAttributes:t})),(0,c.createElement)(m.PanelBody,{title:(0,a.__)("Style","otter-blocks"),initialOpen:!1},(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Minimum Width","otter-blocks"),min:100,max:1e3,value:e.minWidth,onChange:e=>t({minWidth:Number(e)})}),(0,c.createElement)(d.__experimentalColorGradientControl,{label:(0,a.__)("Background","otter-blocks"),colorValue:e.backgroundColor,onColorChange:e=>t({backgroundColor:e})}),e.showClose&&(0,c.createElement)(d.__experimentalColorGradientControl,{label:(0,a.__)("Close Button","otter-blocks"),colorValue:e.closeColor,onColorChange:e=>t({closeColor:e})}),(0,c.createElement)(d.__experimentalColorGradientControl,{label:(0,a.__)("Overlay","otter-blocks"),colorValue:e.overlayColor,onColorChange:e=>t({overlayColor:e})}),(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Overlay Opacity","otter-blocks"),value:e.overlayOpacity,onChange:e=>t({overlayOpacity:Number(e)})})))},p=l(5225),g=l(4184),h=l.n(g);(0,r.registerBlockType)("themeisle-blocks/popup",{title:(0,a.__)("Popup","otter-blocks"),description:(0,a.__)("Display your content in beautiful popup with many customization options..","otter-blocks"),icon:o.Z,category:"themeisle-blocks",keywords:["popup","modal","lightbox"],attributes:n,edit:({attributes:e,setAttributes:t,className:l,clientId:o})=>{(0,c.useEffect)((()=>{const t=(0,p.WX)(o,n);return()=>t(e.id)}),[]);const[r,b]=(0,c.useState)(!1),g={content:{minWidth:e.minWidth,background:e.backgroundColor},close:{color:e.closeColor},overlay:{background:e.overlayColor,opacity:(e.overlayOpacity||75)/100}};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(u,{attributes:e,setAttributes:t}),(0,c.createElement)("div",{id:e.id,className:l},(0,c.createElement)(m.Button,{isPrimary:!0,icon:i.Z,onClick:()=>b(!0)},(0,a.__)("Edit Popup","otter-blocks")),r&&(0,c.createElement)("div",{className:"otter-popup__modal_wrap"},(0,c.createElement)("div",{role:"presentation",className:"otter-popup__modal_wrap_overlay",style:g.overlay,onClick:()=>b(!1)}),(0,c.createElement)("div",{className:"otter-popup__modal_content",style:g.content},e.showClose&&(0,c.createElement)("div",{className:"otter-popup__modal_header"},(0,c.createElement)(m.Button,{icon:s.Z,style:g.close,onClick:()=>b(!1)})),(0,c.createElement)("div",{className:"otter-popup__modal_body"},(0,c.createElement)(d.InnerBlocks,null))))))},save:({attributes:e,className:t})=>(0,c.createElement)("div",{className:h()(t,"is-front"),id:e.id,"data-open":e.trigger,"data-dismiss":e.recurringClose?e.recurringTime:"","data-time":void 0===e.trigger||"onLoad"===e.trigger?e.wait||0:"","data-anchor":"onClick"===e.trigger?e.anchor:"","data-offset":"onScroll"===e.trigger?e.scroll:"","data-outside":e.outsideClose?e.outsideClose:"","data-anchorclose":e.anchorClose?e.closeAnchor:""},(0,c.createElement)("div",{className:"otter-popup__modal_wrap"},(0,c.createElement)("div",{role:"presentation",className:"otter-popup__modal_wrap_overlay"}),(0,c.createElement)("div",{className:"otter-popup__modal_content"},e.showClose&&(0,c.createElement)("div",{className:"otter-popup__modal_header"},(0,c.createElement)(m.Button,{icon:s.Z})),(0,c.createElement)("div",{className:"otter-popup__modal_body"},(0,c.createElement)(d.InnerBlocks.Content,null)))))})},5356:function(e,t,l){l.d(t,{Z:function(){return u}});var o=l(9307),a=l(4184),r=l.n(a),n=l(5736),c=l(4715),i=l(5609),s=l(9818),d=({id:e,link:t,alt:l,size:a})=>{const{featuredImage:r,altText:n}=(0,s.useSelect)((t=>{const o=t("core").getMedia(e);return{featuredImage:o?0<Object.keys(o.media_details.sizes).length&&o.media_details.sizes[a]?o.media_details.sizes[a].source_url:o.source_url:null,altText:o&&o.alt_text?o.alt_text:l}}),[a]);return null===r?(0,o.createElement)(o.Fragment,null):(0,o.createElement)("div",{className:"wp-block-themeisle-blocks-posts-grid-post-image"},(0,o.createElement)("a",{href:t},r?(0,o.createElement)("img",{src:r,size:a,alt:n,"data-id":e}):(0,o.createElement)(i.Placeholder,null,(0,o.createElement)(i.Spinner,null))))},m=({className:e,attributes:t,posts:l,categoriesList:a,authors:i})=>{const s=t.titleTag||"h5";return(0,o.createElement)("div",{className:r()(e,"is-grid",`wp-block-themeisle-blocks-posts-grid-columns-${t.columns}`,{"has-shadow":t.imageBoxShadow})},l.filter((e=>e)).map((e=>{var l,r;let m,b;return a&&0<(null===(l=e.categories)||void 0===l?void 0:l.length)&&(m=a.find((t=>t.id===e.categories[0]))),i&&e.author&&(b=i.find((t=>t.id===e.author))),(0,o.createElement)("div",{key:e.link,className:"wp-block-themeisle-blocks-posts-grid-post-blog wp-block-themeisle-blocks-posts-grid-post-plain"},(0,o.createElement)("div",{className:"wp-block-themeisle-blocks-posts-grid-post"},void 0!==e.featured_media&&0!==e.featured_media&&t.displayFeaturedImage&&(0,o.createElement)(d,{id:e.featured_media,link:e.link,alt:null===(r=e.title)||void 0===r?void 0:r.rendered,size:t.imageSize}),(0,o.createElement)("div",{className:"wp-block-themeisle-blocks-posts-grid-post-body"},t.template.map((l=>{return"category"===l&&void 0!==m&&t.displayCategory&&a?(0,o.createElement)("span",{className:"wp-block-themeisle-blocks-posts-grid-post-category"},m.name):"title"===l&&t.displayTitle?(0,o.createElement)(s,{className:"wp-block-themeisle-blocks-posts-grid-post-title"},(0,o.createElement)("a",{href:e.link},(0,c.Uo)(null===(r=e.title)||void 0===r?void 0:r.rendered))):"meta"===l&&t.displayMeta&&(t.displayDate||t.displayAuthor)?(0,o.createElement)("p",{className:"wp-block-themeisle-blocks-posts-grid-post-meta"},t.displayDate&&
48
  /**
49
  * translators: %s Date posted
50
  */
@@ -52,11 +52,11 @@
52
  /**
53
  * translators: %s Author
54
  */
55
- (0,n.sprintf)((0,n.__)(" by %s","otter-blocks"),b.name)):"description"===l&&0<t.excerptLength&&t.displayDescription?(0,o.createElement)("p",{className:"wp-block-themeisle-blocks-posts-grid-post-description"},(null===(d=e.excerpt)||void 0===d?void 0:d.rendered)&&(0,c.Uo)(e.excerpt.rendered).substring(0,t.excerptLength)+"…"):void 0;var r,d})))))})))},b=({className:e,attributes:t,posts:l,categoriesList:a,authors:i})=>{const s=t.titleTag||"h5";return(0,o.createElement)("div",{className:r()(e,"is-list",{"has-shadow":t.imageBoxShadow})},l.filter((e=>e)).map((e=>{var l,m;let b,u;return a&&0<(null==e||null===(l=e.categories)||void 0===l?void 0:l.length)&&(b=a.find((t=>t.id===e.categories[0]))),i&&e.author&&(u=i.find((t=>t.id===e.author))),(0,o.createElement)("div",{key:e.link,className:"wp-block-themeisle-blocks-posts-grid-post-blog wp-block-themeisle-blocks-posts-grid-post-plain"},(0,o.createElement)("div",{className:"wp-block-themeisle-blocks-posts-grid-post"},0!==e.featured_media&&t.displayFeaturedImage&&(0,o.createElement)(d,{id:e.featured_media,link:e.link,alt:null===(m=e.title)||void 0===m?void 0:m.rendered,size:t.imageSize}),(0,o.createElement)("div",{className:r()("wp-block-themeisle-blocks-posts-grid-post-body",{"is-full":!t.displayFeaturedImage})},t.template.map((l=>{return"category"===l&&void 0!==b&&t.displayCategory&&a?(0,o.createElement)("span",{className:"wp-block-themeisle-blocks-posts-grid-post-category"},b.name):"title"===l&&t.displayTitle?(0,o.createElement)(s,{className:"wp-block-themeisle-blocks-posts-grid-post-title"},(0,o.createElement)("a",{href:e.link},(0,c.Uo)(null===(r=e.title)||void 0===r?void 0:r.rendered))):"meta"===l&&t.displayMeta&&(t.displayDate||t.displayAuthor)?(0,o.createElement)("p",{className:"wp-block-themeisle-blocks-posts-grid-post-meta"},t.displayDate&&
56
  /* translators: %s Date posted */
57
  (0,n.sprintf)((0,n.__)("on %s","otter-blocks"),(0,c.p6)(e.date)),t.displayAuthor&&void 0!==u&&i&&
58
  /* translators: %s Author of the post */
59
- (0,n.sprintf)((0,n.__)(" by %s","otter-blocks"),u.name)):"description"===l&&0<t.excerptLength&&t.displayDescription?(0,o.createElement)("p",{className:"wp-block-themeisle-blocks-posts-grid-post-description"},(null===(d=e.excerpt)||void 0===d?void 0:d.rendered)&&(0,c.Uo)(e.excerpt.rendered).substring(0,t.excerptLength)+"…"):void 0;var r,d})))))})))},u=({className:e,attributes:t,posts:l,categoriesList:a,authors:r})=>"grid"===t.style?(0,o.createElement)(m,{className:e,attributes:t,posts:l,categoriesList:a,authors:r}):"list"===t.style?(0,o.createElement)(b,{className:e,attributes:t,posts:l,categoriesList:a,authors:r}):void 0},2201:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={style:{type:"string",default:"grid"},postTypes:{type:"array",default:[]},columns:{type:"number",default:3},template:{type:"array",default:["category","title","meta","description"]},categories:{type:"array",items:{type:"object"}},postsToShow:{type:"number",default:5},order:{type:"string",default:"desc"},orderBy:{type:"string",default:"date"},offset:{type:"number",default:0},imageSize:{type:"string",default:"full"},imageBoxShadow:{type:"boolean",default:!0},displayFeaturedImage:{type:"boolean",default:!0},displayCategory:{type:"boolean",default:!0},displayTitle:{type:"boolean",default:!0},titleTag:{type:"string",default:"h5"},displayMeta:{type:"boolean",default:!0},displayDescription:{type:"boolean",default:!0},excerptLength:{type:"number",default:100},displayDate:{type:"boolean",default:!0},displayAuthor:{type:"boolean",default:!0}},c=[{attributes:{...n,categories:{type:"string"}},supports:{align:["wide","full"],html:!1},migrate:e=>({...e,categories:[{id:Number(e.categories)}]}),isEligible:({categories:e})=>e&&"string"==typeof e,save:()=>null}],i=l(9307),s=l(2819),d=l(5609),m=l(9818),b=l(5241),u=l(2175),p=l(454),g=l.n(p),h=l(4184),k=l.n(h),v=l(1286);const y=(0,v.W6)((()=>(0,i.createElement)("div",{className:"otter-blocks-sortable-handle",tabIndex:"0"},(0,i.createElement)("span",null)))),_=({value:e,disabled:t,getFields:l,toggleFields:a,imageSize:r,titleTag:n,excerptLimit:c})=>{const[m,b]=(0,i.useState)(!1),u=(0,s.startCase)((0,s.toLower)(e));let p,g="hidden",h=(0,o.sprintf)((0,o.__)("Display %s","otter-blocks"),u);
60
  /* translators: %s Label */switch(l(e)&&(g="visibility",
61
  /* translators: %s Label */
62
  h=(0,o.sprintf)((0,o.__)("Hide %s","otter-blocks"),u)),e){case"image":case"title":case"meta":case"description":p=!0;break;default:p=!1}return(0,i.createElement)("div",{className:k()("otter-blocks-sortable-item-area",`otter-blocks-sortable-item-area-${e}`)},(0,i.createElement)("div",{className:k()("otter-blocks-sortable-item",{disabled:t,hidden:!l(e),editable:p})},!t&&(0,i.createElement)(y,null),(0,i.createElement)("div",{className:"otter-blocks-sortable-label"},u),p&&(0,i.createElement)(d.Button,{icon:m?"arrow-up-alt2":"arrow-down-alt2",label:m?(0,o.__)("Close Settings","otter-blocks"):(0,o.__)("Open Settings","otter-blocks"),showTooltip:!0,className:"otter-blocks-sortable-button",onClick:()=>b(!m)}),(0,i.createElement)(d.Button,{icon:g,label:h,showTooltip:!0,className:"otter-blocks-sortable-button",onClick:()=>{a(e),b(!1)}})),p&&(0,i.createElement)("div",{className:k()("otter-blocks-sortable-control-area",{opened:m&&l(e)})},"image"===e&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.SelectControl,{label:(0,o.__)("Image Size","otter-blocks"),value:r.value,options:window.themeisleGutenberg.imageSizes.map((e=>({label:(0,s.startCase)((0,s.toLower)(e)),value:e}))),onChange:r.onChange}),(0,i.createElement)(d.ToggleControl,{label:(0,o.__)("Display Box Shadow?","otter-blocks"),checked:l("imageBoxShadow","otter-blocks"),onChange:()=>a("imageBoxShadow")})),"title"===e&&(0,i.createElement)(d.SelectControl,{label:(0,o.__)("Title Tag","otter-blocks"),value:n.value||"h5",options:[{label:(0,o.__)("H1","otter-blocks"),value:"h1"},{label:(0,o.__)("H2","otter-blocks"),value:"h2"},{label:(0,o.__)("H3","otter-blocks"),value:"h3"},{label:(0,o.__)("H4","otter-blocks"),value:"h4"},{label:(0,o.__)("H5","otter-blocks"),value:"h5"},{label:(0,o.__)("H6","otter-blocks"),value:"h6"}],onChange:n.onChange}),"description"===e&&(0,i.createElement)(d.TextControl,{label:(0,o.__)("Excerpt Limit","otter-blocks"),type:"number",value:c.value,onChange:c.onChange}),"meta"===e&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.ToggleControl,{label:(0,o.__)("Display Date?","otter-blocks"),checked:l("date"),onChange:()=>a("date")}),(0,i.createElement)(d.ToggleControl,{label:(0,o.__)("Display Author?","otter-blocks"),checked:l("author"),onChange:()=>a("author")}))))},w=(0,v.W8)((({value:e,disabled:t,getFields:l,toggleFields:o,titleTag:a,excerptLimit:r})=>(0,i.createElement)(_,{value:e,disabled:t,getFields:l,toggleFields:o,titleTag:a,excerptLimit:r}))),f=(0,v.JN)((({template:e,getFields:t,toggleFields:l,titleTag:o,excerptLimit:a})=>(0,i.createElement)("div",null,e.map(((e,r)=>(0,i.createElement)(w,{key:`item-${e}`,index:r,value:e,getFields:t,toggleFields:l,titleTag:o,excerptLimit:a}))))));var C=({attributes:e,setAttributes:t,getFields:l,toggleFields:o,imageSize:a,titleTag:r,excerptLimit:n})=>(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:k()("otter-blocks-sortable",e.style)},(0,i.createElement)(_,{value:"image",disabled:!0,getFields:l,toggleFields:o,imageSize:a}),(0,i.createElement)(f,{template:e.template,onSortEnd:({oldIndex:l,newIndex:o})=>{const a=g()(e.template,l,o);t({template:a})},getFields:l,toggleFields:o,titleTag:r,excerptLimit:n,useDragHandle:!0,axis:"y",lockAxis:"y"}))),E=l(4715),T=({attributes:e,setAttributes:t,changeStyle:l,categoriesList:a})=>{const{slugs:r}=(0,m.useSelect)((e=>({slugs:e("otter-store").getPostsSlugs()})),[e.postTypes]),n=a.reduce(((e,t)=>({...e,[t.name]:t})),{}),c=e.categories?e.categories.map((e=>{const t=a.find((t=>t.id===Number(e.id)));return{id:e.id,name:(null==t?void 0:t.name)||(null==t?void 0:t.slug)||""}})):[],s="object"==typeof e.categories?1<=e.categories.length?e.categories[0].id:void 0:e.categories;return(0,i.createElement)(u.InspectorControls,null,(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Styles","otter-blocks"),initialOpen:!1},(0,i.createElement)(b.V,{value:e.style,options:[{label:(0,o.__)("Grid","otter-blocks"),value:"grid",image:window.themeisleGutenberg.assetsPath+"/icons/posts-grid.jpg"},{label:(0,o.__)("List","otter-blocks"),value:"list",image:window.themeisleGutenberg.assetsPath+"/icons/posts-list.jpg"}],onChange:l})),(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Post Types","otter-blocks")},(0,i.createElement)(d.BaseControl,null,(0,o.__)("Select the types of the post. If none is selected, the default WordPress post will be displayed.","otter-blocks")),(0,i.createElement)(d.SelectControl,{label:(0,o.__)("Post Type","otter-blocks"),value:e.postTypes[0]||null,onChange:e=>e&&t({postTypes:[e]}),options:r.map((e=>({label:(0,E.__)(e),value:e})))})),(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},"grid"===e.style&&(0,i.createElement)(d.RangeControl,{label:(0,o.__)("Columns","otter-blocks"),value:e.columns,onChange:e=>{t({columns:e})},min:1,max:5}),(0,i.createElement)(d.QueryControls,{order:e.order,orderBy:e.orderBy,onOrderChange:e=>t({order:e}),onOrderByChange:e=>t({orderBy:e}),numberOfItems:e.postsToShow,onNumberOfItemsChange:e=>t({postsToShow:e}),categorySuggestions:n,selectedCategoryId:s,selectedCategories:c,onCategoryChange:e=>{let l;"object"==typeof e?0<e.length&&(l=e.map((e=>{if("object"==typeof e)return e;const t=a.find((t=>t.name===e));return t?{id:t.id,name:e}:void 0})).filter((e=>void 0!==e))):""!==e&&(l=[{id:e,name:a.find((t=>t.id===Number(e))).name}]),t({categories:l})}}),(0,i.createElement)(d.TextControl,{label:(0,o.__)("Offset","otter-blocks"),help:(0,o.__)("Number of post to displace or pass over.","otter-blocks"),type:"number",value:e.offset,min:0,onChange:e=>t({offset:Number(e)})})),(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Design & Layout","otter-blocks"),initialOpen:!1},(0,i.createElement)(C,{attributes:e,getFields:t=>"image"===t?e.displayFeaturedImage:"imageBoxShadow"===t?e.imageBoxShadow:"category"===t?e.displayCategory:"title"===t?e.displayTitle:"meta"===t?e.displayMeta:"description"===t?e.displayDescription:"date"===t?e.displayDate:"author"===t?e.displayAuthor:void 0,toggleFields:l=>{"image"===l&&t({displayFeaturedImage:!e.displayFeaturedImage}),"imageBoxShadow"===l&&t({imageBoxShadow:!e.imageBoxShadow}),"category"===l&&t({displayCategory:!e.displayCategory}),"title"===l&&t({displayTitle:!e.displayTitle}),"meta"===l&&t({displayMeta:!e.displayMeta}),"description"===l&&t({displayDescription:!e.displayDescription}),"date"===l&&t({displayDate:!e.displayDate}),"author"===l&&t({displayAuthor:!e.displayAuthor})},setAttributes:t,imageSize:{value:e.imageSize,onChange:e=>{t({imageSize:e})}},titleTag:{value:e.titleTag,onChange:e=>{t({titleTag:e})}},excerptLimit:{value:e.excerptLength,onChange:e=>{t({excerptLength:e})}}})))},x=l(5356);const M={posts:{slugs:[],usedSlugs:[]}};(0,m.registerGenericStore)("otter-store",(()=>{let e=()=>{};const t=M,l={getPostsSlugs:()=>t.posts.slugs,getPostsUsedSlugs:()=>t.posts.usedSlugs},o={setPostsSlugs(l){t.posts.slugs=l,e()},setPostsUsedSlugs(l){t.posts.usedSlugs.push(...l),e()},setOnlyOneSlug(l){t.posts.usedSlugs=[l],e()},removePostsUsedSlugs(l){t.posts.usedSlugs=t.posts.usedSlugs.filter((e=>!l.includes(e))),e()}};return{getSelectors:()=>l,getActions:()=>o,subscribe(t){e=t}}})());(0,a.registerBlockType)("themeisle-blocks/posts-grid",{title:(0,o.__)("Posts","otter-blocks"),description:(0,o.__)("Display a list of your most recent posts in a beautiful layout.","otter-blocks"),icon:r.ki,category:"themeisle-blocks",keywords:["posts","grid","news"],attributes:n,supports:{align:["wide","full"],html:!1},deprecated:c,edit:({attributes:e,setAttributes:t,className:l})=>{const[a,r]=(0,i.useState)([]),{posts:n,categoriesList:c,authors:u}=(0,m.useSelect)((t=>{const l=e.categories&&0<e.categories.length?e.categories.map((e=>e.id)):[],o=(0,s.pickBy)({categories:l,order:e.order,orderby:e.orderBy,per_page:e.postsToShow,offset:e.offset},(e=>!(0,s.isUndefined)(e))),a=e.postTypes;return{posts:0<a.length?a.map((e=>t("core").getEntityRecords("postType",e,o))).flat():t("core").getEntityRecords("postType","post",o),categoriesList:t("core").getEntityRecords("taxonomy","category",{per_page:100}),authors:t("core").getAuthors()}}),[e.categories,e.order,e.orderBy,e.postsToShow,e.offset,e.postTypes]),p=e=>{t({style:e})};return(0,i.useEffect)((()=>{(async()=>{r(await(0,E.R3)())})()}),[]),(0,i.useEffect)((()=>{(0,m.dispatch)("otter-store").setPostsSlugs(a)}),[a]),n&&c&&u?0===n.length?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.Placeholder,null,(0,o.__)("No Posts","otter-blocks")),c&&e.offset||a.length?(0,i.createElement)(T,{attributes:e,setAttributes:t,changeStyle:p,categoriesList:c}):null):(0,i.createElement)(i.Fragment,null,(0,i.createElement)(b.d,{label:(0,o.__)("Block Styles","otter-blocks"),value:e.style,options:[{label:(0,o.__)("Grid","otter-blocks"),value:"grid",image:window.themeisleGutenberg.assetsPath+"/icons/posts-grid.jpg"},{label:(0,o.__)("List","otter-blocks"),value:"list",image:window.themeisleGutenberg.assetsPath+"/icons/posts-list.jpg"}],onChange:p}),(0,i.createElement)(T,{attributes:e,setAttributes:t,changeStyle:p,categoriesList:c}),(0,i.createElement)(d.Disabled,null,(0,i.createElement)(x.Z,{className:l,attributes:e,posts:n,categoriesList:c,authors:u}))):(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.Placeholder,null,(0,i.createElement)(d.Spinner,null),(0,o.__)("Loading Posts","otter-blocks")),c&&e.offset?(0,i.createElement)(T,{attributes:e,setAttributes:t,changeStyle:p,categoriesList:c}):null)},save:()=>null})},5546:function(e,t,l){var o=l(5736),a=l(4981),r={id:{type:"string"},title:{type:"string",default:(0,o.__)("Skill","otter-blocks")},percentage:{type:"number",default:50},duration:{type:"number",default:2},titleStyle:{type:"string",default:"default"},percentagePosition:{type:"string",default:"default"},height:{type:"number",default:30},borderRadius:{type:"number"},backgroundColor:{type:"string"},barBackgroundColor:{type:"string"},titleColor:{type:"string"},percentageColor:{type:"string"}},n=l(9307),c=l(4184),i=l.n(c),s=l(5609),d=l(2175),m=l(5225),b=l(2819),u=({attributes:e,setAttributes:t,onHeightChange:l,heightMode:a,setHeightMode:r})=>(0,n.createElement)(d.InspectorControls,null,(0,n.createElement)(s.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,n.createElement)(s.TextControl,{label:(0,o.__)("Title","otter-blocks"),value:e.title,onChange:e=>{t({title:e})}}),(0,n.createElement)(s.RangeControl,{label:(0,o.__)("Percentage","otter-blocks"),help:(0,o.__)("The value of the progress bar.","otter-blocks"),value:e.percentage,onChange:e=>{void 0!==e&&(e=(0,b.clamp)(e,0,100),t({percentage:e}))},min:0,max:100}),(0,n.createElement)(s.RangeControl,{label:(0,o.__)("Duration","otter-blocks"),help:(0,o.__)("The duration of the animation.","otter-blocks"),value:e.duration,onChange:e=>{void 0!==e&&(e=(0,b.clamp)(e,0,3),t({duration:e}))},min:0,max:3,step:.1}),30<=e.height&&(0,n.createElement)(s.SelectControl,{label:(0,o.__)("Title Style","otter-blocks"),value:e.titleStyle,options:[{label:(0,o.__)("Default","otter-blocks"),value:"default"},{label:(0,o.__)("Highlight","otter-blocks"),value:"highlight"},{label:(0,o.__)("Outer","otter-blocks"),value:"outer"}],onChange:e=>{t({titleStyle:e})}}),(0,n.createElement)(s.SelectControl,{label:(0,o.__)("Show Percentage","otter-blocks"),value:e.percentagePosition,options:[{label:(0,o.__)("Default","otter-blocks"),value:"default"},{label:(0,o.__)("Append","otter-blocks"),value:"append"},{label:(0,o.__)("Tooltip","otter-blocks"),value:"tooltip"},{label:(0,o.__)("Outer","otter-blocks"),value:"outer"},{label:(0,o.__)("Hide","otter-blocks"),value:"hide"}],onChange:e=>{a.isAutomatic&&(a.percentagePosition=e,r({...a})),t({percentagePosition:e})}})),(0,n.createElement)(s.PanelBody,{title:(0,o.__)("Style","otter-blocks"),initialOpen:!1},(0,n.createElement)(s.RangeControl,{label:(0,o.__)("Height","otter-blocks"),help:(0,o.__)("The height of the progress bar.","otter-blocks"),value:e.height,onChange:l,min:0,max:100}),(0,n.createElement)(s.RangeControl,{label:(0,o.__)("Border Radius","otter-blocks"),help:(0,o.__)("Round the corners of the progress bar.","otter-blocks"),value:e.borderRadius,onChange:e=>{t({borderRadius:e})},initialPosition:5,min:0,max:35}),(0,n.createElement)(d.__experimentalColorGradientControl,{label:(0,o.__)("Progress Color","otter-blocks"),colorValue:e.barBackgroundColor,onColorChange:e=>{t({barBackgroundColor:e})}}),(0,n.createElement)(d.__experimentalColorGradientControl,{label:(0,o.__)("Title Color","otter-blocks"),colorValue:e.titleColor,onColorChange:e=>{t({titleColor:e})}}),(0,n.createElement)(d.__experimentalColorGradientControl,{label:(0,o.__)("Percentage Color","otter-blocks"),colorValue:e.percentageColor,onColorChange:e=>{t({percentageColor:e})}}),(0,n.createElement)(d.__experimentalColorGradientControl,{label:(0,o.__)("Background Color","otter-blocks"),colorValue:e.backgroundColor,onColorChange:e=>{t({backgroundColor:e})}})));var p={to:[{type:"block",blocks:["themeisle-blocks/circle-counter"],transform:e=>{const t=(0,b.omit)(e,["titleStyle","percentagePosition","height","borderRadius","barBackgroundColor","percentageColor"]);return(0,a.createBlock)("themeisle-blocks/circle-counter",{...t,progressColor:e.barBackgroundColor,height:(0,b.clamp)(4*e.height,0,240),titleStyle:"default"})}}]};(0,a.registerBlockType)("themeisle-blocks/progress-bar",{title:(0,o.__)("Progress Bar","otter-blocks"),description:(0,o.__)("Show your progress with a beautiful Progress Bar block.","otter-blocks"),icon:"minus",category:"themeisle-blocks",keywords:["progress","bar","skills"],attributes:r,transforms:p,edit:({attributes:e,setAttributes:t,className:l,isSelected:o,clientId:a,toggleSelection:c})=>{(0,n.useEffect)((()=>{const t=(0,m.WX)(a,r);return()=>t(e.id)}),[e.id]);const[b,p]=(0,n.useState)(!1),[g,h]=(0,n.useState)({isAutomatic:!1,titleStyle:e.titleStyle,percentagePosition:e.percentagePosition}),k=(0,n.useRef)(null);(0,n.useEffect)((()=>{k.current&&(p(!1),setTimeout((()=>p(!0)),1e3*e.duration),k.current.animate({width:`${e.percentage}%`},{duration:1e3*e.duration,easing:"linear",fill:"forwards"}))}),[e.percentage,e.duration]);const v=.65,y=l=>{30>l?(g.isAutomatic||h({isAutomatic:!0,titleStyle:e.titleStyle,percentagePosition:e.percentagePosition}),t({height:l,titleStyle:"outer",percentagePosition:"append"===e.percentagePosition||"default"===e.percentagePosition?"outer":e.percentagePosition})):(g.isAutomatic&&h({isAutomatic:!1}),t({titleStyle:g.isAutomatic?g.titleStyle:e.titleStyle,percentagePosition:g.isAutomatic?g.percentagePosition:e.percentagePosition,height:l}))};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(u,{attributes:e,setAttributes:t,onHeightChange:y,heightMode:g,setHeightMode:h}),(0,n.createElement)("div",{className:i()(l,{"has-tooltip":"tooltip"===e.percentagePosition}),id:e.id},("outer"===e.titleStyle||"outer"===e.percentagePosition)&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__outer"},"outer"===e.titleStyle&&(0,n.createElement)(d.RichText,{tagName:"span",allowedFormats:[],className:"wp-block-themeisle-blocks-progress-bar__outer__title",value:e.title,style:{color:e.titleColor},onChange:e=>t({title:e})}),"outer"===e.percentagePosition&&b&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress wp-block-themeisle-blocks-progress-bar__outer__value",style:{color:e.percentageColor}},`${e.percentage}%`)),(0,n.createElement)(s.ResizableBox,{size:{height:e.height},minHeight:5,maxHeight:100,enable:{top:!1,right:!1,bottom:!0,left:!1},showHandle:o,onResizeStop:(t,l,o,a)=>{y(parseInt(e.height+a.height,10)),c(!0)},onResizeStart:()=>{c(!1)}},(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__area",style:{background:e.backgroundColor,borderRadius:`${e.borderRadius}px`,height:`${e.height}px`}},("default"===e.titleStyle||"highlight"===e.titleStyle)&&(0,n.createElement)("div",{className:i()("wp-block-themeisle-blocks-progress-bar__area__title",{highlight:"highlight"===e.titleStyle}),style:{fontSize:e.height*v+"px",background:"highlight"===e.titleStyle&&e.barBackgroundColor,borderRadius:`${e.borderRadius}px 0px 0px ${e.borderRadius}px`,height:`${e.height}px`}},(0,n.createElement)(d.RichText,{tagName:"span",allowedFormats:[],value:e.title,style:{height:`${e.height}px`,color:e.titleColor,borderRadius:`${e.borderRadius}px 0px 0px ${e.borderRadius}px`},onChange:e=>t({title:e})})),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__area__bar show",ref:k,style:{background:e.barBackgroundColor,borderRadius:`${e.borderRadius}px`,height:`${e.height}px`}},"tooltip"===e.percentagePosition&&b&&(0,n.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__tooltip show",style:{color:e.percentageColor}},`${e.percentage}%`,(0,n.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__arrow"})),"append"===e.percentagePosition&&b&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress__append show",style:{fontSize:e.height*v+"px",height:`${e.height}px`,color:e.percentageColor}},`${e.percentage}%`)),"default"===e.percentagePosition&&b&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress",style:{fontSize:e.height*v+"px",height:`${e.height}px`,color:e.percentageColor}},`${e.percentage}%`)))))},save:({attributes:e,className:t})=>(0,n.createElement)("div",{className:i()(t,{"has-tooltip":"tooltip"===e.percentagePosition}),id:e.id,"data-percent":e.percentage,"data-duration":e.duration},("outer"===e.titleStyle||"outer"===e.percentagePosition)&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__outer"},"outer"===e.titleStyle&&(0,n.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__outer__title"},e.title),"outer"===e.percentagePosition&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__outer__value wp-block-themeisle-blocks-progress-bar__number"},e.percentage)),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__area"},("default"===e.titleStyle||"highlight"===e.titleStyle)&&(0,n.createElement)("div",{className:i()("wp-block-themeisle-blocks-progress-bar__area__title",{highlight:"highlight"===e.titleStyle})},(0,n.createElement)("span",null,e.title)),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__area__bar"},"tooltip"===e.percentagePosition&&(0,n.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__tooltip"},(0,n.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__number"},e.percentage),(0,n.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__arrow"})),"append"===e.percentagePosition&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress__append wp-block-themeisle-blocks-progress-bar__number"},e.percentage)),"default"===e.percentagePosition&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress wp-block-themeisle-blocks-progress-bar__number"},`${e.percentage}%`)))})},8629:function(e,t,l){var o=l(9307),a=l(5736),r=l(4981),n=l(5609),c=l(340),i={id:{type:"string"},reviews:{type:"array",default:[]},buttonColor:{type:"string"},buttonText:{type:"string"}},s=l(1216),d=l(4184),m=l.n(d),b=l(1463),u=l.n(b),p=l(6989),g=l.n(p),h=l(6030),k=({attributes:e,setAttributes:t,data:l,onComplete:r,isLoading:c,isComplete:i,isError:s})=>{const[d,m]=(0,o.useState)(""),b=l=>{const o=[...e.reviews];if(o.includes(l)){const e=o.indexOf(l);-1!==e&&o.splice(e,1)}else o.push(l);t({reviews:o})},u=({label:e,value:t})=>(0,o.createElement)("span",{className:"otter-review-comparison__tag"},(0,o.createElement)("span",{className:"otter-review-comparison__tag_title"},e),(0,o.createElement)(n.Button
@@ -67,10 +67,10 @@ h=(0,o.sprintf)((0,o.__)("Hide %s","otter-blocks"),u)),e){case"image":case"title
67
  background: ${e.buttonColor} !important;
68
  color: ${e.buttonText} !important;
69
  }
70
- `;(0,o.useEffect)((()=>{E=[],T=[],x=[],M=[],S=[],B=[],z=[],Boolean(n.length)&&e.reviews.forEach((e=>{var t;const l=e.split("-"),r=n.find((e=>e.ID===Number(l[0])&&e.attrs.id.slice(e.attrs.id.length-8)===l[1]));if(!r)return;const c=null!==(t=u()(r.attrs.currency))&&void 0!==t?t:"$",i=r.attrs.features||C.Z.features.default,d=Math.round(i.reduce(((e,t)=>e+t.rating),0)/i.length)/2,m=r.attrs.links||C.Z.links.default,b=[];i.forEach((e=>{b.push((0,s.tZ)("div",{className:"otter-review-comparison__rating_container"},(0,s.tZ)("div",{className:"otter-review-comparison__rating_title"},e.title),(0,s.tZ)("div",{className:"otter-review-comparison__ratings"},R(e.rating/2))))}));const p=[];m.forEach((e=>{p.push((0,s.tZ)("span",{className:"wp-block-button__link"},e.label))})),E.push((0,s.tZ)("td",null,r.attrs.image&&(0,s.tZ)("img",{src:r.attrs.image.url}))),T.push((0,s.tZ)("td",null,r.attrs.title||(0,a.__)("Untitled review","otter-blocks"))),x.push((0,s.tZ)("td",null,r.attrs.discounted?(0,s.tZ)(o.Fragment,null,(0,s.tZ)("del",null,c+r.attrs.price)," ",c+r.attrs.discounted):r.attrs.price?c+r.attrs.price:"-")),M.push((0,s.tZ)("td",null,(0,s.tZ)("div",{className:"otter-review-comparison__ratings"},R(d)))),S.push((0,s.tZ)("td",{dangerouslySetInnerHTML:{__html:r.attrs.description}})),B.push((0,s.tZ)("td",null,b)),z.push((0,s.tZ)("td",null,(0,s.tZ)("div",{className:"otter-review-comparison__buttons wp-block-button"},p)))}))}),[e.reviews,n]);const P="loading"===b,N="loaded"===b,L="error"===b,R=e=>{const t=[];for(let l=0;5>l;l++)t.push(l<e&&e<l+1?(0,s.tZ)(c.cV,{className:m()({low:1.5>=e&&l<e,medium:1.5<e&&3.5>=e&&l<e,high:3.5<e&&5>=e&&l<e})}):(0,s.tZ)(c.Rh,{className:m()({low:1.5>=e&&l<e,medium:1.5<e&&3.5>=e&&l<e,high:3.5<e&&5>=e&&l<e})}));return t};return h?(0,s.tZ)(k,{attributes:e,setAttributes:t,data:n,onComplete:()=>v(!1),isLoading:P,isComplete:N,isError:L}):(0,s.tZ)(o.Fragment,null,(0,s.tZ)(_,{onEdit:()=>v(!0)}),(0,s.tZ)(w,{attributes:e,setAttributes:t}),(0,s.tZ)("table",{id:e.id,className:l},(0,s.tZ)("thead",null,(0,s.tZ)("tr",null,(0,s.tZ)("th",null),E)),(0,s.tZ)("tbody",null,(0,s.tZ)("tr",null,(0,s.tZ)("th",null,(0,a.__)("Name","otter-blocks")),T),(0,s.tZ)("tr",null,(0,s.tZ)("th",null,(0,a.__)("Price","otter-blocks")),x),(0,s.tZ)("tr",null,(0,s.tZ)("th",null,(0,a.__)("Rating","otter-blocks")),M),(0,s.tZ)("tr",null,(0,s.tZ)("th",null,(0,a.__)("Description","otter-blocks")),S),(0,s.tZ)("tr",null,(0,s.tZ)("th",null,(0,a.__)("Statistics","otter-blocks")),B),(0,s.tZ)("tr",{css:y},(0,s.tZ)("th",null,(0,a.__)("Buy this product","otter-blocks")),z))))},save:()=>null}):(0,r.registerBlockType)("themeisle-blocks/review-comparison",{title:(0,a.__)("Review Comparison Table","otter-blocks"),description:(0,a.__)("A way to compare different product reviews made on the website.","otter-blocks"),icon:c.rL,category:"themeisle-blocks",keywords:["product","review","comparison"],attributes:i,supports:{inserter:!1},edit:()=>(0,o.createElement)(n.Placeholder,null,(0,a.__)("You need to have Neve Pro installed to edit Review Comparison Table block.","otter-blocks")),save:()=>null})},9934:function(e,t,l){var o=l(5736);const a={id:{type:"string"},title:{type:"string"},currency:{type:"string",default:"USD"},price:{type:"number"},discounted:{type:"number"},image:{type:"object"},description:{type:"string"},features:{type:"array",default:[{title:(0,o.__)("Stability","otter-blocks"),rating:9},{title:(0,o.__)("Ease of Use","otter-blocks"),rating:4},{title:(0,o.__)("Look & Feel","otter-blocks"),rating:9},{title:(0,o.__)("Price","otter-blocks"),rating:7}]},pros:{type:"array",default:[(0,o.__)("Easy to use","otter-blocks"),(0,o.__)("Good price","otter-blocks"),(0,o.__)("Sturdy build and ergonomics","otter-blocks")]},cons:{type:"array",default:[(0,o.__)("Incompatible with old versions","otter-blocks"),(0,o.__)("Hard to assemble","otter-blocks"),(0,o.__)("Bad color combination","otter-blocks")]},links:{type:"array",default:[{label:(0,o.__)("Buy on Amazon","otter-blocks"),href:"",isSponsored:!1},{label:(0,o.__)("Buy on eBay","otter-blocks"),href:"",isSponsored:!1}]},primaryColor:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},buttonTextColor:{type:"string"}};t.Z=a},5286:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9934),c=l(9307),i=l(4184),s=l.n(i),d=l(1463),m=l.n(d),b=l(2175),u=l(5609),p=l(2819);const g=({title:e,remove:t,children:l})=>{const[a,r]=(0,c.useState)(!1);return(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__inspector_panel_item"},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__inspector_panel_item__header"},(0,c.createElement)(u.Button,{className:"wp-block-themeisle-blocks-review__inspector_panel_item__title",onClick:()=>r(!a)},e),(0,c.createElement)(u.Button,{icon:"no-alt",label:(0,o.__)("Remove","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-review__inspector_panel_item__arrow",onClick:t})),a&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__inspector_panel_item__content"},l))};var h=({attributes:e,setAttributes:t,productAttributes:l})=>{var a,r,n,i,s;const d=(l,o)=>{const a=[...e.features];a[l]={...a[l],...o},t({features:a})},m=(l,o)=>{const a=[...e.links];a[l]={...a[l],...o},t({links:a})},h=l=>{let o=[...e.links];o=o.filter(((e,t)=>t!==l)),t({links:o})};return(0,c.createElement)(b.InspectorControls,null,(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Product Details","otter-blocks")},e.product&&(0,c.createElement)(u.Notice,{status:"warning",isDismissible:!1,className:"otter-html-anchor-control-notice"},(0,o.__)("WooCommerce product synchronization is active. Some options might be disabled.","otter-blocks")),(0,c.createElement)(u.TextControl,{label:(0,o.__)("Product Name","otter-blocks"),type:"text",placeholder:(0,o.__)("Name of your product…","otter-blocks"),value:(null==l?void 0:l.title)||e.title,disabled:e.product,onChange:e=>t({title:e})}),(0,c.createElement)(u.BaseControl,null,(0,c.createElement)(u.TextControl,{label:(0,o.__)("Currency","otter-blocks"),type:"text",placeholder:(0,o.__)("Currency code, like USD or EUR.","otter-blocks"),value:(null==l?void 0:l.currency)||e.currency,disabled:e.product,onChange:e=>t({currency:e})}),(0,o.__)("Currency code in three digit ISO 4217 code.","otter-blocks")+" ",(0,c.createElement)(u.ExternalLink,{href:"https://en.wikipedia.org/wiki/ISO_4217#Active_codes"},(0,o.__)("List of ISO 4217 codes.","otter-blocks"))),(0,c.createElement)(u.TextControl,{label:(0,o.__)("Price","otter-blocks"),type:"number",value:(null==l?void 0:l.price)||e.price,disabled:e.product,onChange:e=>t({price:""!==e?Number(e):void 0})}),(0,c.createElement)(u.TextControl,{label:(0,o.__)("Discounted Price","otter-blocks"),type:"number",value:(null==l?void 0:l.discounted)||e.discounted,disabled:e.product,onChange:e=>t({discounted:""!==e?Number(e):void 0})}),e.image||null!=l&&l.image?(0,c.createElement)(u.BaseControl,{className:"wp-block-themeisle-blocks-review__inspector_image"},(0,c.createElement)("img",{src:(null==l||null===(a=l.image)||void 0===a?void 0:a.url)||e.image.url,alt:(null==l||null===(r=l.image)||void 0===r?void 0:r.url)||e.image.alt}),(0,c.createElement)(u.Button,{isSecondary:!0,onClick:()=>t({image:void 0}),disabled:e.product},(0,o.__)("Remove image","otter-blocks"))):(0,c.createElement)(b.MediaPlaceholder,{labels:{title:(0,o.__)("Product Image","otter-blocks")},accept:"image/*",allowedTypes:["image"],value:e.image,onSelect:e=>t({image:(0,p.pick)(e,["id","alt","url"])})})),(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Product Features","otter-blocks"),initialOpen:!1},0<e.features.length&&e.features.map(((l,a)=>(0,c.createElement)(g,{title:l.title||(0,o.__)("Feature","otter-blocks"),remove:()=>(l=>{let o=[...e.features];o=o.filter(((e,t)=>t!==l)),t({features:o})})(a)},(0,c.createElement)(u.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",placeholder:(0,o.__)("Feature title","otter-blocks"),value:l.title,onChange:e=>d(a,{title:e})}),(0,c.createElement)(u.RangeControl,{label:(0,o.__)("Rating","otter-blocks"),value:l.rating,onChange:e=>d(a,{rating:Number(e)}),min:1,max:10})))),(0,c.createElement)(u.Button,{isSecondary:!0,isLarge:!0,className:"wp-block-themeisle-blocks-review__inspector_add",onClick:()=>{const l=[...e.features];l.push({title:(0,o.__)("Feature","otter-blocks"),rating:9}),t({features:l})}},(0,o.__)("Add Feature","otter-blocks"))),(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Pros","otter-blocks"),initialOpen:!1},0<e.pros.length&&e.pros.map(((l,a)=>(0,c.createElement)(g,{title:l||(0,o.__)("Pro","otter-blocks"),remove:()=>(l=>{let o=[...e.pros];o=o.filter(((e,t)=>t!==l)),t({pros:o})})(a)},(0,c.createElement)(u.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",placeholder:(0,o.__)("Why do you like the product?","otter-blocks"),value:l,onChange:l=>((l,o)=>{const a=[...e.pros];a[l]=o,t({pros:a})})(a,l)})))),(0,c.createElement)(u.Button,{isSecondary:!0,isLarge:!0,className:"wp-block-themeisle-blocks-review__inspector_add",onClick:()=>{const l=[...e.pros];l.push(""),t({pros:l})}},(0,o.__)("Add Item","otter-blocks"))),(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Cons","otter-blocks"),initialOpen:!1},0<e.cons.length&&e.cons.map(((l,a)=>(0,c.createElement)(g,{title:l||(0,o.__)("Con","otter-blocks"),remove:()=>(l=>{let o=[...e.cons];o=o.filter(((e,t)=>t!==l)),t({cons:o})})(a)},(0,c.createElement)(u.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",placeholder:(0,o.__)("What can be improved?","otter-blocks"),value:l,onChange:l=>((l,o)=>{const a=[...e.cons];a[l]=o,t({cons:a})})(a,l)})))),(0,c.createElement)(u.Button,{isSecondary:!0,isLarge:!0,className:"wp-block-themeisle-blocks-review__inspector_add",onClick:()=>{const l=[...e.cons];l.push(""),t({cons:l})}},(0,o.__)("Add Item","otter-blocks"))),(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Links","otter-blocks"),initialOpen:!1},e.product&&(0,c.createElement)(u.Notice,{status:"warning",isDismissible:!1,className:"otter-html-anchor-control-notice"},(0,o.__)("WooCommerce product synchronization is active. Some options might be disabled.","otter-blocks")),0<(null==l||null===(n=l.links)||void 0===n?void 0:n.length)&&(null==l||null===(i=l.links)||void 0===i?void 0:i.map(((t,l)=>(0,c.createElement)(g,{title:t.label||(0,o.__)("Link","otter-blocks"),remove:()=>h(l)},(0,c.createElement)(u.TextControl,{label:(0,o.__)("Label","otter-blocks"),type:"text",placeholder:(0,o.__)("Button label","otter-blocks"),disabled:e.product,value:t.label}),(0,c.createElement)(u.TextControl,{label:(0,o.__)("Link","otter-blocks"),type:"url",placeholder:"https://…",value:t.href,disabled:e.product}),(0,c.createElement)(u.ToggleControl,{label:(0,o.__)("Is this Sponsored?","otter-blocks"),checked:t.isSponsored,disabled:e.product}))))),!(0<(null==l||null===(s=l.links)||void 0===s?void 0:s.length))&&(0,c.createElement)(c.Fragment,null,0<e.links.length&&e.links.map(((e,t)=>(0,c.createElement)(g,{title:e.label||(0,o.__)("Link","otter-blocks"),remove:()=>h(t)},(0,c.createElement)(u.TextControl,{label:(0,o.__)("Label","otter-blocks"),type:"text",placeholder:(0,o.__)("Button label","otter-blocks"),value:e.label,onChange:e=>m(t,{label:e})}),(0,c.createElement)(u.TextControl,{label:(0,o.__)("Link","otter-blocks"),type:"url",placeholder:"https://…",value:e.href,onChange:e=>m(t,{href:e})}),(0,c.createElement)(u.ToggleControl,{label:(0,o.__)("Is this Sponsored?","otter-blocks"),checked:e.isSponsored,onChange:()=>m(t,{isSponsored:!e.isSponsored})})))),(0,c.createElement)(u.Button,{isSecondary:!0,isLarge:!0,className:"wp-block-themeisle-blocks-review__inspector_add",onClick:()=>{const l=[...e.links];l.push({label:(0,o.__)("Buy Now","otter-blocks"),href:""}),t({links:l})}},(0,o.__)("Add Links","otter-blocks")))),(0,c.createElement)(b.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:e.primaryColor,onChange:e=>t({primaryColor:e}),label:(0,o.__)("Primary","otter-blocks")},{value:e.backgroundColor,onChange:e=>t({backgroundColor:e}),label:(0,o.__)("Background","otter-blocks")},{value:e.textColor,onChange:e=>t({textColor:e}),label:(0,o.__)("Text","otter-blocks")},{value:e.buttonTextColor,onChange:e=>t({buttonTextColor:e}),label:(0,o.__)("Button Text","otter-blocks")}]},(0,c.createElement)(b.ContrastChecker,{textColor:e.primaryColor,backgroundColor:e.backgroundColor})),Boolean(window.themeisleGutenberg.hasNeveSupport.hasNeve)&&!Boolean(window.themeisleGutenberg.hasNeveSupport.hasNevePro)&&(0,c.createElement)(u.PanelBody,{title:(0,o.__)("More Features","otter-blocks"),initialOpen:!1},(0,c.createElement)("p",null,(0,o.__)("Build comparison tables for reviews, synchronize review data with WooCommerce products and more with Neve Pro. ","otter-blocks")),(0,c.createElement)(u.ExternalLink,{href:"https://themeisle.com/themes/neve/pricing"},(0,o.__)("Get Neve Pro. ","otter-blocks"))))},k=l(5225);(0,a.registerBlockType)("themeisle-blocks/review",{title:(0,o.__)("Product Review","otter-blocks"),description:(0,o.__)("Turn your posts into smart reviews with ratings and generate leads with a performing review block.","otter-blocks"),icon:r.rL,category:"themeisle-blocks",keywords:["product","review","stars"],attributes:n.Z,supports:{html:!1},styles:[{name:"default",label:(0,o.__)("Default","otter-blocks"),isDefault:!0},{name:"single-column",label:(0,o.__)("Single Column","otter-blocks")}],edit:({attributes:e,setAttributes:t,clientId:l,className:a,isSelected:i,status:d="isInactive",productAttributes:p={}})=>{var g,v,y,_,w;(0,c.useEffect)((()=>{const t=(0,k.WX)(l,n.Z);return()=>t(e.id)}),[e.id]);const f=(e.features.reduce(((e,t)=>e+t.rating),0)/e.features.length).toFixed(1),C=[];for(let e=0;10>e;e++)C.push((0,c.createElement)(r.Rh,{className:s()({low:3>=Math.round(f)&&e<Math.round(f),medium:3<Math.round(f)&&8>Math.round(f)&&e<Math.round(f),high:7<Math.round(f)&&10>=Math.round(f)&&e<Math.round(f)})}));return"isLoading"===d?(0,c.createElement)(c.Fragment,null,(0,c.createElement)(h,{attributes:e,setAttributes:t,productAttributes:p}),(0,c.createElement)(u.Placeholder,null,(0,c.createElement)(u.Spinner,null))):"object"==typeof d&&null!==d&&d.isError?(0,c.createElement)(c.Fragment,null,(0,c.createElement)(h,{attributes:e,setAttributes:t,productAttributes:p}),(0,c.createElement)(u.Placeholder,{instructions:d.message})):(0,c.createElement)(c.Fragment,null,(0,c.createElement)(h,{attributes:e,setAttributes:t,productAttributes:p}),(0,c.createElement)("div",{id:e.id,className:a,style:{backgroundColor:e.backgroundColor}},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__header",style:{borderColor:e.primaryColor}},null!=p&&p.title?(0,c.createElement)(b.RichText.Content,{placeholder:(0,o.__)("Name of your product…","otter-blocks"),allowedFormats:[],value:null==p?void 0:p.title,tagName:"h3",style:{color:e.textColor}}):(0,c.createElement)(b.RichText,{placeholder:(0,o.__)("Name of your product…","otter-blocks"),allowedFormats:[],value:e.title,onChange:e=>t({title:e}),tagName:"h3",style:{color:e.textColor}}),(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__header_meta"},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__header_ratings"},C,(0,c.createElement)("span",{style:{color:e.textColor}},
71
  /** translators: %s Rating score. */
72
- (0,o.sprintf)((0,o.__)("%f out of 10","otter-blocks"),Math.abs(f)||0))),(0,c.createElement)("span",{className:"wp-block-themeisle-blocks-review__header_price",style:{color:e.textColor}},((null==p?void 0:p.price)&&(null==p?void 0:p.discounted)||e.price&&e.discounted)&&(0,c.createElement)("del",null,(null!==(g=m()((null==p?void 0:p.currency)||e.currency))&&void 0!==g?g:"$")+""+((null==p?void 0:p.price)||e.price)||0),(e.price||e.discounted||(null==p?void 0:p.price)||(null==p?void 0:p.discounted))&&(null!==(v=m()((null==p?void 0:p.currency)||e.currency))&&void 0!==v?v:"$")+""+(null!=p&&p.discounted||e.discounted?(null==p?void 0:p.discounted)||e.discounted:(null==p?void 0:p.price)||e.price)))),(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__left"},(0,c.createElement)("div",{className:s()("wp-block-themeisle-blocks-review__left_details",{"is-single":!e.image||!i&&!e.description})},null!=p&&p.image?(0,c.createElement)("img",{src:null==p||null===(y=p.image)||void 0===y?void 0:y.url,alt:null==p||null===(_=p.image)||void 0===_?void 0:_.alt}):e.image&&(0,c.createElement)("img",{src:e.image.url,alt:e.image.alt}),!i&&!e.description||null!=p&&p.description?(0,c.createElement)(b.RichText.Content,{placeholder:(0,o.__)("Product description or a small review…","otter-blocks"),value:null==p?void 0:p.description,tagName:"p",style:{color:e.textColor}}):(0,c.createElement)(b.RichText,{placeholder:(0,o.__)("Product description or a small review…","otter-blocks"),value:e.description,onChange:e=>t({description:e}),tagName:"p",style:{color:e.textColor}})),(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__left_features"},0<e.features.length&&e.features.map(((l,a)=>{const n=[];for(let e=0;10>e;e++)n.push((0,c.createElement)(r.Rh,{className:s()({low:3>=Math.round(l.rating)&&e<Math.round(l.rating),medium:3<Math.round(l.rating)&&8>Math.round(l.rating)&&e<Math.round(l.rating),high:7<Math.round(l.rating)&&10>=Math.round(l.rating)&&e<Math.round(l.rating)})}));return(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__left_feature"},(0,c.createElement)(b.RichText,{placeholder:(0,o.__)("Feature title","otter-blocks"),value:l.title,className:"wp-block-themeisle-blocks-review__left_feature_title",onChange:l=>((l,o)=>{const a=[...e.features];a[l]={...a[l],...o},t({features:a})})(a,{title:l}),tagName:"span",style:{color:e.textColor}}),(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__left_feature_ratings"},n,(0,c.createElement)("span",{style:{color:e.textColor}},l.rating.toFixed(1),"/10")))})))),(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__right"},0<e.pros.length&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__right_pros"},(0,c.createElement)("h4",{style:{color:e.textColor}},(0,o.__)("Pros","otter-blocks")),e.pros.map(((l,a)=>(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__right_pros_item"},r.BF,(0,c.createElement)(b.RichText,{placeholder:(0,o.__)("Why do you like the product?","otter-blocks"),value:l,onChange:l=>((l,o)=>{const a=[...e.pros];a[l]=o,t({pros:a})})(a,l),tagName:"p",style:{color:e.textColor}}))))),0<e.cons.length&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__right_cons"},(0,c.createElement)("h4",{style:{color:e.textColor}},(0,o.__)("Cons","otter-blocks")),e.cons.map(((l,a)=>(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__right_cons_item"},r.xv,(0,c.createElement)(b.RichText,{placeholder:(0,o.__)("What can be improved?","otter-blocks"),value:l,onChange:l=>((l,o)=>{const a=[...e.cons];a[l]=o,t({cons:a})})(a,l),tagName:"p",style:{color:e.textColor}})))))),(0<(null==p||null===(w=p.links)||void 0===w?void 0:w.length)||0<e.links.length)&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__footer"},(0,c.createElement)("span",{className:"wp-block-themeisle-blocks-review__footer_label",style:{color:e.textColor}},(0,o.__)("Buy this product","otter-blocks")),(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__footer_buttons"},((null==p?void 0:p.links)||e.links).map(((l,a)=>(0,c.createElement)(b.RichText,{placeholder:(0,o.__)("Button label","otter-blocks"),value:l.label,disabled:0<(null==p?void 0:p.links),onChange:l=>((l,o)=>{const a=[...e.links];a[l]={...a[l],...o},t({links:a})})(a,{label:l}),tagName:"span",style:{color:e.buttonTextColor,backgroundColor:e.primaryColor}})))))))},save:()=>null})},5095:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:20},paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTop:{type:"number",default:20},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRight:{type:"number",default:20},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottom:{type:"number",default:20},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeft:{type:"number",default:20},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:20},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTop:{type:"number",default:20},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginRight:{type:"number",default:0},marginRightTablet:{type:"number"},marginRightMobile:{type:"number"},marginBottom:{type:"number",default:20},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},marginLeft:{type:"number",default:0},marginLeftTablet:{type:"number"},marginLeftMobile:{type:"number"},backgroundType:{type:"string",default:"color"},backgroundColor:{type:"string"},backgroundImageID:{type:"number"},backgroundImageURL:{type:"string"},backgroundAttachment:{type:"string",default:"scroll"},backgroundPosition:{type:"string",default:"top left"},backgroundRepeat:{type:"string",default:"repeat"},backgroundSize:{type:"string",default:"auto"},backgroundGradient:{type:"string",default:"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},borderType:{type:"string",default:"linked"},border:{type:"number",default:0},borderTop:{type:"number",default:0},borderRight:{type:"number",default:0},borderBottom:{type:"number",default:0},borderLeft:{type:"number",default:0},borderColor:{type:"string",default:"#000000"},borderRadiusType:{type:"string",default:"linked"},borderRadius:{type:"number",default:0},borderRadiusTop:{type:"number",default:0},borderRadiusRight:{type:"number",default:0},borderRadiusBottom:{type:"number",default:0},borderRadiusLeft:{type:"number",default:0},boxShadow:{type:"boolean",default:!1},boxShadowColor:{type:"string",default:"#000000"},boxShadowColorOpacity:{type:"number",default:50},boxShadowBlur:{type:"number",default:5},boxShadowSpread:{type:"number",default:0},boxShadowHorizontal:{type:"number",default:0},boxShadowVertical:{type:"number",default:0},columnsHTMLTag:{type:"string",default:"div"},columnWidth:{type:"string"}},c=l(9307),i=l(80),s=l.n(i),d=l(2819),m=l(2175);const b={id:{type:"string"},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:20},paddingTablet:{type:"number",default:20},paddingMobile:{type:"number",default:20},paddingTop:{type:"number",default:20},paddingTopTablet:{type:"number",default:20},paddingTopMobile:{type:"number",default:20},paddingRight:{type:"number",default:20},paddingRightTablet:{type:"number",default:20},paddingRightMobile:{type:"number",default:20},paddingBottom:{type:"number",default:20},paddingBottomTablet:{type:"number",default:20},paddingBottomMobile:{type:"number",default:20},paddingLeft:{type:"number",default:20},paddingLeftTablet:{type:"number",default:20},paddingLeftMobile:{type:"number",default:20},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:20},marginTablet:{type:"number",default:20},marginMobile:{type:"number",default:20},marginTop:{type:"number",default:20},marginTopTablet:{type:"number",default:20},marginTopMobile:{type:"number",default:20},marginRight:{type:"number",default:0},marginRightTablet:{type:"number",default:0},marginRightMobile:{type:"number",default:0},marginBottom:{type:"number",default:20},marginBottomTablet:{type:"number",default:20},marginBottomMobile:{type:"number",default:20},marginLeft:{type:"number",default:0},marginLeftTablet:{type:"number",default:0},marginLeftMobile:{type:"number",default:0},backgroundType:{type:"string",default:"color"},backgroundColor:{type:"string"},backgroundImageID:{type:"number"},backgroundImageURL:{type:"string"},backgroundAttachment:{type:"string",default:"scroll"},backgroundPosition:{type:"string",default:"top left"},backgroundRepeat:{type:"string",default:"repeat"},backgroundSize:{type:"string",default:"auto"},backgroundGradientFirstColor:{type:"string",default:"#36d1dc"},backgroundGradientFirstLocation:{type:"number",default:0},backgroundGradientSecondColor:{type:"string",default:"#5b86e5"},backgroundGradientSecondLocation:{type:"number",default:100},backgroundGradientType:{type:"string",default:"linear"},backgroundGradientAngle:{type:"number",default:90},backgroundGradientPosition:{type:"string",default:"center center"},borderType:{type:"string",default:"linked"},border:{type:"number",default:0},borderTop:{type:"number",default:0},borderRight:{type:"number",default:0},borderBottom:{type:"number",default:0},borderLeft:{type:"number",default:0},borderColor:{type:"string",default:"#000000"},borderRadiusType:{type:"string",default:"linked"},borderRadius:{type:"number",default:0},borderRadiusTop:{type:"number",default:0},borderRadiusRight:{type:"number",default:0},borderRadiusBottom:{type:"number",default:0},borderRadiusLeft:{type:"number",default:0},boxShadow:{type:"boolean",default:!1},boxShadowColor:{type:"string",default:"#000000"},boxShadowColorOpacity:{type:"number",default:50},boxShadowBlur:{type:"number",default:5},boxShadowSpread:{type:"number",default:0},boxShadowHorizontal:{type:"number",default:0},boxShadowVertical:{type:"number",default:0},columnsHTMLTag:{type:"string",default:"div"},columnWidth:{type:"string"}};var u=[{attributes:b,supports:{inserter:!1,reusable:!1,html:!1},save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag;let o,a,r,n;if("color"===e.backgroundType&&(o={background:e.backgroundColor}),"image"===e.backgroundType&&(o={backgroundImage:`url( '${e.backgroundImageURL}' )`,backgroundAttachment:e.backgroundAttachment,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundSize:e.backgroundSize}),"gradient"===e.backgroundType){let t;t="linear"===e.backgroundGradientType?`${e.backgroundGradientAngle}deg`:`at ${e.backgroundGradientPosition}`,o={background:`${e.backgroundGradientType}-gradient( ${t}, ${e.backgroundGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientFirstLocation}%, ${e.backgroundGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientSecondLocation}% )`}}"linked"===e.borderType&&(a={borderWidth:`${e.border}px`,borderStyle:"solid",borderColor:e.borderColor}),"unlinked"===e.borderType&&(a={borderTopWidth:`${e.borderTop}px`,borderRightWidth:`${e.borderRight}px`,borderBottomWidth:`${e.borderBottom}px`,borderLeftWidth:`${e.borderLeft}px`,borderStyle:"solid",borderColor:e.borderColor}),"linked"===e.borderRadiusType&&(r={borderRadius:`${e.borderRadius}px`}),"unlinked"===e.borderRadiusType&&(r={borderTopLeftRadius:`${e.borderRadiusTop}px`,borderTopRightRadius:`${e.borderRadiusRight}px`,borderBottomRightRadius:`${e.borderRadiusBottom}px`,borderBottomLeftRadius:`${e.borderRadiusLeft}px`}),!0===e.boxShadow&&(n={boxShadow:`${e.boxShadowHorizontal}px ${e.boxShadowVertical}px ${e.boxShadowBlur}px ${e.boxShadowSpread}px ${s()(e.boxShadowColor?e.boxShadowColor:"#000000",e.boxShadowColorOpacity)}`});const i={...o,...a,...r,...n};return(0,c.createElement)(l,{className:t,id:e.id,style:i},(0,c.createElement)(m.InnerBlocks.Content,null))}},{attributes:{...b,paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginRightTablet:{type:"number"},marginRightMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},marginLeftTablet:{type:"number"},marginLeftMobile:{type:"number"}},supports:{inserter:!1,reusable:!1,html:!1},migrate:e=>{let t="";if("gradient"===e.backgroundType){let l="";"linear"===e.backgroundGradientType&&(l=`${e.backgroundGradientAngle}deg, `),t=`${e.backgroundGradientType}-gradient(${l}${s()(e.backgroundGradientFirstColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientFirstLocation}%, ${s()(e.backgroundGradientSecondColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientSecondLocation}%)`}return{...{...(0,d.omit)(e,["backgroundGradientFirstColor","backgroundGradientFirstLocation","backgroundGradientSecondColor","backgroundGradientSecondLocation","backgroundGradientType","backgroundGradientAngle","backgroundGradientPosition"]),backgroundGradient:t}}},isEligible:e=>"gradient"===e.backgroundType&&void 0!==e.backgroundGradientFirstColor,save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag;return(0,c.createElement)(l,{className:t,id:e.id},(0,c.createElement)(m.InnerBlocks.Content,null))}}],p=l(5609),g=l(4333),h=l(9818),k=l(7400),v=l(4184),y=l.n(v),_=l(6778),w=l(2372),f=l(6993),C=l(1430),E=l(2136),T=({attributes:e,setAttributes:t,isSelected:l,clientId:a,adjacentBlock:r,parentBlock:n,updateBlockAttributes:i,adjacentBlockClientId:s})=>{const d=(0,h.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=!!e("core/edit-post")&&e("core/edit-post");return l?l():t()}),[]);(0,c.useEffect)((()=>{if(1<n.innerBlocks.length&&!s){const e=n.innerBlocks.findIndex((e=>e.clientId===a)),t=n.innerBlocks[e-1];k.current=t.clientId,v.current=t.attributes.columnWidth}}),[]),(0,c.useEffect)((()=>{if(1<n.innerBlocks.length)if(s)v.current=r.attributes.columnWidth,k.current=s,g.current=e.columnWidth;else{const t=n.innerBlocks.findIndex((e=>e.clientId===a)),l=n.innerBlocks[t-1];v.current=l.attributes.columnWidth,k.current=l.clientId,g.current=e.columnWidth}}),[l,e.columnWidth,n.innerBlocks.length]);const[b,u]=(0,c.useState)("layout"),g=(0,c.useRef)(e.columnWidth),k=(0,c.useRef)(s&&s),v=(0,c.useRef)(r&&r.attributes.columnWidth),T={top:"paddingTop",right:"paddingRight",bottom:"paddingBottom",left:"paddingLeft"},x={top:"paddingTopTablet",right:"paddingRightTablet",bottom:"paddingBottomTablet",left:"paddingLeftTablet"},M={top:"paddingTopMobile",right:"paddingRightMobile",bottom:"paddingBottomMobile",left:"paddingLeftMobile"},S=t=>{if("top"==t)switch(d){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingTop;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingTopTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingTopMobile}else if("right"==t)switch(d){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingRight;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingRightTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingRightMobile}else if("bottom"==t)switch(d){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingBottom;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingBottomTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingBottomMobile}else if("left"==t)switch(d){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingLeft;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingLeftTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingLeftMobile}},B={top:"marginTop",right:"marginRight",bottom:"marginBottom",left:"marginLeft"},z={top:"marginTopTablet",right:"marginRightTablet",bottom:"marginBottomTablet",left:"marginLeftTablet"},P={top:"marginTopMobile",right:"marginRightMobile",bottom:"marginBottomMobile",left:"marginLeftMobile"},N=t=>{if("top"==t)switch(d){case"Desktop":return"linked"===e.marginType?e.margin:e.marginTop;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginTopTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginTopMobile}else if("bottom"==t)switch(d){case"Desktop":return"linked"===e.marginType?e.margin:e.marginBottom;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginBottomTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginBottomMobile}else if("left"==t)switch(d){case"Desktop":return"linked"===e.marginType?e.margin:e.marginLeft;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginLeftTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginLeftMobile}else if("right"==t)switch(d){case"Desktop":return"linked"===e.marginType?e.margin:e.marginRight;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginRightTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginRightMobile}},L=()=>{t({backgroundImageID:"",backgroundImageURL:""})},R={top:"borderTop",right:"borderRight",bottom:"borderBottom",left:"borderLeft"},V=t=>{switch(t){case"top":return"linked"===e.borderType?e.border:e.borderTop;case"right":return"linked"===e.borderType?e.border:e.borderRight;case"bottom":return"linked"===e.borderType?e.border:e.borderBottom;case"left":return"linked"===e.borderType?e.border:e.borderLeft;default:return}},H={top:"borderRadiusTop",right:"borderRadiusRight",bottom:"borderRadiusBottom",left:"borderRadiusLeft"},I=t=>{switch(t){case"top":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusTop;case"right":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusRight;case"bottom":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusBottom;case"left":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusLeft;default:return}};return(0,c.createElement)(m.InspectorControls,null,(0,c.createElement)(p.PanelBody,{className:"wp-block-themeisle-blocks-advanced-columns-header-panel"},(0,c.createElement)(p.Button,{className:y()("header-tab",{"is-selected":"layout"===b}),onClick:()=>u("layout")},(0,c.createElement)("span",null,(0,c.createElement)(p.Dashicon,{icon:"editor-table"}),(0,o.__)("Layout","otter-blocks"))),(0,c.createElement)(p.Button,{className:y()("header-tab",{"is-selected":"style"===b}),onClick:()=>u("style")},(0,c.createElement)("span",null,(0,c.createElement)(p.Dashicon,{icon:"admin-customizer"}),(0,o.__)("Style","otter-blocks"))),(0,c.createElement)(p.Button,{className:y()("header-tab",{"is-selected":"advanced"===b}),onClick:()=>u("advanced")},(0,c.createElement)("span",null,(0,c.createElement)(p.Dashicon,{icon:"admin-generic"}),(0,o.__)("Advanced","otter-blocks")))),"layout"===b&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Spacing","otter-blocks")},1<n.innerBlocks.length&&(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Column Width","otter-blocks"),value:Number(e.columnWidth),onChange:e=>{const l=e||10,o=Number(g.current)-l+Number(v.current);g.current=l,v.current=o,t({columnWidth:l.toFixed(2)}),i(k.current,{columnWidth:o.toFixed(2)})},min:10,max:Number(e.columnWidth)+Number(v.current)-10}),(0,c.createElement)(f.Z,{label:(0,o.__)("Padding","otter-blocks")},(0,c.createElement)(w.Z,{type:(()=>{switch(d){case"Desktop":return e.paddingType;case"Tablet":return e.paddingTypeTablet;case"Mobile":return e.paddingTypeMobile;default:return}})(),min:0,max:500,changeType:e=>{switch(d){case"Desktop":t({paddingType:e});break;case"Tablet":t({paddingTypeTablet:e});break;case"Mobile":t({paddingTypeMobile:e})}},onChange:(l,o)=>{"Desktop"===d?"linked"===e.paddingType?t({padding:o}):t({[T[l]]:o}):"Tablet"===d?"linked"===e.paddingTypeTablet?t({paddingTablet:o}):t({[x[l]]:o}):"Mobile"===d&&("linked"===e.paddingTypeMobile?t({paddingMobile:o}):t({[M[l]]:o}))},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:S("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:S("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:S("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:S("left")}]})),(0,c.createElement)(f.Z,{label:(0,o.__)("Margin","otter-blocks")},(0,c.createElement)(w.Z,{type:(()=>{switch(d){case"Desktop":return e.marginType;case"Tablet":return e.marginTypeTablet;case"Mobile":return e.marginTypeMobile;default:return}})(),min:-500,max:500,changeType:e=>{switch(d){case"Desktop":t({marginType:e});break;case"Tablet":t({marginTypeTablet:e});break;case"Mobile":t({marginTypeMobile:e})}},onChange:(l,o)=>{"Desktop"===d?"linked"===e.marginType?t({margin:o}):t({[B[l]]:o}):"Tablet"===d?"linked"===e.marginTypeTablet?t({marginTablet:o}):t({[z[l]]:o}):"Mobile"===d&&("linked"===e.marginTypeMobile?t({marginMobile:o}):t({[P[l]]:o}))},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:N("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:N("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:N("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:N("left")}]}))))||"style"===b&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Background Settings","otter-blocks"),className:"wp-block-themeisle-image-container"},(0,c.createElement)(C.Z,{label:(0,o.__)("Background Type","otter-blocks"),backgroundType:e.backgroundType,changeBackgroundType:e=>{t({backgroundType:e})}}),"color"===e.backgroundType&&(0,c.createElement)(_.Z,{label:(0,o.__)("Background Color","otter-blocks"),colorValue:e.headingColor},(0,c.createElement)(m.ColorPalette,{label:(0,o.__)("Background Color","otter-blocks"),value:e.backgroundColor,onChange:e=>{t({backgroundColor:e})}}))||"image"===e.backgroundType&&(e.backgroundImageURL?(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-body"},(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-area"},(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-holder",style:{backgroundImage:`url('${e.backgroundImageURL}')`}}),(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-delete",onClick:L},(0,c.createElement)(p.Dashicon,{icon:"trash"}),(0,c.createElement)("span",null,(0,o.__)("Remove Image","otter-blocks"))))),(0,c.createElement)(p.Button,{isSecondary:!0,className:"wp-block-themeisle-image-container-delete-button",onClick:L},(0,o.__)("Change or Remove Image","otter-blocks")),(0,c.createElement)(E.Z,{label:(0,o.__)("Background Settings","otter-blocks")},(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Attachment","otter-blocks"),value:e.backgroundAttachment,options:[{label:(0,o.__)("Scroll","otter-blocks"),value:"scroll"},{label:(0,o.__)("Fixed","otter-blocks"),value:"fixed"},{label:(0,o.__)("Local","otter-blocks"),value:"local"}],onChange:e=>{t({backgroundAttachment:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Position","otter-blocks"),value:e.backgroundPosition,options:[{label:(0,o.__)("Default","otter-blocks"),value:"top left"},{label:(0,o.__)("Top Left","otter-blocks"),value:"top left"},{label:(0,o.__)("Top Center","otter-blocks"),value:"top center"},{label:(0,o.__)("Top Right","otter-blocks"),value:"top right"},{label:(0,o.__)("Center Left","otter-blocks"),value:"center left"},{label:(0,o.__)("Center Center","otter-blocks"),value:"center center"},{label:(0,o.__)("Center Right","otter-blocks"),value:"center right"},{label:(0,o.__)("Bottom Left","otter-blocks"),value:"bottom left"},{label:(0,o.__)("Bottom Center","otter-blocks"),value:"bottom center"},{label:(0,o.__)("Bottom Right","otter-blocks"),value:"bottom right"}],onChange:e=>{t({backgroundPosition:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Repeat","otter-blocks"),value:e.backgroundRepeat,options:[{label:(0,o.__)("Repeat","otter-blocks"),value:"repeat"},{label:(0,o.__)("No-repeat","otter-blocks"),value:"no-repeat"}],onChange:e=>{t({backgroundRepeat:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Size","otter-blocks"),value:e.backgroundSize,options:[{label:(0,o.__)("Auto","otter-blocks"),value:"auto"},{label:(0,o.__)("Cover","otter-blocks"),value:"cover"},{label:(0,o.__)("Contain","otter-blocks"),value:"contain"}],onChange:e=>{t({backgroundSize:e})}}))):(0,c.createElement)(m.MediaPlaceholder,{icon:"format-image",labels:{title:(0,o.__)("Background Image","otter-blocks"),name:(0,o.__)("an image","otter-blocks")},value:e.backgroundImageID,onSelect:e=>{t({backgroundImageID:e.id,backgroundImageURL:e.url})},accept:"image/*",allowedTypes:["image"]}))||"gradient"===e.backgroundType&&(0,c.createElement)(m.__experimentalColorGradientControl,{label:(0,o.__)("Background Gradient","otter-blocks"),gradientValue:e.backgroundGradient,disableCustomColors:!0,onGradientChange:e=>{t({backgroundGradient:e})},clearable:!1})),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Border","otter-blocks"),className:"wp-block-themeisle-border-container",initialOpen:!1},(0,c.createElement)(w.Z,{label:(0,o.__)("Border Width","otter-blocks"),type:e.borderType,min:0,max:500,changeType:e=>{t({borderType:e})},onChange:(l,o)=>{"linked"===e.borderType?t({border:o}):t({[R[l]]:o})},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:V("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:V("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:V("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:V("left")}]}),(0,c.createElement)(_.Z,{label:(0,o.__)("Border Color","otter-blocks"),colorValue:e.borderColor},(0,c.createElement)(m.ColorPalette,{label:(0,o.__)("Border Color","otter-blocks"),value:e.borderColor,onChange:e=>{t({borderColor:e})}})),(0,c.createElement)(w.Z,{label:(0,o.__)("Border Radius","otter-blocks"),type:e.borderRadiusType,min:0,max:500,changeType:e=>{t({borderRadiusType:e})},onChange:(l,o)=>{"linked"===e.borderRadiusType?t({borderRadius:o}):t({[H[l]]:o})},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:I("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:I("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:I("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:I("left")}]}),(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Box Shadow","otter-blocks"),checked:e.boxShadow,onChange:()=>{t({boxShadow:!e.boxShadow})}}),e.boxShadow&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(_.Z,{label:(0,o.__)("Shadow Color","otter-blocks"),colorValue:e.boxShadowColor},(0,c.createElement)(m.ColorPalette,{label:(0,o.__)("Shadow Color","otter-blocks"),value:e.boxShadowColor,onChange:e=>{t({boxShadowColor:e})}})),(0,c.createElement)(E.Z,{label:(0,o.__)("Shadow Properties","otter-blocks")},(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:e.boxShadowColorOpacity,onChange:e=>{t({boxShadowColorOpacity:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:e.boxShadowBlur,onChange:e=>{t({boxShadowBlur:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Spread","otter-blocks"),value:e.boxShadowSpread,onChange:e=>{t({boxShadowSpread:e})},min:-100,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:e.boxShadowHorizontal,onChange:e=>{t({boxShadowHorizontal:e})},min:-100,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:e.boxShadowVertical,onChange:e=>{t({boxShadowVertical:e})},min:-100,max:100})))))||"advanced"===b&&(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Section Settings","otter-blocks")},(0,c.createElement)(p.SelectControl,{label:(0,o.__)("HTML Tag","otter-blocks"),value:e.columnsHTMLTag,options:[{label:(0,o.__)("Default (div)","otter-blocks"),value:"div"},{label:"section",value:"section"},{label:"header",value:"header"},{label:"footer",value:"footer"},{label:"article",value:"article"},{label:"main",value:"main"}],onChange:e=>{t({columnsHTMLTag:e})}})))},x=l(5225);(0,a.registerBlockType)("themeisle-blocks/advanced-column",{title:(0,o.__)("Section Column","otter-blocks"),description:(0,o.__)("A single column within a Section block.","otter-blocks"),parent:["themeisle-blocks/advanced-columns"],icon:r.rK,category:"themeisle-blocks",attributes:n,deprecated:u,supports:{inserter:!1,html:!1},edit:({attributes:e,setAttributes:t,className:l,isSelected:o,clientId:a,toggleSelection:r})=>{const{updateBlockAttributes:i}=(0,h.useDispatch)("core/block-editor"),{adjacentBlockClientId:d,adjacentBlock:b,parentClientId:u,parentBlock:v,hasInnerBlocks:y,isViewportAvailable:_,isPreviewDesktop:w,isPreviewTablet:f,isPreviewMobile:C}=(0,h.useSelect)((e=>{const{getAdjacentBlockClientId:t,getBlock:l,getBlockRootClientId:o}=e("core/block-editor"),{__experimentalGetPreviewDeviceType:r}=!!e("core/edit-post")&&e("core/edit-post"),n=l(a),c=t(a),i=l(c),s=o(a);return{adjacentBlockClientId:c,adjacentBlock:i,parentClientId:s,parentBlock:l(s),hasInnerBlocks:!(!n||!n.innerBlocks.length),isViewportAvailable:!!r,isPreviewDesktop:!!r&&"Desktop"===r(),isPreviewTablet:!!r&&"Tablet"===r(),isPreviewMobile:!!r&&"Mobile"===r()}}),[]),E=(0,g.useViewportMatch)("large",">="),M=(0,g.useViewportMatch)("large","<="),S=(0,g.useViewportMatch)("small",">="),B=(0,g.useViewportMatch)("small","<=");(0,c.useEffect)((()=>{const t=(0,x.WX)(a,n);return()=>t(e.id)}),[e.id]),(0,c.useEffect)((()=>{I()}),[e.columnWidth]);const[z,P]=(0,c.useState)(0),[N,L]=(0,c.useState)(0);let R=E&&!M&&S&&!B,V=!E&&!M&&S&&!B,H=!(E||M||S||B);_&&!H&&(R=w,V=f,H=C),void 0===e.columnWidth&&v.innerBlocks.map(((e,t)=>{if(a===e.clientId){const e=v.attributes.columns,l=v.attributes.layout;i(a,{columnWidth:k.Z[e][l][t]})}}));const I=()=>{const t=document.getElementById(`block-${a}`);null!==t&&(t.style.flexBasis=R?`${e.columnWidth}%`:"")},A=e.columnsHTMLTag;let $,O,G,D,Z;R&&($={paddingTop:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingTop}px`,paddingRight:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingRight}px`,paddingBottom:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingBottom}px`,paddingLeft:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingLeft}px`,marginTop:"linked"===e.marginType?`${e.margin}px`:`${e.marginTop}px`,marginRight:"linked"===e.marginType?`${e.margin}px`:`${e.marginRight}px`,marginBottom:"linked"===e.marginType?`${e.margin}px`:`${e.marginBottom}px`,marginLeft:"linked"===e.marginType?`${e.margin}px`:`${e.marginLeft}px`}),V&&($={paddingTop:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingTopTablet}px`,paddingRight:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingRightTablet}px`,paddingBottom:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingBottomTablet}px`,paddingLeft:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingLeftTablet}px`,marginTop:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginTopTablet}px`,marginRight:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginRightTablet}px`,marginBottom:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginBottomTablet}px`,marginLeft:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginLeftTablet}px`}),H&&($={paddingTop:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingTopMobile}px`,paddingRight:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingRightMobile}px`,paddingBottom:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingBottomMobile}px`,paddingLeft:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingLeftMobile}px`,marginTop:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginTopMobile}px`,marginRight:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginRightMobile}px`,marginBottom:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginBottomMobile}px`,marginLeft:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginLeftMobile}px`}),"color"===e.backgroundType&&(O={background:e.backgroundColor}),"image"===e.backgroundType&&(O={backgroundImage:`url( '${e.backgroundImageURL}' )`,backgroundAttachment:e.backgroundAttachment,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundSize:e.backgroundSize}),"gradient"===e.backgroundType&&(O={background:e.backgroundGradient}),"linked"===e.borderType&&(G={borderWidth:`${e.border}px`,borderStyle:"solid",borderColor:e.borderColor}),"unlinked"===e.borderType&&(G={borderTopWidth:`${e.borderTop}px`,borderRightWidth:`${e.borderRight}px`,borderBottomWidth:`${e.borderBottom}px`,borderLeftWidth:`${e.borderLeft}px`,borderStyle:"solid",borderColor:e.borderColor}),"linked"===e.borderRadiusType&&(D={borderRadius:`${e.borderRadius}px`}),"unlinked"===e.borderRadiusType&&(D={borderTopLeftRadius:`${e.borderRadiusTop}px`,borderTopRightRadius:`${e.borderRadiusRight}px`,borderBottomRightRadius:`${e.borderRadiusBottom}px`,borderBottomLeftRadius:`${e.borderRadiusLeft}px`}),!0===e.boxShadow&&(Z={boxShadow:`${e.boxShadowHorizontal}px ${e.boxShadowVertical}px ${e.boxShadowBlur}px ${e.boxShadowSpread}px ${s()(e.boxShadowColor?e.boxShadowColor:"#000000",e.boxShadowColorOpacity)}`});const F={...$,...O,...G,...D,...Z};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(T,{attributes:e,setAttributes:t,isSelected:o,clientId:a,adjacentBlock:b,parentBlock:v,updateBlockAttributes:i,adjacentBlockClientId:d}),(0,c.createElement)(p.ResizableBox,{className:"block-library-spacer__resize-container wp-themeisle-block-advanced-column-resize-container",enable:{right:!!d},handleWrapperClass:"wp-themeisle-block-advanced-column-resize-container-handle",onResizeStart:()=>{const t=document.querySelector(`#block-${a} .wp-themeisle-block-advanced-column-resize-container-handle .components-resizable-box__handle`),l=document.createElement("div"),o=document.createElement("div");l.setAttribute("class","resizable-tooltip resizable-tooltip-left"),l.innerHTML=`${parseFloat(e.columnWidth).toFixed(0)}%`,t.appendChild(l),o.setAttribute("class","resizable-tooltip resizable-tooltip-right"),o.innerHTML=`${parseFloat(b.attributes.columnWidth).toFixed(0)}%`,t.appendChild(o),P(e.columnWidth),L(b.attributes.columnWidth),r(!1)},onResize:(e,l,o,a)=>{const r=document.getElementById(`block-${u}`).getBoundingClientRect().width,n=a.width/r*100,c=parseFloat(z)+n,s=N-n,m=document.querySelector(".resizable-tooltip-left"),b=document.querySelector(".resizable-tooltip-right");10<=c&&10<=s&&(m.innerHTML=`${c.toFixed(0)}%`,b.innerHTML=`${s.toFixed(0)}%`,t({columnWidth:c.toFixed(2)}),i(d,{columnWidth:s.toFixed(2)}))},onResizeStop:()=>{const e=document.querySelector(".resizable-tooltip-left"),t=document.querySelector(".resizable-tooltip-right");e.parentNode.removeChild(e),t.parentNode.removeChild(t),r(!0)}},(0,c.createElement)(A,{className:l,id:e.id,style:F},(0,c.createElement)(m.InnerBlocks,{templateLock:!1,renderAppender:!y&&m.InnerBlocks.ButtonBlockAppender}))))},save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag;return(0,c.createElement)(l,{className:t,id:e.id},(0,c.createElement)(m.InnerBlocks.Content,null))}})},8276:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},columns:{type:"number"},layout:{type:"string"},layoutTablet:{type:"string",default:"equal"},layoutMobile:{type:"string",default:"equal"},columnsGap:{type:"string",default:"default"},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:20},paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTop:{type:"number",default:20},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRight:{type:"number",default:20},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottom:{type:"number",default:20},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeft:{type:"number",default:20},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:20},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTop:{type:"number",default:20},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginBottom:{type:"number",default:20},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},columnsWidth:{type:"number"},horizontalAlign:{type:"string",default:"unset"},columnsHeight:{type:"string",default:"auto"},columnsHeightCustom:{type:"number"},columnsHeightCustomTablet:{type:"number"},columnsHeightCustomMobile:{type:"number"},verticalAlign:{type:"string",default:"unset"},backgroundType:{type:"string",default:"color"},backgroundColor:{type:"string"},backgroundImageID:{type:"number"},backgroundImageURL:{type:"string"},backgroundAttachment:{type:"string",default:"scroll"},backgroundPosition:{type:"string",default:"top left"},backgroundRepeat:{type:"string",default:"repeat"},backgroundSize:{type:"string",default:"auto"},backgroundGradient:{type:"string",default:"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},backgroundOverlayOpacity:{type:"number",default:50},backgroundOverlayType:{type:"string",default:"color"},backgroundOverlayColor:{type:"string"},backgroundOverlayImageID:{type:"number"},backgroundOverlayImageURL:{type:"string"},backgroundOverlayAttachment:{type:"string",default:"scroll"},backgroundOverlayPosition:{type:"string",default:"top left"},backgroundOverlayRepeat:{type:"string",default:"repeat"},backgroundOverlaySize:{type:"string",default:"auto"},backgroundOverlayGradient:{type:"string",default:"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},backgroundOverlayFilterBlur:{type:"number",default:0},backgroundOverlayFilterBrightness:{type:"number",default:10},backgroundOverlayFilterContrast:{type:"number",default:10},backgroundOverlayFilterGrayscale:{type:"number",default:0},backgroundOverlayFilterHue:{type:"number",default:0},backgroundOverlayFilterSaturate:{type:"number",default:10},backgroundOverlayBlend:{type:"string",default:"normal"},borderType:{type:"string",default:"linked"},border:{type:"number",default:0},borderTop:{type:"number",default:0},borderRight:{type:"number",default:0},borderBottom:{type:"number",default:0},borderLeft:{type:"number",default:0},borderColor:{type:"string",default:"#000000"},borderRadiusType:{type:"string",default:"linked"},borderRadius:{type:"number",default:0},borderRadiusTop:{type:"number",default:0},borderRadiusRight:{type:"number",default:0},borderRadiusBottom:{type:"number",default:0},borderRadiusLeft:{type:"number",default:0},boxShadow:{type:"boolean",default:!1},boxShadowColor:{type:"string",default:"#000000"},boxShadowColorOpacity:{type:"number",default:50},boxShadowBlur:{type:"number",default:5},boxShadowSpread:{type:"number",default:0},boxShadowHorizontal:{type:"number",default:0},boxShadowVertical:{type:"number",default:0},dividerTopType:{type:"string",default:"none"},dividerTopColor:{type:"string",default:"#000000"},dividerTopWidth:{type:"number",default:100},dividerTopWidthTablet:{type:"number",default:100},dividerTopWidthMobile:{type:"number",default:100},dividerTopHeight:{type:"number",default:100},dividerTopHeightTablet:{type:"number",default:100},dividerTopHeightMobile:{type:"number",default:100},dividerTopInvert:{type:"boolean",default:!1},dividerBottomType:{type:"string",default:"none"},dividerBottomColor:{type:"string",default:"#000000"},dividerBottomWidth:{type:"number",default:100},dividerBottomWidthTablet:{type:"number",default:100},dividerBottomWidthMobile:{type:"number",default:100},dividerBottomHeight:{type:"number",default:100},dividerBottomHeightTablet:{type:"number",default:100},dividerBottomHeightMobile:{type:"number",default:100},dividerBottomInvert:{type:"boolean",default:!1},hide:{type:"boolean",default:!1},hideTablet:{type:"boolean",default:!1},hideMobile:{type:"boolean",default:!1},reverseColumnsTablet:{type:"boolean",default:!1},reverseColumnsMobile:{type:"boolean",default:!1},columnsHTMLTag:{type:"string",default:"div"}},c=l(9307),i=l(4184),s=l.n(i),d=l(80),m=l.n(d),b=l(2819),u=l(2175),p=l(5609);const g={align:{type:"string"},id:{type:"string"},columns:{type:"number"},layout:{type:"string"},layoutTablet:{type:"string",default:"equal"},layoutMobile:{type:"string",default:"equal"},columnsGap:{type:"string",default:"default"},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:20},paddingTablet:{type:"number",default:20},paddingMobile:{type:"number",default:20},paddingTop:{type:"number",default:20},paddingTopTablet:{type:"number",default:20},paddingTopMobile:{type:"number",default:20},paddingRight:{type:"number",default:20},paddingRightTablet:{type:"number",default:20},paddingRightMobile:{type:"number",default:20},paddingBottom:{type:"number",default:20},paddingBottomTablet:{type:"number",default:20},paddingBottomMobile:{type:"number",default:20},paddingLeft:{type:"number",default:20},paddingLeftTablet:{type:"number",default:20},paddingLeftMobile:{type:"number",default:20},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:20},marginTablet:{type:"number",default:20},marginMobile:{type:"number",default:20},marginTop:{type:"number",default:20},marginTopTablet:{type:"number",default:20},marginTopMobile:{type:"number",default:20},marginBottom:{type:"number",default:20},marginBottomTablet:{type:"number",default:20},marginBottomMobile:{type:"number",default:20},columnsWidth:{type:"number"},columnsHeight:{type:"string",default:"auto"},columnsHeightCustom:{type:"number"},columnsHeightCustomTablet:{type:"number"},columnsHeightCustomMobile:{type:"number"},horizontalAlign:{type:"string",default:"unset"},verticalAlign:{type:"string",default:"unset"},backgroundType:{type:"string",default:"color"},backgroundColor:{type:"string"},backgroundImageID:{type:"number"},backgroundImageURL:{type:"string"},backgroundAttachment:{type:"string",default:"scroll"},backgroundPosition:{type:"string",default:"top left"},backgroundRepeat:{type:"string",default:"repeat"},backgroundSize:{type:"string",default:"auto"},backgroundGradientFirstColor:{type:"string",default:"#36d1dc"},backgroundGradientFirstLocation:{type:"number",default:0},backgroundGradientSecondColor:{type:"string",default:"#5b86e5"},backgroundGradientSecondLocation:{type:"number",default:100},backgroundGradientType:{type:"string",default:"linear"},backgroundGradientAngle:{type:"number",default:90},backgroundGradientPosition:{type:"string",default:"center center"},backgroundOverlayOpacity:{type:"number",default:50},backgroundOverlayType:{type:"string",default:"color"},backgroundOverlayColor:{type:"string"},backgroundOverlayImageID:{type:"number"},backgroundOverlayImageURL:{type:"string"},backgroundOverlayAttachment:{type:"string",default:"scroll"},backgroundOverlayPosition:{type:"string",default:"top left"},backgroundOverlayRepeat:{type:"string",default:"repeat"},backgroundOverlaySize:{type:"string",default:"auto"},backgroundOverlayGradientFirstColor:{type:"string",default:"#36d1dc"},backgroundOverlayGradientFirstLocation:{type:"number",default:0},backgroundOverlayGradientSecondColor:{type:"string",default:"#5b86e5"},backgroundOverlayGradientSecondLocation:{type:"number",default:100},backgroundOverlayGradientType:{type:"string",default:"linear"},backgroundOverlayGradientAngle:{type:"number",default:90},backgroundOverlayGradientPosition:{type:"string",default:"center center"},backgroundOverlayFilterBlur:{type:"number",default:0},backgroundOverlayFilterBrightness:{type:"number",default:10},backgroundOverlayFilterContrast:{type:"number",default:10},backgroundOverlayFilterGrayscale:{type:"number",default:0},backgroundOverlayFilterHue:{type:"number",default:0},backgroundOverlayFilterSaturate:{type:"number",default:10},backgroundOverlayBlend:{type:"string",default:"normal"},borderType:{type:"string",default:"linked"},border:{type:"number",default:0},borderTop:{type:"number",default:0},borderRight:{type:"number",default:0},borderBottom:{type:"number",default:0},borderLeft:{type:"number",default:0},borderColor:{type:"string",default:"#000000"},borderRadiusType:{type:"string",default:"linked"},borderRadius:{type:"number",default:0},borderRadiusTop:{type:"number",default:0},borderRadiusRight:{type:"number",default:0},borderRadiusBottom:{type:"number",default:0},borderRadiusLeft:{type:"number",default:0},boxShadow:{type:"boolean",default:!1},boxShadowColor:{type:"string",default:"#000000"},boxShadowColorOpacity:{type:"number",default:50},boxShadowBlur:{type:"number",default:5},boxShadowSpread:{type:"number",default:0},boxShadowHorizontal:{type:"number",default:0},boxShadowVertical:{type:"number",default:0},dividerTopType:{type:"string",default:"none"},dividerTopColor:{type:"string",default:"#000000"},dividerTopWidth:{type:"number",default:100},dividerTopWidthTablet:{type:"number",default:100},dividerTopWidthMobile:{type:"number",default:100},dividerTopHeight:{type:"number",default:100},dividerTopHeightTablet:{type:"number",default:100},dividerTopHeightMobile:{type:"number",default:100},dividerTopInvert:{type:"boolean",default:!1},dividerBottomType:{type:"string",default:"none"},dividerBottomColor:{type:"string",default:"#000000"},dividerBottomWidth:{type:"number",default:100},dividerBottomWidthTablet:{type:"number",default:100},dividerBottomWidthMobile:{type:"number",default:100},dividerBottomHeight:{type:"number",default:100},dividerBottomHeightTablet:{type:"number",default:100},dividerBottomHeightMobile:{type:"number",default:100},dividerBottomInvert:{type:"boolean",default:!1},hide:{type:"boolean",default:!1},hideTablet:{type:"boolean",default:!1},hideMobile:{type:"boolean",default:!1},columnsHTMLTag:{type:"string",default:"div"}},h=({type:e,front:t,style:l,fill:o,invert:a,width:r,height:n})=>"none"!==l&&(0,c.createElement)("div",{className:s()("wp-block-themeisle-blocks-advanced-columns-separators",e),style:!t&&r?{transform:r?`scaleX( ${r/100} )`:""}:{}},"bigTriangle"===l&&!1===a&&(0,c.createElement)(p.SVG,{id:"bigTriangle",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"bottom"===e?{transform:"bottom"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M0 0 L50 100 L100 0 Z"})),"bigTriangle"===l&&!0===a&&(0,c.createElement)(p.SVG,{id:"bigTriangle",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===e?{transform:"top"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M100, 0l-50, 100l-50, -100l0, 100l100, 0l0, -100Z"})),"rightCurve"===l&&!1===a&&(0,c.createElement)(p.SVG,{id:"rightCurve",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===e?{transform:"top"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M0 100 C 20 0 50 0 100 100 Z"})),"rightCurve"===l&&!0===a&&(0,c.createElement)(p.SVG,{id:"rightCurve",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===e?{transform:"top"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M0 100 C 50 0 70 0 100 100 Z"})),"curve"===l&&(0,c.createElement)(p.SVG,{id:"curve",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===e?{transform:"top"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M0 100 C40 0 60 0 100 100 Z"})),"slant"===l&&!1===a&&(0,c.createElement)(p.SVG,{id:"slant",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"bottom"===e?{transform:"bottom"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M0 0 L100 100 L100 0 Z"})),"slant"===l&&!0===a&&(0,c.createElement)(p.SVG,{id:"slant",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"bottom"===e?{transform:"bottom"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M0 0 L0 100 L100 0 Z"})),"cloud"===l&&(0,c.createElement)(p.SVG,{id:"cloud",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===e?{transform:"top"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M-5 100 Q 10 -100 15 100 Z M10 100 Q 20 -20 30 100 M25 100 Q 35 -70 45 100 M40 100 Q 50 -100 60 100 M55 100 Q 65 -20 75 100 M70 100 Q 75 -45 90 100 M85 100 Q 90 -50 95 100 M90 100 Q 95 -25 105 100 Z"}))),k=({type:e,front:t,style:l,fill:o,invert:a,width:r,height:n})=>"none"!==l&&(0,c.createElement)("div",{className:s()("wp-block-themeisle-blocks-advanced-columns-separators",e),style:!t&&r?{transform:r?`scaleX( ${r/100} )`:""}:{}},"bigTriangle"===l&&!1===a&&(0,c.createElement)(p.SVG,{id:"bigTriangle",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"bottom"===e})},(0,c.createElement)(p.Path,{d:"M0 0 L50 100 L100 0 Z"})),"bigTriangle"===l&&!0===a&&(0,c.createElement)(p.SVG,{id:"bigTriangle",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"top"===e})},(0,c.createElement)(p.Path,{d:"M100, 0l-50, 100l-50, -100l0, 100l100, 0l0, -100Z"})),"rightCurve"===l&&!1===a&&(0,c.createElement)(p.SVG,{id:"rightCurve",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"top"===e})},(0,c.createElement)(p.Path,{d:"M0 100 C 20 0 50 0 100 100 Z"})),"rightCurve"===l&&!0===a&&(0,c.createElement)(p.SVG,{id:"rightCurve",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"top"===e})},(0,c.createElement)(p.Path,{d:"M0 100 C 50 0 70 0 100 100 Z"})),"curve"===l&&(0,c.createElement)(p.SVG,{id:"curve",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"top"===e})},(0,c.createElement)(p.Path,{d:"M0 100 C40 0 60 0 100 100 Z"})),"slant"===l&&!1===a&&(0,c.createElement)(p.SVG,{id:"slant",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"bottom"===e})},(0,c.createElement)(p.Path,{d:"M0 0 L100 100 L100 0 Z"})),"slant"===l&&!0===a&&(0,c.createElement)(p.SVG,{id:"slant",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"bottom"===e})},(0,c.createElement)(p.Path,{d:"M0 0 L0 100 L100 0 Z"})),"cloud"===l&&(0,c.createElement)(p.SVG,{id:"cloud",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"top"===e})},(0,c.createElement)(p.Path,{d:"M-5 100 Q 10 -100 15 100 Z M10 100 Q 20 -20 30 100 M25 100 Q 35 -70 45 100 M40 100 Q 50 -100 60 100 M55 100 Q 65 -20 75 100 M70 100 Q 75 -45 90 100 M85 100 Q 90 -50 95 100 M90 100 Q 95 -25 105 100 Z"})));var v=[{attributes:g,supports:{align:["wide","full"],html:!1},save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag;let o,a,r,n,i;if("color"===e.backgroundType&&(o={background:e.backgroundColor}),"image"===e.backgroundType&&(o={backgroundImage:`url( '${e.backgroundImageURL}' )`,backgroundAttachment:e.backgroundAttachment,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundSize:e.backgroundSize}),"gradient"===e.backgroundType){let t;t="linear"===e.backgroundGradientType?`${e.backgroundGradientAngle}deg`:`at ${e.backgroundGradientPosition}`,o={background:`${e.backgroundGradientType}-gradient( ${t}, ${e.backgroundGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientFirstLocation}%, ${e.backgroundGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientSecondLocation}% )`}}"linked"===e.borderType&&(r={borderWidth:`${e.border}px`,borderStyle:"solid",borderColor:e.borderColor}),"unlinked"===e.borderType&&(r={borderTopWidth:`${e.borderTop}px`,borderRightWidth:`${e.borderRight}px`,borderBottomWidth:`${e.borderBottom}px`,borderLeftWidth:`${e.borderLeft}px`,borderStyle:"solid",borderColor:e.borderColor}),"linked"===e.borderRadiusType&&(n={borderRadius:`${e.borderRadius}px`}),"unlinked"===e.borderRadiusType&&(n={borderTopLeftRadius:`${e.borderRadiusTop}px`,borderTopRightRadius:`${e.borderRadiusRight}px`,borderBottomRightRadius:`${e.borderRadiusBottom}px`,borderBottomLeftRadius:`${e.borderRadiusLeft}px`}),!0===e.boxShadow&&(i={boxShadow:`${e.boxShadowHorizontal}px ${e.boxShadowVertical}px ${e.boxShadowBlur}px ${e.boxShadowSpread}px ${m()(e.boxShadowColor?e.boxShadowColor:"#000000",e.boxShadowColorOpacity)}`});const d={...o,...r,...n,...i,justifyContent:e.horizontalAlign};if("color"===e.backgroundOverlayType&&(a={background:e.backgroundOverlayColor,opacity:e.backgroundOverlayOpacity/100}),"image"===e.backgroundOverlayType&&(a={backgroundImage:`url( '${e.backgroundOverlayImageURL}' )`,backgroundAttachment:e.backgroundOverlayAttachment,backgroundPosition:e.backgroundOverlayPosition,backgroundRepeat:e.backgroundOverlayRepeat,backgroundSize:e.backgroundOverlaySize,opacity:e.backgroundOverlayOpacity/100}),"gradient"===e.backgroundOverlayType){let t;t="linear"===e.backgroundOverlayGradientType?`${e.backgroundOverlayGradientAngle}deg`:`at ${e.backgroundOverlayGradientPosition}`,a={background:`${e.backgroundOverlayGradientType}-gradient( ${t}, ${e.backgroundOverlayGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientFirstLocation}%, ${e.backgroundOverlayGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientSecondLocation}% )`,opacity:e.backgroundOverlayOpacity/100}}const b={...a,mixBlendMode:e.backgroundOverlayBlend,filter:`blur( ${e.backgroundOverlayFilterBlur/10}px ) brightness( ${e.backgroundOverlayFilterBrightness/10} ) contrast( ${e.backgroundOverlayFilterContrast/10} ) grayscale( ${e.backgroundOverlayFilterGrayscale/100} ) hue-rotate( ${e.backgroundOverlayFilterHue}deg ) saturate( ${e.backgroundOverlayFilterSaturate/10} )`};let p={};e.columnsWidth&&(p={maxWidth:e.columnsWidth+"px"});const g=e.hide?"":`has-desktop-${e.layout}-layout`,k=e.hideTablet?"":`has-tablet-${e.layoutTablet}-layout`,v=e.hideMobile?"":`has-mobile-${e.layoutMobile}-layout`,y=s()(t,`has-${e.columns}-columns`,g,k,v,{"hide-in-desktop":e.hide},{"hide-in-tablet":e.hideTablet},{"hide-in-mobile":e.hideMobile},`has-${e.lcolumnsGap}-gap`,`has-vertical-${e.verticalAlign}`);return(0,c.createElement)(l,{className:y,id:e.id,style:d},(0,c.createElement)("div",{className:"wp-themeisle-block-overlay",style:b}),(0,c.createElement)(h,{type:"top",front:!0,style:e.dividerTopType,fill:e.dividerTopColor,invert:e.dividerTopInvert}),(0,c.createElement)("div",{className:"innerblocks-wrap",style:p},(0,c.createElement)(u.InnerBlocks.Content,null)),(0,c.createElement)(h,{type:"bottom",front:!0,style:e.dividerBottomType,fill:e.dividerBottomColor,invert:e.dividerBottomInvert}))}},{attributes:g,supports:{align:["wide","full"],html:!1},save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag;let o,a,r,n,i;if("color"===e.backgroundType&&(o={background:e.backgroundColor}),"image"===e.backgroundType&&(o={backgroundImage:`url( '${e.backgroundImageURL}' )`,backgroundAttachment:e.backgroundAttachment,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundSize:e.backgroundSize}),"gradient"===e.backgroundType){let t;t="linear"===e.backgroundGradientType?`${e.backgroundGradientAngle}deg`:`at ${e.backgroundGradientPosition}`,o={background:`${e.backgroundGradientType}-gradient( ${t}, ${e.backgroundGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientFirstLocation}%, ${e.backgroundGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientSecondLocation}% )`}}"linked"===e.borderType&&(r={borderWidth:`${e.border}px`,borderStyle:"solid",borderColor:e.borderColor}),"unlinked"===e.borderType&&(r={borderTopWidth:`${e.borderTop}px`,borderRightWidth:`${e.borderRight}px`,borderBottomWidth:`${e.borderBottom}px`,borderLeftWidth:`${e.borderLeft}px`,borderStyle:"solid",borderColor:e.borderColor}),"linked"===e.borderRadiusType&&(n={borderRadius:`${e.borderRadius}px`}),"unlinked"===e.borderRadiusType&&(n={borderTopLeftRadius:`${e.borderRadiusTop}px`,borderTopRightRadius:`${e.borderRadiusRight}px`,borderBottomRightRadius:`${e.borderRadiusBottom}px`,borderBottomLeftRadius:`${e.borderRadiusLeft}px`}),!0===e.boxShadow&&(i={boxShadow:`${e.boxShadowHorizontal}px ${e.boxShadowVertical}px ${e.boxShadowBlur}px ${e.boxShadowSpread}px ${m()(e.boxShadowColor?e.boxShadowColor:"#000000",e.boxShadowColorOpacity)}`});const d={...o,...r,...n,...i,justifyContent:e.horizontalAlign};if("color"===e.backgroundOverlayType&&(a={background:e.backgroundOverlayColor,opacity:e.backgroundOverlayOpacity/100}),"image"===e.backgroundOverlayType&&(a={backgroundImage:`url( '${e.backgroundOverlayImageURL}' )`,backgroundAttachment:e.backgroundOverlayAttachment,backgroundPosition:e.backgroundOverlayPosition,backgroundRepeat:e.backgroundOverlayRepeat,backgroundSize:e.backgroundOverlaySize,opacity:e.backgroundOverlayOpacity/100}),"gradient"===e.backgroundOverlayType){let t;t="linear"===e.backgroundOverlayGradientType?`${e.backgroundOverlayGradientAngle}deg`:`at ${e.backgroundOverlayGradientPosition}`,a={background:`${e.backgroundOverlayGradientType}-gradient( ${t}, ${e.backgroundOverlayGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientFirstLocation}%, ${e.backgroundOverlayGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientSecondLocation}% )`,opacity:e.backgroundOverlayOpacity/100}}const b={...a,mixBlendMode:e.backgroundOverlayBlend};let p={};e.columnsWidth&&(p={maxWidth:e.columnsWidth+"px"});const g=e.hide?"":`has-desktop-${e.layout}-layout`,k=e.hideTablet?"":`has-tablet-${e.layoutTablet}-layout`,v=e.hideMobile?"":`has-mobile-${e.layoutMobile}-layout`,y=s()(t,`has-${e.columns}-columns`,g,k,v,{"hide-in-desktop":e.hide},{"hide-in-tablet":e.hideTablet},{"hide-in-mobile":e.hideMobile},`has-${e.columnsGap}-gap`,`has-vertical-${e.verticalAlign}`);return(0,c.createElement)(l,{className:y,id:e.id,style:d},(0,c.createElement)("div",{className:"wp-themeisle-block-overlay",style:b}),(0,c.createElement)(h,{type:"top",front:!0,style:e.dividerTopType,fill:e.dividerTopColor,invert:e.dividerTopInvert}),(0,c.createElement)("div",{className:"innerblocks-wrap",style:p},(0,c.createElement)(u.InnerBlocks.Content,null)),(0,c.createElement)(h,{type:"bottom",front:!0,style:e.dividerBottomType,fill:e.dividerBottomColor,invert:e.dividerBottomInvert}))}},{attributes:{...g,paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},reverseColumnsTablet:{type:"boolean",default:!1},reverseColumnsMobile:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1},save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag,o=e.hide?"":`has-desktop-${e.layout}-layout`,a=e.hideTablet?"":`has-tablet-${e.layoutTablet}-layout`,r=e.hideMobile?"":`has-mobile-${e.layoutMobile}-layout`,n=s()(t,`has-${e.columns}-columns`,o,a,r,{"hide-in-desktop":e.hide},{"hide-in-tablet":e.hideTablet},{"hide-in-mobile":e.hideMobile},{"has-reverse-columns-tablet":e.reverseColumnsTablet&&!e.hideTablet&&"collapsedRows"===e.layoutTablet},{"has-reverse-columns-mobile":e.reverseColumnsMobile&&!e.hideMobile&&"collapsedRows"===e.layoutMobile},`has-${e.columnsGap}-gap`,`has-vertical-${e.verticalAlign}`);return(0,c.createElement)(l,{className:n,id:e.id},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay"}),(0,c.createElement)(k,{type:"top",front:!0,style:e.dividerTopType,fill:e.dividerTopColor,invert:e.dividerTopInvert}),(0,c.createElement)("div",{className:"innerblocks-wrap"},(0,c.createElement)(u.InnerBlocks.Content,null)),(0,c.createElement)(k,{type:"bottom",front:!0,style:e.dividerBottomType,fill:e.dividerBottomColor,invert:e.dividerBottomInvert}))}},{attributes:{...g,paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},reverseColumnsTablet:{type:"boolean",default:!1},reverseColumnsMobile:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1},migrate:e=>{let t="",l="";if("gradient"===e.backgroundType){let l="";"linear"===e.backgroundGradientType&&(l=`${e.backgroundGradientAngle}deg, `),t=`${e.backgroundGradientType}-gradient(${l}${m()(e.backgroundGradientFirstColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientFirstLocation}%, ${m()(e.backgroundGradientSecondColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientSecondLocation}%)`}if("gradient"===e.backgroundOverlayType){let t="";"linear"===e.backgroundOverlayGradientType&&(t=`${e.backgroundOverlayGradientAngle}deg, `),l=`${e.backgroundOverlayGradientType}-gradient(${t}${m()(e.backgroundOverlayGradientFirstColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientFirstLocation}%, ${m()(e.backgroundOverlayGradientSecondColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientSecondLocation}%)`}return{...{...(0,b.omit)(e,["backgroundGradientFirstColor","backgroundGradientFirstLocation","backgroundGradientSecondColor","backgroundGradientSecondLocation","backgroundGradientType","backgroundGradientAngle","backgroundGradientPosition","backgroundOverlayGradientFirstColor","backgroundOverlayGradientFirstLocation","backgroundOverlayGradientSecondColor","backgroundOverlayGradientSecondLocation","backgroundOverlayGradientType","backgroundOverlayGradientAngle","backgroundOverlayGradientPosition"]),backgroundGradient:t,backgroundOverlayGradient:l}}},isEligible:e=>"gradient"===e.backgroundType&&void 0!==e.backgroundGradientFirstColor||"gradient"===e.backgroundOverlayType&&void 0!==e.backgroundOverlayGradientFirstColor,save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag,o=e.hide?"":`has-desktop-${e.layout}-layout`,a=e.hideTablet?"":`has-tablet-${e.layoutTablet}-layout`,r=e.hideMobile?"":`has-mobile-${e.layoutMobile}-layout`,n=s()(t,`has-${e.columns}-columns`,o,a,r,{"hide-in-desktop":e.hide},{"hide-in-tablet":e.hideTablet},{"hide-in-mobile":e.hideMobile},{"has-reverse-columns-tablet":e.reverseColumnsTablet&&!e.hideTablet&&"collapsedRows"===e.layoutTablet},{"has-reverse-columns-mobile":e.reverseColumnsMobile&&!e.hideMobile&&"collapsedRows"===e.layoutMobile},`has-${e.columnsGap}-gap`,`has-vertical-${e.verticalAlign}`);return(0,c.createElement)(l,{className:n,id:e.id},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay"}),(0,c.createElement)(k,{type:"top",front:!0,style:e.dividerTopType,fill:e.dividerTopColor,invert:e.dividerTopInvert}),(0,c.createElement)("div",{className:"innerblocks-wrap"},(0,c.createElement)(u.InnerBlocks.Content,null)),(0,c.createElement)(k,{type:"bottom",front:!0,style:e.dividerBottomType,fill:e.dividerBottomColor,invert:e.dividerBottomInvert}))}}],y=l(4333),_=l(9818),w=l(7400),f=({attributes:e,setAttributes:t})=>(0,c.createElement)(u.BlockControls,null,(0,c.createElement)(u.BlockVerticalAlignmentToolbar,{onChange:l=>{e.verticalAlign===l?t({verticalAlign:"unset"}):"top"===l?t({verticalAlign:"flex-start"}):"bottom"===l&&t({verticalAlign:"flex-end"})},value:"flex-start"===e.verticalAlign?"top":"flex-end"===e.verticalAlign?"bottom":e.verticalAlign})),C=l(6778),E=l(9266),T=l(2372),x=l(6993),M=l(1430),S=l(2136),B=l(1661),z=({attributes:e,setAttributes:t,updateColumnsWidth:l,dividerViewType:a,setDividerViewType:r,changeColumnsNumbers:n})=>{const i=(0,_.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=!!e("core/edit-post")&&e("core/edit-post");return l?l():t()}),[]),[d,m]=(0,c.useState)("layout"),[b,g]=(0,c.useState)(!1);(0,c.useEffect)((()=>{b&&(6>=e.columns?l(e.columns,"equal"):6<e.columns?l(6,"equal"):1>=e.columns&&l(1,"equal"),g(!1))}),[e.columns]);let h=()=>{switch(i){case"Desktop":return e.paddingType;case"Tablet":return e.paddingTypeTablet;case"Mobile":return e.paddingTypeMobile;default:return}};h=h();const k={top:"paddingTop",right:"paddingRight",bottom:"paddingBottom",left:"paddingLeft"},v={top:"paddingTopTablet",right:"paddingRightTablet",bottom:"paddingBottomTablet",left:"paddingLeftTablet"},y={top:"paddingTopMobile",right:"paddingRightMobile",bottom:"paddingBottomMobile",left:"paddingLeftMobile"},w=t=>{if("top"==t)switch(i){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingTop;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingTopTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingTopMobile}else if("right"==t)switch(i){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingRight;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingRightTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingRightMobile}else if("bottom"==t)switch(i){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingBottom;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingBottomTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingBottomMobile}else if("left"==t)switch(i){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingLeft;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingLeftTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingLeftMobile}},f={top:"marginTop",bottom:"marginBottom"},z={top:"marginTopTablet",bottom:"marginBottomTablet"},P={top:"marginTopMobile",bottom:"marginBottomMobile"},N=t=>{if("top"==t)switch(i){case"Desktop":return"linked"===e.marginType?e.margin:e.marginTop;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginTopTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginTopMobile}else if("bottom"==t)switch(i){case"Desktop":return"linked"===e.marginType?e.margin:e.marginBottom;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginBottomTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginBottomMobile}},L=l=>{if(e.horizontalAlign===l)return t({horizontalAlign:"unset"});t({horizontalAlign:l})};let R=()=>{switch(i){case"Desktop":return e.columnsHeightCustom;case"Tablet":return e.columnsHeightCustomTablet;case"Mobile":return e.columnsHeightCustomMobile;default:return}};R=R();const V=()=>{t({backgroundImageID:"",backgroundImageURL:""})},H=()=>{t({backgroundOverlayImageID:"",backgroundOverlayImageURL:""})},I={top:"borderTop",right:"borderRight",bottom:"borderBottom",left:"borderLeft"},A=t=>{switch(t){case"top":return"linked"===e.borderType?e.border:e.borderTop;case"right":return"linked"===e.borderType?e.border:e.borderRight;case"bottom":return"linked"===e.borderType?e.border:e.borderBottom;case"left":return"linked"===e.borderType?e.border:e.borderLeft;default:return}},$={top:"borderRadiusTop",right:"borderRadiusRight",bottom:"borderRadiusBottom",left:"borderRadiusLeft"},O=t=>{switch(t){case"top":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusTop;case"right":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusRight;case"bottom":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusBottom;case"left":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusLeft;default:return}},G="top"==a?e.dividerTopType:"bottom"==a?e.dividerBottomType:void 0,D=()=>"top"==a?e.dividerTopColor:"bottom"==a?e.dividerBottomColor:void 0,Z=(e,l)=>{switch(l){case"Desktop":t({hide:e});break;case"Tablet":t({hideTablet:e});break;case"Mobile":t({hideMobile:e})}},F=(e,l)=>{"Tablet"===l?t({reverseColumnsTablet:e}):"Mobile"===l&&t({reverseColumnsMobile:e})};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(u.InspectorControls,null,(0,c.createElement)(p.PanelBody,{className:"wp-block-themeisle-blocks-advanced-columns-header-panel"},(0,c.createElement)(p.Button,{className:s()("header-tab",{"is-selected":"layout"===d}),onClick:()=>m("layout")},(0,c.createElement)("span",null,(0,c.createElement)(p.Dashicon,{icon:"editor-table"}),(0,o.__)("Layout","otter-blocks"))),(0,c.createElement)(p.Button,{className:s()("header-tab",{"is-selected":"style"===d}),onClick:()=>m("style")},(0,c.createElement)("span",null,(0,c.createElement)(p.Dashicon,{icon:"admin-customizer"}),(0,o.__)("Style","otter-blocks"))),(0,c.createElement)(p.Button,{className:s()("header-tab",{"is-selected":"advanced"===d}),onClick:()=>m("advanced")},(0,c.createElement)("span",null,(0,c.createElement)(p.Dashicon,{icon:"admin-generic"}),(0,o.__)("Advanced","otter-blocks")))),"layout"===d&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Columns & Layout","otter-blocks")},(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Columns","otter-blocks"),value:e.columns,onChange:e=>{6>=e&&t({layout:"equal",layoutTablet:"equal",layoutMobile:"collapsedRows"}),6<e&&t({layout:"equal",layoutTablet:"equal",layoutMobile:"collapsedRows"}),1>=e&&t({layout:"equal",layoutTablet:"equal",layoutMobile:"equal"}),n(e),g(!0)},min:1,max:6}),(0,c.createElement)(E.Z,{label:(0,o.__)("Layout","otter-blocks"),columns:e.columns,layout:e.layout,layoutTablet:e.layoutTablet,layoutMobile:e.layoutMobile,onClick:o=>{switch(i){case"Desktop":t({layout:o}),l(e.columns,o);break;case"Tablet":t({layoutTablet:o});break;case"Mobile":t({layoutMobile:o})}}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Columns Gap","otter-blocks"),value:e.columnsGap,options:[{label:(0,o.__)("Default (10px)","otter-blocks"),value:"default"},{label:(0,o.__)("No Gap","otter-blocks"),value:"nogap"},{label:(0,o.__)("Narrow (5px)","otter-blocks"),value:"narrow"},{label:(0,o.__)("Extended (15px)","otter-blocks"),value:"extended"},{label:(0,o.__)("Wide (20px)","otter-blocks"),value:"wide"},{label:(0,o.__)("Wider (30px)","otter-blocks"),value:"wider"}],onChange:e=>{t({columnsGap:e})}})),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Spacing","otter-blocks"),initialOpen:!1},(0,c.createElement)(x.Z,{label:(0,o.__)("Padding","otter-blocks")},(0,c.createElement)(T.Z,{type:h,min:0,max:500,changeType:e=>{switch(i){case"Desktop":t({paddingType:e});break;case"Tablet":t({paddingTypeTablet:e});break;case"Mobile":t({paddingTypeMobile:e})}},onChange:(l,o)=>{"Desktop"===i?"linked"===e.paddingType?t({padding:o}):t({[k[l]]:o}):"Tablet"===i?"linked"===e.paddingTypeTablet?t({paddingTablet:o}):t({[v[l]]:o}):"Mobile"===i&&("linked"===e.paddingTypeMobile?t({paddingMobile:o}):t({[y[l]]:o}))},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:w("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:w("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:w("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:w("left")}]})),(0,c.createElement)(x.Z,{label:(0,o.__)("Margin","otter-blocks")},(0,c.createElement)(T.Z,{type:(()=>{switch(i){case"Desktop":return e.marginType;case"Tablet":return e.marginTypeTablet;case"Mobile":return e.marginTypeMobile;default:return}})(),min:-500,max:500,changeType:e=>{switch(i){case"Desktop":t({marginType:e});break;case"Tablet":t({marginTypeTablet:e});break;case"Mobile":t({marginTypeMobile:e})}},onChange:(l,o)=>{"Desktop"===i?"linked"===e.marginType?t({margin:o}):t({[f[l]]:o}):"Tablet"===i?"linked"===e.marginTypeTablet?t({marginTablet:o}):t({[z[l]]:o}):"Mobile"===i&&("linked"===e.marginTypeMobile?t({marginMobile:o}):t({[P[l]]:o}))},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:N("top")},{label:(0,o.__)("Right","otter-blocks"),disabled:!0},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:N("bottom")},{label:(0,o.__)("Left","otter-blocks"),disabled:!0}]}))),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Section Structure","otter-blocks"),initialOpen:!1},(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Maximum Content Width","otter-blocks"),value:e.columnsWidth||"",onChange:e=>{(0<=e&&1200>=e||void 0===e)&&t({columnsWidth:e})},min:0,max:1800}),e.columnsWidth&&(0,c.createElement)(p.BaseControl,{label:(0,o.__)("Horizontal Align","otter-blocks")},(0,c.createElement)(p.ButtonGroup,{className:"wp-block-themeisle-icon-buttom-group"},(0,c.createElement)(p.Button,{icon:"editor-alignleft",label:(0,o.__)("Left","otter-blocks"),showTooltip:!0,isLarge:!0,isPrimary:"flex-start"===e.horizontalAlign,onClick:()=>L("flex-start")}),(0,c.createElement)(p.Button,{icon:"editor-aligncenter",label:(0,o.__)("Center","otter-blocks"),showTooltip:!0,isLarge:!0,isPrimary:"center"===e.horizontalAlign,onClick:()=>L("center")}),(0,c.createElement)(p.Button,{icon:"editor-alignright",label:(0,o.__)("Right","otter-blocks"),showTooltip:!0,isLarge:!0,isPrimary:"flex-end"===e.horizontalAlign,onClick:()=>L("flex-end")}))),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Minimum Height","otter-blocks"),value:e.columnsHeight,options:[{label:(0,o.__)("Default","otter-blocks"),value:"auto"},{label:(0,o.__)("Fit to Screen","otter-blocks"),value:"100vh"},{label:(0,o.__)("Custom","otter-blocks"),value:"custom"}],onChange:e=>{t({columnsHeight:e})}}),"custom"===e.columnsHeight&&(0,c.createElement)(x.Z,{label:(0,o.__)("Custom Height","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:R||"",onChange:e=>{switch(i){case"Desktop":t({columnsHeightCustom:e});break;case"Tablet":t({columnsHeightCustomTablet:e});break;case"Mobile":t({columnsHeightCustomMobile:e})}},min:0,max:1e3}))))||"style"===d&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Background Settings","otter-blocks"),className:"wp-block-themeisle-image-container"},(0,c.createElement)(M.Z,{label:(0,o.__)("Background Type","otter-blocks"),backgroundType:e.backgroundType,changeBackgroundType:e=>{t({backgroundType:e})}}),"color"===e.backgroundType&&(0,c.createElement)(C.Z,{label:(0,o.__)("Background Color","otter-blocks"),colorValue:e.backgroundColor},(0,c.createElement)(u.ColorPalette,{label:(0,o.__)("Background Color","otter-blocks"),value:e.backgroundColor,onChange:e=>{t({backgroundColor:e})}}))||"image"===e.backgroundType&&(e.backgroundImageURL?(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-body"},(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-area"},(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-holder",style:{backgroundImage:`url('${e.backgroundImageURL}')`}}),(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-delete",onClick:V},(0,c.createElement)(p.Dashicon,{icon:"trash"}),(0,c.createElement)("span",null,(0,o.__)("Remove Image","otter-blocks"))))),(0,c.createElement)(p.Button,{isSecondary:!0,className:"wp-block-themeisle-image-container-delete-button",onClick:V},(0,o.__)("Change or Remove Image","otter-blocks")),(0,c.createElement)(S.Z,{label:(0,o.__)("Background Settings","otter-blocks")},(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Attachment","otter-blocks"),value:e.backgroundAttachment,options:[{label:(0,o.__)("Scroll","otter-blocks"),value:"scroll"},{label:(0,o.__)("Fixed","otter-blocks"),value:"fixed"},{label:(0,o.__)("Local","otter-blocks"),value:"local"}],onChange:e=>{t({backgroundAttachment:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Position","otter-blocks"),value:e.backgroundPosition,options:[{label:(0,o.__)("Default","otter-blocks"),value:"top left"},{label:(0,o.__)("Top Left","otter-blocks"),value:"top left"},{label:(0,o.__)("Top Center","otter-blocks"),value:"top center"},{label:(0,o.__)("Top Right","otter-blocks"),value:"top right"},{label:(0,o.__)("Center Left","otter-blocks"),value:"center left"},{label:(0,o.__)("Center Center","otter-blocks"),value:"center center"},{label:(0,o.__)("Center Right","otter-blocks"),value:"center right"},{label:(0,o.__)("Bottom Left","otter-blocks"),value:"bottom left"},{label:(0,o.__)("Bottom Center","otter-blocks"),value:"bottom center"},{label:(0,o.__)("Bottom Right","otter-blocks"),value:"bottom right"}],onChange:e=>{t({backgroundPosition:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Repeat","otter-blocks"),value:e.backgroundRepeat,options:[{label:(0,o.__)("Repeat","otter-blocks"),value:"repeat"},{label:(0,o.__)("No-repeat","otter-blocks"),value:"no-repeat"}],onChange:e=>{t({backgroundRepeat:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Size","otter-blocks"),value:e.backgroundSize,options:[{label:(0,o.__)("Auto","otter-blocks"),value:"auto"},{label:(0,o.__)("Cover","otter-blocks"),value:"cover"},{label:(0,o.__)("Contain","otter-blocks"),value:"contain"}],onChange:e=>{t({backgroundSize:e})}}))):(0,c.createElement)(u.MediaPlaceholder,{icon:"format-image",labels:{title:(0,o.__)("Background Image","otter-blocks"),name:(0,o.__)("an image","otter-blocks")},value:e.backgroundImageID,onSelect:e=>{t({backgroundImageID:e.id,backgroundImageURL:e.url})},accept:"image/*",allowedTypes:["image"]}))||"gradient"===e.backgroundType&&(0,c.createElement)(u.__experimentalColorGradientControl,{label:(0,o.__)("Background Gradient","otter-blocks"),gradientValue:e.backgroundGradient,disableCustomColors:!0,onGradientChange:e=>{t({backgroundGradient:e})},clearable:!1})),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Background Overlay","otter-blocks"),className:"wp-block-themeisle-image-container",initialOpen:!1},(0,c.createElement)(M.Z,{label:(0,o.__)("Overlay Type","otter-blocks"),backgroundType:e.backgroundOverlayType,changeBackgroundType:e=>{t({backgroundOverlayType:e})}}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Overlay Opacity","otter-blocks"),value:e.backgroundOverlayOpacity,onChange:e=>{t({backgroundOverlayOpacity:e})},min:0,max:100}),"color"===e.backgroundOverlayType&&(0,c.createElement)(C.Z,{label:(0,o.__)("Overlay Color","otter-blocks"),colorValue:e.backgroundOverlayColor},(0,c.createElement)(u.ColorPalette,{label:(0,o.__)("Overlay Color","otter-blocks"),value:e.backgroundOverlayColor,onChange:e=>{t({backgroundOverlayColor:e})}}))||"image"===e.backgroundOverlayType&&(e.backgroundOverlayImageURL?(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-body"},(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-area"},(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-holder",style:{backgroundImage:`url('${e.backgroundOverlayImageURL}')`}}),(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-delete",onClick:H},(0,c.createElement)(p.Dashicon,{icon:"trash"}),(0,c.createElement)("span",null,(0,o.__)("Remove Image","otter-blocks"))))),(0,c.createElement)(p.Button,{isSecondary:!0,className:"wp-block-themeisle-image-container-delete-button",onClick:H},(0,o.__)("Change or Remove Image","otter-blocks")),(0,c.createElement)(S.Z,{label:(0,o.__)("Background Settings","otter-blocks")},(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Attachment","otter-blocks"),value:e.backgroundOverlayAttachment,options:[{label:(0,o.__)("Scroll","otter-blocks"),value:"scroll"},{label:(0,o.__)("Fixed","otter-blocks"),value:"fixed"},{label:(0,o.__)("Local","otter-blocks"),value:"local"}],onChange:e=>{t({backgroundOverlayAttachment:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Position","otter-blocks"),value:e.backgroundOverlayPosition,options:[{label:(0,o.__)("Default","otter-blocks"),value:"top left"},{label:(0,o.__)("Top Left","otter-blocks"),value:"top left"},{label:(0,o.__)("Top Center","otter-blocks"),value:"top center"},{label:(0,o.__)("Top Right","otter-blocks"),value:"top right"},{label:(0,o.__)("Center Left","otter-blocks"),value:"center left"},{label:(0,o.__)("Center Center","otter-blocks"),value:"center center"},{label:(0,o.__)("Center Right","otter-blocks"),value:"center right"},{label:(0,o.__)("Bottom Left","otter-blocks"),value:"bottom left"},{label:(0,o.__)("Bottom Center","otter-blocks"),value:"bottom center"},{label:(0,o.__)("Bottom Right","otter-blocks"),value:"bottom right"}],onChange:e=>{t({backgroundOverlayPosition:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Repeat","otter-blocks"),value:e.backgroundOverlayRepeat,options:[{label:(0,o.__)("Repeat","otter-blocks"),value:"repeat"},{label:(0,o.__)("No-repeat","otter-blocks"),value:"no-repeat"}],onChange:e=>{t({backgroundOverlayRepeat:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Size","otter-blocks"),value:e.backgroundOverlaySize,options:[{label:(0,o.__)("Auto","otter-blocks"),value:"auto"},{label:(0,o.__)("Cover","otter-blocks"),value:"cover"},{label:(0,o.__)("Contain","otter-blocks"),value:"contain"}],onChange:e=>{t({backgroundOverlaySize:e})}}))):(0,c.createElement)(u.MediaPlaceholder,{icon:"format-image",labels:{title:(0,o.__)("Background Image","otter-blocks"),name:(0,o.__)("an image","otter-blocks")},value:e.backgroundOverlayImageID,onSelect:e=>{t({backgroundOverlayImageID:e.id,backgroundOverlayImageURL:e.url})},accept:"image/*",allowedTypes:["image"]}))||"gradient"===e.backgroundOverlayType&&(0,c.createElement)(u.__experimentalColorGradientControl,{label:(0,o.__)("Background Gradient","otter-blocks"),gradientValue:e.backgroundOverlayGradient,disableCustomColors:!0,onGradientChange:e=>{t({backgroundOverlayGradient:e})},clearable:!1}),(0,c.createElement)(S.Z,{label:(0,o.__)("CSS Filters","otter-blocks")},(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:e.backgroundOverlayFilterBlur,onChange:e=>{t({backgroundOverlayFilterBlur:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Brightness","otter-blocks"),value:e.backgroundOverlayFilterBrightness,onChange:e=>{t({backgroundOverlayFilterBrightness:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Contrast","otter-blocks"),value:e.backgroundOverlayFilterContrast,onChange:e=>{t({backgroundOverlayFilterContrast:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Grayscale","otter-blocks"),value:e.backgroundOverlayFilterGrayscale,onChange:e=>{t({backgroundOverlayFilterGrayscale:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Hue","otter-blocks"),value:e.backgroundOverlayFilterHue,onChange:e=>{t({backgroundOverlayFilterHue:e})},min:0,max:360}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Saturation","otter-blocks"),value:e.backgroundOverlayFilterSaturate,onChange:e=>{t({backgroundOverlayFilterSaturate:e})},min:0,max:100})),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Blend Mode","otter-blocks"),value:e.backgroundOverlayBlend,options:[{label:(0,o.__)("Normal","otter-blocks"),value:"normal"},{label:(0,o.__)("Multiply","otter-blocks"),value:"multiply"},{label:(0,o.__)("Screen","otter-blocks"),value:"screen"},{label:(0,o.__)("Overlay","otter-blocks"),value:"overlay"},{label:(0,o.__)("Darken","otter-blocks"),value:"darken"},{label:(0,o.__)("Lighten","otter-blocks"),value:"lighten"},{label:(0,o.__)("Color Dodge","otter-blocks"),value:"color-dodge"},{label:(0,o.__)("Color Burn","otter-blocks"),value:"color-burn"},{label:(0,o.__)("Hard Light","otter-blocks"),value:"hard-light"},{label:(0,o.__)("Soft Light","otter-blocks"),value:"soft-light"},{label:(0,o.__)("Difference","otter-blocks"),value:"difference"},{label:(0,o.__)("Exclusion","otter-blocks"),value:"exclusion"},{label:(0,o.__)("Hue","otter-blocks"),value:"hue"},{label:(0,o.__)("Saturation","otter-blocks"),value:"saturation"},{label:(0,o.__)("Color","otter-blocks"),value:"color"},{label:(0,o.__)("Luminosity","otter-blocks"),value:"luminosity"}],onChange:e=>{t({backgroundOverlayBlend:e})}})),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Border","otter-blocks"),className:"wp-block-themeisle-border-container",initialOpen:!1},(0,c.createElement)(T.Z,{label:(0,o.__)("Border Width","otter-blocks"),type:e.borderType,min:0,max:500,changeType:e=>{t({borderType:e})},onChange:(l,o)=>{"linked"===e.borderType?t({border:o}):t({[I[l]]:o})},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:A("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:A("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:A("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:A("left")}]}),(0,c.createElement)(C.Z,{label:(0,o.__)("Border Color","otter-blocks"),colorValue:e.borderColor},(0,c.createElement)(u.ColorPalette,{label:(0,o.__)("Border Color","otter-blocks"),value:e.borderColor,onChange:e=>{t({borderColor:e})}})),(0,c.createElement)(T.Z,{label:(0,o.__)("Border Radius","otter-blocks"),type:e.borderRadiusType,min:0,max:500,changeType:e=>{t({borderRadiusType:e})},onChange:(l,o)=>{"linked"===e.borderRadiusType?t({borderRadius:o}):t({[$[l]]:o})},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:O("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:O("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:O("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:O("left")}]}),(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Box Shadow","otter-blocks"),checked:e.boxShadow,onChange:()=>{t({boxShadow:!e.boxShadow})}}),e.boxShadow&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(C.Z,{label:(0,o.__)("Shadow Color","otter-blocks"),colorValue:e.boxShadowColor},(0,c.createElement)(u.ColorPalette,{label:(0,o.__)("Shadow Color","otter-blocks"),value:e.boxShadowColor,onChange:e=>{t({boxShadowColor:e})}})),(0,c.createElement)(S.Z,{label:(0,o.__)("Border Shadow","otter-blocks")},(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:e.boxShadowColorOpacity,onChange:e=>{t({boxShadowColorOpacity:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:e.boxShadowBlur,onChange:e=>{t({boxShadowBlur:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Spread","otter-blocks"),value:e.boxShadowSpread,onChange:e=>{t({boxShadowSpread:e})},min:-100,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:e.boxShadowHorizontal,onChange:e=>{t({boxShadowHorizontal:e})},min:-100,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:e.boxShadowVertical,onChange:e=>{t({boxShadowVertical:e})},min:-100,max:100})))),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Shape Divider","otter-blocks"),initialOpen:!1,className:"wp-block-themeisle-shape-divider"},(0,c.createElement)(p.ButtonGroup,null,(0,c.createElement)(p.Button,{isSmall:!0,isSecondary:"top"!==a,isPrimary:"top"===a,onClick:()=>r("top")},(0,o.__)("Top","otter-blocks")),(0,c.createElement)(p.Button,{isSmall:!0,isSecondary:"bottom"!==a,isPrimary:"bottom"===a,onClick:()=>r("bottom")},(0,o.__)("Bottom","otter-blocks"))),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Type","otter-blocks"),value:G,options:[{label:(0,o.__)("None","otter-blocks"),value:"none"},{label:(0,o.__)("Triangle","otter-blocks"),value:"bigTriangle"},{label:(0,o.__)("Right Curve","otter-blocks"),value:"rightCurve"},{label:(0,o.__)("Curve","otter-blocks"),value:"curve"},{label:(0,o.__)("Slant","otter-blocks"),value:"slant"},{label:(0,o.__)("Cloud","otter-blocks"),value:"cloud"}],onChange:e=>{"top"==a?t({dividerTopType:e}):"bottom"==a&&t({dividerBottomType:e})}}),"none"!==G&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(C.Z,{label:(0,o.__)("Color","otter-blocks"),colorValue:D()},(0,c.createElement)(u.ColorPalette,{label:(0,o.__)("Color","otter-blocks"),value:D(),onChange:e=>{"top"==a?t({dividerTopColor:e}):"bottom"==a&&t({dividerBottomColor:e})}})),(0,c.createElement)(x.Z,{label:(0,o.__)("Width","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:(()=>{if("top"==a)switch(i){case"Desktop":return e.dividerTopWidth;case"Tablet":return e.dividerTopWidthTablet;case"Mobile":return e.dividerTopWidthMobile}else if("bottom"==a)switch(i){case"Desktop":return e.dividerBottomWidth;case"Tablet":return e.dividerBottomWidthTablet;case"Mobile":return e.dividerBottomWidthMobile}})(),onChange:e=>{if("top"==a)switch(i){case"Desktop":t({dividerTopWidth:e});break;case"Tablet":t({dividerTopWidthTablet:e});break;case"Mobile":t({dividerTopWidthMobile:e})}else if("bottom"==a)switch(i){case"Desktop":t({dividerBottomWidth:e});break;case"Tablet":t({dividerBottomWidthTablet:e});break;case"Mobile":t({dividerBottomWidthMobile:e})}},min:0,max:500})),(0,c.createElement)(x.Z,{label:(0,o.__)("Height","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:(()=>{if("top"==a)switch(i){case"Desktop":return e.dividerTopHeight;case"Tablet":return e.dividerTopHeightTablet;case"Mobile":return e.dividerTopHeightMobile}else if("bottom"==a)switch(i){case"Desktop":return e.dividerBottomHeight;case"Tablet":return e.dividerBottomHeightTablet;case"Mobile":return e.dividerBottomHeightMobile}})(),onChange:e=>{if("top"==a)switch(i){case"Desktop":t({dividerTopHeight:e});break;case"Tablet":t({dividerTopHeightTablet:e});break;case"Mobile":t({dividerTopHeightMobile:e})}else if("bottom"==a)switch(i){case"Desktop":t({dividerBottomHeight:e});break;case"Tablet":t({dividerBottomHeightTablet:e});break;case"Mobile":t({dividerBottomHeightMobile:e})}},min:0,max:500})),"curve"!==G&&"cloud"!==G&&(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Invert Shape Divider","otter-blocks"),checked:(()=>{switch(a){case"top":return e.dividerTopInvert;case"bottom":return e.dividerBottomInvert;default:return}})(),onChange:()=>{switch(a){case"top":t({dividerTopInvert:!e.dividerTopInvert});break;case"bottom":t({dividerBottomInvert:!e.dividerBottomInvert})}}}))))||"advanced"===d&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Responsive","otter-blocks")},(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Hide this section on Desktop devices?","otter-blocks"),checked:e.hide,onChange:e=>Z(e,"Desktop")}),(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Hide this section on Tablet devices?","otter-blocks"),checked:e.hideTablet,onChange:e=>Z(e,"Tablet")}),(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Hide this section on Mobile devices?","otter-blocks"),checked:e.hideMobile,onChange:e=>Z(e,"Mobile")}),(0,c.createElement)("hr",null),!e.hideTablet&&"collapsedRows"===e.layoutTablet&&(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Reverse Columns in Tablet devices?","otter-blocks"),checked:e.reverseColumnsTablet,onChange:e=>F(e,"Tablet")}),!e.hideMobile&&"collapsedRows"===e.layoutMobile&&(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Reverse Columns in Mobile devices?","otter-blocks"),checked:e.reverseColumnsMobile,onChange:e=>F(e,"Mobile")})),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Section Settings","otter-blocks"),initialOpen:!1},(0,c.createElement)(p.SelectControl,{label:(0,o.__)("HTML Tag","otter-blocks"),value:e.columnsHTMLTag,options:[{label:(0,o.__)("Default (div)","otter-blocks"),value:"div"},{label:"section",value:"section"},{label:"header",value:"header"},{label:"footer",value:"footer"},{label:"article",value:"article"},{label:"main",value:"main"}],onChange:e=>{t({columnsHTMLTag:e})}})))),(0,c.createElement)(B.Z,{value:e.id,onChange:e=>{t({id:e})}}))},P=({clientId:e})=>{const{block:t,selectedBlockClientId:l}=(0,_.useSelect)((t=>{const{getSelectedBlockClientId:l,getBlock:o}=t("core/block-editor");return{block:o(e),selectedBlockClientId:l()}}),[]),{selectBlock:a}=(0,_.useDispatch)("core/block-editor"),[n,i]=(0,c.useState)(!1),s=u.__experimentalBlockNavigationList||u.__experimentalBlockNavigationTree;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(u.BlockControls,null,(0,c.createElement)(p.Toolbar,null,(0,c.createElement)(p.Button,{className:"components-toolbar__control",label:(0,o.__)("Open block navigator","otter-blocks"),showTooltip:!0,onClick:()=>i(!0),icon:r.Hg}))),n&&(0,c.createElement)(p.Modal,{title:(0,o.__)("Block Navigator","otter-blocks"),closeLabel:(0,o.__)("Close","otter-blocks"),onRequestClose:()=>i(!1)},(0,c.createElement)(s,{blocks:[t],selectedBlockClientId:l,selectBlock:a,showNestedBlocks:!0})))},N=l(2902),L=l(5225),R=l(5581),V=[{name:"themeisle-blocks/section-columns-1",description:(0,o.__)("Single column","otter-blocks"),icon:r.Kt,title:(0,o.__)("Full","otter-blocks"),attributes:{columns:1,layout:"equal",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"100"}]],scope:["block"],isDefault:!0},{name:"themeisle-blocks/section-columns-equal",description:(0,o.__)("2 equal columns","otter-blocks"),icon:r.nt,title:(0,o.__)("1:1","otter-blocks"),attributes:{columns:2,layout:"equal",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"50"}],["themeisle-blocks/advanced-column",{columnWidth:"50"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-1-2",description:(0,o.__)("1:2 columns","otter-blocks"),icon:r.Tt,title:(0,o.__)("1:2","otter-blocks"),attributes:{columns:2,layout:"oneTwo",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"33.34"}],["themeisle-blocks/advanced-column",{columnWidth:"66.66"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-2-1",description:(0,o.__)("2:1 columns","otter-blocks"),icon:r.eI,title:(0,o.__)("2:1","otter-blocks"),attributes:{columns:2,layout:"twoOne",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"66.66"}],["themeisle-blocks/advanced-column",{columnWidth:"33.33"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-equal-3",description:(0,o.__)("3 equal columns","otter-blocks"),icon:r.Np,title:(0,o.__)("1:1:1","otter-blocks"),attributes:{columns:3,layout:"equal",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"33.33"}],["themeisle-blocks/advanced-column",{columnWidth:"33.33"}],["themeisle-blocks/advanced-column",{columnWidth:"33.33"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-1-1-2",description:(0,o.__)("1:1:2 columns","otter-blocks"),icon:r.TS,title:(0,o.__)("1:1:2","otter-blocks"),attributes:{columns:3,layout:"oneOneTwo",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"50"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-2-1-1",description:(0,o.__)("2:1:1 columns","otter-blocks"),icon:r.Gg,title:(0,o.__)("2:1:1","otter-blocks"),attributes:{columns:3,layout:"twoOneOne",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"50"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-equal-4",description:(0,o.__)("4 equal columns","otter-blocks"),icon:r.Qd,title:(0,o.__)("1:1:1:1","otter-blocks"),attributes:{columns:4,layout:"equal",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}]],scope:["block"]}];(0,a.registerBlockType)("themeisle-blocks/advanced-columns",{title:(0,o.__)("Section","otter-blocks"),description:(0,o.__)("Add a Section block that displays content in multiple columns, then add whatever content blocks you’d like.","otter-blocks"),icon:r.b8,category:"themeisle-blocks",keywords:["advanced columns","layout","grid"],attributes:n,supports:{align:["wide","full"],html:!1},deprecated:v,variations:V,edit:({attributes:e,setAttributes:t,className:l,clientId:r,name:i})=>{(0,c.useEffect)((()=>{const t=(0,L.WX)(r,n);return()=>t(e.id)}),[e.id]);const{updateBlockAttributes:d,replaceInnerBlocks:g}=(0,_.useDispatch)("core/block-editor"),{sectionBlock:h,isViewportAvailable:k,isPreviewDesktop:v,isPreviewTablet:C,isPreviewMobile:E,children:T,variations:x,defaultVariation:M}=(0,_.useSelect)((e=>{const{getBlock:t}=e("core/block-editor"),{getBlockVariations:l,getBlockType:o,getDefaultBlockVariation:a}=e("core/blocks"),{__experimentalGetPreviewDeviceType:n}=!!e("core/edit-post")&&e("core/edit-post"),c=t(r);return{sectionBlock:c,children:c.innerBlocks,isViewportAvailable:!!n,isPreviewDesktop:!!n&&"Desktop"===n(),isPreviewTablet:!!n&&"Tablet"===n(),isPreviewMobile:!!n&&"Mobile"===n(),blockType:o(i),defaultVariation:a(i,"block"),variations:l(i,"block").filter((({isDefault:e})=>!e))}}),[]),{insertBlock:S,removeBlock:B}=(0,_.useDispatch)("core/block-editor");(0,c.useEffect)((()=>{e.columns!==T.length&&t({columns:T.length})}),[T]);const V=(0,y.useViewportMatch)("large",">="),H=(0,y.useViewportMatch)("large","<="),I=(0,y.useViewportMatch)("small",">="),A=(0,y.useViewportMatch)("small","<=");let $=V&&!H&&I&&!A,O=!V&&!H&&I&&!A,G=!(V||H||I||A);k&&!G&&($=v,O=C,G=E);const[D,Z]=(0,c.useState)("top"),F=({mobile:e,tablet:t,desktop:l})=>G&&e||O&&t||$&&l||void 0,W=F({mobile:e.dividerTopWidthMobile,tablet:e.dividerTopWidthTablet,desktop:e.dividerTopWidth}),q=F({mobile:e.dividerBottomWidthMobile,tablet:e.dividerBottomWidthTablet,desktop:e.dividerBottomWidth}),U=F({mobile:e.dividerTopHeightMobile,tablet:e.dividerTopHeightTablet,desktop:e.dividerTopHeight}),j=F({mobile:e.dividerBottomHeightMobile,tablet:e.dividerBottomHeightTablet,desktop:e.dividerBottomHeight}),K=e.columnsHTMLTag;let Q,X,Y,J,ee,te;$?Q={paddingTop:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingTop}px`,paddingRight:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingRight}px`,paddingBottom:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingBottom}px`,paddingLeft:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingLeft}px`,marginTop:"linked"===e.marginType?`${e.margin}px`:`${e.marginTop}px`,marginBottom:"linked"===e.marginType?`${e.margin}px`:`${e.marginBottom}px`,minHeight:"custom"===e.columnsHeight?`${e.columnsHeightCustom}px`:e.columnsHeight}:O?Q={paddingTop:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingTopTablet}px`,paddingRight:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingRightTablet}px`,paddingBottom:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingBottomTablet}px`,paddingLeft:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingLeftTablet}px`,marginTop:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginTopTablet}px`,marginBottom:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginBottomTablet}px`,minHeight:"custom"===e.columnsHeight?`${e.columnsHeightCustomTablet}px`:e.columnsHeight}:G&&(Q={paddingTop:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingTopMobile}px`,paddingRight:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingRightMobile}px`,paddingBottom:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingBottomMobile}px`,paddingLeft:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingLeftMobile}px`,marginTop:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginTopMobile}px`,marginBottom:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginBottomMobile}px`,minHeight:"custom"===e.columnsHeight?`${e.columnsHeightCustomMobile}px`:e.columnsHeight}),"color"===e.backgroundType&&(X={background:e.backgroundColor}),"image"===e.backgroundType&&(X={backgroundImage:`url( '${e.backgroundImageURL}' )`,backgroundAttachment:e.backgroundAttachment,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundSize:e.backgroundSize}),"gradient"===e.backgroundType&&(X={background:e.backgroundGradient}),"linked"===e.borderType&&(J={borderWidth:`${e.border}px`,borderStyle:"solid",borderColor:e.borderColor}),"unlinked"===e.borderType&&(J={borderTopWidth:`${e.borderTop}px`,borderRightWidth:`${e.borderRight}px`,borderBottomWidth:`${e.borderBottom}px`,borderLeftWidth:`${e.borderLeft}px`,borderStyle:"solid",borderColor:e.borderColor}),"linked"===e.borderRadiusType&&(ee={borderRadius:`${e.borderRadius}px`}),"unlinked"===e.borderRadiusType&&(ee={borderTopLeftRadius:`${e.borderRadiusTop}px`,borderTopRightRadius:`${e.borderRadiusRight}px`,borderBottomRightRadius:`${e.borderRadiusBottom}px`,borderBottomLeftRadius:`${e.borderRadiusLeft}px`}),!0===e.boxShadow&&(te={boxShadow:`${e.boxShadowHorizontal}px ${e.boxShadowVertical}px ${e.boxShadowBlur}px ${e.boxShadowSpread}px ${m()(e.boxShadowColor?e.boxShadowColor:"#000000",e.boxShadowColorOpacity)}`});const le={...Q,...X,...J,...ee,...te};"color"===e.backgroundOverlayType&&(Y={background:e.backgroundOverlayColor,opacity:e.backgroundOverlayOpacity/100}),"image"===e.backgroundOverlayType&&(Y={backgroundImage:`url( '${e.backgroundOverlayImageURL}' )`,backgroundAttachment:e.backgroundOverlayAttachment,backgroundPosition:e.backgroundOverlayPosition,backgroundRepeat:e.backgroundOverlayRepeat,backgroundSize:e.backgroundOverlaySize,opacity:e.backgroundOverlayOpacity/100}),"gradient"===e.backgroundOverlayType&&(Y={background:e.backgroundOverlayGradient,opacity:e.backgroundOverlayOpacity/100});const oe={...Y,...ee,mixBlendMode:e.backgroundOverlayBlend,filter:`blur( ${e.backgroundOverlayFilterBlur/10}px ) brightness( ${e.backgroundOverlayFilterBrightness/10} ) contrast( ${e.backgroundOverlayFilterContrast/10} ) grayscale( ${e.backgroundOverlayFilterGrayscale/100} ) hue-rotate( ${e.backgroundOverlayFilterHue}deg ) saturate( ${e.backgroundOverlayFilterSaturate/10} )`};let ae={};e.columnsWidth&&(ae={maxWidth:e.columnsWidth+"px"});const re=s()(l,`has-${e.columns}-columns`,`has-desktop-${e.layout}-layout`,`has-tablet-${e.layoutTablet}-layout`,`has-mobile-${e.layoutMobile}-layout`,`has-${e.columnsGap}-gap`,`has-vertical-${e.verticalAlign}`,`has-horizontal-${e.horizontalAlign}`,{"has-reverse-columns-tablet":e.reverseColumnsTablet&&!e.hideTablet&&"collapsedRows"===e.layoutTablet},{"has-reverse-columns-mobile":e.reverseColumnsMobile&&!e.hideMobile&&"collapsedRows"===e.layoutMobile},{"has-viewport-desktop":$},{"has-viewport-tablet":O},{"has-viewport-mobile":G}),[ne,ce]=(0,c.useState)(!1);return e.columns?(0,c.createElement)("div",null,(0,c.createElement)(P,{clientId:r}),(0,c.createElement)(f,{attributes:e,setAttributes:t}),(0,c.createElement)(z,{attributes:e,setAttributes:t,updateColumnsWidth:(e,t)=>{h.innerBlocks.map(((l,o)=>{d(l.clientId,{columnWidth:w.Z[e][t][o]})}))},dividerViewType:D,setDividerViewType:Z,changeColumnsNumbers:t=>{e.columns<t?(0,b.times)(t-e.columns,(()=>{const e=(0,a.createBlock)("themeisle-blocks/advanced-column");e&&S(e,(null==T?void 0:T.length)||0,r,!1)})):e.columns>t&&T.slice(t).forEach((e=>B(e.clientId,!1)))}}),(0,c.createElement)(K,{className:re,id:e.id,style:le},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay",style:oe}),(0,c.createElement)(N.Z,{type:"top",style:e.dividerTopType,fill:e.dividerTopColor,invert:e.dividerTopInvert,width:W,height:U}),(0,c.createElement)("div",{className:"innerblocks-wrap",style:ae},(0,c.createElement)(u.InnerBlocks,{allowedBlocks:["themeisle-blocks/advanced-column"],orientation:"horizontal"})),(0,c.createElement)(N.Z,{type:"bottom",style:e.dividerBottomType,fill:e.dividerBottomColor,invert:e.dividerBottomInvert,width:q,height:j}))):(0,c.createElement)(p.Placeholder,{label:(0,o.__)("Section","otter-blocks"),instructions:(0,o.__)("Select a layout to start with, or make one yourself.","otter-blocks"),className:"otter-section-layout-picker"},(0,c.createElement)(u.__experimentalBlockVariationPicker,{variations:x,onSelect:(e=M)=>{e&&(g(r,(0,a.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0),t(e.attributes))},allowSkip:!0}),(0,c.createElement)(p.Tooltip,{text:(0,o.__)("Open Template Library","otter-blocks")},(0,c.createElement)(p.Button,{isPrimary:!0,isLarge:!0,className:"wp-block-themeisle-template-library",onClick:()=>ce(!0)},(0,c.createElement)(p.Dashicon,{icon:"category"}),(0,o.__)("Template Library","otter-blocks")),ne&&(0,c.createElement)(R.Z,{clientId:r,close:()=>ce(!1)})))},save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag,o=e.hide?"":`has-desktop-${e.layout}-layout`,a=e.hideTablet?"":`has-tablet-${e.layoutTablet}-layout`,r=e.hideMobile?"":`has-mobile-${e.layoutMobile}-layout`,n=s()(t,`has-${e.columns}-columns`,o,a,r,{"hide-in-desktop":e.hide},{"hide-in-tablet":e.hideTablet},{"hide-in-mobile":e.hideMobile},{"has-reverse-columns-tablet":e.reverseColumnsTablet&&!e.hideTablet&&"collapsedRows"===e.layoutTablet},{"has-reverse-columns-mobile":e.reverseColumnsMobile&&!e.hideMobile&&"collapsedRows"===e.layoutMobile},`has-${e.columnsGap}-gap`,`has-vertical-${e.verticalAlign}`);return(0,c.createElement)(l,{className:n,id:e.id},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay"}),(0,c.createElement)(N.Z,{type:"top",front:!0,style:e.dividerTopType,fill:e.dividerTopColor,invert:e.dividerTopInvert}),(0,c.createElement)("div",{className:"innerblocks-wrap"},(0,c.createElement)(u.InnerBlocks.Content,null)),(0,c.createElement)(N.Z,{type:"bottom",front:!0,style:e.dividerBottomType,fill:e.dividerBottomColor,invert:e.dividerBottomInvert}))}})},1430:function(e,t,l){var o=l(9307),a=l(5736),r=l(5609),n=l(4333),c=l(340);const i=({label:e,backgroundType:t,changeBackgroundType:l})=>{const s=`inspector-background-control-${(0,n.useInstanceId)(i)}`;return(0,o.createElement)("div",{id:s,className:"components-base-control wp-block-themeisle-blocks-advanced-columns-background-control"},(0,o.createElement)("div",{className:"components-base-control__field"},(0,o.createElement)("div",{className:"components-base-control__title"},(0,o.createElement)("label",{className:"components-base-control__label"},e),(0,o.createElement)(r.ButtonGroup,{className:"linking-controls"},(0,o.createElement)(r.Button,{icon:"admin-customizer",label:(0,a.__)("Color","otter-blocks"),showTootlip:!0,isPrimary:"color"===t,onClick:()=>l("color")}),(0,o.createElement)(r.Button,{icon:"format-image",label:(0,a.__)("Image","otter-blocks"),showTootlip:!0,isPrimary:"image"===t,onClick:()=>l("image")}),(0,o.createElement)(r.Button,{icon:()=>(0,o.createElement)(r.Icon,{icon:c.Ew}),label:(0,a.__)("Gradient","otter-blocks"),showTootlip:!0,isPrimary:"gradient"===t,onClick:()=>l("gradient")})))))};t.Z=i},9266:function(e,t,l){var o=l(9307),a=l(4184),r=l.n(a),n=l(5736),c=l(5609),i=l(9818),s=l(6993),d=l(340);t.Z=({label:e,onClick:t,layout:l,layoutTablet:a,layoutMobile:m,columns:b})=>{const u=(0,i.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=!!e("core/edit-post")&&e("core/edit-post");return l?l():t()}),[]);let p;return"Desktop"===u?p=l:"Tablet"===u?p=a:"Mobile"===u&&(p=m),(0,o.createElement)(s.Z,{label:e,className:"wp-block-themeisle-blocks-advanced-columns-layout-control"},1===b&&(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Single Row","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===p}),onClick:()=>t("equal")},(0,d.Kt)()))||2===b&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Equal","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===p}),onClick:()=>t("equal")},(0,d.nt)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("1:2","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneTwo"===p}),onClick:()=>t("oneTwo")},(0,d.Tt)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("2:1","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoOne"===p}),onClick:()=>t("twoOne")},(0,d.eI)())),("Mobile"==u||"Tablet"==u)&&(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Collapsed Rows","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===p}),onClick:()=>t("collapsedRows")},(0,d.bD)())))||3===b&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Equal","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===p}),onClick:()=>t("equal")},(0,d.Np)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("1:1:2","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneOneTwo"===p}),onClick:()=>t("oneOneTwo")},(0,d.TS)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("2:1:1","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoOneOne"===p}),onClick:()=>t("twoOneOne")},(0,d.Gg)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("1:2:1","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneTwoOne"===p}),onClick:()=>t("oneTwoOne")},(0,d.CK)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("1:3:1","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneThreeOne"===p}),onClick:()=>t("oneThreeOne")},(0,d.wM)())),("Mobile"==u||"Tablet"==u)&&(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Collapsed Rows","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===p}),onClick:()=>t("collapsedRows")},(0,d.bD)())))||4===b&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Equal","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===p}),onClick:()=>t("equal")},(0,d.Qd)())),("Mobile"==u||"Tablet"==u)&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Two Column Grid","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoColumnGrid"===p}),onClick:()=>t("twoColumnGrid")},(0,d.y)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Collapsed Rows","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===p}),onClick:()=>t("collapsedRows")},(0,d.y)()))))||5===b&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Equal","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===p}),onClick:()=>t("equal")},(0,d._d)())),("Mobile"==u||"Tablet"==u)&&(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Collapsed Rows","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===p}),onClick:()=>t("collapsedRows")},(0,d.bD)())))||6===b&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Equal","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===p}),onClick:()=>t("equal")},(0,d.dY)())),("Mobile"==u||"Tablet"==u)&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Two Column Grid","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoColumnGrid"===p}),onClick:()=>t("twoColumnGrid")},(0,d.JD)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Three Column Grid","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"threeColumnGrid"===p}),onClick:()=>t("threeColumnGrid")},(0,d.VR)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Collapsed Rows","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===p}),onClick:()=>t("collapsedRows")},(0,d.bD)())))))}},1598:function(e,t,l){l(9307),l(5736),l(5609),l(340),l(5581)},2902:function(e,t,l){var o=l(9307),a=l(4184),r=l.n(a);t.Z=({type:e,front:t,style:l,fill:a,invert:n,width:c,height:i})=>"none"!==l&&(0,o.createElement)("div",{className:r()("wp-block-themeisle-blocks-advanced-columns-separators",e),style:!t&&c?{transform:c?`scaleX( ${c/100} )`:""}:{}},"bigTriangle"===l&&!1===n&&(0,o.createElement)("svg",{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"bottom"===e})},(0,o.createElement)("path",{d:"M0 0 L50 100 L100 0 Z"})),"bigTriangle"===l&&!0===n&&(0,o.createElement)("svg",{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"top"===e})},(0,o.createElement)("path",{d:"M100, 0l-50, 100l-50, -100l0, 100l100, 0l0, -100Z"})),"rightCurve"===l&&!1===n&&(0,o.createElement)("svg",{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"top"===e})},(0,o.createElement)("path",{d:"M0 100 C 20 0 50 0 100 100 Z"})),"rightCurve"===l&&!0===n&&(0,o.createElement)("svg",{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"top"===e})},(0,o.createElement)("path",{d:"M0 100 C 50 0 70 0 100 100 Z"})),"curve"===l&&(0,o.createElement)("svg",{id:"curve",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"top"===e})},(0,o.createElement)("path",{d:"M0 100 C40 0 60 0 100 100 Z"})),"slant"===l&&!1===n&&(0,o.createElement)("svg",{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"bottom"===e})},(0,o.createElement)("path",{d:"M0 0 L100 100 L100 0 Z"})),"slant"===l&&!0===n&&(0,o.createElement)("svg",{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"bottom"===e})},(0,o.createElement)("path",{d:"M0 0 L0 100 L100 0 Z"})),"cloud"===l&&(0,o.createElement)("svg",{id:"cloud",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"top"===e})},(0,o.createElement)("path",{d:"M-5 100 Q 10 -100 15 100 Z M10 100 Q 20 -20 30 100 M25 100 Q 35 -70 45 100 M40 100 Q 50 -100 60 100 M55 100 Q 65 -20 75 100 M70 100 Q 75 -45 90 100 M85 100 Q 90 -50 95 100 M90 100 Q 95 -25 105 100 Z"})))},1700:function(e,t,l){l(8276),l(5095)},7400:function(e,t){t.Z={1:{equal:["100"]},2:{equal:["50","50"],oneTwo:["33.34","66.66"],twoOne:["66.66","33.34"]},3:{equal:["33.33","33.33","33.33"],oneOneTwo:["25","25","50"],twoOneOne:["50","25","25"],oneTwoOne:["25","50","25"],oneThreeOne:["20","60","20"]},4:{equal:["25","25","25","25"]},5:{equal:["20","20","20","20","20"]},6:{equal:["16.66","16.66","16.66","16.66","16.66","16.66"]}}},395:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9307),c=l(5609),i=l(8423),s=l.n(i),d=l(4184),m=l.n(d),b=l(2175),u={facebook:{label:(0,o.__)("Facebook","otter-blocks"),icon:"facebook-f"},twitter:{label:(0,o.__)("Twitter","otter-blocks"),icon:"twitter"},linkedin:{label:(0,o.__)("Linkedin","otter-blocks"),icon:"linkedin-in"},pinterest:{label:(0,o.__)("Pinterest","otter-blocks"),icon:"pinterest-p"},tumblr:{label:(0,o.__)("Tumblr","otter-blocks"),icon:"tumblr"},reddit:{label:(0,o.__)("Reddit","otter-blocks"),icon:"reddit-alien"}},p=({icon:e})=>"facebook"===e?(0,n.createElement)(c.SVG,{className:"otter-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 264 512"},(0,n.createElement)(c.Path,{fill:"currentColor",d:"M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"})):"twitter"===e?(0,n.createElement)(c.SVG,{className:"otter-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,n.createElement)(c.Path,{fill:"currentColor",d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"})):"linkedin"===e?(0,n.createElement)(c.SVG,{className:"otter-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},(0,n.createElement)(c.Path,{fill:"currentColor",d:"M100.3 480H7.4V180.9h92.9V480zM53.8 140.1C24.1 140.1 0 115.5 0 85.8 0 56.1 24.1 32 53.8 32c29.7 0 53.8 24.1 53.8 53.8 0 29.7-24.1 54.3-53.8 54.3zM448 480h-92.7V334.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V480h-92.8V180.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V480z"})):"pinterest"===e?(0,n.createElement)(c.SVG,{className:"otter-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},(0,n.createElement)(c.Path,{fill:"currentColor",d:"M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z"})):"tumblr"===e?(0,n.createElement)(c.SVG,{className:"otter-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},(0,n.createElement)(c.Path,{fill:"currentColor",d:"M309.8 480.3c-13.6 14.5-50 31.7-97.4 31.7-120.8 0-147-88.8-147-140.6v-144H17.9c-5.5 0-10-4.5-10-10v-68c0-7.2 4.5-13.6 11.3-16 62-21.8 81.5-76 84.3-117.1.8-11 6.5-16.3 16.1-16.3h70.9c5.5 0 10 4.5 10 10v115.2h83c5.5 0 10 4.4 10 9.9v81.7c0 5.5-4.5 10-10 10h-83.4V360c0 34.2 23.7 53.6 68 35.8 4.8-1.9 9-3.2 12.7-2.2 3.5.9 5.8 3.4 7.4 7.9l22 64.3c1.8 5 3.3 10.6-.4 14.5z"})):"reddit"===e?(0,n.createElement)(c.SVG,{className:"otter-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,n.createElement)(c.Path,{fill:"currentColor",d:"M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 17.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z"})):(0,n.createElement)(c.SVG,{className:"otter-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,n.createElement)(c.Path,{fill:"currentColor",d:"M208 88.286c0-10 6.286-21.714 17.715-21.714 11.142 0 17.714 11.714 17.714 21.714 0 10.285-6.572 21.714-17.714 21.714C214.286 110 208 98.571 208 88.286zm304 160c0 36.001-11.429 102.286-36.286 129.714-22.858 24.858-87.428 61.143-120.857 70.572l-1.143.286v32.571c0 16.286-12.572 30.571-29.143 30.571-10 0-19.429-5.714-24.572-14.286-5.427 8.572-14.856 14.286-24.856 14.286-10 0-19.429-5.714-24.858-14.286-5.142 8.572-14.571 14.286-24.57 14.286-10.286 0-19.429-5.714-24.858-14.286-5.143 8.572-14.571 14.286-24.571 14.286-18.857 0-29.429-15.714-29.429-32.857-16.286 12.285-35.715 19.428-56.571 19.428-22 0-43.429-8.285-60.286-22.857 10.285-.286 20.571-2.286 30.285-5.714-20.857-5.714-39.428-18.857-52-36.286 21.37 4.645 46.209 1.673 67.143-11.143-22-22-56.571-58.857-68.572-87.428C1.143 321.714 0 303.714 0 289.429c0-49.714 20.286-160 86.286-160 10.571 0 18.857 4.858 23.143 14.857a158.792 158.792 0 0 1 12-15.428c2-2.572 5.714-5.429 7.143-8.286 7.999-12.571 11.714-21.142 21.714-34C182.571 45.428 232 17.143 285.143 17.143c6 0 12 .285 17.714 1.143C313.714 6.571 328.857 0 344.572 0c14.571 0 29.714 6 40 16.286.857.858 1.428 2.286 1.428 3.428 0 3.714-10.285 13.429-12.857 16.286 4.286 1.429 15.714 6.858 15.714 12 0 2.857-2.857 5.143-4.571 7.143 31.429 27.714 49.429 67.143 56.286 108 4.286-5.143 10.285-8.572 17.143-8.572 10.571 0 20.857 7.144 28.571 14.001C507.143 187.143 512 221.714 512 248.286zM188 89.428c0 18.286 12.571 37.143 32.286 37.143 19.714 0 32.285-18.857 32.285-37.143 0-18-12.571-36.857-32.285-36.857-19.715 0-32.286 18.858-32.286 36.857zM237.714 194c0-19.714 3.714-39.143 8.571-58.286-52.039 79.534-13.531 184.571 68.858 184.571 21.428 0 42.571-7.714 60-20 2-7.429 3.714-14.857 3.714-22.572 0-14.286-6.286-21.428-20.572-21.428-4.571 0-9.143.857-13.429 1.714-63.343 12.668-107.142 3.669-107.142-63.999zm-41.142 254.858c0-11.143-8.858-20.857-20.286-20.857-11.429 0-20 9.715-20 20.857v32.571c0 11.143 8.571 21.142 20 21.142 11.428 0 20.286-9.715 20.286-21.142v-32.571zm49.143 0c0-11.143-8.572-20.857-20-20.857-11.429 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.857 21.142 20.286 21.142 11.428 0 20-10 20-21.142v-32.571zm49.713 0c0-11.143-8.857-20.857-20.285-20.857-11.429 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.857 21.142 20.286 21.142 11.428 0 20.285-9.715 20.285-21.142v-32.571zm49.715 0c0-11.143-8.857-20.857-20.286-20.857-11.428 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.858 21.142 20.286 21.142 11.429 0 20.286-10 20.286-21.142v-32.571zM421.714 286c-30.857 59.142-90.285 102.572-158.571 102.572-96.571 0-160.571-84.572-160.571-176.572 0-16.857 2-33.429 6-49.714-20 33.715-29.714 72.572-29.714 111.429 0 60.286 24.857 121.715 71.429 160.857 5.143-9.714 14.857-16.286 26-16.286 10 0 19.428 5.714 24.571 14.286 5.429-8.571 14.571-14.286 24.858-14.286 10 0 19.428 5.714 24.571 14.286 5.429-8.571 14.857-14.286 24.858-14.286 10 0 19.428 5.714 24.857 14.286 5.143-8.571 14.571-14.286 24.572-14.286 10.857 0 20.857 6.572 25.714 16 43.427-36.286 68.569-92 71.426-148.286zm10.572-99.714c0-53.714-34.571-105.714-92.572-105.714-30.285 0-58.571 15.143-78.857 36.857C240.862 183.812 233.41 254 302.286 254c28.805 0 97.357-28.538 84.286 36.857 28.857-26 45.714-65.714 45.714-104.571z"})),g=({attributes:e,setAttributes:t})=>(0,n.createElement)(b.BlockControls,null,(0,n.createElement)(c.Toolbar,null,Object.keys(u).map((l=>{const a=e[l];return(0,n.createElement)(c.Tooltip,{key:l.label
73
- /* translators: %s Social Website */,text:(0,o.sprintf)((0,o.__)("Display %s","otter-blocks"),u[l].label)},(0,n.createElement)(c.Button,{className:m()("components-button","wp-block-themeisle-toolbar",{"is-active":a}),onClick:()=>(l=>{t({[l]:!e[l]})})(l)},(0,n.createElement)(p,{icon:l})))}))));(0,a.registerBlockType)("themeisle-blocks/sharing-icons",{title:(0,o.__)("Sharing Icons","otter-blocks"),description:(0,o.__)("Share buttons for your website visitors to share content on any social sharing service.","otter-blocks"),icon:r.c4,category:"themeisle-blocks",keywords:["social media","sharing","icons"],attributes:{facebook:{type:"boolean",default:!0},twitter:{type:"boolean",default:!0},linkedin:{type:"boolean",default:!0},pinterest:{type:"boolean",default:!1},tumblr:{type:"boolean",default:!1},reddit:{type:"boolean",default:!1}},supports:{align:["left","center","right"]},styles:[{name:"default",label:(0,o.__)("Regular","otter-blocks"),isDefault:!0},{name:"icons",label:(0,o.__)("Icons Only","otter-blocks")}],edit:({attributes:e,setAttributes:t})=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(g,{attributes:e,setAttributes:t}),(0,n.createElement)(c.Disabled,null,(0,n.createElement)(s(),{block:"themeisle-blocks/sharing-icons",attributes:{...e}}))),save:()=>null})},9738:function(e,t,l){var o=l(5736),a=l(4981),r={id:{type:"string"},images:{type:"array",default:[],source:"query",selector:".wp-block-themeisle-blocks-slider-item-wrapper",query:{id:{type:"number",source:"attribute",selector:"img",attribute:"data-id"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption",default:""}}},perView:{type:"number",default:1},gap:{type:"number",default:0},peek:{type:"number",default:0},autoplay:{type:"boolean",default:!0},delay:{type:"number",default:2},hideArrows:{type:"boolean",default:!1},hideBullets:{type:"boolean",default:!1},height:{type:"number",default:400}},n=l(9307),c=l(4184),i=l.n(c),s=l(2819),d=l(2175),m=l(5609);const b=({attributes:e})=>(0,n.createElement)(n.Fragment,null,!e.hideArrows&&(0,n.createElement)("div",{className:"glide__arrows","data-glide-el":"controls"},(0,n.createElement)("button",{className:"glide__arrow glide__arrow--left","data-glide-dir":"<"},(0,n.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 100 100"},(0,n.createElement)(m.Path,{d:"M 10,50 L 60,100 L 70,90 L 30,50 L 70,10 L 60,0 Z"}))),(0,n.createElement)("button",{className:"glide__arrow glide__arrow--right","data-glide-dir":">"},(0,n.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 100 100"},(0,n.createElement)(m.Path,{d:"M 10,50 L 60,100 L 70,90 L 30,50 L 70,10 L 60,0 Z"}))))),u=({attributes:e})=>(0,n.createElement)(n.Fragment,null,!e.hideBullets&&(0,n.createElement)("div",{className:"glide__bullets","data-glide-el":"controls[nav]"},e.images.map(((e,t)=>(0,n.createElement)("button",{key:e.id,className:"glide__bullet","data-glide-dir":`=${t}`})))));var p=({attributes:e})=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(b,{attributes:e}),(0,n.createElement)(u,{attributes:e}));const g={id:{type:"string"},align:{type:"string"},images:{type:"array",default:[],source:"query",selector:".wp-block-themeisle-blocks-slider-item-wrapper",query:{id:{type:"number",source:"attribute",selector:"img",attribute:"data-id"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption",default:""}}},perView:{type:"number",default:1},gap:{type:"number",default:0},peek:{type:"number",default:0},autoplay:{type:"boolean",default:!0},height:{type:"number",default:400}};var h=[{attributes:{...(0,s.omit)(g,["align"])},supports:{align:["wide","full"]},save:({attributes:e,className:t})=>(0,n.createElement)("div",{id:e.id,className:i()("wp-block-themeisle-blocks-slider","glide",t),"data-per-view":e.perView,"data-gap":e.gap,"data-peek":e.peek,"data-autoplay":e.autoplay},(0,n.createElement)("div",{className:"glide__track","data-glide-el":"track"},(0,n.createElement)("div",{className:"glide__slides",style:{height:`${e.height}px`}},e.images.map((e=>(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-slider-item-wrapper glide__slide",tabIndex:"0"},(0,n.createElement)("figure",null,(0,n.createElement)("img",{key:e.id,className:"wp-block-themeisle-blocks-slider-item",src:e.url,alt:e.alt,title:e.alt,"data-id":e.id}),!d.RichText.isEmpty(e.caption)&&(0,n.createElement)(d.RichText.Content,{tagName:"figcaption",value:e.caption})))))),(0,n.createElement)(p,{attributes:e})))},{attributes:{...(0,s.omit)(g,["align"]),delay:{type:"number",default:2},hideArrows:{type:"boolean",default:!1},hideBullets:{type:"boolean",default:!1}},supports:{align:["wide","full"]},save:({attributes:e,className:t})=>{const l=e.autoplay&&2!==e.delay?1e3*e.delay:e.autoplay;return(0,n.createElement)("div",{id:e.id,className:i()("wp-block-themeisle-blocks-slider","glide",t),"data-per-view":e.perView,"data-gap":e.gap,"data-peek":e.peek,"data-autoplay":l,"data-height":`${e.height}px`},(0,n.createElement)("div",{className:"glide__track","data-glide-el":"track"},(0,n.createElement)("div",{className:"glide__slides"},e.images.map((e=>(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-slider-item-wrapper glide__slide",tabIndex:"0"},(0,n.createElement)("figure",null,(0,n.createElement)("img",{key:e.id,className:"wp-block-themeisle-blocks-slider-item",src:e.url,alt:e.alt,title:e.alt,"data-id":e.id}),!d.RichText.isEmpty(e.caption)&&(0,n.createElement)(d.RichText.Content,{tagName:"figcaption",value:e.caption})))))),(0,n.createElement)(p,{attributes:e})))}}];var k={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t}=e[0];t=(0,s.every)(e,["align",t])?t:void 0;const l=(0,s.filter)(e,(({url:e})=>e));return(0,a.createBlock)("themeisle-blocks/slider",{images:l.map((({id:e,url:t,alt:l,caption:o})=>({id:e,url:t,alt:l,caption:o}))),align:t})}},{type:"block",blocks:["core/gallery"],transform:({images:e,align:t})=>(0,a.createBlock)("themeisle-blocks/slider",{images:e.map((({id:e,url:t,alt:l,caption:o})=>({id:e,url:t,alt:l,caption:o}))),align:t})}],to:[{type:"block",blocks:["core/image"],transform:({images:e,align:t})=>0<e.length?e.map((({id:e,url:l,alt:o,caption:r})=>(0,a.createBlock)("core/image",{id:e,url:l,alt:o,caption:r,align:t}))):(0,a.createBlock)("core/image",{align:t})},{type:"block",blocks:["core/gallery"],transform:({images:e,align:t})=>(0,a.createBlock)("core/gallery",{images:e.map((({id:e,url:t,alt:l,caption:o})=>({id:e,url:t,alt:l,caption:o}))),align:t})}]},v=({labels:e,icon:t,isAppender:l=!1,value:o={},onSelectImages:a})=>{const r=(0,s.debounce)(a,250);return(0,n.createElement)(d.MediaPlaceholder,{labels:e,icon:t,accept:"image/*",allowedTypes:["image"],isAppender:l,className:"wp-block-themeisle-blocks-slider-uploader",value:o,onSelect:r,multiple:!0})},y=l(2285),_=({attributes:e,setAttributes:t,slider:l,changePerView:a,onSelectImages:r})=>(0,n.createElement)(d.InspectorControls,null,(0,n.createElement)(m.PanelBody,{title:(0,o.__)("Images","otter-blocks"),initialOpen:!1},(0,n.createElement)(y.Z,{attributes:e,onSelectImages:r})),(0,n.createElement)(m.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},e.images.length&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(m.RangeControl,{label:(0,o.__)("Slides Per Page","otter-blocks"),help:(0,o.__)("A number of visible slides.","otter-blocks"),value:e.perView,onChange:a,min:1,max:(0,s.max)([Math.round(e.images.length/2),1])}),1<e.perView&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(m.RangeControl,{label:(0,o.__)("Gap","otter-blocks"),help:(0,o.__)("A size of the space between slides.","otter-blocks"),value:e.gap,onChange:e=>{t({gap:Number(e)}),l.update({gap:Number(e)})},min:0,max:100}),(0,n.createElement)(m.RangeControl,{label:(0,o.__)("Peek","otter-blocks"),help:(0,o.__)("The value of the future slides which have to be visible in the current slide.","otter-blocks"),value:e.peek,onChange:e=>{t({peek:Number(e)}),l.update({peek:Number(e)})},min:0,max:100})),(0,n.createElement)(m.RangeControl,{label:(0,o.__)("Height","otter-blocks"),help:(0,o.__)("Slider height in pixels.","otter-blocks"),value:e.height,onChange:e=>{t({height:Number(e)})},min:100,max:1400}),(0,n.createElement)(m.ToggleControl,{label:(0,o.__)("Autoplay","otter-blocks"),help:(0,o.__)("Autoplay slider in the front.","otter-blocks"),checked:e.autoplay,onChange:e=>{t({autoplay:e})}}),e.autoplay&&(0,n.createElement)(m.RangeControl,{label:(0,o.__)("Delay","otter-blocks"),help:(0,o.__)("Delay in slide change (in seconds).","otter-blocks"),value:e.delay,onChange:e=>{t({delay:e})},min:1,max:10}),(0,n.createElement)(m.ToggleControl,{label:(0,o.__)("Hide Arrows","otter-blocks"),help:(0,o.__)("Hide navigation arrows.","otter-blocks"),checked:e.hideArrows,onChange:e=>{t({hideArrows:e})}}),(0,n.createElement)(m.ToggleControl,{label:(0,o.__)("Hide Bullets","otter-blocks"),help:(0,o.__)("Hide navigation bullets.","otter-blocks"),checked:e.hideBullets,onChange:e=>{t({hideBullets:e})}})))),w=l(1984),f=l(4310),C=l(5024),E=l(7231),T=({images:e,image:t,index:l,isFirstItem:a,isLastItem:r,isSelected:c,setAttributes:b,setSelectedImage:u})=>{const p=(t,l)=>{const o=[...e];o.splice(l,1,e[t]),o.splice(t,1,e[l]),u(l),b({images:o})};return(0,n.createElement)("div",{className:i()("wp-block-themeisle-blocks-slider-item-wrapper glide__slide",{"is-selected":c}),tabIndex:"0",onClick:()=>u(t.id),onFocus:()=>u(t.id)},(0,n.createElement)("figure",null,(0,n.createElement)("img",{key:t.id,className:"wp-block-themeisle-blocks-slider-item",src:t.url,alt:t.alt,title:t.alt,"data-id":t.id}),c&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-slider-item-move-menu"},(0,n.createElement)(m.Button,{icon:(0,n.createElement)(w.Z,{icon:f.Z}),label:(0,o.__)("Move image backward","otter-blocks"),showTooltip:!0,onClick:a?void 0:()=>{0!==l&&p(l,l-1)},className:"wp-block-themeisle-blocks-slider-item-move-backward","aria-disabled":a,disabled:!c}),(0,n.createElement)(m.Button,{icon:(0,n.createElement)(w.Z,{icon:C.Z}),label:(0,o.__)("Move image forward","otter-blocks"),showTooltip:!0,onClick:r?void 0:()=>{l!==e.length-1&&p(l,l+1)},className:"wp-block-themeisle-blocks-slider-item-move-forward","aria-disabled":r,disabled:!c})),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-slider-item-delete-menu"},(0,n.createElement)(m.Button,{icon:(0,n.createElement)(w.Z,{icon:E.Z}),label:(0,o.__)("Remove image","otter-blocks"),showTooltip:!0,onClick:()=>{const t=(0,s.filter)(e,((e,t)=>l!==t));u(null),b({images:t})},className:"wp-block-themeisle-blocks-slider-item-delete"}))),(c||!d.RichText.isEmpty(t.caption))&&(0,n.createElement)(d.RichText,{tagName:"figcaption",placeholder:c?(0,o.__)("Write caption…","otter-blocks"):null,value:t.caption,onChange:t=>{const o=[...e];o[l].caption=t,b({images:o})},multiline:!1})))},x=l(5225);(0,a.registerBlockType)("themeisle-blocks/slider",{title:(0,o.__)("Slider","otter-blocks"),description:(0,o.__)("Minimal image slider to showcase beautiful images.","otter-blocks"),icon:"images-alt2",category:"themeisle-blocks",keywords:["slider","gallery","carousel"],attributes:r,deprecated:h,transforms:k,supports:{align:["wide","full"]},edit:({attributes:e,setAttributes:t,className:l,clientId:a,isSelected:c,toggleSelection:d})=>{(0,n.useEffect)((()=>{const t=(0,x.WX)(a,r);return()=>{t(e.id)}}),[e.id]),(0,n.useEffect)((()=>()=>{e.images.length&&b.current.destroy()}),[]),(0,n.useEffect)((()=>{e.images.length&&(h(null),null!==b.current&&(b.current.destroy(),k()))}),[c,e.align]),(0,n.useEffect)((()=>{e.images.length&&e.perView>e.images.length&&w((0,s.max)([Math.round(e.images.length/2),1]))}),[e.images]);const b=(0,n.useRef)(null),u=(0,n.useRef)(null),[g,h]=(0,n.useState)(null),k=()=>{b.current=new window.Glide(`#${e.id||u.current}`,{type:"carousel",keyboard:!1,perView:e.perView,gap:e.gap,peek:e.peek,autoplay:!1,breakpoints:{800:{perView:1,peek:0,gap:0}}}).mount()},y=e=>{t({images:e.map((e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption})))}),null!==b.current&&b.current.destroy(),k()},w=e=>{t({perView:Number(e)}),b.current.update({perView:Number(e)}),1===e&&(t({gap:0,peek:0}),b.current.update({gap:0,peek:0}))};return Array.isArray(e.images)&&!e.images.length?(0,n.createElement)(v,{labels:{title:(0,o.__)("Slider","otter-blocks"),instructions:(0,o.__)("Drag images, upload new ones or select files from your library.","otter-blocks")},icon:"images-alt2",onSelectImages:y}):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(_,{attributes:e,setAttributes:t,slider:b.current,changePerView:w,onSelectImages:y}),(0,n.createElement)(m.ResizableBox,{size:{height:e.height},enable:{top:!1,right:!1,bottom:!0,left:!1},minHeight:100,maxHeight:1400,onResizeStart:()=>{d(!1)},onResizeStop:(l,o,a,r)=>{t({height:parseInt(e.height+r.height,10)}),d(!0)},className:i()("wp-block-themeisle-blocks-slider-resizer",{"is-focused":c})},(0,n.createElement)("div",{id:e.id,className:i()("wp-block-themeisle-blocks-slider","glide",l)},(0,n.createElement)("div",{className:"glide__track","data-glide-el":"track"},(0,n.createElement)("div",{className:"glide__slides",style:{height:`${e.height}px`}},e.images.map(((l,o)=>(0,n.createElement)(T,{key:l.url,images:e.images,image:l,index:o,isFirstItem:0===o,isLastItem:o+1===e.images.length,isSelected:c&&l.id===g,setAttributes:t,setSelectedImage:h})))),(0,n.createElement)(p,{attributes:e})))),c&&(0,n.createElement)(v,{labels:{title:"",instructions:""},icon:null,onSelectImages:y,isAppender:!0,value:e.images}))},save:({attributes:e,className:t})=>{const l=e.autoplay&&2!==e.delay?1e3*e.delay:e.autoplay;return(0,n.createElement)("div",{id:e.id,className:i()("wp-block-themeisle-blocks-slider","glide",t),"data-per-view":e.perView,"data-gap":e.gap,"data-peek":e.peek,"data-autoplay":l,"data-height":`${e.height}px`,"data-hide-arrows":e.hideArrows},(0,n.createElement)("div",{className:"glide__track","data-glide-el":"track"},(0,n.createElement)("div",{className:"glide__slides"},e.images.map((e=>(0,n.createElement)("div",{key:e.id,className:"wp-block-themeisle-blocks-slider-item-wrapper glide__slide",tabIndex:"0"},(0,n.createElement)("figure",null,(0,n.createElement)("img",{className:"wp-block-themeisle-blocks-slider-item",src:e.url,alt:e.alt,title:e.alt,"data-id":e.id}),!d.RichText.isEmpty(e.caption)&&(0,n.createElement)(d.RichText.Content,{tagName:"figcaption",value:e.caption})))))),(0,n.createElement)(u,{attributes:e})))}})},4925:function(e,t,l){l(8344),l(7585),l(8726)},8344:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9307),c=l(2175);const i=[["themeisle-blocks/advanced-heading",{content:(0,o.__)("Basic","otter-blocks"),align:"center",tag:"h3",fontSize:24}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("$9.99","otter-blocks"),align:"center",tag:"h4",fontSize:36,fontFamily:"Roboto Slab",fontVariant:"normal"}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Per Month","otter-blocks"),align:"center",tag:"p",fontSize:12,marginBottom:0}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("First Feature","otter-blocks"),align:"center",tag:"p",fontSize:12,marginBottom:0}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Second Feature","otter-blocks"),align:"center",tag:"p",fontSize:12,marginBottom:0}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Last Feature","otter-blocks"),align:"center",tag:"p",fontSize:12,marginBottom:0}],["themeisle-blocks/button-group",{align:"center",buttons:1,data:[{text:(0,o.__)("Buy Now","otter-blocks"),newTab:!1,color:"#ffffff",background:"#32373c",hoverColor:"#ffffff",hoverBackground:"#444a50",borderSize:0,borderRadius:3,boxShadow:!1,boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",paddingTopBottom:12,paddingLeftRight:24}]}]];(0,a.registerBlockType)("themeisle-blocks/pricing",{title:(0,o.__)("Pricing","otter-blocks"),description:(0,o.__)("Pricing tables are a critical part in showcasing your services, prices and overall offerings.","otter-blocks"),icon:r.S3,category:"themeisle-blocks",keywords:["pricing","table","money"],edit:({className:e})=>(0,n.createElement)("div",{className:e},(0,n.createElement)(c.InnerBlocks,{template:i})),save:({className:e})=>(0,n.createElement)("div",{className:e},(0,n.createElement)(c.InnerBlocks.Content,null))})},7585:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9307),c=l(2175);const i=[["themeisle-blocks/font-awesome-icons",{fontSize:62,prefix:"fab",icon:"angellist"}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Basic","otter-blocks"),align:"center",tag:"h4",marginBottom:20}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Lorem ipsum dolor sit amet elit do, consectetur adipiscing, sed eiusmod tempor incididunt ut labore et dolore magna aliqua.","otter-blocks"),align:"center",color:"#999999",tag:"p",fontSize:14,marginBottom:20}],["themeisle-blocks/button-group",{align:"center",buttons:1,data:[{text:(0,o.__)("Know More","otter-blocks"),newTab:!1,color:"#ffffff",background:"#32373c",hoverColor:"#ffffff",hoverBackground:"#444a50",borderSize:0,borderRadius:3,boxShadow:!1,boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",paddingTopBottom:12,paddingLeftRight:24}]}]];(0,a.registerBlockType)("themeisle-blocks/service",{title:(0,o.__)("Service","otter-blocks"),description:(0,o.__)("Use this Service block to showcase services your website offers.","otter-blocks"),icon:r.M7,category:"themeisle-blocks",keywords:["services","icon","features"],edit:({className:e})=>(0,n.createElement)("div",{className:e},(0,n.createElement)(c.InnerBlocks,{template:i})),save:({className:e})=>(0,n.createElement)("div",{className:e},(0,n.createElement)(c.InnerBlocks.Content,null))})},8726:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9307),c=l(2175);const i=[["core/image",{align:"center"}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("John Doe","otter-blocks"),align:"center",fontSize:24,tag:"h3",marginTop:25,marginBottom:10,marginTopTablet:25,marginTopMobile:25}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Jedi Master","otter-blocks"),align:"center",fontSize:14,tag:"h4",marginTop:10,marginBottom:10}],["themeisle-blocks/advanced-heading",{content:(0,o.__)('"What is the point of being alive if you don’t at least try to do something remarkable?"',"otter-blocks"),align:"center",color:"#999999",tag:"p",fontSize:14,marginTop:10,marginBottom:20}]];(0,a.registerBlockType)("themeisle-blocks/testimonials",{title:(0,o.__)("Testimonials","otter-blocks"),description:(0,o.__)("Display kudos from customers and clients and display them on your website.","otter-blocks"),icon:r.U8,category:"themeisle-blocks",keywords:["testimonials","quotes","business"],edit:({className:e})=>(0,n.createElement)("div",{className:e},(0,n.createElement)(c.InnerBlocks,{template:i})),save:({className:e})=>(0,n.createElement)("div",{className:e},(0,n.createElement)(c.InnerBlocks.Content,null))})},2066:function(e,t,l){var o=l(2553),a=l(5736),r=l(4981),n=l(9307),c=l(5117),i=l(4184),s=l.n(i),d=l(1216),m=l(2175),b=l(5609),u=l(9818),p=l(1286);const g=(0,p.W6)((()=>(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-inspector-tab-option__drag",tabIndex:"0"},(0,n.createElement)("span",null)))),h=(0,p.W8)((({tab:e,deleteTab:t,selectTab:l})=>(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-inspector-tab-option"},(0,n.createElement)(g,null),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-inspector-tab-option__name"},e.attributes.title||(0,a.__)("Untitled Tab","otter-blocks")),(0,n.createElement)(b.Button,{icon:"edit",label:(0,a.__)("Edit Tab","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-tabs-inspector-tab-option__actions",onClick:()=>l(e.clientId)}),(0,n.createElement)(b.Button,{icon:"no-alt",label:(0,a.__)("Remove Tab","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-tabs-inspector-tab-option__actions",onClick:()=>t(e.clientId)}))));var k=({attributes:e,setAttributes:t,children:l,deleteTab:o,selectTab:r,addTab:c,moveTab:i})=>{const s=(0,p.JN)((({items:e})=>(0,n.createElement)("div",null,e.map(((e,t)=>(0,n.createElement)(h,{key:e.id,tab:e,index:t,deleteTab:o,selectTab:r}))))));return(0,n.createElement)(m.InspectorControls,null,(0,n.createElement)(b.PanelBody,{title:(0,a.__)("Tabs Management","otter-blocks"),initialOpen:!0},(0,n.createElement)("p",null,(0,a.__)("Press and hold to use drag and drop to sort the tabs","otter-blocks")),0<(null==l?void 0:l.length)&&(0,n.createElement)(s,{items:l,onSortEnd:({oldIndex:e,newIndex:t})=>{i(l[e].clientId,t)},useDragHandle:!0,axis:"y",lockAxis:"y"}),(0,n.createElement)(b.Button,{isSecondary:!0,isLarge:!0,className:"wp-block-themeisle-blocks-tabs-inspector-add-tab",onClick:c},(0,a.__)("Add Tab","otter-blocks"))),(0,n.createElement)(b.PanelBody,{title:(0,a.__)("Settings","otter-blocks"),initialOpen:!0},(0,n.createElement)(b.RangeControl,{label:(0,a.__)("Border Width","otter-blocks"),value:e.borderWidth,onChange:e=>{t({borderWidth:Number(e)})},min:0,max:5})),(0,n.createElement)(m.PanelColorSettings,{title:(0,a.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:e.activeTitleColor,onChange:e=>{t({activeTitleColor:e})},label:(0,a.__)("Active Title Color","otter-blocks")},{value:e.tabColor,onChange:e=>{t({tabColor:e})},label:(0,a.__)("Background","otter-blocks")},{value:e.borderColor,onChange:e=>{t({borderColor:e})},label:(0,a.__)("Border Color","otter-blocks")}]},(0,n.createElement)(m.ContrastChecker,{textColor:e.activeTitleColor,backgroundColor:e.tabColor})))},v=l(4688),y=l(4310),_=l(5024),w=({children:e,selectedTab:t,moveTab:l,selectTab:o})=>{const r=null==e?void 0:e.findIndex((({clientId:e})=>e===t)),c=e=>{switch(e){case"left":l(t,r-1);break;case"right":l(t,r+1)}};return(0,n.createElement)(m.BlockControls,null,(0,n.createElement)(b.ToolbarGroup,{label:(0,a.__)("Edit","otter-blocks")},(0,n.createElement)(b.ToolbarButton,{label:(0,a.__)("Edit tab","otter-blocks"),icon:v.Z,iconSize:24,className:"wp-block-themeisle-blocks-tabs-toolbar-edit",onClick:()=>o(t)})),(0,n.createElement)(b.ToolbarGroup,{label:(0,a.__)("Movement","otter-blocks")},(0,n.createElement)(b.ToolbarButton,{label:(0,a.__)("Move tab left","otter-blocks"),icon:y.Z,iconSize:24,disabled:0===r,className:"wp-block-themeisle-blocks-tabs-toolbar-mover",onClick:()=>c("left")}),(0,n.createElement)(b.ToolbarButton,{label:(0,a.__)("Move tab right","otter-blocks"),icon:_.Z,iconSize:24,disabled:(null==e?void 0:e.length)-1===r,className:"wp-block-themeisle-blocks-tabs-toolbar-mover",onClick:()=>c("right")})))},f=l(5225),C={id:{type:"string"},tabColor:{type:"string"},borderColor:{type:"string"},borderWidth:{type:"number"},activeTitleColor:{type:"string"}};(0,r.registerBlockType)("themeisle-blocks/tabs",{title:(0,a.__)("Tabs","otter-blocks"),description:(0,a.__)("Organize and allow navigation between groups of content with Tabs block.","otter-blocks"),icon:o.Z,category:"themeisle-blocks",keywords:["media","tabs","select"],attributes:C,supports:{align:["left","center","right"]},edit:({attributes:e,setAttributes:t,className:l,isSelected:o,clientId:i})=>{(0,n.useEffect)((()=>{const t=(0,f.WX)(i,C);return()=>t(e.id)}),[e.id]);const p=(0,n.useRef)(null),[g,h]=(0,n.useState)(""),v=(0,u.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t(i).innerBlocks})),{insertBlock:y,removeBlock:_,selectBlock:E,moveBlockToPosition:T}=(0,u.useDispatch)("core/block-editor"),x=e=>{p.current&&(v.forEach((t=>{const l=p.current.querySelector(`#block-${t.clientId} .wp-block-themeisle-blocks-tabs-item__content`);null==l||l.classList.toggle("active",t.clientId===e)})),h(e))};(0,n.useEffect)((()=>{0<(null==v?void 0:v.length)&&(""!==g&&0!==(null==v?void 0:v.filter((e=>e.clientId===g)).length)||x(v[0].clientId))}),[g,v]);const M=e=>{if(0<(null==v?void 0:v.length)){const t=v.filter((t=>t.clientId===e))[0];E(t.clientId)}},S=(e,t)=>{var l;const o=null===(l=v.filter((t=>t.clientId===e))[0])||void 0===l?void 0:l.clientId;o&&T(o,i,i,t)},B=()=>{const e=(0,r.createBlock)("themeisle-blocks/tabs-item");y(e,(null==v?void 0:v.length)||0,i,!1)},z=d.iv`
74
  .wp-block-themeisle-blocks-tabs__header_item.active {
75
  background-color: ${e.tabColor};
76
  }
@@ -100,7 +100,7 @@ h=(0,o.sprintf)((0,o.__)("Hide %s","otter-blocks"),u)),e){case"image":case"title
100
  width: 30px;
101
  height: 30px;
102
  align-items: center;
103
- `,L=({title:e,onClick:t,active:l})=>(0,d.tZ)("div",{className:s()("wp-block-themeisle-blocks-tabs__header_item",{active:l})},(0,d.tZ)("div",{onClick:t},e));return(0,d.tZ)(n.Fragment,null,(0,d.tZ)(w,{children:v,setAttributes:t,selectedTab:g,selectTab:M,moveTab:S}),(0,d.tZ)(k,{attributes:e,setAttributes:t,children:v,deleteTab:e=>{if(0<(null==v?void 0:v.length)){const t=v.filter((t=>t.clientId===e))[0];_(t.clientId,!1),g===e&&h("")}},selectTab:M,moveTab:S,addTab:B}),(0,d.tZ)("div",{id:e.id,className:l,style:{borderColor:e.borderColor}},(0,d.tZ)("div",{css:z,className:"wp-block-themeisle-blocks-tabs__header"},(null==v?void 0:v.map((e=>(0,d.tZ)(L,{key:e.clientId,title:e.attributes.title||(0,a.__)("Insert Title","otter-blocks"),active:e.clientId===g,onClick:()=>x(e.clientId)}))))||"",(o||0===v.length)&&(0,d.tZ)((()=>(0,d.tZ)("div",{className:"wp-block-themeisle-blocks-tabs__header_item"},(0,d.tZ)("div",{css:N,onClick:B},(0,d.tZ)(b.Icon,{icon:c.Z})))),null)),(0,d.tZ)("div",{ref:p,className:"wp-block-themeisle-blocks-tabs__content",css:P},(0,d.tZ)(m.InnerBlocks,{allowedBlocks:["themeisle-blocks/tabs-item"],template:[["themeisle-blocks/tabs-item"]],orientation:"horizontal",renderAppender:!1}))))},save:({attributes:e,className:t})=>(0,n.createElement)("div",{id:e.id,className:t},(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-tabs__content"},(0,n.createElement)(m.InnerBlocks.Content,null)))})},1715:function(e,t,l){l(2066),l(8577)},8577:function(e,t,l){var o=l(2553),a=l(5736),r=l(4981),n=l(9307),c=l(4184),i=l.n(c),s=l(2175),d=l(9818),m=l(5609),b=({setAttributes:e,selectParent:t})=>(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(m.PanelBody,{title:(0,a.__)("Settings","otter-blocks")},(0,n.createElement)(m.Button,{isSecondary:!0,onClick:()=>t()},(0,a.__)("Back to the Tabs","otter-blocks")),(0,n.createElement)(m.TextControl,{type:"text",label:(0,a.__)("Title","otter-blocks"),placeholder:(0,a.__)("Insert a title","otter-blocks"),onChange:t=>{e({title:t})}})));(0,r.registerBlockType)("themeisle-blocks/tabs-item",{title:(0,a.__)("Tab Item","otter-blocks"),description:(0,a.__)("Organize and allow navigation between groups of content with Tabs block.","otter-blocks"),icon:o.Z,category:"themeisle-blocks",keywords:["media","tab","item"],attributes:{title:{type:"string"}},parent:["themeisle-blocks/tabs"],edit:({attributes:e,setAttributes:t,className:l,clientId:o})=>{const r=(0,n.useRef)(null),{parentClientId:c,isFirstBlock:m}=(0,d.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:l}=e("core/block-editor"),a=t(l(o));return{parentClientId:a.clientId,isFirstBlock:o===a.innerBlocks[0].clientId}})),{selectBlock:u}=(0,d.useDispatch)("core/block-editor");return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(b,{setAttributes:t,selectParent:()=>u(c)}),(0,n.createElement)("div",{className:l,ref:r},(0,n.createElement)(s.RichText,{placeholder:(0,a.__)("Add title…","otter-blocks"),value:e.title,onChange:e=>t({title:e}),className:i()("wp-block-themeisle-blocks-tabs-item__header",{active:m}),tagName:"div",onClick:()=>{const e=document.querySelectorAll(`#block-${c} .wp-block-themeisle-blocks-tabs__content .wp-block-themeisle-blocks-tabs-item`);var t,l;e&&e.forEach((e=>{var t,l;null===(t=e.querySelector(".wp-block-themeisle-blocks-tabs-item__header"))||void 0===t||t.classList.remove("active"),null===(l=e.querySelector(".wp-block-themeisle-blocks-tabs-item__content"))||void 0===l||l.classList.remove("active")})),r.current&&(null===(t=r.current.querySelector(".wp-block-themeisle-blocks-tabs-item__header"))||void 0===t||t.classList.add("active"),null===(l=r.current.querySelector(".wp-block-themeisle-blocks-tabs-item__content"))||void 0===l||l.classList.add("active"))},withoutInteractiveFormatting:!0}),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-item__content"},(0,n.createElement)(s.InnerBlocks,{template:[["core/paragraph"]]}))))},save:({attributes:e,className:t})=>(0,n.createElement)("div",{className:t,"data-title":e.title},(0,n.createElement)(s.RichText.Content,{tagName:"div",className:"wp-block-themeisle-blocks-tabs-item__header",value:e.title||(0,a.__)("Untitled Tab","otter-blocks"),tabIndex:"0"}),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-item__content"},(0,n.createElement)(s.InnerBlocks.Content,null)))})},321:function(e,t,l){var o=l(9307),a=l(5736),r=l(4981),n=l(5609),c=l(340),i={id:{type:"string"},products:{type:"array",default:[]},listingType:{type:"string",default:window.themeisleGutenberg.themeMods.listingType},altRow:{type:"boolean",default:Boolean(window.themeisleGutenberg.themeMods.altRow)},fields:{type:"string",default:window.themeisleGutenberg.themeMods.fields},rowColor:{type:"string",default:window.themeisleGutenberg.themeMods.rowColor},headerColor:{type:"string",default:window.themeisleGutenberg.themeMods.headerColor},textColor:{type:"string",default:window.themeisleGutenberg.themeMods.textColor},borderColor:{type:"string",default:window.themeisleGutenberg.themeMods.borderColor},altRowColor:{type:"string",default:window.themeisleGutenberg.themeMods.altRowColor}},s=l(1216),d=l(8423),m=l.n(d),b=l(2819),u=l(9818),p=l(2629),g=l(6030),h=({attributes:e,setAttributes:t,onComplete:l})=>{const{data:r,status:c}=(0,u.useSelect)((e=>{let t=[],l="loading";const{COLLECTIONS_STORE_KEY:o}=window.wc.wcBlocksData,a=["/wc/store","products",{per_page:100}];return e(o).getCollectionError(...a)?l="error":(t=e(o).getCollection(...a),e(o).hasFinishedResolution("getCollection",a)&&(l="loaded"),(0,b.isEmpty)(t)||(t=t.map((e=>({value:e.id,label:(0,p.decodeEntities)(e.name)}))))),{data:t,status:l}}),[]),i="loading"===c,s="loaded"===c,d="error"===c,[m,h]=(0,o.useState)(""),k=l=>{const o=[...e.products];if(o.includes(l)){const e=o.indexOf(l);-1!==e&&o.splice(e,1)}else o.push(l);t({products:o})},v=({label:e,value:t})=>(0,o.createElement)("span",{className:"otter-review-comparison__tag"},(0,o.createElement)("span",{className:"otter-review-comparison__tag_title"},e),(0,o.createElement)(n.Button
13
  background: ${e.contentBackground};
14
  border-color: ${e.borderColor};
15
  }
16
+ `;return(0,d.tZ)(c.Fragment,null,(0,d.tZ)(u,{attributes:e,setAttributes:t}),(0,d.tZ)("div",{id:e.id,className:s()(l,{[`is-${e.gap}-gap`]:e.gap}),css:r},(0,d.tZ)(m.InnerBlocks,{allowedBlocks:["themeisle-blocks/accordion-item"],template:[["themeisle-blocks/accordion-item"]],renderAppender:a?m.InnerBlocks.ButtonBlockAppender:""})))},save:({attributes:e,className:t})=>(0,c.createElement)("div",{id:e.id,className:s()(t,{[`is-${e.gap}-gap`]:e.gap})},(0,c.createElement)(m.InnerBlocks.Content,null))})},7767:function(e,t,l){l(6299),l(3443)},3443:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9307),c=l(6015),i=l(3904),s=l(2175),d=l(5609),m=({attributes:e,setAttributes:t})=>(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(d.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,n.createElement)(d.ToggleControl,{label:(0,o.__)("Initially Open","otter-blocks"),checked:e.initialOpen,onChange:e=>t({initialOpen:e})})));(0,a.registerBlockType)("themeisle-blocks/accordion-item",{title:(0,o.__)("Accordion Item","otter-blocks"),description:(0,o.__)("Vertically collapsing accordions perfect for displaying your FAQs.","otter-blocks"),parent:["themeisle-blocks/accordion"],icon:r.Se,category:"themeisle-blocks",keywords:["accordions","collapse","faq"],attributes:{title:{type:"string"},initialOpen:{type:"boolean",default:!1}},supports:{reusable:!1},edit:({attributes:e,className:t,setAttributes:l})=>{const[a,r]=(0,n.useState)(!0);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(m,{attributes:e,setAttributes:l}),(0,n.createElement)("div",{className:t},(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-accordion-item__title",onClick:e=>{"string"==typeof e.target.className&&e.target.className.includes("block-editor-rich-text__editable")?r(!0):r(!a)}},(0,n.createElement)(s.RichText,{placeholder:(0,o.__)("Add text…","otter-blocks"),value:e.title,onChange:e=>{a||r(!0),l({title:e})},tagName:"span"}),(0,n.createElement)(d.Icon,{icon:a?c.Z:i.Z,size:24})),a&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-accordion-item__content"},(0,n.createElement)(s.InnerBlocks,{template:[["core/paragraph"]]}))))},save:({attributes:e,className:t})=>(0,n.createElement)("details",{className:t,open:!!e.initialOpen},(0,n.createElement)("summary",{className:"wp-block-themeisle-blocks-accordion-item__title"},(0,n.createElement)(s.RichText.Content,{tagName:"div",value:e.title})),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-accordion-item__content"},(0,n.createElement)(s.InnerBlocks.Content,null)))})},4933:function(e,t,l){var o=l(9307),a=l(5736),r=l(4981),n=l(5609),c=l(1526),i={product:{type:"number"}},s=l(8423),d=l.n(s),m=l(4779);Boolean(window.themeisleGutenberg.hasNeveSupport.isBoosterActive)&&Boolean(window.themeisleGutenberg.hasWooCommerce)?(0,r.registerBlockType)("themeisle-blocks/add-to-cart-button",{title:(0,a.__)("Add to Cart Button","otter-blocks"),description:(0,a.__)("Display an Add to Cart button for your WooCommerce products.","otter-blocks"),icon:c.Z,category:"themeisle-blocks",keywords:["woocommerce","add to cart","products"],attributes:i,styles:[{name:"default",label:(0,a.__)("Default","otter-blocks"),isDefault:!0},{name:"primary",label:(0,a.__)("Primary","otter-blocks")},{name:"secondary",label:(0,a.__)("Secondary","otter-blocks")}],edit:({attributes:e,setAttributes:t})=>e.product?(0,o.createElement)(n.Disabled,null,(0,o.createElement)(d(),{block:"themeisle-blocks/add-to-cart-button",attributes:{...e}})):(0,o.createElement)(n.Placeholder,{icon:c.Z,label:(0,a.__)("Add to Cart Button","otter-blocks"),instructions:(0,a.__)("Select a WooCommerce product for the Add to Cart button.","otter-blocks")},(0,o.createElement)(m.Z,{label:(0,a.__)("Select Product","otter-blocks"),hideLabelFromVision:!0,value:e.product,onChange:e=>t({product:Number(e)})})),save:()=>null}):(0,r.registerBlockType)("themeisle-blocks/add-to-cart-button",{title:(0,a.__)("Add to Cart Button","otter-blocks"),description:(0,a.__)("Display an Add to Cart button for your WooCommerce products.","otter-blocks"),icon:c.Z,category:"themeisle-blocks",keywords:["woocommerce","add to cart","products"],attributes:i,supports:{inserter:!1},edit:()=>(0,o.createElement)(n.Placeholder,null,(0,a.__)("You need to have Neve Pro & WooCommerce installed to edit Add to Cart Button block.","otter-blocks")),save:()=>null})},2093:function(e,t,l){var o=l(5736),a=l(4981),r=l(9307),n=l(6713),c=window.wp.richText,i=l(2175);const s="themeisle-blocks/highlight";(0,c.registerFormatType)(s,{name:s,title:(0,o.__)("Highlight","otter-blocks"),tagName:"span",className:"highlight",edit:({isActive:e,value:t,onChange:l})=>{const a=()=>l((0,c.toggleFormat)(t,{type:s}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.RichTextShortcut,{type:"primary",character:"h",onUse:a}),(0,r.createElement)(i.RichTextToolbarButton,{icon:n.Z,title:(0,o.__)("Highlight","otter-blocks"),onClick:a,isActive:e,shortcutType:"access",shortcutCharacter:"h"}))}});var d=l(340),m={id:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6,div,p,span",default:""},tag:{default:"h2",type:"string"},align:{type:"string"},alignTablet:{type:"string"},alignMobile:{type:"string"},headingColor:{type:"string",default:"#000000"},highlightColor:{type:"string"},highlightBackground:{type:"string"},fontSize:{type:"number"},fontSizeTablet:{type:"number"},fontSizeMobile:{type:"number"},fontFamily:{type:"string"},fontVariant:{type:"string"},fontStyle:{type:"string"},textTransform:{type:"string"},lineHeight:{type:"number"},letterSpacing:{type:"number"},textShadow:{type:"boolean",default:!1},textShadowColor:{type:"string",default:"#000000"},textShadowColorOpacity:{type:"number",default:50},textShadowBlur:{type:"number",default:5},textShadowHorizontal:{type:"number",default:0},textShadowVertical:{type:"number",default:0},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:0},paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTop:{type:"number",default:0},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRight:{type:"number",default:0},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottom:{type:"number",default:0},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeft:{type:"number",default:0},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:0},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTop:{type:"number",default:0},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginBottom:{type:"number",default:25},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"}},b=l(4184),u=l.n(b),p=l(80),g=l.n(p);var h=[{attributes:{id:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6,div,p,span",default:""},tag:{default:"h2",type:"string"},align:{type:"string"},alignTablet:{type:"string"},alignMobile:{type:"string"},headingColor:{type:"string",default:"#000000"},highlightColor:{type:"string"},highlightBackground:{type:"string"},fontSize:{type:"number"},fontSizeTablet:{type:"number"},fontSizeMobile:{type:"number"},fontFamily:{type:"string"},fontVariant:{type:"string"},fontStyle:{type:"string",default:"normal"},textTransform:{type:"string",default:"none"},lineHeight:{type:"number"},letterSpacing:{type:"number"},textShadow:{type:"boolean",default:!1},textShadowColor:{type:"string",default:"#000000"},textShadowColorOpacity:{type:"number",default:50},textShadowBlur:{type:"number",default:5},textShadowHorizontal:{type:"number",default:0},textShadowVertical:{type:"number",default:0},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:0},paddingTablet:{type:"number",default:0},paddingMobile:{type:"number",default:0},paddingTop:{type:"number",default:0},paddingTopTablet:{type:"number",default:0},paddingTopMobile:{type:"number",default:0},paddingRight:{type:"number",default:0},paddingRightTablet:{type:"number",default:0},paddingRightMobile:{type:"number",default:0},paddingBottom:{type:"number",default:0},paddingBottomTablet:{type:"number",default:0},paddingBottomMobile:{type:"number",default:0},paddingLeft:{type:"number",default:0},paddingLeftTablet:{type:"number",default:0},paddingLeftMobile:{type:"number",default:0},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:0},marginTablet:{type:"number",default:0},marginMobile:{type:"number",default:0},marginTop:{type:"number",default:0},marginTopTablet:{type:"number",default:0},marginTopMobile:{type:"number",default:0},marginBottom:{type:"number",default:25},marginBottomTablet:{type:"number",default:25},marginBottomMobile:{type:"number",default:20}},save:({attributes:e,className:t})=>{let l;e.textShadow&&(l={textShadow:`${e.textShadowHorizontal}px ${e.textShadowVertical}px ${e.textShadowBlur}px ${g()(e.textShadowColor?e.textShadowColor:"#000000",e.textShadowColorOpacity)}`});const o={color:e.headingColor,fontFamily:e.fontFamily,fontWeight:"regular"===e.fontVariant?"normal":e.fontVariant,fontStyle:e.fontStyle,textTransform:e.textTransform,lineHeight:e.lineHeight&&`${e.lineHeight}px`,letterSpacing:e.letterSpacing&&`${e.letterSpacing}px`,...l};return(0,r.createElement)(i.RichText.Content,{tagName:e.tag,value:e.content,id:e.id,className:u()(e.id,t),style:o})}}],k={from:[{type:"block",blocks:["core/heading"],transform:({content:e})=>(0,a.createBlock)("themeisle-blocks/advanced-heading",{content:e})},{type:"block",blocks:["core/paragraph"],transform:({content:e})=>(0,a.createBlock)("themeisle-blocks/advanced-heading",{content:e})}],to:[{type:"block",blocks:["core/paragraph"],transform:({content:e})=>(0,a.createBlock)("core/paragraph",{content:e})}]},v=l(5988),y=l(2819),_=l(4333),w=l(9818),f=l(5225),C=l(5609),E=l(9977),T=({attributes:e,setAttributes:t})=>{const l=e=>{t(e?{fontFamily:e,fontVariant:"normal",fontStyle:"normal"}:{fontFamily:e,fontVariant:e})},a=e=>{switch(e){case"h1":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H1"));case"h2":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H2"));case"h3":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H3"));case"h4":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H4"));case"h5":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H5"));case"h6":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"H6"));case"div":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"DIV"));case"p":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{x:"0",y:"15"},"P"));case"span":return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"SPAN"));default:return(0,r.createElement)(C.SVG,{style:{width:"25px",height:"20px"}},(0,r.createElement)("text",{style:{fontSize:"12px"},x:"0",y:"15"},"DEFAULT"))}},n=e=>{t({tag:e})};return(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(C.DropdownMenu,{icon:a(e.tag),label:(0,o.__)("Select tag","otter-blocks"),className:"components-toolbar",controls:[{title:(0,o.__)("Heading","otter-blocks")+" 1",icon:a("h1"),onClick:()=>n("h1")},{title:(0,o.__)("Heading","otter-blocks")+" 2",icon:a("h2"),onClick:()=>n("h2")},{title:(0,o.__)("Heading","otter-blocks")+" 3",icon:a("h3"),onClick:()=>n("h3")},{title:(0,o.__)("Heading","otter-blocks")+" 4",icon:a("h4"),onClick:()=>n("h4")},{title:(0,o.__)("Heading","otter-blocks")+" 5",icon:a("h5"),onClick:()=>n("h5")},{title:(0,o.__)("Heading","otter-blocks")+" 6",icon:a("h6"),onClick:()=>n("h6")},{title:(0,o.__)("Division","otter-blocks"),icon:a("div"),onClick:()=>n("div")},{title:(0,o.__)("Paragraph","otter-blocks"),icon:a("p"),onClick:()=>n("p")},{title:(0,o.__)("Span Tag","otter-blocks"),icon:a("span"),onClick:()=>n("span")}]}),(0,r.createElement)(C.ToolbarGroup,null,(0,r.createElement)(C.Dropdown,{contentClassName:"wp-themesiel-blocks-advanced-heading-popover-content",position:"bottom center",renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(C.Button,{className:"components-dropdown-menu__toggle",icon:"editor-textcolor",onClick:t,"aria-haspopup":"true","aria-expanded":e,label:(0,o.__)("Typography Settings","otter-blocks"),showTooltip:!0},(0,r.createElement)("span",{className:"components-dropdown-menu__indicator"})),renderContent:()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(E.Z,{label:(0,o.__)("Font Family","otter-blocks"),value:e.fontFamily,onChangeFontFamily:l,valueVariant:e.fontVariant,onChangeFontVariant:e=>t({fontVariant:e}),valueStyle:e.fontStyle,onChangeFontStyle:e=>t({fontStyle:e}),valueTransform:e.textTransform,onChangeTextTransform:e=>t({textTransform:e})}),(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Line Height","otter-blocks"),value:e.lineHeight,onChange:e=>t({lineHeight:e}),min:0,step:.1,max:3}),(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Letter Spacing","otter-blocks"),value:e.letterSpacing,onChange:e=>t({letterSpacing:e}),min:-50,max:100}))})))},x=l(6778),M=l(2136),S=l(6993),B=l(2372),z=l(1661),P=({values:e,setAttributes:t})=>(0,r.createElement)("div",{className:"otter-clear-button"},(0,r.createElement)(C.Button,{isSmall:!0,isSecondary:!0,onClick:()=>{const l=((0,y.isArray)(e)?e:[e]).map((e=>{if((0,y.isString)(e))return e;if((0,y.isObject)(e)){const t=Object.keys(e);if(1===t.length)return e[t[0]]?t[0]:void 0}})).filter(y.isString).reduce(((e,t)=>(e[t]=void 0,e)),{});t(l)}},(0,o.__)("Clear","otter-blocks"))),N=({attributes:e,setAttributes:t})=>{const l=(0,w.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=e("core/edit-post")?e("core/edit-post"):{__experimentalGetPreviewDeviceType:void 0};return l?l():t()}),[]),[a,n]=(0,r.useState)("style"),c={top:"paddingTop",right:"paddingRight",bottom:"paddingBottom",left:"paddingLeft"},s={top:"paddingTopTablet",right:"paddingRightTablet",bottom:"paddingBottomTablet",left:"paddingLeftTablet"},d={top:"paddingTopMobile",right:"paddingRightMobile",bottom:"paddingBottomMobile",left:"paddingLeftMobile"},m=t=>{if("top"==t)switch(l){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingTop;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingTopTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingTopMobile}else if("right"==t)switch(l){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingRight;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingRightTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingRightMobile}else if("bottom"==t)switch(l){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingBottom;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingBottomTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingBottomMobile}else if("left"==t)switch(l){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingLeft;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingLeftTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingLeftMobile}},b={top:"marginTop",bottom:"marginBottom"},p={top:"marginTopTablet",bottom:"marginBottomTablet"},g={top:"marginTopMobile",bottom:"marginBottomMobile"},h=t=>{if("top"==t)switch(l){case"Desktop":return"linked"===e.marginType?e.margin:e.marginTop;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginTopTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginTopMobile}else if("bottom"==t)switch(l){case"Desktop":return"linked"===e.marginType?e.margin:e.marginBottom;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginBottomTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginBottomMobile}};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(C.PanelBody,{className:"wp-block-themeisle-blocks-advanced-heading-header-panel"},(0,r.createElement)(C.Button,{className:u()("header-tab",{"is-selected":"style"===a}),onClick:()=>n("style")},(0,r.createElement)("span",null,(0,r.createElement)(C.Dashicon,{icon:"admin-customizer"}),(0,o.__)("Style","otter-blocks"))),(0,r.createElement)(C.Button,{className:u()("header-tab",{"is-selected":"advanced"===a}),onClick:()=>n("advanced")},(0,r.createElement)("span",null,(0,r.createElement)(C.Dashicon,{icon:"admin-generic"}),(0,o.__)("Advanced","otter-blocks")))),"style"===a&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(C.PanelBody,{title:(0,o.__)("General Settings","otter-blocks"),className:"o-adv-h-panel"},(0,r.createElement)(x.Z,{label:(0,o.__)("Heading Color","otter-blocks"),colorValue:e.headingColor},(0,r.createElement)(i.ColorPalette,{label:(0,o.__)("Heading Color","otter-blocks"),value:e.headingColor,onChange:e=>t({headingColor:e})})),(0,r.createElement)(S.Z,{label:(0,o.__)("Font Size","otter-blocks")},(0,r.createElement)(C.RangeControl,{value:(()=>{switch(l){case"Desktop":return e.fontSize;case"Tablet":return e.fontSizeTablet;case"Mobile":return e.fontSizeMobile;default:return}})()||"",onChange:e=>{"Desktop"===l?t({fontSize:e}):"Tablet"===l?t({fontSizeTablet:e}):"Mobile"===l&&t({fontSizeMobile:e})},min:1,max:500,allowReset:!0})),(0,r.createElement)(S.Z,{label:(0,o.__)("Alignment","otter-blocks")},(0,r.createElement)(i.AlignmentToolbar,{value:(()=>{switch(l){case"Desktop":return e.align;case"Tablet":return e.alignTablet;case"Mobile":return e.alignMobile;default:return}})(),onChange:e=>{"Desktop"===l?t({align:e}):"Tablet"===l?t({alignTablet:e}):"Mobile"===l&&t({alignMobile:e})},isCollapsed:!1}))),(0,r.createElement)(C.PanelBody,{title:(0,o.__)("Typography Settings","otter-blocks"),initialOpen:!1},(0,r.createElement)(E.Z,{label:(0,o.__)("Font Family","otter-blocks"),value:e.fontFamily,onChangeFontFamily:e=>{t(e?{fontFamily:e,fontVariant:"normal",fontStyle:"normal"}:{fontFamily:e,fontVariant:e})},valueVariant:e.fontVariant,onChangeFontVariant:e=>t({fontVariant:e}),valueStyle:e.fontStyle,onChangeFontStyle:e=>t({fontStyle:e}),valueTransform:e.textTransform,onChangeTextTransform:e=>t({textTransform:e})}),(0,r.createElement)(P,{values:["fontFamily","fontVariant","fontStyle","textTransform"],setAttributes:t}),(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Line Height","otter-blocks"),value:e.lineHeight,onChange:e=>t({lineHeight:e}),min:0,step:.1,max:3,allowReset:!0}),(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Letter Spacing","otter-blocks"),value:e.letterSpacing,onChange:e=>t({letterSpacing:e}),min:-50,max:100,allowReset:!0}),(0,r.createElement)(C.ToggleControl,{label:(0,o.__)("Shadow Properties","otter-blocks"),checked:e.textShadow,onChange:e=>t({textShadow:e})}),e.textShadow&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(x.Z,{label:(0,o.__)("Color","otter-blocks"),colorValue:e.textShadowColor},(0,r.createElement)(i.ColorPalette,{label:(0,o.__)("Color","otter-blocks"),value:e.textShadowColor,onChange:e=>t({textShadowColor:e})})),(0,r.createElement)(M.Z,{label:(0,o.__)("Shadow Properties","otter-blocks")},(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:e.textShadowColorOpacity,onChange:e=>t({textShadowColorOpacity:e}),min:0,max:100}),(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:e.textShadowBlur,onChange:e=>t({textShadowBlur:e}),min:0,max:100}),(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:e.textShadowHorizontal,onChange:e=>t({textShadowHorizontal:e}),min:-100,max:100}),(0,r.createElement)(C.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:e.textShadowVertical,onChange:e=>t({textShadowVertical:e}),min:-100,max:100})))))||"advanced"===a&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(C.PanelBody,{title:(0,o.__)("Highlight Color","otter-blocks")},(0,r.createElement)(x.Z,{label:(0,o.__)("Highlight Color","otter-blocks"),colorValue:e.highlightColor},(0,r.createElement)(i.ColorPalette,{label:(0,o.__)("Highlight Color","otter-blocks"),value:e.highlightColor,onChange:e=>t({highlightColor:e})})),(0,r.createElement)(x.Z,{label:(0,o.__)("Highlight Background","otter-blocks"),colorValue:e.highlightBackground},(0,r.createElement)(i.ColorPalette,{label:(0,o.__)("Highlight Background","otter-blocks"),value:e.highlightBackground,onChange:e=>t({highlightBackground:e})}))),(0,r.createElement)(C.PanelBody,{title:(0,o.__)("Spacing","otter-blocks"),initialOpen:!1},(0,r.createElement)(S.Z,{label:(0,o.__)("Padding","otter-blocks")},(0,r.createElement)(B.Z,{type:(()=>{switch(l){case"Desktop":return e.paddingType;case"Tablet":return e.paddingTypeTablet;case"Mobile":return e.paddingTypeMobile;default:return}})(),min:0,max:500,changeType:e=>{"Desktop"===l?t({paddingType:e}):"Tablet"===l?t({paddingTypeTablet:e}):"Mobile"===l&&t({paddingTypeMobile:e})},onChange:(o,a)=>{switch(l){case"Desktop":"linked"===e.paddingType?t({padding:a}):t({[c[o]]:a});break;case"Tablet":"linked"===e.paddingTypeTablet?t({paddingTablet:a}):t({[s[o]]:a});break;case"Mobile":"linked"===e.paddingTypeMobile?t({paddingMobile:a}):t({[d[o]]:a})}},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:m("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:m("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:m("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:m("left")}]})),(0,r.createElement)(P,{values:[{padding:"Desktop"===l&&"linked"===e.paddingType},{paddingTablet:"Tablet"===l&&"linked"===e.paddingType},{paddingMobile:"Mobile"===l&&"linked"===e.paddingType},{paddingRight:"Desktop"===l&&"linked"!==e.paddingType},{paddingRightTablet:"Tablet"===l&&"linked"!==e.paddingType},{paddingRightMobile:"Mobile"===l&&"linked"!==e.paddingType},{paddingTop:"Desktop"===l&&"linked"!==e.paddingType},{paddingTopTablet:"Tablet"===l&&"linked"!==e.paddingType},{paddingTopMobile:"Mobile"===l&&"linked"!==e.paddingType},{paddingBottom:"Desktop"===l&&"linked"!==e.paddingType},{paddingBottomTablet:"Tablet"===l&&"linked"!==e.paddingType},{paddingBottomMobile:"Mobile"===l&&"linked"!==e.paddingType},{paddingLeft:"Desktop"===l&&"linked"!==e.paddingType},{paddingLeftTablet:"Tablet"===l&&"linked"!==e.paddingType},{paddingLeftMobile:"Mobile"===l&&"linked"!==e.paddingType}],setAttributes:t}),(0,r.createElement)(S.Z,{label:(0,o.__)("Margin","otter-blocks")},(0,r.createElement)(B.Z,{type:(()=>{switch(l){case"Desktop":return e.marginType;case"Tablet":return e.marginTypeTablet;case"Mobile":return e.marginTypeMobile;default:return}})(),min:-500,max:500,changeType:e=>{switch(l){case"Desktop":t({marginType:e});break;case"Tablet":t({marginTypeTablet:e});break;case"Mobile":t({marginTypeMobile:e})}},onChange:(o,a)=>{switch(l){case"Desktop":"linked"===e.marginType?t({margin:a}):t({[b[o]]:a});break;case"Tablet":"linked"===e.marginTypeTablet?t({marginTablet:a}):t({[p[o]]:a});break;case"Mobile":"linked"===e.marginTypeMobile?t({marginMobile:a}):t({[g[o]]:a})}},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:h("top")},{label:(0,o.__)("Right","otter-blocks"),disabled:!0},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:h("bottom")},{label:(0,o.__)("Left","otter-blocks"),disabled:!0}]})),(0,r.createElement)(P,{values:[{margin:"Desktop"===l&&"linked"===e.marginType},{marginTablet:"Tablet"===l&&"linked"===e.marginType},{marginMobile:"Mobile"===l&&"linked"===e.marginType},{marginTop:"Desktop"===l&&"linked"!==e.marginType},{marginTopTablet:"Tablet"===l&&"linked"!==e.marginType},{marginTopMobile:"Mobile"===l&&"linked"!==e.marginType},{marginBottom:"Desktop"===l&&"linked"!==e.marginType},{marginBottomTablet:"Tablet"===l&&"linked"!==e.marginType},{marginBottomMobile:"Mobile"===l&&"linked"!==e.marginType}],setAttributes:t})))),(0,r.createElement)(z.Z,{value:e.id,onChange:e=>t({id:e})}))};(0,a.registerBlockType)("themeisle-blocks/advanced-heading",{title:(0,o.__)("Advanced Heading","otter-blocks"),description:(0,o.__)("Advanced Heading gives a spin to editor's Heading block with much needed customization options.","otter-blocks"),icon:d.cZ,category:"themeisle-blocks",keywords:["heading","title","advanced Heading"],attributes:m,deprecated:h,transforms:k,edit:({attributes:e,setAttributes:t,className:l,clientId:n,mergeBlocks:c,insertBlocksAfter:s,onReplace:d})=>{const{isViewportAvailable:b,isPreviewDesktop:p,isPreviewTablet:h,isPreviewMobile:k}=(0,w.useSelect)((e=>{const{__experimentalGetPreviewDeviceType:t}=e("core/edit-post")?e("core/edit-post"):{__experimentalGetPreviewDeviceType:void 0};return{isViewportAvailable:!!t,isPreviewDesktop:!!t&&"Desktop"===t(),isPreviewTablet:!!t&&"Tablet"===t(),isPreviewMobile:!!t&&"Mobile"===t()}}),[]),C=(0,_.useViewportMatch)("large",">="),E=(0,_.useViewportMatch)("large","<="),x=(0,_.useViewportMatch)("small",">="),M=(0,_.useViewportMatch)("small","<=");(0,r.useEffect)((()=>{const t=(0,f.WX)(n,m);return()=>t(e.id)}),[e.id]);let S,B,z,P=C&&!E&&x&&!M,R=!C&&!E&&x&&!M,V=!(C||E||x||M);b&&!V&&(P=p,R=h,V=k),P&&(S={fontSize:e.fontSize?`${e.fontSize}px`:void 0},B={textAlign:e.align,paddingTop:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingTop}px`,paddingRight:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingRight}px`,paddingBottom:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingBottom}px`,paddingLeft:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingLeft}px`,marginTop:"linked"===e.marginType?`${e.margin}px`:`${e.marginTop}px`,marginBottom:"linked"===e.marginType?`${e.margin}px`:`${e.marginBottom}px`}),R&&(S={fontSize:e.fontSizeTablet?`${e.fontSizeTablet}px`:void 0},B={textAlign:e.alignTablet,paddingTop:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingTopTablet}px`,paddingRight:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingRightTablet}px`,paddingBottom:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingBottomTablet}px`,paddingLeft:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingLeftTablet}px`,marginTop:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginTopTablet}px`,marginBottom:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginBottomTablet}px`}),V&&(S={fontSize:e.fontSizeMobile?`${e.fontSizeMobile}px`:void 0},B={textAlign:e.alignMobile,paddingTop:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingTopMobile}px`,paddingRight:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingRightMobile}px`,paddingBottom:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingBottomMobile}px`,paddingLeft:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingLeftMobile}px`,marginTop:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginTopMobile}px`,marginBottom:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginBottomMobile}px`}),e.textShadow&&(z={textShadow:`${e.textShadowHorizontal}px ${e.textShadowVertical}px ${e.textShadowBlur}px ${g()(e.textShadowColor?e.textShadowColor:"#000000",0<=e.textShadowColorOpacity?e.textShadowColorOpacity||1e-5:1)}`});const L=(0,y.omitBy)({color:e.headingColor,...S,fontFamily:e.fontFamily||void 0,fontWeight:"regular"===e.fontVariant?"normal":e.fontVariant,fontStyle:e.fontStyle||void 0,textTransform:e.textTransform||void 0,lineHeight:(3<e.lineHeight?e.lineHeight+"px":e.lineHeight)||void 0,letterSpacing:e.letterSpacing&&`${e.letterSpacing}px`,...B,...z},(e=>{var t;return null==e||null===(t=e.includes)||void 0===t?void 0:t.call(e,"undefined")}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("style",null,`.${e.id} mark, .${e.id} .highlight {\n\t\t\t\t\t\tcolor: ${e.highlightColor};\n\t\t\t\t\t\tbackground: ${e.highlightBackground};\n\t\t\t\t\t}`),e.fontFamily&&(0,r.createElement)(v.Z,{fonts:[{font:e.fontFamily,weights:e.fontVariant&&[e.fontVariant+("italic"===e.fontStyle?":i":"")]}]}),(0,r.createElement)(T,{attributes:e,setAttributes:t}),(0,r.createElement)(N,{attributes:e,setAttributes:t}),(0,r.createElement)(i.RichText,{identifier:"content",className:u()(e.id,l),value:e.content,placeholder:(0,o.__)("Write heading…","otter-blocks"),tagName:e.tag,formattingControls:["bold","italic","link","strikethrough","highlight"],allowedFormats:["core/bold","core/italic","core/link","core/strikethrough","themeisle-blocks/highlight"],onMerge:c,onSplit:s?(e,l,...o)=>{t({content:e}),s([...o,(0,a.createBlock)("core/paragraph",{content:l})])}:void 0,onRemove:()=>d([]),style:L,onChange:e=>{t({content:e})}}))},save:({attributes:e,className:t})=>(0,r.createElement)(i.RichText.Content,{tagName:e.tag,value:e.content,id:e.id,className:u()(e.id,t)})})},58:function(e,t,l){var o=l(9307),a=l(5736),r=l(4981),n=l(5609),c=l(6779),i={id:{type:"string"},title:{type:"string"},titleAlignment:{type:"string"},titleFontSize:{type:"number"},titleColor:{type:"string"},itemsFontSize:{type:"number"},backgroundColor:{type:"string"},gap:{type:"number"},borderWidth:{type:"number"},borderColor:{type:"string"},borderRadius:{type:"number"}},s=l(1216),d=l(2175),m=l(5225),b=({attributes:e,setAttributes:t})=>{const l=d.AlignmentControl||d.AlignmentToolbar;return(0,o.createElement)(d.BlockControls,null,(0,o.createElement)(l,{value:e.titleAlignment,onChange:e=>t({titleAlignment:e})}))},u=({attributes:e,setAttributes:t})=>(0,o.createElement)(d.InspectorControls,null,(0,o.createElement)(n.PanelBody,{title:(0,a.__)("Settings","otter-blocks")},(0,o.createElement)(n.RangeControl,{label:(0,a.__)("Gap","otter-blocks"),value:e.gap,onChange:e=>t({gap:Number(e)}),min:0,max:60}),(0,o.createElement)(n.RangeControl,{label:(0,a.__)("Title Font Size","otter-blocks"),value:e.titleFontSize,onChange:e=>t({titleFontSize:Number(e)}),min:0,max:60}),(0,o.createElement)(n.RangeControl,{label:(0,a.__)("Items Font Size","otter-blocks"),value:e.itemsFontSize,onChange:e=>t({itemsFontSize:Number(e)}),min:0,max:60}),(0,o.createElement)(n.RangeControl,{label:(0,a.__)("Border Radius","otter-blocks"),value:e.borderRadius,onChange:e=>t({borderRadius:Number(e)}),min:0,max:60}),(0,o.createElement)(n.RangeControl,{label:(0,a.__)("Border Width","otter-blocks"),value:e.borderWidth,onChange:e=>t({borderWidth:Number(e)}),min:0,max:120})),(0,o.createElement)(d.PanelColorSettings,{title:(0,a.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:e.titleColor,onChange:e=>t({titleColor:e}),label:(0,a.__)("Title","otter-blocks")},{value:e.backgroundColor,onChange:e=>t({backgroundColor:e}),label:(0,a.__)("Background","otter-blocks")},{value:e.borderColor,onChange:e=>t({borderColor:e}),label:(0,a.__)("Border","otter-blocks")}]},(0,o.createElement)(d.ContrastChecker,{textColor:e.titleColor,backgroundColor:e.backgroundColor}))),p=({attributes:e,className:t})=>(0,o.createElement)("div",{className:t,id:e.id},(0,o.createElement)("div",{className:"otter-business-hour__container"},(0,o.createElement)("div",{className:"otter-business-hour__title"},(0,o.createElement)(d.RichText.Content,{value:e.title,tagName:"span"})),(0,o.createElement)("div",{className:"otter-business-hour__content"},(0,o.createElement)(d.InnerBlocks.Content,null))));Boolean(window.themeisleGutenberg.hasNeveSupport.isBoosterActive)?(0,r.registerBlockType)("themeisle-blocks/business-hours",{title:(0,a.__)("Business Hours","otter-blocks"),description:(0,a.__)("Display your business schedule on your website.","otter-blocks"),icon:c.Z,category:"themeisle-blocks",keywords:["business","schedule","time"],attributes:i,supports:{align:["wide","full"]},styles:[{name:"default",label:(0,a.__)("default","otter-blocks"),isDefault:!0},{name:"black-white",label:(0,a.__)("Black & White","otter-blocks")}],edit:({attributes:e,setAttributes:t,className:l,isSelected:r,clientId:n})=>{(0,o.useEffect)((()=>{const t=(0,m.WX)(n,i);return()=>t(e.id)}),[e.id]);const c={container:{backgroundColor:e.backgroundColor,borderRadius:e.borderRadius+"px",border:e.borderWidth&&`${e.borderWidth}px solid ${e.borderColor||"#000000"}`},title:{textAlign:e.titleAlignment,fontSize:e.titleFontSize+"px",color:e.titleColor}},p=s.iv`
17
  .otter-business-hour__container .otter-business-hour__content .wp-block-themeisle-blocks-business-hours-item {
18
  font-size: ${e.itemsFontSize}px;
19
  padding-top: ${e.gap}px;
34
  &:hover svg {
35
  fill: ${e.hoverColor} !important;
36
  }
37
+ `,E={fill:e.color,width:m.fontSize&&`${m.fontSize}px`},T=w.ZP.icons[e.icon];return(0,i.tZ)(c.Fragment,null,(0,i.tZ)(h,{attributes:e,setAttributes:t,isSelected:a}),(0,i.tZ)(_,{attributes:e,setAttributes:t}),(0,i.tZ)("div",{id:e.id,className:d()(l,"wp-block-button"),style:{}},"none"!==e.iconType?(0,i.tZ)("div",{className:"wp-block-button__link",style:y,css:C},("left"===e.iconType||"only"===e.iconType)&&("themeisle-icons"===e.library&&e.icon?(0,i.tZ)(T,{className:d()({"margin-right":"left"===e.iconType}),style:E}):(0,i.tZ)("i",{className:d()(e.prefix,"fa-fw",`fa-${e.icon}`,{"margin-right":"left"===e.iconType})})),"only"!==e.iconType&&(0,i.tZ)(u.RichText,{placeholder:(0,o.__)("Add text…","otter-blocks"),value:e.text,onChange:e=>t({text:e}),tagName:"div",withoutInteractiveFormatting:!0}),"right"===e.iconType&&("themeisle-icons"===e.library&&e.icon?(0,i.tZ)(T,{className:"margin-left",style:E}):(0,i.tZ)("i",{className:`${e.prefix} fa-fw fa-${e.icon} margin-left`}))):(0,i.tZ)(u.RichText,{placeholder:(0,o.__)("Add text…","otter-blocks"),value:e.text,onChange:e=>t({text:e}),tagName:"div",withoutInteractiveFormatting:!0,className:"wp-block-button__link",style:y,css:C})))},save:({attributes:e,className:t})=>{const l=w.ZP.icons[e.icon];return(0,c.createElement)("div",{id:e.id,className:d()(t,"wp-block-button")},(0,c.createElement)("a",{href:e.link,target:e.newTab?"_blank":"_self",rel:"noopener noreferrer",className:"wp-block-button__link"},("left"===e.iconType||"only"===e.iconType)&&("themeisle-icons"===e.library&&e.icon?(0,c.createElement)(l,{className:d()({"margin-right":"left"===e.iconType})}):(0,c.createElement)("i",{className:d()(e.prefix,"fa-fw",`fa-${e.icon}`,{"margin-right":"left"===e.iconType})})),"only"!==e.iconType&&(0,c.createElement)(u.RichText.Content,{tagName:"span",value:e.text}),"right"===e.iconType&&("themeisle-icons"===e.library&&e.icon?(0,c.createElement)(l,{className:"margin-left"}):(0,c.createElement)("i",{className:`${e.prefix} fa-fw fa-${e.icon} margin-left`}))))}})},2756:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},align:{type:"string"},spacing:{type:"number",default:20},paddingTopBottom:{type:"number"},paddingLeftRight:{type:"number"},collapse:{type:"string",default:"collapse-none"},fontSize:{type:"number"},fontFamily:{type:"string"},fontVariant:{type:"string"},textTransform:{type:"string"},fontStyle:{type:"string"},lineHeight:{type:"number"}},c=l(9307),i=l(4184),s=l.n(i),d=l(2819),m=l(2175);const b={id:{type:"string"},buttons:{type:"number",default:2},align:{type:"string"},spacing:{type:"number",default:20},collapse:{type:"string",default:"collapse-none"},fontSize:{type:"number",default:18},fontFamily:{type:"string"},fontVariant:{type:"string"},textTransform:{type:"string"},fontStyle:{type:"string",default:"normal"},lineHeight:{type:"number"},data:{type:"array",default:[{text:"",link:"",newTab:!1,color:"#ffffff",background:"#32373c",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:0,borderRadius:0,boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:12,paddingLeftRight:24},{text:"",link:"",newTab:!1,color:"#ffffff",background:"#32373c",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:0,borderRadius:0,boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:12,paddingLeftRight:24}]}};var u=[{attributes:b,save:({attributes:e,className:t})=>{const l="collapse-none"!==e.collapse?e.collapse:"",o={fontSize:`${e.fontSize}px`,fontFamily:e.fontFamily,fontWeight:e.fontVariant,fontStyle:e.fontStyle,textTransform:e.textTransform,lineHeight:e.lineHeight&&`${e.lineHeight}px`};return(0,c.createElement)("div",{id:e.id,className:s()(t,l),style:{justifyContent:e.align,alignItems:e.align?e.align:"flex-start"}},(0,d.times)(e.buttons,(t=>(t=>{const l={...o,borderWidth:`${e.data[t].borderSize}px`,borderRadius:`${e.data[t].borderRadius}px`,padding:`${e.data[t].paddingTopBottom}px ${e.data[t].paddingLeftRight}px`};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("a",{href:e.data[t].link,target:e.data[t].newTab?"_blank":"_self",className:s()("wp-block-themeisle-blocks-button",`wp-block-themeisle-blocks-button-${t}`),style:l},("left"===e.data[t].iconType||"only"===e.data[t].iconType)&&(0,c.createElement)("i",{className:s()(e.data[t].prefix,"fa-fw",`fa-${e.data[t].icon}`,{"margin-right":"left"===e.data[t].iconType})}),"only"!==e.data[t].iconType&&(0,c.createElement)(m.RichText.Content,{tagName:"span",value:e.data[t].text}),"right"===e.data[t].iconType&&(0,c.createElement)("i",{className:`${e.data[t].prefix} fa-fw fa-${e.data[t].icon} margin-left`})))})(t))))}},{attributes:b,save:({attributes:e,className:t})=>{const l="collapse-none"!==e.collapse?e.collapse:"",o={fontSize:`${e.fontSize}px`,fontFamily:e.fontFamily,fontWeight:e.fontVariant,fontStyle:e.fontStyle,textTransform:e.textTransform,lineHeight:e.lineHeight&&`${e.lineHeight}px`};return(0,c.createElement)("div",{id:e.id,className:s()(t,l),style:{justifyContent:e.align,alignItems:e.align?e.align:"flex-start"}},(0,d.times)(e.buttons,(t=>(t=>{const l={...o,borderWidth:`${e.data[t].borderSize}px`,borderRadius:`${e.data[t].borderRadius}px`,padding:`${e.data[t].paddingTopBottom}px ${e.data[t].paddingLeftRight}px`};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("a",{href:e.data[t].link,target:e.data[t].newTab?"_blank":"_self",className:s()("wp-block-themeisle-blocks-button",`wp-block-themeisle-blocks-button-${t}`),style:l,rel:"noopener noreferrer"},("left"===e.data[t].iconType||"only"===e.data[t].iconType)&&(0,c.createElement)("i",{className:s()(e.data[t].prefix,"fa-fw",`fa-${e.data[t].icon}`,{"margin-right":"left"===e.data[t].iconType})}),"only"!==e.data[t].iconType&&(0,c.createElement)(m.RichText.Content,{tagName:"span",value:e.data[t].text}),"right"===e.data[t].iconType&&(0,c.createElement)("i",{className:`${e.data[t].prefix} fa-fw fa-${e.data[t].icon} margin-left`})))})(t))))}},{attributes:{...b,fontSize:{type:"number"},fontStyle:{type:"string"},data:{type:"array",default:[{text:"",link:"",newTab:!1,color:"",background:"",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:"",borderRadius:"",boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:"",paddingLeftRight:""},{text:"",link:"",newTab:!1,color:"",background:"",border:"",hoverColor:"",hoverBackground:"",hoverBorder:"",borderSize:"",borderRadius:"",boxShadow:!1,boxShadowColor:"",boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColor:"",hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",prefix:"",icon:"",paddingTopBottom:"",paddingLeftRight:""}]}},migrate:(e,t)=>{let l,o,r;return"flex-start"===e.align&&(l="left"),"center"===e.align&&(l="center"),"flex-end"===e.align&&(l="right"),e.data&&(o=(0,d.pick)(e.data[0],["paddingLeftRight","paddingTopBottom"]),1<=Object.keys(o).length&&(o=(0,d.pick)(o,Object.keys(o).filter((e=>""!==o[e])))),r=e.data.filter(((t,l)=>l<e.buttons)).map((e=>{const t=(0,d.omit)(e,["paddingLeftRight","paddingTopBottom"]);return(0,a.createBlock)("themeisle-blocks/button",{...t})}))),[{...(0,d.omit)(e,["buttons","data"]),align:l,...o},[...r,...t]]},save:({attributes:e,className:t})=>{const l="collapse-none"!==e.collapse?e.collapse:"";return(0,c.createElement)("div",{id:e.id,className:s()(t,l,"wp-block-button")},(0,d.times)(e.buttons,(t=>(t=>(0,c.createElement)("a",{href:e.data[t].link,target:e.data[t].newTab?"_blank":"_self",className:s()("wp-block-themeisle-blocks-button",`wp-block-themeisle-blocks-button-${t}`,"wp-block-button__link"),rel:"noopener noreferrer"},("left"===e.data[t].iconType||"only"===e.data[t].iconType)&&(0,c.createElement)("i",{className:s()(e.data[t].prefix,"fa-fw",`fa-${e.data[t].icon}`,{"margin-right":"left"===e.data[t].iconType})}),"only"!==e.data[t].iconType&&(0,c.createElement)(m.RichText.Content,{tagName:"span",value:e.data[t].text}),"right"===e.data[t].iconType&&(0,c.createElement)("i",{className:`${e.data[t].prefix} fa-fw fa-${e.data[t].icon} margin-left`})))(t))))}}],p=l(5988),g=l(1216),h=l(4333),k=l(9818),v=l(1150),y=l(8065),_=l(199),w=({attributes:e,setAttributes:t})=>(0,c.createElement)(m.BlockControls,null,(0,c.createElement)(m.AlignmentToolbar,{value:e.align,onChange:e=>t({align:e}),alignmentControls:[{icon:v.Z,title:(0,o.__)("Align left","otter-blocks"),align:"left"},{icon:y.Z,title:(0,o.__)("Align center","otter-blocks"),align:"center"},{icon:_.Z,title:(0,o.__)("Align right","otter-blocks"),align:"right"}]})),f=l(5609),C=l(9977),E=l(2372),T=({attributes:e,setAttributes:t})=>(0,c.createElement)(m.InspectorControls,null,(0,c.createElement)(f.PanelBody,{title:(0,o.__)("Spacing","otter-blocks")},(0,c.createElement)(E.Z,{label:(0,o.__)("Padding","otter-blocks"),min:0,max:100,onChange:(e,l)=>{"top"!==e&&"bottom"!==e||t({paddingTopBottom:l}),"right"!==e&&"left"!==e||t({paddingLeftRight:l})},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:e.paddingTopBottom},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:e.paddingLeftRight},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:e.paddingTopBottom},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:e.paddingLeftRight}]}),(0,c.createElement)(f.RangeControl,{label:(0,o.__)("Spacing","otter-blocks"),value:e.spacing,onChange:e=>t({spacing:e}),min:0,max:50}),(0,c.createElement)(f.SelectControl,{label:(0,o.__)("Collapse On","otter-blocks"),value:e.collapse,options:[{label:(0,o.__)("None","otter-blocks"),value:"collapse-none"},{label:(0,o.__)("Desktop","otter-blocks"),value:"collapse-desktop"},{label:(0,o.__)("Tablet","otter-blocks"),value:"collapse-tablet"},{label:(0,o.__)("Mobile","otter-blocks"),value:"collapse-mobile"}],onChange:e=>t({collapse:e})})),(0,c.createElement)(f.PanelBody,{title:(0,o.__)("Typography Settings","otter-blocks"),initialOpen:!1},(0,c.createElement)(f.RangeControl,{label:(0,o.__)("Font Size","otter-blocks"),value:e.fontSize,onChange:e=>t({fontSize:e}),min:0,max:50}),(0,c.createElement)(C.Z,{label:(0,o.__)("Font Family","otter-blocks"),value:e.fontFamily,onChangeFontFamily:e=>{t(e?{fontFamily:e,fontVariant:"normal",fontStyle:"normal"}:{fontFamily:void 0,fontVariant:void 0,fontStyle:void 0})},valueVariant:e.fontVariant,onChangeFontVariant:e=>t({fontVariant:e}),valueStyle:e.fontStyle,onChangeFontStyle:e=>t({fontStyle:e}),valueTransform:e.textTransform,onChangeTextTransform:e=>t({textTransform:e})}),(0,c.createElement)(f.RangeControl,{label:(0,o.__)("Line Height","otter-blocks"),value:e.lineHeight,onChange:e=>t({lineHeight:e}),min:0,max:200}))),x=l(5225);(0,a.registerBlockType)("themeisle-blocks/button-group",{title:(0,o.__)("Button Group","otter-blocks"),description:(0,o.__)("Prompt visitors to take action with a button group.","otter-blocks"),icon:r.Se,category:"themeisle-blocks",keywords:["button","buttons","button group"],attributes:n,deprecated:u,edit:({attributes:e,setAttributes:t,className:l,clientId:o})=>{const{isViewportAvailable:a,isPreviewDesktop:r,isPreviewTablet:i,isPreviewMobile:d}=(0,k.useSelect)((e=>{const{__experimentalGetPreviewDeviceType:t}=e("core/edit-post")?e("core/edit-post"):{__experimentalGetPreviewDeviceType:void 0};return{isViewportAvailable:!!t,isPreviewDesktop:!!t&&"Desktop"===t(),isPreviewTablet:!!t&&"Tablet"===t(),isPreviewMobile:!!t&&"Mobile"===t()}}),[e.id]),b=(0,h.useViewportMatch)("large",">="),u=(0,h.useViewportMatch)("large","<="),v=(0,h.useViewportMatch)("small",">="),y=(0,h.useViewportMatch)("small","<=");(0,c.useEffect)((()=>{const t=(0,x.WX)(o,n);return()=>t(e.id)}),[]);let _=b&&!u&&v&&!y,f=!b&&!u&&v&&!y,C=!(b||u||v||y);return a&&!C&&(_=r,f=i,C=d),(0,g.tZ)(c.Fragment,null,e.fontFamily&&(0,g.tZ)(p.Z,{fonts:[{font:e.fontFamily,weights:e.fontVariant&&[e.fontVariant+("italic"===e.fontStyle?":i":"")]}]}),(0,g.tZ)(w,{attributes:e,setAttributes:t}),(0,g.tZ)(T,{attributes:e,setAttributes:t}),(0,g.tZ)("div",{id:e.id,className:s()(l,"wp-block-buttons",{[`align-${e.align}`]:e.align,collapse:"collapse-desktop"===e.collapse&&(_||f||C)||"collapse-tablet"===e.collapse&&(f||C)||"collapse-mobile"===e.collapse&&C}),css:g.iv`
38
  .block-editor-block-list__layout {
39
  column-gap: ${e.spacing}px;
40
  }
41
+ `},(0,g.tZ)(m.InnerBlocks,{allowedBlocks:["themeisle-blocks/button"],__experimentalMoverDirection:"horizontal",orientation:"horizontal",template:[["themeisle-blocks/button"]],renderAppender:m.InnerBlocks.DefaultAppender})))},save:({attributes:e,className:t})=>{const l="collapse-none"!==e.collapse?e.collapse:"";return(0,c.createElement)("div",{id:e.id,className:s()(t,l,"wp-block-buttons",{[`align-${e.align}`]:e.align})},(0,c.createElement)(m.InnerBlocks.Content,null))}})},3312:function(e,t,l){l(2756),l(3986)},1941:function(e,t,l){var o=l(269),a=l(5736),r=l(4981),n={id:{type:"string"},title:{type:"string",default:(0,a.__)("Skill","otter-blocks")},percentage:{type:"number",default:50},duration:{type:"number",default:2},titleStyle:{type:"string",default:"default"},height:{type:"number",default:100},fontSizeTitle:{type:"number"},fontSizePercent:{type:"number"},strokeWidth:{type:"number",default:10},backgroundColor:{type:"string"},progressColor:{type:"string"},titleColor:{type:"string"}},c=l(9307),i=l(4184),s=l.n(i),d=l(2819),m=l(5609),b=l(2175),u=({attributes:e,setAttributes:t,onHeightChange:l})=>(0,c.createElement)(b.InspectorControls,null,(0,c.createElement)(m.PanelBody,{title:(0,a.__)("Settings","otter-blocks")},(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Percentage","otter-blocks"),help:(0,a.__)("The value of the counter.","otter-blocks"),value:e.percentage,onChange:e=>{void 0!==e&&(e=(0,d.clamp)(e,0,100),t({percentage:e}))},min:0,max:100}),(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Duration","otter-blocks"),help:(0,a.__)("The duration of the animation.","otter-blocks"),value:e.duration,onChange:e=>{void 0!==e&&(e=(0,d.clamp)(e,0,3),t({duration:e}))},min:0,max:3,step:.1}),(0,c.createElement)(m.SelectControl,{label:(0,a.__)("Title Style","otter-blocks"),value:e.titleStyle,options:[{label:(0,a.__)("Default","otter-blocks"),value:"default"},{label:(0,a.__)("Hide","otter-blocks"),value:"hide"},{label:(0,a.__)("Bottom","otter-blocks"),value:"bottom"}],onChange:e=>{t({titleStyle:e})}})),(0,c.createElement)(m.PanelBody,{title:(0,a.__)("Style","otter-blocks")},(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Height","otter-blocks"),help:(0,a.__)("The height of the circle counter.","otter-blocks"),value:e.height,onChange:l,min:0,max:240}),(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Circle Thickness","otter-blocks"),help:(0,a.__)("Change the thickness (stroke width) of the circle.","otter-blocks"),value:e.strokeWidth,onChange:e=>{t({strokeWidth:e})},initialPosition:10,min:0,max:20}),(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Font Size Title","otter-blocks"),help:(0,a.__)("Change the font size of the title.","otter-blocks"),value:e.fontSizeTitle,onChange:e=>{t({fontSizeTitle:e})},initialPosition:37,min:0,max:Math.round(.6*e.height)}),(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Font Size Percent","otter-blocks"),help:(0,a.__)("Change the font size of the inner text.","otter-blocks"),value:e.fontSizePercent,onChange:e=>{t({fontSizePercent:e})},initialPosition:27,min:0,max:Math.round(.27*e.height)}),"hide"!==e.titleStyle&&(0,c.createElement)(b.__experimentalColorGradientControl,{label:(0,a.__)("Title Color","otter-blocks"),colorValue:e.titleColor,onColorChange:e=>{t({titleColor:e})}}),(0,c.createElement)(b.__experimentalColorGradientControl,{label:(0,a.__)("Progress Color","otter-blocks"),colorValue:e.progressColor,onColorChange:e=>{t({progressColor:e})}}),(0,c.createElement)(b.__experimentalColorGradientControl,{label:(0,a.__)("Background Color","otter-blocks"),colorValue:e.backgroundColor,onColorChange:e=>{t({backgroundColor:e})}}))),p=({attributes:e,progressRef:t,valueRef:l})=>{const o=e.height,a=o/2,r=o/2-e.strokeWidth/2,n=2*Math.PI*r;return 0>r?(0,c.createElement)("div",null):(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter__bar",style:{height:o+"px",width:o+"px"}},(0,c.createElement)("svg",{className:"wp-block-themeisle-blocks-circle-counter-container",width:o,height:o},(0,c.createElement)("circle",{className:"wp-block-themeisle-blocks-circle-counter-bg",cx:a,cy:a,r:r,strokeWidth:e.strokeWidth,style:{stroke:e.backgroundColor}}),(0,c.createElement)("circle",{ref:t,className:"wp-block-themeisle-blocks-circle-counter-progress",cx:a,cy:a,r:r,strokeWidth:e.strokeWidth,strokeDasharray:n,style:{stroke:e.progressColor}}),(0,c.createElement)("text",{ref:l,className:"wp-block-themeisle-blocks-circle-counter-text",x:"50%",y:"50%",style:{fill:e.progressColor,fontSize:e.fontSizePercent+"px"}},e.percentage,"%")))},g=l(5225);const{clamp:h,omit:k}=lodash;var v={to:[{type:"block",blocks:["themeisle-blocks/progress-bar"],transform:e=>{const t=k(e,["titleStyle","height","fontSize","strokeWidth","progressColor"]);return(0,r.createBlock)("themeisle-blocks/progress-bar",{...t,barBackgroundColor:e.progressColor,height:h(e.height/4,0,100),titleStyle:"default"})}}]};(0,r.registerBlockType)("themeisle-blocks/circle-counter",{title:(0,a.__)("Circle Counter","otter-blocks"),description:(0,a.__)("Show your progress with a beautiful Circle Counter block.","otter-blocks"),icon:o.Z,category:"themeisle-blocks",keywords:["progress","circle","counter"],attributes:n,transforms:v,edit:({clientId:e,attributes:t,setAttributes:l,isSelected:o,toggleSelection:r,className:i})=>{(0,c.useEffect)((()=>{const l=(0,g.WX)(e,n);return()=>l(t.id)}),[t.id]);const h=(0,c.useRef)(null),k=(0,c.useRef)(null),[v,y]=(0,c.useState)({}),_=t.height/2-t.strokeWidth/2,w=2*Math.PI*_;(0,c.useEffect)((()=>{if(!h.current||!h.current||0===t.duration)return;const e=t.percentage/(1e3*t.duration),l=(0,d.range)(0,1e3*t.duration+20,20).map((t=>t*e)).reverse();v&&clearInterval(v),h.current.style.strokeDashoffset=w,k.current.innerText="0%";const o=setInterval((()=>{if(!h.current)return void clearInterval(o);const e=Math.round(l.pop());h.current.style.strokeDashoffset=(100-e)/100*w,k.current.innerHTML=e+"%",0===l.length&&clearInterval(o)}),20);y(o)}),[t.duration]),(0,c.useEffect)((()=>{h.current&&h.current&&(h.current.style.strokeDashoffset=(100-t.percentage)/100*w,k.current.innerHTML=t.percentage+"%",clearInterval(v))}),[t.percentage,t.height]);const f=e=>{const o=(t.fontSizePercent||27)/t.height,a=(t.fontSizeTitle||37)/t.height;l({height:e,fontSizePercent:Math.round(e*o),fontSizeTitle:Math.round(e*a)})},C=e=>{l({title:e})};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(u,{attributes:t,setAttributes:l,onHeightChange:f}),(0,c.createElement)("div",{className:s()(i),id:t.id},"default"===t.titleStyle&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,c.createElement)(b.RichText,{tagName:"span",allowedFormats:[],className:"wp-block-themeisle-blocks-circle-counter-title__value",placeholder:o?(0,a.__)("Write caption…","otter-blocks"):null,value:t.title,onChange:C,multiline:!1,style:{color:t.titleColor,fontSize:t.fontSizeTitle+"px"}})),(0,c.createElement)(m.ResizableBox,{size:{height:t.height,width:t.height},minHeight:0,maxHeight:240,enable:{top:!1,right:!1,bottom:!0,left:!1},showHandle:o,onResizeStop:(e,l,o,a)=>{f(parseInt(t.height+a.height,10)),r(!0)},onResizeStart:()=>{r(!1)}},(0,c.createElement)(p,{attributes:t,progressRef:h,valueRef:k})),"bottom"===t.titleStyle&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,c.createElement)(b.RichText,{tagName:"span",allowedFormats:[],className:"wp-block-themeisle-blocks-circle-counter-title__value",placeholder:o?(0,a.__)("Write caption…","otter-blocks"):null,value:t.title,onChange:C,multiline:!1,style:{color:t.titleColor,fontSize:t.fontSizeTitle+"px"}}))))},save:({attributes:e,className:t})=>(0,c.createElement)("div",{className:t,id:e.id,"data-percentage":e.percentage,"data-duration":e.duration,"data-height":e.height,"data-stroke-width":e.strokeWidth,"data-font-size-percent":e.fontSizePercent,"data-background-stroke":e.backgroundColor,"data-progress-stroke":e.progressColor},"default"===e.titleStyle&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,c.createElement)("span",{className:"wp-block-themeisle-blocks-circle-counter-title__value"},e.title)),(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter__bar"}),"bottom"===e.titleStyle&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-circle-counter-title__area"},(0,c.createElement)("span",{className:"wp-block-themeisle-blocks-circle-counter-title__value"},e.title)))})},3954:function(e,t,l){var o=l(2506),a=l(5736),r=l(4981),n={id:{type:"string"},date:{type:"string"},exclude:{type:"array"},backgroundColor:{type:"string"},valueColor:{type:"string"},labelColor:{type:"string"},labelDistance:{type:"number"},gap:{type:"number"},gapTablet:{type:"number"},gapMobile:{type:"number"},width:{type:"number"},widthTablet:{type:"number"},widthMobile:{type:"number"},height:{type:"number"},heightTablet:{type:"number"},heightMobile:{type:"number"},borderRadius:{type:"number",default:0},borderRadiusType:{type:"string",default:"linked"},borderRadiusTopRight:{type:"number",default:0},borderRadiusTopLeft:{type:"number",default:0},borderRadiusBottomRight:{type:"number",default:0},borderRadiusBottomLeft:{type:"number",default:0},borderWidth:{type:"number"},borderWidthTablet:{type:"number"},borderWidthMobile:{type:"number"},borderColor:{type:"string"},valueFontSize:{type:"number"},valueFontSizeTablet:{type:"number"},valueFontSizeMobile:{type:"number"},labelFontSize:{type:"number"},labelFontSizeTablet:{type:"number"},labelFontSizeMobile:{type:"number"},hasSeparators:{type:"boolean"}},c=l(9307),i=l(4333),s=l(9818),d=window.moment,m=l.n(d),b=l(5225),u=l(2175),p=l(5609),g=l(9771),h=l(6993),k=l(2372),v=({attributes:e,setAttributes:t})=>{var l,o,r,n;const i=(0,s.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=e("core/edit-post")?e("core/edit-post"):{__experimentalGetPreviewDeviceType:void 0};return l?l():t()}),[]),d=(l,o)=>{var a;t(l?{exclude:null==e||null===(a=e.exclude)||void 0===a?void 0:a.filter((e=>e!==o))}:{exclude:null!=e&&e.exclude?[...null==e?void 0:e.exclude,o]:[o]})},m=t=>{let l;return"top-right"===t&&(l="linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusTopRight),"top-left"===t&&(l="linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusTopLeft),"bottom-right"===t&&(l="linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusBottomRight),"bottom-left"===t&&(l="linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusBottomLeft),l},b={"top-right":"borderRadiusTopRight","top-left":"borderRadiusTopLeft","bottom-left":"borderRadiusBottomLeft","bottom-right":"borderRadiusBottomRight"},v=(0,g.__experimentalGetSettings)();return(0,c.createElement)(u.InspectorControls,null,(0,c.createElement)(p.PanelBody,{title:(0,a.__)("Time","otter-blocks")},(0,c.createElement)(p.Dropdown,{position:"bottom left",headerTitle:(0,a.__)("Select the date for the deadline","otter-blocks"),renderToggle:({onToggle:t,isOpen:l})=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.Button,{onClick:t,isSecondary:!0,"aria-expanded":l},e.date?(0,g.format)(v.formats.datetime,e.date):(0,a.__)("Select Date","otter-blocks"))),renderContent:()=>(0,c.createElement)(p.DateTimePicker,{currentDate:e.date,onChange:e=>t({date:e})})})),(0,c.createElement)(p.PanelBody,{title:(0,a.__)("Settings","otter-blocks"),initialOpen:!1},(0,c.createElement)(p.ToggleControl,{label:(0,a.__)("Display Days","otter-blocks"),checked:!(null!=e&&null!==(l=e.exclude)&&void 0!==l&&l.includes("day")),onChange:e=>d(e,"day")}),(0,c.createElement)(p.ToggleControl,{label:(0,a.__)("Display Hours","otter-blocks"),checked:!(null!=e&&null!==(o=e.exclude)&&void 0!==o&&o.includes("hour")),onChange:e=>d(e,"hour")}),(0,c.createElement)(p.ToggleControl,{label:(0,a.__)("Display Minutes","otter-blocks"),checked:!(null!=e&&null!==(r=e.exclude)&&void 0!==r&&r.includes("minute")),onChange:e=>d(e,"minute")}),(0,c.createElement)(p.ToggleControl,{label:(0,a.__)("Display Seconds","otter-blocks"),checked:!(null!=e&&null!==(n=e.exclude)&&void 0!==n&&n.includes("second")),onChange:e=>d(e,"second")}),(0,c.createElement)(p.ToggleControl,{label:(0,a.__)("Display Separators","otter-blocks"),checked:null==e?void 0:e.hasSeparators,onChange:e=>t({hasSeparators:e})}),(0,c.createElement)(h.Z,{label:(0,a.__)("Box Spacing","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:"Mobile"===i?e.gapMobile:"Tablet"===i?e.gapTablet:e.gap,onChange:e=>{"Desktop"===i&&t({gap:Number(e)}),"Tablet"===i&&t({gapTablet:Number(e)}),"Mobile"===i&&t({gapMobile:Number(e)})},min:0,max:100})),(0,c.createElement)(h.Z,{label:(0,a.__)("Box Height","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:"Mobile"===i?e.heightMobile:"Tablet"===i?e.heightTablet:e.height,onChange:e=>{"Desktop"===i&&t({height:Number(e)}),"Tablet"===i&&t({heightTablet:Number(e)}),"Mobile"===i&&t({heightMobile:Number(e)})},min:40,max:300})),(0,c.createElement)(h.Z,{label:(0,a.__)("Box Width","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:"Mobile"===i?e.widthMobile:"Tablet"===i?e.widthTablet:e.width,onChange:e=>{"Desktop"===i&&t({width:Number(e)}),"Tablet"===i&&t({widthTablet:Number(e)}),"Mobile"===i&&t({widthMobile:Number(e)})},min:40,max:300})),(0,c.createElement)(h.Z,{label:(0,a.__)("Border Width","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:"Mobile"===i?e.borderWidthMobile:"Tablet"===i?e.borderWidthTablet:e.borderWidth,onChange:e=>{"Desktop"===i&&t({borderWidth:Number(e)}),"Tablet"===i&&t({borderWidthTablet:Number(e)}),"Mobile"===i&&t({borderWidthMobile:Number(e)})},min:0,max:50})),(0,c.createElement)(h.Z,{label:(0,a.__)("Time Value Font Size","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:"Mobile"===i?e.valueFontSizeMobile:"Tablet"===i?e.valueFontSizeTablet:e.valueFontSize,onChange:e=>{"Desktop"===i&&t({valueFontSize:Number(e)}),"Tablet"===i&&t({valueFontSizeTablet:Number(e)}),"Mobile"===i&&t({valueFontSizeMobile:Number(e)})},min:0,max:64})),(0,c.createElement)(h.Z,{label:(0,a.__)("Label Font Size","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:"Mobile"===i?e.labelFontSizeMobile:"Tablet"===i?e.labelFontSizeTablet:e.labelFontSize,onChange:e=>{"Desktop"===i&&t({labelFontSize:Number(e)}),"Tablet"===i&&t({labelFontSizeTablet:Number(e)}),"Mobile"===i&&t({labelFontSizeMobile:Number(e)})},min:0,max:64})),(0,c.createElement)(k.Z,{label:(0,a.__)("Border Radius (%)","otter-blocks"),type:e.borderRadiusType,min:0,max:100,changeType:e=>{t({borderRadiusType:e})},onChange:(l,o)=>{"linked"===e.borderRadiusType?t({borderRadius:o}):t({[b[l]]:o})},options:[{label:(0,a.__)("Top Left","otter-blocks"),type:"top-left",value:m("top-left")},{label:(0,a.__)("Top Right","otter-blocks"),type:"top-right",value:m("top-right")},{label:(0,a.__)("Bottom Right","otter-blocks"),type:"bottom-right",value:m("bottom-right")},{label:(0,a.__)("Bottom Left","otter-blocks"),type:"bottom-left",value:m("bottom-left")}]})),(0,c.createElement)(u.PanelColorSettings,{title:(0,a.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:e.backgroundColor,onChange:e=>{t({backgroundColor:e})},label:(0,a.__)("Background","otter-blocks")},{value:e.labelColor,onChange:e=>{t({labelColor:e})},label:(0,a.__)("Label","otter-blocks")},{value:e.valueColor,onChange:e=>{t({valueColor:e})},label:(0,a.__)("Value","otter-blocks")},{value:e.borderColor,onChange:e=>{t({borderColor:e})},label:(0,a.__)("Border","otter-blocks")}]},(0,c.createElement)(u.ContrastChecker,{textColor:e.backgroundColor,backgroundColor:e.valueColor})))},y=l(4715),_=l(7462),w=l(4184),f=l.n(w);const C=({name:e,value:t,tag:l,styles:o})=>{const a="sep"!==e?{...o.allComponents,...o.mainComponents}:o.allComponents;return(0,c.createElement)("div",{style:a,name:l,className:f()("otter-countdown__display-area",{"is-main-component":"separator"!==l})},(0,c.createElement)("div",{style:o.value,className:"otter-countdown__value"},t),(0,c.createElement)("div",{style:o.label,className:"otter-countdown__label"},e))};var E=({time:e,hasSeparators:t,styles:l})=>{const o=t?(0,y.S3)(e,{name:"sep",value:":",tag:"separator"}):e,a=null==o?void 0:o.map(((e,t)=>(0,c.createElement)(C,(0,_.Z)({},e,{key:t,styles:l}))));return void 0!==e?(0,c.createElement)("div",{className:"otter-countdown__container"},(0,c.createElement)("div",{style:l.display,className:"otter-countdown__display"},a)):(0,c.createElement)(c.Fragment,null)};const T=e=>e?`${e}px`:e;const x=({name:e,value:t,tag:l,key:o})=>(0,c.createElement)("div",{key:o,name:l,className:f()("otter-countdown__display-area",{"is-main-component":"separator"!==l})},(0,c.createElement)("div",{className:"otter-countdown__value"},t),(0,c.createElement)("div",{className:"otter-countdown__label"},e)),M=({time:e,hasSeparators:t})=>{const l=t?(0,y.S3)(e,{name:"sep",value:":",tag:"separator"}):e,o=null==l?void 0:l.map(((e,t)=>(0,c.createElement)(x,(0,_.Z)({},e,{key:t}))));return void 0!==e?(0,c.createElement)("div",{className:"otter-countdown__container"},(0,c.createElement)("div",{className:"otter-countdown__display"},o)):(0,c.createElement)(c.Fragment,null)};(0,r.registerBlockType)("themeisle-blocks/countdown",{title:(0,a.__)("Countdown","otter-blocks"),description:(0,a.__)("Set a countdown for a date.","otter-blocks"),icon:o.Z,category:"themeisle-blocks",keywords:["countdown","time","counter"],supports:{align:["wide","full"]},attributes:n,edit:({attributes:e,setAttributes:t,className:l,clientId:o})=>{const[a,r]=(0,c.useState)(0);(0,c.useEffect)((()=>{const t=(0,b.WX)(o,n);return()=>t(e.id)}),[e.id]),(0,c.useEffect)((()=>{const t=setInterval((()=>{if(e.date){let t=e.date+(0,y.EP)();t=1e3*m()(t).unix(),r(new Date(t)-new Date)}}),500);return()=>{clearInterval(t)}}),[e.date]);const{isViewportAvailable:d,isPreviewDesktop:u,isPreviewTablet:p,isPreviewMobile:g}=(0,s.useSelect)((e=>{const{__experimentalGetPreviewDeviceType:t}=e("core/edit-post")?e("core/edit-post"):{__experimentalGetPreviewDeviceType:void 0};return{isViewportAvailable:!!t,isPreviewDesktop:!!t&&"Desktop"===t(),isPreviewTablet:!!t&&"Tablet"===t(),isPreviewMobile:!!t&&"Mobile"===t()}}),[]),h=(0,i.useViewportMatch)("large",">="),k=(0,i.useViewportMatch)("large","<="),_=(0,i.useViewportMatch)("small",">="),w=(0,i.useViewportMatch)("small","<=");let f,C=h&&!k&&_&&!w,x=!h&&!k&&_&&!w,M=!(h||k||_||w);return d&&!M&&(C=u,x=p,M=g),x?f={value:{color:e.valueColor,fontSize:T(null==e?void 0:e.valueFontSizeTablet)},label:{color:e.labelColor,fontSize:T(null==e?void 0:e.labelFontSizeTablet)},display:{gap:T(e.gapTablet)},allComponents:{height:T(null==e?void 0:e.heightTablet)},mainComponents:{backgroundColor:e.backgroundColor,width:T(null==e?void 0:e.widthTablet),borderWidth:T(e.borderWidthTablet),borderColor:e.borderColor}}:M?f={value:{color:e.valueColor,fontSize:T(e.valueFontSizeMobile)},label:{color:e.labelColor,fontSize:T(e.labelFontSizeMobile)},display:{gap:T(e.gapMobile)},allComponents:{height:T(null==e?void 0:e.heightMobile)},mainComponents:{backgroundColor:e.backgroundColor,width:T(null==e?void 0:e.widthMobile),borderWidth:T(e.borderWidthMobile),borderColor:e.borderColor}}:C&&(f={value:{color:e.valueColor,fontSize:T(e.valueFontSize)},label:{color:e.labelColor,fontSize:T(e.labelFontSize)},display:{gap:T(e.gap)},allComponents:{height:T(e.height)},mainComponents:{backgroundColor:e.backgroundColor,width:T(e.width),borderWidth:T(e.borderWidth),borderColor:e.borderColor}}),f.mainComponents.borderRadius="linked"===e.borderRadiusType?e.borderRadius+"%":`${e.borderRadiusTopLeft}% ${e.borderRadiusTopRight}% ${e.borderRadiusBottomRight}% ${e.borderRadiusBottomLeft}%`,(0,c.createElement)(c.Fragment,null,(0,c.createElement)(v,{attributes:e,setAttributes:t}),(0,c.createElement)("div",{id:e.id,className:l},(0,c.createElement)(E,{time:(0,y.Mg)(a,{exclude:null==e?void 0:e.exclude}),styles:f,hasSeparators:e.hasSeparators})))},save:({attributes:e,className:t})=>(0,c.createElement)("div",{id:e.id,className:t,"data-date":e.date},(0,c.createElement)(M,{time:(0,y.Mg)(0,{exclude:null==e?void 0:e.exclude}),hasSeparators:null==e?void 0:e.hasSeparators}))})},173:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},align:{type:"string"},library:{type:"string",default:"fontawesome"},prefix:{type:"string",default:"fab"},icon:{type:"string",default:"themeisle"},link:{type:"string"},newTab:{type:"boolean",default:!1},fontSize:{type:"number",default:16},padding:{type:"number",default:5},margin:{type:"number",default:5},backgroundColor:{type:"string"},textColor:{type:"string"},borderColor:{type:"string"},backgroundColorHover:{type:"string"},textColorHover:{type:"string"},borderColorHover:{type:"string"},borderSize:{type:"number",default:0},borderRadius:{type:"number",default:0}},c=l(9307);const i={prefix:{type:"string",default:"fab"},icon:{type:"string",default:"themeisle"},fontSize:{type:"number",default:16},padding:{type:"number",default:5},margin:{type:"number",default:5},backgroundColor:{type:"string"},textColor:{type:"string"},borderColor:{type:"string"},borderSize:{type:"number",default:0},borderRadius:{type:"number",default:0}};var s=[{attributes:i,supports:{align:["left","center","right"]},migrate:e=>{let t="center";return e.className.includes("alignleft")&&(t="left"),e.className.includes("aligncenter")&&(t="center"),e.className.includes("alignright")&&(t="right"),{...e,align:t,className:""}},save:({attributes:e,className:t})=>{const l={borderRadius:e.borderRadius+"%",fontSize:e.fontSize+"px",padding:e.padding+"px"},o={color:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderRadius:e.borderRadius+"%",borderStyle:"solid",borderWidth:e.borderSize+"px",display:"inline-block",margin:e.margin+"px"};return(0,c.createElement)("p",{className:t,style:{textAlign:e.align}},(0,c.createElement)("span",{className:`${t}-container`,style:o},(0,c.createElement)("i",{className:`${e.prefix} fa-${e.icon}`,style:l})))}},{attributes:{...i,align:{type:"string"}},save:({attributes:e,className:t})=>{const l={borderRadius:e.borderRadius+"%",fontSize:e.fontSize+"px",padding:e.padding+"px"},o={color:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderRadius:e.borderRadius+"%",borderStyle:"solid",borderWidth:e.borderSize+"px",display:"inline-block",margin:e.margin+"px"};return(0,c.createElement)("p",{className:t,style:{textAlign:e.align}},(0,c.createElement)("span",{className:"undefined-container",style:o},(0,c.createElement)("i",{className:`${e.prefix} fa-${e.icon}`,style:l})))}},{attributes:{...i,id:{type:"string"},align:{type:"string"},link:{type:"string"},newTab:{type:"boolean",default:!1},backgroundColorHover:{type:"string"},textColorHover:{type:"string"},borderColorHover:{type:"string"}},save:({attributes:e,className:t})=>{const l={borderRadius:e.borderRadius+"%",borderStyle:"solid",borderWidth:e.borderSize+"px",display:"inline-block",margin:e.margin+"px"},o={borderRadius:e.borderRadius+"%",fontSize:e.fontSize+"px",padding:e.padding+"px"},a=()=>(0,c.createElement)("i",{className:`${e.prefix} fa-${e.icon}`,style:o});return(0,c.createElement)("p",{className:t,id:e.id,style:{textAlign:e.align}},(0,c.createElement)("span",{className:"wp-block-themeisle-blocks-font-awesome-icons-container",style:l},e.link?(0,c.createElement)("a",{href:e.link,target:e.newTab?"_blank":"_self",style:{color:e.textColor},rel:"noopener noreferrer"},(0,c.createElement)(a,null)):(0,c.createElement)(a,null)))}}],d=l(2175),m=l(8504),b=({attributes:e,setAttributes:t,isSelected:l})=>(0,c.createElement)(d.BlockControls,null,(0,c.createElement)(d.AlignmentToolbar,{value:e.align,onChange:e=>t({align:e})}),(0,c.createElement)(m.Z,{isSelected:l,setAttributes:t,url:e.link,opensInNewTab:e.newTab})),u=l(5609),p=l(6778);const g=(0,c.lazy)((()=>Promise.all([l.e(189),l.e(765)]).then(l.bind(l,3765))));var h=({attributes:e,setAttributes:t})=>{const[l,a]=(0,c.useState)(!1);return(0,c.createElement)(d.InspectorControls,null,(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Icon","otter-blocks")},(0,c.createElement)(c.Suspense,{fallback:(0,c.createElement)(u.Placeholder,null,(0,c.createElement)(u.Spinner,null))},(0,c.createElement)(g,{label:(0,o.__)("Icon Picker","otter-blocks"),library:e.library,prefix:e.prefix,icon:e.icon,changeLibrary:e=>{t({library:e,icon:"fontawesome"===e?"themeisle":"balance",prefix:"fab"})},onChange:e=>{t("object"==typeof e?{icon:e.name,prefix:e.prefix}:{icon:e})}}))),(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Icon Sizes","otter-blocks"),initialOpen:!1},(0,c.createElement)(u.RangeControl,{label:(0,o.__)("Icon Size","otter-blocks"),value:e.fontSize||"",initialPosition:16,onChange:e=>t({fontSize:e}),min:12,max:140}),(0,c.createElement)(u.RangeControl,{label:(0,o.__)("Padding","otter-blocks"),value:e.padding||"",initialPosition:5,onChange:e=>t({padding:e}),min:0,max:100}),(0,c.createElement)(u.RangeControl,{label:(0,o.__)("Margin","otter-blocks"),value:e.margin||"",initialPosition:5,onChange:e=>t({margin:e}),min:0,max:100})),(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1},(0,c.createElement)(u.ButtonGroup,null,(0,c.createElement)(u.Button,{isSmall:!0,isSecondary:l,isPrimary:!l,onClick:()=>a(!1)},(0,o.__)("Normal","otter-blocks")),(0,c.createElement)(u.Button,{isSmall:!0,isSecondary:!l,isPrimary:l,onClick:()=>a(!0)},(0,o.__)("Hover","otter-blocks"))),l?(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.Z,{label:(0,o.__)("Hover Background","otter-blocks"),colorValue:e.backgroundColorHover},(0,c.createElement)(d.ColorPalette,{label:(0,o.__)("Hover Background","otter-blocks"),value:e.backgroundColorHover,onChange:e=>t({backgroundColorHover:e})})),(0,c.createElement)(p.Z,{label:(0,o.__)("Hover Icon","otter-blocks"),colorValue:e.textColorHover},(0,c.createElement)(d.ColorPalette,{label:(0,o.__)("Hover Icon","otter-blocks"),value:e.textColorHover,onChange:e=>t({textColorHover:e})})),(0,c.createElement)(p.Z,{label:(0,o.__)("Hover Border","otter-blocks"),colorValue:e.borderColorHover},(0,c.createElement)(d.ColorPalette,{label:(0,o.__)("Hover Border","otter-blocks"),value:e.borderColorHover,onChange:e=>t({borderColorHover:e})})),(0,c.createElement)(d.ContrastChecker,{textColor:e.textColorHover,backgroundColor:e.backgroundColorHover})):(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.Z,{label:(0,o.__)("Background","otter-blocks"),colorValue:e.backgroundColor},(0,c.createElement)(d.ColorPalette,{label:(0,o.__)("Background","otter-blocks"),value:e.backgroundColor,onChange:e=>t({backgroundColor:e})})),(0,c.createElement)(p.Z,{label:(0,o.__)("Icon","otter-blocks"),colorValue:e.textColor},(0,c.createElement)(d.ColorPalette,{label:(0,o.__)("Icon","otter-blocks"),value:e.textColor,onChange:e=>t({textColor:e})})),(0,c.createElement)(p.Z,{label:(0,o.__)("Border","otter-blocks"),colorValue:e.borderColor},(0,c.createElement)(d.ColorPalette,{label:(0,o.__)("Border","otter-blocks"),value:e.borderColor,onChange:e=>t({borderColor:e})})),(0,c.createElement)(d.ContrastChecker,{textColor:e.textColor,backgroundColor:e.backgroundColor}))),(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Border Settings","otter-blocks"),initialOpen:!1},(0,c.createElement)(u.RangeControl,{label:(0,o.__)("Border Size","otter-blocks"),value:e.borderSize,onChange:e=>t({borderSize:e}),min:0,max:120}),(0,c.createElement)(u.RangeControl,{label:(0,o.__)("Border Radius","otter-blocks"),value:e.borderRadius,onChange:e=>t({borderRadius:e}),min:0,max:100})))},k=l(48),v=l(5225);(0,a.registerBlockType)("themeisle-blocks/font-awesome-icons",{title:(0,o.__)("Icon","otter-blocks"),description:(0,o.__)("Add icons from Font Awesome or ThemeIsle Icons library to your website.","otter-blocks"),icon:r.rL,category:"themeisle-blocks",keywords:["font awesome","dashicons","icons"],attributes:n,deprecated:s,edit:({attributes:e,setAttributes:t,className:l,isSelected:o,clientId:a})=>{(0,c.useEffect)((()=>{const t=(0,v.WX)(a,n);return()=>t(e.id)}),[e.id]);let r={borderRadius:e.borderRadius+"%",fontSize:e.fontSize+"px",padding:e.padding+"px"};"themeisle-icons"===e.library&&(r={fill:e.textColor,padding:e.padding+"px",width:e.fontSize+2*e.padding+2*e.borderSize});const i={color:e.textColor,backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderRadius:e.borderRadius+"%",borderStyle:"solid",borderWidth:e.borderSize+"px",margin:e.margin+"px",width:e.fontSize+2*e.padding+2*e.borderSize},s=k.ZP.icons[e.icon];return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(b,{attributes:e,setAttributes:t,isSelected:o}),(0,c.createElement)(h,{attributes:e,setAttributes:t}),(0,c.createElement)("style",null,`#${e.id} .${l}-container:hover {\n\t\t\t\t\t\tcolor: ${e.textColorHover?e.textColorHover:e.textColor} !important;\n\t\t\t\t\t\tbackground: ${e.backgroundColorHover?e.backgroundColorHover:e.backgroundColor} !important;\n\t\t\t\t\t\tborder-color: ${e.borderColorHover?e.borderColorHover:e.borderColor} !important;\n\t\t\t\t\t}\n\n\t\t\t\t\t#${e.id} .${l}-container:hover svg {\n\t\t\t\t\t\tfill: ${e.textColorHover?e.textColorHover:e.textColor} !important;\n\t\t\t\t\t}`),(0,c.createElement)("p",{className:l,id:e.id,style:{textAlign:e.align}},(0,c.createElement)("span",{className:"wp-block-themeisle-blocks-font-awesome-icons-container",style:i},"themeisle-icons"===e.library?(0,c.createElement)(s,{style:r}):(0,c.createElement)("i",{className:`${e.prefix} fa-${e.icon}`,style:r}))))},save:({attributes:e,className:t})=>{const l=k.ZP.icons[e.icon];return(0,c.createElement)("p",{className:t,id:e.id},(0,c.createElement)("span",{className:"wp-block-themeisle-blocks-font-awesome-icons-container"},e.link?(0,c.createElement)("a",{href:e.link,target:e.newTab?"_blank":"_self",rel:"noopener noreferrer"},"themeisle-icons"===e.library?(0,c.createElement)(l,null):(0,c.createElement)("i",{className:`${e.prefix} fa-${e.icon}`})):"themeisle-icons"===e.library?(0,c.createElement)(l,null):(0,c.createElement)("i",{className:`${e.prefix} fa-${e.icon}`})))}})},2219:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},subject:{type:"string"},emailTo:{type:"string"},optionName:{type:"string"},hasCaptcha:{type:"boolean"},provider:{type:"string",default:""},apiKey:{type:"string"},listId:{type:"string"},action:{type:"string",default:"subscribe"}},c=l(9307),i=l(2819),s=window.wp.api,d=l.n(s),m=l(2175),b=l(9818),u=l(5225),p=l(5609),g=({attributes:e,setAttributes:t})=>{const{createNotice:l}=(0,b.dispatch)("core/notices"),[a,r]=(0,c.useState)(""),[n,i]=(0,c.useState)(""),[s,u]=(0,c.useState)(!0),[g,h]=(0,c.useState)([{label:(0,o.__)("None","otter-blocks"),value:""}]),[k,v]=(0,c.useState)("loading");return(0,c.useEffect)((()=>{e.optionName&&d().loadPromise.then((()=>{(new(d().models.Settings)).fetch().done((t=>{var l,o;null===(l=t.themeisle_blocks_form_emails)||void 0===l||null===(o=l.filter((({form:t})=>t===e.optionName)))||void 0===o||o.forEach((e=>{i(null==e?void 0:e.email),u(!0),r(null==e?void 0:e.email)}))}))}))}),[e.optionName]),(0,c.useEffect)((()=>{var t,a,r,n;e.apiKey&&e.provider&&(t=e.provider,a=e.apiKey,r=t=>{t.splice(0,0,{label:(0,o.__)("None","otter-blocks"),value:""}),h(t),v("ready");const a=1===t.map((({value:e})=>e)).filter((t=>t===e.listId)).length;e.listId&&!a&&l("error",(0,o.__)("The current contact list is invalid! Please choose a new contact list.","otter-blocks"),{isDismissible:!0,type:"snackbar"})},n=e=>{l("error",null==e?void 0:e.error,{isDismissible:!0,type:"snackbar",id:"themeisle-form-server-error"}),v("error")},window.wp.apiFetch({path:"otter/v1/integration",method:"POST",data:{provider:t,apiKey:a}}).then((e=>{if(null!=e&&e.success){var t;const l=(null==e||null===(t=e.list_id)||void 0===t?void 0:t.map((e=>{var t;return{label:e.name,value:null===(t=e.id)||void 0===t?void 0:t.toString()}})))||[];r(l)}else n(e)})).catch((e=>{console.log(e)})))}),[e.provider,e.apiKey]),(0,c.createElement)(m.InspectorControls,null,(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,c.createElement)(p.TextControl,{label:(0,o.__)("Email Subject","otter-blocks"),placeholder:(0,o.__)("A new submission","otter-blocks"),value:e.subject,onChange:e=>t({subject:e}),help:(0,o.__)("Customize the email title send by this form.","otter-blocks")}),(0,c.createElement)(p.TextControl,{label:(0,o.__)("Email To","otter-blocks"),placeholder:(0,o.__)("Default is to admin site","otter-blocks"),value:n,onChange:e=>i(e),help:(0,o.__)("Send form data to another email. (Admin is default).","otter-blocks")}),(0,c.createElement)(p.Button,{isPrimary:!0,onClick:()=>{(new(d().models.Settings)).fetch().done((t=>{const a=t.themeisle_blocks_form_emails?t.themeisle_blocks_form_emails:[];let c=!0,i=!1;if(null==a||a.forEach((({form:t},l)=>{t===e.optionName&&(a[l].email!==n&&(a[l].email=n,i=!0),c=!1)})),c&&a.push({form:e.optionName,email:n}),c||i){const t=new(d().models.Settings)({themeisle_blocks_form_emails:a});u(!1),t.save().then((t=>{var a;null===(a=t.themeisle_blocks_form_emails)||void 0===a||a.filter((({form:t})=>t===e.optionName)).forEach((e=>{u(!0),r(null==e?void 0:e.email),l("info",(0,o.__)("Email has been saved!","otter-blocks"),{isDismissible:!0,type:"snackbar"})}))}))}}))},disabled:n===a},(0,c.createElement)(c.Fragment,null,!s&&(0,c.createElement)(p.Spinner,null),(0,o.__)("Save","otter-blocks"))),(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Add captcha checkbox","otter-blocks"),checked:e.hasCaptcha,onChange:e=>t({hasCaptcha:e}),help:(0,o.__)("Add Google reCaptcha V2 for protection againts bots.","otter-blocks")}),e.hasCaptcha&&(0,o.__)("You can change the API Keys in Settings > Otter","otter-blocks")),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Integration","otter-blocks"),initialOpen:!1},(0,o.__)("Add your client email to a Digital Marketing provider.","otter-blocks"),(0,c.createElement)("br",null)," ",(0,c.createElement)("br",null),(0,c.createElement)("b",null," ",(0,o.__)("You need to have at least one email field in your form. For multiple email fields, only the first will be used.","otter-blocks")," "),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Provider","otter-blocks"),value:e.provider,options:[{label:(0,o.__)("None","otter-blocks"),value:""},{label:(0,o.__)("Mailchimp","otter-blocks"),value:"mailchimp"},{label:(0,o.__)("Sendinblue","otter-blocks"),value:"sendinblue"}],onChange:e=>{t({provider:e,apiKey:"",listId:""})}}),e.provider&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.TextControl,{label:(0,o.__)("API Key","otter-blocks"),help:(0,o.__)("You can find the key in the provider's website","otter-blocks"),value:e.apiKey,onChange:e=>{v("loading"),h([]),t({apiKey:e,listId:""})}}),e.apiKey&&2>g.length&&"loading"===k&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.Spinner,null),(0,o.__)("Fetching data from provider.","otter-blocks")),e.apiKey&&"ready"===k&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Contact List","otter-blocks"),value:e.listId,options:g,onChange:e=>t({listId:e})}),2<=(null==g?void 0:g.length)&&e.listId&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Action","otter-blocks"),value:e.action,options:[{label:(0,o.__)("None","otter-blocks"),value:""},{label:(0,o.__)("Subscribe","otter-blocks"),value:"subscribe"},{label:(0,o.__)("Submit & Subscribe","otter-blocks"),value:"submit-subscribe"}],onChange:e=>t({action:e})}),"submit-subscribe"===e.action&&(0,o.__)("This action will add the client to the contact list and send a separata email with the form data to administrator or to the email mentioned in 'Form to' field. A checkbox for data-sharing consent with third-party will be added on form.","otter-blocks"))))))},h=({className:e,isAPILoaded:t,isAPISaved:l,isSaving:a,saveAPIKey:r,siteKey:n,secretKey:i,setSiteKey:s,setSecretKey:d})=>t?l?void 0:(0,c.createElement)(p.Placeholder,{icon:"admin-site",label:(0,o.__)("Google reCaptcha","otter-blocks"),instructions:(0,o.__)("A Google reCaptcha V2 API keys are required, please enter one below.","otter-blocks"),className:e},(0,c.createElement)("div",{className:"components-placeholder__actions"},(0,c.createElement)(p.TextControl,{type:"text",label:(0,o.__)("Site Key","otter-blocks"),value:n,className:"components-placeholder__input",onChange:s}),(0,c.createElement)(p.TextControl,{type:"text",label:(0,o.__)("Secret Key","otter-blocks"),value:i,className:"components-placeholder__input",onChange:d}),(0,c.createElement)(p.Button,{isPrimary:!0,type:"submit",onClick:r,isBusy:a,disabled:""===n||""===i},(0,o.__)("Save","otter-blocks"))),(0,c.createElement)("div",{className:"components-placeholder__learn-more"},(0,o.__)("You need to activate reCaptcha API.","otter-blocks")," ",(0,c.createElement)(p.ExternalLink,{href:"http://www.google.com/recaptcha/admin"},(0,o.__)("Need an API key? Get one here.","otter-blocks")))):(0,c.createElement)(c.Fragment,null,(0,c.createElement)("br",null),(0,c.createElement)(p.Placeholder,null,(0,c.createElement)("div",null,(0,c.createElement)(p.Spinner,null),(0,o.__)("Checking the API Keys for reCaptcha","otter-blocks")))),k=l(4184),v=l.n(k);(0,a.registerBlockType)("themeisle-blocks/form",{title:(0,o.__)("Form","otter-blocks"),description:(0,o.__)("Display a form for your clients.","otter-blocks"),icon:r.XQ,category:"themeisle-blocks",keywords:["business","form","email"],attributes:n,supports:{align:["wide","full"]},edit:({attributes:e,setAttributes:t,className:l,clientId:r,name:s})=>{const[p,k]=(0,c.useState)(""),[v,y]=(0,c.useState)(""),[_,w]=(0,c.useState)(!1),[f,C]=(0,c.useState)(!1),E=(0,c.useRef)(null),[T,x]=(0,c.useState)(!1),{insertBlock:M,removeBlock:S}=(0,b.useDispatch)("core/block-editor"),{replaceInnerBlocks:B}=(0,b.useDispatch)("core/block-editor"),{createNotice:z}=(0,b.dispatch)("core/notices"),P=(0,b.useSelect)((e=>0<e("core/block-editor").getBlocks(r).length),[r]),{blockType:N,defaultVariation:R,variations:V}=(0,b.useSelect)((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:o}=e("core/blocks");return{blockType:l(s),defaultVariation:o(s,"block"),variations:t(s,"block")}}),[s]),L=(0,b.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t(r).innerBlocks}));(0,c.useEffect)((()=>{const t=(0,u.WX)(r,n);return()=>t(e.id)}),[e.id]),(0,c.useEffect)((()=>{var l;e.id&&(0,b.select)("core/edit-widgets")?t({optionName:`widget_${e.id.slice(-8)}`}):e.id&&Boolean(window.themeisleGutenberg.isBlockEditor)&&null!==(l=(0,b.select)("core/editor"))&&void 0!==l&&l.getCurrentPostId()&&t({optionName:`${(0,b.select)("core/editor").getCurrentPostId()}_${e.id.slice(-8)}`})}),[e.id]),(0,c.useEffect)((()=>{if(L){const e=L.filter((({name:e})=>"themeisle-blocks/form-nonce"===e));if(2<=(null==e?void 0:e.length))e.slice(1).forEach((e=>{S(e.clientId,!1)}));else if(0===(null==e?void 0:e.length)&&r){const e=(0,a.createBlock)("themeisle-blocks/form-nonce");e&&(null==M||M(e,(null==L?void 0:L.length)||0,r,!1))}}}),[L]),(0,c.useEffect)((()=>{d().loadPromise.then((()=>{E.current=new(d().models.Settings),x(!0)}))}),[]),(0,c.useEffect)((()=>{var t;void 0!==e.hasCaptcha&&(null==E||null===(t=E.current)||void 0===t||t.fetch().done((t=>{const l=t.themeisle_blocks_form_emails?t.themeisle_blocks_form_emails:[];let a=!0,r=!1;null==l||l.forEach((({form:t},o)=>{t===e.optionName&&(l[o].hasCaptcha!==e.hasCaptcha&&(r=!0),l[o].hasCaptcha=e.hasCaptcha,a=!1)})),a&&l.push({form:e.optionName,hasCaptcha:e.hasCaptcha}),(a||r)&&(new(d().models.Settings)({themeisle_blocks_form_emails:l}).save(),z("info",(0,o.__)("Form preference has been saved.","otter-blocks"),{isDismissible:!0,type:"snackbar"}))})))}),[e.hasCaptcha,E.current]),(0,c.useEffect)((()=>{T&&e.hasCaptcha&&!f&&(async()=>{var e;_||null==E||null===(e=E.current)||void 0===e||e.fetch().then((e=>{w(!0),""!==e.themeisle_google_captcha_api_site_key&&""!==e.themeisle_google_captcha_api_secret_key&&C(!0)}))})()}),[T,_,f,e.hasCaptcha]),(0,c.useEffect)((()=>{var t;null==E||null===(t=E.current)||void 0===t||t.fetch().done((t=>{const l=t.themeisle_blocks_form_emails?t.themeisle_blocks_form_emails:[];let a=!0,r=!1,n=!1;null==l||l.forEach((({form:t},o)=>{var c;t===e.optionName&&(null!==(c=l[o])&&void 0!==c&&c.integration||(l[o].integration={}),r=l[o].integration.provider!==e.provider||l[o].integration.apiKey!==e.apiKey||l[o].integration.listId!==e.listId||l[o].integration.action!==e.action,a=!1,n=e.apiKey&&(l[o].integration.listId!==e.listId||l[o].integration.action!==e.action),l[o].integration.provider=e.provider,l[o].integration.apiKey=e.apiKey,l[o].integration.listId=e.listId,l[o].integration.action=e.action)})),a&&l.push({form:e.optionName,integration:{provider:e.provider,apiKey:e.apiKey,listId:e.listId,action:e.action}}),(a||r)&&new(d().models.Settings)({themeisle_blocks_form_emails:l}).save().then((()=>{n&&z("info",(0,o.__)("Integration details have been saved.","otter-blocks"),{isDismissible:!0,type:"snackbar"})}))}))}),[e.optionName,e.provider,e.apiKey,e.listId,e.action,E.current]);const H=e.provider&&e.apiKey&&e.listId;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(g,{attributes:e,setAttributes:t}),(0,c.createElement)("div",{className:l,id:e.id},P?(0,c.createElement)("div",{className:"otter-form__container"},(0,c.createElement)(m.InnerBlocks,null),e.hasCaptcha&&(!_||!f)&&(0,c.createElement)(h,{className:"otter-form-captcha",isAPILoaded:_,isAPISaved:f,saveAPIKey:()=>{new window.wp.api.models.Settings({themeisle_google_captcha_api_site_key:p,themeisle_google_captcha_api_secret_key:v}).save().then((e=>{let t=!1;""!==e.themeisle_google_captcha_api_site_key&&""!==e.themeisle_google_captcha_api_secret_key&&(t=!0),C(t),y(""),k(""),z("info",(0,o.__)("API Keys have been saved.","otter-blocks"),{isDismissible:!0,type:"snackbar"})}))},siteKey:p,secretKey:v,setSiteKey:k,setSecretKey:y}),(0,c.createElement)("div",{className:"wp-block-button"},(0,c.createElement)("button",{className:"wp-block-button__link"},H&&"subscribe"===e.action?(0,o.__)("Subscribe","otter-blocks"):(0,o.__)("Submit","otter-blocks")))):(0,c.createElement)(m.__experimentalBlockVariationPicker,{icon:(0,i.get)(N,["icon","src"]),label:(0,i.get)(N,["title"]),variations:V,onSelect:(e=R)=>{e&&B(r,(0,a.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0)},allowSkip:!0})))},save:({attributes:e,className:t})=>{const l=e.provider&&e.apiKey&&e.listId;return(0,c.createElement)("div",{id:e.id,className:v()(t,{"is-subscription":l&&"subscribe"===e.action,"can-submit-and-subscribe":l&&"submit-subscribe"===e.action,"has-captcha":e.hasCaptcha}),"data-email-subject":e.subject,"data-option-name":e.optionName},(0,c.createElement)("div",{className:"otter-form__container"},(0,c.createElement)(m.InnerBlocks.Content,null),(0,c.createElement)("div",{className:"wp-block-button"},(0,c.createElement)("button",{className:"wp-block-button__link"},"subscribe"===e.action?(0,o.__)("Subscribe","otter-blocks"):(0,o.__)("Submit","otter-blocks")))))},variations:[{name:"themeisle-blocks/form-contact",description:(0,o.__)("Contact form for clients","otter-blocks"),icon:r.XQ,title:(0,o.__)("Contact Form","otter-blocks"),innerBlocks:[["themeisle-blocks/form-input",{label:(0,o.__)("Name","otter-blocks"),type:"text",isRequired:!0}],["themeisle-blocks/form-input",{label:(0,o.__)("Email","otter-blocks"),type:"email",isRequired:!0}],["themeisle-blocks/form-textarea",{label:(0,o.__)("Message","otter-blocks")}],["core/paragraph",{content:(0,o.__)("You agree to receive email communication from us by submitting this form and understand that your contact information will be stored with us.","otter-blocks"),fontSize:"extra-small"}]]},{name:"themeisle-blocks/form-subscribe",description:(0,o.__)("Add the clients to your subscription list","otter-blocks"),icon:r.XQ,title:(0,o.__)("Subscribe Form","otter-blocks"),innerBlocks:[["themeisle-blocks/form-input",{label:(0,o.__)("Name","otter-blocks"),type:"text",isRequired:!0}],["themeisle-blocks/form-input",{label:(0,o.__)("Email","otter-blocks"),type:"email",isRequired:!0}],["core/paragraph",{content:(0,o.__)("You agree to receive email communication from us by submitting this form and understand that your contact information will be stored with us.","otter-blocks"),fontSize:"extra-small"}]]}]})},2124:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},type:{type:"string",default:"text"},label:{type:"string"},placeholder:{type:"string"},isRequired:{type:"boolean"},mappedName:{type:"string"}},c=l(9307),i=l(2175),s=l(5225),d=l(5609),m=({attributes:e,setAttributes:t})=>(0,c.createElement)(i.InspectorControls,null,(0,c.createElement)(d.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,c.createElement)(d.SelectControl,{label:(0,o.__)("Field Type","otter-blocks"),value:e.type,options:[{label:(0,o.__)("Text","otter-blocks"),value:"text"},{label:(0,o.__)("Email","otter-blocks"),value:"email"},{label:(0,o.__)("Date","otter-blocks"),value:"date"},{label:(0,o.__)("Number","otter-blocks"),value:"number"}],onChange:e=>t({type:e})}),(0,c.createElement)(d.TextControl,{label:(0,o.__)("Label","otter-blocks"),value:e.label,onChange:e=>t({label:e})}),(0,c.createElement)(d.TextControl,{label:(0,o.__)("Placeholder","otter-blocks"),value:e.placeholer,onChange:e=>t({placeholder:e})}),(0,c.createElement)(d.ToggleControl,{label:(0,o.__)("Is this field required?","otter-blocks"),help:(0,o.__)("If true, the input field must be filled out before submitting the form.","otter-blocks"),checked:e.isRequired,onChange:e=>t({isRequired:e})})));(0,a.registerBlockType)("themeisle-blocks/form-input",{title:(0,o.__)("Text Field","otter-blocks"),description:(0,o.__)("Display a contact form for your clients.","otter-blocks"),icon:r.Bd,parent:["themeisle-blocks/form"],category:"themeisle-blocks",keywords:["input","text","email"],attributes:n,supports:{align:["wide","full"]},variations:[{name:"themeisle-blocks/form-input-email",description:(0,o.__)("Insert an email field","otter-blocks"),icon:"email",title:(0,o.__)("Email Field","otter-blocks"),attributes:{type:"email"}},{name:"themeisle-blocks/form-input-number",description:(0,o.__)("Insert a number field","otter-blocks"),icon:"calculator",title:(0,o.__)("Number Field","otter-blocks"),attributes:{type:"number"}},{name:"themeisle-blocks/form-input-date",description:(0,o.__)("Insert a date field","otter-blocks"),icon:"calendar-alt",title:(0,o.__)("Date Field","otter-blocks"),attributes:{type:"date"}}],edit:({attributes:e,setAttributes:t,className:l,clientId:a})=>((0,c.useEffect)((()=>{const t=(0,s.WX)(a,n);return()=>t(e.id)}),[e.id]),(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m,{attributes:e,setAttributes:t}),(0,c.createElement)("div",{className:l},(0,c.createElement)("label",{htmlFor:e.id,className:"otter-form-input-label"},(0,c.createElement)(i.RichText,{placeholder:(0,o.__)("Type here…","otter-blocks"),className:"otter-form-input-label__label",value:e.label,onChange:e=>t({label:e}),tagName:"span"}),e.isRequired&&(0,c.createElement)("span",{className:"required"},(0,o.__)("(required)","otter-blocks"))),(0,c.createElement)("input",{type:e.type,placeholder:e.placeholder,name:e.id,id:e.id,required:e.isRequired,disabled:!0,className:"otter-form-input components-text-control__input"})))),save:({attributes:e,className:t})=>(0,c.createElement)("div",{className:t},(0,c.createElement)("label",{htmlFor:e.id,className:"otter-form-input-label"},(0,c.createElement)(i.RichText.Content,{value:e.label,className:"otter-form-input-label__label",tagName:"span"}),e.isRequired&&(0,c.createElement)("span",{className:"required"},(0,o.__)("(required)","otter-blocks"))),(0,c.createElement)("input",{type:e.type,name:e.mappedName,id:e.id,required:e.isRequired,placeholder:e.placeholder,className:"otter-form-input"}))})},315:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9818),c=l(9307);(0,a.registerBlockType)("themeisle-blocks/form-nonce",{title:(0,o.__)("Nonce Field","otter-blocks"),description:(0,o.__)("Protect the form from CSRF.","otter-blocks"),icon:r.Bd,parent:["themeisle-blocks/form"],category:"themeisle-blocks",keywords:["protection","csrf","field"],attributes:{formId:{type:"string"}},supports:{align:["wide","full"],inserter:!1},edit:({setAttributes:e,clientId:t})=>{const{parent:l}=(0,n.useSelect)((e=>{const{getBlock:l,getBlockRootClientId:o}=e("core/block-editor");return{parent:l(o(t))}}));return(0,c.useEffect)((()=>{l&&e({formId:l.attributes.id})}),[l]),null},save:()=>null})},6950:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},label:{type:"string"},placeholder:{type:"string"},isRequired:{type:"boolean"},mappedName:{type:"string"}},c=l(9307),i=l(2175),s=l(5225),d=l(5609),m=({attributes:e,setAttributes:t})=>(0,c.createElement)(i.InspectorControls,null,(0,c.createElement)(d.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,c.createElement)(d.TextControl,{label:(0,o.__)("Label","otter-blocks"),value:e.label,onChange:e=>t({label:e})}),(0,c.createElement)(d.TextControl,{label:(0,o.__)("Placeholder","otter-blocks"),value:e.placeholer,onChange:e=>t({placeholder:e})}),(0,c.createElement)(d.ToggleControl,{label:(0,o.__)("Is this field required?","otter-blocks"),help:(0,o.__)("If true, the input field must be filled out before submitting the form.","otter-blocks"),checked:e.isRequired,onChange:e=>t({isRequired:e})})));(0,a.registerBlockType)("themeisle-blocks/form-textarea",{title:(0,o.__)("Textarea Field","otter-blocks"),description:(0,o.__)("Display a contact form for your clients.","otter-blocks"),icon:r.Bd,parent:["themeisle-blocks/form"],category:"themeisle-blocks",keywords:["textarea","message","input"],attributes:n,supports:{align:["wide","full"]},edit:({attributes:e,setAttributes:t,className:l,clientId:a})=>((0,c.useEffect)((()=>{const t=(0,s.WX)(a,n);return()=>t(e.id)}),[e.id]),(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m,{attributes:e,setAttributes:t}),(0,c.createElement)("div",{className:l},(0,c.createElement)("label",{htmlFor:e.id,className:"otter-form-textarea-label"},(0,c.createElement)(i.RichText,{placeholder:(0,o.__)("Type here…","otter-blocks"),className:"otter-form-textarea-label__label",value:e.label,onChange:e=>t({label:e}),tagName:"span"}),e.isRequired&&(0,c.createElement)("span",{className:"required"},(0,o.__)("(required)","otter-blocks"))),(0,c.createElement)("textarea",{placeholder:e.placeholder,name:e.id,id:e.id,required:e.isRequired,disabled:!0,rows:10,className:"otter-form-textarea-input components-textarea-control__input"})))),save:({attributes:e,className:t})=>(0,c.createElement)("div",{className:t},(0,c.createElement)("label",{htmlFor:e.id,className:"otter-form-textarea-label"},(0,c.createElement)(i.RichText.Content,{value:e.label,className:"otter-form-textarea-label__label",tagName:"span"}),e.isRequired&&(0,c.createElement)("span",{className:"required"},(0,o.__)("(required)","otter-blocks"))),(0,c.createElement)("textarea",{name:e.mappedName,id:e.id,required:e.isRequired,placeholder:e.placeholder,rows:10,className:"otter-form-textarea-input"}))})},5530:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},style:{type:"string",default:"standard"},location:{type:"string",default:"La Sagrada Familia, Barcelona, Spain"},latitude:{type:"string"},longitude:{type:"string"},type:{type:"string",default:"roadmap"},zoom:{type:"number",default:15},height:{type:"number",default:400},draggable:{type:"boolean",default:!0},mapTypeControl:{type:"boolean",default:!0},zoomControl:{type:"boolean",default:!0},fullscreenControl:{type:"boolean",default:!0},streetViewControl:{type:"boolean",default:!0},markers:{type:"array",default:[]}},c=l(9307),i=l(4184),s=l.n(i),d=l(4586),m=l(5609),b=({className:e,api:t,isAPILoaded:l,isAPISaved:a,isSaving:r,changeAPI:n,saveAPIKey:i})=>l?a?void 0:(0,c.createElement)(m.Placeholder,{icon:"admin-site",label:(0,o.__)("Google Maps","otter-blocks"),instructions:(0,o.__)("A Google Maps API key is required, please enter one below.","otter-blocks"),className:e},(0,c.createElement)("div",{className:"components-placeholder__actions"},(0,c.createElement)(m.TextControl,{type:"text",placeholder:(0,o.__)("Google Maps API Key","otter-blocks"),value:t,className:"components-placeholder__input",onChange:n}),(0,c.createElement)(m.Button,{isPrimary:!0,type:"submit",onClick:i,isBusy:r,disabled:""===t},(0,o.__)("Save","otter-blocks"))),(0,c.createElement)("div",{className:"components-placeholder__learn-more"},(0,o.__)("You need to activate Maps and Places API.","otter-blocks")," ",(0,c.createElement)(m.ExternalLink,{href:"https://developers.google.com/maps/documentation/javascript/get-api-key"},(0,o.__)("Need an API key? Get one here.","otter-blocks")))):(0,c.createElement)(m.Placeholder,null,(0,c.createElement)(m.Spinner,null),(0,o.__)("Loading…","otter-blocks")),u=l(2175),p=l(5241),g=l(4333);const h=({value:e,onChange:t})=>{const l=(0,g.useInstanceId)(h);(0,c.useEffect)((()=>{window.wp.oldEditor.initialize(r.current.id,{tinymce:{classic_block_editor:!0,plugins:"lists,media,paste,tabfocus,wordpress,wpautoresize,wpeditimage,wpgallery,wplink,wpdialogs,wptextpattern,wpview",toolbar1:"formatselect,bold,italic,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,spellchecker,wp_add_media"}});const e=window.tinymce.get(r.current.id);return e.on("change",(()=>t(e.getContent()))),()=>window.wp.oldEditor.remove(r.current.id)}),[]);const a=`inspector-textarea-control-${l}`,r=(0,c.useRef)(null);return(0,c.createElement)(m.BaseControl,{id:a,label:(0,o.__)("Description","otter-blocks")},(0,c.createElement)("textarea",{id:a,className:"components-textarea-control__input",rows:4,value:e,onChange:e=>t(e.target.value),ref:r}))};var k=h,v=({marker:e,isOpen:t,isPlaceAPIAvailable:l,openMarker:a,removeMarker:r,changeMarkerProp:n})=>{const i=(0,c.useRef)(null);return(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-google-map-marker"},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-google-map-marker-title-area"},(0,c.createElement)(m.Button,{className:"wp-block-themeisle-blocks-google-map-marker-title",onClick:()=>a(e.id)},e.title||(0,o.__)("Custom Marker","otter-blocks")),(0,c.createElement)(m.Button,{icon:"no-alt",label:(0,o.__)("Remove Marker","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-google-map-marker-remove",onClick:()=>r(e.id)})),(0,c.createElement)("div",{className:s()("wp-block-themeisle-blocks-google-map-marker-control-area",{opened:e.id===t})},(0,c.createElement)(m.BaseControl,{label:(0,o.__)("Location","otter-blocks"),id:`themeisle-location-search-${e.id}`},(0,c.createElement)("input",{type:"text",id:`themeisle-location-search-${e.id}`,placeholder:(0,o.__)("Enter a location…","otter-blocks"),value:e.location,className:"wp-block-themeisle-blocks-google-map-search",ref:i,onFocus:()=>{const t=document.getElementsByClassName("pac-container");Object.keys(t).forEach((e=>t[e].remove()));const l=new window.google.maps.places.SearchBox(i.current);l.addListener("places_changed",(()=>{const t=l.getPlaces();t&&0<t.length&&t.forEach((t=>{const l=t.formatted_address||t.name,o=t.geometry.location.lat(),a=t.geometry.location.lng();n(e.id,"location",l),n(e.id,"latitude",o),n(e.id,"longitude",a)}))}))},onChange:t=>n(e.id,"location",t.target.value),disabled:!l}),!l&&(0,c.createElement)("p",null,(0,o.__)("To enable locations earch, please ensure Places API is activated in the Google Developers Console.","otter-blocks")+" ",(0,c.createElement)(m.ExternalLink,{href:"https://developers.google.com/places/web-service/intro"},(0,o.__)("More info.","otter-blocks")))),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",value:e.latitude,onChange:t=>n(e.id,"latitude",t)}),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",value:e.longitude,onChange:t=>n(e.id,"longitude",t)}),(0,c.createElement)(m.SelectControl,{label:(0,o.__)("Map Icon","otter-blocks"),value:e.icon||"https://maps.google.com/mapfiles/ms/icons/red-dot.png",options:[{label:(0,o.__)("Red","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/red-dot.png"},{label:(0,o.__)("Blue","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/blue-dot.png"},{label:(0,o.__)("Yellow","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/yellow-dot.png"},{label:(0,o.__)("Green","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/green-dot.png"},{label:(0,o.__)("Orange","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/orange-dot.png"}],onChange:t=>n(e.id,"icon",t)}),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",value:e.title,onChange:t=>n(e.id,"title",t)}),(0,c.createElement)(k,{label:(0,o.__)("Description","otter-blocks"),type:"text",value:e.description,onChange:t=>n(e.id,"description",t)})))},y=({initialOpen:e,markers:t,isPlaceAPIAvailable:l,addMarker:a,removeMarker:r,changeMarkerProp:n})=>{(0,c.useEffect)((()=>{!1!==e&&s(e)}),[e]);const[i,s]=(0,c.useState)(null),d=e=>{i===e&&(e=null),s(e)};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-google-map-marker-group"},t.map((e=>(0,c.createElement)(v,{key:e.id,marker:e,isOpen:i,isPlaceAPIAvailable:l,openMarker:d,removeMarker:r,changeMarkerProp:n})))),(0,c.createElement)(m.Button,{isSecondary:!0,className:"wp-block-themeisle-blocks-google-map-marker-add",onClick:a},(0,o.__)("Add Marker","otter-blocks")))},_=({attributes:e,setAttributes:t,map:l,changeStyle:a,isPlaceAPIAvailable:r,isMarkerOpen:n,setMarkerOpen:i,removeMarker:s,changeMarkerProp:d,addMarkerManual:b,api:g,isSaving:h,changeAPI:k,saveAPIKey:v})=>{const _=(0,c.useRef)(null);return(0,c.createElement)(u.InspectorControls,null,(0,c.createElement)(m.PanelBody,{title:(0,o.__)("Styles","otter-blocks"),initialOpen:!1},(0,c.createElement)(p.V,{value:e.style,options:[{label:(0,o.__)("Standard","otter-blocks"),value:"standard",image:window.themeisleGutenberg.assetsPath+"/icons/map-standard.png"},{label:(0,o.__)("Silver","otter-blocks"),value:"silver",image:window.themeisleGutenberg.assetsPath+"/icons/map-silver.png"},{label:(0,o.__)("Retro","otter-blocks"),value:"retro",image:window.themeisleGutenberg.assetsPath+"/icons/map-retro.png"},{label:(0,o.__)("Dark","otter-blocks"),value:"dark",image:window.themeisleGutenberg.assetsPath+"/icons/map-dark.png"},{label:(0,o.__)("Night","otter-blocks"),value:"night",image:window.themeisleGutenberg.assetsPath+"/icons/map-night.png"},{label:(0,o.__)("Aubergine","otter-blocks"),value:"aubergine",image:window.themeisleGutenberg.assetsPath+"/icons/map-aubergine.png"}],onChange:a})),(0,c.createElement)(m.PanelBody,{title:(0,o.__)("Location","otter-blocks")},(0,c.createElement)(m.BaseControl,{label:(0,o.__)("Location"),id:"wp-block-themeisle-blocks-google-map-search"},(0,c.createElement)("input",{type:"text",id:"wp-block-themeisle-blocks-google-map-search",placeholder:(0,o.__)("Enter a location…","otter-blocks"),value:e.location,className:"wp-block-themeisle-blocks-google-map-search",ref:_,onFocus:()=>{const e=document.getElementsByClassName("pac-container");Object.keys(e).forEach((t=>e[t].remove()));const o=new window.google.maps.places.SearchBox(_.current);o.addListener("places_changed",(()=>{const e=o.getPlaces();e&&0<e.length&&e.forEach((e=>{const o=e.geometry.location.lat(),a=e.geometry.location.lng(),r=new window.google.maps.LatLng(o,a);l.setCenter(r),t({location:e.formatted_address||e.name,latitude:o.toString(),longitude:a.toString()})}))}))},onChange:e=>{t({location:e.target.value})},disabled:!r}),!r&&(0,c.createElement)("p",null,(0,o.__)("To enable locations earch, please ensure Places API is activated in the Google Developers Console.","otter-blocks")+" ",(0,c.createElement)(m.ExternalLink,{href:"https://developers.google.com/places/web-service/intro"},(0,o.__)("More info.","otter-blocks")))),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter latitude…","otter-blocks"),value:e.latitude,onChange:o=>{t({latitude:o.toString()});const a=Number(o),r=e.longitude,n=new window.google.maps.LatLng(a,r);l.setCenter(n)}}),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter longitude","otter-blocks"),value:e.longitude,onChange:o=>{t({longitude:o.toString()});const a=e.latitude,r=Number(o),n=new window.google.maps.LatLng(a,r);l.setCenter(n)}})),(0,c.createElement)(m.PanelBody,{title:(0,o.__)("Positioning & Zooming","otter-blocks"),initialOpen:!1},(0,c.createElement)(m.SelectControl,{label:(0,o.__)("Map Type","otter-blocks"),value:e.type,options:[{label:(0,o.__)("Road Map","otter-blocks"),value:"roadmap"},{label:(0,o.__)("Satellite View","otter-blocks"),value:"satellite"},{label:(0,o.__)("Hybrid","otter-blocks"),value:"hybrid"},{label:(0,o.__)("Terrain","otter-blocks"),value:"terrain"}],onChange:e=>{t({type:e}),l.setMapTypeId(window.google.maps.MapTypeId[e.toUpperCase()])}}),(0,c.createElement)(m.RangeControl,{label:(0,o.__)("Map Zoom Level","otter-blocks"),value:e.zoom,onChange:e=>{t({zoom:e}),l.setZoom(e)},min:0,max:20}),(0,c.createElement)(m.RangeControl,{label:(0,o.__)("Map Height","otter-blocks"),value:e.height,onChange:e=>{t({height:e})},min:100,max:1400})),(0,c.createElement)(m.PanelBody,{title:(0,o.__)("Controls","otter-blocks"),initialOpen:!1},(0,c.createElement)(m.BaseControl,null,(0,o.__)("The following changes will not affect block preview during the editing process. You can click outside the block to see the changes take effect.","otter-blocks")),(0,c.createElement)(m.ToggleControl,{label:(0,o.__)("Draggable Map","otter-blocks"),checked:e.draggable,onChange:()=>{t({draggable:!e.draggable})}}),(0,c.createElement)(m.ToggleControl,{label:(0,o.__)("Map Type Control","otter-blocks"),checked:e.mapTypeControl,onChange:()=>{t({mapTypeControl:!e.mapTypeControl})}}),(0,c.createElement)(m.ToggleControl,{label:(0,o.__)("Zoom Control","otter-blocks"),checked:e.zoomControl,onChange:()=>{t({zoomControl:!e.zoomControl})}}),(0,c.createElement)(m.ToggleControl,{label:(0,o.__)("Full Screen Control","otter-blocks"),checked:e.fullscreenControl,onChange:()=>{t({fullscreenControl:!e.fullscreenControl})}}),(0,c.createElement)(m.ToggleControl,{label:(0,o.__)("Streen View Control","otter-blocks"),checked:e.streetViewControl,onChange:()=>{t({streetViewControl:!e.streetViewControl})}})),(0,c.createElement)(m.PanelBody,{title:(0,o.__)("Markers","otter-blocks"),initialOpen:!1,opened:!1!==n||void 0,onToggle:()=>{!1!==n&&i(!0)}},(0,c.createElement)(y,{markers:e.markers,removeMarker:s,changeMarkerProp:d,addMarker:b,isPlaceAPIAvailable:r,initialOpen:n})),(0,c.createElement)(m.PanelBody,{title:(0,o.__)("Global Settings","otter-blocks"),initialOpen:!1},(0,c.createElement)(m.TextControl,{label:(0,o.__)("Google Maps API Key","otter-blocks"),type:"text",placeholder:(0,o.__)("Google Maps API Key","otter-blocks"),value:g,className:"components-placeholder__input",onChange:k,help:(0,o.__)("Changing the API key effects all Google Map Embed blocks. You will have to refresh the page after changing your API keys.","otter-blocks")}),(0,c.createElement)(m.Button,{isSecondary:!0,type:"submit",onClick:v,isBusy:h},(0,o.__)("Save API Key","otter-blocks"))))},w=({marker:e,isAdvanced:t,isPlaceAPIAvailable:l,addMarker:a,close:r})=>{(0,c.useEffect)((()=>{s(e.id),b(e.location),p(e.title),h(e.icon),y(e.description),w(e.latitude),C(e.longitude)}),[e]);const n=(0,c.useRef)(null),[i,s]=(0,c.useState)(e.id),[d,b]=(0,c.useState)(e.location),[u,p]=(0,c.useState)(e.title),[g,h]=(0,c.useState)(e.icon),[v,y]=(0,c.useState)(e.description),[_,w]=(0,c.useState)(e.latitude),[f,C]=(0,c.useState)(e.longitude);return(0,c.createElement)(m.Modal,{title:(0,o.__)("Add Marker","otter-blocks"),onRequestClose:r,shouldCloseOnClickOutside:!1},t&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.BaseControl,{label:(0,o.__)("Location","otter-blocks"),id:`themeisle-location-search-${e.id}`},(0,c.createElement)("input",{type:"text",id:`themeisle-location-search-${i}`,placeholder:(0,o.__)("Enter a location…","otter-blocks"),value:d,className:"wp-block-themeisle-blocks-google-map-search",ref:n,onFocus:()=>{const e=document.getElementsByClassName("pac-container");Object.keys(e).forEach((t=>e[t].remove()));const t=new window.google.maps.places.SearchBox(n.current);t.addListener("places_changed",(()=>{const e=t.getPlaces();e&&0<e.length&&e.forEach((e=>{const t=e.formatted_address||e.name,l=e.geometry.location.lat(),o=e.geometry.location.lng();b(t),w(l),C(o)}))}))},onChange:e=>b(e.target.value),disabled:!l})),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",value:_,onChange:w}),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",value:f,onChange:C})),(0,c.createElement)(m.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",value:u,onChange:p}),(0,c.createElement)(k,{label:(0,o.__)("Description","otter-blocks"),type:"text",value:v,onChange:y}),(0,c.createElement)(m.SelectControl,{label:(0,o.__)("Map Icon","otter-blocks"),value:g||"https://maps.google.com/mapfiles/ms/icons/red-dot.png",options:[{label:(0,o.__)("Red","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/red-dot.png"},{label:(0,o.__)("Blue","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/blue-dot.png"},{label:(0,o.__)("Yellow","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/yellow-dot.png"},{label:(0,o.__)("Green","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/green-dot.png"},{label:(0,o.__)("Orange","otter-blocks"),value:"https://maps.google.com/mapfiles/ms/icons/orange-dot.png"}],onChange:h}),(0,c.createElement)(m.ButtonGroup,null,(0,c.createElement)(m.Button,{isPrimary:!0,onClick:()=>a(d,u,g,v,_,f)},(0,o.__)("Add","otter-blocks")),(0,c.createElement)(m.Button,{isSecondary:!0,onClick:r},(0,o.__)("Cancel","otter-blocks"))))},f=({attributes:e,className:t,initMap:l,displayMap:a,isMapLoaded:r,selectMarker:n,isSelectingMarker:i})=>((0,c.useEffect)((()=>{a&&l()}),[a]),(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{id:e.id,className:s()(t,{"is-selecting-marker":i}),style:{height:e.height+"px"}}),r&&(0,c.createElement)(m.Button,{className:"wp-block-themeisle-blocks-google-map-marker-button",title:(0,o.__)("Add Button","otter-blocks"),onClick:n},(0,c.createElement)("span",{className:"dashicons dashicons-sticky"})))),C={standard:[],silver:[{elementType:"geometry",stylers:[{color:"#f5f5f5"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#dadada"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#c9c9c9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],retro:[{elementType:"geometry",stylers:[{color:"#ebe3cd"}]},{elementType:"labels.text.fill",stylers:[{color:"#523735"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f1e6"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#c9b2a6"}]},{featureType:"administrative.land_parcel",elementType:"geometry.stroke",stylers:[{color:"#dcd2be"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#ae9e90"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#93817c"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#a5b076"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#447530"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#f5f1e6"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#fdfcf8"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#f8c967"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#e9bc62"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#e98d58"}]},{featureType:"road.highway.controlled_access",elementType:"geometry.stroke",stylers:[{color:"#db8555"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#806b63"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"transit.line",elementType:"labels.text.fill",stylers:[{color:"#8f7d77"}]},{featureType:"transit.line",elementType:"labels.text.stroke",stylers:[{color:"#ebe3cd"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#b9d3c2"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#92998d"}]}],dark:[{elementType:"geometry",stylers:[{color:"#212121"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#212121"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#757575"}]},{featureType:"administrative.country",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"administrative.land_parcel",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"poi.park",elementType:"labels.text.stroke",stylers:[{color:"#1b1b1b"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#373737"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#4e4e4e"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}],night:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}],aubergine:[{elementType:"geometry",stylers:[{color:"#1d2c4d"}]},{elementType:"labels.text.fill",stylers:[{color:"#8ec3b9"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a3646"}]},{featureType:"administrative.country",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#64779e"}]},{featureType:"administrative.province",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"landscape.man_made",elementType:"geometry.stroke",stylers:[{color:"#334e87"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#023e58"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#283d6a"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#6f9ba5"}]},{featureType:"poi",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#023e58"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#3C7680"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#304a7d"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"road",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#2c6675"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#255763"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#b0d5ce"}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{color:"#023e58"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"transit",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"transit.line",elementType:"geometry.fill",stylers:[{color:"#283d6a"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#3a4762"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0e1626"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#4e6d70"}]}]},E=l(5225),T=l(2819);var x={to:[{type:"block",blocks:["themeisle-blocks/leaflet-map"],transform:e=>{const t=(0,T.omit)(e,["style","mapTypeControl","fullscreenControl","streetViewControl"]);return(0,a.createBlock)("themeisle-blocks/leaflet-map",{...t})}}]};(0,a.registerBlockType)("themeisle-blocks/google-map",{title:(0,o.__)("Google Maps","otter-blocks"),description:(0,o.__)("Display Google Maps on your website with Google Map block.","otter-blocks"),icon:r.aD,category:"themeisle-blocks",keywords:["map","google","orbitfox"],attributes:n,supports:{align:["wide","full"],html:!1},transforms:x,edit:({attributes:e,setAttributes:t,className:l,clientId:a,isSelected:r,toggleSelection:i})=>{(0,c.useEffect)((()=>{const t=(0,E.WX)(a,n);return()=>t(e.id)}),[e.id]),(0,c.useEffect)((()=>{(async()=>{await window.wp.api.loadPromise.then((()=>{g.current=new window.wp.api.models.Settings})),!1===Boolean(window.themeisleGutenberg.mapsAPI)?M||g.current.fetch().then((e=>{x(e.themeisle_google_map_block_api_key),S(!0),""!==e.themeisle_google_map_block_api_key&&(z(!0),K(e.themeisle_google_map_block_api_key))})):M||(x(window.themeisleGutenberg.mapsAPI),S(!0),z(!0),K(window.themeisleGutenberg.mapsAPI))})(),window.isMapLoaded=window.isMapLoaded||!1,window[`removeMarker_${a.substr(0,8)}`]=J,h.current=document.createElement("script"),h.current.type="text/javascript",h.current.async=!0,h.current.defer=!0,h.current.id="themeisle-google-map-api-loading"}),[]),(0,c.useEffect)((()=>{!1!==B&&void 0!==window.google&&k.current.setOptions({mapTypeControl:!!r||e.mapTypeControl,zoomControl:!!r||e.zoomControl,fullscreenControl:!!r||e.fullscreenControl,streetViewControl:!!r||e.streetViewControl})}),[r]),(0,c.useEffect)((()=>{y.current=[...e.markers]}),[e.markers]);const u=(0,c.useRef)([]),g=(0,c.useRef)(null),h=(0,c.useRef)(null),k=(0,c.useRef)(null),v=(0,c.useRef)(null),y=(0,c.useRef)([...e.markers]),[T,x]=(0,c.useState)(""),[M,S]=(0,c.useState)(!1),[B,z]=(0,c.useState)(!1),[P,N]=(0,c.useState)(!1),[R,V]=(0,c.useState)(!1),[L,H]=(0,c.useState)(!0),[I,A]=(0,c.useState)(!1),[$,O]=(0,c.useState)(!1),[G,D]=(0,c.useState)(!1),[Z,F]=(0,c.useState)(!1),[W,q]=(0,c.useState)(!1),[U,j]=(0,c.useState)({}),K=e=>{window.isMapLoaded||(window.isMapLoaded=!0,h.current.onload=()=>{document.getElementById("themeisle-google-map-api-loading").id="themeisle-google-map-api",A(!0)},h.current.src=`https://maps.googleapis.com/maps/api/js?key=${e}&libraries=places&cache=${Math.random()}`,document.head.appendChild(h.current)),document.getElementById("themeisle-google-map-api")&&A(!0)},Q=(e,t,l,r)=>{const n=`<div class="wp-block-themeisle-blocks-map-overview"><h6 class="wp-block-themeisle-blocks-map-overview-title">${l}</h6><div class="wp-block-themeisle-blocks-map-overview-content">${r?`<p>${r}</p>`:""}<a class="wp-block-themeisle-blocks-map-overview-delete" onclick="removeMarker_${a.substr(0,8)}( '${t}' )">${(0,o.__)("Delete Marker","otter-blocks")}</a></div></div>`,c=new window.google.maps.InfoWindow({content:n});e.addListener("click",(()=>{v.current=c,c.open(k.current,e)})),window.google.maps.event.addListener(c,"domready",(()=>{O(t)})),window.google.maps.event.addListener(c,"closeclick",(()=>{O(!1)}))},X=e=>{e.forEach((e=>{const t=e.latitude,l=e.longitude,o=new window.google.maps.LatLng(t,l),a=new window.google.maps.Marker({position:o,map:k.current,title:e.title,draggable:!0,icon:e.icon||"https://maps.google.com/mapfiles/ms/icons/red-dot.png"});window.google.maps.event.addListener(a,"dragend",(t=>{const l=t.latLng.lat(),o=t.latLng.lng();Y(e.id,"latitude",l),Y(e.id,"longitude",o)})),u.current.push(a),window.google.maps.event.addListener(a,"click",(()=>{v.current&&v.current.close()})),Q(a,e.id,e.title,e.description)}))},Y=(e,l,o)=>{const a=[...y.current];a.find((t=>t.id===e))[l]=o.toString(),ee(),X(a),t({markers:a})},J=e=>{let l=[...y.current];l=l.filter((t=>t.id!==e)),t({markers:l}),ee(),O(!1),0<l.length&&X(l)},ee=()=>{for(let e=0;e<u.current.length;e++)u.current[e].setMap(null);u.current=[]},te=()=>{!1===Boolean(window.themeisleGutenberg.mapsAPI)&&(V(!0),new window.wp.api.models.Settings({themeisle_google_map_block_api_key:T}).save().then((e=>{let t=!1;""!==e.themeisle_google_map_block_api_key&&(t=!0),V(!1),z(t),""!==e.themeisle_google_map_block_api_key&&(window.isMapLoaded=!1,K(e.themeisle_google_map_block_api_key))})))},le=e=>{t({style:e}),k.current.setOptions({styles:C[e]})};return M&&B?(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.d,{label:(0,o.__)("Block Styles","otter-blocks"),value:e.style,options:[{label:(0,o.__)("Standard","otter-blocks"),value:"standard",image:window.themeisleGutenberg.assetsPath+"/icons/map-standard.png"},{label:(0,o.__)("Silver","otter-blocks"),value:"silver",image:window.themeisleGutenberg.assetsPath+"/icons/map-silver.png"},{label:(0,o.__)("Retro","otter-blocks"),value:"retro",image:window.themeisleGutenberg.assetsPath+"/icons/map-retro.png"},{label:(0,o.__)("Dark","otter-blocks"),value:"dark",image:window.themeisleGutenberg.assetsPath+"/icons/map-dark.png"},{label:(0,o.__)("Night","otter-blocks"),value:"night",image:window.themeisleGutenberg.assetsPath+"/icons/map-night.png"},{label:(0,o.__)("Aubergine","otter-blocks"),value:"aubergine",image:window.themeisleGutenberg.assetsPath+"/icons/map-aubergine.png"}],onChange:le}),(0,c.createElement)(_,{attributes:e,setAttributes:t,map:k.current,changeStyle:le,isPlaceAPIAvailable:L,isMarkerOpen:$,setMarkerOpen:O,removeMarker:J,changeMarkerProp:Y,addMarkerManual:()=>{const e=(0,d.Z)(),t=(0,o.__)("Custom Marker","otter-blocks"),l=k.current.getCenter(),a=l.lat(),r=l.lng();F(!0),q(!0),j({id:e,location:"",title:t,icon:"https://maps.google.com/mapfiles/ms/icons/red-dot.png",description:"",latitude:a,longitude:r})},api:T,isSaving:R,changeAPI:x,saveAPIKey:te}),Z&&(0,c.createElement)(w,{marker:U,isAdvanced:W,isPlaceAPIAvailable:L,close:()=>F(!1),addMarker:(l,o,a,r,n,c)=>{const i=new window.google.maps.LatLng(n,c),s=(0,d.Z)(),m=new window.google.maps.Marker({position:i,map:k.current,title:o,draggable:!0,icon:a});window.google.maps.event.addListener(m,"dragend",(e=>{const t=e.latLng.lat(),l=e.latLng.lng();Y(s,"latitude",t),Y(s,"longitude",l)})),u.current.push(m);const b=[...e.markers],p={id:s,location:l,title:o,icon:a,description:r,latitude:n,longitude:c};b.push(p),t({markers:b}),window.google.maps.event.addListener(m,"click",(()=>{v.current&&v.current.close()})),Q(m,p.id,o,r),F(!1),D(!1)}}),(0,c.createElement)(m.ResizableBox,{size:{height:e.height},enable:{top:!1,right:!1,bottom:!0,left:!1},minHeight:100,maxHeight:1400,onResizeStart:()=>{i(!1)},onResizeStop:(l,o,a,r)=>{t({height:parseInt(e.height+r.height,10)}),i(!0)},className:s()("wp-block-themeisle-blocks-google-map-resizer",{"is-focused":r})},(0,c.createElement)(f,{attributes:e,className:l,initMap:()=>{if(k.current=new window.google.maps.Map(document.getElementById(e.id),{center:{lat:Number(e.latitude)||41.4036299,lng:Number(e.longitude)||2.1743558000000576},gestureHandling:"cooperative",zoom:e.zoom,mapTypeId:e.type,styles:C[e.style]}),e.location&&void 0===e.latitude&&void 0===e.longitude){const t={query:e.location,fields:["name","geometry"]};new window.google.maps.places.PlacesService(k.current).findPlaceFromQuery(t,((e,t)=>{t===window.google.maps.places.PlacesServiceStatus.OK&&0<e.length&&k.current.setCenter(e[0].geometry.location)}))}window.google.maps.event.addListenerOnce(k.current,"idle",(()=>{N(!0)})),k.current.addListener("zoom_changed",(()=>{const e=k.current.getZoom();t({zoom:e})})),k.current.addListener("maptypeid_changed",(()=>{const e=k.current.getMapTypeId();t({type:e})})),k.current.addListener("bounds_changed",(()=>{const e=k.current.getCenter(),l=e.lat(),o=e.lng();t({latitude:l.toString(),longitude:o.toString()})})),0<e.markers.length&&X(e.markers);const l={query:e.location,fields:["name","geometry"]};new window.google.maps.places.PlacesService(k.current).findPlaceFromQuery(l,((e,t)=>{"REQUEST_DENIED"===t&&H(!1)}))},displayMap:I,isMapLoaded:P,selectMarker:()=>{D(!G),G?window.google.maps.event.clearListeners(k.current,"click"):k.current.addListener("click",(e=>{window.google.maps.event.clearListeners(k.current,"click");const t=(0,d.Z)(),l=(0,o.__)("Custom Marker","otter-blocks"),a=e.latLng.lat(),r=e.latLng.lng();F(!0),q(!1),j({id:t,location:"",title:l,icon:"https://maps.google.com/mapfiles/ms/icons/red-dot.png",description:"",latitude:a,longitude:r})}))},isSelectingMarker:G}))):(0,c.createElement)(b,{className:l,api:T,isAPILoaded:M,isAPISaved:B,changeAPI:x,saveAPIKey:te})},save:()=>null})},4441:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},defaultLibrary:{type:"string",default:"fontawesome"},defaultIconPrefix:{type:"string",default:"fas"},defaultIcon:{type:"string",default:"angle-right"},defaultContentColor:{type:"string"},defaultIconColor:{type:"string"},defaultSize:{type:"number",default:20},gap:{type:"number",default:5},horizontalAlign:{type:"string"}},c=l(9307),i=l(2175),s=l(1216),d=l(5225),m=({attributes:e,setAttributes:t})=>(0,c.createElement)(i.BlockControls,null,(0,c.createElement)(i.AlignmentToolbar,{value:e.horizontalAlign,onChange:e=>{switch(e){case"left":t({horizontalAlign:"flex-start"});break;case"center":t({horizontalAlign:"center"});break;case"right":t({horizontalAlign:"flex-end"})}}})),b=l(5609);const u=(0,c.lazy)((()=>Promise.all([l.e(189),l.e(765)]).then(l.bind(l,3765))));var p=({attributes:e,setAttributes:t})=>(0,c.createElement)(i.InspectorControls,null,(0,c.createElement)(b.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,c.createElement)(c.Suspense,{fallback:(0,c.createElement)(b.Placeholder,null,(0,c.createElement)(b.Spinner,null))},(0,c.createElement)(u,{label:(0,o.__)("Icon Picker","otter-blocks"),library:e.defaultLibrary,prefix:e.defaultPrefix,icon:e.defaultIcon,changeLibrary:e=>{t({defaultLibrary:e,defaultIcon:void 0,defaultPrefix:"fas"})},onChange:e=>{t("object"==typeof e?{defaultIcon:e.name,defaultPrefix:e.prefix}:{defaultIcon:e})}})),(0,c.createElement)(b.RangeControl,{label:(0,o.__)("Font Size","otter-blocks"),help:(0,o.__)("The size of the font size of the content and icon.","otter-blocks"),value:e.defaultSize,onChange:e=>{t({defaultSize:e})},min:0,max:60,allowReset:!0}),(0,c.createElement)(b.RangeControl,{label:(0,o.__)("Gap","otter-blocks"),help:(0,o.__)("The distance between the items.","otter-blocks"),value:e.gap,onChange:e=>{t({gap:e})},min:0,max:60,allowReset:!0}),(0,c.createElement)(i.__experimentalColorGradientControl,{label:(0,o.__)("Content Color","otter-blocks"),colorValue:e.defaultContentColor,onColorChange:e=>{t({defaultContentColor:e})}}),(0,c.createElement)(i.__experimentalColorGradientControl,{label:(0,o.__)("Icon Color","otter-blocks"),colorValue:e.defaultIconColor,onColorChange:e=>{t({defaultIconColor:e})}})));(0,a.registerBlockType)("themeisle-blocks/icon-list",{title:(0,o.__)("Icon List","otter-blocks"),description:(0,o.__)("Display an icon list in a beautiful layout.","otter-blocks"),icon:r.rL,category:"themeisle-blocks",keywords:["icon","list","items"],attributes:n,styles:[{name:"vertical",label:(0,o.__)("Vertical","otter-blocks"),isDefault:!0},{name:"horizontal",label:(0,o.__)("Horizontal","otter-blocks")}],edit:({attributes:e,setAttributes:t,clientId:l,className:o})=>((0,c.useEffect)((()=>{const t=(0,d.WX)(l,n);return()=>t(e.id)}),[e.id]),(0,s.tZ)(c.Fragment,null,(0,s.tZ)(m,{attributes:e,setAttributes:t}),(0,s.tZ)(p,{attributes:e,setAttributes:t}),(0,s.tZ)("div",{id:e.id,className:o,css:s.iv`
42
  .block-editor-block-list__layout {
43
  align-items: ${e.horizontalAlign||"unset"} !important;
44
  justify-content: ${e.horizontalAlign||"unset"} !important;
45
  gap: ${e.gap}px;
46
  }
47
+ `},(0,s.tZ)(i.InnerBlocks,{allowedBlocks:["themeisle-blocks/icon-list-item"],__experimentalMoverDirection:"vertical",orientation:"vertical",template:[["themeisle-blocks/icon-list-item"]],renderAppender:i.InnerBlocks.DefaultAppender})))),save:({attributes:e,className:t})=>(0,c.createElement)("div",{className:t,id:e.id},(0,c.createElement)(i.InnerBlocks.Content,null))})},7970:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},content:{type:"string"},contentColor:{type:"string"},iconColor:{type:"string"},library:{type:"string"},iconPrefix:{type:"string"},icon:{type:"string"}},c=l(9307),i=l(4184),s=l.n(i),d=l(2175),m=l(9818),b=l(5609);const u=(0,c.lazy)((()=>Promise.all([l.e(189),l.e(765)]).then(l.bind(l,3765))));var p=({attributes:e,setAttributes:t})=>(0,c.createElement)(d.InspectorControls,null,(0,c.createElement)(b.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,c.createElement)(c.Suspense,{fallback:(0,c.createElement)(b.Placeholder,null,(0,c.createElement)(b.Spinner,null))},(0,c.createElement)(u,{label:(0,o.__)("Icon Picker","otter-blocks"),library:e.library,prefix:e.iconPrefix,icon:e.icon,changeLibrary:e=>{t({library:e,icon:void 0,iconPrefix:"fab"})},onChange:e=>{t("object"==typeof e?{icon:e.name,iconPrefix:e.prefix}:{icon:e})}})),(0,c.createElement)(d.__experimentalColorGradientControl,{label:(0,o.__)("Content Color","otter-blocks"),colorValue:e.contentColor,onColorChange:e=>{t({contentColor:e})}}),(0,c.createElement)(d.__experimentalColorGradientControl,{label:(0,o.__)("Icon Color","otter-blocks"),colorValue:e.iconColor,onColorChange:e=>{t({iconColor:e})}}))),g=l(48),h=l(5225);(0,a.registerBlockType)("themeisle-blocks/icon-list-item",{title:(0,o.__)("Icon List Item","otter-blocks"),description:(0,o.__)("Display an item for the icon list.","otter-blocks"),icon:r.rL,attributes:n,category:"themeisle-blocks",parent:["themeisle-blocks/icon-list"],keywords:["item","icon","list"],merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:({attributes:e,setAttributes:t,className:l,name:r,clientId:i,onReplace:b,onRemove:u,mergeBlocks:k})=>{const{hasParent:v,parentClass:y,parentAttributes:_}=(0,m.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:l}=e("core/block-editor"),o=t(l(i));return{hasParent:!!o,parentClass:o.attributes.className||"",parentAttributes:o?o.attributes:{}}}),[]);(0,c.useEffect)((()=>{const t=(0,h.WX)(i,n);return()=>t(e.id)}),[e.id]);const w=g.ZP.icons[e.icon],f=`${e.iconPrefix||_.defaultIconPrefix} fa-${e.icon||_.defaultIcon}`,C={color:e.contentColor||_.defaultContentColor,fontSize:_.defaultSize+"px"},E={color:e.iconColor||_.defaultIconColor,fill:e.iconColor||_.defaultIconColor,fontSize:_.defaultSize+"px"};return!v||e.iconPrefix&&e.library||t({library:e.library||_.defaultLibrary,icon:e.icon||_.defaultIcon,iconPrefix:e.iconPrefix||_.defaultIconPrefix}),(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p,{attributes:e,setAttributes:t}),(0,c.createElement)("div",{className:l},"themeisle-icons"===e.library&&e.icon&&void 0!==w?(0,c.createElement)(w,{className:s()({"wp-block-themeisle-blocks-icon-list-item-icon":!e.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":e.iconColor}),style:{...E,width:_.defaultSize+"px"}}):(0,c.createElement)("i",{className:s()(f,{"wp-block-themeisle-blocks-icon-list-item-icon":!e.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":e.iconColor}),style:E}),(0,c.createElement)(d.RichText,{identifier:"content",tagName:"p",placeholder:(0,o.__)("Write your content…","otter-blocks"),className:s()({"wp-block-themeisle-blocks-icon-list-item-content":!e.contentColor},{"wp-block-themeisle-blocks-icon-list-item-content-custom":e.contentColor}),style:C,value:e.content,onChange:e=>{t({content:e})},onSplit:t=>t?(0,a.createBlock)(r,{...e,content:t}):(0,a.createBlock)(r),onMerge:k,onReplace:b,onRemove:u,keepPlaceholderOnFocus:!0})))},save:({attributes:e,className:t})=>{const l=`${e.iconPrefix} fa-${e.icon}`,o=g.ZP.icons[e.icon];return(0,c.createElement)("div",{className:t,id:e.id},"themeisle-icons"===e.library&&e.icon?(0,c.createElement)(o,{className:s()({"wp-block-themeisle-blocks-icon-list-item-icon":!e.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":e.iconColor})}):(0,c.createElement)("i",{className:s()(l,{"wp-block-themeisle-blocks-icon-list-item-icon":!e.iconColor},{"wp-block-themeisle-blocks-icon-list-item-icon-custom":e.iconColor})}),(0,c.createElement)(d.RichText.Content,{tagName:"p",className:s()({"wp-block-themeisle-blocks-icon-list-item-content":!e.contentColor},{"wp-block-themeisle-blocks-icon-list-item-content-custom":e.contentColor}),value:e.content}))}})},5303:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},location:{type:"string",default:"La Sagrada Familia, Barcelona, Spain"},latitude:{type:"string",default:"41.4034789"},longitude:{type:"string",default:"2.174410333009705"},bbox:{type:"string",default:"2.1207046508789067%2C41.34807736149302%2C2.2288513183593754%2C41.45816618938139"},zoom:{type:"number"},height:{type:"number",default:400},markers:{type:"array",default:[]},zoomControl:{type:"boolean",default:!0},draggable:{type:"boolean",default:!0}},c=l(9307),i=l(4586),s=l(4184),d=l.n(s),m=l(2819),b=l(5609),u=l(2175);async function p(e){const t=await async function(e){if("string"!=typeof e)throw(0,o.__)("Location must be a string","otter-blocks");const t="https://nominatim.openstreetmap.org/search?q="+e.split(" ").map((e=>encodeURIComponent(e))).join("+")+"&format=geojson",l=await fetch(t);return l.ok&&200===l.status?l.json():console.warn((0,o.__)("An error has occured: ","otter-blocks")+l.status)}(e);if(null!=t&&t.features.length){var l;const e=t.features[0];if(null!=e&&null!==(l=e.geometry)&&void 0!==l&&l.coordinates.length)return{longitude:e.geometry.coordinates[0],latitude:e.geometry.coordinates[1]}}return null}var g=l(4333);const h=({value:e,onChange:t})=>{const l=(0,g.useInstanceId)(h);(0,c.useEffect)((()=>{wp.oldEditor.initialize(r.current.id,{tinymce:{classic_block_editor:!0,plugins:"lists,media,paste,tabfocus,wordpress,wpautoresize,wpeditimage,wpgallery,wplink,wpdialogs,wptextpattern,wpview",toolbar1:"formatselect,bold,italic,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,spellchecker,wp_add_media"}});const e=window.tinymce.get(r.current.id);return e.on("change",(()=>t(e.getContent()))),()=>wp.oldEditor.remove(r.current.id)}),[]);const a=`inspector-textarea-control-${l}`,r=(0,c.useRef)(null);return(0,c.createElement)(b.BaseControl,{id:a,label:(0,o.__)("Description","otter-blocks")},(0,c.createElement)("textarea",{id:a,className:"components-textarea-control__input",rows:4,value:e,onChange:e=>t(e.target.value),ref:r}))};var k=h,v=({marker:e,isOpen:t,openMarker:l,dispatch:a})=>{const[r,n]=(0,c.useState)(e.location),[i,s]=(0,c.useState)(e.longitude),[m,u]=(0,c.useState)(e.latitude),[g,h]=(0,c.useState)(e.title),[v,y]=(0,c.useState)(e.description),[_,w]=(0,c.useState)({target:"",reason:""});return(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker"},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker-title-area"},(0,c.createElement)(b.Button,{className:"wp-block-themeisle-blocks-leaflet-map-marker-title",onClick:()=>l()},e.title||(0,o.__)("Custom Marker","otter-blocks")),(0,c.createElement)(b.Button,{icon:"no-alt",label:(0,o.__)("Remove Marker","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-leaflet-map-marker-remove",onClick:()=>a({type:f.REMOVE,ids:[e.id]})})),t&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker-control-area"},(0,c.createElement)(b.TextControl,{label:(0,o.__)("Location","otter-blocks"),type:"text",className:d()({"wp-block-themeisle-blocks-leaflet-map-input-error":"LOCATION"===_.target}),value:r,onChange:e=>{n(e)},help:(0,o.__)("Press Enter to search the location","otter-blocks"),onKeyDown:t=>((t,l)=>{t.key===l&&(async()=>{const t=await p(r);t?(a({type:f.UPDATE,ids:[e.id],updatedProps:{location:r,latitude:t.latitude,longitude:t.longitude}}),u(t.latitude),s(t.longitude),"LOCATION"===_.target&&w({})):w({target:"LOCATION",reason:(0,o.__)("Location couldn't been found!","otter-blocks")})})()})(t,"Enter")}),(0,c.createElement)(b.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",value:m,onChange:t=>{u(t),a({type:f.UPDATE,ids:[e.id],updatedProps:{latitude:t}})}}),(0,c.createElement)(b.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",value:i,onChange:t=>{s(t),a({type:f.UPDATE,ids:[e.id],updatedProps:{longitude:t}})}}),(0,c.createElement)(b.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",value:g,onChange:t=>{h(t),a({type:f.UPDATE,ids:[e.id],updatedProps:{title:t}})}}),(0,c.createElement)(k,{label:(0,o.__)("Description","otter-blocks"),type:"text",value:e.description,onChange:t=>{y(v),a({type:f.UPDATE,ids:[e.id],updatedProps:{description:t}})}})))},y=({markers:e,dispatch:t,markersInteraction:l})=>{const{openMarker:a,setOpenMarker:r}=l;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-leaflet-map-marker-group"},e.map((e=>(0,c.createElement)(v,{key:e.id,marker:e,isOpen:a===e.id,openMarker:()=>r(l.openMarker!==e.id?e.id:null),dispatch:t})))),(0,c.createElement)(b.Button,{isSecondary:!0,className:"wp-block-themeisle-blocks-leaflet-map-marker-add",onClick:()=>{t({type:f.ADD,marker:{id:(0,i.Z)()},dispatch:t})}},(0,o.__)("Add Marker","otter-blocks")))},_=({attributes:e,setAttributes:t,dispatch:l,markersInteraction:a})=>{const[r,n]=(0,c.useState)(e.location),[i,s]=(0,c.useState)({target:"",reason:""});return(0,c.createElement)(u.InspectorControls,null,(0,c.createElement)(b.PanelBody,{title:(0,o.__)("Location","otter-blocks")},(0,c.createElement)(b.TextControl,{label:(0,o.__)("Location","otter-blocks"),type:"text",className:d()({"wp-block-themeisle-blocks-leaflet-map-input-error":"LOCATION"===i.target}),placeholder:(0,o.__)("Enter location. E.g: La Sagrada Familia, Barcelona, Spain","otter-blocks"),help:(0,o.__)("Press Enter to search the location","otter-blocks"),value:r,onChange:n,onKeyDown:e=>((e,l)=>{e.key===l&&(async()=>{t({location:r});const e=await p(r);e?(t({latitude:e.latitude.toString(),longitude:e.longitude.toString()}),"LOCATION"===i.target&&s({})):s({target:"LOCATION",reason:(0,o.__)("Location couldn't been found!","otter-blocks")})})()})(e,"Enter")}),(0,c.createElement)(b.TextControl,{label:(0,o.__)("Latitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter latitude…","otter-blocks"),value:e.latitude,onChange:e=>{t({latitude:e.toString()})}}),(0,c.createElement)(b.TextControl,{label:(0,o.__)("Longitude","otter-blocks"),type:"text",placeholder:(0,o.__)("Enter longitude","otter-blocks"),value:e.longitude,onChange:e=>{t({longitude:e.toString()})}})),(0,c.createElement)(b.PanelBody,{title:(0,o.__)("Positioning & Zooming","otter-blocks"),initialOpen:!1},(0,c.createElement)(b.RangeControl,{label:(0,o.__)("Map Zoom Level","otter-blocks"),value:e.zoom,onChange:e=>{t({zoom:e})},min:0,max:20}),(0,c.createElement)(b.RangeControl,{label:(0,o.__)("Map Height","otter-blocks"),value:e.height,onChange:e=>{t({height:e})},min:100,max:1400})),(0,c.createElement)(b.PanelBody,{title:(0,o.__)("Controls","otter-blocks"),initialOpen:!1},(0,c.createElement)(b.BaseControl,null,(0,o.__)("The following changes will not affect block preview during the editing process. You can click outside the block to see the changes take effect.","otter-blocks")),(0,c.createElement)(b.ToggleControl,{label:(0,o.__)("Draggable Map","otter-blocks"),checked:e.draggable,onChange:()=>{t({draggable:!e.draggable})}}),(0,c.createElement)(b.ToggleControl,{label:(0,o.__)("Zoom Control","otter-blocks"),checked:e.zoomControl,onChange:()=>{t({zoomControl:!e.zoomControl})}})),(0,c.createElement)(b.PanelBody,{title:(0,o.__)("Markers","otter-blocks"),initialOpen:!1},(0,c.createElement)(y,{markers:e.markers,dispatch:l,markersInteraction:a})))},w=l(5225);const f={ADD:"ADD",ADD_MANUAL:"ADD_MANUAL",REMOVE:"REMOVE",UPDATE:"UPDATE",INIT:"INIT"};var C={to:[{type:"block",blocks:["themeisle-blocks/google-map"],transform:e=>{const t=e;return(0,a.createBlock)("themeisle-blocks/google-map",{...t})}}]};(0,a.registerBlockType)("themeisle-blocks/leaflet-map",{title:(0,o.__)("Maps","otter-blocks"),description:(0,o.__)("Display Open Street Maps on your website with Maps block.","otter-blocks"),icon:r.aD,category:"themeisle-blocks",keywords:["map","opeenstreetmap","location"],attributes:n,supports:{align:["wide","full"],html:!1},transforms:C,edit:({clientId:e,attributes:t,setAttributes:l,className:a,isSelected:r,toggleSelection:s})=>{(0,c.useEffect)((()=>{const l=(0,w.WX)(e,n);return()=>l(t.id)}),[t.id]);const u=(0,c.useRef)(null),[p,g]=(0,c.useState)(null),[h,k]=(0,c.useState)(!1),[v,y]=(0,c.useState)(null),C=(e,t)=>{if(window.L&&p&&t&&e){var l,a,r,n,c;null!==(l=e.id)&&void 0!==l||(e.id=(0,i.Z)()),null!==(a=e.latitude)&&void 0!==a||(e.latitude=p.getCenter().lat),null!==(r=e.longitude)&&void 0!==r||(e.longitude=p.getCenter().lng),null!==(n=e.title)&&void 0!==n||(e.title=(0,o.__)("Add a title","otter-blocks")),null!==(c=e.description)&&void 0!==c||(e.description="");const s=window.L.marker([e.latitude,e.longitude]||0,{draggable:!0});return s.on("movestart",(()=>{s.closeTooltip(),s.closePopup()})),s.on("moveend",(()=>{const l=s.getLatLng();t({type:f.UPDATE,ids:[e.id],updatedProps:{latitude:l.lat,longitude:l.lng}})})),s.on("click",(()=>{y(e.id)})),s.markerProps=e,s}return null},[E,T]=(0,c.useReducer)(((e,t)=>{switch(t.type){case f.ADD:const l=C(t.marker,t.dispatch);return[...e,l];case f.ADD_MANUAL:if(h){const l=C(t.marker,t.dispatch);return[...e,l]}return e;case f.REMOVE:return e.filter((({markerProps:e})=>t.ids.includes(e.id))).forEach((e=>{p.hasLayer(e)&&p.removeLayer(e)})),e.filter((({markerProps:e})=>!t.ids.includes(e.id)));case f.INIT:const a=t.markers.map((e=>C(e,t.dispatch)));return[...e,...a];case f.UPDATE:return e.map((e=>{const l=e.markerProps;return t.ids.includes(l.id)&&(e.markerProps=(0,m.merge)(e.markerProps,t.updatedProps)),e}));default:console.warn((0,o.__)("The action for the leaflet block do not have a defined action in marker's reducer: ","otter-blocks")+t.type)}return e}),[]);return(0,c.useEffect)((()=>{(()=>{if(!u.current&&!window.L)return;u.current.innerHTML="";const e=window.L.map(u.current,{gestureHandling:!0,gestureHandlingOptions:{text:{touch:(0,o.__)("Use two fingers to move the map","otter-blocks"),scroll:(0,o.__)("Use ctrl + scroll to zoom the map","otter-blocks"),scrollMac:(0,o.__)("Use ⌘ + scroll to zoom the map","otter-blocks")}}});window.L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:["a","b","c"]}).addTo(e),e.on("zoom",(()=>{l({zoom:e.getZoom()})})),e.on("moveend",(()=>{const t=e.getCenter();l({latitude:t.lat.toString(),longitude:t.lng.toString()})})),e.on("click",(e=>{T({type:f.ADD_MANUAL,marker:{latitude:e.latlng.lat,longitude:e.latlng.lng},dispatch:T}),k(!1)})),window.L.Control.AddMarker=window.L.Control.extend({onAdd:()=>{const e=window.L.DomUtil.create("button","wp-block-themeisle-blocks-leaflet-map-marker-button"),t=window.L.DomUtil.create("span","dashicons dashicons-sticky",e);return window.L.DomEvent.on(e,"click",(e=>{window.L.DomEvent.stopPropagation(e),k(!h)})),e.title=(0,o.__)("Add marker on the map with a click","otter-blocks"),e.appendChild(t),e},onRemove:()=>{}}),window.L.control.addmarker=e=>new window.L.Control.AddMarker(e),window.L.control.addmarker({position:"bottomleft"}).addTo(e),g(e),T({type:f.INIT,markers:t.markers,dispatch:T})})()}),[]),(0,c.useEffect)((()=>{t.height&&p&&p.invalidateSize(!0)}),[t.height,p]),(0,c.useEffect)((()=>{t.latitude&&t.longitude&&p&&p.setView([t.latitude,t.longitude],t.zoom||15)}),[t.latitude,t.longitude,t.zoom,p]),(0,c.useEffect)((()=>{var e;null===(e=u.current)||void 0===e||e.classList.toggle("is-selecting-location",h)}),[h]),(0,c.useEffect)((()=>{t.latitude&&t.longitude&&p&&l({bbox:p.getBounds().toBBoxString()})}),[t.latitude,t.longitude,p]),(0,c.useEffect)((()=>{E&&(l({markers:E.map((({markerProps:e})=>e))}),E.forEach((e=>{p.hasLayer(e)||p.addLayer(e);const{markerProps:t}=e;e.setLatLng([t.latitude,t.longitude]),e.closeTooltip(),e.unbindTooltip(),e.bindTooltip(t.title,{direction:"auto"}),e.closePopup(),e.unbindPopup(),e.bindPopup(((e,t)=>{const l=document.createElement("div"),a=document.createElement("h6"),r=document.createElement("div"),n=document.createElement("p"),c=document.createElement("button");return a.innerHTML=e.title,n.innerHTML=e.description,c.onclick=()=>t({type:f.REMOVE,ids:[e.id]}),c.innerHTML=(0,o.__)("Delete Marker","otter-blocks"),l.classList.add("wp-block-themeisle-blocks-map-overview"),r.classList.add("wp-block-themeisle-blocks-map-overview-content"),a.classList.add("wp-block-themeisle-blocks-map-overview-title"),c.classList.add("wp-block-themeisle-blocks-map-overview-delete"),l.appendChild(a),l.appendChild(r),l.appendChild(c),r.appendChild(n),l})(t,T))})))}),[E]),(0,c.createElement)(c.Fragment,null,(0,c.createElement)(_,{attributes:t,setAttributes:l,dispatch:T,markersInteraction:{openMarker:v,setOpenMarker:y}}),(0,c.createElement)(b.ResizableBox,{size:{height:t.height},enable:{top:!1,right:!1,bottom:!0,left:!1},minHeight:100,maxHeight:1400,onResizeStart:()=>{s(!1)},onResizeStop:(e,o,a,r)=>{l({height:parseInt(t.height+r.height,10)}),s(!0)},className:d()("wp-block-themeisle-blocks-leaflet-map-resizer",{"is-focused":r})},(0,c.createElement)("div",{className:a},(0,c.createElement)("div",{id:t.id,ref:u,style:{width:"100%",height:t.height||400}}))))},save:()=>null})},2793:function(e,t,l){var o=l(2553),a=l(5736),r=l(4981),n=l(9307),c=l(2819),i=l(2175),s=l(5609),d=({className:e,file:t,onChange:l,isJSONAllowed:r,attributes:c})=>{var d;const[m,b]=(0,n.useState)((null===(d=c.file)||void 0===d?void 0:d.url)||null),[u,p]=(0,n.useState)(!1);return r&&!Boolean(window.themeisleGutenberg.isWPVIP)?(0,n.createElement)(i.MediaPlaceholder,{labels:{title:(0,a.__)("Lottie","otter-blocks"),instructions:(0,a.__)("Add Lottie animations and files to your website.","otter-blocks")},icon:(0,n.createElement)(i.BlockIcon,{icon:o.Z}),accept:["application/json"],allowedTypes:["application/json"],value:{...t},onSelectURL:l,onSelect:l}):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.Placeholder,{label:(0,a.__)("Lottie","otter-blocks"),instructions:(0,a.__)("Add Lottie animations and files to your website.","otter-blocks"),icon:(0,n.createElement)(i.BlockIcon,{icon:o.Z}),className:e},(0,n.createElement)("form",{onSubmit:e=>(e&&e.preventDefault(),l(m))},(0,n.createElement)("input",{type:"url",value:m,className:"components-placeholder__input","aria-label":(0,a.__)("Lottie","otter-blocks"),placeholder:(0,a.__)("Enter URL to embed here…","otter-blocks"),onChange:e=>b(e.target.value)}),(0,n.createElement)(s.Button,{isPrimary:!0,disabled:!m,type:"submit"},(0,a.__)("Embed","otter-blocks")),!Boolean(window.themeisleGutenberg.isWPVIP)&&(0,n.createElement)(s.Button,{isSecondary:!0,onClick:()=>p(!0)},(0,a.__)("Upload","otter-blocks")))),u&&(0,n.createElement)(s.Modal,{title:(0,a.__)("Allow JSON Uploads","otter-blocks"),closeLabel:(0,a.__)("Close"),onRequestClose:()=>p(!1),overlayClassName:"wp-block-themeisle-blocks-lottie-modal"},(0,a.__)("This file type is not permitted for security reasons. Would you still like to enable JSON uploads?","otter-blocks"),(0,n.createElement)("br",null),(0,n.createElement)("br",null),(0,n.createElement)(s.ExternalLink,{href:window.themeisleGutenberg.optionsPath},(0,a.__)("You can enable JSON uploads from Otter.","otter-blocks")),(0,n.createElement)("br",null),(0,n.createElement)("br",null),(0,a.__)("You will have to refresh the page after changing JSON upload settings.","otter-blocks")))},m=({attributes:e,setAttributes:t,playerRef:l})=>(0,n.createElement)(i.InspectorControls,null,(0,n.createElement)(s.PanelBody,{title:(0,a.__)("Settings","otter-blocks"),initialOpen:!0},(0,n.createElement)(s.SelectControl,{label:(0,a.__)("Trigger","otter-blocks"),help:(0,a.__)("Animation trigger. This will only work on the front-end.","otter-blocks"),value:e.trigger,options:[{label:(0,a.__)("None","otter-blocks"),value:"none"},{label:(0,a.__)("Scroll","otter-blocks"),value:"scroll"},{label:(0,a.__)("Hover","otter-blocks"),value:"hover"},{label:(0,a.__)("Click","otter-blocks"),value:"click"}],onChange:e=>{t({trigger:e})}}),"scroll"!==e.trigger&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.ToggleControl,{label:(0,a.__)("Loop","otter-blocks"),help:(0,a.__)("Whether to loop animation.","otter-blocks"),checked:e.loop,onChange:o=>{t({loop:o}),l.current.setLooping(o),e.direction&&l.current.seek("100%"),l.current.play()}}),e.loop&&(0,n.createElement)(s.TextControl,{label:(0,a.__)("Numbers of loops","otter-blocks"),help:(0,a.__)("Number of times to loop animation.","otter-blocks"),type:"number",value:e.count,onChange:o=>{t({count:Number(o)}),l.current.load(e.file.url)}}),(0,n.createElement)(s.RangeControl,{label:(0,a.__)("Speed","otter-blocks"),help:(0,a.__)("Animation speed.","otter-blocks"),value:e.speed,onChange:e=>{t({speed:Number(e)}),l.current.setSpeed(e)},step:.1,min:.1,max:5}),(0,n.createElement)(s.ToggleControl,{label:(0,a.__)("Reverse","otter-blocks"),help:(0,a.__)("Direction of animation.","otter-blocks"),checked:e.direction,onChange:e=>{t({direction:e}),l.current.setDirection(e?-1:1),l.current.seek(e?"100%":0)}})),(0,n.createElement)(s.RangeControl,{label:(0,a.__)("Width","otter-blocks"),help:(0,a.__)("Container width in pixels.","otter-blocks"),value:e.width,onChange:e=>{t({width:Number(e)})},min:100,max:1e3}))),b=({isEditing:e,setEditing:t})=>(0,n.createElement)(i.BlockControls,null,(0,n.createElement)(s.ToolbarGroup,null,(0,n.createElement)(s.Tooltip,{text:e?(0,a.__)("Save","otter-blocks"):(0,a.__)("Edit","otter-blocks")},(0,n.createElement)(s.Button,{onClick:()=>t(!e)},(0,n.createElement)(s.Dashicon,{icon:e?"yes":"edit"}))))),u=({attributes:e,className:t,isSelected:l,playerRef:o})=>{(0,n.useEffect)((()=>{!(0,c.isEmpty)(e.file)&&e.loop&&null!==o.current&&o.current.addEventListener("complete",a)}),[]),(0,n.useEffect)((()=>{l?(o.current.play(),e.direction&&o.current.seek("100%")):o.current.stop()}),[l]);const a=()=>{o.current&&(o.current.setLooping(e.loop),o.current.play(),o.current.removeEventListener("complete",a))};return(0,n.createElement)("lottie-player",{id:e.id,className:t,ref:o,src:e.file.url,autoplay:!0,count:e.count,speed:e.speed,direction:e.direction?-1:1,style:{width:e.width,height:"auto"},mode:"normal"})},p=l(5225),g={id:{type:"string"},file:{type:"object"},trigger:{type:"string",default:"none"},loop:{type:"boolean",default:!1},count:{type:"number",default:0},speed:{type:"number",default:1},direction:{type:"boolean",default:!1},width:{type:"number"}};(0,r.registerBlockType)("themeisle-blocks/lottie",{title:(0,a.__)("Lottie Animation","otter-blocks"),description:(0,a.__)("Add Lottie animations to your WordPress.","otter-blocks"),icon:o.Z,category:"themeisle-blocks",keywords:["media","lottie","animation"],attributes:g,supports:{align:["left","center","right"]},edit:({attributes:e,setAttributes:t,className:l,isSelected:o,clientId:a})=>{const r=(0,n.useRef)(null),[i,s]=(0,n.useState)(!Boolean(e.file));(0,n.useEffect)((()=>{const t=(0,p.WX)(a,g);return()=>t(e.id)}),[e.id]),(0,n.useEffect)((()=>{window.wp.api.loadPromise.then((()=>{(new window.wp.api.models.Settings).fetch().then((e=>{e.themeisle_allow_json_upload&&k(e.themeisle_allow_json_upload)}))}))}),[]);const[h,k]=(0,n.useState)(!1);return(0,n.createElement)(n.Fragment,null,(!(0,c.isEmpty)(e.file)&&i||!i)&&(0,n.createElement)(b,{isEditing:i,setEditing:s}),!((0,c.isEmpty)(e.file)||i)&&(0,n.createElement)(m,{attributes:e,setAttributes:t,playerRef:r}),((0,c.isEmpty)(e.file)||i)&&(0,n.createElement)(d,{className:l,value:e.file,onChange:e=>{if(""===e||null===e)return;const l=(0,c.pick)(e,["id","url"]);(0,c.isEmpty)(l)&&(l.url=e),t({file:{...l}}),s(!1)},isJSONAllowed:h,attributes:e}),!((0,c.isEmpty)(e.file)||i)&&(0,n.createElement)(u,{attributes:e,className:l,isSelected:o,playerRef:r}))},save:({attributes:e,className:t})=>"scroll"===e.trigger?(0,n.createElement)("lottie-player",{id:e.id,className:t,src:e.file?e.file.url:"",trigger:e.trigger,width:e.width}):(0,n.createElement)("lottie-player",{id:e.id,className:t,src:e.file?e.file.url:"",autoplay:!0,loop:!0,count:e.direction?-1*e.count:e.count,speed:e.speed,direction:e.direction?-1:1,trigger:e.trigger,width:e.width,"data-loop":e.loop,mode:"normal"})})},6433:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9307),c=l(5609),i=l(8423),s=l.n(i),d=l(4932),m=l(2819),b=l(6989),u=l.n(b),p=l(9630),g=({setAttributes:e,hasError:t,setError:l,className:a})=>{const r=(0,n.useRef)(null);let i=!1;const s=[],[b,g]=(0,n.useState)(!1),[h,k]=(0,n.useState)(""),[v,y]=(0,n.useState)({}),[_,w]=(0,n.useState)(null);(0,n.useEffect)((()=>{null===_||i||(i=!0,(0,d.Z)(s[_],r.current,{onlyScrollIfNeeded:!0}),s[_].focus(),setTimeout((()=>{i=!1}),100))}),[_]);const f=e=>{if(Object.keys(v).length){e.stopPropagation(),e.preventDefault();const t=_?_-1:Object.keys(v).length-1;w(t)}},C=e=>{if(Object.keys(v).length){e.stopPropagation(),e.preventDefault();const t=null===_||_===Object.keys(v).length-1?0:_+1;w(t)}},E=t=>{e({slug:t.slug}),y({})};return(0,n.createElement)(c.Placeholder,{icon:"admin-plugins",label:(0,o.__)("Plugin Card","otter-blocks"),instructions:(0,o.__)("Search for the plugin you want to display.","otter-blocks"),className:a},(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-plugin-cards-search-field"},(0,n.createElement)(c.Dashicon,{icon:"search"}),b&&(0,n.createElement)(c.Spinner,null),(0,n.createElement)(c.TextControl,{type:"text",placeholder:(0,o.__)("Search for plugin…","otter-blocks"),value:h,onChange:k,onKeyDown:t=>{switch(t.keyCode){case p.UP:f(t);break;case p.DOWN:C(t);break;case p.TAB:Object.keys(v).length&&!t.shiftKey&&w(0);break;case p.ENTER:(async t=>{e({slug:""}),g(!0),l(!1);const o=await u()({path:`otter/v1/plugins?search=${encodeURIComponent(t)}`});if(o.data.errors)return l(!0),g(!1),w(null),void y({});g(!1),w(null),y(o.data.plugins)})(t.target.value)}},onFocus:()=>w(null)}),v&&(0,n.createElement)("div",{tabIndex:"-1",className:"wp-block-themeisle-blocks-plugin-cards-search-results",ref:r},Object.keys(v).map((e=>{const t=v[e];let l;return t.icons.svg&&(l=t.icons.svg),t.icons["2x"]&&(l=t.icons["2x"]),t.icons["1x"]&&(l=t.icons["1x"]),t.icons.default&&(l=t.icons.default),(0,n.createElement)("button",{className:"wp-block-themeisle-blocks-plugin-cards-list-item",key:e,ref:(o=e,e=>{s[o]=e}),onClick:e=>{e.preventDefault(),E(t)},onKeyDown:e=>((e,t)=>{switch(e.keyCode){case p.UP:f(e);break;case p.DOWN:C(e);break;case p.TAB:if(e.shiftKey){0!==_&&f(e);break}if(_===Object.keys(v).length-1)break;C(e);break;case p.ENTER:E(t)}})(e,t)},(0,n.createElement)("img",{src:l}),(0,n.createElement)("span",{dangerouslySetInnerHTML:{__html:(0,m.unescape)(t.name)}}));var o})))),t&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-plugin-cards-error"},(0,n.createElement)("span",null,(0,o.__)("There seems to be an error. Make sure your internet is working properly.","otter-blocks"))))},h=l(2175),k=({setAttributes:e})=>(0,n.createElement)(h.BlockControls,null,(0,n.createElement)(c.ToolbarGroup,null,(0,n.createElement)(c.Tooltip,{text:(0,o.__)("Edit","otter-blocks")},(0,n.createElement)(c.Button,{className:"components-icon-button components-toolbar__control wp-block-themeisle-blocks-plugin-cards-edit-plugin-card",onClick:()=>e({slug:void 0})},(0,n.createElement)(c.Dashicon,{icon:"edit"})))));(0,a.registerBlockType)("themeisle-blocks/plugin-cards",{title:(0,o.__)("Plugin Card","otter-blocks"),description:(0,o.__)("Plugin Card block lets you display plugins data in your blog posts.","otter-blocks"),icon:r.ZV,category:"themeisle-blocks",keywords:["plugin","card","orbitfox"],attributes:{slug:{type:"string"}},supports:{html:!1},edit:({attributes:e,setAttributes:t,className:l})=>{const[o,a]=(0,n.useState)(!1);return e.slug?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(k,{setAttributes:t}),(0,n.createElement)(c.Disabled,null,(0,n.createElement)(s(),{block:"themeisle-blocks/plugin-cards",className:e.className,attributes:{...e}}))):(0,n.createElement)(g,{attributes:e,setAttributes:t,hasError:o,setError:a,className:l})},save:()=>null})},6585:function(e,t,l){var o=l(7682),a=l(5736),r=l(4981),n={id:{type:"string"},minWidth:{type:"number"},trigger:{type:"string"},wait:{type:"number"},anchor:{type:"string"},scroll:{type:"number"},showClose:{type:"boolean",default:!0},outsideClose:{type:"boolean",default:!0},anchorClose:{type:"boolean",default:!1},closeAnchor:{type:"string"},recurringClose:{type:"boolean",default:!1},recurringTime:{type:"number"},backgroundColor:{type:"string"},closeColor:{type:"string"},overlayColor:{type:"string"},overlayOpacity:{type:"number"}},c=l(9307),i=l(6755),s=l(7231),d=l(2175),m=l(5609);const b=({attributes:e,setAttributes:t})=>(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.ToggleControl,{label:(0,a.__)("Close On Anchor Click","otter-blocks"),checked:e.anchorClose,onChange:()=>t({anchorClose:!e.anchorClose})}),e.anchorClose&&(0,c.createElement)(m.TextControl,{label:(0,a.__)("Close Anchor","otter-blocks"),help:(0,a.__)("You can use this anchor as an anchor link anywhere on the page to close the popup.","otter-blocks"),value:e.closeAnchor,onChange:e=>t({closeAnchor:e.replace(/[^a-zA-Z]/g,"")})}),"onClick"!==e.trigger&&(0,c.createElement)(m.ToggleControl,{label:(0,a.__)("Dismiss for Recurring Visitors","otter-blocks"),checked:e.recurringClose,onChange:()=>t({recurringClose:!e.recurringClose})}),e.recurringClose&&"onClick"!==e.trigger&&(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Display Interval","otter-blocks"),help:(0,a.__)("Number of days until the popup is shown again.","otter-blocks"),min:0,max:100,value:e.recurringTime,onChange:e=>t({recurringTime:Number(e)})}));var u=({attributes:e,setAttributes:t})=>{let l=[{label:(0,a.__)("On Load","otter-blocks"),value:"onLoad"}];return Boolean(window.themeisleGutenberg.hasNeveSupport.hasNeve)&&(l=[{label:(0,a.__)("On Load","otter-blocks"),value:"onLoad"},{label:(0,a.__)("On Anchor Click","otter-blocks"),value:"onClick",disabled:!Boolean(window.themeisleGutenberg.hasNeveSupport.hasNevePro)},{label:(0,a.__)("On Scroll","otter-blocks"),value:"onScroll",disabled:!Boolean(window.themeisleGutenberg.hasNeveSupport.hasNevePro)},{label:(0,a.__)("On Exit","otter-blocks"),value:"onExit",disabled:!Boolean(window.themeisleGutenberg.hasNeveSupport.hasNevePro)}]),(0,c.createElement)(d.InspectorControls,null,(0,c.createElement)(m.PanelBody,{title:(0,a.__)("Settings","otter-blocks")},(0,c.createElement)(m.SelectControl,{label:(0,a.__)("Open Trigger","otter-blocks"),help:Boolean(window.themeisleGutenberg.hasNeveSupport.hasNeve)&&!Boolean(window.themeisleGutenberg.hasNeveSupport.hasNevePro)&&(0,a.__)("You need to have Neve Pro to activate Pro features.","otter-blocks"),options:l,value:e.trigger,onChange:e=>t({trigger:e})}),(void 0===e.trigger||"onLoad"===e.trigger)&&(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Wait Time","otter-blocks"),help:(0,a.__)("How much time to wait before showing the popup. Leave it empty to open instantly","otter-blocks"),min:0,max:100,value:e.wait,onChange:e=>t({wait:Number(e)})}),"onClick"===e.trigger&&(0,c.createElement)(m.TextControl,{label:(0,a.__)("Anchor","otter-blocks"),help:(0,a.__)("You can use this anchor as an anchor link anywhere on the page to open the popup.","otter-blocks"),value:e.anchor,onChange:e=>t({anchor:e.replace(/[^a-zA-Z]/g,"")})}),"onScroll"===e.trigger&&(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Scroll Distance","otter-blocks"),help:(0,a.__)("Show the modal when this percentage of the page has been scrolled.","otter-blocks"),min:0,max:100,value:e.scroll,onChange:e=>t({scroll:Number(e)})}),"onExit"===e.trigger&&(0,c.createElement)("p",null,(0,a.__)("Shows the modal when the user moves the mouse outside of the top of the window.","otter-blocks")),(0,c.createElement)(m.ToggleControl,{label:(0,a.__)("Show Close Button","otter-blocks"),checked:e.showClose,onChange:()=>t({showClose:!e.showClose})}),(0,c.createElement)(m.ToggleControl,{label:(0,a.__)("Close on Click Outside","otter-blocks"),checked:e.outsideClose,onChange:()=>t({outsideClose:!e.outsideClose})}),Boolean(window.themeisleGutenberg.hasNeveSupport.hasNeve)&&!Boolean(window.themeisleGutenberg.hasNeveSupport.hasNevePro)&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(m.Disabled,null,(0,c.createElement)(b,{attributes:e,setAttributes:t})),(0,c.createElement)(m.ExternalLink,{href:"https://themeisle.com/themes/neve/pricing"},(0,a.__)("Extend Popup block functionalities with more options in Neve Pro.","otter-blocks"))),Boolean(window.themeisleGutenberg.hasNeveSupport.isBoosterActive)&&(0,c.createElement)(b,{attributes:e,setAttributes:t})),(0,c.createElement)(m.PanelBody,{title:(0,a.__)("Style","otter-blocks"),initialOpen:!1},(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Minimum Width","otter-blocks"),min:100,max:1e3,value:e.minWidth,onChange:e=>t({minWidth:Number(e)})}),(0,c.createElement)(d.__experimentalColorGradientControl,{label:(0,a.__)("Background","otter-blocks"),colorValue:e.backgroundColor,onColorChange:e=>t({backgroundColor:e})}),e.showClose&&(0,c.createElement)(d.__experimentalColorGradientControl,{label:(0,a.__)("Close Button","otter-blocks"),colorValue:e.closeColor,onColorChange:e=>t({closeColor:e})}),(0,c.createElement)(d.__experimentalColorGradientControl,{label:(0,a.__)("Overlay","otter-blocks"),colorValue:e.overlayColor,onColorChange:e=>t({overlayColor:e})}),(0,c.createElement)(m.RangeControl,{label:(0,a.__)("Overlay Opacity","otter-blocks"),value:e.overlayOpacity,onChange:e=>t({overlayOpacity:Number(e)})})))},p=l(5225),g=l(4184),h=l.n(g);(0,r.registerBlockType)("themeisle-blocks/popup",{title:(0,a.__)("Popup","otter-blocks"),description:(0,a.__)("Display your content in beautiful popup with many customization options..","otter-blocks"),icon:o.Z,category:"themeisle-blocks",keywords:["popup","modal","lightbox"],attributes:n,edit:({attributes:e,setAttributes:t,className:l,clientId:o})=>{(0,c.useEffect)((()=>{const t=(0,p.WX)(o,n);return()=>t(e.id)}),[]);const[r,b]=(0,c.useState)(!1),g={content:{minWidth:e.minWidth,background:e.backgroundColor},close:{color:e.closeColor},overlay:{background:e.overlayColor,opacity:(e.overlayOpacity||75)/100}};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(u,{attributes:e,setAttributes:t}),(0,c.createElement)("div",{id:e.id,className:l},(0,c.createElement)(m.Button,{isPrimary:!0,icon:i.Z,onClick:()=>b(!0)},(0,a.__)("Edit Popup","otter-blocks")),r&&(0,c.createElement)("div",{className:"otter-popup__modal_wrap"},(0,c.createElement)("div",{role:"presentation",className:"otter-popup__modal_wrap_overlay",style:g.overlay,onClick:()=>b(!1)}),(0,c.createElement)("div",{className:"otter-popup__modal_content",style:g.content},e.showClose&&(0,c.createElement)("div",{className:"otter-popup__modal_header"},(0,c.createElement)(m.Button,{icon:s.Z,style:g.close,onClick:()=>b(!1)})),(0,c.createElement)("div",{className:"otter-popup__modal_body"},(0,c.createElement)(d.InnerBlocks,null))))))},save:({attributes:e,className:t})=>(0,c.createElement)("div",{className:h()(t,"is-front"),id:e.id,"data-open":e.trigger,"data-dismiss":e.recurringClose?e.recurringTime:"","data-time":void 0===e.trigger||"onLoad"===e.trigger?e.wait||0:"","data-anchor":"onClick"===e.trigger?e.anchor:"","data-offset":"onScroll"===e.trigger?e.scroll:"","data-outside":e.outsideClose?e.outsideClose:"","data-anchorclose":e.anchorClose?e.closeAnchor:""},(0,c.createElement)("div",{className:"otter-popup__modal_wrap"},(0,c.createElement)("div",{role:"presentation",className:"otter-popup__modal_wrap_overlay"}),(0,c.createElement)("div",{className:"otter-popup__modal_content"},e.showClose&&(0,c.createElement)("div",{className:"otter-popup__modal_header"},(0,c.createElement)(m.Button,{icon:s.Z})),(0,c.createElement)("div",{className:"otter-popup__modal_body"},(0,c.createElement)(d.InnerBlocks.Content,null)))))})},5356:function(e,t,l){l.d(t,{Z:function(){return u}});var o=l(9307),a=l(4184),r=l.n(a),n=l(5736),c=l(4715),i=l(5609),s=l(9818),d=({id:e,link:t,alt:l,size:a})=>{const{featuredImage:r,altText:n}=(0,s.useSelect)((t=>{const o=t("core").getMedia(e);return{featuredImage:o?0<Object.keys(o.media_details.sizes).length&&o.media_details.sizes[a]?o.media_details.sizes[a].source_url:o.source_url:null,altText:o&&o.alt_text?o.alt_text:l}}),[a]);return null===r?(0,o.createElement)(o.Fragment,null):(0,o.createElement)("div",{className:"wp-block-themeisle-blocks-posts-grid-post-image"},(0,o.createElement)("a",{href:t},r?(0,o.createElement)("img",{src:r,size:a,alt:n,"data-id":e}):(0,o.createElement)(i.Placeholder,null,(0,o.createElement)(i.Spinner,null))))},m=({className:e,attributes:t,posts:l,categoriesList:a,authors:i})=>{const s=t.titleTag||"h5";return(0,o.createElement)("div",{className:r()(e,"is-grid",`wp-block-themeisle-blocks-posts-grid-columns-${t.columns}`,{"has-shadow":t.imageBoxShadow})},l.filter((e=>e)).map((e=>{var l,r;let m,b;return a&&0<(null===(l=e.categories)||void 0===l?void 0:l.length)&&(m=a.find((t=>t.id===e.categories[0]))),i&&e.author&&(b=i.find((t=>t.id===e.author))),(0,o.createElement)("div",{key:e.link,className:"wp-block-themeisle-blocks-posts-grid-post-blog wp-block-themeisle-blocks-posts-grid-post-plain"},(0,o.createElement)("div",{className:"wp-block-themeisle-blocks-posts-grid-post"},void 0!==e.featured_media&&0!==e.featured_media&&t.displayFeaturedImage&&(0,o.createElement)(d,{id:e.featured_media,link:e.link,alt:null===(r=e.title)||void 0===r?void 0:r.rendered,size:t.imageSize}),(0,o.createElement)("div",{className:"wp-block-themeisle-blocks-posts-grid-post-body"},t.template.map((l=>{return"category"===l&&void 0!==m&&t.displayCategory&&a?(0,o.createElement)("span",{key:l,className:"wp-block-themeisle-blocks-posts-grid-post-category"},m.name):"title"===l&&t.displayTitle?(0,o.createElement)(s,{key:l,className:"wp-block-themeisle-blocks-posts-grid-post-title"},(0,o.createElement)("a",{href:e.link},(0,c.Uo)(null===(r=e.title)||void 0===r?void 0:r.rendered))):"meta"===l&&t.displayMeta&&(t.displayDate||t.displayAuthor)?(0,o.createElement)("p",{key:l,className:"wp-block-themeisle-blocks-posts-grid-post-meta"},t.displayDate&&
48
  /**
49
  * translators: %s Date posted
50
  */
52
  /**
53
  * translators: %s Author
54
  */
55
+ (0,n.sprintf)((0,n.__)(" by %s","otter-blocks"),b.name)):"description"===l&&0<t.excerptLength&&t.displayDescription?(0,o.createElement)("p",{key:l,className:"wp-block-themeisle-blocks-posts-grid-post-description"},(null===(d=e.excerpt)||void 0===d?void 0:d.rendered)&&(0,c.Uo)(e.excerpt.rendered).substring(0,t.excerptLength)+"…"):void 0;var r,d})))))})))},b=({className:e,attributes:t,posts:l,categoriesList:a,authors:i})=>{const s=t.titleTag||"h5";return(0,o.createElement)("div",{className:r()(e,"is-list",{"has-shadow":t.imageBoxShadow})},l.filter((e=>e)).map((e=>{var l,m;let b,u;return a&&0<(null==e||null===(l=e.categories)||void 0===l?void 0:l.length)&&(b=a.find((t=>t.id===e.categories[0]))),i&&e.author&&(u=i.find((t=>t.id===e.author))),(0,o.createElement)("div",{key:e.link,className:"wp-block-themeisle-blocks-posts-grid-post-blog wp-block-themeisle-blocks-posts-grid-post-plain"},(0,o.createElement)("div",{className:"wp-block-themeisle-blocks-posts-grid-post"},0!==e.featured_media&&t.displayFeaturedImage&&(0,o.createElement)(d,{id:e.featured_media,link:e.link,alt:null===(m=e.title)||void 0===m?void 0:m.rendered,size:t.imageSize}),(0,o.createElement)("div",{className:r()("wp-block-themeisle-blocks-posts-grid-post-body",{"is-full":!t.displayFeaturedImage})},t.template.map((l=>{return"category"===l&&void 0!==b&&t.displayCategory&&a?(0,o.createElement)("span",{key:l,className:"wp-block-themeisle-blocks-posts-grid-post-category"},b.name):"title"===l&&t.displayTitle?(0,o.createElement)(s,{key:l,className:"wp-block-themeisle-blocks-posts-grid-post-title"},(0,o.createElement)("a",{href:e.link},(0,c.Uo)(null===(r=e.title)||void 0===r?void 0:r.rendered))):"meta"===l&&t.displayMeta&&(t.displayDate||t.displayAuthor)?(0,o.createElement)("p",{key:l,className:"wp-block-themeisle-blocks-posts-grid-post-meta"},t.displayDate&&
56
  /* translators: %s Date posted */
57
  (0,n.sprintf)((0,n.__)("on %s","otter-blocks"),(0,c.p6)(e.date)),t.displayAuthor&&void 0!==u&&i&&
58
  /* translators: %s Author of the post */
59
+ (0,n.sprintf)((0,n.__)(" by %s","otter-blocks"),u.name)):"description"===l&&0<t.excerptLength&&t.displayDescription?(0,o.createElement)("p",{key:l,className:"wp-block-themeisle-blocks-posts-grid-post-description"},(null===(d=e.excerpt)||void 0===d?void 0:d.rendered)&&(0,c.Uo)(e.excerpt.rendered).substring(0,t.excerptLength)+"…"):void 0;var r,d})))))})))},u=({className:e,attributes:t,posts:l,categoriesList:a,authors:r})=>"grid"===t.style?(0,o.createElement)(m,{className:e,attributes:t,posts:l,categoriesList:a,authors:r}):"list"===t.style?(0,o.createElement)(b,{className:e,attributes:t,posts:l,categoriesList:a,authors:r}):void 0},2201:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={style:{type:"string",default:"grid"},postTypes:{type:"array",default:[]},columns:{type:"number",default:3},template:{type:"array",default:["category","title","meta","description"]},categories:{type:"array",items:{type:"object"}},postsToShow:{type:"number",default:5},order:{type:"string",default:"desc"},orderBy:{type:"string",default:"date"},offset:{type:"number",default:0},imageSize:{type:"string",default:"full"},imageBoxShadow:{type:"boolean",default:!0},displayFeaturedImage:{type:"boolean",default:!0},displayCategory:{type:"boolean",default:!0},displayTitle:{type:"boolean",default:!0},titleTag:{type:"string",default:"h5"},displayMeta:{type:"boolean",default:!0},displayDescription:{type:"boolean",default:!0},excerptLength:{type:"number",default:100},displayDate:{type:"boolean",default:!0},displayAuthor:{type:"boolean",default:!0}},c=[{attributes:{...n,categories:{type:"string"}},supports:{align:["wide","full"],html:!1},migrate:e=>({...e,categories:[{id:Number(e.categories)}]}),isEligible:({categories:e})=>e&&"string"==typeof e,save:()=>null}],i=l(9307),s=l(2819),d=l(5609),m=l(9818),b=l(5241),u=l(2175),p=l(454),g=l.n(p),h=l(4184),k=l.n(h),v=l(1286);const y=(0,v.W6)((()=>(0,i.createElement)("div",{className:"otter-blocks-sortable-handle",tabIndex:"0"},(0,i.createElement)("span",null)))),_=({value:e,disabled:t,getFields:l,toggleFields:a,imageSize:r,titleTag:n,excerptLimit:c})=>{const[m,b]=(0,i.useState)(!1),u=(0,s.startCase)((0,s.toLower)(e));let p,g="hidden",h=(0,o.sprintf)((0,o.__)("Display %s","otter-blocks"),u);
60
  /* translators: %s Label */switch(l(e)&&(g="visibility",
61
  /* translators: %s Label */
62
  h=(0,o.sprintf)((0,o.__)("Hide %s","otter-blocks"),u)),e){case"image":case"title":case"meta":case"description":p=!0;break;default:p=!1}return(0,i.createElement)("div",{className:k()("otter-blocks-sortable-item-area",`otter-blocks-sortable-item-area-${e}`)},(0,i.createElement)("div",{className:k()("otter-blocks-sortable-item",{disabled:t,hidden:!l(e),editable:p})},!t&&(0,i.createElement)(y,null),(0,i.createElement)("div",{className:"otter-blocks-sortable-label"},u),p&&(0,i.createElement)(d.Button,{icon:m?"arrow-up-alt2":"arrow-down-alt2",label:m?(0,o.__)("Close Settings","otter-blocks"):(0,o.__)("Open Settings","otter-blocks"),showTooltip:!0,className:"otter-blocks-sortable-button",onClick:()=>b(!m)}),(0,i.createElement)(d.Button,{icon:g,label:h,showTooltip:!0,className:"otter-blocks-sortable-button",onClick:()=>{a(e),b(!1)}})),p&&(0,i.createElement)("div",{className:k()("otter-blocks-sortable-control-area",{opened:m&&l(e)})},"image"===e&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.SelectControl,{label:(0,o.__)("Image Size","otter-blocks"),value:r.value,options:window.themeisleGutenberg.imageSizes.map((e=>({label:(0,s.startCase)((0,s.toLower)(e)),value:e}))),onChange:r.onChange}),(0,i.createElement)(d.ToggleControl,{label:(0,o.__)("Display Box Shadow?","otter-blocks"),checked:l("imageBoxShadow","otter-blocks"),onChange:()=>a("imageBoxShadow")})),"title"===e&&(0,i.createElement)(d.SelectControl,{label:(0,o.__)("Title Tag","otter-blocks"),value:n.value||"h5",options:[{label:(0,o.__)("H1","otter-blocks"),value:"h1"},{label:(0,o.__)("H2","otter-blocks"),value:"h2"},{label:(0,o.__)("H3","otter-blocks"),value:"h3"},{label:(0,o.__)("H4","otter-blocks"),value:"h4"},{label:(0,o.__)("H5","otter-blocks"),value:"h5"},{label:(0,o.__)("H6","otter-blocks"),value:"h6"}],onChange:n.onChange}),"description"===e&&(0,i.createElement)(d.TextControl,{label:(0,o.__)("Excerpt Limit","otter-blocks"),type:"number",value:c.value,onChange:c.onChange}),"meta"===e&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.ToggleControl,{label:(0,o.__)("Display Date?","otter-blocks"),checked:l("date"),onChange:()=>a("date")}),(0,i.createElement)(d.ToggleControl,{label:(0,o.__)("Display Author?","otter-blocks"),checked:l("author"),onChange:()=>a("author")}))))},w=(0,v.W8)((({value:e,disabled:t,getFields:l,toggleFields:o,titleTag:a,excerptLimit:r})=>(0,i.createElement)(_,{value:e,disabled:t,getFields:l,toggleFields:o,titleTag:a,excerptLimit:r}))),f=(0,v.JN)((({template:e,getFields:t,toggleFields:l,titleTag:o,excerptLimit:a})=>(0,i.createElement)("div",null,e.map(((e,r)=>(0,i.createElement)(w,{key:`item-${e}`,index:r,value:e,getFields:t,toggleFields:l,titleTag:o,excerptLimit:a}))))));var C=({attributes:e,setAttributes:t,getFields:l,toggleFields:o,imageSize:a,titleTag:r,excerptLimit:n})=>(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:k()("otter-blocks-sortable",e.style)},(0,i.createElement)(_,{value:"image",disabled:!0,getFields:l,toggleFields:o,imageSize:a}),(0,i.createElement)(f,{template:e.template,onSortEnd:({oldIndex:l,newIndex:o})=>{const a=g()(e.template,l,o);t({template:a})},getFields:l,toggleFields:o,titleTag:r,excerptLimit:n,useDragHandle:!0,axis:"y",lockAxis:"y"}))),E=l(4715),T=({attributes:e,setAttributes:t,changeStyle:l,categoriesList:a})=>{const{slugs:r}=(0,m.useSelect)((e=>({slugs:e("otter-store").getPostsSlugs()})),[e.postTypes]),n=a.reduce(((e,t)=>({...e,[t.name]:t})),{}),c=e.categories?e.categories.map((e=>{const t=a.find((t=>t.id===Number(e.id)));return{id:e.id,name:(null==t?void 0:t.name)||(null==t?void 0:t.slug)||""}})):[],s="object"==typeof e.categories?1<=e.categories.length?e.categories[0].id:void 0:e.categories;return(0,i.createElement)(u.InspectorControls,null,(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Styles","otter-blocks"),initialOpen:!1},(0,i.createElement)(b.V,{value:e.style,options:[{label:(0,o.__)("Grid","otter-blocks"),value:"grid",image:window.themeisleGutenberg.assetsPath+"/icons/posts-grid.jpg"},{label:(0,o.__)("List","otter-blocks"),value:"list",image:window.themeisleGutenberg.assetsPath+"/icons/posts-list.jpg"}],onChange:l})),(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Post Types","otter-blocks")},(0,i.createElement)(d.BaseControl,null,(0,o.__)("Select the types of the post. If none is selected, the default WordPress post will be displayed.","otter-blocks")),(0,i.createElement)(d.SelectControl,{label:(0,o.__)("Post Type","otter-blocks"),value:e.postTypes[0]||null,onChange:e=>e&&t({postTypes:[e]}),options:r.map((e=>({label:(0,E.__)(e),value:e})))})),(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},"grid"===e.style&&(0,i.createElement)(d.RangeControl,{label:(0,o.__)("Columns","otter-blocks"),value:e.columns,onChange:e=>{t({columns:e})},min:1,max:5}),(0,i.createElement)(d.QueryControls,{order:e.order,orderBy:e.orderBy,onOrderChange:e=>t({order:e}),onOrderByChange:e=>t({orderBy:e}),numberOfItems:e.postsToShow,onNumberOfItemsChange:e=>t({postsToShow:e}),categorySuggestions:n,selectedCategoryId:s,selectedCategories:c,onCategoryChange:e=>{let l;"object"==typeof e?0<e.length&&(l=e.map((e=>{if("object"==typeof e)return e;const t=a.find((t=>t.name===e));return t?{id:t.id,name:e}:void 0})).filter((e=>void 0!==e))):""!==e&&(l=[{id:e,name:a.find((t=>t.id===Number(e))).name}]),t({categories:l})}}),(0,i.createElement)(d.TextControl,{label:(0,o.__)("Offset","otter-blocks"),help:(0,o.__)("Number of post to displace or pass over.","otter-blocks"),type:"number",value:e.offset,min:0,onChange:e=>t({offset:Number(e)})})),(0,i.createElement)(d.PanelBody,{title:(0,o.__)("Design & Layout","otter-blocks"),initialOpen:!1},(0,i.createElement)(C,{attributes:e,getFields:t=>"image"===t?e.displayFeaturedImage:"imageBoxShadow"===t?e.imageBoxShadow:"category"===t?e.displayCategory:"title"===t?e.displayTitle:"meta"===t?e.displayMeta:"description"===t?e.displayDescription:"date"===t?e.displayDate:"author"===t?e.displayAuthor:void 0,toggleFields:l=>{"image"===l&&t({displayFeaturedImage:!e.displayFeaturedImage}),"imageBoxShadow"===l&&t({imageBoxShadow:!e.imageBoxShadow}),"category"===l&&t({displayCategory:!e.displayCategory}),"title"===l&&t({displayTitle:!e.displayTitle}),"meta"===l&&t({displayMeta:!e.displayMeta}),"description"===l&&t({displayDescription:!e.displayDescription}),"date"===l&&t({displayDate:!e.displayDate}),"author"===l&&t({displayAuthor:!e.displayAuthor})},setAttributes:t,imageSize:{value:e.imageSize,onChange:e=>{t({imageSize:e})}},titleTag:{value:e.titleTag,onChange:e=>{t({titleTag:e})}},excerptLimit:{value:e.excerptLength,onChange:e=>{t({excerptLength:e})}}})))},x=l(5356);const M={posts:{slugs:[],usedSlugs:[]}};(0,m.registerGenericStore)("otter-store",(()=>{let e=()=>{};const t=M,l={getPostsSlugs:()=>t.posts.slugs,getPostsUsedSlugs:()=>t.posts.usedSlugs},o={setPostsSlugs(l){t.posts.slugs=l,e()},setPostsUsedSlugs(l){t.posts.usedSlugs.push(...l),e()},setOnlyOneSlug(l){t.posts.usedSlugs=[l],e()},removePostsUsedSlugs(l){t.posts.usedSlugs=t.posts.usedSlugs.filter((e=>!l.includes(e))),e()}};return{getSelectors:()=>l,getActions:()=>o,subscribe(t){e=t}}})());(0,a.registerBlockType)("themeisle-blocks/posts-grid",{title:(0,o.__)("Posts","otter-blocks"),description:(0,o.__)("Display a list of your most recent posts in a beautiful layout.","otter-blocks"),icon:r.ki,category:"themeisle-blocks",keywords:["posts","grid","news"],attributes:n,supports:{align:["wide","full"],html:!1},deprecated:c,edit:({attributes:e,setAttributes:t,className:l})=>{const[a,r]=(0,i.useState)([]),{posts:n,categoriesList:c,authors:u}=(0,m.useSelect)((t=>{const l=e.categories&&0<e.categories.length?e.categories.map((e=>e.id)):[],o=(0,s.pickBy)({categories:l,order:e.order,orderby:e.orderBy,per_page:e.postsToShow,offset:e.offset},(e=>!(0,s.isUndefined)(e))),a=e.postTypes;return{posts:0<a.length?a.map((e=>t("core").getEntityRecords("postType",e,o))).flat():t("core").getEntityRecords("postType","post",o),categoriesList:t("core").getEntityRecords("taxonomy","category",{per_page:100}),authors:t("core").getAuthors()}}),[e.categories,e.order,e.orderBy,e.postsToShow,e.offset,e.postTypes]),p=e=>{t({style:e})};return(0,i.useEffect)((()=>{(async()=>{r(await(0,E.R3)())})()}),[]),(0,i.useEffect)((()=>{(0,m.dispatch)("otter-store").setPostsSlugs(a)}),[a]),n&&c&&u?0===n.length?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.Placeholder,null,(0,o.__)("No Posts","otter-blocks")),c&&e.offset||a.length?(0,i.createElement)(T,{attributes:e,setAttributes:t,changeStyle:p,categoriesList:c}):null):(0,i.createElement)(i.Fragment,null,(0,i.createElement)(b.d,{label:(0,o.__)("Block Styles","otter-blocks"),value:e.style,options:[{label:(0,o.__)("Grid","otter-blocks"),value:"grid",image:window.themeisleGutenberg.assetsPath+"/icons/posts-grid.jpg"},{label:(0,o.__)("List","otter-blocks"),value:"list",image:window.themeisleGutenberg.assetsPath+"/icons/posts-list.jpg"}],onChange:p}),(0,i.createElement)(T,{attributes:e,setAttributes:t,changeStyle:p,categoriesList:c}),(0,i.createElement)(d.Disabled,null,(0,i.createElement)(x.Z,{className:l,attributes:e,posts:n,categoriesList:c,authors:u}))):(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.Placeholder,null,(0,i.createElement)(d.Spinner,null),(0,o.__)("Loading Posts","otter-blocks")),c&&e.offset?(0,i.createElement)(T,{attributes:e,setAttributes:t,changeStyle:p,categoriesList:c}):null)},save:()=>null})},5546:function(e,t,l){var o=l(5736),a=l(4981),r={id:{type:"string"},title:{type:"string",default:(0,o.__)("Skill","otter-blocks")},percentage:{type:"number",default:50},duration:{type:"number",default:2},titleStyle:{type:"string",default:"default"},percentagePosition:{type:"string",default:"default"},height:{type:"number",default:30},borderRadius:{type:"number"},backgroundColor:{type:"string"},barBackgroundColor:{type:"string"},titleColor:{type:"string"},percentageColor:{type:"string"}},n=l(9307),c=l(4184),i=l.n(c),s=l(5609),d=l(2175),m=l(5225),b=l(2819),u=({attributes:e,setAttributes:t,onHeightChange:l,heightMode:a,setHeightMode:r})=>(0,n.createElement)(d.InspectorControls,null,(0,n.createElement)(s.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},(0,n.createElement)(s.TextControl,{label:(0,o.__)("Title","otter-blocks"),value:e.title,onChange:e=>{t({title:e})}}),(0,n.createElement)(s.RangeControl,{label:(0,o.__)("Percentage","otter-blocks"),help:(0,o.__)("The value of the progress bar.","otter-blocks"),value:e.percentage,onChange:e=>{void 0!==e&&(e=(0,b.clamp)(e,0,100),t({percentage:e}))},min:0,max:100}),(0,n.createElement)(s.RangeControl,{label:(0,o.__)("Duration","otter-blocks"),help:(0,o.__)("The duration of the animation.","otter-blocks"),value:e.duration,onChange:e=>{void 0!==e&&(e=(0,b.clamp)(e,0,3),t({duration:e}))},min:0,max:3,step:.1}),30<=e.height&&(0,n.createElement)(s.SelectControl,{label:(0,o.__)("Title Style","otter-blocks"),value:e.titleStyle,options:[{label:(0,o.__)("Default","otter-blocks"),value:"default"},{label:(0,o.__)("Highlight","otter-blocks"),value:"highlight"},{label:(0,o.__)("Outer","otter-blocks"),value:"outer"}],onChange:e=>{t({titleStyle:e})}}),(0,n.createElement)(s.SelectControl,{label:(0,o.__)("Show Percentage","otter-blocks"),value:e.percentagePosition,options:[{label:(0,o.__)("Default","otter-blocks"),value:"default"},{label:(0,o.__)("Append","otter-blocks"),value:"append"},{label:(0,o.__)("Tooltip","otter-blocks"),value:"tooltip"},{label:(0,o.__)("Outer","otter-blocks"),value:"outer"},{label:(0,o.__)("Hide","otter-blocks"),value:"hide"}],onChange:e=>{a.isAutomatic&&(a.percentagePosition=e,r({...a})),t({percentagePosition:e})}})),(0,n.createElement)(s.PanelBody,{title:(0,o.__)("Style","otter-blocks"),initialOpen:!1},(0,n.createElement)(s.RangeControl,{label:(0,o.__)("Height","otter-blocks"),help:(0,o.__)("The height of the progress bar.","otter-blocks"),value:e.height,onChange:l,min:0,max:100}),(0,n.createElement)(s.RangeControl,{label:(0,o.__)("Border Radius","otter-blocks"),help:(0,o.__)("Round the corners of the progress bar.","otter-blocks"),value:e.borderRadius,onChange:e=>{t({borderRadius:e})},initialPosition:5,min:0,max:35}),(0,n.createElement)(d.__experimentalColorGradientControl,{label:(0,o.__)("Progress Color","otter-blocks"),colorValue:e.barBackgroundColor,onColorChange:e=>{t({barBackgroundColor:e})}}),(0,n.createElement)(d.__experimentalColorGradientControl,{label:(0,o.__)("Title Color","otter-blocks"),colorValue:e.titleColor,onColorChange:e=>{t({titleColor:e})}}),(0,n.createElement)(d.__experimentalColorGradientControl,{label:(0,o.__)("Percentage Color","otter-blocks"),colorValue:e.percentageColor,onColorChange:e=>{t({percentageColor:e})}}),(0,n.createElement)(d.__experimentalColorGradientControl,{label:(0,o.__)("Background Color","otter-blocks"),colorValue:e.backgroundColor,onColorChange:e=>{t({backgroundColor:e})}})));var p={to:[{type:"block",blocks:["themeisle-blocks/circle-counter"],transform:e=>{const t=(0,b.omit)(e,["titleStyle","percentagePosition","height","borderRadius","barBackgroundColor","percentageColor"]);return(0,a.createBlock)("themeisle-blocks/circle-counter",{...t,progressColor:e.barBackgroundColor,height:(0,b.clamp)(4*e.height,0,240),titleStyle:"default"})}}]};(0,a.registerBlockType)("themeisle-blocks/progress-bar",{title:(0,o.__)("Progress Bar","otter-blocks"),description:(0,o.__)("Show your progress with a beautiful Progress Bar block.","otter-blocks"),icon:"minus",category:"themeisle-blocks",keywords:["progress","bar","skills"],attributes:r,transforms:p,edit:({attributes:e,setAttributes:t,className:l,isSelected:o,clientId:a,toggleSelection:c})=>{(0,n.useEffect)((()=>{const t=(0,m.WX)(a,r);return()=>t(e.id)}),[e.id]);const[b,p]=(0,n.useState)(!1),[g,h]=(0,n.useState)({isAutomatic:!1,titleStyle:e.titleStyle,percentagePosition:e.percentagePosition}),k=(0,n.useRef)(null);(0,n.useEffect)((()=>{k.current&&(p(!1),setTimeout((()=>p(!0)),1e3*e.duration),k.current.animate({width:`${e.percentage}%`},{duration:1e3*e.duration,easing:"linear",fill:"forwards"}))}),[e.percentage,e.duration]);const v=.65,y=l=>{30>l?(g.isAutomatic||h({isAutomatic:!0,titleStyle:e.titleStyle,percentagePosition:e.percentagePosition}),t({height:l,titleStyle:"outer",percentagePosition:"append"===e.percentagePosition||"default"===e.percentagePosition?"outer":e.percentagePosition})):(g.isAutomatic&&h({isAutomatic:!1}),t({titleStyle:g.isAutomatic?g.titleStyle:e.titleStyle,percentagePosition:g.isAutomatic?g.percentagePosition:e.percentagePosition,height:l}))};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(u,{attributes:e,setAttributes:t,onHeightChange:y,heightMode:g,setHeightMode:h}),(0,n.createElement)("div",{className:i()(l,{"has-tooltip":"tooltip"===e.percentagePosition}),id:e.id},("outer"===e.titleStyle||"outer"===e.percentagePosition)&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__outer"},"outer"===e.titleStyle&&(0,n.createElement)(d.RichText,{tagName:"span",allowedFormats:[],className:"wp-block-themeisle-blocks-progress-bar__outer__title",value:e.title,style:{color:e.titleColor},onChange:e=>t({title:e})}),"outer"===e.percentagePosition&&b&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress wp-block-themeisle-blocks-progress-bar__outer__value",style:{color:e.percentageColor}},`${e.percentage}%`)),(0,n.createElement)(s.ResizableBox,{size:{height:e.height},minHeight:5,maxHeight:100,enable:{top:!1,right:!1,bottom:!0,left:!1},showHandle:o,onResizeStop:(t,l,o,a)=>{y(parseInt(e.height+a.height,10)),c(!0)},onResizeStart:()=>{c(!1)}},(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__area",style:{background:e.backgroundColor,borderRadius:`${e.borderRadius}px`,height:`${e.height}px`}},("default"===e.titleStyle||"highlight"===e.titleStyle)&&(0,n.createElement)("div",{className:i()("wp-block-themeisle-blocks-progress-bar__area__title",{highlight:"highlight"===e.titleStyle}),style:{fontSize:e.height*v+"px",background:"highlight"===e.titleStyle&&e.barBackgroundColor,borderRadius:`${e.borderRadius}px 0px 0px ${e.borderRadius}px`,height:`${e.height}px`}},(0,n.createElement)(d.RichText,{tagName:"span",allowedFormats:[],value:e.title,style:{height:`${e.height}px`,color:e.titleColor,borderRadius:`${e.borderRadius}px 0px 0px ${e.borderRadius}px`},onChange:e=>t({title:e})})),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__area__bar show",ref:k,style:{background:e.barBackgroundColor,borderRadius:`${e.borderRadius}px`,height:`${e.height}px`}},"tooltip"===e.percentagePosition&&b&&(0,n.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__tooltip show",style:{color:e.percentageColor}},`${e.percentage}%`,(0,n.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__arrow"})),"append"===e.percentagePosition&&b&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress__append show",style:{fontSize:e.height*v+"px",height:`${e.height}px`,color:e.percentageColor}},`${e.percentage}%`)),"default"===e.percentagePosition&&b&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress",style:{fontSize:e.height*v+"px",height:`${e.height}px`,color:e.percentageColor}},`${e.percentage}%`)))))},save:({attributes:e,className:t})=>(0,n.createElement)("div",{className:i()(t,{"has-tooltip":"tooltip"===e.percentagePosition}),id:e.id,"data-percent":e.percentage,"data-duration":e.duration},("outer"===e.titleStyle||"outer"===e.percentagePosition)&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__outer"},"outer"===e.titleStyle&&(0,n.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__outer__title"},e.title),"outer"===e.percentagePosition&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__outer__value wp-block-themeisle-blocks-progress-bar__number"},e.percentage)),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__area"},("default"===e.titleStyle||"highlight"===e.titleStyle)&&(0,n.createElement)("div",{className:i()("wp-block-themeisle-blocks-progress-bar__area__title",{highlight:"highlight"===e.titleStyle})},(0,n.createElement)("span",null,e.title)),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__area__bar"},"tooltip"===e.percentagePosition&&(0,n.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__tooltip"},(0,n.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__number"},e.percentage),(0,n.createElement)("span",{className:"wp-block-themeisle-blocks-progress-bar__area__arrow"})),"append"===e.percentagePosition&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress__append wp-block-themeisle-blocks-progress-bar__number"},e.percentage)),"default"===e.percentagePosition&&(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-progress-bar__progress wp-block-themeisle-blocks-progress-bar__number"},`${e.percentage}%`)))})},8629:function(e,t,l){var o=l(9307),a=l(5736),r=l(4981),n=l(5609),c=l(340),i={id:{type:"string"},reviews:{type:"array",default:[]},buttonColor:{type:"string"},buttonText:{type:"string"}},s=l(1216),d=l(4184),m=l.n(d),b=l(1463),u=l.n(b),p=l(6989),g=l.n(p),h=l(6030),k=({attributes:e,setAttributes:t,data:l,onComplete:r,isLoading:c,isComplete:i,isError:s})=>{const[d,m]=(0,o.useState)(""),b=l=>{const o=[...e.reviews];if(o.includes(l)){const e=o.indexOf(l);-1!==e&&o.splice(e,1)}else o.push(l);t({reviews:o})},u=({label:e,value:t})=>(0,o.createElement)("span",{className:"otter-review-comparison__tag"},(0,o.createElement)("span",{className:"otter-review-comparison__tag_title"},e),(0,o.createElement)(n.Button
67
  background: ${e.buttonColor} !important;
68
  color: ${e.buttonText} !important;
69
  }
70
+ `;(0,o.useEffect)((()=>{E=[],T=[],x=[],M=[],S=[],B=[],z=[],Boolean(n.length)&&e.reviews.forEach((e=>{var t;const l=e.split("-"),r=n.find((e=>e.ID===Number(l[0])&&e.attrs.id.slice(e.attrs.id.length-8)===l[1]));if(!r)return;const c=null!==(t=u()(r.attrs.currency))&&void 0!==t?t:"$",i=r.attrs.features||C.Z.features.default,d=Math.round(i.reduce(((e,t)=>e+t.rating),0)/i.length)/2,m=r.attrs.links||C.Z.links.default,b=[];i.forEach((e=>{b.push((0,s.tZ)("div",{className:"otter-review-comparison__rating_container"},(0,s.tZ)("div",{className:"otter-review-comparison__rating_title"},e.title),(0,s.tZ)("div",{className:"otter-review-comparison__ratings"},V(e.rating/2))))}));const p=[];m.forEach((e=>{p.push((0,s.tZ)("span",{className:"wp-block-button__link"},e.label))})),E.push((0,s.tZ)("td",null,r.attrs.image&&(0,s.tZ)("img",{src:r.attrs.image.url}))),T.push((0,s.tZ)("td",null,r.attrs.title||(0,a.__)("Untitled review","otter-blocks"))),x.push((0,s.tZ)("td",null,r.attrs.discounted?(0,s.tZ)(o.Fragment,null,(0,s.tZ)("del",null,c+r.attrs.price)," ",c+r.attrs.discounted):r.attrs.price?c+r.attrs.price:"-")),M.push((0,s.tZ)("td",null,(0,s.tZ)("div",{className:"otter-review-comparison__ratings"},V(d)))),S.push((0,s.tZ)("td",{dangerouslySetInnerHTML:{__html:r.attrs.description}})),B.push((0,s.tZ)("td",null,b)),z.push((0,s.tZ)("td",null,(0,s.tZ)("div",{className:"otter-review-comparison__buttons wp-block-button"},p)))}))}),[e.reviews,n]);const P="loading"===b,N="loaded"===b,R="error"===b,V=e=>{const t=[];for(let l=0;5>l;l++)t.push(l<e&&e<l+1?(0,s.tZ)(c.cV,{className:m()({low:1.5>=e&&l<e,medium:1.5<e&&3.5>=e&&l<e,high:3.5<e&&5>=e&&l<e})}):(0,s.tZ)(c.Rh,{className:m()({low:1.5>=e&&l<e,medium:1.5<e&&3.5>=e&&l<e,high:3.5<e&&5>=e&&l<e})}));return t};return h?(0,s.tZ)(k,{attributes:e,setAttributes:t,data:n,onComplete:()=>v(!1),isLoading:P,isComplete:N,isError:R}):(0,s.tZ)(o.Fragment,null,(0,s.tZ)(_,{onEdit:()=>v(!0)}),(0,s.tZ)(w,{attributes:e,setAttributes:t}),(0,s.tZ)("table",{id:e.id,className:l},(0,s.tZ)("thead",null,(0,s.tZ)("tr",null,(0,s.tZ)("th",null),E)),(0,s.tZ)("tbody",null,(0,s.tZ)("tr",null,(0,s.tZ)("th",null,(0,a.__)("Name","otter-blocks")),T),(0,s.tZ)("tr",null,(0,s.tZ)("th",null,(0,a.__)("Price","otter-blocks")),x),(0,s.tZ)("tr",null,(0,s.tZ)("th",null,(0,a.__)("Rating","otter-blocks")),M),(0,s.tZ)("tr",null,(0,s.tZ)("th",null,(0,a.__)("Description","otter-blocks")),S),(0,s.tZ)("tr",null,(0,s.tZ)("th",null,(0,a.__)("Statistics","otter-blocks")),B),(0,s.tZ)("tr",{css:y},(0,s.tZ)("th",null,(0,a.__)("Buy this product","otter-blocks")),z))))},save:()=>null}):(0,r.registerBlockType)("themeisle-blocks/review-comparison",{title:(0,a.__)("Review Comparison Table","otter-blocks"),description:(0,a.__)("A way to compare different product reviews made on the website.","otter-blocks"),icon:c.rL,category:"themeisle-blocks",keywords:["product","review","comparison"],attributes:i,supports:{inserter:!1},edit:()=>(0,o.createElement)(n.Placeholder,null,(0,a.__)("You need to have Neve Pro installed to edit Review Comparison Table block.","otter-blocks")),save:()=>null})},9934:function(e,t,l){var o=l(5736);const a={id:{type:"string"},title:{type:"string"},currency:{type:"string",default:"USD"},price:{type:"number"},discounted:{type:"number"},image:{type:"object"},description:{type:"string"},features:{type:"array",default:[{title:(0,o.__)("Stability","otter-blocks"),rating:9},{title:(0,o.__)("Ease of Use","otter-blocks"),rating:4},{title:(0,o.__)("Look & Feel","otter-blocks"),rating:9},{title:(0,o.__)("Price","otter-blocks"),rating:7}]},pros:{type:"array",default:[(0,o.__)("Easy to use","otter-blocks"),(0,o.__)("Good price","otter-blocks"),(0,o.__)("Sturdy build and ergonomics","otter-blocks")]},cons:{type:"array",default:[(0,o.__)("Incompatible with old versions","otter-blocks"),(0,o.__)("Hard to assemble","otter-blocks"),(0,o.__)("Bad color combination","otter-blocks")]},links:{type:"array",default:[{label:(0,o.__)("Buy on Amazon","otter-blocks"),href:"",isSponsored:!1},{label:(0,o.__)("Buy on eBay","otter-blocks"),href:"",isSponsored:!1}]},primaryColor:{type:"string"},backgroundColor:{type:"string"},textColor:{type:"string"},buttonTextColor:{type:"string"}};t.Z=a},5286:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9934),c=l(9307),i=l(4184),s=l.n(i),d=l(1463),m=l.n(d),b=l(2175),u=l(5609),p=l(2819);const g=({title:e,remove:t,children:l})=>{const[a,r]=(0,c.useState)(!1);return(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__inspector_panel_item"},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__inspector_panel_item__header"},(0,c.createElement)(u.Button,{className:"wp-block-themeisle-blocks-review__inspector_panel_item__title",onClick:()=>r(!a)},e),(0,c.createElement)(u.Button,{icon:"no-alt",label:(0,o.__)("Remove","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-review__inspector_panel_item__arrow",onClick:t})),a&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__inspector_panel_item__content"},l))};var h=({attributes:e,setAttributes:t,productAttributes:l})=>{var a,r,n,i,s;const d=(l,o)=>{const a=[...e.features];a[l]={...a[l],...o},t({features:a})},m=(l,o)=>{const a=[...e.links];a[l]={...a[l],...o},t({links:a})},h=l=>{let o=[...e.links];o=o.filter(((e,t)=>t!==l)),t({links:o})};return(0,c.createElement)(b.InspectorControls,null,(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Product Details","otter-blocks")},e.product&&(0,c.createElement)(u.Notice,{status:"warning",isDismissible:!1,className:"otter-html-anchor-control-notice"},(0,o.__)("WooCommerce product synchronization is active. Some options might be disabled.","otter-blocks")),(0,c.createElement)(u.TextControl,{label:(0,o.__)("Product Name","otter-blocks"),type:"text",placeholder:(0,o.__)("Name of your product…","otter-blocks"),value:(null==l?void 0:l.title)||e.title,disabled:e.product,onChange:e=>t({title:e})}),(0,c.createElement)(u.BaseControl,null,(0,c.createElement)(u.TextControl,{label:(0,o.__)("Currency","otter-blocks"),type:"text",placeholder:(0,o.__)("Currency code, like USD or EUR.","otter-blocks"),value:(null==l?void 0:l.currency)||e.currency,disabled:e.product,onChange:e=>t({currency:e})}),(0,o.__)("Currency code in three digit ISO 4217 code.","otter-blocks")+" ",(0,c.createElement)(u.ExternalLink,{href:"https://en.wikipedia.org/wiki/ISO_4217#Active_codes"},(0,o.__)("List of ISO 4217 codes.","otter-blocks"))),(0,c.createElement)(u.TextControl,{label:(0,o.__)("Price","otter-blocks"),type:"number",value:(null==l?void 0:l.price)||e.price,disabled:e.product,onChange:e=>t({price:""!==e?Number(e):void 0})}),(0,c.createElement)(u.TextControl,{label:(0,o.__)("Discounted Price","otter-blocks"),type:"number",value:(null==l?void 0:l.discounted)||e.discounted,disabled:e.product,onChange:e=>t({discounted:""!==e?Number(e):void 0})}),e.image||null!=l&&l.image?(0,c.createElement)(u.BaseControl,{className:"wp-block-themeisle-blocks-review__inspector_image"},(0,c.createElement)("img",{src:(null==l||null===(a=l.image)||void 0===a?void 0:a.url)||e.image.url,alt:(null==l||null===(r=l.image)||void 0===r?void 0:r.url)||e.image.alt}),(0,c.createElement)(u.Button,{isSecondary:!0,onClick:()=>t({image:void 0}),disabled:e.product},(0,o.__)("Remove image","otter-blocks"))):(0,c.createElement)(b.MediaPlaceholder,{labels:{title:(0,o.__)("Product Image","otter-blocks")},accept:"image/*",allowedTypes:["image"],value:e.image,onSelect:e=>t({image:(0,p.pick)(e,["id","alt","url"])})})),(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Product Features","otter-blocks"),initialOpen:!1},0<e.features.length&&e.features.map(((l,a)=>(0,c.createElement)(g,{title:l.title||(0,o.__)("Feature","otter-blocks"),remove:()=>(l=>{let o=[...e.features];o=o.filter(((e,t)=>t!==l)),t({features:o})})(a)},(0,c.createElement)(u.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",placeholder:(0,o.__)("Feature title","otter-blocks"),value:l.title,onChange:e=>d(a,{title:e})}),(0,c.createElement)(u.RangeControl,{label:(0,o.__)("Rating","otter-blocks"),value:l.rating,onChange:e=>d(a,{rating:Number(e)}),min:1,max:10})))),(0,c.createElement)(u.Button,{isSecondary:!0,className:"wp-block-themeisle-blocks-review__inspector_add",onClick:()=>{const l=[...e.features];l.push({title:(0,o.__)("Feature","otter-blocks"),rating:9}),t({features:l})}},(0,o.__)("Add Feature","otter-blocks"))),(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Pros","otter-blocks"),initialOpen:!1},0<e.pros.length&&e.pros.map(((l,a)=>(0,c.createElement)(g,{key:a,title:l||(0,o.__)("Pro","otter-blocks"),remove:()=>(l=>{let o=[...e.pros];o=o.filter(((e,t)=>t!==l)),t({pros:o})})(a)},(0,c.createElement)(u.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",placeholder:(0,o.__)("Why do you like the product?","otter-blocks"),value:l,onChange:l=>((l,o)=>{const a=[...e.pros];a[l]=o,t({pros:a})})(a,l)})))),(0,c.createElement)(u.Button,{isSecondary:!0,className:"wp-block-themeisle-blocks-review__inspector_add",onClick:()=>{const l=[...e.pros];l.push(""),t({pros:l})}},(0,o.__)("Add Item","otter-blocks"))),(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Cons","otter-blocks"),initialOpen:!1},0<e.cons.length&&e.cons.map(((l,a)=>(0,c.createElement)(g,{key:a,title:l||(0,o.__)("Con","otter-blocks"),remove:()=>(l=>{let o=[...e.cons];o=o.filter(((e,t)=>t!==l)),t({cons:o})})(a)},(0,c.createElement)(u.TextControl,{label:(0,o.__)("Title","otter-blocks"),type:"text",placeholder:(0,o.__)("What can be improved?","otter-blocks"),value:l,onChange:l=>((l,o)=>{const a=[...e.cons];a[l]=o,t({cons:a})})(a,l)})))),(0,c.createElement)(u.Button,{isSecondary:!0,className:"wp-block-themeisle-blocks-review__inspector_add",onClick:()=>{const l=[...e.cons];l.push(""),t({cons:l})}},(0,o.__)("Add Item","otter-blocks"))),(0,c.createElement)(u.PanelBody,{title:(0,o.__)("Links","otter-blocks"),initialOpen:!1},e.product&&(0,c.createElement)(u.Notice,{status:"warning",isDismissible:!1,className:"otter-html-anchor-control-notice"},(0,o.__)("WooCommerce product synchronization is active. Some options might be disabled.","otter-blocks")),0<(null==l||null===(n=l.links)||void 0===n?void 0:n.length)&&(null==l||null===(i=l.links)||void 0===i?void 0:i.map(((t,l)=>(0,c.createElement)(g,{key:l,title:t.label||(0,o.__)("Link","otter-blocks"),remove:()=>h(l)},(0,c.createElement)(u.TextControl,{label:(0,o.__)("Label","otter-blocks"),type:"text",placeholder:(0,o.__)("Button label","otter-blocks"),disabled:e.product,value:t.label}),(0,c.createElement)(u.TextControl,{label:(0,o.__)("Link","otter-blocks"),type:"url",placeholder:"https://…",value:t.href,disabled:e.product}),(0,c.createElement)(u.ToggleControl,{label:(0,o.__)("Is this Sponsored?","otter-blocks"),checked:t.isSponsored,disabled:e.product}))))),!(0<(null==l||null===(s=l.links)||void 0===s?void 0:s.length))&&(0,c.createElement)(c.Fragment,null,0<e.links.length&&e.links.map(((e,t)=>(0,c.createElement)(g,{title:e.label||(0,o.__)("Link","otter-blocks"),remove:()=>h(t)},(0,c.createElement)(u.TextControl,{label:(0,o.__)("Label","otter-blocks"),type:"text",placeholder:(0,o.__)("Button label","otter-blocks"),value:e.label,onChange:e=>m(t,{label:e})}),(0,c.createElement)(u.TextControl,{label:(0,o.__)("Link","otter-blocks"),type:"url",placeholder:"https://…",value:e.href,onChange:e=>m(t,{href:e})}),(0,c.createElement)(u.ToggleControl,{label:(0,o.__)("Is this Sponsored?","otter-blocks"),checked:e.isSponsored,onChange:()=>m(t,{isSponsored:!e.isSponsored})})))),(0,c.createElement)(u.Button,{isSecondary:!0,className:"wp-block-themeisle-blocks-review__inspector_add",onClick:()=>{const l=[...e.links];l.push({label:(0,o.__)("Buy Now","otter-blocks"),href:""}),t({links:l})}},(0,o.__)("Add Links","otter-blocks")))),(0,c.createElement)(b.PanelColorSettings,{title:(0,o.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:e.primaryColor,onChange:e=>t({primaryColor:e}),label:(0,o.__)("Primary","otter-blocks")},{value:e.backgroundColor,onChange:e=>t({backgroundColor:e}),label:(0,o.__)("Background","otter-blocks")},{value:e.textColor,onChange:e=>t({textColor:e}),label:(0,o.__)("Text","otter-blocks")},{value:e.buttonTextColor,onChange:e=>t({buttonTextColor:e}),label:(0,o.__)("Button Text","otter-blocks")}]},(0,c.createElement)(b.ContrastChecker,{textColor:e.primaryColor,backgroundColor:e.backgroundColor})),Boolean(window.themeisleGutenberg.hasNeveSupport.hasNeve)&&!Boolean(window.themeisleGutenberg.hasNeveSupport.hasNevePro)&&(0,c.createElement)(u.PanelBody,{title:(0,o.__)("More Features","otter-blocks"),initialOpen:!1},(0,c.createElement)("p",null,(0,o.__)("Build comparison tables for reviews, synchronize review data with WooCommerce products and more with Neve Pro. ","otter-blocks")),(0,c.createElement)(u.ExternalLink,{href:"https://themeisle.com/themes/neve/pricing"},(0,o.__)("Get Neve Pro. ","otter-blocks"))))},k=l(5225);(0,a.registerBlockType)("themeisle-blocks/review",{title:(0,o.__)("Product Review","otter-blocks"),description:(0,o.__)("Turn your posts into smart reviews with ratings and generate leads with a performing review block.","otter-blocks"),icon:r.rL,category:"themeisle-blocks",keywords:["product","review","stars"],attributes:n.Z,supports:{html:!1},styles:[{name:"default",label:(0,o.__)("Default","otter-blocks"),isDefault:!0},{name:"single-column",label:(0,o.__)("Single Column","otter-blocks")}],edit:({attributes:e,setAttributes:t,clientId:l,className:a,isSelected:i,status:d="isInactive",productAttributes:p={}})=>{var g,v,y,_,w;(0,c.useEffect)((()=>{const t=(0,k.WX)(l,n.Z);return()=>t(e.id)}),[e.id]);const f=(e.features.reduce(((e,t)=>e+t.rating),0)/e.features.length).toFixed(1),C=[];for(let e=0;10>e;e++)C.push((0,c.createElement)(r.Rh,{key:e,className:s()({low:3>=Math.round(f)&&e<Math.round(f),medium:3<Math.round(f)&&8>Math.round(f)&&e<Math.round(f),high:7<Math.round(f)&&10>=Math.round(f)&&e<Math.round(f)})}));return"isLoading"===d?(0,c.createElement)(c.Fragment,null,(0,c.createElement)(h,{attributes:e,setAttributes:t,productAttributes:p}),(0,c.createElement)(u.Placeholder,null,(0,c.createElement)(u.Spinner,null))):"object"==typeof d&&null!==d&&d.isError?(0,c.createElement)(c.Fragment,null,(0,c.createElement)(h,{attributes:e,setAttributes:t,productAttributes:p}),(0,c.createElement)(u.Placeholder,{instructions:d.message})):(0,c.createElement)(c.Fragment,null,(0,c.createElement)(h,{attributes:e,setAttributes:t,productAttributes:p}),(0,c.createElement)("div",{id:e.id,className:a,style:{backgroundColor:e.backgroundColor}},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__header",style:{borderColor:e.primaryColor}},null!=p&&p.title?(0,c.createElement)(b.RichText.Content,{placeholder:(0,o.__)("Name of your product…","otter-blocks"),allowedFormats:[],value:null==p?void 0:p.title,tagName:"h3",style:{color:e.textColor}}):(0,c.createElement)(b.RichText,{placeholder:(0,o.__)("Name of your product…","otter-blocks"),allowedFormats:[],value:e.title,onChange:e=>t({title:e}),tagName:"h3",style:{color:e.textColor}}),(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__header_meta"},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__header_ratings"},C,(0,c.createElement)("span",{style:{color:e.textColor}},
71
  /** translators: %s Rating score. */
72
+ (0,o.sprintf)((0,o.__)("%f out of 10","otter-blocks"),Math.abs(f)||0))),(0,c.createElement)("span",{className:"wp-block-themeisle-blocks-review__header_price",style:{color:e.textColor}},((null==p?void 0:p.price)&&(null==p?void 0:p.discounted)||e.price&&e.discounted)&&(0,c.createElement)("del",null,(null!==(g=m()((null==p?void 0:p.currency)||e.currency))&&void 0!==g?g:"$")+""+((null==p?void 0:p.price)||e.price)||0),(e.price||e.discounted||(null==p?void 0:p.price)||(null==p?void 0:p.discounted))&&(null!==(v=m()((null==p?void 0:p.currency)||e.currency))&&void 0!==v?v:"$")+""+(null!=p&&p.discounted||e.discounted?(null==p?void 0:p.discounted)||e.discounted:(null==p?void 0:p.price)||e.price)))),(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__left"},(0,c.createElement)("div",{className:s()("wp-block-themeisle-blocks-review__left_details",{"is-single":!e.image||!i&&!e.description})},null!=p&&p.image?(0,c.createElement)("img",{src:null==p||null===(y=p.image)||void 0===y?void 0:y.url,alt:null==p||null===(_=p.image)||void 0===_?void 0:_.alt}):e.image&&(0,c.createElement)("img",{src:e.image.url,alt:e.image.alt}),!i&&!e.description||null!=p&&p.description?(0,c.createElement)(b.RichText.Content,{placeholder:(0,o.__)("Product description or a small review…","otter-blocks"),value:null==p?void 0:p.description,tagName:"p",style:{color:e.textColor}}):(0,c.createElement)(b.RichText,{placeholder:(0,o.__)("Product description or a small review…","otter-blocks"),value:e.description,onChange:e=>t({description:e}),tagName:"p",style:{color:e.textColor}})),(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__left_features"},0<e.features.length&&e.features.map(((l,a)=>{const n=[];for(let e=0;10>e;e++)n.push((0,c.createElement)(r.Rh,{key:e,className:s()({low:3>=Math.round(l.rating)&&e<Math.round(l.rating),medium:3<Math.round(l.rating)&&8>Math.round(l.rating)&&e<Math.round(l.rating),high:7<Math.round(l.rating)&&10>=Math.round(l.rating)&&e<Math.round(l.rating)})}));return(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__left_feature",key:a},(0,c.createElement)(b.RichText,{placeholder:(0,o.__)("Feature title","otter-blocks"),value:l.title,className:"wp-block-themeisle-blocks-review__left_feature_title",onChange:l=>((l,o)=>{const a=[...e.features];a[l]={...a[l],...o},t({features:a})})(a,{title:l}),tagName:"span",style:{color:e.textColor}}),(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__left_feature_ratings"},n,(0,c.createElement)("span",{style:{color:e.textColor}},l.rating.toFixed(1),"/10")))})))),(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__right"},0<e.pros.length&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__right_pros"},(0,c.createElement)("h4",{style:{color:e.textColor}},(0,o.__)("Pros","otter-blocks")),e.pros.map(((l,a)=>(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__right_pros_item",key:a},r.BF,(0,c.createElement)(b.RichText,{placeholder:(0,o.__)("Why do you like the product?","otter-blocks"),value:l,onChange:l=>((l,o)=>{const a=[...e.pros];a[l]=o,t({pros:a})})(a,l),tagName:"p",style:{color:e.textColor}}))))),0<e.cons.length&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__right_cons"},(0,c.createElement)("h4",{style:{color:e.textColor}},(0,o.__)("Cons","otter-blocks")),e.cons.map(((l,a)=>(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__right_cons_item",key:a},r.xv,(0,c.createElement)(b.RichText,{placeholder:(0,o.__)("What can be improved?","otter-blocks"),value:l,onChange:l=>((l,o)=>{const a=[...e.cons];a[l]=o,t({cons:a})})(a,l),tagName:"p",style:{color:e.textColor}})))))),(0<(null==p||null===(w=p.links)||void 0===w?void 0:w.length)||0<e.links.length)&&(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__footer"},(0,c.createElement)("span",{className:"wp-block-themeisle-blocks-review__footer_label",style:{color:e.textColor}},(0,o.__)("Buy this product","otter-blocks")),(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-review__footer_buttons"},((null==p?void 0:p.links)||e.links).map(((l,a)=>(0,c.createElement)(b.RichText,{key:a,placeholder:(0,o.__)("Button label","otter-blocks"),value:l.label,disabled:0<(null==p?void 0:p.links),onChange:l=>((l,o)=>{const a=[...e.links];a[l]={...a[l],...o},t({links:a})})(a,{label:l}),tagName:"span",style:{color:e.buttonTextColor,backgroundColor:e.primaryColor}})))))))},save:()=>null})},5095:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:20},paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTop:{type:"number",default:20},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRight:{type:"number",default:20},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottom:{type:"number",default:20},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeft:{type:"number",default:20},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:20},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTop:{type:"number",default:20},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginRight:{type:"number",default:0},marginRightTablet:{type:"number"},marginRightMobile:{type:"number"},marginBottom:{type:"number",default:20},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},marginLeft:{type:"number",default:0},marginLeftTablet:{type:"number"},marginLeftMobile:{type:"number"},backgroundType:{type:"string",default:"color"},backgroundColor:{type:"string"},backgroundImageID:{type:"number"},backgroundImageURL:{type:"string"},backgroundAttachment:{type:"string",default:"scroll"},backgroundPosition:{type:"string",default:"top left"},backgroundRepeat:{type:"string",default:"repeat"},backgroundSize:{type:"string",default:"auto"},backgroundGradient:{type:"string",default:"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},borderType:{type:"string",default:"linked"},border:{type:"number",default:0},borderTop:{type:"number",default:0},borderRight:{type:"number",default:0},borderBottom:{type:"number",default:0},borderLeft:{type:"number",default:0},borderColor:{type:"string",default:"#000000"},borderRadiusType:{type:"string",default:"linked"},borderRadius:{type:"number",default:0},borderRadiusTop:{type:"number",default:0},borderRadiusRight:{type:"number",default:0},borderRadiusBottom:{type:"number",default:0},borderRadiusLeft:{type:"number",default:0},boxShadow:{type:"boolean",default:!1},boxShadowColor:{type:"string",default:"#000000"},boxShadowColorOpacity:{type:"number",default:50},boxShadowBlur:{type:"number",default:5},boxShadowSpread:{type:"number",default:0},boxShadowHorizontal:{type:"number",default:0},boxShadowVertical:{type:"number",default:0},columnsHTMLTag:{type:"string",default:"div"},columnWidth:{type:"string"}},c=l(9307),i=l(80),s=l.n(i),d=l(2819),m=l(2175);const b={id:{type:"string"},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:20},paddingTablet:{type:"number",default:20},paddingMobile:{type:"number",default:20},paddingTop:{type:"number",default:20},paddingTopTablet:{type:"number",default:20},paddingTopMobile:{type:"number",default:20},paddingRight:{type:"number",default:20},paddingRightTablet:{type:"number",default:20},paddingRightMobile:{type:"number",default:20},paddingBottom:{type:"number",default:20},paddingBottomTablet:{type:"number",default:20},paddingBottomMobile:{type:"number",default:20},paddingLeft:{type:"number",default:20},paddingLeftTablet:{type:"number",default:20},paddingLeftMobile:{type:"number",default:20},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:20},marginTablet:{type:"number",default:20},marginMobile:{type:"number",default:20},marginTop:{type:"number",default:20},marginTopTablet:{type:"number",default:20},marginTopMobile:{type:"number",default:20},marginRight:{type:"number",default:0},marginRightTablet:{type:"number",default:0},marginRightMobile:{type:"number",default:0},marginBottom:{type:"number",default:20},marginBottomTablet:{type:"number",default:20},marginBottomMobile:{type:"number",default:20},marginLeft:{type:"number",default:0},marginLeftTablet:{type:"number",default:0},marginLeftMobile:{type:"number",default:0},backgroundType:{type:"string",default:"color"},backgroundColor:{type:"string"},backgroundImageID:{type:"number"},backgroundImageURL:{type:"string"},backgroundAttachment:{type:"string",default:"scroll"},backgroundPosition:{type:"string",default:"top left"},backgroundRepeat:{type:"string",default:"repeat"},backgroundSize:{type:"string",default:"auto"},backgroundGradientFirstColor:{type:"string",default:"#36d1dc"},backgroundGradientFirstLocation:{type:"number",default:0},backgroundGradientSecondColor:{type:"string",default:"#5b86e5"},backgroundGradientSecondLocation:{type:"number",default:100},backgroundGradientType:{type:"string",default:"linear"},backgroundGradientAngle:{type:"number",default:90},backgroundGradientPosition:{type:"string",default:"center center"},borderType:{type:"string",default:"linked"},border:{type:"number",default:0},borderTop:{type:"number",default:0},borderRight:{type:"number",default:0},borderBottom:{type:"number",default:0},borderLeft:{type:"number",default:0},borderColor:{type:"string",default:"#000000"},borderRadiusType:{type:"string",default:"linked"},borderRadius:{type:"number",default:0},borderRadiusTop:{type:"number",default:0},borderRadiusRight:{type:"number",default:0},borderRadiusBottom:{type:"number",default:0},borderRadiusLeft:{type:"number",default:0},boxShadow:{type:"boolean",default:!1},boxShadowColor:{type:"string",default:"#000000"},boxShadowColorOpacity:{type:"number",default:50},boxShadowBlur:{type:"number",default:5},boxShadowSpread:{type:"number",default:0},boxShadowHorizontal:{type:"number",default:0},boxShadowVertical:{type:"number",default:0},columnsHTMLTag:{type:"string",default:"div"},columnWidth:{type:"string"}};var u=[{attributes:b,supports:{inserter:!1,reusable:!1,html:!1},save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag;let o,a,r,n;if("color"===e.backgroundType&&(o={background:e.backgroundColor}),"image"===e.backgroundType&&(o={backgroundImage:`url( '${e.backgroundImageURL}' )`,backgroundAttachment:e.backgroundAttachment,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundSize:e.backgroundSize}),"gradient"===e.backgroundType){let t;t="linear"===e.backgroundGradientType?`${e.backgroundGradientAngle}deg`:`at ${e.backgroundGradientPosition}`,o={background:`${e.backgroundGradientType}-gradient( ${t}, ${e.backgroundGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientFirstLocation}%, ${e.backgroundGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientSecondLocation}% )`}}"linked"===e.borderType&&(a={borderWidth:`${e.border}px`,borderStyle:"solid",borderColor:e.borderColor}),"unlinked"===e.borderType&&(a={borderTopWidth:`${e.borderTop}px`,borderRightWidth:`${e.borderRight}px`,borderBottomWidth:`${e.borderBottom}px`,borderLeftWidth:`${e.borderLeft}px`,borderStyle:"solid",borderColor:e.borderColor}),"linked"===e.borderRadiusType&&(r={borderRadius:`${e.borderRadius}px`}),"unlinked"===e.borderRadiusType&&(r={borderTopLeftRadius:`${e.borderRadiusTop}px`,borderTopRightRadius:`${e.borderRadiusRight}px`,borderBottomRightRadius:`${e.borderRadiusBottom}px`,borderBottomLeftRadius:`${e.borderRadiusLeft}px`}),!0===e.boxShadow&&(n={boxShadow:`${e.boxShadowHorizontal}px ${e.boxShadowVertical}px ${e.boxShadowBlur}px ${e.boxShadowSpread}px ${s()(e.boxShadowColor?e.boxShadowColor:"#000000",e.boxShadowColorOpacity)}`});const i={...o,...a,...r,...n};return(0,c.createElement)(l,{className:t,id:e.id,style:i},(0,c.createElement)(m.InnerBlocks.Content,null))}},{attributes:{...b,paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginRightTablet:{type:"number"},marginRightMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},marginLeftTablet:{type:"number"},marginLeftMobile:{type:"number"}},supports:{inserter:!1,reusable:!1,html:!1},migrate:e=>{let t="";if("gradient"===e.backgroundType){let l="";"linear"===e.backgroundGradientType&&(l=`${e.backgroundGradientAngle}deg, `),t=`${e.backgroundGradientType}-gradient(${l}${s()(e.backgroundGradientFirstColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientFirstLocation}%, ${s()(e.backgroundGradientSecondColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientSecondLocation}%)`}return{...{...(0,d.omit)(e,["backgroundGradientFirstColor","backgroundGradientFirstLocation","backgroundGradientSecondColor","backgroundGradientSecondLocation","backgroundGradientType","backgroundGradientAngle","backgroundGradientPosition"]),backgroundGradient:t}}},isEligible:e=>"gradient"===e.backgroundType&&void 0!==e.backgroundGradientFirstColor,save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag;return(0,c.createElement)(l,{className:t,id:e.id},(0,c.createElement)(m.InnerBlocks.Content,null))}}],p=l(5609),g=l(4333),h=l(9818),k=l(7400),v=l(4184),y=l.n(v),_=l(6778),w=l(2372),f=l(6993),C=l(1430),E=l(2136),T=({attributes:e,setAttributes:t,isSelected:l,clientId:a,adjacentBlock:r,parentBlock:n,updateBlockAttributes:i,adjacentBlockClientId:s})=>{const d=(0,h.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=e("core/edit-post")?e("core/edit-post"):{__experimentalGetPreviewDeviceType:void 0};return l?l():t()}),[]);(0,c.useEffect)((()=>{if(1<n.innerBlocks.length&&!s){const e=n.innerBlocks.findIndex((e=>e.clientId===a)),t=n.innerBlocks[e-1];k.current=t.clientId,v.current=t.attributes.columnWidth}}),[]),(0,c.useEffect)((()=>{if(1<n.innerBlocks.length)if(s)v.current=r.attributes.columnWidth,k.current=s,g.current=e.columnWidth;else{const t=n.innerBlocks.findIndex((e=>e.clientId===a)),l=n.innerBlocks[t-1];v.current=l.attributes.columnWidth,k.current=l.clientId,g.current=e.columnWidth}}),[l,e.columnWidth,n.innerBlocks.length]);const[b,u]=(0,c.useState)("layout"),g=(0,c.useRef)(e.columnWidth),k=(0,c.useRef)(s&&s),v=(0,c.useRef)(r&&r.attributes.columnWidth),T={top:"paddingTop",right:"paddingRight",bottom:"paddingBottom",left:"paddingLeft"},x={top:"paddingTopTablet",right:"paddingRightTablet",bottom:"paddingBottomTablet",left:"paddingLeftTablet"},M={top:"paddingTopMobile",right:"paddingRightMobile",bottom:"paddingBottomMobile",left:"paddingLeftMobile"},S=t=>{if("top"==t)switch(d){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingTop;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingTopTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingTopMobile}else if("right"==t)switch(d){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingRight;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingRightTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingRightMobile}else if("bottom"==t)switch(d){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingBottom;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingBottomTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingBottomMobile}else if("left"==t)switch(d){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingLeft;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingLeftTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingLeftMobile}},B={top:"marginTop",right:"marginRight",bottom:"marginBottom",left:"marginLeft"},z={top:"marginTopTablet",right:"marginRightTablet",bottom:"marginBottomTablet",left:"marginLeftTablet"},P={top:"marginTopMobile",right:"marginRightMobile",bottom:"marginBottomMobile",left:"marginLeftMobile"},N=t=>{if("top"==t)switch(d){case"Desktop":return"linked"===e.marginType?e.margin:e.marginTop;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginTopTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginTopMobile}else if("bottom"==t)switch(d){case"Desktop":return"linked"===e.marginType?e.margin:e.marginBottom;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginBottomTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginBottomMobile}else if("left"==t)switch(d){case"Desktop":return"linked"===e.marginType?e.margin:e.marginLeft;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginLeftTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginLeftMobile}else if("right"==t)switch(d){case"Desktop":return"linked"===e.marginType?e.margin:e.marginRight;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginRightTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginRightMobile}},R=()=>{t({backgroundImageID:"",backgroundImageURL:""})},V={top:"borderTop",right:"borderRight",bottom:"borderBottom",left:"borderLeft"},L=t=>{switch(t){case"top":return"linked"===e.borderType?e.border:e.borderTop;case"right":return"linked"===e.borderType?e.border:e.borderRight;case"bottom":return"linked"===e.borderType?e.border:e.borderBottom;case"left":return"linked"===e.borderType?e.border:e.borderLeft;default:return}},H={top:"borderRadiusTop",right:"borderRadiusRight",bottom:"borderRadiusBottom",left:"borderRadiusLeft"},I=t=>{switch(t){case"top":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusTop;case"right":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusRight;case"bottom":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusBottom;case"left":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusLeft;default:return}};return(0,c.createElement)(m.InspectorControls,null,(0,c.createElement)(p.PanelBody,{className:"wp-block-themeisle-blocks-advanced-columns-header-panel"},(0,c.createElement)(p.Button,{className:y()("header-tab",{"is-selected":"layout"===b}),onClick:()=>u("layout")},(0,c.createElement)("span",null,(0,c.createElement)(p.Dashicon,{icon:"editor-table"}),(0,o.__)("Layout","otter-blocks"))),(0,c.createElement)(p.Button,{className:y()("header-tab",{"is-selected":"style"===b}),onClick:()=>u("style")},(0,c.createElement)("span",null,(0,c.createElement)(p.Dashicon,{icon:"admin-customizer"}),(0,o.__)("Style","otter-blocks"))),(0,c.createElement)(p.Button,{className:y()("header-tab",{"is-selected":"advanced"===b}),onClick:()=>u("advanced")},(0,c.createElement)("span",null,(0,c.createElement)(p.Dashicon,{icon:"admin-generic"}),(0,o.__)("Advanced","otter-blocks")))),"layout"===b&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Spacing","otter-blocks")},1<n.innerBlocks.length&&(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Column Width","otter-blocks"),value:Number(e.columnWidth),onChange:e=>{const l=e||10,o=Number(g.current)-l+Number(v.current);g.current=l,v.current=o,t({columnWidth:l.toFixed(2)}),i(k.current,{columnWidth:o.toFixed(2)})},min:10,max:Number(e.columnWidth)+Number(v.current)-10}),(0,c.createElement)(f.Z,{label:(0,o.__)("Padding","otter-blocks")},(0,c.createElement)(w.Z,{type:(()=>{switch(d){case"Desktop":return e.paddingType;case"Tablet":return e.paddingTypeTablet;case"Mobile":return e.paddingTypeMobile;default:return}})(),min:0,max:500,changeType:e=>{switch(d){case"Desktop":t({paddingType:e});break;case"Tablet":t({paddingTypeTablet:e});break;case"Mobile":t({paddingTypeMobile:e})}},onChange:(l,o)=>{"Desktop"===d?"linked"===e.paddingType?t({padding:o}):t({[T[l]]:o}):"Tablet"===d?"linked"===e.paddingTypeTablet?t({paddingTablet:o}):t({[x[l]]:o}):"Mobile"===d&&("linked"===e.paddingTypeMobile?t({paddingMobile:o}):t({[M[l]]:o}))},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:S("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:S("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:S("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:S("left")}]})),(0,c.createElement)(f.Z,{label:(0,o.__)("Margin","otter-blocks")},(0,c.createElement)(w.Z,{type:(()=>{switch(d){case"Desktop":return e.marginType;case"Tablet":return e.marginTypeTablet;case"Mobile":return e.marginTypeMobile;default:return}})(),min:-500,max:500,changeType:e=>{switch(d){case"Desktop":t({marginType:e});break;case"Tablet":t({marginTypeTablet:e});break;case"Mobile":t({marginTypeMobile:e})}},onChange:(l,o)=>{"Desktop"===d?"linked"===e.marginType?t({margin:o}):t({[B[l]]:o}):"Tablet"===d?"linked"===e.marginTypeTablet?t({marginTablet:o}):t({[z[l]]:o}):"Mobile"===d&&("linked"===e.marginTypeMobile?t({marginMobile:o}):t({[P[l]]:o}))},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:N("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:N("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:N("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:N("left")}]}))))||"style"===b&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Background Settings","otter-blocks"),className:"wp-block-themeisle-image-container"},(0,c.createElement)(C.Z,{label:(0,o.__)("Background Type","otter-blocks"),backgroundType:e.backgroundType,changeBackgroundType:e=>{t({backgroundType:e})}}),"color"===e.backgroundType&&(0,c.createElement)(_.Z,{label:(0,o.__)("Background Color","otter-blocks"),colorValue:e.headingColor},(0,c.createElement)(m.ColorPalette,{label:(0,o.__)("Background Color","otter-blocks"),value:e.backgroundColor,onChange:e=>{t({backgroundColor:e})}}))||"image"===e.backgroundType&&(e.backgroundImageURL?(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-body"},(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-area"},(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-holder",style:{backgroundImage:`url('${e.backgroundImageURL}')`}}),(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-delete",onClick:R},(0,c.createElement)(p.Dashicon,{icon:"trash"}),(0,c.createElement)("span",null,(0,o.__)("Remove Image","otter-blocks"))))),(0,c.createElement)(p.Button,{isSecondary:!0,className:"wp-block-themeisle-image-container-delete-button",onClick:R},(0,o.__)("Change or Remove Image","otter-blocks")),(0,c.createElement)(E.Z,{label:(0,o.__)("Background Settings","otter-blocks")},(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Attachment","otter-blocks"),value:e.backgroundAttachment,options:[{label:(0,o.__)("Scroll","otter-blocks"),value:"scroll"},{label:(0,o.__)("Fixed","otter-blocks"),value:"fixed"},{label:(0,o.__)("Local","otter-blocks"),value:"local"}],onChange:e=>{t({backgroundAttachment:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Position","otter-blocks"),value:e.backgroundPosition,options:[{label:(0,o.__)("Default","otter-blocks"),value:"top left"},{label:(0,o.__)("Top Left","otter-blocks"),value:"top left"},{label:(0,o.__)("Top Center","otter-blocks"),value:"top center"},{label:(0,o.__)("Top Right","otter-blocks"),value:"top right"},{label:(0,o.__)("Center Left","otter-blocks"),value:"center left"},{label:(0,o.__)("Center Center","otter-blocks"),value:"center center"},{label:(0,o.__)("Center Right","otter-blocks"),value:"center right"},{label:(0,o.__)("Bottom Left","otter-blocks"),value:"bottom left"},{label:(0,o.__)("Bottom Center","otter-blocks"),value:"bottom center"},{label:(0,o.__)("Bottom Right","otter-blocks"),value:"bottom right"}],onChange:e=>{t({backgroundPosition:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Repeat","otter-blocks"),value:e.backgroundRepeat,options:[{label:(0,o.__)("Repeat","otter-blocks"),value:"repeat"},{label:(0,o.__)("No-repeat","otter-blocks"),value:"no-repeat"}],onChange:e=>{t({backgroundRepeat:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Size","otter-blocks"),value:e.backgroundSize,options:[{label:(0,o.__)("Auto","otter-blocks"),value:"auto"},{label:(0,o.__)("Cover","otter-blocks"),value:"cover"},{label:(0,o.__)("Contain","otter-blocks"),value:"contain"}],onChange:e=>{t({backgroundSize:e})}}))):(0,c.createElement)(m.MediaPlaceholder,{icon:"format-image",labels:{title:(0,o.__)("Background Image","otter-blocks"),name:(0,o.__)("an image","otter-blocks")},value:e.backgroundImageID,onSelect:e=>{t({backgroundImageID:e.id,backgroundImageURL:e.url})},accept:"image/*",allowedTypes:["image"]}))||"gradient"===e.backgroundType&&(0,c.createElement)(m.__experimentalColorGradientControl,{label:(0,o.__)("Background Gradient","otter-blocks"),gradientValue:e.backgroundGradient,disableCustomColors:!0,onGradientChange:e=>{t({backgroundGradient:e})},clearable:!1})),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Border","otter-blocks"),className:"wp-block-themeisle-border-container",initialOpen:!1},(0,c.createElement)(w.Z,{label:(0,o.__)("Border Width","otter-blocks"),type:e.borderType,min:0,max:500,changeType:e=>{t({borderType:e})},onChange:(l,o)=>{"linked"===e.borderType?t({border:o}):t({[V[l]]:o})},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:L("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:L("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:L("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:L("left")}]}),(0,c.createElement)(_.Z,{label:(0,o.__)("Border Color","otter-blocks"),colorValue:e.borderColor},(0,c.createElement)(m.ColorPalette,{label:(0,o.__)("Border Color","otter-blocks"),value:e.borderColor,onChange:e=>{t({borderColor:e})}})),(0,c.createElement)(w.Z,{label:(0,o.__)("Border Radius","otter-blocks"),type:e.borderRadiusType,min:0,max:500,changeType:e=>{t({borderRadiusType:e})},onChange:(l,o)=>{"linked"===e.borderRadiusType?t({borderRadius:o}):t({[H[l]]:o})},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:I("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:I("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:I("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:I("left")}]}),(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Box Shadow","otter-blocks"),checked:e.boxShadow,onChange:()=>{t({boxShadow:!e.boxShadow})}}),e.boxShadow&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(_.Z,{label:(0,o.__)("Shadow Color","otter-blocks"),colorValue:e.boxShadowColor},(0,c.createElement)(m.ColorPalette,{label:(0,o.__)("Shadow Color","otter-blocks"),value:e.boxShadowColor,onChange:e=>{t({boxShadowColor:e})}})),(0,c.createElement)(E.Z,{label:(0,o.__)("Shadow Properties","otter-blocks")},(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:e.boxShadowColorOpacity,onChange:e=>{t({boxShadowColorOpacity:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:e.boxShadowBlur,onChange:e=>{t({boxShadowBlur:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Spread","otter-blocks"),value:e.boxShadowSpread,onChange:e=>{t({boxShadowSpread:e})},min:-100,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:e.boxShadowHorizontal,onChange:e=>{t({boxShadowHorizontal:e})},min:-100,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:e.boxShadowVertical,onChange:e=>{t({boxShadowVertical:e})},min:-100,max:100})))))||"advanced"===b&&(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Section Settings","otter-blocks")},(0,c.createElement)(p.SelectControl,{label:(0,o.__)("HTML Tag","otter-blocks"),value:e.columnsHTMLTag,options:[{label:(0,o.__)("Default (div)","otter-blocks"),value:"div"},{label:"section",value:"section"},{label:"header",value:"header"},{label:"footer",value:"footer"},{label:"article",value:"article"},{label:"main",value:"main"}],onChange:e=>{t({columnsHTMLTag:e})}})))},x=l(5225);(0,a.registerBlockType)("themeisle-blocks/advanced-column",{title:(0,o.__)("Section Column","otter-blocks"),description:(0,o.__)("A single column within a Section block.","otter-blocks"),parent:["themeisle-blocks/advanced-columns"],icon:r.rK,category:"themeisle-blocks",attributes:n,deprecated:u,supports:{inserter:!1,html:!1},edit:({attributes:e,setAttributes:t,className:l,isSelected:o,clientId:a,toggleSelection:r})=>{const{updateBlockAttributes:i}=(0,h.useDispatch)("core/block-editor"),{adjacentBlockClientId:d,adjacentBlock:b,parentClientId:u,parentBlock:v,hasInnerBlocks:y,isViewportAvailable:_,isPreviewDesktop:w,isPreviewTablet:f,isPreviewMobile:C}=(0,h.useSelect)((e=>{const{getAdjacentBlockClientId:t,getBlock:l,getBlockRootClientId:o}=e("core/block-editor"),{__experimentalGetPreviewDeviceType:r}=e("core/edit-post")?e("core/edit-post"):{__experimentalGetPreviewDeviceType:void 0},n=l(a),c=t(a),i=l(c),s=o(a);return{adjacentBlockClientId:c,adjacentBlock:i,parentClientId:s,parentBlock:l(s),hasInnerBlocks:!(!n||!n.innerBlocks.length),isViewportAvailable:!!r,isPreviewDesktop:!!r&&"Desktop"===r(),isPreviewTablet:!!r&&"Tablet"===r(),isPreviewMobile:!!r&&"Mobile"===r()}}),[]),E=(0,g.useViewportMatch)("large",">="),M=(0,g.useViewportMatch)("large","<="),S=(0,g.useViewportMatch)("small",">="),B=(0,g.useViewportMatch)("small","<=");(0,c.useEffect)((()=>{const t=(0,x.WX)(a,n);return()=>t(e.id)}),[e.id]),(0,c.useEffect)((()=>{I()}),[e.columnWidth]);const[z,P]=(0,c.useState)(0),[N,R]=(0,c.useState)(0);let V=E&&!M&&S&&!B,L=!E&&!M&&S&&!B,H=!(E||M||S||B);_&&!H&&(V=w,L=f,H=C),void 0===e.columnWidth&&v.innerBlocks.map(((e,t)=>{if(a===e.clientId){const e=v.attributes.columns,l=v.attributes.layout;i(a,{columnWidth:k.Z[e][l][t]})}}));const I=()=>{const t=document.getElementById(`block-${a}`);null!==t&&(t.style.flexBasis=V?`${e.columnWidth}%`:"")},A=e.columnsHTMLTag;let $,O,G,D,Z;V&&($={paddingTop:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingTop}px`,paddingRight:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingRight}px`,paddingBottom:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingBottom}px`,paddingLeft:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingLeft}px`,marginTop:"linked"===e.marginType?`${e.margin}px`:`${e.marginTop}px`,marginRight:"linked"===e.marginType?`${e.margin}px`:`${e.marginRight}px`,marginBottom:"linked"===e.marginType?`${e.margin}px`:`${e.marginBottom}px`,marginLeft:"linked"===e.marginType?`${e.margin}px`:`${e.marginLeft}px`}),L&&($={paddingTop:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingTopTablet}px`,paddingRight:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingRightTablet}px`,paddingBottom:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingBottomTablet}px`,paddingLeft:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingLeftTablet}px`,marginTop:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginTopTablet}px`,marginRight:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginRightTablet}px`,marginBottom:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginBottomTablet}px`,marginLeft:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginLeftTablet}px`}),H&&($={paddingTop:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingTopMobile}px`,paddingRight:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingRightMobile}px`,paddingBottom:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingBottomMobile}px`,paddingLeft:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingLeftMobile}px`,marginTop:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginTopMobile}px`,marginRight:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginRightMobile}px`,marginBottom:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginBottomMobile}px`,marginLeft:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginLeftMobile}px`}),"color"===e.backgroundType&&(O={backgroundColor:e.backgroundColor}),"image"===e.backgroundType&&(O={backgroundImage:`url( '${e.backgroundImageURL}' )`,backgroundAttachment:e.backgroundAttachment,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundSize:e.backgroundSize}),"gradient"===e.backgroundType&&(O={backgroundImage:e.backgroundGradient}),"linked"===e.borderType&&(G={borderWidth:`${e.border}px`,borderStyle:"solid",borderColor:e.borderColor}),"unlinked"===e.borderType&&(G={borderTopWidth:`${e.borderTop}px`,borderRightWidth:`${e.borderRight}px`,borderBottomWidth:`${e.borderBottom}px`,borderLeftWidth:`${e.borderLeft}px`,borderStyle:"solid",borderColor:e.borderColor}),"linked"===e.borderRadiusType&&(D={borderRadius:`${e.borderRadius}px`}),"unlinked"===e.borderRadiusType&&(D={borderTopLeftRadius:`${e.borderRadiusTop}px`,borderTopRightRadius:`${e.borderRadiusRight}px`,borderBottomRightRadius:`${e.borderRadiusBottom}px`,borderBottomLeftRadius:`${e.borderRadiusLeft}px`}),!0===e.boxShadow&&(Z={boxShadow:`${e.boxShadowHorizontal}px ${e.boxShadowVertical}px ${e.boxShadowBlur}px ${e.boxShadowSpread}px ${s()(e.boxShadowColor?e.boxShadowColor:"#000000",e.boxShadowColorOpacity)}`});const F={...$,...O,...G,...D,...Z};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(T,{attributes:e,setAttributes:t,isSelected:o,clientId:a,adjacentBlock:b,parentBlock:v,updateBlockAttributes:i,adjacentBlockClientId:d}),(0,c.createElement)(p.ResizableBox,{className:"block-library-spacer__resize-container wp-themeisle-block-advanced-column-resize-container",enable:{right:!!d},handleWrapperClass:"wp-themeisle-block-advanced-column-resize-container-handle",onResizeStart:()=>{const t=document.querySelector(`#block-${a} .wp-themeisle-block-advanced-column-resize-container-handle .components-resizable-box__handle`),l=document.createElement("div"),o=document.createElement("div");l.setAttribute("class","resizable-tooltip resizable-tooltip-left"),l.innerHTML=`${parseFloat(e.columnWidth).toFixed(0)}%`,t.appendChild(l),o.setAttribute("class","resizable-tooltip resizable-tooltip-right"),o.innerHTML=`${parseFloat(b.attributes.columnWidth).toFixed(0)}%`,t.appendChild(o),P(e.columnWidth),R(b.attributes.columnWidth),r(!1)},onResize:(e,l,o,a)=>{const r=document.getElementById(`block-${u}`).getBoundingClientRect().width,n=a.width/r*100,c=parseFloat(z)+n,s=N-n,m=document.querySelector(".resizable-tooltip-left"),b=document.querySelector(".resizable-tooltip-right");10<=c&&10<=s&&(m.innerHTML=`${c.toFixed(0)}%`,b.innerHTML=`${s.toFixed(0)}%`,t({columnWidth:c.toFixed(2)}),i(d,{columnWidth:s.toFixed(2)}))},onResizeStop:()=>{const e=document.querySelector(".resizable-tooltip-left"),t=document.querySelector(".resizable-tooltip-right");e.parentNode.removeChild(e),t.parentNode.removeChild(t),r(!0)}},(0,c.createElement)(A,{className:l,id:e.id,style:F},(0,c.createElement)(m.InnerBlocks,{templateLock:!1,renderAppender:!y&&m.InnerBlocks.ButtonBlockAppender}))))},save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag;return(0,c.createElement)(l,{className:t,id:e.id},(0,c.createElement)(m.InnerBlocks.Content,null))}})},8276:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n={id:{type:"string"},columns:{type:"number"},layout:{type:"string"},layoutTablet:{type:"string",default:"equal"},layoutMobile:{type:"string",default:"equal"},columnsGap:{type:"string",default:"default"},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:20},paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTop:{type:"number",default:20},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRight:{type:"number",default:20},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottom:{type:"number",default:20},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeft:{type:"number",default:20},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:20},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTop:{type:"number",default:20},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginBottom:{type:"number",default:20},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},columnsWidth:{type:"number"},horizontalAlign:{type:"string",default:"unset"},columnsHeight:{type:"string",default:"auto"},columnsHeightCustom:{type:"number"},columnsHeightCustomTablet:{type:"number"},columnsHeightCustomMobile:{type:"number"},verticalAlign:{type:"string",default:"unset"},backgroundType:{type:"string",default:"color"},backgroundColor:{type:"string"},backgroundImageID:{type:"number"},backgroundImageURL:{type:"string"},backgroundAttachment:{type:"string",default:"scroll"},backgroundPosition:{type:"string",default:"top left"},backgroundRepeat:{type:"string",default:"repeat"},backgroundSize:{type:"string",default:"auto"},backgroundGradient:{type:"string",default:"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},backgroundOverlayOpacity:{type:"number",default:50},backgroundOverlayType:{type:"string",default:"color"},backgroundOverlayColor:{type:"string"},backgroundOverlayImageID:{type:"number"},backgroundOverlayImageURL:{type:"string"},backgroundOverlayAttachment:{type:"string",default:"scroll"},backgroundOverlayPosition:{type:"string",default:"top left"},backgroundOverlayRepeat:{type:"string",default:"repeat"},backgroundOverlaySize:{type:"string",default:"auto"},backgroundOverlayGradient:{type:"string",default:"linear-gradient(90deg,rgba(54,209,220,1) 0%,rgba(91,134,229,1) 100%)"},backgroundOverlayFilterBlur:{type:"number",default:0},backgroundOverlayFilterBrightness:{type:"number",default:10},backgroundOverlayFilterContrast:{type:"number",default:10},backgroundOverlayFilterGrayscale:{type:"number",default:0},backgroundOverlayFilterHue:{type:"number",default:0},backgroundOverlayFilterSaturate:{type:"number",default:10},backgroundOverlayBlend:{type:"string",default:"normal"},borderType:{type:"string",default:"linked"},border:{type:"number",default:0},borderTop:{type:"number",default:0},borderRight:{type:"number",default:0},borderBottom:{type:"number",default:0},borderLeft:{type:"number",default:0},borderColor:{type:"string",default:"#000000"},borderRadiusType:{type:"string",default:"linked"},borderRadius:{type:"number",default:0},borderRadiusTop:{type:"number",default:0},borderRadiusRight:{type:"number",default:0},borderRadiusBottom:{type:"number",default:0},borderRadiusLeft:{type:"number",default:0},boxShadow:{type:"boolean",default:!1},boxShadowColor:{type:"string",default:"#000000"},boxShadowColorOpacity:{type:"number",default:50},boxShadowBlur:{type:"number",default:5},boxShadowSpread:{type:"number",default:0},boxShadowHorizontal:{type:"number",default:0},boxShadowVertical:{type:"number",default:0},dividerTopType:{type:"string",default:"none"},dividerTopColor:{type:"string",default:"#000000"},dividerTopWidth:{type:"number",default:100},dividerTopWidthTablet:{type:"number",default:100},dividerTopWidthMobile:{type:"number",default:100},dividerTopHeight:{type:"number",default:100},dividerTopHeightTablet:{type:"number",default:100},dividerTopHeightMobile:{type:"number",default:100},dividerTopInvert:{type:"boolean",default:!1},dividerBottomType:{type:"string",default:"none"},dividerBottomColor:{type:"string",default:"#000000"},dividerBottomWidth:{type:"number",default:100},dividerBottomWidthTablet:{type:"number",default:100},dividerBottomWidthMobile:{type:"number",default:100},dividerBottomHeight:{type:"number",default:100},dividerBottomHeightTablet:{type:"number",default:100},dividerBottomHeightMobile:{type:"number",default:100},dividerBottomInvert:{type:"boolean",default:!1},hide:{type:"boolean",default:!1},hideTablet:{type:"boolean",default:!1},hideMobile:{type:"boolean",default:!1},reverseColumnsTablet:{type:"boolean",default:!1},reverseColumnsMobile:{type:"boolean",default:!1},columnsHTMLTag:{type:"string",default:"div"}},c=l(9307),i=l(4184),s=l.n(i),d=l(80),m=l.n(d),b=l(2819),u=l(2175),p=l(5609);const g={align:{type:"string"},id:{type:"string"},columns:{type:"number"},layout:{type:"string"},layoutTablet:{type:"string",default:"equal"},layoutMobile:{type:"string",default:"equal"},columnsGap:{type:"string",default:"default"},paddingType:{type:"string",default:"linked"},paddingTypeTablet:{type:"string",default:"linked"},paddingTypeMobile:{type:"string",default:"linked"},padding:{type:"number",default:20},paddingTablet:{type:"number",default:20},paddingMobile:{type:"number",default:20},paddingTop:{type:"number",default:20},paddingTopTablet:{type:"number",default:20},paddingTopMobile:{type:"number",default:20},paddingRight:{type:"number",default:20},paddingRightTablet:{type:"number",default:20},paddingRightMobile:{type:"number",default:20},paddingBottom:{type:"number",default:20},paddingBottomTablet:{type:"number",default:20},paddingBottomMobile:{type:"number",default:20},paddingLeft:{type:"number",default:20},paddingLeftTablet:{type:"number",default:20},paddingLeftMobile:{type:"number",default:20},marginType:{type:"string",default:"unlinked"},marginTypeTablet:{type:"string",default:"unlinked"},marginTypeMobile:{type:"string",default:"unlinked"},margin:{type:"number",default:20},marginTablet:{type:"number",default:20},marginMobile:{type:"number",default:20},marginTop:{type:"number",default:20},marginTopTablet:{type:"number",default:20},marginTopMobile:{type:"number",default:20},marginBottom:{type:"number",default:20},marginBottomTablet:{type:"number",default:20},marginBottomMobile:{type:"number",default:20},columnsWidth:{type:"number"},columnsHeight:{type:"string",default:"auto"},columnsHeightCustom:{type:"number"},columnsHeightCustomTablet:{type:"number"},columnsHeightCustomMobile:{type:"number"},horizontalAlign:{type:"string",default:"unset"},verticalAlign:{type:"string",default:"unset"},backgroundType:{type:"string",default:"color"},backgroundColor:{type:"string"},backgroundImageID:{type:"number"},backgroundImageURL:{type:"string"},backgroundAttachment:{type:"string",default:"scroll"},backgroundPosition:{type:"string",default:"top left"},backgroundRepeat:{type:"string",default:"repeat"},backgroundSize:{type:"string",default:"auto"},backgroundGradientFirstColor:{type:"string",default:"#36d1dc"},backgroundGradientFirstLocation:{type:"number",default:0},backgroundGradientSecondColor:{type:"string",default:"#5b86e5"},backgroundGradientSecondLocation:{type:"number",default:100},backgroundGradientType:{type:"string",default:"linear"},backgroundGradientAngle:{type:"number",default:90},backgroundGradientPosition:{type:"string",default:"center center"},backgroundOverlayOpacity:{type:"number",default:50},backgroundOverlayType:{type:"string",default:"color"},backgroundOverlayColor:{type:"string"},backgroundOverlayImageID:{type:"number"},backgroundOverlayImageURL:{type:"string"},backgroundOverlayAttachment:{type:"string",default:"scroll"},backgroundOverlayPosition:{type:"string",default:"top left"},backgroundOverlayRepeat:{type:"string",default:"repeat"},backgroundOverlaySize:{type:"string",default:"auto"},backgroundOverlayGradientFirstColor:{type:"string",default:"#36d1dc"},backgroundOverlayGradientFirstLocation:{type:"number",default:0},backgroundOverlayGradientSecondColor:{type:"string",default:"#5b86e5"},backgroundOverlayGradientSecondLocation:{type:"number",default:100},backgroundOverlayGradientType:{type:"string",default:"linear"},backgroundOverlayGradientAngle:{type:"number",default:90},backgroundOverlayGradientPosition:{type:"string",default:"center center"},backgroundOverlayFilterBlur:{type:"number",default:0},backgroundOverlayFilterBrightness:{type:"number",default:10},backgroundOverlayFilterContrast:{type:"number",default:10},backgroundOverlayFilterGrayscale:{type:"number",default:0},backgroundOverlayFilterHue:{type:"number",default:0},backgroundOverlayFilterSaturate:{type:"number",default:10},backgroundOverlayBlend:{type:"string",default:"normal"},borderType:{type:"string",default:"linked"},border:{type:"number",default:0},borderTop:{type:"number",default:0},borderRight:{type:"number",default:0},borderBottom:{type:"number",default:0},borderLeft:{type:"number",default:0},borderColor:{type:"string",default:"#000000"},borderRadiusType:{type:"string",default:"linked"},borderRadius:{type:"number",default:0},borderRadiusTop:{type:"number",default:0},borderRadiusRight:{type:"number",default:0},borderRadiusBottom:{type:"number",default:0},borderRadiusLeft:{type:"number",default:0},boxShadow:{type:"boolean",default:!1},boxShadowColor:{type:"string",default:"#000000"},boxShadowColorOpacity:{type:"number",default:50},boxShadowBlur:{type:"number",default:5},boxShadowSpread:{type:"number",default:0},boxShadowHorizontal:{type:"number",default:0},boxShadowVertical:{type:"number",default:0},dividerTopType:{type:"string",default:"none"},dividerTopColor:{type:"string",default:"#000000"},dividerTopWidth:{type:"number",default:100},dividerTopWidthTablet:{type:"number",default:100},dividerTopWidthMobile:{type:"number",default:100},dividerTopHeight:{type:"number",default:100},dividerTopHeightTablet:{type:"number",default:100},dividerTopHeightMobile:{type:"number",default:100},dividerTopInvert:{type:"boolean",default:!1},dividerBottomType:{type:"string",default:"none"},dividerBottomColor:{type:"string",default:"#000000"},dividerBottomWidth:{type:"number",default:100},dividerBottomWidthTablet:{type:"number",default:100},dividerBottomWidthMobile:{type:"number",default:100},dividerBottomHeight:{type:"number",default:100},dividerBottomHeightTablet:{type:"number",default:100},dividerBottomHeightMobile:{type:"number",default:100},dividerBottomInvert:{type:"boolean",default:!1},hide:{type:"boolean",default:!1},hideTablet:{type:"boolean",default:!1},hideMobile:{type:"boolean",default:!1},columnsHTMLTag:{type:"string",default:"div"}},h=({type:e,front:t,style:l,fill:o,invert:a,width:r,height:n})=>"none"!==l&&(0,c.createElement)("div",{className:s()("wp-block-themeisle-blocks-advanced-columns-separators",e),style:!t&&r?{transform:r?`scaleX( ${r/100} )`:""}:{}},"bigTriangle"===l&&!1===a&&(0,c.createElement)(p.SVG,{id:"bigTriangle",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"bottom"===e?{transform:"bottom"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M0 0 L50 100 L100 0 Z"})),"bigTriangle"===l&&!0===a&&(0,c.createElement)(p.SVG,{id:"bigTriangle",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===e?{transform:"top"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M100, 0l-50, 100l-50, -100l0, 100l100, 0l0, -100Z"})),"rightCurve"===l&&!1===a&&(0,c.createElement)(p.SVG,{id:"rightCurve",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===e?{transform:"top"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M0 100 C 20 0 50 0 100 100 Z"})),"rightCurve"===l&&!0===a&&(0,c.createElement)(p.SVG,{id:"rightCurve",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===e?{transform:"top"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M0 100 C 50 0 70 0 100 100 Z"})),"curve"===l&&(0,c.createElement)(p.SVG,{id:"curve",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===e?{transform:"top"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M0 100 C40 0 60 0 100 100 Z"})),"slant"===l&&!1===a&&(0,c.createElement)(p.SVG,{id:"slant",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"bottom"===e?{transform:"bottom"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M0 0 L100 100 L100 0 Z"})),"slant"===l&&!0===a&&(0,c.createElement)(p.SVG,{id:"slant",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"bottom"===e?{transform:"bottom"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M0 0 L0 100 L100 0 Z"})),"cloud"===l&&(0,c.createElement)(p.SVG,{id:"cloud",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",style:"top"===e?{transform:"top"===e?"rotate(180deg)":""}:{}},(0,c.createElement)(p.Path,{d:"M-5 100 Q 10 -100 15 100 Z M10 100 Q 20 -20 30 100 M25 100 Q 35 -70 45 100 M40 100 Q 50 -100 60 100 M55 100 Q 65 -20 75 100 M70 100 Q 75 -45 90 100 M85 100 Q 90 -50 95 100 M90 100 Q 95 -25 105 100 Z"}))),k=({type:e,front:t,style:l,fill:o,invert:a,width:r,height:n})=>"none"!==l&&(0,c.createElement)("div",{className:s()("wp-block-themeisle-blocks-advanced-columns-separators",e),style:!t&&r?{transform:r?`scaleX( ${r/100} )`:""}:{}},"bigTriangle"===l&&!1===a&&(0,c.createElement)(p.SVG,{id:"bigTriangle",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"bottom"===e})},(0,c.createElement)(p.Path,{d:"M0 0 L50 100 L100 0 Z"})),"bigTriangle"===l&&!0===a&&(0,c.createElement)(p.SVG,{id:"bigTriangle",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"top"===e})},(0,c.createElement)(p.Path,{d:"M100, 0l-50, 100l-50, -100l0, 100l100, 0l0, -100Z"})),"rightCurve"===l&&!1===a&&(0,c.createElement)(p.SVG,{id:"rightCurve",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"top"===e})},(0,c.createElement)(p.Path,{d:"M0 100 C 20 0 50 0 100 100 Z"})),"rightCurve"===l&&!0===a&&(0,c.createElement)(p.SVG,{id:"rightCurve",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"top"===e})},(0,c.createElement)(p.Path,{d:"M0 100 C 50 0 70 0 100 100 Z"})),"curve"===l&&(0,c.createElement)(p.SVG,{id:"curve",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"top"===e})},(0,c.createElement)(p.Path,{d:"M0 100 C40 0 60 0 100 100 Z"})),"slant"===l&&!1===a&&(0,c.createElement)(p.SVG,{id:"slant",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"bottom"===e})},(0,c.createElement)(p.Path,{d:"M0 0 L100 100 L100 0 Z"})),"slant"===l&&!0===a&&(0,c.createElement)(p.SVG,{id:"slant",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"bottom"===e})},(0,c.createElement)(p.Path,{d:"M0 0 L0 100 L100 0 Z"})),"cloud"===l&&(0,c.createElement)(p.SVG,{id:"cloud",fill:o,viewBox:"0 0 100 100",width:"100%",height:n?`${n}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:s()({rotate:"top"===e})},(0,c.createElement)(p.Path,{d:"M-5 100 Q 10 -100 15 100 Z M10 100 Q 20 -20 30 100 M25 100 Q 35 -70 45 100 M40 100 Q 50 -100 60 100 M55 100 Q 65 -20 75 100 M70 100 Q 75 -45 90 100 M85 100 Q 90 -50 95 100 M90 100 Q 95 -25 105 100 Z"})));var v=[{attributes:g,supports:{align:["wide","full"],html:!1},save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag;let o,a,r,n,i;if("color"===e.backgroundType&&(o={background:e.backgroundColor}),"image"===e.backgroundType&&(o={backgroundImage:`url( '${e.backgroundImageURL}' )`,backgroundAttachment:e.backgroundAttachment,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundSize:e.backgroundSize}),"gradient"===e.backgroundType){let t;t="linear"===e.backgroundGradientType?`${e.backgroundGradientAngle}deg`:`at ${e.backgroundGradientPosition}`,o={background:`${e.backgroundGradientType}-gradient( ${t}, ${e.backgroundGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientFirstLocation}%, ${e.backgroundGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientSecondLocation}% )`}}"linked"===e.borderType&&(r={borderWidth:`${e.border}px`,borderStyle:"solid",borderColor:e.borderColor}),"unlinked"===e.borderType&&(r={borderTopWidth:`${e.borderTop}px`,borderRightWidth:`${e.borderRight}px`,borderBottomWidth:`${e.borderBottom}px`,borderLeftWidth:`${e.borderLeft}px`,borderStyle:"solid",borderColor:e.borderColor}),"linked"===e.borderRadiusType&&(n={borderRadius:`${e.borderRadius}px`}),"unlinked"===e.borderRadiusType&&(n={borderTopLeftRadius:`${e.borderRadiusTop}px`,borderTopRightRadius:`${e.borderRadiusRight}px`,borderBottomRightRadius:`${e.borderRadiusBottom}px`,borderBottomLeftRadius:`${e.borderRadiusLeft}px`}),!0===e.boxShadow&&(i={boxShadow:`${e.boxShadowHorizontal}px ${e.boxShadowVertical}px ${e.boxShadowBlur}px ${e.boxShadowSpread}px ${m()(e.boxShadowColor?e.boxShadowColor:"#000000",e.boxShadowColorOpacity)}`});const d={...o,...r,...n,...i,justifyContent:e.horizontalAlign};if("color"===e.backgroundOverlayType&&(a={background:e.backgroundOverlayColor,opacity:e.backgroundOverlayOpacity/100}),"image"===e.backgroundOverlayType&&(a={backgroundImage:`url( '${e.backgroundOverlayImageURL}' )`,backgroundAttachment:e.backgroundOverlayAttachment,backgroundPosition:e.backgroundOverlayPosition,backgroundRepeat:e.backgroundOverlayRepeat,backgroundSize:e.backgroundOverlaySize,opacity:e.backgroundOverlayOpacity/100}),"gradient"===e.backgroundOverlayType){let t;t="linear"===e.backgroundOverlayGradientType?`${e.backgroundOverlayGradientAngle}deg`:`at ${e.backgroundOverlayGradientPosition}`,a={background:`${e.backgroundOverlayGradientType}-gradient( ${t}, ${e.backgroundOverlayGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientFirstLocation}%, ${e.backgroundOverlayGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientSecondLocation}% )`,opacity:e.backgroundOverlayOpacity/100}}const b={...a,mixBlendMode:e.backgroundOverlayBlend,filter:`blur( ${e.backgroundOverlayFilterBlur/10}px ) brightness( ${e.backgroundOverlayFilterBrightness/10} ) contrast( ${e.backgroundOverlayFilterContrast/10} ) grayscale( ${e.backgroundOverlayFilterGrayscale/100} ) hue-rotate( ${e.backgroundOverlayFilterHue}deg ) saturate( ${e.backgroundOverlayFilterSaturate/10} )`};let p={};e.columnsWidth&&(p={maxWidth:e.columnsWidth+"px"});const g=e.hide?"":`has-desktop-${e.layout}-layout`,k=e.hideTablet?"":`has-tablet-${e.layoutTablet}-layout`,v=e.hideMobile?"":`has-mobile-${e.layoutMobile}-layout`,y=s()(t,`has-${e.columns}-columns`,g,k,v,{"hide-in-desktop":e.hide},{"hide-in-tablet":e.hideTablet},{"hide-in-mobile":e.hideMobile},`has-${e.lcolumnsGap}-gap`,`has-vertical-${e.verticalAlign}`);return(0,c.createElement)(l,{className:y,id:e.id,style:d},(0,c.createElement)("div",{className:"wp-themeisle-block-overlay",style:b}),(0,c.createElement)(h,{type:"top",front:!0,style:e.dividerTopType,fill:e.dividerTopColor,invert:e.dividerTopInvert}),(0,c.createElement)("div",{className:"innerblocks-wrap",style:p},(0,c.createElement)(u.InnerBlocks.Content,null)),(0,c.createElement)(h,{type:"bottom",front:!0,style:e.dividerBottomType,fill:e.dividerBottomColor,invert:e.dividerBottomInvert}))}},{attributes:g,supports:{align:["wide","full"],html:!1},save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag;let o,a,r,n,i;if("color"===e.backgroundType&&(o={background:e.backgroundColor}),"image"===e.backgroundType&&(o={backgroundImage:`url( '${e.backgroundImageURL}' )`,backgroundAttachment:e.backgroundAttachment,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundSize:e.backgroundSize}),"gradient"===e.backgroundType){let t;t="linear"===e.backgroundGradientType?`${e.backgroundGradientAngle}deg`:`at ${e.backgroundGradientPosition}`,o={background:`${e.backgroundGradientType}-gradient( ${t}, ${e.backgroundGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientFirstLocation}%, ${e.backgroundGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientSecondLocation}% )`}}"linked"===e.borderType&&(r={borderWidth:`${e.border}px`,borderStyle:"solid",borderColor:e.borderColor}),"unlinked"===e.borderType&&(r={borderTopWidth:`${e.borderTop}px`,borderRightWidth:`${e.borderRight}px`,borderBottomWidth:`${e.borderBottom}px`,borderLeftWidth:`${e.borderLeft}px`,borderStyle:"solid",borderColor:e.borderColor}),"linked"===e.borderRadiusType&&(n={borderRadius:`${e.borderRadius}px`}),"unlinked"===e.borderRadiusType&&(n={borderTopLeftRadius:`${e.borderRadiusTop}px`,borderTopRightRadius:`${e.borderRadiusRight}px`,borderBottomRightRadius:`${e.borderRadiusBottom}px`,borderBottomLeftRadius:`${e.borderRadiusLeft}px`}),!0===e.boxShadow&&(i={boxShadow:`${e.boxShadowHorizontal}px ${e.boxShadowVertical}px ${e.boxShadowBlur}px ${e.boxShadowSpread}px ${m()(e.boxShadowColor?e.boxShadowColor:"#000000",e.boxShadowColorOpacity)}`});const d={...o,...r,...n,...i,justifyContent:e.horizontalAlign};if("color"===e.backgroundOverlayType&&(a={background:e.backgroundOverlayColor,opacity:e.backgroundOverlayOpacity/100}),"image"===e.backgroundOverlayType&&(a={backgroundImage:`url( '${e.backgroundOverlayImageURL}' )`,backgroundAttachment:e.backgroundOverlayAttachment,backgroundPosition:e.backgroundOverlayPosition,backgroundRepeat:e.backgroundOverlayRepeat,backgroundSize:e.backgroundOverlaySize,opacity:e.backgroundOverlayOpacity/100}),"gradient"===e.backgroundOverlayType){let t;t="linear"===e.backgroundOverlayGradientType?`${e.backgroundOverlayGradientAngle}deg`:`at ${e.backgroundOverlayGradientPosition}`,a={background:`${e.backgroundOverlayGradientType}-gradient( ${t}, ${e.backgroundOverlayGradientFirstColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientFirstLocation}%, ${e.backgroundOverlayGradientSecondColor||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientSecondLocation}% )`,opacity:e.backgroundOverlayOpacity/100}}const b={...a,mixBlendMode:e.backgroundOverlayBlend};let p={};e.columnsWidth&&(p={maxWidth:e.columnsWidth+"px"});const g=e.hide?"":`has-desktop-${e.layout}-layout`,k=e.hideTablet?"":`has-tablet-${e.layoutTablet}-layout`,v=e.hideMobile?"":`has-mobile-${e.layoutMobile}-layout`,y=s()(t,`has-${e.columns}-columns`,g,k,v,{"hide-in-desktop":e.hide},{"hide-in-tablet":e.hideTablet},{"hide-in-mobile":e.hideMobile},`has-${e.columnsGap}-gap`,`has-vertical-${e.verticalAlign}`);return(0,c.createElement)(l,{className:y,id:e.id,style:d},(0,c.createElement)("div",{className:"wp-themeisle-block-overlay",style:b}),(0,c.createElement)(h,{type:"top",front:!0,style:e.dividerTopType,fill:e.dividerTopColor,invert:e.dividerTopInvert}),(0,c.createElement)("div",{className:"innerblocks-wrap",style:p},(0,c.createElement)(u.InnerBlocks.Content,null)),(0,c.createElement)(h,{type:"bottom",front:!0,style:e.dividerBottomType,fill:e.dividerBottomColor,invert:e.dividerBottomInvert}))}},{attributes:{...g,paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},reverseColumnsTablet:{type:"boolean",default:!1},reverseColumnsMobile:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1},save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag,o=e.hide?"":`has-desktop-${e.layout}-layout`,a=e.hideTablet?"":`has-tablet-${e.layoutTablet}-layout`,r=e.hideMobile?"":`has-mobile-${e.layoutMobile}-layout`,n=s()(t,`has-${e.columns}-columns`,o,a,r,{"hide-in-desktop":e.hide},{"hide-in-tablet":e.hideTablet},{"hide-in-mobile":e.hideMobile},{"has-reverse-columns-tablet":e.reverseColumnsTablet&&!e.hideTablet&&"collapsedRows"===e.layoutTablet},{"has-reverse-columns-mobile":e.reverseColumnsMobile&&!e.hideMobile&&"collapsedRows"===e.layoutMobile},`has-${e.columnsGap}-gap`,`has-vertical-${e.verticalAlign}`);return(0,c.createElement)(l,{className:n,id:e.id},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay"}),(0,c.createElement)(k,{type:"top",front:!0,style:e.dividerTopType,fill:e.dividerTopColor,invert:e.dividerTopInvert}),(0,c.createElement)("div",{className:"innerblocks-wrap"},(0,c.createElement)(u.InnerBlocks.Content,null)),(0,c.createElement)(k,{type:"bottom",front:!0,style:e.dividerBottomType,fill:e.dividerBottomColor,invert:e.dividerBottomInvert}))}},{attributes:{...g,paddingTablet:{type:"number"},paddingMobile:{type:"number"},paddingTopTablet:{type:"number"},paddingTopMobile:{type:"number"},paddingRightTablet:{type:"number"},paddingRightMobile:{type:"number"},paddingBottomTablet:{type:"number"},paddingBottomMobile:{type:"number"},paddingLeftTablet:{type:"number"},paddingLeftMobile:{type:"number"},marginTablet:{type:"number"},marginMobile:{type:"number"},marginTopTablet:{type:"number"},marginTopMobile:{type:"number"},marginBottomTablet:{type:"number"},marginBottomMobile:{type:"number"},reverseColumnsTablet:{type:"boolean",default:!1},reverseColumnsMobile:{type:"boolean",default:!1}},supports:{align:["wide","full"],html:!1},migrate:e=>{let t="",l="";if("gradient"===e.backgroundType){let l="";"linear"===e.backgroundGradientType&&(l=`${e.backgroundGradientAngle}deg, `),t=`${e.backgroundGradientType}-gradient(${l}${m()(e.backgroundGradientFirstColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientFirstLocation}%, ${m()(e.backgroundGradientSecondColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundGradientSecondLocation}%)`}if("gradient"===e.backgroundOverlayType){let t="";"linear"===e.backgroundOverlayGradientType&&(t=`${e.backgroundOverlayGradientAngle}deg, `),l=`${e.backgroundOverlayGradientType}-gradient(${t}${m()(e.backgroundOverlayGradientFirstColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientFirstLocation}%, ${m()(e.backgroundOverlayGradientSecondColor)||"rgba( 0, 0, 0, 0 )"} ${e.backgroundOverlayGradientSecondLocation}%)`}return{...{...(0,b.omit)(e,["backgroundGradientFirstColor","backgroundGradientFirstLocation","backgroundGradientSecondColor","backgroundGradientSecondLocation","backgroundGradientType","backgroundGradientAngle","backgroundGradientPosition","backgroundOverlayGradientFirstColor","backgroundOverlayGradientFirstLocation","backgroundOverlayGradientSecondColor","backgroundOverlayGradientSecondLocation","backgroundOverlayGradientType","backgroundOverlayGradientAngle","backgroundOverlayGradientPosition"]),backgroundGradient:t,backgroundOverlayGradient:l}}},isEligible:e=>"gradient"===e.backgroundType&&void 0!==e.backgroundGradientFirstColor||"gradient"===e.backgroundOverlayType&&void 0!==e.backgroundOverlayGradientFirstColor,save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag,o=e.hide?"":`has-desktop-${e.layout}-layout`,a=e.hideTablet?"":`has-tablet-${e.layoutTablet}-layout`,r=e.hideMobile?"":`has-mobile-${e.layoutMobile}-layout`,n=s()(t,`has-${e.columns}-columns`,o,a,r,{"hide-in-desktop":e.hide},{"hide-in-tablet":e.hideTablet},{"hide-in-mobile":e.hideMobile},{"has-reverse-columns-tablet":e.reverseColumnsTablet&&!e.hideTablet&&"collapsedRows"===e.layoutTablet},{"has-reverse-columns-mobile":e.reverseColumnsMobile&&!e.hideMobile&&"collapsedRows"===e.layoutMobile},`has-${e.columnsGap}-gap`,`has-vertical-${e.verticalAlign}`);return(0,c.createElement)(l,{className:n,id:e.id},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay"}),(0,c.createElement)(k,{type:"top",front:!0,style:e.dividerTopType,fill:e.dividerTopColor,invert:e.dividerTopInvert}),(0,c.createElement)("div",{className:"innerblocks-wrap"},(0,c.createElement)(u.InnerBlocks.Content,null)),(0,c.createElement)(k,{type:"bottom",front:!0,style:e.dividerBottomType,fill:e.dividerBottomColor,invert:e.dividerBottomInvert}))}}],y=l(4333),_=l(9818),w=l(7400),f=({attributes:e,setAttributes:t})=>(0,c.createElement)(u.BlockControls,null,(0,c.createElement)(u.BlockVerticalAlignmentToolbar,{onChange:l=>{e.verticalAlign===l?t({verticalAlign:"unset"}):"top"===l?t({verticalAlign:"flex-start"}):"bottom"===l&&t({verticalAlign:"flex-end"})},value:"flex-start"===e.verticalAlign?"top":"flex-end"===e.verticalAlign?"bottom":e.verticalAlign})),C=l(6778),E=l(9266),T=l(2372),x=l(6993),M=l(1430),S=l(2136),B=l(1661),z=({attributes:e,setAttributes:t,updateColumnsWidth:l,dividerViewType:a,setDividerViewType:r,changeColumnsNumbers:n})=>{const i=(0,_.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=e("core/edit-post")?e("core/edit-post"):{__experimentalGetPreviewDeviceType:void 0};return l?l():t()}),[]),[d,m]=(0,c.useState)("layout"),[b,g]=(0,c.useState)(!1);(0,c.useEffect)((()=>{b&&(6>=e.columns?l(e.columns,"equal"):6<e.columns?l(6,"equal"):1>=e.columns&&l(1,"equal"),g(!1))}),[e.columns]);let h=()=>{switch(i){case"Desktop":return e.paddingType;case"Tablet":return e.paddingTypeTablet;case"Mobile":return e.paddingTypeMobile;default:return}};h=h();const k={top:"paddingTop",right:"paddingRight",bottom:"paddingBottom",left:"paddingLeft"},v={top:"paddingTopTablet",right:"paddingRightTablet",bottom:"paddingBottomTablet",left:"paddingLeftTablet"},y={top:"paddingTopMobile",right:"paddingRightMobile",bottom:"paddingBottomMobile",left:"paddingLeftMobile"},w=t=>{if("top"==t)switch(i){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingTop;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingTopTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingTopMobile}else if("right"==t)switch(i){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingRight;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingRightTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingRightMobile}else if("bottom"==t)switch(i){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingBottom;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingBottomTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingBottomMobile}else if("left"==t)switch(i){case"Desktop":return"linked"===e.paddingType?e.padding:e.paddingLeft;case"Tablet":return"linked"===e.paddingTypeTablet?e.paddingTablet:e.paddingLeftTablet;case"Mobile":return"linked"===e.paddingTypeMobile?e.paddingMobile:e.paddingLeftMobile}},f={top:"marginTop",bottom:"marginBottom"},z={top:"marginTopTablet",bottom:"marginBottomTablet"},P={top:"marginTopMobile",bottom:"marginBottomMobile"},N=t=>{if("top"==t)switch(i){case"Desktop":return"linked"===e.marginType?e.margin:e.marginTop;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginTopTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginTopMobile}else if("bottom"==t)switch(i){case"Desktop":return"linked"===e.marginType?e.margin:e.marginBottom;case"Tablet":return"linked"===e.marginTypeTablet?e.marginTablet:e.marginBottomTablet;case"Mobile":return"linked"===e.marginTypeMobile?e.marginMobile:e.marginBottomMobile}},R=l=>{if(e.horizontalAlign===l)return t({horizontalAlign:"unset"});t({horizontalAlign:l})};let V=()=>{switch(i){case"Desktop":return e.columnsHeightCustom;case"Tablet":return e.columnsHeightCustomTablet;case"Mobile":return e.columnsHeightCustomMobile;default:return}};V=V();const L=()=>{t({backgroundImageID:"",backgroundImageURL:""})},H=()=>{t({backgroundOverlayImageID:"",backgroundOverlayImageURL:""})},I={top:"borderTop",right:"borderRight",bottom:"borderBottom",left:"borderLeft"},A=t=>{switch(t){case"top":return"linked"===e.borderType?e.border:e.borderTop;case"right":return"linked"===e.borderType?e.border:e.borderRight;case"bottom":return"linked"===e.borderType?e.border:e.borderBottom;case"left":return"linked"===e.borderType?e.border:e.borderLeft;default:return}},$={top:"borderRadiusTop",right:"borderRadiusRight",bottom:"borderRadiusBottom",left:"borderRadiusLeft"},O=t=>{switch(t){case"top":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusTop;case"right":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusRight;case"bottom":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusBottom;case"left":return"linked"===e.borderRadiusType?e.borderRadius:e.borderRadiusLeft;default:return}},G="top"==a?e.dividerTopType:"bottom"==a?e.dividerBottomType:void 0,D=()=>"top"==a?e.dividerTopColor:"bottom"==a?e.dividerBottomColor:void 0,Z=(e,l)=>{switch(l){case"Desktop":t({hide:e});break;case"Tablet":t({hideTablet:e});break;case"Mobile":t({hideMobile:e})}},F=(e,l)=>{"Tablet"===l?t({reverseColumnsTablet:e}):"Mobile"===l&&t({reverseColumnsMobile:e})};return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(u.InspectorControls,null,(0,c.createElement)(p.PanelBody,{className:"wp-block-themeisle-blocks-advanced-columns-header-panel"},(0,c.createElement)(p.Button,{className:s()("header-tab",{"is-selected":"layout"===d}),onClick:()=>m("layout")},(0,c.createElement)("span",null,(0,c.createElement)(p.Dashicon,{icon:"editor-table"}),(0,o.__)("Layout","otter-blocks"))),(0,c.createElement)(p.Button,{className:s()("header-tab",{"is-selected":"style"===d}),onClick:()=>m("style")},(0,c.createElement)("span",null,(0,c.createElement)(p.Dashicon,{icon:"admin-customizer"}),(0,o.__)("Style","otter-blocks"))),(0,c.createElement)(p.Button,{className:s()("header-tab",{"is-selected":"advanced"===d}),onClick:()=>m("advanced")},(0,c.createElement)("span",null,(0,c.createElement)(p.Dashicon,{icon:"admin-generic"}),(0,o.__)("Advanced","otter-blocks")))),"layout"===d&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Columns & Layout","otter-blocks")},(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Columns","otter-blocks"),value:e.columns,onChange:e=>{6>=e&&t({layout:"equal",layoutTablet:"equal",layoutMobile:"collapsedRows"}),6<e&&t({layout:"equal",layoutTablet:"equal",layoutMobile:"collapsedRows"}),1>=e&&t({layout:"equal",layoutTablet:"equal",layoutMobile:"equal"}),n(e),g(!0)},min:1,max:6}),(0,c.createElement)(E.Z,{label:(0,o.__)("Layout","otter-blocks"),columns:e.columns,layout:e.layout,layoutTablet:e.layoutTablet,layoutMobile:e.layoutMobile,onClick:o=>{switch(i){case"Desktop":t({layout:o}),l(e.columns,o);break;case"Tablet":t({layoutTablet:o});break;case"Mobile":t({layoutMobile:o})}}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Columns Gap","otter-blocks"),value:e.columnsGap,options:[{label:(0,o.__)("Default (10px)","otter-blocks"),value:"default"},{label:(0,o.__)("No Gap","otter-blocks"),value:"nogap"},{label:(0,o.__)("Narrow (5px)","otter-blocks"),value:"narrow"},{label:(0,o.__)("Extended (15px)","otter-blocks"),value:"extended"},{label:(0,o.__)("Wide (20px)","otter-blocks"),value:"wide"},{label:(0,o.__)("Wider (30px)","otter-blocks"),value:"wider"}],onChange:e=>{t({columnsGap:e})}})),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Spacing","otter-blocks"),initialOpen:!1},(0,c.createElement)(x.Z,{label:(0,o.__)("Padding","otter-blocks")},(0,c.createElement)(T.Z,{type:h,min:0,max:500,changeType:e=>{switch(i){case"Desktop":t({paddingType:e});break;case"Tablet":t({paddingTypeTablet:e});break;case"Mobile":t({paddingTypeMobile:e})}},onChange:(l,o)=>{"Desktop"===i?"linked"===e.paddingType?t({padding:o}):t({[k[l]]:o}):"Tablet"===i?"linked"===e.paddingTypeTablet?t({paddingTablet:o}):t({[v[l]]:o}):"Mobile"===i&&("linked"===e.paddingTypeMobile?t({paddingMobile:o}):t({[y[l]]:o}))},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:w("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:w("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:w("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:w("left")}]})),(0,c.createElement)(x.Z,{label:(0,o.__)("Margin","otter-blocks")},(0,c.createElement)(T.Z,{type:(()=>{switch(i){case"Desktop":return e.marginType;case"Tablet":return e.marginTypeTablet;case"Mobile":return e.marginTypeMobile;default:return}})(),min:-500,max:500,changeType:e=>{switch(i){case"Desktop":t({marginType:e});break;case"Tablet":t({marginTypeTablet:e});break;case"Mobile":t({marginTypeMobile:e})}},onChange:(l,o)=>{"Desktop"===i?"linked"===e.marginType?t({margin:o}):t({[f[l]]:o}):"Tablet"===i?"linked"===e.marginTypeTablet?t({marginTablet:o}):t({[z[l]]:o}):"Mobile"===i&&("linked"===e.marginTypeMobile?t({marginMobile:o}):t({[P[l]]:o}))},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:N("top")},{label:(0,o.__)("Right","otter-blocks"),disabled:!0},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:N("bottom")},{label:(0,o.__)("Left","otter-blocks"),disabled:!0}]}))),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Section Structure","otter-blocks"),initialOpen:!1},(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Maximum Content Width","otter-blocks"),value:e.columnsWidth||"",onChange:e=>{(0<=e&&1200>=e||void 0===e)&&t({columnsWidth:e})},min:0,max:1800}),e.columnsWidth&&(0,c.createElement)(p.BaseControl,{label:(0,o.__)("Horizontal Align","otter-blocks")},(0,c.createElement)(p.ButtonGroup,{className:"wp-block-themeisle-icon-buttom-group"},(0,c.createElement)(p.Button,{icon:"editor-alignleft",label:(0,o.__)("Left","otter-blocks"),showTooltip:!0,isPrimary:"flex-start"===e.horizontalAlign,onClick:()=>R("flex-start")}),(0,c.createElement)(p.Button,{icon:"editor-aligncenter",label:(0,o.__)("Center","otter-blocks"),showTooltip:!0,isPrimary:"center"===e.horizontalAlign,onClick:()=>R("center")}),(0,c.createElement)(p.Button,{icon:"editor-alignright",label:(0,o.__)("Right","otter-blocks"),showTooltip:!0,isPrimary:"flex-end"===e.horizontalAlign,onClick:()=>R("flex-end")}))),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Minimum Height","otter-blocks"),value:e.columnsHeight,options:[{label:(0,o.__)("Default","otter-blocks"),value:"auto"},{label:(0,o.__)("Fit to Screen","otter-blocks"),value:"100vh"},{label:(0,o.__)("Custom","otter-blocks"),value:"custom"}],onChange:e=>{t({columnsHeight:e})}}),"custom"===e.columnsHeight&&(0,c.createElement)(x.Z,{label:(0,o.__)("Custom Height","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:V||"",onChange:e=>{switch(i){case"Desktop":t({columnsHeightCustom:e});break;case"Tablet":t({columnsHeightCustomTablet:e});break;case"Mobile":t({columnsHeightCustomMobile:e})}},min:0,max:1e3}))))||"style"===d&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Background Settings","otter-blocks"),className:"wp-block-themeisle-image-container"},(0,c.createElement)(M.Z,{label:(0,o.__)("Background Type","otter-blocks"),backgroundType:e.backgroundType,changeBackgroundType:e=>{t({backgroundType:e})}}),"color"===e.backgroundType&&(0,c.createElement)(C.Z,{label:(0,o.__)("Background Color","otter-blocks"),colorValue:e.backgroundColor},(0,c.createElement)(u.ColorPalette,{label:(0,o.__)("Background Color","otter-blocks"),value:e.backgroundColor,onChange:e=>{t({backgroundColor:e})}}))||"image"===e.backgroundType&&(e.backgroundImageURL?(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-body"},(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-area"},(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-holder",style:{backgroundImage:`url('${e.backgroundImageURL}')`}}),(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-delete",onClick:L},(0,c.createElement)(p.Dashicon,{icon:"trash"}),(0,c.createElement)("span",null,(0,o.__)("Remove Image","otter-blocks"))))),(0,c.createElement)(p.Button,{isSecondary:!0,className:"wp-block-themeisle-image-container-delete-button",onClick:L},(0,o.__)("Change or Remove Image","otter-blocks")),(0,c.createElement)(S.Z,{label:(0,o.__)("Background Settings","otter-blocks")},(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Attachment","otter-blocks"),value:e.backgroundAttachment,options:[{label:(0,o.__)("Scroll","otter-blocks"),value:"scroll"},{label:(0,o.__)("Fixed","otter-blocks"),value:"fixed"},{label:(0,o.__)("Local","otter-blocks"),value:"local"}],onChange:e=>{t({backgroundAttachment:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Position","otter-blocks"),value:e.backgroundPosition,options:[{label:(0,o.__)("Default","otter-blocks"),value:"top left"},{label:(0,o.__)("Top Left","otter-blocks"),value:"top left"},{label:(0,o.__)("Top Center","otter-blocks"),value:"top center"},{label:(0,o.__)("Top Right","otter-blocks"),value:"top right"},{label:(0,o.__)("Center Left","otter-blocks"),value:"center left"},{label:(0,o.__)("Center Center","otter-blocks"),value:"center center"},{label:(0,o.__)("Center Right","otter-blocks"),value:"center right"},{label:(0,o.__)("Bottom Left","otter-blocks"),value:"bottom left"},{label:(0,o.__)("Bottom Center","otter-blocks"),value:"bottom center"},{label:(0,o.__)("Bottom Right","otter-blocks"),value:"bottom right"}],onChange:e=>{t({backgroundPosition:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Repeat","otter-blocks"),value:e.backgroundRepeat,options:[{label:(0,o.__)("Repeat","otter-blocks"),value:"repeat"},{label:(0,o.__)("No-repeat","otter-blocks"),value:"no-repeat"}],onChange:e=>{t({backgroundRepeat:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Size","otter-blocks"),value:e.backgroundSize,options:[{label:(0,o.__)("Auto","otter-blocks"),value:"auto"},{label:(0,o.__)("Cover","otter-blocks"),value:"cover"},{label:(0,o.__)("Contain","otter-blocks"),value:"contain"}],onChange:e=>{t({backgroundSize:e})}}))):(0,c.createElement)(u.MediaPlaceholder,{icon:"format-image",labels:{title:(0,o.__)("Background Image","otter-blocks"),name:(0,o.__)("an image","otter-blocks")},value:e.backgroundImageID,onSelect:e=>{t({backgroundImageID:e.id,backgroundImageURL:e.url})},accept:"image/*",allowedTypes:["image"]}))||"gradient"===e.backgroundType&&(0,c.createElement)(u.__experimentalColorGradientControl,{label:(0,o.__)("Background Gradient","otter-blocks"),gradientValue:e.backgroundGradient,disableCustomColors:!0,onGradientChange:e=>{t({backgroundGradient:e})},clearable:!1})),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Background Overlay","otter-blocks"),className:"wp-block-themeisle-image-container",initialOpen:!1},(0,c.createElement)(M.Z,{label:(0,o.__)("Overlay Type","otter-blocks"),backgroundType:e.backgroundOverlayType,changeBackgroundType:e=>{t({backgroundOverlayType:e})}}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Overlay Opacity","otter-blocks"),value:e.backgroundOverlayOpacity,onChange:e=>{t({backgroundOverlayOpacity:e})},min:0,max:100}),"color"===e.backgroundOverlayType&&(0,c.createElement)(C.Z,{label:(0,o.__)("Overlay Color","otter-blocks"),colorValue:e.backgroundOverlayColor},(0,c.createElement)(u.ColorPalette,{label:(0,o.__)("Overlay Color","otter-blocks"),value:e.backgroundOverlayColor,onChange:e=>{t({backgroundOverlayColor:e})}}))||"image"===e.backgroundOverlayType&&(e.backgroundOverlayImageURL?(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-body"},(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-area"},(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-holder",style:{backgroundImage:`url('${e.backgroundOverlayImageURL}')`}}),(0,c.createElement)("div",{className:"wp-block-themeisle-image-container-delete",onClick:H},(0,c.createElement)(p.Dashicon,{icon:"trash"}),(0,c.createElement)("span",null,(0,o.__)("Remove Image","otter-blocks"))))),(0,c.createElement)(p.Button,{isSecondary:!0,className:"wp-block-themeisle-image-container-delete-button",onClick:H},(0,o.__)("Change or Remove Image","otter-blocks")),(0,c.createElement)(S.Z,{label:(0,o.__)("Background Settings","otter-blocks")},(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Attachment","otter-blocks"),value:e.backgroundOverlayAttachment,options:[{label:(0,o.__)("Scroll","otter-blocks"),value:"scroll"},{label:(0,o.__)("Fixed","otter-blocks"),value:"fixed"},{label:(0,o.__)("Local","otter-blocks"),value:"local"}],onChange:e=>{t({backgroundOverlayAttachment:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Position","otter-blocks"),value:e.backgroundOverlayPosition,options:[{label:(0,o.__)("Default","otter-blocks"),value:"top left"},{label:(0,o.__)("Top Left","otter-blocks"),value:"top left"},{label:(0,o.__)("Top Center","otter-blocks"),value:"top center"},{label:(0,o.__)("Top Right","otter-blocks"),value:"top right"},{label:(0,o.__)("Center Left","otter-blocks"),value:"center left"},{label:(0,o.__)("Center Center","otter-blocks"),value:"center center"},{label:(0,o.__)("Center Right","otter-blocks"),value:"center right"},{label:(0,o.__)("Bottom Left","otter-blocks"),value:"bottom left"},{label:(0,o.__)("Bottom Center","otter-blocks"),value:"bottom center"},{label:(0,o.__)("Bottom Right","otter-blocks"),value:"bottom right"}],onChange:e=>{t({backgroundOverlayPosition:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Repeat","otter-blocks"),value:e.backgroundOverlayRepeat,options:[{label:(0,o.__)("Repeat","otter-blocks"),value:"repeat"},{label:(0,o.__)("No-repeat","otter-blocks"),value:"no-repeat"}],onChange:e=>{t({backgroundOverlayRepeat:e})}}),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Background Size","otter-blocks"),value:e.backgroundOverlaySize,options:[{label:(0,o.__)("Auto","otter-blocks"),value:"auto"},{label:(0,o.__)("Cover","otter-blocks"),value:"cover"},{label:(0,o.__)("Contain","otter-blocks"),value:"contain"}],onChange:e=>{t({backgroundOverlaySize:e})}}))):(0,c.createElement)(u.MediaPlaceholder,{icon:"format-image",labels:{title:(0,o.__)("Background Image","otter-blocks"),name:(0,o.__)("an image","otter-blocks")},value:e.backgroundOverlayImageID,onSelect:e=>{t({backgroundOverlayImageID:e.id,backgroundOverlayImageURL:e.url})},accept:"image/*",allowedTypes:["image"]}))||"gradient"===e.backgroundOverlayType&&(0,c.createElement)(u.__experimentalColorGradientControl,{label:(0,o.__)("Background Gradient","otter-blocks"),gradientValue:e.backgroundOverlayGradient,disableCustomColors:!0,onGradientChange:e=>{t({backgroundOverlayGradient:e})},clearable:!1}),(0,c.createElement)(S.Z,{label:(0,o.__)("CSS Filters","otter-blocks")},(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:e.backgroundOverlayFilterBlur,onChange:e=>{t({backgroundOverlayFilterBlur:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Brightness","otter-blocks"),value:e.backgroundOverlayFilterBrightness,onChange:e=>{t({backgroundOverlayFilterBrightness:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Contrast","otter-blocks"),value:e.backgroundOverlayFilterContrast,onChange:e=>{t({backgroundOverlayFilterContrast:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Grayscale","otter-blocks"),value:e.backgroundOverlayFilterGrayscale,onChange:e=>{t({backgroundOverlayFilterGrayscale:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Hue","otter-blocks"),value:e.backgroundOverlayFilterHue,onChange:e=>{t({backgroundOverlayFilterHue:e})},min:0,max:360}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Saturation","otter-blocks"),value:e.backgroundOverlayFilterSaturate,onChange:e=>{t({backgroundOverlayFilterSaturate:e})},min:0,max:100})),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Blend Mode","otter-blocks"),value:e.backgroundOverlayBlend,options:[{label:(0,o.__)("Normal","otter-blocks"),value:"normal"},{label:(0,o.__)("Multiply","otter-blocks"),value:"multiply"},{label:(0,o.__)("Screen","otter-blocks"),value:"screen"},{label:(0,o.__)("Overlay","otter-blocks"),value:"overlay"},{label:(0,o.__)("Darken","otter-blocks"),value:"darken"},{label:(0,o.__)("Lighten","otter-blocks"),value:"lighten"},{label:(0,o.__)("Color Dodge","otter-blocks"),value:"color-dodge"},{label:(0,o.__)("Color Burn","otter-blocks"),value:"color-burn"},{label:(0,o.__)("Hard Light","otter-blocks"),value:"hard-light"},{label:(0,o.__)("Soft Light","otter-blocks"),value:"soft-light"},{label:(0,o.__)("Difference","otter-blocks"),value:"difference"},{label:(0,o.__)("Exclusion","otter-blocks"),value:"exclusion"},{label:(0,o.__)("Hue","otter-blocks"),value:"hue"},{label:(0,o.__)("Saturation","otter-blocks"),value:"saturation"},{label:(0,o.__)("Color","otter-blocks"),value:"color"},{label:(0,o.__)("Luminosity","otter-blocks"),value:"luminosity"}],onChange:e=>{t({backgroundOverlayBlend:e})}})),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Border","otter-blocks"),className:"wp-block-themeisle-border-container",initialOpen:!1},(0,c.createElement)(T.Z,{label:(0,o.__)("Border Width","otter-blocks"),type:e.borderType,min:0,max:500,changeType:e=>{t({borderType:e})},onChange:(l,o)=>{"linked"===e.borderType?t({border:o}):t({[I[l]]:o})},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:A("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:A("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:A("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:A("left")}]}),(0,c.createElement)(C.Z,{label:(0,o.__)("Border Color","otter-blocks"),colorValue:e.borderColor},(0,c.createElement)(u.ColorPalette,{label:(0,o.__)("Border Color","otter-blocks"),value:e.borderColor,onChange:e=>{t({borderColor:e})}})),(0,c.createElement)(T.Z,{label:(0,o.__)("Border Radius","otter-blocks"),type:e.borderRadiusType,min:0,max:500,changeType:e=>{t({borderRadiusType:e})},onChange:(l,o)=>{"linked"===e.borderRadiusType?t({borderRadius:o}):t({[$[l]]:o})},options:[{label:(0,o.__)("Top","otter-blocks"),type:"top",value:O("top")},{label:(0,o.__)("Right","otter-blocks"),type:"right",value:O("right")},{label:(0,o.__)("Bottom","otter-blocks"),type:"bottom",value:O("bottom")},{label:(0,o.__)("Left","otter-blocks"),type:"left",value:O("left")}]}),(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Box Shadow","otter-blocks"),checked:e.boxShadow,onChange:()=>{t({boxShadow:!e.boxShadow})}}),e.boxShadow&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(C.Z,{label:(0,o.__)("Shadow Color","otter-blocks"),colorValue:e.boxShadowColor},(0,c.createElement)(u.ColorPalette,{label:(0,o.__)("Shadow Color","otter-blocks"),value:e.boxShadowColor,onChange:e=>{t({boxShadowColor:e})}})),(0,c.createElement)(S.Z,{label:(0,o.__)("Border Shadow","otter-blocks")},(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Opacity","otter-blocks"),value:e.boxShadowColorOpacity,onChange:e=>{t({boxShadowColorOpacity:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Blur","otter-blocks"),value:e.boxShadowBlur,onChange:e=>{t({boxShadowBlur:e})},min:0,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Spread","otter-blocks"),value:e.boxShadowSpread,onChange:e=>{t({boxShadowSpread:e})},min:-100,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Horizontal","otter-blocks"),value:e.boxShadowHorizontal,onChange:e=>{t({boxShadowHorizontal:e})},min:-100,max:100}),(0,c.createElement)(p.RangeControl,{label:(0,o.__)("Vertical","otter-blocks"),value:e.boxShadowVertical,onChange:e=>{t({boxShadowVertical:e})},min:-100,max:100})))),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Shape Divider","otter-blocks"),initialOpen:!1,className:"wp-block-themeisle-shape-divider"},(0,c.createElement)(p.ButtonGroup,null,(0,c.createElement)(p.Button,{isSmall:!0,isSecondary:"top"!==a,isPrimary:"top"===a,onClick:()=>r("top")},(0,o.__)("Top","otter-blocks")),(0,c.createElement)(p.Button,{isSmall:!0,isSecondary:"bottom"!==a,isPrimary:"bottom"===a,onClick:()=>r("bottom")},(0,o.__)("Bottom","otter-blocks"))),(0,c.createElement)(p.SelectControl,{label:(0,o.__)("Type","otter-blocks"),value:G,options:[{label:(0,o.__)("None","otter-blocks"),value:"none"},{label:(0,o.__)("Triangle","otter-blocks"),value:"bigTriangle"},{label:(0,o.__)("Right Curve","otter-blocks"),value:"rightCurve"},{label:(0,o.__)("Curve","otter-blocks"),value:"curve"},{label:(0,o.__)("Slant","otter-blocks"),value:"slant"},{label:(0,o.__)("Cloud","otter-blocks"),value:"cloud"}],onChange:e=>{"top"==a?t({dividerTopType:e}):"bottom"==a&&t({dividerBottomType:e})}}),"none"!==G&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(C.Z,{label:(0,o.__)("Color","otter-blocks"),colorValue:D()},(0,c.createElement)(u.ColorPalette,{label:(0,o.__)("Color","otter-blocks"),value:D(),onChange:e=>{"top"==a?t({dividerTopColor:e}):"bottom"==a&&t({dividerBottomColor:e})}})),(0,c.createElement)(x.Z,{label:(0,o.__)("Width","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:(()=>{if("top"==a)switch(i){case"Desktop":return e.dividerTopWidth;case"Tablet":return e.dividerTopWidthTablet;case"Mobile":return e.dividerTopWidthMobile}else if("bottom"==a)switch(i){case"Desktop":return e.dividerBottomWidth;case"Tablet":return e.dividerBottomWidthTablet;case"Mobile":return e.dividerBottomWidthMobile}})(),onChange:e=>{if("top"==a)switch(i){case"Desktop":t({dividerTopWidth:e});break;case"Tablet":t({dividerTopWidthTablet:e});break;case"Mobile":t({dividerTopWidthMobile:e})}else if("bottom"==a)switch(i){case"Desktop":t({dividerBottomWidth:e});break;case"Tablet":t({dividerBottomWidthTablet:e});break;case"Mobile":t({dividerBottomWidthMobile:e})}},min:0,max:500})),(0,c.createElement)(x.Z,{label:(0,o.__)("Height","otter-blocks")},(0,c.createElement)(p.RangeControl,{value:(()=>{if("top"==a)switch(i){case"Desktop":return e.dividerTopHeight;case"Tablet":return e.dividerTopHeightTablet;case"Mobile":return e.dividerTopHeightMobile}else if("bottom"==a)switch(i){case"Desktop":return e.dividerBottomHeight;case"Tablet":return e.dividerBottomHeightTablet;case"Mobile":return e.dividerBottomHeightMobile}})(),onChange:e=>{if("top"==a)switch(i){case"Desktop":t({dividerTopHeight:e});break;case"Tablet":t({dividerTopHeightTablet:e});break;case"Mobile":t({dividerTopHeightMobile:e})}else if("bottom"==a)switch(i){case"Desktop":t({dividerBottomHeight:e});break;case"Tablet":t({dividerBottomHeightTablet:e});break;case"Mobile":t({dividerBottomHeightMobile:e})}},min:0,max:500})),"curve"!==G&&"cloud"!==G&&(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Invert Shape Divider","otter-blocks"),checked:(()=>{switch(a){case"top":return e.dividerTopInvert;case"bottom":return e.dividerBottomInvert;default:return}})(),onChange:()=>{switch(a){case"top":t({dividerTopInvert:!e.dividerTopInvert});break;case"bottom":t({dividerBottomInvert:!e.dividerBottomInvert})}}}))))||"advanced"===d&&(0,c.createElement)(c.Fragment,null,(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Responsive","otter-blocks")},(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Hide this section on Desktop devices?","otter-blocks"),checked:e.hide,onChange:e=>Z(e,"Desktop")}),(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Hide this section on Tablet devices?","otter-blocks"),checked:e.hideTablet,onChange:e=>Z(e,"Tablet")}),(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Hide this section on Mobile devices?","otter-blocks"),checked:e.hideMobile,onChange:e=>Z(e,"Mobile")}),(0,c.createElement)("hr",null),!e.hideTablet&&"collapsedRows"===e.layoutTablet&&(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Reverse Columns in Tablet devices?","otter-blocks"),checked:e.reverseColumnsTablet,onChange:e=>F(e,"Tablet")}),!e.hideMobile&&"collapsedRows"===e.layoutMobile&&(0,c.createElement)(p.ToggleControl,{label:(0,o.__)("Reverse Columns in Mobile devices?","otter-blocks"),checked:e.reverseColumnsMobile,onChange:e=>F(e,"Mobile")})),(0,c.createElement)(p.PanelBody,{title:(0,o.__)("Section Settings","otter-blocks"),initialOpen:!1},(0,c.createElement)(p.SelectControl,{label:(0,o.__)("HTML Tag","otter-blocks"),value:e.columnsHTMLTag,options:[{label:(0,o.__)("Default (div)","otter-blocks"),value:"div"},{label:"section",value:"section"},{label:"header",value:"header"},{label:"footer",value:"footer"},{label:"article",value:"article"},{label:"main",value:"main"}],onChange:e=>{t({columnsHTMLTag:e})}})))),(0,c.createElement)(B.Z,{value:e.id,onChange:e=>{t({id:e})}}))},P=({clientId:e})=>{const{block:t,selectedBlockClientId:l}=(0,_.useSelect)((t=>{const{getSelectedBlockClientId:l,getBlock:o}=t("core/block-editor");return{block:o(e),selectedBlockClientId:l()}}),[]),{selectBlock:a}=(0,_.useDispatch)("core/block-editor"),[n,i]=(0,c.useState)(!1),s=u.__experimentalBlockNavigationList||u.__experimentalBlockNavigationTree;return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(u.BlockControls,null,(0,c.createElement)(p.ToolbarGroup,null,(0,c.createElement)(p.Button,{className:"components-toolbar__control",label:(0,o.__)("Open block navigator","otter-blocks"),showTooltip:!0,onClick:()=>i(!0),icon:r.Hg}))),n&&(0,c.createElement)(p.Modal,{title:(0,o.__)("Block Navigator","otter-blocks"),closeLabel:(0,o.__)("Close","otter-blocks"),onRequestClose:()=>i(!1)},(0,c.createElement)(s,{blocks:[t],selectedBlockClientId:l,selectBlock:a,showNestedBlocks:!0})))},N=l(2902),R=l(5225),V=l(5581),L=[{name:"themeisle-blocks/section-columns-1",description:(0,o.__)("Single column","otter-blocks"),icon:r.Kt,title:(0,o.__)("Full","otter-blocks"),attributes:{columns:1,layout:"equal",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"100"}]],scope:["block"],isDefault:!0},{name:"themeisle-blocks/section-columns-equal",description:(0,o.__)("2 equal columns","otter-blocks"),icon:r.nt,title:(0,o.__)("1:1","otter-blocks"),attributes:{columns:2,layout:"equal",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"50"}],["themeisle-blocks/advanced-column",{columnWidth:"50"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-1-2",description:(0,o.__)("1:2 columns","otter-blocks"),icon:r.Tt,title:(0,o.__)("1:2","otter-blocks"),attributes:{columns:2,layout:"oneTwo",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"33.34"}],["themeisle-blocks/advanced-column",{columnWidth:"66.66"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-2-1",description:(0,o.__)("2:1 columns","otter-blocks"),icon:r.eI,title:(0,o.__)("2:1","otter-blocks"),attributes:{columns:2,layout:"twoOne",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"66.66"}],["themeisle-blocks/advanced-column",{columnWidth:"33.33"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-equal-3",description:(0,o.__)("3 equal columns","otter-blocks"),icon:r.Np,title:(0,o.__)("1:1:1","otter-blocks"),attributes:{columns:3,layout:"equal",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"33.33"}],["themeisle-blocks/advanced-column",{columnWidth:"33.33"}],["themeisle-blocks/advanced-column",{columnWidth:"33.33"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-1-1-2",description:(0,o.__)("1:1:2 columns","otter-blocks"),icon:r.TS,title:(0,o.__)("1:1:2","otter-blocks"),attributes:{columns:3,layout:"oneOneTwo",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"50"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-2-1-1",description:(0,o.__)("2:1:1 columns","otter-blocks"),icon:r.Gg,title:(0,o.__)("2:1:1","otter-blocks"),attributes:{columns:3,layout:"twoOneOne",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"50"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}]],scope:["block"]},{name:"themeisle-blocks/section-columns-equal-4",description:(0,o.__)("4 equal columns","otter-blocks"),icon:r.Qd,title:(0,o.__)("1:1:1:1","otter-blocks"),attributes:{columns:4,layout:"equal",layoutTablet:"equal",layoutMobile:"equal"},innerBlocks:[["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}],["themeisle-blocks/advanced-column",{columnWidth:"25"}]],scope:["block"]}];(0,a.registerBlockType)("themeisle-blocks/advanced-columns",{title:(0,o.__)("Section","otter-blocks"),description:(0,o.__)("Add a Section block that displays content in multiple columns, then add whatever content blocks you’d like.","otter-blocks"),icon:r.b8,category:"themeisle-blocks",keywords:["advanced columns","layout","grid"],attributes:n,supports:{align:["wide","full"],html:!1},deprecated:v,variations:L,edit:({attributes:e,setAttributes:t,className:l,clientId:r,name:i})=>{(0,c.useEffect)((()=>{const t=(0,R.WX)(r,n);return()=>t(e.id)}),[e.id]);const{updateBlockAttributes:d,replaceInnerBlocks:g}=(0,_.useDispatch)("core/block-editor"),{sectionBlock:h,isViewportAvailable:k,isPreviewDesktop:v,isPreviewTablet:C,isPreviewMobile:E,children:T,variations:x,defaultVariation:M}=(0,_.useSelect)((e=>{var t;const{getBlock:l}=e("core/block-editor"),{getBlockVariations:o,getBlockType:a,getDefaultBlockVariation:n}=e("core/blocks"),{__experimentalGetPreviewDeviceType:c}=e("core/edit-post")?e("core/edit-post"):{__experimentalGetPreviewDeviceType:void 0};return{sectionBlock:l(r),children:(null===(t=l(r))||void 0===t?void 0:t.innerBlocks)||[],isViewportAvailable:!!c,isPreviewDesktop:!!c&&"Desktop"===c(),isPreviewTablet:!!c&&"Tablet"===c(),isPreviewMobile:!!c&&"Mobile"===c(),blockType:a(i),defaultVariation:n(i,"block"),variations:o(i,"block").filter((({isDefault:e})=>!e))}}),[]),{insertBlock:S,removeBlock:B}=(0,_.useDispatch)("core/block-editor");(0,c.useEffect)((()=>{e.columns!==T.length&&t({columns:T.length})}),[T]);const L=(0,y.useViewportMatch)("large",">="),H=(0,y.useViewportMatch)("large","<="),I=(0,y.useViewportMatch)("small",">="),A=(0,y.useViewportMatch)("small","<=");let $=L&&!H&&I&&!A,O=!L&&!H&&I&&!A,G=!(L||H||I||A);k&&!G&&($=v,O=C,G=E);const[D,Z]=(0,c.useState)("top"),F=({mobile:e,tablet:t,desktop:l})=>G&&e||O&&t||$&&l||void 0,W=F({mobile:e.dividerTopWidthMobile,tablet:e.dividerTopWidthTablet,desktop:e.dividerTopWidth}),q=F({mobile:e.dividerBottomWidthMobile,tablet:e.dividerBottomWidthTablet,desktop:e.dividerBottomWidth}),U=F({mobile:e.dividerTopHeightMobile,tablet:e.dividerTopHeightTablet,desktop:e.dividerTopHeight}),j=F({mobile:e.dividerBottomHeightMobile,tablet:e.dividerBottomHeightTablet,desktop:e.dividerBottomHeight}),K=e.columnsHTMLTag;let Q,X,Y,J,ee,te;$?Q={paddingTop:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingTop}px`,paddingRight:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingRight}px`,paddingBottom:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingBottom}px`,paddingLeft:"linked"===e.paddingType?`${e.padding}px`:`${e.paddingLeft}px`,marginTop:"linked"===e.marginType?`${e.margin}px`:`${e.marginTop}px`,marginBottom:"linked"===e.marginType?`${e.margin}px`:`${e.marginBottom}px`,minHeight:"custom"===e.columnsHeight?`${e.columnsHeightCustom}px`:e.columnsHeight}:O?Q={paddingTop:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingTopTablet}px`,paddingRight:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingRightTablet}px`,paddingBottom:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingBottomTablet}px`,paddingLeft:"linked"===e.paddingTypeTablet?`${e.paddingTablet}px`:`${e.paddingLeftTablet}px`,marginTop:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginTopTablet}px`,marginBottom:"linked"===e.marginTypeTablet?`${e.marginTablet}px`:`${e.marginBottomTablet}px`,minHeight:"custom"===e.columnsHeight?`${e.columnsHeightCustomTablet}px`:e.columnsHeight}:G&&(Q={paddingTop:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingTopMobile}px`,paddingRight:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingRightMobile}px`,paddingBottom:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingBottomMobile}px`,paddingLeft:"linked"===e.paddingTypeMobile?`${e.paddingMobile}px`:`${e.paddingLeftMobile}px`,marginTop:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginTopMobile}px`,marginBottom:"linked"===e.marginTypeMobile?`${e.marginMobile}px`:`${e.marginBottomMobile}px`,minHeight:"custom"===e.columnsHeight?`${e.columnsHeightCustomMobile}px`:e.columnsHeight}),"color"===e.backgroundType&&(X={backgroundColor:e.backgroundColor}),"image"===e.backgroundType&&(X={backgroundImage:`url( '${e.backgroundImageURL}' )`,backgroundAttachment:e.backgroundAttachment,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundSize:e.backgroundSize}),"gradient"===e.backgroundType&&(X={backgroundImage:e.backgroundGradient}),"linked"===e.borderType&&(J={borderWidth:`${e.border}px`,borderStyle:"solid",borderColor:e.borderColor}),"unlinked"===e.borderType&&(J={borderTopWidth:`${e.borderTop}px`,borderRightWidth:`${e.borderRight}px`,borderBottomWidth:`${e.borderBottom}px`,borderLeftWidth:`${e.borderLeft}px`,borderStyle:"solid",borderColor:e.borderColor}),"linked"===e.borderRadiusType&&(ee={borderRadius:`${e.borderRadius}px`}),"unlinked"===e.borderRadiusType&&(ee={borderTopLeftRadius:`${e.borderRadiusTop}px`,borderTopRightRadius:`${e.borderRadiusRight}px`,borderBottomRightRadius:`${e.borderRadiusBottom}px`,borderBottomLeftRadius:`${e.borderRadiusLeft}px`}),!0===e.boxShadow&&(te={boxShadow:`${e.boxShadowHorizontal}px ${e.boxShadowVertical}px ${e.boxShadowBlur}px ${e.boxShadowSpread}px ${m()(e.boxShadowColor?e.boxShadowColor:"#000000",e.boxShadowColorOpacity)}`});const le={...Q,...X,...J,...ee,...te};"color"===e.backgroundOverlayType&&(Y={background:e.backgroundOverlayColor,opacity:e.backgroundOverlayOpacity/100}),"image"===e.backgroundOverlayType&&(Y={backgroundImage:`url( '${e.backgroundOverlayImageURL}' )`,backgroundAttachment:e.backgroundOverlayAttachment,backgroundPosition:e.backgroundOverlayPosition,backgroundRepeat:e.backgroundOverlayRepeat,backgroundSize:e.backgroundOverlaySize,opacity:e.backgroundOverlayOpacity/100}),"gradient"===e.backgroundOverlayType&&(Y={background:e.backgroundOverlayGradient,opacity:e.backgroundOverlayOpacity/100});const oe={...Y,...ee,mixBlendMode:e.backgroundOverlayBlend,filter:`blur( ${e.backgroundOverlayFilterBlur/10}px ) brightness( ${e.backgroundOverlayFilterBrightness/10} ) contrast( ${e.backgroundOverlayFilterContrast/10} ) grayscale( ${e.backgroundOverlayFilterGrayscale/100} ) hue-rotate( ${e.backgroundOverlayFilterHue}deg ) saturate( ${e.backgroundOverlayFilterSaturate/10} )`};let ae={};e.columnsWidth&&(ae={maxWidth:e.columnsWidth+"px"});const re=s()(l,`has-${e.columns}-columns`,`has-desktop-${e.layout}-layout`,`has-tablet-${e.layoutTablet}-layout`,`has-mobile-${e.layoutMobile}-layout`,`has-${e.columnsGap}-gap`,`has-vertical-${e.verticalAlign}`,`has-horizontal-${e.horizontalAlign}`,{"has-reverse-columns-tablet":e.reverseColumnsTablet&&!e.hideTablet&&"collapsedRows"===e.layoutTablet},{"has-reverse-columns-mobile":e.reverseColumnsMobile&&!e.hideMobile&&"collapsedRows"===e.layoutMobile},{"has-viewport-desktop":$},{"has-viewport-tablet":O},{"has-viewport-mobile":G}),[ne,ce]=(0,c.useState)(!1);return e.columns?(0,c.createElement)("div",null,(0,c.createElement)(P,{clientId:r}),(0,c.createElement)(f,{attributes:e,setAttributes:t}),(0,c.createElement)(z,{attributes:e,setAttributes:t,updateColumnsWidth:(e,t)=>{h.innerBlocks.map(((l,o)=>{d(l.clientId,{columnWidth:w.Z[e][t][o]})}))},dividerViewType:D,setDividerViewType:Z,changeColumnsNumbers:t=>{e.columns<t?(0,b.times)(t-e.columns,(()=>{const e=(0,a.createBlock)("themeisle-blocks/advanced-column");e&&S(e,(null==T?void 0:T.length)||0,r,!1)})):e.columns>t&&T.slice(t).forEach((e=>B(e.clientId,!1)))}}),(0,c.createElement)(K,{className:re,id:e.id,style:le},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay",style:oe}),(0,c.createElement)(N.Z,{type:"top",style:e.dividerTopType,fill:e.dividerTopColor,invert:e.dividerTopInvert,width:W,height:U}),(0,c.createElement)("div",{className:"innerblocks-wrap",style:ae},(0,c.createElement)(u.InnerBlocks,{allowedBlocks:["themeisle-blocks/advanced-column"],orientation:"horizontal"})),(0,c.createElement)(N.Z,{type:"bottom",style:e.dividerBottomType,fill:e.dividerBottomColor,invert:e.dividerBottomInvert,width:q,height:j}))):(0,c.createElement)(p.Placeholder,{label:(0,o.__)("Section","otter-blocks"),instructions:(0,o.__)("Select a layout to start with, or make one yourself.","otter-blocks"),className:"otter-section-layout-picker"},(0,c.createElement)(u.__experimentalBlockVariationPicker,{variations:x,onSelect:(e=M)=>{e&&(g(r,(0,a.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!0),t(e.attributes))},allowSkip:!0}),(0,c.createElement)(p.Tooltip,{text:(0,o.__)("Open Template Library","otter-blocks")},(0,c.createElement)(p.Button,{isPrimary:!0,className:"wp-block-themeisle-template-library",onClick:()=>ce(!0)},(0,c.createElement)(p.Dashicon,{icon:"category"}),(0,o.__)("Template Library","otter-blocks")),ne&&(0,c.createElement)(V.Z,{clientId:r,close:()=>ce(!1)})))},save:({attributes:e,className:t})=>{const l=e.columnsHTMLTag,o=e.hide?"":`has-desktop-${e.layout}-layout`,a=e.hideTablet?"":`has-tablet-${e.layoutTablet}-layout`,r=e.hideMobile?"":`has-mobile-${e.layoutMobile}-layout`,n=s()(t,`has-${e.columns}-columns`,o,a,r,{"hide-in-desktop":e.hide},{"hide-in-tablet":e.hideTablet},{"hide-in-mobile":e.hideMobile},{"has-reverse-columns-tablet":e.reverseColumnsTablet&&!e.hideTablet&&"collapsedRows"===e.layoutTablet},{"has-reverse-columns-mobile":e.reverseColumnsMobile&&!e.hideMobile&&"collapsedRows"===e.layoutMobile},`has-${e.columnsGap}-gap`,`has-vertical-${e.verticalAlign}`);return(0,c.createElement)(l,{className:n,id:e.id},(0,c.createElement)("div",{className:"wp-block-themeisle-blocks-advanced-columns-overlay"}),(0,c.createElement)(N.Z,{type:"top",front:!0,style:e.dividerTopType,fill:e.dividerTopColor,invert:e.dividerTopInvert}),(0,c.createElement)("div",{className:"innerblocks-wrap"},(0,c.createElement)(u.InnerBlocks.Content,null)),(0,c.createElement)(N.Z,{type:"bottom",front:!0,style:e.dividerBottomType,fill:e.dividerBottomColor,invert:e.dividerBottomInvert}))}})},1430:function(e,t,l){var o=l(9307),a=l(5736),r=l(5609),n=l(4333),c=l(340);const i=({label:e,backgroundType:t,changeBackgroundType:l})=>{const s=`inspector-background-control-${(0,n.useInstanceId)(i)}`;return(0,o.createElement)("div",{id:s,className:"components-base-control wp-block-themeisle-blocks-advanced-columns-background-control"},(0,o.createElement)("div",{className:"components-base-control__field"},(0,o.createElement)("div",{className:"components-base-control__title"},(0,o.createElement)("label",{className:"components-base-control__label"},e),(0,o.createElement)(r.ButtonGroup,{className:"linking-controls"},(0,o.createElement)(r.Button,{icon:"admin-customizer",label:(0,a.__)("Color","otter-blocks"),showTooltip:!0,isPrimary:"color"===t,onClick:()=>l("color")}),(0,o.createElement)(r.Button,{icon:"format-image",label:(0,a.__)("Image","otter-blocks"),showTooltip:!0,isPrimary:"image"===t,onClick:()=>l("image")}),(0,o.createElement)(r.Button,{icon:()=>(0,o.createElement)(r.Icon,{icon:c.Ew}),label:(0,a.__)("Gradient","otter-blocks"),showTooltip:!0,isPrimary:"gradient"===t,onClick:()=>l("gradient")})))))};t.Z=i},9266:function(e,t,l){var o=l(9307),a=l(4184),r=l.n(a),n=l(5736),c=l(5609),i=l(9818),s=l(6993),d=l(340);t.Z=({label:e,onClick:t,layout:l,layoutTablet:a,layoutMobile:m,columns:b})=>{const u=(0,i.useSelect)((e=>{const{getView:t}=e("themeisle-gutenberg/data"),{__experimentalGetPreviewDeviceType:l}=e("core/edit-post")?e("core/edit-post"):{__experimentalGetPreviewDeviceType:void 0};return l?l():t()}),[]);let p;return"Desktop"===u?p=l:"Tablet"===u?p=a:"Mobile"===u&&(p=m),(0,o.createElement)(s.Z,{label:e,className:"wp-block-themeisle-blocks-advanced-columns-layout-control"},1===b&&(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Single Row","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===p}),onClick:()=>t("equal")},(0,d.Kt)()))||2===b&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Equal","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===p}),onClick:()=>t("equal")},(0,d.nt)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("1:2","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneTwo"===p}),onClick:()=>t("oneTwo")},(0,d.Tt)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("2:1","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoOne"===p}),onClick:()=>t("twoOne")},(0,d.eI)())),("Mobile"==u||"Tablet"==u)&&(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Collapsed Rows","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===p}),onClick:()=>t("collapsedRows")},(0,d.bD)())))||3===b&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Equal","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===p}),onClick:()=>t("equal")},(0,d.Np)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("1:1:2","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneOneTwo"===p}),onClick:()=>t("oneOneTwo")},(0,d.TS)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("2:1:1","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoOneOne"===p}),onClick:()=>t("twoOneOne")},(0,d.Gg)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("1:2:1","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneTwoOne"===p}),onClick:()=>t("oneTwoOne")},(0,d.CK)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("1:3:1","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"oneThreeOne"===p}),onClick:()=>t("oneThreeOne")},(0,d.wM)())),("Mobile"==u||"Tablet"==u)&&(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Collapsed Rows","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===p}),onClick:()=>t("collapsedRows")},(0,d.bD)())))||4===b&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Equal","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===p}),onClick:()=>t("equal")},(0,d.Qd)())),("Mobile"==u||"Tablet"==u)&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Two Column Grid","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoColumnGrid"===p}),onClick:()=>t("twoColumnGrid")},(0,d.y)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Collapsed Rows","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===p}),onClick:()=>t("collapsedRows")},(0,d.y)()))))||5===b&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Equal","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===p}),onClick:()=>t("equal")},(0,d._d)())),("Mobile"==u||"Tablet"==u)&&(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Collapsed Rows","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===p}),onClick:()=>t("collapsedRows")},(0,d.bD)())))||6===b&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Equal","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"equal"===p}),onClick:()=>t("equal")},(0,d.dY)())),("Mobile"==u||"Tablet"==u)&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Two Column Grid","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"twoColumnGrid"===p}),onClick:()=>t("twoColumnGrid")},(0,d.JD)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Three Column Grid","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"threeColumnGrid"===p}),onClick:()=>t("threeColumnGrid")},(0,d.VR)())),(0,o.createElement)(c.Tooltip,{text:(0,n.__)("Collapsed Rows","otter-blocks")},(0,o.createElement)(c.Button,{className:r()("wp-block-themeisle-blocks-advanced-column-layout",{selected:"collapsedRows"===p}),onClick:()=>t("collapsedRows")},(0,d.bD)())))))}},1598:function(e,t,l){l(9307),l(5736),l(5609),l(340),l(5581)},2902:function(e,t,l){var o=l(9307),a=l(4184),r=l.n(a);t.Z=({type:e,front:t,style:l,fill:a,invert:n,width:c,height:i})=>"none"!==l&&(0,o.createElement)("div",{className:r()("wp-block-themeisle-blocks-advanced-columns-separators",e),style:!t&&c?{transform:c?`scaleX( ${c/100} )`:""}:{}},"bigTriangle"===l&&!1===n&&(0,o.createElement)("svg",{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"bottom"===e})},(0,o.createElement)("path",{d:"M0 0 L50 100 L100 0 Z"})),"bigTriangle"===l&&!0===n&&(0,o.createElement)("svg",{id:"bigTriangle",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"top"===e})},(0,o.createElement)("path",{d:"M100, 0l-50, 100l-50, -100l0, 100l100, 0l0, -100Z"})),"rightCurve"===l&&!1===n&&(0,o.createElement)("svg",{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"top"===e})},(0,o.createElement)("path",{d:"M0 100 C 20 0 50 0 100 100 Z"})),"rightCurve"===l&&!0===n&&(0,o.createElement)("svg",{id:"rightCurve",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"top"===e})},(0,o.createElement)("path",{d:"M0 100 C 50 0 70 0 100 100 Z"})),"curve"===l&&(0,o.createElement)("svg",{id:"curve",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"top"===e})},(0,o.createElement)("path",{d:"M0 100 C40 0 60 0 100 100 Z"})),"slant"===l&&!1===n&&(0,o.createElement)("svg",{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"bottom"===e})},(0,o.createElement)("path",{d:"M0 0 L100 100 L100 0 Z"})),"slant"===l&&!0===n&&(0,o.createElement)("svg",{id:"slant",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"bottom"===e})},(0,o.createElement)("path",{d:"M0 0 L0 100 L100 0 Z"})),"cloud"===l&&(0,o.createElement)("svg",{id:"cloud",fill:a,viewBox:"0 0 100 100",width:"100%",height:i?`${i}px`:"100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",className:r()({rotate:"top"===e})},(0,o.createElement)("path",{d:"M-5 100 Q 10 -100 15 100 Z M10 100 Q 20 -20 30 100 M25 100 Q 35 -70 45 100 M40 100 Q 50 -100 60 100 M55 100 Q 65 -20 75 100 M70 100 Q 75 -45 90 100 M85 100 Q 90 -50 95 100 M90 100 Q 95 -25 105 100 Z"})))},1700:function(e,t,l){l(8276),l(5095)},7400:function(e,t){t.Z={1:{equal:["100"]},2:{equal:["50","50"],oneTwo:["33.34","66.66"],twoOne:["66.66","33.34"]},3:{equal:["33.33","33.33","33.33"],oneOneTwo:["25","25","50"],twoOneOne:["50","25","25"],oneTwoOne:["25","50","25"],oneThreeOne:["20","60","20"]},4:{equal:["25","25","25","25"]},5:{equal:["20","20","20","20","20"]},6:{equal:["16.66","16.66","16.66","16.66","16.66","16.66"]}}},395:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9307),c=l(5609),i=l(8423),s=l.n(i),d=l(4184),m=l.n(d),b=l(2175),u={facebook:{label:(0,o.__)("Facebook","otter-blocks"),icon:"facebook-f"},twitter:{label:(0,o.__)("Twitter","otter-blocks"),icon:"twitter"},linkedin:{label:(0,o.__)("Linkedin","otter-blocks"),icon:"linkedin-in"},pinterest:{label:(0,o.__)("Pinterest","otter-blocks"),icon:"pinterest-p"},tumblr:{label:(0,o.__)("Tumblr","otter-blocks"),icon:"tumblr"},reddit:{label:(0,o.__)("Reddit","otter-blocks"),icon:"reddit-alien"}},p=({icon:e})=>"facebook"===e?(0,n.createElement)(c.SVG,{className:"otter-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 264 512"},(0,n.createElement)(c.Path,{fill:"currentColor",d:"M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"})):"twitter"===e?(0,n.createElement)(c.SVG,{className:"otter-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,n.createElement)(c.Path,{fill:"currentColor",d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"})):"linkedin"===e?(0,n.createElement)(c.SVG,{className:"otter-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},(0,n.createElement)(c.Path,{fill:"currentColor",d:"M100.3 480H7.4V180.9h92.9V480zM53.8 140.1C24.1 140.1 0 115.5 0 85.8 0 56.1 24.1 32 53.8 32c29.7 0 53.8 24.1 53.8 53.8 0 29.7-24.1 54.3-53.8 54.3zM448 480h-92.7V334.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V480h-92.8V180.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V480z"})):"pinterest"===e?(0,n.createElement)(c.SVG,{className:"otter-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},(0,n.createElement)(c.Path,{fill:"currentColor",d:"M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z"})):"tumblr"===e?(0,n.createElement)(c.SVG,{className:"otter-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},(0,n.createElement)(c.Path,{fill:"currentColor",d:"M309.8 480.3c-13.6 14.5-50 31.7-97.4 31.7-120.8 0-147-88.8-147-140.6v-144H17.9c-5.5 0-10-4.5-10-10v-68c0-7.2 4.5-13.6 11.3-16 62-21.8 81.5-76 84.3-117.1.8-11 6.5-16.3 16.1-16.3h70.9c5.5 0 10 4.5 10 10v115.2h83c5.5 0 10 4.4 10 9.9v81.7c0 5.5-4.5 10-10 10h-83.4V360c0 34.2 23.7 53.6 68 35.8 4.8-1.9 9-3.2 12.7-2.2 3.5.9 5.8 3.4 7.4 7.9l22 64.3c1.8 5 3.3 10.6-.4 14.5z"})):"reddit"===e?(0,n.createElement)(c.SVG,{className:"otter-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,n.createElement)(c.Path,{fill:"currentColor",d:"M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 17.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z"})):(0,n.createElement)(c.SVG,{className:"otter-toolbar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,n.createElement)(c.Path,{fill:"currentColor",d:"M208 88.286c0-10 6.286-21.714 17.715-21.714 11.142 0 17.714 11.714 17.714 21.714 0 10.285-6.572 21.714-17.714 21.714C214.286 110 208 98.571 208 88.286zm304 160c0 36.001-11.429 102.286-36.286 129.714-22.858 24.858-87.428 61.143-120.857 70.572l-1.143.286v32.571c0 16.286-12.572 30.571-29.143 30.571-10 0-19.429-5.714-24.572-14.286-5.427 8.572-14.856 14.286-24.856 14.286-10 0-19.429-5.714-24.858-14.286-5.142 8.572-14.571 14.286-24.57 14.286-10.286 0-19.429-5.714-24.858-14.286-5.143 8.572-14.571 14.286-24.571 14.286-18.857 0-29.429-15.714-29.429-32.857-16.286 12.285-35.715 19.428-56.571 19.428-22 0-43.429-8.285-60.286-22.857 10.285-.286 20.571-2.286 30.285-5.714-20.857-5.714-39.428-18.857-52-36.286 21.37 4.645 46.209 1.673 67.143-11.143-22-22-56.571-58.857-68.572-87.428C1.143 321.714 0 303.714 0 289.429c0-49.714 20.286-160 86.286-160 10.571 0 18.857 4.858 23.143 14.857a158.792 158.792 0 0 1 12-15.428c2-2.572 5.714-5.429 7.143-8.286 7.999-12.571 11.714-21.142 21.714-34C182.571 45.428 232 17.143 285.143 17.143c6 0 12 .285 17.714 1.143C313.714 6.571 328.857 0 344.572 0c14.571 0 29.714 6 40 16.286.857.858 1.428 2.286 1.428 3.428 0 3.714-10.285 13.429-12.857 16.286 4.286 1.429 15.714 6.858 15.714 12 0 2.857-2.857 5.143-4.571 7.143 31.429 27.714 49.429 67.143 56.286 108 4.286-5.143 10.285-8.572 17.143-8.572 10.571 0 20.857 7.144 28.571 14.001C507.143 187.143 512 221.714 512 248.286zM188 89.428c0 18.286 12.571 37.143 32.286 37.143 19.714 0 32.285-18.857 32.285-37.143 0-18-12.571-36.857-32.285-36.857-19.715 0-32.286 18.858-32.286 36.857zM237.714 194c0-19.714 3.714-39.143 8.571-58.286-52.039 79.534-13.531 184.571 68.858 184.571 21.428 0 42.571-7.714 60-20 2-7.429 3.714-14.857 3.714-22.572 0-14.286-6.286-21.428-20.572-21.428-4.571 0-9.143.857-13.429 1.714-63.343 12.668-107.142 3.669-107.142-63.999zm-41.142 254.858c0-11.143-8.858-20.857-20.286-20.857-11.429 0-20 9.715-20 20.857v32.571c0 11.143 8.571 21.142 20 21.142 11.428 0 20.286-9.715 20.286-21.142v-32.571zm49.143 0c0-11.143-8.572-20.857-20-20.857-11.429 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.857 21.142 20.286 21.142 11.428 0 20-10 20-21.142v-32.571zm49.713 0c0-11.143-8.857-20.857-20.285-20.857-11.429 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.857 21.142 20.286 21.142 11.428 0 20.285-9.715 20.285-21.142v-32.571zm49.715 0c0-11.143-8.857-20.857-20.286-20.857-11.428 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.858 21.142 20.286 21.142 11.429 0 20.286-10 20.286-21.142v-32.571zM421.714 286c-30.857 59.142-90.285 102.572-158.571 102.572-96.571 0-160.571-84.572-160.571-176.572 0-16.857 2-33.429 6-49.714-20 33.715-29.714 72.572-29.714 111.429 0 60.286 24.857 121.715 71.429 160.857 5.143-9.714 14.857-16.286 26-16.286 10 0 19.428 5.714 24.571 14.286 5.429-8.571 14.571-14.286 24.858-14.286 10 0 19.428 5.714 24.571 14.286 5.429-8.571 14.857-14.286 24.858-14.286 10 0 19.428 5.714 24.857 14.286 5.143-8.571 14.571-14.286 24.572-14.286 10.857 0 20.857 6.572 25.714 16 43.427-36.286 68.569-92 71.426-148.286zm10.572-99.714c0-53.714-34.571-105.714-92.572-105.714-30.285 0-58.571 15.143-78.857 36.857C240.862 183.812 233.41 254 302.286 254c28.805 0 97.357-28.538 84.286 36.857 28.857-26 45.714-65.714 45.714-104.571z"})),g=({attributes:e,setAttributes:t})=>(0,n.createElement)(b.BlockControls,null,(0,n.createElement)(c.ToolbarGroup,null,Object.keys(u).map((l=>{const a=e[l];return(0,n.createElement)(c.Tooltip,{key:l.label
73
+ /* translators: %s Social Website */,text:(0,o.sprintf)((0,o.__)("Display %s","otter-blocks"),u[l].label)},(0,n.createElement)(c.Button,{className:m()("components-button","wp-block-themeisle-toolbar",{"is-active":a}),onClick:()=>(l=>{t({[l]:!e[l]})})(l)},(0,n.createElement)(p,{icon:l})))}))));(0,a.registerBlockType)("themeisle-blocks/sharing-icons",{title:(0,o.__)("Sharing Icons","otter-blocks"),description:(0,o.__)("Share buttons for your website visitors to share content on any social sharing service.","otter-blocks"),icon:r.c4,category:"themeisle-blocks",keywords:["social media","sharing","icons"],attributes:{facebook:{type:"boolean",default:!0},twitter:{type:"boolean",default:!0},linkedin:{type:"boolean",default:!0},pinterest:{type:"boolean",default:!1},tumblr:{type:"boolean",default:!1},reddit:{type:"boolean",default:!1}},supports:{align:["left","center","right"]},styles:[{name:"default",label:(0,o.__)("Regular","otter-blocks"),isDefault:!0},{name:"icons",label:(0,o.__)("Icons Only","otter-blocks")}],edit:({attributes:e,setAttributes:t})=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(g,{attributes:e,setAttributes:t}),(0,n.createElement)(c.Disabled,null,(0,n.createElement)(s(),{block:"themeisle-blocks/sharing-icons",attributes:{...e}}))),save:()=>null})},9738:function(e,t,l){var o=l(5736),a=l(4981),r={id:{type:"string"},images:{type:"array",default:[],source:"query",selector:".wp-block-themeisle-blocks-slider-item-wrapper",query:{id:{type:"number",source:"attribute",selector:"img",attribute:"data-id"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption",default:""}}},perView:{type:"number",default:1},gap:{type:"number",default:0},peek:{type:"number",default:0},autoplay:{type:"boolean",default:!0},delay:{type:"number",default:2},hideArrows:{type:"boolean",default:!1},hideBullets:{type:"boolean",default:!1},height:{type:"number",default:400}},n=l(9307),c=l(4184),i=l.n(c),s=l(2819),d=l(2175),m=l(5609);const b=({attributes:e})=>(0,n.createElement)(n.Fragment,null,!e.hideArrows&&(0,n.createElement)("div",{className:"glide__arrows","data-glide-el":"controls"},(0,n.createElement)("button",{className:"glide__arrow glide__arrow--left","data-glide-dir":"<"},(0,n.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 100 100"},(0,n.createElement)(m.Path,{d:"M 10,50 L 60,100 L 70,90 L 30,50 L 70,10 L 60,0 Z"}))),(0,n.createElement)("button",{className:"glide__arrow glide__arrow--right","data-glide-dir":">"},(0,n.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 100 100"},(0,n.createElement)(m.Path,{d:"M 10,50 L 60,100 L 70,90 L 30,50 L 70,10 L 60,0 Z"}))))),u=({attributes:e})=>(0,n.createElement)(n.Fragment,null,!e.hideBullets&&(0,n.createElement)("div",{className:"glide__bullets","data-glide-el":"controls[nav]"},e.images.map(((e,t)=>(0,n.createElement)("button",{key:e.id,className:"glide__bullet","data-glide-dir":`=${t}`})))));var p=({attributes:e})=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(b,{attributes:e}),(0,n.createElement)(u,{attributes:e}));const g={id:{type:"string"},align:{type:"string"},images:{type:"array",default:[],source:"query",selector:".wp-block-themeisle-blocks-slider-item-wrapper",query:{id:{type:"number",source:"attribute",selector:"img",attribute:"data-id"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption",default:""}}},perView:{type:"number",default:1},gap:{type:"number",default:0},peek:{type:"number",default:0},autoplay:{type:"boolean",default:!0},height:{type:"number",default:400}};var h=[{attributes:{...(0,s.omit)(g,["align"])},supports:{align:["wide","full"]},save:({attributes:e,className:t})=>(0,n.createElement)("div",{id:e.id,className:i()("wp-block-themeisle-blocks-slider","glide",t),"data-per-view":e.perView,"data-gap":e.gap,"data-peek":e.peek,"data-autoplay":e.autoplay},(0,n.createElement)("div",{className:"glide__track","data-glide-el":"track"},(0,n.createElement)("div",{className:"glide__slides",style:{height:`${e.height}px`}},e.images.map((e=>(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-slider-item-wrapper glide__slide",tabIndex:"0"},(0,n.createElement)("figure",null,(0,n.createElement)("img",{key:e.id,className:"wp-block-themeisle-blocks-slider-item",src:e.url,alt:e.alt,title:e.alt,"data-id":e.id}),!d.RichText.isEmpty(e.caption)&&(0,n.createElement)(d.RichText.Content,{tagName:"figcaption",value:e.caption})))))),(0,n.createElement)(p,{attributes:e})))},{attributes:{...(0,s.omit)(g,["align"]),delay:{type:"number",default:2},hideArrows:{type:"boolean",default:!1},hideBullets:{type:"boolean",default:!1}},supports:{align:["wide","full"]},save:({attributes:e,className:t})=>{const l=e.autoplay&&2!==e.delay?1e3*e.delay:e.autoplay;return(0,n.createElement)("div",{id:e.id,className:i()("wp-block-themeisle-blocks-slider","glide",t),"data-per-view":e.perView,"data-gap":e.gap,"data-peek":e.peek,"data-autoplay":l,"data-height":`${e.height}px`},(0,n.createElement)("div",{className:"glide__track","data-glide-el":"track"},(0,n.createElement)("div",{className:"glide__slides"},e.images.map((e=>(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-slider-item-wrapper glide__slide",tabIndex:"0"},(0,n.createElement)("figure",null,(0,n.createElement)("img",{key:e.id,className:"wp-block-themeisle-blocks-slider-item",src:e.url,alt:e.alt,title:e.alt,"data-id":e.id}),!d.RichText.isEmpty(e.caption)&&(0,n.createElement)(d.RichText.Content,{tagName:"figcaption",value:e.caption})))))),(0,n.createElement)(p,{attributes:e})))}}];var k={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t}=e[0];t=(0,s.every)(e,["align",t])?t:void 0;const l=(0,s.filter)(e,(({url:e})=>e));return(0,a.createBlock)("themeisle-blocks/slider",{images:l.map((({id:e,url:t,alt:l,caption:o})=>({id:e,url:t,alt:l,caption:o}))),align:t})}},{type:"block",blocks:["core/gallery"],transform:({images:e,align:t})=>(0,a.createBlock)("themeisle-blocks/slider",{images:e.map((({id:e,url:t,alt:l,caption:o})=>({id:e,url:t,alt:l,caption:o}))),align:t})}],to:[{type:"block",blocks:["core/image"],transform:({images:e,align:t})=>0<e.length?e.map((({id:e,url:l,alt:o,caption:r})=>(0,a.createBlock)("core/image",{id:e,url:l,alt:o,caption:r,align:t}))):(0,a.createBlock)("core/image",{align:t})},{type:"block",blocks:["core/gallery"],transform:({images:e,align:t})=>(0,a.createBlock)("core/gallery",{images:e.map((({id:e,url:t,alt:l,caption:o})=>({id:e,url:t,alt:l,caption:o}))),align:t})}]},v=({labels:e,icon:t,isAppender:l=!1,value:o={},onSelectImages:a})=>{const r=(0,s.debounce)(a,250);return(0,n.createElement)(d.MediaPlaceholder,{labels:e,icon:t,accept:"image/*",allowedTypes:["image"],isAppender:l,className:"wp-block-themeisle-blocks-slider-uploader",value:o,onSelect:r,multiple:!0})},y=l(2285),_=({attributes:e,setAttributes:t,slider:l,changePerView:a,onSelectImages:r})=>(0,n.createElement)(d.InspectorControls,null,(0,n.createElement)(m.PanelBody,{title:(0,o.__)("Images","otter-blocks"),initialOpen:!1},(0,n.createElement)(y.Z,{attributes:e,onSelectImages:r})),(0,n.createElement)(m.PanelBody,{title:(0,o.__)("Settings","otter-blocks")},e.images.length&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(m.RangeControl,{label:(0,o.__)("Slides Per Page","otter-blocks"),help:(0,o.__)("A number of visible slides.","otter-blocks"),value:e.perView,onChange:a,min:1,max:(0,s.max)([Math.round(e.images.length/2),1])}),1<e.perView&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(m.RangeControl,{label:(0,o.__)("Gap","otter-blocks"),help:(0,o.__)("A size of the space between slides.","otter-blocks"),value:e.gap,onChange:e=>{t({gap:Number(e)}),l.update({gap:Number(e)})},min:0,max:100}),(0,n.createElement)(m.RangeControl,{label:(0,o.__)("Peek","otter-blocks"),help:(0,o.__)("The value of the future slides which have to be visible in the current slide.","otter-blocks"),value:e.peek,onChange:e=>{t({peek:Number(e)}),l.update({peek:Number(e)})},min:0,max:100})),(0,n.createElement)(m.RangeControl,{label:(0,o.__)("Height","otter-blocks"),help:(0,o.__)("Slider height in pixels.","otter-blocks"),value:e.height,onChange:e=>{t({height:Number(e)})},min:100,max:1400}),(0,n.createElement)(m.ToggleControl,{label:(0,o.__)("Autoplay","otter-blocks"),help:(0,o.__)("Autoplay slider in the front.","otter-blocks"),checked:e.autoplay,onChange:e=>{t({autoplay:e})}}),e.autoplay&&(0,n.createElement)(m.RangeControl,{label:(0,o.__)("Delay","otter-blocks"),help:(0,o.__)("Delay in slide change (in seconds).","otter-blocks"),value:e.delay,onChange:e=>{t({delay:e})},min:1,max:10}),(0,n.createElement)(m.ToggleControl,{label:(0,o.__)("Hide Arrows","otter-blocks"),help:(0,o.__)("Hide navigation arrows.","otter-blocks"),checked:e.hideArrows,onChange:e=>{t({hideArrows:e})}}),(0,n.createElement)(m.ToggleControl,{label:(0,o.__)("Hide Bullets","otter-blocks"),help:(0,o.__)("Hide navigation bullets.","otter-blocks"),checked:e.hideBullets,onChange:e=>{t({hideBullets:e})}})))),w=l(1984),f=l(4310),C=l(5024),E=l(7231),T=({images:e,image:t,index:l,isFirstItem:a,isLastItem:r,isSelected:c,setAttributes:b,setSelectedImage:u})=>{const p=(t,l)=>{const o=[...e];o.splice(l,1,e[t]),o.splice(t,1,e[l]),u(l),b({images:o})};return(0,n.createElement)("div",{className:i()("wp-block-themeisle-blocks-slider-item-wrapper glide__slide",{"is-selected":c}),tabIndex:"0",onClick:()=>u(t.id),onFocus:()=>u(t.id)},(0,n.createElement)("figure",null,(0,n.createElement)("img",{key:t.id,className:"wp-block-themeisle-blocks-slider-item",src:t.url,alt:t.alt,title:t.alt,"data-id":t.id}),c&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-slider-item-move-menu"},(0,n.createElement)(m.Button,{icon:(0,n.createElement)(w.Z,{icon:f.Z}),label:(0,o.__)("Move image backward","otter-blocks"),showTooltip:!0,onClick:a?void 0:()=>{0!==l&&p(l,l-1)},className:"wp-block-themeisle-blocks-slider-item-move-backward","aria-disabled":a,disabled:!c}),(0,n.createElement)(m.Button,{icon:(0,n.createElement)(w.Z,{icon:C.Z}),label:(0,o.__)("Move image forward","otter-blocks"),showTooltip:!0,onClick:r?void 0:()=>{l!==e.length-1&&p(l,l+1)},className:"wp-block-themeisle-blocks-slider-item-move-forward","aria-disabled":r,disabled:!c})),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-slider-item-delete-menu"},(0,n.createElement)(m.Button,{icon:(0,n.createElement)(w.Z,{icon:E.Z}),label:(0,o.__)("Remove image","otter-blocks"),showTooltip:!0,onClick:()=>{const t=(0,s.filter)(e,((e,t)=>l!==t));u(null),b({images:t})},className:"wp-block-themeisle-blocks-slider-item-delete"}))),(c||!d.RichText.isEmpty(t.caption))&&(0,n.createElement)(d.RichText,{tagName:"figcaption",placeholder:c?(0,o.__)("Write caption…","otter-blocks"):null,value:t.caption,onChange:t=>{const o=[...e];o[l].caption=t,b({images:o})},multiline:!1})))},x=l(5225);(0,a.registerBlockType)("themeisle-blocks/slider",{title:(0,o.__)("Slider","otter-blocks"),description:(0,o.__)("Minimal image slider to showcase beautiful images.","otter-blocks"),icon:"images-alt2",category:"themeisle-blocks",keywords:["slider","gallery","carousel"],attributes:r,deprecated:h,transforms:k,supports:{align:["wide","full"]},edit:({attributes:e,setAttributes:t,className:l,clientId:a,isSelected:c,toggleSelection:d})=>{(0,n.useEffect)((()=>{const t=(0,x.WX)(a,r);return()=>{t(e.id)}}),[e.id]),(0,n.useEffect)((()=>()=>{e.images.length&&b.current.destroy()}),[]),(0,n.useEffect)((()=>{e.images.length&&(h(null),null!==b.current&&(b.current.destroy(),k()))}),[c,e.align]),(0,n.useEffect)((()=>{e.images.length&&e.perView>e.images.length&&w((0,s.max)([Math.round(e.images.length/2),1]))}),[e.images]);const b=(0,n.useRef)(null),u=(0,n.useRef)(null),[g,h]=(0,n.useState)(null),k=()=>{b.current=new window.Glide(`#${e.id||u.current}`,{type:"carousel",keyboard:!1,perView:e.perView,gap:e.gap,peek:e.peek,autoplay:!1,breakpoints:{800:{perView:1,peek:0,gap:0}}}).mount()},y=e=>{t({images:e.map((e=>({id:e.id,url:e.url,alt:e.alt,caption:e.caption})))}),null!==b.current&&b.current.destroy(),k()},w=e=>{t({perView:Number(e)}),b.current.update({perView:Number(e)}),1===e&&(t({gap:0,peek:0}),b.current.update({gap:0,peek:0}))};return Array.isArray(e.images)&&!e.images.length?(0,n.createElement)(v,{labels:{title:(0,o.__)("Slider","otter-blocks"),instructions:(0,o.__)("Drag images, upload new ones or select files from your library.","otter-blocks")},icon:"images-alt2",onSelectImages:y}):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(_,{attributes:e,setAttributes:t,slider:b.current,changePerView:w,onSelectImages:y}),(0,n.createElement)(m.ResizableBox,{size:{height:e.height},enable:{top:!1,right:!1,bottom:!0,left:!1},minHeight:100,maxHeight:1400,onResizeStart:()=>{d(!1)},onResizeStop:(l,o,a,r)=>{t({height:parseInt(e.height+r.height,10)}),d(!0)},className:i()("wp-block-themeisle-blocks-slider-resizer",{"is-focused":c})},(0,n.createElement)("div",{id:e.id,className:i()("wp-block-themeisle-blocks-slider","glide",l)},(0,n.createElement)("div",{className:"glide__track","data-glide-el":"track"},(0,n.createElement)("div",{className:"glide__slides",style:{height:`${e.height}px`}},e.images.map(((l,o)=>(0,n.createElement)(T,{key:l.url,images:e.images,image:l,index:o,isFirstItem:0===o,isLastItem:o+1===e.images.length,isSelected:c&&l.id===g,setAttributes:t,setSelectedImage:h})))),(0,n.createElement)(p,{attributes:e})))),c&&(0,n.createElement)(v,{labels:{title:"",instructions:""},icon:null,onSelectImages:y,isAppender:!0,value:e.images}))},save:({attributes:e,className:t})=>{const l=e.autoplay&&2!==e.delay?1e3*e.delay:e.autoplay;return(0,n.createElement)("div",{id:e.id,className:i()("wp-block-themeisle-blocks-slider","glide",t),"data-per-view":e.perView,"data-gap":e.gap,"data-peek":e.peek,"data-autoplay":l,"data-height":`${e.height}px`,"data-hide-arrows":e.hideArrows},(0,n.createElement)("div",{className:"glide__track","data-glide-el":"track"},(0,n.createElement)("div",{className:"glide__slides"},e.images.map((e=>(0,n.createElement)("div",{key:e.id,className:"wp-block-themeisle-blocks-slider-item-wrapper glide__slide",tabIndex:"0"},(0,n.createElement)("figure",null,(0,n.createElement)("img",{className:"wp-block-themeisle-blocks-slider-item",src:e.url,alt:e.alt,title:e.alt,"data-id":e.id}),!d.RichText.isEmpty(e.caption)&&(0,n.createElement)(d.RichText.Content,{tagName:"figcaption",value:e.caption})))))),(0,n.createElement)(u,{attributes:e})))}})},4925:function(e,t,l){l(8344),l(7585),l(8726)},8344:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9307),c=l(2175);const i=[["themeisle-blocks/advanced-heading",{content:(0,o.__)("Basic","otter-blocks"),align:"center",tag:"h3",fontSize:24}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("$9.99","otter-blocks"),align:"center",tag:"h4",fontSize:36,fontFamily:"Roboto Slab",fontVariant:"normal"}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Per Month","otter-blocks"),align:"center",tag:"p",fontSize:12,marginBottom:0}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("First Feature","otter-blocks"),align:"center",tag:"p",fontSize:12,marginBottom:0}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Second Feature","otter-blocks"),align:"center",tag:"p",fontSize:12,marginBottom:0}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Last Feature","otter-blocks"),align:"center",tag:"p",fontSize:12,marginBottom:0}],["themeisle-blocks/button-group",{align:"center",buttons:1,data:[{text:(0,o.__)("Buy Now","otter-blocks"),newTab:!1,color:"#ffffff",background:"#32373c",hoverColor:"#ffffff",hoverBackground:"#444a50",borderSize:0,borderRadius:3,boxShadow:!1,boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",paddingTopBottom:12,paddingLeftRight:24}]}]];(0,a.registerBlockType)("themeisle-blocks/pricing",{title:(0,o.__)("Pricing","otter-blocks"),description:(0,o.__)("Pricing tables are a critical part in showcasing your services, prices and overall offerings.","otter-blocks"),icon:r.S3,category:"themeisle-blocks",keywords:["pricing","table","money"],edit:({className:e})=>(0,n.createElement)("div",{className:e},(0,n.createElement)(c.InnerBlocks,{template:i})),save:({className:e})=>(0,n.createElement)("div",{className:e},(0,n.createElement)(c.InnerBlocks.Content,null))})},7585:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9307),c=l(2175);const i=[["themeisle-blocks/font-awesome-icons",{fontSize:62,prefix:"fab",icon:"angellist"}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Basic","otter-blocks"),align:"center",tag:"h4",marginBottom:20}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Lorem ipsum dolor sit amet elit do, consectetur adipiscing, sed eiusmod tempor incididunt ut labore et dolore magna aliqua.","otter-blocks"),align:"center",color:"#999999",tag:"p",fontSize:14,marginBottom:20}],["themeisle-blocks/button-group",{align:"center",buttons:1,data:[{text:(0,o.__)("Know More","otter-blocks"),newTab:!1,color:"#ffffff",background:"#32373c",hoverColor:"#ffffff",hoverBackground:"#444a50",borderSize:0,borderRadius:3,boxShadow:!1,boxShadowColorOpacity:50,boxShadowBlur:5,boxShadowSpread:1,boxShadowHorizontal:0,boxShadowVertical:0,hoverBoxShadowColorOpacity:50,hoverBoxShadowBlur:5,hoverBoxShadowSpread:1,hoverBoxShadowHorizontal:0,hoverBoxShadowVertical:0,iconType:"none",paddingTopBottom:12,paddingLeftRight:24}]}]];(0,a.registerBlockType)("themeisle-blocks/service",{title:(0,o.__)("Service","otter-blocks"),description:(0,o.__)("Use this Service block to showcase services your website offers.","otter-blocks"),icon:r.M7,category:"themeisle-blocks",keywords:["services","icon","features"],edit:({className:e})=>(0,n.createElement)("div",{className:e},(0,n.createElement)(c.InnerBlocks,{template:i})),save:({className:e})=>(0,n.createElement)("div",{className:e},(0,n.createElement)(c.InnerBlocks.Content,null))})},8726:function(e,t,l){var o=l(5736),a=l(4981),r=l(340),n=l(9307),c=l(2175);const i=[["core/image",{align:"center"}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("John Doe","otter-blocks"),align:"center",fontSize:24,tag:"h3",marginTop:25,marginBottom:10,marginTopTablet:25,marginTopMobile:25}],["themeisle-blocks/advanced-heading",{content:(0,o.__)("Jedi Master","otter-blocks"),align:"center",fontSize:14,tag:"h4",marginTop:10,marginBottom:10}],["themeisle-blocks/advanced-heading",{content:(0,o.__)('"What is the point of being alive if you don’t at least try to do something remarkable?"',"otter-blocks"),align:"center",color:"#999999",tag:"p",fontSize:14,marginTop:10,marginBottom:20}]];(0,a.registerBlockType)("themeisle-blocks/testimonials",{title:(0,o.__)("Testimonials","otter-blocks"),description:(0,o.__)("Display kudos from customers and clients and display them on your website.","otter-blocks"),icon:r.U8,category:"themeisle-blocks",keywords:["testimonials","quotes","business"],edit:({className:e})=>(0,n.createElement)("div",{className:e},(0,n.createElement)(c.InnerBlocks,{template:i})),save:({className:e})=>(0,n.createElement)("div",{className:e},(0,n.createElement)(c.InnerBlocks.Content,null))})},2066:function(e,t,l){var o=l(2553),a=l(5736),r=l(4981),n=l(9307),c=l(5117),i=l(4184),s=l.n(i),d=l(1216),m=l(2175),b=l(5609),u=l(9818),p=l(1286);const g=(0,p.W6)((()=>(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-inspector-tab-option__drag",tabIndex:"0"},(0,n.createElement)("span",null)))),h=(0,p.W8)((({tab:e,deleteTab:t,selectTab:l})=>(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-inspector-tab-option"},(0,n.createElement)(g,null),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-inspector-tab-option__name"},e.attributes.title||(0,a.__)("Untitled Tab","otter-blocks")),(0,n.createElement)(b.Button,{icon:"edit",label:(0,a.__)("Edit Tab","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-tabs-inspector-tab-option__actions",onClick:()=>l(e.clientId)}),(0,n.createElement)(b.Button,{icon:"no-alt",label:(0,a.__)("Remove Tab","otter-blocks"),showTooltip:!0,className:"wp-block-themeisle-blocks-tabs-inspector-tab-option__actions",onClick:()=>t(e.clientId)}))));var k=({attributes:e,setAttributes:t,children:l,deleteTab:o,selectTab:r,addTab:c,moveTab:i})=>{const s=(0,p.JN)((({items:e})=>(0,n.createElement)("div",null,e.map(((e,t)=>(0,n.createElement)(h,{key:e.clientId,tab:e,index:t,deleteTab:o,selectTab:r}))))));return(0,n.createElement)(m.InspectorControls,null,(0,n.createElement)(b.PanelBody,{title:(0,a.__)("Tabs Management","otter-blocks")},(0,n.createElement)("p",null,(0,a.__)("Press and hold to use drag and drop to sort the tabs","otter-blocks")),0<(null==l?void 0:l.length)&&(0,n.createElement)(s,{items:l,onSortEnd:({oldIndex:e,newIndex:t})=>{i(l[e].clientId,t)},useDragHandle:!0,axis:"y",lockAxis:"y"}),(0,n.createElement)(b.Button,{isSecondary:!0,className:"wp-block-themeisle-blocks-tabs-inspector-add-tab",onClick:c},(0,a.__)("Add Tab","otter-blocks"))),(0,n.createElement)(b.PanelBody,{title:(0,a.__)("Settings","otter-blocks"),initialOpen:!1},(0,n.createElement)(b.RangeControl,{label:(0,a.__)("Border Width","otter-blocks"),value:e.borderWidth,onChange:e=>{t({borderWidth:Number(e)})},min:0,max:5})),(0,n.createElement)(m.PanelColorSettings,{title:(0,a.__)("Color","otter-blocks"),initialOpen:!1,colorSettings:[{value:e.activeTitleColor,onChange:e=>{t({activeTitleColor:e})},label:(0,a.__)("Active Title Color","otter-blocks")},{value:e.tabColor,onChange:e=>{t({tabColor:e})},label:(0,a.__)("Background","otter-blocks")},{value:e.borderColor,onChange:e=>{t({borderColor:e})},label:(0,a.__)("Border Color","otter-blocks")}]},(0,n.createElement)(m.ContrastChecker,{textColor:e.activeTitleColor,backgroundColor:e.tabColor})))},v=l(4688),y=l(4310),_=l(5024),w=({children:e,selectedTab:t,moveTab:l,selectTab:o})=>{const r=null==e?void 0:e.findIndex((({clientId:e})=>e===t)),c=e=>{switch(e){case"left":l(t,r-1);break;case"right":l(t,r+1)}};return(0,n.createElement)(m.BlockControls,null,(0,n.createElement)(b.ToolbarGroup,{label:(0,a.__)("Edit","otter-blocks")},(0,n.createElement)(b.ToolbarButton,{label:(0,a.__)("Edit tab","otter-blocks"),icon:v.Z,iconSize:24,className:"wp-block-themeisle-blocks-tabs-toolbar-edit",onClick:()=>o(t)})),(0,n.createElement)(b.ToolbarGroup,{label:(0,a.__)("Movement","otter-blocks")},(0,n.createElement)(b.ToolbarButton,{label:(0,a.__)("Move tab left","otter-blocks"),icon:y.Z,iconSize:24,disabled:0===r,className:"wp-block-themeisle-blocks-tabs-toolbar-mover",onClick:()=>c("left")}),(0,n.createElement)(b.ToolbarButton,{label:(0,a.__)("Move tab right","otter-blocks"),icon:_.Z,iconSize:24,disabled:(null==e?void 0:e.length)-1===r,className:"wp-block-themeisle-blocks-tabs-toolbar-mover",onClick:()=>c("right")})))},f=l(5225),C={id:{type:"string"},tabColor:{type:"string"},borderColor:{type:"string"},borderWidth:{type:"number"},activeTitleColor:{type:"string"}};(0,r.registerBlockType)("themeisle-blocks/tabs",{title:(0,a.__)("Tabs","otter-blocks"),description:(0,a.__)("Organize and allow navigation between groups of content with Tabs block.","otter-blocks"),icon:o.Z,category:"themeisle-blocks",keywords:["media","tabs","select"],attributes:C,supports:{align:["left","center","right"]},edit:({attributes:e,setAttributes:t,className:l,isSelected:o,clientId:i})=>{(0,n.useEffect)((()=>{const t=(0,f.WX)(i,C);return()=>t(e.id)}),[e.id]);const p=(0,n.useRef)(null),[g,h]=(0,n.useState)(""),v=(0,u.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t(i).innerBlocks})),{insertBlock:y,removeBlock:_,selectBlock:E,moveBlockToPosition:T}=(0,u.useDispatch)("core/block-editor"),x=e=>{p.current&&(v.forEach((t=>{const l=p.current.querySelector(`#block-${t.clientId} .wp-block-themeisle-blocks-tabs-item__content`);null==l||l.classList.toggle("active",t.clientId===e)})),h(e))};(0,n.useEffect)((()=>{0<(null==v?void 0:v.length)&&(""!==g&&0!==(null==v?void 0:v.filter((e=>e.clientId===g)).length)||x(v[0].clientId))}),[g,v]);const M=e=>{if(0<(null==v?void 0:v.length)){const t=v.filter((t=>t.clientId===e))[0];E(t.clientId)}},S=(e,t)=>{var l;const o=null===(l=v.filter((t=>t.clientId===e))[0])||void 0===l?void 0:l.clientId;o&&T(o,i,i,t)},B=()=>{const e=(0,r.createBlock)("themeisle-blocks/tabs-item");y(e,(null==v?void 0:v.length)||0,i,!1)},z=d.iv`
74
  .wp-block-themeisle-blocks-tabs__header_item.active {
75
  background-color: ${e.tabColor};
76
  }
100
  width: 30px;
101
  height: 30px;
102
  align-items: center;
103
+ `,R=({title:e,onClick:t,active:l})=>(0,d.tZ)("div",{className:s()("wp-block-themeisle-blocks-tabs__header_item",{active:l})},(0,d.tZ)("div",{onClick:t},e));return(0,d.tZ)(n.Fragment,null,(0,d.tZ)(w,{children:v,setAttributes:t,selectedTab:g,selectTab:M,moveTab:S}),(0,d.tZ)(k,{attributes:e,setAttributes:t,children:v,deleteTab:e=>{if(0<(null==v?void 0:v.length)){const t=v.filter((t=>t.clientId===e))[0];_(t.clientId,!1),g===e&&h("")}},selectTab:M,moveTab:S,addTab:B}),(0,d.tZ)("div",{id:e.id,className:l,style:{borderColor:e.borderColor}},(0,d.tZ)("div",{css:z,className:"wp-block-themeisle-blocks-tabs__header"},(null==v?void 0:v.map((e=>(0,d.tZ)(R,{key:e.clientId,title:e.attributes.title||(0,a.__)("Insert Title","otter-blocks"),active:e.clientId===g,onClick:()=>x(e.clientId)}))))||"",(o||0===v.length)&&(0,d.tZ)((()=>(0,d.tZ)("div",{className:"wp-block-themeisle-blocks-tabs__header_item"},(0,d.tZ)("div",{css:N,onClick:B},(0,d.tZ)(b.Icon,{icon:c.Z})))),null)),(0,d.tZ)("div",{ref:p,className:"wp-block-themeisle-blocks-tabs__content",css:P},(0,d.tZ)(m.InnerBlocks,{allowedBlocks:["themeisle-blocks/tabs-item"],template:[["themeisle-blocks/tabs-item"]],orientation:"horizontal",renderAppender:!1}))))},save:({attributes:e,className:t})=>(0,n.createElement)("div",{id:e.id,className:t},(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-tabs__content"},(0,n.createElement)(m.InnerBlocks.Content,null)))})},1715:function(e,t,l){l(2066),l(8577)},8577:function(e,t,l){var o=l(2553),a=l(5736),r=l(4981),n=l(9307),c=l(4184),i=l.n(c),s=l(2175),d=l(9818),m=l(5609),b=({setAttributes:e,selectParent:t})=>(0,n.createElement)(s.InspectorControls,null,(0,n.createElement)(m.PanelBody,{title:(0,a.__)("Settings","otter-blocks")},(0,n.createElement)(m.Button,{isSecondary:!0,onClick:()=>t()},(0,a.__)("Back to the Tabs","otter-blocks")),(0,n.createElement)(m.TextControl,{type:"text",label:(0,a.__)("Title","otter-blocks"),placeholder:(0,a.__)("Insert a title","otter-blocks"),onChange:t=>{e({title:t})}})));(0,r.registerBlockType)("themeisle-blocks/tabs-item",{title:(0,a.__)("Tab Item","otter-blocks"),description:(0,a.__)("Organize and allow navigation between groups of content with Tabs block.","otter-blocks"),icon:o.Z,category:"themeisle-blocks",keywords:["media","tab","item"],attributes:{title:{type:"string"}},parent:["themeisle-blocks/tabs"],edit:({attributes:e,setAttributes:t,className:l,clientId:o})=>{const r=(0,n.useRef)(null),{parentClientId:c,isFirstBlock:m}=(0,d.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:l}=e("core/block-editor"),a=t(l(o));return{parentClientId:a.clientId,isFirstBlock:o===a.innerBlocks[0].clientId}})),{selectBlock:u}=(0,d.useDispatch)("core/block-editor");return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(b,{setAttributes:t,selectParent:()=>u(c)}),(0,n.createElement)("div",{className:l,ref:r},(0,n.createElement)(s.RichText,{placeholder:(0,a.__)("Add title…","otter-blocks"),value:e.title,onChange:e=>t({title:e}),className:i()("wp-block-themeisle-blocks-tabs-item__header",{active:m}),tagName:"div",onClick:()=>{const e=document.querySelectorAll(`#block-${c} .wp-block-themeisle-blocks-tabs__content .wp-block-themeisle-blocks-tabs-item`);var t,l;e&&e.forEach((e=>{var t,l;null===(t=e.querySelector(".wp-block-themeisle-blocks-tabs-item__header"))||void 0===t||t.classList.remove("active"),null===(l=e.querySelector(".wp-block-themeisle-blocks-tabs-item__content"))||void 0===l||l.classList.remove("active")})),r.current&&(null===(t=r.current.querySelector(".wp-block-themeisle-blocks-tabs-item__header"))||void 0===t||t.classList.add("active"),null===(l=r.current.querySelector(".wp-block-themeisle-blocks-tabs-item__content"))||void 0===l||l.classList.add("active"))},withoutInteractiveFormatting:!0}),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-item__content"},(0,n.createElement)(s.InnerBlocks,{template:[["core/paragraph"]]}))))},save:({attributes:e,className:t})=>(0,n.createElement)("div",{className:t,"data-title":e.title},(0,n.createElement)(s.RichText.Content,{tagName:"div",className:"wp-block-themeisle-blocks-tabs-item__header",value:e.title||(0,a.__)("Untitled Tab","otter-blocks"),tabIndex:"0"}),(0,n.createElement)("div",{className:"wp-block-themeisle-blocks-tabs-item__content"},(0,n.createElement)(s.InnerBlocks.Content,null)))})},321:function(e,t,l){var o=l(9307),a=l(5736),r=l(4981),n=l(5609),c=l(340),i={id:{type:"string"},products:{type:"array",default:[]},listingType:{type:"string",default:window.themeisleGutenberg.themeMods.listingType},altRow:{type:"boolean",default:Boolean(window.themeisleGutenberg.themeMods.altRow)},fields:{type:"string",default:window.themeisleGutenberg.themeMods.fields},rowColor:{type:"string",default:window.themeisleGutenberg.themeMods.rowColor},headerColor:{type:"string",default:window.themeisleGutenberg.themeMods.headerColor},textColor:{type:"string",default:window.themeisleGutenberg.themeMods.textColor},borderColor:{type:"string",default:window.themeisleGutenberg.themeMods.borderColor},altRowColor:{type:"string",default:window.