oidc-spa 8.6.19 → 8.7.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.
Files changed (140) hide show
  1. package/backend.d.ts +3 -20
  2. package/backend.js +50 -242
  3. package/backend.js.map +1 -1
  4. package/core/OidcMetadata.d.ts +2 -2
  5. package/core/OidcMetadata.js.map +1 -1
  6. package/core/createOidc.d.ts +2 -4
  7. package/core/createOidc.js +49 -3
  8. package/core/createOidc.js.map +1 -1
  9. package/core/dpop.d.ts +20 -0
  10. package/core/dpop.js +389 -0
  11. package/core/dpop.js.map +1 -0
  12. package/core/earlyInit.js +2 -0
  13. package/core/earlyInit.js.map +1 -1
  14. package/core/oidcClientTsUserToTokens.d.ts +1 -0
  15. package/core/oidcClientTsUserToTokens.js +15 -5
  16. package/core/oidcClientTsUserToTokens.js.map +1 -1
  17. package/core/tokenExfiltrationDefense.js +49 -6
  18. package/core/tokenExfiltrationDefense.js.map +1 -1
  19. package/esm/angular.d.ts +2 -0
  20. package/esm/angular.mjs.map +1 -1
  21. package/esm/backend.d.ts +3 -20
  22. package/esm/backend.mjs +50 -242
  23. package/esm/backend.mjs.map +1 -1
  24. package/esm/core/OidcMetadata.d.ts +2 -2
  25. package/esm/core/OidcMetadata.mjs.map +1 -1
  26. package/esm/core/createOidc.d.ts +2 -4
  27. package/esm/core/createOidc.mjs +49 -3
  28. package/esm/core/createOidc.mjs.map +1 -1
  29. package/esm/core/dpop.d.ts +20 -0
  30. package/esm/core/dpop.mjs +384 -0
  31. package/esm/core/dpop.mjs.map +1 -0
  32. package/esm/core/earlyInit.mjs +2 -0
  33. package/esm/core/earlyInit.mjs.map +1 -1
  34. package/esm/core/oidcClientTsUserToTokens.d.ts +1 -0
  35. package/esm/core/oidcClientTsUserToTokens.mjs +15 -5
  36. package/esm/core/oidcClientTsUserToTokens.mjs.map +1 -1
  37. package/esm/core/tokenExfiltrationDefense.mjs +49 -6
  38. package/esm/core/tokenExfiltrationDefense.mjs.map +1 -1
  39. package/esm/react-spa/createOidcSpaApi.mjs +2 -1
  40. package/esm/react-spa/createOidcSpaApi.mjs.map +1 -1
  41. package/esm/react-spa/types.d.ts +2 -0
  42. package/esm/server/createOidcSpaUtils.d.ts +5 -0
  43. package/esm/server/createOidcSpaUtils.mjs +639 -0
  44. package/esm/server/createOidcSpaUtils.mjs.map +1 -0
  45. package/esm/server/index.d.ts +2 -0
  46. package/esm/server/index.mjs +3 -0
  47. package/esm/server/index.mjs.map +1 -0
  48. package/esm/server/types.d.ts +79 -0
  49. package/esm/server/types.mjs +2 -0
  50. package/esm/server/types.mjs.map +1 -0
  51. package/esm/server/utilsBuilder.d.ts +10 -0
  52. package/esm/server/utilsBuilder.mjs +13 -0
  53. package/esm/server/utilsBuilder.mjs.map +1 -0
  54. package/esm/tanstack-start/react/accessTokenValidation_rfc9068.d.ts +1 -1
  55. package/esm/tanstack-start/react/accessTokenValidation_rfc9068.mjs +102 -94
  56. package/esm/tanstack-start/react/accessTokenValidation_rfc9068.mjs.map +1 -1
  57. package/esm/tanstack-start/react/createOidcSpaApi.d.ts +2 -2
  58. package/esm/tanstack-start/react/createOidcSpaApi.mjs +60 -51
  59. package/esm/tanstack-start/react/createOidcSpaApi.mjs.map +1 -1
  60. package/esm/tanstack-start/react/index.d.ts +1 -1
  61. package/esm/tanstack-start/react/index.mjs +2 -2
  62. package/esm/tanstack-start/react/index.mjs.map +1 -1
  63. package/esm/tanstack-start/react/types.d.ts +36 -11
  64. package/esm/tanstack-start/react/{apiBuilder.d.ts → utilsBuilder.d.ts} +9 -9
  65. package/esm/tanstack-start/react/{apiBuilder.mjs → utilsBuilder.mjs} +6 -6
  66. package/esm/tanstack-start/react/utilsBuilder.mjs.map +1 -0
  67. package/esm/tools/generateES256DPoPProof.d.ts +8 -0
  68. package/esm/tools/generateES256DPoPProof.mjs +48 -0
  69. package/esm/tools/generateES256DPoPProof.mjs.map +1 -0
  70. package/esm/tools/getServerDateNow.d.ts +5 -0
  71. package/esm/tools/getServerDateNow.mjs +7 -0
  72. package/esm/tools/getServerDateNow.mjs.map +1 -0
  73. package/esm/vendor/{backend → server}/evt.mjs +84 -140
  74. package/esm/vendor/{backend → server}/jose.mjs +5 -27
  75. package/esm/vendor/{backend → server}/tsafe.d.ts +1 -0
  76. package/esm/vendor/{backend → server}/tsafe.mjs +6 -0
  77. package/esm/vendor/{backend → server}/zod.mjs +196 -50
  78. package/package.json +6 -1
  79. package/react-spa/createOidcSpaApi.js +2 -1
  80. package/react-spa/createOidcSpaApi.js.map +1 -1
  81. package/react-spa/types.d.ts +2 -0
  82. package/server/createOidcSpaUtils.d.ts +5 -0
  83. package/server/createOidcSpaUtils.js +642 -0
  84. package/server/createOidcSpaUtils.js.map +1 -0
  85. package/server/index.d.ts +2 -0
  86. package/server/index.js +6 -0
  87. package/server/index.js.map +1 -0
  88. package/server/types.d.ts +79 -0
  89. package/server/types.js +3 -0
  90. package/server/types.js.map +1 -0
  91. package/server/utilsBuilder.d.ts +10 -0
  92. package/server/utilsBuilder.js +16 -0
  93. package/server/utilsBuilder.js.map +1 -0
  94. package/src/angular.ts +3 -0
  95. package/src/backend.ts +63 -364
  96. package/src/core/OidcMetadata.ts +4 -2
  97. package/src/core/createOidc.ts +62 -6
  98. package/src/core/dpop.ts +583 -0
  99. package/src/core/earlyInit.ts +3 -0
  100. package/src/core/oidcClientTsUserToTokens.ts +18 -4
  101. package/src/core/tokenExfiltrationDefense.ts +60 -5
  102. package/src/react-spa/createOidcSpaApi.ts +2 -1
  103. package/src/react-spa/types.tsx +3 -0
  104. package/src/server/createOidcSpaUtils.ts +848 -0
  105. package/src/server/index.ts +4 -0
  106. package/src/server/types.tsx +99 -0
  107. package/src/server/utilsBuilder.ts +41 -0
  108. package/src/tanstack-start/react/accessTokenValidation_rfc9068.ts +134 -124
  109. package/src/tanstack-start/react/createOidcSpaApi.ts +73 -69
  110. package/src/tanstack-start/react/index.ts +2 -2
  111. package/src/tanstack-start/react/types.tsx +44 -12
  112. package/src/tanstack-start/react/{apiBuilder.ts → utilsBuilder.ts} +14 -14
  113. package/src/tools/generateES256DPoPProof.ts +74 -0
  114. package/src/tools/getServerDateNow.ts +11 -0
  115. package/src/vendor/{backend → server}/tsafe.ts +1 -0
  116. package/tools/generateES256DPoPProof.d.ts +8 -0
  117. package/tools/generateES256DPoPProof.js +51 -0
  118. package/tools/generateES256DPoPProof.js.map +1 -0
  119. package/tools/getServerDateNow.d.ts +5 -0
  120. package/tools/getServerDateNow.js +10 -0
  121. package/tools/getServerDateNow.js.map +1 -0
  122. package/vendor/server/evt.js +3 -0
  123. package/vendor/server/jose.js +3 -0
  124. package/vendor/{backend → server}/tsafe.d.ts +1 -0
  125. package/vendor/server/tsafe.js +2 -0
  126. package/vendor/server/zod.js +3 -0
  127. package/esm/tanstack-start/react/apiBuilder.mjs.map +0 -1
  128. package/vendor/backend/evt.js +0 -3
  129. package/vendor/backend/jose.js +0 -3
  130. package/vendor/backend/tsafe.js +0 -2
  131. package/vendor/backend/zod.js +0 -3
  132. /package/esm/vendor/{backend → server}/evt.d.ts +0 -0
  133. /package/esm/vendor/{backend → server}/jose.d.ts +0 -0
  134. /package/esm/vendor/{backend → server}/zod.d.ts +0 -0
  135. /package/src/vendor/{backend → server}/evt.ts +0 -0
  136. /package/src/vendor/{backend → server}/jose.ts +0 -0
  137. /package/src/vendor/{backend → server}/zod.ts +0 -0
  138. /package/vendor/{backend → server}/evt.d.ts +0 -0
  139. /package/vendor/{backend → server}/jose.d.ts +0 -0
  140. /package/vendor/{backend → server}/zod.d.ts +0 -0
@@ -3,3 +3,4 @@ export { id } from "tsafe/id";
3
3
  export { isAmong } from "tsafe/isAmong";
4
4
  export type { Equals } from "tsafe";
5
5
  export { exclude } from "tsafe/exclude";
6
+ export { Reflect } from "tsafe/Reflect";
@@ -0,0 +1,2 @@
1
+ (()=>{"use strict";var e={549:(e,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Reflect=function(){return null}},720:function(e,r){var t,n=this&&this.__extends||(t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])},t(e,r)},function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(r,"__esModule",{value:!0}),r.AssertionError=void 0,r.assert=function e(r,t){if(0===arguments.length&&(r=!0),void 0===i){if(!r){var n=new o("function"==typeof t?t():t);throw Error.captureStackTrace&&Error.captureStackTrace(n,e),n}}else i=void 0},r.is=function(e){var r={};if(void 0!==i)throw i=void 0,new Error(u);return i=r,Promise.resolve().then((function(){if(i===r)throw new Error(u)})),null};var o=function(e){function r(r){var t=this.constructor,n=e.call(this,"Wrong assertion encountered"+(r?': "'.concat(r,'"'):""))||this;return n.originalMessage=r,Object.setPrototypeOf(n,t.prototype),n}return n(r,e),r}(Error);r.AssertionError=o;var i=void 0,u="Wrong usage of the `is` function refer to https://docs.tsafe.dev/is"},202:(e,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.exclude=function(e){var r=e instanceof Object?function(r){return e.indexOf(r)<0}:function(r){return r!==e};return function(e){return r(e)}}},135:(e,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.id=void 0,r.id=function(e){return e}},952:function(e,r){var t=this&&this.__values||function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(r,"__esModule",{value:!0}),r.isAmong=function(e,r){var n,o;try{for(var i=t(e),u=i.next();!u.done;u=i.next())if(u.value===r)return!0}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return!1}}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return e[n].call(i.exports,i,i.exports,t),i.exports}var n={};(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.Reflect=e.exclude=e.isAmong=e.id=e.is=e.assert=void 0;var r=t(720);Object.defineProperty(e,"assert",{enumerable:!0,get:function(){return r.assert}}),Object.defineProperty(e,"is",{enumerable:!0,get:function(){return r.is}});var o=t(135);Object.defineProperty(e,"id",{enumerable:!0,get:function(){return o.id}});var i=t(952);Object.defineProperty(e,"isAmong",{enumerable:!0,get:function(){return i.isAmong}});var u=t(202);Object.defineProperty(e,"exclude",{enumerable:!0,get:function(){return u.exclude}});var c=t(549);Object.defineProperty(e,"Reflect",{enumerable:!0,get:function(){return c.Reflect}})})(),module.exports=n})();
2
+ exports.__oidcSpaBundle = true;
@@ -0,0 +1,3 @@
1
+ /*! For license information please see index.js.LICENSE.txt */
2
+ (()=>{"use strict";var e={798:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(796),t)},707:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){s=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw i}}}}function i(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(e)||function(){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 o(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(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,c(n.key),n)}}function c(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function d(e){var t="function"==typeof Map?new Map:void 0;return d=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(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 function(e,t,r){if(l())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var a=new(e.bind.apply(e,n));return r&&f(a,r.prototype),a}(e,arguments,p(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),f(r,e)},d(e)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.ZodError=t.quotelessJson=t.ZodIssueCode=void 0;var h=r(852);t.ZodIssueCode=h.util.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"]),t.quotelessJson=function(e){return JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:")};var v=function(e){function t(e){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=p(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}(this,t)).issues=[],r.addIssue=function(e){r.issues=[].concat(i(r.issues),[e])},r.addIssues=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];r.issues=[].concat(i(r.issues),i(e))};var a=(this instanceof t?this.constructor:void 0).prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,a):r.__proto__=a,r.name="ZodError",r.issues=e,r}return function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),r=t,o=[{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 i,o=a(e.issues);try{for(o.s();!(i=o.n()).done;){var u=i.value;if("invalid_union"===u.code)u.unionErrors.map(n);else if("invalid_return_type"===u.code)n(u.returnTypeError);else if("invalid_arguments"===u.code)n(u.argumentsError);else if(0===u.path.length)r._errors.push(t(u));else for(var s=r,c=0;c<u.path.length;){var d=u.path[c];c===u.path.length-1?(s[d]=s[d]||{_errors:[]},s[d]._errors.push(t(u))):s[d]=s[d]||{_errors:[]},s=s[d],c++}}}catch(e){o.e(e)}finally{o.f()}};return n(this),r}},{key:"toString",value:function(){return this.message}},{key:"message",get:function(){return JSON.stringify(this.issues,h.util.jsonStringifyReplacer,2)}},{key:"isEmpty",get:function(){return 0===this.issues.length}},{key:"flatten",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e.message},r={},n=[],i=a(this.issues);try{for(i.s();!(e=i.n()).done;){var o=e.value;o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o))}}catch(e){i.e(e)}finally{i.f()}return{formErrors:n,fieldErrors:r}}},{key:"formErrors",get:function(){return this.flatten()}}],u=[{key:"assert",value:function(e){if(!(e instanceof t))throw new Error("Not a ZodError: ".concat(e))}}],o&&s(r.prototype,o),u&&s(r,u),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,u}(d(Error));t.ZodError=v,v.create=function(e){return new v(e)}},989:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorMap=t.setErrorMap=t.defaultErrorMap=void 0;var a=n(r(21));t.defaultErrorMap=a.default;var i=a.default;t.setErrorMap=function(e){i=e},t.getErrorMap=function(){return i}},817:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(989),t),a(r(821),t),a(r(226),t),a(r(852),t),a(r(57),t),a(r(707),t)},428:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.errorUtil=void 0,function(e){e.errToObj=function(e){return"string"==typeof e?{message:e}:e||{}},e.toString=function(e){return"string"==typeof e?e:null==e?void 0:e.message}}(r||(t.errorUtil=r={}))},821:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var a=t&&t.prototype instanceof _?t:_,i=Object.create(a.prototype),u=new A(n||[]);return o(i,"_invoke",{value:C(e,r,u)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",v="suspendedYield",y="executing",m="completed",g={};function _(){}function b(){}function k(){}var w={};l(w,s,(function(){return this}));var x=Object.getPrototypeOf,I=x&&x(x(E([])));I&&I!==r&&i.call(I,s)&&(w=I);var Z=k.prototype=_.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(a,o,u,s){var c=p(e[a],e,o);if("throw"!==c.type){var d=c.arg,l=d.value;return l&&"object"==n(l)&&i.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,u,s)}),(function(e){r("throw",e,u,s)})):t.resolve(l).then((function(e){d.value=e,u(d)}),(function(e){return r("throw",e,u,s)}))}s(c.arg)}var a;o(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,a){r(e,n,t,a)}))}return a=a?a.then(i,i):i()}})}function C(t,r,n){var a=h;return function(i,o){if(a===y)throw Error("Generator is already running");if(a===m){if("throw"===i)throw o;return{value:e,done:!0}}for(n.method=i,n.arg=o;;){var u=n.delegate;if(u){var s=P(u,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=y;var c=p(t,r,n);if("normal"===c.type){if(a=n.done?m:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a=m,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(a,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function E(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(i.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(n(t)+" is not iterable")}return b.prototype=k,o(Z,"constructor",{value:k,configurable:!0}),o(k,"constructor",{value:b,configurable:!0}),b.displayName=l(k,d,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,l(e,d,"GeneratorFunction")),e.prototype=Object.create(Z),e},t.awrap=function(e){return{__await:e}},T(O.prototype),l(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,a,i){void 0===i&&(i=Promise);var o=new O(f(e,r,n,a),i);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},T(Z),l(Z,d,"Generator"),l(Z,s,(function(){return this})),l(Z,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=E,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,a){return u.type="throw",u.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],u=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;S(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:E(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function i(e,t,r,n,a,i,o){try{var u=e[i](o),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,a)}function o(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,l(n.key),n)}}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){u=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw i}}}}function s(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 c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function f(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){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 p(e,t){if(e){if("string"==typeof e)return h(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var v=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=t.isValid=t.isDirty=t.isAborted=t.OK=t.DIRTY=t.INVALID=t.ParseStatus=t.addIssueToContext=t.EMPTY_PATH=t.makeIssue=void 0;var y=r(989),m=v(r(21));t.makeIssue=function(e){var t=e.data,r=e.path,n=e.errorMaps,a=e.issueData,i=[].concat(f(r),f(a.path||[])),o=c(c({},a),{},{path:i});if(void 0!==a.message)return c(c({},a),{},{path:i,message:a.message});var s,d="",l=u(n.filter((function(e){return!!e})).slice().reverse());try{for(l.s();!(s=l.n()).done;)d=(0,s.value)(o,{data:t,defaultError:d}).message}catch(e){l.e(e)}finally{l.f()}return c(c({},a),{},{path:i,message:d})},t.EMPTY_PATH=[],t.addIssueToContext=function(e,r){var n=(0,y.getErrorMap)(),a=(0,t.makeIssue)({issueData:r,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===m.default?void 0:m.default].filter((function(e){return!!e}))});e.common.issues.push(a)};var g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.value="valid"}return r=e,n=[{key:"dirty",value:function(){"valid"===this.value&&(this.value="dirty")}},{key:"abort",value:function(){"aborted"!==this.value&&(this.value="aborted")}}],s=[{key:"mergeArray",value:function(e,r){var n,a=[],i=u(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;if("aborted"===o.status)return t.INVALID;"dirty"===o.status&&e.dirty(),a.push(o.value)}}catch(e){i.e(e)}finally{i.f()}return{status:e.value,value:a}}},{key:"mergeObjectAsync",value:(c=a().mark((function t(r,n){var i,o,s,c,d,l;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=[],o=u(n),t.prev=2,o.s();case 4:if((s=o.n()).done){t.next=15;break}return c=s.value,t.next=8,c.key;case 8:return d=t.sent,t.next=11,c.value;case 11:l=t.sent,i.push({key:d,value:l});case 13:t.next=4;break;case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(2),o.e(t.t0);case 20:return t.prev=20,o.f(),t.finish(20);case 23:return t.abrupt("return",e.mergeObjectSync(r,i));case 24:case"end":return t.stop()}}),t,null,[[2,17,20,23]])})),d=function(){var e=this,t=arguments;return new Promise((function(r,n){var a=c.apply(e,t);function o(e){i(a,r,n,o,u,"next",e)}function u(e){i(a,r,n,o,u,"throw",e)}o(void 0)}))},function(e,t){return d.apply(this,arguments)})},{key:"mergeObjectSync",value:function(e,r){var n,a={},i=u(r);try{for(i.s();!(n=i.n()).done;){var o=n.value,s=o.key,c=o.value;if("aborted"===s.status)return t.INVALID;if("aborted"===c.status)return t.INVALID;"dirty"===s.status&&e.dirty(),"dirty"===c.status&&e.dirty(),"__proto__"===s.value||void 0===c.value&&!o.alwaysSet||(a[s.value]=c.value)}}catch(e){i.e(e)}finally{i.f()}return{status:e.value,value:a}}}],n&&o(r.prototype,n),s&&o(r,s),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,s,c,d}();t.ParseStatus=g,t.INVALID=Object.freeze({status:"aborted"}),t.DIRTY=function(e){return{status:"dirty",value:e}},t.OK=function(e){return{status:"valid",value:e}},t.isAborted=function(e){return"aborted"===e.status},t.isDirty=function(e){return"dirty"===e.status},t.isValid=function(e){return"valid"===e.status},t.isAsync=function(e){return"undefined"!=typeof Promise&&e instanceof Promise}},226:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},852:(e,t)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(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 a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return(t=function(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var s,c;Object.defineProperty(t,"__esModule",{value:!0}),t.getParsedType=t.ZodParsedType=t.objectUtil=t.util=void 0,function(e){e.assertEqual=function(e){return e},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=function(e){var t,r={},n=o(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;r[a]=a}}catch(e){n.e(e)}finally{n.f()}return r},e.getValidEnumValues=function(t){var r,n=e.objectKeys(t).filter((function(e){return"number"!=typeof t[t[e]]})),a={},i=o(n);try{for(i.s();!(r=i.n()).done;){var u=r.value;a[u]=t[u]}}catch(e){i.e(e)}finally{i.f()}return e.objectValues(a)},e.objectValues=function(t){return e.objectKeys(t).map((function(e){return t[e]}))},e.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},e.find=function(e,t){var r,n=o(e);try{for(n.s();!(r=n.n()).done;){var a=r.value;if(t(a))return a}}catch(e){n.e(e)}finally{n.f()}},e.isInteger="function"==typeof Number.isInteger?function(e){return Number.isInteger(e)}:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.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)},e.jsonStringifyReplacer=function(e,t){return"bigint"==typeof t?t.toString():t}}(s||(t.util=s={})),function(e){e.mergeShapes=function(e,t){return a(a({},e),t)}}(c||(t.objectUtil=c={})),t.ZodParsedType=s.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),t.getParsedType=function(e){switch(r(e)){case"undefined":return t.ZodParsedType.undefined;case"string":return t.ZodParsedType.string;case"number":return isNaN(e)?t.ZodParsedType.nan:t.ZodParsedType.number;case"boolean":return t.ZodParsedType.boolean;case"function":return t.ZodParsedType.function;case"bigint":return t.ZodParsedType.bigint;case"symbol":return t.ZodParsedType.symbol;case"object":return Array.isArray(e)?t.ZodParsedType.array:null===e?t.ZodParsedType.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?t.ZodParsedType.promise:"undefined"!=typeof Map&&e instanceof Map?t.ZodParsedType.map:"undefined"!=typeof Set&&e instanceof Set?t.ZodParsedType.set:"undefined"!=typeof Date&&e instanceof Date?t.ZodParsedType.date:t.ZodParsedType.object;default:return t.ZodParsedType.unknown}}},796:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t},o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;var u=i(r(817));t.z=u,o(r(817),t),t.default=u},21:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(852),i=r(707);t.default=function(e,t){var r;switch(e.code){case i.ZodIssueCode.invalid_type:r=e.received===a.ZodParsedType.undefined?"Required":"Expected ".concat(e.expected,", received ").concat(e.received);break;case i.ZodIssueCode.invalid_literal:r="Invalid literal value, expected ".concat(JSON.stringify(e.expected,a.util.jsonStringifyReplacer));break;case i.ZodIssueCode.unrecognized_keys:r="Unrecognized key(s) in object: ".concat(a.util.joinValues(e.keys,", "));break;case i.ZodIssueCode.invalid_union:r="Invalid input";break;case i.ZodIssueCode.invalid_union_discriminator:r="Invalid discriminator value. Expected ".concat(a.util.joinValues(e.options));break;case i.ZodIssueCode.invalid_enum_value:r="Invalid enum value. Expected ".concat(a.util.joinValues(e.options),", received '").concat(e.received,"'");break;case i.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case i.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case i.ZodIssueCode.invalid_date:r="Invalid date";break;case i.ZodIssueCode.invalid_string:"object"===n(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,'"'):a.util.assertNever(e.validation):r="regex"!==e.validation?"Invalid ".concat(e.validation):"Invalid";break;case i.ZodIssueCode.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?"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 i.ZodIssueCode.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 i.ZodIssueCode.custom:r="Invalid input";break;case i.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case i.ZodIssueCode.not_multiple_of:r="Number must be a multiple of ".concat(e.multipleOf);break;case i.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError,a.util.assertNever(e)}return{message:r}}},57:function(e,t,r){function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=g(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){u=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw i}}}}function a(e,t,r){return t=o(t),function(e,t){if(t&&("object"==y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function u(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,u=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(e){c=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return u}}(e,t)||g(e,t)||function(){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 d(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 l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r){return(t=x(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var i=t&&t.prototype instanceof _?t:_,o=Object.create(i.prototype),u=new A(n||[]);return a(o,"_invoke",{value:C(e,r,u)}),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var f="suspendedStart",h="suspendedYield",v="executing",m="completed",g={};function _(){}function b(){}function k(){}var w={};c(w,o,(function(){return this}));var x=Object.getPrototypeOf,I=x&&x(x(E([])));I&&I!==r&&n.call(I,o)&&(w=I);var Z=k.prototype=_.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(a,i,o,u){var s=l(e[a],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==y(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,o,u)}),(function(e){r("throw",e,o,u)})):t.resolve(d).then((function(e){c.value=e,o(c)}),(function(e){return r("throw",e,o,u)}))}u(s.arg)}var i;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return i=i?i.then(a,a):a()}})}function C(t,r,n){var a=f;return function(i,o){if(a===v)throw Error("Generator is already running");if(a===m){if("throw"===i)throw o;return{value:e,done:!0}}for(n.method=i,n.arg=o;;){var u=n.delegate;if(u){var s=P(u,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=v;var c=l(t,r,n);if("normal"===c.type){if(a=n.done?m:h,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a=m,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=l(a,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function E(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(y(t)+" is not iterable")}return b.prototype=k,a(Z,"constructor",{value:k,configurable:!0}),a(k,"constructor",{value:b,configurable:!0}),b.displayName=c(k,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,c(e,s,"GeneratorFunction")),e.prototype=Object.create(Z),e},t.awrap=function(e){return{__await:e}},T(O.prototype),c(O.prototype,u,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,a,i){void 0===i&&(i=Promise);var o=new O(d(e,r,n,a),i);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},T(Z),c(Z,s,"Generator"),c(Z,o,(function(){return this})),c(Z,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=E,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return u.type="throw",u.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],u=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;S(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:E(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function h(e,t,r,n,a,i,o){try{var u=e[i](o),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,a)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){h(i,n,a,o,u,"next",e)}function u(e){h(i,n,a,o,u,"throw",e)}o(void 0)}))}}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function m(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||g(e)||function(){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 g(e,t){if(e){if("string"==typeof e)return _(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(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,x(n.key),n)}}function w(e,t,r){return t&&k(e.prototype,t),r&&k(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}var I,Z,T=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},O=this&&this.__classPrivateFieldSet||function(e,t,r,n,a){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=t.bigint=t.array=t.any=t.coerce=t.ZodFirstPartyTypeKind=t.late=t.ZodSchema=t.Schema=t.custom=t.ZodReadonly=t.ZodPipeline=t.ZodBranded=t.BRAND=t.ZodNaN=t.ZodCatch=t.ZodDefault=t.ZodNullable=t.ZodOptional=t.ZodTransformer=t.ZodEffects=t.ZodPromise=t.ZodNativeEnum=t.ZodEnum=t.ZodLiteral=t.ZodLazy=t.ZodFunction=t.ZodSet=t.ZodMap=t.ZodRecord=t.ZodTuple=t.ZodIntersection=t.ZodDiscriminatedUnion=t.ZodUnion=t.ZodObject=t.ZodArray=t.ZodVoid=t.ZodNever=t.ZodUnknown=t.ZodAny=t.ZodNull=t.ZodUndefined=t.ZodSymbol=t.ZodDate=t.ZodBoolean=t.ZodBigInt=t.ZodNumber=t.ZodString=t.datetimeRegex=t.ZodType=void 0,t.NEVER=t.void=t.unknown=t.union=t.undefined=t.tuple=t.transformer=t.symbol=t.string=t.strictObject=t.set=t.record=t.promise=t.preprocess=t.pipeline=t.ostring=t.optional=t.onumber=t.oboolean=t.object=t.number=t.nullable=t.null=t.never=t.nativeEnum=t.nan=t.map=t.literal=t.lazy=t.intersection=t.instanceof=t.function=t.enum=t.effect=t.discriminatedUnion=t.date=void 0;var C=r(989),P=r(428),j=r(821),S=r(852),A=r(707),E=function(){return w((function e(t,r,n,a){b(this,e),this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=a}),[{key:"path",get:function(){var e,t;return this._cachedPath.length||(this._key instanceof Array?(e=this._cachedPath).push.apply(e,m(this._path).concat(m(this._key))):(t=this._cachedPath).push.apply(t,m(this._path).concat([this._key]))),this._cachedPath}}])}(),N=function(e,t){if((0,j.isValid)(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 A.ZodError(e.common.issues);return this._error=t,this._error}}};function L(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.');return t?{errorMap:t,description:a}:{errorMap:function(t,a){var i,o,u=e.message;return"invalid_enum_value"===t.code?{message:null!=u?u:a.defaultError}:void 0===a.data?{message:null!==(i=null!=u?u:n)&&void 0!==i?i:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(o=null!=u?u:r)&&void 0!==o?o:a.defaultError}},description:a}}var D=function(){return w((function e(t){var r=this;b(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)}}}),[{key:"description",get:function(){return this._def.description}},{key:"_getType",value:function(e){return(0,S.getParsedType)(e.data)}},{key:"_getOrReturnCtx",value:function(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,S.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}},{key:"_processInputParams",value:function(e){return{status:new j.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,S.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}},{key:"_parseSync",value:function(e){var t=this._parse(e);if((0,j.isAsync)(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:(0,S.getParsedType)(e)},a=this._parseSync({data:e,path:n.path,parent:n});return N(n,a)}},{key:"~validate",value:function(e){var t,r,n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,S.getParsedType)(e)};if(!this["~standard"].async)try{var a=this._parseSync({data:e,path:[],parent:n});return(0,j.isValid)(a)?{value:a.value}:{issues:n.common.issues}}catch(e){(null===(r=null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.toLowerCase())||void 0===r?void 0:r.includes("encountered"))&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then((function(e){return(0,j.isValid)(e)?{value:e.value}:{issues:n.common.issues}}))}},{key:"parseAsync",value:(t=v(p().mark((function e(t,r){var n;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.safeParseAsync(t,r);case 2:if(!(n=e.sent).success){e.next=5;break}return e.abrupt("return",n.data);case 5:throw n.error;case 6:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})},{key:"safeParseAsync",value:(e=v(p().mark((function e(t,r){var n,a,i;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={common:{issues:[],contextualErrorMap:null==r?void 0:r.errorMap,async:!0},path:(null==r?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:(0,S.getParsedType)(t)},a=this._parse({data:t,path:n.path,parent:n}),e.next=4,(0,j.isAsync)(a)?a:Promise.resolve(a);case 4:return i=e.sent,e.abrupt("return",N(n,i));case 6:case"end":return e.stop()}}),e,this)}))),function(t,r){return e.apply(this,arguments)})},{key:"refine",value:function(e,t){return this._refinement((function(r,n){var a=e(r),i=function(){return n.addIssue(l({code:A.ZodIssueCode.custom},function(e){return"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t}(r)))};return"undefined"!=typeof Promise&&a instanceof 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 Le({schema:this,typeName:Ke.ZodEffects,effect:{type:"refinement",refinement:e}})}},{key:"superRefine",value:function(e){return this._refinement(e)}},{key:"optional",value:function(){return De.create(this,this._def)}},{key:"nullable",value:function(){return Ue.create(this,this._def)}},{key:"nullish",value:function(){return this.nullable().optional()}},{key:"array",value:function(){return ye.create(this)}},{key:"promise",value:function(){return Ne.create(this,this._def)}},{key:"or",value:function(e){return _e.create([this,e],this._def)}},{key:"and",value:function(e){return xe.create(this,e,this._def)}},{key:"transform",value:function(e){return new Le(l(l({},L(this._def)),{},{schema:this,typeName:Ke.ZodEffects,effect:{type:"transform",transform:e}}))}},{key:"default",value:function(e){var t="function"==typeof e?e:function(){return e};return new Re(l(l({},L(this._def)),{},{innerType:this,defaultValue:t,typeName:Ke.ZodDefault}))}},{key:"brand",value:function(){return new Fe(l({typeName:Ke.ZodBranded,type:this},L(this._def)))}},{key:"catch",value:function(e){var t="function"==typeof e?e:function(){return e};return new Me(l(l({},L(this._def)),{},{innerType:this,catchValue:t,typeName:Ke.ZodCatch}))}},{key:"describe",value:function(e){return new(0,this.constructor)(l(l({},this._def),{},{description:e}))}},{key:"pipe",value:function(e){return ze.create(this,e)}},{key:"readonly",value:function(){return Be.create(this)}},{key:"isOptional",value:function(){return this.safeParse(void 0).success}},{key:"isNullable",value:function(){return this.safeParse(null).success}}]);var e,t}();t.ZodType=D,t.Schema=D,t.ZodSchema=D;var U,R=/^c[^\s-]{8,}$/i,M=/^[0-9a-z]+$/,V=/^[0-9A-HJKMNP-TV-Z]{26}$/i,F=/^[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,z=/^[a-z0-9_-]{21}$/i,K=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,B=/^[-+]?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)?)??$/,$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,W=/^(?:(?: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])$/,G=/^(?:(?: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])$/,q=/^(([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]))$/,Y=/^(([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])$/,J=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,H=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,X="((\\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])))",Q=new RegExp("^".concat(X,"$"));function ee(e){var t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t="".concat(t,"\\.\\d{").concat(e.precision,"}"):null==e.precision&&(t="".concat(t,"(\\.\\d+)?")),t}function te(e){var t="".concat(X,"T").concat(ee(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,"$"))}function re(e,t){if(!K.test(e))return!1;try{var r=c(e.split("."),1)[0],n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(n));return!("object"!==y(a)||null===a||!a.typ||!a.alg||t&&a.alg!==t)}catch(e){return!1}}function ne(e,t){return!("v4"!==t&&t||!G.test(e))||!("v6"!==t&&t||!Y.test(e))}t.datetimeRegex=te;var ae=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==S.ZodParsedType.string){var t=this._getOrReturnCtx(e);return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.string,received:t.parsedType}),j.INVALID}var r,a,i,o=new j.ParseStatus,u=void 0,s=n(this._def.checks);try{for(s.s();!(r=s.n()).done;){var c=r.value;if("min"===c.kind)e.data.length<c.value&&(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{code:A.ZodIssueCode.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),o.dirty());else if("max"===c.kind)e.data.length>c.value&&(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{code:A.ZodIssueCode.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),o.dirty());else if("length"===c.kind){var d=e.data.length>c.value,l=e.data.length<c.value;(d||l)&&(u=this._getOrReturnCtx(e,u),d?(0,j.addIssueToContext)(u,{code:A.ZodIssueCode.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}):l&&(0,j.addIssueToContext)(u,{code:A.ZodIssueCode.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}),o.dirty())}else if("email"===c.kind)$.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"email",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty());else if("emoji"===c.kind)U||(U=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),U.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"emoji",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty());else if("uuid"===c.kind)F.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"uuid",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty());else if("nanoid"===c.kind)z.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"nanoid",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty());else if("cuid"===c.kind)R.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"cuid",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty());else if("cuid2"===c.kind)M.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"cuid2",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty());else if("ulid"===c.kind)V.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"ulid",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty());else if("url"===c.kind)try{new URL(e.data)}catch(t){u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"url",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty()}else"regex"===c.kind?(c.regex.lastIndex=0,c.regex.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"regex",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty())):"trim"===c.kind?e.data=e.data.trim():"includes"===c.kind?e.data.includes(c.value,c.position)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{code:A.ZodIssueCode.invalid_string,validation:{includes:c.value,position:c.position},message:c.message}),o.dirty()):"toLowerCase"===c.kind?e.data=e.data.toLowerCase():"toUpperCase"===c.kind?e.data=e.data.toUpperCase():"startsWith"===c.kind?e.data.startsWith(c.value)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{code:A.ZodIssueCode.invalid_string,validation:{startsWith:c.value},message:c.message}),o.dirty()):"endsWith"===c.kind?e.data.endsWith(c.value)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{code:A.ZodIssueCode.invalid_string,validation:{endsWith:c.value},message:c.message}),o.dirty()):"datetime"===c.kind?te(c).test(e.data)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{code:A.ZodIssueCode.invalid_string,validation:"datetime",message:c.message}),o.dirty()):"date"===c.kind?Q.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{code:A.ZodIssueCode.invalid_string,validation:"date",message:c.message}),o.dirty()):"time"===c.kind?new RegExp("^".concat(ee(c),"$")).test(e.data)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{code:A.ZodIssueCode.invalid_string,validation:"time",message:c.message}),o.dirty()):"duration"===c.kind?B.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"duration",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty()):"ip"===c.kind?(a=e.data,("v4"!==(i=c.version)&&i||!W.test(a))&&("v6"!==i&&i||!q.test(a))&&(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"ip",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty())):"jwt"===c.kind?re(e.data,c.alg)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"jwt",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty()):"cidr"===c.kind?ne(e.data,c.version)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"cidr",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty()):"base64"===c.kind?J.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"base64",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty()):"base64url"===c.kind?H.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,j.addIssueToContext)(u,{validation:"base64url",code:A.ZodIssueCode.invalid_string,message:c.message}),o.dirty()):S.util.assertNever(c)}}catch(e){s.e(e)}finally{s.f()}return{status:o.value,value:e.data}}},{key:"_regex",value:function(e,t,r){return this.refinement((function(t){return e.test(t)}),l({validation:t,code:A.ZodIssueCode.invalid_string},P.errorUtil.errToObj(r)))}},{key:"_addCheck",value:function(e){return new t(l(l({},this._def),{},{checks:[].concat(m(this._def.checks),[e])}))}},{key:"email",value:function(e){return this._addCheck(l({kind:"email"},P.errorUtil.errToObj(e)))}},{key:"url",value:function(e){return this._addCheck(l({kind:"url"},P.errorUtil.errToObj(e)))}},{key:"emoji",value:function(e){return this._addCheck(l({kind:"emoji"},P.errorUtil.errToObj(e)))}},{key:"uuid",value:function(e){return this._addCheck(l({kind:"uuid"},P.errorUtil.errToObj(e)))}},{key:"nanoid",value:function(e){return this._addCheck(l({kind:"nanoid"},P.errorUtil.errToObj(e)))}},{key:"cuid",value:function(e){return this._addCheck(l({kind:"cuid"},P.errorUtil.errToObj(e)))}},{key:"cuid2",value:function(e){return this._addCheck(l({kind:"cuid2"},P.errorUtil.errToObj(e)))}},{key:"ulid",value:function(e){return this._addCheck(l({kind:"ulid"},P.errorUtil.errToObj(e)))}},{key:"base64",value:function(e){return this._addCheck(l({kind:"base64"},P.errorUtil.errToObj(e)))}},{key:"base64url",value:function(e){return this._addCheck(l({kind:"base64url"},P.errorUtil.errToObj(e)))}},{key:"jwt",value:function(e){return this._addCheck(l({kind:"jwt"},P.errorUtil.errToObj(e)))}},{key:"ip",value:function(e){return this._addCheck(l({kind:"ip"},P.errorUtil.errToObj(e)))}},{key:"cidr",value:function(e){return this._addCheck(l({kind:"cidr"},P.errorUtil.errToObj(e)))}},{key:"datetime",value:function(e){var t,r;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck(l({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},P.errorUtil.errToObj(null==e?void 0:e.message)))}},{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(l({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision},P.errorUtil.errToObj(null==e?void 0:e.message)))}},{key:"duration",value:function(e){return this._addCheck(l({kind:"duration"},P.errorUtil.errToObj(e)))}},{key:"regex",value:function(e,t){return this._addCheck(l({kind:"regex",regex:e},P.errorUtil.errToObj(t)))}},{key:"includes",value:function(e,t){return this._addCheck(l({kind:"includes",value:e,position:null==t?void 0:t.position},P.errorUtil.errToObj(null==t?void 0:t.message)))}},{key:"startsWith",value:function(e,t){return this._addCheck(l({kind:"startsWith",value:e},P.errorUtil.errToObj(t)))}},{key:"endsWith",value:function(e,t){return this._addCheck(l({kind:"endsWith",value:e},P.errorUtil.errToObj(t)))}},{key:"min",value:function(e,t){return this._addCheck(l({kind:"min",value:e},P.errorUtil.errToObj(t)))}},{key:"max",value:function(e,t){return this._addCheck(l({kind:"max",value:e},P.errorUtil.errToObj(t)))}},{key:"length",value:function(e,t){return this._addCheck(l({kind:"length",value:e},P.errorUtil.errToObj(t)))}},{key:"nonempty",value:function(e){return this.min(1,P.errorUtil.errToObj(e))}},{key:"trim",value:function(){return new t(l(l({},this._def),{},{checks:[].concat(m(this._def.checks),[{kind:"trim"}])}))}},{key:"toLowerCase",value:function(){return new t(l(l({},this._def),{},{checks:[].concat(m(this._def.checks),[{kind:"toLowerCase"}])}))}},{key:"toUpperCase",value:function(){return new t(l(l({},this._def),{},{checks:[].concat(m(this._def.checks),[{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,t=null,r=n(this._def.checks);try{for(r.s();!(e=r.n()).done;){var a=e.value;"min"===a.kind&&(null===t||a.value>t)&&(t=a.value)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"maxLength",get:function(){var e,t=null,r=n(this._def.checks);try{for(r.s();!(e=r.n()).done;){var a=e.value;"max"===a.kind&&(null===t||a.value<t)&&(t=a.value)}}catch(e){r.e(e)}finally{r.f()}return t}}])}(D);t.ZodString=ae,ae.create=function(e){var t;return new ae(l({checks:[],typeName:Ke.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},L(e)))};var ie=function(e){function t(){var e;return b(this,t),(e=a(this,t,arguments)).min=e.gte,e.max=e.lte,e.step=e.multipleOf,e}return u(t,e),w(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==S.ZodParsedType.number){var t=this._getOrReturnCtx(e);return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.number,received:t.parsedType}),j.INVALID}var r,a,i,o,u,s,c=void 0,d=new j.ParseStatus,l=n(this._def.checks);try{for(l.s();!(r=l.n()).done;){var f=r.value;"int"===f.kind?S.util.isInteger(e.data)||(c=this._getOrReturnCtx(e,c),(0,j.addIssueToContext)(c,{code:A.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:f.message}),d.dirty()):"min"===f.kind?(f.inclusive?e.data<f.value:e.data<=f.value)&&(c=this._getOrReturnCtx(e,c),(0,j.addIssueToContext)(c,{code:A.ZodIssueCode.too_small,minimum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),d.dirty()):"max"===f.kind?(f.inclusive?e.data>f.value:e.data>=f.value)&&(c=this._getOrReturnCtx(e,c),(0,j.addIssueToContext)(c,{code:A.ZodIssueCode.too_big,maximum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),d.dirty()):"multipleOf"===f.kind?0!=(a=e.data,i=f.value,void 0,void 0,void 0,s=(o=(a.toString().split(".")[1]||"").length)>(u=(i.toString().split(".")[1]||"").length)?o:u,parseInt(a.toFixed(s).replace(".",""))%parseInt(i.toFixed(s).replace(".",""))/Math.pow(10,s))&&(c=this._getOrReturnCtx(e,c),(0,j.addIssueToContext)(c,{code:A.ZodIssueCode.not_multiple_of,multipleOf:f.value,message:f.message}),d.dirty()):"finite"===f.kind?Number.isFinite(e.data)||(c=this._getOrReturnCtx(e,c),(0,j.addIssueToContext)(c,{code:A.ZodIssueCode.not_finite,message:f.message}),d.dirty()):S.util.assertNever(f)}}catch(e){l.e(e)}finally{l.f()}return{status:d.value,value:e.data}}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,P.errorUtil.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,P.errorUtil.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,P.errorUtil.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,P.errorUtil.toString(t))}},{key:"setLimit",value:function(e,r,n,a){return new t(l(l({},this._def),{},{checks:[].concat(m(this._def.checks),[{kind:e,value:r,inclusive:n,message:P.errorUtil.toString(a)}])}))}},{key:"_addCheck",value:function(e){return new t(l(l({},this._def),{},{checks:[].concat(m(this._def.checks),[e])}))}},{key:"int",value:function(e){return this._addCheck({kind:"int",message:P.errorUtil.toString(e)})}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:P.errorUtil.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:P.errorUtil.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:P.errorUtil.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:P.errorUtil.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:P.errorUtil.toString(t)})}},{key:"finite",value:function(e){return this._addCheck({kind:"finite",message:P.errorUtil.toString(e)})}},{key:"safe",value:function(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:P.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:P.errorUtil.toString(e)})}},{key:"minValue",get:function(){var e,t=null,r=n(this._def.checks);try{for(r.s();!(e=r.n()).done;){var a=e.value;"min"===a.kind&&(null===t||a.value>t)&&(t=a.value)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"maxValue",get:function(){var e,t=null,r=n(this._def.checks);try{for(r.s();!(e=r.n()).done;){var a=e.value;"max"===a.kind&&(null===t||a.value<t)&&(t=a.value)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"isInt",get:function(){return!!this._def.checks.find((function(e){return"int"===e.kind||"multipleOf"===e.kind&&S.util.isInteger(e.value)}))}},{key:"isFinite",get:function(){var e,t=null,r=null,a=n(this._def.checks);try{for(a.s();!(e=a.n()).done;){var i=e.value;if("finite"===i.kind||"int"===i.kind||"multipleOf"===i.kind)return!0;"min"===i.kind?(null===r||i.value>r)&&(r=i.value):"max"===i.kind&&(null===t||i.value<t)&&(t=i.value)}}catch(e){a.e(e)}finally{a.f()}return Number.isFinite(r)&&Number.isFinite(t)}}])}(D);t.ZodNumber=ie,ie.create=function(e){return new ie(l({checks:[],typeName:Ke.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1},L(e)))};var oe=function(e){function t(){var e;return b(this,t),(e=a(this,t,arguments)).min=e.gte,e.max=e.lte,e}return u(t,e),w(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)!==S.ZodParsedType.bigint)return this._getInvalidInput(e);var t,r=void 0,a=new j.ParseStatus,i=n(this._def.checks);try{for(i.s();!(t=i.n()).done;){var o=t.value;"min"===o.kind?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),(0,j.addIssueToContext)(r,{code:A.ZodIssueCode.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):"max"===o.kind?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),(0,j.addIssueToContext)(r,{code:A.ZodIssueCode.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),a.dirty()):"multipleOf"===o.kind?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),(0,j.addIssueToContext)(r,{code:A.ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),a.dirty()):S.util.assertNever(o)}}catch(e){i.e(e)}finally{i.f()}return{status:a.value,value:e.data}}},{key:"_getInvalidInput",value:function(e){var t=this._getOrReturnCtx(e);return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.bigint,received:t.parsedType}),j.INVALID}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,P.errorUtil.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,P.errorUtil.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,P.errorUtil.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,P.errorUtil.toString(t))}},{key:"setLimit",value:function(e,r,n,a){return new t(l(l({},this._def),{},{checks:[].concat(m(this._def.checks),[{kind:e,value:r,inclusive:n,message:P.errorUtil.toString(a)}])}))}},{key:"_addCheck",value:function(e){return new t(l(l({},this._def),{},{checks:[].concat(m(this._def.checks),[e])}))}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:P.errorUtil.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:P.errorUtil.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:P.errorUtil.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:P.errorUtil.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:P.errorUtil.toString(t)})}},{key:"minValue",get:function(){var e,t=null,r=n(this._def.checks);try{for(r.s();!(e=r.n()).done;){var a=e.value;"min"===a.kind&&(null===t||a.value>t)&&(t=a.value)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"maxValue",get:function(){var e,t=null,r=n(this._def.checks);try{for(r.s();!(e=r.n()).done;){var a=e.value;"max"===a.kind&&(null===t||a.value<t)&&(t=a.value)}}catch(e){r.e(e)}finally{r.f()}return t}}])}(D);t.ZodBigInt=oe,oe.create=function(e){var t;return new oe(l({checks:[],typeName:Ke.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},L(e)))};var ue=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==S.ZodParsedType.boolean){var t=this._getOrReturnCtx(e);return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.boolean,received:t.parsedType}),j.INVALID}return(0,j.OK)(e.data)}}])}(D);t.ZodBoolean=ue,ue.create=function(e){return new ue(l({typeName:Ke.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1},L(e)))};var se=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==S.ZodParsedType.date){var t=this._getOrReturnCtx(e);return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.date,received:t.parsedType}),j.INVALID}if(isNaN(e.data.getTime())){var r=this._getOrReturnCtx(e);return(0,j.addIssueToContext)(r,{code:A.ZodIssueCode.invalid_date}),j.INVALID}var a,i=new j.ParseStatus,o=void 0,u=n(this._def.checks);try{for(u.s();!(a=u.n()).done;){var s=a.value;"min"===s.kind?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),(0,j.addIssueToContext)(o,{code:A.ZodIssueCode.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),i.dirty()):"max"===s.kind?e.data.getTime()>s.value&&(o=this._getOrReturnCtx(e,o),(0,j.addIssueToContext)(o,{code:A.ZodIssueCode.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):S.util.assertNever(s)}}catch(e){u.e(e)}finally{u.f()}return{status:i.value,value:new Date(e.data.getTime())}}},{key:"_addCheck",value:function(e){return new t(l(l({},this._def),{},{checks:[].concat(m(this._def.checks),[e])}))}},{key:"min",value:function(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:P.errorUtil.toString(t)})}},{key:"max",value:function(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:P.errorUtil.toString(t)})}},{key:"minDate",get:function(){var e,t=null,r=n(this._def.checks);try{for(r.s();!(e=r.n()).done;){var a=e.value;"min"===a.kind&&(null===t||a.value>t)&&(t=a.value)}}catch(e){r.e(e)}finally{r.f()}return null!=t?new Date(t):null}},{key:"maxDate",get:function(){var e,t=null,r=n(this._def.checks);try{for(r.s();!(e=r.n()).done;){var a=e.value;"max"===a.kind&&(null===t||a.value<t)&&(t=a.value)}}catch(e){r.e(e)}finally{r.f()}return null!=t?new Date(t):null}}])}(D);t.ZodDate=se,se.create=function(e){return new se(l({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Ke.ZodDate},L(e)))};var ce=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){if(this._getType(e)!==S.ZodParsedType.symbol){var t=this._getOrReturnCtx(e);return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.symbol,received:t.parsedType}),j.INVALID}return(0,j.OK)(e.data)}}])}(D);t.ZodSymbol=ce,ce.create=function(e){return new ce(l({typeName:Ke.ZodSymbol},L(e)))};var de=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){if(this._getType(e)!==S.ZodParsedType.undefined){var t=this._getOrReturnCtx(e);return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.undefined,received:t.parsedType}),j.INVALID}return(0,j.OK)(e.data)}}])}(D);t.ZodUndefined=de,de.create=function(e){return new de(l({typeName:Ke.ZodUndefined},L(e)))};var le=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){if(this._getType(e)!==S.ZodParsedType.null){var t=this._getOrReturnCtx(e);return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.null,received:t.parsedType}),j.INVALID}return(0,j.OK)(e.data)}}])}(D);t.ZodNull=le,le.create=function(e){return new le(l({typeName:Ke.ZodNull},L(e)))};var fe=function(e){function t(){var e;return b(this,t),(e=a(this,t,arguments))._any=!0,e}return u(t,e),w(t,[{key:"_parse",value:function(e){return(0,j.OK)(e.data)}}])}(D);t.ZodAny=fe,fe.create=function(e){return new fe(l({typeName:Ke.ZodAny},L(e)))};var pe=function(e){function t(){var e;return b(this,t),(e=a(this,t,arguments))._unknown=!0,e}return u(t,e),w(t,[{key:"_parse",value:function(e){return(0,j.OK)(e.data)}}])}(D);t.ZodUnknown=pe,pe.create=function(e){return new pe(l({typeName:Ke.ZodUnknown},L(e)))};var he=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){var t=this._getOrReturnCtx(e);return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.never,received:t.parsedType}),j.INVALID}}])}(D);t.ZodNever=he,he.create=function(e){return new he(l({typeName:Ke.ZodNever},L(e)))};var ve=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){if(this._getType(e)!==S.ZodParsedType.undefined){var t=this._getOrReturnCtx(e);return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.void,received:t.parsedType}),j.INVALID}return(0,j.OK)(e.data)}}])}(D);t.ZodVoid=ve,ve.create=function(e){return new ve(l({typeName:Ke.ZodVoid},L(e)))};var ye=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e),r=t.ctx,n=t.status,a=this._def;if(r.parsedType!==S.ZodParsedType.array)return(0,j.addIssueToContext)(r,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.array,received:r.parsedType}),j.INVALID;if(null!==a.exactLength){var i=r.data.length>a.exactLength.value,o=r.data.length<a.exactLength.value;(i||o)&&((0,j.addIssueToContext)(r,{code:i?A.ZodIssueCode.too_big:A.ZodIssueCode.too_small,minimum:o?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(null!==a.minLength&&r.data.length<a.minLength.value&&((0,j.addIssueToContext)(r,{code:A.ZodIssueCode.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),null!==a.maxLength&&r.data.length>a.maxLength.value&&((0,j.addIssueToContext)(r,{code:A.ZodIssueCode.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all(m(r.data).map((function(e,t){return a.type._parseAsync(new E(r,e,r.path,t))}))).then((function(e){return j.ParseStatus.mergeArray(n,e)}));var u=m(r.data).map((function(e,t){return a.type._parseSync(new E(r,e,r.path,t))}));return j.ParseStatus.mergeArray(n,u)}},{key:"element",get:function(){return this._def.type}},{key:"min",value:function(e,r){return new t(l(l({},this._def),{},{minLength:{value:e,message:P.errorUtil.toString(r)}}))}},{key:"max",value:function(e,r){return new t(l(l({},this._def),{},{maxLength:{value:e,message:P.errorUtil.toString(r)}}))}},{key:"length",value:function(e,r){return new t(l(l({},this._def),{},{exactLength:{value:e,message:P.errorUtil.toString(r)}}))}},{key:"nonempty",value:function(e){return this.min(1,e)}}])}(D);function me(e){if(e instanceof ge){var t={};for(var r in e.shape){var n=e.shape[r];t[r]=De.create(me(n))}return new ge(l(l({},e._def),{},{shape:function(){return t}}))}return e instanceof ye?new ye(l(l({},e._def),{},{type:me(e.element)})):e instanceof De?De.create(me(e.unwrap())):e instanceof Ue?Ue.create(me(e.unwrap())):e instanceof Ie?Ie.create(e.items.map((function(e){return me(e)}))):e}t.ZodArray=ye,ye.create=function(e,t){return new ye(l({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ke.ZodArray},L(t)))};var ge=function(e){function t(){var e;return b(this,t),(e=a(this,t,arguments))._cached=null,e.nonstrict=e.passthrough,e.augment=e.extend,e}return u(t,e),w(t,[{key:"_getCached",value:function(){if(null!==this._cached)return this._cached;var e=this._def.shape(),t=S.util.objectKeys(e);return this._cached={shape:e,keys:t}}},{key:"_parse",value:function(e){if(this._getType(e)!==S.ZodParsedType.object){var t=this._getOrReturnCtx(e);return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.object,received:t.parsedType}),j.INVALID}var r=this._processInputParams(e),a=r.status,i=r.ctx,o=this._getCached(),u=o.shape,s=o.keys,c=[];if(!(this._def.catchall instanceof he&&"strip"===this._def.unknownKeys))for(var d in i.data)s.includes(d)||c.push(d);var l,f=[],h=n(s);try{for(h.s();!(l=h.n()).done;){var y=l.value,m=u[y],g=i.data[y];f.push({key:{status:"valid",value:y},value:m._parse(new E(i,g,i.path,y)),alwaysSet:y in i.data})}}catch(e){h.e(e)}finally{h.f()}if(this._def.catchall instanceof he){var _=this._def.unknownKeys;if("passthrough"===_){var b,k=n(c);try{for(k.s();!(b=k.n()).done;){var w=b.value;f.push({key:{status:"valid",value:w},value:{status:"valid",value:i.data[w]}})}}catch(e){k.e(e)}finally{k.f()}}else if("strict"===_)c.length>0&&((0,j.addIssueToContext)(i,{code:A.ZodIssueCode.unrecognized_keys,keys:c}),a.dirty());else if("strip"!==_)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{var x,I=this._def.catchall,Z=n(c);try{for(Z.s();!(x=Z.n()).done;){var T=x.value,O=i.data[T];f.push({key:{status:"valid",value:T},value:I._parse(new E(i,O,i.path,T)),alwaysSet:T in i.data})}}catch(e){Z.e(e)}finally{Z.f()}}return i.common.async?Promise.resolve().then(v(p().mark((function e(){var t,r,a,i,o,u;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],r=n(f),e.prev=2,r.s();case 4:if((a=r.n()).done){e.next=15;break}return i=a.value,e.next=8,i.key;case 8:return o=e.sent,e.next=11,i.value;case 11:u=e.sent,t.push({key:o,value:u,alwaysSet:i.alwaysSet});case 13:e.next=4;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(2),r.e(e.t0);case 20:return e.prev=20,r.f(),e.finish(20);case 23:return e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,null,[[2,17,20,23]])})))).then((function(e){return j.ParseStatus.mergeObjectSync(a,e)})):j.ParseStatus.mergeObjectSync(a,f)}},{key:"shape",get:function(){return this._def.shape()}},{key:"strict",value:function(e){var r=this;return P.errorUtil.errToObj,new t(l(l({},this._def),{},{unknownKeys:"strict"},void 0!==e?{errorMap:function(t,n){var a,i,o,u,s=null!==(o=null===(i=(a=r._def).errorMap)||void 0===i?void 0:i.call(a,t,n).message)&&void 0!==o?o:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(u=P.errorUtil.errToObj(e).message)&&void 0!==u?u:s}:{message:s}}}:{}))}},{key:"strip",value:function(){return new t(l(l({},this._def),{},{unknownKeys:"strip"}))}},{key:"passthrough",value:function(){return new t(l(l({},this._def),{},{unknownKeys:"passthrough"}))}},{key:"extend",value:function(e){var r=this;return new t(l(l({},this._def),{},{shape:function(){return l(l({},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 l(l({},r._def.shape()),e._def.shape())},typeName:Ke.ZodObject})}},{key:"setKey",value:function(e,t){return this.augment(f({},e,t))}},{key:"catchall",value:function(e){return new t(l(l({},this._def),{},{catchall:e}))}},{key:"pick",value:function(e){var r=this,n={};return S.util.objectKeys(e).forEach((function(t){e[t]&&r.shape[t]&&(n[t]=r.shape[t])})),new t(l(l({},this._def),{},{shape:function(){return n}}))}},{key:"omit",value:function(e){var r=this,n={};return S.util.objectKeys(this.shape).forEach((function(t){e[t]||(n[t]=r.shape[t])})),new t(l(l({},this._def),{},{shape:function(){return n}}))}},{key:"deepPartial",value:function(){return me(this)}},{key:"partial",value:function(e){var r=this,n={};return S.util.objectKeys(this.shape).forEach((function(t){var a=r.shape[t];e&&!e[t]?n[t]=a:n[t]=a.optional()})),new t(l(l({},this._def),{},{shape:function(){return n}}))}},{key:"required",value:function(e){var r=this,n={};return S.util.objectKeys(this.shape).forEach((function(t){if(e&&!e[t])n[t]=r.shape[t];else{for(var a=r.shape[t];a instanceof De;)a=a._def.innerType;n[t]=a}})),new t(l(l({},this._def),{},{shape:function(){return n}}))}},{key:"keyof",value:function(){return Se(S.util.objectKeys(this.shape))}}])}(D);t.ZodObject=ge,ge.create=function(e,t){return new ge(l({shape:function(){return e},unknownKeys:"strip",catchall:he.create(),typeName:Ke.ZodObject},L(t)))},ge.strictCreate=function(e,t){return new ge(l({shape:function(){return e},unknownKeys:"strict",catchall:he.create(),typeName:Ke.ZodObject},L(t)))},ge.lazycreate=function(e,t){return new ge(l({shape:e,unknownKeys:"strip",catchall:he.create(),typeName:Ke.ZodObject},L(t)))};var _e=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(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(){var e=v(p().mark((function e(r){var n;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l(l({},t),{},{common:l(l({},t.common),{},{issues:[]}),parent:null}),e.next=3,r._parseAsync({data:t.data,path:t.path,parent:n});case 3:return e.t0=e.sent,e.t1=n,e.abrupt("return",{result:e.t0,ctx:e.t1});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then((function(e){var r,a=n(e);try{for(a.s();!(r=a.n()).done;){var i=r.value;if("valid"===i.result.status)return i.result}}catch(e){a.e(e)}finally{a.f()}var o,u=n(e);try{for(u.s();!(o=u.n()).done;){var s,c=o.value;if("dirty"===c.result.status)return(s=t.common.issues).push.apply(s,m(c.ctx.common.issues)),c.result}}catch(e){u.e(e)}finally{u.f()}var d=e.map((function(e){return new A.ZodError(e.ctx.common.issues)}));return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_union,unionErrors:d}),j.INVALID}));var a,i,o=void 0,u=[],s=n(r);try{for(s.s();!(a=s.n()).done;){var c=a.value,d=l(l({},t),{},{common:l(l({},t.common),{},{issues:[]}),parent:null}),f=c._parseSync({data:t.data,path:t.path,parent:d});if("valid"===f.status)return f;"dirty"!==f.status||o||(o={result:f,ctx:d}),d.common.issues.length&&u.push(d.common.issues)}}catch(e){s.e(e)}finally{s.f()}if(o)return(i=t.common.issues).push.apply(i,m(o.ctx.common.issues)),o.result;var h=u.map((function(e){return new A.ZodError(e)}));return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_union,unionErrors:h}),j.INVALID}},{key:"options",get:function(){return this._def.options}}])}(D);t.ZodUnion=_e,_e.create=function(e,t){return new _e(l({options:e,typeName:Ke.ZodUnion},L(t)))};var be=function(e){return e instanceof Pe?be(e.schema):e instanceof Le?be(e.innerType()):e instanceof je?[e.value]:e instanceof Ae?e.options:e instanceof Ee?S.util.objectValues(e.enum):e instanceof Re?be(e._def.innerType):e instanceof de?[void 0]:e instanceof le?[null]:e instanceof De?[void 0].concat(m(be(e.unwrap()))):e instanceof Ue?[null].concat(m(be(e.unwrap()))):e instanceof Fe||e instanceof Be?be(e.unwrap()):e instanceof Me?be(e._def.innerType):[]},ke=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==S.ZodParsedType.object)return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.object,received:t.parsedType}),j.INVALID;var r=this.discriminator,n=t.data[r],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):((0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),j.INVALID)}},{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,a){var i,o=new Map,u=n(r);try{for(u.s();!(i=u.n()).done;){var s=i.value,c=be(s.shape[e]);if(!c.length)throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"));var d,f=n(c);try{for(f.s();!(d=f.n()).done;){var p=d.value;if(o.has(p))throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(p)));o.set(p,s)}}catch(e){f.e(e)}finally{f.f()}}}catch(e){u.e(e)}finally{u.f()}return new t(l({typeName:Ke.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o},L(a)))}}])}(D);function we(e,t){var r=(0,S.getParsedType)(e),a=(0,S.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(r===S.ZodParsedType.object&&a===S.ZodParsedType.object){var i,o=S.util.objectKeys(t),u=S.util.objectKeys(e).filter((function(e){return-1!==o.indexOf(e)})),s=l(l({},e),t),c=n(u);try{for(c.s();!(i=c.n()).done;){var d=i.value,f=we(e[d],t[d]);if(!f.valid)return{valid:!1};s[d]=f.data}}catch(e){c.e(e)}finally{c.f()}return{valid:!0,data:s}}if(r===S.ZodParsedType.array&&a===S.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};for(var p=[],h=0;h<e.length;h++){var v=we(e[h],t[h]);if(!v.valid)return{valid:!1};p.push(v.data)}return{valid:!0,data:p}}return r===S.ZodParsedType.date&&a===S.ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}t.ZodDiscriminatedUnion=ke;var xe=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e),r=t.status,n=t.ctx,a=function(e,t){if((0,j.isAborted)(e)||(0,j.isAborted)(t))return j.INVALID;var a=we(e.value,t.value);return a.valid?(((0,j.isDirty)(e)||(0,j.isDirty)(t))&&r.dirty(),{status:r.value,value:a.data}):((0,j.addIssueToContext)(n,{code:A.ZodIssueCode.invalid_intersection_types}),j.INVALID)};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=c(e,2),r=t[0],n=t[1];return a(r,n)})):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}])}(D);t.ZodIntersection=xe,xe.create=function(e,t,r){return new xe(l({left:e,right:t,typeName:Ke.ZodIntersection},L(r)))};var Ie=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){var t=this,r=this._processInputParams(e),n=r.status,a=r.ctx;if(a.parsedType!==S.ZodParsedType.array)return(0,j.addIssueToContext)(a,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.array,received:a.parsedType}),j.INVALID;if(a.data.length<this._def.items.length)return(0,j.addIssueToContext)(a,{code:A.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),j.INVALID;!this._def.rest&&a.data.length>this._def.items.length&&((0,j.addIssueToContext)(a,{code:A.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());var i=m(a.data).map((function(e,r){var n=t._def.items[r]||t._def.rest;return n?n._parse(new E(a,e,a.path,r)):null})).filter((function(e){return!!e}));return a.common.async?Promise.all(i).then((function(e){return j.ParseStatus.mergeArray(n,e)})):j.ParseStatus.mergeArray(n,i)}},{key:"items",get:function(){return this._def.items}},{key:"rest",value:function(e){return new t(l(l({},this._def),{},{rest:e}))}}])}(D);t.ZodTuple=Ie,Ie.create=function(e,t){if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ie(l({items:e,typeName:Ke.ZodTuple,rest:null},L(t)))};var Ze=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(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!==S.ZodParsedType.object)return(0,j.addIssueToContext)(n,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.object,received:n.parsedType}),j.INVALID;var a=[],i=this._def.keyType,o=this._def.valueType;for(var u in n.data)a.push({key:i._parse(new E(n,u,n.path,u)),value:o._parse(new E(n,n.data[u],n.path,u)),alwaysSet:u in n.data});return n.common.async?j.ParseStatus.mergeObjectAsync(r,a):j.ParseStatus.mergeObjectSync(r,a)}},{key:"element",get:function(){return this._def.valueType}}],[{key:"create",value:function(e,r,n){return new t(r instanceof D?l({keyType:e,valueType:r,typeName:Ke.ZodRecord},L(n)):l({keyType:ae.create(),valueType:e,typeName:Ke.ZodRecord},L(r)))}}])}(D);t.ZodRecord=Ze;var Te=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(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,a=t.ctx;if(a.parsedType!==S.ZodParsedType.map)return(0,j.addIssueToContext)(a,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.map,received:a.parsedType}),j.INVALID;var i=this._def.keyType,o=this._def.valueType,u=m(a.data.entries()).map((function(e,t){var r=c(e,2),n=r[0],u=r[1];return{key:i._parse(new E(a,n,a.path,[t,"key"])),value:o._parse(new E(a,u,a.path,[t,"value"]))}}));if(a.common.async){var s=new Map;return Promise.resolve().then(v(p().mark((function e(){var t,a,i,o,c;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=n(u),e.prev=1,t.s();case 3:if((a=t.n()).done){e.next=17;break}return i=a.value,e.next=7,i.key;case 7:return o=e.sent,e.next=10,i.value;case 10:if(c=e.sent,"aborted"!==o.status&&"aborted"!==c.status){e.next=13;break}return e.abrupt("return",j.INVALID);case 13:"dirty"!==o.status&&"dirty"!==c.status||r.dirty(),s.set(o.value,c.value);case 15:e.next=3;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(1),t.e(e.t0);case 22:return e.prev=22,t.f(),e.finish(22);case 25:return e.abrupt("return",{status:r.value,value:s});case 26:case"end":return e.stop()}}),e,null,[[1,19,22,25]])}))))}var d,l=new Map,f=n(u);try{for(f.s();!(d=f.n()).done;){var h=d.value,y=h.key,g=h.value;if("aborted"===y.status||"aborted"===g.status)return j.INVALID;"dirty"!==y.status&&"dirty"!==g.status||r.dirty(),l.set(y.value,g.value)}}catch(e){f.e(e)}finally{f.f()}return{status:r.value,value:l}}}])}(D);t.ZodMap=Te,Te.create=function(e,t,r){return new Te(l({valueType:t,keyType:e,typeName:Ke.ZodMap},L(r)))};var Oe=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e),r=t.status,a=t.ctx;if(a.parsedType!==S.ZodParsedType.set)return(0,j.addIssueToContext)(a,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.set,received:a.parsedType}),j.INVALID;var i=this._def;null!==i.minSize&&a.data.size<i.minSize.value&&((0,j.addIssueToContext)(a,{code:A.ZodIssueCode.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),null!==i.maxSize&&a.data.size>i.maxSize.value&&((0,j.addIssueToContext)(a,{code:A.ZodIssueCode.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());var o=this._def.valueType;function u(e){var t,a=new Set,i=n(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;if("aborted"===o.status)return j.INVALID;"dirty"===o.status&&r.dirty(),a.add(o.value)}}catch(e){i.e(e)}finally{i.f()}return{status:r.value,value:a}}var s=m(a.data.values()).map((function(e,t){return o._parse(new E(a,e,a.path,t))}));return a.common.async?Promise.all(s).then((function(e){return u(e)})):u(s)}},{key:"min",value:function(e,r){return new t(l(l({},this._def),{},{minSize:{value:e,message:P.errorUtil.toString(r)}}))}},{key:"max",value:function(e,r){return new t(l(l({},this._def),{},{maxSize:{value:e,message:P.errorUtil.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)}}])}(D);t.ZodSet=Oe,Oe.create=function(e,t){return new Oe(l({valueType:e,minSize:null,maxSize:null,typeName:Ke.ZodSet},L(t)))};var Ce=function(e){function t(){var e;return b(this,t),(e=a(this,t,arguments)).validate=e.implement,e}return u(t,e),w(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==S.ZodParsedType.function)return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.function,received:t.parsedType}),j.INVALID;function r(e,r){return(0,j.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,C.getErrorMap)(),C.defaultErrorMap].filter((function(e){return!!e})),issueData:{code:A.ZodIssueCode.invalid_arguments,argumentsError:r}})}function n(e,r){return(0,j.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,C.getErrorMap)(),C.defaultErrorMap].filter((function(e){return!!e})),issueData:{code:A.ZodIssueCode.invalid_return_type,returnTypeError:r}})}var a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof Ne){var o=this;return(0,j.OK)(v(p().mark((function e(){var t,u,s,c,d,l,f,h=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=h.length,u=new Array(t),s=0;s<t;s++)u[s]=h[s];return c=new A.ZodError([]),e.next=4,o._def.args.parseAsync(u,a).catch((function(e){throw c.addIssue(r(u,e)),c}));case 4:return d=e.sent,e.next=7,Reflect.apply(i,this,d);case 7:return l=e.sent,e.next=10,o._def.returns._def.type.parseAsync(l,a).catch((function(e){throw c.addIssue(n(l,e)),c}));case 10:return f=e.sent,e.abrupt("return",f);case 12:case"end":return e.stop()}}),e,this)}))))}var u=this;return(0,j.OK)((function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var s=u._def.args.safeParse(t,a);if(!s.success)throw new A.ZodError([r(t,s.error)]);var c=Reflect.apply(i,this,s.data),d=u._def.returns.safeParse(c,a);if(!d.success)throw new A.ZodError([n(c,d.error)]);return d.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(l(l({},this._def),{},{args:Ie.create(r).rest(pe.create())}))}},{key:"returns",value:function(e){return new t(l(l({},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(l({args:e||Ie.create([]).rest(pe.create()),returns:r||pe.create(),typeName:Ke.ZodFunction},L(n)))}}])}(D);t.ZodFunction=Ce;var Pe=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(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})}}])}(D);t.ZodLazy=Pe,Pe.create=function(e,t){return new Pe(l({getter:e,typeName:Ke.ZodLazy},L(t)))};var je=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){if(e.data!==this._def.value){var t=this._getOrReturnCtx(e);return(0,j.addIssueToContext)(t,{received:t.data,code:A.ZodIssueCode.invalid_literal,expected:this._def.value}),j.INVALID}return{status:"valid",value:e.data}}},{key:"value",get:function(){return this._def.value}}])}(D);function Se(e,t){return new Ae(l({values:e,typeName:Ke.ZodEnum},L(t)))}t.ZodLiteral=je,je.create=function(e,t){return new je(l({value:e,typeName:Ke.ZodLiteral},L(t)))};var Ae=function(e){function t(){var e;return b(this,t),e=a(this,t,arguments),I.set(e,void 0),e}return u(t,e),w(t,[{key:"_parse",value:function(e){if("string"!=typeof e.data){var t=this._getOrReturnCtx(e),r=this._def.values;return(0,j.addIssueToContext)(t,{expected:S.util.joinValues(r),received:t.parsedType,code:A.ZodIssueCode.invalid_type}),j.INVALID}if(T(this,I,"f")||O(this,I,new Set(this._def.values),"f"),!T(this,I,"f").has(e.data)){var n=this._getOrReturnCtx(e),a=this._def.values;return(0,j.addIssueToContext)(n,{received:n.data,code:A.ZodIssueCode.invalid_enum_value,options:a}),j.INVALID}return(0,j.OK)(e.data)}},{key:"options",get:function(){return this._def.values}},{key:"enum",get:function(){var e,t={},r=n(this._def.values);try{for(r.s();!(e=r.n()).done;){var a=e.value;t[a]=a}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"Values",get:function(){var e,t={},r=n(this._def.values);try{for(r.s();!(e=r.n()).done;){var a=e.value;t[a]=a}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"Enum",get:function(){var e,t={},r=n(this._def.values);try{for(r.s();!(e=r.n()).done;){var a=e.value;t[a]=a}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"extract",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return t.create(e,l(l({},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)})),l(l({},this._def),r))}}])}(D);t.ZodEnum=Ae,I=new WeakMap,Ae.create=Se;var Ee=function(e){function t(){var e;return b(this,t),e=a(this,t,arguments),Z.set(e,void 0),e}return u(t,e),w(t,[{key:"_parse",value:function(e){var t=S.util.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==S.ZodParsedType.string&&r.parsedType!==S.ZodParsedType.number){var n=S.util.objectValues(t);return(0,j.addIssueToContext)(r,{expected:S.util.joinValues(n),received:r.parsedType,code:A.ZodIssueCode.invalid_type}),j.INVALID}if(T(this,Z,"f")||O(this,Z,new Set(S.util.getValidEnumValues(this._def.values)),"f"),!T(this,Z,"f").has(e.data)){var a=S.util.objectValues(t);return(0,j.addIssueToContext)(r,{received:r.data,code:A.ZodIssueCode.invalid_enum_value,options:a}),j.INVALID}return(0,j.OK)(e.data)}},{key:"enum",get:function(){return this._def.values}}])}(D);t.ZodNativeEnum=Ee,Z=new WeakMap,Ee.create=function(e,t){return new Ee(l({values:e,typeName:Ke.ZodNativeEnum},L(t)))};var Ne=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(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!==S.ZodParsedType.promise&&!1===r.common.async)return(0,j.addIssueToContext)(r,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.promise,received:r.parsedType}),j.INVALID;var n=r.parsedType===S.ZodParsedType.promise?r.data:Promise.resolve(r.data);return(0,j.OK)(n.then((function(e){return t._def.type.parseAsync(e,{path:r.path,errorMap:r.common.contextualErrorMap})})))}}])}(D);t.ZodPromise=Ne,Ne.create=function(e,t){return new Ne(l({type:e,typeName:Ke.ZodPromise},L(t)))};var Le=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"innerType",value:function(){return this._def.schema}},{key:"sourceType",value:function(){return this._def.schema._def.typeName===Ke.ZodEffects?this._def.schema.sourceType():this._def.schema}},{key:"_parse",value:function(e){var t=this,r=this._processInputParams(e),n=r.status,a=r.ctx,i=this._def.effect||null,o={addIssue:function(e){(0,j.addIssueToContext)(a,e),e.fatal?n.abort():n.dirty()},get path(){return a.path}};if(o.addIssue=o.addIssue.bind(o),"preprocess"===i.type){var u=i.transform(a.data,o);if(a.common.async)return Promise.resolve(u).then(function(){var e=v(p().mark((function e(r){var i;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("aborted"!==n.value){e.next=2;break}return e.abrupt("return",j.INVALID);case 2:return e.next=4,t._def.schema._parseAsync({data:r,path:a.path,parent:a});case 4:if("aborted"!==(i=e.sent).status){e.next=7;break}return e.abrupt("return",j.INVALID);case 7:if("dirty"!==i.status){e.next=9;break}return e.abrupt("return",(0,j.DIRTY)(i.value));case 9:if("dirty"!==n.value){e.next=11;break}return e.abrupt("return",(0,j.DIRTY)(i.value));case 11:return e.abrupt("return",i);case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());if("aborted"===n.value)return j.INVALID;var s=this._def.schema._parseSync({data:u,path:a.path,parent:a});return"aborted"===s.status?j.INVALID:"dirty"===s.status||"dirty"===n.value?(0,j.DIRTY)(s.value):s}if("refinement"===i.type){var c=function(e){var t=i.refinement(e,o);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===a.common.async){var d=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===d.status?j.INVALID:("dirty"===d.status&&n.dirty(),c(d.value),{status:n.value,value:d.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((function(e){return"aborted"===e.status?j.INVALID:("dirty"===e.status&&n.dirty(),c(e.value).then((function(){return{status:n.value,value:e.value}})))}))}if("transform"===i.type){if(!1===a.common.async){var l=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!(0,j.isValid)(l))return l;var f=i.transform(l.value,o);if(f instanceof 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:a.data,path:a.path,parent:a}).then((function(e){return(0,j.isValid)(e)?Promise.resolve(i.transform(e.value,o)).then((function(e){return{status:n.value,value:e}})):e}))}S.util.assertNever(i)}}])}(D);t.ZodEffects=Le,t.ZodTransformer=Le,Le.create=function(e,t,r){return new Le(l({schema:e,typeName:Ke.ZodEffects,effect:t},L(r)))},Le.createWithPreprocess=function(e,t,r){return new Le(l({schema:t,effect:{type:"preprocess",transform:e},typeName:Ke.ZodEffects},L(r)))};var De=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){return this._getType(e)===S.ZodParsedType.undefined?(0,j.OK)(void 0):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}])}(D);t.ZodOptional=De,De.create=function(e,t){return new De(l({innerType:e,typeName:Ke.ZodOptional},L(t)))};var Ue=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){return this._getType(e)===S.ZodParsedType.null?(0,j.OK)(null):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}])}(D);t.ZodNullable=Ue,Ue.create=function(e,t){return new Ue(l({innerType:e,typeName:Ke.ZodNullable},L(t)))};var Re=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,r=t.data;return t.parsedType===S.ZodParsedType.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}},{key:"removeDefault",value:function(){return this._def.innerType}}])}(D);t.ZodDefault=Re,Re.create=function(e,t){return new Re(l({innerType:e,typeName:Ke.ZodDefault,defaultValue:"function"==typeof t.default?t.default:function(){return t.default}},L(t)))};var Me=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){var t=this,r=this._processInputParams(e).ctx,n=l(l({},r),{},{common:l(l({},r.common),{},{issues:[]})}),a=this._def.innerType._parse({data:n.data,path:n.path,parent:l({},n)});return(0,j.isAsync)(a)?a.then((function(e){return{status:"valid",value:"valid"===e.status?e.value:t._def.catchValue({get error(){return new A.ZodError(n.common.issues)},input:n.data})}})):{status:"valid",value:"valid"===a.status?a.value:this._def.catchValue({get error(){return new A.ZodError(n.common.issues)},input:n.data})}}},{key:"removeCatch",value:function(){return this._def.innerType}}])}(D);t.ZodCatch=Me,Me.create=function(e,t){return new Me(l({innerType:e,typeName:Ke.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:function(){return t.catch}},L(t)))};var Ve=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){if(this._getType(e)!==S.ZodParsedType.nan){var t=this._getOrReturnCtx(e);return(0,j.addIssueToContext)(t,{code:A.ZodIssueCode.invalid_type,expected:S.ZodParsedType.nan,received:t.parsedType}),j.INVALID}return{status:"valid",value:e.data}}}])}(D);t.ZodNaN=Ve,Ve.create=function(e){return new Ve(l({typeName:Ke.ZodNaN},L(e)))},t.BRAND=Symbol("zod_brand");var Fe=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(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}}])}(D);t.ZodBranded=Fe;var ze=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){var t=this,r=this._processInputParams(e),n=r.status,a=r.ctx;if(a.common.async){var i=function(){var e=v(p().mark((function e(){var r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._def.in._parseAsync({data:a.data,path:a.path,parent:a});case 2:if("aborted"!==(r=e.sent).status){e.next=5;break}return e.abrupt("return",j.INVALID);case 5:if("dirty"!==r.status){e.next=10;break}return n.dirty(),e.abrupt("return",(0,j.DIRTY)(r.value));case 10:return e.abrupt("return",t._def.out._parseAsync({data:r.value,path:a.path,parent:a}));case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return i()}var o=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===o.status?j.INVALID:"dirty"===o.status?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:a.path,parent:a})}}],[{key:"create",value:function(e,r){return new t({in:e,out:r,typeName:Ke.ZodPipeline})}}])}(D);t.ZodPipeline=ze;var Ke,Be=function(e){function t(){return b(this,t),a(this,t,arguments)}return u(t,e),w(t,[{key:"_parse",value:function(e){var t=this._def.innerType._parse(e),r=function(e){return(0,j.isValid)(e)&&(e.value=Object.freeze(e.value)),e};return(0,j.isAsync)(t)?t.then((function(e){return r(e)})):r(t)}},{key:"unwrap",value:function(){return this._def.innerType}}])}(D);function $e(e,t){var r="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof r?{message:r}:r}function We(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return e?fe.create().superRefine((function(n,a){var i,o,u=e(n);if(u instanceof Promise)return u.then((function(e){var i,o;if(!e){var u=$e(t,n),s=null===(o=null!==(i=u.fatal)&&void 0!==i?i:r)||void 0===o||o;a.addIssue(l(l({code:"custom"},u),{},{fatal:s}))}}));if(!u){var s=$e(t,n),c=null===(o=null!==(i=s.fatal)&&void 0!==i?i:r)||void 0===o||o;a.addIssue(l(l({code:"custom"},s),{},{fatal:c}))}})):fe.create()}t.ZodReadonly=Be,Be.create=function(e,t){return new Be(l({innerType:e,typeName:Ke.ZodReadonly},L(t)))},t.custom=We,t.late={object:ge.lazycreate},function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Ke||(t.ZodFirstPartyTypeKind=Ke={})),t.instanceof=function(e){return We((function(t){return t instanceof e}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{message:"Input not instance of ".concat(e.name)})};var Ge=ae.create;t.string=Ge;var qe=ie.create;t.number=qe;var Ye=Ve.create;t.nan=Ye;var Je=oe.create;t.bigint=Je;var He=ue.create;t.boolean=He;var Xe=se.create;t.date=Xe;var Qe=ce.create;t.symbol=Qe;var et=de.create;t.undefined=et;var tt=le.create;t.null=tt;var rt=fe.create;t.any=rt;var nt=pe.create;t.unknown=nt;var at=he.create;t.never=at;var it=ve.create;t.void=it;var ot=ye.create;t.array=ot;var ut=ge.create;t.object=ut;var st=ge.strictCreate;t.strictObject=st;var ct=_e.create;t.union=ct;var dt=ke.create;t.discriminatedUnion=dt;var lt=xe.create;t.intersection=lt;var ft=Ie.create;t.tuple=ft;var pt=Ze.create;t.record=pt;var ht=Te.create;t.map=ht;var vt=Oe.create;t.set=vt;var yt=Ce.create;t.function=yt;var mt=Pe.create;t.lazy=mt;var gt=je.create;t.literal=gt;var _t=Ae.create;t.enum=_t;var bt=Ee.create;t.nativeEnum=bt;var kt=Ne.create;t.promise=kt;var wt=Le.create;t.effect=wt,t.transformer=wt;var xt=De.create;t.optional=xt;var It=Ue.create;t.nullable=It;var Zt=Le.createWithPreprocess;t.preprocess=Zt;var Tt=ze.create;t.pipeline=Tt,t.ostring=function(){return Ge().optional()},t.onumber=function(){return qe().optional()},t.oboolean=function(){return He().optional()},t.coerce={string:function(e){return ae.create(l(l({},e),{},{coerce:!0}))},number:function(e){return ie.create(l(l({},e),{},{coerce:!0}))},boolean:function(e){return ue.create(l(l({},e),{},{coerce:!0}))},bigint:function(e){return oe.create(l(l({},e),{},{coerce:!0}))},date:function(e){return se.create(l(l({},e),{},{coerce:!0}))}},t.NEVER=j.INVALID}},t={},r=function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}(798);module.exports=r})();
3
+ exports.__oidcSpaBundle = true;
@@ -1 +0,0 @@
1
- {"version":3,"file":"apiBuilder.mjs","sourceRoot":"","sources":["../../../src/tanstack-start/react/apiBuilder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,0BAA0B,CAAC;AAG/D,OAAO,EAAE,mDAAmD,EAAE,MAAM,iCAAiC,CAAC;AACtG,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA8DtD,SAAS,uBAAuB,CAI9B,MASD;IACG,OAAO;QACH,aAAa,EAAE,GAAG,EAAE,CAChB,uBAAuB,CAAC;YACpB,SAAS,EAAE,IAAI;YACf,oBAAoB,EAAE,MAAM,CAAC,oBAAoB;YACjD,mBAAmB,EAAE,MAAM,CAAC,mBAAmB;YAC/C,qCAAqC,EAAE,MAAM,CAAC,qCAAqC;SACtF,CAAC;QACN,+BAA+B,EAAE,CAAC,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,EAAE,EAAE,CAC/E,uBAAuB,CAAC;YACpB,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,oBAAoB;YACpB,mBAAmB,EAAE,mBAAmB;YACxC,qCAAqC,EAAE,MAAM,CAAC,qCAAqC;SACtF,CAAC;QACN,yBAAyB,EAAE,YAAY,CAAC,EAAE,CACtC,uBAAuB,CAAC;YACpB,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,oBAAoB,EAAE,MAAM,CAAC,oBAAoB;YACjD,mBAAmB,EAAE,MAAM,CAAC,mBAAmB;YAC/C,qCAAqC,EAAE,CAAC,GAAQ,EAAE;gBAC9C,QAAQ,YAAY,CAAC,IAAI,EAAE,CAAC;oBACxB,KAAK,oEAAoE,CAAC,CAAC,CAAC;wBACxE,MAAM,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,GACvE,YAAY,CAAC;wBAEjB,MAAM,EAAE,qCAAqC,EAAE,GAC3C,mDAAmD,CAEjD;4BACE,mBAAmB;4BACnB,sBAAsB;4BACtB,mBAAmB;4BACnB,uBAAuB;4BACvB,gBAAgB;yBACnB,CAAC,CAAC;wBACP,OAAO,qCAAqC,CAAC;oBACjD,CAAC;oBACD,KAAK,QAAQ,CAAC,CAAC,CAAC;wBACZ,MAAM,EAAE,qCAAqC,EAAE,GAAG,YAAY,CAAC;wBAC/D,OAAO,qCAAqC,CAAC;oBACjD,CAAC;oBACD;wBACI,MAAM,CAAqC,KAAK,CAAC,CAAC;gBAC1D,CAAC;YACL,CAAC,CAAC,EAAE;SACP,CAAC;QACN,WAAW,EAAE,GAAG,EAAE,CACd,gBAAgB,CAA+C;YAC3D,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,oBAAoB,EAAE,MAAM,CAAC,oBAAoB;YACjD,mBAAmB,EAAE,MAAM,CAAC,mBAAmB;YAC/C,qCAAqC,EAAE,MAAM,CAAC,qCAAqC;SACtF,CAAC;KACT,CAAC;AACN,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;IACrD,SAAS,EAAE,KAAK;IAChB,qCAAqC,EAAE,SAAS;IAChD,mBAAmB,EAAE,SAAS;IAC9B,oBAAoB,EAAE,SAAS;CAClC,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- /*! For license information please see index.js.LICENSE.txt */
2
- (()=>{"use strict";var t={317:function(t,e,r){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.Ctx=void 0;var i=r(819),a=r(949),u=r(939),c=r(901),l=r(703),s=r(87),f=r(259),p=function(){function t(){this.lazyEvtAttach=new l.LazyEvt,this.lazyEvtDetach=new l.LazyEvt,this.lazyEvtDoneOrAborted=new l.LazyEvt,this.handlers=new i.Polyfill,this.evtByHandler=new a.Polyfill}return Object.defineProperty(t.prototype,"evtDoneOrAborted",{get:function(){return this.lazyEvtDoneOrAborted.evt},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"evtAttach",{get:function(){return this.lazyEvtAttach.evt},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"evtDetach",{get:function(){return this.lazyEvtDetach.evt},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completionStatus",{get:function(){return this.__completionStatus},enumerable:!1,configurable:!0}),t.prototype.onDoneOrAborted=function(t){this.__completionStatus=t,this.lazyEvtDoneOrAborted.post(t)},t.prototype.waitFor=function(t){var e=this;return this.evtDoneOrAborted.waitFor(t).then((function(t){if("ABORTED"===t.type)throw t.error;return t.result}),(function(t){throw e.abort(t),t}))},t.prototype.abort=function(t){return this.__done(t)},t.prototype.done=function(t){return this.__done(void 0,t)},t.prototype.__done=function(t,e){var r,i,a=[];try{for(var u=o(this.handlers.values()),c=u.next();!c.done;c=u.next()){var l=c.value,s=this.evtByHandler.get(l);l.detach()&&a.push({handler:l,evt:s})}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return this.onDoneOrAborted(n(n({},t?{type:"ABORTED",error:t}:{type:"DONE",result:e}),{handlers:a})),a},t.prototype.getHandlers=function(){var t=this;return Array.from(this.handlers.values()).map((function(e){return{handler:e,evt:t.evtByHandler.get(e)}}))},t.prototype.zz__addHandler=function(t,e){(0,u.assert)(t.ctx===this),(0,u.assert)((0,c.is)(t)),void 0===this.completionStatus?(this.handlers.add(t),this.evtByHandler.set(t,e),this.lazyEvtAttach.post({handler:t,evt:e})):t.detach()},t.prototype.zz__removeHandler=function(t){(0,u.assert)(t.ctx===this),(0,u.assert)((0,c.is)(t)),this.lazyEvtDetach.post({handler:t,evt:this.evtByHandler.get(t)}),this.handlers.delete(t)},t}();e.Ctx=p;try{(0,f.overwriteReadonlyProp)(e.Ctx,"name","Ctx")}catch(t){}s.importProxy.Ctx=e.Ctx},966:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.asNonPostable=void 0,e.asNonPostable=function(t){return t}},113:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.asPostable=void 0,e.asPostable=function(t){return t}},631:function(t,e,r){var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.asyncPipe=void 0;var i=r(87);e.asyncPipe=function(t,e){var r=this,a="state"in t?i.importProxy.Evt.create(void 0):i.importProxy.Evt.create(),u=0;return t.attach((function(i){return n(r,void 0,void 0,(function(){var r,n,c;return o(this,(function(o){switch(o.label){case 0:return u++,r=u,null!==(n=e(i))&&"then"in n?[4,n]:[3,2];case 1:return c=o.sent(),"state"in t&&r!==u?[2]:[3,3];case 2:c=n,o.label=3;case 3:return c?(a.post(c[0]),[2]):[2]}}))}))})),a}},827:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.create=void 0;var n=r(87);e.create=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?new n.importProxy.Evt:new n.importProxy.StatefulEvt(t[0])}},768:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.factorize=void 0,e.factorize=function(t){return t}},591:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(e,"__esModule",{value:!0}),e.from=void 0;var u=r(112),c=r(939),l=r(276),s=r(339),f=r(87),p=i(r(612)).EventTargetLike;function d(t,e,r,n){var o,i,a,l;if(a=e,!p.canBe(a)){if("then"in e){var h=new f.importProxy.Evt,v=(i=(o=function(){return null==t?void 0:t.evtDoneOrAborted.postCount})(),function(){return i!==o()});return e.then((function(t){v()||h.post(t)})),h}return(0,s.mergeImpl)(t,Array.from(e).map((function(e){return d(t,e,r,n)})))}if(p.HasEventTargetAddRemove.match(e))l={on:function(t,r,n){return e.addEventListener(r,t,n)},off:function(t,r,n){return e.removeEventListener(r,t,n)}};else if(p.NodeStyleEventEmitter.match(e))l={on:function(t,r){return e.addListener(r,t)},off:function(t,r){return e.removeListener(r,t)}};else if(p.JQueryStyleEventEmitter.match(e))l={on:function(t,r){return e.on(r,t)},off:function(t,r){return e.off(r,t)}};else if(p.RxJSSubject.match(e)){var y;l={on:function(t){return y=e.subscribe((function(e){return t(e)}))},off:function(){return y.unsubscribe()}}}else(0,u.id)(e),(0,c.assert)(!1);var b=new f.importProxy.Evt,_=function(t){return b.post(t)};return null==t||t.evtDoneOrAborted.attachOnce((function(){return l.off(_,r,n)})),l.on(_,r,n),b}function h(t,e,r){var n=f.importProxy.Evt.create(),o=new e((function(t){var e=a(t,1)[0];return n.post(e)}));return o.observe(r),null==t||t.evtDoneOrAborted.attachOnce((function(){return o.disconnect()})),n}e.from=function(t,e,r,n){return"evtDoneOrAborted"in t?((0,c.assert)((0,l.typeGuard)(e,!0)&&(0,l.typeGuard)(r,!0)&&(0,l.typeGuard)(n,!0)),"function"==typeof e?((0,c.assert)((0,l.typeGuard)(r,!0)&&(0,l.typeGuard)(n,!0)),h(t,e,r)):((0,c.assert)((0,l.typeGuard)(r,!0)),d(t,e,r,n))):((0,c.assert)((0,l.typeGuard)(t,!0)&&(0,l.typeGuard)(e,!0)&&(0,l.typeGuard)(r,!0)),"function"==typeof t?((0,c.assert)((0,l.typeGuard)(e,!0)&&(0,l.typeGuard)(r,!0)),h(void 0,t,e)):((0,c.assert)((0,l.typeGuard)(e,!0)),d(void 0,t,e,r)))}},882:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getCtxFactory=void 0;var n=r(949),o=r(87);e.getCtxFactory=function(){var t=new n.Polyfill;return function(e){var r=t.get(e);return void 0===r&&(r=new o.importProxy.Ctx,t.set(e,r)),r}}},465:function(t,e,r){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return i(e,t),e},u=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},c=this&&this.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},l=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},f=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.Evt=e.onAddHandlerByEvt=void 0,r(557);var p=r(898),d=r(949),h=r(87),v=r(827),y=r(882),b=r(768),_=r(339),g=r(591),m=r(113),O=r(631),P=r(966),w=r(325),E=r(352),x=r(703),j=a(r(546)),C=r(259),S=r(276),M=r(233),A=r(515),k=r(460),H=r(839),T=r(209),D=a(r(517)),z=r(110),R=function(t){return t()},F=D.CtxLike,L=function(){function t(){this.lazyEvtAttach=new x.LazyEvt,this.lazyEvtDetach=new x.LazyEvt,this.__maxHandlers=void 0,this.postCount=0,this.traceId=null,this.handlers=[],this.handlerTriggers=new p.Polyfill,this.__currentChronologyMark=0,this.asyncHandlerCount=0}return t.setDefaultMaxHandlers=function(t){this.__defaultMaxHandlers=isFinite(t)?t:0},t.prototype.toStateful=function(t,e){var r=F.match(t),n=r?void 0:t,o=e||(r?t:void 0),i=new h.importProxy.StatefulEvt(n),a=function(t){return i.post(t)};return o?this.attach(o,a):this.attach(a),i},Object.defineProperty(t.prototype,"evtAttach",{get:function(){return this.lazyEvtAttach.evt},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"evtDetach",{get:function(){return this.lazyEvtDetach.evt},enumerable:!1,configurable:!0}),t.prototype.setMaxHandlers=function(t){return this.__maxHandlers=isFinite(t)?t:0,this},t.prototype.enableTrace=function(t){var e=t.id,r=t.formatter,n=t.log;this.traceId=e,this.traceFormatter=r||function(t){try{return JSON.stringify(t,null,2)}catch(e){return"".concat(t)}},this.log=void 0===n?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.log.apply(console,s([],l(t),!1))}:!1===n?void 0:n},t.prototype.disableTrace=function(){return this.traceId=null,this},Object.defineProperty(t.prototype,"asyncHandlerChronologyMark",{get:function(){var t,e,r;return null!==(e=(r=null!==(t=this["~internal"])&&void 0!==t?t:this["~internal"]={}).asyncHandlerChronologyMark)&&void 0!==e?e:r.asyncHandlerChronologyMark=new d.Polyfill},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"asyncHandlerChronologyExceptionRange",{get:function(){var t,e,r;return null!==(e=(r=null!==(t=this["~internal"])&&void 0!==t?t:this["~internal"]={}).asyncHandlerChronologyExceptionRange)&&void 0!==e?e:r.asyncHandlerChronologyExceptionRange=new d.Polyfill},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"invocableOpByOp",{get:function(){var t,e,r;return null!==(e=(r=null!==(t=this["~internal"])&&void 0!==t?t:this["~internal"]={}).invocableOpByOp)&&void 0!==e?e:r.invocableOpByOp=new d.Polyfill},enumerable:!1,configurable:!0}),t.prototype.getInvocableOp=function(t){var e=this.invocableOpByOp.get(t);if(void 0===e)throw new Error(["Provided operator isn't the operator of any handler","currently attached to the Evt instance"].join(" "));return e},t.prototype.getChronologyMark=function(){return this.__currentChronologyMark++},t.prototype.detachHandler=function(t,e,r){var n=this.handlers.indexOf(t);return!(n<0||((0,S.typeGuard)(t,!!t.ctx)&&t.ctx.zz__removeHandler(t),this.handlers.splice(n,1),t.async&&this.asyncHandlerCount--,this.handlerTriggers.delete(t),void 0!==e[0]&&((0,k.safeClearTimeout)(e[0]),r(new T.DetachedEvtError)),this.lazyEvtDetach.post(t),0))},t.prototype.triggerHandler=function(t,e,r,n){var o=t.callback,i=t.once;void 0!==e[0]&&((0,k.safeClearTimeout)(e[0]),e[0]=void 0),i&&t.detach();var a=l(n,1)[0],u=null==o?void 0:o.call(this,a);return null==r||r(a),(0,H.isPromiseLike)(u)?u:void 0},t.prototype.addHandler=function(t,r){var o,i=this;this.invocableOpByOp.set(t.op,(0,z.convertOperatorToStatelessFλ)(t.op));var a=new M.Deferred,u=[void 0],c=n(n(n({},t),r),{detach:function(){return i.detachHandler(c,u,a.reject)},promise:a.pr});"number"==typeof c.timeout&&(u[0]=(0,k.safeSetTimeout)((function(){u[0]=void 0,c.detach(),a.reject(new T.TimeoutEvtError(c.timeout))}),c.timeout));var l=function(t){return i.triggerHandler(c,u,a.isPending?a.resolve:void 0,t)};if(this.handlerTriggers.set(c,l),c.async&&this.asyncHandlerChronologyMark.set(c,this.getChronologyMark()),c.prepend){var s=void 0;for(s=0;s<this.handlers.length&&this.handlers[s].extract;s++);this.handlers.splice(s,0,c)}else this.handlers.push(c);return c.async&&this.asyncHandlerCount++,this.checkForPotentialMemoryLeak(),(0,S.typeGuard)(c,!!c.ctx)&&c.ctx.zz__addHandler(c,this),null===(o=e.onAddHandlerByEvt.get(this))||void 0===o||o(c,l),this.handlerTriggers.has(c)&&this.lazyEvtAttach.post(c),c},t.prototype.checkForPotentialMemoryLeak=function(){var e=void 0!==this.__maxHandlers?this.__maxHandlers:t.__defaultMaxHandlers;if(0!==e&&this.handlers.length%(e+1)==0){var r=["MaxHandlersExceededWarning: Possible Evt memory leak detected.","".concat(this.handlers.length," handlers attached").concat(this.traceId?' to "'.concat(this.traceId,'"'):"",".\n"),"Use Evt.prototype.setMaxHandlers(n) to increase limit on a specific Evt.\n","Use Evt.setDefaultMaxHandlers(n) to change the default limit currently set to ".concat(t.__defaultMaxHandlers,".\n")].join(""),o=new p.Polyfill;this.getHandlers().map((function(t){var e=t.ctx,r=t.async,o=t.once,i=t.prepend,a=t.extract,u=t.op,c=t.callback;return n(n({hasCtx:!!e,once:o,prepend:i,extract:a,isWaitFor:r},u===w.matchAll?{}:{op:u.toString()}),c?{callback:c.toString()}:{})})).map((function(t){return"{\n"+Object.keys(t).map((function(e){return" ".concat(e,": ").concat(t[e])})).join(",\n")+"\n}"})).forEach((function(t){return o.set(t,(o.has(t)?o.get(t):0)+1)})),r+="\n"+Array.from(o.keys()).map((function(t){return"".concat(o.get(t)," handler").concat(1===o.get(t)?"":"s"," like:\n").concat(t)})).join("\n")+"\n",null===this.traceId&&(r+="\n"+["To validate the identify of the Evt instance that is triggering this warning you can call",'Evt.prototype.enableTrace({ "id": "My evt id", "log": false }) on the Evt that you suspect.\n'].join(" "));try{console.warn(r)}catch(t){}}},t.prototype.isHandledByOp=function(t,e){var r,n=!1;try{r=this.getInvocableOp(t)}catch(t){return!1}return null!==r(e,(function(){return n=!0}))||n},t.prototype.trace=function(t){var e,r=this;if(null!==this.traceId){var n="(".concat(this.traceId,") "),o=!!this.handlers.find((function(e){var n=e.extract,o=e.op;return n&&r.isHandledByOp(o,t)}));if(o)n+="extracted ";else{var i=this.handlers.filter((function(e){var n=e.extract,o=e.op;return!n&&r.isHandledByOp(o,t)})).length;n+="".concat(i," handler").concat(i>1?"s":"",", ")}null===(e=this.log)||void 0===e||e.call(this,n+this.traceFormatter(t))}},t.prototype.postSync=function(t){var e,r,n=[],o=function(t){return[t,Promise.all(n).then((function(){}))]};try{for(var i=f(s([],l(this.handlers),!1)),a=i.next();!a.done;a=i.next()){var u=a.value,c=u.async,p=u.op,d=u.extract;if(!c){var h=this.handlerTriggers.get(u),v=this.getInvocableOp(p)(t,R);if(null!==v&&h){var y=h(v);if(void 0!==y&&n.push(y),d)return o(!0)}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return o(!1)},t.prototype.postAsyncFactory=function(){var t=this;return j.buildMethodCb((function(e,r,n){var o,i;if(0!==t.asyncHandlerCount){var a,u=[];Promise.resolve().then((function(){return a=t.getChronologyMark()}));var c=function(n){if(!n.async)return"continue";var o=t.getInvocableOp(n.op)(e,R);if(null===o)return"continue";var i=t.handlerTriggers.get(n);return i&&function(){var e=t.asyncHandlerChronologyMark.get(n);if(r>e)return!0;var o=t.asyncHandlerChronologyExceptionRange.get(n);return void 0!==o&&o.lowerMark<r&&r<o.upperMark&&e>o.upperMark}()?(u.push(new Promise((function(t){return n.promise.then((function(){return t()})).catch((function(){return t()}))}))),void i(o)):"continue"};try{for(var p=f(s([],l(t.handlers),!1)),d=p.next();!d.done;d=p.next())c(d.value)}catch(t){o={error:t}}finally{try{d&&!d.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}if(0!==u.length){var h=s([],l(t.handlers),!1);Promise.all(u).then((function(){var e,o;try{for(var i=f(t.handlers),u=i.next();!u.done;u=i.next()){var c=u.value;c.async&&(h.indexOf(c)>=0||t.asyncHandlerChronologyExceptionRange.set(c,{lowerMark:r,upperMark:a}))}}catch(t){e={error:t}}finally{try{u&&!u.done&&(o=i.return)&&o.call(i)}finally{if(e)throw e.error}}n()}))}else n()}else n()}))},t.prototype.isHandled=function(t){var e=this;return!!this.getHandlers().find((function(r){var n=r.op;return e.isHandledByOp(n,t)}))},t.prototype.getHandlers=function(){return s([],l(this.handlers),!1)},t.prototype.detach=function(t){var e,r,n=[];try{for(var o=f(this.getHandlers()),i=o.next();!i.done;i=o.next()){var a=i.value;void 0!==t&&a.ctx!==t||a.detach()&&n.push(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=new t;return this.addHandler(n(n({},(0,w.parsePropsFromArgs)(e,"pipe")),{callback:function(t){return o.post(t)}}),t.propsFormMethodNames.attach),o},t.prototype.waitFor=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this.addHandler((0,w.parsePropsFromArgs)(e,"waitFor"),t.propsFormMethodNames.waitFor).promise},t.prototype[Symbol.asyncIterator]=function(){return this.iter()[Symbol.asyncIterator]()},t.prototype.iter=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=(0,w.parsePropsFromArgs)(r,"waitFor"),i=null!==(e=o.ctx)&&void 0!==e?e:(0,E.newCtx)(),a=this;return(t={ctx:i})[Symbol.asyncIterator]=function(){var t=i.evtDoneOrAborted.postCount,e=function(){var t=o.timeout;if(void 0!==t){var e=function(){var e=new T.TimeoutEvtError(t);i.abort(e)},r=setTimeout(e,t);return{timeout:t,setTimeoutCallback:e,timer:r}}}(),r=a.pipe(i,o.op).pipe((function(t,r){return void 0!==e&&r((function(){clearTimeout(e.timer),e.timer=setTimeout(e.setTimeoutCallback,e.timeout)})),[t]})),n=[];if(r.attach((function(t){return n.push([t])})),void 0!==e){var l=e.timer;i.evtDoneOrAborted.attachOnce((function(t){return"DONE"===t.type}),(function(){return clearTimeout(l)}))}return{next:function(){return u(this,void 0,void 0,(function(){var e,o,a;return c(this,(function(u){switch(u.label){case 0:return void 0!==(e=n.shift())?[3,2]:(o=new M.Deferred,t<i.evtDoneOrAborted.postCount?[2,{done:!0}]:(a=(0,E.newCtx)(),i.evtDoneOrAborted.attachOnce(a,(function(){return o.resolve(void 0)})),r.attachOnceExtract(a,(function(t){a.done(),o.resolve([t])})),[4,o.pr]));case 1:if(void 0===(e=u.sent()))return[2,{done:!0}];u.label=2;case 2:return[2,{done:!1,value:e[0]}]}}))}))},return:function(){return a.detach(i),{done:!0}}}},t},t.prototype.$attach=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attach.apply(this,s([],l(t),!1))},t.prototype.attach=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attach")},t.prototype.$attachOnce=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachOnce.apply(this,s([],l(t),!1))},t.prototype.attachOnce=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachOnce")},t.prototype.$attachExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachExtract.apply(this,s([],l(t),!1))},t.prototype.attachExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachExtract")},t.prototype.$attachPrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachPrepend.apply(this,s([],l(t),!1))},t.prototype.attachPrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachPrepend")},t.prototype.$attachOncePrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachOncePrepend.apply(this,s([],l(t),!1))},t.prototype.attachOncePrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachOncePrepend")},t.prototype.$attachOnceExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachOnceExtract.apply(this,s([],l(t),!1))},t.prototype.attachOnceExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachOnceExtract")},t.prototype.__attachX=function(e,r){var n=(0,w.parsePropsFromArgs)(e,"attach*"),o=this.addHandler(n,t.propsFormMethodNames[r]);return void 0===n.timeout?this:o.promise},t.prototype.postAsyncOnceHandled=function(t){var e=this;if(this.isHandled(t))return this.post(t);var r=new M.Deferred;return this.evtAttach.attachOnce((function(r){var n=r.op;return e.isHandledByOp(n,t)}),(function(){return Promise.resolve().then((function(){return r.resolve(e.post(t))}))})),r.pr},t.prototype.postOrPostAndWait=function(t,e){var r=this;this.trace(t),(0,C.overwriteReadonlyProp)(this,"postCount",this.postCount+1);var n=this.getChronologyMark(),o=l(this.postSync(t),2),i=o[0],a=o[1],u=e?function(){return a}:function(){return r.postCount};if(i)return u();if(void 0===this.postAsync){if(0===this.asyncHandlerCount)return u();this.postAsync=this.postAsyncFactory()}return this.postAsync(t,n),u()},t.prototype.post=function(t){return this.postOrPostAndWait(t,!1)},t.prototype.postAndWait=function(t){return this.postOrPostAndWait(t,!0)},t.create=v.create,t.newCtx=E.newCtx,t.merge=_.merge,t.from=g.from,t.getCtx=(0,y.getCtxFactory)(),t.loosenType=A.loosenType,t.factorize=b.factorize,t.asPostable=m.asPostable,t.asyncPipe=O.asyncPipe,t.asNonPostable=P.asNonPostable,t.__defaultMaxHandlers=25,t.propsFormMethodNames={waitFor:{async:!0,extract:!1,once:!0,prepend:!1},attach:{async:!1,extract:!1,once:!1,prepend:!1},attachExtract:{async:!1,extract:!0,once:!1,prepend:!0},attachPrepend:{async:!1,extract:!1,once:!1,prepend:!0},attachOnce:{async:!1,extract:!1,once:!0,prepend:!1},attachOncePrepend:{async:!1,extract:!1,once:!0,prepend:!0},attachOnceExtract:{async:!1,extract:!0,once:!0,prepend:!0}},t}();e.onAddHandlerByEvt=new d.Polyfill,e.Evt=L;try{(0,C.overwriteReadonlyProp)(e.Evt,"name","Evt")}catch(t){}h.importProxy.Evt=e.Evt},515:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.loosenType=void 0,e.loosenType=function(t){return t}},339:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.merge=e.mergeImpl=void 0;var n=r(87);function o(t,e){var r=new n.importProxy.Evt,o=function(t){return r.post(t)};return e.forEach((function(e){void 0===t?e.attach(o):e.attach(t,o)})),r}e.mergeImpl=o,e.merge=function(t,e){return"length"in t?o(void 0,t):o(t,e)}},352:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.newCtx=void 0;var n=r(87);e.newCtx=function(){return new n.importProxy.Ctx}},325:function(t,e,r){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.parsePropsFromArgs=e.matchAll=void 0;var a=r(112),u=r(897),c=r(276);function l(){return!0}e.matchAll=l;var s=function(t){return void 0!==t&&(0,c.typeGuard)(t,!0)&&("function"==typeof t||"function"==typeof t[0])},f={op:l,ctx:void 0,timeout:void 0,callback:void 0};e.parsePropsFromArgs=function t(e,r){switch(r){case"pipe":var c=function(t){return 0===t.length?{}:{op:1===t.length?t[0]:u.compose.apply(void 0,i([],o(t),!1))}};if(s(e[0]))return(0,a.id)(n(n({},f),c(e)));var l=o(e),p=l[0],d=l.slice(1);return(0,a.id)(n(n(n({},f),void 0!==p?{ctx:p}:{}),c(d)));case"waitFor":return t(i(i([],o(e.filter((function(t,r){return!(r===e.length-1&&void 0===t)}))),!1),[f.callback],!1),"attach*");case"attach*":switch(e.length){case 4:var h=o(e,4),v=h[0],y=h[1],b=h[2],_=h[3];return(0,a.id)(n(n({},f),{op:v,ctx:y,timeout:b,callback:_}));case 3:var g=o(e,3);if(v=g[0],y=g[1],b=g[2],"number"==typeof y){var m=y,O=b;return s(v)?(0,a.id)(n(n({},f),{timeout:m,callback:O,op:v})):(0,a.id)(n(n({},f),{timeout:m,callback:O,ctx:v}))}return(0,a.id)(n(n({},f),{op:v,ctx:y,callback:b}));case 2:var P=o(e,2);return v=P[0],y=P[1],"number"==typeof v?(0,a.id)(n(n({},f),{timeout:v,callback:y})):(O=y,s(v)?(0,a.id)(n(n({},f),{callback:O,op:v})):(0,a.id)(n(n({},f),{callback:O,ctx:v})));case 1:var w=o(e,1)[0];return(0,a.id)(n(n({},f),{callback:w}));case 0:return(0,a.id)(n({},f))}}}},703:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LazyEvt=void 0;var n=r(259),o=r(87),i=function(){function t(){this.initialPostCount=0}return Object.defineProperty(t.prototype,"evt",{get:function(){return void 0===this.__evt&&(this.__evt=new o.importProxy.Evt,(0,n.overwriteReadonlyProp)(this.__evt,"postCount",this.initialPostCount)),this.__evt},enumerable:!1,configurable:!0}),t.prototype.__post=function(t,e){return void 0===this.__evt?++this.initialPostCount:this.__evt[e?"postAndWait":"post"](t)},t.prototype.post=function(t){return this.__post(t,!1)},t.prototype.postAndWait=function(t){return this.__post(t,!0)},t}();e.LazyEvt=i},435:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LazyStatefulEvt=void 0;var n=r(259),o=r(87),i=function(){function t(t){this.initialPostCount=0,this.initialState=t}return Object.defineProperty(t.prototype,"evt",{get:function(){return void 0===this.__evt&&(this.__evt=new o.importProxy.StatefulEvt(this.initialState),this.initialState=null,(0,n.overwriteReadonlyProp)(this.__evt,"postCount",this.initialPostCount)),this.__evt},enumerable:!1,configurable:!0}),t.prototype.__post=function(t,e){return void 0===this.__evt?(this.initialState=t,++this.initialPostCount):this.__evt[e?"postAndWait":"post"](t)},t.prototype.post=function(t){return this.__post(t,!1)},t.prototype.postAndWait=function(t){return this.__post(t,!0)},t}();e.LazyStatefulEvt=i},533:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.StatefulEvt=void 0,r(648);var u=r(703),c=r(435),l=r(87),s=r(465),f=r(939),p=r(112),d=function(t){return t()},h=function(t){function e(e){var r=t.call(this)||this;return r.lazyEvtDiff=new u.LazyEvt,r.lazyEvtChangeDiff=new u.LazyEvt,r.__state=e,r.lazyEvtChange=new c.LazyStatefulEvt(r.__state),s.onAddHandlerByEvt.set(r,(function(t,e){if(!t.extract){var n=(0,p.id)(void 0),o=r.getInvocableOp(t.op)(r.__state,void 0!==r.setOpResultForPipe?function(t){return n=t}:d);void 0!==r.setOpResultForPipe&&(r.setOpResultForPipe(o),void 0!==n&&n()),o&&e(o)}})),r}return o(e,t),Object.defineProperty(e.prototype,"state",{get:function(){return this.__state},set:function(t){this.state!==t&&this.post(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"evtDiff",{get:function(){return this.lazyEvtDiff.evt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"evtChange",{get:function(){return this.lazyEvtChange.evt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"evtChangeDiff",{get:function(){return this.lazyEvtChangeDiff.evt},enumerable:!1,configurable:!0}),e.prototype.post=function(t){return this.__post(t,!1,!1)},e.prototype.postForceChange=function(t){return this.__post(t?t[0]:this.state,!0,!1)},e.prototype.postAndWait=function(t){return this.__post(t,!1,!0)},e.prototype.__post=function(e,r,n){var o=this.state;this.__state=e;var i={prevState:o,newState:this.state},a=n?"postAndWait":"post",u=[],c=this.lazyEvtDiff[a](i);if(n&&u.push(c),r||!Object.is(o,this.state)){var l=this.lazyEvtChange[a](this.state),s=this.lazyEvtChangeDiff[a](i);n&&u.push(l,s)}var f=t.prototype[a].call(this,e);return n?(u.push(f),Promise.all(u).then((function(){}))):f},e.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=void 0;this.setOpResultForPipe=function(t){return n=t};var o=t.prototype.pipe.apply(this,a([],i(e),!1));if((0,f.assert)(void 0!==n),this.setOpResultForPipe=void 0,!n)throw new Error(["Cannot pipe StatefulEvt because the operator does not match","it's current state. You would end up with evt.state === undefined","Use evt.toStateless([ctx]).pipe(op).toStatic(initialState)","to be sure the StatefulEvt does not have an undefined state"].join(" "));return o.toStateful(n[0])},e.prototype.toStateless=function(e){var r=s.onAddHandlerByEvt.get(this);s.onAddHandlerByEvt.delete(this);var n=e?t.prototype.pipe.call(this,e):t.prototype.pipe.call(this);return s.onAddHandlerByEvt.set(this,r),n},e}(s.Evt);e.StatefulEvt=h,l.importProxy.StatefulEvt=e.StatefulEvt},87:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.importProxy=void 0,e.importProxy={}},308:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.distinct=e.nonNullable=e.throttleTime=e.to=e.StatefulEvt=e.Evt=e.Ctx=void 0,o(r(946),e),o(r(869),e);var i=r(317);Object.defineProperty(e,"Ctx",{enumerable:!0,get:function(){return i.Ctx}});var a=r(465);Object.defineProperty(e,"Evt",{enumerable:!0,get:function(){return a.Evt}});var u=r(533);Object.defineProperty(e,"StatefulEvt",{enumerable:!0,get:function(){return u.StatefulEvt}});var c=r(293);Object.defineProperty(e,"to",{enumerable:!0,get:function(){return c.to}});var l=r(857);Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return l.throttleTime}});var s=r(976);Object.defineProperty(e,"nonNullable",{enumerable:!0,get:function(){return s.nonNullable}});var f=r(144);Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return f.distinct}})},612:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EventTargetLike=void 0;var n,o,i,a,u,c=r(276);n=e.EventTargetLike||(e.EventTargetLike={}),function(t){t.match=function(t){return(0,c.typeGuard)(t,!0)&&t instanceof Object&&"function"==typeof t.subscribe}}(o=n.RxJSSubject||(n.RxJSSubject={})),function(t){t.match=function(t){return(0,c.typeGuard)(t,!0)&&t instanceof Object&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}}(i=n.NodeStyleEventEmitter||(n.NodeStyleEventEmitter={})),function(t){t.match=function(t){return(0,c.typeGuard)(t,!0)&&t instanceof Object&&"function"==typeof t.on&&"function"==typeof t.off}}(a=n.JQueryStyleEventEmitter||(n.JQueryStyleEventEmitter={})),function(t){t.match=function(t){return(0,c.typeGuard)(t,!0)&&t instanceof Object&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}}(u=n.HasEventTargetAddRemove||(n.HasEventTargetAddRemove={})),n.canBe=function(t){try{return u.match(t)||i.match(t)||a.match(t)||o.match(t)}catch(t){return!1}}},209:function(t,e){var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.DetachedEvtError=e.TimeoutEvtError=void 0;var o=function(t){function e(e){var r=this.constructor,n=t.call(this,"Evt timeout after ".concat(e,"ms"))||this;return n.timeout=e,Object.setPrototypeOf(n,r.prototype),n}return n(e,t),e}(Error);e.TimeoutEvtError=o;var i=function(t){function e(){var e=this.constructor,r=t.call(this,"Evt handler detached")||this;return Object.setPrototypeOf(r,e.prototype),r}return n(e,t),e}(Error);e.DetachedEvtError=i},608:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},667:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},946:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.dom=void 0,i(r(667),e),i(r(543),e),e.dom=a(r(23)),i(r(612),e),i(r(209),e),i(r(608),e)},517:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CtxLike=void 0;var n=r(276);(e.CtxLike||(e.CtxLike={})).match=function(t){return(0,n.typeGuard)(t,!0)&&t instanceof Object&&"function"==typeof t.done&&"function"==typeof t.abort&&"function"==typeof t.zz__addHandler&&"function"==typeof t.zz__removeHandler}},543:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(517),e)},23:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.__hack=void 0,e.__hack="NOT TYPE ONLY"},897:function(t,e,r){var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.compose=void 0;var i=r(110),a=r(112);e.compose=function t(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(1===e.length){var u=n(e,1)[0];return(0,i.convertOperatorToStatelessFλ)(u)}var c=n(e),l=c[0],s=c[1],f=c.slice(2),p=function(t,e){var r=(0,i.convertOperatorToStatelessFλ)(t),o=(0,i.convertOperatorToStatelessFλ)(e);return(0,a.id)((function(t,e){var i=r(t,e);if(!i)return null;var a=n(i,1)[0],u=o(a,e);return u?[u[0]]:u}))}(l,s);return 0===f.length?p:t.apply(void 0,o([p],n(f),!1))}},110:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e["convertOperatorToStatelessFλ"]=void 0,e["convertOperatorToStatelessFλ"]=function(t){return"function"!=typeof t?(r=(e=t)[1],function(t,n){var o=e[0](t,r,n);return null!==o&&n((function(){return r=o[0]})),o}):function(t){return function(e,r){var n=t(e,r);return n instanceof Object&&!("input"in n)&&1===n.length?n:n?[e]:null}}(t);var e,r}},869:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.compose=void 0;var n=r(897);Object.defineProperty(e,"compose",{enumerable:!0,get:function(){return n.compose}})},939:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(e,"__esModule",{value:!0}),e.assert=e.AssertionError=void 0;var a=r(259),u=r(126),c=function(t){function e(e){var r=this.constructor,n=t.call(this,"Wrong assertion encountered"+(e?': "'.concat(e,'"'):""))||this;if(Object.setPrototypeOf(n,r.prototype),!n.stack)return n;try{(0,a.overwriteReadonlyProp)(n,"stack",n.stack.split("\n").filter((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=i(t,2)[1];return 1!==r&&2!==r})).join("\n"))}catch(t){}return n}return o(e,t),e}(Error);e.AssertionError=c,e.assert=function(t,e){if(0===arguments.length&&(t=!0),void 0===u.assertIsRefWrapper.ref){if(!t)throw new c(e)}else u.assertIsRefWrapper.ref=void 0}},112:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.id=void 0,e.id=function(t){return t}},901:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.is=void 0;var n=r(126),o=["Wrong usage of the ".concat(i.name," function refer to"),"https://docs.tsafe.dev/".concat(i.name.toLowerCase())].join(" ");function i(t){var e={};if(void 0!==n.assertIsRefWrapper.ref)throw n.assertIsRefWrapper.ref=void 0,new Error(o);return n.assertIsRefWrapper.ref=e,Promise.resolve().then((function(){if(n.assertIsRefWrapper.ref===e)throw new Error(o)})),null}e.is=i},839:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isPromiseLike=void 0,e.isPromiseLike=function(t){return"object"===r(t)&&null!==t&&"then"in t&&"function"==typeof t.then}},259:function(t,e,r){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.overwriteReadonlyProp=void 0;var o=r(939),i=r(901);e.overwriteReadonlyProp=function(t,e,r){try{t[e]=r}catch(t){}if(t[e]===r)return r;var a=void 0,u=Object.getOwnPropertyDescriptor(t,e)||{enumerable:!0,configurable:!0};if(u.get)throw new Error("Probably a wrong ides to overwrite ".concat(String(e)," getter"));try{Object.defineProperty(t,e,n(n({},u),{value:r}))}catch(t){(0,o.assert)((0,i.is)(t)),a=t}if(t[e]!==r)throw a||new Error("Can't assign");return r}},276:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.typeGuard=void 0,e.typeGuard=function(t,e){return e}},126:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assertIsRefWrapper=void 0;var n=r(112);e.assertIsRefWrapper={ref:(0,n.id)(void 0)}},144:function(t,e,r){var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.distinct=void 0;var i=r(897);e.distinct=function(t,e){var r;return(0,i.compose)((function(r){var n,o;return[{data:r,selectedKey:null!==(n=null==t?void 0:t(r))&&void 0!==n?n:r,currentFlushCount:null!==(o=null==e?void 0:e.evtDoneOrAborted.postCount)&&void 0!==o?o:0}]}),[function(t,e){var r=t.data,i=t.selectedKey,a=t.currentFlushCount,u=e.alreadyPostedData,c=e.previousFlushCount;return[{boxedData:a===c&&u.has(i)?null:[r],alreadyPostedData:new Set(o(o([],n(a!==c?[]:Array.from(u)),!1),[i],!1)),previousFlushCount:a}]},{boxedData:null,alreadyPostedData:new Set,previousFlushCount:null!==(r=null==e?void 0:e.evtDoneOrAborted.postCount)&&void 0!==r?r:0}],(function(t){return t.boxedData}))}},976:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.nonNullable=void 0;var r=function(t){return null==t?null:[t]};e.nonNullable=function(){return r}},857:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.throttleTime=void 0;var n=r(897);e.throttleTime=function(t){return(0,n.compose)([function(e,r){var n=r.lastClick,o=Date.now();return o-n<t?null:[{data:e,lastClick:o}]},{lastClick:0,data:null}],(function(t){return[t.data]}))}},293:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.to=void 0;var r=new Map;e.to=function(t){var n;return null!==(n=r.get(t))&&void 0!==n?n:(r.set(t,(function(e){return e[0]!==t?null:[e[1]]})),(0,e.to)(t))}},233:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.VoidDeferred=e.Deferred=void 0;var i=r(259),a=function(){var t,e,r=this;this.isPending=!0,this.pr=new Promise((function(n,o){t=function(t){(0,i.overwriteReadonlyProp)(r,"isPending",!1),n(t)},e=function(t){(0,i.overwriteReadonlyProp)(r,"isPending",!1),o(t)}})),this.resolve=t,this.reject=e};e.Deferred=a;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(a);e.VoidDeferred=u},460:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.safeClearTimeout=e.safeSetTimeout=void 0,e.safeSetTimeout=function(t,e){return setTimeout(t,e)},e.safeClearTimeout=function(t){return clearTimeout(t)}},557:(t,e)=>{e.__esModule=!0,Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),r=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o<r;){var i=e[o];if(t.call(n,i,o,e))return i;o++}},configurable:!0,writable:!0})},898:(t,e)=>{e.__esModule=!0,e.Polyfill=e.LightMapImpl=void 0;var r=function(){function t(){this.record=[]}return t.prototype.has=function(t){return this.record.map((function(t){return t[0]})).indexOf(t)>=0},t.prototype.get=function(t){var e=this.record.filter((function(e){return e[0]===t}))[0];if(void 0!==e)return e[1]},t.prototype.set=function(t,e){var r=this.record.filter((function(e){return e[0]===t}))[0];return void 0===r?this.record.push([t,e]):r[1]=e,this},t.prototype.delete=function(t){var e=this.record.map((function(t){return t[0]})).indexOf(t);return!(e<0||(this.record.splice(e,1),0))},t.prototype.keys=function(){return this.record.map((function(t){return t[0]}))},t}();e.LightMapImpl=r,e.Polyfill="undefined"!=typeof Map?Map:r},648:(t,e)=>{e.__esModule=!0,Object.is||(Object.is=function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e})},819:(t,e,r)=>{e.__esModule=!0,e.Polyfill=e.LightSetImpl=void 0;var n=r(898),o=function(){function t(t){if(this.map=new n.Polyfill,void 0!==t)for(var e=0,r=t;e<r.length;e++){var o=r[e];this.add(o)}}return t.prototype.has=function(t){return this.map.has(t)},t.prototype.add=function(t){return this.map.set(t,!0),this},t.prototype.values=function(){return this.map.keys()},t.prototype.delete=function(t){return this.map.delete(t)},t}();e.LightSetImpl=o,e.Polyfill="undefined"!=typeof Set?Set:o},949:(t,e,r)=>{e.__esModule=!0,e.Polyfill=void 0;var n=r(898);e.Polyfill="undefined"!=typeof WeakMap?WeakMap:n.Polyfill},546:function(t,e,r){var n=this&&this.__spreadArrays||function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)n[o]=i[a];return n};e.__esModule=!0,e.buildMethodCb=e.buildCb=e.getPrComplete=e.isRunning=e.cancelAllQueuedCalls=e.getQueuedCallCount=e.buildMethod=e.build=e.createGroupRef=void 0;var o=r(949),i=function(){function t(){this.queuedCalls=[],this.isRunning=!1,this.prComplete=Promise.resolve()}return t.prototype.cancelAllQueuedCalls=function(){var t;return this.queuedCalls.splice(0,t=this.queuedCalls.length),t},t}(),a={},u=new o.Polyfill;function c(t,e){var r=u.get(t);r||(r=new o.Polyfill,u.set(t,r));var n=r.get(e);return n||(n=new i,r.set(e,n)),n}function l(){return new Array(0)}e.createGroupRef=l,e.build=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return p(!0,l(),t[0]);case 2:return p(!0,t[0],t[1])}},e.buildMethod=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return p(!1,l(),t[0]);case 2:return p(!1,t[0],t[1])}},e.getQueuedCallCount=function(t,e){var r=f(t,e);return r?r.queuedCalls.length:0},e.cancelAllQueuedCalls=function(t,e){var r=f(t,e);return r?r.cancelAllQueuedCalls():0},e.isRunning=function(t,e){var r=f(t,e);return!!r&&r.isRunning},e.getPrComplete=function(t,e){var r=f(t,e);return r?r.prComplete:Promise.resolve()};var s=new o.Polyfill;function f(t,e){void 0===e&&(e=a);var r=s.get(t);if(!r)throw Error("Not a run exclusiveFunction");var n=u.get(e);if(n)return n.get(r)}function p(t,e,r){var n,o=function(){for(var o=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(!t){if(!(this instanceof Object))throw new Error("Run exclusive, <this> should be an object");n=c(this,e)}return new Promise((function(t,e){var a;n.prComplete=new Promise((function(t){return a=function(){return t()}}));var u=function(r){a(),n.isRunning=!1,n.queuedCalls.length&&n.queuedCalls.shift()(),"data"in r?t(r.data):e(r.reason)};(function t(){for(var e=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(n.isRunning)n.queuedCalls.push((function(){return t.apply(e,o)}));else{n.isRunning=!0;try{r.apply(this,o).then((function(t){return u({data:t})})).catch((function(t){return u({reason:t})}))}catch(t){u({reason:t})}}}).apply(o,i)}))};return t&&(n=c(a,e)),s.set(o,e),o}function d(t,e,r){var o,i=function(){for(var i=this,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];if(!t){if(!(this instanceof Object))throw new Error("Run exclusive, <this> should be an object");o=c(this,e)}var l,s=void 0;a.length&&"function"==typeof a[a.length-1]&&(s=a.pop()),o.prComplete=new Promise((function(t){return l=function(){return t()}}));var f=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];l(),o.isRunning=!1,o.queuedCalls.length&&o.queuedCalls.shift()(),s&&s.apply(i,t)};f.hasCallback=!!s,function t(){for(var e=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(o.isRunning)o.queuedCalls.push((function(){return t.apply(e,i)}));else{o.isRunning=!0;try{r.apply(this,n(i,[f]))}catch(t){throw t.message+=" ( This exception should not have been thrown, miss use of run-exclusive buildCb )",t}}}.apply(this,a)};return t&&(o=c(a,e)),s.set(i,e),i}e.buildCb=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return d(!0,l(),t[0]);case 2:return d(!0,t[0],t[1])}},e.buildMethodCb=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return d(!1,l(),t[0]);case 2:return d(!1,t[0],t[1])}}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}var n={};(()=>{var t=n;Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=t.Evt=void 0;var e=r(308);Object.defineProperty(t,"Evt",{enumerable:!0,get:function(){return e.Evt}});var o=r(857);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return o.throttleTime}})})(),module.exports=n})();
3
- exports.__oidcSpaBundle = true;