Onionr/static-data/www/shared/node_modules/pnotify/dist/iife/PNotifyButtons.js

2 lines
7.8 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 s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},PNotifyButtons=function(n){"use strict";n=n&&n.__esModule?n.default:n;var t;function s(n,t){var s,i,o=t._showCloser&&c(n,t),r=t._showSticker&&l(n,t);return{c:function(){o&&o.c(),s=function(t){return document.createTextNode(t)}("\n"),r&&r.c(),i=document.createComment("")},m:function(t,e){o&&o.m(t,e),f(t,s,e),r&&r.m(t,e),f(t,i,e)},p:function(t,e){e._showCloser?o?o.p(t,e):((o=c(n,e)).c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null),e._showSticker?r?r.p(t,e):((r=l(n,e)).c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null)},d:function(t){o&&o.d(t),t&&_(s),r&&r.d(t),t&&_(i)}}}function c(e,t){var n,s,i,o;function r(t){e.handleCloserClick()}return{c:function(){n=a("div"),(s=a("span")).className=t._closerClass+" svelte-1yjle82",h(n,"click",r),n.className=i="ui-pnotify-closer "+(!t.closerHover||t._mouseIsIn?"":"ui-pnotify-buttons-hidden")+" svelte-1yjle82",p(n,"role","button"),n.tabIndex="0",n.title=o=t.labels.close},m:function(t,e){f(t,n,e),u(n,s)},p:function(t,e){t._closerClass&&(s.className=e._closerClass+" svelte-1yjle82"),(t.closerHover||t._mouseIsIn)&&i!==(i="ui-pnotify-closer "+(!e.closerHover||e._mouseIsIn?"":"ui-pnotify-buttons-hidden")+" svelte-1yjle82")&&(n.className=i),t.labels&&o!==(o=e.labels.close)&&(n.title=o)},d:function(t){t&&_(n),d(n,"click",r)}}}function l(e,t){var n,s,i,o,r,c;function l(t){e.handleStickerClick()}return{c:function(){n=a("div"),(s=a("span")).className=i=(t._options.hide?t._pinUpClass:t._pinDownClass)+" svelte-1yjle82",h(n,"click",l),n.className=o="ui-pnotify-sticker "+(!t.stickerHover||t._mouseIsIn?"":"ui-pnotify-buttons-hidden")+" svelte-1yjle82",p(n,"role","button"),p(n,"aria-pressed",r=t._options.hide),n.tabIndex="0",n.title=c=t._options.hide?t.labels.stick:t.labels.unstick},m:function(t,e){f(t,n,e),u(n,s)},p:function(t,e){(t._options||t._pinUpClass||t._pinDownClass)&&i!==(i=(e._options.hide?e._pinUpClass:e._pinDownClass)+" svelte-1yjle82")&&(s.className=i),(t.stickerHover||t._mouseIsIn)&&o!==(o="ui-pnotify-sticker "+(!e.stickerHover||e._mouseIsIn?"":"ui-pnotify-buttons-hidden")+" svelte-1yjle82")&&(n.className=o),t._options&&r!==(r=e._options.hide)&&p(n,"aria-pressed",r),(t._options||t.labels)&&c!==(c=e._options.hide?e.labels.stick:e.labels.unstick)&&(n.title=c)},d:function(t){t&&_(n),d(n,"click",l)}}}function e(t){var e=this;!function(t,e){t._handlers=r(),t._slots=r(),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._state=o(_extends({_notice:null,_options:{},_mouseIsIn:!1},n.modules.Buttons.defaults),t.data),this._recompute({sticker:1,_notice:1,closer:1,classes:1},this._state),this._intro=!0,document.getElementById("svelte-1yjle82-style")||function(){var t=a("style");t.id="svelte-1yjle82-style",t.textContent=".ui-pnotify-closer.svelte-1yjle82,.ui-pnotify-sticker.svelte-1yjle82{float:right;margin-left:.5em;cursor:pointer}[dir=rtl] .ui-pnotify-closer.svelte-1yjle82,[dir=rtl] .ui-pnotify-sticker.svelte-1yjle82{float:left;margin-right:.5em;margin-left:0}.ui-pnotify-buttons-hidden.svelte-1yjle82{visibility:hidden}",u(document.head,t)}(),this._fragment=s(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),i(this))}function a(t){return document.createElement(t)}function u(t,e){t.appendChild(e)}function f(t,e,n){t.insertBefore(e,n)}function _(t){t.parentNode.removeChild(t)}function h(t,e,n,s){t.addEventListener(e,n,s)}function p(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function d(t,e,n,s
//# sourceMappingURL=PNotifyButtons.js.map