mdkcontroller 1.4.5 → 1.4.7

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 (115) hide show
  1. package/Cores/file/close.png +0 -0
  2. package/Cores/file/dk.css +8 -5
  3. package/Cores/file/dk.js +109 -3
  4. package/Cores/file/iconlogin.png +0 -0
  5. package/Cores/login/iconAuthen.png +0 -0
  6. package/Cores/login/index.html +212 -130
  7. package/Cores/login/register.html +192 -137
  8. package/dk_modules/users.js +52 -0
  9. package/main.js +9 -2
  10. package/package.json +2 -2
  11. package/Cores/login/css/main.css +0 -462
  12. package/Cores/login/css/util.css +0 -2993
  13. package/Cores/login/fonts/font-awesome-4.7.0/HELP-US-OUT.txt +0 -7
  14. package/Cores/login/fonts/font-awesome-4.7.0/css/font-awesome.css +0 -2337
  15. package/Cores/login/fonts/font-awesome-4.7.0/css/font-awesome.min.css +0 -4
  16. package/Cores/login/fonts/font-awesome-4.7.0/fonts/FontAwesome.otf +0 -0
  17. package/Cores/login/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.eot +0 -0
  18. package/Cores/login/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.svg +0 -2671
  19. package/Cores/login/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf +0 -0
  20. package/Cores/login/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.woff +0 -0
  21. package/Cores/login/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2 +0 -0
  22. package/Cores/login/fonts/font-awesome-4.7.0/less/animated.less +0 -34
  23. package/Cores/login/fonts/font-awesome-4.7.0/less/bordered-pulled.less +0 -25
  24. package/Cores/login/fonts/font-awesome-4.7.0/less/core.less +0 -12
  25. package/Cores/login/fonts/font-awesome-4.7.0/less/fixed-width.less +0 -6
  26. package/Cores/login/fonts/font-awesome-4.7.0/less/font-awesome.less +0 -18
  27. package/Cores/login/fonts/font-awesome-4.7.0/less/icons.less +0 -789
  28. package/Cores/login/fonts/font-awesome-4.7.0/less/larger.less +0 -13
  29. package/Cores/login/fonts/font-awesome-4.7.0/less/list.less +0 -19
  30. package/Cores/login/fonts/font-awesome-4.7.0/less/mixins.less +0 -60
  31. package/Cores/login/fonts/font-awesome-4.7.0/less/path.less +0 -15
  32. package/Cores/login/fonts/font-awesome-4.7.0/less/rotated-flipped.less +0 -20
  33. package/Cores/login/fonts/font-awesome-4.7.0/less/screen-reader.less +0 -5
  34. package/Cores/login/fonts/font-awesome-4.7.0/less/stacked.less +0 -20
  35. package/Cores/login/fonts/font-awesome-4.7.0/less/variables.less +0 -800
  36. package/Cores/login/fonts/font-awesome-4.7.0/scss/_animated.scss +0 -34
  37. package/Cores/login/fonts/font-awesome-4.7.0/scss/_bordered-pulled.scss +0 -25
  38. package/Cores/login/fonts/font-awesome-4.7.0/scss/_core.scss +0 -12
  39. package/Cores/login/fonts/font-awesome-4.7.0/scss/_fixed-width.scss +0 -6
  40. package/Cores/login/fonts/font-awesome-4.7.0/scss/_icons.scss +0 -789
  41. package/Cores/login/fonts/font-awesome-4.7.0/scss/_larger.scss +0 -13
  42. package/Cores/login/fonts/font-awesome-4.7.0/scss/_list.scss +0 -19
  43. package/Cores/login/fonts/font-awesome-4.7.0/scss/_mixins.scss +0 -60
  44. package/Cores/login/fonts/font-awesome-4.7.0/scss/_path.scss +0 -15
  45. package/Cores/login/fonts/font-awesome-4.7.0/scss/_rotated-flipped.scss +0 -20
  46. package/Cores/login/fonts/font-awesome-4.7.0/scss/_screen-reader.scss +0 -5
  47. package/Cores/login/fonts/font-awesome-4.7.0/scss/_stacked.scss +0 -20
  48. package/Cores/login/fonts/font-awesome-4.7.0/scss/_variables.scss +0 -800
  49. package/Cores/login/fonts/font-awesome-4.7.0/scss/font-awesome.scss +0 -18
  50. package/Cores/login/fonts/montserrat/Montserrat-Black.ttf +0 -0
  51. package/Cores/login/fonts/montserrat/Montserrat-BlackItalic.ttf +0 -0
  52. package/Cores/login/fonts/montserrat/Montserrat-Bold.ttf +0 -0
  53. package/Cores/login/fonts/montserrat/Montserrat-BoldItalic.ttf +0 -0
  54. package/Cores/login/fonts/montserrat/Montserrat-ExtraBold.ttf +0 -0
  55. package/Cores/login/fonts/montserrat/Montserrat-ExtraBoldItalic.ttf +0 -0
  56. package/Cores/login/fonts/montserrat/Montserrat-ExtraLight.ttf +0 -0
  57. package/Cores/login/fonts/montserrat/Montserrat-ExtraLightItalic.ttf +0 -0
  58. package/Cores/login/fonts/montserrat/Montserrat-Italic.ttf +0 -0
  59. package/Cores/login/fonts/montserrat/Montserrat-Light.ttf +0 -0
  60. package/Cores/login/fonts/montserrat/Montserrat-LightItalic.ttf +0 -0
  61. package/Cores/login/fonts/montserrat/Montserrat-Medium.ttf +0 -0
  62. package/Cores/login/fonts/montserrat/Montserrat-MediumItalic.ttf +0 -0
  63. package/Cores/login/fonts/montserrat/Montserrat-Regular.ttf +0 -0
  64. package/Cores/login/fonts/montserrat/Montserrat-SemiBold.ttf +0 -0
  65. package/Cores/login/fonts/montserrat/Montserrat-SemiBoldItalic.ttf +0 -0
  66. package/Cores/login/fonts/montserrat/Montserrat-Thin.ttf +0 -0
  67. package/Cores/login/fonts/montserrat/Montserrat-ThinItalic.ttf +0 -0
  68. package/Cores/login/fonts/montserrat/OFL.txt +0 -93
  69. package/Cores/login/fonts/poppins/Poppins-Black.ttf +0 -0
  70. package/Cores/login/fonts/poppins/Poppins-BlackItalic.ttf +0 -0
  71. package/Cores/login/fonts/poppins/Poppins-Bold.ttf +0 -0
  72. package/Cores/login/fonts/poppins/Poppins-BoldItalic.ttf +0 -0
  73. package/Cores/login/fonts/poppins/Poppins-ExtraBold.ttf +0 -0
  74. package/Cores/login/fonts/poppins/Poppins-ExtraBoldItalic.ttf +0 -0
  75. package/Cores/login/fonts/poppins/Poppins-ExtraLight.ttf +0 -0
  76. package/Cores/login/fonts/poppins/Poppins-ExtraLightItalic.ttf +0 -0
  77. package/Cores/login/fonts/poppins/Poppins-Italic.ttf +0 -0
  78. package/Cores/login/fonts/poppins/Poppins-Light.ttf +0 -0
  79. package/Cores/login/fonts/poppins/Poppins-LightItalic.ttf +0 -0
  80. package/Cores/login/fonts/poppins/Poppins-Medium.ttf +0 -0
  81. package/Cores/login/fonts/poppins/Poppins-MediumItalic.ttf +0 -0
  82. package/Cores/login/fonts/poppins/Poppins-Regular.ttf +0 -0
  83. package/Cores/login/fonts/poppins/Poppins-SemiBold.ttf +0 -0
  84. package/Cores/login/fonts/poppins/Poppins-SemiBoldItalic.ttf +0 -0
  85. package/Cores/login/fonts/poppins/Poppins-Thin.ttf +0 -0
  86. package/Cores/login/fonts/poppins/Poppins-ThinItalic.ttf +0 -0
  87. package/Cores/login/images/icons/favicon.ico +0 -0
  88. package/Cores/login/images/img-01.png +0 -0
  89. package/Cores/login/js/main.js +0 -57
  90. package/Cores/login/vendor/animate/animate.css +0 -1579
  91. package/Cores/login/vendor/bootstrap/css/bootstrap-grid.css +0 -1353
  92. package/Cores/login/vendor/bootstrap/css/bootstrap-grid.css.map +0 -1
  93. package/Cores/login/vendor/bootstrap/css/bootstrap-grid.min.css +0 -2
  94. package/Cores/login/vendor/bootstrap/css/bootstrap-grid.min.css.map +0 -1
  95. package/Cores/login/vendor/bootstrap/css/bootstrap-reboot.css +0 -330
  96. package/Cores/login/vendor/bootstrap/css/bootstrap-reboot.css.map +0 -1
  97. package/Cores/login/vendor/bootstrap/css/bootstrap-reboot.min.css +0 -2
  98. package/Cores/login/vendor/bootstrap/css/bootstrap-reboot.min.css.map +0 -1
  99. package/Cores/login/vendor/bootstrap/css/bootstrap.css +0 -8185
  100. package/Cores/login/vendor/bootstrap/css/bootstrap.css.map +0 -1
  101. package/Cores/login/vendor/bootstrap/css/bootstrap.min.css +0 -7
  102. package/Cores/login/vendor/bootstrap/css/bootstrap.min.css.map +0 -1
  103. package/Cores/login/vendor/bootstrap/js/bootstrap.js +0 -3831
  104. package/Cores/login/vendor/bootstrap/js/bootstrap.min.js +0 -6
  105. package/Cores/login/vendor/bootstrap/js/popper.js +0 -2448
  106. package/Cores/login/vendor/bootstrap/js/popper.min.js +0 -5
  107. package/Cores/login/vendor/bootstrap/js/tooltip.js +0 -539
  108. package/Cores/login/vendor/css-hamburgers/hamburgers.css +0 -626
  109. package/Cores/login/vendor/css-hamburgers/hamburgers.min.css +0 -7
  110. package/Cores/login/vendor/jquery/jquery-3.2.1.min.js +0 -4
  111. package/Cores/login/vendor/select2/select2.css +0 -484
  112. package/Cores/login/vendor/select2/select2.js +0 -6450
  113. package/Cores/login/vendor/select2/select2.min.css +0 -1
  114. package/Cores/login/vendor/select2/select2.min.js +0 -3
  115. package/Cores/login/vendor/tilt/tilt.jquery.min.js +0 -1
@@ -1,5 +0,0 @@
1
- /*
2
- Copyright (C) Federico Zivolo 2017
3
- Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
4
- */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=window.getComputedStyle(e,null);return t?o[t]:o}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e||-1!==['HTML','BODY','#document'].indexOf(e.nodeName))return window.document.body;var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll)/.test(r+s+p)?e:n(o(e))}function r(e){var o=e&&e.offsetParent,i=o&&o.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(o.nodeName)&&'static'===t(o,'position')?r(o):o:window.document.documentElement}function p(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||r(e.firstElementChild)===e)}function s(e){return null===e.parentNode?e:s(e.parentNode)}function d(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return window.document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(n,0);var f=a.commonAncestorContainer;if(e!==f&&t!==f||i.contains(n))return p(f)?f:r(f);var l=s(e);return l.host?d(l.host,t):d(e,s(t).host)}function a(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',i=e.nodeName;if('BODY'===i||'HTML'===i){var n=window.document.documentElement,r=window.document.scrollingElement||n;return r[o]}return e[o]}function f(e,t){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=a(t,'top'),n=a(t,'left'),r=o?-1:1;return e.top+=i*r,e.bottom+=i*r,e.left+=n*r,e.right+=n*r,e}function l(e,t){var o='x'===t?'Left':'Top',i='Left'==o?'Right':'Bottom';return+e['border'+o+'Width'].split('px')[0]+ +e['border'+i+'Width'].split('px')[0]}function m(e,t,o,i){return _(t['offset'+e],o['client'+e],o['offset'+e],ie()?o['offset'+e]+i['margin'+('Height'===e?'Top':'Left')]+i['margin'+('Height'===e?'Bottom':'Right')]:0)}function h(){var e=window.document.body,t=window.document.documentElement,o=ie()&&window.getComputedStyle(t);return{height:m('Height',e,t,o),width:m('Width',e,t,o)}}function c(e){return se({},e,{right:e.left+e.width,bottom:e.top+e.height})}function g(e){var o={};if(ie())try{o=e.getBoundingClientRect();var i=a(e,'top'),n=a(e,'left');o.top+=i,o.left+=n,o.bottom+=i,o.right+=n}catch(e){}else o=e.getBoundingClientRect();var r={left:o.left,top:o.top,width:o.right-o.left,height:o.bottom-o.top},p='HTML'===e.nodeName?h():{},s=p.width||e.clientWidth||r.right-r.left,d=p.height||e.clientHeight||r.bottom-r.top,f=e.offsetWidth-s,m=e.offsetHeight-d;if(f||m){var g=t(e);f-=l(g,'x'),m-=l(g,'y'),r.width-=f,r.height-=m}return c(r)}function u(e,o){var i=ie(),r='HTML'===o.nodeName,p=g(e),s=g(o),d=n(e),a=t(o),l=+a.borderTopWidth.split('px')[0],m=+a.borderLeftWidth.split('px')[0],h=c({top:p.top-s.top-l,left:p.left-s.left-m,width:p.width,height:p.height});if(h.marginTop=0,h.marginLeft=0,!i&&r){var u=+a.marginTop.split('px')[0],b=+a.marginLeft.split('px')[0];h.top-=l-u,h.bottom-=l-u,h.left-=m-b,h.right-=m-b,h.marginTop=u,h.marginLeft=b}return(i?o.contains(d):o===d&&'BODY'!==d.nodeName)&&(h=f(h,o)),h}function b(e){var t=window.document.documentElement,o=u(e,t),i=_(t.clientWidth,window.innerWidth||0),n=_(t.clientHeight,window.innerHeight||0),r=a(t),p=a(t,'left'),s={top:r-o.top+o.marginTop,left:p-o.left+o.marginLeft,width:i,height:n};return c(s)}function y(e){var i=e.nodeName;return'BODY'===i||'HTML'===i?!1:'fixed'===t(e,'position')||y(o(e))}function w(e,t,i,r){var p={top:0,left:0},s=d(e,t);if('viewport'===r)p=b(s);else{var a;'scrollParent'===r?(a=n(o(e)),'BODY'===a.nodeName&&(a=window.document.documentElement)):'window'===r?a=window.document.documentElement:a=r;var f=u(a,s);if('HTML'===a.nodeName&&!y(s)){var l=h(),m=l.height,c=l.width;p.top+=f.top-f.marginTop,p.bottom=m+f.top,p.left+=f.left-f.marginLeft,p.right=c+f.left}else p=f}return p.left+=i,p.top+=i,p.right-=i,p.bottom-=i,p}function v(e){var t=e.width,o=e.height;return t*o}function E(e,t,o,i,n){var r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf('auto'))return e;var p=w(o,i,r,n),s={top:{width:p.width,height:t.top-p.top},right:{width:p.right-t.right,height:p.height},bottom:{width:p.width,height:p.bottom-t.bottom},left:{width:t.left-p.left,height:p.height}},d=Object.keys(s).map(function(e){return se({key:e},s[e],{area:v(s[e])})}).sort(function(e,t){return t.area-e.area}),a=d.filter(function(e){var t=e.width,i=e.height;return t>=o.clientWidth&&i>=o.clientHeight}),f=0<a.length?a[0].key:d[0].key,l=e.split('-')[1];return f+(l?'-'+l:'')}function x(e,t,o){var i=d(t,o);return u(o,i)}function O(e){var t=window.getComputedStyle(e),o=parseFloat(t.marginTop)+parseFloat(t.marginBottom),i=parseFloat(t.marginLeft)+parseFloat(t.marginRight),n={width:e.offsetWidth+i,height:e.offsetHeight+o};return n}function L(e){var t={left:'right',right:'left',bottom:'top',top:'bottom'};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function S(e,t,o){o=o.split('-')[0];var i=O(e),n={width:i.width,height:i.height},r=-1!==['right','left'].indexOf(o),p=r?'top':'left',s=r?'left':'top',d=r?'height':'width',a=r?'width':'height';return n[p]=t[p]+t[d]/2-i[d]/2,n[s]=o===s?t[s]-i[a]:t[L(s)],n}function T(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function C(e,t,o){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===o});var i=T(e,function(e){return e[t]===o});return e.indexOf(i)}function N(t,o,i){var n=void 0===i?t:t.slice(0,C(t,'name',i));return n.forEach(function(t){t.function&&console.warn('`modifier.function` is deprecated, use `modifier.fn`!');var i=t.function||t.fn;t.enabled&&e(i)&&(o.offsets.popper=c(o.offsets.popper),o.offsets.reference=c(o.offsets.reference),o=i(o,t))}),o}function k(){if(!this.state.isDestroyed){var e={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=x(this.state,this.popper,this.reference),e.placement=E(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=S(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position='absolute',e=N(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function W(e,t){return e.some(function(e){var o=e.name,i=e.enabled;return i&&o===t})}function B(e){for(var t=[!1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length-1;n++){var i=t[n],r=i?''+i+o:e;if('undefined'!=typeof window.document.body.style[r])return r}return null}function D(){return this.state.isDestroyed=!0,W(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.left='',this.popper.style.position='',this.popper.style.top='',this.popper.style[B('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function H(e,t,o,i){var r='BODY'===e.nodeName,p=r?window:e;p.addEventListener(t,o,{passive:!0}),r||H(n(p.parentNode),t,o,i),i.push(p)}function P(e,t,o,i){o.updateBound=i,window.addEventListener('resize',o.updateBound,{passive:!0});var r=n(e);return H(r,'scroll',o.updateBound,o.scrollParents),o.scrollElement=r,o.eventsEnabled=!0,o}function A(){this.state.eventsEnabled||(this.state=P(this.reference,this.options,this.state,this.scheduleUpdate))}function M(e,t){return window.removeEventListener('resize',t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener('scroll',t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function I(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=M(this.reference,this.state))}function R(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function U(e,t){Object.keys(t).forEach(function(o){var i='';-1!==['width','height','top','right','bottom','left'].indexOf(o)&&R(t[o])&&(i='px'),e.style[o]=t[o]+i})}function Y(e,t){Object.keys(t).forEach(function(o){var i=t[o];!1===i?e.removeAttribute(o):e.setAttribute(o,t[o])})}function F(e,t,o){var i=T(e,function(e){var o=e.name;return o===t}),n=!!i&&e.some(function(e){return e.name===o&&e.enabled&&e.order<i.order});if(!n){var r='`'+t+'`';console.warn('`'+o+'`'+' modifier is required by '+r+' modifier in order to work, be sure to include it before '+r+'!')}return n}function j(e){return'end'===e?'start':'start'===e?'end':e}function K(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=ae.indexOf(e),i=ae.slice(o+1).concat(ae.slice(0,o));return t?i.reverse():i}function q(e,t,o,i){var n=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+n[1],p=n[2];if(!r)return e;if(0===p.indexOf('%')){var s;switch(p){case'%p':s=o;break;case'%':case'%r':default:s=i;}var d=c(s);return d[t]/100*r}if('vh'===p||'vw'===p){var a;return a='vh'===p?_(document.documentElement.clientHeight,window.innerHeight||0):_(document.documentElement.clientWidth,window.innerWidth||0),a/100*r}return r}function G(e,t,o,i){var n=[0,0],r=-1!==['right','left'].indexOf(i),p=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=p.indexOf(T(p,function(e){return-1!==e.search(/,|\s/)}));p[s]&&-1===p[s].indexOf(',')&&console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');var d=/\s*,\s*|\s+/,a=-1===s?[p]:[p.slice(0,s).concat([p[s].split(d)[0]]),[p[s].split(d)[1]].concat(p.slice(s+1))];return a=a.map(function(e,i){var n=(1===i?!r:r)?'height':'width',p=!1;return e.reduce(function(e,t){return''===e[e.length-1]&&-1!==['+','-'].indexOf(t)?(e[e.length-1]=t,p=!0,e):p?(e[e.length-1]+=t,p=!1,e):e.concat(t)},[]).map(function(e){return q(e,n,t,o)})}),a.forEach(function(e,t){e.forEach(function(o,i){R(o)&&(n[t]+=o*('-'===e[i-1]?-1:1))})}),n}for(var z=Math.min,V=Math.floor,_=Math.max,X=['native code','[object MutationObserverConstructor]'],Q=function(e){return X.some(function(t){return-1<(e||'').toString().indexOf(t)})},J='undefined'!=typeof window,Z=['Edge','Trident','Firefox'],$=0,ee=0;ee<Z.length;ee+=1)if(J&&0<=navigator.userAgent.indexOf(Z[ee])){$=1;break}var i,te=J&&Q(window.MutationObserver),oe=te?function(e){var t=!1,o=0,i=document.createElement('span'),n=new MutationObserver(function(){e(),t=!1});return n.observe(i,{attributes:!0}),function(){t||(t=!0,i.setAttribute('x-index',o),++o)}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},$))}},ie=function(){return void 0==i&&(i=-1!==navigator.appVersion.indexOf('MSIE 10')),i},ne=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},re=function(){function e(e,t){for(var o,n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,i){return o&&e(t.prototype,o),i&&e(t,i),t}}(),pe=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},se=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var i in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},de=['auto-start','auto','auto-end','top-start','top','top-end','right-start','right','right-end','bottom-end','bottom','bottom-start','left-end','left','left-start'],ae=de.slice(3),fe={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'},le=function(){function t(o,i){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};ne(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=oe(this.update.bind(this)),this.options=se({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=o.jquery?o[0]:o,this.popper=i.jquery?i[0]:i,this.options.modifiers={},Object.keys(se({},t.Defaults.modifiers,r.modifiers)).forEach(function(e){n.options.modifiers[e]=se({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return se({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(t){t.enabled&&e(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)}),this.update();var p=this.options.eventsEnabled;p&&this.enableEventListeners(),this.state.eventsEnabled=p}return re(t,[{key:'update',value:function(){return k.call(this)}},{key:'destroy',value:function(){return D.call(this)}},{key:'enableEventListeners',value:function(){return A.call(this)}},{key:'disableEventListeners',value:function(){return I.call(this)}}]),t}();return le.Utils=('undefined'==typeof window?global:window).PopperUtils,le.placements=de,le.Defaults={placement:'bottom',eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,o=t.split('-')[0],i=t.split('-')[1];if(i){var n=e.offsets,r=n.reference,p=n.popper,s=-1!==['bottom','top'].indexOf(o),d=s?'left':'top',a=s?'width':'height',f={start:pe({},d,r[d]),end:pe({},d,r[d]+r[a]-p[a])};e.offsets.popper=se({},p,f[i])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var o,i=t.offset,n=e.placement,r=e.offsets,p=r.popper,s=r.reference,d=n.split('-')[0];return o=R(+i)?[+i,0]:G(i,p,s,d),'left'===d?(p.top+=o[0],p.left-=o[1]):'right'===d?(p.top+=o[0],p.left+=o[1]):'top'===d?(p.left+=o[0],p.top-=o[1]):'bottom'===d&&(p.left+=o[0],p.top+=o[1]),e.popper=p,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var o=t.boundariesElement||r(e.instance.popper);e.instance.reference===o&&(o=r(o));var i=w(e.instance.popper,e.instance.reference,t.padding,o);t.boundaries=i;var n=t.priority,p=e.offsets.popper,s={primary:function(e){var o=p[e];return p[e]<i[e]&&!t.escapeWithReference&&(o=_(p[e],i[e])),pe({},e,o)},secondary:function(e){var o='right'===e?'left':'top',n=p[o];return p[e]>i[e]&&!t.escapeWithReference&&(n=z(p[o],i[e]-('right'===e?p.width:p.height))),pe({},o,n)}};return n.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';p=se({},p,s[t](e))}),e.offsets.popper=p,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,i=t.reference,n=e.placement.split('-')[0],r=V,p=-1!==['top','bottom'].indexOf(n),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]<r(i[d])&&(e.offsets.popper[d]=r(i[d])-o[a]),o[d]>r(i[s])&&(e.offsets.popper[d]=r(i[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(!F(e.instance.modifiers,'arrow','keepTogether'))return e;var o=t.element;if('string'==typeof o){if(o=e.instance.popper.querySelector(o),!o)return e;}else if(!e.instance.popper.contains(o))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var i=e.placement.split('-')[0],n=e.offsets,r=n.popper,p=n.reference,s=-1!==['left','right'].indexOf(i),d=s?'height':'width',a=s?'top':'left',f=s?'left':'top',l=s?'bottom':'right',m=O(o)[d];p[l]-m<r[a]&&(e.offsets.popper[a]-=r[a]-(p[l]-m)),p[a]+m>r[l]&&(e.offsets.popper[a]+=p[a]+m-r[l]);var h=p[a]+p[d]/2-m/2,g=h-c(e.offsets.popper)[a];return g=_(z(r[d]-m,g),0),e.arrowElement=o,e.offsets.arrow={},e.offsets.arrow[a]=Math.round(g),e.offsets.arrow[f]='',e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=w(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split('-')[0],n=L(i),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case fe.FLIP:p=[i,n];break;case fe.CLOCKWISE:p=K(i);break;case fe.COUNTERCLOCKWISE:p=K(i,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(i!==s||p.length===d+1)return e;i=e.placement.split('-')[0],n=L(i);var a=e.offsets.popper,f=e.offsets.reference,l=V,m='left'===i&&l(a.right)>l(f.left)||'right'===i&&l(a.left)<l(f.right)||'top'===i&&l(a.bottom)>l(f.top)||'bottom'===i&&l(a.top)<l(f.bottom),h=l(a.left)<l(o.left),c=l(a.right)>l(o.right),g=l(a.top)<l(o.top),u=l(a.bottom)>l(o.bottom),b='left'===i&&h||'right'===i&&c||'top'===i&&g||'bottom'===i&&u,y=-1!==['top','bottom'].indexOf(i),w=!!t.flipVariations&&(y&&'start'===r&&h||y&&'end'===r&&c||!y&&'start'===r&&g||!y&&'end'===r&&u);(m||b||w)&&(e.flipped=!0,(m||b)&&(i=p[d+1]),w&&(r=j(r)),e.placement=i+(r?'-'+r:''),e.offsets.popper=se({},e.offsets.popper,S(e.instance.popper,e.offsets.reference,e.placement)),e=N(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],i=e.offsets,n=i.popper,r=i.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return n[p?'left':'top']=r[t]-(s?n[p?'width':'height']:0),e.placement=L(t),e.offsets.popper=c(n),e}},hide:{order:800,enabled:!0,fn:function(e){if(!F(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=T(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottom<o.top||t.left>o.right||t.top>o.bottom||t.right<o.left){if(!0===e.hide)return e;e.hide=!0,e.attributes['x-out-of-boundaries']=''}else{if(!1===e.hide)return e;e.hide=!1,e.attributes['x-out-of-boundaries']=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var o=t.x,i=t.y,n=e.offsets.popper,p=T(e.instance.modifiers,function(e){return'applyStyle'===e.name}).gpuAcceleration;void 0!==p&&console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');var s,d,a=void 0===p?t.gpuAcceleration:p,f=r(e.instance.popper),l=g(f),m={position:n.position},h={left:V(n.left),top:V(n.top),bottom:V(n.bottom),right:V(n.right)},c='bottom'===o?'top':'bottom',u='right'===i?'left':'right',b=B('transform');if(d='bottom'==c?-l.height+h.bottom:h.top,s='right'==u?-l.width+h.right:h.left,a&&b)m[b]='translate3d('+s+'px, '+d+'px, 0)',m[c]=0,m[u]=0,m.willChange='transform';else{var y='bottom'==c?-1:1,w='right'==u?-1:1;m[c]=d*y,m[u]=s*w,m.willChange=c+', '+u}var v={"x-placement":e.placement};return e.attributes=se({},v,e.attributes),e.styles=se({},m,e.styles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return U(e.instance.popper,e.styles),Y(e.instance.popper,e.attributes),e.offsets.arrow&&U(e.arrowElement,e.offsets.arrow),e},onLoad:function(e,t,o,i,n){var r=x(n,t,e),p=E(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),U(t,{position:'absolute'}),o},gpuAcceleration:void 0}}},le});
5
- //# sourceMappingURL=popper.min.js.map
@@ -1,539 +0,0 @@
1
- /**!
2
- * @fileOverview Kickass library to create and place poppers near their reference elements.
3
- * @version 1.1.5
4
- * @license
5
- * Copyright (c) 2016 Federico Zivolo and contributors
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- (function (global, factory) {
26
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('popper.js')) :
27
- typeof define === 'function' && define.amd ? define(['popper.js'], factory) :
28
- (global.Tooltip = factory(global.Popper));
29
- }(this, (function (Popper) { 'use strict';
30
-
31
- Popper = Popper && 'default' in Popper ? Popper['default'] : Popper;
32
-
33
- /**
34
- * Check if the given variable is a function
35
- * @method
36
- * @memberof Popper.Utils
37
- * @argument {Any} functionToCheck - variable to check
38
- * @returns {Boolean} answer to: is a function?
39
- */
40
- function isFunction(functionToCheck) {
41
- var getType = {};
42
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
43
- }
44
-
45
- var classCallCheck = function (instance, Constructor) {
46
- if (!(instance instanceof Constructor)) {
47
- throw new TypeError("Cannot call a class as a function");
48
- }
49
- };
50
-
51
- var createClass = function () {
52
- function defineProperties(target, props) {
53
- for (var i = 0; i < props.length; i++) {
54
- var descriptor = props[i];
55
- descriptor.enumerable = descriptor.enumerable || false;
56
- descriptor.configurable = true;
57
- if ("value" in descriptor) descriptor.writable = true;
58
- Object.defineProperty(target, descriptor.key, descriptor);
59
- }
60
- }
61
-
62
- return function (Constructor, protoProps, staticProps) {
63
- if (protoProps) defineProperties(Constructor.prototype, protoProps);
64
- if (staticProps) defineProperties(Constructor, staticProps);
65
- return Constructor;
66
- };
67
- }();
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
- var _extends = Object.assign || function (target) {
76
- for (var i = 1; i < arguments.length; i++) {
77
- var source = arguments[i];
78
-
79
- for (var key in source) {
80
- if (Object.prototype.hasOwnProperty.call(source, key)) {
81
- target[key] = source[key];
82
- }
83
- }
84
- }
85
-
86
- return target;
87
- };
88
-
89
- var DEFAULT_OPTIONS = {
90
- container: false,
91
- delay: 0,
92
- html: false,
93
- placement: 'top',
94
- title: '',
95
- template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
96
- trigger: 'hover focus',
97
- offset: 0
98
- };
99
-
100
- var Tooltip = function () {
101
- /**
102
- * Create a new Tooltip.js instance
103
- * @class Tooltip
104
- * @param {HTMLElement} reference - The DOM node used as reference of the tooltip (it can be a jQuery element).
105
- * @param {Object} options
106
- * @param {String} options.placement=bottom
107
- * Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -end),
108
- * left(-start, -end)`
109
- * @param {HTMLElement|String|false} options.container=false - Append the tooltip to a specific element.
110
- * @param {Number|Object} options.delay=0
111
- * Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type.
112
- * If a number is supplied, delay is applied to both hide/show.
113
- * Object structure is: `{ show: 500, hide: 100 }`
114
- * @param {Boolean} options.html=false - Insert HTML into the tooltip. If false, the content will inserted with `innerText`.
115
- * @param {String|PlacementFunction} options.placement='top' - One of the allowed placements, or a function returning one of them.
116
- * @param {String} [options.template='<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>']
117
- * Base HTML to used when creating the tooltip.
118
- * The tooltip's `title` will be injected into the `.tooltip-inner` or `.tooltip__inner`.
119
- * `.tooltip-arrow` or `.tooltip__arrow` will become the tooltip's arrow.
120
- * The outermost wrapper element should have the `.tooltip` class.
121
- * @param {String|HTMLElement|TitleFunction} options.title='' - Default title value if `title` attribute isn't present.
122
- * @param {String} [options.trigger='hover focus']
123
- * How tooltip is triggered - click, hover, focus, manual.
124
- * You may pass multiple triggers; separate them with a space. `manual` cannot be combined with any other trigger.
125
- * @param {HTMLElement} options.boundariesElement
126
- * The element used as boundaries for the tooltip. For more information refer to Popper.js'
127
- * [boundariesElement docs](https://popper.js.org/popper-documentation.html)
128
- * @param {Number|String} options.offset=0 - Offset of the tooltip relative to its reference. For more information refer to Popper.js'
129
- * [offset docs](https://popper.js.org/popper-documentation.html)
130
- * @param {Object} options.popperOptions={} - Popper options, will be passed directly to popper instance. For more information refer to Popper.js'
131
- * [options docs](https://popper.js.org/popper-documentation.html)
132
- * @return {Object} instance - The generated tooltip instance
133
- */
134
- function Tooltip(reference, options) {
135
- classCallCheck(this, Tooltip);
136
-
137
- _initialiseProps.call(this);
138
-
139
- // apply user options over default ones
140
- options = _extends({}, DEFAULT_OPTIONS, options);
141
-
142
- reference.jquery && (reference = reference[0]);
143
-
144
- // cache reference and options
145
- this.reference = reference;
146
- this.options = options;
147
-
148
- // get events list
149
- var events = typeof options.trigger === 'string' ? options.trigger.split(' ').filter(function (trigger) {
150
- return ['click', 'hover', 'focus'].indexOf(trigger) !== -1;
151
- }) : [];
152
-
153
- // set initial state
154
- this._isOpen = false;
155
-
156
- // set event listeners
157
- this._setEventListeners(reference, events, options);
158
- }
159
-
160
- //
161
- // Public methods
162
- //
163
-
164
- /**
165
- * Reveals an element's tooltip. This is considered a "manual" triggering of the tooltip.
166
- * Tooltips with zero-length titles are never displayed.
167
- * @method Tooltip#show
168
- * @memberof Tooltip
169
- */
170
-
171
-
172
- /**
173
- * Hides an element’s tooltip. This is considered a “manual” triggering of the tooltip.
174
- * @method Tooltip#hide
175
- * @memberof Tooltip
176
- */
177
-
178
-
179
- /**
180
- * Hides and destroys an element’s tooltip.
181
- * @method Tooltip#dispose
182
- * @memberof Tooltip
183
- */
184
-
185
-
186
- /**
187
- * Toggles an element’s tooltip. This is considered a “manual” triggering of the tooltip.
188
- * @method Tooltip#toggle
189
- * @memberof Tooltip
190
- */
191
-
192
-
193
- //
194
- // Defaults
195
- //
196
-
197
-
198
- //
199
- // Private methods
200
- //
201
-
202
- createClass(Tooltip, [{
203
- key: '_create',
204
-
205
-
206
- /**
207
- * Creates a new tooltip node
208
- * @memberof Tooltip
209
- * @private
210
- * @param {HTMLElement} reference
211
- * @param {String} template
212
- * @param {String|HTMLElement|TitleFunction} title
213
- * @param {Boolean} allowHtml
214
- * @return {HTMLelement} tooltipNode
215
- */
216
- value: function _create(reference, template, title, allowHtml) {
217
- // create tooltip element
218
- var tooltipGenerator = window.document.createElement('div');
219
- tooltipGenerator.innerHTML = template.trim();
220
- var tooltipNode = tooltipGenerator.childNodes[0];
221
-
222
- // add unique ID to our tooltip (needed for accessibility reasons)
223
- tooltipNode.id = 'tooltip_' + Math.random().toString(36).substr(2, 10);
224
-
225
- // set initial `aria-hidden` state to `false` (it's visible!)
226
- tooltipNode.setAttribute('aria-hidden', 'false');
227
-
228
- // add title to tooltip
229
- var titleNode = tooltipGenerator.querySelector(this.innerSelector);
230
- if (title.nodeType === 1) {
231
- // if title is a node, append it only if allowHtml is true
232
- allowHtml && titleNode.appendChild(title);
233
- } else if (isFunction(title)) {
234
- // if title is a function, call it and set innerText or innerHtml depending by `allowHtml` value
235
- var titleText = title.call(reference);
236
- allowHtml ? titleNode.innerHTML = titleText : titleNode.innerText = titleText;
237
- } else {
238
- // if it's just a simple text, set innerText or innerHtml depending by `allowHtml` value
239
- allowHtml ? titleNode.innerHTML = title : titleNode.innerText = title;
240
- }
241
-
242
- // return the generated tooltip node
243
- return tooltipNode;
244
- }
245
- }, {
246
- key: '_show',
247
- value: function _show(reference, options) {
248
- // don't show if it's already visible
249
- if (this._isOpen) {
250
- return this;
251
- }
252
- this._isOpen = true;
253
-
254
- // if the tooltipNode already exists, just show it
255
- if (this._tooltipNode) {
256
- this._tooltipNode.style.display = '';
257
- this._tooltipNode.setAttribute('aria-hidden', 'false');
258
- this.popperInstance.update();
259
- return this;
260
- }
261
-
262
- // get title
263
- var title = reference.getAttribute('title') || options.title;
264
-
265
- // don't show tooltip if no title is defined
266
- if (!title) {
267
- return this;
268
- }
269
-
270
- // create tooltip node
271
- var tooltipNode = this._create(reference, options.template, title, options.html);
272
-
273
- // Add `aria-describedby` to our reference element for accessibility reasons
274
- reference.setAttribute('aria-describedby', tooltipNode.id);
275
-
276
- // append tooltip to container
277
- var container = this._findContainer(options.container, reference);
278
-
279
- this._append(tooltipNode, container);
280
-
281
- var popperOptions = _extends({}, options.popperOptions, {
282
- placement: options.placement
283
- });
284
-
285
- popperOptions.modifiers = _extends({}, popperOptions.modifiers, {
286
- arrow: {
287
- element: this.arrowSelector
288
- }
289
- });
290
-
291
- if (options.boundariesElement) {
292
- popperOptions.modifiers.preventOverflow = {
293
- boundariesElement: options.boundariesElement
294
- };
295
- }
296
-
297
- this.popperInstance = new Popper(reference, tooltipNode, popperOptions);
298
-
299
- this._tooltipNode = tooltipNode;
300
-
301
- return this;
302
- }
303
- }, {
304
- key: '_hide',
305
- value: function _hide() /*reference, options*/{
306
- // don't hide if it's already hidden
307
- if (!this._isOpen) {
308
- return this;
309
- }
310
-
311
- this._isOpen = false;
312
-
313
- // hide tooltipNode
314
- this._tooltipNode.style.display = 'none';
315
- this._tooltipNode.setAttribute('aria-hidden', 'true');
316
-
317
- return this;
318
- }
319
- }, {
320
- key: '_dispose',
321
- value: function _dispose() {
322
- var _this = this;
323
-
324
- if (this._tooltipNode) {
325
- this._hide();
326
-
327
- // destroy instance
328
- this.popperInstance.destroy();
329
-
330
- // remove event listeners
331
- this._events.forEach(function (_ref) {
332
- var func = _ref.func,
333
- event = _ref.event;
334
-
335
- _this.reference.removeEventListener(event, func);
336
- });
337
- this._events = [];
338
-
339
- // destroy tooltipNode
340
- this._tooltipNode.parentNode.removeChild(this._tooltipNode);
341
- this._tooltipNode = null;
342
- }
343
- return this;
344
- }
345
- }, {
346
- key: '_findContainer',
347
- value: function _findContainer(container, reference) {
348
- // if container is a query, get the relative element
349
- if (typeof container === 'string') {
350
- container = window.document.querySelector(container);
351
- } else if (container === false) {
352
- // if container is `false`, set it to reference parent
353
- container = reference.parentNode;
354
- }
355
- return container;
356
- }
357
-
358
- /**
359
- * Append tooltip to container
360
- * @memberof Tooltip
361
- * @private
362
- * @param {HTMLElement} tooltip
363
- * @param {HTMLElement|String|false} container
364
- */
365
-
366
- }, {
367
- key: '_append',
368
- value: function _append(tooltipNode, container) {
369
- container.appendChild(tooltipNode);
370
- }
371
- }, {
372
- key: '_setEventListeners',
373
- value: function _setEventListeners(reference, events, options) {
374
- var _this2 = this;
375
-
376
- var directEvents = [];
377
- var oppositeEvents = [];
378
-
379
- events.forEach(function (event) {
380
- switch (event) {
381
- case 'hover':
382
- directEvents.push('mouseenter');
383
- oppositeEvents.push('mouseleave');
384
- break;
385
- case 'focus':
386
- directEvents.push('focus');
387
- oppositeEvents.push('blur');
388
- break;
389
- case 'click':
390
- directEvents.push('click');
391
- oppositeEvents.push('click');
392
- break;
393
- }
394
- });
395
-
396
- // schedule show tooltip
397
- directEvents.forEach(function (event) {
398
- var func = function func(evt) {
399
- if (_this2._isOpen === true) {
400
- return;
401
- }
402
- evt.usedByTooltip = true;
403
- _this2._scheduleShow(reference, options.delay, options, evt);
404
- };
405
- _this2._events.push({ event: event, func: func });
406
- reference.addEventListener(event, func);
407
- });
408
-
409
- // schedule hide tooltip
410
- oppositeEvents.forEach(function (event) {
411
- var func = function func(evt) {
412
- if (evt.usedByTooltip === true) {
413
- return;
414
- }
415
- _this2._scheduleHide(reference, options.delay, options, evt);
416
- };
417
- _this2._events.push({ event: event, func: func });
418
- reference.addEventListener(event, func);
419
- });
420
- }
421
- }, {
422
- key: '_scheduleShow',
423
- value: function _scheduleShow(reference, delay, options /*, evt */) {
424
- var _this3 = this;
425
-
426
- // defaults to 0
427
- var computedDelay = delay && delay.show || delay || 0;
428
- window.setTimeout(function () {
429
- return _this3._show(reference, options);
430
- }, computedDelay);
431
- }
432
- }, {
433
- key: '_scheduleHide',
434
- value: function _scheduleHide(reference, delay, options, evt) {
435
- var _this4 = this;
436
-
437
- // defaults to 0
438
- var computedDelay = delay && delay.hide || delay || 0;
439
- window.setTimeout(function () {
440
- if (_this4._isOpen === false) {
441
- return;
442
- }
443
- if (!document.body.contains(_this4._tooltipNode)) {
444
- return;
445
- }
446
-
447
- // if we are hiding because of a mouseleave, we must check that the new
448
- // reference isn't the tooltip, because in this case we don't want to hide it
449
- if (evt.type === 'mouseleave') {
450
- var isSet = _this4._setTooltipNodeEvent(evt, reference, delay, options);
451
-
452
- // if we set the new event, don't hide the tooltip yet
453
- // the new event will take care to hide it if necessary
454
- if (isSet) {
455
- return;
456
- }
457
- }
458
-
459
- _this4._hide(reference, options);
460
- }, computedDelay);
461
- }
462
- }]);
463
- return Tooltip;
464
- }();
465
-
466
- /**
467
- * Placement function, its context is the Tooltip instance.
468
- * @memberof Tooltip
469
- * @callback PlacementFunction
470
- * @param {HTMLElement} tooltip - tooltip DOM node.
471
- * @param {HTMLElement} reference - reference DOM node.
472
- * @return {String} placement - One of the allowed placement options.
473
- */
474
-
475
- /**
476
- * Title function, its context is the Tooltip instance.
477
- * @memberof Tooltip
478
- * @callback TitleFunction
479
- * @return {String} placement - The desired title.
480
- */
481
-
482
-
483
- var _initialiseProps = function _initialiseProps() {
484
- var _this5 = this;
485
-
486
- this.show = function () {
487
- return _this5._show(_this5.reference, _this5.options);
488
- };
489
-
490
- this.hide = function () {
491
- return _this5._hide();
492
- };
493
-
494
- this.dispose = function () {
495
- return _this5._dispose();
496
- };
497
-
498
- this.toggle = function () {
499
- if (_this5._isOpen) {
500
- return _this5.hide();
501
- } else {
502
- return _this5.show();
503
- }
504
- };
505
-
506
- this.arrowSelector = '.tooltip-arrow, .tooltip__arrow';
507
- this.innerSelector = '.tooltip-inner, .tooltip__inner';
508
- this._events = [];
509
-
510
- this._setTooltipNodeEvent = function (evt, reference, delay, options) {
511
- var relatedreference = evt.relatedreference || evt.toElement;
512
-
513
- var callback = function callback(evt2) {
514
- var relatedreference2 = evt2.relatedreference || evt2.toElement;
515
-
516
- // Remove event listener after call
517
- _this5._tooltipNode.removeEventListener(evt.type, callback);
518
-
519
- // If the new reference is not the reference element
520
- if (!reference.contains(relatedreference2)) {
521
- // Schedule to hide tooltip
522
- _this5._scheduleHide(reference, options.delay, options, evt2);
523
- }
524
- };
525
-
526
- if (_this5._tooltipNode.contains(relatedreference)) {
527
- // listen to mouseleave on the tooltip element to be able to hide the tooltip
528
- _this5._tooltipNode.addEventListener(evt.type, callback);
529
- return true;
530
- }
531
-
532
- return false;
533
- };
534
- };
535
-
536
- return Tooltip;
537
-
538
- })));
539
- //# sourceMappingURL=tooltip.js.map