PageSourceSearch

https://ba-noticia.vercel.app/assets/vendor-supabase-postgrest-js-BP-fwJ-5.js

js ba-noticia.vercel.app collected 2026-10-03 06:09:30 UTC 15,945 bytes, 4 lines download raw bytes

1const $=t=>Math.min(1e3*2**t,3e4),T=[520,503],S=["GET","HEAD","OPTIONS"];var E=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function L(t,e){return new Promise(s=>{if(e!=null&&e.aborted){s();return}const r=setTimeout(()=>{e==null||e.removeEventListener("abort",l),s()},t);function l(){clearTimeout(r),s()}e==null||e.addEventListener("abort",l)})}function x(t,e,s,r){return!(!r||s>=3||!S.includes(t)||!T.includes(e))}var k=class{constructor(t){var e,s,r,l,a;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(s=t.isMaybeSingle)!==null&&s!==void 0?s:!1,this.shouldStripNulls=(r=t.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(l=t.urlLengthLimit)!==null&&l!==void 0?l:8e3,this.retryEnabled=(a=t.retry)!==null&&a!==void 0?a:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var s=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const i=this.headers.get("Accept");i==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!i||i==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let a=(async()=>{let i=0;for(;;){const o=new Headers(s.headers);i>0&&o.set("X-Retry-Count",String(i));let c;try{c=await r(s.url.toString(),{method:s.method,headers:o,body:JSON.stringify(s.body),signal:s.signal})}catch(n){if((n==null?void 0:n.name)==="AbortError"||(n==null?void 0:n.code)==="ABORT_ERR"||!S.includes(s.method))throw n;if(s.retryEnabled&&i<3){const d=$(i);i++,await L(d,s.signal);continue}throw n}if(x(s.method,c.status,i,s.retryEnabled)){var u,h;const n=(u=(h=c.headers)===null||h===void 0?void 0:h.get("Retry-After"))!==null&&u!==void 0?u:null,d=n!==null?Math.max(0,parseInt(n,10)||0)*1e3:$(i);await c.text(),i++,await L(d,s.signal);continue}return await s.processResponse(c)}})();return this.shouldThrowOnError||(a=a.catch(i=>{var u;let h="",o="",c="";const n=i==null?void 0:i.cause;if(n){var d,p,f,P;const R=(d=n==null?void 0:n.message)!==null&&d!==void 0?d:"",w=(p=n==null?void 0:n.code)!==null&&p!==void 0?p:"";h=`${(f=i==null?void 0:i.name)!==null&&f!==void 0?f:"FetchError"}: ${i==null?void 0:i.message}`,h+=`
2
3Caused by: ${(P=n==null?void 0:n.name)!==null&&P!==void 0?P:"Error"}: ${R}`,w&&(h+=` (${w})`),n!=null&&n.stack&&(h+=`
4${n.stack}`)}else{var b;h=(b=i==null?void 0:i.stack)!==null&&b!==void 0?b:""}const g=this.url.toString().length;return(i==null?void 0:i.name)==="AbortError"||(i==null?void 0:i.code)==="ABORT_ERR"?(c="",o="Request was aborted (timeout or manual cancellation)",g>this.urlLengthLimit&&(o+=`. Note: Your request URL is ${g} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((n==null?void 0:n.name)==="HeadersOverflowError"||(n==null?void 0:n.code)==="UND_ERR_HEADERS_OVERFLOW")&&(c="",o="HTTP headers exceeded server limits (typically 16KB)",g>this.urlLengthLimit&&(o+=`. Your request URL is ${g} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(u=i==null?void 0:i.name)!==null&&u!==void 0?u:"FetchError"}: ${i==null?void 0:i.message}`,details:h,hint:o,code:c},data:null,count:null,status:0,statusText:""}}
4)),a.then(t,e)}async processResponse(t){var e=this;let s=null,r=null,l=null,a=t.status,i=t.statusText;if(t.ok){var u,h;if(e.method!=="HEAD"){var o;const d=await t.text();d===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((o=e.headers.get("Accept"))===null||o===void 0)&&o.includes("application/vnd.pgrst.plan+text"))?r=d:r=JSON.parse(d))}const c=(u=e.headers.get("Prefer"))===null||u===void 0?void 0:u.match(/count=(exact|planned|estimated)/),n=(h=t.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");c&&n&&n.length>1&&(l=parseInt(n[1])),e.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(s={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,l=null,a=406,i="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const c=await t.text();try{s=JSON.parse(c),Array.isArray(s)&&t.status===404&&(r=[],s=null,a=200,i="OK")}catch{t.status===404&&c===""?(a=204,i="No Content"):s={message:c}}if(s&&e.shouldThrowOnError)throw new E(s)}return{success:s===null,error:s,data:r,count:l,status:a,statusText:i}}returns(){return this}overrideTypes(){return this}},H=class extends k{select(t){let e=!1;const s=(t??"*").split("").map(r=>/\s/.test(r)&&!e?"":(r==='"'&&(e=!e),r)).join("");return this.url.searchParams.set("select",s),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:s,foreignTable:r,referencedTable:l=r}={}){const a=l?`${l}.order`:"order",i=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${i?`${i},`:""}${t}.${e?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:s=e}={}){const r=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(r,`${t}`),this}range(t,e,{foreignTable:s,referencedTable:r=s}={}){const l=typeof r>"u"?"offset":`${r}.offset`,a=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(l,`${t}`),this.url.searchParams.set(a,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:s=!1,buffers:r=!1,wal:l=!1,format:a="text"}={}){var i;
4const u=[t?"analyze":null,e?"verbose":null,s?"settings":null,r?"buffers":null,l?"wal":null].filter(Boolean).join("|"),h=(i=this.headers.get("Accept"))!==null&&i!==void 0?i:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${a}; for="${h}"; options=${u};`),a==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const A=new RegExp("[,()]");var m=class extends H{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const s=Array.from(new Set(e)).map(r=>typeof r=="string"&&A.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`in.(${s})`),this}notIn(t,e){const s=Array.from(new Set(e)).map(r=>typeof r=="string"&&A.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`not.in.(${s})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:s,type:r}={}){let l="";r==="plain"?l="pl":r==="phrase"?l="ph":r==="websearch"&&(l="w");const a=s===void 0?"":`(${s})`;return this.url.searchParams.append(t,`${l}fts${a}.${e}`),this}match(t){return Object.entries(t).filter(([e,s])=>s!==void 0).forEach(([e,s])=>{this.url.searchParams.append(e,`eq.${s}`)}),this}not(t,e,s){return this.url.searchParams.append(t,`not.${e}.${s}`),this}or(t,{foreignTable:e,referencedTable:s=e}={}){const r=s?`${s}.or`:"or";return this.url.searchParams.append(r,`(${t})`),this}filter(t,e,s){return this.url.searchParams.append(t,`${e}.${s}`),this}},D=class{constructor(t,{headers:e={},schema:s,fetch:r,urlLengthLimit:l=8e3,retry:a}){this.url=t,this.headers=new Headers(e),this.schema=s,this.fetch=r,this.urlLengthLimit=l,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:s=!1,count:r}=e??{},l=s?"HEAD":"GET";let a=!1;const i=(t??"*").split("").map(o=>/\s/.test(o)&&!a?"":(o==='"'&&(a=!a),o)).join(""),{url:u,headers:h}=this.cloneRequestState();return u.searchParams.set("select",i),r&&h.append("Prefer",`count=${r}`),new m({method:l,url:u,headers:h,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:s=!0}={}){var r;const l="POST",{url:a,headers:i}=this.cloneRequestState();if(e&&i.append("Prefer",`count=${e}`),s||i.append("Prefer","missing=default"),Array.isArray(t)){const u=t.reduce((h,o)=>h.concat(Object.keys(o)),[]);if(u.length>0){const h=[...new Set(u)].map(o=>`"${o}"`);a.searchParams.set("columns",h.join(","))}}return new m({method:l,url:a,headers:i,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:s=!1,count:r,defaultToNull:l=!0}={}){var a;const i="POST",{url:u,headers:h}=this.cloneRequestState();if(h.append("Prefer",`resolution=${s?"ignore":"merge"}-duplicates`),e!==void 0&&u.searchParams.set("on_conflict",e),r&&h.append("Prefer",`count=${r}`),l||h.append("Prefer","missing=default"),Array.isArray(t)){const o=t.reduce((c,n)=>c.concat(Object.keys(n)),[]);if(o.length>0){const c=[...new Set(o)].map(n=>`"${n}"`);u.searchParams.set("columns",c.join(","))}}return new m({method:i,url:u,headers:h,schema:this.schema,body:t,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var s;const r="PATCH",{url:l,headers:a}=this.cloneRequestState();return e&&a.append("Prefer",`count=${e}`),new m({method:r,url:l,headers:a,schema:this.schema,body:t,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const s="DELETE",{url:r,headers:l}=this.cloneRequestState();return t&&l.append("Prefer",`count=${t}`),new m({method:s,url:r,headers:l,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function y(t){"@babel/helpers - typeof";return y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(t)}function N(t,e){if(y(t)!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var r=s.call(t,e);if(y(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function q(t){var e=N(t,"string");return y(e)=="symbol"?e:e+""}function C(t,e,s){return(e=q(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function O(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),s.push.apply(s,r)}return s}function v(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?arguments[e]:{};
4e%2?O(Object(s),!0).forEach(function(r){C(t,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):O(Object(s)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(s,r))})}return t}var _=class j{constructor(e,{headers:s={},schema:r,fetch:l,timeout:a,urlLengthLimit:i=8e3,retry:u}={}){this.url=e,this.headers=new Headers(s),this.schemaName=r,this.urlLengthLimit=i;const h=l??globalThis.fetch;a!==void 0&&a>0?this.fetch=(o,c)=>{const n=new AbortController,d=setTimeout(()=>n.abort(),a),p=c==null?void 0:c.signal;if(p){if(p.aborted)return clearTimeout(d),h(o,c);const f=()=>{clearTimeout(d),n.abort()};return p.addEventListener("abort",f,{once:!0}),h(o,v(v({},c),{},{signal:n.signal})).finally(()=>{clearTimeout(d),p.removeEventListener("abort",f)})}return h(o,v(v({},c),{},{signal:n.signal})).finally(()=>clearTimeout(d))}:this.fetch=h,this.retry=u}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new D(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new j(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,s={},{head:r=!1,get:l=!1,count:a}={}){var i;let u;const h=new URL(`${this.url}/rpc/${e}`);let o;const c=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(c)),n=r&&Object.values(s).some(c);n?(u="POST",o=s):r||l?(u=r?"HEAD":"GET",Object.entries(s).filter(([p,f])=>f!==void 0).map(([p,f])=>[p,Array.isArray(f)?`{${f.join(",")}}`:`${f}`]).forEach(([p,f])=>{h.searchParams.append(p,f)})):(u="POST",o=s);const d=new Headers(this.headers);return n?d.set("Prefer",a?`count=${a},return=minimal`:"return=minimal"):a&&d.set("Prefer",`count=${a}`),new m({method:u,url:h,headers:d,schema:this.schemaName,body:o,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};export{_ as P};

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.