PageSourceSearch

https://generalcentral.hu/wp-content/plugins/pixfort-core/dist/front/nonce-manager.be55a3729549d626325a.js

js generalcentral.hu collected 2026-10-08 22:51:16 UTC 2,833 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkpixfort_core=self.webpackChunkpixfort_core||[]).push([[6450],{5886(e,t,n){n.d(t,{default:()=>s});const o=new class{constructor(){this.nonces={},this.isLoading=!1,this.loadingPromise=null,this.requestQueue=[],this.ajaxUrl=PIX_JS_OPTIONS.dataAjaxBase}async makeRequest(e){const{action:t,nonceKey:n,data:o={},url:s=this.ajaxUrl,method:r="GET",success:a,error:c,complete:i}=e;try{await this.ensureNoncesLoaded();const e=this.getNonce(n);if(!e)throw new Error(`Nonce not found for key: ${n}`);const c={action:t,nonce:e,...o},h=await this.performAjaxRequest({url:s,method:r,data:c});return a&&"function"==typeof a&&a(h),i&&"function"==typeof i&&i(h),h}catch(e){throw console.error("AJAX request failed:",e),c&&"function"==typeof c&&c(e),i&&"function"==typeof i&&i(null,e),e}}async ensureNoncesLoaded(){if(Object.keys(this.nonces).length>0)return Promise.resolve(this.nonces);if(this.isLoading&&this.loadingPromise)return this.loadingPromise;this.isLoading=!0,this.loadingPromise=this.fetchNonces();try{return await this.loadingPromise,this.nonces}finally{this.isLoading=!1,this.loadingPromise=null}}async fetchNonces(){try{const e=await this.performAjaxRequest({url:this.ajaxUrl,method:"GET",data:{action:"pix_get_nonces"}});if(e&&e.success&&e.data)return this.nonces=e.data,this.cacheNonces(e.data),this.nonces;throw new Error("Invalid nonces response format")}catch(e){throw console.error("Failed to fetch nonces:",e),e}}getNonce(e){return this.nonces[e]||null}cacheNonces(e){try{const t={nonces:e,timestamp:Date.now(),expiry:Date.now()+36e5};sessionStorage.setItem("pixfort_nonces",JSON.stringify(t))}catch(e){console.warn("Failed to cache nonces:",e)}}loadCachedNonces(){try{const e=sessionStorage.getItem("pixfort_nonces");if(!e)return!1;const t=JSON.parse(e);return Date.now()>t.expiry?(sessionStorage.removeItem("pixfort_nonces"),!1):(this.nonces=t.nonces,!0)}catch(e){return console.warn("Failed to load cached nonces:",e),sessionStorage.removeItem("pixfort_nonces"),!1}}performAjaxRequest(e){return new Promise((t,n)=>{if("undefined"!=typeof $&&$.ajax)$.ajax({url:e.url,type:e.method,data:e.data,dataType:"json",success:t,error:(e,t,o)=>{n(new Error(`AJAX Error: ${t} - ${o}`))}});else{const o=new FormData;Object.keys(e.data).forEach(t=>{o.append(t,e.data[t])}),fetch(e.url,{method:e.method,body:o,credentials:"same-origin"}).then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}).then(t).catch(n)}})}clearCache(){this.nonces={};try{sessionStorage.removeItem("pixfort_nonces")}catch(e){console.warn("Failed to clear nonce cache:",e)}}async refreshNonces(){return this.clearCache(),this.ensureNoncesLoaded()}};o.loadCachedNonces(),window.pixAjaxRequest=function(e){return o.makeRequest(e)},window.pixRefreshNonces=function(){return o.refreshNonces()};const s=o}}]);

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