{"version":3,"names":["window","define","_exports","_pluginApi","Object","defineProperty","value","default","require","getObjectForTheme","name","after","initialize","withPluginApi","api","modifyClass","pluginId","shouldShowTopicInHeader","onPageChange","newTopicButton","document","getElementById","addEventListener","location","assign","href","encodeURIComponent","setTimeout","initialLoggedInStatus","cookie","includes","stateListener","currentLoggedInStatus"],"sourceRoot":"theme-13/","sources":["discourse/initializers/theme-field-41-common-html-script-1.js"],"sourcesContent":["if ('define' in window) {\ndefine(\"discourse/theme-13/discourse/initializers/theme-field-41-common-html-script-1\", [\"exports\", \"discourse/lib/plugin-api\"], function (_exports, _pluginApi) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  const settings = require(\"discourse/lib/theme-settings-store\").getObjectForTheme(13);\n  const themePrefix = key => `theme_translations.13.${key}`;\n  var _default = _exports.default = {\n    name: \"theme-field-41-common-html-script-1\",\n    after: \"inject-objects\",\n    initialize() {\n      (0, _pluginApi.withPluginApi)(\"0.8.13\", api => {\n        api.modifyClass('component:discourse-topic', {\n          pluginId: 'vaadin-theme-2025',\n          shouldShowTopicInHeader() {\n            return false;\n          }\n        });\n        api.onPageChange(() => {\n          const newTopicButton = document.getElementById(\"new-topic-button-login\");\n          if (newTopicButton) {\n            newTopicButton.addEventListener(\"click\", () => {\n              //location.assign(\"https://preview.vaadin.com/forum/auth/saml\")});\n              location.assign(window.location.href = \"https://www.pinikiu.com/login?redirectUrl=\" + encodeURIComponent(location.href));\n            });\n          }\n        });\n        function autheticationStateListener() {\n          let initialLoggedInStatus = document.cookie.includes(\"SSO_SESSION_RUNNING\");\n          const stateListener = () => {\n            const currentLoggedInStatus = document.cookie.includes(\"SSO_SESSION_RUNNING\");\n            if (initialLoggedInStatus !== currentLoggedInStatus) {\n              initialLoggedInStatus = currentLoggedInStatus;\n              if (currentLoggedInStatus) {\n                location.assign(\"https://www.pinikiu.com/forum/auth/saml\");\n              }\n            }\n            return setTimeout(stateListener, 2000);\n          };\n          stateListener();\n        }\n        setTimeout(autheticationStateListener, 2000);\n      });\n    }\n  };\n});\n}\n"],"mappings":"AAAI,WAAYA,QAChBC,OAAO,gFAAiF,CAAC,UAAW,6BAA6B,SAAUC,EAAUC,GACnJ;AAEAC,OAAOC,eAAeH,EAAU,aAAc,CAC5CI,OAAO,IAETJ,EAASK,aAAU;AACFC,QAAQ,sCAAsCC,kBAAkB;AAElEP,EAASK,QAAU,CAChCG,KAAM,sCACNC,MAAO,iBACP,UAAAC,IACE,EAAIT,EAAWU,eAAe,UAAUC,IACtCA,EAAIC,YAAY,4BAA6B,CAC3CC,SAAU,oBACVC,wBAAuB,KACd,IAGXH,EAAII,cAAa,KACf,MAAMC,EAAiBC,SAASC,eAAe;AAC3CF,GACFA,EAAeG,iBAAiB,SAAS,KAEvCC,SAASC,OAAOxB,OAAOuB,SAASE,KAAO,wCAA0CC,mBAAmBH,SAASE,MAAM,GAEvH,IAgBFE,YAdA,WACE,IAAIC,EAAwBR,SAASS,OAAOC,SAAS;AACrD,MAAMC,EAAgB,KACpB,MAAMC,EAAwBZ,SAASS,OAAOC,SAAS;AAOvD,OANIF,IAA0BI,IAC5BJ,EAAwBI,EACpBA,GACFT,SAASC,OAAO,uCAGbG,WAAWI,EAAe,IAAK;AAExCA,GACF,GACuC,IAAK,GAEhD,EAEJ"}