Files
service-finder/frontend_admin/.output/public/_nuxt/BoAo7BJa.js
2026-06-24 11:29:45 +00:00

2 lines
7.4 KiB
JavaScript

import{x as k,a2 as O,a3 as z,a4 as C,a5 as w,a6 as I,a7 as D}from"./C3Ck-LNv.js";function v(t){return typeof t=="string"?`'${t}'`:new R().serialize(t)}const R=(function(){class t{#e=new Map;compare(e,r){const o=typeof e,a=typeof r;return o==="string"&&a==="string"?e.localeCompare(r):o==="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 o=e.constructor,a=o===Object||o===void 0?"":o.name;if(a!==""&&globalThis[a]===o)return this.serializeBuiltInType(a,e);if(typeof e.toJSON=="function"){const n=e.toJSON();return a+(n!==null&&typeof n=="object"?this.$object(n):`(${this.serialize(n)})`)}return this.serializeObjectEntries(a,Object.entries(e))}serializeBuiltInType(e,r){const o=this["$"+e];if(o)return o.call(this,r);if(typeof r?.entries=="function")return this.serializeObjectEntries(e,r.entries());throw new Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,r){const o=Array.from(r).sort((n,s)=>this.compare(n[0],s[0]));let a=`${e}{`;for(let n=0;n<o.length;n++){const[s,c]=o[n];a+=`${this.serialize(s,!0)}:${this.serialize(c)}`,n<o.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 o=0;o<e.length;o++)r+=this.serialize(e[o]),o<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,o)=>this.compare(r,o)))}`}$Map(e){return this.serializeObjectEntries("Map",e.entries())}}for(const i of["Error","RegExp","URL"])t.prototype["$"+i]=function(e){return`${i}(${e})`};for(const i of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])t.prototype["$"+i]=function(e){return`${i}[${e.join(",")}]`};for(const i of["BigInt64Array","BigUint64Array"])t.prototype["$"+i]=function(e){return`${i}[${e.join("n,")}${e.length>0?"n":""}]`};return t})();function N(t,i){return t===i||v(t)===v(i)}const U=(()=>{const t=function(){};return t.prototype=Object.create(null),t})();function x(t,i){if(typeof t!="string")throw new TypeError("argument str must be a string");const e=new U,r=i||{},o=r.decode||M;let a=0;for(;a<t.length;){const n=t.indexOf("=",a);if(n===-1)break;let s=t.indexOf(";",a);if(s===-1)s=t.length;else if(s<n){a=t.lastIndexOf(";",n-1)+1;continue}const c=t.slice(a,n).trim();if(r?.filter&&!r?.filter(c)){a=s+1;continue}if(e[c]===void 0){let u=t.slice(n+1,s).trim();u.codePointAt(0)===34&&(u=u.slice(1,-1)),e[c]=B(u,o)}a=s+1}return e}function M(t){return t.includes("%")?decodeURIComponent(t):t}function B(t,i){try{return i(t)}catch{return t}}const g=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function j(t,i,e){const r=e||{},o=r.encode||encodeURIComponent;if(typeof o!="function")throw new TypeError("option encode is invalid");if(!g.test(t))throw new TypeError("argument name is invalid");const a=o(i);if(a&&!g.test(a))throw new TypeError("argument val is invalid");let n=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");n+="; Max-Age="+Math.floor(s)}if(r.domain){if(!g.test(r.domain))throw new TypeError("option domain is invalid");n+="; Domain="+r.domain}if(r.path){if(!g.test(r.path))throw new TypeError("option path is invalid");n+="; Path="+r.path}if(r.expires){if(!L(r.expires)||Number.isNaN(r.expires.valueOf()))throw new TypeError("option expires is invalid");n+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(n+="; HttpOnly"),r.secure&&(n+="; Secure"),r.priority)switch(typeof r.priority=="string"?r.priority.toLowerCase():r.priority){case"low":{n+="; Priority=Low";break}case"medium":{n+="; Priority=Medium";break}case"high":{n+="; 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:{n+="; SameSite=Strict";break}case"lax":{n+="; SameSite=Lax";break}case"strict":{n+="; SameSite=Strict";break}case"none":{n+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(n+="; Partitioned"),n}function L(t){return Object.prototype.toString.call(t)==="[object Date]"||t instanceof Date}function l(t){if(typeof t!="object")return t;var i,e,r=Object.prototype.toString.call(t);if(r==="[object Object]"){if(t.constructor!==Object&&typeof t.constructor=="function"){e=new t.constructor;for(i in t)t.hasOwnProperty(i)&&e[i]!==t[i]&&(e[i]=l(t[i]))}else{e={};for(i in t)i==="__proto__"?Object.defineProperty(e,i,{value:l(t[i]),configurable:!0,enumerable:!0,writable:!0}):e[i]=l(t[i])}return e}if(r==="[object Array]"){for(i=t.length,e=Array(i);i--;)e[i]=l(t[i]);return e}return r==="[object Set]"?(e=new Set,t.forEach(function(o){e.add(l(o))}),e):r==="[object Map]"?(e=new Map,t.forEach(function(o,a){e.set(l(a),l(o))}),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(l(t.buffer)):r==="[object ArrayBuffer]"?t.slice(0):r.slice(-6)==="Array]"?new t.constructor(t):t}const P={path:"/",watch:!0,decode:t=>{const i=decodeURIComponent(t),e=z(i);return typeof e=="number"&&(!Number.isFinite(e)||String(e)!==i)?i:e},encode:t=>encodeURIComponent(typeof t=="string"?t:JSON.stringify(t))},m=globalThis.cookieStore;function V(t,i){const e={...P,...i};e.filter??=u=>u===t;const r=A(e)||{};let o;e.maxAge!==void 0?o=e.maxAge*1e3:e.expires&&(o=e.expires.getTime()-Date.now());const a=o!==void 0&&o<=0,n=a||r[t]===void 0||r[t]===null,s=l(a?void 0:r[t]??e.default?.()),c=o&&!a?H(s,o,e.watch&&e.watch!=="shallow"):k(s);{let u=null;try{!m&&typeof BroadcastChannel<"u"&&(u=new BroadcastChannel(`nuxt:cookies:${t}`))}catch{}const h=(f=!1)=>{!f&&(e.readonly||N(c.value,r[t]))||(_(t,c.value,e),r[t]=l(c.value),u?.postMessage({value:e.encode(c.value)}))},p=f=>{const y=f.refresh?A(e)?.[t]:e.decode(f.value);d=!0,c.value=y,r[t]=l(y),D(()=>{d=!1})};let d=!1;const $=!!C();if($&&w(()=>{d=!0,h(),u?.close()}),m){const f=y=>{const S=y.changed.find(b=>b.name===t),T=y.deleted.find(b=>b.name===t);S&&p({value:S.value}),T&&p({value:null})};m.addEventListener("change",f),$&&w(()=>m.removeEventListener("change",f))}else u&&(u.onmessage=({data:f})=>p(f));e.watch&&O(c,()=>{d||h()},{deep:e.watch!=="shallow"}),n&&h(n)}return c}function A(t={}){return x(document.cookie,t)}function F(t,i,e={}){return i==null?j(t,i,{...e,maxAge:-1}):j(t,i,e)}function _(t,i,e={}){document.cookie=F(t,i,e)}const E=2147483647;function H(t,i,e){let r,o,a=0;const n=e?k(t):{value:t};return C()&&w(()=>{o?.(),clearTimeout(r)}),I((s,c)=>{e&&(o=O(n,c));function u(){const p=i-a,d=p<E?p:E;r=setTimeout(()=>{if(a+=d,a<i)return u();n.value=void 0,c()},d)}function h(){a=0,clearTimeout(r),u()}return{get(){return s(),n.value},set(p){h(),n.value=p,c()}}})}export{V as u};