PageSourceSearch

https://energia-luce.it/_next/static/chunks/commons-539f4601-c021bb6707cf3e01.js

js energia-luce.it collected 2026-10-03 23:17:45 UTC 51,555 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="61b368fc-2cd3-4c92-be9f-a8af1b1d8b80",e._sentryDebugIdIdentifier="sentry-dbid-61b368fc-2cd3-4c92-be9f-a8af1b1d8b80")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5314],{167:(e,t,n)=>{n.d(t,{nd:()=>u});var i=n(10300),r=n(63465),s=n(11747);class a extends s.p{static [i.i]="PgIntegerBuilder";constructor(e){super(e,"number","PgInteger")}build(e){return new l(e,this.config)}}class l extends r.Kl{static [i.i]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(e){return"string"==typeof e?Number.parseInt(e):e}}function u(e){return new a(e??"")}},2932:(e,t,n)=>{n.d(t,{tO:()=>l,yf:()=>u});var i=n(10300),r=n(29528),s=n(63465);class a extends s.pe{static [i.i]="PgVarcharBuilder";constructor(e,t){super(e,"string","PgVarchar"),this.config.length=t.length,this.config.enumValues=t.enum}build(e){return new l(e,this.config)}}class l extends s.Kl{static [i.i]="PgVarchar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return void 0===this.length?"varchar":`varchar(${this.length})`}}function u(e,t={}){let{name:n,config:i}=(0,r.Ll)(e,t);return new a(n,i)}},3141:(e,t,n)=>{n.d(t,{V:()=>r});var i=n(10300);class r{constructor(e,t){this.table=e,this.config=t,this.name=t.name,this.keyAsName=t.keyAsName,this.notNull=t.notNull,this.default=t.default,this.defaultFn=t.defaultFn,this.onUpdateFn=t.onUpdateFn,this.hasDefault=t.hasDefault,this.primary=t.primaryKey,this.isUnique=t.isUnique,this.uniqueName=t.uniqueName,this.uniqueType=t.uniqueType,this.dataType=t.dataType,this.columnType=t.columnType,this.generated=t.generated,this.generatedIdentity=t.generatedIdentity}static [i.i]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return void 0!==this.config.generated&&"byDefault"!==this.config.generated.type}}},4552:(e,t,n)=>{n.d(t,{Qq:()=>u});var i=n(10300),r=n(29528),s=n(63465);class a extends s.pe{static [i.i]="PgTextBuilder";constructor(e,t){super(e,"string","PgText"),this.config.enumValues=t.enum}build(e){return new l(e,this.config)}}class l extends s.Kl{static [i.i]="PgText";enumValues=this.config.enumValues;getSQLType(){return"text"}}function u(e,t={}){let{name:n,config:i}=(0,r.Ll)(e,t);return new a(n,i)}},5171:(e,t,n)=>{n.d(t,{p6:()=>d});var i=n(10300),r=n(29528),s=n(63465),a=n(31066);class l extends a.u{static [i.i]="PgDateBuilder";constructor(e){super(e,"date","PgDate")}build(e){return new u(e,this.config)}}class u extends s.Kl{static [i.i]="PgDate";getSQLType(){return"date"}mapFromDriverValue(e){return new Date(e)}mapToDriverValue(e){return e.toISOString()}}class o extends a.u{static [i.i]="PgDateStringBuilder";constructor(e){super(e,"string","PgDateString")}build(e){return new c(e,this.config)}}class c extends s.Kl{static [i.i]="PgDateString";
1getSQLType(){return"date"}}function d(e,t){let{name:n,config:i}=(0,r.Ll)(e,t);return i?.mode==="date"?new l(n):new o(n)}},6525:(e,t,n)=>{n.d(t,{zM:()=>l});var i=n(10300),r=n(63465);class s extends r.pe{static [i.i]="PgBooleanBuilder";constructor(e){super(e,"boolean","PgBoolean")}build(e){return new a(e,this.config)}}class a extends r.Kl{static [i.i]="PgBoolean";getSQLType(){return"boolean"}}function l(e){return new s(e??"")}},10300:(e,t,n)=>{n.d(t,{i:()=>i,is:()=>r});let i=Symbol.for("drizzle:entityKind");function r(e,t){if(!e||"object"!=typeof e)return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,i))throw Error(`Class "${t.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let n=Object.getPrototypeOf(e).constructor;if(n)for(;n;){if(i in n&&n[i]===t[i])return!0;n=Object.getPrototypeOf(n)}return!1}Symbol.for("drizzle:hasOwnEntityKind")},11747:(e,t,n)=>{n.d(t,{p:()=>s});var i=n(10300),r=n(63465);class s extends r.pe{static [i.i]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity(e){if(e){let{name:t,...n}=e;this.config.generatedIdentity={type:"always",sequenceName:t,sequenceOptions:n}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(e){if(e){let{name:t,...n}=e;this.config.generatedIdentity={type:"byDefault",sequenceName:t,sequenceOptions:n}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}}},12233:(e,t,n)=>{n.d(t,{Fx:()=>l});var i=n(10300),r=n(63465);class s extends r.pe{static [i.i]="PgJsonbBuilder";constructor(e){super(e,"json","PgJsonb")}build(e){return new a(e,this.config)}}class a extends r.Kl{static [i.i]="PgJsonb";constructor(e,t){super(e,t)}getSQLType(){return"jsonb"}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}}function l(e){return new s(e??"")}},17775:(e,t,n)=>{n.r(t),n.d(t,{DocumentPosition:()=>i,append:()=>v,appendChild:()=>S,compareDocumentPosition:()=>$,existsOne:()=>function e(t,n){return(Array.isArray(n)?n:[n]).some(n=>(0,r.dz)(n)&&t(n)||(0,r.Go)(n)&&e(t,n.children))},filter:()=>T,find:()=>D,findAll:()=>L,findOne:()=>C,findOneChild:()=>N,getAttributeValue:()=>m,getChildren:()=>c,getElementById:()=>q,getElements:()=>F,getElementsByClassName:()=>A,getElementsByTagName:()=>Q,getElementsByTagType:()=>E,getFeed:()=>U,getInnerHTML:()=>u,getName:()=>f,getOuterHTML:()=>l,getParent:()=>d,getSiblings:()=>h,getText:()=>function e(t){return Array.isArray(t)?t.map(e).join(""):(0,r.dz)(t)?"br"===t.name?"\n":e(t.children):(0,r.yf)(t)?e(t.children):(0,r.KH)(t)?t.data:""},hasAttrib:()=>g,hasChildren:()=>r.Go,innerText:()=>function e(t){return Array.isArray(t)?t.map(e).join(""):(0,r.Go)(t)&&(t.type===a.RJ.Tag||(0,r.yf)(t))?e(t.children):(0,r.KH)(t)?t.data:""},isCDATA:()=>r.yf,isComment:()=>r.Cn,isDocument:()=>r.wz,isTag:()=>r.dz,isText:()=>r.KH,nextElementSibling:()=>p,prepend:()=>P,prependChild:()=>x,prevElementSibling:()=>y,removeElement:()=>b,removeSubsets:()=>K,replaceElement:()=>w,testElement:()=>z,textContent:()=>o,uniqueSort:()=>j});var i,r=n(71181),s=n(14683),a=n(17960);function l(e,t){return(0,s.A)(e,t)}function u(e,t){return(0,r.Go)(e)?e.children.map(e=>l(e,t)).join(""):""}function o(e){return Array.isArray(e)?e.map(o).join(""):(0,r.Go)(e)&&!(0,r.Cn)(e)?o(e.children):(0,r.KH)(e)?e.data:""}function c(e){return(0,r.Go)(e)?e.children:[]}function d(e){return e.parent||null}function h(e){let t=d(e);if(null!=t)return c(t);let n=[e],{prev:i,next:r}=e;for(;null!=i;)n.unshift(i),{prev:i}=i;for(;null!=r;)n.push(r),{next:r}=r;return n}function m(e,t){var n;return null==(n=e.attribs)?void 0:n[t]}function g(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]}function f(e){return e.name}function p(e){let{next:t}=e;for(;null!==t&&!(0,r.dz)(t);)({next:t}=t);return t}function y(e){let{prev:t}=e;for(;null!==t&&!(0,r.dz)(t);)({prev:t}=t);return t}function b(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){let t=e.parent.children,n=t.lastIndexOf(e);n>=0&&t.splice(n,1)}e.next=null,e.prev=null,e.parent=null}function w(e,t){let n=t.prev=e.prev;n&&(n.next=t);let i=t.next=e.next;i&&(i.prev=t);let r=t.parent=e.parent;if(r){let n=r.children;n[n.lastIndexOf(e)]=t,e.parent=null}}function S(e,t){if(b(t),t.next=null,t.parent=e,e.children.push(t)>1){let n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}function v(e,t){b(t);let{parent:n}=e,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=n,i){if(i.prev=t,n){let e=n.children;e.splice(e.lastIndexOf(i),0,t)}}else n&&n.children.push(t)}function x(e,t){if(b(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){let n=e.children[1];n.prev=t,t.next=n}else t.next=null}function P(e,t){b(t);let{parent:n}=e;if(n){let i=n.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}function T(e,t,n=!0,i=1/0){return D(e,Array.isArray(t)?t:[t],n,i)}function D(e,t,n,i){let s=[],a=[Array.isArray(t)?t:[t]],l=[0];for(;;){if(l[0]>=a[0].length){if(1===l.length)return s;a.shift(),l.shift();continue}let t=a[0][l[0]++];if(e(t)&&(s.push(t),--i<=0))return s;n&&(0,r.Go)(t)&&t.children.length>0&&(l.unshift(0),a.unshift(t.children))}}function N(e,t){return t.find(e)}function C(e,t,n=!0){let i=Array.isArray(t)?t:[t];for(let t=0;t<i.length;t++){let s=i[t];if((0,r.dz)(s)&&e(s))return s;if(n&&(0,r.Go)(s)&&s.children.length>0){let t=C(e,s.children,!0);if(t)return t}}return null}function L(e,t){let n=[],i=[Array.isArray(t)?t:[t]],s=[0];for(;;){if(s[0]>=i[0].length){if(1===i.length)return n;i.shift(),s.shift();continue}let t=i[0][s[0]++];(0,r.dz)(t)&&e(t)&&n.push(t),(0,r.Go)(t)&&t.children.length>0&&(s.unshift(0),i.unshift(t.children))}}let I={tag_name:e=>"function"==typeof e?t=>(0,r.dz)(t)&&e(t.name):"*"===e?r.dz:t=>(0,r.dz)(t)&&t.name===e,tag_type:e=>"function"==typeof e?t=>e(t.type):t=>t.type===e,tag_contains:e=>"function"==typeof e?t=>(0,r.KH)(t)&&e(t.data):t=>(0,r.KH)(t)&&t.data===e};function B(e,t){return"function"==typeof t?n=>(0,r.dz)(n)&&t(n.attribs[e]):n=>(0,r.dz)(n)&&n.attribs[e]===t}function V(e,t){return n=>e(n)||t(n)}function O(e){let t=Object.keys(e).map(t=>{let n=e[t];return Object.prototype.hasOwnProperty.call(I,t)?I[t](n):B(t,n)});return 0===t.length?null:t.reduce(V)}function z(e,t){let n=O(e);return!n||n(t)}function F(e,t,n,i=1/0){let r=O(e);return r?T(r,t,n,i):[]}function q(e,t,n=!0){return Array.isArray(t)||(t=[t]),C(B("id",e),t,n)}function Q(e,t,n=!0,i=1/0){return T(I.tag_name(e),t,n,i)}function A(e,t,n=!0,i=1/0){return T(B("class",e),t,n,i)}function E(e,t,n=!0,i=1/0){return T(I.tag_type(e),t,n,i)}function K(e){let t=e.length;for(;--t>=0;){let n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0){e.splice(t,1);continue}for(let i=n.parent;i;i=i.parent)if(e.includes(i)){e.splice(t,1);break}}return e}function $(e,t){let n=[],s=[];if(e===t)return 0;let a=(0,r.Go)(e)?e:e.parent;for(;a;)n.unshift(a),a=a.parent;for(a=(0,r.Go)(t)?t:t.parent;a;)s.unshift(a),a=a.parent;let l=Math.min(n.length,s.length),u=0;for(;u<l&&n[u]===s[u];)u++;if(0===u)return i.DISCONNECTED;let o=n[u-1],c=o.children,d=n[u],h=s[u];return c.indexOf(d)>c.indexOf(h)?o===t?i.FOLLOWING|i.CONTAINED_BY:i.FOLLOWING:o===e?i.PRECEDING|i.CONTAINS:i.PRECEDING}
1function j(e){return(e=e.filter((e,t,n)=>!n.includes(e,t+1))).sort((e,t)=>{let n=$(e,t);return n&i.PRECEDING?-1:n&i.FOLLOWING?1:0}),e}function U(e){let t=M(X,e);return t?"feed"===t.name?function(e){var t;let n=e.children,i={type:"atom",items:Q("entry",n).map(e=>{var t;let{children:n}=e,i={media:G(n)};R(i,"id","id",n),R(i,"title","title",n);let r=null==(t=M("link",n))?void 0:t.attribs.href;r&&(i.link=r);let s=J("summary",n)||J("content",n);s&&(i.description=s);let a=J("updated",n);return a&&(i.pubDate=new Date(a)),i})};R(i,"id","id",n),R(i,"title","title",n);let r=null==(t=M("link",n))?void 0:t.attribs.href;r&&(i.link=r),R(i,"description","subtitle",n);let s=J("updated",n);return s&&(i.updated=new Date(s)),R(i,"author","email",n,!0),i}(t):function(e){var t,n;let i=null!=(n=null==(t=M("channel",e.children))?void 0:t.children)?n:[],r={type:e.name.substr(0,3),id:"",items:Q("item",e.children).map(e=>{let{children:t}=e,n={media:G(t)};R(n,"id","guid",t),R(n,"title","title",t),R(n,"link","link",t),R(n,"description","description",t);let i=J("pubDate",t)||J("dc:date",t);return i&&(n.pubDate=new Date(i)),n})};R(r,"title","title",i),R(r,"link","link",i),R(r,"description","description",i);let s=J("lastBuildDate",i);return s&&(r.updated=new Date(s)),R(r,"author","managingEditor",i,!0),r}(t):null}!function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(i||(i={}));let _=["url","type","lang"],k=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function G(e){return Q("media:content",e).map(e=>{let{attribs:t}=e,n={medium:t.medium,isDefault:!!t.isDefault};for(let e of _)t[e]&&(n[e]=t[e]);for(let e of k)t[e]&&(n[e]=parseInt(t[e],10));return t.expression&&(n.expression=t.expression),n})}function M(e,t){return Q(e,t,!0,1)[0]}function J(e,t,n=!1){return o(Q(e,t,n,1)).trim()}function R(e,t,n,i,r=!1){let s=J(n,i,r);s&&(e[t]=s)}function X(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}},25077:(e,t,n)=>{let i,r;n.d(t,{Xs:()=>p,ll:()=>v});var s=n(10300),a=n(39694);class l{static [s.i]="Subquery";constructor(e,t,n,i=!1){this._={brand:"Subquery",sql:e,selectedFields:t,alias:n,isWith:i}}}class u extends null{static [s.i]=null}var o=n(60067);let c={startActiveSpan:(e,t)=>i?(r||(r=i.trace.getTracer("drizzle-orm","0.41.0")),(0,o.i)((n,i)=>i.startActiveSpan(e,e=>{try{return t(e)}catch(t){throw e.setStatus({code:n.SpanStatusCode.ERROR,message:t instanceof Error?t.message:"Unknown error"}),t}finally{e.end()}}),i,r)):t()},d=Symbol.for("drizzle:ViewBaseConfig");var h=n(3141),m=n(51677);class g{static [s.i]=null}class f{static [s.i]="StringChunk";value;constructor(e){this.value=Array.isArray(e)?e:[e]}getSQL(){return new p([this])}}class p{constructor(e){this.queryChunks=e}static [s.i]="SQL";decoder=b;shouldInlineParams=!1;append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return c.startActiveSpan("drizzle.buildSQL",t=>{let n=this.buildQueryFromSourceParams(this.queryChunks,e);return t?.setAttributes({"drizzle.query.text":n.sql,"drizzle.query.params":JSON.stringify(n.params)}),n})}buildQueryFromSourceParams(e,t){let n=Object.assign({},t,{inlineParams:t.inlineParams||this.shouldInlineParams,paramStartIndex:t.paramStartIndex||{value:0}}),{casing:i,escapeName:r,escapeParam:u,prepareTyping:o,inlineParams:c,paramStartIndex:g}=n;var b=e.map(e=>{if((0,s.is)(e,f))return{sql:e.value.join(""),params:[]};if((0,s.is)(e,y))return{sql:r(e.value),params:[]};if(void 0===e)return{sql:"",params:[]};if(Array.isArray(e)){let t=[new f("(")];for(let[n,i]of e.entries())t.push(i),n<e.length-1&&t.push(new f(", "));return t.push(new f(")")),this.buildQueryFromSourceParams(t,n)}if((0,s.is)(e,p))return this.buildQueryFromSourceParams(e.queryChunks,{...n,inlineParams:c||e.shouldInlineParams});if((0,s.is)(e,m.XI)){let t=e[m.XI.Symbol.Schema],n=e[m.XI.Symbol.Name];return{sql:void 0===t||e[m.HE]?r(n):r(t)+"."+r(n),params:[]}}if((0,s.is)(e,h.V)){let n=i.getColumnCasing(e);if("indexes"===t.invokeSource)return{sql:r(n),params:[]};let s=e.table[m.XI.Symbol.Schema];return{sql:e.table[m.HE]||void 0===s?r(e.table[m.XI.Symbol.Name])+"."+r(n):r(s)+"."+r(e.table[m.XI.Symbol.Name])+"."+r(n),params:[]}}if((0,s.is)(e,T)){let t=e[d].schema,n=e[d].name;return{sql:void 0===t||e[d].isAlias?r(n):r(t)+"."+r(n),params:[]}}if((0,s.is)(e,S)){if((0,s.is)(e.value,x))return{sql:u(g.value++,e),params:[e],typings:["none"]};let t=null===e.value?null:e.encoder.mapToDriverValue(e.value);if((0,s.is)(t,p))return this.buildQueryFromSourceParams([t],n);if(c)return{sql:this.mapInlineParam(t,n),params:[]};let i=["none"];return o&&(i=[o(e.encoder)]),{sql:u(g.value++,t),params:[t],typings:i}}return(0,s.is)(e,x)?{sql:u(g.value++,e),params:[e],typings:["none"]}:(0,s.is)(e,p.Aliased)&&void 0!==e.fieldAlias?{sql:r(e.fieldAlias),params:[]}:(0,s.is)(e,l)?e._.isWith?{sql:r(e._.alias),params:[]}:this.buildQueryFromSourceParams([new f("("),e._.sql,new f(") "),new y(e._.alias)],n):(0,a.BU)(e)?e.schema?{sql:r(e.schema)+"."+r(e.enumName),params:[]}:{sql:r(e.enumName),params:[]}:null!=e&&"function"==typeof e.getSQL?e.shouldOmitSQLParens?.()?this.buildQueryFromSourceParams([e.getSQL()],n):this.buildQueryFromSourceParams([new f("("),e.getSQL(),new f(")")],n):c?{sql:this.mapInlineParam(e,n),params:[]}:{sql:u(g.value++,e),params:[e],typings:["none"]}});let w={sql:"",params:[]};for(let e of b)w.sql+=e.sql,w.params.push(...e.params),e.typings?.length&&(w.typings||(w.typings=[]),w.typings.push(...e.typings));return w}mapInlineParam(e,{escapeString:t}
1){if(null===e)return"null";if("number"==typeof e||"boolean"==typeof e)return e.toString();if("string"==typeof e)return t(e);if("object"==typeof e){let n=e.toString();return"[object Object]"===n?t(JSON.stringify(e)):t(n)}throw Error("Unexpected param value: "+e)}getSQL(){return this}as(e){return void 0===e?this:new p.Aliased(this,e)}mapWith(e){return this.decoder="function"==typeof e?{mapFromDriverValue:e}:e,this}inlineParams(){return this.shouldInlineParams=!0,this}if(e){return e?this:void 0}}class y{constructor(e){this.value=e}static [s.i]="Name";brand;getSQL(){return new p([this])}}let b={mapFromDriverValue:e=>e},w={mapToDriverValue:e=>e};({...b,...w});class S{constructor(e,t=w){this.value=e,this.encoder=t}static [s.i]="Param";brand;getSQL(){return new p([this])}}function v(e,...t){let n=[];for(let[i,r]of((t.length>0||e.length>0&&""!==e[0])&&n.push(new f(e[0])),t.entries()))n.push(r,new f(e[i+1]));return new p(n)}(e=>{e.empty=function(){return new p([])},e.fromList=function(e){return new p(e)},e.raw=function(e){return new p([new f(e)])},e.join=function(e,t){let n=[];for(let[i,r]of e.entries())i>0&&void 0!==t&&n.push(t),n.push(r);return new p(n)},e.identifier=function(e){return new y(e)},e.placeholder=function(e){return new x(e)},e.param=function(e,t){return new S(e,t)}})(v||(v={})),(e=>{class t{constructor(e,t){this.sql=e,this.fieldAlias=t}static [s.i]="SQL.Aliased";isSelectionField=!1;getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})(p||(p={}));class x{constructor(e){this.name=e}static [s.i]="Placeholder";getSQL(){return new p([this])}}let P=Symbol.for("drizzle:IsDrizzleView");class T{static [s.i]="View";[d];[P]=!0;constructor({name:e,schema:t,selectedFields:n,query:i}){this[d]={name:e,originalName:e,schema:t,selectedFields:n,query:i,isExisting:!i,isAlias:!1}}getSQL(){return new p([this])}}h.V.prototype.getSQL=function(){return new p([this])},m.XI.prototype.getSQL=function(){return new p([this])},l.prototype.getSQL=function(){return new p([this])}},29528:(e,t,n)=>{n.d(t,{Ll:()=>s,YD:()=>r});var i=n(51677);function r(e){return e[i.XI.Symbol.Columns]}function s(e,t){return{name:"string"==typeof e&&e.length>0?e:"",config:"object"==typeof e?e:t}}},31066:(e,t,n)=>{n.d(t,{u:()=>a});var i=n(10300),r=n(25077),s=n(63465);class a extends s.pe{static [i.i]="PgDateColumnBaseBuilder";defaultNow(){return this.default((0,r.ll)`now()`)}}},39146:(e,t,n)=>{n.d(t,{cJ:()=>eH});var i=n(10300),r=n(51677),s=n(29528),a=n(63465),l=n(11747);class u extends l.p{static [i.i]="PgBigInt53Builder";constructor(e){super(e,"number","PgBigInt53")}build(e){return new o(e,this.config)}}class o extends a.Kl{static [i.i]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(e){return"number"==typeof e?e:Number(e)}}class c extends l.p{static [i.i]="PgBigInt64Builder";constructor(e){super(e,"bigint","PgBigInt64")}build(e){return new d(e,this.config)}}class d extends a.Kl{static [i.i]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(e){return BigInt(e)}}function h(e,t){let{name:n,config:i}=(0,s.Ll)(e,t);return"number"===i.mode?new u(n):new c(n)}class m extends a.pe{static [i.i]="PgBigSerial53Builder";constructor(e){super(e,"number","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new g(e,this.config)}}class g extends a.Kl{static [i.i]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(e){return"number"==typeof e?e:Number(e)}}class f extends a.pe{static [i.i]="PgBigSerial64Builder";constructor(e){super(e,"bigint","PgBigSerial64"),this.config.hasDefault=!0}build(e){return new p(e,this.config)}}class p extends a.Kl{static [i.i]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(e){return BigInt(e)}}function y(e,t){let{name:n,config:i}=(0,s.Ll)(e,t);return"number"===i.mode?new m(n):new f(n)}var b=n(6525),w=n(63071);class S extends a.pe{static [i.i]="PgCidrBuilder";constructor(e){super(e,"string","PgCidr")}build(e){return new v(e,this.config)}}class v extends a.Kl{static [i.i]="PgCidr";getSQLType(){return"cidr"}}function x(e){return new S(e??"")}class P extends a.pe{static [i.i]="PgCustomColumnBuilder";constructor(e,t,n){super(e,"custom","PgCustomColumn"),this.config.fieldConfig=t,this.config.customTypeParams=n}build(e){return new T(e,this.config)}}class T extends a.Kl{static [i.i]="PgCustomColumn";sqlName;mapTo;mapFrom;constructor(e,t){super(e,t),this.sqlName=t.customTypeParams.dataType(t.fieldConfig),this.mapTo=t.customTypeParams.toDriver,this.mapFrom=t.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue(e){return"function"==typeof this.mapFrom?this.mapFrom(e):e}mapToDriverValue(e){return"function"==typeof this.mapTo?this.mapTo(e):e}}function D(e){return(t,n)=>{let{name:i,config:r}=(0,s.Ll)(t,n);return new P(i,r,e)}}var N=n(5171);class C extends a.pe{static [i.i]="PgDoublePrecisionBuilder";constructor(e){super(e,"number","PgDoublePrecision")}build(e){return new L(e,this.config)}}class L extends a.Kl{static [i.i]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(e){return"string"==typeof e?Number.parseFloat(e):e}}function I(e){return new C(e??"")}var B=n(78701),V=n(167);class O extends a.pe{static [i.i]="PgIntervalBuilder";constructor(e,t){super(e,"string","PgInterval"),this.config.intervalConfig=t}build(e){return new z(e,this.config)}}class z extends a.Kl{static [i.i]="PgInterval";fields=this.config.intervalConfig.fields;precision=this.config.intervalConfig.precision;getSQLType(){let e=this.fields?` ${this.fields}`:"",t=this.precision?`(${this.precision})`:"";return`interval${e}${t}`}}function F(e,t={}){let{name:n,config:i}=(0,s.Ll)(e,t);return new O(n,i)}class q extends a.pe{static [i.i]="PgJsonBuilder";constructor(e){super(e,"json","PgJson")}build(e){return new Q(e,this.config)}}class Q extends a.Kl{static [i.i]="PgJson";constructor(e,t){super(e,t)}getSQLType(){return"json"}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}}function A(e){return new q(e??"")}var E=n(12233);
1class K extends a.pe{static [i.i]="PgLineBuilder";constructor(e){super(e,"array","PgLine")}build(e){return new $(e,this.config)}}class $ extends a.Kl{static [i.i]="PgLine";getSQLType(){return"line"}mapFromDriverValue(e){let[t,n,i]=e.slice(1,-1).split(",");return[Number.parseFloat(t),Number.parseFloat(n),Number.parseFloat(i)]}mapToDriverValue(e){return`{${e[0]},${e[1]},${e[2]}}`}}class j extends a.pe{static [i.i]="PgLineABCBuilder";constructor(e){super(e,"json","PgLineABC")}build(e){return new U(e,this.config)}}class U extends a.Kl{static [i.i]="PgLineABC";getSQLType(){return"line"}mapFromDriverValue(e){let[t,n,i]=e.slice(1,-1).split(",");return{a:Number.parseFloat(t),b:Number.parseFloat(n),c:Number.parseFloat(i)}}mapToDriverValue(e){return`{${e.a},${e.b},${e.c}}`}}function _(e,t){let{name:n,config:i}=(0,s.Ll)(e,t);return i?.mode&&"tuple"!==i.mode?new j(n):new K(n)}class k extends a.pe{static [i.i]="PgMacaddrBuilder";constructor(e){super(e,"string","PgMacaddr")}build(e){return new G(e,this.config)}}class G extends a.Kl{static [i.i]="PgMacaddr";getSQLType(){return"macaddr"}}function M(e){return new k(e??"")}class J extends a.pe{static [i.i]="PgMacaddr8Builder";constructor(e){super(e,"string","PgMacaddr8")}build(e){return new R(e,this.config)}}class R extends a.Kl{static [i.i]="PgMacaddr8";getSQLType(){return"macaddr8"}}function X(e){return new J(e??"")}class H extends a.pe{static [i.i]="PgNumericBuilder";constructor(e,t,n){super(e,"string","PgNumeric"),this.config.precision=t,this.config.scale=n}build(e){return new Y(e,this.config)}}class Y extends a.Kl{static [i.i]="PgNumeric";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return"string"==typeof e?e:String(e)}getSQLType(){return void 0!==this.precision&&void 0!==this.scale?`numeric(${this.precision}, ${this.scale})`:void 0===this.precision?"numeric":`numeric(${this.precision})`}}class W extends a.pe{static [i.i]="PgNumericNumberBuilder";constructor(e,t,n){super(e,"number","PgNumericNumber"),this.config.precision=t,this.config.scale=n}build(e){return new Z(e,this.config)}}class Z extends a.Kl{static [i.i]="PgNumericNumber";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return"number"==typeof e?e:Number(e)}mapToDriverValue=String;getSQLType(){return void 0!==this.precision&&void 0!==this.scale?`numeric(${this.precision}, ${this.scale})`:void 0===this.precision?"numeric":`numeric(${this.precision})`}}class ee extends a.pe{static [i.i]="PgNumericBigIntBuilder";constructor(e,t,n){super(e,"bigint","PgNumericBigInt"),this.config.precision=t,this.config.scale=n}build(e){return new et(e,this.config)}}class et extends a.Kl{static [i.i]="PgNumericBigInt";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return void 0!==this.precision&&void 0!==this.scale?`numeric(${this.precision}, ${this.scale})`:void 0===this.precision?"numeric":`numeric(${this.precision})`}}function en(e,t){let{name:n,config:i}=(0,s.Ll)(e,t),r=i?.mode;return"number"===r?new W(n,i?.precision,i?.scale):"bigint"===r?new ee(n,i?.precision,i?.scale):new H(n,i?.precision,i?.scale)}class ei extends a.pe{static [i.i]="PgPointTupleBuilder";constructor(e){super(e,"array","PgPointTuple")}build(e){return new er(e,this.config)}}class er extends a.Kl{static [i.i]="PgPointTuple";getSQLType(){return"point"}mapFromDriverValue(e){if("string"==typeof e){let[t,n]=e.slice(1,-1).split(",");return[Number.parseFloat(t),Number.parseFloat(n)]}return[e.x,e.y]}mapToDriverValue(e){return`(${e[0]},${e[1]})`}}class es extends a.pe{static [i.i]="PgPointObjectBuilder";constructor(e){super(e,"json","PgPointObject")}build(e){return new ea(e,this.config)}}class ea extends a.Kl{static [i.i]="PgPointObject";getSQLType(){return"point"}mapFromDriverValue(e){if("string"==typeof e){let[t,n]=e.slice(1,-1).split(",");return{x:Number.parseFloat(t),y:Number.parseFloat(n)}}return e}mapToDriverValue(e){return`(${e.x},${e.y})`}}function el(e,t){let{name:n,config:i}=(0,s.Ll)(e,t);return i?.mode&&"tuple"!==i.mode?new es(n):new ei(n)}function eu(e,t){let n=new DataView(new ArrayBuffer(8));for(let i=0;i<8;i++)n.setUint8(i,e[t+i]);return n.getFloat64(0,!0)}function eo(e){let t=function(e){let t=[];for(let n=0;n<e.length;n+=2)t.push(Number.parseInt(e.slice(n,n+2),16));return new Uint8Array(t)}(e),n=0,i=t[0];n+=1;
1let r=new DataView(t.buffer),s=r.getUint32(n,1===i);if(n+=4,0x20000000&s&&(r.getUint32(n,1===i),n+=4),(65535&s)==1){let e=eu(t,n),i=eu(t,n+=8);return n+=8,[e,i]}throw Error("Unsupported geometry type")}class ec extends a.pe{static [i.i]="PgGeometryBuilder";constructor(e){super(e,"array","PgGeometry")}build(e){return new ed(e,this.config)}}class ed extends a.Kl{static [i.i]="PgGeometry";getSQLType(){return"geometry(point)"}mapFromDriverValue(e){return eo(e)}mapToDriverValue(e){return`point(${e[0]} ${e[1]})`}}class eh extends a.pe{static [i.i]="PgGeometryObjectBuilder";constructor(e){super(e,"json","PgGeometryObject")}build(e){return new em(e,this.config)}}class em extends a.Kl{static [i.i]="PgGeometryObject";getSQLType(){return"geometry(point)"}mapFromDriverValue(e){let t=eo(e);return{x:t[0],y:t[1]}}mapToDriverValue(e){return`point(${e.x} ${e.y})`}}function eg(e,t){let{name:n,config:i}=(0,s.Ll)(e,t);return i?.mode&&"tuple"!==i.mode?new eh(n):new ec(n)}class ef extends a.pe{static [i.i]="PgRealBuilder";constructor(e,t){super(e,"number","PgReal"),this.config.length=t}build(e){return new ep(e,this.config)}}class ep extends a.Kl{static [i.i]="PgReal";constructor(e,t){super(e,t)}getSQLType(){return"real"}mapFromDriverValue=e=>"string"==typeof e?Number.parseFloat(e):e}function ey(e){return new ef(e??"")}class eb extends a.pe{static [i.i]="PgSerialBuilder";constructor(e){super(e,"number","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new ew(e,this.config)}}class ew extends a.Kl{static [i.i]="PgSerial";getSQLType(){return"serial"}}function eS(e){return new eb(e??"")}class ev extends l.p{static [i.i]="PgSmallIntBuilder";constructor(e){super(e,"number","PgSmallInt")}build(e){return new ex(e,this.config)}}class ex extends a.Kl{static [i.i]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue=e=>"string"==typeof e?Number(e):e}function eP(e){return new ev(e??"")}class eT extends a.pe{static [i.i]="PgSmallSerialBuilder";constructor(e){super(e,"number","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new eD(e,this.config)}}class eD extends a.Kl{static [i.i]="PgSmallSerial";getSQLType(){return"smallserial"}}function eN(e){return new eT(e??"")}var eC=n(4552),eL=n(31066);class eI extends eL.u{constructor(e,t,n){super(e,"string","PgTime"),this.withTimezone=t,this.precision=n,this.config.withTimezone=t,this.config.precision=n}static [i.i]="PgTimeBuilder";build(e){return new eB(e,this.config)}}class eB extends a.Kl{static [i.i]="PgTime";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=void 0===this.precision?"":`(${this.precision})`;return`time${e}${this.withTimezone?" with time zone":""}`}}function eV(e,t={}){let{name:n,config:i}=(0,s.Ll)(e,t);return new eI(n,i.withTimezone??!1,i.precision)}var eO=n(85369),ez=n(40884),eF=n(2932);class eq extends a.pe{static [i.i]="PgBinaryVectorBuilder";constructor(e,t){super(e,"string","PgBinaryVector"),this.config.dimensions=t.dimensions}build(e){return new eQ(e,this.config)}}class eQ extends a.Kl{static [i.i]="PgBinaryVector";dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}}function eA(e,t){let{name:n,config:i}=(0,s.Ll)(e,t);return new eq(n,i)}class eE extends a.pe{static [i.i]="PgHalfVectorBuilder";constructor(e,t){super(e,"array","PgHalfVector"),this.config.dimensions=t.dimensions}build(e){return new eK(e,this.config)}}class eK extends a.Kl{static [i.i]="PgHalfVector";dimensions=this.config.dimensions;getSQLType(){return`halfvec(${this.dimensions})`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){return e.slice(1,-1).split(",").map(e=>Number.parseFloat(e))}}function e$(e,t){let{name:n,config:i}=(0,s.Ll)(e,t);return new eE(n,i)}class ej extends a.pe{static [i.i]="PgSparseVectorBuilder";constructor(e,t){super(e,"string","PgSparseVector"),this.config.dimensions=t.dimensions}build(e){return new eU(e,this.config)}}class eU extends a.Kl{static [i.i]="PgSparseVector";dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}}
1function e_(e,t){let{name:n,config:i}=(0,s.Ll)(e,t);return new ej(n,i)}class ek extends a.pe{static [i.i]="PgVectorBuilder";constructor(e,t){super(e,"array","PgVector"),this.config.dimensions=t.dimensions}build(e){return new eG(e,this.config)}}class eG extends a.Kl{static [i.i]="PgVector";dimensions=this.config.dimensions;getSQLType(){return`vector(${this.dimensions})`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){return e.slice(1,-1).split(",").map(e=>Number.parseFloat(e))}}function eM(e,t){let{name:n,config:i}=(0,s.Ll)(e,t);return new ek(n,i)}let eJ=Symbol.for("drizzle:PgInlineForeignKeys"),eR=Symbol.for("drizzle:EnableRLS");class eX extends r.XI{static [i.i]="PgTable";static Symbol=Object.assign({},r.XI.Symbol,{InlineForeignKeys:eJ,EnableRLS:eR});[eJ]=[];[eR]=!1;[r.XI.Symbol.ExtraConfigBuilder]=void 0;[r.XI.Symbol.ExtraConfigColumns]={}}let eH=(e,t,n)=>(function(e,t,n,i,s=e){let a=new eX(e,i,s),l="function"==typeof t?t({bigint:h,bigserial:y,boolean:b.zM,char:w.Tp,cidr:x,customType:D,date:N.p6,doublePrecision:I,inet:B.RZ,integer:V.nd,interval:F,json:A,jsonb:E.Fx,line:_,macaddr:M,macaddr8:X,numeric:en,point:el,geometry:eg,real:ey,serial:eS,smallint:eP,smallserial:eN,text:eC.Qq,time:eV,timestamp:eO.vE,uuid:ez.uR,varchar:eF.yf,bit:eA,halfvec:e$,sparsevec:e_,vector:eM}):t,u=Object.fromEntries(Object.entries(l).map(([e,t])=>{t.setName(e);let n=t.build(a);return a[eJ].push(...t.buildForeignKeys(n,a)),[e,n]})),o=Object.fromEntries(Object.entries(l).map(([e,t])=>(t.setName(e),[e,t.buildExtraConfigColumn(a)]))),c=Object.assign(a,u);return c[r.XI.Symbol.Columns]=u,c[r.XI.Symbol.ExtraConfigColumns]=o,n&&(c[eX.Symbol.ExtraConfigBuilder]=n),Object.assign(c,{enableRLS:()=>(c[eX.Symbol.EnableRLS]=!0,c)})})(e,t,n,void 0)},39694:(e,t,n)=>{n.d(t,{BU:()=>a,rL:()=>o});var i=n(10300),r=n(63465);let s=Symbol.for("drizzle:isPgEnum");function a(e){return!!e&&"function"==typeof e&&s in e&&!0===e[s]}class l extends r.pe{static [i.i]="PgEnumColumnBuilder";constructor(e,t){super(e,"string","PgEnumColumn"),this.config.enum=t}build(e){return new u(e,this.config)}}class u extends r.Kl{static [i.i]="PgEnumColumn";enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor(e,t){super(e,t),this.enum=t.enum}getSQLType(){return this.enum.enumName}}function o(e,t){var n=e,i=t,r=void 0;let a=Object.assign(e=>new l(e??"",a),{enumName:n,enumValues:i,schema:r,[s]:!0});return a}},40884:(e,t,n)=>{n.d(t,{dL:()=>l,uR:()=>u});var i=n(10300),r=n(25077),s=n(63465);class a extends s.pe{static [i.i]="PgUUIDBuilder";constructor(e){super(e,"string","PgUUID")}defaultRandom(){return this.default((0,r.ll)`gen_random_uuid()`)}build(e){return new l(e,this.config)}}class l extends s.Kl{static [i.i]="PgUUID";getSQLType(){return"uuid"}}function u(e){return new a(e??"")}},43328:(e,t,n)=>{n.d(t,{K1:()=>o});var i=n(51677),r=n(10300);class s{constructor(e,t,n){this.sourceTable=e,this.referencedTable=t,this.relationName=n,this.referencedTableName=t[i.XI.Symbol.Name]}static [r.i]="Relation";referencedTableName;fieldName}class a{constructor(e,t){this.table=e,this.config=t}static [r.i]="Relations"}class l extends s{constructor(e,t,n,i){super(e,t,n?.relationName),this.config=n,this.isNullable=i}static [r.i]="One";withFieldName(e){let t=new l(this.sourceTable,this.referencedTable,this.config,this.isNullable);return t.fieldName=e,t}}class u extends s{constructor(e,t,n){super(e,t,n?.relationName),this.config=n}static [r.i]="Many";withFieldName(e){let t=new u(this.sourceTable,this.referencedTable,this.config);return t.fieldName=e,t}}function o(e,t){return new a(e,e=>Object.fromEntries(Object.entries(t(e)).map(([e,t])=>[e,t.withFieldName(e)])))}},51677:(e,t,n)=>{n.d(t,{HE:()=>c,XI:()=>m});var i=n(10300),r=n(83698);let s=Symbol.for("drizzle:Schema"),a=Symbol.for("drizzle:Columns"),l=Symbol.for("drizzle:ExtraConfigColumns"),u=Symbol.for("drizzle:OriginalName"),o=Symbol.for("drizzle:BaseName"),c=Symbol.for("drizzle:IsAlias"),d=Symbol.for("drizzle:ExtraConfigBuilder"),h=Symbol.for("drizzle:IsDrizzleTable");class m{static [i.i]="Table";static Symbol={Name:r.E,Schema:s,OriginalName:u,Columns:a,ExtraConfigColumns:l,BaseName:o,IsAlias:c,ExtraConfigBuilder:d};[r.E];[u];[s];[a];[l];[o];[c]=!1;[h]=!0;[d]=void 0;constructor(e,t,n){this[r.E]=this[u]=e,this[s]=t,this[o]=n}}},60067:(e,t,n)=>{n.d(t,{i:()=>i});function i(e,...t){return e(...t)}},63071:(e,t,n)=>{n.d(t,{Tp:()=>u,gH:()=>l});var i=n(10300),r=n(29528),s=n(63465);class a extends s.pe{static [i.i]="PgCharBuilder";constructor(e,t){super(e,"string","PgChar"),this.config.length=t.length,this.config.enumValues=t.enum}build(e){return new l(e,this.config)}}class l extends s.Kl{static [i.i]="PgChar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return void 0===this.length?"char":`char(${this.length})`}}function u(e,t={}){let{name:n,config:i}=(0,r.Ll)(e,t);return new a(n,i)}},63465:(e,t,n)=>{n.d(t,{ae:()=>b,Kl:()=>p,pe:()=>f});var i=n(71339),r=n(3141),s=n(10300),a=n(83698);class l{static [s.i]="PgForeignKeyBuilder";reference;
1_onUpdate="no action";_onDelete="no action";constructor(e,t){this.reference=()=>{let{name:t,columns:n,foreignColumns:i}=e();return{name:t,columns:n,foreignTable:i[0].table,foreignColumns:i}},t&&(this._onUpdate=t.onUpdate,this._onDelete=t.onDelete)}onUpdate(e){return this._onUpdate=void 0===e?"no action":e,this}onDelete(e){return this._onDelete=void 0===e?"no action":e,this}build(e){return new u(e,this)}}class u{constructor(e,t){this.table=e,this.reference=t.reference,this.onUpdate=t._onUpdate,this.onDelete=t._onDelete}static [s.i]="PgForeignKey";reference;onUpdate;onDelete;getName(){let{name:e,columns:t,foreignColumns:n}=this.reference(),i=t.map(e=>e.name),r=n.map(e=>e.name),s=[this.table[a.E],...i,n[0].table[a.E],...r];return e??`${s.join("_")}_fk`}}var o=n(60067);function c(e,t){return`${e[a.E]}_${t.join("_")}_unique`}class d{constructor(e,t){this.name=t,this.columns=e}static [s.i]=null;columns;nullsNotDistinctConfig=!1;nullsNotDistinct(){return this.nullsNotDistinctConfig=!0,this}build(e){return new m(e,this.columns,this.nullsNotDistinctConfig,this.name)}}class h{static [s.i]=null;name;constructor(e){this.name=e}on(...e){return new d(e,this.name)}}class m{constructor(e,t,n,i){this.table=e,this.columns=t,this.name=i??c(this.table,this.columns.map(e=>e.name)),this.nullsNotDistinct=n}static [s.i]=null;columns;name;nullsNotDistinct=!1;getName(){return this.name}}function g(e,t,n){for(let i=t;i<e.length;i++){let r=e[i];if("\\"===r){i++;continue}if('"'===r)return[e.slice(t,i).replace(/\\/g,""),i+1];if(!n&&(","===r||"}"===r))return[e.slice(t,i).replace(/\\/g,""),i]}return[e.slice(t).replace(/\\/g,""),e.length]}class f extends i.Q{foreignKeyConfigs=[];static [s.i]="PgColumnBuilder";array(e){return new w(this.config.name,this,e)}references(e,t={}){return this.foreignKeyConfigs.push({ref:e,actions:t}),this}unique(e,t){return this.config.isUnique=!0,this.config.uniqueName=e,this.config.uniqueType=t?.nulls,this}generatedAlwaysAs(e){return this.config.generated={as:e,type:"always",mode:"stored"},this}buildForeignKeys(e,t){return this.foreignKeyConfigs.map(({ref:n,actions:i})=>(0,o.i)((n,i)=>{let r=new l(()=>({columns:[e],foreignColumns:[n()]}));return i.onUpdate&&r.onUpdate(i.onUpdate),i.onDelete&&r.onDelete(i.onDelete),r.build(t)},n,i))}buildExtraConfigColumn(e){return new y(e,this.config)}}class p extends r.V{constructor(e,t){t.uniqueName||(t.uniqueName=c(e,[t.name])),super(e,t),this.table=e}static [s.i]="PgColumn"}class y extends p{static [s.i]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op(e){return this.indexConfig.opClass=e,this}}class b{static [s.i]="IndexedColumn";constructor(e,t,n,i){this.name=e,this.keyAsName=t,this.type=n,this.indexConfig=i}name;keyAsName;type;indexConfig}class w extends f{static [s.i]="PgArrayBuilder";constructor(e,t,n){super(e,"array","PgArray"),this.config.baseBuilder=t,this.config.size=n}build(e){let t=this.config.baseBuilder.build(e);return new S(e,this.config,t)}}class S extends p{constructor(e,t,n,i){super(e,t),this.baseColumn=n,this.range=i,this.size=t.size}size;static [s.i]="PgArray";getSQLType(){return`${this.baseColumn.getSQLType()}[${"number"==typeof this.size?this.size:""}]`}mapFromDriverValue(e){return"string"==typeof e&&(e=function(e){let[t]=function e(t,n=0){let i=[],r=n,s=!1;for(;r<t.length;){let a=t[r];if(","===a){(s||r===n)&&i.push(""),s=!0,r++;continue}if(s=!1,"\\"===a){r+=2;continue}if('"'===a){let[e,n]=g(t,r+1,!0);i.push(e),r=n;continue}if("}"===a)return[i,r+1];if("{"===a){let[n,s]=e(t,r+1);i.push(n),r=s;continue}let[l,u]=g(t,r,!1);i.push(l),r=u}return[i,r]}(e,1);return t}(e)),e.map(e=>this.baseColumn.mapFromDriverValue(e))}mapToDriverValue(e,t=!1){let n=e.map(e=>null===e?null:(0,s.is)(this.baseColumn,S)?this.baseColumn.mapToDriverValue(e,!0):this.baseColumn.mapToDriverValue(e));return t?n:function e(t){return`{${t.map(t=>Array.isArray(t)?e(t):"string"==typeof t?`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${t}`).join(",")}}`}(n)}}},65180:(e,t,n)=>{n.d(t,{r:()=>_,aJ:()=>k});var i=n(29528),r=n(10300),s=n(71339),a=n(3141),l=n(83698);class u{static [r.i]="MySqlForeignKeyBuilder";reference;
1_onUpdate;_onDelete;constructor(e,t){this.reference=()=>{let{name:t,columns:n,foreignColumns:i}=e();return{name:t,columns:n,foreignTable:i[0].table,foreignColumns:i}},t&&(this._onUpdate=t.onUpdate,this._onDelete=t.onDelete)}onUpdate(e){return this._onUpdate=e,this}onDelete(e){return this._onDelete=e,this}build(e){return new o(e,this)}}class o{constructor(e,t){this.table=e,this.reference=t.reference,this.onUpdate=t._onUpdate,this.onDelete=t._onDelete}static [r.i]="MySqlForeignKey";reference;onUpdate;onDelete;getName(){let{name:e,columns:t,foreignColumns:n}=this.reference(),i=t.map(e=>e.name),r=n.map(e=>e.name),s=[this.table[l.E],...i,n[0].table[l.E],...r];return e??`${s.join("_")}_fk`}}function c(e,t){return`${e[l.E]}_${t.join("_")}_unique`}class d{constructor(e,t){this.name=t,this.columns=e}static [r.i]=null;columns;build(e){return new m(e,this.columns,this.name)}}class h{static [r.i]=null;name;constructor(e){this.name=e}on(...e){return new d(e,this.name)}}class m{constructor(e,t,n){this.table=e,this.columns=t,this.name=n??c(this.table,this.columns.map(e=>e.name))}static [r.i]=null;columns;name;nullsNotDistinct=!1;getName(){return this.name}}class g extends s.Q{static [r.i]="MySqlColumnBuilder";foreignKeyConfigs=[];references(e,t={}){return this.foreignKeyConfigs.push({ref:e,actions:t}),this}unique(e){return this.config.isUnique=!0,this.config.uniqueName=e,this}generatedAlwaysAs(e,t){return this.config.generated={as:e,type:"always",mode:t?.mode??"virtual"},this}buildForeignKeys(e,t){return this.foreignKeyConfigs.map(({ref:n,actions:i})=>((n,i)=>{let r=new u(()=>({columns:[e],foreignColumns:[n()]}));return i.onUpdate&&r.onUpdate(i.onUpdate),i.onDelete&&r.onDelete(i.onDelete),r.build(t)})(n,i))}}class f extends a.V{constructor(e,t){t.uniqueName||(t.uniqueName=c(e,[t.name])),super(e,t),this.table=e}static [r.i]="MySqlColumn"}class p extends g{static [r.i]="MySqlColumnBuilderWithAutoIncrement";constructor(e,t,n){super(e,t,n),this.config.autoIncrement=!1}autoincrement(){return this.config.autoIncrement=!0,this.config.hasDefault=!0,this}}class y extends null{static [r.i]=null;autoIncrement=this.config.autoIncrement}class b extends g{static [r.i]="MySqlVarCharBuilder";constructor(e,t){super(e,"string","MySqlVarChar"),this.config.length=t.length,this.config.enum=t.enum}build(e){return new w(e,this.config)}}class w extends f{static [r.i]="MySqlVarChar";length=this.config.length;enumValues=this.config.enum;getSQLType(){return void 0===this.length?"varchar":`varchar(${this.length})`}}var S=n(60996).hp;class v extends g{static [r.i]="MySqlVarBinaryBuilder";constructor(e,t){super(e,"string","MySqlVarBinary"),this.config.length=t?.length}build(e){return new x(e,this.config)}}class x extends f{static [r.i]="MySqlVarBinary";length=this.config.length;mapFromDriverValue(e){if("string"==typeof e)return e;if(S.isBuffer(e))return e.toString();let t=[];for(let n of e)t.push(49===n?"1":"0");return t.join("")}getSQLType(){return void 0===this.length?"varbinary":`varbinary(${this.length})`}}class P extends g{static [r.i]="MySqlCharBuilder";constructor(e,t){super(e,"string","MySqlChar"),this.config.length=t.length,this.config.enum=t.enum}build(e){return new T(e,this.config)}}class T extends f{static [r.i]="MySqlChar";length=this.config.length;enumValues=this.config.enum;getSQLType(){return void 0===this.length?"char":`char(${this.length})`}}var D=n(40884),N=n(63071),C=n(2932);class L{static [r.i]="SQLiteForeignKeyBuilder";reference;_onUpdate;_onDelete;constructor(e,t){this.reference=()=>{let{name:t,columns:n,foreignColumns:i}=e();return{name:t,columns:n,foreignTable:i[0].table,foreignColumns:i}},t&&(this._onUpdate=t.onUpdate,this._onDelete=t.onDelete)}onUpdate(e){return this._onUpdate=e,this}onDelete(e){return this._onDelete=e,this}build(e){return new I(e,this)}}class I{constructor(e,t){this.table=e,this.reference=t.reference,this.onUpdate=t._onUpdate,this.onDelete=t._onDelete}static [r.i]="SQLiteForeignKey";reference;onUpdate;onDelete;getName(){let{name:e,columns:t,foreignColumns:n}=this.reference(),i=t.map(e=>e.name),r=n.map(e=>e.name),s=[this.table[l.E],...i,n[0].table[l.E],...r];return e??`${s.join("_")}_fk`}}function B(e,t){return`${e[l.E]}_${t.join("_")}_unique`}class V{constructor(e,t){this.name=t,this.columns=e}static [r.i]=null;columns;build(e){return new z(e,this.columns,this.name)}}class O{static [r.i]=null;name;constructor(e){this.name=e}on(...e){return new V(e,this.name)}}class z{constructor(e,t,n){this.table=e,this.columns=t,this.name=n??B(this.table,this.columns.map(e=>e.name))}static [r.i]=null;columns;name;getName(){return this.name}}class F extends s.Q{static [r.i]="SQLiteColumnBuilder";foreignKeyConfigs=[];references(e,t={}){return this.foreignKeyConfigs.push({ref:e,actions:t}),this}unique(e){return this.config.isUnique=!0,this.config.uniqueName=e,this}generatedAlwaysAs(e,t){return this.config.generated={as:e,type:"always",mode:t?.mode??"virtual"},this}buildForeignKeys(e,t){return this.foreignKeyConfigs.map(({ref:n,actions:i})=>((n,i)=>{let r=new L(()=>({columns:[e],foreignColumns:[n()]}));return i.onUpdate&&r.onUpdate(i.onUpdate),i.onDelete&&r.onDelete(i.onDelete),r.build(t)})(n,i))}}class q extends a.V{constructor(e,t){t.uniqueName||(t.uniqueName=B(e,[t.name])),super(e,t),this.table=e}static [r.i]="SQLiteColumn"}class Q extends F{static [r.i]="SQLiteTextBuilder";constructor(e,t){super(e,"string","SQLiteText"),this.config.enumValues=t.enum,this.config.length=t.length}build(e){return new A(e,this.config)}}class A extends q{static [r.i]="SQLiteText";enumValues=this.config.enumValues;length=this.config.length;constructor(e,t){super(e,t)}getSQLType(){return`text${this.config.length?`(${this.config.length})`:""}`}}class E extends F{static [r.i]="SQLiteTextJsonBuilder";constructor(e){super(e,"json","SQLiteTextJson")}build(e){return new K(e,this.config)}}class K extends q{static [r.i]="SQLiteTextJson";getSQLType(){return"text"}mapFromDriverValue(e){return JSON.parse(e)}mapToDriverValue(e){return JSON.stringify(e)}}var $=n(30248);let j=$.KC([$.Yj(),$.ai(),$.zM(),$.ch()]),U=$.RZ(()=>$.KC([j,$.YO(U),$.g1(U)]));function _(e,t){let n=Object.entries((0,i.YD)(e)),r=Object.fromEntries(n.map(([e,t])=>[e,G(t)]));for(let[e,i]of(t&&(r=Object.assign(r,Object.fromEntries(Object.entries(t).map(([e,t])=>[e,"function"==typeof t?t(r):t])))),n))i.notNull?i.hasDefault&&(r[e]=r[e].optional()):r[e]=r[e].nullable().optional();return $.Ik(r)}
1function k(e,t){let n=Object.entries((0,i.YD)(e)),r=Object.fromEntries(n.map(([e,t])=>[e,G(t)]));for(let[e,i]of(t&&(r=Object.assign(r,Object.fromEntries(Object.entries(t).map(([e,t])=>[e,"function"==typeof t?t(r):t])))),n))i.notNull||(r[e]=r[e].nullable());return $.Ik(r)}function G(e){let t;if("enumValues"in e&&Array.isArray(e.enumValues)&&e.enumValues.length>0&&(t=e.enumValues.length?$.k5(e.enumValues):$.Yj()),!t){if((0,r.is)(e,D.dL))t=$.Yj().uuid();else if("custom"===e.dataType)t=$.bz();else if("json"===e.dataType)t=U;else if("array"===e.dataType)t=$.YO(G(e.baseColumn));else if("number"===e.dataType)t=$.ai();else if("bigint"===e.dataType)t=$.o();else if("boolean"===e.dataType)t=$.zM();else if("date"===e.dataType)t=$.p6();else if("string"===e.dataType){let n=$.Yj();((0,r.is)(e,N.gH)||(0,r.is)(e,C.tO)||(0,r.is)(e,w)||(0,r.is)(e,x)||(0,r.is)(e,T)||(0,r.is)(e,A))&&"number"==typeof e.length&&(n=n.max(e.length)),t=n}}return t||(t=$.bz()),t}},71339:(e,t,n)=>{n.d(t,{Q:()=>r});var i=n(10300);class r{static [i.i]="ColumnBuilder";config;constructor(e,t,n){this.config={name:e,keyAsName:""===e,notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:t,columnType:n,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(e){return this.config.default=e,this.config.hasDefault=!0,this}$defaultFn(e){return this.config.defaultFn=e,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(e){return this.config.onUpdateFn=e,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(e){""===this.config.name&&(this.config.name=e)}}},78701:(e,t,n)=>{n.d(t,{RZ:()=>l});var i=n(10300),r=n(63465);class s extends r.pe{static [i.i]="PgInetBuilder";constructor(e){super(e,"string","PgInet")}build(e){return new a(e,this.config)}}class a extends r.Kl{static [i.i]="PgInet";getSQLType(){return"inet"}}function l(e){return new s(e??"")}},80189:(e,t,n)=>{n.d(t,{GL:()=>o});var i=n(25077),r=n(10300),s=n(63465);class a{constructor(e,t){this.unique=e,this.name=t}static [r.i]="PgIndexBuilderOn";on(...e){return new l(e.map(e=>{if((0,r.is)(e,i.Xs))return e;let t=new s.ae(e.name,!!e.keyAsName,e.columnType,e.indexConfig);return e.indexConfig=JSON.parse(JSON.stringify(e.defaultConfig)),t}),this.unique,!1,this.name)}onOnly(...e){return new l(e.map(e=>{if((0,r.is)(e,i.Xs))return e;let t=new s.ae(e.name,!!e.keyAsName,e.columnType,e.indexConfig);return e.indexConfig=e.defaultConfig,t}),this.unique,!0,this.name)}using(e,...t){return new l(t.map(e=>{if((0,r.is)(e,i.Xs))return e;let t=new s.ae(e.name,!!e.keyAsName,e.columnType,e.indexConfig);return e.indexConfig=JSON.parse(JSON.stringify(e.defaultConfig)),t}),this.unique,!0,this.name,e)}}class l{static [r.i]="PgIndexBuilder";config;constructor(e,t,n,i,r="btree"){this.config={name:i,columns:e,unique:t,only:n,method:r}}concurrently(){return this.config.concurrently=!0,this}with(e){return this.config.with=e,this}where(e){return this.config.where=e,this}build(e){return new u(this.config,e)}}class u{static [r.i]="PgIndex";config;constructor(e,t){this.config={...e,table:t}}}function o(e){return new a(!0,e)}},83698:(e,t,n)=>{n.d(t,{E:()=>i});let i=Symbol.for("drizzle:Name")},85369:(e,t,n)=>{n.d(t,{vE:()=>d});var i=n(10300),r=n(29528),s=n(63465),a=n(31066);class l extends a.u{static [i.i]="PgTimestampBuilder";constructor(e,t,n){super(e,"date","PgTimestamp"),this.config.withTimezone=t,this.config.precision=n}build(e){return new u(e,this.config)}}class u extends s.Kl{static [i.i]="PgTimestamp";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=void 0===this.precision?"":` (${this.precision})`;return`timestamp${e}${this.withTimezone?" with time zone":""}`}mapFromDriverValue=e=>new Date(this.withTimezone?e:e+"+0000");mapToDriverValue=e=>e.toISOString()}class o extends a.u{static [i.i]="PgTimestampStringBuilder";constructor(e,t,n){super(e,"string","PgTimestampString"),this.config.withTimezone=t,this.config.precision=n}build(e){return new c(e,this.config)}}class c extends s.Kl{static [i.i]="PgTimestampString";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=void 0===this.precision?"":`(${this.precision})`;return`timestamp${e}
1${this.withTimezone?" with time zone":""}`}}function d(e,t={}){let{name:n,config:i}=(0,r.Ll)(e,t);return i?.mode==="string"?new o(n,i.withTimezone??!1,i.precision):new l(n,i?.withTimezone??!1,i?.precision)}}}]);

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.