-
Notifications
You must be signed in to change notification settings - Fork 17
/
message.min.js
2 lines (2 loc) · 25.6 KB
/
message.min.js
1
2
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Message=t()}(this,(function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=Array(t);s<t;s++)r[s]=e[s];return r}function t(e,t,s){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var r=s.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function s(t,s,r){if(s&&!Array.isArray(s)&&"number"==typeof s.length){var i=s.length;return e(s,void 0!==r&&r<i?r:i)}return t(s,r)}function r(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function i(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(t,s){if(t){if("string"==typeof t)return e(t,s);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,s):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const o=e=>"string"==typeof e,n=e=>Object.prototype.toString.apply(e),l=e=>"function"==typeof e||"[object Function]"===n(e),c=e=>("[object Object]"===n(e)||"object"==typeof e||l(e))&&null!==e,a=e=>{const t=Object.getPrototypeOf;let s;if(!(e=>c(e)&&null!==e)(e))return!1;if(s=e.prototype,!s)return!0;for(s=e;null!==t(s);)s=t(s);return t(e)===s},h=(e,t)=>{const s=Object.prototype.hasOwnProperty;return e&&s.call(e,t)},u=(e,t)=>{Object.keys(t).forEach((s=>{h(t,s)&&(e[s]=t[s])}))},d=(e,t=300)=>!!l(e)&&setTimeout((()=>{e()}),t),m=e=>e.replace(/<script[^>]*>.*?<\/script>/gi,""),f=e=>{const t={"&":"&","<":"<",">":">","'":"'",'"':"""};return e.replace(/[&<>'"]/g,(e=>t[e]||e))},p=e=>Array.isArray?Array.isArray(e):"[object Array]"===n(e),y=e=>{let t={};return null===e?null:(p(e)?t=Array.from(e):(t=Object.assign({},e),Object.keys(t).forEach((s=>t[s]=c(e[s])?y(e[s]):e[s]))),t)},b=(()=>{let e=0;return t=>(e+=1,t?t+"-"+e:"guid-"+e)})(),g=e=>!!(c(e)&&e.nodeName&&e.tagName&&1===e.nodeType),v=e=>{return!(!c(e)||!(g(e)||(e=>!(!c(e)||"[object NodeList]"!==n(e)))(e)||(t=e,c(t)&&"[object DocumentFragment]"===n(t))||(e=>!(!c(e)||!("[object Text]"===n(e)||e.tagName&&3===e.nodeType)))(e)));var t},M=(e,t,s)=>{let r=e.tagName.toLowerCase();switch(t){case"style":e.style.cssText=s;break;case"value":"input"===r||"textarea"===r?e.value=s:e.setAttribute(t,s);break;case"htmlFor":e.setAttribute("for",s);break;case"className":e.className=s;break;case"innerHTML":e.innerHTML=s;break;case"innerText":e.innerText=s;break;default:e.setAttribute(t,s)}},z=(e,t)=>{if(!e||!c(t))return!1;Object.keys(t).forEach((s=>{const r=t[s];h(t,s)&&M(e,s,r)}))},x=(e,t,s)=>{const r=document.createDocumentFragment(),i=document.createElement(e),n=e=>v(e)||o(e),l=e=>{let t;if(!n(e))return!1;v(e)?t=e:o(e)&&(t=document.createTextNode(e)),r.appendChild(t)};return c(t)?z(i,t):p(t)&&t.every((e=>n(e)))?t.forEach((e=>{l(e)})):v(t)?l(t):o(t)&&l(document.createTextNode(t)),p(s)?s.forEach((e=>{l(e)})):l(s),i.appendChild(r),i},w=(e,t)=>{const s=new RegExp("(\\s|^)"+t+"(\\s|$)");let r,i;return!!g(e)&&(r=e.className,!!r&&(i=e.classList,i&&i.contains?e.classList.contains(t):!!s.exec(r)))},$=(e,t)=>{var s;let r,i;if(w(e,t))return!1;r=e.classList,null!==(s=r)&&void 0!==s&&s.add?r.add(t):(i=e.className,i+=i.length>0?" "+t:t,e.className=i)},_=(e,t)=>{var s;let r,i=e.className;if(!i||!w(e,t))return!1;var n;r=e.classList,null!==(s=r)&&void 0!==s&&s.remove?r.remove(t):(n=i.replace(t,""),i=!!o(n)&&n.replace(/(^\s+)|(\s+$)/g,""),e.className=i)},L=(e,t={})=>{const s="outline-icon",r=t.size||0,i=t.color||"",n=t.iconSet||"",l=p(r)?r[0]:r,c=p(r)?r[1]:r,a=r?`width:${l}px;height:${c}px;`:"",h=i?a+`color:${i}`:a,u=t.attrs||{},d=document.createElement("i");let m,f="",y="";return o(e)?((e=>{const t=new RegExp("^\\s*(?:<\\?xml[^>]*>\\s*)?(?:<\\!doctype svg[^>]*\\s*(?:\\[?(?:\\s*<![^>]*>\\s*)*\\]?)*[^>]*>\\s*)?<svg[^>]*>[^]*<\\/svg>\\s*$\\s*$","i");return o(e)&&t.test(e)})(e)?y=e:(f=n&&"icon"!==n?`xlink:href="#${n}-icon-${e}"`:`xlink:href="#icon-${e}"`,y=`<svg><use ${f}></use></svg>`),d.innerHTML=y,u.className?u.className=`${s} ${u.className}`:u.className=s,z(d,u),m=d.querySelector("svg"),z(m,{"aria-hidden":!0,xmlns:"http://www.w3.org/2000/svg",class:"outline-icon__svg",width:200,height:200,style:h}),d):null},j=(e,t={})=>L(e,t),T=s(i,['<symbol id="outline-icon-up" viewBox="0 0 1024 1024"><path d="M494.784 261.696c0.832-0.448 1.536-1.216 2.368-1.536a38.72 38.72 0 0 1 46.08 8.256l277.824 302.272a41.92 41.92 0 0 1-1.536 58.048 39.104 39.104 0 0 1-56.448-1.6L513.728 355.904 260.736 626.048a39.104 39.104 0 0 1-56.448 1.088 41.6 41.6 0 0 1-1.088-57.984L483.84 269.696c0.512-0.512 1.344-0.768 1.92-1.408l1.088-1.344c2.368-2.496 5.312-3.648 8-5.248z"></path></symbol>','<symbol id="outline-icon-down" viewBox="0 0 1024 1024"><path d="M494.784 762.304c0.832 0.448 1.536 1.216 2.368 1.536 15.232 7.488 33.92 4.992 46.08-8.256l277.824-302.272a41.92 41.92 0 0 0-1.536-58.048 39.104 39.104 0 0 0-56.448 1.6l-249.344 271.232-252.992-270.144a39.104 39.104 0 0 0-56.448-1.088 41.6 41.6 0 0 0-1.088 57.984l280.576 299.456c0.512 0.512 1.344 0.768 1.92 1.408l1.088 1.344c2.368 2.496 5.312 3.648 8 5.248z"></path></symbol>','<symbol id="outline-icon-menu" viewBox="0 0 1024 1024"><path d="M320 256h640V128H320zM320 576h640V448H320zM320 896h640v-128H320zM64 256h128V128H64zM64 576h128V448H64zM64 896h128v-128H64z"></path></symbol>','<symbol id="outline-icon-file" viewBox="0 0 1024 1024"><path d="M320 640h256v128H320z"></path><path d="M320 448h384v128H320z"></path><path d="M640 0l320 320v557.696C960 958.528 909.824 1024 848 1024H176C114.176 1024 64 958.528 64 877.696V146.304C64 65.472 114.176 0 176 0H640z m0 128H192v768h640V320h-192V128z"></path></symbol>','<symbol id="outline-icon-hash" viewBox="0 0 24 24"><path d="M14.216 10l-0.444 4h-3.988l0.444-4zM15.006 2.89l-0.568 5.11h-3.988l0.543-4.89c0.061-0.549-0.335-1.043-0.883-1.104s-1.043 0.335-1.104 0.884l-0.568 5.11h-4.438c-0.552 0-1 0.448-1 1s0.448 1 1 1h4.216l-0.444 4h-3.772c-0.552 0-1 0.448-1 1s0.448 1 1 1h3.549l-0.543 4.89c-0.061 0.549 0.335 1.043 0.883 1.104s1.043-0.335 1.104-0.883l0.569-5.111h3.988l-0.543 4.89c-0.061 0.549 0.335 1.043 0.883 1.104s1.043-0.335 1.104-0.883l0.568-5.111h4.438c0.552 0 1-0.448 1-1s-0.448-1-1-1h-4.216l0.444-4h3.772c0.552 0 1-0.448 1-1s-0.448-1-1-1h-3.549l0.543-4.89c0.061-0.549-0.335-1.043-0.883-1.104s-1.043 0.335-1.104 0.883z"></path></symbol>','<symbol id="outline-icon-close" viewBox="0 0 1024 1024"><path d="M536.96 491.648L310.592 265.344a32 32 0 1 0-45.248 45.248L491.584 536.96l-226.304 226.304a32 32 0 0 0 45.312 45.248l226.24-226.304 226.304 226.304a32 32 0 0 0 45.248-45.248L582.144 536.896l226.304-226.24a32 32 0 0 0-45.248-45.248L536.896 491.584z"></path></symbol>','<symbol id="outline-icon-homepage" viewBox="0 0 26 28"><path d="M22 15.5v7.5c0 0.547-0.453 1-1 1h-6v-6h-4v6h-6c-0.547 0-1-0.453-1-1v-7.5c0-0.031 0.016-0.063 0.016-0.094l8.984-7.406 8.984 7.406c0.016 0.031 0.016 0.063 0.016 0.094zM25.484 14.422l-0.969 1.156c-0.078 0.094-0.203 0.156-0.328 0.172h-0.047c-0.125 0-0.234-0.031-0.328-0.109l-10.813-9.016-10.813 9.016c-0.109 0.078-0.234 0.125-0.375 0.109-0.125-0.016-0.25-0.078-0.328-0.172l-0.969-1.156c-0.172-0.203-0.141-0.531 0.063-0.703l11.234-9.359c0.656-0.547 1.719-0.547 2.375 0l3.813 3.187v-3.047c0-0.281 0.219-0.5 0.5-0.5h3c0.281 0 0.5 0.219 0.5 0.5v6.375l3.422 2.844c0.203 0.172 0.234 0.5 0.063 0.703z"></path></symbol>','<symbol id="outline-icon-github" viewBox="0 0 24 28"><path d="M12 2c6.625 0 12 5.375 12 12 0 5.297-3.437 9.797-8.203 11.391-0.609 0.109-0.828-0.266-0.828-0.578 0-0.391 0.016-1.687 0.016-3.297 0-1.125-0.375-1.844-0.812-2.219 2.672-0.297 5.484-1.313 5.484-5.922 0-1.313-0.469-2.375-1.234-3.219 0.125-0.313 0.531-1.531-0.125-3.187-1-0.313-3.297 1.234-3.297 1.234-0.953-0.266-1.984-0.406-3-0.406s-2.047 0.141-3 0.406c0 0-2.297-1.547-3.297-1.234-0.656 1.656-0.25 2.875-0.125 3.187-0.766 0.844-1.234 1.906-1.234 3.219 0 4.594 2.797 5.625 5.469 5.922-0.344 0.313-0.656 0.844-0.766 1.609-0.688 0.313-2.438 0.844-3.484-1-0.656-1.141-1.844-1.234-1.844-1.234-1.172-0.016-0.078 0.734-0.078 0.734 0.781 0.359 1.328 1.75 1.328 1.75 0.703 2.141 4.047 1.422 4.047 1.422 0 1 0.016 1.937 0.016 2.234 0 0.313-0.219 0.688-0.828 0.578-4.766-1.594-8.203-6.094-8.203-11.391 0-6.625 5.375-12 12-12zM4.547 19.234c0.031-0.063-0.016-0.141-0.109-0.187-0.094-0.031-0.172-0.016-0.203 0.031-0.031 0.063 0.016 0.141 0.109 0.187 0.078 0.047 0.172 0.031 0.203-0.031zM5.031 19.766c0.063-0.047 0.047-0.156-0.031-0.25-0.078-0.078-0.187-0.109-0.25-0.047-0.063 0.047-0.047 0.156 0.031 0.25 0.078 0.078 0.187 0.109 0.25 0.047zM5.5 20.469c0.078-0.063 0.078-0.187 0-0.297-0.063-0.109-0.187-0.156-0.266-0.094-0.078 0.047-0.078 0.172 0 0.281s0.203 0.156 0.266 0.109zM6.156 21.125c0.063-0.063 0.031-0.203-0.063-0.297-0.109-0.109-0.25-0.125-0.313-0.047-0.078 0.063-0.047 0.203 0.063 0.297 0.109 0.109 0.25 0.125 0.313 0.047zM7.047 21.516c0.031-0.094-0.063-0.203-0.203-0.25-0.125-0.031-0.266 0.016-0.297 0.109s0.063 0.203 0.203 0.234c0.125 0.047 0.266 0 0.297-0.094zM8.031 21.594c0-0.109-0.125-0.187-0.266-0.172-0.141 0-0.25 0.078-0.25 0.172 0 0.109 0.109 0.187 0.266 0.172 0.141 0 0.25-0.078 0.25-0.172zM8.937 21.438c-0.016-0.094-0.141-0.156-0.281-0.141-0.141 0.031-0.234 0.125-0.219 0.234 0.016 0.094 0.141 0.156 0.281 0.125s0.234-0.125 0.219-0.219z"></path></symbol>','<symbol id="outline-icon-issues" viewBox="0 0 24 28"><path d="M25.5 15c0 0.547-0.453 1-1 1h-3.5c0 1.953-0.422 3.422-1.047 4.531l3.25 3.266c0.391 0.391 0.391 1.016 0 1.406-0.187 0.203-0.453 0.297-0.703 0.297s-0.516-0.094-0.703-0.297l-3.094-3.078s-2.047 1.875-4.703 1.875v-14h-2v14c-2.828 0-4.891-2.063-4.891-2.063l-2.859 3.234c-0.203 0.219-0.469 0.328-0.75 0.328-0.234 0-0.469-0.078-0.672-0.25-0.406-0.375-0.438-1-0.078-1.422l3.156-3.547c-0.547-1.078-0.906-2.469-0.906-4.281h-3.5c-0.547 0-1-0.453-1-1s0.453-1 1-1h3.5v-4.594l-2.703-2.703c-0.391-0.391-0.391-1.016 0-1.406s1.016-0.391 1.406 0l2.703 2.703h13.188l2.703-2.703c0.391-0.391 1.016-0.391 1.406 0s0.391 1.016 0 1.406l-2.703 2.703v4.594h3.5c0.547 0 1 0.453 1 1zM18 6h-10c0-2.766 2.234-5 5-5s5 2.234 5 5z"></path></symbol>','<symbol id="outline-icon-tags" viewBox="0 0 26 28"><path d="M7 7c0-1.109-0.891-2-2-2s-2 0.891-2 2 0.891 2 2 2 2-0.891 2-2zM23.672 16c0 0.531-0.219 1.047-0.578 1.406l-7.672 7.688c-0.375 0.359-0.891 0.578-1.422 0.578s-1.047-0.219-1.406-0.578l-11.172-11.188c-0.797-0.781-1.422-2.297-1.422-3.406v-6.5c0-1.094 0.906-2 2-2h6.5c1.109 0 2.625 0.625 3.422 1.422l11.172 11.156c0.359 0.375 0.578 0.891 0.578 1.422zM29.672 16c0 0.531-0.219 1.047-0.578 1.406l-7.672 7.688c-0.375 0.359-0.891 0.578-1.422 0.578-0.812 0-1.219-0.375-1.75-0.922l7.344-7.344c0.359-0.359 0.578-0.875 0.578-1.406s-0.219-1.047-0.578-1.422l-11.172-11.156c-0.797-0.797-2.312-1.422-3.422-1.422h3.5c1.109 0 2.625 0.625 3.422 1.422l11.172 11.156c0.359 0.375 0.578 0.891 0.578 1.422z"></path></symbol>','<symbol id="outline-icon-print" viewBox="0 0 24 24"><path d="M18 3v3.984h-12v-3.984h12zM18.984 12q0.422 0 0.727-0.281t0.305-0.703-0.305-0.727-0.727-0.305-0.703 0.305-0.281 0.727 0.281 0.703 0.703 0.281zM15.984 18.984v-4.969h-7.969v4.969h7.969zM18.984 8.016q1.219 0 2.109 0.891t0.891 2.109v6h-3.984v3.984h-12v-3.984h-3.984v-6q0-1.219 0.891-2.109t2.109-0.891h13.969z"></path></symbol>','<symbol id="outline-icon-info" viewBox="0 0 1024 1024"><path d="M512 384.295982a95.994 95.994 0 0 1 95.994 95.994V928.006a95.994 95.994 0 0 1-191.988 0V480.289982a95.994 95.994 0 0 1 95.994-95.994z m0-128.375977A127.992 127.992 0 1 1 512 0.063996a127.992 127.992 0 0 1 0 255.984001z"></path></symbol>','<symbol id="outline-icon-warning" viewBox="0 0 1024 1024"><path d="M512 639.704018a95.994 95.994 0 0 1-95.994-95.994V95.994a95.994 95.994 0 0 1 191.988 0v447.716018a95.994 95.994 0 0 1-95.994 95.994z m0 128.375977A127.992 127.992 0 1 1 512 1023.936004a127.992 127.992 0 0 1 0-255.984001z"></path></symbol>','<symbol id="outline-icon-error" viewBox="0 0 1024 1024"><path d="M512.64 376.96L263.744 128 128 263.744l248.96 248.96L128 761.472l135.744 135.808 248.96-248.96 248.832 248.96 135.808-135.808-248.96-248.896 248.96-248.896L761.536 128 512.64 376.96z"></path></symbol>','<symbol id="outline-icon-success" viewBox="0 0 1024 1024"><path d="M426.368 580.864l-226.56-226.56L64 489.984l362.048 362.112 0.32-0.32 0.32 0.32 588.288-588.352L879.36 128 426.304 580.864z"></path></symbol>','<symbol id="outline-icon-circle-info" viewBox="0 0 1024 1024"><path d="M512 810.666667s-42.666667 4.266667-42.666667-42.666667v-341.333333c0-46.933333 42.666667-42.666667 42.666667-42.666667s42.666667-4.266667 42.666667 42.666667v341.333333c0 46.933333-42.666667 42.666667-42.666667 42.666667z m0 213.333333C228.949333 1024 0 795.050667 0 512S228.949333 0 512 0s512 228.949333 512 512-229.674667 512-512 512z m0-938.666667C276.608 85.333333 85.333333 276.608 85.333333 512s191.274667 426.666667 426.666667 426.666667 426.666667-191.274667 426.666667-426.666667S747.392 85.333333 512 85.333333z m0 213.333334c-23.466667 0-42.666667-19.2-42.666667-42.666667s19.2-42.666667 42.666667-42.666667 42.666667 19.2 42.666667 42.666667-19.2 42.666667-42.666667 42.666667z"></path></symbol>','<symbol id="outline-icon-circle-warning" viewBox="0 0 1024 1024"><path d="M512 213.333333s-42.666667-4.266667-42.666667 42.666667v341.333333c0 46.933333 42.666667 42.666667 42.666667 42.666667s42.666667 4.266667 42.666667-42.666667V256c0-46.933333-42.666667-42.666667-42.666667-42.666667z m0-213.333333C228.949333 0 0 228.949333 0 512s228.949333 512 512 512 512-228.949333 512-512S794.325333 0 512 0z m0 938.666667C276.608 938.666667 85.333333 747.392 85.333333 512S276.608 85.333333 512 85.333333s426.666667 191.274667 426.666667 426.666667-191.274667 426.666667-426.666667 426.666667z m0-213.333334c-23.466667 0-42.666667 19.2-42.666667 42.666667s19.2 42.666667 42.666667 42.666667 42.666667-19.2 42.666667-42.666667-19.2-42.666667-42.666667-42.666667z"></path></symbol>','<symbol id="outline-icon-circle-error" viewBox="0 0 1024 1024"><path d="M512 0a512 512 0 1 0 512 512 512 512 0 0 0-512-512z m0 955.776A443.84 443.84 0 0 1 512 68.224a443.904 443.904 0 0 1 0 887.552z"></path><path d="M641.664 326.144a32 32 0 0 1 50.304 39.168l-3.52 4.48-306.112 328.064a32 32 0 0 1-50.304-39.168l3.52-4.48 306.112-328.064z"></path><path d="M324.608 337.088a32 32 0 0 1 40.704-5.12l4.48 3.584 328.064 306.112a32 32 0 0 1-39.168 50.304l-4.48-3.52-328.064-306.112a32 32 0 0 1-1.536-45.248z"></path></symbol>','<symbol id="outline-icon-circle-success" viewBox="0 0 1024 1024"><path d="M512 0C228.949333 0 0 228.949333 0 512s228.949333 512 512 512 512-228.949333 512-512S794.325333 0 512 0z m0 950.869333C269.909333 950.869333 73.130667 754.090667 73.130667 512 73.130667 269.909333 269.909333 73.130667 512 73.130667c242.090667 0 438.869333 196.778667 438.869333 438.869333 0 242.090667-196.778667 438.869333-438.869333 438.869333z"></path><path d="M737.834667 353.834667a42.666667 42.666667 0 0 1 63.872 56.32l-3.541334 4.010666L486.997333 725.333333a85.333333 85.333333 0 0 1-115.242666 4.992L366.336 725.333333l-140.501333-140.501333a42.666667 42.666667 0 0 1 56.32-63.872l4.010666 3.541333L426.666667 665.002667l311.168-311.168z"></path></symbol>','<symbol id="outline-icon-sound" viewBox="0 0 16 16"><path d="M12.757 4.708c-0.406 0.405-1.062 0.405-1.468 0s-0.405-1.062 0-1.468l2.935-2.935c0.406-0.405 1.062-0.405 1.468 0 0.405 0.405 0.405 1.062 0 1.468l-2.935 2.935zM7.996 15.991l-3.996-3.996h-2.997c-0.552 0-0.999-0.447-0.999-0.999v-5.994c0-0.552 0.447-0.999 0.999-0.999h2.997l3.996-3.996c0 0 0.999-0.125 0.999 0.999 0 5.976 0 14.966 0 13.985 0 1.124-0.999 0.999-0.999 0.999zM6.997 4.004l-1.998 1.998h-2.997v3.996h2.997l1.998 1.998v-7.992zM11.992 8.999c-0.552 0-0.999-0.447-0.999-0.999s0.447-0.999 0.999-0.999h2.997c0.552 0 0.999 0.447 0.999 0.999s-0.447 0.999-0.999 0.999h-2.997zM12.757 11.292l2.935 2.935c0.405 0.406 0.405 1.063 0 1.468s-1.062 0.405-1.468 0l-2.935-2.935c-0.405-0.406-0.405-1.063 0-1.468s1.062-0.405 1.468 0z"></path></symbol>']),O=(e,t="icon")=>o(e)?((e,t="icon")=>{const s=/id="(.*?)"/,r=/^(\w+)-/;return T.find((i=>{const o=s.exec(i)[1];return r.exec(o)[1]===t&&o===("icon"===t?`${t}-${e}`:`${t}-icon-${e}`)}))})(e,t):s(i,T),A=(e,t="")=>{const s=t.replace(/^>/i,"");return!!(t&&s&&e)&&(e.matches?e.matches(s):!!e.msMatchesSelector&&e.msMatchesSelector(s))},C=e=>e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode,S=["focusout","blur","focusin","focus","load","unload","mouseenter","mouseleave"],E=(e,t,s)=>{const r=S.indexOf(t)>-1;s._delegateListener&&delete(s=s._delegateListener)._delegateListener,function(e,t,s){const r=e._listeners;let i=-1;if(r.length<1)return!1;r.forEach(((e,r)=>{const o=e.fn;t===e.type&&(i=r,o===s&&(i=r))})),i>-1&&r.splice(i,1)}(e,t,s),e.removeEventListener(t,s,r)},N=function(e,t,s=!1){const r=o(e)?document.querySelector(e):e,i=r.childNodes,n=((e,t)=>{let s=e._listeners||[];return o(t)&&t&&(s=s.filter((e=>e.type===t))),s})(r,t);n.forEach((e=>{E(r,e.type,e.fn)})),(s||!0===t||1===arguments.length)&&r&&i&&i.forEach((e=>{g(e)&&N(e,t,s)}))},B=(e,t,s)=>{if(!l(s))return N(e,t),!1;E(e,t,s)},H=(e,t,s,r,i,o,n=!1)=>{const l=S.indexOf(s)>-1,c=function(l){const a=function(e){const t=e.target;return(s=t)&&3===s.nodeType?s.parentNode:s;var s}(l),h=((e,t,s,r)=>{const i=s||document;if(!e)return null;do{if(null!=t&&(t.startsWith(">")?e.parentNode===i&&A(e,t):A(e,t))||r&&e===i)return e;if(e===i)break}while(e=C(e))})(a,t,e);let u=o||e;l.delegateTarget=h,!0===o&&(u=i),h&&(!0===n&&B(e,s,c),r.call(u,l,i))};if(!e)return!1;e._listeners||(e._listeners=[]),e._listeners.push({el:e,selector:t,type:s,fn:c,data:i,context:o,capture:l}),r._delegateListener=c,e.addEventListener(s,c,l)},k={},D=e=>h(k,e)&&k[e].length>0,I=(e,t=!0)=>t?D(e):(e=>{let t=D(e),s=e.lastIndexOf(".");for(;!t&&-1!==s;)s=(e=e.substring(0,s)).lastIndexOf("."),t=D(e);return t})(e),P=(e,t,s=!0)=>{const r=e=>{if(!D(e))return!1;k[e].forEach((e=>{const s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object BigInt64Array]","[object BigUint64Array]"].indexOf(n(t))>-1?t.toString():t;e.callback.call(e.context||e,s)}))},i=()=>{let t=e,s=e.lastIndexOf(".");for(;-1!==s;)t=t.substring(0,s),s=t.lastIndexOf("."),r(t);r(e),r("*")};if(!I(e))return!1;s?setTimeout(i,10):i()},q=e=>{if(!h(k,e))return!1;delete k[e]},U=(e,t)=>{if(!I(e))return!1;t?(e=>{const t=Object.keys(k);if(!e||t.length<1)return!1;t.forEach((t=>{const s=k[t];let r;s.forEach(((t,i)=>{t.callback!==e&&t.token!==e||(r=t.topic,s.splice(-1,i))})),s.length<1&&q(r)}))})(t):q(e)};class V{constructor(e){this.attrs={},e&&this.initialize(e)}initialize(e){return this.attr(e).render().addListeners(),this}attr(e,t){const s=this.attrs;return o(e)?t&&h(s,e)?(s[e]=t,this):s[e]:c(e)?(u(s,e),this):0===arguments.length?s:this}render(){return this}refresh(){return this}destroy(){return this.removeListeners(),this}reload(e){let t=this.attr();return e&&(t=this.attr(e)),this.destroy().initialize(t),this}$emit(e,t){return P(e,t),this}$on(e,t){return((e,t,s=null)=>{const r=b();let i="symbol"==typeof e?e.toString():e;l(t)&&(k[i]||(k[i]=[]),k[i].push({topic:i,callback:t,context:s,token:r}))})(e,t,this),this}$off(e,t){return U(e,t),this}addListeners(){return this}removeListeners(){return this}}const F=[];let R;((e="")=>{const t=document.body;let s=document.querySelector("#outline-icons"),r=[];(e=>{if(!e)return!1;p(e)&&e.length>0?e.forEach((e=>{-1===T.indexOf(e)&&o(e)&&T.push(e)})):o(e)&&T.push(e)})(e),r=O(),s?s.innerHTML=r.join(""):(s=document.createElement("div"),s.innerHTML=`<svg id="outline-icons" aria-hidden="true" style="position:absolute;display:none;width:0;height:0;overflow:hidden;">${r.join("")}</svg>`,t.insertBefore(s.firstChild,t.firstChild))})();class W extends V{constructor(e){super(),this._default(),e&&this.initialize(e)}_default(){return this.attrs=y(W.DEFAULTS),this.$el=null,this.id="",this.closed=!1,this.visible=!1,this.offset=-50,this.timer=null,this.destroyed=!1,this}initialize(e){return this.attr(e),this.id=this.attr("id"),this.offset=this.attr("offset")||-50,this.$emit("created",function(e){for(var s=1;s<arguments.length;s++){var i=null!=arguments[s]?arguments[s]:{};s%2?r(Object(i),!0).forEach((function(s){t(e,s,i[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},this.attr())),this.render().addListeners(),this.attr("visible")&&this.open(),this}isClosed(){return this.closed}isDestroyed(){return this.destroyed}_getClassName(){const e=this.attr("type"),t=this.attr("effect"),s=this.attr("round"),r=this.attr("closable"),i=this.attr("visible"),o=this.attr("customClass"),n=["outline-message",`outline-message_${e}`,`outline-message_${t}`];return s&&n.push("outline-message_round"),r||n.push("outline-message_full-width"),i&&n.push("outline-message_visible"),o&&n.push(o),n}render(){const e=this.attr("type"),t=this.attr("message"),s=this.attr("effect"),r=this.attr("round"),i=this.attr("closable"),o=this.attr("dangerouslyUseHTMLString"),n=this._getClassName(),l=[];let c,a,h,u,d,p=20;return r&&"default"===s&&(p=12),"plain"!==s&&(c=j("light"===s?`circle-${e}`:e,{iconSet:"outline",size:p}),$(c,"outline-message__icon"),l.push(c)),o?(h=document.createDocumentFragment(),h.innerHTML=t):h=document.createTextNode(f(m(t))),a=x("p",{className:"outline-message__content"},[h]),l.push(a),i&&(u=j("close",{iconSet:"outline",size:18}),$(u,"outline-message__close"),l.push(u)),d=x("div",{className:n.join(" ")},l),d.style.cssText="top:-50px;",this.$el=d,document.body.appendChild(this.$el),this.$emit("mounted"),this}_refreshIcon(){const e=".outline-message_hidden",t=this.$el;let s,r,i,o,n,l,c,a=20;return this.isDestroyed()?this:(n=t.querySelector(".outline-icon"),n?(s=this.attr("type"),r=this.attr("effect"),i=this.attr("round"),"plain"===r?$(n,e):(_(n,e),i&&"default"===r&&(a=12)),l=n.querySelector(".outline-icon__svg"),z(l,{style:`width:${a}px;height:${a}px;`}),c=l.querySelector("use"),o="light"===r?`circle-${s}`:s,M(c,"xlink:href",`#outline-icon-${o}`),this):this)}_refreshMessage(){const e=this.$el;let t,s,r,i;return this.isDestroyed()||(t=e.querySelector(".outline-message__content"),s=this.attr("dangerouslyUseHTMLString"),r=this.attr("message"),i=s?r:f(m(r)),t.innerHTML=i),this}_refreshClose(){const e=".outline-message_hidden",t=this.$el;let s,r;return this.isDestroyed()||(s=t.querySelector(".outline-message__close"),r=this.attr("closable"),s&&(r?$(s,e):_(s,e))),this}_refreshEl(){const e=this.$el;let t;return this.isDestroyed()||(t=this._getClassName(),M(e,"className",t.join(" "))),this}refresh(e){return a(e)?(this.attr(e)._refreshIcon()._refreshMessage()._refreshClose()._refreshEl(),this):this}clearTimer(){return this.isDestroyed()||this.timer&&(clearTimeout(this.timer),this.timer=null),this}startTimer(e){return this.isDestroyed()||(this.timer=d((()=>{this.$emit("opened"),this.close()}),1e3*e)),this}open(e){const t=this.$el;let s,r,i,o;return this.isDestroyed()||(this.isClosed()&&this.refresh(e),s=this.attr("offset"),r=this.attr("duration"),i=s&&s>=this.offset?s:this.offset,o=`top:${i}px;`,this.clearTimer(),this.$emit("beforeOpen"),d((()=>{this.visible=!0,$(t,"outline-message_visible"),t.style.cssText=o,r>0&&this.startTimer(r)}),100)),this}close(){const e=this.$el;let t,s;return this.isDestroyed()||(t=this.attr("destroyAfterClosed"),s=this.attr("beforeClose"),l(s)&&s.call(this),e.style.cssText="top:-50px;",_(e,"outline-message_visible"),this.visible=!1,this.closed=!0,d((()=>{this.$emit("closed"),t&&this.destroy()}),500)),this}destroy(){return this.$emit("beforeDestroy"),this.isDestroyed()||(this.removeListeners(),document.body.removeChild(this.$el),clearTimeout(this.timer),this._default(),this.$emit("afterDestroy")),this}onMouseEnter(){return this.clearTimer(),this}onMouseLeave(){const e=this.attr("duration"),t=this.attr("delay");return e<=0||this.startTimer(t),this}onClose(){return this.clearTimer(),this.close(),this}addListeners(){const e=this.$el;return H(e,".outline-message__content","mouseenter",this.onMouseEnter,this,!0),H(e,".outline-message__content","mouseleave",this.onMouseLeave,this,!0),H(e,".outline-message__close","click",this.onClose,this,!0),this}removeListeners(){const e=this.$el;return B(e,"mouseenter",this.onMouseEnter),B(e,"mouseleave",this.onMouseLeave),B(e,"click",this.onClose),this}}return W.DEFAULTS=y({id:"",type:"info",effect:"default",round:!1,offset:30,duration:3,delay:2,message:"",customClass:"",closable:!0,visible:!0,dangerouslyUseHTMLString:!1,destroyAfterClosed:!0,beforeClose:null}),["info","success","warning","error"].forEach((e=>{W[e]=t=>{const s={},r=b("outline-message-"),i=t.beforeClose||null;let n=t.offset||30;return o(t)?s.message=t:a(t)&&u(s,t),s.id=r,s.type=e,s.offset=n,s.visible=!1,s.beforeClose=()=>{W.close(r,i)},R=new W(s),F.forEach((e=>{n+=e.$el.offsetHeight+16})),R.offset=n,R.open(),F.push(R),R}})),W.close=(e,t)=>{const s=F.length;let r,i,o=-1;if(F.forEach(((s,r)=>{e===s.id&&(i=s.$el.offsetHeight,o=r,l(t)&&t.call(s),F.splice(r,1))})),s<=1||-1===o||o>F.length-1)return!1;for(r=o;r<s-1;r+=1){const e=F[r].$el;e.style.top=parseInt(e.style.top,10)-i-16+"px"}},W.clear=()=>{let e=F.length-1;for(;e>=0;e-=1)F[e].close()},W}));
//# sourceMappingURL=message.min.js.map