"use strict";var l=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var m=(t,r)=>{for(var e in r)l(t,e,{get:r[e],enumerable:!0})},g=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of T(r))!c.call(t,a)&&a!==e&&l(t,a,{get:()=>r[a],enumerable:!(n=u(r,a))||n.enumerable});return t};var f=t=>g(l({},"__esModule",{value:!0}),t);var d={};m(d,{identifier:()=>w,query:()=>S,raw:()=>h,sql:()=>y});module.exports=f(d);var o={part:"part",container:"container"};function s(t,r,...e){let n=t.length-1,a=e.length-1;if(a!==-1){if(a===0){t[n]=t[n]+e[0]+r;return}t[n]=t[n]+e[0],t.push(...e.slice(1,a)),t.push(e[a]+r)}}function y(t,...r){let e=[t[0]];e.raw=[t.raw[0]];let n=[];for(let a=0;a<r.length;a++){let p=r[a],i=a+1;if(p?._templateType===o.part){s(e,t[i],p.str),s(e.raw,t.raw[i],p.str);continue}if(p?._templateType===o.container){s(e,t[i],...p.strings),s(e.raw,t.raw[i],...p.strings.raw),n.push(...p.values);continue}e.push(t[i]),e.raw.push(t.raw[i]),n.push(p)}return{_templateType:"container",strings:e,values:n}}function w(t,...r){return{_templateType:"part",str:`"${String.raw(t,...r)}"`}}function h(t,...r){return{_templateType:"part",str:String.raw(t,...r)}}function S(t,...r){let{strings:e,values:n}=y(t,...r);return{query:[e[0],...n.flatMap((a,p)=>[`$${p+1}`,e[p+1]])].join(""),params:n}}0&&(module.exports={identifier,query,raw,sql});
//# sourceMappingURL=templating.cjs.map