1{"version":3,"sources":["../../src/bootstrap/popover.js"],"names":["DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","$","fn","CLASS_PREFIX","BSCLS_PREFIX_REGEX","RegExp","Default","Tooltip","placement","trigger","content","template","DefaultType","Event","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","Popover","getTitle","_getContent","attachment","getTipElement","addClass","tip","config","$tip","setElementContent","find","call","element","removeClass","getAttribute","tabClass","attr","match","length","join","each","data","_config","test","TypeError","_jQueryInterface","Constructor","noConflict"],"mappings":"wKAOA,OACA,O,63EAUMA,CAAAA,CAAQ,CAAc,Y,CACtBC,CAAS,YAAiBD,CAAjB,C,CACTE,CAAkB,CAAIC,UAAEC,EAAF,Q,CACtBC,CAAY,CAAU,Y,CACtBC,CAAkB,CAAI,GAAIC,CAAAA,MAAJ,kBAAqBF,CAArB,SAAyC,GAAzC,C,CAEtBG,CAAO,MACRC,UAAQD,OADA,EAEXE,SAAS,CAAG,OAFD,CAGXC,OAAO,CAAK,OAHD,CAIXC,OAAO,CAAK,EAJD,CAKXC,QAAQ,gJALG,E,CAWPC,CAAW,MACZL,UAAQK,WADI,EAEfF,OAAO,CAAG,2BAFK,E,CAWXG,CAAK,CAAG,CACZC,IAAI,eAAgBf,CAAhB,CADQ,CAEZgB,MAAM,iBAAgBhB,CAAhB,CAFM,CAGZiB,IAAI,eAAgBjB,CAAhB,CAHQ,CAIZkB,KAAK,gBAAgBlB,CAAhB,CAJO,CAKZmB,QAAQ,mBAAgBnB,CAAhB,CALI,CAMZoB,KAAK,gBAAgBpB,CAAhB,CANO,CAOZqB,OAAO,kBAAgBrB,CAAhB,CAPK,CAQZsB,QAAQ,mBAAgBtB,CAAhB,CARI,CASZuB,UAAU,qBAAgBvB,CAAhB,CATE,CAUZwB,UAAU,qBAAgBxB,CAAhB,CAVE,C,CAmBRyB,C,6IAiCY,CACd,MAAO,MAAKC,QAAL,IAAm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AAAA,CAAI,CAAG,cAAE,IAAF,EAAQA,IAAR,CAAa/C,CAAb,CADgB,CAErBgD,CAAO,CAAqB,QAAlB,KAAOf,CAAP,EAA6BA,CAA7B,CAAsC,IAF3B,CAI3B,GAAI,CAACc,CAAD,EAAS,eAAeE,IAAf,CAAoBhB,CAApB,CAAb,CAA0C,CACxC,MACD,CAED,GAAI,CAACc,CAAL,CAAW,CACTA,CAAI,CAAG,GAAIrB,CAAAA,CAAJ,CAAY,IAAZ,CAAkBsB,CAAlB,CAAP,CACA,cAAE,IAAF,EAAQD,IAAR,CAAa/C,CAAb,CAAuB+C,CAAvB,CACD,CAED,GAAsB,QAAlB,QAAOd,CAAAA,CAAX,CAAgC,CAC9B,GAA4B,WAAxB,QAAOc,CAAAA,CAAI,CAACd,CAAD,CAAf,CAAyC,CACvC,KAAM,IAAIiB,CAAAA,SAAJ,6BAAkCjB,CAAlC,OACP,CACDc,CAAI,CAACd,CAAD,CAAJ,EACD,CACF,CAnBM,CAoBR,C,mCA/FoB,CACnB,MApDwB,OAqDzB,C,mCAEoB,CACnB,MAAOzB,CAAAA,CACR,C,gCAEiB,CAChB,eACD,C,oCAEqB,CACpB,MAAOR,CAAAA,CACR,C,iCAEkB,CACjB,MAAOe,CAAAA,CACR,C,qCAEsB,CACrB,MAAOd,CAAAA,CACR,C,uCAEwB,CACvB,MAAOa,CAAAA,CACR,C,cA7BmBL,S,EA2GtBN,UAAEC,EAAF,SAAasB,CAAO,CAACyB,gBAArB,CACAhD,UAAEC,EAAF,SAAWgD,WAAX,CAAyB1B,CAAzB,CACAvB,UAAEC,EAAF,SAAWiD,UAAX,CAAwB,UAAM,CAC5BlD,UAAEC,EAAF,SAAaF,CAAb,CACA,MAAOwB,CAAAA,CAAO,CAACyB,gBAChB,CAHD,C,UAKezB,C","sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.5.0): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Tooltip from './tooltip'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME                = 'popover'\nconst VERSION             = '4.5.0'\nconst DATA_KEY            = 'bs.popover'\nconst EVENT_KEY           = `.${DATA_KEY}`\nconst JQUERY_NO_CONFLICT  = $.fn[NAME]\nconst CLASS_PREFIX        = 'bs-popover'\nconst BSCLS_PREFIX_REGEX  = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\n\nconst Default = {\n  ...Tooltip.Default,\n  placement : 'right',\n  trigger   : 'click',\n  content   : '',\n  template  : '<div class=\"popover\" role=\"tooltip\">' +\n              '<div class=\"arrow\"></div>' +\n              '<h3 class=\"popover-header\"></h3>' +\n              '<div class=\"popover-body\"></div></div>'\n}\n\nconst DefaultType = {\n  ...Tooltip.DefaultType,\n  content : '(string|element|function)'\n}\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_TITLE   = '.popover-header'\nconst SELECTOR_CONTENT = '.popover-body'\n\nconst Event = {\n  HIDE       : `hide${EVENT_KEY}`,\n  HIDDEN     : `hidden${EVENT_KEY}`,\n  SHOW       : `show${EVENT_KEY}`,\n  SHOWN      : `shown${EVENT_KEY}`,\n  INSERTED   : `inserted${EVENT_KEY}`,\n  CLICK      : `click${EVENT_KEY}`,\n  FOCUSIN    : `focusin${EVENT_KEY}`,\n  FOCUSOUT   : `focusout${EVENT_KEY}`,\n  MOUSEENTER : `mouseenter${EVENT_KEY}`,\n  MOUSELEAVE : `mouseleave${EVENT_KEY}`\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Popover extends Tooltip {\n  // Getters\n\n  static get VERSION() {\n    return VERSION\n  }\n\n  static get Default() {\n    return Default\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  static get DATA_KEY() {\n    return DATA_KEY\n  }\n\n  static get Event() {\n    return Event\n  }\n\n  static get EVENT_KEY() {\n    return EVENT_KEY\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  // Overrides\n\n  isWithContent() {\n    return this.getTitle() || this._getContent()\n  }\n\n  addAttachmentClass(attachment) {\n    $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)\n  }\n\n  getTipElement() {\n    this.tip = this.tip || $(this.config.template)[0]\n    return this.tip\n  }\n\n  setContent() {\n    const $tip = $(this.getTipElement())\n\n    // We use append for html objects to maintain js events\n    this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle())\n    let content = this._getContent()\n    if (typeof content === 'function') {\n      content = content.call(this.element)\n    }\n    this.setElementContent($tip.find(SELECTOR_CONTENT), content)\n\n    $tip.removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`)\n  }\n\n  // Private\n\n  _getContent() {\n    return this.element.getAttribute('data-content') ||\n      this.config.content\n  }\n\n  _cleanTipClass() {\n    const $tip = $(this.getTipElement())\n    const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)\n    if (tabClass !== null && tabClass.length > 0) {\n      $tip.removeClass(tabClass.join(''))\n    }\n  }\n\n  // Static\n\n  static _jQueryInterface(config) {\n    return this.each(function () {\n      let data = $(this).data(DATA_KEY)\n      const _config = typeof config === 'object' ? config : null\n\n      if (!data && /dispose|hide/.test(config)) {\n        return\n      }\n\n      if (!data) {\n        data = new Popover(this, _config)\n        $(this).data(DATA_KEY, data)\n      }\n\n      if (typeof config === 'string') {\n        if (typeof data[config] === 'undefined') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n        data[config]()\n      }\n    })\n  }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Popover._jQueryInterface\n$.fn[NAME].Constructor = Popover\n$.fn[NAME].noConflict = () => {\n  $.fn[NAME] = JQUERY_NO_CONFLICT\n  return Popover._jQueryInterface\n}\n\nexport default Popover\n"],"file":"popover.min.js"}