onionr/static-data/www/shared/node_modules/pnotify/dist/iife/PNotifyReference.js

2 lines
5.3 KiB
JavaScript
Raw Normal View History

var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},PNotifyReference=function(n){"use strict";n=n&&n.__esModule?n.default:n;var t,e={initModule:function(t){var e=this;this.set(t);var n=this.get()._notice;n.on("mouseenter",function(){return e.set({_mouseIsIn:!0})}),n.on("mouseleave",function(){return e.set({_mouseIsIn:!1})})},doSomething:function(){var t=0,e=this.get()._notice,n=setInterval(function(){360===(t+=10)&&(t=0,clearInterval(n)),e.refs.elem.style.transform="rotate("+t+"deg)"},20)},update:function(){},beforeOpen:function(){},afterOpen:function(){},beforeClose:function(){},afterClose:function(){},beforeDestroy:function(){},afterDestroy:function(){}};function i(n,t){var i,o=t.putThing&&r(n,t);return{c:function(){o&&o.c(),i=document.createComment("")},m:function(t,e){o&&o.m(t,e),d(t,i,e)},p:function(t,e){e.putThing?o?o.p(t,e):((o=r(n,e)).c(),o.m(i.parentNode,i)):o&&(o.d(1),o=null)},d:function(t){o&&o.d(t),t&&m(i)}}}function r(n,t){var i,o,r,s,a,c,f,u,l=t.labels.text;function e(t){n.doSomething()}return{c:function(){i=h("button"),o=h("i"),s=p(" "),a=p(l),f=p("\n \n "),u=h("div"),o.className=r=t._notice.get()._icons.athing+" svelte-1qy4b0e",function(t,e,n,i){t.addEventListener(e,n,i)}(i,"click",e),i.className="ui-pnotify-reference-button btn btn-default svelte-1qy4b0e",i.type="button",i.disabled=c=!t._mouseIsIn,u.className="ui-pnotify-reference-clearing svelte-1qy4b0e"},m:function(t,e){d(t,i,e),_(i,o),_(i,s),_(i,a),n.refs.thingElem=i,d(t,f,e),d(t,u,e)},p:function(t,e){t._notice&&r!==(r=e._notice.get()._icons.athing+" svelte-1qy4b0e")&&(o.className=r),t.labels&&l!==(l=e.labels.text)&&function(t,e){t.data=""+e}(a,l),t._mouseIsIn&&c!==(c=!e._mouseIsIn)&&(i.disabled=c)},d:function(t){t&&m(i),function(t,e,n,i){t.removeEventListener(e,n,i)}(i,"click",e),n.refs.thingElem===i&&(n.refs.thingElem=null),t&&(m(f),m(u))}}}function o(t){var e=this;!function(t,e){t._handlers=f(),t._slots=f(),t._bind=e._bind,t._staged={},t.options=e,t.root=e.root||t,t.store=e.store||t.root.store,e.root||(t._beforecreate=[],t._oncreate=[],t._aftercreate=[])}(this,t),this.refs={},this._state=s(_extends({_notice:null,_options:{},_mouseIsIn:!1},n.modules.Reference.defaults),t.data),this._intro=!0,document.getElementById("svelte-1qy4b0e-style")||function(){var t=h("style");t.id="svelte-1qy4b0e-style",t.textContent=".ui-pnotify-reference-button.svelte-1qy4b0e{float:right}.ui-pnotify-reference-clearing.svelte-1qy4b0e{clear:right;line-height:0}",_(document.head,t)}(),this._fragment=i(this,this._state),this.root._oncreate.push(function(){(function(){this.fire("init",{module:this})}).call(e),e.fire("update",{changed:function(t,e){for(var n in e)t[n]=1;return t}({},e._state),current:e._state})}),t.target&&(this._fragment.c(),this._mount(t.target,t.anchor),a(this))}function h(t){return document.createElement(t)}function _(t,e){t.appendChild(e)}function d(t,e,n){t.insertBefore(e,n)}function m(t){t.parentNode.removeChild(t)}function p(t){return document.createTextNode(t)}function s(t,e){for(var n in e)t[n]=e[n];return t}function a(t){t._lock=!0,u(t._beforecreate),u(t._oncreate),u(t._aftercreate),t._lock=!1}function c(){}function f(){return Object.create(null)}function u(t){for(;t&&t.length;)t.shift()()}return s(o.prototype,{destroy:function(t){this.destroy=c,this.fire("destroy"),this.set=c,this._fragment.d(!1!==t),this._fragment=null,this._state={}},get:function(){return this._state},fire:function(t,e){var n=t in this._handlers&&this._handlers[t].slice();if(!n)return;for(var i=0;i<n.length;i+=1){var o=n[i];if(!o.__calling)try{o.__calling=!0,o.call(this,e)}finally{o.__calling=!1}}},on:function(t,e){var n=this._handlers[t]||(this._handlers[t]=[]);return n.push(e),{cancel:function(){var t=n.indexOf(e);~t&&n.splice(t,1)}}},set:function(t
//# sourceMappingURL=PNotifyReference.js.map