PageSourceSearch

https://reiv.com.au/_nuxt/CHoc2Kwp.js

js reiv.com.au collected 2026-09-24 18:28:44 UTC 9,764 bytes, 1 lines download raw bytes

1import{a6 as _,W as I,aB as R,s as z,v as U,p as D,K as L,at as x,J as k,av as N}from"./HUMTGNfc.js";function A(t){return typeof t=="string"?`'${t}'`:new B().serialize(t)}const B=(function(){class t{#e=new Map;compare(e,r){const i=typeof e,a=typeof r;return i==="string"&&a==="string"?e.localeCompare(r):i==="number"&&a==="number"?e-r:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(r,!0))}serialize(e,r){if(e===null)return"null";switch(typeof e){case"string":return r?e:`'${e}'`;case"bigint":return`${e}n`;case"object":return this.$object(e);case"function":return this.$function(e)}return String(e)}serializeObject(e){const r=Object.prototype.toString.call(e);if(r!=="[object Object]")return this.serializeBuiltInType(r.length<10?`unknown:${r}`:r.slice(8,-1),e);const i=e.constructor,a=i===Object||i===void 0?"":i.name;if(a!==""&&globalThis[a]===i)return this.serializeBuiltInType(a,e);if(typeof e.toJSON=="function"){const o=e.toJSON();return a+(o!==null&&typeof o=="object"?this.$object(o):`(${this.seri
1alize(o)})`)}return this.serializeObjectEntries(a,Object.entries(e))}serializeBuiltInType(e,r){const i=this["$"+e];if(i)return i.call(this,r);if(typeof r?.entries=="function")return this.serializeObjectEntries(e,r.entries());throw new Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,r){const i=Array.from(r).sort((o,s)=>this.compare(o[0],s[0]));let a=`${e}{`;for(let o=0;o<i.length;o++){const[s,u]=i[o];a+=`${this.serialize(s,!0)}:${this.serialize(u)}`,o<i.length-1&&(a+=",")}return a+"}"}$object(e){let r=this.#e.get(e);return r===void 0&&(this.#e.set(e,`#${this.#e.size}`),r=this.serializeObject(e),this.#e.set(e,r)),r}$function(e){const r=Function.prototype.toString.call(e);return r.slice(-15)==="[native code] }"?`${e.name||""}()[native]`:`${e.name}(${e.length})${r.replace(/\s*\n\s*/g,"")}`}$Array(e){let r="[";for(let i=0;i<e.length;i++)r+=this.serialize(e[i]),i<e.length-1&&(r+=",");return r+"]"}$Date(e){try{return`Date(${e.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(",")}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((r,i)=>this.compare(r,i)))}`}$Map(e){return this.serializeObjectEntries("Map",e.entries())}}for(const n of["Error","RegExp","URL"])t.prototype["$"+n]=function(e){return`${n}(${e})`};for(const n of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])t.prototype["$"+n]=function(e){return`${n}[${e.join(",")}]`};for(const n of["BigInt64Array","BigUint64Array"])t.prototype["$"+n]=function(e){return`${n}[${e.join("n,")}${e.length>0?"n":""}]`};return t})();function M(t,n){return t===n||A(t)===A(n)}const F=(()=>{const t=function(){};return t.prototype=Object.create(null),t})();function J(t,n){if(typeof t!="string")throw new TypeError("argument str must be a string");const e=new F,r=n||{},i=r.decode||V;let a=0;for(;a<t.length;){const o=t.indexOf("=",a);if(o===-1)break;let s=t.indexOf(";",a);if(s===-1)s=t.length;else if(s<o){a=t.lastIndexOf(";",o-1)+1;continue}const u=t.slice(a,o).trim();if(r?.filter&&!r?.filter(u)){a=s+1;continue}if(e[u]===void 0){let f=t.slice(o+1,s).trim();f.codePointAt(0)===34&&(f=f.slice(1,-1)),e[u]=H(f,i)}a=s+1}return e}function V(t){return t.includes("%")?decodeURIComponent(t):t}function H(t,n){try{return n(t)}catch{return t}}const v=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function T(t,n,e){const r=e||{},i=r.encode||encodeURIComponent;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!v.test(t))throw new TypeError("argument name is invalid");const a=i(n);if(a&&!v.test(a))throw new TypeError("argument val is invalid");let o=t+"="+a;if(r.maxAge!==void 0&&r.maxAge!==null){const s=r.maxAge-0;if(Number.isNaN(s)||!Number.isFinite(s))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+Math.floor(s)}if(r.domain){if(!v.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain="+r.domain}if(r.path){if(!v.test(r.path))throw new TypeError("option path is invalid");o+="; Path="+r.path}if(r.expires){if(!q(r.expires)||Number.isNaN(r.expires.valueOf()))throw new TypeError("option expires is invali
1d");o+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.priority)switch(typeof r.priority=="string"?r.priority.toLowerCase():r.priority){case"low":{o+="; Priority=Low";break}case"medium":{o+="; Priority=Medium";break}case"high":{o+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:{o+="; SameSite=Strict";break}case"lax":{o+="; SameSite=Lax";break}case"strict":{o+="; SameSite=Strict";break}case"none":{o+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o}function q(t){return Object.prototype.toString.call(t)==="[object Date]"||t instanceof Date}function d(t){if(typeof t!="object")return t;var n,e,r=Object.prototype.toString.call(t);if(r==="[object Object]"){if(t.constructor!==Object&&typeof t.constructor=="function"){e=new t.constructor;for(n in t)t.hasOwnProperty(n)&&e[n]!==t[n]&&(e[n]=d(t[n]))}else{e={};for(n in t)n==="__proto__"?Object.defineProperty(e,n,{value:d(t[n]),configurable:!0,enumerable:!0,writable:!0}):e[n]=d(t[n])}return e}if(r==="[object Array]"){for(n=t.length,e=Array(n);n--;)e[n]=d(t[n]);return e}return r==="[object Set]"?(e=new Set,t.forEach(function(i){e.add(d(i))}),e):r==="[object Map]"?(e=new Map,t.forEach(function(i,a){e.set(d(a),d(i))}),e):r==="[object Date]"?new Date(+t):r==="[object RegExp]"?(e=new RegExp(t.source,t.flags),e.lastIndex=t.lastIndex,e):r==="[object DataView]"?new t.constructor(d(t.buffer)):r==="[object ArrayBuffer]"?t.slice(0):r.slice(-6)==="Array]"?new t.constructor(t):t}const K={path:"/",watch:!0,decode:t=>{const n=decodeURIComponent(t),e=z(n);return typeof e=="number"&&(!Number.isFinite(e)||String(e)!==n)?n:e},encode:t=>encodeURIComponent(typeof t=="string"?t:JSON.stringify(t))},$=globalThis.cookieStore;function E(t,n){const e={...K,...n};e.filter??=f=>f===t;const r=O(e)||{};let i;e.maxAge!==void 0?i=e.maxAge*1e3:e.expires&&(i=e.expires.getTime()-Date.now());const a=i!==void 0&&i<=0,o=a||r[t]===void 0||r[t]===null,s=d(a?void 0:r[t]??e.default?.()),u=i&&!a?G(s,i,e.watch&&e.watch!=="shallow"):_(s);{let f=null;try{!$&&typeof BroadcastChannel<"u"&&(f=new BroadcastChannel(`nuxt:cookies:${t}`))}catch{}const m=(h=!1)=>{!h&&(e.readonly||M(u.value,r[t]))||(Y(t,u.value,e),r[t]=d(u.value),f?.postMessage({value:e.encode(u.value)}))},g=h=>{const w=h.refresh?O(e)?.[t]:e.decode(h.value);y=!0,u.value=w,r[t]=d(w),L(()=>{y=!1})};let y=!1;const S=!!U();if(S&&I(()=>{y=!0,m(),f?.close()}),$){const h=w=>{const p=w.changed.find(l=>l.name===t),c=w.deleted.find(l=>l.name===t);p&&g({value:p.value}),c&&g({value:null})};$.addEventListener("change",h),S&&I(()=>$.removeEventListener("change",h))}else f&&(f.onmessage=({data:h})=>g(h));e.watch&&R(u,()=>{y||m()},{deep:e.watch!=="shallow"}),o&&m(o)}return u}function O(t={}){return J(document.cookie,t)}function X(t,n,e={}){return n==null?T(t,n,{...e,maxAge:-1}):T(t,n,e)}function Y(t,n,e={}){document.cookie=X(t,n,e)}const C=2147483647;function G(t,n,e){let r,i,a=0;const o=e?_(t):{value:t};return U()&&I(()=>{i?.(),clearTimeout(r)}),D((s,u)=>{e&&(i=R(o,u));function f(){const g=n-a,y=g<C?g:C;r=setTimeout(()=>{if(a+=y,a<n)return f();o.value=void 0,u()},y)}function m(){a=0,clearTimeout(r),f()}return{get(){return s(),o.value},set(g){m(),o.value=g,u()}}})}let b=!1;function W(){const t=x(),n=N(),e=E("auth",{default:()=>({})}),r=E("user",{default:()=>({})});function i(p=!1,{access_token:c,expires_in:l,refreshed_at:P}=e.value){if(!c||!l)return"none";const j=P+l*1e3;return Date.now()>j?"expired":Date.now()>j-3e5?(p&&f(),"expiring"):"valid"}function a(p=!1){const c=i(p);return c==="valid"||c==="expiring"}function o(){return a(!b)?e.value.id_token:""}function s(){return a(!b)?{...r.value,ProfileImage:localStorage.getItem("ProfileImage")}:{}}async function u(p){try{const c=await fetch(`/api/auth/token/${p}`);if(c.ok){const{data:l}=await c.json();return l&&(e.value=l),l}}catch(c){console.error(c)}}async function f(p=e.value.refresh_token){if(b){console.warn("Token refresh already in progress");return}b=!0;try{const c=await fetch(`/api/auth/refresh/${p}`);
1if(c.ok){const{data:l}=await c.json();return l&&(e.value=l),b=!1,l}}catch(c){console.error(c),b=!1}}async function m(p=e.value.access_token){try{const c=await fetch(`/api/auth/userinfo/${p}`);if(c.ok){const l=await c.json();return r.value={...l,ProfileImage:null},l.ProfileImage&&localStorage.setItem("ProfileImage",l.ProfileImage),l}}catch(c){console.error(c)}}function g(){localStorage.setItem("returnPath",t.fullPath);const p=new URLSearchParams({scope:"openid profile",response_type:"code",client_id:n.public.SSO_CLIENT_ID,redirect_uri:`${n.public.SITE_URL}/auth`});k(`${n.public.SSO_URL}/openid/authenticate?${p.toString()}`,{external:!0})}function y(){const p=new URLSearchParams({id_token_hint:e.value.id_token,post_logout_redirect_uri:`${n.public.SITE_URL}/auth`,state:"signed_out"});k(`${n.public.SSO_URL}/openid/signout?${p.toString()}`,{external:!0})}function S(){const p=new URLSearchParams({post_logout_redirect_uri:`${n.public.SITE_URL}/auth`});k(`https://members.reiv.com.au/Portal/logout.aspx?${p.toString()}`,{external:!0})}function h(){localStorage.setItem("returnPath",t.fullPath),S()}function w(){e.value={},r.value={}}return{isSignedIn:a,getAccessTokenStatus:i,getIdToken:o,getUserInfo:s,fetchTokens:u,refreshTokens:f,fetchUserInfo:m,signIn:g,signOutDirect:y,signOutViaRise:S,signOut:h,clearTokensAndUser:w}}export{E as a,W as u};

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.