PageSourceSearch

https://www.naturviterne.no/corepublish/cplib-common/WebsocketManager_v1.0.0.js?appver=5d647f1e8e

js naturviterne.no collected 2026-10-06 08:55:15 UTC 2,135 bytes, 1 lines download raw bytes

1function _typeof(e){return _typeof="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},_typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var WebsocketManager=_createClass(function e(){_classCallCheck(this,e)},[{key:"getChannelPrefix",value:function(){var e,t,o=(null===(e=window.corepublish)||void 0===e?void 0:e.systemId)||"",n=(null===(t=window.corepublish)||void 0===t?void 0:t.domainId)||"";return o&&n||console.warn("WebsocketManager: Missing systemId or domainId in window.corepublish"),"".concat(o,".").concat(n,".")}},{key:"isAvailable",value:function(){var e,t;return null!==(e=null===(t=window.corepublish)||void 0===t?void 0:t.websocketActive)&&void 0!==e&&e&&void 0!==window.Echo}},{key:"subscribePrivate",value:function(e){if(!this.isAvailable())return null;var t=this.getChannelPrefix()+e;return window.Echo.private(t)}},{key:"subscribePublic",value:function(e){if(!this.isAvailable())return null;var t=this.getChannelPrefix()+e;return window.Echo.channel(t)}},{key:"unsubscribe",value:function(e){if(this.isAvailable()){var t=this.getChannelPrefix()+e;window.Echo.leave(t)}}}]);window.WebsocketManager=new WebsocketManager,"undefined"!=typeof module&&(module.exports=WebsocketManager);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.