{"version":3,"file":"3340.632945fa0f012040.js","mappings":"6IAEA,IAAIA,EAAa,kBAChBC,EAAW,GAEZ,SAASC,EAAgBC,EAASC,GACjCC,KAAKF,QAAUG,EAAEH,GACjBE,KAAKD,QAAUE,EAAEC,OAAO,GAAIN,EAAUG,GAEtCC,KAAKG,UAAYP,EACjBI,KAAKI,MAAQT,EAEbK,KAAKK,MACN,CAEAR,EAAgBS,UAAY,CAC3BD,KAAM,WACLL,KAAKO,sBACLP,KAAKQ,kBACN,EAEAD,oBAAqB,WACpBP,KAAKS,QAAQT,KAAKU,6BACnB,EAEAF,iBAAkB,YAMjBG,EAL6BC,KAAUC,OAAQ,UAC7CC,QACAC,KAAa,OAAI,EACjBC,QAEqBC,qBACtBjB,KAAKS,QAAQT,KAAKU,6BACnB,EAAEQ,KAAKlB,MACR,EAEAU,2BAA4B,WAC3B,IAAIS,EAAUlB,EAAEY,QAGhB,MAAO,CACNO,gBAAiBD,EAAQE,SACzBC,eAAgBH,EAAQI,QACxBC,cAAeX,OAAOY,OAAOJ,OAC7BK,aAAcb,OAAOY,OAAOF,MAE9B,EAEAd,QAAS,SAAUkB,GAClBd,OAAOe,cAAc,aAAcD,EACpC,GAGD1B,EAAE4B,GAAGlC,GAAc,SAAUI,GAC5B,OAAOC,KAAK8B,KAAK,WACX7B,EAAE8B,KAAK/B,KAAM,UAAYL,IAC7BM,EAAE8B,KAAK/B,KAAM,UAAYL,EAAY,IAAIE,EAAgBG,KAAMD,GAEjE,EACD","names":["pluginName","defaults","ViewportLogging","element","options","this","$","extend","_defaults","_name","init","prototype","initialSendViewport","addEventListener","sendLog","calculateViewportAndScreen","windowResizeObservable","fromEvent","window","pipe","debounceTime","distinctUntilChanged","subscribe","bind","$window","viewport_height","height","viewport_width","width","screen_height","screen","screen_width","calculatedViewportAndScreen","logRemoteInfo","fn","each","data"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./generated-src/legacy/default/plugins/jquery.viewportLogging.ts"],"sourcesContent":["import { debounceTime, distinctUntilChanged, fromEvent } from 'rxjs';\n\nlet pluginName = 'ViewportLogging',\n\tdefaults = {};\n\nfunction ViewportLogging(element, options) {\n\tthis.element = $(element);\n\tthis.options = $.extend({}, defaults, options);\n\n\tthis._defaults = defaults;\n\tthis._name = pluginName;\n\n\tthis.init();\n}\n\nViewportLogging.prototype = {\n\tinit: function () {\n\t\tthis.initialSendViewport();\n\t\tthis.addEventListener();\n\t},\n\n\tinitialSendViewport: function () {\n\t\tthis.sendLog(this.calculateViewportAndScreen());\n\t},\n\n\taddEventListener: function () {\n\t\tlet windowResizeObservable = fromEvent(window, 'resize')\n\t\t\t.pipe(\n\t\t\t\tdebounceTime(1500),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t);\n\t\twindowResizeObservable.subscribe(function () {\n\t\t\tthis.sendLog(this.calculateViewportAndScreen());\n\t\t}.bind(this));\n\t},\n\n\tcalculateViewportAndScreen: function () {\n\t\tlet $window = $(window);\n\n\t\t//clientside logging currently doesn't allow nested objects. That's why all information must be written in one area\n\t\treturn {\n\t\t\tviewport_height: $window.height(),\n\t\t\tviewport_width: $window.width(),\n\t\t\tscreen_height: window.screen.height,\n\t\t\tscreen_width: window.screen.width,\n\t\t};\n\t},\n\n\tsendLog: function (calculatedViewportAndScreen) {\n\t\twindow.logRemoteInfo('screensize', calculatedViewportAndScreen);\n\t},\n};\n\n$.fn[pluginName] = function (options) {\n\treturn this.each(function () {\n\t\tif (!$.data(this, 'plugin_' + pluginName)) {\n\t\t\t$.data(this, 'plugin_' + pluginName, new ViewportLogging(this, options));\n\t\t}\n\t});\n};\n"],"x_google_ignoreList":[]}