coolify/public/js/echo.js

3 lines
15 KiB
JavaScript
Raw Normal View History

2023-12-06 10:32:49 +01:00
// Source: https://cdnjs.cloudflare.com/ajax/libs/laravel-echo/1.15.3/echo.iife.min.js
var Echo=function(){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function u(e,t,n){t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1})}function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,i=arguments[t];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");t=e;if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(n){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=s(n);return h(this,i?(e=s(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}var f=function(){function e(){o(this,e)}return u(e,[{key:"listenForWhisper",value:function(e,t){return this.listen(".client-"+e,t)}},{key:"notification",value:function(e){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",e)}},{key:"stopListeningForWhisper",value:function(e,t){return this.stopListening(".client-"+e,t)}}]),e}(),p=function(){function t(e){o(this,t),this.namespace=e}return u(t,[{key:"format",value:function(e){return"."===e.charAt(0)||"\\"===e.charAt(0)?e.substr(1):(e=this.namespace?this.namespace+"."+e:e).replace(/\./g,"\\")}},{key:"setNamespace",value:function(e){this.namespace=e}}]),t}(),v=function(){c(s,f);var r=l(s);function s(e,t,n){var i;return o(this,s),(i=r.call(this)).name=t,i.pusher=e,i.options=n,i.eventFormatter=new p(i.options.namespace),i.subscribe(),i}return u(s,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(e,t){return this.on(this.eventFormatter.format(e),t),this}},{key:"listenToAll",value:function(i){var r=this;return this.subscription.bind_global(function(e,t){var n;e.startsWith("pusher:")||(n=r.options.namespace.replace(/\./g,"\\"),n=e.startsWith(n)?e.substring(n.length+1):"."+e,i(n,t))}),this}},{key:"stopListening",value:function(e,t){return t?this.subscription.unbind(this.eventFormatter.format(e),t):this.subscription.unbind(this.eventFormatter.format(e)),this}},{key:"stopListeningToAll",value:function(e){return e?this.subscription.unbind_global(e):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(e){return this.on("pusher:subscription_succeeded",function(){e()}),this}},{key:"error",value:function(t){return this.on("pusher:subscription_error",function(e){t(e)}),this}},{key:"on",value:function(e,t){return this.subscription.bind(e,t),this}}]),s}(),y=function(){c(t,v);var e=l(t);function t(){return o(this,t),e.apply(this,arguments)}return u(t,[{key:"whisper",value:function(e,t){return this.pusher.channels.channels[this.