window.configFile = "https://van.najva.com/static/js/scripts/downloadha108-website-7288-0379f0e1-0d7d-4d6a-a3e6-caeee1d01187.json";

// version: 1.13.20
(()=>{var e={5752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(655),r=n(1313),a=n(4594),s=((i={})["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",i["bad-app-name"]="Illegal App name: '{$appName}",i["duplicate-app"]="Firebase App named '{$appName}' already exists",i["app-deleted"]="Firebase App named '{$appName}' already deleted",i["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",i),c=new r.ErrorFactory("app","Firebase",s),u="[DEFAULT]",d=[],l=function(){function e(e,t,n){this.firebase_=n,this.isDeleted_=!1,this.services_={},this.name_=t.name,this.automaticDataCollectionEnabled_=t.automaticDataCollectionEnabled||!1,this.options_=r.deepCopy(e),this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(e){d.push(e),setTimeout((function(){return e(null)}),0)},removeAuthTokenListener:function(e){d=d.filter((function(t){return t!==e}))}}}return Object.defineProperty(e.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(e){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),e.prototype.delete=function(){var e=this;return new Promise((function(t){e.checkDestroyed_(),t()})).then((function(){e.firebase_.INTERNAL.removeApp(e.name_);for(var t=[],n=0,i=Object.keys(e.services_);n<i.length;n++)for(var o=i[n],r=0,a=Object.keys(e.services_[o]);r<a.length;r++){var s=a[r];t.push(e.services_[o][s])}return Promise.all(t.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})))})).then((function(){e.isDeleted_=!0,e.services_={}}))},e.prototype._getService=function(e,t){if(void 0===t&&(t=u),this.checkDestroyed_(),this.services_[e]||(this.services_[e]={}),!this.services_[e][t]){var n=t!==u?t:void 0,i=this.firebase_.INTERNAL.factories[e](this,this.extendApp.bind(this),n);this.services_[e][t]=i}return this.services_[e][t]},e.prototype._removeServiceInstance=function(e,t){void 0===t&&(t=u),this.services_[e]&&this.services_[e][t]&&delete this.services_[e][t]},e.prototype.extendApp=function(e){var t=this;r.deepExtend(this,e),e.INTERNAL&&e.INTERNAL.addAuthTokenListener&&(d.forEach((function(e){t.INTERNAL.addAuthTokenListener(e)})),d=[])},e.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw c.create("app-deleted",{appName:this.name_})},e}();l.prototype.name&&l.prototype.options||l.prototype.delete;var f=new a.Logger("@firebase/app");
        /**
         * @license
         * Copyright 2019 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */
        /**
         * @license
         * Copyright 2017 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */
        if(r.isBrowser()&&void 0!==self.firebase){f.warn("\n    Warning: Firebase is already defined in the global scope. Please make sure\n    Firebase library is only loaded once.\n  ");var p=self.firebase.SDK_VERSION;p&&p.indexOf("LITE")>=0&&f.warn("\n    Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n    You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n    ")}var h=
            /**
             * @license
             * Copyright 2019 Google Inc.
             *
             * Licensed under the Apache License, Version 2.0 (the "License");
             * you may not use this file except in compliance with the License.
             * You may obtain a copy of the License at
             *
             *   http://www.apache.org/licenses/LICENSE-2.0
             *
             * Unless required by applicable law or agreed to in writing, software
             * distributed under the License is distributed on an "AS IS" BASIS,
             * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
             * See the License for the specific language governing permissions and
             * limitations under the License.
             */
            function e(){var t=
                /**
                 * @license
                 * Copyright 2019 Google Inc.
                 *
                 * Licensed under the Apache License, Version 2.0 (the "License");
                 * you may not use this file except in compliance with the License.
                 * You may obtain a copy of the License at
                 *
                 *   http://www.apache.org/licenses/LICENSE-2.0
                 *
                 * Unless required by applicable law or agreed to in writing, software
                 * distributed under the License is distributed on an "AS IS" BASIS,
                 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
                 * See the License for the specific language governing permissions and
                 * limitations under the License.
                 */
                function(e){var t={},n={},i={},o={__esModule:!0,initializeApp:function(n,i){void 0===i&&(i={}),"object"==typeof i&&null!==i||(i={name:i});var a=i;void 0===a.name&&(a.name=u);var s=a.name;if("string"!=typeof s||!s)throw c.create("bad-app-name",{appName:String(s)});if(r.contains(t,s))throw c.create("duplicate-app",{appName:s});var l=new e(n,a,o);return t[s]=l,d(l,"create"),l},app:a,apps:null,SDK_VERSION:"6.6.2",INTERNAL:{registerService:function(t,u,d,l,p){if(void 0===p&&(p=!1),n[t])return f.debug("There were multiple attempts to register service "+t+"."),o[t];function h(e){if(void 0===e&&(e=a()),"function"!=typeof e[t])throw c.create("invalid-app-argument",{appName:t});return e[t]()}return n[t]=u,l&&(i[t]=l,s().forEach((function(e){l("create",e)}))),void 0!==d&&r.deepExtend(h,d),o[t]=h,e.prototype[t]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this._getService.bind(this,t).apply(this,p?e:[])},h},removeApp:function(e){d(t[e],"delete"),delete t[e]},factories:n,useAsService:l}};function a(e){if(e=e||u,!r.contains(t,e))throw c.create("no-app",{appName:e});return t[e]}function s(){return Object.keys(t).map((function(e){return t[e]}))}function d(e,t){for(var o=0,r=Object.keys(n);o<r.length;o++){var a=l(e,r[o]);if(null===a)return;i[a]&&i[a](t,e)}}function l(e,t){return"serverAuth"===t?null:t}return o.default=o,Object.defineProperty(o,"apps",{get:s}),a.App=e,o}(l);return t.INTERNAL=o.__assign({},t.INTERNAL,{createFirebaseNamespace:e,extendNamespace:function(e){r.deepExtend(t,e)},createSubscribe:r.createSubscribe,ErrorFactory:r.ErrorFactory,deepExtend:r.deepExtend}),t}(),v=h.initializeApp;h.initializeApp=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.isNode()&&f.warn('\n      Warning: This is a browser-targeted Firebase bundle but it appears it is being\n      run in a Node environment.  If running in a Node environment, make sure you\n      are using the bundle specified by the "main" field in package.json.\n      \n      If you are using Webpack, you can specify "main" as the first item in\n      "resolve.mainFields":\n      https://webpack.js.org/configuration/resolve/#resolvemainfields\n      \n      If using Rollup, use the rollup-plugin-node-resolve plugin and specify "main"\n      as the first item in "mainFields", e.g. [\'main\', \'module\'].\n      https://github.com/rollup/rollup-plugin-node-resolve\n      '),v.apply(void 0,e)};var _=h;t.default=_,t.firebase=_},4594:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LogLevel:()=>i,Logger:()=>s,setLogLevel:()=>c});
        /**
         * @license
         * Copyright 2017 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */
        var i,o=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(i||(i={}));var r=i.INFO,a=function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(!(t<e.logLevel)){(new Date).toISOString();switch(t){case i.DEBUG:case i.VERBOSE:case i.INFO:case i.WARN:case i.ERROR:break;default:throw new Error("Attempted to log a message with an invalid logType (value: "+t+")")}}},s=function(){function e(e){this.name=e,this._logLevel=r,this._logHandler=a,o.push(this)}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in i))throw new TypeError("Invalid value assigned to `logLevel`");this._logLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!0,configurable:!0}),e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,i.DEBUG].concat(e))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,i.VERBOSE].concat(e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,i.INFO].concat(e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,i.WARN].concat(e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._logHandler.apply(this,[this,i.ERROR].concat(e))},e}();
        /**
         * @license
         * Copyright 2017 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */
        function c(e){o.forEach((function(t){t.logLevel=e}))}},1313:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(655),o={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},r=function(e,t){if(!e)throw a(t)},a=function(e){return new Error("Firebase Database ("+o.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},s=function(e){for(var t=[],n=0,i=0;i<e.length;i++){var o=e.charCodeAt(i);o<128?t[n++]=o:o<2048?(t[n++]=o>>6|192,t[n++]=63&o|128):55296==(64512&o)&&i+1<e.length&&56320==(64512&e.charCodeAt(i+1))?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=63&o|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=63&o|128)}return t},c={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[],o=0;o<e.length;o+=3){var r=e[o],a=o+1<e.length,s=a?e[o+1]:0,c=o+2<e.length,u=c?e[o+2]:0,d=r>>2,l=(3&r)<<4|s>>4,f=(15&s)<<2|u>>6,p=63&u;c||(p=64,a||(f=64)),i.push(n[d],n[l],n[f],n[p])}return i.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(s(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,i=0;n<e.length;){var o=e[n++];if(o<128)t[i++]=String.fromCharCode(o);else if(o>191&&o<224){var r=e[n++];t[i++]=String.fromCharCode((31&o)<<6|63&r)}else if(o>239&&o<365){var a=((7&o)<<18|(63&(r=e[n++]))<<12|(63&(s=e[n++]))<<6|63&e[n++])-65536;t[i++]=String.fromCharCode(55296+(a>>10)),t[i++]=String.fromCharCode(56320+(1023&a))}else{r=e[n++];var s=e[n++];t[i++]=String.fromCharCode((15&o)<<12|(63&r)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,i=[],o=0;o<e.length;){var r=n[e.charAt(o++)],a=o<e.length?n[e.charAt(o)]:0,s=++o<e.length?n[e.charAt(o)]:64,c=++o<e.length?n[e.charAt(o)]:64;if(++o,null==r||null==a||null==s||null==c)throw Error();var u=r<<2|a>>4;if(i.push(u),64!==s){var d=a<<4&240|s>>2;if(i.push(d),64!==c){var l=s<<6&192|c;i.push(l)}}}return i},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},u=function(e){try{return c.decodeString(e,!0)}catch(e){}return null};
        /**
         * @license
         * Copyright 2017 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */function d(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var n in t)t.hasOwnProperty(n)&&(e[n]=d(e[n],t[n]));return e}
        /**
         * @license
         * Copyright 2017 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */var l=function(){function e(){var e=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))}return e.prototype.wrapCallback=function(e){var t=this;return function(n,i){n?t.reject(n):t.resolve(i),"function"==typeof e&&(t.promise.catch((function(){})),1===e.length?e(n):e(n,i))}},e}();
        /**
         * @license
         * Copyright 2017 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */function f(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}
        /**
         * @license
         * Copyright 2017 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */
        var p=function(e){function t(n,i){var o=e.call(this,i)||this;return o.code=n,o.name="FirebaseError",Object.setPrototypeOf(o,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(o,h.prototype.create),o}return i.__extends(t,e),t}(Error),h=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n}return e.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=t[0]||{},o=this.service+"/"+e,r=this.errors[e],a=r?v(r,i):"Error",s=this.serviceName+": "+a+" ("+o+").",c=new p(o,s),u=0,d=Object.keys(i);u<d.length;u++){var l=d[u];"_"!==l.slice(-1)&&(c[l]=i[l])}return c},e}();function v(e,t){return e.replace(_,(function(e,n){var i=t[n];return null!=i?i.toString():"<"+n+"?>"}))}var _=/\{\$([^}]+)}/g;
        /**
         * @license
         * Copyright 2017 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */function m(e){return JSON.parse(e)}
        /**
         * @license
         * Copyright 2017 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */
        var b=function(e){var t={},n={},i={},o="";try{var r=e.split(".");t=m(u(r[0])||""),n=m(u(r[1])||""),o=r[2],i=n.d||{},delete n.d}catch(e){}return{header:t,claims:n,data:i,signature:o}};
        /**
         * @license
         * Copyright 2017 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */
        var g=function(){function e(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}return e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(e,t){t||(t=0);var n=this.W_;if("string"==typeof e)for(var i=0;i<16;i++)n[i]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(i=0;i<16;i++)n[i]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(i=16;i<80;i++){var o=n[i-3]^n[i-8]^n[i-14]^n[i-16];n[i]=4294967295&(o<<1|o>>>31)}var r,a,s=this.chain_[0],c=this.chain_[1],u=this.chain_[2],d=this.chain_[3],l=this.chain_[4];for(i=0;i<80;i++){i<40?i<20?(r=d^c&(u^d),a=1518500249):(r=c^u^d,a=1859775393):i<60?(r=c&u|d&(c|u),a=2400959708):(r=c^u^d,a=3395469782);o=(s<<5|s>>>27)+r+l+a+n[i]&4294967295;l=d,d=u,u=4294967295&(c<<30|c>>>2),c=s,s=o}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+c&4294967295,this.chain_[2]=this.chain_[2]+u&4294967295,this.chain_[3]=this.chain_[3]+d&4294967295,this.chain_[4]=this.chain_[4]+l&4294967295},e.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var n=t-this.blockSize,i=0,o=this.buf_,r=this.inbuf_;i<t;){if(0===r)for(;i<=n;)this.compress_(e,i),i+=this.blockSize;if("string"==typeof e){for(;i<t;)if(o[r]=e.charCodeAt(i),++i,++r===this.blockSize){this.compress_(o),r=0;break}}else for(;i<t;)if(o[r]=e[i],++i,++r===this.blockSize){this.compress_(o),r=0;break}}this.inbuf_=r,this.total_+=t}},e.prototype.digest=function(){var e=[],t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&t,t/=256;this.compress_(this.buf_);var i=0;for(n=0;n<5;n++)for(var o=24;o>=0;o-=8)e[i]=this.chain_[n]>>o&255,++i;return e},e}();var y=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((function(){e(n)})).catch((function(e){n.error(e)}))}return e.prototype.next=function(e){this.forEachObserver((function(t){t.next(e)}))},e.prototype.error=function(e){this.forEachObserver((function(t){t.error(e)})),this.close(e)},e.prototype.complete=function(){this.forEachObserver((function(e){e.complete()})),this.close()},e.prototype.subscribe=function(e,t,n){var i,o=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(i=function(e,t){if("object"!=typeof e||null===e)return!1;for(var n=0,i=t;n<i.length;n++){var o=i[n];if(o in e&&"function"==typeof e[o])return!0}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(i.next=w),void 0===i.error&&(i.error=w),void 0===i.complete&&(i.complete=w);var r=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{o.finalError?i.error(o.finalError):i.complete()}catch(e){}})),this.observers.push(i),r},e.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(e){"undefined"!=typeof console&&console.error}}))},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((function(){t.observers=void 0,t.onNoObservers=void 0})))},e}();function w(){}
        /**
         * @license
         * Copyright 2017 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */function E(e,t,n){var i="";switch(t){case 1:i=n?"first":"First";break;case 2:i=n?"second":"Second";break;case 3:i=n?"third":"Third";break;case 4:i=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4.  Need to update it?")}var o=e+" failed: ";return o+=i+" argument "}t.CONSTANTS=o,t.Deferred=l,t.ErrorFactory=h,t.FirebaseError=p,t.Sha1=g,t.assert=r,t.assertionError=a,t.async=function(e,t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];Promise.resolve(!0).then((function(){e.apply(void 0,n)})).catch((function(e){t&&t(e)}))}},t.base64=c,t.base64Decode=u,t.base64Encode=function(e){var t=s(e);return c.encodeByteArray(t,!0)},t.contains=
            /**
             * @license
             * Copyright 2017 Google Inc.
             *
             * Licensed under the Apache License, Version 2.0 (the "License");
             * you may not use this file except in compliance with the License.
             * You may obtain a copy of the License at
             *
             *   http://www.apache.org/licenses/LICENSE-2.0
             *
             * Unless required by applicable law or agreed to in writing, software
             * distributed under the License is distributed on an "AS IS" BASIS,
             * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
             * See the License for the specific language governing permissions and
             * limitations under the License.
             */
            function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.createSubscribe=function(e,t){var n=new y(e,t);return n.subscribe.bind(n)},t.decode=b,t.deepCopy=
            /**
             * @license
             * Copyright 2017 Google Inc.
             *
             * Licensed under the Apache License, Version 2.0 (the "License");
             * you may not use this file except in compliance with the License.
             * You may obtain a copy of the License at
             *
             *   http://www.apache.org/licenses/LICENSE-2.0
             *
             * Unless required by applicable law or agreed to in writing, software
             * distributed under the License is distributed on an "AS IS" BASIS,
             * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
             * See the License for the specific language governing permissions and
             * limitations under the License.
             */
            function(e){return d(void 0,e)},t.deepExtend=d,t.errorPrefix=E,t.getUA=f,t.isAdmin=function(e){var t=b(e).claims;return"object"==typeof t&&!0===t.admin},t.isBrowser=function(){return"object"==typeof self&&self.self===self},t.isEmpty=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},t.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(f())},t.isNode=function(){try{return"[object process]"===Object.prototype.toString.call(n.g.process)}catch(e){return!1}},t.isNodeSdk=function(){return!0===o.NODE_CLIENT||!0===o.NODE_ADMIN},t.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},t.isValidFormat=function(e){var t=b(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},t.isValidTimestamp=function(e){var t=b(e).claims,n=Math.floor((new Date).getTime()/1e3),i=0,o=0;return"object"==typeof t&&(t.hasOwnProperty("nbf")?i=t.nbf:t.hasOwnProperty("iat")&&(i=t.iat),o=t.hasOwnProperty("exp")?t.exp:i+86400),!!n&&!!i&&!!o&&n>=i&&n<=o},t.issuedAtTime=function(e){var t=b(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},t.jsonEval=m,t.map=function(e,t,n){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(i[o]=t.call(n,e[o],o,e));return i}
            /**
             * @license
             * Copyright 2017 Google Inc.
             *
             * Licensed under the Apache License, Version 2.0 (the "License");
             * you may not use this file except in compliance with the License.
             * You may obtain a copy of the License at
             *
             *   http://www.apache.org/licenses/LICENSE-2.0
             *
             * Unless required by applicable law or agreed to in writing, software
             * distributed under the License is distributed on an "AS IS" BASIS,
             * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
             * See the License for the specific language governing permissions and
             * limitations under the License.
             */,t.querystring=function(e){for(var t=[],n=function(e,n){Array.isArray(n)?n.forEach((function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))})):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))},i=0,o=Object.entries(e);i<o.length;i++){var r=o[i];n(r[0],r[1])}return t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){var t={};return e.replace(/^\?/,"").split("&").forEach((function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}})),t},t.safeGet=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0},t.stringLength=function(e){for(var t=0,n=0;n<e.length;n++){var i=e.charCodeAt(n);i<128?t++:i<2048?t+=2:i>=55296&&i<=56319?(t+=4,n++):t+=3}return t},t.stringToByteArray=function(e){for(var t=[],n=0,i=0;i<e.length;i++){var o=e.charCodeAt(i);if(o>=55296&&o<=56319){var a=o-55296;i++,r(i<e.length,"Surrogate pair missing trail surrogate."),o=65536+(a<<10)+(e.charCodeAt(i)-56320)}o<128?t[n++]=o:o<2048?(t[n++]=o>>6|192,t[n++]=63&o|128):o<65536?(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=63&o|128):(t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=63&o|128)}return t},t.stringify=function(e){return JSON.stringify(e)},t.validateArgCount=function(e,t,n,i){var o;if(i<t?o="at least "+t:i>n&&(o=0===n?"none":"no more than "+n),o)throw new Error(e+" failed: Was called with "+i+(1===i?" argument.":" arguments.")+" Expects "+o+".")},t.validateCallback=function(e,t,n,i){if((!i||n)&&"function"!=typeof n)throw new Error(E(e,t,i)+"must be a valid function.")},t.validateContextObject=function(e,t,n,i){if((!i||n)&&("object"!=typeof n||null===n))throw new Error(E(e,t,i)+"must be a valid context object.")}
            /**
             * @license
             * Copyright 2017 Google Inc.
             *
             * Licensed under the Apache License, Version 2.0 (the "License");
             * you may not use this file except in compliance with the License.
             * You may obtain a copy of the License at
             *
             *   http://www.apache.org/licenses/LICENSE-2.0
             *
             * Unless required by applicable law or agreed to in writing, software
             * distributed under the License is distributed on an "AS IS" BASIS,
             * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
             * See the License for the specific language governing permissions and
             * limitations under the License.
             */,t.validateNamespace=function(e,t,n,i){if((!i||n)&&"string"!=typeof n)throw new Error(E(e,t,i)+"must be a valid firebase namespace.")}},449:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i=n(3645),o=n.n(i)()((function(e){return e[1]}));o.push([e.id,".najva-email-backdrop {\n  --tw-bg-opacity: 1 !important;\n  background-color: rgba(75, 85, 99, var(--tw-bg-opacity)) !important;\n  opacity: 0.6 !important;\n  position: fixed !important;\n  top: 0px !important;\n  left: 0px !important;\n  height: 100% !important;\n  width: 100% !important;\n  margin: 0px !important;\n  outline: 2px solid transparent !important;\n  outline-offset: 2px !important;\n  padding: 0px !important;\n  z-index: 2147483644 !important;\n}\n\n.najva-email-container {\n  --tw-bg-opacity: 1 !important;\n  background-color: rgba(255, 255, 255, var(--tw-bg-opacity)) !important;\n  --tw-text-opacity: 1 !important;\n  color: rgba(0, 0, 0, var(--tw-text-opacity)) !important;\n  position: fixed !important;\n  top: 50% !important;\n  left: 50% !important;\n  --tw-border-opacity: 1 !important;\n  border-color: rgba(0, 0, 0, var(--tw-border-opacity)) !important;\n  border-style: solid !important;\n  border-width: 1px !important;\n  margin: 0px !important;\n  outline: 2px solid transparent !important;\n  outline-offset: 2px !important;\n  padding: 0px !important;\n  z-index: 2147483645 !important;\n  height: 95% !important;\n  max-height: 500px !important;\n  width: 95% !important;\n  max-width: 480px !important;\n  transform: translate(-50%, -50%) !important;\n}\n\n.najva-email-container iframe {\n  height: 100% !important;\n  width: 100% !important;\n  border-width: 0px !important;\n  margin: 0px !important;\n  padding: 0px !important;\n}\n",""]);const r=o},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(i)for(var r=0;r<this.length;r++){var a=this[r][0];null!=a&&(o[a]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);i&&o[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},1923:(e,t,n)=>{"use strict";var i,o=(i=n(5752))&&"object"==typeof i&&"default"in i?i.default:i;
        /**
         * @license
         * Copyright 2018 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */e.exports=o},6808:(e,t,n)=>{var i,o;
        /*!
         * JavaScript Cookie v2.2.1
         * https://github.com/js-cookie/js-cookie
         *
         * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
         * Released under the MIT license
         */!function(r){if(void 0===(o="function"==typeof(i=r)?i.call(t,n,t,e):i)||(e.exports=o),!0,e.exports=r(),!!0){var a=window.Cookies,s=window.Cookies=r();s.noConflict=function(){return window.Cookies=a,s}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var i in n)t[i]=n[i]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(i){function o(){}function r(t,n,r){if("undefined"!=typeof document){"number"==typeof(r=e({path:"/"},o.defaults,r)).expires&&(r.expires=new Date(1*new Date+864e5*r.expires)),r.expires=r.expires?r.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=i.write?i.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in r)r[c]&&(s+="; "+c,!0!==r[c]&&(s+="="+r[c].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!=typeof document){for(var o={},r=document.cookie?document.cookie.split("; "):[],a=0;a<r.length;a++){var s=r[a].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(i.read||i)(c,u)||t(c),n)try{c=JSON.parse(c)}catch(e){}if(o[u]=c,e===u)break}catch(e){}}return e?o[e]:o}}return o.set=r,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){r(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},1296:(e,t,n)=>{var i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),l=Object.prototype.toString,f=Math.max,p=Math.min,h=function(){return d.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function _(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=r.test(e);return n||a.test(e)?s(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i,o,r,a,s,c,u=0,d=!1,l=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=i,r=o;return i=o=void 0,u=t,a=e.apply(r,n)}function g(e){return u=e,s=setTimeout(w,t),d?b(e):a}function y(e){var n=e-c;return void 0===c||n>=t||n<0||l&&e-u>=r}function w(){var e=h();if(y(e))return E(e);s=setTimeout(w,function(e){var n=t-(e-c);return l?p(n,r-(e-u)):n}(e))}function E(e){return s=void 0,m&&i?b(e):(i=o=void 0,a)}function T(){var e=h(),n=y(e);if(i=arguments,o=this,c=e,n){if(void 0===s)return g(c);if(l)return s=setTimeout(w,t),b(c)}return void 0===s&&(s=setTimeout(w,t)),a}return t=_(t)||0,v(n)&&(d=!!n.leading,r=(l="maxWait"in n)?f(_(n.maxWait)||0,t):r,m="trailing"in n?!!n.trailing:m),T.cancel=function(){void 0!==s&&clearTimeout(s),u=0,i=c=o=s=void 0},T.flush=function(){return void 0===s?a:E(h())},T}},3379:(e,t,n)=>{"use strict";var i,o=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function s(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},i=[],o=0;o<e.length;o++){var r=e[o],c=t.base?r[0]+t.base:r[0],u=n[c]||0,d="".concat(c," ").concat(u);n[c]=u+1;var l=s(d),f={css:r[1],media:r[2],sourceMap:r[3]};-1!==l?(a[l].references++,a[l].updater(f)):a.push({identifier:d,updater:_(f,t),references:1}),i.push(d)}return i}function u(e){var t=document.createElement("style"),i=e.attributes||{};if(void 0===i.nonce){var o=n.nc;o&&(i.nonce=o)}if(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),"function"==typeof e.insert)e.insert(t);else{var a=r(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var d,l=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function f(e,t,n,i){var o=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=l(t,o);else{var r=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(r,a[t]):e.appendChild(r)}}function p(e,t,n){var i=n.css,o=n.media,r=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var h=null,v=0;function _(e,t){var n,i,o;if(t.singleton){var r=v++;n=h||(h=u(t)),i=f.bind(null,n,r,!1),o=f.bind(null,n,r,!0)}else n=u(t),i=p.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<n.length;i++){var o=s(n[i]);a[o].references--}for(var r=c(e,t),u=0;u<n.length;u++){var d=s(n[u]);0===a[d].references&&(a[d].updater(),a.splice(d,1))}n=r}}}},655:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__extends:()=>o,__assign:()=>r,__rest:()=>a,__decorate:()=>s,__param:()=>c,__metadata:()=>u,__awaiter:()=>d,__generator:()=>l,__exportStar:()=>f,__values:()=>p,__read:()=>h,__spread:()=>v,__spreadArrays:()=>_,__await:()=>m,__asyncGenerator:()=>b,__asyncDelegator:()=>g,__asyncValues:()=>y,__makeTemplateObject:()=>w,__importStar:()=>E,__importDefault:()=>T});
        /*! *****************************************************************************
        Copyright (c) Microsoft Corporation. All rights reserved.
        Licensed under the Apache License, Version 2.0 (the "License"); you may not use
        this file except in compliance with the License. You may obtain a copy of the
        License at http://www.apache.org/licenses/LICENSE-2.0

        THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
        KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
        WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
        MERCHANTABLITY OR NON-INFRINGEMENT.

        See the Apache Version 2.0 License for specific language governing permissions
        and limitations under the License.
        ***************************************************************************** */
        var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function s(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,i){t(n,i,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function d(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(a,s)}c((i=i.apply(e,t||[])).next())}))}function l(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function f(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function _(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],a=0,s=r.length;a<s;a++,o++)i[o]=r[a];return i}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,o=n.apply(e,t||[]),r=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(e){o[e]&&(i[e]=function(t){return new Promise((function(n,i){r.push([e,t,n,i])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(c,u):d(r[0][2],n)}catch(e){d(r[0][3],e)}var n}function c(e){s("next",e)}function u(e){s("throw",e)}function d(e,t){e(t),r.shift(),r.length&&s(r[0][0],r[0][1])}}function g(e){var t,n;return t={},i("next"),i("throw",(function(e){throw e})),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,o){t[i]=e[i]?function(t){return(n=!n)?{value:m(e[i](t)),done:"return"===i}:o?o(t):t}:o}}function y(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(n){t[n]=e[n]&&function(t){return new Promise((function(i,o){(function(e,t,n,i){Promise.resolve(i).then((function(t){e({value:t,done:n})}),t)})(i,o,(t=e[n](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function T(e){return e&&e.__esModule?e:{default:e}}}},t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={id:i,exports:{}};return e[i](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";function e(e,t){return fetch(e,t).then((e=>{if(!e.ok)throw Error(e.statusText);return e.json()}))}function t(e,t){return fetch(e,t).then((e=>{if(!e.ok)throw Error(e.statusText);return e}))}function i(){return(new Date).toISOString().split(":")[0]}var o,r;!function(e){e.TEST="test",e.STAGING="staging",e.PRODUCTION="production"}(o||(o={})),function(e){e.UNSUPPORTED_BROWSER="unsupported-browser",e.INCOGNITO_BROWSER="incognito-browser",e.CONFIGURATION_FAILED="configuration-failed",e.MISSING_APP_CONFIG_VALUES="missing-app-config-values",e.SW_REGISTRATION_FAILED="sw-registration-failed",e.SW_UNREGISTRATION_FAILED="sw-unregistration-failed",e.FIREBASE_INITIALIZATION_FAILED="firebase-initialization-failed",e.FIREBASE_REGISTRAION_FAILED="firebase-registration-failed",e.FIREBASE_TOKEN_UPDATE_FAILED="firebase-token-update-failed",e.FIREBASE_TOKEN_DELETE_FAILED="firebase-token-delete-failed",e.NAJVA_SUBSCRIPTION_FAILED="najva-subscription-failed",e.COOKIE_TOKEN_UPDATE_FAILED="najva-token-update-failed",e.ADD_ATTRIBUTE_FAILED="add-attribute-failed",e.DELETE_ATTRIBUTE_FAILED="delete-attribute-failed",e.GET_ATTRIBUTES_FAILED="get-attributes-failed",e.INVALID_KEY_FOR_IDB="invalid-key-for-idb",e.DB_UPDATE_FAILED="db-update-failed",e.DB_READ_FAILED="db-read-failed",e.DB_DELETE_FAILED="db-delete-failed",e.DB_OBJ_STORE_CLEAR_FAILED="db-obj-store-clear-failed",e.SEND_LOCATION_FAILED="send-location-failed",e.UPDATE_USER_ACTIVITY_FAILED="update-user-activity-failed",e.REPORT_SCRIPT_VERSION_FAILED="report-script-version-failed",e.LOAD_YEKTANET_ANALYTICS_SCRIPT_FAILED="load-yektanet-analytics-script-failed",e.INIT_EMAIL_FAILED="init-email-failed",e.ADD_EMAIL_SUBSCRIBER_IDENTIFIER_FAILED="add-email-subscriber-identifier-failed",e.IDENTIFY_EMAIL_SUBSCRIBER_FAILED="identify-email-subscriber-failed",e.SUBSCRIBE_TO_EMAIL_FAILED="subscribe-to-email-failed",e.CREATE_HTML_FAILED="create-html-failed",e.SELECT_ELEMENT_FAILED="select-element-failed",e.HEX_TO_RGB_FAILED="hex-to-rgb-failed",e.FIND_EMAIL_IFRAME_CONTAINER_FAILED="find-email-iframe-container-failed"}(r||(r={}));const a="\nOriginal Error -> {$error}",s={[r.UNSUPPORTED_BROWSER]:`This browser doesn't support the API's required to use the firebase and najva SDK.${a}`,[r.INCOGNITO_BROWSER]:`najva sdk will not run in brower incognito mode.${a}`,[r.MISSING_APP_CONFIG_VALUES]:"Missing App configuration value: {$valueName}.",[r.CONFIGURATION_FAILED]:`failed to get configuration file from {$url}.${a}`,[r.SW_REGISTRATION_FAILED]:`We are unable to register the default service worker. {$browserErrorMessage}.${a}`,[r.SW_UNREGISTRATION_FAILED]:`We are unable to unregister the najva-messaging service worker.${a}`,[r.FIREBASE_INITIALIZATION_FAILED]:`failed to initialize firebase app. {$firebaseErrorMessage}.${a}`,[r.FIREBASE_REGISTRAION_FAILED]:`failed to get registration token from firebase. {$firebaseErrorMessage}.${a}`,[r.FIREBASE_TOKEN_UPDATE_FAILED]:"failed to update firebase token. {$firebaseErrorMessage}.",[r.FIREBASE_TOKEN_DELETE_FAILED]:`failed to delete firebase token. {$firebaseErrorMessage}.${a}`,[r.NAJVA_SUBSCRIPTION_FAILED]:`failed to subscribe firebase token {$firebaseToken} to najva.${a}`,[r.COOKIE_TOKEN_UPDATE_FAILED]:`failed to update cookie_token for najva user {$najva_token}.${a}`,[r.ADD_ATTRIBUTE_FAILED]:`failed to add attribute {$object}.${a}`,[r.DELETE_ATTRIBUTE_FAILED]:`failed to delete attribute {$key}.${a}`,[r.GET_ATTRIBUTES_FAILED]:`failed to get attributes.${a}`,[r.INVALID_KEY_FOR_IDB]:`faild to update indexed db. the {$key} is not a valid key for object store {$objStoreName}.${a}`,[r.DB_UPDATE_FAILED]:`failed to update {$key} with {$value} for {$objectStoreName}. {$browserErrorMessage}.${a}`,[r.DB_DELETE_FAILED]:`failed to update {$key} with {$value} for {$objectStoreName}. {$browserErrorMessage}.${a}`,[r.DB_READ_FAILED]:`failed to read {$key} from {$objectStoreName}. {$browserErrorMessage}.${a}`,[r.DB_OBJ_STORE_CLEAR_FAILED]:`failed to clear {$objectStoreName}. {$browserErrorMessage}.${a}`,[r.SEND_LOCATION_FAILED]:"failed to send location to the server: {$errorStatus}.",[r.UPDATE_USER_ACTIVITY_FAILED]:`failed to update user activity {$browserErrorMessage}.${a}`,[r.REPORT_SCRIPT_VERSION_FAILED]:`failed to report version {$version} to {$url}. {$browserErrorMessage}.${a}`,[r.LOAD_YEKTANET_ANALYTICS_SCRIPT_FAILED]:`failed to load tag script with app_id: {$appId}.${a}`,[r.INIT_EMAIL_FAILED]:`failed to init email.${a}`,[r.ADD_EMAIL_SUBSCRIBER_IDENTIFIER_FAILED]:`failed to add email subscriber identifier.${a}`,[r.IDENTIFY_EMAIL_SUBSCRIBER_FAILED]:`failed to identify email subscriber.${a}`,[r.SUBSCRIBE_TO_EMAIL_FAILED]:`failed to subscribe to email.${a}`,[r.CREATE_HTML_FAILED]:"failed to create html element with string: {$value}.",[r.SELECT_ELEMENT_FAILED]:"failed to select element with selector: {$value}.",[r.HEX_TO_RGB_FAILED]:"failed to convert hex color to rgb format with value: {$value}.",[r.FIND_EMAIL_IFRAME_CONTAINER_FAILED]:"failed to find email iframe container."},c=/\{\$([^}]+)}/g;function u(e,t){const n=s[e],i=n?function(e,t){return e.replace(c,((e,n)=>{const i=t[n];return null!=i?String(i):`<${n}?>`}))}(n,t||{}):"Error";return new Error(i)}const d={"۰":"0","٠":"0","۱":"1","١":"1","۲":"2","٢":"2","۳":"3","٣":"3","۴":"4","٤":"4","۵":"5","٥":"5","۶":"6","٦":"6","۷":"7","٧":"7","۸":"8","٨":"8","۹":"9","٩":"9"};function l(e){try{return e.toString().replace(/[\u0660-\u0669\u06F0-\u06F9]/g,(e=>d[e]))}catch(t){return e}}var f;!function(e){e.email="email",e.phone="phone",e.required="required"}(f||(f={}));const p={[f.email]:{fa:"ایمیل نامعتبر است.",en:"Email is not valid"},[f.phone]:{fa:"شماره موبایل نامعتبر است.",en:"Phone is not valid"},[f.required]:{fa:"این فیلد الزامی است.",en:"This field is required"}};const h={messaging_sender_id:"334645784830",najva_settings:{campaign_id:"",app_id:"",account_id:"",without_popup:!0,with_popup:!1,api_key:"fd4f22c3-0f92-43ee-b7ed-8b905eb9c7ba",najva_subdomain:"https://app.najva.com/",website_id:18846,location_permission:!0,request_text:"آیا میخواهید پربازدیدترین موضوعات برای شما ارسال شود؟",request_description:"",accept_text:"بله",denied_text:"خیر",request_icon:"https://www.najva.com/wp-content/uploads/2017/07/Najva-Logo-OK-04.png",extra_css:"",dismiss_cookie_days:3,request_permission:{delay:{enable:0,value:20},scroll:{enable:1,value:50},visit:{minimum:{enable:0,value:1},maximum:{enable:0,value:3},interval:{enable:0,value:3}}},show_bell:1,show_bell_in_mobile:1,bell_direction:"right",tooltip_direction:"left",bell_color_hover:"#7a7a7a",bell_color:"#444444",bell_tooltip:"مشترک شوید",show_backdrop:!1,show_backdrop_mobile:!1,native_permission:!0,backdrop_text:"«برای دریافت مطالب مشابه روی گزینه Allow کلیک کنید.»"},custom_links:[],website_policy:{notification_queue:1,notification_countdown:10,notification_blocked:!1,notification_button_enabled:!1,use_najva_firebase_account:!0,recommender_permission:!1,tag_enabled:!1,email_enabled:!0},sw_path:"/",email_settings:{id:79328,uuid:"4ad01101-a47a-4ca5-8ea9-8aaac023d098",show_condition:{delay:{enable:1,value:2},scroll:{enable:0,value:10},visit:{minimum:{enable:0,value:1},maximum:{enable:0,value:1},interval:{enable:0,value:4}}},title:"🎁ایمیل خود را وارد کنید و یک کد تخفیف خرید هدیه بگیرید🎁",background_color:"2d292e",button_color:"ccd1d9",send_btn_text:"عضویت",success_message:"ارسال با موفقیت انجام شد.",affected_urls:null,fields:[{key:"email",name:"ایمیل",validations:[f.email,f.required]}],desc:"همین الان ایمیلت رو وارد کن تا یه کد تخفیف جذاب برات بفرستیم",img:"https://www.najva.com/wp-content/uploads/2017/07/Najva-Logo-OK-04.png",side_img:"https://www.najva.com/wp-content/uploads/2017/07/Najva-Logo-OK-04.png",background_img:"https://i.postimg.cc/3rCPNt3V/depositphotos-29704447-stock-video-city-skyline-business-man-success.jpg",iframe_container:"#abc"}},v="activity";var _;!function(e){e.LastActiveTime="last_active_time",e.VisitCount="visit_count",e.LastScriptReportedVersion="last_script_reported_version",e.LastServiceWorkerReportedVersion="last_service_worker_reported_version",e.LastCookieMatchingSent="last_cookie_matching_sent",e.HasMigrated="has_migrated",e.LastCurrentUserAPICalled="last-current-user-api-called",e.HasNajvaSubscriptionWindowOpened="has-najva-subscription-window-opened"}(_||(_={}));let m,b;const g=new WeakMap,y=new WeakMap,w=new WeakMap,E=new WeakMap,T=new WeakMap;let I={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return y.get(e);if("objectStoreNames"===t)return e.objectStoreNames||w.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return N(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function S(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(b||(b=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(O(this),t),N(g.get(this))}:function(...t){return N(e.apply(O(this),t))}:function(t,...n){const i=e.call(O(this),t,...n);return w.set(i,t.sort?t.sort():[t]),N(i)}}function k(e){return"function"==typeof e?S(e):(e instanceof IDBTransaction&&function(e){if(y.has(e))return;const t=new Promise(((t,n)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",r),e.removeEventListener("abort",r)},o=()=>{t(),i()},r=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",r),e.addEventListener("abort",r)}));y.set(e,t)}(e),t=e,(m||(m=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,I):e);var t}function N(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",r)},o=()=>{t(N(e.result)),i()},r=()=>{n(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&g.set(t,e)})).catch((()=>{})),T.set(t,e),t}(e);if(E.has(e))return E.get(e);const t=k(e);return t!==e&&(E.set(e,t),T.set(t,e)),t}const O=e=>T.get(e);function A(e,t,{blocked:n,upgrade:i,blocking:o,terminated:r}={}){const a=indexedDB.open(e,t),s=N(a);return i&&a.addEventListener("upgradeneeded",(e=>{i(N(a.result),e.oldVersion,e.newVersion,N(a.transaction))})),n&&a.addEventListener("blocked",(()=>n())),s.then((e=>{r&&e.addEventListener("close",(()=>r())),o&&e.addEventListener("versionchange",(()=>o()))})).catch((()=>{})),s}const D=["get","getKey","getAll","getAllKeys","count"],P=["put","add","delete","clear"],L=new Map;function x(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(L.get(t))return L.get(t);const n=t.replace(/FromIndex$/,""),i=t!==n,o=P.includes(n);if(!(n in(i?IDBIndex:IDBObjectStore).prototype)||!o&&!D.includes(n))return;const r=async function(e,...t){const r=this.transaction(e,o?"readwrite":"readonly");let a=r.store;return i&&(a=a.index(t.shift())),(await Promise.all([a[n](...t),o&&r.done]))[0]};return L.set(t,r),r}I=(e=>({...e,get:(t,n,i)=>x(t,n)||e.get(t,n,i),has:(t,n)=>!!x(t,n)||e.has(t,n)}))(I);const C="token";var j;!function(e){e.Firebase="fb_token",e.Cookie="cookie_token",e.Najva="najva_token"}(j||(j={}));var M=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function R(e,t,n){return M(this,void 0,void 0,(function*(){try{const i=(yield pe()).transaction(C,"readwrite");(yield i.store.get(e))?yield i.store.put({name:e,value:t,timestamp:n}):yield i.store.add({name:e,value:t,timestamp:n}),yield i.done}catch(n){throw u(r.DB_UPDATE_FAILED,{key:e,value:t,objectStoreName:C,browserErrorMessage:n.message,error:n})}}))}function B(e){return M(this,void 0,void 0,(function*(){try{const t=(yield pe()).transaction(C,"readonly"),n=yield t.store.get(e);return yield t.done,n?{value:n.value.toString(),timestamp:n.timestamp.toString()}:{value:"",timestamp:""}}catch(t){throw u(r.DB_READ_FAILED,{key:e,objectStoreName:C,browserErrorMessage:t.message,error:t})}}))}const $="website";var U;!function(e){e.WebsiteId="website_id",e.SenderId="messagind_sender_id"}(U||(U={}));var F=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function W(e,t){return F(this,void 0,void 0,(function*(){try{const n=(yield pe()).transaction($,"readwrite");(yield n.store.get(e))?yield n.store.put({name:e,value:t}):yield n.store.add({name:e,value:t}),yield n.done}catch(n){throw u(r.DB_UPDATE_FAILED,{key:e,value:t,objectStoreName:$,browserErrorMessage:n.message,error:n})}}))}const K="opt-in";var z,G;!function(e){e.Popup="pop_up"}(z||(z={})),function(e){e.ShownCount="shown_count",e.LastShownTime="last_shown_count",e.Reject="reject"}(G||(G={}));var V=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function H(e){return V(this,void 0,void 0,(function*(){try{const t=(yield pe()).transaction(K,"readwrite"),n=yield t.store.get(z.Popup);return yield t.done,n&&n[e]?n[e]:""}catch(t){throw u(r.DB_READ_FAILED,{key:`${z}.${e}`,objectStoreName:K,browserErrorMessage:t.message,error:t})}}))}function q(e,t){return V(this,void 0,void 0,(function*(){try{const n=(yield pe()).transaction(K,"readwrite"),i=yield n.store.get(z.Popup);i?yield n.store.put(Object.assign(Object.assign({},i),{[e]:t})):yield n.store.add({name:z.Popup,[e]:t}),yield n.done}catch(n){throw u(r.DB_UPDATE_FAILED,{key:`${z}.${e}`,objectStoreName:K,value:t,browserErrorMessage:n.message,error:n})}}))}const Y="attribute";var X=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function J(e,t,n){return X(this,void 0,void 0,(function*(){try{const i=(yield pe()).transaction(Y,"readwrite");(yield i.store.get(e))?yield i.store.put({key:e,value:t,timestamp:n}):yield i.store.add({key:e,value:t,timestamp:n}),yield i.done}catch(n){throw u(r.DB_UPDATE_FAILED,{key:e,value:t,objectStoreName:Y,browserErrorMessage:n.message,error:n})}}))}function Z(){return X(this,void 0,void 0,(function*(){try{const e=(yield pe()).transaction(Y,"readwrite").objectStore(Y);yield e.clear()}catch(e){throw u(r.DB_OBJ_STORE_CLEAR_FAILED,{browserErrorMessage:e.message,objectStoreName:Y,error:e})}}))}var Q=n(6808),ee=n.n(Q);function te(e){const t=e.split("."),n=t[t.length-1],i=t[t.length-2];if(i&&i.length>2)return`.${i}.${n}`;if(t&&t.length>2){return`.${t[t.length-3]}.${i}.${n}`}return e}function ne(e){return ee().get(e)}function ie(e){ee().remove(e,{domain:te(window.location.hostname),path:"/"})}var oe=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function re(e,t){return oe(this,void 0,void 0,(function*(){const n=ne(`najva_last_active_time:${t}`)||ne(`najva_last_active_time-${e}`);n&&(yield _e(_.LastActiveTime,n),ie(`najva_last_active_time:${t}`),ie(`najva_last_active_time-${e}`));const i=ne(`pushNotification:shownCount:${t}`)||ne(`pushNotification-shownCount-${e}`);i&&(yield _e(_.VisitCount,i),ie(`pushNotification:shownCount:${t}`),ie(`pushNotification-shownCount-${e}`));if(!(yield ve(_.LastCookieMatchingSent))){const e=Math.floor(30*Math.random());yield _e(_.LastCookieMatchingSent,new Date(Date.now()-24*e*60*60*1e3).toISOString())}ie("cookie_matching")}))}function ae(e){return oe(this,void 0,void 0,(function*(){const t=function(e){const t=Object.keys(localStorage),n=`${e}-tag-`,i=t.filter((e=>e.startsWith(n))),o={};return i.forEach((e=>{var t;const i=e.substr(n.length);o[i]=null===(t=localStorage.getItem(e))||void 0===t?void 0:t.toString()})),o}(e);Object.keys(t).forEach((n=>oe(this,void 0,void 0,(function*(){yield J(n,t[n],(new Date).toISOString()),localStorage.removeItem(function(e,t){return e&&t?`${e}-tag-${t}`:""}(e,n))}))))}))}function se(e,t){return oe(this,void 0,void 0,(function*(){const n=ne(`pushNotification:notWantPopUp:${t}`)||ne(`pushNotification-notWantPopUp-${e}`);n&&(yield q(G.Reject,n),ie(`pushNotification:notWantPopUp:${t}`),ie(`pushNotification-notWantPopUp-${e}`))}))}function ce(e,t){return oe(this,void 0,void 0,(function*(){const n=ne(`token_id:${t}`)||ne(`token_id-${e}`);n&&(yield R(j.Firebase,n,(new Date).toISOString()),ie(`token_id:${t}`),ie(`token_id-${e}`));const i=localStorage.getItem("_njt")||ne("najva_token");i&&(yield R(j.Najva,i,(new Date).toISOString()),ie("najva_token"),localStorage.removeItem("_njt"));const o=ne(`cookie_token:${t}`)||ne(`cookie_token-${e}`);o&&(yield R(j.Cookie,o,(new Date).toISOString()),ie(`cookie_token:${t}`),ie(`cookie_token-${e}`))}))}function ue(e,t){return oe(this,void 0,void 0,(function*(){yield _e(_.HasMigrated,"true");const n=yield function(e){return F(this,void 0,void 0,(function*(){try{const t=(yield pe()).transaction($,"readwrite"),n=yield t.store.get(e);return yield t.done,n?n.value:""}catch(t){throw u(r.DB_READ_FAILED,{key:e,objectStoreName:$,browserErrorMessage:t.message,error:t})}}))}(U.WebsiteId);e!=n&&(yield function(){return oe(this,void 0,void 0,(function*(){return Promise.all([W(U.WebsiteId,""),R(j.Cookie,"",(new Date).toISOString()),q(G.LastShownTime,""),q(G.ShownCount,""),Z(),me()])}))}()),yield Promise.all([W(U.WebsiteId,e),ce(e,t),se(e,t),ae(e),re(e,t)])}))}var de=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let le,fe;function pe(){return de(this,void 0,void 0,(function*(){return le||(le=yield A("najva-native-subscription-database",5,{upgrade(e,t){return de(this,void 0,void 0,(function*(){t>0&&t<5&&(e.deleteObjectStore(C),e.deleteObjectStore($),e.deleteObjectStore(K),e.deleteObjectStore(Y),e.deleteObjectStore(v)),e.createObjectStore(C,{keyPath:"name"}),e.createObjectStore($,{keyPath:"name"}),e.createObjectStore(K,{keyPath:"name"}),e.createObjectStore(Y,{keyPath:"key"}),e.createObjectStore(v,{keyPath:"name"})}))}})),le}))}var he=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function ve(e){return he(this,void 0,void 0,(function*(){try{const t=(yield pe()).transaction(v,"readwrite"),n=yield t.store.get(e);return yield t.done,n?n.value:""}catch(t){throw u(r.DB_READ_FAILED,{key:e,objectStoreName:v,browserErrorMessage:t.message,error:t})}}))}function _e(e,t){return he(this,void 0,void 0,(function*(){try{const n=(yield pe()).transaction(v,"readwrite");(yield n.store.get(e))?yield n.store.put({name:e,value:t}):yield n.store.add({name:e,value:t}),yield n.done}catch(n){throw u(r.DB_UPDATE_FAILED,{key:e,value:t,objectStoreName:v,browserErrorMessage:n.message,error:n})}}))}function me(){return he(this,void 0,void 0,(function*(){try{const e=(yield pe()).transaction(v,"readwrite").objectStore(v);yield e.clear()}catch(e){throw u(r.DB_OBJ_STORE_CLEAR_FAILED,{browserErrorMessage:e.message,objectStoreName:v,error:e})}}))}var be=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let ge=null;function ye(){return be(this,void 0,void 0,(function*(){if("production"===o.TEST)return h;const t=`${window.configFile}?v=${i()}`;if(ge)return ge;try{const n=yield e(t,{method:"GET",credentials:"omit"});return function(e){const t=e.messaging_sender_id,n=e.najva_settings;let i="";if(t||(i="messaging_sender_id"),n?n.api_key?n.website_id||(i="najva_settings.website_id"):i="najva_settings.api_key":i="najva_settings",i)throw u(r.MISSING_APP_CONFIG_VALUES,{valueName:i})}(n),yield W(U.WebsiteId,n.najva_settings.website_id.toString()),yield W(U.SenderId,n.messaging_sender_id),n}catch(e){throw u(r.CONFIGURATION_FAILED,{url:window.configFile,error:e})}}))}var we,Ee,Te,Ie=n(1923),Se=n.n(Ie),ke=n(5752),Ne=n(655),Oe=n(1313),Ae=((we={})["only-available-in-window"]="This method is available in a Window context.",we["only-available-in-sw"]="This method is available in a service worker context.",we["should-be-overriden"]="This method should be overriden by extended classes.",we["bad-sender-id"]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",we["permission-default"]="The required permissions were not granted and dismissed instead.",we["permission-blocked"]="The required permissions were not granted and blocked instead.",we["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",we["notifications-blocked"]="Notifications have been blocked.",we["failed-serviceworker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",we["sw-registration-expected"]="A service worker registration was the expected input.",we["get-subscription-failed"]="There was an error when trying to get any existing Push Subscriptions.",we["invalid-saved-token"]="Unable to access details of the saved token.",we["sw-reg-redundant"]="The service worker being used for push was made redundant.",we["token-subscribe-failed"]="A problem occured while subscribing the user to FCM: {$errorInfo}",we["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",we["token-subscribe-no-push-set"]="FCM returned an invalid response when getting an FCM token.",we["token-unsubscribe-failed"]="A problem occured while unsubscribing the user from FCM: {$errorInfo}",we["token-update-failed"]="A problem occured while updating the user from FCM: {$errorInfo}",we["token-update-no-token"]="FCM returned no token when updating the user to push.",we["use-sw-before-get-token"]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",we["invalid-delete-token"]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",we["delete-token-not-found"]="The deletion attempt for token could not be performed as the token was not found.",we["delete-scope-not-found"]="The deletion attempt for service worker scope could not be performed as the scope was not found.",we["bg-handler-function-expected"]="The input to setBackgroundMessageHandler() must be a function.",we["no-window-client-to-msg"]="An attempt was made to message a non-existant window client.",we["unable-to-resubscribe"]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$errorInfo}",we["no-fcm-token-for-resubscribe"]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",we["failed-to-delete-token"]="Unable to delete the currently saved token.",we["no-sw-in-reg"]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",we["bad-scope"]="The service worker scope must be a string with at least one character.",we["bad-vapid-key"]="The public VAPID key is not a Uint8Array with 65 bytes.",we["bad-subscription"]="The subscription must be a valid PushSubscription.",we["bad-token"]="The FCM Token used for storage / lookup was not a valid token string.",we["bad-push-set"]="The FCM push set used for storage / lookup was not not a valid push set string.",we["failed-delete-vapid-key"]="The VAPID key could not be deleted.",we["invalid-public-vapid-key"]="The public VAPID key must be a string.",we["use-public-key-before-get-token"]="The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used.",we["public-vapid-key-decryption-failed"]="The public VAPID key did not equal 65 bytes when decrypted.",we),De=new Oe.ErrorFactory("messaging","Messaging",Ae),Pe=new Uint8Array([4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110]),Le="https://fcm.googleapis.com";
    /**
     * @license
     * Copyright 2018 Google Inc.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     *   http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    function xe(e,t){if(null==e||null==t)return!1;if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var n=new DataView(e),i=new DataView(t),o=0;o<e.byteLength;o++)if(n.getUint8(o)!==i.getUint8(o))return!1;return!0}
    /**
     * @license
     * Copyright 2017 Google Inc.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     *   http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */function Ce(e){return function(e){var t=new Uint8Array(e);return btoa(String.fromCharCode.apply(String,(0,Ne.__spread)(t)))}(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}
    /**
     * @license
     * Copyright 2017 Google Inc.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     *   http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */!function(e){e.TYPE_OF_MSG="firebase-messaging-msg-type",e.DATA="firebase-messaging-msg-data"}(Ee||(Ee={})),function(e){e.PUSH_MSG_RECEIVED="push-msg-received",e.NOTIFICATION_CLICKED="notification-clicked"}(Te||(Te={}));var je=function(){function e(){}return e.prototype.getToken=function(e,t,n){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var i,o,r,a,s,c,u,d,l;return(0,Ne.__generator)(this,(function(f){switch(f.label){case 0:i=Ce(t.getKey("p256dh")),o=Ce(t.getKey("auth")),r="authorized_entity="+e+"&endpoint="+t.endpoint+"&encryption_key="+i+"&encryption_auth="+o,xe(n.buffer,Pe.buffer)||(a=Ce(n),r+="&application_pub_key="+a),(s=new Headers).append("Content-Type","application/x-www-form-urlencoded"),c={method:"POST",headers:s,body:r},f.label=1;case 1:return f.trys.push([1,4,,5]),[4,fetch(Le+"/fcm/connect/subscribe",c)];case 2:return[4,f.sent().json()];case 3:return u=f.sent(),[3,5];case 4:throw d=f.sent(),De.create("token-subscribe-failed",{errorInfo:d});case 5:if(u.error)throw l=u.error.message,De.create("token-subscribe-failed",{errorInfo:l});if(!u.token)throw De.create("token-subscribe-no-token");if(!u.pushSet)throw De.create("token-subscribe-no-push-set");return[2,{token:u.token,pushSet:u.pushSet}]}}))}))},e.prototype.updateToken=function(e,t,n,i,o){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var r,a,s,c,u,d,l,f,p;return(0,Ne.__generator)(this,(function(h){switch(h.label){case 0:r=Ce(i.getKey("p256dh")),a=Ce(i.getKey("auth")),s="push_set="+n+"&token="+t+"&authorized_entity="+e+"&endpoint="+i.endpoint+"&encryption_key="+r+"&encryption_auth="+a,xe(o.buffer,Pe.buffer)||(c=Ce(o),s+="&application_pub_key="+c),(u=new Headers).append("Content-Type","application/x-www-form-urlencoded"),d={method:"POST",headers:u,body:s},h.label=1;case 1:return h.trys.push([1,4,,5]),[4,fetch(Le+"/fcm/connect/subscribe",d)];case 2:return[4,h.sent().json()];case 3:return l=h.sent(),[3,5];case 4:throw f=h.sent(),De.create("token-update-failed",{errorInfo:f});case 5:if(l.error)throw p=l.error.message,De.create("token-update-failed",{errorInfo:p});if(!l.token)throw De.create("token-update-no-token");return[2,l.token]}}))}))},e.prototype.deleteToken=function(e,t,n){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var i,o,r,a,s,c;return(0,Ne.__generator)(this,(function(u){switch(u.label){case 0:i="authorized_entity="+e+"&token="+t+"&pushSet="+n,(o=new Headers).append("Content-Type","application/x-www-form-urlencoded"),r={method:"POST",headers:o,body:i},u.label=1;case 1:return u.trys.push([1,4,,5]),[4,fetch(Le+"/fcm/connect/unsubscribe",r)];case 2:return[4,u.sent().json()];case 3:if((a=u.sent()).error)throw s=a.error.message,De.create("token-unsubscribe-failed",{errorInfo:s});return[3,5];case 4:throw c=u.sent(),De.create("token-unsubscribe-failed",{errorInfo:c});case 5:return[2]}}))}))},e}();
    /**
     * @license
     * Copyright 2017 Google Inc.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     *   http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */function Me(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),i=new Uint8Array(n.length),o=0;o<n.length;++o)i[o]=n.charCodeAt(o);return i}
    /**
     * @license
     * Copyright 2017 Google Inc.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     *   http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */var Re="undefined",Be="fcm_token_object_Store";function $e(){var e=indexedDB.open(Re);e.onerror=function(e){},e.onsuccess=function(t){!function(e){if(e.objectStoreNames.contains(Be)){var t=e.transaction(Be).objectStore(Be),n=new je,i=t.openCursor();i.onerror=function(e){},i.onsuccess=function(){var t=i.result;if(t){var o=t.value;n.deleteToken(o.fcmSenderId,o.fcmToken,o.fcmPushSet),t.continue()}else e.close(),indexedDB.deleteDatabase(Re)}}}(e.result)}}
    /**
     * @license
     * Copyright 2017 Google Inc.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     *   http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */var Ue=function(){function e(){this.dbPromise=null}return e.prototype.get=function(e){return this.createTransaction((function(t){return t.get(e)}))},e.prototype.getIndex=function(e,t){return this.createTransaction((function(n){return n.index(e).get(t)}))},e.prototype.put=function(e){return this.createTransaction((function(t){return t.put(e)}),"readwrite")},e.prototype.delete=function(e){return this.createTransaction((function(t){return t.delete(e)}),"readwrite")},e.prototype.closeDatabase=function(){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){return(0,Ne.__generator)(this,(function(e){switch(e.label){case 0:return this.dbPromise?[4,this.dbPromise]:[3,2];case 1:e.sent().close(),this.dbPromise=null,e.label=2;case 2:return[2]}}))}))},e.prototype.createTransaction=function(e,t){return void 0===t&&(t="readonly"),(0,Ne.__awaiter)(this,void 0,void 0,(function(){var n,i,o,r;return(0,Ne.__generator)(this,(function(a){switch(a.label){case 0:return[4,this.getDb()];case 1:return n=a.sent(),i=n.transaction(this.objectStoreName,t),o=i.objectStore(this.objectStoreName),[4,Fe(e(o))];case 2:return r=a.sent(),[2,new Promise((function(e,t){i.oncomplete=function(){e(r)},i.onerror=function(){t(i.error)}}))]}}))}))},e.prototype.getDb=function(){var e=this;return this.dbPromise||(this.dbPromise=new Promise((function(t,n){var i=indexedDB.open(e.dbName,e.dbVersion);i.onsuccess=function(){t(i.result)},i.onerror=function(){e.dbPromise=null,n(i.error)},i.onupgradeneeded=function(t){return e.onDbUpgrade(i,t)}}))),this.dbPromise},e}();function Fe(e){return new Promise((function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}
    /**
     * @license
     * Copyright 2017 Google Inc.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     *   http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */var We=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dbName="fcm_token_details_db",t.dbVersion=3,t.objectStoreName="fcm_token_object_Store",t}return(0,Ne.__extends)(t,e),t.prototype.onDbUpgrade=function(e,t){var n=e.result;switch(t.oldVersion){case 0:(i=n.createObjectStore(this.objectStoreName,{keyPath:"swScope"})).createIndex("fcmSenderId","fcmSenderId",{unique:!1}),i.createIndex("fcmToken","fcmToken",{unique:!0});case 1:$e();case 2:var i,o=(i=e.transaction.objectStore(this.objectStoreName)).openCursor();o.onsuccess=function(){var e=o.result;if(e){var t=e.value,n=(0,Ne.__assign)({},t);t.createTime||(n.createTime=Date.now()),"string"==typeof t.vapidKey&&(n.vapidKey=Me(t.vapidKey)),"string"==typeof t.auth&&(n.auth=Me(t.auth).buffer),"string"==typeof t.auth&&(n.p256dh=Me(t.p256dh).buffer),e.update(n),e.continue()}}}},t.prototype.getTokenDetailsFromToken=function(e){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){return(0,Ne.__generator)(this,(function(t){if(!e)throw De.create("bad-token");return Ke({fcmToken:e}),[2,this.getIndex("fcmToken",e)]}))}))},t.prototype.getTokenDetailsFromSWScope=function(e){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){return(0,Ne.__generator)(this,(function(t){if(!e)throw De.create("bad-scope");return Ke({swScope:e}),[2,this.get(e)]}))}))},t.prototype.saveTokenDetails=function(e){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){return(0,Ne.__generator)(this,(function(t){if(!e.swScope)throw De.create("bad-scope");if(!e.vapidKey)throw De.create("bad-vapid-key");if(!e.endpoint||!e.auth||!e.p256dh)throw De.create("bad-subscription");if(!e.fcmSenderId)throw De.create("bad-sender-id");if(!e.fcmToken)throw De.create("bad-token");if(!e.fcmPushSet)throw De.create("bad-push-set");return Ke(e),[2,this.put(e)]}))}))},t.prototype.deleteToken=function(e){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var t;return(0,Ne.__generator)(this,(function(n){switch(n.label){case 0:return"string"!=typeof e||0===e.length?[2,Promise.reject(De.create("invalid-delete-token"))]:[4,this.getTokenDetailsFromToken(e)];case 1:if(!(t=n.sent()))throw De.create("delete-token-not-found");return[4,this.delete(t.swScope)];case 2:return n.sent(),[2,t]}}))}))},t}(Ue);function Ke(e){if(e.fcmToken&&("string"!=typeof e.fcmToken||0===e.fcmToken.length))throw De.create("bad-token");if(e.swScope&&("string"!=typeof e.swScope||0===e.swScope.length))throw De.create("bad-scope");if(e.vapidKey&&(!(e.vapidKey instanceof Uint8Array)||65!==e.vapidKey.length))throw De.create("bad-vapid-key");if(e.endpoint&&("string"!=typeof e.endpoint||0===e.endpoint.length))throw De.create("bad-subscription");if(e.auth&&!(e.auth instanceof ArrayBuffer))throw De.create("bad-subscription");if(e.p256dh&&!(e.p256dh instanceof ArrayBuffer))throw De.create("bad-subscription");if(e.fcmSenderId&&("string"!=typeof e.fcmSenderId||0===e.fcmSenderId.length))throw De.create("bad-sender-id");if(e.fcmPushSet&&("string"!=typeof e.fcmPushSet||0===e.fcmPushSet.length))throw De.create("bad-push-set")}
    /**
     * @license
     * Copyright 2017 Google Inc.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     *   http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */var ze=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dbName="fcm_vapid_details_db",t.dbVersion=1,t.objectStoreName="fcm_vapid_object_Store",t}return(0,Ne.__extends)(t,e),t.prototype.onDbUpgrade=function(e){e.result.createObjectStore(this.objectStoreName,{keyPath:"swScope"})},t.prototype.getVapidFromSWScope=function(e){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var t;return(0,Ne.__generator)(this,(function(n){switch(n.label){case 0:if("string"!=typeof e||0===e.length)throw De.create("bad-scope");return[4,this.get(e)];case 1:return[2,(t=n.sent())?t.vapidKey:void 0]}}))}))},t.prototype.saveVapidDetails=function(e,t){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var n;return(0,Ne.__generator)(this,(function(i){if("string"!=typeof e||0===e.length)throw De.create("bad-scope");if(null===t||65!==t.length)throw De.create("bad-vapid-key");return n={swScope:e,vapidKey:t},[2,this.put(n)]}))}))},t.prototype.deleteVapidDetails=function(e){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var t;return(0,Ne.__generator)(this,(function(n){switch(n.label){case 0:return[4,this.getVapidFromSWScope(e)];case 1:if(!(t=n.sent()))throw De.create("delete-scope-not-found");return[4,this.delete(e)];case 2:return n.sent(),[2,t]}}))}))},t}(Ue),Ge=function(){function e(e){var t=this;if(!e.options.messagingSenderId||"string"!=typeof e.options.messagingSenderId)throw De.create("bad-sender-id");this.messagingSenderId=e.options.messagingSenderId,this.tokenDetailsModel=new We,this.vapidDetailsModel=new ze,this.iidModel=new je,this.app=e,this.INTERNAL={delete:function(){return t.delete()}}}return e.prototype.getToken=function(){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var e,t,n,i,o;return(0,Ne.__generator)(this,(function(r){switch(r.label){case 0:if("denied"===(e=this.getNotificationPermission_()))throw De.create("notifications-blocked");return"granted"!==e?[2,null]:[4,this.getSWRegistration_()];case 1:return t=r.sent(),[4,this.getPublicVapidKey_()];case 2:return n=r.sent(),[4,this.getPushSubscription(t,n)];case 3:return i=r.sent(),[4,this.tokenDetailsModel.getTokenDetailsFromSWScope(t.scope)];case 4:return(o=r.sent())?[2,this.manageExistingToken(t,i,n,o)]:[2,this.getNewToken(t,i,n)]}}))}))},e.prototype.manageExistingToken=function(e,t,n,i){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){return(0,Ne.__generator)(this,(function(o){switch(o.label){case 0:return function(e,t,n){if(!n.vapidKey||!xe(t.buffer,n.vapidKey.buffer))return!1;var i=e.endpoint===n.endpoint,o=xe(e.getKey("auth"),n.auth),r=xe(e.getKey("p256dh"),n.p256dh);return i&&o&&r}
        /**
         * @license
         * Copyright 2017 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */(t,n,i)?Date.now()<i.createTime+6048e5?[2,i.fcmToken]:[2,this.updateToken(e,t,n,i)]:[4,this.deleteTokenFromDB(i.fcmToken)];case 1:return o.sent(),[2,this.getNewToken(e,t,n)]}}))}))},e.prototype.updateToken=function(e,t,n,i){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var o,r,a;return(0,Ne.__generator)(this,(function(s){switch(s.label){case 0:return s.trys.push([0,4,,6]),[4,this.iidModel.updateToken(this.messagingSenderId,i.fcmToken,i.fcmPushSet,t,n)];case 1:return o=s.sent(),r={swScope:e.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:o,fcmPushSet:i.fcmPushSet,createTime:Date.now(),endpoint:t.endpoint,auth:t.getKey("auth"),p256dh:t.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(r)];case 2:return s.sent(),[4,this.vapidDetailsModel.saveVapidDetails(e.scope,n)];case 3:return s.sent(),[2,o];case 4:return a=s.sent(),[4,this.deleteToken(i.fcmToken)];case 5:throw s.sent(),a;case 6:return[2]}}))}))},e.prototype.getNewToken=function(e,t,n){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var i,o;return(0,Ne.__generator)(this,(function(r){switch(r.label){case 0:return[4,this.iidModel.getToken(this.messagingSenderId,t,n)];case 1:return i=r.sent(),o={swScope:e.scope,vapidKey:n,fcmSenderId:this.messagingSenderId,fcmToken:i.token,fcmPushSet:i.pushSet,createTime:Date.now(),endpoint:t.endpoint,auth:t.getKey("auth"),p256dh:t.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(o)];case 2:return r.sent(),[4,this.vapidDetailsModel.saveVapidDetails(e.scope,n)];case 3:return r.sent(),[2,i.token]}}))}))},e.prototype.deleteToken=function(e){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var t,n;return(0,Ne.__generator)(this,(function(i){switch(i.label){case 0:return[4,this.deleteTokenFromDB(e)];case 1:return i.sent(),[4,this.getSWRegistration_()];case 2:return(t=i.sent())?[4,t.pushManager.getSubscription()]:[3,4];case 3:if(n=i.sent())return[2,n.unsubscribe()];i.label=4;case 4:return[2,!0]}}))}))},e.prototype.deleteTokenFromDB=function(e){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var t;return(0,Ne.__generator)(this,(function(n){switch(n.label){case 0:return[4,this.tokenDetailsModel.deleteToken(e)];case 1:return t=n.sent(),[4,this.iidModel.deleteToken(t.fcmSenderId,t.fcmToken,t.fcmPushSet)];case 2:return n.sent(),[2]}}))}))},e.prototype.getPushSubscription=function(e,t){return e.pushManager.getSubscription().then((function(n){return n||e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t})}))},e.prototype.requestPermission=function(){throw De.create("only-available-in-window")},e.prototype.useServiceWorker=function(e){throw De.create("only-available-in-window")},e.prototype.usePublicVapidKey=function(e){throw De.create("only-available-in-window")},e.prototype.onMessage=function(e,t,n){throw De.create("only-available-in-window")},e.prototype.onTokenRefresh=function(e,t,n){throw De.create("only-available-in-window")},e.prototype.setBackgroundMessageHandler=function(e){throw De.create("only-available-in-sw")},e.prototype.delete=function(){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){return(0,Ne.__generator)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([this.tokenDetailsModel.closeDatabase(),this.vapidDetailsModel.closeDatabase()])];case 1:return e.sent(),[2]}}))}))},e.prototype.getNotificationPermission_=function(){return Notification.permission},e.prototype.getTokenDetailsModel=function(){return this.tokenDetailsModel},e.prototype.getVapidDetailsModel=function(){return this.vapidDetailsModel},e.prototype.getIidModel=function(){return this.iidModel},e}();var Ve=function(e){function t(t){var n=e.call(this,t)||this;return n.bgMessageHandler=null,self.addEventListener("push",(function(e){n.onPush(e)})),self.addEventListener("pushsubscriptionchange",(function(e){n.onSubChange(e)})),self.addEventListener("notificationclick",(function(e){n.onNotificationClick(e)})),n}return(0,Ne.__extends)(t,e),t.prototype.onPush=function(e){e.waitUntil(this.onPush_(e))},t.prototype.onSubChange=function(e){e.waitUntil(this.onSubChange_(e))},t.prototype.onNotificationClick=function(e){e.waitUntil(this.onNotificationClick_(e))},t.prototype.onPush_=function(e){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var t,n,i,o,r,a;return(0,Ne.__generator)(this,(function(s){switch(s.label){case 0:if(!e.data)return[2];try{t=e.data.json()}catch(e){return[2]}return[4,this.hasVisibleClients_()];case 1:return s.sent()?[2,this.sendMessageToWindowClients_(t)]:(n=this.getNotificationData_(t))?(i=n.title||"",[4,this.getSWRegistration_()]):[3,3];case 2:return o=s.sent(),r=n.actions,a=Notification.maxActions,r&&a&&r.length,[2,o.showNotification(i,n)];case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(t)]:[3,5];case 4:return s.sent(),[2];case 5:return[2]}}))}))},t.prototype.onSubChange_=function(e){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var e,t,n,i;return(0,Ne.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getSWRegistration_()];case 1:return e=o.sent(),[3,3];case 2:throw t=o.sent(),De.create("unable-to-resubscribe",{errorInfo:t});case 3:return o.trys.push([3,5,,8]),[4,e.pushManager.getSubscription()];case 4:return o.sent(),[3,8];case 5:return n=o.sent(),[4,this.getTokenDetailsModel().getTokenDetailsFromSWScope(e.scope)];case 6:if(!(i=o.sent()))throw n;return[4,this.deleteToken(i.fcmToken)];case 7:throw o.sent(),n;case 8:return[2]}}))}))},t.prototype.onNotificationClick_=function(e){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var t,n,i,o;return(0,Ne.__generator)(this,(function(r){switch(r.label){case 0:return e.notification&&e.notification.data&&e.notification.data.FCM_MSG?e.action?[2]:(e.stopImmediatePropagation(),e.notification.close(),(t=e.notification.data.FCM_MSG).notification&&(n=t.fcmOptions&&t.fcmOptions.link||t.notification.click_action)?[4,this.getWindowClient_(n)]:[2]):[2];case 1:return(i=r.sent())?[3,3]:[4,self.clients.openWindow(n)];case 2:return i=r.sent(),[3,5];case 3:return[4,i.focus()];case 4:i=r.sent(),r.label=5;case 5:return i?(delete t.notification,delete t.fcmOptions,o=qe(Te.NOTIFICATION_CLICKED,t),[2,this.attemptToMessageClient_(i,o)]):[2]}}))}))},t.prototype.getNotificationData_=function(e){var t;if(e&&"object"==typeof e.notification){var n=(0,Ne.__assign)({},e.notification);return n.data=(0,Ne.__assign)({},e.notification.data,((t={}).FCM_MSG=e,t)),n}},t.prototype.setBackgroundMessageHandler=function(e){if(!e||"function"!=typeof e)throw De.create("bg-handler-function-expected");this.bgMessageHandler=e},t.prototype.getWindowClient_=function(e){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var t,n,i,o;return(0,Ne.__generator)(this,(function(r){switch(r.label){case 0:return t=new URL(e,self.location.href).href,[4,He()];case 1:for(n=r.sent(),i=null,o=0;o<n.length;o++)if(new URL(n[o].url,self.location.href).href===t){i=n[o];break}return[2,i]}}))}))},t.prototype.attemptToMessageClient_=function(e,t){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){return(0,Ne.__generator)(this,(function(n){if(!e)throw De.create("no-window-client-to-msg");return e.postMessage(t),[2]}))}))},t.prototype.hasVisibleClients_=function(){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){return(0,Ne.__generator)(this,(function(e){switch(e.label){case 0:return[4,He()];case 1:return[2,e.sent().some((function(e){return"visible"===e.visibilityState&&!e.url.startsWith("chrome-extension://")}))]}}))}))},t.prototype.sendMessageToWindowClients_=function(e){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var t,n,i=this;return(0,Ne.__generator)(this,(function(o){switch(o.label){case 0:return[4,He()];case 1:return t=o.sent(),n=qe(Te.PUSH_MSG_RECEIVED,e),[4,Promise.all(t.map((function(e){return i.attemptToMessageClient_(e,n)})))];case 2:return o.sent(),[2]}}))}))},t.prototype.getSWRegistration_=function(){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){return(0,Ne.__generator)(this,(function(e){return[2,self.registration]}))}))},t.prototype.getPublicVapidKey_=function(){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var e,t;return(0,Ne.__generator)(this,(function(n){switch(n.label){case 0:return[4,this.getSWRegistration_()];case 1:if(!(e=n.sent()))throw De.create("sw-registration-expected");return[4,this.getVapidDetailsModel().getVapidFromSWScope(e.scope)];case 2:return null==(t=n.sent())?[2,Pe]:[2,t]}}))}))},t}(Ge);function He(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function qe(e,t){var n;return(n={})[Ee.TYPE_OF_MSG]=e,n[Ee.DATA]=t,n
        /**
         * @license
         * Copyright 2017 Google Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
         * You may obtain a copy of the License at
         *
         *   http://www.apache.org/licenses/LICENSE-2.0
         *
         * Unless required by applicable law or agreed to in writing, software
         * distributed under the License is distributed on an "AS IS" BASIS,
         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         * See the License for the specific language governing permissions and
         * limitations under the License.
         */}var Ye,Xe,Je=function(e){function t(t){var n=e.call(this,t)||this;return n.registrationToUse=null,n.publicVapidKeyToUse=null,n.messageObserver=null,n.tokenRefreshObserver=null,n.onMessageInternal=(0,Oe.createSubscribe)((function(e){n.messageObserver=e})),n.onTokenRefreshInternal=(0,Oe.createSubscribe)((function(e){n.tokenRefreshObserver=e})),n.setupSWMessageListener_(),n}return(0,Ne.__extends)(t,e),t.prototype.requestPermission=function(){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){var e;return(0,Ne.__generator)(this,(function(t){switch(t.label){case 0:return"granted"===this.getNotificationPermission_()?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(e=t.sent()))return[2];throw"denied"===e?De.create("permission-blocked"):De.create("permission-default")}}))}))},t.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw De.create("sw-registration-expected");if(null!=this.registrationToUse)throw De.create("use-sw-before-get-token");this.registrationToUse=e},t.prototype.usePublicVapidKey=function(e){if("string"!=typeof e)throw De.create("invalid-public-vapid-key");if(null!=this.publicVapidKeyToUse)throw De.create("use-public-key-before-get-token");var t=Me(e);if(65!==t.length)throw De.create("public-vapid-key-decryption-failed");this.publicVapidKeyToUse=t},t.prototype.onMessage=function(e,t,n){return"function"==typeof e?this.onMessageInternal(e,t,n):this.onMessageInternal(e)},t.prototype.onTokenRefresh=function(e,t,n){return"function"==typeof e?this.onTokenRefreshInternal(e,t,n):this.onTokenRefreshInternal(e)},t.prototype.waitForRegistrationToActivate_=function(e){var t=e.installing||e.waiting||e.active;return new Promise((function(n,i){if(t)if("activated"!==t.state)if("redundant"!==t.state){var o=function(){if("activated"===t.state)n(e);else{if("redundant"!==t.state)return;i(De.create("sw-reg-redundant"))}t.removeEventListener("statechange",o)};t.addEventListener("statechange",o)}else i(De.create("sw-reg-redundant"));else n(e);else i(De.create("no-sw-in-reg"))}))},t.prototype.getSWRegistration_=function(){var e=this;return this.registrationToUse?this.waitForRegistrationToActivate_(this.registrationToUse):(this.registrationToUse=null,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}).catch((function(e){throw De.create("failed-serviceworker-registration",{browserErrorMessage:e.message})})).then((function(t){return e.waitForRegistrationToActivate_(t).then((function(){return e.registrationToUse=t,t.update(),t}))})))},t.prototype.getPublicVapidKey_=function(){return(0,Ne.__awaiter)(this,void 0,void 0,(function(){return(0,Ne.__generator)(this,(function(e){return this.publicVapidKeyToUse?[2,this.publicVapidKeyToUse]:[2,Pe]}))}))},t.prototype.setupSWMessageListener_=function(){var e=this;navigator.serviceWorker.addEventListener("message",(function(t){if(t.data&&t.data[Ee.TYPE_OF_MSG]){var n=t.data;switch(n[Ee.TYPE_OF_MSG]){case Te.PUSH_MSG_RECEIVED:case Te.NOTIFICATION_CLICKED:var i=n[Ee.DATA];e.messageObserver&&e.messageObserver.next(i)}}}),!1)},t}(Ge);function Ze(){return self&&"ServiceWorkerGlobalScope"in self?"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}Ye=ke.default,Xe={isSupported:Ze},Ye.INTERNAL.registerService("messaging",(function(e){if(!Ze())throw De.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new Ve(e):new Je(e)}),Xe);var Qe=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let et,tt={messaging_sender_id:"",isNativeMode:!1};const nt="najva-reset",it="najva-hidden",ot="najva-float-left",rt="najva-float-right",at="najva-clearfix",st="2147483645",ct="najva-style-container";let ut={extra_css:""};function dt(e){if(!e||"string"!=typeof e)return;(function(){let e=document.getElementById(ct);return e||(e=document.createElement("style"),e.setAttribute("id",ct),document.getElementsByTagName("head")[0].appendChild(e),e)})().appendChild(document.createTextNode(e))}function lt(e){ut=e,function(){let e=`\n  .${nt}: {\n            background-attachment: scroll;\n            background-color: transparent;\n            background-image: none;\n            background-position: 0 0;\n            background-repeat: repeat;\n            border-color: #000;\n            border: medium none currentColor;\n            bottom: auto;\n            clear: none;\n            clip: auto;\n            color: inherit;\n            counter-increment: none;\n            counter-reset: none;\n            cursor: auto;\n            direction: inherit;\n            display: inline;\n            float: none;\n            font-family: inherit;\n            font-size: inherit;\n            font-style: inherit;\n            font-variant: normal;\n            font-weight: inherit;\n            height: auto;\n            left: auto;\n            letter-spacing: normal;\n            line-height: inherit;\n            list-style-type: inherit;\n            list-style-position: outside;\n            list-style-image: none;\n            margin: 0;\n            max-height: none;\n            max-width: none;\n            min-height: 0;\n            min-width: 0;\n            opacity: 1;\n            outline: medium none invert;\n            overflow: visible;\n            padding: 0;\n            position: static;\n            quotes: "" "";\n            right: auto;\n            table-layout: auto;\n            text-align: inherit;\n            text-decoration: inherit;\n            text-indent: 0;\n            text-transform: none;\n            top: auto;\n            unicode-bidi: normal;\n            vertical-align: baseline;\n            visibility: inherit;\n            white-space: normal;\n            width: auto;\n            word-spacing: normal;\n            z-index: auto;\n            background-origin: padding-box;\n            background-clip: border-box;\n            background-size: auto;\n            -o-border-image: none;\n            border-image: none;\n            border-radius: 0;\n            box-shadow: none;\n            box-sizing: content-box;\n            column-count: auto;\n            column-gap: normal;\n            column-rule: medium none #000;\n            column-span: 1;\n            column-width: auto;\n            -webkit-font-feature-settings: normal;\n            font-feature-settings: normal;\n            overflow-x: visible;\n            overflow-y: visible;\n            -webkit-hyphens: manual;\n            -ms-hyphens: manual;\n            hyphens: manual;\n            -ms-perspective: none;\n            -o-perspective: none;\n            perspective: none;\n            -ms-perspective-origin: 50% 50%;\n            -o-perspective-origin: 50% 50%;\n            perspective-origin: 50% 50%;\n            -webkit-backface-visibility: visible;\n            backface-visibility: visible;\n            text-shadow: none;\n            transition: all 0s ease 0s;\n            transform: none;\n            transform-origin: 50% 50%;\n            transform-style: flat;\n            word-break: normal;\n        }\n        .${it} {\n            opacity: 0 !important;\n            visibility: hidden !important;\n        }\n        .${ot} {\n            float: left!important;\n        }\n        \n        .${rt} {\n            float: right!important;\n        }\n        \n        .${at}:after, .${at}:before {\n            content: " "!important;\n            display: table!important;\n        }\n        \n        .${at}:after {\n            clear: both!important;\n        }\n        \n        .${at} {\n            zoom: 1!important;\n            width: auto!important;\n        }\n                               \n    `;ut.extra_css&&(e+=ut.extra_css),dt(e)}()}function ft(e){const t=document.createElement("div");if(t.innerHTML=e.trim(),!t.firstElementChild)throw u(r.CREATE_HTML_FAILED,{value:e});return t.firstElementChild}!function(){let e=[],t=!1,n=!1;function i(){if(!t){!0;for(const t of e)t.call(window);[]}}}();function pt(e,t){const n=Math.abs(e-t);return Math.ceil(n/864e5)}var ht=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let vt={website_id:"",najva_subdomain:"",api_key:""};const _t="najva-resubscribe";function mt(e){return ht(this,void 0,void 0,(function*(){vt=e,function(){if(!document.querySelector(`#${_t}`)){const e=ft(`<iframe id="${_t}" style="display: none !important;" src="${vt.najva_subdomain}resubscribe/?website=${vt.website_id}&api_key=${vt.api_key}"></iframe>`);e&&document.body.appendChild(e)}}()}))}function bt(){!function(){const e=`${vt.najva_subdomain}request/permission/?website=${vt.website_id}&api_key=${vt.api_key}`,t=window.open(e,"popup","width=700,height=700,scrollbars=no,resizable=no,toolbar=no,menubar=no");null==t||t.focus(),_e(_.HasNajvaSubscriptionWindowOpened,"true")}()}var gt;!function(e){e.NOTIF_PROMPT_OPEN="najva_notification_prompt_open",e.NOTIF_PROMPT_CLOSE="najva_notification_prompt_close",e.NOTIF_ACCESS_GRANTED="najva_notification_access_granted",e.NOTIF_ACCESS_DENIED="najva_notification_access_denied",e.NOTIF_ACCESS_ASK="najva_notification_access_ask"}(gt||(gt={}));var yt=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};const wt="granted",Et="denied",Tt="prompt";function It(){return yt(this,void 0,void 0,(function*(){try{return yield navigator.permissions.query({name:"notifications"})}catch(e){return null}}))}function St(){return yt(this,void 0,void 0,(function*(){const e=yield It();return e?e.state:window.Notification?Notification.permission:null}))}function kt(){return yt(this,void 0,void 0,(function*(){!function(){const e=new CustomEvent(gt.NOTIF_PROMPT_OPEN);window.dispatchEvent(e)}(),yield Notification.requestPermission(),function(){const e=new CustomEvent(gt.NOTIF_PROMPT_CLOSE);window.dispatchEvent(e)}()}))}function Nt(){return yt(this,void 0,void 0,(function*(){const e=yield It();e&&(e.onchange=e=>yt(this,void 0,void 0,(function*(){const t=e.currentTarget.state;t===wt?function(){const e=new CustomEvent(gt.NOTIF_ACCESS_GRANTED);window.dispatchEvent(e)}():t===Et?function(){const e=new CustomEvent(gt.NOTIF_ACCESS_DENIED);window.dispatchEvent(e)}():(!function(){const e=new CustomEvent(gt.NOTIF_ACCESS_ASK);window.dispatchEvent(e)}(),yield kt())})))}))}function Ot(){return yt(this,void 0,void 0,(function*(){return(yield St())===wt}))}function At(){return yt(this,void 0,void 0,(function*(){return(yield St())===Tt}))}const Dt="https://report.najva.com";var Pt=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let Lt;function xt(e,t,n){const i=[],o=JSON.parse((null==e?void 0:e.buttons)||"[]");if(o&&o.length)for(const e of o)[0,5,6].includes(Number(e.onclick_action))&&i.push({title:e.title,icon:e.icon_url,action:`BUTTON_CLICKED_${e.button_id}`});return{title:`${(null==e?void 0:e.title)||"title not provided"}`,options:{body:(null==e?void 0:e.body)||"body not provided",icon:`${null==e?void 0:e.icon}${n?`?n=${t}`:""}`,image:null==e?void 0:e.image,requireInteraction:!0,tag:(null==e?void 0:e.tag)||"",data:e,actions:i}}}function Ct(e){return Pt(this,void 0,void 0,(function*(){let t=null;if(!e)try{t=yield B(j.Najva)}catch(e){}return e||(null==t?void 0:t.value)||function(e){const t=e||0,n=[],i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var o=0;o<t;o++)n.push(i.charAt(Math.floor(Math.random()*i.length)));return n.join("")}(15)}))}function jt(e){let t=0;return function n(i){i().catch((o=>{t<e&&(t+=1,setTimeout((()=>{n(i)}),5e3)),Lt(o)}))}}void 0===Lt&&(Lt=console.error);function Mt(e,n){return Pt(this,void 0,void 0,(function*(){const{websiteId:i,notificationId:o,notificationData:r,isReportEnabled:a,version:s,najvaTokenFromNotificationPayload:c}=n,u=yield Ct(c),{title:d,options:l}=xt(r,u,a);return a&&jt(2)((()=>(({websiteId:e,notificationId:n,najvaToken:i,version:o})=>t(`${Dt}/deliver?website_id=${e}&notif_id=${n}&sub_id=${i}&version=${o}`,{credentials:"include"}))({websiteId:i,notificationId:o,najvaToken:u,version:s}))),e.showNotification(d,l).then((()=>{a&&jt(2)((()=>(({websiteId:e,notificationId:n,najvaToken:i,version:o})=>t(`${Dt}/show?website_id=${e}&notif_id=${n}&sub_id=${i}&version=${o}`,{credentials:"include"}))({websiteId:i,notificationId:o,najvaToken:u,version:s})))})).catch(Lt)}))}var Rt=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function Bt(e){if(document.hidden)return;const t=Se().messaging();t&&t.onMessage((t=>Rt(this,void 0,void 0,(function*(){yield function(e,t){var n,i,o,r;return Rt(this,void 0,void 0,(function*(){yield Mt(t,{websiteId:(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.website_id)||"",notificationId:(null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.notification_id)||"",notificationData:(null==e?void 0:e.data)||{},isReportEnabled:"true"===(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.is_report_enabled),version:"1.13.20",najvaTokenFromNotificationPayload:null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.najva_token})}))}(t,e)}))))}let $t,Ut={website_id:0,api_key:"",isNativeMode:!1};function Ft(e,t){Ut=e,$t=t,Nt(),Ut.isNativeMode&&Bt($t),function(e,t){window.addEventListener("message",(n=>Rt(this,void 0,void 0,(function*(){if(n.data.api_key===t&&n.data.website_id===e){const e=n.data.cookie_token,t=n.data.najva_token;e&&t&&(yield R(j.Cookie,e,(new Date).toISOString()),yield R(j.Najva,t,(new Date).toISOString()),n.data.subscribe&&window.najvaUserSubscribed&&window.najvaUserSubscribed(e))}}))),!1)}(Ut.website_id,Ut.api_key)}const Wt={STATIC_IMAGES:"https://app.najva.com/static/images",BASE:"https://api.najva.com"};var Kt=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function zt(e,t=1){return Kt(this,void 0,void 0,(function*(){return new Promise((n=>{let i=!1;const o=()=>{i&&window.removeEventListener("scroll",o),function(){const e=document.documentElement,t=document.body,n="scrollTop",i="scrollHeight";return(e[n]||t[n])/((e[i]||t[i])-window.innerHeight)*100}()>e.scroll.value&&(i=!0,n(!0))};e.visit.maximum.enable||e.visit.minimum.enable||e.visit.interval.enable?(e.visit.minimum.enable||(e.visit.minimum.value=1),e.visit.maximum.enable||(e.visit.maximum.value=1e5),e.visit.interval.enable||(e.visit.interval.value=1),t>=e.visit.minimum.value&&t<=e.visit.maximum.value&&(t-e.visit.minimum.value)%e.visit.interval.value==0&&(e.delay.enable||e.scroll.enable?(e.scroll.enable&&window.addEventListener("scroll",o),e.delay.enable&&setTimeout((()=>{n(!0)}),1e3*e.delay.value)):n(!0))):e.delay.enable||e.scroll.enable?(e.scroll.enable&&window.addEventListener("scroll",o),e.delay.enable&&setTimeout((()=>{n(!0)}),1e3*e.delay.value)):n(!0)}))}))}var Gt=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let Vt={website_id:"",api_key:"",without_popup:!1,request_permission:{delay:{enable:0,value:0},scroll:{enable:0,value:0},visit:{minimum:{enable:0,value:0},maximum:{enable:0,value:0},interval:{enable:0,value:0}}}};function Ht(e){window.addEventListener("najva-subscription-end",e)}function qt(t,n){return Gt(this,void 0,void 0,(function*(){const{value:i}=yield B(j.Firebase),{value:o}=yield B(j.Najva),{value:a}=yield B(j.Cookie),s=yield function(){return Qe(this,void 0,void 0,(function*(){const e=Se().messaging();try{const t=yield e.getToken();if(!t)throw u(r.FIREBASE_TOKEN_UPDATE_FAILED,{firebaseErrorMessage:"empty firebase token"});return t}catch(e){throw u(r.FIREBASE_REGISTRAION_FAILED,{firebaseErrorMessage:e.message,error:e})}}))}();i===s&&o&&a||(yield function(t,n,i){return Gt(this,void 0,void 0,(function*(){const{value:o}=yield B(j.Cookie),{value:r}=yield B(j.Najva),a={token_id:t,website_id:n,api_key:i};r&&(a.najva_token=r),o&&(a.cookie_token=o);const{cookie_token:s,najva_token:c,status:u,detail:d}=yield e(`${Wt.BASE}/api/v1/add/`,{method:"POST",body:new URLSearchParams(a),headers:{"Content-type":"application/x-www-form-urlencoded"},credentials:"include"});(u&&"failure"!==u||"fail to subscribe"===d)&&(yield R(j.Firebase,t,(new Date).toISOString()),s&&(yield R(j.Cookie,s,(new Date).toISOString()),window.najvaUserSubscribed&&window.najvaUserSubscribed(s)),c&&(yield R(j.Najva,c,(new Date).toISOString())))}))}(s,t,n),function(){const e=new CustomEvent("najva-subscription-end");window.dispatchEvent(e)}())}))}function Yt(){return Gt(this,void 0,void 0,(function*(){return new Promise((e=>Gt(this,void 0,void 0,(function*(){(yield At())?(yield kt(),e()):(yield Ot())?(yield qt(Vt.website_id,Vt.api_key),e()):e()}))))}))}function Xt(e){return Gt(this,void 0,void 0,(function*(){if(Vt=e,function(e){window.addEventListener(gt.NOTIF_ACCESS_GRANTED,e)}((()=>Gt(this,void 0,void 0,(function*(){yield qt(Vt.website_id,Vt.api_key)})))),yield Ot())yield qt(Vt.website_id,Vt.api_key);else if(Vt.without_popup){const t=yield ve(_.VisitCount);yield zt(e.request_permission,t?Number(t):1),yield Yt()}}))}var Jt=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let Zt={website_id:"",campaign_id:"",api_key:"",najva_subdomain:"",without_popup:!1,isNativeMode:!1,request_permission:{delay:{enable:0,value:0},scroll:{enable:0,value:0},visit:{minimum:{enable:0,value:0},maximum:{enable:0,value:0},interval:{enable:0,value:0}}}};function Qt(){return Jt(this,void 0,void 0,(function*(){Zt.isNativeMode?yield Yt():bt()}))}function en(){return Jt(this,void 0,void 0,(function*(){const e=yield B(j.Firebase),t=yield B(j.Cookie),n=yield B(j.Najva);return Boolean(e&&t&&n)}))}var tn=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let nn={najva_subdomain:""};function on(e){return tn(this,void 0,void 0,(function*(){if(!document.querySelector("#najva-cmif")){const t=ft(`<iframe id="najva-cmif" style="display: none!important;" src="${e}cmif/"></iframe>`);t&&document.body.appendChild(t),yield _e(_.LastCookieMatchingSent,(new Date).toISOString())}}))}function rn(e){return tn(this,void 0,void 0,(function*(){nn=e,(yield function(){return tn(this,void 0,void 0,(function*(){const e=yield ve(_.LastCookieMatchingSent);return!!e&&pt((new Date).getTime(),new Date(e).getTime())<30}))}())||(yield en())&&(yield on(nn.najva_subdomain)),Ht((()=>tn(this,void 0,void 0,(function*(){yield on(nn.najva_subdomain)}))))}))}var an=n(1296);const sn="najva_location_access_granted";var cn=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};const un="granted";function dn(){const e={enableHighAccuracy:!0,maximumAge:0},t=e=>{!function(e){const t=new CustomEvent(sn,{detail:e});window.dispatchEvent(t)}(e)};"geolocation"in navigator&&navigator.geolocation.getCurrentPosition(t,void 0,e)}var ln=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};const fn=n.n(an)()((function(t){return ln(this,void 0,void 0,(function*(){if(!t)return;const{coords:n}=t,i={accuracy:n.accuracy,altitude:n.altitude,latitude:n.latitude,longitude:n.longitude};try{yield e(`${Wt.BASE}/api/v1/location/`,{method:"POST",body:JSON.stringify(i),credentials:"include",headers:{"Content-Type":"application/json"}})}catch(e){throw u(r.SEND_LOCATION_FAILED,{errorStatus:e})}}))}),1e3);function pn(e){return ln(this,void 0,void 0,(function*(){e.location_permission&&"geolocation"in navigator&&"permissions"in navigator&&(e.isNativeMode&&(yield function(){return cn(this,void 0,void 0,(function*(){if("permissions"in navigator){const e=yield navigator.permissions.query({name:"geolocation"});return"state"in e&&e.state===un}return!1}))}())&&(yield en())&&dn(),function(){cn(this,void 0,void 0,(function*(){"permissions"in navigator&&((yield navigator.permissions.query({name:"geolocation"})).onchange=function(){this.state===un&&dn()})}))}(),Ht((()=>dn())),function(e){window.addEventListener(sn,e,!1)}((e=>{e.detail&&fn(e.detail)})))}))}var hn=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};const vn="najva-messaging-sw.js";function _n(e){return hn(this,void 0,void 0,(function*(){try{["/","/firebase-cloud-messaging-push-scope"].forEach((e=>{navigator.serviceWorker.getRegistration(e).then((e=>{var t,n;(null===(n=null===(t=null==e?void 0:e.active)||void 0===t?void 0:t.scriptURL)||void 0===n?void 0:n.includes(vn))&&e.unregister()})).catch((e=>{throw u(r.SW_UNREGISTRATION_FAILED,{error:e})}))}))}catch(e){}try{return yield navigator.serviceWorker.register(e.sw_path+vn,{scope:e.sw_path+"najva-messaging-scope",updateViaCache:"none"})}catch(e){throw u(r.SW_REGISTRATION_FAILED,{browserErrorMessage:e.message,error:e})}}))}var mn=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let bn={website_id:"",api_key:"",campaign_id:""};function gn(){return mn(this,void 0,void 0,(function*(){yield function(){return mn(this,void 0,void 0,(function*(){let e=yield ve(_.VisitCount);e||(e=0),e=parseInt(e.toString()),yield _e(_.VisitCount,e+1)}))}();try{yield function(t){return mn(this,void 0,void 0,(function*(){try{const n=yield ve(_.LastCurrentUserAPICalled);n&&n===(new Date).toLocaleDateString()||(yield _e(_.LastCurrentUserAPICalled,(new Date).toLocaleDateString()),yield e("https://cr.najva.com/api/v2/current/user/",{method:"POST",body:new URLSearchParams({website:t}),headers:{"Content-type":"application/x-www-form-urlencoded"},credentials:"include"}))}catch(e){throw u(r.UPDATE_USER_ACTIVITY_FAILED,{browserErrorMessage:e.message,error:e})}}))}(bn.website_id),yield function(){return mn(this,void 0,void 0,(function*(){yield _e(_.LastActiveTime,(new Date).toISOString())}))}()}catch(e){}}))}var yn=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let wn={website_id:""};function En(t){return yn(this,void 0,void 0,(function*(){try{if(yield en()){const n=yield e(`${Wt.BASE}/api/v2/subscriber/tag/`,{method:"POST",body:JSON.stringify({website_id:wn.website_id,tags:t}),headers:{"Content-Type":"application/json"},credentials:"include"}),{message:i}=n;"not found"!==i&&(yield Promise.all(Object.keys(t).map((e=>yn(this,void 0,void 0,(function*(){return J(e,t[e],(new Date).toISOString())}))))))}}catch(e){throw u(r.ADD_ATTRIBUTE_FAILED,{object:t,error:e})}}))}function Tn(){return yn(this,void 0,void 0,(function*(){try{const t=yield e(`${Wt.BASE}/api/v2/subscriber/tag/?website_id=${wn.website_id}`,{method:"GET",credentials:"include"}),{message:n}=t,{tags:i}=t;return"not found"===n||null===i?{}:i}catch(e){throw u(r.GET_ATTRIBUTES_FAILED,{error:e})}}))}function In(t){return yn(this,void 0,void 0,(function*(){try{const n=yield e(`${Wt.BASE}/api/v2/subscriber/tag/`,{method:"DELETE",body:JSON.stringify({website_id:wn.website_id,key:t}),headers:{"Content-Type":"application/json"},credentials:"include"}),{message:i}=n,{tags:o}=n;return"not found"!==i&&(yield function(e){return X(this,void 0,void 0,(function*(){try{const t=(yield pe()).transaction(Y,"readwrite");yield t.store.delete(e),yield t.done}catch(t){throw u(r.DB_READ_FAILED,{key:e,objectStoreName:Y,browserErrorMessage:t.message,error:t})}}))}(t)),o||[]}catch(e){throw u(r.DELETE_ATTRIBUTE_FAILED,{key:t,error:e})}}))}function Sn(){let e=!1;var t;return t=window.navigator.userAgent||window.navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t.substr(0,4)))&&(e=!0),e}var kn=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],a=0,s=r.length;a<s;a++,o++)i[o]=r[a];return i},Nn=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},On=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},An=function(e,t,n,i){this.name=e,this.version=t,this.os=n,this.bot=i,this.type="bot-device"},Dn=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},Pn=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},Ln=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,xn=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],Cn=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function jn(e){return e?Rn(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new Pn:"undefined"!=typeof navigator?Rn(navigator.userAgent):"undefined"!=typeof process&&process.version?new On(process.version.slice(1)):null}function Mn(e){return""!==e&&xn.reduce((function(t,n){var i=n[0],o=n[1];if(t)return t;var r=o.exec(e);return!!r&&[i,r]}),!1)}function Rn(e){var t=Mn(e);if(!t)return null;var n=t[0],i=t[1];if("searchbot"===n)return new Dn;var o=i[1]&&i[1].split(/[._]/).slice(0,3);o?o.length<3&&(o=kn(o,function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(3-o.length))):o=[];var r=o.join("."),a=function(e){for(var t=0,n=Cn.length;t<n;t++){var i=Cn[t],o=i[0];if(i[1].exec(e))return o}return null}(e),s=Ln.exec(e);return s&&s[1]?new An(n,r,a,s[1]):new Nn(n,r,a)}function Bn(){const e=jn();return!!e&&"firefox"===e.name}function $n(){const e=jn();return e?e.version:null}var Un,Fn,Wn=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function Kn(){return Wn(this,void 0,void 0,(function*(){if(function(){const e=window.navigator.userAgent.toLowerCase();if(0===e.indexOf("msie")&&0===e.indexOf("trident"))return!1;const t=/(?:msie|rv:)\s?([\d.]+)/.exec(e);return!!(t&&parseInt(t[1],10)>=10)}())return function(){try{return!window.indexedDB}catch(e){return!1}}();if(Bn())try{return yield function(){return Wn(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{window.indexedDB||e();try{const n=window.indexedDB.open("test");n.onerror=()=>{e()},n.onsuccess=()=>{t()}}catch(t){e()}}))}))}(),!0}catch(e){return!1}else{if(function(){const e=jn();return!!e&&"safari"===e.name}())return function(){try{return window.localStorage.setItem("test","1"),!1}catch(e){return!0}}();if(function(){const e=jn();return!!e&&"chrome"===e.name}())try{return yield function(){return Wn(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{"storage"in navigator&&"estimate"in navigator.storage&&navigator.storage.estimate().then((({quota:n})=>{n&&n<12e7&&e(),t()}));const n=window.RequestFileSystem||window.webkitRequestFileSystem;n?n(window.TEMPORARY,100,(()=>{t()}),(()=>{e()})):e()}))}))}(),!0}catch(e){return!1}}return!1}))}!function(e){e.POPUP_BUTTON="najva-popup-button"}(Un||(Un={})),function(e){e.POPUP="najva-popup",e.POPUP_IMAGE_WRAPPER="najva-popup-image-wrapper",e.POPUP_IMAGE="najva-popup-image",e.POPUP_BODY_WRAPPER="najva-popup-body-wrapper",e.POPUP_TEXT="najva-popup-text",e.POPUP_DESCRIPTION="najva-popup-description",e.POPUP_BUTTON_WRAPPER="najva-popup-button-wrapper",e.POPUP_REJECT_BUTTON="najva-popup-reject-button",e.POPUP_ACCEPT_BUTTON="najva-popup-accept-button"}(Fn||(Fn={}));let zn=!1;var Gn=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let Vn={request_icon:"",request_text:"",request_description:"",denied_text:"",accept_text:"",without_popup:!0,with_popup:!0,dismiss_cookie_days:0,isNativeMode:!1,request_permission:{delay:{enable:1,value:5},scroll:{enable:0,value:50},visit:{minimum:{enable:1,value:1},maximum:{enable:0,value:24},interval:{enable:0,value:3}}}};function Hn(){const e=document.getElementById(Fn.POPUP);e&&e.classList.add(it)}function qn(){!function(e){if(!document.getElementById(Fn.POPUP)){const t=ft(`\n    <div id="${Fn.POPUP}" class="${it}">\n        <div id="${Fn.POPUP_IMAGE_WRAPPER}">\n            <img id="${Fn.POPUP_IMAGE}" src="${e.request_icon}">\n        </div>\n        <div id="${Fn.POPUP_BODY_WRAPPER}" class="${at}">\n            <p id="${Fn.POPUP_TEXT}">${e.request_text}</p>\n            ${e.request_description?`<p id="${Fn.POPUP_DESCRIPTION}">${e.request_description}</p>`:""}\n            <div id="${Fn.POPUP_BUTTON_WRAPPER}" class="${ot}">\n                <button id="${Fn.POPUP_REJECT_BUTTON}" class="${Un.POPUP_BUTTON}">\n                    ${e.denied_text}\n                </button>\n                <button id="${Fn.POPUP_ACCEPT_BUTTON}" class="${Un.POPUP_BUTTON}">\n                    ${e.accept_text}\n                </button>\n            </div>\n        </div>\n    </div>\n`);t&&document.body.appendChild(t)}}(Vn);const e=document.getElementById(Fn.POPUP_ACCEPT_BUTTON),t=document.getElementById(Fn.POPUP_REJECT_BUTTON);e&&e.addEventListener("click",(()=>Gn(this,void 0,void 0,(function*(){Hn(),yield Qt()})))),t&&t.addEventListener("click",(()=>Gn(this,void 0,void 0,(function*(){Hn(),ai(),yield q(G.Reject,!0)}))))}function Yn(){return Gn(this,void 0,void 0,(function*(){const e=yield function(){return Gn(this,void 0,void 0,(function*(){let e=yield H(G.ShownCount);return e||(e=0),e}))}();yield q(G.ShownCount,e+1)}))}function Xn(){return Gn(this,void 0,void 0,(function*(){!function(e){if(zn)return;zn=!0,dt(`\n    #${Fn.POPUP} {\n        z-index: ${st};\n        -webkit-box-shadow: 0 1px 8px 0 rgba(0,0,0,.2), 0 3px 4px 0 rgba(0,0,0,.14), 0 3px 3px -2px rgba(0,0,0,.12) !important;\n        box-shadow: 0 1px 8px 0 rgba(0,0,0,.2), 0 3px 4px 0 rgba(0,0,0,.14), 0 3px 3px -2px rgba(0,0,0,.12) !important;\n        direction: rtl;\n        position: fixed;\n        ${e.with_popup?"top: 10px;left: 15px;":""}\n        width: 500px;\n        top: 0px;\n        left: 50%;\n        -webkit-transform: translateX(-50%);\n        -ms-transform: translateX(-50%);\n        transform: translateX(-50%);\n        background-color: #fff;\n        border-bottom-right-radius: 4px;\n        border-bottom-left-radius: 4px;\n        border: 1px solid #eaeaea;\n        -webkit-transition: opacity 0.5s, visibility 0.5s;\n        -o-transition: opacity 0.5s, visibility 0.5s;\n        transition: opacity 0.5s, visibility 0.5s;\n    }\n\n    #${Fn.POPUP_IMAGE_WRAPPER} {\n        width: 25%;\n        position: absolute;\n        top: 50%;\n        -webkit-transform: translateY(-50%);\n        -ms-transform: translateY(-50%);\n        transform: translateY(-50%);\n        text-align: center;\n    }\n\n    #${Fn.POPUP_IMAGE} {\n        width: 75%;\n        height: auto;\n        vertical-align: middle;\n    }\n\n    #${Fn.POPUP_BODY_WRAPPER} {\n        margin-right: 25%;\n        border-right: 1px solid #eaeaea;\n        padding: 10px;\n        font-size: 1.1em;\n        line-height: 1.2em;\n    }\n \n    #${Fn.POPUP_TEXT} {\n        margin: 0;\n        line-height: 1.5em;\n        color: #000;\n        font-size: 1em;\n    }\n\n    #${Fn.POPUP_DESCRIPTION} {\n        font-size: 0.8em;\n        color: gray;\n        margin:0;\n    }\n\n    #${Fn.POPUP_BUTTON_WRAPPER} {\n        margin-top: 7px;\n    }\n\n    .${Un.POPUP_BUTTON} {\n        -webkit-appearance: button;\n        text-transform: none;\n        overflow: visible;\n        margin: 0;\n        font-family: inherit;\n        display: inline-block;\n        font-weight: 400;\n        text-align: center;\n        white-space: nowrap;\n        vertical-align: middle;\n        -webkit-user-select: none;\n        -moz-user-select: none;\n        -ms-user-select: none;\n        user-select: none;\n        border: 1px solid transparent;\n        padding: .375rem 1rem;\n        font-size: 1.2em;\n        line-height: 1.5;\n        border-radius: .25rem;\n        transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;\n        -webkit-transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;\n        -o-transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;\n        background: initial;\n    }\n\n    #${Fn.POPUP_REJECT_BUTTON}:hover {\n        background-color: #e2e6ea !important;\n        border-color: #dae0e5 !important;\n    }\n\n    #${Fn.POPUP_REJECT_BUTTON} {\n        color: #212529 !important;\n        background-color: #f8f9fa !important;\n        border-color: #f8f9fa !important; \n    }\n\n    #${Fn.POPUP_ACCEPT_BUTTON} {\n        color: #fff !important;\n        background-color: #007bff !important;\n        border-color: #007bff !important;\n    }\n\n    #${Fn.POPUP_ACCEPT_BUTTON}:hover {\n        background-color: #0069d9 !important;\n        border-color: #0062cc !important;\n        text-decoration: none;\n    }\n\n    @media screen and (max-width: 767px) {\n      #${Fn.POPUP} {\n          width: 100%;\n          top: auto;\n          bottom: 0;\n          left:0;\n          -webkit-transform: none;\n          -ms-transform: none;\n          transform: none;\n          border-bottom-right-radius: 0;\n          border-bottom-left-radius: 0;\n          border-top-right-radius: 10px;\n          border-top-left-radius: 10px;\n      }\n\n      #${Fn.POPUP_BODY_WRAPPER}{\n          font-size: 15px;\n      }\n\n      .${Un.POPUP_BUTTON} {\n          width: 100px;\n          font-size: 1em\n      }\n\n      #${Fn.POPUP_BUTTON_WRAPPER} {\n          text-align: center;\n          float: inherit;\n      } \n    }\n  `)}(Vn),oi(it),qn(),function(){const e=document.getElementById(Fn.POPUP);e&&e.classList.remove(it)}(),yield q(G.LastShownTime,(new Date).toISOString()),yield Yn()}))}function Jn(){return Gn(this,void 0,void 0,(function*(){const e=yield At(),t=yield ve(_.HasNajvaSubscriptionWindowOpened);if(Vn.isNativeMode&&!e||!Vn.isNativeMode&&"string"==typeof t&&"true"===t||Vn.without_popup)return!1;const n=yield H(G.LastShownTime);if(!n)return!0;if(!(yield H(G.Reject)))return!0;return pt((new Date).getTime(),new Date(n).getTime())>Vn.dismiss_cookie_days}))}let Zn=!1;var Qn;!function(e){e.BELL="najva-bell",e.BELL_IMAGE_WRAPPER="najva-bell-image-wrapper",e.BELL_IMAGE="najva-bell-image",e.BELL_DENIED_HELP="najva-bell-denied-help",e.BELL_DENIED_HELP_CLOSE="najva-bell-denied-help-close",e.BELL_DENIED_HELP_IMAGE="najva-bell-denied-help-image"}(Qn||(Qn={}));let ei=!1;function ti(e){if(ei)return;ei=!0,function(){if(Zn)return;dt("\n      [najvatooltip] {\n        margin: 20px 60px;\n        position: relative;\n        display: inline-block;\n        font-family: inherit;\n    }\n\n    [najvatooltip]::before {\n        content: \"\";\n        position: absolute;\n        top: -6px;\n        left: 50%;\n        transform: translateX(-50%);\n        border-width: 4px 6px 0 6px;\n        border-style: solid;\n        border-color: rgba(0, 0, 0, 0.7) transparent transparent transparent;\n        z-index: 99;\n        opacity: 0;\n    }\n\n    [najvatooltip-position='left']::before {\n        left: 0%;\n        top: 50%;\n        margin-left: -12px;\n        transform: translatey(-50%) rotate(-90deg)\n    }\n\n    [najvatooltip-position='top']::before {\n        left: 50%;\n    }\n\n    [najvatooltip-position='buttom']::before {\n        top: 100%;\n        margin-top: 8px;\n        transform: translateX(-50%) translatey(-100%) rotate(-180deg)\n    }\n\n    [najvatooltip-position='right']::before {\n        left: 100%;\n        top: 50%;\n        margin-left: 1px;\n        transform: translatey(-50%) rotate(90deg)\n    }\n\n    [najvatooltip]::after {\n        content: attr(najvatooltip);\n        position: absolute;\n        left: 50%;\n        top: -6px;\n        transform: translateX(-50%) translateY(-100%);\n        background: rgba(0, 0, 0, 0.7);\n        text-align: center;\n        color: #fff;\n        padding: 4px 2px;\n        font-size: 12px;\n        min-width: 80px;\n        border-radius: 5px;\n        pointer-events: none;\n        padding: 4px 4px;\n        z-index: 99;\n        opacity: 0;\n    }\n\n    [najvatooltip-position='left']::after {\n        left: 0%;\n        top: 50%;\n        margin-left: -8px;\n        transform: translateX(-100%) translateY(-50%);\n    }\n\n    [najvatooltip-position='top']::after {\n        left: 50%;\n    }\n\n    [najvatooltip-position='buttom']::after {\n        top: 100%;\n        margin-top: 8px;\n        transform: translateX(-50%) translateY(0%);\n    }\n\n    [najvatooltip-position='right']::after {\n        left: 100%;\n        top: 50%;\n        margin-left: 8px;\n        transform: translateX(0%) translateY(-50%);\n    }\n\n    [najvatooltip]:hover::after, [najvatooltip]:hover::before {\n        opacity: 1\n    }\n  "),Zn=!0}();let t=`\n      #${Qn.BELL} {\n        -webkit-box-shadow: 0 1px 6px rgba(0, 0, 0, .06), 0 2px 32px rgba(0, 0, 0, .16) !important;\n        box-shadow: 0 1px 6px rgba(0, 0, 0, .06), 0 2px 32px rgba(0, 0, 0, .16) !important;\n        max-width: initial;\n        z-index: ${st};\n        position: fixed;\n        width: 50px;\n        height: 50px;\n\n        bottom: 30px;\n        cursor: pointer;\n        background-color: transparent;\n        border-radius: 50%;\n        -webkit-transition: background-color 0.7s;\n        -o-transition: background-color 0.7s;\n        transition: background-color 0.7s;\n        -webkit-box-sizing: border-box;\n        -moz-box-sizing: border-box;\n        box-sizing: border-box;\n    }\n\n    #${Qn.BELL_IMAGE_WRAPPER} {\n        padding: 0;\n        margin: 0;\n        border-radius: 50%;\n        width: 50px;\n        height: 50px;\n        text-align: center;\n        /*background-color: #444;*/\n        position: absolute;\n        left: 50%;\n        top: 50%;\n        -webkit-transform: translate(-50%, -50%);\n        -ms-transform: translate(-50%, -50%);\n        transform: translate(-50%, -50%);\n        -webkit-transition: width 0.3s, height 0.3s;\n        -o-transition: width 0.3s, height 0.3s;\n        transition: width 0.3s, height 0.3s;\n  }\n\n    #${Qn.BELL_IMAGE} {\n        width: 40px;\n        height: 40px;\n        position: absolute;\n        left: 50%;\n        top: 50%;\n        max-width: initial;\n        -webkit-transform: translate(-50%, -50%);\n        -ms-transform: translate(-50%, -50%);\n        transform: translate(-50%, -50%);\n        border: 2px solid #fff;\n        border-radius: 50%;\n        padding: 5px;\n        -webkit-transition: width 0.3s, height 0.3s;\n        -o-transition: width 0.3s, height 0.3s;\n        transition: width 0.3s, height 0.3s;\n  }\n\n    #${Qn.BELL}:hover #${Qn.BELL_IMAGE_WRAPPER} {\n        width: 20px;\n        height: 20px;\n    }\n\n    #${Qn.BELL}:hover #${Qn.BELL_IMAGE} {\n        width: 50px;\n        height: 50px;\n        border-color: transparent;\n    }\n\n    #${Qn.BELL} {\n        ${e.bell_direction}: 30px;\n    }\n\n    #${Qn.BELL}:hover {\n        background-color: ${e.bell_color_hover};\n    }\n\n    #${Qn.BELL_IMAGE_WRAPPER} {\n        background-color: ${e.bell_color};\n    }\n\n    #${Qn.BELL_DENIED_HELP_CLOSE}{\n        position: absolute;\n        top: 0;\n        right: 0;\n        padding: 2px 4px;\n        color: gray;\n        cursor: pointer;\n        border: 1px solid #d6d6d6;\n        border-top-right-radius: 5px;\n        font-size: 15px;\n        font-family: arial;\n    }\n\n    #${Qn.BELL_DENIED_HELP}{\n        z-index: ${st};\n        position: fixed;\n        bottom: 110px;\n        ${e.bell_direction}: 30px;\n        background: white;\n        padding: 25px 15px 15px;\n        color: #000;\n        direction: rtl;\n        border-radius: 5px;\n        width:230px;\n    }\n\n  @media screen and (max-width: 767px) {\n      #${Qn.BELL} {\n        width: 4em;\n        height: 4em;\n        margin:0;\n    }\n\n    #${Qn.BELL_IMAGE} {\n        width: 3em;\n        height: 3em;\n    }\n\n    #${Qn.BELL}:hover #${Qn.BELL_IMAGE_WRAPPER} {\n        width: 1em;\n        height: 1em;\n    }\n\n    #${Qn.BELL}:hover #${Qn.BELL_IMAGE} {\n        width: 4em;\n        height: 4em;\n    }\n  \n    #${Qn.BELL_IMAGE_WRAPPER} {\n        width: 4em;\n        height: 4em;\n    }\n  }\n\n  `;e.show_bell_in_mobile||(t+=`\n    @media screen and (max-width: 768px) {\n        #${Qn.BELL} {\n            visibility: hidden!important;\n            opacity: 0!important;\n        }\n    }`),dt(t)}var ni=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let ii={show_bell:1,show_bell_in_mobile:1,bell_direction:"right",tooltip_direction:"left",bell_color_hover:"#7a7a7a",bell_color:"#444444",bell_tooltip:"",without_popup:!0,isNativeMode:!1};function oi(e){const t=document.getElementById(Qn.BELL);t&&t.classList.add(e)}function ri(e){const t=document.getElementById(Qn.BELL);t&&t.classList.remove(e)}function ai(){ri(it)}function si(){var e;let t=document.getElementById(Qn.BELL_DENIED_HELP);if(!t){const e=ft(`\n    <div\n        id="${Qn.BELL_DENIED_HELP}"\n        class="${it}"\n    >\n        <span id="${Qn.BELL_DENIED_HELP_CLOSE}">x</span>\n        <p>\n            شما اجازه ارسال نوتیف را به ما ندادید. طبق تصویر زیر، اجازه ارسال نوتیف را صادر کنید.\n        </p>\n        <img id="${Qn.BELL_DENIED_HELP_IMAGE}" src="${Sn()?`${Wt.STATIC_IMAGES}/android-chrome-denied-help.png`:Bn()?`${Wt.STATIC_IMAGES}/firefox-denied-help.png`:`${Wt.STATIC_IMAGES}/chrome-denied-help.png`}"\n           height="${Sn()?319:Bn()?112:274}"\n           width="230"\n           alt="notif denied help image"\n        >\n    </div>\n`);e&&document.body.appendChild(e)}t=document.getElementById(Qn.BELL_DENIED_HELP),null===(e=document.getElementById(Qn.BELL_DENIED_HELP_CLOSE))||void 0===e||e.addEventListener("click",(()=>{t&&t.classList.add(it)}),!1)}function ci(){const e=document.getElementById(Qn.BELL),t=document.getElementById(Qn.BELL_DENIED_HELP);e&&(e.onclick=function(){return ni(this,void 0,void 0,(function*(){const e=yield function(){return yt(this,void 0,void 0,(function*(){return(yield St())===Et}))}();var n;ii.isNativeMode&&e?t&&((n=t)&&(n.classList.contains(it)?n.classList.remove(it):n.classList.add(it))):ii.without_popup?Qt():yield Xn()}))})}function ui(e){si(),function(e){if(ti(e),!document.getElementById(Qn.BELL)){const t=ft(`\n    <div\n        id="${Qn.BELL}"\n        najvatooltip="${e.bell_tooltip}‍"\n        najvatooltip-position="${e.tooltip_direction}"\n        class="${it}"\n    >\n        <div id="${Qn.BELL_IMAGE_WRAPPER}">\n            <img\n                id="${Qn.BELL_IMAGE}"\n                src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDUzIDUzIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MyA1MzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI2NHB4IiBoZWlnaHQ9IjY0cHgiPjxwYXRoIHN0eWxlPSJmaWxsOiNFN0VDRUQ7IiBkPSJNMTIuODIxLDQ2LjYzOGMxMC43MDEsMS44NDcsMTYuNjU5LDEuODQ3LDI3LjM2LDBMNDkuNjcxLDQ1bDAsMGMtNC42ODUtNC42NTctNy4zMTctMTAuNDE1LTcuMzE3LTE3ICB2LTljMC4wMzgtNi4wNDctMy45NTctMTAuNDc4LTcuOTQ2LTEyLjMwMWMtNC45OTktMi4yODUtMTAuODE1LTIuMjk0LTE1LjgwNiwwLjAwOEMxNC42NDgsOC41MywxMC4zNjcsMTIuOTU4LDEwLjMyOSwxOXY5ICBjMCw2LjU4NS0yLjMxNSwxMi4zNDMtNywxN2wwLDBMMTIuODIxLDQ2LjYzOHoiLz48cGF0aCBzdHlsZT0iZmlsbDojRkZGRkZGOyIgZD0iTTE1LjMyOSwyMGMtMC4wMDIsMC0wLjAwNCwwLTAuMDA2LDBjLTAuNTUyLTAuMDA0LTAuOTk3LTAuNDU0LTAuOTk0LTEuMDA2ICBjMC4wMy00LjY4MiwzLjc1Mi03LjY0Myw1Ljk0OC04LjY1NGMzLjg0OS0xLjc3NSw4LjU5NC0xLjc3MiwxMi40NjktMC4wMDJjMC41MDIsMC4yMjksMC43MjMsMC44MjIsMC40OTQsMS4zMjUgIGMtMC4yMywwLjUwMi0wLjgyMywwLjcyNC0xLjMyNiwwLjQ5M2MtMy4zNTMtMS41MzMtNy40NjktMS41MzctMTAuNzk5LDBjLTEuNzY3LDAuODE0LTQuNzYyLDMuMTczLTQuNzg1LDYuODUgIEMxNi4zMjYsMTkuNTU3LDE1Ljg3OSwyMCwxNS4zMjksMjB6Ii8+PHBhdGggc3R5bGU9ImZpbGw6I0M3Q0FDNzsiIGQ9Ik0zMC4zMjksNS4zODFWNGMwLTIuMjA5LTEuNzkxLTQtNC00cy00LDEuNzkxLTQsNHYxLjQ1M0MyNC45NTgsNC44NjIsMjcuNjksNC44NDEsMzAuMzI5LDUuMzgxeiIvPjxwYXRoIHN0eWxlPSJmaWxsOiNDN0NBQzc7IiBkPSJNMTguMjM1LDQ3LjQ2YzEuNDQ1LDMuMjY4LDQuNjAyLDUuNTQsOC4yNzcsNS41NGMzLjY3NiwwLDYuODM0LTIuMjczLDguMjc4LTUuNTQzICBDMjguODYyLDQ4LjIwOSwyNC4xNTksNDguMjEsMTguMjM1LDQ3LjQ2eiIvPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjwvc3ZnPg=="\n            />\n        </div>\n    </div>\n`);t&&document.body.appendChild(t),ci()}}(e),ai()}function di(e){return ni(this,void 0,void 0,(function*(){if(ii=e,Boolean(ii.show_bell)||Boolean(ii.show_bell_in_mobile)){const e=yield ve(_.HasNajvaSubscriptionWindowOpened),t=yield Ot();(ii.isNativeMode&&!t||!ii.isNativeMode&&("string"!=typeof e||"true"!==e))&&ui(ii),function(e){window.addEventListener(gt.NOTIF_ACCESS_DENIED,e)}((()=>{ui(ii)}))}}))}var li,fi;!function(e){e.BACKDROP_CONTAINER="najva-backdrop-container",e.HIDDEN_IN_BACKDROP="najva-hidden-in-backdrop",e.BACKDROP_TEXT_CONTAINER_DOWN="najva-backdrop-text-container-down",e.BACKDROP_TEXT="najva-backdrop-text"}(li||(li={})),function(e){e.BACKDROP="najva-backdrop",e.BACKDROP_CLOSE="najva-backdrop-close",e.BACKDROP_TEXT_CONTAINER="najva-backdrop-text-container",e.BACKDROP_ARROW="najva-backdrop-arrow",e.DENIED_HELP_BACKDROP="najva-denied-help-backdrop",e.DENIED_HELP_CLOSE="najva-denied-help-close",e.DENIED_HELP_IMAGE="najva-denied-help-img"}(fi||(fi={}));let pi=!1;function hi(){if(pi)return;pi=!0;dt(`\n    #${fi.BACKDROP}{\n        position:fixed;\n        top:0;\n        left:0;\n        width: 100vw;\n        height: 100vh;\n        z-index: ${st};\n        background-color: #000;\n        opacity: 0.8;\n    }\n\n    #${fi.BACKDROP_TEXT_CONTAINER}{\n        direction: rtl;\n        display: flex;\n        max-width: 600px;\n        z-index: 2147483645;\n        margin: 200px auto;\n        position: fixed;\n        right: 0;\n        left: 0;\n        top: 0;\n    }\n\n    #${fi.BACKDROP_TEXT_CONTAINER}.${li.BACKDROP_TEXT_CONTAINER_DOWN}{\n        margin: 250px auto;\n    }\n\n    #${fi.BACKDROP_TEXT_CONTAINER} .${li.BACKDROP_TEXT}{\n        direction: rtl;\n        z-index: ${st};\n        font-size: 30px;\n        font-weight: bold;\n        line-height: normal;\n        color: white;\n        font-family: inherit;\n        text-align: right;\n        display: flex;\n        align-items: flex-end;\n        max-width: 520px;\n        padding-left: 20px;\n    }\n\n    .${li.BACKDROP_TEXT_CONTAINER_DOWN} .${li.BACKDROP_TEXT}{\n        align-items: flex-start;\n    }\n\n    #${fi.BACKDROP_ARROW} {\n        flex-basis: 80px;\n        height: 160px;\n        background-size: contain;\n        transform: rotate(170deg);\n        background-image: url(${Wt.STATIC_IMAGES}/arrow-white.png);\n        background-repeat: no-repeat;\n    }\n\n    .${li.BACKDROP_TEXT_CONTAINER_DOWN} #${fi.BACKDROP_ARROW} {\n        transform: rotate(0deg);\n    }\n\n    #${fi.BACKDROP_CLOSE} {\n        position: fixed;\n        right: 20px;\n        top: 30px;\n        width: 55px;\n        height: 32px;\n        cursor: pointer;\n        z-index: ${st+1}\n    }\n\n    #${fi.BACKDROP_CLOSE}:before,#${fi.BACKDROP_CLOSE}:after  {\n        position: fixed;\n        right: 48px;\n        content: " ";\n        height: 33px;\n        width: 3px;\n        background-color: #ffffff;\n    }\n\n    #${fi.BACKDROP_CLOSE}:before {\n        transform: rotate(45deg);\n    }\n\n    #${fi.BACKDROP_CLOSE}:after {\n        transform: rotate(-45deg);\n    }\n\n    #${fi.DENIED_HELP_BACKDROP}{\n        position: fixed;\n        color: white;\n        font-family: inherit;\n        z-index:${st};\n        display: flex;\n        flex-direction: column;\n        justify-content: center;\n        align-items: center;\n        width: 100%;\n        top: 30px;\n        margin: auto;\n        left: 0;\n        right: 0;\n    }\n\n    #${fi.DENIED_HELP_BACKDROP} p {\n        direction: rtl;\n        font-size: 1.5em;\n        font-weight: bold;\n    }\n\n    #${fi.DENIED_HELP_BACKDROP} #${fi.DENIED_HELP_CLOSE} {\n        color: white;\n        border: 1px solid white;\n        border-radius: 10px;\n        position: fixed;\n        top: 10px;\n        right: 10px;\n    }\n\n    .${li.HIDDEN_IN_BACKDROP}{\n        display: none;\n    }\n\n    @media screen and (max-width: 767px) {\n      #${fi.DENIED_HELP_BACKDROP} #${fi.DENIED_HELP_IMAGE} {\n          width: 90%;\n      }\n\n      #${fi.DENIED_HELP_BACKDROP} p {\n          text-align: justify;\n          padding: 1em;\n      }\n    }\n  `)}var vi,_i;function mi(){const e=document.getElementById(_i.POWERED_BY);e&&e.classList.add(it)}!function(e){e.POWERED_BY="najva-powered-by",e.POWERED_BY_UP="najva-powered-by-up"}(vi||(vi={})),function(e){e.POWERED_BY="najva-powered-by"}(_i||(_i={}));let bi=!1;function gi(e){if(e.notification_button_enabled)return;const t=document.querySelector(`.${li.BACKDROP_CONTAINER}`);if(!t)return;!function(){if(bi)return;bi=!0,dt(`\n  .${li.BACKDROP_CONTAINER} .${vi.POWERED_BY} {\n        direction: rtl;\n        display: flex;\n        flex-direction: row;\n        color: white;\n        width: 165px;\n        font-size: 12px;\n        align-items: center;\n        font-family: inherit;\n        cursor: pointer;\n        z-index: ${st};\n        position: fixed;\n        bottom: 10px;\n        right: 10px;\n    }\n\n    .${li.BACKDROP_CONTAINER} .${vi.POWERED_BY} img {\n        width: 50px;\n        height: 50px;\n        margin-right: -5px;\n        margin-top: -13px;\n\n    }\n    .${li.BACKDROP_CONTAINER} .${vi.POWERED_BY}.${vi.POWERED_BY_UP}{\n        top: 10px;\n        bottom: unset;\n        width: unset;\n    }\n  `)}();const n=ft(`\n  <div id="${_i.POWERED_BY}" class="${vi.POWERED_BY} ${Sn()?vi.POWERED_BY_UP:""}">\n      <span>طراحی‌شده توسط</span>\n      <img src="${Wt.STATIC_IMAGES}/najva-flag-typography-white.svg">\n    </div>\n  `);n&&t.appendChild(n);const i=document.getElementById(_i.POWERED_BY);i&&i.addEventListener("click",(()=>{window.open("https://najva.com")}))}const yi="najva-backdrop-close";let wi={show_backdrop:!1,show_backdrop_mobile:!1,backdrop_text:"",website_policy:{notification_queue:1,notification_button_enabled:!1,use_najva_firebase_account:!1,notification_countdown:1,notification_blocked:!1,recommender_permission:!1,tag_enabled:!1,email_enabled:!1}};function Ei(){const e=$n();if(e){const t=e.split(".")[0];if(function(){const e=jn();return!!e&&"edge"===e.name}()&&Number(t)<=18)return!0}return!1}function Ti(){return document.querySelector(`.${li.BACKDROP_CONTAINER}`)}function Ii(){const e=Ti();e&&e.classList.add(li.HIDDEN_IN_BACKDROP)}function Si(){const e=Ti();if(e)e.classList.remove(li.HIDDEN_IN_BACKDROP);else{const e=ft(`<div class="${li.BACKDROP_CONTAINER}">\n        <div id=${fi.BACKDROP}></div>\n      </div>`);e&&document.body.appendChild(e)}}function ki(){oi(li.HIDDEN_IN_BACKDROP)}function Ni(){Ii(),mi(),function(){const e=document.getElementById(fi.BACKDROP_TEXT_CONTAINER);e&&e.classList.add(li.HIDDEN_IN_BACKDROP)}(),function(){const e=document.getElementById(fi.BACKDROP_CLOSE);e&&e.classList.add(li.HIDDEN_IN_BACKDROP)}(),ri(li.HIDDEN_IN_BACKDROP)}function Oi(){Sn()?(Ii(),mi()):Ni()}function Ai(){const e=Ti();if(!e)return;let t=document.getElementById(fi.BACKDROP_CLOSE);if(t)t.classList.remove(li.HIDDEN_IN_BACKDROP);else{const t=ft(`<div id=${fi.BACKDROP_CLOSE}></div>`);t&&e.appendChild(t)}t=document.getElementById(fi.BACKDROP_CLOSE),t&&t.addEventListener("click",(()=>{Oi(),function(){const e=new CustomEvent(yi);window.dispatchEvent(e)}()}))}function Di(){hi(),Si(),gi(wi.website_policy),Ai(),function(){const e=Ti();if(!e)return;const t=document.getElementById(fi.BACKDROP_TEXT_CONTAINER);if(t)t.classList.remove(li.HIDDEN_IN_BACKDROP);else{const t=ft(`\n    <div id="${fi.BACKDROP_TEXT_CONTAINER}">\n        <span class=${li.BACKDROP_TEXT}>\n          ${wi.backdrop_text?wi.backdrop_text:""}\n        </span>\n        <div id=${fi.BACKDROP_ARROW}></div>\n    </div>\n      `);t&&e.appendChild(t);const n=document.querySelector(`#${fi.BACKDROP_TEXT_CONTAINER}`);n&&Ei()&&n.classList.add(li.BACKDROP_TEXT_CONTAINER_DOWN)}}()}function Pi(){(function(){const e=$n();if(e){const t=Number(e.split(".")[0]);if(Bn()&&t<77&&t>71)return!1}return!0})()&&(wi.show_backdrop||wi.show_backdrop_mobile)&&(Sn()&&wi.show_backdrop_mobile?(hi(),Si(),gi(wi.website_policy),ki()):!Sn()&&wi.show_backdrop&&(Di(),ki()))}function Li(e){wi=e,function(e){window.addEventListener(gt.NOTIF_PROMPT_OPEN,e)}(Pi),function(e){window.addEventListener(gt.NOTIF_PROMPT_CLOSE,e)}(Oi)}var xi,Ci,ji,Mi;function Ri(e){return 0===e.indexOf("/")?e.slice(1):e}function Bi(e){return e?decodeURIComponent(e):""}function $i(e){return"/"===e?"":"/"===e[e.length-1]?e.slice(0,e.length-1):e}function Ui(e){return Ri(Bi(window.location.pathname)).startsWith(Bi(e))}function Fi(e){return $i(Bi(window.location.pathname)).endsWith(Bi(e))}function Wi(e){const t=Bi(e);return Bi(window.location.pathname).includes(t)}function Ki(e){const t=new RegExp(e);return Bi(window.location.pathname).search(t)>-1}function zi(e){return e===$i(Ri(Bi(window.location.pathname)))}function Gi(e,t){return e===Ci.Contains?Wi(t):e===Ci.EndsWith?Fi(t):e===Ci.MatchRegex?Ki(t):e===Ci.NotContains?!Wi(t):e===Ci.NotEndsWith?function(e){return!Fi(e)}(t):e===Ci.NotMatchRegex?!Ki(t):e===Ci.NotStartsWith?function(e){return!Ui(e)}(t):e===Ci.StartsWith?Ui(t):e===Ci.EqualsTo?zi(t):e===Ci.NotEqualsTo&&!zi(t)}function Vi(e,t){return!t||(0===t.length||(e===xi.And?t.reduce(((e,t)=>e&&Gi(t.condition,t.value)),!0):t.reduce(((e,t)=>e||Gi(t.condition,t.value)),!1)))}!function(e){e[e.And=0]="And",e[e.Or=1]="Or"}(xi||(xi={})),function(e){e[e.EqualsTo=0]="EqualsTo",e[e.StartsWith=1]="StartsWith",e[e.EndsWith=2]="EndsWith",e[e.Contains=3]="Contains",e[e.MatchRegex=4]="MatchRegex",e[e.NotEqualsTo=5]="NotEqualsTo",e[e.NotStartsWith=6]="NotStartsWith",e[e.NotEndsWith=7]="NotEndsWith",e[e.NotContains=8]="NotContains",e[e.NotMatchRegex=9]="NotMatchRegex"}(Ci||(Ci={})),function(e){e[e.Small=0]="Small",e[e.Medium=1]="Medium",e[e.Large=2]="Large"}(ji||(ji={})),function(e){e[e.Button=0]="Button",e[e.Link=1]="Link"}(Mi||(Mi={}));const Hi="000",qi="00abbb";var Yi;!function(e){e.CUSTOM_LINK_CONTAINER="najva-custom-link-container",e.CUSTOM_LINK="najva-custom-link",e.CUSTOM_LINK_LINK="najva-custom-link-link",e.CUSTOM_LINK_BUTTON="najva-custom-link-button",e.CUSTOM_LINK_LARGE="najva-custom-link-large",e.CUSTOM_LINK_MEDIUM="najva-custom-link-medium",e.CUSTOM_LINK_SMALL="najva-custom-link-small",e.DISABLED="najva-custom-link-disabled"}(Yi||(Yi={}));let Xi=!1;var Ji=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let Zi=null,Qi=[];function eo(e){return Ji(this,void 0,void 0,(function*(){const t=yield function(){return X(this,void 0,void 0,(function*(){try{const e=(yield pe()).transaction(Y,"readwrite"),t=yield e.store.getAll();yield e.done;const n={};return t.forEach((e=>{n[e.key]=e.value})),n}catch(e){throw u(r.DB_READ_FAILED,{key:"allKeys",objectStoreName:Y,browserErrorMessage:e.message,error:e})}}))}();if(!e||!t)return!1;const n=Object.keys(e);if(0===n.length)return!1;let i=!0;return n.forEach((n=>{(!t[n]||t[n]&&t[n]!==e[n])&&(i=!1)})),i}))}function to(e){return Ji(this,void 0,void 0,(function*(){const t=yield eo(e.tags),n=yield en();return e.allow_unsubscribe&&n&&t}))}function no(e,t){return Ji(this,void 0,void 0,(function*(){t.classList.add(Yi.CUSTOM_LINK),t.classList.add(nt),e&&((yield eo(e.tags))&&t.classList.add(Yi.DISABLED),function(e,t){t===Mi.Button?e.classList.add(Yi.CUSTOM_LINK_BUTTON):e.classList.add(Yi.CUSTOM_LINK_LINK)}(t,e.type),function(e,t){t===ji.Small&&e.classList.add(Yi.CUSTOM_LINK_SMALL),t===ji.Medium?e.classList.add(Yi.CUSTOM_LINK_MEDIUM):e.classList.add(Yi.CUSTOM_LINK_LARGE)}(t,e.size),function(e,t,n,i){n&&(e.style.color=`#${n}`),t===Mi.Button&&(e.style.backgroundColor=`#${i}`)}(t,e.type,e.text_color,e.background_color))}))}function io(e){return Ji(this,void 0,void 0,(function*(){const t=e.container_id,n=document.getElementById(t);if(n&&(!(yield eo(e.tags))||(yield to(e)))){for(;n.lastChild;)n.removeChild(n.lastChild);if(Vi(e.urls.operation,e.urls.matchings)){const t=ft(`<button>${yield function(e){return Ji(this,void 0,void 0,(function*(){let t="";return t=(yield to(e))?e.unsubscribe_text?e.unsubscribe_text:"unsubscribe":e.subscribe_text?e.subscribe_text:"subscribe",t}))}(e)}</button>`);t&&(n.appendChild(t),yield function(e,t){return Ji(this,void 0,void 0,(function*(){(yield to(e))?t.addEventListener("click",(()=>Ji(this,void 0,void 0,(function*(){t.disabled=!0;try{yield function(e){return Ji(this,void 0,void 0,(function*(){e.tags&&(yield Promise.all(Object.keys(e.tags).map((e=>In(e)))))}))}(e),yield io(e),t.disabled=!1}catch(e){t.disabled=!1}})))):t.addEventListener("click",(function(){return Ji(this,void 0,void 0,(function*(){t.disabled=!0;try{yield Qt(),yield function(e){return Ji(this,void 0,void 0,(function*(){if(e.tags&&Object.keys(e.tags).length>0&&(yield En(e.tags),e.welcome_notification_enabled&&Zi)){const{title:t,body:n,icon:i,image:o,url:r,actions:a}=e.welcome_notification,s={title:t,body:n,icon:i,image:o,buttons:JSON.stringify(a.map(((e,t)=>({title:e.title,onclick_action:0,button_id:t,icon_url:"",complete_url:e.url})))),complete_url:r,tag:"",pusher:"",require_interaction:"",light_up_screen:"",notification_id:"",priority:"",url:"",expireTime:"",api_key:"",onclick_action:"",website_id:"",is_report_enabled:"",najva_token:""},{title:c,options:u}=xt(s,"",!1);yield Zi.showNotification(c,u)}}))}(e),e.allow_unsubscribe?yield io(e):this.remove(),t.disabled=!1}catch(e){t.disabled=!1}}))}))}))}(e,t),yield no(e,t))}}}))}function oo(){return Ji(this,void 0,void 0,(function*(){!function(){if(Xi)return;Xi=!0,dt(`\n .${Yi.CUSTOM_LINK_CONTAINER}{\n    display: inline-block;\n  }\n\n.${Yi.CUSTOM_LINK} {\n  cursor: pointer;\n  text-transform: uppercase;\n  font-weight: 600;\n  font-family:inherit;\n  border: unset;\n  background-color: unset;\n  font-family: inherit;\n  color: #${Hi}\n}\n\n\n.${Yi.CUSTOM_LINK}:active,.${Yi.CUSTOM_LINK}:focus  {\n  border: none;\n  outline: none;\n}\n\n.${Yi.CUSTOM_LINK}.${nt} {\n  display: inline-block;\n  transition: all .1s;\n}\n\n.${nt}{\n  font-size: medium;\n  line-height: 1;\n  direction: ltr;\n  text-align: left;\n  text-align: start;\n  font-style: normal;\n  font-weight: 400;\n  text-decoration: none;\n  list-style-type: disc\n}\n\n.${Yi.CUSTOM_LINK_LINK}{\n  cursor: pointer;\n  text-transform: uppercase;\n  font-weight: 600\n}\n\n.${Yi.CUSTOM_LINK_LINK}:hover{\n  text-decoration: underline\n}\n\n.${Yi.CUSTOM_LINK_BUTTON}{\n  text-transform: uppercase;\n    -ms-touch-action: manipulation;\n    touch-action: manipulation;\n    font-weight: 600;\n    border-radius: 4px;\n    box-shadow: 1px 1px 1px grey;\n    cursor: pointer;\n    background-color:#${qi}\n}\n\n.${Yi.CUSTOM_LINK_BUTTON}:hover{\n  text-decoration: none;\n  box-shadow: 2px 3px 4px grey\n}\n\n.${Yi.CUSTOM_LINK}.${Yi.CUSTOM_LINK_BUTTON}.${Yi.CUSTOM_LINK_SMALL}{\n  font-size: 13px;\n  padding: 4px 12px;\n}\n\n.${Yi.CUSTOM_LINK}.${Yi.CUSTOM_LINK_BUTTON}.${Yi.CUSTOM_LINK_MEDIUM}{\n  font-size: 15px;\n  padding: 8px 16px;\n}\n\n.${Yi.CUSTOM_LINK}.${Yi.CUSTOM_LINK_BUTTON}.${Yi.CUSTOM_LINK_LARGE}{\n  font-size: 18px;\n  padding: 12px 20px;\n}\n\n\n.${Yi.CUSTOM_LINK}.${Yi.CUSTOM_LINK_LINK}.${Yi.CUSTOM_LINK_SMALL}{\n  font-size: 13px;\n}\n\n.${Yi.CUSTOM_LINK}.${Yi.CUSTOM_LINK_LINK}.${Yi.CUSTOM_LINK_MEDIUM}{\n  font-size: 15px;\n}\n\n.${Yi.CUSTOM_LINK}.${Yi.CUSTOM_LINK_LINK}.${Yi.CUSTOM_LINK_LARGE}{\n  font-size: 18px;\n}\n\n.${Yi.DISABLED} {\n  opacity: 0.5;\n}\n  `)}(),Qi.forEach((e=>Ji(this,void 0,void 0,(function*(){yield io(e)}))))}))}function ro(e,t){Qi=e,Zi=t,Qi&&0!==Qi.length&&oo()}var ao=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function so(e){return ao(this,void 0,void 0,(function*(){return!(yield Kn())&&(!(e&&!Se().messaging.isSupported())&&!(!e&&!(self?"PushManager"in self&&"Notification"in self&&PushSubscription.prototype.hasOwnProperty("getKey"):navigator.cookieEnabled&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&PushSubscription.prototype.hasOwnProperty("getKey"))))}))}var co=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function uo(e){return co(this,void 0,void 0,(function*(){try{e.website_policy.tag_enabled&&(yield function(e,t){return new Promise(((n,i)=>{const o=document.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.onload=n,o.onerror=i,document[t].appendChild(o)}))}(`https://cdn.yektanet.com/rg_woebegone/scripts_v4/${e.najva_settings.app_id}/complete.js?v=${i()}`,"head"))}catch(t){u(r.LOAD_YEKTANET_ANALYTICS_SCRIPT_FAILED,{appId:(null==e?void 0:e.najva_settings.app_id)||"failed to load config --\x3e appId: -",error:t})}}))}const lo="email";var fo;!function(e){e.Email="email",e.Phone="phone",e.Attribute="attribute",e.WebsiteVisitCount="website-visit-count",e.LastCookieSet="last-cookie-set",e.LastTimeCookieMatched="last-time-cookie-matched",e.LastShownTime="last-shown-time"}(fo||(fo={}));var po=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let ho;function vo(){return po(this,void 0,void 0,(function*(){return ho||(ho=yield A("najva-email-subscription-database",1,{upgrade(e){e.createObjectStore(lo,{keyPath:"name"})}})),ho}))}function _o(e){return po(this,void 0,void 0,(function*(){try{const t=(yield vo()).transaction(lo,"readwrite"),n=yield t.store.get(e);return yield t.done,n?n.value:n}catch(t){throw u(r.DB_READ_FAILED,{key:e,objectStoreName:lo,browserErrorMessage:t.message,error:t})}}))}function mo(e){return po(this,void 0,void 0,(function*(){try{const t=(yield vo()).transaction(lo,"readwrite");(yield t.store.get(e.name))?yield t.store.put(e):yield t.store.add(e),yield t.done}catch(t){throw u(r.DB_UPDATE_FAILED,{key:e.name,value:e.value,objectStoreName:lo,browserErrorMessage:t.message,error:t})}}))}var bo;function go(){window.dispatchEvent(new CustomEvent("najva-email-subscription-end"))}!function(e){e[e.close=0]="close",e[e.success=1]="success",e[e.fail=2]="fail"}(bo||(bo={}));var yo=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};const wo="najva-email-cookie_matching_pixel";function Eo(){return yo(this,void 0,void 0,(function*(){if(!document.querySelector(`#${wo}`)){const e=ft(`\n      <img \n        id="${wo}" \n        alt="${wo}" \n        style="display: none!important;" \n        src="https://ua.yektanet.com/pixel?id=njv-email"\n      />\n    `);e&&document.body.appendChild(e),yield mo({name:fo.LastTimeCookieMatched,value:(new Date).toISOString()})}}))}function To(){return yo(this,void 0,void 0,(function*(){if(!(yield function(){return yo(this,void 0,void 0,(function*(){const e=yield _o(fo.LastTimeCookieMatched);return!!e&&pt((new Date).getTime(),new Date(e).getTime())<30}))}())){Math.floor(100*Math.random())<10&&(yield Eo())}!function(e){window.addEventListener("najva-email-subscription-end",e)}((()=>yo(this,void 0,void 0,(function*(){yield Eo()}))))}))}var Io=n(3379),So=n.n(Io),ko=n(449),No={insert:"head",singleton:!1};So()(ko.Z,No);ko.Z.locals;var Oo=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};let Ao=!1;function Do(t){function n(n){return Oo(this,void 0,void 0,(function*(){Ao=!0;try{if(!n||"object"!=typeof n||0===Object.keys(n).length)throw new Error(`Unexpected input: ${n}`);Object.keys(n).forEach((e=>{if(e!==fo.Email&&e!==fo.Phone&&e!==fo.Attribute)throw new Error(`Unexpected field name: ${e}. Please provide a valid field name: ${fo.Email} | ${fo.Phone} | ${fo.Attribute}`);const t=n[e];if(!t)throw new Error(`Unexpected value for field: ${e}. ${p.required.en}`);if(e!==fo.Attribute&&!function(e,t){switch(e){case f.email:return/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+$/.test(l(t));case f.phone:return/^(0|\+98|0098)?9\d{9}$/.test(l(t));case f.required:return Boolean(t);default:throw new Error(`please provide a valide validationType: ${Object.keys(p).map((e=>e)).join(" | ")}`)}}(f[e],t.toString()))throw new Error(`Unexpected field value. ${p[e].en}`)}));(yield Object.keys(n).reduce(((e,t)=>Oo(this,void 0,void 0,(function*(){const i=yield e;if(!i){const e=yield _o(t);return t!==fo.Attribute?Promise.resolve(i||n[t]!==e):Promise.resolve(i||JSON.stringify(n[t])!==JSON.stringify(e))}return e}))),Promise.resolve(!1)))&&(yield e(`https://email.najva.com/v1/user-management/emails/identify/${t.najva_settings.account_id}/`,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"},credentials:"include"}).then((()=>Promise.all([...Object.keys(n).map((e=>{const t=n[e];return t&&e!==fo.Attribute?mo({name:e,value:t.toString()}):t&&"string"!=typeof t?mo({name:fo.Attribute,value:t}):Promise.resolve()})),mo({name:fo.LastCookieSet,value:(new Date).toISOString()})]))).then(go).catch((e=>{throw u(r.IDENTIFY_EMAIL_SUBSCRIBER_FAILED,{error:e})}))),Ao=!1}catch(e){throw Ao=!1,u(r.ADD_EMAIL_SUBSCRIBER_IDENTIFIER_FAILED,{error:e})}}))}return window.dispatchEvent(new CustomEvent("najva-subscriber-identify",{detail:n})),window.Najva=Object.assign(Object.assign({},window.Najva),{identifyEmailSubscriber:n}),n}let Po=null,Lo=null;function xo(){Po&&(Po.style.display="none"),Lo&&(Lo.style.display="none")}const Co="https://van.najva.com";function jo(e){return Oo(this,void 0,void 0,(function*(){try{if(yield function(){return Oo(this,void 0,void 0,(function*(){let e=yield _o(fo.WebsiteVisitCount);e||(e=0),e=parseInt(e.toString(),10),yield mo({name:fo.WebsiteVisitCount,value:e+1})}))}(),yield function(e){return Oo(this,void 0,void 0,(function*(){const t=yield e.email_settings.fields.reduce(((e,t)=>Oo(this,void 0,void 0,(function*(){const n=yield e;if(t.key===fo.Email){const e=yield _o(fo.Email);return Promise.resolve(Boolean(e)&&n)}if(t.key===fo.Phone){const e=yield _o(fo.Phone);return Promise.resolve(Boolean(e)&&n)}return e}))),Promise.resolve(!0)),n=yield _o(fo.LastShownTime),i=n?pt((new Date).getTime(),new Date(n).getTime()):0;return!(!e.website_policy.email_enabled||Ao||t||e.email_settings.affected_urls&&!Vi(e.email_settings.affected_urls.operation,e.email_settings.affected_urls.url_matchings)||n&&!(i>(e.email_settings.show_interval||e.najva_settings.dismiss_cookie_days)))}))}(e)){const t=yield _o(fo.WebsiteVisitCount);yield zt(e.email_settings.show_condition,t?Number(t):1),yield function(e){return Oo(this,void 0,void 0,(function*(){let t="",n="";try{n=(yield _o(fo.Email))||"",t=(yield _o(fo.Phone))||""}catch(e){}const o=ft(`\n    <iframe \n      title="Najva Email Subscription Form"\n      src="https://van.najva.com/static/cdn/email/email-iframe.html?v=${i()}"\n      name="najva-email"\n    ></iframe>\n  `);if(o.onload=function(){o.contentWindow&&o.contentWindow.postMessage({config:e,phone:t,email:n,shouldValidate:!1},Co)},e.iframe_container?Lo=document.querySelector(e.iframe_container):(Po=ft('<div class="najva-email-backdrop"></div>'),Po.onclick=xo,Lo=ft('<div class="najva-email-container"></div>'),Lo.appendChild(o)),!Lo)throw u(r.FIND_EMAIL_IFRAME_CONTAINER_FAILED,void 0);Lo.appendChild(o),!e.side_img&&!e.background_img||e.iframe_container||Lo.style.setProperty("max-width","700px","important"),Po&&document.body.appendChild(Po),document.body.appendChild(Lo)}))}(e.email_settings),yield mo({name:fo.LastShownTime,value:(new Date).toISOString()}),function(){window.addEventListener("message",(e=>Oo(this,void 0,void 0,(function*(){var t,n;if(e.origin===Co)switch(null===(t=e.data)||void 0===t?void 0:t.action){case bo.close:xo();break;case bo.success:{const t=null===(n=e.data)||void 0===n?void 0:n.submitedData;yield Promise.all([mo({name:fo.LastCookieSet,value:(new Date).toISOString()}),...Object.keys(t).map((e=>{const n=t[e];return n?e!==fo.Attribute?mo({name:e,value:n.toString()}):mo({name:fo.Attribute,value:n}):Promise.resolve()}))]),go();break}case bo.fail:{const{error:t,errorCode:n}=e.data;throw u(n,{error:t})}}}))))}()}e.website_policy.email_enabled&&!Ao&&(yield function(e){return Oo(this,void 0,void 0,(function*(){const t=yield _o(fo.LastCookieSet);if(t&&pt((new Date).getTime(),new Date(t).getTime())>30){const t=Do(e),[n,i,o]=yield Promise.all([_o(fo.Email),_o(fo.Phone),_o(fo.Attribute)]);t({email:n,phone:i,attribute:o||{}})}}))}(e)),yield To()}catch(e){throw u(r.INIT_EMAIL_FAILED,{error:e})}}))}var Mo=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function Ro(e){return Mo(this,void 0,void 0,(function*(){const t=e.najva_settings.native_permission;if(!(yield so(t)))return;yield function(e){return de(this,void 0,void 0,(function*(){fe=e,yield pe();const t=yield ve(_.HasMigrated);"string"==typeof t&&"true"!==t&&(yield ue(fe.website_id,fe.campaign_id))}))}({campaign_id:e.najva_settings.campaign_id,website_id:e.najva_settings.website_id.toString(),messaging_sender_id:e.messaging_sender_id});let n=null;t&&(n=yield _n(e),function(e,t){tt=e,et=t;try{tt.isNativeMode&&(Se().initializeApp({messagingSenderId:e.messaging_sender_id}),Se().messaging().useServiceWorker(et)),window.localStorage.removeItem("najva-reload-counter")}catch(e){throw u(r.FIREBASE_INITIALIZATION_FAILED,{firebaseErrorMessage:e.message,error:e})}}({messaging_sender_id:e.messaging_sender_id,isNativeMode:t},n),Ft({website_id:e.najva_settings.website_id,api_key:e.najva_settings.api_key,isNativeMode:t},n),Li({show_backdrop:e.najva_settings.show_backdrop,show_backdrop_mobile:e.najva_settings.show_backdrop_mobile,backdrop_text:e.najva_settings.backdrop_text,website_policy:e.website_policy})),yield function(e){return mn(this,void 0,void 0,(function*(){bn=e,(yield en())&&gn()}))}({website_id:e.najva_settings.website_id.toString(),campaign_id:e.najva_settings.campaign_id.toString(),api_key:e.najva_settings.api_key}),yield function(e){return Jt(this,void 0,void 0,(function*(){Zt=e,Zt.isNativeMode?yield Xt({website_id:Zt.website_id,api_key:Zt.api_key,without_popup:Zt.without_popup,request_permission:Zt.request_permission}):yield mt({website_id:Zt.website_id,api_key:Zt.api_key,najva_subdomain:Zt.najva_subdomain})}))}({website_id:e.najva_settings.website_id.toString(),campaign_id:e.najva_settings.campaign_id,api_key:e.najva_settings.api_key,najva_subdomain:e.najva_settings.najva_subdomain,without_popup:e.najva_settings.without_popup,request_permission:e.najva_settings.request_permission,isNativeMode:t}),lt({extra_css:e.najva_settings.extra_css}),rn({najva_subdomain:e.najva_settings.najva_subdomain}),yield pn({location_permission:e.najva_settings.location_permission,najva_subdomain:e.najva_settings.najva_subdomain,isNativeMode:t}),function(e){wn=e}({website_id:e.najva_settings.website_id}),di({show_bell:e.najva_settings.show_bell,show_bell_in_mobile:e.najva_settings.show_bell_in_mobile,bell_direction:e.najva_settings.bell_direction,tooltip_direction:e.najva_settings.tooltip_direction,bell_color_hover:e.najva_settings.bell_color_hover,bell_color:e.najva_settings.bell_color,bell_tooltip:e.najva_settings.bell_tooltip,without_popup:e.najva_settings.without_popup,isNativeMode:t}),ro(e.custom_links?e.custom_links:[],n),function(e){Gn(this,void 0,void 0,(function*(){if(Vn=e,yield Jn()){const e=yield ve(_.VisitCount);yield zt(Vn.request_permission,e?Number(e):1),yield Xn()}}))}({request_icon:e.najva_settings.request_icon,request_text:e.najva_settings.request_text,request_description:e.najva_settings.request_description,denied_text:e.najva_settings.denied_text,accept_text:e.najva_settings.accept_text,without_popup:e.najva_settings.without_popup,with_popup:e.najva_settings.with_popup,dismiss_cookie_days:e.najva_settings.dismiss_cookie_days,request_permission:e.najva_settings.request_permission,isNativeMode:t})}))}!function(){Mo(this,void 0,void 0,(function*(){const e=yield function(){return be(this,void 0,void 0,(function*(){return ge=yield ye(),ge}))}();Do(e),jo(e).catch(console.error),uo(e).catch(console.error),yield Ro(e);const t={subscribe:Qt,hasSubscribed:en,addAttribute:En,getAttributes:Tn,deleteAttribute:In};window.Najva=Object.assign(Object.assign({},window.Najva),t),window.dispatchEvent(new CustomEvent("najva-execution-end",{bubbles:!0,cancelable:!1}))}))}()})()})();