@walkeros/web-destination-gtag 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/examples/index.js +5378 -16
- package/dist/examples/index.mjs +5378 -16
- package/dist/index.browser.js +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.es5.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,n,r,a,o,i){try{var c=e[o](i),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,a)}function _async_to_generator(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){asyncGeneratorStep(o,r,a,i,c,"next",e)}function c(e){asyncGeneratorStep(o,r,a,i,c,"throw",e)}i(void 0)})}}function _define_property(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_define_property(e,t,n[t])})}return e}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(e,t):void 0}}function _ts_generator(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(6===c[0]&&o.label<a[1]){o.label=a[1],a=c;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(c);break}a[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=a=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var Destination=function(){var e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"https://www.googletagmanager.com/gtag/js?id=",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:globalThis.document;if(!S.has(e)){var r=n.createElement("script");r.src=t+e,n.head.appendChild(r),S.add(e)}},t=function(e){var t=e;return t.dataLayer=t.dataLayer||[],t.gtag||(t.gtag=function(){t.dataLayer.push(arguments)}),t.gtag},n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=_object_spread({},x,n);var r=Object.entries(t).reduce(function(t,r){var a=_sliced_to_array(r,2),o=a[0],i=a[1],c=e[o];return n.merge&&Array.isArray(c)&&Array.isArray(i)?t[o]=i.reduce(function(e,t){return e.includes(t)?e:_to_consumable_array(e).concat([t])},_to_consumable_array(c)):(n.extend||o in e)&&(t[o]=i),t},{});return n.shallow?_object_spread({},e,r):(Object.assign(e,r),e)},r=function(e){return Array.isArray(e)},a=function(e){return void 0!==e},o=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!r(e)&&"[object Object]"===Object.prototype.toString.call(e)},i=function(e){return"string"==typeof e},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"entity action",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.timestamp||(new Date).setHours(0,13,37,0),a={data:{id:"ers",name:"Everyday Ruck Snack",color:"black",size:"l",price:420}},o={data:{id:"cc",name:"Cool Cap",size:"one size",price:42}};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.timestamp||(new Date).setHours(0,13,37,0),r=e.group||"gr0up",a=e.count||1,o=n({name:"entity action",data:{string:"foo",number:1,boolean:!0,array:[0,"text",!1],not:void 0},context:{dev:["test",1]},globals:{lang:"elb"},custom:{completely:"random"},user:{id:"us3r",device:"c00k13",session:"s3ss10n"},nested:[{entity:"child",data:{is:"subordinated"},nested:[],context:{element:["child",0]}}],consent:{functional:!0},id:"".concat(t,"-").concat(r,"-").concat(a),trigger:"test",entity:"entity",action:"action",timestamp:t,timing:3.14,group:r,count:a,version:{source:"0.2.0",tagging:1},source:{type:"web",id:"https://localhost:80",previous_id:"http://remotehost:9001"}},e,{merge:!1});if(e.name){var i,c=_sliced_to_array(null!==(i=e.name.split(" "))&&void 0!==i?i:[],2),u=c[0],s=c[1];u&&s&&(o.entity=u,o.action=s)}return o}(_object_spread_props(_object_spread({},{"cart view":{data:{currency:"EUR",value:2*a.data.price},context:{shopping:["cart",0]},globals:{pagegroup:"shop"},nested:[{entity:"product",data:_object_spread_props(_object_spread({},a.data),{quantity:2}),context:{shopping:["cart",0]},nested:[]}],trigger:"load"},"checkout view":{data:{step:"payment",currency:"EUR",value:a.data.price+o.data.price},context:{shopping:["checkout",0]},globals:{pagegroup:"shop"},nested:[_object_spread_props(_object_spread({entity:"product"},a),{context:{shopping:["checkout",0]},nested:[]}),_object_spread_props(_object_spread({entity:"product"},o),{context:{shopping:["checkout",0]},nested:[]})],trigger:"load"},"order complete":{data:{id:"0rd3r1d",currency:"EUR",shipping:5.22,taxes:73.76,total:555},context:{shopping:["complete",0]},globals:{pagegroup:"shop"},nested:[_object_spread_props(_object_spread({entity:"product"},a),{context:{shopping:["complete",0]},nested:[]}),_object_spread_props(_object_spread({entity:"product"},o),{context:{shopping:["complete",0]},nested:[]}),{entity:"gift",data:{name:"Surprise"},context:{shopping:["complete",0]},nested:[]}],trigger:"load"},"page view":{data:{domain:"www.example.com",title:"walkerOS documentation",referrer:"https://www.elbwalker.com/",search:"?foo=bar",hash:"#hash",id:"/docs/"},globals:{pagegroup:"docs"},trigger:"load"},"product add":_object_spread_props(_object_spread({},a),{context:{shopping:["intent",0]},globals:{pagegroup:"shop"},nested:[],trigger:"click"}),"product view":_object_spread_props(_object_spread({},a),{context:{shopping:["detail",0]},globals:{pagegroup:"shop"},nested:[],trigger:"load"}),"product visible":{data:_object_spread_props(_object_spread({},a.data),{position:3,promo:!0}),context:{shopping:["discover",0]},globals:{pagegroup:"shop"},nested:[],trigger:"load"},"promotion visible":{data:{name:"Setting up tracking easily",position:"hero"},context:{ab_test:["engagement",0]},globals:{pagegroup:"homepage"},trigger:"visible"},"session start":{data:{id:"s3ss10n",start:r,isNew:!0,count:1,runs:1,isStart:!0,storage:!0,referrer:"",device:"c00k13"},user:{id:"us3r",device:"c00k13",session:"s3ss10n",hash:"h4sh",address:"street number",email:"user@example.com",phone:"+49 123 456 789",userAgent:"Mozilla...",browser:"Chrome",browserVersion:"90",deviceType:"desktop",language:"de-DE",country:"DE",region:"HH",city:"Hamburg",zip:"20354",timezone:"Berlin",os:"walkerOS",osVersion:"1.0",screenSize:"1337x420",ip:"127.0.0.0",internal:!0,custom:"value"}}}[e],t),{name:e}))},u=function(e){return I(e)?e:void 0},s=function(e,t,n){return function(){for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return _async_to_generator(function(){var r;return _ts_generator(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,4,6]),[4,e.apply(void 0,_to_consumable_array(a))];case 1:case 3:return[2,o.sent()];case 2:return r=o.sent(),t?[4,t(r)]:[2];case 4:return[4,null==n?void 0:n()];case 5:return o.sent(),[7];case 6:return[2]}})})()}},d=function(e){return _async_to_generator(function(e){var t,n,i,c,u,d,l,p,_,f,g,y,v,m=arguments;return _ts_generator(this,function(b){switch(b.label){case 0:if(t=m.length>1&&void 0!==m[1]?m[1]:{},n=m.length>2&&void 0!==m[2]?m[2]:{},!a(e))return[2];c=o(e)&&e.consent||n.consent||(null===(i=n.collector)||void 0===i?void 0:i.consent),u=r(t)?t:[t],d=!0,l=!1,p=void 0,b.label=1;case 1:b.trys.push([1,6,7,8]),_=u[Symbol.iterator](),b.label=2;case 2:return(d=(f=_.next()).done)?[3,5]:(g=f.value,[4,s(P)(e,g,_object_spread_props(_object_spread({},n),{consent:c}))]);case 3:if(y=b.sent(),a(y))return[2,y];b.label=4;case 4:return d=!0,[3,2];case 5:return[3,8];case 6:return v=b.sent(),l=!0,p=v,[3,8];case 7:try{d||null==_.return||_.return()}finally{if(l)throw p}return[7];case 8:return[2]}})}).apply(this,arguments)},l=function(e){return _object_spread({window:"undefined"!=typeof window?window:globalThis.window,document:"undefined"!=typeof document?document:globalThis.document},e)},p=function(e,t,r,a,i){return _async_to_generator(function(){var c,u,s,l,p,_,f;return _ts_generator(this,function(g){switch(g.label){case 0:return c=o(t)?t:{},r.data?[4,d(e,r.data,{collector:i})]:[3,2];case 1:return s=g.sent(),[3,3];case 2:s={},g.label=3;case 3:return u=s,(null==a?void 0:a.data)?[4,d(e,a.data,{collector:i})]:[3,5];case 4:return p=g.sent(),[3,6];case 5:p={},g.label=6;case 6:return l=p,_=o(u)?u:{},f=o(l)?l:{},[2,n(n(c,_),f)]}})})()},_=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,a=l(arguments.length>4?arguments[4]:void 0).window;if(t.measurementId){var i=o(r)?r:{},c=function(e,t){var n={};return t.includes("all")&&(t=["context","data","event","globals","source","user","version"]),t.forEach(function(t){var r=e[t]||{};"event"==t&&(r={id:e.id,timing:e.timing,trigger:e.trigger,entity:e.entity,action:e.action,group:e.group,count:e.count}),Object.entries(r).forEach(function(e){var r=_sliced_to_array(e,2),a=r[0],o=r[1];"context"==t&&(o=o[0]),n["".concat(t,"_").concat(a)]=o})}),n}(e,n.include||t.include||["data"]),u=_object_spread({},c,i),s=e.name;!1!==t.snakeCase&&(s=function(e){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:e.replace(/\s+/g,"_").toLowerCase()}(s)),u.send_to=t.measurementId,t.debug&&(u.debug_mode=!0),(0,a.gtag)("event",s,u)}},f=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:globalThis.document,a=n!=X?"&l="+n:"",o=r.createElement("script");o.src=t+e+a,r.head.appendChild(o)},g=function(){var e=c("order complete");return["event","purchase",{transaction_id:e.data.id,value:e.data.total,tax:e.data.taxes,shipping:e.data.shipping,currency:"EUR",items:e.nested.filter(function(e){return"product"===e.entity}).map(function(e){return{item_id:e.data.id,item_name:e.data.name,quantity:1}}),send_to:"G-XXXXXX-1"}]},y=function(){var e=c("product add");return["event","add_to_cart",{currency:"EUR",value:e.data.price,items:[{item_id:e.data.id,item_variant:e.data.color,quantity:1}],send_to:"G-XXXXXX-1"}]},v=function(){var e=c("order complete");return["event","conversion",{send_to:"AW-XXXXXXXXX/CONVERSION_LABEL",currency:"EUR",value:e.data.total,transaction_id:e.data.id}]},m=function(){var e=c("product view");return{event:"product_view",product_id:e.data.id,product_name:e.data.name,product_category:e.data.category,value:e.data.price,currency:"EUR"}},b=function(){$=!1},h=Object.defineProperty,w=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,O=Object.prototype.hasOwnProperty,k=function(e,t){for(var n in t)h(e,n,{get:t[n],enumerable:!0})},E={};k(E,{DestinationGtag:function(){return R},default:function(){return Q},destinationGtag:function(){return J},examples:function(){return D},resetConsentState:function(){return b}});var S=new Set,x={merge:!0,shallow:!0,extend:!0};function A(e){for(var t=arguments.length>2?arguments[2]:void 0,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split("."),o=e,i=0;i<n.length;i++){var c=n[i];if("*"===c&&r(o)){var u=n.slice(i+1).join("."),s=[],d=!0,l=!1,p=void 0;try{for(var _,f=o[Symbol.iterator]();!(d=(_=f.next()).done);d=!0){var g=A(_.value,u,t);s.push(g)}}catch(e){l=!0,p=e}finally{try{d||null==f.return||f.return()}finally{if(l)throw p}}return s}if(!(o=_instanceof(o,Object)?o[c]:void 0))break}return a(o)?o:t}function I(e){return function(e){return"boolean"==typeof e}(e)||i(e)||function(e){return"number"==typeof e&&!Number.isNaN(e)}(e)||!a(e)||r(e)&&e.every(I)||o(e)&&Object.values(e).every(I)}function P(e,t){return _async_to_generator(function(e,t){var n,o,c,l=arguments;return _ts_generator(this,function(p){return o=(n=l.length>2&&void 0!==l[2]?l[2]:{}).collector,c=n.consent,[2,(r(t)?t:[t]).reduce(function(t,l){return _async_to_generator(function(){var p,_,f,g,y,v,m,b,h,w,j,O,k,E,S,x,I,X,C,R,D;return _ts_generator(this,function(L){switch(L.label){case 0:return[4,t];case 1:return(p=L.sent())?[2,p]:(_=i(l)?{key:l}:l,Object.keys(_).length?(f=_.condition,g=_.consent,y=_.fn,v=_.key,m=_.loop,b=_.map,h=_.set,w=_.validate,j=_.value,(O=f)?[4,s(f)(e,l,o)]:[3,3]):[2]);case 2:O=!L.sent(),L.label=3;case 3:return O?[2]:g&&!function(e){var t=_object_spread({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),n={},r=void 0===e;return Object.keys(t).forEach(function(a){t[a]&&(n[a]=!0,e&&e[a]&&(r=!0))}),!!r&&n}(g,c)?[2,j]:(k=a(j)?j:e,y?[4,s(y)(e,l,n)]:[3,5]);case 4:k=L.sent(),L.label=5;case 5:return v&&(k=A(e,v,j)),m?(E=_sliced_to_array(m,2),S=E[0],x=E[1],"this"!==S?[3,6]:(X=[e],[3,8])):[3,11];case 6:return[4,d(e,S,n)];case 7:X=L.sent(),L.label=8;case 8:return r(I=X)?[4,Promise.all(I.map(function(e){return d(e,x,n)}))]:[3,10];case 9:k=L.sent().filter(a),L.label=10;case 10:return[3,17];case 11:return b?[4,Object.entries(b).reduce(function(t,r){var o=_sliced_to_array(r,2),i=o[0],c=o[1];return _async_to_generator(function(){var r,o;return _ts_generator(this,function(u){switch(u.label){case 0:return[4,t];case 1:return r=u.sent(),[4,d(e,c,n)];case 2:return o=u.sent(),[2,(a(o)&&(r[i]=o),r)]}})})()},Promise.resolve({}))]:[3,13];case 12:return k=L.sent(),[3,16];case 13:return(C=h)?[4,Promise.all(h.map(function(t){return P(e,t,n)}))]:[3,15];case 14:C=k=L.sent(),L.label=15;case 15:L.label=16;case 16:L.label=17;case 17:return(R=w)?[4,s(w)(k)]:[3,19];case 18:R=!L.sent(),L.label=19;case 19:return R&&(k=void 0),D=u(k),[2,a(D)?D:u(j)]}})})()},Promise.resolve(void 0))]})}).apply(this,arguments)}var X="dataLayer",C="https://www.googletagmanager.com/gtm.js?id=",R={},D={};k(D,{env:function(){return L},events:function(){return z},mapping:function(){return N}});var L={};k(L,{init:function(){return U},push:function(){return T},simulation:function(){return q}});var U={window:{gtag:void 0,dataLayer:[]},document:{createElement:function(){return{src:"",setAttribute:function(){},removeAttribute:function(){}}},head:{appendChild:function(){}}}},T={window:{gtag:Object.assign(function(){},{}),dataLayer:[]},document:{createElement:function(){return{src:"",setAttribute:function(){},removeAttribute:function(){}}},head:{appendChild:function(){}}}},q=["call:window.gtag"],z={};k(z,{adsConversion:function(){return v},ga4AddToCart:function(){return y},ga4Purchase:function(){return g},gtmEvent:function(){return m}});var N={};k(N,{adsConversion:function(){return B},combinedPurchase:function(){return K},config:function(){return W},ga4AddToCart:function(){return V},ga4Purchase:function(){return H},gtmProductView:function(){return M}});var G,H={name:"purchase",settings:{ga4:{include:["data","context"]}},data:{map:{transaction_id:"data.id",value:"data.total",tax:"data.taxes",shipping:"data.shipping",currency:{key:"data.currency",value:"EUR"},items:{loop:["nested",{condition:function(e){return o(e)&&"product"===e.entity},map:{item_id:"data.id",item_name:"data.name",quantity:{key:"data.quantity",value:1}}}]}}}},V={name:"add_to_cart",settings:{ga4:{include:["data"]}},data:{map:{currency:{value:"EUR",key:"data.currency"},value:"data.price",items:{loop:["this",{map:{item_id:"data.id",item_variant:"data.color",quantity:{value:1,key:"data.quantity"}}}]}}}},B={name:"CONVERSION_LABEL",settings:{ads:{}},data:{map:{value:"data.total",currency:{value:"EUR",key:"data.currency"},transaction_id:"data.id"}}},M={name:"product_view",settings:{gtm:{}},data:{map:{product_id:"data.id",product_name:"data.name",product_category:"data.category",value:"data.price",currency:{value:"EUR",key:"data.currency"}}}},K={name:"purchase",settings:{ga4:{include:["data"]},ads:{},gtm:{}},data:{map:{transaction_id:"data.id",value:"data.total",currency:{value:"EUR",key:"data.currency"},items:{loop:["nested",{condition:function(e){return o(e)&&"product"===e.entity},map:{item_id:"data.id",item_name:"data.name",quantity:{value:1,key:"data.quantity"}}}]}}}},W={order:{complete:K},product:{add:V,view:M}},$=!1,F={marketing:["ad_storage","ad_user_data","ad_personalization"],functional:["analytics_storage"]},J={type:"google-gtag",config:{settings:{}},init:function(n){var r=n.config,a=n.env,o=r.settings,i=void 0===o?{}:o,c=r.loadScript,u=i.ga4,s=i.ads,d=i.gtm;return(null==u?void 0:u.measurementId)&&function(n,r,a){var o=l(a),i=o.window,c=o.document,u=n.measurementId,s=n.transport_url,d=n.server_container_url,p=n.pageview;if(u){r&&e(u,void 0,c),t(i);var _={};s&&(_.transport_url=s),d&&(_.server_container_url=d),!1===p&&(_.send_page_view=!1);var f=i.gtag;f("js",new Date),f("config",u,_)}}(u,c,a),(null==s?void 0:s.conversionId)&&function(n,r,a){var o=l(a),i=o.window,c=o.document,u=n.conversionId;if(u){n.currency||(n.currency="EUR"),r&&e(u,void 0,c),t(i);var s=i.gtag;s("js",new Date),s("config",u)}}(s,c,a),(null==d?void 0:d.containerId)&&function(e,t,n){var r=l(n),a=r.window,o=r.document,i=e.containerId,c=e.dataLayer,u=e.domain,s=c||X;s===X?a.dataLayer=a.dataLayer||[]:a[s]=a[s]||[],a[s].push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),t&&i&&f(i,u||C,s,o)}(d,c,a),!!((null==u?void 0:u.measurementId)||(null==s?void 0:s.conversionId)||(null==d?void 0:d.containerId))&&r},push:function(e,t){return _async_to_generator(function(e,t){var n,r,a,i,c,u,s,d,f,g,y,v,m,b,h;return _ts_generator(this,function(w){switch(w.label){case 0:return n=t.config,r=t.mapping,a=void 0===r?{}:r,i=t.data,c=t.env,u=t.collector,s=n.settings,f=(d=void 0===s?{}:s).ga4,g=d.ads,y=d.gtm,v=a.settings||{},[4,p(e,i,n,f,u)];case 1:return m=w.sent(),[4,p(e,i,n,g,u)];case 2:return b=w.sent(),[4,p(e,i,n,y,u)];case 3:return h=w.sent(),(null==f?void 0:f.measurementId)&&_(e,f,v.ga4,m,c),(null==g?void 0:g.conversionId)&&a.name&&function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,c=t.conversionId,u=t.currency,s=o(r)?r:{},d=n.label||a;if(d){var p=_object_spread({send_to:"".concat(c,"/").concat(d),currency:u||"EUR"},s);(0,l(i).window.gtag)("event","conversion",p)}}(e,g,v.ads,b,a.name,c),(null==y?void 0:y.containerId)&&function(e,t){var n=arguments.length>3?arguments[3]:void 0,r=l(arguments.length>4?arguments[4]:void 0).window,a={event:e.name};r.dataLayer.push(_object_spread({},a,o(n)?n:e))}(e,y,v.gtm,h,c),[2]}})}).apply(this,arguments)},on:function(e,n){var r;if("consent"===e&&n){var a=n,o=((null===(r=this.config)||void 0===r?void 0:r.settings)||{}).como,i=void 0===o||o;if(i){var c=l(this.env).window,u=t(c);if(u){var s=!0===i?F:i;if(!$){var d=new Set;if(Object.values(s).forEach(function(e){(Array.isArray(e)?e:[e]).forEach(function(e){return d.add(e)})}),d.size>0){var p={};d.forEach(function(e){p[e]="denied"}),u("consent","default",p)}$=!0}var _={};Object.entries(a).forEach(function(e){var t=_sliced_to_array(e,2),n=t[0],r=t[1],a=s[n];if(a){var o=Array.isArray(a)?a:[a],i=r?"granted":"denied";o.forEach(function(e){_[e]=i})}}),0!==Object.keys(_).length&&u("consent","update",_)}}}}},Q=J;return G=E,function(e,t,n,r){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var a=!0,o=!1,i=void 0;try{for(var c,u=function(){var a=c.value;O.call(e,a)||a===n||h(e,a,{get:function(){return t[a]},enumerable:!(r=w(t,a))||r.enumerable})},s=j(t)[Symbol.iterator]();!(a=(c=s.next()).done);a=!0)u()}catch(e){o=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(o)throw i}}}return e}(h({},"__esModule",{value:!0}),G)}();
|
|
1
|
+
"use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _assert_this_initialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function asyncGeneratorStep(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,a)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){asyncGeneratorStep(i,n,a,o,s,"next",e)}function s(e){asyncGeneratorStep(i,n,a,o,s,"throw",e)}o(void 0)})}}function _call_super(e,t,r){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,r||[],_get_prototype_of(e).constructor):t.apply(e,r))}function _class_call_check(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _construct(e,t,r){return _construct=_is_native_reflect_construct()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&_set_prototype_of(a,r.prototype),a},_construct.apply(null,arguments)}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _create_class(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _get_prototype_of(e){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_get_prototype_of(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _is_native_function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,a=_object_without_properties_loose(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,a={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}function _possible_constructor_return(e,t){return!t||"object"!==_type_of(t)&&"function"!=typeof t?_assert_this_initialized(e):t}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_set_prototype_of(e,t)}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}}function _wrap_native_super(e){var t="function"==typeof Map?new Map:void 0;return _wrap_native_super=function(e){if(null===e||!_is_native_function(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _construct(e,arguments,_get_prototype_of(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(r,e)},_wrap_native_super(e)}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}function _ts_generator(e,t){var r,n,a,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&s[0]?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(6===s[0]&&i.label<a[1]){i.label=a[1],a=s;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(s);break}a[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var Destination=function(){var e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"https://www.googletagmanager.com/gtag/js?id=",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:globalThis.document;if(!re.has(e)){var n=r.createElement("script");n.src=t+e,r.head.appendChild(n),re.add(e)}},t=function(e){var t=e;return t.dataLayer=t.dataLayer||[],t.gtag||(t.gtag=function(){t.dataLayer.push(arguments)}),t.gtag},r=function(e){_e=e},n=function(){return _e},a=function(e,t){var r=n(),a=fe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===de?void 0:de].filter(function(e){return!!e})});e.common.issues.push(a)},i=function(e){if(!e)return{};var t=e.errorMap,r=e.invalid_type_error,n=e.required_error,a=e.description;if(t&&(r||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:a};return{errorMap:function(t,a){var i,o,s=e.message;return"invalid_enum_value"===t.code?{message:null!=s?s:a.defaultError}:void 0===a.data?{message:null!==(i=null!=s?s:n)&&void 0!==i?i:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(o=null!=s?s:r)&&void 0!==o?o:a.defaultError}},description:a}},o=function(e){var t="[0-5]\\d";e.precision?t="".concat(t,"\\.\\d{").concat(e.precision,"}"):null==e.precision&&(t="".concat(t,"(\\.\\d+)?"));var r=e.precision?"+":"?";return"([01]\\d|2[0-3]):[0-5]\\d(:".concat(t,")").concat(r)},s=function(e){return new RegExp("^".concat(o(e),"$"))},u=function(e){var t="".concat($e,"T").concat(o(e)),r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t="".concat(t,"(").concat(r.join("|"),")"),new RegExp("^".concat(t,"$"))},c=function(e,t){return!("v4"!==t&&t||!Re.test(e))||!("v6"!==t&&t||!Le.test(e))},l=function(e,t){if(!Ce.test(e))return!1;try{var r=_sliced_to_array(e.split("."),1)[0];if(!r)return!1;var n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(n));return"object"===(void 0===a?"undefined":_type_of(a))&&null!==a&&((!("typ"in a)||"JWT"===(null==a?void 0:a.typ))&&(!!a.alg&&(!t||a.alg===t)))}catch(e){return!1}},d=function(e,t){return!("v4"!==t&&t||!Me.test(e))||!("v6"!==t&&t||!ze.test(e))},_=function(e,t){var r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,a=r>n?r:n;return Number.parseInt(e.toFixed(a).replace(".",""))%Number.parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)},f=function(e,t){return new vt(_object_spread({values:e,typeName:Pt.ZodEnum},i(t)))},p=function(e,t){var r="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof r?{message:r}:r},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return e?Je.create().superRefine(function(n,a){var i=e(n);if(_instanceof(i,Promise))return i.then(function(e){if(!e){var i,o,s=p(t,n),u=null===(o=null!==(i=s.fatal)&&void 0!==i?i:r)||void 0===o||o;a.addIssue(_object_spread_props(_object_spread({code:"custom"},s),{fatal:u}))}});if(!i){var o,s,u=p(t,n),c=null===(s=null!==(o=u.fatal)&&void 0!==o?o:r)||void 0===s||s;a.addIssue(_object_spread_props(_object_spread({code:"custom"},u),{fatal:c}))}}):Je.create()},v=function(e,t,r,n){(null==n?void 0:n.errorMessages)&&r&&(e.errorMessage=_object_spread_props(_object_spread({},e.errorMessage),_define_property({},t,r)))},y=function(e,t,r,n,a){e[t]=r,v(e,t,n,a)},m=function(e){if("openAi"!==e.target)return{};var t=_to_consumable_array(e.basePath).concat([e.definitionPath,e.openAiAnyTypeName]);return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:"relative"===e.$refStrategy?kr(t,e.currentPath):t.join("/")}},g=function(e,t){return Nr(e.type._def,t)},b=function(e,t){var r={type:"string"};if(e.checks){var n=!0,a=!1,i=void 0;try{for(var o,s=e.checks[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;switch(u.kind){case"min":y(r,"minLength","number"==typeof r.minLength?Math.max(r.minLength,u.value):u.value,u.message,t);break;case"max":y(r,"maxLength","number"==typeof r.maxLength?Math.min(r.maxLength,u.value):u.value,u.message,t);break;case"email":switch(t.emailStrategy){case"format:email":w(r,"email",u.message,t);break;case"format:idn-email":w(r,"idn-email",u.message,t);break;case"pattern:zod":x(r,Or.email,u.message,t)}break;case"url":w(r,"uri",u.message,t);break;case"uuid":w(r,"uuid",u.message,t);break;case"regex":x(r,u.regex,u.message,t);break;case"cuid":x(r,Or.cuid,u.message,t);break;case"cuid2":x(r,Or.cuid2,u.message,t);break;case"startsWith":x(r,RegExp("^".concat(k(u.value,t))),u.message,t);break;case"endsWith":x(r,RegExp("".concat(k(u.value,t),"$")),u.message,t);break;case"datetime":w(r,"date-time",u.message,t);break;case"date":w(r,"date",u.message,t);break;case"time":w(r,"time",u.message,t);break;case"duration":w(r,"duration",u.message,t);break;case"length":y(r,"minLength","number"==typeof r.minLength?Math.max(r.minLength,u.value):u.value,u.message,t),y(r,"maxLength","number"==typeof r.maxLength?Math.min(r.maxLength,u.value):u.value,u.message,t);break;case"includes":x(r,RegExp(k(u.value,t)),u.message,t);break;case"ip":"v6"!==u.version&&w(r,"ipv4",u.message,t),"v4"!==u.version&&w(r,"ipv6",u.message,t);break;case"base64url":x(r,Or.base64url,u.message,t);break;case"jwt":x(r,Or.jwt,u.message,t);break;case"cidr":"v6"!==u.version&&x(r,Or.ipv4Cidr,u.message,t),"v4"!==u.version&&x(r,Or.ipv6Cidr,u.message,t);break;case"emoji":x(r,Or.emoji(),u.message,t);break;case"ulid":x(r,Or.ulid,u.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":w(r,"binary",u.message,t);break;case"contentEncoding:base64":y(r,"contentEncoding","base64",u.message,t);break;case"pattern:zod":x(r,Or.base64,u.message,t)}break;case"nanoid":x(r,Or.nanoid,u.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:(function(){})()}}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}}return r},k=function(e,t){return"escape"===t.patternStrategy?j(e):e},j=function(e){for(var t="",r=0;r<e.length;r++)Zr.has(e[r])||(t+="\\"),t+=e[r];return t},w=function(e,t,r,n){var a;e.format||(null===(a=e.anyOf)||void 0===a?void 0:a.some(function(e){return e.format}))?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push(_object_spread({format:e.format},e.errorMessage&&n.errorMessages&&{errorMessage:{format:e.errorMessage.format}})),delete e.format,e.errorMessage&&(delete e.errorMessage.format,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.anyOf.push(_object_spread({format:t},r&&n.errorMessages&&{errorMessage:{format:r}}))):y(e,"format",t,r,n)},x=function(e,t,r,n){var a;e.pattern||(null===(a=e.allOf)||void 0===a?void 0:a.some(function(e){return e.pattern}))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push(_object_spread({pattern:e.pattern},e.errorMessage&&n.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}})),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.allOf.push(_object_spread({pattern:S(t,n)},r&&n.errorMessages&&{errorMessage:{pattern:r}}))):y(e,"pattern",S(t,n),r,n)},S=function(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;for(var r=e.flags.includes("i"),n=e.flags.includes("m"),a=e.flags.includes("s"),i=r?e.source.toLowerCase():e.source,o="",s=!1,u=!1,c=!1,l=0;l<i.length;l++)if(s)o+=i[l],s=!1;else{if(r)if(u){if(i[l].match(/[a-z]/)){var d;c?(o+=i[l],o+="".concat(i[l-2],"-").concat(i[l]).toUpperCase(),c=!1):"-"===i[l+1]&&(null===(d=i[l+2])||void 0===d?void 0:d.match(/[a-z]/))?(o+=i[l],c=!0):o+="".concat(i[l]).concat(i[l].toUpperCase());continue}}else if(i[l].match(/[a-z]/)){o+="[".concat(i[l]).concat(i[l].toUpperCase(),"]");continue}if(n){if("^"===i[l]){o+="(^|(?<=[\r\n]))";continue}if("$"===i[l]){o+="($|(?=[\r\n]))";continue}}a&&"."===i[l]?o+=u?"".concat(i[l],"\r\n"):"[".concat(i[l],"\r\n]"):(o+=i[l],"\\"===i[l]?s=!0:u&&"]"===i[l]?u=!1:u||"["!==i[l]||(u=!0))}try{new RegExp(o)}catch(r){return console.warn("Could not convert regex pattern at ".concat(t.currentPath.join("/")," to a flag-independent form! Falling back to the flag-ignorant source")),e.source}return o},O=function(e,t){var r,n,a,i,o,s,u;if("openAi"===t.target&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),"openApi3"===t.target&&(null===(r=e.keyType)||void 0===r?void 0:r._def.typeName)===Pt.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce(function(r,n){var a;return _object_spread_props(_object_spread({},r),_define_property({},n,null!==(a=Nr(e.valueType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["properties",n])})))&&void 0!==a?a:m(t)))},{}),additionalProperties:t.rejectedAdditionalProperties};var c={type:"object",additionalProperties:null!==(u=Nr(e.valueType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["additionalProperties"])})))&&void 0!==u?u:t.allowedAdditionalProperties};if("openApi3"===t.target)return c;if((null===(n=e.keyType)||void 0===n?void 0:n._def.typeName)===Pt.ZodString&&(null===(a=e.keyType._def.checks)||void 0===a?void 0:a.length)){var l=b(e.keyType._def,t),d=(l.type,_object_without_properties(l,["type"]));return _object_spread_props(_object_spread({},c),{propertyNames:d})}if((null===(i=e.keyType)||void 0===i?void 0:i._def.typeName)===Pt.ZodEnum)return _object_spread_props(_object_spread({},c),{propertyNames:{enum:e.keyType._def.values}});if((null===(o=e.keyType)||void 0===o?void 0:o._def.typeName)===Pt.ZodBranded&&e.keyType._def.type._def.typeName===Pt.ZodString&&(null===(s=e.keyType._def.type._def.checks)||void 0===s?void 0:s.length)){var _=g(e.keyType._def,t),f=(_.type,_object_without_properties(_,["type"]));return _object_spread_props(_object_spread({},c),{propertyNames:f})}return c},Z=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return Nr(e.catchall._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["additionalProperties"])}));switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}},A=function(e){try{return e.isOptional()}catch(e){return!0}},P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r=_object_spread({},Br,r);var n=Object.entries(t).reduce(function(t,n){var a=_sliced_to_array(n,2),i=a[0],o=a[1],s=e[i];return r.merge&&Array.isArray(s)&&Array.isArray(o)?t[i]=o.reduce(function(e,t){return e.includes(t)?e:_to_consumable_array(e).concat([t])},_to_consumable_array(s)):(r.extend||i in e)&&(t[i]=o),t},{});return r.shallow?_object_spread({},e,n):(Object.assign(e,n),e)},T=function(e){return Array.isArray(e)},N=function(e){return void 0!==e},C=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!T(e)&&"[object Object]"===Object.prototype.toString.call(e)},E=function(e){return"string"==typeof e},I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"entity action",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.timestamp||(new Date).setHours(0,13,37,0),n={data:{id:"ers",name:"Everyday Ruck Snack",color:"black",size:"l",price:420}},a={data:{id:"cc",name:"Cool Cap",size:"one size",price:42}};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.timestamp||(new Date).setHours(0,13,37,0),r=e.group||"gr0up",n=e.count||1,a=P({name:"entity action",data:{string:"foo",number:1,boolean:!0,array:[0,"text",!1],not:void 0},context:{dev:["test",1]},globals:{lang:"elb"},custom:{completely:"random"},user:{id:"us3r",device:"c00k13",session:"s3ss10n"},nested:[{entity:"child",data:{is:"subordinated"},nested:[],context:{element:["child",0]}}],consent:{functional:!0},id:"".concat(t,"-").concat(r,"-").concat(n),trigger:"test",entity:"entity",action:"action",timestamp:t,timing:3.14,group:r,count:n,version:{source:"0.2.1",tagging:1},source:{type:"web",id:"https://localhost:80",previous_id:"http://remotehost:9001"}},e,{merge:!1});if(e.name){var i,o=_sliced_to_array(null!==(i=e.name.split(" "))&&void 0!==i?i:[],2),s=o[0],u=o[1];s&&u&&(a.entity=s,a.action=u)}return a}(_object_spread_props(_object_spread({},{"cart view":{data:{currency:"EUR",value:2*n.data.price},context:{shopping:["cart",0]},globals:{pagegroup:"shop"},nested:[{entity:"product",data:_object_spread_props(_object_spread({},n.data),{quantity:2}),context:{shopping:["cart",0]},nested:[]}],trigger:"load"},"checkout view":{data:{step:"payment",currency:"EUR",value:n.data.price+a.data.price},context:{shopping:["checkout",0]},globals:{pagegroup:"shop"},nested:[_object_spread_props(_object_spread({entity:"product"},n),{context:{shopping:["checkout",0]},nested:[]}),_object_spread_props(_object_spread({entity:"product"},a),{context:{shopping:["checkout",0]},nested:[]})],trigger:"load"},"order complete":{data:{id:"0rd3r1d",currency:"EUR",shipping:5.22,taxes:73.76,total:555},context:{shopping:["complete",0]},globals:{pagegroup:"shop"},nested:[_object_spread_props(_object_spread({entity:"product"},n),{context:{shopping:["complete",0]},nested:[]}),_object_spread_props(_object_spread({entity:"product"},a),{context:{shopping:["complete",0]},nested:[]}),{entity:"gift",data:{name:"Surprise"},context:{shopping:["complete",0]},nested:[]}],trigger:"load"},"page view":{data:{domain:"www.example.com",title:"walkerOS documentation",referrer:"https://www.elbwalker.com/",search:"?foo=bar",hash:"#hash",id:"/docs/"},globals:{pagegroup:"docs"},trigger:"load"},"product add":_object_spread_props(_object_spread({},n),{context:{shopping:["intent",0]},globals:{pagegroup:"shop"},nested:[],trigger:"click"}),"product view":_object_spread_props(_object_spread({},n),{context:{shopping:["detail",0]},globals:{pagegroup:"shop"},nested:[],trigger:"load"}),"product visible":{data:_object_spread_props(_object_spread({},n.data),{position:3,promo:!0}),context:{shopping:["discover",0]},globals:{pagegroup:"shop"},nested:[],trigger:"load"},"promotion visible":{data:{name:"Setting up tracking easily",position:"hero"},context:{ab_test:["engagement",0]},globals:{pagegroup:"homepage"},trigger:"visible"},"session start":{data:{id:"s3ss10n",start:r,isNew:!0,count:1,runs:1,isStart:!0,storage:!0,referrer:"",device:"c00k13"},user:{id:"us3r",device:"c00k13",session:"s3ss10n",hash:"h4sh",address:"street number",email:"user@example.com",phone:"+49 123 456 789",userAgent:"Mozilla...",browser:"Chrome",browserVersion:"90",deviceType:"desktop",language:"de-DE",country:"DE",region:"HH",city:"Hamburg",zip:"20354",timezone:"Berlin",os:"walkerOS",osVersion:"1.0",screenSize:"1337x420",ip:"127.0.0.0",internal:!0,custom:"value"}}}[e],t),{name:e}))},R=function(e){return qr(e)?e:void 0},M=function(e,t,r){return function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return _async_to_generator(function(){var n;return _ts_generator(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,4,6]),[4,e.apply(void 0,_to_consumable_array(a))];case 1:case 3:return[2,i.sent()];case 2:return n=i.sent(),t?[4,t(n)]:[2];case 4:return[4,null==r?void 0:r()];case 5:return i.sent(),[7];case 6:return[2]}})})()}},L=function(e){return _async_to_generator(function(e){var t,r,n,a,i,o,s,u,c,l,d,_,f,p=arguments;return _ts_generator(this,function(h){switch(h.label){case 0:if(t=p.length>1&&void 0!==p[1]?p[1]:{},r=p.length>2&&void 0!==p[2]?p[2]:{},!N(e))return[2];a=C(e)&&e.consent||r.consent||(null===(n=r.collector)||void 0===n?void 0:n.consent),i=T(t)?t:[t],o=!0,s=!1,u=void 0,h.label=1;case 1:h.trys.push([1,6,7,8]),c=i[Symbol.iterator](),h.label=2;case 2:return(o=(l=c.next()).done)?[3,5]:(d=l.value,[4,M(Wr)(e,d,_object_spread_props(_object_spread({},r),{consent:a}))]);case 3:if(_=h.sent(),N(_))return[2,_];h.label=4;case 4:return o=!0,[3,2];case 5:return[3,8];case 6:return f=h.sent(),s=!0,u=f,[3,8];case 7:try{o||null==c.return||c.return()}finally{if(s)throw u}return[7];case 8:return[2]}})}).apply(this,arguments)},z=function(e){return _object_spread({window:"undefined"!=typeof window?window:globalThis.window,document:"undefined"!=typeof document?document:globalThis.document},e)},F=function(e,t,r,n,a){return _async_to_generator(function(){var i,o,s,u,c,l,d;return _ts_generator(this,function(_){switch(_.label){case 0:return i=C(t)?t:{},r.data?[4,L(e,r.data,{collector:a})]:[3,2];case 1:return s=_.sent(),[3,3];case 2:s={},_.label=3;case 3:return o=s,(null==n?void 0:n.data)?[4,L(e,n.data,{collector:a})]:[3,5];case 4:return c=_.sent(),[3,6];case 5:c={},_.label=6;case 6:return u=c,l=C(o)?o:{},d=C(u)?u:{},[2,P(P(i,l),d)]}})})()},D=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,a=z(arguments.length>4?arguments[4]:void 0).window;if(t.measurementId){var i=C(n)?n:{},o=function(e,t){var r={};return t.includes("all")&&(t=["context","data","event","globals","source","user","version"]),t.forEach(function(t){var n=e[t]||{};"event"==t&&(n={id:e.id,timing:e.timing,trigger:e.trigger,entity:e.entity,action:e.action,group:e.group,count:e.count}),Object.entries(n).forEach(function(e){var n=_sliced_to_array(e,2),a=n[0],i=n[1];"context"==t&&(i=i[0]),r["".concat(t,"_").concat(a)]=i})}),r}(e,r.include||t.include||["data"]),s=_object_spread({},o,i),u=e.name;!1!==t.snakeCase&&(u=function(e){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:e.replace(/\s+/g,"_").toLowerCase()}(u)),s.send_to=t.measurementId,t.debug&&(s.debug_mode=!0),(0,a.gtag)("event",u,s)}},$=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:globalThis.document,a=r!=Xr?"&l="+r:"",i=n.createElement("script");i.src=t+e+a,n.head.appendChild(i)},U=function(){var e=I("order complete");return["event","purchase",{transaction_id:e.data.id,value:e.data.total,tax:e.data.taxes,shipping:e.data.shipping,currency:"EUR",items:e.nested.filter(function(e){return"product"===e.entity}).map(function(e){return{item_id:e.data.id,item_name:e.data.name,quantity:1}}),send_to:"G-XXXXXX-1"}]},V=function(){var e=I("product add");return["event","add_to_cart",{currency:"EUR",value:e.data.price,items:[{item_id:e.data.id,item_variant:e.data.color,quantity:1}],send_to:"G-XXXXXX-1"}]},B=function(){var e=I("order complete");return["event","conversion",{send_to:"AW-XXXXXXXXX/CONVERSION_LABEL",currency:"EUR",value:e.data.total,transaction_id:e.data.id}]},K=function(){var e=I("product view");return{event:"product_view",product_id:e.data.id,product_name:e.data.name,product_category:e.data.category,value:e.data.price,currency:"EUR"}},q=function(){_n=!1},W=Object.defineProperty,X=Object.getOwnPropertyDescriptor,G=Object.getOwnPropertyNames,H=Object.prototype.hasOwnProperty,J=function(e,t){for(var r in t)W(e,r,{get:t[r],enumerable:!0})},Y={};J(Y,{DestinationGtag:function(){return Hr},default:function(){return hn},destinationGtag:function(){return pn},examples:function(){return Jr},resetConsentState:function(){return q}});var Q,ee,te,re=new Set,ne={};J(ne,{BRAND:function(){return St},DIRTY:function(){return ye},EMPTY_PATH:function(){return pe},INVALID:function(){return ve},NEVER:function(){return yr},OK:function(){return me},ParseStatus:function(){return he},Schema:function(){return Oe},ZodAny:function(){return Je},ZodArray:function(){return tt},ZodBigInt:function(){return Ke},ZodBoolean:function(){return qe},ZodBranded:function(){return Ot},ZodCatch:function(){return wt},ZodDate:function(){return We},ZodDefault:function(){return jt},ZodDiscriminatedUnion:function(){return ot},ZodEffects:function(){return gt},ZodEnum:function(){return vt},ZodError:function(){return ue},ZodFirstPartyTypeKind:function(){return Pt},ZodFunction:function(){return ft},ZodIntersection:function(){return ut},ZodIssueCode:function(){return oe},ZodLazy:function(){return pt},ZodLiteral:function(){return ht},ZodMap:function(){return dt},ZodNaN:function(){return xt},ZodNativeEnum:function(){return yt},ZodNever:function(){return Qe},ZodNull:function(){return He},ZodNullable:function(){return kt},ZodNumber:function(){return Be},ZodObject:function(){return nt},ZodOptional:function(){return bt},ZodParsedType:function(){return ae},ZodPipeline:function(){return Zt},ZodPromise:function(){return mt},ZodReadonly:function(){return At},ZodRecord:function(){return lt},ZodSchema:function(){return Oe},ZodSet:function(){return _t},ZodString:function(){return Ve},ZodSymbol:function(){return Xe},ZodTransformer:function(){return gt},ZodTuple:function(){return ct},ZodType:function(){return Oe},ZodUndefined:function(){return Ge},ZodUnion:function(){return at},ZodUnknown:function(){return Ye},ZodVoid:function(){return et},addIssueToContext:function(){return a},any:function(){return Ut},array:function(){return qt},bigint:function(){return Mt},boolean:function(){return Lt},coerce:function(){return vr},custom:function(){return h},date:function(){return zt},datetimeRegex:function(){return u},defaultErrorMap:function(){return de},discriminatedUnion:function(){return Ht},effect:function(){return ur},enum:function(){return ir},function:function(){return rr},getErrorMap:function(){return n},getParsedType:function(){return ie},instanceof:function(){return Ct},intersection:function(){return Jt},isAborted:function(){return ge},isAsync:function(){return je},isDirty:function(){return be},isValid:function(){return ke},late:function(){return Nt},lazy:function(){return nr},literal:function(){return ar},makeIssue:function(){return fe},map:function(){return er},nan:function(){return Rt},nativeEnum:function(){return or},never:function(){return Bt},null:function(){return $t},nullable:function(){return lr},number:function(){return It},object:function(){return Wt},objectUtil:function(){return te},oboolean:function(){return hr},onumber:function(){return pr},optional:function(){return cr},ostring:function(){return fr},pipeline:function(){return _r},preprocess:function(){return dr},promise:function(){return sr},quotelessJson:function(){return se},record:function(){return Qt},set:function(){return tr},setErrorMap:function(){return r},strictObject:function(){return Xt},string:function(){return Et},symbol:function(){return Ft},transformer:function(){return ur},tuple:function(){return Yt},undefined:function(){return Dt},union:function(){return Gt},unknown:function(){return Vt},util:function(){return Q},void:function(){return Kt}}),(ee=Q||(Q={})).assertEqual=function(e){},ee.assertIs=function(e){},ee.assertNever=function(e){throw new Error},ee.arrayToEnum=function(e){var t={},r=!0,n=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(r=(i=o.next()).done);r=!0){var s=i.value;t[s]=s}}catch(e){n=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw a}}return t},ee.getValidEnumValues=function(e){var t=ee.objectKeys(e).filter(function(t){return"number"!=typeof e[e[t]]}),r={},n=!0,a=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;r[u]=e[u]}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return ee.objectValues(r)},ee.objectValues=function(e){return ee.objectKeys(e).map(function(t){return e[t]})},ee.objectKeys="function"==typeof Object.keys?function(e){return Object.keys(e)}:function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},ee.find=function(e,t){var r=!0,n=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(r=(i=o.next()).done);r=!0){var s=i.value;if(t(s))return s}}catch(e){n=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw a}}},ee.isInteger="function"==typeof Number.isInteger?function(e){return Number.isInteger(e)}:function(e){return"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e},ee.joinValues=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" | ";return e.map(function(e){return"string"==typeof e?"'".concat(e,"'"):e}).join(t)},ee.jsonStringifyReplacer=function(e,t){return"bigint"===(void 0===t?"undefined":_type_of(t))?t.toString():t},(te||(te={})).mergeShapes=function(e,t){return _object_spread({},e,t)};var ae=Q.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ie=function(e){switch(void 0===e?"undefined":_type_of(e)){case"undefined":return ae.undefined;case"string":return ae.string;case"number":return Number.isNaN(e)?ae.nan:ae.number;case"boolean":return ae.boolean;case"function":return ae.function;case"bigint":return ae.bigint;case"symbol":return ae.symbol;case"object":return Array.isArray(e)?ae.array:null===e?ae.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?ae.promise:"undefined"!=typeof Map&&_instanceof(e,Map)?ae.map:"undefined"!=typeof Set&&_instanceof(e,Set)?ae.set:"undefined"!=typeof Date&&_instanceof(e,Date)?ae.date:ae.object;default:return ae.unknown}},oe=Q.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),se=function(e){return JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:")},ue=function(e){function t(e){var r;_class_call_check(this,t),(r=_call_super(this,t)).issues=[],r.addIssue=function(e){r.issues=_to_consumable_array(r.issues).concat([e])},r.addIssues=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];r.issues=_to_consumable_array(r.issues).concat(_to_consumable_array(e))};var n=(_instanceof(this,t)?this.constructor:void 0).prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,n):r.__proto__=n,r.name="ZodError",r.issues=e,r}return _inherits(t,e),_create_class(t,[{key:"errors",get:function(){return this.issues}},{key:"format",value:function(e){var t=e||function(e){return e.message},r={_errors:[]},n=function(e){var a=!0,i=!1,o=void 0;try{for(var s,u=e.issues[Symbol.iterator]();!(a=(s=u.next()).done);a=!0){var c=s.value;if("invalid_union"===c.code)c.unionErrors.map(n);else if("invalid_return_type"===c.code)n(c.returnTypeError);else if("invalid_arguments"===c.code)n(c.argumentsError);else if(0===c.path.length)r._errors.push(t(c));else for(var l=r,d=0;d<c.path.length;){var _=c.path[d];d===c.path.length-1?(l[_]=l[_]||{_errors:[]},l[_]._errors.push(t(c))):l[_]=l[_]||{_errors:[]},l=l[_],d++}}}catch(e){i=!0,o=e}finally{try{a||null==u.return||u.return()}finally{if(i)throw o}}};return n(this),r}},{key:"toString",value:function(){return this.message}},{key:"message",get:function(){return JSON.stringify(this.issues,Q.jsonStringifyReplacer,2)}},{key:"isEmpty",get:function(){return 0===this.issues.length}},{key:"flatten",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e.message},t={},r=[],n=!0,a=!1,i=void 0;try{for(var o,s=this.issues[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;if(u.path.length>0){var c=u.path[0];t[c]=t[c]||[],t[c].push(e(u))}else r.push(e(u))}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return{formErrors:r,fieldErrors:t}}},{key:"formErrors",get:function(){return this.flatten()}}],[{key:"assert",value:function(e){if(!_instanceof(e,t))throw new Error("Not a ZodError: ".concat(e))}}]),t}(_wrap_native_super(Error));ue.create=function(e){return new ue(e)};var ce,le,de=function(e,t){var r;switch(e.code){case oe.invalid_type:r=e.received===ae.undefined?"Required":"Expected ".concat(e.expected,", received ").concat(e.received);break;case oe.invalid_literal:r="Invalid literal value, expected ".concat(JSON.stringify(e.expected,Q.jsonStringifyReplacer));break;case oe.unrecognized_keys:r="Unrecognized key(s) in object: ".concat(Q.joinValues(e.keys,", "));break;case oe.invalid_union:r="Invalid input";break;case oe.invalid_union_discriminator:r="Invalid discriminator value. Expected ".concat(Q.joinValues(e.options));break;case oe.invalid_enum_value:r="Invalid enum value. Expected ".concat(Q.joinValues(e.options),", received '").concat(e.received,"'");break;case oe.invalid_arguments:r="Invalid function arguments";break;case oe.invalid_return_type:r="Invalid function return type";break;case oe.invalid_date:r="Invalid date";break;case oe.invalid_string:"object"===_type_of(e.validation)?"includes"in e.validation?(r='Invalid input: must include "'.concat(e.validation.includes,'"'),"number"==typeof e.validation.position&&(r="".concat(r," at one or more positions greater than or equal to ").concat(e.validation.position))):"startsWith"in e.validation?r='Invalid input: must start with "'.concat(e.validation.startsWith,'"'):"endsWith"in e.validation?r='Invalid input: must end with "'.concat(e.validation.endsWith,'"'):Q.assertNever(e.validation):r="regex"!==e.validation?"Invalid ".concat(e.validation):"Invalid";break;case oe.too_small:r="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)"):"number"===e.type||"bigint"===e.type?"Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum):"date"===e.type?"Date must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(e.minimum))):"Invalid input";break;case oe.too_big:r="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)"):"number"===e.type?"Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"bigint"===e.type?"BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"date"===e.type?"Date must be ".concat(e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(e.maximum))):"Invalid input";break;case oe.custom:r="Invalid input";break;case oe.invalid_intersection_types:r="Intersection results could not be merged";break;case oe.not_multiple_of:r="Number must be a multiple of ".concat(e.multipleOf);break;case oe.not_finite:r="Number must be finite";break;default:r=t.defaultError,Q.assertNever(e)}return{message:r}},_e=de,fe=function(e){var t=e.data,r=e.path,n=e.errorMaps,a=e.issueData,i=_to_consumable_array(r).concat(_to_consumable_array(a.path||[])),o=_object_spread_props(_object_spread({},a),{path:i});if(void 0!==a.message)return _object_spread_props(_object_spread({},a),{path:i,message:a.message});var s="",u=n.filter(function(e){return!!e}).slice().reverse(),c=!0,l=!1,d=void 0;try{for(var _,f=u[Symbol.iterator]();!(c=(_=f.next()).done);c=!0){s=(0,_.value)(o,{data:t,defaultError:s}).message}}catch(e){l=!0,d=e}finally{try{c||null==f.return||f.return()}finally{if(l)throw d}}return _object_spread_props(_object_spread({},a),{path:i,message:s})},pe=[],he=function(){function e(){_class_call_check(this,e),this.value="valid"}return _create_class(e,[{key:"dirty",value:function(){"valid"===this.value&&(this.value="dirty")}},{key:"abort",value:function(){"aborted"!==this.value&&(this.value="aborted")}}],[{key:"mergeArray",value:function(e,t){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;if("aborted"===u.status)return ve;"dirty"===u.status&&e.dirty(),r.push(u.value)}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return{status:e.value,value:r}}},{key:"mergeObjectAsync",value:function(t,r){return _async_to_generator(function(){var n,a,i,o,s,u,c,l,d,_;return _ts_generator(this,function(f){switch(f.label){case 0:n=[],a=!0,i=!1,o=void 0,f.label=1;case 1:f.trys.push([1,7,8,9]),s=r[Symbol.iterator](),f.label=2;case 2:return(a=(u=s.next()).done)?[3,6]:[4,(c=u.value).key];case 3:return l=f.sent(),[4,c.value];case 4:d=f.sent(),n.push({key:l,value:d}),f.label=5;case 5:return a=!0,[3,2];case 6:return[3,9];case 7:return _=f.sent(),i=!0,o=_,[3,9];case 8:try{a||null==s.return||s.return()}finally{if(i)throw o}return[7];case 9:return[2,e.mergeObjectSync(t,n)]}})})()}},{key:"mergeObjectSync",value:function(e,t){var r={},n=!0,a=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value,c=u.key,l=u.value;if("aborted"===c.status)return ve;if("aborted"===l.status)return ve;"dirty"===c.status&&e.dirty(),"dirty"===l.status&&e.dirty(),"__proto__"===c.value||void 0===l.value&&!u.alwaysSet||(r[c.value]=l.value)}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return{status:e.value,value:r}}}]),e}(),ve=Object.freeze({status:"aborted"}),ye=function(e){return{status:"dirty",value:e}},me=function(e){return{status:"valid",value:e}},ge=function(e){return"aborted"===e.status},be=function(e){return"dirty"===e.status},ke=function(e){return"valid"===e.status},je=function(e){return"undefined"!=typeof Promise&&_instanceof(e,Promise)};(le=ce||(ce={})).errToObj=function(e){return"string"==typeof e?{message:e}:e||{}},le.toString=function(e){return"string"==typeof e?e:null==e?void 0:e.message};var we,xe=function(){function e(t,r,n,a){_class_call_check(this,e),this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=a}return _create_class(e,[{key:"path",get:function(){var e,t;this._cachedPath.length||(Array.isArray(this._key)?(e=this._cachedPath).push.apply(e,_to_consumable_array(this._path).concat(_to_consumable_array(this._key))):(t=this._cachedPath).push.apply(t,_to_consumable_array(this._path).concat([this._key])));return this._cachedPath}}]),e}(),Se=function(e,t){if(ke(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;var t=new ue(e.common.issues);return this._error=t,this._error}}},Oe=function(){function e(t){var r=this;_class_call_check(this,e),this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:function(e){return r["~validate"](e)}}}return _create_class(e,[{key:"description",get:function(){return this._def.description}},{key:"_getType",value:function(e){return ie(e.data)}},{key:"_getOrReturnCtx",value:function(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ie(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}},{key:"_processInputParams",value:function(e){return{status:new he,ctx:{common:e.parent.common,data:e.data,parsedType:ie(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}},{key:"_parseSync",value:function(e){var t=this._parse(e);if(je(t))throw new Error("Synchronous parse encountered promise.");return t}},{key:"_parseAsync",value:function(e){var t=this._parse(e);return Promise.resolve(t)}},{key:"parse",value:function(e,t){var r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}},{key:"safeParse",value:function(e,t){var r,n={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ie(e)},a=this._parseSync({data:e,path:n.path,parent:n});return Se(n,a)}},{key:"~validate",value:function(e){var t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ie(e)};if(!this["~standard"].async)try{var r=this._parseSync({data:e,path:[],parent:t});return ke(r)?{value:r.value}:{issues:t.common.issues}}catch(e){var n,a;(null==e||null===(a=e.message)||void 0===a||null===(n=a.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(function(e){return ke(e)?{value:e.value}:{issues:t.common.issues}})}},{key:"parseAsync",value:function(e,t){return _async_to_generator(function(){var r;return _ts_generator(this,function(n){switch(n.label){case 0:return[4,this.safeParseAsync(e,t)];case 1:if((r=n.sent()).success)return[2,r.data];throw r.error}})}).call(this)}},{key:"safeParseAsync",value:function(e,t){return _async_to_generator(function(){var r,n,a;return _ts_generator(this,function(i){switch(i.label){case 0:return r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ie(e)},n=this._parse({data:e,path:r.path,parent:r}),[4,je(n)?n:Promise.resolve(n)];case 1:return a=i.sent(),[2,Se(r,a)]}})}).call(this)}},{key:"refine",value:function(e,t){return this._refinement(function(r,n){var a=e(r),i=function(){return n.addIssue(_object_spread({code:oe.custom},function(e){return"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t}(r)))};return"undefined"!=typeof Promise&&_instanceof(a,Promise)?a.then(function(e){return!!e||(i(),!1)}):!!a||(i(),!1)})}},{key:"refinement",value:function(e,t){return this._refinement(function(r,n){return!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1)})}},{key:"_refinement",value:function(e){return new gt({schema:this,typeName:Pt.ZodEffects,effect:{type:"refinement",refinement:e}})}},{key:"superRefine",value:function(e){return this._refinement(e)}},{key:"optional",value:function(){return bt.create(this,this._def)}},{key:"nullable",value:function(){return kt.create(this,this._def)}},{key:"nullish",value:function(){return this.nullable().optional()}},{key:"array",value:function(){return tt.create(this)}},{key:"promise",value:function(){return mt.create(this,this._def)}},{key:"or",value:function(e){return at.create([this,e],this._def)}},{key:"and",value:function(e){return ut.create(this,e,this._def)}},{key:"transform",value:function(e){return new gt(_object_spread_props(_object_spread({},i(this._def)),{schema:this,typeName:Pt.ZodEffects,effect:{type:"transform",transform:e}}))}},{key:"default",value:function(e){var t="function"==typeof e?e:function(){return e};return new jt(_object_spread_props(_object_spread({},i(this._def)),{innerType:this,defaultValue:t,typeName:Pt.ZodDefault}))}},{key:"brand",value:function(){return new Ot(_object_spread({typeName:Pt.ZodBranded,type:this},i(this._def)))}},{key:"catch",value:function(e){var t="function"==typeof e?e:function(){return e};return new wt(_object_spread_props(_object_spread({},i(this._def)),{innerType:this,catchValue:t,typeName:Pt.ZodCatch}))}},{key:"describe",value:function(e){return new(0,this.constructor)(_object_spread_props(_object_spread({},this._def),{description:e}))}},{key:"pipe",value:function(e){return Zt.create(this,e)}},{key:"readonly",value:function(){return At.create(this)}},{key:"isOptional",value:function(){return this.safeParse(void 0).success}},{key:"isNullable",value:function(){return this.safeParse(null).success}}]),e}(),Ze=/^c[^\s-]{8,}$/i,Ae=/^[0-9a-z]+$/,Pe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Te=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ne=/^[a-z0-9_-]{21}$/i,Ce=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ee=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ie=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Re=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Me=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Le=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ze=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Fe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,De=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,$e="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ue=new RegExp("^".concat($e,"$")),Ve=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ae.string){var t=this._getOrReturnCtx(e);return a(t,{code:oe.invalid_type,expected:ae.string,received:t.parsedType}),ve}var r=new he,n=void 0,i=!0,o=!1,_=void 0;try{for(var f,p=this._def.checks[Symbol.iterator]();!(i=(f=p.next()).done);i=!0){var h=f.value;if("min"===h.kind)e.data.length<h.value&&(n=this._getOrReturnCtx(e,n),a(n,{code:oe.too_small,minimum:h.value,type:"string",inclusive:!0,exact:!1,message:h.message}),r.dirty());else if("max"===h.kind)e.data.length>h.value&&(n=this._getOrReturnCtx(e,n),a(n,{code:oe.too_big,maximum:h.value,type:"string",inclusive:!0,exact:!1,message:h.message}),r.dirty());else if("length"===h.kind){var v=e.data.length>h.value,y=e.data.length<h.value;(v||y)&&(n=this._getOrReturnCtx(e,n),v?a(n,{code:oe.too_big,maximum:h.value,type:"string",inclusive:!0,exact:!0,message:h.message}):y&&a(n,{code:oe.too_small,minimum:h.value,type:"string",inclusive:!0,exact:!0,message:h.message}),r.dirty())}else if("email"===h.kind)Ie.test(e.data)||(n=this._getOrReturnCtx(e,n),a(n,{validation:"email",code:oe.invalid_string,message:h.message}),r.dirty());else if("emoji"===h.kind)we||(we=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),we.test(e.data)||(n=this._getOrReturnCtx(e,n),a(n,{validation:"emoji",code:oe.invalid_string,message:h.message}),r.dirty());else if("uuid"===h.kind)Te.test(e.data)||(n=this._getOrReturnCtx(e,n),a(n,{validation:"uuid",code:oe.invalid_string,message:h.message}),r.dirty());else if("nanoid"===h.kind)Ne.test(e.data)||(n=this._getOrReturnCtx(e,n),a(n,{validation:"nanoid",code:oe.invalid_string,message:h.message}),r.dirty());else if("cuid"===h.kind)Ze.test(e.data)||(n=this._getOrReturnCtx(e,n),a(n,{validation:"cuid",code:oe.invalid_string,message:h.message}),r.dirty());else if("cuid2"===h.kind)Ae.test(e.data)||(n=this._getOrReturnCtx(e,n),a(n,{validation:"cuid2",code:oe.invalid_string,message:h.message}),r.dirty());else if("ulid"===h.kind)Pe.test(e.data)||(n=this._getOrReturnCtx(e,n),a(n,{validation:"ulid",code:oe.invalid_string,message:h.message}),r.dirty());else if("url"===h.kind)try{new URL(e.data)}catch(t){n=this._getOrReturnCtx(e,n),a(n,{validation:"url",code:oe.invalid_string,message:h.message}),r.dirty()}else if("regex"===h.kind){h.regex.lastIndex=0,h.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),a(n,{validation:"regex",code:oe.invalid_string,message:h.message}),r.dirty())}else if("trim"===h.kind)e.data=e.data.trim();else if("includes"===h.kind)e.data.includes(h.value,h.position)||(n=this._getOrReturnCtx(e,n),a(n,{code:oe.invalid_string,validation:{includes:h.value,position:h.position},message:h.message}),r.dirty());else if("toLowerCase"===h.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===h.kind)e.data=e.data.toUpperCase();else if("startsWith"===h.kind)e.data.startsWith(h.value)||(n=this._getOrReturnCtx(e,n),a(n,{code:oe.invalid_string,validation:{startsWith:h.value},message:h.message}),r.dirty());else if("endsWith"===h.kind)e.data.endsWith(h.value)||(n=this._getOrReturnCtx(e,n),a(n,{code:oe.invalid_string,validation:{endsWith:h.value},message:h.message}),r.dirty());else if("datetime"===h.kind){u(h).test(e.data)||(n=this._getOrReturnCtx(e,n),a(n,{code:oe.invalid_string,validation:"datetime",message:h.message}),r.dirty())}else if("date"===h.kind){Ue.test(e.data)||(n=this._getOrReturnCtx(e,n),a(n,{code:oe.invalid_string,validation:"date",message:h.message}),r.dirty())}else if("time"===h.kind){s(h).test(e.data)||(n=this._getOrReturnCtx(e,n),a(n,{code:oe.invalid_string,validation:"time",message:h.message}),r.dirty())}else"duration"===h.kind?Ee.test(e.data)||(n=this._getOrReturnCtx(e,n),a(n,{validation:"duration",code:oe.invalid_string,message:h.message}),r.dirty()):"ip"===h.kind?c(e.data,h.version)||(n=this._getOrReturnCtx(e,n),a(n,{validation:"ip",code:oe.invalid_string,message:h.message}),r.dirty()):"jwt"===h.kind?l(e.data,h.alg)||(n=this._getOrReturnCtx(e,n),a(n,{validation:"jwt",code:oe.invalid_string,message:h.message}),r.dirty()):"cidr"===h.kind?d(e.data,h.version)||(n=this._getOrReturnCtx(e,n),a(n,{validation:"cidr",code:oe.invalid_string,message:h.message}),r.dirty()):"base64"===h.kind?Fe.test(e.data)||(n=this._getOrReturnCtx(e,n),a(n,{validation:"base64",code:oe.invalid_string,message:h.message}),r.dirty()):"base64url"===h.kind?De.test(e.data)||(n=this._getOrReturnCtx(e,n),a(n,{validation:"base64url",code:oe.invalid_string,message:h.message}),r.dirty()):Q.assertNever(h)}}catch(e){o=!0,_=e}finally{try{i||null==p.return||p.return()}finally{if(o)throw _}}return{status:r.value,value:e.data}}},{key:"_regex",value:function(e,t,r){return this.refinement(function(t){return e.test(t)},_object_spread({validation:t,code:oe.invalid_string},ce.errToObj(r)))}},{key:"_addCheck",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([e])}))}},{key:"email",value:function(e){return this._addCheck(_object_spread({kind:"email"},ce.errToObj(e)))}},{key:"url",value:function(e){return this._addCheck(_object_spread({kind:"url"},ce.errToObj(e)))}},{key:"emoji",value:function(e){return this._addCheck(_object_spread({kind:"emoji"},ce.errToObj(e)))}},{key:"uuid",value:function(e){return this._addCheck(_object_spread({kind:"uuid"},ce.errToObj(e)))}},{key:"nanoid",value:function(e){return this._addCheck(_object_spread({kind:"nanoid"},ce.errToObj(e)))}},{key:"cuid",value:function(e){return this._addCheck(_object_spread({kind:"cuid"},ce.errToObj(e)))}},{key:"cuid2",value:function(e){return this._addCheck(_object_spread({kind:"cuid2"},ce.errToObj(e)))}},{key:"ulid",value:function(e){return this._addCheck(_object_spread({kind:"ulid"},ce.errToObj(e)))}},{key:"base64",value:function(e){return this._addCheck(_object_spread({kind:"base64"},ce.errToObj(e)))}},{key:"base64url",value:function(e){return this._addCheck(_object_spread({kind:"base64url"},ce.errToObj(e)))}},{key:"jwt",value:function(e){return this._addCheck(_object_spread({kind:"jwt"},ce.errToObj(e)))}},{key:"ip",value:function(e){return this._addCheck(_object_spread({kind:"ip"},ce.errToObj(e)))}},{key:"cidr",value:function(e){return this._addCheck(_object_spread({kind:"cidr"},ce.errToObj(e)))}},{key:"datetime",value:function(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck(_object_spread({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(r=null==e?void 0:e.local)&&void 0!==r&&r},ce.errToObj(null==e?void 0:e.message)));var t,r}},{key:"date",value:function(e){return this._addCheck({kind:"date",message:e})}},{key:"time",value:function(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck(_object_spread({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision},ce.errToObj(null==e?void 0:e.message)))}},{key:"duration",value:function(e){return this._addCheck(_object_spread({kind:"duration"},ce.errToObj(e)))}},{key:"regex",value:function(e,t){return this._addCheck(_object_spread({kind:"regex",regex:e},ce.errToObj(t)))}},{key:"includes",value:function(e,t){return this._addCheck(_object_spread({kind:"includes",value:e,position:null==t?void 0:t.position},ce.errToObj(null==t?void 0:t.message)))}},{key:"startsWith",value:function(e,t){return this._addCheck(_object_spread({kind:"startsWith",value:e},ce.errToObj(t)))}},{key:"endsWith",value:function(e,t){return this._addCheck(_object_spread({kind:"endsWith",value:e},ce.errToObj(t)))}},{key:"min",value:function(e,t){return this._addCheck(_object_spread({kind:"min",value:e},ce.errToObj(t)))}},{key:"max",value:function(e,t){return this._addCheck(_object_spread({kind:"max",value:e},ce.errToObj(t)))}},{key:"length",value:function(e,t){return this._addCheck(_object_spread({kind:"length",value:e},ce.errToObj(t)))}},{key:"nonempty",value:function(e){return this.min(1,ce.errToObj(e))}},{key:"trim",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:"trim"}])}))}},{key:"toLowerCase",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:"toLowerCase"}])}))}},{key:"toUpperCase",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:"toUpperCase"}])}))}},{key:"isDatetime",get:function(){return!!this._def.checks.find(function(e){return"datetime"===e.kind})}},{key:"isDate",get:function(){return!!this._def.checks.find(function(e){return"date"===e.kind})}},{key:"isTime",get:function(){return!!this._def.checks.find(function(e){return"time"===e.kind})}},{key:"isDuration",get:function(){return!!this._def.checks.find(function(e){return"duration"===e.kind})}},{key:"isEmail",get:function(){return!!this._def.checks.find(function(e){return"email"===e.kind})}},{key:"isURL",get:function(){return!!this._def.checks.find(function(e){return"url"===e.kind})}},{key:"isEmoji",get:function(){return!!this._def.checks.find(function(e){return"emoji"===e.kind})}},{key:"isUUID",get:function(){return!!this._def.checks.find(function(e){return"uuid"===e.kind})}},{key:"isNANOID",get:function(){return!!this._def.checks.find(function(e){return"nanoid"===e.kind})}},{key:"isCUID",get:function(){return!!this._def.checks.find(function(e){return"cuid"===e.kind})}},{key:"isCUID2",get:function(){return!!this._def.checks.find(function(e){return"cuid2"===e.kind})}},{key:"isULID",get:function(){return!!this._def.checks.find(function(e){return"ulid"===e.kind})}},{key:"isIP",get:function(){return!!this._def.checks.find(function(e){return"ip"===e.kind})}},{key:"isCIDR",get:function(){return!!this._def.checks.find(function(e){return"cidr"===e.kind})}},{key:"isBase64",get:function(){return!!this._def.checks.find(function(e){return"base64"===e.kind})}},{key:"isBase64url",get:function(){return!!this._def.checks.find(function(e){return"base64url"===e.kind})}},{key:"minLength",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"min"===o.kind&&(null===e||o.value>e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"maxLength",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"max"===o.kind&&(null===e||o.value<e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}}]),t}(Oe);Ve.create=function(e){var t;return new Ve(_object_spread({checks:[],typeName:Pt.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},i(e)))};var Be=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments)).min=e.gte,e.max=e.lte,e.step=e.multipleOf,e}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ae.number){var t=this._getOrReturnCtx(e);return a(t,{code:oe.invalid_type,expected:ae.number,received:t.parsedType}),ve}var r=void 0,n=new he,i=!0,o=!1,s=void 0;try{for(var u,c=this._def.checks[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var l=u.value;if("int"===l.kind)Q.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),a(r,{code:oe.invalid_type,expected:"integer",received:"float",message:l.message}),n.dirty());else if("min"===l.kind){(l.inclusive?e.data<l.value:e.data<=l.value)&&(r=this._getOrReturnCtx(e,r),a(r,{code:oe.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),n.dirty())}else if("max"===l.kind){(l.inclusive?e.data>l.value:e.data>=l.value)&&(r=this._getOrReturnCtx(e,r),a(r,{code:oe.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),n.dirty())}else"multipleOf"===l.kind?0!==_(e.data,l.value)&&(r=this._getOrReturnCtx(e,r),a(r,{code:oe.not_multiple_of,multipleOf:l.value,message:l.message}),n.dirty()):"finite"===l.kind?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),a(r,{code:oe.not_finite,message:l.message}),n.dirty()):Q.assertNever(l)}}catch(e){o=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(o)throw s}}return{status:n.value,value:e.data}}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,ce.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,ce.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,ce.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,ce.toString(t))}},{key:"setLimit",value:function(e,r,n,a){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:e,value:r,inclusive:n,message:ce.toString(a)}])}))}},{key:"_addCheck",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([e])}))}},{key:"int",value:function(e){return this._addCheck({kind:"int",message:ce.toString(e)})}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ce.toString(t)})}},{key:"finite",value:function(e){return this._addCheck({kind:"finite",message:ce.toString(e)})}},{key:"safe",value:function(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.toString(e)})}},{key:"minValue",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"min"===o.kind&&(null===e||o.value>e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"maxValue",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"max"===o.kind&&(null===e||o.value<e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"isInt",get:function(){return!!this._def.checks.find(function(e){return"int"===e.kind||"multipleOf"===e.kind&&Q.isInteger(e.value)})}},{key:"isFinite",get:function(){var e=null,t=null,r=!0,n=!1,a=void 0;try{for(var i,o=this._def.checks[Symbol.iterator]();!(r=(i=o.next()).done);r=!0){var s=i.value;if("finite"===s.kind||"int"===s.kind||"multipleOf"===s.kind)return!0;"min"===s.kind?(null===t||s.value>t)&&(t=s.value):"max"===s.kind&&(null===e||s.value<e)&&(e=s.value)}}catch(e){n=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw a}}return Number.isFinite(t)&&Number.isFinite(e)}}]),t}(Oe);Be.create=function(e){return new Be(_object_spread({checks:[],typeName:Pt.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1},i(e)))};var Ke=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments)).min=e.gte,e.max=e.lte,e}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(t){return this._getInvalidInput(e)}if(this._getType(e)!==ae.bigint)return this._getInvalidInput(e);var t=void 0,r=new he,n=!0,i=!1,o=void 0;try{for(var s,u=this._def.checks[Symbol.iterator]();!(n=(s=u.next()).done);n=!0){var c=s.value;if("min"===c.kind)(c.inclusive?e.data<c.value:e.data<=c.value)&&(t=this._getOrReturnCtx(e,t),a(t,{code:oe.too_small,type:"bigint",minimum:c.value,inclusive:c.inclusive,message:c.message}),r.dirty());else if("max"===c.kind){(c.inclusive?e.data>c.value:e.data>=c.value)&&(t=this._getOrReturnCtx(e,t),a(t,{code:oe.too_big,type:"bigint",maximum:c.value,inclusive:c.inclusive,message:c.message}),r.dirty())}else"multipleOf"===c.kind?e.data%c.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),a(t,{code:oe.not_multiple_of,multipleOf:c.value,message:c.message}),r.dirty()):Q.assertNever(c)}}catch(e){i=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(i)throw o}}return{status:r.value,value:e.data}}},{key:"_getInvalidInput",value:function(e){var t=this._getOrReturnCtx(e);return a(t,{code:oe.invalid_type,expected:ae.bigint,received:t.parsedType}),ve}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,ce.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,ce.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,ce.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,ce.toString(t))}},{key:"setLimit",value:function(e,r,n,a){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:e,value:r,inclusive:n,message:ce.toString(a)}])}))}},{key:"_addCheck",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([e])}))}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ce.toString(t)})}},{key:"minValue",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"min"===o.kind&&(null===e||o.value>e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"maxValue",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"max"===o.kind&&(null===e||o.value<e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}}]),t}(Oe);Ke.create=function(e){var t;return new Ke(_object_spread({checks:[],typeName:Pt.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},i(e)))};var qe=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==ae.boolean){var t=this._getOrReturnCtx(e);return a(t,{code:oe.invalid_type,expected:ae.boolean,received:t.parsedType}),ve}return me(e.data)}}]),t}(Oe);qe.create=function(e){return new qe(_object_spread({typeName:Pt.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1},i(e)))};var We=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ae.date){var t=this._getOrReturnCtx(e);return a(t,{code:oe.invalid_type,expected:ae.date,received:t.parsedType}),ve}if(Number.isNaN(e.data.getTime())){var r=this._getOrReturnCtx(e);return a(r,{code:oe.invalid_date}),ve}var n=new he,i=void 0,o=!0,s=!1,u=void 0;try{for(var c,l=this._def.checks[Symbol.iterator]();!(o=(c=l.next()).done);o=!0){var d=c.value;"min"===d.kind?e.data.getTime()<d.value&&(i=this._getOrReturnCtx(e,i),a(i,{code:oe.too_small,message:d.message,inclusive:!0,exact:!1,minimum:d.value,type:"date"}),n.dirty()):"max"===d.kind?e.data.getTime()>d.value&&(i=this._getOrReturnCtx(e,i),a(i,{code:oe.too_big,message:d.message,inclusive:!0,exact:!1,maximum:d.value,type:"date"}),n.dirty()):Q.assertNever(d)}}catch(e){s=!0,u=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw u}}return{status:n.value,value:new Date(e.data.getTime())}}},{key:"_addCheck",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([e])}))}},{key:"min",value:function(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:ce.toString(t)})}},{key:"max",value:function(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:ce.toString(t)})}},{key:"minDate",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"min"===o.kind&&(null===e||o.value>e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return null!=e?new Date(e):null}},{key:"maxDate",get:function(){var e=null,t=!0,r=!1,n=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"max"===o.kind&&(null===e||o.value<e)&&(e=o.value)}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return null!=e?new Date(e):null}}]),t}(Oe);We.create=function(e){return new We(_object_spread({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Pt.ZodDate},i(e)))};var Xe=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==ae.symbol){var t=this._getOrReturnCtx(e);return a(t,{code:oe.invalid_type,expected:ae.symbol,received:t.parsedType}),ve}return me(e.data)}}]),t}(Oe);Xe.create=function(e){return new Xe(_object_spread({typeName:Pt.ZodSymbol},i(e)))};var Ge=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==ae.undefined){var t=this._getOrReturnCtx(e);return a(t,{code:oe.invalid_type,expected:ae.undefined,received:t.parsedType}),ve}return me(e.data)}}]),t}(Oe);Ge.create=function(e){return new Ge(_object_spread({typeName:Pt.ZodUndefined},i(e)))};var He=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==ae.null){var t=this._getOrReturnCtx(e);return a(t,{code:oe.invalid_type,expected:ae.null,received:t.parsedType}),ve}return me(e.data)}}]),t}(Oe);He.create=function(e){return new He(_object_spread({typeName:Pt.ZodNull},i(e)))};var Je=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments))._any=!0,e}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){return me(e.data)}}]),t}(Oe);Je.create=function(e){return new Je(_object_spread({typeName:Pt.ZodAny},i(e)))};var Ye=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments))._unknown=!0,e}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){return me(e.data)}}]),t}(Oe);Ye.create=function(e){return new Ye(_object_spread({typeName:Pt.ZodUnknown},i(e)))};var Qe=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._getOrReturnCtx(e);return a(t,{code:oe.invalid_type,expected:ae.never,received:t.parsedType}),ve}}]),t}(Oe);Qe.create=function(e){return new Qe(_object_spread({typeName:Pt.ZodNever},i(e)))};var et=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==ae.undefined){var t=this._getOrReturnCtx(e);return a(t,{code:oe.invalid_type,expected:ae.void,received:t.parsedType}),ve}return me(e.data)}}]),t}(Oe);et.create=function(e){return new et(_object_spread({typeName:Pt.ZodVoid},i(e)))};var tt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e),r=t.ctx,n=t.status,i=this._def;if(r.parsedType!==ae.array)return a(r,{code:oe.invalid_type,expected:ae.array,received:r.parsedType}),ve;if(null!==i.exactLength){var o=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(o||s)&&(a(r,{code:o?oe.too_big:oe.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(null!==i.minLength&&r.data.length<i.minLength.value&&(a(r,{code:oe.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),null!==i.maxLength&&r.data.length>i.maxLength.value&&(a(r,{code:oe.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all(_to_consumable_array(r.data).map(function(e,t){return i.type._parseAsync(new xe(r,e,r.path,t))})).then(function(e){return he.mergeArray(n,e)});var u=_to_consumable_array(r.data).map(function(e,t){return i.type._parseSync(new xe(r,e,r.path,t))});return he.mergeArray(n,u)}},{key:"element",get:function(){return this._def.type}},{key:"min",value:function(e,r){return new t(_object_spread_props(_object_spread({},this._def),{minLength:{value:e,message:ce.toString(r)}}))}},{key:"max",value:function(e,r){return new t(_object_spread_props(_object_spread({},this._def),{maxLength:{value:e,message:ce.toString(r)}}))}},{key:"length",value:function(e,r){return new t(_object_spread_props(_object_spread({},this._def),{exactLength:{value:e,message:ce.toString(r)}}))}},{key:"nonempty",value:function(e){return this.min(1,e)}}]),t}(Oe);function rt(e){if(_instanceof(e,nt)){var t={};for(var r in e.shape){var n=e.shape[r];t[r]=bt.create(rt(n))}return new nt(_object_spread_props(_object_spread({},e._def),{shape:function(){return t}}))}return _instanceof(e,tt)?new tt(_object_spread_props(_object_spread({},e._def),{type:rt(e.element)})):_instanceof(e,bt)?bt.create(rt(e.unwrap())):_instanceof(e,kt)?kt.create(rt(e.unwrap())):_instanceof(e,ct)?ct.create(e.items.map(function(e){return rt(e)})):e}tt.create=function(e,t){return new tt(_object_spread({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Pt.ZodArray},i(t)))};var nt=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments))._cached=null,e.nonstrict=e.passthrough,e.augment=e.extend,e}return _inherits(t,e),_create_class(t,[{key:"_getCached",value:function(){if(null!==this._cached)return this._cached;var e=this._def.shape(),t=Q.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}},{key:"_parse",value:function(e){if(this._getType(e)!==ae.object){var t=this._getOrReturnCtx(e);return a(t,{code:oe.invalid_type,expected:ae.object,received:t.parsedType}),ve}var r=this._processInputParams(e),n=r.status,i=r.ctx,o=this._getCached(),s=o.shape,u=o.keys,c=[];if(!_instanceof(this._def.catchall,Qe)||"strip"!==this._def.unknownKeys)for(var l in i.data)u.includes(l)||c.push(l);var d=[],_=!0,f=!1,p=void 0;try{for(var h,v=u[Symbol.iterator]();!(_=(h=v.next()).done);_=!0){var y=h.value,m=s[y],g=i.data[y];d.push({key:{status:"valid",value:y},value:m._parse(new xe(i,g,i.path,y)),alwaysSet:y in i.data})}}catch(e){f=!0,p=e}finally{try{_||null==v.return||v.return()}finally{if(f)throw p}}if(_instanceof(this._def.catchall,Qe)){var b=this._def.unknownKeys;if("passthrough"===b){var k=!0,j=!1,w=void 0;try{for(var x,S=c[Symbol.iterator]();!(k=(x=S.next()).done);k=!0){var O=x.value;d.push({key:{status:"valid",value:O},value:{status:"valid",value:i.data[O]}})}}catch(e){j=!0,w=e}finally{try{k||null==S.return||S.return()}finally{if(j)throw w}}}else if("strict"===b)c.length>0&&(a(i,{code:oe.unrecognized_keys,keys:c}),n.dirty());else if("strip"!==b)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{var Z=this._def.catchall,A=!0,P=!1,T=void 0;try{for(var N,C=c[Symbol.iterator]();!(A=(N=C.next()).done);A=!0){var E=N.value,I=i.data[E];d.push({key:{status:"valid",value:E},value:Z._parse(new xe(i,I,i.path,E)),alwaysSet:E in i.data})}}catch(e){P=!0,T=e}finally{try{A||null==C.return||C.return()}finally{if(P)throw T}}}return i.common.async?Promise.resolve().then(function(){return _async_to_generator(function(){var e,t,r,n,a,i,o,s,u,c;return _ts_generator(this,function(l){switch(l.label){case 0:e=[],t=!0,r=!1,n=void 0,l.label=1;case 1:l.trys.push([1,7,8,9]),a=d[Symbol.iterator](),l.label=2;case 2:return(t=(i=a.next()).done)?[3,6]:[4,(o=i.value).key];case 3:return s=l.sent(),[4,o.value];case 4:u=l.sent(),e.push({key:s,value:u,alwaysSet:o.alwaysSet}),l.label=5;case 5:return t=!0,[3,2];case 6:return[3,9];case 7:return c=l.sent(),r=!0,n=c,[3,9];case 8:try{t||null==a.return||a.return()}finally{if(r)throw n}return[7];case 9:return[2,e]}})})()}).then(function(e){return he.mergeObjectSync(n,e)}):he.mergeObjectSync(n,d)}},{key:"shape",get:function(){return this._def.shape()}},{key:"strict",value:function(e){var r=this;return ce.errToObj,new t(_object_spread(_object_spread_props(_object_spread({},this._def),{unknownKeys:"strict"}),void 0!==e?{errorMap:function(t,n){var a,i,o,s,u=null!==(o=null===(a=(i=r._def).errorMap)||void 0===a?void 0:a.call(i,t,n).message)&&void 0!==o?o:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(s=ce.errToObj(e).message)&&void 0!==s?s:u}:{message:u}}}:{}))}},{key:"strip",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{unknownKeys:"strip"}))}},{key:"passthrough",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{unknownKeys:"passthrough"}))}},{key:"extend",value:function(e){var r=this;return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return _object_spread({},r._def.shape(),e)}}))}},{key:"merge",value:function(e){var r=this;return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:function(){return _object_spread({},r._def.shape(),e._def.shape())},typeName:Pt.ZodObject})}},{key:"setKey",value:function(e,t){return this.augment(_define_property({},e,t))}},{key:"catchall",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{catchall:e}))}},{key:"pick",value:function(e){var r={},n=!0,a=!1,i=void 0;try{for(var o,s=Q.objectKeys(e)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;e[u]&&this.shape[u]&&(r[u]=this.shape[u])}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return r}}))}},{key:"omit",value:function(e){var r={},n=!0,a=!1,i=void 0;try{for(var o,s=Q.objectKeys(this.shape)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;e[u]||(r[u]=this.shape[u])}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return r}}))}},{key:"deepPartial",value:function(){return rt(this)}},{key:"partial",value:function(e){var r={},n=!0,a=!1,i=void 0;try{for(var o,s=Q.objectKeys(this.shape)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value,c=this.shape[u];e&&!e[u]?r[u]=c:r[u]=c.optional()}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return r}}))}},{key:"required",value:function(e){var r={},n=!0,a=!1,i=void 0;try{for(var o,s=Q.objectKeys(this.shape)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;if(e&&!e[u])r[u]=this.shape[u];else{for(var c=this.shape[u];_instanceof(c,bt);)c=c._def.innerType;r[u]=c}}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return r}}))}},{key:"keyof",value:function(){return f(Q.objectKeys(this.shape))}}]),t}(Oe);nt.create=function(e,t){return new nt(_object_spread({shape:function(){return e},unknownKeys:"strip",catchall:Qe.create(),typeName:Pt.ZodObject},i(t)))},nt.strictCreate=function(e,t){return new nt(_object_spread({shape:function(){return e},unknownKeys:"strict",catchall:Qe.create(),typeName:Pt.ZodObject},i(t)))},nt.lazycreate=function(e,t){return new nt(_object_spread({shape:e,unknownKeys:"strip",catchall:Qe.create(),typeName:Pt.ZodObject},i(t)))};var at=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,r=this._def.options;if(t.common.async)return Promise.all(r.map(function(e){return _async_to_generator(function(){var r,n;return _ts_generator(this,function(a){switch(a.label){case 0:return r=_object_spread_props(_object_spread({},t),{common:_object_spread_props(_object_spread({},t.common),{issues:[]}),parent:null}),n={},[4,e._parseAsync({data:t.data,path:t.path,parent:r})];case 1:return[2,(n.result=a.sent(),n.ctx=r,n)]}})})()})).then(function(e){var r=!0,n=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value;if("valid"===u.result.status)return u.result}}catch(e){n=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(n)throw i}}var c=!0,l=!1,d=void 0;try{for(var _,f=e[Symbol.iterator]();!(c=(_=f.next()).done);c=!0){var p,h=_.value;if("dirty"===h.result.status)return(p=t.common.issues).push.apply(p,_to_consumable_array(h.ctx.common.issues)),h.result}}catch(e){l=!0,d=e}finally{try{c||null==f.return||f.return()}finally{if(l)throw d}}var v=e.map(function(e){return new ue(e.ctx.common.issues)});return a(t,{code:oe.invalid_union,unionErrors:v}),ve});var n,i=void 0,o=[],s=!0,u=!1,c=void 0;try{for(var l,d=r[Symbol.iterator]();!(s=(l=d.next()).done);s=!0){var _=l.value,f=_object_spread_props(_object_spread({},t),{common:_object_spread_props(_object_spread({},t.common),{issues:[]}),parent:null}),p=_._parseSync({data:t.data,path:t.path,parent:f});if("valid"===p.status)return p;"dirty"!==p.status||i||(i={result:p,ctx:f}),f.common.issues.length&&o.push(f.common.issues)}}catch(e){u=!0,c=e}finally{try{s||null==d.return||d.return()}finally{if(u)throw c}}if(i)return(n=t.common.issues).push.apply(n,_to_consumable_array(i.ctx.common.issues)),i.result;var h=o.map(function(e){return new ue(e)});return a(t,{code:oe.invalid_union,unionErrors:h}),ve}},{key:"options",get:function(){return this._def.options}}]),t}(Oe);at.create=function(e,t){return new at(_object_spread({options:e,typeName:Pt.ZodUnion},i(t)))};var it=function(e){return _instanceof(e,pt)?it(e.schema):_instanceof(e,gt)?it(e.innerType()):_instanceof(e,ht)?[e.value]:_instanceof(e,vt)?e.options:_instanceof(e,yt)?Q.objectValues(e.enum):_instanceof(e,jt)?it(e._def.innerType):_instanceof(e,Ge)?[void 0]:_instanceof(e,He)?[null]:_instanceof(e,bt)?[void 0].concat(_to_consumable_array(it(e.unwrap()))):_instanceof(e,kt)?[null].concat(_to_consumable_array(it(e.unwrap()))):_instanceof(e,Ot)||_instanceof(e,At)?it(e.unwrap()):_instanceof(e,wt)?it(e._def.innerType):[]},ot=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==ae.object)return a(t,{code:oe.invalid_type,expected:ae.object,received:t.parsedType}),ve;var r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(a(t,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ve)}},{key:"discriminator",get:function(){return this._def.discriminator}},{key:"options",get:function(){return this._def.options}},{key:"optionsMap",get:function(){return this._def.optionsMap}}],[{key:"create",value:function(e,r,n){var a=new Map,o=!0,s=!1,u=void 0;try{for(var c,l=r[Symbol.iterator]();!(o=(c=l.next()).done);o=!0){var d=c.value,_=it(d.shape[e]);if(!_.length)throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"));var f=!0,p=!1,h=void 0;try{for(var v,y=_[Symbol.iterator]();!(f=(v=y.next()).done);f=!0){var m=v.value;if(a.has(m))throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(m)));a.set(m,d)}}catch(e){p=!0,h=e}finally{try{f||null==y.return||y.return()}finally{if(p)throw h}}}}catch(e){s=!0,u=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw u}}return new t(_object_spread({typeName:Pt.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:a},i(n)))}}]),t}(Oe);function st(e,t){var r=ie(e),n=ie(t);if(e===t)return{valid:!0,data:e};if(r===ae.object&&n===ae.object){var a=Q.objectKeys(t),i=Q.objectKeys(e).filter(function(e){return-1!==a.indexOf(e)}),o=_object_spread({},e,t),s=!0,u=!1,c=void 0;try{for(var l,d=i[Symbol.iterator]();!(s=(l=d.next()).done);s=!0){var _=l.value,f=st(e[_],t[_]);if(!f.valid)return{valid:!1};o[_]=f.data}}catch(e){u=!0,c=e}finally{try{s||null==d.return||d.return()}finally{if(u)throw c}}return{valid:!0,data:o}}if(r===ae.array&&n===ae.array){if(e.length!==t.length)return{valid:!1};for(var p=[],h=0;h<e.length;h++){var v=st(e[h],t[h]);if(!v.valid)return{valid:!1};p.push(v.data)}return{valid:!0,data:p}}return r===ae.date&&n===ae.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}var ut=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e),r=t.status,n=t.ctx,i=function(e,t){if(ge(e)||ge(t))return ve;var i=st(e.value,t.value);return i.valid?((be(e)||be(t))&&r.dirty(),{status:r.value,value:i.data}):(a(n,{code:oe.invalid_intersection_types}),ve)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(function(e){var t=_sliced_to_array(e,2),r=t[0],n=t[1];return i(r,n)}):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}]),t}(Oe);ut.create=function(e,t,r){return new ut(_object_spread({left:e,right:t,typeName:Pt.ZodIntersection},i(r)))};var ct=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this,r=this._processInputParams(e),n=r.status,i=r.ctx;if(i.parsedType!==ae.array)return a(i,{code:oe.invalid_type,expected:ae.array,received:i.parsedType}),ve;if(i.data.length<this._def.items.length)return a(i,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&i.data.length>this._def.items.length&&(a(i,{code:oe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());var o=_to_consumable_array(i.data).map(function(e,r){var n=t._def.items[r]||t._def.rest;return n?n._parse(new xe(i,e,i.path,r)):null}).filter(function(e){return!!e});return i.common.async?Promise.all(o).then(function(e){return he.mergeArray(n,e)}):he.mergeArray(n,o)}},{key:"items",get:function(){return this._def.items}},{key:"rest",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{rest:e}))}}]),t}(Oe);ct.create=function(e,t){if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ct(_object_spread({items:e,typeName:Pt.ZodTuple,rest:null},i(t)))};var lt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(e){var t=this._processInputParams(e),r=t.status,n=t.ctx;if(n.parsedType!==ae.object)return a(n,{code:oe.invalid_type,expected:ae.object,received:n.parsedType}),ve;var i=[],o=this._def.keyType,s=this._def.valueType;for(var u in n.data)i.push({key:o._parse(new xe(n,u,n.path,u)),value:s._parse(new xe(n,n.data[u],n.path,u)),alwaysSet:u in n.data});return n.common.async?he.mergeObjectAsync(r,i):he.mergeObjectSync(r,i)}},{key:"element",get:function(){return this._def.valueType}}],[{key:"create",value:function(e,r,n){return _instanceof(r,Oe)?new t(_object_spread({keyType:e,valueType:r,typeName:Pt.ZodRecord},i(n))):new t(_object_spread({keyType:Ve.create(),valueType:e,typeName:Pt.ZodRecord},i(r)))}}]),t}(Oe),dt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(e){var t=this._processInputParams(e),r=t.status,n=t.ctx;if(n.parsedType!==ae.map)return a(n,{code:oe.invalid_type,expected:ae.map,received:n.parsedType}),ve;var i=this._def.keyType,o=this._def.valueType,s=_to_consumable_array(n.data.entries()).map(function(e,t){var r=_sliced_to_array(e,2),a=r[0],s=r[1];return{key:i._parse(new xe(n,a,n.path,[t,"key"])),value:o._parse(new xe(n,s,n.path,[t,"value"]))}});if(n.common.async){var u=new Map;return Promise.resolve().then(function(){return _async_to_generator(function(){var e,t,n,a,i,o,c,l,d;return _ts_generator(this,function(_){switch(_.label){case 0:e=!0,t=!1,n=void 0,_.label=1;case 1:_.trys.push([1,7,8,9]),a=s[Symbol.iterator](),_.label=2;case 2:return(e=(i=a.next()).done)?[3,6]:[4,(o=i.value).key];case 3:return c=_.sent(),[4,o.value];case 4:if(l=_.sent(),"aborted"===c.status||"aborted"===l.status)return[2,ve];"dirty"!==c.status&&"dirty"!==l.status||r.dirty(),u.set(c.value,l.value),_.label=5;case 5:return e=!0,[3,2];case 6:return[3,9];case 7:return d=_.sent(),t=!0,n=d,[3,9];case 8:try{e||null==a.return||a.return()}finally{if(t)throw n}return[7];case 9:return[2,{status:r.value,value:u}]}})})()})}var c=new Map,l=!0,d=!1,_=void 0;try{for(var f,p=s[Symbol.iterator]();!(l=(f=p.next()).done);l=!0){var h=f.value,v=h.key,y=h.value;if("aborted"===v.status||"aborted"===y.status)return ve;"dirty"!==v.status&&"dirty"!==y.status||r.dirty(),c.set(v.value,y.value)}}catch(e){d=!0,_=e}finally{try{l||null==p.return||p.return()}finally{if(d)throw _}}return{status:r.value,value:c}}}]),t}(Oe);dt.create=function(e,t,r){return new dt(_object_spread({valueType:t,keyType:e,typeName:Pt.ZodMap},i(r)))};var _t=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e),r=t.status,n=t.ctx;if(n.parsedType!==ae.set)return a(n,{code:oe.invalid_type,expected:ae.set,received:n.parsedType}),ve;var i=this._def;null!==i.minSize&&n.data.size<i.minSize.value&&(a(n,{code:oe.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),null!==i.maxSize&&n.data.size>i.maxSize.value&&(a(n,{code:oe.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());var o=this._def.valueType;function s(e){var t=new Set,n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;if("aborted"===u.status)return ve;"dirty"===u.status&&r.dirty(),t.add(u.value)}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return{status:r.value,value:t}}var u=_to_consumable_array(n.data.values()).map(function(e,t){return o._parse(new xe(n,e,n.path,t))});return n.common.async?Promise.all(u).then(function(e){return s(e)}):s(u)}},{key:"min",value:function(e,r){return new t(_object_spread_props(_object_spread({},this._def),{minSize:{value:e,message:ce.toString(r)}}))}},{key:"max",value:function(e,r){return new t(_object_spread_props(_object_spread({},this._def),{maxSize:{value:e,message:ce.toString(r)}}))}},{key:"size",value:function(e,t){return this.min(e,t).max(e,t)}},{key:"nonempty",value:function(e){return this.min(1,e)}}]),t}(Oe);_t.create=function(e,t){return new _t(_object_spread({valueType:e,minSize:null,maxSize:null,typeName:Pt.ZodSet},i(t)))};var ft=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments)).validate=e.implement,e}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==ae.function)return a(t,{code:oe.invalid_type,expected:ae.function,received:t.parsedType}),ve;function r(e,r){return fe({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n(),de].filter(function(e){return!!e}),issueData:{code:oe.invalid_arguments,argumentsError:r}})}function i(e,r){return fe({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n(),de].filter(function(e){return!!e}),issueData:{code:oe.invalid_return_type,returnTypeError:r}})}var o={errorMap:t.common.contextualErrorMap},s=t.data;if(_instanceof(this._def.returns,mt)){var u=this;return me(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _async_to_generator(function(){var e,n,a;return _ts_generator(this,function(c){switch(c.label){case 0:return e=new ue([]),[4,u._def.args.parseAsync(t,o).catch(function(n){throw e.addIssue(r(t,n)),e})];case 1:return n=c.sent(),[4,Reflect.apply(s,this,n)];case 2:return a=c.sent(),[4,u._def.returns._def.type.parseAsync(a,o).catch(function(t){throw e.addIssue(i(a,t)),e})];case 3:return[2,c.sent()]}})}).call(this)})}var c=this;return me(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var a=c._def.args.safeParse(t,o);if(!a.success)throw new ue([r(t,a.error)]);var u=Reflect.apply(s,this,a.data),l=c._def.returns.safeParse(u,o);if(!l.success)throw new ue([i(u,l.error)]);return l.data})}},{key:"parameters",value:function(){return this._def.args}},{key:"returnType",value:function(){return this._def.returns}},{key:"args",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return new t(_object_spread_props(_object_spread({},this._def),{args:ct.create(r).rest(Ye.create())}))}},{key:"returns",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{returns:e}))}},{key:"implement",value:function(e){return this.parse(e)}},{key:"strictImplement",value:function(e){return this.parse(e)}}],[{key:"create",value:function(e,r,n){return new t(_object_spread({args:e||ct.create([]).rest(Ye.create()),returns:r||Ye.create(),typeName:Pt.ZodFunction},i(n)))}}]),t}(Oe),pt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"schema",get:function(){return this._def.getter()}},{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}]),t}(Oe);pt.create=function(e,t){return new pt(_object_spread({getter:e,typeName:Pt.ZodLazy},i(t)))};var ht=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(e.data!==this._def.value){var t=this._getOrReturnCtx(e);return a(t,{received:t.data,code:oe.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:e.data}}},{key:"value",get:function(){return this._def.value}}]),t}(Oe);ht.create=function(e,t){return new ht(_object_spread({value:e,typeName:Pt.ZodLiteral},i(t)))};var vt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if("string"!=typeof e.data){var t=this._getOrReturnCtx(e),r=this._def.values;return a(t,{expected:Q.joinValues(r),received:t.parsedType,code:oe.invalid_type}),ve}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){var n=this._getOrReturnCtx(e),i=this._def.values;return a(n,{received:n.data,code:oe.invalid_enum_value,options:i}),ve}return me(e.data)}},{key:"options",get:function(){return this._def.values}},{key:"enum",get:function(){var e={},t=!0,r=!1,n=void 0;try{for(var a,i=this._def.values[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;e[o]=o}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"Values",get:function(){var e={},t=!0,r=!1,n=void 0;try{for(var a,i=this._def.values[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;e[o]=o}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"Enum",get:function(){var e={},t=!0,r=!1,n=void 0;try{for(var a,i=this._def.values[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;e[o]=o}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"extract",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return t.create(e,_object_spread({},this._def,r))}},{key:"exclude",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return t.create(this.options.filter(function(t){return!e.includes(t)}),_object_spread({},this._def,r))}}]),t}(Oe);vt.create=f;var yt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=Q.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==ae.string&&r.parsedType!==ae.number){var n=Q.objectValues(t);return a(r,{expected:Q.joinValues(n),received:r.parsedType,code:oe.invalid_type}),ve}if(this._cache||(this._cache=new Set(Q.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){var i=Q.objectValues(t);return a(r,{received:r.data,code:oe.invalid_enum_value,options:i}),ve}return me(e.data)}},{key:"enum",get:function(){return this._def.values}}]),t}(Oe);yt.create=function(e,t){return new yt(_object_spread({values:e,typeName:Pt.ZodNativeEnum},i(t)))};var mt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"unwrap",value:function(){return this._def.type}},{key:"_parse",value:function(e){var t=this,r=this._processInputParams(e).ctx;if(r.parsedType!==ae.promise&&!1===r.common.async)return a(r,{code:oe.invalid_type,expected:ae.promise,received:r.parsedType}),ve;var n=r.parsedType===ae.promise?r.data:Promise.resolve(r.data);return me(n.then(function(e){return t._def.type.parseAsync(e,{path:r.path,errorMap:r.common.contextualErrorMap})}))}}]),t}(Oe);mt.create=function(e,t){return new mt(_object_spread({type:e,typeName:Pt.ZodPromise},i(t)))};var gt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"innerType",value:function(){return this._def.schema}},{key:"sourceType",value:function(){return this._def.schema._def.typeName===Pt.ZodEffects?this._def.schema.sourceType():this._def.schema}},{key:"_parse",value:function(e){var t=this,r=this._processInputParams(e),n=r.status,i=r.ctx,o=this._def.effect||null,s={addIssue:function(e){a(i,e),e.fatal?n.abort():n.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===o.type){var u=o.transform(i.data,s);if(i.common.async)return Promise.resolve(u).then(function(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:return"aborted"===n.value?[2,ve]:[4,this._def.schema._parseAsync({data:e,path:i.path,parent:i})];case 1:return"aborted"===(t=r.sent()).status?[2,ve]:"dirty"===t.status||"dirty"===n.value?[2,ye(t.value)]:[2,t]}})}).call(t)});if("aborted"===n.value)return ve;var c=this._def.schema._parseSync({data:u,path:i.path,parent:i});return"aborted"===c.status?ve:"dirty"===c.status||"dirty"===n.value?ye(c.value):c}if("refinement"===o.type){var l=function(e){var t=o.refinement(e,s);if(i.common.async)return Promise.resolve(t);if(_instanceof(t,Promise))throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===i.common.async){var d=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return"aborted"===d.status?ve:("dirty"===d.status&&n.dirty(),l(d.value),{status:n.value,value:d.value})}return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(function(e){return"aborted"===e.status?ve:("dirty"===e.status&&n.dirty(),l(e.value).then(function(){return{status:n.value,value:e.value}}))})}if("transform"===o.type){if(!1===i.common.async){var _=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!ke(_))return ve;var f=o.transform(_.value,s);if(_instanceof(f,Promise))throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:f}}return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(function(e){return ke(e)?Promise.resolve(o.transform(e.value,s)).then(function(e){return{status:n.value,value:e}}):ve})}Q.assertNever(o)}}]),t}(Oe);gt.create=function(e,t,r){return new gt(_object_spread({schema:e,typeName:Pt.ZodEffects,effect:t},i(r)))},gt.createWithPreprocess=function(e,t,r){return new gt(_object_spread({schema:t,effect:{type:"preprocess",transform:e},typeName:Pt.ZodEffects},i(r)))};var bt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){return this._getType(e)===ae.undefined?me(void 0):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}]),t}(Oe);bt.create=function(e,t){return new bt(_object_spread({innerType:e,typeName:Pt.ZodOptional},i(t)))};var kt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){return this._getType(e)===ae.null?me(null):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}]),t}(Oe);kt.create=function(e,t){return new kt(_object_spread({innerType:e,typeName:Pt.ZodNullable},i(t)))};var jt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,r=t.data;return t.parsedType===ae.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}},{key:"removeDefault",value:function(){return this._def.innerType}}]),t}(Oe);jt.create=function(e,t){return new jt(_object_spread({innerType:e,typeName:Pt.ZodDefault,defaultValue:"function"==typeof t.default?t.default:function(){return t.default}},i(t)))};var wt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this,r=this._processInputParams(e).ctx,n=_object_spread_props(_object_spread({},r),{common:_object_spread_props(_object_spread({},r.common),{issues:[]})}),a=this._def.innerType._parse({data:n.data,path:n.path,parent:_object_spread({},n)});return je(a)?a.then(function(e){return{status:"valid",value:"valid"===e.status?e.value:t._def.catchValue({get error(){return new ue(n.common.issues)},input:n.data})}}):{status:"valid",value:"valid"===a.status?a.value:this._def.catchValue({get error(){return new ue(n.common.issues)},input:n.data})}}},{key:"removeCatch",value:function(){return this._def.innerType}}]),t}(Oe);wt.create=function(e,t){return new wt(_object_spread({innerType:e,typeName:Pt.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:function(){return t.catch}},i(t)))};var xt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==ae.nan){var t=this._getOrReturnCtx(e);return a(t,{code:oe.invalid_type,expected:ae.nan,received:t.parsedType}),ve}return{status:"valid",value:e.data}}}]),t}(Oe);xt.create=function(e){return new xt(_object_spread({typeName:Pt.ZodNaN},i(e)))};var St=Symbol("zod_brand"),Ot=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}},{key:"unwrap",value:function(){return this._def.type}}]),t}(Oe),Zt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this,r=this._processInputParams(e),n=r.status,a=r.ctx;if(a.common.async){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return[4,this._def.in._parseAsync({data:a.data,path:a.path,parent:a})];case 1:return"aborted"===(e=t.sent()).status?[2,ve]:"dirty"===e.status?(n.dirty(),[2,ye(e.value)]):[2,this._def.out._parseAsync({data:e.value,path:a.path,parent:a})]}})}).call(t)}var i=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===i.status?ve:"dirty"===i.status?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:a.path,parent:a})}}],[{key:"create",value:function(e,r){return new t({in:e,out:r,typeName:Pt.ZodPipeline})}}]),t}(Oe),At=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._def.innerType._parse(e),r=function(e){return ke(e)&&(e.value=Object.freeze(e.value)),e};return je(t)?t.then(function(e){return r(e)}):r(t)}},{key:"unwrap",value:function(){return this._def.innerType}}]),t}(Oe);At.create=function(e,t){return new At(_object_spread({innerType:e,typeName:Pt.ZodReadonly},i(t)))};var Pt,Tt,Nt={object:nt.lazycreate};(Tt=Pt||(Pt={})).ZodString="ZodString",Tt.ZodNumber="ZodNumber",Tt.ZodNaN="ZodNaN",Tt.ZodBigInt="ZodBigInt",Tt.ZodBoolean="ZodBoolean",Tt.ZodDate="ZodDate",Tt.ZodSymbol="ZodSymbol",Tt.ZodUndefined="ZodUndefined",Tt.ZodNull="ZodNull",Tt.ZodAny="ZodAny",Tt.ZodUnknown="ZodUnknown",Tt.ZodNever="ZodNever",Tt.ZodVoid="ZodVoid",Tt.ZodArray="ZodArray",Tt.ZodObject="ZodObject",Tt.ZodUnion="ZodUnion",Tt.ZodDiscriminatedUnion="ZodDiscriminatedUnion",Tt.ZodIntersection="ZodIntersection",Tt.ZodTuple="ZodTuple",Tt.ZodRecord="ZodRecord",Tt.ZodMap="ZodMap",Tt.ZodSet="ZodSet",Tt.ZodFunction="ZodFunction",Tt.ZodLazy="ZodLazy",Tt.ZodLiteral="ZodLiteral",Tt.ZodEnum="ZodEnum",Tt.ZodEffects="ZodEffects",Tt.ZodNativeEnum="ZodNativeEnum",Tt.ZodOptional="ZodOptional",Tt.ZodNullable="ZodNullable",Tt.ZodDefault="ZodDefault",Tt.ZodCatch="ZodCatch",Tt.ZodPromise="ZodPromise",Tt.ZodBranded="ZodBranded",Tt.ZodPipeline="ZodPipeline",Tt.ZodReadonly="ZodReadonly";var Ct=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{message:"Input not instance of ".concat(e.name)};return h(function(t){return _instanceof(t,e)},t)},Et=Ve.create,It=Be.create,Rt=xt.create,Mt=Ke.create,Lt=qe.create,zt=We.create,Ft=Xe.create,Dt=Ge.create,$t=He.create,Ut=Je.create,Vt=Ye.create,Bt=Qe.create,Kt=et.create,qt=tt.create,Wt=nt.create,Xt=nt.strictCreate,Gt=at.create,Ht=ot.create,Jt=ut.create,Yt=ct.create,Qt=lt.create,er=dt.create,tr=_t.create,rr=ft.create,nr=pt.create,ar=ht.create,ir=vt.create,or=yt.create,sr=mt.create,ur=gt.create,cr=bt.create,lr=kt.create,dr=gt.createWithPreprocess,_r=Zt.create,fr=function(){return Et().optional()},pr=function(){return It().optional()},hr=function(){return Lt().optional()},vr={string:function(e){return Ve.create(_object_spread_props(_object_spread({},e),{coerce:!0}))},number:function(e){return Be.create(_object_spread_props(_object_spread({},e),{coerce:!0}))},boolean:function(e){return qe.create(_object_spread_props(_object_spread({},e),{coerce:!0}))},bigint:function(e){return Ke.create(_object_spread_props(_object_spread({},e),{coerce:!0}))},date:function(e){return We.create(_object_spread_props(_object_spread({},e),{coerce:!0}))}},yr=ve,mr=Symbol("Let zodToJsonSchema decide on which parser to use"),gr={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},br=function(e){var t=function(e){return"string"==typeof e?_object_spread_props(_object_spread({},gr),{name:e}):_object_spread({},gr,e)}(e),r=void 0!==t.name?_to_consumable_array(t.basePath).concat([t.definitionPath,t.name]):t.basePath;return _object_spread_props(_object_spread({},t),{flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(function(e){var r=_sliced_to_array(e,2),n=r[0],a=r[1];return[a._def,{def:a._def,path:_to_consumable_array(t.basePath).concat([t.definitionPath,n]),jsonSchema:void 0}]}))})},kr=function(e,t){for(var r=0;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString()].concat(_to_consumable_array(t.slice(r))).join("/")};function jr(e,t,r){var n=null!=r?r:t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map(function(r,n){return jr(e,t,r)})};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return wr(e,t)}}var wr=function(e,t){var r={type:"integer",format:"unix-time"};if("openApi3"===t.target)return r;var n=!0,a=!1,i=void 0;try{for(var o,s=e.checks[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;switch(u.kind){case"min":y(r,"minimum",u.value,u.message,t);break;case"max":y(r,"maximum",u.value,u.message,t)}}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r},xr=function(e){return(!("type"in e)||"string"!==e.type)&&"allOf"in e},Sr=void 0,Or={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:function(){return void 0===Sr&&(Sr=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Sr},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/},Zr=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"),Ar={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"},Pr=function(e,t){var r=(_instanceof(e.options,Map)?Array.from(e.options.values()):e.options).map(function(e,r){return Nr(e._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["anyOf","".concat(r)])}))}).filter(function(e){return!!e&&(!t.strictUnions||"object"===(void 0===e?"undefined":_type_of(e))&&Object.keys(e).length>0)});return r.length?{anyOf:r}:void 0},Tr=function(e,t,r){switch(t){case Pt.ZodString:return b(e,r);case Pt.ZodNumber:return function(e,t){var r={type:"number"};if(!e.checks)return r;var n=!0,a=!1,i=void 0;try{for(var o,s=e.checks[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;switch(u.kind){case"int":r.type="integer",v(r,"type",u.message,t);break;case"min":"jsonSchema7"===t.target?u.inclusive?y(r,"minimum",u.value,u.message,t):y(r,"exclusiveMinimum",u.value,u.message,t):(u.inclusive||(r.exclusiveMinimum=!0),y(r,"minimum",u.value,u.message,t));break;case"max":"jsonSchema7"===t.target?u.inclusive?y(r,"maximum",u.value,u.message,t):y(r,"exclusiveMaximum",u.value,u.message,t):(u.inclusive||(r.exclusiveMaximum=!0),y(r,"maximum",u.value,u.message,t));break;case"multipleOf":y(r,"multipleOf",u.value,u.message,t)}}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}(e,r);case Pt.ZodObject:return function(e,t){var r="openAi"===t.target,n={type:"object",properties:{}},a=[],i=e.shape();for(var o in i){var s=i[o];if(void 0!==s&&void 0!==s._def){var u=A(s);u&&r&&("ZodOptional"===s._def.typeName&&(s=s._def.innerType),s.isNullable()||(s=s.nullable()),u=!1);var c=Nr(s._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["properties",o]),propertyPath:_to_consumable_array(t.currentPath).concat(["properties",o])}));void 0!==c&&(n.properties[o]=c,u||a.push(o))}}a.length&&(n.required=a);var l=Z(e,t);return void 0!==l&&(n.additionalProperties=l),n}(e,r);case Pt.ZodBigInt:return function(e,t){var r={type:"integer",format:"int64"};if(!e.checks)return r;var n=!0,a=!1,i=void 0;try{for(var o,s=e.checks[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;switch(u.kind){case"min":"jsonSchema7"===t.target?u.inclusive?y(r,"minimum",u.value,u.message,t):y(r,"exclusiveMinimum",u.value,u.message,t):(u.inclusive||(r.exclusiveMinimum=!0),y(r,"minimum",u.value,u.message,t));break;case"max":"jsonSchema7"===t.target?u.inclusive?y(r,"maximum",u.value,u.message,t):y(r,"exclusiveMaximum",u.value,u.message,t):(u.inclusive||(r.exclusiveMaximum=!0),y(r,"maximum",u.value,u.message,t));break;case"multipleOf":y(r,"multipleOf",u.value,u.message,t)}}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}(e,r);case Pt.ZodBoolean:return{type:"boolean"};case Pt.ZodDate:return jr(e,r);case Pt.ZodUndefined:return function(e){return{not:m(e)}}(r);case Pt.ZodNull:return function(e){return"openApi3"===e.target?{enum:["null"],nullable:!0}:{type:"null"}}(r);case Pt.ZodArray:return function(e,t){var r,n,a,i={type:"array"};return(null===(r=e.type)||void 0===r?void 0:r._def)&&(null===(a=e.type)||void 0===a||null===(n=a._def)||void 0===n?void 0:n.typeName)!==Pt.ZodAny&&(i.items=Nr(e.type._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items"])}))),e.minLength&&y(i,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&y(i,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(y(i,"minItems",e.exactLength.value,e.exactLength.message,t),y(i,"maxItems",e.exactLength.value,e.exactLength.message,t)),i}(e,r);case Pt.ZodUnion:case Pt.ZodDiscriminatedUnion:return function(e,t){if("openApi3"===t.target)return Pr(e,t);var r=_instanceof(e.options,Map)?Array.from(e.options.values()):e.options;if(r.every(function(e){return e._def.typeName in Ar&&(!e._def.checks||!e._def.checks.length)})){var n=r.reduce(function(e,t){var r=Ar[t._def.typeName];return r&&!e.includes(r)?_to_consumable_array(e).concat([r]):e},[]);return{type:n.length>1?n:n[0]}}if(r.every(function(e){return"ZodLiteral"===e._def.typeName&&!e.description})){var a=r.reduce(function(e,t){var r=_type_of(t._def.value);switch(r){case"string":case"number":case"boolean":return _to_consumable_array(e).concat([r]);case"bigint":return _to_consumable_array(e).concat(["integer"]);case"object":if(null===t._def.value)return _to_consumable_array(e).concat(["null"]);default:return e}},[]);if(a.length===r.length){var i=a.filter(function(e,t,r){return r.indexOf(e)===t});return{type:i.length>1?i:i[0],enum:r.reduce(function(e,t){return e.includes(t._def.value)?e:_to_consumable_array(e).concat([t._def.value])},[])}}}else if(r.every(function(e){return"ZodEnum"===e._def.typeName}))return{type:"string",enum:r.reduce(function(e,t){return _to_consumable_array(e).concat(_to_consumable_array(t._def.values.filter(function(t){return!e.includes(t)})))},[])};return Pr(e,t)}(e,r);case Pt.ZodIntersection:return function(e,t){var r=[Nr(e.left._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["allOf","0"])})),Nr(e.right._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["allOf","1"])}))].filter(function(e){return!!e}),n="jsonSchema2019-09"===t.target?{unevaluatedProperties:!1}:void 0,a=[];return r.forEach(function(e){if(xr(e)){var t;(t=a).push.apply(t,_to_consumable_array(e.allOf)),void 0===e.unevaluatedProperties&&(n=void 0)}else{var r=e;"additionalProperties"in e&&!1===e.additionalProperties?(e.additionalProperties,r=_object_without_properties(e,["additionalProperties"])):n=void 0,a.push(r)}}),a.length?_object_spread({allOf:a},n):void 0}(e,r);case Pt.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(function(e,r){return Nr(e._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items","".concat(r)])}))}).reduce(function(e,t){return void 0===t?e:_to_consumable_array(e).concat([t])},[]),additionalItems:Nr(e.rest._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["additionalItems"])}))}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(function(e,r){return Nr(e._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items","".concat(r)])}))}).reduce(function(e,t){return void 0===t?e:_to_consumable_array(e).concat([t])},[])}}(e,r);case Pt.ZodRecord:return O(e,r);case Pt.ZodLiteral:return function(e,t){var r=_type_of(e.value);return"bigint"!==r&&"number"!==r&&"boolean"!==r&&"string"!==r?{type:Array.isArray(e.value)?"array":"object"}:"openApi3"===t.target?{type:"bigint"===r?"integer":r,enum:[e.value]}:{type:"bigint"===r?"integer":r,const:e.value}}(e,r);case Pt.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case Pt.ZodNativeEnum:return function(e){var t=e.values,r=Object.keys(e.values).filter(function(e){return"number"!=typeof t[t[e]]}).map(function(e){return t[e]}),n=Array.from(new Set(r.map(function(e){return void 0===e?"undefined":_type_of(e)})));return{type:1===n.length?"string"===n[0]?"string":"number":["string","number"],enum:r}}(e);case Pt.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return"openApi3"===t.target?{type:Ar[e.innerType._def.typeName],nullable:!0}:{type:[Ar[e.innerType._def.typeName],"null"]};if("openApi3"===t.target){var r=Nr(e.innerType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath)}));return r&&"$ref"in r?{allOf:[r],nullable:!0}:r&&_object_spread_props(_object_spread({},r),{nullable:!0})}var n=Nr(e.innerType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["anyOf","0"])}));return n&&{anyOf:[n,{type:"null"}]}}(e,r);case Pt.ZodOptional:return function(e,t){var r;if(t.currentPath.toString()===(null===(r=t.propertyPath)||void 0===r?void 0:r.toString()))return Nr(e.innerType._def,t);var n=Nr(e.innerType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["anyOf","1"])}));return n?{anyOf:[{not:m(t)},n]}:m(t)}(e,r);case Pt.ZodMap:return function(e,t){return"record"===t.mapStrategy?O(e,t):{type:"array",maxItems:125,items:{type:"array",items:[Nr(e.keyType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items","items","0"])}))||m(t),Nr(e.valueType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items","items","1"])}))||m(t)],minItems:2,maxItems:2}}}(e,r);case Pt.ZodSet:return function(e,t){var r={type:"array",uniqueItems:!0,items:Nr(e.valueType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items"])}))};return e.minSize&&y(r,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&y(r,"maxItems",e.maxSize.value,e.maxSize.message,t),r}(e,r);case Pt.ZodLazy:return function(){return e.getter()._def};case Pt.ZodPromise:return function(e,t){return Nr(e.type._def,t)}(e,r);case Pt.ZodNaN:case Pt.ZodNever:return function(e){return"openAi"===e.target?void 0:{not:m(_object_spread_props(_object_spread({},e),{currentPath:_to_consumable_array(e.currentPath).concat(["not"])}))}}(r);case Pt.ZodEffects:return function(e,t){return"input"===t.effectStrategy?Nr(e.schema._def,t):m(t)}(e,r);case Pt.ZodAny:return m(r);case Pt.ZodUnknown:return function(e){return m(e)}(r);case Pt.ZodDefault:return function(e,t){return _object_spread_props(_object_spread({},Nr(e.innerType._def,t)),{default:e.defaultValue()})}(e,r);case Pt.ZodBranded:return g(e,r);case Pt.ZodReadonly:case Pt.ZodCatch:return function(e,t){return Nr(e.innerType._def,t)}(e,r);case Pt.ZodPipeline:return function(e,t){if("input"===t.pipeStrategy)return Nr(e.in._def,t);if("output"===t.pipeStrategy)return Nr(e.out._def,t);var r=Nr(e.in._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["allOf","0"])}));return{allOf:[r,Nr(e.out._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["allOf",r?"1":"0"])}))].filter(function(e){return void 0!==e})}}(e,r);case Pt.ZodFunction:case Pt.ZodVoid:case Pt.ZodSymbol:default:return}};function Nr(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.seen.get(e);if(t.override){var a,i=null===(a=t.override)||void 0===a?void 0:a.call(t,e,t,n,r);if(i!==mr)return i}if(n&&!r){var o=Cr(n,t);if(void 0!==o)return o}var s={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,s);var u=Tr(e,e.typeName,t),c="function"==typeof u?Nr(u(),t):u;if(c&&Er(e,t,c),t.postProcess){var l=t.postProcess(c,e,t);return s.jsonSchema=c,l}return s.jsonSchema=c,c}var Cr=function(e,t){switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:kr(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every(function(e,r){return t.currentPath[r]===e})?(console.warn("Recursive reference detected at ".concat(t.currentPath.join("/"),"! Defaulting to any")),m(t)):"seen"===t.$refStrategy?m(t):void 0}},Er=function(e,t,r){return e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r},Ir=function(e,t){var r,n=br(t),a="object"===(void 0===t?"undefined":_type_of(t))&&t.definitions?Object.entries(t.definitions).reduce(function(e,t){var r,a=_sliced_to_array(t,2),i=a[0],o=a[1];return _object_spread_props(_object_spread({},e),_define_property({},i,null!==(r=Nr(o._def,_object_spread_props(_object_spread({},n),{currentPath:_to_consumable_array(n.basePath).concat([n.definitionPath,i])}),!0))&&void 0!==r?r:m(n)))},{}):void 0,i="string"==typeof t?t:"title"===(null==t?void 0:t.nameStrategy)||null==t?void 0:t.name,o=null!==(r=Nr(e._def,void 0===i?n:_object_spread_props(_object_spread({},n),{currentPath:_to_consumable_array(n.basePath).concat([n.definitionPath,i])}),!1))&&void 0!==r?r:m(n),s="object"===(void 0===t?"undefined":_type_of(t))&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==s&&(o.title=s),n.flags.hasReferencedOpenAiAnyType&&(a||(a={}),a[n.openAiAnyTypeName]||(a[n.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:"relative"===n.$refStrategy?"1":_to_consumable_array(n.basePath).concat([n.definitionPath,n.openAiAnyTypeName]).join("/")}}));var u=void 0===i?a?_object_spread_props(_object_spread({},o),_define_property({},n.definitionPath,a)):o:_define_property({$ref:_to_consumable_array("relative"===n.$refStrategy?[]:n.basePath).concat([n.definitionPath,i]).join("/")},n.definitionPath,_object_spread_props(_object_spread({},a),_define_property({},i,o)));return"jsonSchema7"===n.target?u.$schema="http://json-schema.org/draft-07/schema#":"jsonSchema2019-09"!==n.target&&"openAi"!==n.target||(u.$schema="https://json-schema.org/draft/2019-09/schema#"),"openAi"===n.target&&("anyOf"in u||"oneOf"in u||"allOf"in u||"type"in u&&Array.isArray(u.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),u},Rr=ne.record(ne.string(),ne.boolean()).describe("Consent requirement mapping"),Mr=ne.lazy(function(){return ne.union([ne.string(),ne.number(),ne.boolean(),Dr,ne.array(Mr)])}),Lr=ne.tuple([Mr,Mr]).describe("Loop: [source, transform] tuple for array transformations"),zr=ne.array(Mr).describe("Set: Array of values"),Fr=ne.record(ne.string(),Mr).describe("Map: Object mapping keys to values"),Dr=ne.object({key:ne.string().optional().describe('Property path (e.g., "data.id")'),value:ne.union([ne.string(),ne.number(),ne.boolean()]).optional().describe("Static primitive value"),fn:ne.string().optional().describe("Function string for custom transformation"),map:Fr.optional().describe("Object with key-value mappings"),loop:Lr.optional().describe("Tuple [source, transform]"),set:zr.optional().describe("Array of values"),consent:Rr.optional().describe("Required consent states"),condition:ne.string().optional().describe("Condition function string"),validate:ne.string().optional().describe("Validation function string")}).refine(function(e){return Object.keys(e).length>0},{message:"ValueConfig must have at least one property"}).describe("Value configuration for transformations"),$r=Lr,Ur=zr,Vr=Fr,Br=(Ir(Dr,{target:"jsonSchema7",$refStrategy:"relative",name:"ValueConfig"}),Ir($r,{target:"jsonSchema7",$refStrategy:"relative",name:"Loop"}),Ir(Ur,{target:"jsonSchema7",$refStrategy:"relative",name:"Set"}),Ir(Vr,{target:"jsonSchema7",$refStrategy:"relative",name:"Map"}),{merge:!0,shallow:!0,extend:!0});function Kr(e){for(var t=arguments.length>2?arguments[2]:void 0,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split("."),n=e,a=0;a<r.length;a++){var i=r[a];if("*"===i&&T(n)){var o=r.slice(a+1).join("."),s=[],u=!0,c=!1,l=void 0;try{for(var d,_=n[Symbol.iterator]();!(u=(d=_.next()).done);u=!0){var f=Kr(d.value,o,t);s.push(f)}}catch(e){c=!0,l=e}finally{try{u||null==_.return||_.return()}finally{if(c)throw l}}return s}if(!(n=_instanceof(n,Object)?n[i]:void 0))break}return N(n)?n:t}function qr(e){return function(e){return"boolean"==typeof e}(e)||E(e)||function(e){return"number"==typeof e&&!Number.isNaN(e)}(e)||!N(e)||T(e)&&e.every(qr)||C(e)&&Object.values(e).every(qr)}function Wr(e,t){return _async_to_generator(function(e,t){var r,n,a,i=arguments;return _ts_generator(this,function(o){return n=(r=i.length>2&&void 0!==i[2]?i[2]:{}).collector,a=r.consent,[2,(T(t)?t:[t]).reduce(function(t,i){return _async_to_generator(function(){var o,s,u,c,l,d,_,f,p,h,v,y,m,g,b,k,j,w,x,S,O;return _ts_generator(this,function(Z){switch(Z.label){case 0:return[4,t];case 1:return(o=Z.sent())?[2,o]:(s=E(i)?{key:i}:i,Object.keys(s).length?(u=s.condition,c=s.consent,l=s.fn,d=s.key,_=s.loop,f=s.map,p=s.set,h=s.validate,v=s.value,(y=u)?[4,M(u)(e,i,n)]:[3,3]):[2]);case 2:y=!Z.sent(),Z.label=3;case 3:return y?[2]:c&&!function(e){var t=_object_spread({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),r={},n=void 0===e;return Object.keys(t).forEach(function(a){t[a]&&(r[a]=!0,e&&e[a]&&(n=!0))}),!!n&&r}(c,a)?[2,v]:(m=N(v)?v:e,l?[4,M(l)(e,i,r)]:[3,5]);case 4:m=Z.sent(),Z.label=5;case 5:return d&&(m=Kr(e,d,v)),_?(g=_sliced_to_array(_,2),b=g[0],k=g[1],"this"!==b?[3,6]:(w=[e],[3,8])):[3,11];case 6:return[4,L(e,b,r)];case 7:w=Z.sent(),Z.label=8;case 8:return T(j=w)?[4,Promise.all(j.map(function(e){return L(e,k,r)}))]:[3,10];case 9:m=Z.sent().filter(N),Z.label=10;case 10:return[3,17];case 11:return f?[4,Object.entries(f).reduce(function(t,n){var a=_sliced_to_array(n,2),i=a[0],o=a[1];return _async_to_generator(function(){var n,a;return _ts_generator(this,function(s){switch(s.label){case 0:return[4,t];case 1:return n=s.sent(),[4,L(e,o,r)];case 2:return a=s.sent(),[2,(N(a)&&(n[i]=a),n)]}})})()},Promise.resolve({}))]:[3,13];case 12:return m=Z.sent(),[3,16];case 13:return(x=p)?[4,Promise.all(p.map(function(t){return Wr(e,t,r)}))]:[3,15];case 14:x=m=Z.sent(),Z.label=15;case 15:Z.label=16;case 16:Z.label=17;case 17:return(S=h)?[4,M(h)(m)]:[3,19];case 18:S=!Z.sent(),Z.label=19;case 19:return S&&(m=void 0),O=R(m),[2,N(O)?O:R(v)]}})})()},Promise.resolve(void 0))]})}).apply(this,arguments)}var Xr="dataLayer",Gr="https://www.googletagmanager.com/gtm.js?id=",Hr={},Jr={};J(Jr,{env:function(){return Yr},events:function(){return rn},mapping:function(){return nn}});var Yr={};J(Yr,{init:function(){return Qr},push:function(){return en},simulation:function(){return tn}});var Qr={window:{gtag:void 0,dataLayer:[]},document:{createElement:function(){return{src:"",setAttribute:function(){},removeAttribute:function(){}}},head:{appendChild:function(){}}}},en={window:{gtag:Object.assign(function(){},{}),dataLayer:[]},document:{createElement:function(){return{src:"",setAttribute:function(){},removeAttribute:function(){}}},head:{appendChild:function(){}}}},tn=["call:window.gtag"],rn={};J(rn,{adsConversion:function(){return B},ga4AddToCart:function(){return V},ga4Purchase:function(){return U},gtmEvent:function(){return K}});var nn={};J(nn,{adsConversion:function(){return un},combinedPurchase:function(){return ln},config:function(){return dn},ga4AddToCart:function(){return sn},ga4Purchase:function(){return on},gtmProductView:function(){return cn}});var an,on={name:"purchase",settings:{ga4:{include:["data","context"]}},data:{map:{transaction_id:"data.id",value:"data.total",tax:"data.taxes",shipping:"data.shipping",currency:{key:"data.currency",value:"EUR"},items:{loop:["nested",{condition:function(e){return C(e)&&"product"===e.entity},map:{item_id:"data.id",item_name:"data.name",quantity:{key:"data.quantity",value:1}}}]}}}},sn={name:"add_to_cart",settings:{ga4:{include:["data"]}},data:{map:{currency:{value:"EUR",key:"data.currency"},value:"data.price",items:{loop:["this",{map:{item_id:"data.id",item_variant:"data.color",quantity:{value:1,key:"data.quantity"}}}]}}}},un={name:"CONVERSION_LABEL",settings:{ads:{}},data:{map:{value:"data.total",currency:{value:"EUR",key:"data.currency"},transaction_id:"data.id"}}},cn={name:"product_view",settings:{gtm:{}},data:{map:{product_id:"data.id",product_name:"data.name",product_category:"data.category",value:"data.price",currency:{value:"EUR",key:"data.currency"}}}},ln={name:"purchase",settings:{ga4:{include:["data"]},ads:{},gtm:{}},data:{map:{transaction_id:"data.id",value:"data.total",currency:{value:"EUR",key:"data.currency"},items:{loop:["nested",{condition:function(e){return C(e)&&"product"===e.entity},map:{item_id:"data.id",item_name:"data.name",quantity:{value:1,key:"data.quantity"}}}]}}}},dn={order:{complete:ln},product:{add:sn,view:cn}},_n=!1,fn={marketing:["ad_storage","ad_user_data","ad_personalization"],functional:["analytics_storage"]},pn={type:"google-gtag",config:{settings:{}},init:function(r){var n=r.config,a=r.env,i=n.settings,o=void 0===i?{}:i,s=n.loadScript,u=o.ga4,c=o.ads,l=o.gtm;return(null==u?void 0:u.measurementId)&&function(r,n,a){var i=z(a),o=i.window,s=i.document,u=r.measurementId,c=r.transport_url,l=r.server_container_url,d=r.pageview;if(u){n&&e(u,void 0,s),t(o);var _={};c&&(_.transport_url=c),l&&(_.server_container_url=l),!1===d&&(_.send_page_view=!1);var f=o.gtag;f("js",new Date),f("config",u,_)}}(u,s,a),(null==c?void 0:c.conversionId)&&function(r,n,a){var i=z(a),o=i.window,s=i.document,u=r.conversionId;if(u){r.currency||(r.currency="EUR"),n&&e(u,void 0,s),t(o);var c=o.gtag;c("js",new Date),c("config",u)}}(c,s,a),(null==l?void 0:l.containerId)&&function(e,t,r){var n=z(r),a=n.window,i=n.document,o=e.containerId,s=e.dataLayer,u=e.domain,c=s||Xr;c===Xr?a.dataLayer=a.dataLayer||[]:a[c]=a[c]||[],a[c].push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),t&&o&&$(o,u||Gr,c,i)}(l,s,a),!!((null==u?void 0:u.measurementId)||(null==c?void 0:c.conversionId)||(null==l?void 0:l.containerId))&&n},push:function(e,t){return _async_to_generator(function(e,t){var r,n,a,i,o,s,u,c,l,d,_,f,p,h,v;return _ts_generator(this,function(y){switch(y.label){case 0:return r=t.config,n=t.mapping,a=void 0===n?{}:n,i=t.data,o=t.env,s=t.collector,u=r.settings,l=(c=void 0===u?{}:u).ga4,d=c.ads,_=c.gtm,f=a.settings||{},[4,F(e,i,r,l,s)];case 1:return p=y.sent(),[4,F(e,i,r,d,s)];case 2:return h=y.sent(),[4,F(e,i,r,_,s)];case 3:return v=y.sent(),(null==l?void 0:l.measurementId)&&D(e,l,f.ga4,p,o),(null==d?void 0:d.conversionId)&&a.name&&function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,o=t.conversionId,s=t.currency,u=C(n)?n:{},c=r.label||a;if(c){var l=_object_spread({send_to:"".concat(o,"/").concat(c),currency:s||"EUR"},u);(0,z(i).window.gtag)("event","conversion",l)}}(e,d,f.ads,h,a.name,o),(null==_?void 0:_.containerId)&&function(e,t){var r=arguments.length>3?arguments[3]:void 0,n=z(arguments.length>4?arguments[4]:void 0).window,a={event:e.name};n.dataLayer.push(_object_spread({},a,C(r)?r:e))}(e,_,f.gtm,v,o),[2]}})}).apply(this,arguments)},on:function(e,r){var n;if("consent"===e&&r){var a=r,i=((null===(n=this.config)||void 0===n?void 0:n.settings)||{}).como,o=void 0===i||i;if(o){var s=z(this.env).window,u=t(s);if(u){var c=!0===o?fn:o;if(!_n){var l=new Set;if(Object.values(c).forEach(function(e){(Array.isArray(e)?e:[e]).forEach(function(e){return l.add(e)})}),l.size>0){var d={};l.forEach(function(e){d[e]="denied"}),u("consent","default",d)}_n=!0}var _={};Object.entries(a).forEach(function(e){var t=_sliced_to_array(e,2),r=t[0],n=t[1],a=c[r];if(a){var i=Array.isArray(a)?a:[a],o=n?"granted":"denied";i.forEach(function(e){_[e]=o})}}),0!==Object.keys(_).length&&u("consent","update",_)}}}}},hn=pn;return an=Y,function(e,t,r,n){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var a=!0,i=!1,o=void 0;try{for(var s,u=function(){var a=s.value;H.call(e,a)||a===r||W(e,a,{get:function(){return t[a]},enumerable:!(n=X(t,a))||n.enumerable})},c=G(t)[Symbol.iterator]();!(a=(s=c.next()).done);a=!0)u()}catch(e){i=!0,o=e}finally{try{a||null==c.return||c.return()}finally{if(i)throw o}}}return e}(W({},"__esModule",{value:!0}),an)}();
|