@tabler/core 1.0.0-beta11 → 1.0.0-beta12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/README.md +33 -10
  2. package/dist/css/demo.css +251 -379
  3. package/dist/css/demo.min.css +3 -3
  4. package/dist/css/demo.rtl.css +251 -379
  5. package/dist/css/demo.rtl.min.css +3 -3
  6. package/dist/css/tabler-flags.css +266 -529
  7. package/dist/css/tabler-flags.min.css +3 -3
  8. package/dist/css/tabler-flags.rtl.css +266 -529
  9. package/dist/css/tabler-flags.rtl.min.css +3 -3
  10. package/dist/css/tabler-payments.css +127 -252
  11. package/dist/css/tabler-payments.min.css +2 -2
  12. package/dist/css/tabler-payments.rtl.css +127 -252
  13. package/dist/css/tabler-payments.rtl.min.css +2 -2
  14. package/dist/css/tabler-vendors.css +480 -679
  15. package/dist/css/tabler-vendors.min.css +3 -3
  16. package/dist/css/tabler-vendors.rtl.css +480 -679
  17. package/dist/css/tabler-vendors.rtl.min.css +3 -3
  18. package/dist/css/tabler.css +10041 -14881
  19. package/dist/css/tabler.min.css +4 -4
  20. package/dist/css/tabler.rtl.css +10041 -14880
  21. package/dist/css/tabler.rtl.min.css +4 -4
  22. package/dist/js/demo-theme.js +32 -0
  23. package/dist/js/demo-theme.min.js +9 -0
  24. package/dist/js/demo.js +2 -12
  25. package/dist/js/demo.min.js +3 -3
  26. package/dist/js/tabler.esm.js +90 -61
  27. package/dist/js/tabler.esm.min.js +9 -3
  28. package/dist/js/tabler.js +112 -61
  29. package/dist/js/tabler.min.js +9 -3
  30. package/dist/libs/apexcharts/dist/apexcharts.amd.js +1 -1
  31. package/dist/libs/apexcharts/dist/apexcharts.common.js +3 -3
  32. package/dist/libs/apexcharts/dist/apexcharts.esm.js +3 -3
  33. package/dist/libs/apexcharts/dist/apexcharts.js +27 -8
  34. package/dist/libs/apexcharts/dist/apexcharts.min.js +3 -3
  35. package/dist/libs/bootstrap/dist/js/bootstrap.bundle.js +131 -107
  36. package/dist/libs/bootstrap/dist/js/bootstrap.bundle.js.map +1 -1
  37. package/dist/libs/bootstrap/dist/js/bootstrap.bundle.min.js +2 -2
  38. package/dist/libs/bootstrap/dist/js/bootstrap.bundle.min.js.map +1 -1
  39. package/dist/libs/bootstrap/dist/js/bootstrap.esm.js +70 -57
  40. package/dist/libs/bootstrap/dist/js/bootstrap.esm.js.map +1 -1
  41. package/dist/libs/bootstrap/dist/js/bootstrap.esm.min.js +2 -2
  42. package/dist/libs/bootstrap/dist/js/bootstrap.esm.min.js.map +1 -1
  43. package/dist/libs/bootstrap/dist/js/bootstrap.js +71 -58
  44. package/dist/libs/bootstrap/dist/js/bootstrap.js.map +1 -1
  45. package/dist/libs/bootstrap/dist/js/bootstrap.min.js +2 -2
  46. package/dist/libs/bootstrap/dist/js/bootstrap.min.js.map +1 -1
  47. package/dist/libs/jsvectormap/dist/js/jsvectormap.js +1061 -1066
  48. package/dist/libs/jsvectormap/dist/js/jsvectormap.min.js +1 -1
  49. package/dist/libs/nouislider/dist/nouislider.d.ts +1 -1
  50. package/package.json +68 -22
  51. package/src/js/demo-theme.js +25 -0
  52. package/src/js/demo.js +0 -17
  53. package/src/js/src/tabler.js +17 -0
  54. package/src/js/tabler.js +2 -0
  55. package/src/scss/_core.scss +1 -0
  56. package/src/scss/_mixins-override.scss +26 -26
  57. package/src/scss/_utilities.scss +2 -2
  58. package/src/scss/_variables.scss +207 -89
  59. package/src/scss/demo/_examples.scss +2 -2
  60. package/src/scss/demo/_highlight.scss +3 -3
  61. package/src/scss/demo.scss +4 -4
  62. package/src/scss/fonts/_webfonts.scss +0 -50
  63. package/src/scss/layout/_core.scss +2 -23
  64. package/src/scss/layout/_dark.scss +8 -6
  65. package/src/scss/layout/_footer.scss +2 -2
  66. package/src/scss/layout/_navbar.scss +7 -5
  67. package/src/scss/layout/_page.scss +8 -6
  68. package/src/scss/layout/_root.scss +37 -0
  69. package/src/scss/mixins/_functions.scss +2 -2
  70. package/src/scss/mixins/_mixins.scss +3 -2
  71. package/src/scss/ui/_accordion.scss +1 -1
  72. package/src/scss/ui/_alerts.scss +1 -1
  73. package/src/scss/ui/_avatars.scss +5 -5
  74. package/src/scss/ui/_badges.scss +2 -2
  75. package/src/scss/ui/_buttons.scss +25 -17
  76. package/src/scss/ui/_calendars.scss +8 -8
  77. package/src/scss/ui/_cards.scss +28 -31
  78. package/src/scss/ui/_carousel.scss +1 -1
  79. package/src/scss/ui/_chips.scss +0 -0
  80. package/src/scss/ui/_empty.scss +3 -3
  81. package/src/scss/ui/_flags.scss +2 -2
  82. package/src/scss/ui/_forms.scss +7 -7
  83. package/src/scss/ui/_grid.scss +8 -9
  84. package/src/scss/ui/_icons.scss +64 -4
  85. package/src/scss/ui/_legend.scss +8 -4
  86. package/src/scss/ui/_lists.scss +16 -13
  87. package/src/scss/ui/_markdown.scss +2 -3
  88. package/src/scss/ui/_modals.scss +1 -1
  89. package/src/scss/ui/_nav.scss +7 -7
  90. package/src/scss/ui/_offcanvas.scss +2 -2
  91. package/src/scss/ui/_pagination.scss +10 -6
  92. package/src/scss/ui/_placeholder.scss +1 -1
  93. package/src/scss/ui/_progress.scss +45 -6
  94. package/src/scss/ui/_ribbons.scss +5 -5
  95. package/src/scss/ui/_status.scss +2 -2
  96. package/src/scss/ui/_steps.scss +2 -2
  97. package/src/scss/ui/_tables.scss +26 -5
  98. package/src/scss/ui/_toasts.scss +0 -1
  99. package/src/scss/ui/_type.scss +45 -30
  100. package/src/scss/ui/forms/_form-check.scss +26 -1
  101. package/src/scss/ui/forms/_form-colorinput.scss +2 -2
  102. package/src/scss/ui/forms/_form-icon.scss +1 -1
  103. package/src/scss/ui/forms/_form-imagecheck.scss +4 -4
  104. package/src/scss/ui/forms/_form-selectgroup.scss +7 -7
  105. package/src/scss/ui/typo/_hr.scss +2 -3
  106. package/src/scss/utils/_colors.scss +14 -5
  107. package/src/scss/vendor/_dropzone.scss +1 -1
  108. package/src/scss/vendor/_jsvectormap.scss +7 -7
  109. package/src/scss/vendor/_litepicker.scss +11 -11
  110. package/src/scss/vendor/_plyr.scss +1 -1
  111. package/src/scss/vendor/_tinymce.scss +3 -3
  112. package/src/scss/vendor/_tom-select.scss +2 -0
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).jsVectorMap=e()}(this,(function(){"use strict";Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),i=e.length;--i>=0&&e.item(i)!==this;);return i>-1}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),i=1;i<arguments.length;i++){var s=arguments[i];if(null!=s){s=Object(s);for(var a=Object.keys(Object(s)),n=0,r=a.length;n<r;n++){var o=a[n],h=Object.getOwnPropertyDescriptor(s,o);void 0!==h&&h.enumerable&&(e[o]=s[o])}}}return e}});var t=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var i=Object.prototype.toString.call(t);return"[object RegExp]"===i||"[object Date]"===i||function(t){return t instanceof Node}(t)||function(t){return t.$$typeof===e}(t)}(t)};var e="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?o((i=t,Array.isArray(i)?[]:{}),t,e):t;var i}function s(t,e,s){return t.concat(e).map((function(t){return i(t,s)}))}function a(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return t.propertyIsEnumerable(e)})):[]}(t))}function n(t,e){try{return e in t}catch(t){return!1}}function r(t,e,s){var r={};return s.isMergeableObject(t)&&a(t).forEach((function(e){r[e]=i(t[e],s)})),a(e).forEach((function(a){(function(t,e){return n(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,a)||(n(t,a)&&s.isMergeableObject(e[a])?r[a]=function(t,e){if(!e.customMerge)return o;var i=e.customMerge(t);return"function"==typeof i?i:o}(a,s)(t[a],e[a],s):r[a]=i(e[a],s))})),r}var o=function(e,a,n){(n=n||{}).arrayMerge=n.arrayMerge||s,n.isMergeableObject=n.isMergeableObject||t,n.cloneUnlessOtherwiseSpecified=i;var o=Array.isArray(a);return o===Array.isArray(e)?o?n.arrayMerge(e,a,n):r(e,a,n):i(a,n)},h=function(t){return"object"==typeof t&&void 0!==t.nodeType?t:"string"==typeof t?document.querySelector(t):null},l=function(t,e,i,s){void 0===s&&(s=!1);var a=document.createElement(t);return i&&(a[s?"innerHTML":"textContent"]=i),e&&(a.className=e),a},c=function(t){t.parentNode.removeChild(t)},u=function(t,e,i){return void 0===i&&(i=!1),i?o(t,e):Object.assign(t,e)},p=function(t,e){return t.toLowerCase()+":to:"+e.toLowerCase()},d=function(t,e){Object.assign(t.prototype,e)};function f(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,m(t,e)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}function y(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return v(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?v(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var s=0;return function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var b=function(){function t(t,e){this.node=this._createElement(t),e&&this.set(e)}var e=t.prototype;return e._createElement=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)},e.addClass=function(t){this.node.setAttribute("class",t)},e.getBBox=function(){return this.node.getBBox()},e.set=function(t,e){if("object"==typeof t)for(var i in t)this.applyAttr(i,t[i]);else this.applyAttr(t,e)},e.get=function(t){return this.style.initial[t]},e.applyAttr=function(t,e){this.node.setAttribute(t.replace(/[\w]([A-Z])/g,(function(t){return t[0]+"-"+t[1]})).toLowerCase(),e)},e.remove=function(){c(this.node)},t}(),_=function(t){function e(e,i,s){var a;return void 0===s&&(s={}),(a=t.call(this,e,i)||this).isHovered=!1,a.isSelected=!1,a.style=s,a.style.current={},a.updateStyle(),a}f(e,t);var i=e.prototype;return i.setStyle=function(t,e){var i;"object"==typeof t?u(this.style.current,t):u(this.style.current,((i={})[t]=e,i));this.updateStyle()},i.updateStyle=function(){var t={};u(t,this.style.initial),u(t,this.style.current),this.isHovered&&u(t,this.style.hover),this.isSelected&&(u(t,this.style.selected),this.isHovered&&u(t,this.style.selectedHover)),this.set(t)},e}(b),S=function(t){function e(e,i){return t.call(this,"text",e,i)||this}return f(e,t),e.prototype.applyAttr=function(e,i){"text"===e?this.node.textContent=i:t.prototype.applyAttr.call(this,e,i)},e}(_),w=function(t){function e(e,i){return t.call(this,"image",e,i)||this}return f(e,t),e.prototype.applyAttr=function(e,i){var s;"image"===e?("object"==typeof i?(s=i.url,this.offset=i.offset||[0,0]):(s=i,this.offset=[0,0]),this.node.setAttributeNS("http://www.w3.org/1999/xlink","href",s),this.width=23,this.height=23,this.applyAttr("width",this.width),this.applyAttr("height",this.height),this.applyAttr("x",this.cx-this.width/2+this.offset[0]),this.applyAttr("y",this.cy-this.height/2+this.offset[1])):"cx"==e?(this.cx=i,this.width&&this.applyAttr("x",i-this.width/2+this.offset[0])):"cy"==e?(this.cy=i,this.height&&this.applyAttr("y",i-this.height/2+this.offset[1])):t.prototype.applyAttr.apply(this,arguments)},e}(_),k=function(t){function e(e){var i;return(i=t.call(this,"svg")||this)._container=e,i._defsElement=new b("defs"),i._rootElement=new b("g",{id:"jvm-regions-group"}),i.node.appendChild(i._defsElement.node),i.node.appendChild(i._rootElement.node),i._container.appendChild(i.node),i}f(e,t);var i=e.prototype;return i.setSize=function(t,e){this.node.setAttribute("width",t),this.node.setAttribute("height",e)},i.applyTransformParams=function(t,e,i){this._rootElement.node.setAttribute("transform","scale("+t+") translate("+e+", "+i+")")},i.createPath=function(t,e){var i=new _("path",t,e);return i.node.setAttribute("fill-rule","evenodd"),this.add(i)},i.createCircle=function(t,e,i){var s=new _("circle",t,e);return this.add(s,i)},i.createLine=function(t,e,i){var s=new _("line",t,e);return this.add(s,i)},i.createText=function(t,e,i){var s=new S(t,e);return this.add(s,i)},i.createImage=function(t,e,i){var s=new w(t,e);return this.add(s,i)},i.createGroup=function(t){var e=new b("g");return this.node.appendChild(e.node),t&&(e.node.id=t),e.canvas=this,e},i.add=function(t,e){return(e=e||this._rootElement).node.appendChild(t.node),t},e}(b),x={},M=1,j={on:function(t,e,i,s){void 0===s&&(s={});var a="jvm:"+e+"::"+M++;x[a]={selector:t,handler:i},i._uid=a,t.addEventListener(e,i,s)},delegate:function(t,e,i,s){(e=e.split(" ")).forEach((function(e){j.on(t,e,(function(t){var e=t.target;e.matches(i)&&s.call(e,t)}))}))},off:function(t,e,i){var s=e.split(":")[1];t.removeEventListener(s,i),delete x[i._uid]},flush:function(){Object.keys(x).forEach((function(t){j.off(x[t].selector,t,x[t].handler)}))},getEventRegistry:function(){return x}};var C={onViewportChange:"viewport:changed",onRegionClick:"region:clicked",onMarkerClick:"marker:clicked",onRegionSelected:"region:selected",onMarkerSelected:"marker:selected",onRegionTooltipShow:"region.tooltip:show",onMarkerTooltipShow:"marker.tooltip:show",onLoaded:"map:loaded",onDestroyed:"map:destroyed"};function L(t,e,i){var s=h(e),a=-1===s.getAttribute("class").indexOf("jvm-region")?"marker":"region",n="region"===a?s.getAttribute("data-code"):s.getAttribute("data-index"),r=a+":selected";return i&&(r=a+".tooltip:show"),{event:r,type:a,code:n,element:"region"===a?t.regions[n].element:t.markers[n].element,tooltipText:"region"===a?t.mapData.paths[n].name||"":t.markers[n].config.name||""}}var O=function(){function t(){}return t.prototype.dispose=function(){this._tooltip?c(this._tooltip):this.shape.remove();for(var t,e=y(Object.getOwnPropertyNames(this));!(t=e()).done;){this[t.value]=null}},t}(),A={getLabelText:function(t,e){if(e){if("function"==typeof e.render){var i=[];return this.config&&this.config.marker&&i.push(this.config.marker),i.push(t),e.render.apply(this,i)}return t}},getLabelOffsets:function(t,e){return"function"==typeof e.offsets?e.offsets(t):Array.isArray(e.offsets)?e.offsets[t]:[0,0]},setStyle:function(t,e){this.shape.setStyle(t,e)},remove:function(){this.shape.remove(),this.label&&this.label.remove()},hover:function(t){this._setStatus("isHovered",t)},select:function(t){this._setStatus("isSelected",t)},_setStatus:function(t,e){this.shape[t]=e,this.shape.updateStyle(),this[t]=e,this.label&&(this.label[t]=e,this.label.updateStyle())}},X=function(t){function e(e){var i,s=e.map,a=e.code,n=e.path,r=e.style,o=e.label,h=e.labelStyle,l=e.labelsGroup;(i=t.call(this)||this)._map=s,i.shape=i._createRegion(n,a,r);var c=i.shape.getBBox(),u=i.getLabelText(a,o);if(o&&u){var p=i.getLabelOffsets(a);i.labelX=c.x+c.width/2+p[0],i.labelY=c.y+c.height/2+p[1],i.label=i._map.canvas.createText({text:u,textAnchor:"middle",alignmentBaseline:"central",dataCode:a,x:i.labelX,y:i.labelY},h,l),i.label.addClass("jvm-region jvm-element")}return i}f(e,t);var i=e.prototype;return i._createRegion=function(t,e,i){return(t=this._map.canvas.createPath({d:t,dataCode:e},i)).addClass("jvm-region jvm-element"),t},i.updateLabelPosition=function(){this.label&&this.label.set({x:this.labelX*this._map.scale+this._map.transX*this._map.scale,y:this.labelY*this._map.scale+this._map.transY*this._map.scale})},e}(O);d(X,A);var Y=function(t){function e(e){var i,s=e.index,a=e.map,n=e.style,r=e.x1,o=e.y1,h=e.x2,l=e.y2,c=e.group,u=e.config;return(i=t.call(this)||this).config=u,i.shape=a.canvas.createLine({x1:r,y1:o,x2:h,y2:l,dataIndex:s},n,c),i.shape.addClass("jvm-line"),i}return f(e,t),e.prototype.setStyle=function(t,e){this.shape.setStyle(t,e)},e}(O);var E=function(t){function e(e){var i,s=e.index,a=e.style,n=e.label,r=e.cx,o=e.cy,h=e.map,l=e.group;return(i=t.call(this)||this)._map=h,i._isImage=!!a.initial.image,i.config=arguments[0],i.shape=h.canvas[i._isImage?"createImage":"createCircle"]({dataIndex:s,cx:r,cy:o},i._getStyle(),l),i.shape.addClass("jvm-marker jvm-element"),i._isImage&&i.updateLabelPosition(),n&&i._createLabel(i.config),i}f(e,t);var i=e.prototype;return i.updateLabelPosition=function(){this.label&&this.label.set({x:this._labelX*this._map.scale+this._offsets[0]+this._map.transX*this._map.scale+5+(this._isImage?(this.shape.width||0)/2:this.shape.node.r.baseVal.value),y:this._labelY*this._map.scale+this._map.transY*this._map.scale+this._offsets[1]})},i._createLabel=function(t){var e=t.index,i=t.map,s=t.label,a=t.labelsGroup,n=t.cx,r=t.cy,o=t.marker,h=t.isRecentlyCreated,l=this.getLabelText(e,s);this._labelX=n/i.scale-i.transX,this._labelY=r/i.scale-i.transY,this._offsets=h&&o.offsets?o.offsets:this.getLabelOffsets(e,s),this.label=i.canvas.createText({text:l,dataIndex:e,x:this._labelX,y:this._labelY,dy:"0.6ex"},i.params.markerLabelStyle,a),this.label.addClass("jvm-marker jvm-element"),h&&this.updateLabelPosition()},i._getStyle=function(){var t={};return this._isImage?t.initial={image:this.config.style.initial.image}:t=this.config.style,t},e}(O);d(E,A);var T=function(){function t(t){void 0===t&&(t={}),this._options=t,this._map=this._options.map,this._series=this._options.series,this._body=l("div","jvm-legend"),this._options.cssClass&&this._body.setAttribute("class",this._options.cssClass),t.vertical?this._map.legendVertical.appendChild(this._body):this._map.legendHorizontal.appendChild(this._body),this.render()}return t.prototype.render=function(){var t,e,i,s,a=this._series.scale.getTicks(),n=l("div","jvm-legend-inner");if(this._body.innderHTML="",this._options.title){var r=l("div","jvm-legend-title",this._options.title);this._body.appendChild(r)}this._body.appendChild(n);for(var o=0;o<a.length;o++){switch(t=l("div","jvm-legend-tick"),e=l("div","jvm-legend-tick-sample"),this._series.config.attribute){case"fill":s=a[o].value,/\.(jpg|gif|png)$/.test(s)?e.style.background="url("+a[o].value+")":e.style.background=a[o].value;break;case"stroke":e.style.background=a[o].value;break;case"image":e.style.background="url("+("object"==typeof a[o].value?a[o].value.url:a[o].value)+") no-repeat center center",e.style.backgroundSize="cover"}t.appendChild(e),i=a[o].label,this._options.labelRender&&(i=this._options.labelRender(i));var h=l("div","jvm-legend-tick-text",i);t.appendChild(h),n.appendChild(t)}},t}(),z=function(){function t(t){this._scale=t}var e=t.prototype;return e.getValue=function(t){return this._scale[t]},e.getTicks=function(){var t=[];for(var e in this._scale)t.push({label:e,value:this._scale[e]});return t},t}(),P=function(){function t(t,e,i){void 0===t&&(t={}),this._map=i,this._elements=e,this._values=t.values||{},this.config=t,this.config.attribute=t.attribute||"fill",t.attributes&&this.setAttributes(t.attributes),"object"==typeof t.scale&&(this.scale=new z(t.scale)),this.config.legend&&(this.legend=new T(u({map:this._map,series:this},this.config.legend))),this.setValues(this._values)}var e=t.prototype;return e.setValues=function(t){var e={};for(var i in t)t[i]&&(e[i]=this.scale.getValue(t[i]));this.setAttributes(e)},e.setAttributes=function(t){for(var e in t)this._elements[e]&&this._elements[e].element.setStyle(this.config.attribute,t[e])},e.clear=function(){var t,e={};for(t in this._values)this._elements[t]&&(e[t]=this._elements[t].element.shape.style.initial[this.config.attribute]);this.setAttributes(e),this._values={}},t}();var D={mill:function(t,e,i){return{x:this.radius*(e-i)*this.radDeg,y:-this.radius*Math.log(Math.tan((45+.4*t)*this.radDeg))/.8}},merc:function(t,e,i){return{x:this.radius*(e-i)*this.radDeg,y:-this.radius*Math.log(Math.tan(Math.PI/4+t*Math.PI/360))}},aea:function(t,e,i){var s=i*this.radDeg,a=29.5*this.radDeg,n=45.5*this.radDeg,r=t*this.radDeg,o=e*this.radDeg,h=(Math.sin(a)+Math.sin(n))/2,l=Math.cos(a)*Math.cos(a)+2*h*Math.sin(a),c=h*(o-s),u=Math.sqrt(l-2*h*Math.sin(r))/h,p=Math.sqrt(l-2*h*Math.sin(0))/h;return{x:u*Math.sin(c)*this.radius,y:-(p-u*Math.cos(c))*this.radius}},lcc:function(t,e,i){var s=i*this.radDeg,a=e*this.radDeg,n=33*this.radDeg,r=45*this.radDeg,o=t*this.radDeg,h=Math.log(Math.cos(n)*(1/Math.cos(r)))/Math.log(Math.tan(Math.PI/4+r/2)*(1/Math.tan(Math.PI/4+n/2))),l=Math.cos(n)*Math.pow(Math.tan(Math.PI/4+n/2),h)/h,c=l*Math.pow(1/Math.tan(Math.PI/4+o/2),h),u=l*Math.pow(1/Math.tan(Math.PI/4+0),h);return{x:c*Math.sin(h*(a-s))*this.radius,y:-(u-c*Math.cos(h*(a-s)))*this.radius}}};D.degRad=180/Math.PI,D.radDeg=Math.PI/180,D.radius=6381372;var I={_setupContainerEvents:function(){var t,e,i=this,s=!1,a=this;this.params.draggable&&(j.on(this.container,"mousemove",(function(i){if(!s)return!1;a.transX-=(t-i.pageX)/a.scale,a.transY-=(e-i.pageY)/a.scale,a._applyTransform(),t=i.pageX,e=i.pageY})),j.on(this.container,"mousedown",(function(i){return s=!0,t=i.pageX,e=i.pageY,!1})),j.on(document.body,"mouseup",(function(){s=!1}))),this.params.zoomOnScroll&&j.on(this.container,"wheel",(function(t){var e=0;e=(t.deltaY||-t.wheelDelta||t.detail)>>10||1,e*=75;var s=i.container.getBoundingClientRect(),n=t.pageX-s.left-window.pageXOffset,r=t.pageY-s.top-window.pageYOffset,o=Math.pow(1+a.params.zoomOnScrollSpeed/1e3,-1.5*e);a.tooltip&&a.tooltip.hide(),a._setScale(a.scale*o,n,r),t.preventDefault()}))},_setupElementEvents:function(){var t,e,i,s=this,a=this.container;j.on(a,"mousemove",(function(s){Math.abs(t-s.pageX)+Math.abs(e-s.pageY)>2&&(i=!0)})),j.delegate(a,"mousedown",".jvm-element",(function(s){t=s.pageX,e=s.pageY,i=!1})),j.delegate(a,"mouseover mouseout",".jvm-element",(function(t){var e=L(s,this,!0),i=s.params.showTooltip;"mouseover"===t.type?(e.element.hover(!0),s.tooltip.text(e.tooltipText),s._emit(e.event,[t,s.tooltip,e.code]),t.defaultPrevented||i&&s.tooltip.show()):(e.element.hover(!1),i&&s.tooltip.hide())})),j.delegate(a,"mouseup",".jvm-element",(function(t){var e=L(s,this);if(!i&&("region"===e.type&&s.params.regionsSelectable||"marker"===e.type&&s.params.markersSelectable)){var a=e.element;s.params[e.type+"sSelectableOne"]&&s._clearSelected(e.type+"s"),e.element.isSelected?a.select(!1):a.select(!0),s._emit(e.event,[e.code,a.isSelected,s._getSelected(e.type+"s")])}})),j.delegate(a,"click",".jvm-element",(function(t){var e=L(s,this),i=e.type,a=e.code;s._emit("region"===i?C.onRegionClick:C.onMarkerClick,[t,a])}))},_setupZoomButtons:function(){var t=this,e=this,i=l("div","jvm-zoom-btn jvm-zoomin","&#43;",!0),s=l("div","jvm-zoom-btn jvm-zoomout","&#x2212",!0);this.container.appendChild(i),this.container.appendChild(s),j.on(i,"click",(function(){t._setScale(e.scale*e.params.zoomStep,e.width/2,e.height/2,!1,e.params.zoomAnimate)})),j.on(s,"click",(function(){t._setScale(e.scale/e.params.zoomStep,e.width/2,e.height/2,!1,e.params.zoomAnimate)}))},_setupContainerTouchEvents:function(){var t,e,i,s,a,n,r,o=this,h=function(h){var l,c,u,p,d=h.touches;if("touchstart"==h.type&&(r=0),1==d.length)1==r&&(u=o.transX,p=o.transY,o.transX-=(i-d[0].pageX)/o.scale,o.transY-=(s-d[0].pageY)/o.scale,o.tooltip.hide(),o._applyTransform(),u==o.transX&&p==o.transY||h.preventDefault()),i=d[0].pageX,s=d[0].pageY;else if(2==d.length)if(2==r)c=Math.sqrt(Math.pow(d[0].pageX-d[1].pageX,2)+Math.pow(d[0].pageY-d[1].pageY,2))/e,o._setScale(t*c,a,n),o.tooltip.hide(),h.preventDefault();else{var f=o.container.selector.getBoundingClientRect();l={top:f.top+window.scrollY,left:f.left+window.scrollX},a=d[0].pageX>d[1].pageX?d[1].pageX+(d[0].pageX-d[1].pageX)/2:d[0].pageX+(d[1].pageX-d[0].pageX)/2,n=d[0].pageY>d[1].pageY?d[1].pageY+(d[0].pageY-d[1].pageY)/2:d[0].pageY+(d[1].pageY-d[0].pageY)/2,a-=l.left,n-=l.top,t=o.scale,e=Math.sqrt(Math.pow(d[0].pageX-d[1].pageX,2)+Math.pow(d[0].pageY-d[1].pageY,2))}r=d.length};j.on(o.container,"touchstart",h),j.on(o.container,"touchmove",h)},_createRegions:function(){var t,e;for(t in this.regionLabelsGroup=this.regionLabelsGroup||this.canvas.createGroup("jvm-regions-labels-group"),this.mapData.paths)e=new X({map:this,code:t,path:this.mapData.paths[t].path,style:u({},this.params.regionStyle),labelStyle:this.params.regionLabelStyle,labelsGroup:this.regionLabelsGroup,label:this.params.labels&&this.params.labels.regions}),this.regions[t]={config:this.mapData.paths[t],element:e}},_createLines:function(t,e,i){void 0===i&&(i=!1);var s=!1,a=!1;for(var n in this.linesGroup=this.linesGroup||this.canvas.createGroup("jvm-lines-group"),t){var r=t[n];for(var o in e){var h=i?e[o].config:e[o];h.name===r.from&&(s=this.getMarkerPosition(h)),h.name===r.to&&(a=this.getMarkerPosition(h))}!1!==s&&!1!==a&&(this.lines[p(r.from,r.to)]=new Y({index:n,map:this,style:u({initial:this.params.lineStyle},{initial:r.style||{}},!0),x1:s.x,y1:s.y,x2:a.x,y2:a.y,group:this.linesGroup,config:r}))}},_createMarkers:function(t,e){var i,s,a,n,r=this;for(var o in void 0===t&&(t={}),void 0===e&&(e=!1),this.markersGroup=this.markersGroup||this.canvas.createGroup("jvm-markers-group"),this.markerLabelsGroup=this.markerLabelsGroup||this.canvas.createGroup("jvm-markers-labels-group"),t){if(i=t[o],a=this.getMarkerPosition(i),n=i.coords.join(":"),e){if(Object.keys(this.markers).filter((function(t){return r.markers[t]._uid===n})).length)continue;o=Object.keys(this.markers).length}!1!==a&&(s=new E({index:o,map:this,style:u(this.params.markerStyle,{initial:i.style||{}},!0),label:this.params.labels&&this.params.labels.markers,labelsGroup:this.markerLabelsGroup,cx:a.x,cy:a.y,group:this.markersGroup,marker:i,isRecentlyCreated:e}),this.markers[o]&&this.removeMarkers([o]),this.markers[o]={_uid:n,config:i,element:s})}},_createSeries:function(){for(var t in this.series={markers:[],regions:[]},this.params.series)for(var e=0;e<this.params.series[t].length;e++)this.series[t][e]=new P(this.params.series[t][e],this[t],this)},_applyTransform:function(){var t,e,i,s;this.defaultWidth*this.scale<=this.width?(t=(this.width-this.defaultWidth*this.scale)/(2*this.scale),i=(this.width-this.defaultWidth*this.scale)/(2*this.scale)):(t=0,i=(this.width-this.defaultWidth*this.scale)/this.scale),this.defaultHeight*this.scale<=this.height?(e=(this.height-this.defaultHeight*this.scale)/(2*this.scale),s=(this.height-this.defaultHeight*this.scale)/(2*this.scale)):(e=0,s=(this.height-this.defaultHeight*this.scale)/this.scale),this.transY>e?this.transY=e:this.transY<s&&(this.transY=s),this.transX>t?this.transX=t:this.transX<i&&(this.transX=i),this.canvas.applyTransformParams(this.scale,this.transX,this.transY),this.markers&&this._repositionMarkers(),this.lines&&this._repositionLines(),this._repositionLabels()},_resize:function(){var t=this.baseScale;this.width/this.height>this.defaultWidth/this.defaultHeight?(this.baseScale=this.height/this.defaultHeight,this.baseTransX=Math.abs(this.width-this.defaultWidth*this.baseScale)/(2*this.baseScale)):(this.baseScale=this.width/this.defaultWidth,this.baseTransY=Math.abs(this.height-this.defaultHeight*this.baseScale)/(2*this.baseScale)),this.scale*=this.baseScale/t,this.transX*=this.baseScale/t,this.transY*=this.baseScale/t},_setScale:function(t,e,i,s,a){var n,r,o,h,l,c,u,p,d,f,m=this,g=0,v=Math.abs(Math.round(60*(t-this.scale)/Math.max(t,this.scale)));t>this.params.zoomMax*this.baseScale?t=this.params.zoomMax*this.baseScale:t<this.params.zoomMin*this.baseScale&&(t=this.params.zoomMin*this.baseScale),void 0!==e&&void 0!==i&&(n=t/this.scale,s?(d=e+this.defaultWidth*(this.width/(this.defaultWidth*t))/2,f=i+this.defaultHeight*(this.height/(this.defaultHeight*t))/2):(d=this.transX-(n-1)/t*e,f=this.transY-(n-1)/t*i)),a&&v>0?(o=this.scale,h=(t-o)/v,l=this.transX*this.scale,u=this.transY*this.scale,c=(d*t-l)/v,p=(f*t-u)/v,r=setInterval((function(){g+=1,m.scale=o+h*g,m.transX=(l+c*g)/m.scale,m.transY=(u+p*g)/m.scale,m._applyTransform(),g==v&&(clearInterval(r),m._emit(C.onViewportChange,[m.scale,m.transX,m.transY]))}),10)):(this.transX=d,this.transY=f,this.scale=t,this._applyTransform(),this._emit(C.onViewportChange,[this.scale,this.transX,this.transY]))},setFocus:function(t){var e=this;void 0===t&&(t={});var i,s=[];if(t.region?s.push(t.region):t.regions&&(s=t.regions),s.length)return s.forEach((function(t){if(e.regions[t]){var s=e.regions[t].element.shape.getBBox();s&&(i=void 0===i?s:{x:Math.min(i.x,s.x),y:Math.min(i.y,s.y),width:Math.max(i.x+i.width,s.x+s.width)-Math.min(i.x,s.x),height:Math.max(i.y+i.height,s.y+s.height)-Math.min(i.y,s.y)})}})),this._setScale(Math.min(this.width/i.width,this.height/i.height),-(i.x+i.width/2),-(i.y+i.height/2),!0,t.animate);if(t.coords){var a=this.coordsToPoint(t.coords[0],t.coords[1]),n=this.transX-a.x/this.scale,r=this.transY-a.y/this.scale;return this._setScale(t.scale*this.baseScale,n,r,!0,t.animate)}},updateSize:function(){this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this._resize(),this.canvas.setSize(this.width,this.height),this._applyTransform()},coordsToPoint:function(t,e){var i,s,a,n=V.maps[this.params.map].projection,r=n.centralMeridian;return i=D[n.type](t,e,r),!!(s=this.getInsetForPoint(i.x,i.y))&&(a=s.bbox,i.x=(i.x-a[0].x)/(a[1].x-a[0].x)*s.width*this.scale,i.y=(i.y-a[0].y)/(a[1].y-a[0].y)*s.height*this.scale,{x:i.x+this.transX*this.scale+s.left*this.scale,y:i.y+this.transY*this.scale+s.top*this.scale})},getInsetForPoint:function(t,e){var i,s,a=V.maps[this.params.map].insets;for(i=0;i<a.length;i++)if(t>(s=a[i].bbox)[0].x&&t<s[1].x&&e>s[0].y&&e<s[1].y)return a[i]},getMarkerPosition:function(t){var e=t.coords;return V.maps[this.params.map].projection?this.coordsToPoint.apply(this,e):{x:e[0]*this.scale+this.transX*this.scale,y:e[1]*this.scale+this.transY*this.scale}},_repositionLines:function(){var t=!1,e=!1;for(var i in this.lines){for(var s in this.markers){var a=this.markers[s];a.config.name===this.lines[i].config.from&&(t=this.getMarkerPosition(a.config)),a.config.name===this.lines[i].config.to&&(e=this.getMarkerPosition(a.config))}!1!==t&&!1!==e&&this.lines[i].setStyle({x1:t.x,y1:t.y,x2:e.x,y2:e.y})}},_repositionMarkers:function(){var t;for(var e in this.markers)!1!==(t=this.getMarkerPosition(this.markers[e].config))&&this.markers[e].element.setStyle({cx:t.x,cy:t.y})},_repositionLabels:function(){var t=this.params.labels;if(t){if(t.regions)for(var e in this.regions)this.regions[e].element.updateLabelPosition();if(t.markers)for(var i in this.markers)this.markers[i].element.updateLabelPosition()}}},R=function(t){function e(e){var i;i=t.call(this)||this;var s=l("div","jvm-tooltip");return i._map=e,i._tooltip=document.body.appendChild(s),i._bindEventListeners(),g(i)||g(i)}f(e,t);var i=e.prototype;return i._bindEventListeners=function(){var t=this;j.on(this._map.container,"mousemove",(function(e){if(t._tooltip.classList.contains("active")){var i,s,a=(i=t._map.container,s="#jvm-regions-group",Element.prototype.querySelector.call(i,s)).getBoundingClientRect(),n=t._tooltip.getBoundingClientRect(),r=n.height,o=n.width,h=e.clientY<=a.top+r+5,l=e.pageY-r-5,c=e.pageX-o-5;h&&(l+=r+5,c-=10),e.clientX<a.left+o+5&&(c=e.pageX+5+2,h&&(c+=10)),t.css({top:l+"px",left:c+"px"})}}))},i.getElement=function(){return this._tooltip},i.show=function(){this._tooltip.classList.add("active")},i.hide=function(){this._tooltip.classList.remove("active")},i.text=function(t){if(!t)return this._tooltip.textContent;this._tooltip.textContent=t},i.css=function(t){for(var e in t)this._tooltip.style[e]=t[e];return this},e}(O),H=function(){function t(t,e){var i=t.scale,s=t.values;this._scale=i,this._values=s,this._fromColor=this.hexToRgb(i[0]),this._toColor=this.hexToRgb(i[1]),this._map=e,this.setMinMaxValues(s),this.visualize()}var e=t.prototype;return e.setMinMaxValues=function(t){for(var e in this.min=Number.MAX_VALUE,this.max=0,t)(e=parseFloat(t[e]))>this.max&&(this.max=e),e<this.min&&(this.min=e)},e.visualize=function(){var t,e={};for(var i in this._values)t=parseFloat(this._values[i]),isNaN(t)||(e[i]=this.getValue(t));this.setAttributes(e)},e.setAttributes=function(t){for(var e in t)this._map.regions[e]&&this._map.regions[e].element.setStyle("fill",t[e])},e.getValue=function(t){for(var e,i="#",s=0;s<3;s++)i+=(1===(e=Math.round(this._fromColor[s]+(this._toColor[s]-this._fromColor[s])*((t-this.min)/(this.max-this.min))).toString(16)).length?"0":"")+e;return i},e.hexToRgb=function(t){var e=0,i=0,s=0;return 4==t.length?(e="0x"+t[1]+t[1],i="0x"+t[2]+t[2],s="0x"+t[3]+t[3]):7==t.length&&(e="0x"+t[1]+t[2],i="0x"+t[3]+t[4],s="0x"+t[5]+t[6]),[parseInt(e),parseInt(i),parseInt(s)]},t}(),V=function(){function t(e){var i=this;if(void 0===e&&(e={}),this.params=u(t.defaults,e,!0),!t.maps[this.params.map])throw new Error("Attempt to use map which was not loaded: "+e.map);this.mapData=t.maps[this.params.map],this.regions={},this.markers={},this.lines={},this.defaultWidth=this.mapData.width,this.defaultHeight=this.mapData.height,this.height=0,this.width=0,this.scale=1,this.baseScale=1,this.transX=0,this.transY=0,this.baseTransX=0,this.baseTransY=0,"loading"!==document.readyState?this._init():window.addEventListener("DOMContentLoaded",(function(){return i._init()}))}var e=t.prototype;return e._init=function(){var t=this.params;this.container=h(t.selector),this.container.classList.add("jvm-container"),this.canvas=new k(this.container),this.setBackgroundColor(t.backgroundColor),this._createRegions(),this.updateSize(),this._createLines(t.lines||{},t.markers||{}),this._createMarkers(t.markers),this._repositionLabels(),this._setupContainerEvents(),this._setupElementEvents(),t.zoomButtons&&this._setupZoomButtons(),t.showTooltip&&(this.tooltip=new R(this)),t.selectedRegions&&this._setSelected("regions",t.selectedRegions),t.selectedMarkers&&this._setSelected("markers",t.selectedMarkers),t.focusOn&&this.setFocus(t.focusOn),t.visualizeData&&(this.dataVisualization=new H(t.visualizeData,this)),t.bindTouchEvents&&("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)&&this._setupContainerTouchEvents(),t.series&&(this.container.appendChild(this.legendHorizontal=l("div","jvm-series-container jvm-series-h")),this.container.appendChild(this.legendVertical=l("div","jvm-series-container jvm-series-v")),this._createSeries()),this._emit(C.onLoaded,[this])},e._emit=function(t,e){for(var i in C)C[i]===t&&"function"==typeof this.params[i]&&this.params[i].apply(this,e)},e.setBackgroundColor=function(t){this.container.style.backgroundColor=t},e._getSelected=function(t){var e,i=[];for(e in this[t])this[t][e].element.isSelected&&i.push(e);return i},e._setSelected=function(t,e){var i=this;e.forEach((function(e){i[t][e]&&i[t][e].element.select(!0)}))},e._clearSelected=function(t){var e=this;this._getSelected(t).forEach((function(i){e[t][i].element.select(!1)}))},e.getSelectedRegions=function(){return this._getSelected("regions")},e.clearSelectedRegions=function(){this._clearSelected("regions")},e.getSelectedMarkers=function(){return this._getSelected("markers")},e.clearSelectedMarkers=function(){this._clearSelected("markers")},e.addMarkers=function(t){if(Array.isArray(t))return this._createMarkers(t,!0);this._createMarkers([t],!0)},e.removeMarkers=function(t){var e=this;t||(t=Object.keys(this.markers)),t.forEach((function(t){e.markers[t].element.remove(),delete e.markers[t]}))},e.addLine=function(t,e,i){void 0===i&&(i={}),console.warn("`addLine` method is deprecated, please use `addLines` instead."),this._createLines([{from:t,to:e,style:i}],this.markers,!0)},e.addLines=function(t){var e=this._getLinesAsUids();Array.isArray(t)||(t=[t]),this._createLines(t.filter((function(t){return!(e.indexOf(p(t.from,t.to))>-1)})),this.markers,!0)},e.removeLines=function(t){var e=this;(t=Array.isArray(t)?t.map((function(t){return p(t.from,t.to)})):this._getLinesAsUids()).forEach((function(t){e.lines[t].dispose(),delete e.lines[t]}))},e._getLinesAsUids=function(){return Object.keys(this.lines)},e.removeLine=function(t,e){console.warn("`removeLine` method is deprecated, please use `removeLines` instead.");var i=p(t,e);this.lines.hasOwnProperty(i)&&(this.lines[i].element.remove(),delete this.lines[i])},e.reset=function(){for(var t in this.series)for(var e=0;e<this.series[t].length;e++)this.series[t][e].clear();this.legendHorizontal&&(c(this.legendHorizontal),this.legendHorizontal=null),this.legendVertical&&(c(this.legendVertical),this.legendVertical=null),this.scale=this.baseScale,this.transX=this.baseTransX,this.transY=this.baseTransY,this._applyTransform(),this.clearSelectedMarkers(),this.clearSelectedRegions(),this.removeMarkers()},e.destroy=function(t){var e=this;void 0===t&&(t=!0),j.flush(),this.tooltip.dispose(),this._emit(C.onDestroyed),t&&Object.keys(this).forEach((function(t){try{delete e[t]}catch(t){}}))},e.extend=function(e,i){if("function"==typeof this[e])throw new Error("The method ["+e+"] already exists internally please use another name.");t.prototype[e]=i},t}();V.maps={},V.defaults={map:"world",backgroundColor:"transparent",draggable:!0,zoomButtons:!0,zoomOnScroll:!0,zoomOnScrollSpeed:3,zoomMax:12,zoomMin:1,zoomAnimate:!0,showTooltip:!0,zoomStep:1.5,bindTouchEvents:!0,lineStyle:{stroke:"#808080",strokeWidth:1,strokeLinecap:"round"},markersSelectable:!1,markersSelectableOne:!1,markerStyle:{initial:{r:7,fill:"#374151",fillOpacity:1,stroke:"#FFF",strokeWidth:5,strokeOpacity:.5},hover:{fill:"#3cc0ff",cursor:"pointer"},selected:{fill:"blue"},selectedHover:{}},markerLabelStyle:{initial:{fontFamily:"Verdana",fontSize:12,fontWeight:500,cursor:"default",fill:"#374151"},hover:{cursor:"pointer"},selected:{},selectedHover:{}},regionsSelectable:!1,regionsSelectableOne:!1,regionStyle:{initial:{fill:"#dee2e8",fillOpacity:1,stroke:"none",strokeWidth:0},hover:{fillOpacity:.7,cursor:"pointer"},selected:{fill:"#9ca3af"},selectedHover:{}},regionLabelStyle:{initial:{fontFamily:"Verdana",fontSize:"12",fontWeight:"bold",cursor:"default",fill:"#35373e"},hover:{cursor:"pointer"}}},Object.assign(V.prototype,I);var G=function(){function t(t){if(void 0===t&&(t={}),!t.selector)throw new Error("Selector is not given.");return new V(t)}return t.addMap=function(t,e){V.maps[t]=e},t}();return window.jsVectorMap=G}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).jsVectorMap=e()}(this,(function(){"use strict";Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),i=e.length;--i>=0&&e.item(i)!==this;);return i>-1}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),i=1;i<arguments.length;i++){var s=arguments[i];if(null!=s){s=Object(s);for(var a=Object.keys(Object(s)),n=0,r=a.length;n<r;n++){var o=a[n],h=Object.getOwnPropertyDescriptor(s,o);void 0!==h&&h.enumerable&&(e[o]=s[o])}}}return e}});var t=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var i=Object.prototype.toString.call(t);return"[object RegExp]"===i||"[object Date]"===i||function(t){return t instanceof Node}(t)||function(t){return t.$$typeof===e}(t)}(t)};var e="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?o((i=t,Array.isArray(i)?[]:{}),t,e):t;var i}function s(t,e,s){return t.concat(e).map((function(t){return i(t,s)}))}function a(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return t.propertyIsEnumerable(e)})):[]}(t))}function n(t,e){try{return e in t}catch(t){return!1}}function r(t,e,s){var r={};return s.isMergeableObject(t)&&a(t).forEach((function(e){r[e]=i(t[e],s)})),a(e).forEach((function(a){(function(t,e){return n(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,a)||(n(t,a)&&s.isMergeableObject(e[a])?r[a]=function(t,e){if(!e.customMerge)return o;var i=e.customMerge(t);return"function"==typeof i?i:o}(a,s)(t[a],e[a],s):r[a]=i(e[a],s))})),r}var o=function(e,a,n){(n=n||{}).arrayMerge=n.arrayMerge||s,n.isMergeableObject=n.isMergeableObject||t,n.cloneUnlessOtherwiseSpecified=i;var o=Array.isArray(a);return o===Array.isArray(e)?o?n.arrayMerge(e,a,n):r(e,a,n):i(a,n)},h=function(t){return"object"==typeof t&&void 0!==t.nodeType?t:"string"==typeof t?document.querySelector(t):null},l=function(t,e,i,s){void 0===s&&(s=!1);var a=document.createElement(t);return i&&(a[s?"innerHTML":"textContent"]=i),e&&(a.className=e),a},c=function(t){t.parentNode.removeChild(t)},u=function(t,e,i){return void 0===i&&(i=!1),i?o(t,e):Object.assign(t,e)},p=function(t,e){return t.toLowerCase()+":to:"+e.toLowerCase()},d=function(t,e){Object.assign(t.prototype,e)},f={},m=1,g={on:function(t,e,i,s){void 0===s&&(s={});var a="jvm:"+e+"::"+m++;f[a]={selector:t,handler:i},i._uid=a,t.addEventListener(e,i,s)},delegate:function(t,e,i,s){(e=e.split(" ")).forEach((function(e){g.on(t,e,(function(t){var e=t.target;e.matches(i)&&s.call(e,t)}))}))},off:function(t,e,i){var s=e.split(":")[1];t.removeEventListener(s,i),delete f[i._uid]},flush:function(){Object.keys(f).forEach((function(t){g.off(f[t].selector,t,f[t].handler)}))},getEventRegistry:function(){return f}};var v={onViewportChange:"viewport:changed",onRegionClick:"region:clicked",onMarkerClick:"marker:clicked",onRegionSelected:"region:selected",onMarkerSelected:"marker:selected",onRegionTooltipShow:"region.tooltip:show",onMarkerTooltipShow:"marker.tooltip:show",onLoaded:"map:loaded",onDestroyed:"map:destroyed"};function y(t,e,i){var s=h(e),a=-1===s.getAttribute("class").indexOf("jvm-region")?"marker":"region",n="region"===a?s.getAttribute("data-code"):s.getAttribute("data-index"),r=a+":selected";return i&&(r=a+".tooltip:show"),{event:r,type:a,code:n,element:"region"===a?t.regions[n].element:t.markers[n].element,tooltipText:"region"===a?t.mapData.paths[n].name||"":t.markers[n].config.name||""}}function b(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,_(t,e)}function _(t,e){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_(t,e)}function w(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}function k(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return S(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?S(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var s=0;return function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var x=function(){function t(){}return t.prototype.dispose=function(){this._tooltip?c(this._tooltip):this.shape.remove();for(var t,e=k(Object.getOwnPropertyNames(this));!(t=e()).done;){this[t.value]=null}},t}(),M={getLabelText:function(t,e){if(e){if("function"==typeof e.render){var i=[];return this.config&&this.config.marker&&i.push(this.config.marker),i.push(t),e.render.apply(this,i)}return t}},getLabelOffsets:function(t,e){return"function"==typeof e.offsets?e.offsets(t):Array.isArray(e.offsets)?e.offsets[t]:[0,0]},setStyle:function(t,e){this.shape.setStyle(t,e)},remove:function(){this.shape.remove(),this.label&&this.label.remove()},hover:function(t){this._setStatus("isHovered",t)},select:function(t){this._setStatus("isSelected",t)},_setStatus:function(t,e){this.shape[t]=e,this.shape.updateStyle(),this[t]=e,this.label&&(this.label[t]=e,this.label.updateStyle())}},j=function(t){function e(e){var i,s=e.map,a=e.code,n=e.path,r=e.style,o=e.label,h=e.labelStyle,l=e.labelsGroup;(i=t.call(this)||this)._map=s,i.shape=i._createRegion(n,a,r);var c=i.shape.getBBox(),u=i.getLabelText(a,o);if(o&&u){var p=i.getLabelOffsets(a,o);i.labelX=c.x+c.width/2+p[0],i.labelY=c.y+c.height/2+p[1],i.label=i._map.canvas.createText({text:u,textAnchor:"middle",alignmentBaseline:"central",dataCode:a,x:i.labelX,y:i.labelY},h,l),i.label.addClass("jvm-region jvm-element")}return i}b(e,t);var i=e.prototype;return i._createRegion=function(t,e,i){return(t=this._map.canvas.createPath({d:t,dataCode:e},i)).addClass("jvm-region jvm-element"),t},i.updateLabelPosition=function(){this.label&&this.label.set({x:this.labelX*this._map.scale+this._map.transX*this._map.scale,y:this.labelY*this._map.scale+this._map.transY*this._map.scale})},e}(x);d(j,M);var C=function(t){function e(e){var i,s=e.index,a=e.map,n=e.style,r=e.x1,o=e.y1,h=e.x2,l=e.y2,c=e.group,u=e.config;return(i=t.call(this)||this).config=u,i.shape=a.canvas.createLine({x1:r,y1:o,x2:h,y2:l,dataIndex:s},n,c),i.shape.addClass("jvm-line"),i}return b(e,t),e.prototype.setStyle=function(t,e){this.shape.setStyle(t,e)},e}(x);var L=function(t){function e(e){var i,s=e.index,a=e.style,n=e.label,r=e.cx,o=e.cy,h=e.map,l=e.group;return(i=t.call(this)||this)._map=h,i._isImage=!!a.initial.image,i.config=arguments[0],i.shape=h.canvas[i._isImage?"createImage":"createCircle"]({dataIndex:s,cx:r,cy:o},a,l),i.shape.addClass("jvm-marker jvm-element"),i._isImage&&i.updateLabelPosition(),n&&i._createLabel(i.config),i}b(e,t);var i=e.prototype;return i.updateLabelPosition=function(){this.label&&this.label.set({x:this._labelX*this._map.scale+this._offsets[0]+this._map.transX*this._map.scale+5+(this._isImage?(this.shape.width||0)/2:this.shape.node.r.baseVal.value),y:this._labelY*this._map.scale+this._map.transY*this._map.scale+this._offsets[1]})},i._createLabel=function(t){var e=t.index,i=t.map,s=t.label,a=t.labelsGroup,n=t.cx,r=t.cy,o=t.marker,h=t.isRecentlyCreated,l=this.getLabelText(e,s);this._labelX=n/i.scale-i.transX,this._labelY=r/i.scale-i.transY,this._offsets=h&&o.offsets?o.offsets:this.getLabelOffsets(e,s),this.label=i.canvas.createText({text:l,dataIndex:e,x:this._labelX,y:this._labelY,dy:"0.6ex"},i.params.markerLabelStyle,a),this.label.addClass("jvm-marker jvm-element"),h&&this.updateLabelPosition()},e}(x);d(L,M);var O=function(){function t(t){void 0===t&&(t={}),this._options=t,this._map=this._options.map,this._series=this._options.series,this._body=l("div","jvm-legend"),this._options.cssClass&&this._body.setAttribute("class",this._options.cssClass),t.vertical?this._map.legendVertical.appendChild(this._body):this._map.legendHorizontal.appendChild(this._body),this.render()}return t.prototype.render=function(){var t,e,i,s,a=this._series.scale.getTicks(),n=l("div","jvm-legend-inner");if(this._body.innderHTML="",this._options.title){var r=l("div","jvm-legend-title",this._options.title);this._body.appendChild(r)}this._body.appendChild(n);for(var o=0;o<a.length;o++){switch(t=l("div","jvm-legend-tick"),e=l("div","jvm-legend-tick-sample"),this._series.config.attribute){case"fill":s=a[o].value,/\.(jpg|gif|png)$/.test(s)?e.style.background="url("+a[o].value+")":e.style.background=a[o].value;break;case"stroke":e.style.background=a[o].value;break;case"image":e.style.background="url("+("object"==typeof a[o].value?a[o].value.url:a[o].value)+") no-repeat center center",e.style.backgroundSize="cover"}t.appendChild(e),i=a[o].label,this._options.labelRender&&(i=this._options.labelRender(i));var h=l("div","jvm-legend-tick-text",i);t.appendChild(h),n.appendChild(t)}},t}(),A=function(){function t(t){this._scale=t}var e=t.prototype;return e.getValue=function(t){return this._scale[t]},e.getTicks=function(){var t=[];for(var e in this._scale)t.push({label:e,value:this._scale[e]});return t},t}(),X=function(){function t(t,e,i){void 0===t&&(t={}),this._map=i,this._elements=e,this._values=t.values||{},this.config=t,this.config.attribute=t.attribute||"fill",t.attributes&&this.setAttributes(t.attributes),"object"==typeof t.scale&&(this.scale=new A(t.scale)),this.config.legend&&(this.legend=new O(u({map:this._map,series:this},this.config.legend))),this.setValues(this._values)}var e=t.prototype;return e.setValues=function(t){var e={};for(var i in t)t[i]&&(e[i]=this.scale.getValue(t[i]));this.setAttributes(e)},e.setAttributes=function(t){for(var e in t)this._elements[e]&&this._elements[e].element.setStyle(this.config.attribute,t[e])},e.clear=function(){var t,e={};for(t in this._values)this._elements[t]&&(e[t]=this._elements[t].element.shape.style.initial[this.config.attribute]);this.setAttributes(e),this._values={}},t}();var Y={mill:function(t,e,i){return{x:this.radius*(e-i)*this.radDeg,y:-this.radius*Math.log(Math.tan((45+.4*t)*this.radDeg))/.8}},merc:function(t,e,i){return{x:this.radius*(e-i)*this.radDeg,y:-this.radius*Math.log(Math.tan(Math.PI/4+t*Math.PI/360))}},aea:function(t,e,i){var s=i*this.radDeg,a=29.5*this.radDeg,n=45.5*this.radDeg,r=t*this.radDeg,o=e*this.radDeg,h=(Math.sin(a)+Math.sin(n))/2,l=Math.cos(a)*Math.cos(a)+2*h*Math.sin(a),c=h*(o-s),u=Math.sqrt(l-2*h*Math.sin(r))/h,p=Math.sqrt(l-2*h*Math.sin(0))/h;return{x:u*Math.sin(c)*this.radius,y:-(p-u*Math.cos(c))*this.radius}},lcc:function(t,e,i){var s=i*this.radDeg,a=e*this.radDeg,n=33*this.radDeg,r=45*this.radDeg,o=t*this.radDeg,h=Math.log(Math.cos(n)*(1/Math.cos(r)))/Math.log(Math.tan(Math.PI/4+r/2)*(1/Math.tan(Math.PI/4+n/2))),l=Math.cos(n)*Math.pow(Math.tan(Math.PI/4+n/2),h)/h,c=l*Math.pow(1/Math.tan(Math.PI/4+o/2),h),u=l*Math.pow(1/Math.tan(Math.PI/4+0),h);return{x:c*Math.sin(h*(a-s))*this.radius,y:-(u-c*Math.cos(h*(a-s)))*this.radius}}};Y.degRad=180/Math.PI,Y.radDeg=Math.PI/180,Y.radius=6381372;var E={_setupContainerEvents:function(){var t,e,i=this,s=!1,a=this;this.params.draggable&&(g.on(this.container,"mousemove",(function(i){if(!s)return!1;a.transX-=(t-i.pageX)/a.scale,a.transY-=(e-i.pageY)/a.scale,a._applyTransform(),t=i.pageX,e=i.pageY})),g.on(this.container,"mousedown",(function(i){return s=!0,t=i.pageX,e=i.pageY,!1})),g.on(document.body,"mouseup",(function(){s=!1}))),this.params.zoomOnScroll&&g.on(this.container,"wheel",(function(t){var e=0;e=(t.deltaY||-t.wheelDelta||t.detail)>>10||1,e*=75;var s=i.container.getBoundingClientRect(),n=t.pageX-s.left-window.pageXOffset,r=t.pageY-s.top-window.pageYOffset,o=Math.pow(1+a.params.zoomOnScrollSpeed/1e3,-1.5*e);a.tooltip&&a.tooltip.hide(),a._setScale(a.scale*o,n,r),t.preventDefault()}))},_setupElementEvents:function(){var t,e,i,s=this,a=this.container;g.on(a,"mousemove",(function(s){Math.abs(t-s.pageX)+Math.abs(e-s.pageY)>2&&(i=!0)})),g.delegate(a,"mousedown",".jvm-element",(function(s){t=s.pageX,e=s.pageY,i=!1})),g.delegate(a,"mouseover mouseout",".jvm-element",(function(t){var e=y(s,this,!0),i=s.params.showTooltip;"mouseover"===t.type?(e.element.hover(!0),s.tooltip.text(e.tooltipText),s._emit(e.event,[t,s.tooltip,e.code]),t.defaultPrevented||i&&s.tooltip.show()):(e.element.hover(!1),i&&s.tooltip.hide())})),g.delegate(a,"mouseup",".jvm-element",(function(t){var e=y(s,this);if(!i&&("region"===e.type&&s.params.regionsSelectable||"marker"===e.type&&s.params.markersSelectable)){var a=e.element;s.params[e.type+"sSelectableOne"]&&s._clearSelected(e.type+"s"),e.element.isSelected?a.select(!1):a.select(!0),s._emit(e.event,[e.code,a.isSelected,s._getSelected(e.type+"s")])}})),g.delegate(a,"click",".jvm-element",(function(t){var e=y(s,this),i=e.type,a=e.code;s._emit("region"===i?v.onRegionClick:v.onMarkerClick,[t,a])}))},_setupZoomButtons:function(){var t=this,e=this,i=l("div","jvm-zoom-btn jvm-zoomin","&#43;",!0),s=l("div","jvm-zoom-btn jvm-zoomout","&#x2212",!0);this.container.appendChild(i),this.container.appendChild(s),g.on(i,"click",(function(){t._setScale(e.scale*e.params.zoomStep,e.width/2,e.height/2,!1,e.params.zoomAnimate)})),g.on(s,"click",(function(){t._setScale(e.scale/e.params.zoomStep,e.width/2,e.height/2,!1,e.params.zoomAnimate)}))},_setupContainerTouchEvents:function(){var t,e,i,s,a,n,r,o=this,h=function(h){var l,c,u,p,d=h.touches;if("touchstart"==h.type&&(r=0),1==d.length)1==r&&(u=o.transX,p=o.transY,o.transX-=(i-d[0].pageX)/o.scale,o.transY-=(s-d[0].pageY)/o.scale,o.tooltip.hide(),o._applyTransform(),u==o.transX&&p==o.transY||h.preventDefault()),i=d[0].pageX,s=d[0].pageY;else if(2==d.length)if(2==r)c=Math.sqrt(Math.pow(d[0].pageX-d[1].pageX,2)+Math.pow(d[0].pageY-d[1].pageY,2))/e,o._setScale(t*c,a,n),o.tooltip.hide(),h.preventDefault();else{var f=o.container.selector.getBoundingClientRect();l={top:f.top+window.scrollY,left:f.left+window.scrollX},a=d[0].pageX>d[1].pageX?d[1].pageX+(d[0].pageX-d[1].pageX)/2:d[0].pageX+(d[1].pageX-d[0].pageX)/2,n=d[0].pageY>d[1].pageY?d[1].pageY+(d[0].pageY-d[1].pageY)/2:d[0].pageY+(d[1].pageY-d[0].pageY)/2,a-=l.left,n-=l.top,t=o.scale,e=Math.sqrt(Math.pow(d[0].pageX-d[1].pageX,2)+Math.pow(d[0].pageY-d[1].pageY,2))}r=d.length};g.on(o.container,"touchstart",h),g.on(o.container,"touchmove",h)},_createRegions:function(){var t,e;for(t in this._regionLabelsGroup=this._regionLabelsGroup||this.canvas.createGroup("jvm-regions-labels-group"),this.mapData.paths)e=new j({map:this,code:t,path:this.mapData.paths[t].path,style:u({},this.params.regionStyle),labelStyle:this.params.regionLabelStyle,labelsGroup:this._regionLabelsGroup,label:this.params.labels&&this.params.labels.regions}),this.regions[t]={config:this.mapData.paths[t],element:e}},_createLines:function(t,e,i){void 0===i&&(i=!1);var s=!1,a=!1;for(var n in this.linesGroup=this.linesGroup||this.canvas.createGroup("jvm-lines-group"),t){var r=t[n];for(var o in e){var h=i?e[o].config:e[o];h.name===r.from&&(s=this.getMarkerPosition(h)),h.name===r.to&&(a=this.getMarkerPosition(h))}!1!==s&&!1!==a&&(this.lines[p(r.from,r.to)]=new C({index:n,map:this,style:u({initial:this.params.lineStyle},{initial:r.style||{}},!0),x1:s.x,y1:s.y,x2:a.x,y2:a.y,group:this.linesGroup,config:r}))}},_createMarkers:function(t,e){var i,s,a,n,r=this;for(var o in void 0===t&&(t={}),void 0===e&&(e=!1),this._markersGroup=this._markersGroup||this.canvas.createGroup("jvm-markers-group"),this._markerLabelsGroup=this._markerLabelsGroup||this.canvas.createGroup("jvm-markers-labels-group"),t)if(i=t[o],a=this.getMarkerPosition(i),n=i.coords.join(":"),a){if(e){if(Object.keys(this.markers).filter((function(t){return r.markers[t]._uid===n})).length)continue;o=Object.keys(this.markers).length}s=new L({index:o,map:this,style:u(this.params.markerStyle,{initial:i.style||{}},!0),label:this.params.labels&&this.params.labels.markers,labelsGroup:this._markerLabelsGroup,cx:a.x,cy:a.y,group:this._markersGroup,marker:i,isRecentlyCreated:e}),this.markers[o]&&this.removeMarkers([o]),this.markers[o]={_uid:n,config:i,element:s}}},_createSeries:function(){for(var t in this.series={markers:[],regions:[]},this.params.series)for(var e=0;e<this.params.series[t].length;e++)this.series[t][e]=new X(this.params.series[t][e],this[t],this)},_applyTransform:function(){var t,e,i,s;this.defaultWidth*this.scale<=this.width?(t=(this.width-this.defaultWidth*this.scale)/(2*this.scale),i=(this.width-this.defaultWidth*this.scale)/(2*this.scale)):(t=0,i=(this.width-this.defaultWidth*this.scale)/this.scale),this.defaultHeight*this.scale<=this.height?(e=(this.height-this.defaultHeight*this.scale)/(2*this.scale),s=(this.height-this.defaultHeight*this.scale)/(2*this.scale)):(e=0,s=(this.height-this.defaultHeight*this.scale)/this.scale),this.transY>e?this.transY=e:this.transY<s&&(this.transY=s),this.transX>t?this.transX=t:this.transX<i&&(this.transX=i),this.canvas.applyTransformParams(this.scale,this.transX,this.transY),this.markers&&this._repositionMarkers(),this.lines&&this._repositionLines(),this._repositionLabels()},_resize:function(){var t=this.baseScale;this.width/this.height>this.defaultWidth/this.defaultHeight?(this.baseScale=this.height/this.defaultHeight,this.baseTransX=Math.abs(this.width-this.defaultWidth*this.baseScale)/(2*this.baseScale)):(this.baseScale=this.width/this.defaultWidth,this.baseTransY=Math.abs(this.height-this.defaultHeight*this.baseScale)/(2*this.baseScale)),this.scale*=this.baseScale/t,this.transX*=this.baseScale/t,this.transY*=this.baseScale/t},_setScale:function(t,e,i,s,a){var n,r,o,h,l,c,u,p,d,f,m=this,g=0,y=Math.abs(Math.round(60*(t-this.scale)/Math.max(t,this.scale)));t>this.params.zoomMax*this.baseScale?t=this.params.zoomMax*this.baseScale:t<this.params.zoomMin*this.baseScale&&(t=this.params.zoomMin*this.baseScale),void 0!==e&&void 0!==i&&(n=t/this.scale,s?(d=e+this.defaultWidth*(this.width/(this.defaultWidth*t))/2,f=i+this.defaultHeight*(this.height/(this.defaultHeight*t))/2):(d=this.transX-(n-1)/t*e,f=this.transY-(n-1)/t*i)),a&&y>0?(o=this.scale,h=(t-o)/y,l=this.transX*this.scale,u=this.transY*this.scale,c=(d*t-l)/y,p=(f*t-u)/y,r=setInterval((function(){g+=1,m.scale=o+h*g,m.transX=(l+c*g)/m.scale,m.transY=(u+p*g)/m.scale,m._applyTransform(),g==y&&(clearInterval(r),m._emit(v.onViewportChange,[m.scale,m.transX,m.transY]))}),10)):(this.transX=d,this.transY=f,this.scale=t,this._applyTransform(),this._emit(v.onViewportChange,[this.scale,this.transX,this.transY]))},setFocus:function(t){var e=this;void 0===t&&(t={});var i,s=[];if(t.region?s.push(t.region):t.regions&&(s=t.regions),s.length)return s.forEach((function(t){if(e.regions[t]){var s=e.regions[t].element.shape.getBBox();s&&(i=void 0===i?s:{x:Math.min(i.x,s.x),y:Math.min(i.y,s.y),width:Math.max(i.x+i.width,s.x+s.width)-Math.min(i.x,s.x),height:Math.max(i.y+i.height,s.y+s.height)-Math.min(i.y,s.y)})}})),this._setScale(Math.min(this.width/i.width,this.height/i.height),-(i.x+i.width/2),-(i.y+i.height/2),!0,t.animate);if(t.coords){var a=this.coordsToPoint(t.coords[0],t.coords[1]),n=this.transX-a.x/this.scale,r=this.transY-a.y/this.scale;return this._setScale(t.scale*this.baseScale,n,r,!0,t.animate)}},updateSize:function(){this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this._resize(),this.canvas.setSize(this.width,this.height),this._applyTransform()},coordsToPoint:function(t,e){var i,s,a,n=V.maps[this.params.map].projection,r=n.centralMeridian;return i=Y[n.type](t,e,r),!!(s=this.getInsetForPoint(i.x,i.y))&&(a=s.bbox,i.x=(i.x-a[0].x)/(a[1].x-a[0].x)*s.width*this.scale,i.y=(i.y-a[0].y)/(a[1].y-a[0].y)*s.height*this.scale,{x:i.x+this.transX*this.scale+s.left*this.scale,y:i.y+this.transY*this.scale+s.top*this.scale})},getInsetForPoint:function(t,e){var i,s,a=V.maps[this.params.map].insets;for(i=0;i<a.length;i++)if(t>(s=a[i].bbox)[0].x&&t<s[1].x&&e>s[0].y&&e<s[1].y)return a[i]},getMarkerPosition:function(t){var e=t.coords;return V.maps[this.params.map].projection?this.coordsToPoint.apply(this,e):{x:e[0]*this.scale+this.transX*this.scale,y:e[1]*this.scale+this.transY*this.scale}},_repositionLines:function(){var t=!1,e=!1;for(var i in this.lines){for(var s in this.markers){var a=this.markers[s];a.config.name===this.lines[i].config.from&&(t=this.getMarkerPosition(a.config)),a.config.name===this.lines[i].config.to&&(e=this.getMarkerPosition(a.config))}!1!==t&&!1!==e&&this.lines[i].setStyle({x1:t.x,y1:t.y,x2:e.x,y2:e.y})}},_repositionMarkers:function(){var t;for(var e in this.markers)!1!==(t=this.getMarkerPosition(this.markers[e].config))&&this.markers[e].element.setStyle({cx:t.x,cy:t.y})},_repositionLabels:function(){var t=this.params.labels;if(t){if(t.regions)for(var e in this.regions)this.regions[e].element.updateLabelPosition();if(t.markers)for(var i in this.markers)this.markers[i].element.updateLabelPosition()}}},T=function(){function t(t,e){this.node=this._createElement(t),e&&this.set(e)}var e=t.prototype;return e._createElement=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)},e.addClass=function(t){this.node.setAttribute("class",t)},e.getBBox=function(){return this.node.getBBox()},e.set=function(t,e){if("object"==typeof t)for(var i in t)this.applyAttr(i,t[i]);else this.applyAttr(t,e)},e.get=function(t){return this.style.initial[t]},e.applyAttr=function(t,e){this.node.setAttribute(t.replace(/[\w]([A-Z])/g,(function(t){return t[0]+"-"+t[1]})).toLowerCase(),e)},e.remove=function(){c(this.node)},t}(),z=function(t){function e(e,i,s){var a;return void 0===s&&(s={}),(a=t.call(this,e,i)||this).isHovered=!1,a.isSelected=!1,a.style=s,a.style.current={},a.updateStyle(),a}b(e,t);var i=e.prototype;return i.setStyle=function(t,e){var i;"object"==typeof t?u(this.style.current,t):u(this.style.current,((i={})[t]=e,i));this.updateStyle()},i.updateStyle=function(){var t={};u(t,this.style.initial),u(t,this.style.current),this.isHovered&&u(t,this.style.hover),this.isSelected&&(u(t,this.style.selected),this.isHovered&&u(t,this.style.selectedHover)),this.set(t)},e}(T),P=function(t){function e(e,i){return t.call(this,"text",e,i)||this}return b(e,t),e.prototype.applyAttr=function(e,i){"text"===e?this.node.textContent=i:t.prototype.applyAttr.call(this,e,i)},e}(z),D=function(t){function e(e,i){return t.call(this,"image",e,i)||this}return b(e,t),e.prototype.applyAttr=function(e,i){var s;"image"===e?("object"==typeof i?(s=i.url,this.offset=i.offset||[0,0]):(s=i,this.offset=[0,0]),this.node.setAttributeNS("http://www.w3.org/1999/xlink","href",s),this.width=23,this.height=23,this.applyAttr("width",this.width),this.applyAttr("height",this.height),this.applyAttr("x",this.cx-this.width/2+this.offset[0]),this.applyAttr("y",this.cy-this.height/2+this.offset[1])):"cx"==e?(this.cx=i,this.width&&this.applyAttr("x",i-this.width/2+this.offset[0])):"cy"==e?(this.cy=i,this.height&&this.applyAttr("y",i-this.height/2+this.offset[1])):t.prototype.applyAttr.apply(this,arguments)},e}(z),I=function(t){function e(e){var i;return(i=t.call(this,"svg")||this)._container=e,i._defsElement=new T("defs"),i._rootElement=new T("g",{id:"jvm-regions-group"}),i.node.appendChild(i._defsElement.node),i.node.appendChild(i._rootElement.node),i._container.appendChild(i.node),i}b(e,t);var i=e.prototype;return i.setSize=function(t,e){this.node.setAttribute("width",t),this.node.setAttribute("height",e)},i.applyTransformParams=function(t,e,i){this._rootElement.node.setAttribute("transform","scale("+t+") translate("+e+", "+i+")")},i.createPath=function(t,e){var i=new z("path",t,e);return i.node.setAttribute("fill-rule","evenodd"),this.add(i)},i.createCircle=function(t,e,i){var s=new z("circle",t,e);return this.add(s,i)},i.createLine=function(t,e,i){var s=new z("line",t,e);return this.add(s,i)},i.createText=function(t,e,i){var s=new P(t,e);return this.add(s,i)},i.createImage=function(t,e,i){var s=new D(t,e);return this.add(s,i)},i.createGroup=function(t){var e=new T("g");return this.node.appendChild(e.node),t&&(e.node.id=t),e.canvas=this,e},i.add=function(t,e){return(e=e||this._rootElement).node.appendChild(t.node),t},e}(T),R=function(t){function e(e){var i;i=t.call(this)||this;var s=l("div","jvm-tooltip");return i._map=e,i._tooltip=document.body.appendChild(s),i._bindEventListeners(),w(i)||w(i)}b(e,t);var i=e.prototype;return i._bindEventListeners=function(){var t=this;g.on(this._map.container,"mousemove",(function(e){if(t._tooltip.classList.contains("active")){var i,s,a=(i=t._map.container,s="#jvm-regions-group",Element.prototype.querySelector.call(i,s)).getBoundingClientRect(),n=t._tooltip.getBoundingClientRect(),r=n.height,o=n.width,h=e.clientY<=a.top+r+5,l=e.pageY-r-5,c=e.pageX-o-5;h&&(l+=r+5,c-=10),e.clientX<a.left+o+5&&(c=e.pageX+5+2,h&&(c+=10)),t.css({top:l+"px",left:c+"px"})}}))},i.getElement=function(){return this._tooltip},i.show=function(){this._tooltip.classList.add("active")},i.hide=function(){this._tooltip.classList.remove("active")},i.text=function(t,e){void 0===e&&(e=!1);var i=e?"innerHTML":"textContent";if(!t)return this._tooltip[i];this._tooltip[i]=t},i.css=function(t){for(var e in t)this._tooltip.style[e]=t[e];return this},e}(x),H=function(){function t(t,e){var i=t.scale,s=t.values;this._scale=i,this._values=s,this._fromColor=this.hexToRgb(i[0]),this._toColor=this.hexToRgb(i[1]),this._map=e,this.setMinMaxValues(s),this.visualize()}var e=t.prototype;return e.setMinMaxValues=function(t){for(var e in this.min=Number.MAX_VALUE,this.max=0,t)(e=parseFloat(t[e]))>this.max&&(this.max=e),e<this.min&&(this.min=e)},e.visualize=function(){var t,e={};for(var i in this._values)t=parseFloat(this._values[i]),isNaN(t)||(e[i]=this.getValue(t));this.setAttributes(e)},e.setAttributes=function(t){for(var e in t)this._map.regions[e]&&this._map.regions[e].element.setStyle("fill",t[e])},e.getValue=function(t){for(var e,i="#",s=0;s<3;s++)i+=(1===(e=Math.round(this._fromColor[s]+(this._toColor[s]-this._fromColor[s])*((t-this.min)/(this.max-this.min))).toString(16)).length?"0":"")+e;return i},e.hexToRgb=function(t){var e=0,i=0,s=0;return 4==t.length?(e="0x"+t[1]+t[1],i="0x"+t[2]+t[2],s="0x"+t[3]+t[3]):7==t.length&&(e="0x"+t[1]+t[2],i="0x"+t[3]+t[4],s="0x"+t[5]+t[6]),[parseInt(e),parseInt(i),parseInt(s)]},t}(),V=function(){function t(e){var i=this;if(void 0===e&&(e={}),this.params=u(t.defaults,e,!0),!t.maps[this.params.map])throw new Error("Attempt to use map which was not loaded: "+e.map);this.mapData=t.maps[this.params.map],this.regions={},this.markers={},this.lines={},this.defaultWidth=this.mapData.width,this.defaultHeight=this.mapData.height,this.height=0,this.width=0,this.scale=1,this.baseScale=1,this.transX=0,this.transY=0,this.baseTransX=0,this.baseTransY=0,"loading"!==document.readyState?this._init():window.addEventListener("DOMContentLoaded",(function(){return i._init()}))}var e=t.prototype;return e._init=function(){var t=this.params;this.container=h(t.selector),this.container.classList.add("jvm-container"),this.canvas=new I(this.container),this.setBackgroundColor(t.backgroundColor),this._createRegions(),this.updateSize(),this._createLines(t.lines||{},t.markers||{}),this._createMarkers(t.markers),this._repositionLabels(),this._setupContainerEvents(),this._setupElementEvents(),t.zoomButtons&&this._setupZoomButtons(),t.showTooltip&&(this.tooltip=new R(this)),t.selectedRegions&&this._setSelected("regions",t.selectedRegions),t.selectedMarkers&&this._setSelected("markers",t.selectedMarkers),t.focusOn&&this.setFocus(t.focusOn),t.visualizeData&&(this.dataVisualization=new H(t.visualizeData,this)),t.bindTouchEvents&&("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)&&this._setupContainerTouchEvents(),t.series&&(this.container.appendChild(this.legendHorizontal=l("div","jvm-series-container jvm-series-h")),this.container.appendChild(this.legendVertical=l("div","jvm-series-container jvm-series-v")),this._createSeries()),this._emit(v.onLoaded,[this])},e._emit=function(t,e){for(var i in v)v[i]===t&&"function"==typeof this.params[i]&&this.params[i].apply(this,e)},e.setBackgroundColor=function(t){this.container.style.backgroundColor=t},e._getSelected=function(t){var e,i=[];for(e in this[t])this[t][e].element.isSelected&&i.push(e);return i},e._setSelected=function(t,e){var i=this;e.forEach((function(e){i[t][e]&&i[t][e].element.select(!0)}))},e._clearSelected=function(t){var e=this;this._getSelected(t).forEach((function(i){e[t][i].element.select(!1)}))},e.getSelectedRegions=function(){return this._getSelected("regions")},e.clearSelectedRegions=function(){this._clearSelected("regions")},e.getSelectedMarkers=function(){return this._getSelected("markers")},e.clearSelectedMarkers=function(){this._clearSelected("markers")},e.addMarkers=function(t){if(Array.isArray(t))return this._createMarkers(t,!0);this._createMarkers([t],!0)},e.removeMarkers=function(t){var e=this;t||(t=Object.keys(this.markers)),t.forEach((function(t){e.markers[t].element.remove(),delete e.markers[t]}))},e.addLine=function(t,e,i){void 0===i&&(i={}),console.warn("`addLine` method is deprecated, please use `addLines` instead."),this._createLines([{from:t,to:e,style:i}],this.markers,!0)},e.addLines=function(t){var e=this._getLinesAsUids();Array.isArray(t)||(t=[t]),this._createLines(t.filter((function(t){return!(e.indexOf(p(t.from,t.to))>-1)})),this.markers,!0)},e.removeLines=function(t){var e=this;(t=Array.isArray(t)?t.map((function(t){return p(t.from,t.to)})):this._getLinesAsUids()).forEach((function(t){e.lines[t].dispose(),delete e.lines[t]}))},e._getLinesAsUids=function(){return Object.keys(this.lines)},e.removeLine=function(t,e){console.warn("`removeLine` method is deprecated, please use `removeLines` instead.");var i=p(t,e);this.lines.hasOwnProperty(i)&&(this.lines[i].element.remove(),delete this.lines[i])},e.reset=function(){for(var t in this.series)for(var e=0;e<this.series[t].length;e++)this.series[t][e].clear();this.legendHorizontal&&(c(this.legendHorizontal),this.legendHorizontal=null),this.legendVertical&&(c(this.legendVertical),this.legendVertical=null),this.scale=this.baseScale,this.transX=this.baseTransX,this.transY=this.baseTransY,this._applyTransform(),this.clearSelectedMarkers(),this.clearSelectedRegions(),this.removeMarkers()},e.destroy=function(t){var e=this;void 0===t&&(t=!0),g.flush(),this.tooltip.dispose(),this._emit(v.onDestroyed),t&&Object.keys(this).forEach((function(t){try{delete e[t]}catch(t){}}))},e.extend=function(e,i){if("function"==typeof this[e])throw new Error("The method ["+e+"] already exists internally please use another name.");t.prototype[e]=i},t}();V.maps={},V.defaults={map:"world",backgroundColor:"transparent",draggable:!0,zoomButtons:!0,zoomOnScroll:!0,zoomOnScrollSpeed:3,zoomMax:12,zoomMin:1,zoomAnimate:!0,showTooltip:!0,zoomStep:1.5,bindTouchEvents:!0,lineStyle:{stroke:"#808080",strokeWidth:1,strokeLinecap:"round"},markersSelectable:!1,markersSelectableOne:!1,markerStyle:{initial:{r:7,fill:"#374151",fillOpacity:1,stroke:"#FFF",strokeWidth:5,strokeOpacity:.5},hover:{fill:"#3cc0ff",cursor:"pointer"},selected:{fill:"blue"},selectedHover:{}},markerLabelStyle:{initial:{fontFamily:"Verdana",fontSize:12,fontWeight:500,cursor:"default",fill:"#374151"},hover:{cursor:"pointer"},selected:{},selectedHover:{}},regionsSelectable:!1,regionsSelectableOne:!1,regionStyle:{initial:{fill:"#dee2e8",fillOpacity:1,stroke:"none",strokeWidth:0},hover:{fillOpacity:.7,cursor:"pointer"},selected:{fill:"#9ca3af"},selectedHover:{}},regionLabelStyle:{initial:{fontFamily:"Verdana",fontSize:"12",fontWeight:"bold",cursor:"default",fill:"#35373e"},hover:{cursor:"pointer"}}},Object.assign(V.prototype,E);var G=function(){function t(t){if(void 0===t&&(t={}),!t.selector)throw new Error("Selector is not given.");return new V(t)}return t.addMap=function(t,e){V.maps[t]=e},t}();return window.jsVectorMap=G}));
@@ -61,7 +61,7 @@ declare type SubRange = number | WrappedSubRange;
61
61
  interface Range {
62
62
  min: SubRange;
63
63
  max: SubRange;
64
- [key: string]: SubRange;
64
+ [key: `${number}%`]: SubRange;
65
65
  }
66
66
  interface BasePips {
67
67
  mode: PipsMode;
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@tabler/core",
3
- "version": "1.0.0-beta11",
3
+ "version": "1.0.0-beta12",
4
4
  "description": "Premium and Open Source dashboard template with responsive and high quality UI.",
5
+ "homepage": "https://tabler.io",
5
6
  "scripts": {
6
7
  "start": "gulp start",
7
8
  "start-plugins": "gulp start --with-plugins",
@@ -15,7 +16,8 @@
15
16
  "bundlewatch": "bundlewatch --config .bundlewatch.config.json",
16
17
  "chromatic": "chromatic --project-token=CHROMATIC_PROJECT_TOKEN",
17
18
  "storybook": "start-storybook -p 6006",
18
- "changelog": "gulp changelog"
19
+ "changelog": "gulp changelog",
20
+ "icons": "ncu -u @tabler/icons && npm install && gulp svg-icons && git add . && git commit -am \"update icons to v`npm info @tabler/icons version`\" && git push"
19
21
  },
20
22
  "repository": {
21
23
  "type": "git",
@@ -54,22 +56,65 @@
54
56
  "umd:main": "dist/js/tabler.min.js",
55
57
  "module": "dist/js/tabler.esm.js",
56
58
  "main": "dist/js/tabler.js",
57
- "homepage": "https://tabler.io",
59
+ "bundlewatch": {
60
+ "files": [
61
+ {
62
+ "path": "./dist/css/tabler.css",
63
+ "maxSize": "61 kB"
64
+ },
65
+ {
66
+ "path": "./dist/css/tabler.min.css",
67
+ "maxSize": "55 kB"
68
+ },
69
+ {
70
+ "path": "./dist/css/tabler.rtl.css",
71
+ "maxSize": "61 kB"
72
+ },
73
+ {
74
+ "path": "./dist/css/tabler.rtl.min.css",
75
+ "maxSize": "55 kB"
76
+ },
77
+ {
78
+ "path": "./dist/css/tabler-flags.css",
79
+ "maxSize": "2 kB"
80
+ },
81
+ {
82
+ "path": "./dist/css/tabler-flags.min.css",
83
+ "maxSize": "2 kB"
84
+ },
85
+ {
86
+ "path": "./dist/css/tabler-payments.css",
87
+ "maxSize": "2 kB"
88
+ },
89
+ {
90
+ "path": "./dist/css/tabler-payments.min.css",
91
+ "maxSize": "2 kB"
92
+ },
93
+ {
94
+ "path": "./dist/js/tabler.js",
95
+ "maxSize": "100 kB"
96
+ },
97
+ {
98
+ "path": "./dist/js/tabler.min.js",
99
+ "maxSize": "50 kB"
100
+ }
101
+ ]
102
+ },
58
103
  "devDependencies": {
59
- "@babel/core": "^7.18.10",
60
- "@babel/preset-env": "^7.18.10",
61
- "@rollup/plugin-commonjs": "^22.0.1",
62
- "@rollup/plugin-node-resolve": "^13.3.0",
104
+ "@babel/core": "^7.19.0",
105
+ "@babel/preset-env": "^7.19.0",
106
+ "@rollup/plugin-commonjs": "^22.0.2",
107
+ "@rollup/plugin-node-resolve": "^14.0.0",
63
108
  "@rollup/plugin-replace": "^4.0.0",
64
109
  "@rollup/pluginutils": "^4.2.1",
65
110
  "@rollup/stream": "^2.0.0",
66
- "apexcharts": "^3.35.4",
111
+ "apexcharts": "^3.35.5",
67
112
  "autoprefixer": "^10.4.8",
68
113
  "autosize": "^5.0.1",
69
114
  "browser-sync": "^2.27.10",
70
115
  "bundlewatch": "^0.3.3",
71
116
  "choices.js": "^10.1.0",
72
- "chromatic": "^6.7.3",
117
+ "chromatic": "^6.9.0",
73
118
  "countup.js": "^2.3.2",
74
119
  "critical": "^4.0.1",
75
120
  "cross-spawn": "^7.0.3",
@@ -81,24 +126,24 @@
81
126
  "gulp-clean-css": "^4.3.0",
82
127
  "gulp-debug": "^4.0.0",
83
128
  "gulp-header": "^2.0.9",
84
- "gulp-minify": "^3.1.0",
85
129
  "gulp-postcss": "^9.0.1",
86
130
  "gulp-purgecss": "^4.1.3",
87
131
  "gulp-rename": "^2.0.0",
88
132
  "gulp-rtlcss": "^2.0.0",
89
133
  "gulp-sass": "^5.1.0",
134
+ "gulp-terser": "^2.1.0",
90
135
  "imask": "^6.4.2",
91
- "jsvectormap": "^1.5.0",
136
+ "jsvectormap": "^1.5.1",
92
137
  "list.js": "^2.3.1",
93
138
  "litepicker": "^2.0.12",
94
- "nouislider": "^15.6.0",
139
+ "nouislider": "^15.6.1",
95
140
  "plyr": "^3.7.2",
96
- "postcss": "^8.4.14",
97
- "release-it": "^15.2.0",
98
- "rollup": "^2.77.2",
141
+ "postcss": "^8.4.16",
142
+ "release-it": "^15.4.1",
143
+ "rollup": "^2.79.0",
99
144
  "rollup-plugin-babel": "^4.4.0",
100
145
  "rollup-plugin-cleanup": "^3.2.1",
101
- "sass": "^1.54.1",
146
+ "sass": "^1.54.8",
102
147
  "tinymce": "^6.1.2",
103
148
  "tom-select": "^2.1.0",
104
149
  "vinyl-buffer": "^1.0.1",
@@ -107,12 +152,13 @@
107
152
  "yargs": "^17.5.1"
108
153
  },
109
154
  "dependencies": {
110
- "@popperjs/core": "^2.11.5",
111
- "@tabler/icons": "^1.78.1",
112
- "bootstrap": "5.2.0"
155
+ "@popperjs/core": "^2.11.6",
156
+ "@tabler/icons": "^1.96.0",
157
+ "bootstrap": "5.2.0",
158
+ "node-sass": "^7.0.1"
113
159
  },
114
160
  "peerDependencies": {
115
- "apexcharts": "^3.35.4",
161
+ "apexcharts": "^3.35.5",
116
162
  "autosize": "^5.0.1",
117
163
  "choices.js": "^10.1.0",
118
164
  "countup.js": "^2.3.2",
@@ -120,10 +166,10 @@
120
166
  "flatpickr": "^4.6.13",
121
167
  "fslightbox": "^3.3.1",
122
168
  "imask": "^6.4.2",
123
- "jsvectormap": "^1.5.0",
169
+ "jsvectormap": "^1.5.1",
124
170
  "list.js": "^2.3.1",
125
171
  "litepicker": "^2.0.12",
126
- "nouislider": "^15.6.0",
172
+ "nouislider": "^15.6.1",
127
173
  "plyr": "^3.7.2",
128
174
  "tinymce": "^6.1.2",
129
175
  "tom-select": "^2.1.0"
@@ -0,0 +1,25 @@
1
+ /**
2
+ * demo-theme is specifically loaded right after the body and not deferred
3
+ * to ensure we switch to the chosen dark/light theme as fast as possible.
4
+ * This will prevent any flashes of the light theme (default) before switching.
5
+ */
6
+
7
+ const themeStorageKey = 'tablerTheme'
8
+ const defaultTheme = 'light'
9
+ let selectedTheme
10
+
11
+ // https://stackoverflow.com/a/901144
12
+ const params = new Proxy(new URLSearchParams(window.location.search), {
13
+ get: (searchParams, prop) => searchParams.get(prop),
14
+ });
15
+
16
+ if (!!params.theme) {
17
+ localStorage.setItem(themeStorageKey, params.theme)
18
+ selectedTheme = params.theme
19
+ } else {
20
+ const storedTheme = localStorage.getItem(themeStorageKey)
21
+ selectedTheme = storedTheme ? storedTheme : defaultTheme
22
+ }
23
+
24
+ document.body.classList.remove('theme-dark', 'theme-light');
25
+ document.body.classList.add(`theme-${selectedTheme}`);
package/src/js/demo.js CHANGED
@@ -1,6 +1,5 @@
1
1
  // Setting items
2
2
  const items = {
3
- 'theme': { localStorage: 'tablerTheme', default: 'light' },
4
3
  'menu-position': { localStorage: 'tablerMenuPosition', default: 'top' },
5
4
  'menu-behavior': { localStorage: 'tablerMenuBehavior', default: 'sticky' },
6
5
  'container-layout': { localStorage: 'tablerContainerLayout', default: 'boxed' }
@@ -44,16 +43,6 @@ const toggleFormControls = (form) => {
44
43
  }
45
44
  }
46
45
 
47
- // Update body classes
48
- const updateBodyClasses = () => {
49
- document.body.classList.remove('theme-dark', 'theme-light');
50
- document.body.classList.add(`theme-${config.theme}`);
51
-
52
- // for (const [key, params] of Object.entries(items)) {
53
- // document.body.setAttribute(`data-${key}`, config[key]);
54
- // }
55
- }
56
-
57
46
  // Submit form
58
47
  const submitForm = (form) => {
59
48
  // Save data to localStorage
@@ -66,9 +55,6 @@ const submitForm = (form) => {
66
55
  config[key] = value
67
56
  }
68
57
 
69
- // Update body classes
70
- updateBodyClasses();
71
-
72
58
  window.dispatchEvent(new Event('resize'));
73
59
 
74
60
  (new bootstrap.Offcanvas(form)).hide()
@@ -78,9 +64,6 @@ const submitForm = (form) => {
78
64
  // Parse url
79
65
  parseUrl()
80
66
 
81
- // Update body classes
82
- updateBodyClasses();
83
-
84
67
  // Elements
85
68
  const form = document.querySelector('#offcanvasSettings')
86
69
 
@@ -0,0 +1,17 @@
1
+ export const prefix = 'tblr-'
2
+
3
+ export const hexToRgba = (hex, opacity) => {
4
+ const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex)
5
+
6
+ return result ? `rgba(${parseInt(result[1], 16)}, ${parseInt(result[2], 16)}, ${parseInt(result[3], 16)}, ${opacity})` : null
7
+ }
8
+
9
+ export const getColor = (color, opacity = 1) => {
10
+ const c = getComputedStyle(document.body).getPropertyValue(`--${prefix}${color}`).trim()
11
+
12
+ if (opacity !== 1) {
13
+ return hexToRgba(c, opacity)
14
+ }
15
+
16
+ return c
17
+ }
package/src/js/tabler.js CHANGED
@@ -9,5 +9,7 @@ import './src/switch-icon';
9
9
  import './src/tab';
10
10
  import './src/toast';
11
11
  import * as bootstrap from 'bootstrap';
12
+ import * as tabler from './src/tabler';
12
13
 
13
14
  window.bootstrap = bootstrap;
15
+ window.tabler = tabler;
@@ -3,6 +3,7 @@
3
3
 
4
4
  @import "fonts/webfonts";
5
5
 
6
+ @import "layout/root";
6
7
  @import "layout/core";
7
8
  @import "layout/navbar";
8
9
  @import "layout/page";
@@ -47,29 +47,29 @@
47
47
  // Override bootstrap core
48
48
  }
49
49
 
50
- //@mixin button-variant(
51
- // $background: null,
52
- // $border: null,
53
- // $color: null,
54
- // $hover-background: null,
55
- // $hover-border: null,
56
- // $hover-color: null,
57
- // $active-background: null,
58
- // $active-border: null,
59
- // $active-color: null,
60
- // $disabled-background: null,
61
- // $disabled-border: null,
62
- // $disabled-color: null
63
- //) {
64
- // // Override bootstrap core
65
- //}
66
- //
67
- //@mixin button-outline-variant(
68
- // $color: null,
69
- // $color-hover: null,
70
- // $active-background: null,
71
- // $active-border: null,
72
- // $active-color: null
73
- //) {
74
- // // Override bootstrap core
75
- //}
50
+ @mixin button-variant(
51
+ $background: null,
52
+ $border: null,
53
+ $color: null,
54
+ $hover-background: null,
55
+ $hover-border: null,
56
+ $hover-color: null,
57
+ $active-background: null,
58
+ $active-border: null,
59
+ $active-color: null,
60
+ $disabled-background: null,
61
+ $disabled-border: null,
62
+ $disabled-color: null
63
+ ) {
64
+ // Override bootstrap core
65
+ }
66
+
67
+ @mixin button-outline-variant(
68
+ $color: null,
69
+ $color-hover: null,
70
+ $active-background: null,
71
+ $active-border: null,
72
+ $active-color: null
73
+ ) {
74
+ // Override bootstrap core
75
+ }
@@ -1,8 +1,8 @@
1
1
  $margin-spacers: map-merge($spacers, (auto: auto, null: $spacer));
2
2
 
3
3
  $border-values: (
4
- null: $border-width solid $border-color-transparent,
5
- wide: $border-width-wide solid $border-color-transparent,
4
+ null: $border-width solid $border-color-translucent,
5
+ wide: $border-width-wide solid $border-color-translucent,
6
6
  0: 0,
7
7
  );
8
8