1/*eslint-disable */ 2// 20220630 3(() => { 4 "use strict"; 5 const t = class { 6 constructor(t, e) { 7 (this.name = t), (this.data = e); 8 } 9 serialize() { 10 return JSON.stringify({ 11 name: this.name, 12 data: this.data, 13 }); 14 } 15 }, 16 e = class { 17 constructor(t) { 18 (this.options = t), this.dispatcher.addTarget(this.handleEvent.bind(this)); 19 } 20 handleEvent(t) { 21 if (!t || !t.name) return; 22 const e = this.getEventCallback(); 23 e && e(t.name, t.data); 24 } 25 getEventCallback() { 26 if (!this.options.onIncomingEvent) return !1; 27 if ("function" != typeof this.options.onIncomingEvent) throw new TypeError("onIncomingEvent is not a function"); 28 return this.options.onIncomingEvent; 29 } 30 _sendEventObject(e) { 31 if (!(e instanceof t)) throw new TypeError("Incorrect event parameter"); 32 let n; 33 if ( 34 ((n = 35 window.webkit && window.webkit.messageHandlers ? window.webkit.messageHandlers.appInterface : window.appInterface), 36 !n || !n.postMessage) 37 ) 38 throw new ReferenceError("Communication interface is missing. Unable to send event to the application."); 39 return n.postMessage(e.serialize()); 40 } 41 sendEvent(e, n) { 42 return this._sendEventObject(new t(e, n)); 43 } 44 }; 45 (window.webInterface = e.prototype.dispatcher = 46 new (class { 47 constructor() { 48 this.callbacks = []; 49 } 50 addTarget(t) { 51 this.callbacks.push(t); 52 } 53 dispatch(t) { 54 this.callbacks.forEach((e) => { 55 e(t); 56 }); 57 } 58 })()), 59 (window.ApplicationEvents = e); 60})(); 61/*eslint-enable */
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.