ku4web-components 6.7.3 → 6.7.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. package/angular/index.js +1 -1
  2. package/angular/index.mjs +1 -1
  3. package/dist/cjs/index-69919a4f.js +15 -0
  4. package/dist/cjs/{index-4ca7863f.js → index-8b7230db.js} +1 -1
  5. package/dist/cjs/ku4-carousel-controls.cjs.entry.js +2 -2
  6. package/dist/cjs/ku4-carousel-slide.cjs.entry.js +1 -1
  7. package/dist/cjs/ku4-carousel.cjs.entry.js +2 -2
  8. package/dist/cjs/ku4-col.cjs.entry.js +1 -1
  9. package/dist/cjs/ku4-drawer.cjs.entry.js +1 -1
  10. package/dist/cjs/ku4-feature.cjs.entry.js +2 -2
  11. package/dist/cjs/ku4-focus-trap.cjs.entry.js +2 -2
  12. package/dist/cjs/ku4-form.cjs.entry.js +2 -2
  13. package/dist/cjs/ku4-grid.cjs.entry.js +1 -1
  14. package/dist/cjs/ku4-label.cjs.entry.js +3 -3
  15. package/dist/cjs/ku4-mask.cjs.entry.js +3 -3
  16. package/dist/cjs/ku4-modal.cjs.entry.js +3 -3
  17. package/dist/cjs/ku4-panel.cjs.entry.js +1 -1
  18. package/dist/cjs/ku4-preview.cjs.entry.js +2 -2
  19. package/dist/cjs/ku4-tab-list.cjs.entry.js +3 -3
  20. package/dist/cjs/ku4-tab-panel.cjs.entry.js +3 -3
  21. package/dist/cjs/ku4-tab.cjs.entry.js +3 -3
  22. package/dist/cjs/ku4-table.cjs.entry.js +1 -1
  23. package/dist/cjs/ku4-tooltip.cjs.entry.js +2 -2
  24. package/dist/cjs/ku4-validation.cjs.entry.js +2 -2
  25. package/dist/cjs/ku4web-components.cjs.js +2 -2
  26. package/dist/cjs/loader.cjs.js +2 -2
  27. package/dist/cjs/{shadow-css-8ae6d6e1.js → shadow-css-cf936b02.js} +1 -1
  28. package/dist/cjs/{uid-04ee16aa.js → uid-682bb993.js} +1 -1
  29. package/dist/esm/index-adc31e97.js +3 -0
  30. package/dist/esm/{index-21724a14.js → index-ed88cd9f.js} +1 -1
  31. package/dist/esm/ku4-carousel-controls.entry.js +2 -2
  32. package/dist/esm/ku4-carousel-slide.entry.js +1 -1
  33. package/dist/esm/ku4-carousel.entry.js +2 -2
  34. package/dist/esm/ku4-col.entry.js +1 -1
  35. package/dist/esm/ku4-drawer.entry.js +1 -1
  36. package/dist/esm/ku4-feature.entry.js +2 -2
  37. package/dist/esm/ku4-focus-trap.entry.js +2 -2
  38. package/dist/esm/ku4-form.entry.js +2 -2
  39. package/dist/esm/ku4-grid.entry.js +1 -1
  40. package/dist/esm/ku4-label.entry.js +3 -3
  41. package/dist/esm/ku4-mask.entry.js +3 -3
  42. package/dist/esm/ku4-modal.entry.js +3 -3
  43. package/dist/esm/ku4-panel.entry.js +1 -1
  44. package/dist/esm/ku4-preview.entry.js +2 -2
  45. package/dist/esm/ku4-tab-list.entry.js +3 -3
  46. package/dist/esm/ku4-tab-panel.entry.js +3 -3
  47. package/dist/esm/ku4-tab.entry.js +3 -3
  48. package/dist/esm/ku4-table.entry.js +1 -1
  49. package/dist/esm/ku4-tooltip.entry.js +2 -2
  50. package/dist/esm/ku4-validation.entry.js +2 -2
  51. package/dist/esm/ku4web-components.js +2 -2
  52. package/dist/esm/loader.js +2 -2
  53. package/dist/esm/{shadow-css-1257b266.js → shadow-css-4cd4480f.js} +1 -1
  54. package/dist/esm/{uid-7b4b0e6e.js → uid-a87782ca.js} +1 -1
  55. package/dist/esm-es5/index-adc31e97.js +1 -0
  56. package/dist/esm-es5/{index-21724a14.js → index-ed88cd9f.js} +1 -1
  57. package/dist/esm-es5/ku4-carousel-controls.entry.js +1 -1
  58. package/dist/esm-es5/ku4-carousel-slide.entry.js +1 -1
  59. package/dist/esm-es5/ku4-carousel.entry.js +1 -1
  60. package/dist/esm-es5/ku4-col.entry.js +1 -1
  61. package/dist/esm-es5/ku4-drawer.entry.js +1 -1
  62. package/dist/esm-es5/ku4-feature.entry.js +1 -1
  63. package/dist/esm-es5/ku4-focus-trap.entry.js +1 -1
  64. package/dist/esm-es5/ku4-form.entry.js +1 -1
  65. package/dist/esm-es5/ku4-grid.entry.js +1 -1
  66. package/dist/esm-es5/ku4-label.entry.js +1 -1
  67. package/dist/esm-es5/ku4-mask.entry.js +1 -1
  68. package/dist/esm-es5/ku4-modal.entry.js +1 -1
  69. package/dist/esm-es5/ku4-panel.entry.js +1 -1
  70. package/dist/esm-es5/ku4-preview.entry.js +1 -1
  71. package/dist/esm-es5/ku4-tab-list.entry.js +1 -1
  72. package/dist/esm-es5/ku4-tab-panel.entry.js +1 -1
  73. package/dist/esm-es5/ku4-tab.entry.js +1 -1
  74. package/dist/esm-es5/ku4-table.entry.js +1 -1
  75. package/dist/esm-es5/ku4-tooltip.entry.js +1 -1
  76. package/dist/esm-es5/ku4-validation.entry.js +1 -1
  77. package/dist/esm-es5/ku4web-components.js +1 -1
  78. package/dist/esm-es5/loader.js +1 -1
  79. package/dist/esm-es5/{shadow-css-1257b266.js → shadow-css-4cd4480f.js} +0 -0
  80. package/dist/esm-es5/uid-a87782ca.js +1 -0
  81. package/dist/ku4web-components/ku4web-components.esm.js +1 -1
  82. package/dist/ku4web-components/ku4web-components.js +1 -1
  83. package/dist/ku4web-components/{p-2f4a16d7.entry.js → p-003842e3.entry.js} +1 -1
  84. package/dist/ku4web-components/{p-220c33c5.system.entry.js → p-00f6f7a2.system.entry.js} +1 -1
  85. package/dist/ku4web-components/{p-a4cd5761.entry.js → p-0ca65b63.entry.js} +1 -1
  86. package/dist/ku4web-components/{p-6fc54c2b.system.entry.js → p-0e578877.system.entry.js} +1 -1
  87. package/dist/ku4web-components/p-0f3da44d.system.entry.js +1 -0
  88. package/dist/ku4web-components/{p-2da96838.system.entry.js → p-11757f38.system.entry.js} +1 -1
  89. package/dist/ku4web-components/{p-6c7c6b42.system.entry.js → p-15a87049.system.entry.js} +1 -1
  90. package/dist/ku4web-components/{p-7875dc99.entry.js → p-23ff9bcd.entry.js} +1 -1
  91. package/dist/ku4web-components/p-29a8bbab.entry.js +1 -0
  92. package/dist/ku4web-components/{p-55f5c91c.system.js → p-3074face.system.js} +1 -1
  93. package/dist/ku4web-components/{p-56f61856.entry.js → p-36f621f0.entry.js} +1 -1
  94. package/dist/ku4web-components/{p-9404f926.system.entry.js → p-376b72f4.system.entry.js} +1 -1
  95. package/dist/ku4web-components/{p-5119224c.entry.js → p-3bf6b262.entry.js} +1 -1
  96. package/dist/ku4web-components/{p-2df06b36.system.entry.js → p-416cf70d.system.entry.js} +1 -1
  97. package/dist/ku4web-components/{p-332a5a54.entry.js → p-46b0daaf.entry.js} +1 -1
  98. package/dist/ku4web-components/{p-f6330722.js → p-4eaf20b7.js} +0 -0
  99. package/dist/ku4web-components/{p-6f6a8c8d.entry.js → p-4f30a3b4.entry.js} +1 -1
  100. package/dist/ku4web-components/p-54fb5b7d.js +1 -0
  101. package/dist/ku4web-components/{p-e2659cc2.system.entry.js → p-5cccec1b.system.entry.js} +1 -1
  102. package/dist/ku4web-components/{p-b3ad84eb.system.js → p-68376c90.system.js} +1 -1
  103. package/dist/ku4web-components/{p-6715c004.system.entry.js → p-6c6c1035.system.entry.js} +1 -1
  104. package/dist/ku4web-components/{p-4243b0a9.system.entry.js → p-76ed1a14.system.entry.js} +1 -1
  105. package/dist/ku4web-components/{p-f33f1619.entry.js → p-7d459d29.entry.js} +1 -1
  106. package/dist/ku4web-components/p-7fb3c20b.entry.js +1 -0
  107. package/dist/ku4web-components/p-8091c9a5.js +1 -0
  108. package/dist/ku4web-components/{p-9d027a50.entry.js → p-80c99a74.entry.js} +1 -1
  109. package/dist/ku4web-components/{p-3d59749e.entry.js → p-825c4eb1.entry.js} +1 -1
  110. package/dist/ku4web-components/p-89670006.system.entry.js +1 -0
  111. package/dist/ku4web-components/{p-9260407c.entry.js → p-8e94fc34.entry.js} +1 -1
  112. package/dist/ku4web-components/{p-bb380a04.entry.js → p-918a802a.entry.js} +1 -1
  113. package/dist/ku4web-components/{p-3742c929.entry.js → p-9d3e0ac4.entry.js} +1 -1
  114. package/dist/ku4web-components/{p-be3b5409.system.entry.js → p-9dfc9b1f.system.entry.js} +1 -1
  115. package/dist/ku4web-components/{p-0943c493.js → p-a145181f.js} +1 -1
  116. package/dist/ku4web-components/{p-996461ba.entry.js → p-a3636f09.entry.js} +1 -1
  117. package/dist/ku4web-components/{p-22afbc6b.system.entry.js → p-a43cea20.system.entry.js} +1 -1
  118. package/dist/ku4web-components/{p-43d724df.system.entry.js → p-a51c6fe5.system.entry.js} +1 -1
  119. package/dist/ku4web-components/p-ad57c6a3.system.js +1 -0
  120. package/dist/ku4web-components/{p-b2af9e06.system.entry.js → p-adbc2f7a.system.entry.js} +1 -1
  121. package/dist/ku4web-components/{p-e77aa4b5.system.js → p-b1530d9c.system.js} +0 -0
  122. package/dist/ku4web-components/{p-ee51fe4d.system.entry.js → p-b32c7075.system.entry.js} +1 -1
  123. package/dist/ku4web-components/{p-5acd5997.entry.js → p-ba6e9e3d.entry.js} +1 -1
  124. package/dist/ku4web-components/{p-c305fd7d.entry.js → p-c52796ac.entry.js} +1 -1
  125. package/dist/ku4web-components/{p-d56159f9.system.entry.js → p-db4732d6.system.entry.js} +1 -1
  126. package/dist/ku4web-components/{p-90553d69.system.entry.js → p-dd984902.system.entry.js} +1 -1
  127. package/dist/ku4web-components/{p-0669a534.entry.js → p-e2515ee6.entry.js} +1 -1
  128. package/dist/ku4web-components/{p-746378d8.system.entry.js → p-e4e56edf.system.entry.js} +1 -1
  129. package/dist/ku4web-components/{p-f23287da.entry.js → p-e56f956e.entry.js} +1 -1
  130. package/dist/ku4web-components/p-e9482cb1.system.js +1 -0
  131. package/dist/ku4web-components/p-f5f5958d.system.entry.js +1 -0
  132. package/package.json +25 -25
  133. package/react/index.js +1 -1
  134. package/react/index.mjs +1 -1
  135. package/vue/index.js +1 -1
  136. package/vue/index.mjs +1 -1
  137. package/vue3/index.js +1 -1
  138. package/vue3/index.mjs +1 -1
  139. package/dist/cjs/index-2d850c25.js +0 -15
  140. package/dist/esm/index-4dba724d.js +0 -3
  141. package/dist/esm-es5/index-4dba724d.js +0 -1
  142. package/dist/esm-es5/uid-7b4b0e6e.js +0 -1
  143. package/dist/ku4web-components/p-0af98743.js +0 -1
  144. package/dist/ku4web-components/p-36e2caf6.system.entry.js +0 -1
  145. package/dist/ku4web-components/p-6981c0c5.system.js +0 -1
  146. package/dist/ku4web-components/p-74ef5565.system.entry.js +0 -1
  147. package/dist/ku4web-components/p-96c08f79.system.entry.js +0 -1
  148. package/dist/ku4web-components/p-d1b4d5dc.entry.js +0 -1
  149. package/dist/ku4web-components/p-d44118ae.js +0 -1
  150. package/dist/ku4web-components/p-d9a5870c.entry.js +0 -1
  151. package/dist/ku4web-components/p-e11b977e.system.js +0 -1
package/vue/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";function t(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- t=function(){return r};var r={},e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function c(t,r,e,n){var i=r&&r.prototype instanceof f?r:f,o=Object.create(i.prototype),s=new F(n||[]);return o._invoke=function(t,r,e){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return E()}for(e.method=i,e.arg=o;;){var s=e.delegate;if(s){var a=w(s,e);if(a){if(a===h)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=l(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,s),o}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=c;var h={};function f(){}function p(){}function y(){}var d={};u(d,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(A([])));m&&m!==e&&n.call(m,o)&&(d=m);var v=y.prototype=f.prototype=Object.create(d);function _(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function b(t,r){function e(i,o,s,a){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&n.call(h,"__await")?r.resolve(h.__await).then((function(t){e("next",t,s,a)}),(function(t){e("throw",t,s,a)})):r.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return e("throw",t,s,a)}))}a(u.arg)}var i;this._invoke=function(t,n){function o(){return new r((function(r,i){e(t,n,r,i)}))}return i=i?i.then(o,o):o()}}function w(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,w(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=l(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var i=n.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function N(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function x(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function A(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,i=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=y,u(v,"constructor",y),u(y,"constructor",p),p.displayName=u(y,a,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===p||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},r.awrap=function(t){return{__await:t}},_(b.prototype),u(b.prototype,s,(function(){return this})),r.AsyncIterator=b,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var s=new b(c(t,e,n,i),o);return r.isGeneratorFunction(e)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(v),u(v,a,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=[];for(var e in t)r.push(e);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}},r.values=A,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return s.type="throw",s.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=r,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),x(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var i=n.arg;x(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:A(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},r}function r(t,r,e,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?r(u):Promise.resolve(u).then(n,i)}function e(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var s=t.apply(e,n);function a(t){r(s,i,o,a,u,"next",t)}function u(t){r(s,i,o,a,u,"throw",t)}a(void 0)}))}}Object.defineProperty(exports,"__esModule",{value:!0});class n{static isNull(t){return null===t}static isEmpty(t){return n.isString(t)&&""===t||n.isArray(t)&&t.length<1||n.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(n.isUndefined(t)||n.isNull(t))}static isNullOrEmpty(t){return!n.exists(t)||n.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return n.isBool(t)&&!0===t}static isFalse(t){return n.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||n.isFunction(t)&&/^async/.test(t.toString())||n.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return n.exists(t)&&"object"==typeof t&&!(n.isBool(t)||n.isNumber(t)||n.isDate(t)||n.isArray(t)||n.isString(t)||n.isFunction(t))}static isObjectLiteral(t){return n.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!n.isFalsy(t)}static isFalsy(t){return n.isZero(t)||n.isFalse(t)||n.isNullOrEmpty(t)||isNaN(t)}}function i(t){return n.exists(t)&&n.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function o(t){return n.exists(t)&&n.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function s(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function a(t,r=0){return s(t+5*Math.pow(10,r-1),r)}function u(t,r=0){return 0===t?0:s(t-5*Math.pow(10,r-1),r)}function c(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function l(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function h(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function f(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(t,r=0){if(!n.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:function(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return i(o(t))},trimStart:i,trimEnd:o,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){return n.isFunction(r)?r(t):n.isString(r)&&t.split("").reduce(((t,r)=>t.replace(new RegExp(e),r)),r)},unmask:function(t,r,e="_"){const i=new RegExp(e);return n.isFunction(r)?r(t):n.isString(r)&&t.split("").reduce(((t,e,n)=>!i.test(e)&&i.test(r.charAt(n))?t+e:t),"")}}),Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:s,roundUp:a,roundDown:u,roundTowardZero:function(t,r=0){return t<0?a(t,r):u(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:c,fib2:l,fibArray:function(t){return Array(t).fill(0).map((()=>c(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>l(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}}),Object.freeze({__proto__:null,uid:h,uuid:f,suid:function(){return Symbol(h())},suuid:function(){return Symbol(f())}}),Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class p{static isNull(t){return null===t}static isEmpty(t){return p.isString(t)&&""===t||p.isArray(t)&&t.length<1||p.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(p.isUndefined(t)||p.isNull(t))}static isNullOrEmpty(t){return!p.exists(t)||p.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return p.isBool(t)&&!0===t}static isFalse(t){return p.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||p.isFunction(t)&&/^async/.test(t.toString())||p.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return p.exists(t)&&"object"==typeof t&&!(p.isBool(t)||p.isNumber(t)||p.isDate(t)||p.isArray(t)||p.isString(t)||p.isFunction(t))}static isObjectLiteral(t){return p.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!p.isFalsy(t)}static isFalsy(t){return p.isZero(t)||p.isFalse(t)||p.isNullOrEmpty(t)||isNaN(t)}}function y(...t){return"".concat(...t)}function d(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)}function g(t){return m(v(t))}function m(t){return p.exists(t)&&p.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function v(t){return p.exists(t)&&p.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function _(t,r){try{return t()}catch{return r}}let b;Object.freeze({__proto__:null,build:y,chunk:function(t,r=0){if(!p.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:d,trim:g,trimStart:m,trimEnd:v,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){return p.isFunction(r)?r(t):p.isString(r)&&t.split("").reduce(((t,r)=>t.replace(new RegExp(e),r)),r)},unmask:function(t,r,e="_"){const n=new RegExp(e);return p.isFunction(r)?r(t):p.isString(r)&&t.split("").reduce(((t,e,i)=>!n.test(e)&&n.test(r.charAt(i))?t+e:t),"")}}),_.async=async(t,r)=>{try{return await t()}catch{return r}};class w{constructor(t,r,e){if(r<1||r>12)throw new Error("Invalid month at Assert.DayPoint");if(e<1||e>N(r,t))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(t,r-1,e):new Date,this._day=this._value.getDay(),this._date=e,this._month=r,this._year=t}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const t=this._year.toString();return parseInt(t.substr(t.length-2))}get isWeekday(){const t=this._day;return t>0&&t<6}get isWeekend(){return!this.isWeekday}get isLeapYear(){return x(this._year)}get nextDay(){return F(this,1,0,0)}get prevDay(){return F(this,-1,0,0)}get nextMonth(){return F(this,0,1,0)}get prevMonth(){return F(this,0,-1,0)}get nextYear(){return F(this,0,0,1)}get prevYear(){return F(this,0,0,-1)}get firstDayOfMonth(){return new w(this._year,this._month,1)}get lastDayOfMonth(){return new w(this._year,this._month,N(this._month,this._year))}add(t,r,e){function n(t,r,e){let n=t,i=r;for(;i--;)n=n[e];return n}const{abs:i}=Math,o=i(t),s=i(e),a=i(r),u=e<0?"prevDay":"nextDay",c=r<0?"prevMonth":"nextMonth";return n(n(n(this,o,t<0?"prevYear":"nextYear"),a,c),s,u)}isBefore(t){return!(this.isAfter(t)||this.equals(t))}isAfter(t){const r=this._year,e=t.year,n=this._month,i=t.month;return r>e||r===e&&n>i||r===e&&n===i&&this._date>t.date}equals(t){return this._year===t.year&&this._month===t.month&&this._date===t.date}toString(t="mm/dd/yyyy"){const r=/y{3,}/i.test(t)?this._year:this.shortYear,e=this._month,n=this._date,i=/m{2}/i.test(t)&&e<10?"0{1}":"{1}",o=/d{2}/i.test(t)&&n<10?"0{2}":"{2}";return d(t.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,o),r,e,n)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(t){return p.isString(t)||p.isNumber(t)||p.isDate(t)?!isNaN(new Date(t).valueOf()):t instanceof w}static parse(t){if(t instanceof w)return t;let r=p.isString(t)?g(t).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):t;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)){const t=r.split("-"),[e]=t;t.push(e),t.shift(),r=t.join("/")}const e=new Date(r);if(!p.exists(r)||Number.isNaN(e.valueOf()))throw new Error(d("Cannot parse value= {0}",r));return new w(e.getFullYear(),e.getMonth()+1,e.getDate())}static tryParse(t){return _((()=>w.parse(t)),null)}static assumeNow(t){b=w.parse(t)}static get today(){return b||w.parse(new Date)}}function N(t,r){return 2===t?x(r)?29:28:t<8&&p.isEven(t)||t>7&&p.isOdd(t)?30:31}function x(t){const r=t.toString().split(/\B/);return parseFloat(y(r[r.length-2],r[r.length-1]))%4==0}function F(t,r,e,n){const i=t.month,o=t.year,s=t.date,a=e,u=n;let c=s+r,l=i+a,h=o+u;if(s+r>N(i,o)&&(c=1,l=i+a+1),s+r<1){const r=t.prevMonth;c=N(r.month,r.year),l=i+a-1}return l>12&&(l=1,h=o+u+1),l<1&&(l=12,h=o+u-1),new w(h,l,c)}function A(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function E(t,r=0){return A(t+5*Math.pow(10,r-1),r)}function S(t,r=0){return 0===t?0:A(t-5*Math.pow(10,r-1),r)}function O(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function $(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function j(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function L(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:A,roundUp:E,roundDown:S,roundTowardZero:function(t,r=0){return t<0?E(t,r):S(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:O,fib2:$,fibArray:function(t){return Array(t).fill(0).map((()=>O(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>$(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}});var z=Object.freeze({__proto__:null,uid:j,uuid:L,suid:function(){return Symbol(j())},suuid:function(){return Symbol(L())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i}),z.uid(),w.today.nextYear.toDate();const M=t=>new window.FormData(t),k=t=>{const r={};try{M(t).forEach(((t,e)=>{const n=r[e];p.isArray(n)?r[e].push(t):p.exists(n)?r[e]=[r[e],t]:r[e]=t}))}catch(e){[...t.elements].forEach((t=>{const{name:e,type:n,value:i,files:o}=t;if("file"===n)r[e]=o[0];else if("checkbox"===n||"radio"===n)t.checked&&(r[e]=i);else if(t.multiple){const n=[];t.querySelectorAll("option").forEach((t=>t.selected&&n.push(t.value))),r[e]=n.length<2?n[0]:n}else r[e]=i}))}return r};var D=k,P=M;exports.wireForm=function(r,i,o){if(r&&r.$refs&&r.$refs[i]&&!r.$refs[i].__ku4wired__)try{var s=r.$refs[i],a=s.submit;s.submit=e(t().mark((function e(){var u,c,l;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=D(i),c=P(i),t.next=4,o.call(r,u,c,s);case 4:l=t.sent,n.isFalse(l)||a.call(i);case 6:case"end":return t.stop()}}),e)}))),s.__ku4wired__=!0}catch(t){throw new Error("wireForm Error. See https://kodmunki.com/storybook/?path=/docs/form-ku4-form--basic for more information.")}};
3
+ t=function(){return r};var r={},e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function c(t,r,e,n){var i=r&&r.prototype instanceof f?r:f,o=Object.create(i.prototype),s=new F(n||[]);return o._invoke=function(t,r,e){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return E()}for(e.method=i,e.arg=o;;){var s=e.delegate;if(s){var a=w(s,e);if(a){if(a===h)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=l(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,s),o}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=c;var h={};function f(){}function p(){}function d(){}var y={};u(y,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(A([])));m&&m!==e&&n.call(m,o)&&(y=m);var v=d.prototype=f.prototype=Object.create(y);function _(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function b(t,r){function e(i,o,s,a){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&n.call(h,"__await")?r.resolve(h.__await).then((function(t){e("next",t,s,a)}),(function(t){e("throw",t,s,a)})):r.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return e("throw",t,s,a)}))}a(u.arg)}var i;this._invoke=function(t,n){function o(){return new r((function(r,i){e(t,n,r,i)}))}return i=i?i.then(o,o):o()}}function w(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,w(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=l(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var i=n.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function N(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function x(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function A(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,i=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=d,u(v,"constructor",d),u(d,"constructor",p),p.displayName=u(d,a,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===p||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},r.awrap=function(t){return{__await:t}},_(b.prototype),u(b.prototype,s,(function(){return this})),r.AsyncIterator=b,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var s=new b(c(t,e,n,i),o);return r.isGeneratorFunction(e)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(v),u(v,a,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=[];for(var e in t)r.push(e);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}},r.values=A,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return s.type="throw",s.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=r,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),x(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var i=n.arg;x(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:A(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},r}function r(t,r,e,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?r(u):Promise.resolve(u).then(n,i)}function e(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var s=t.apply(e,n);function a(t){r(s,i,o,a,u,"next",t)}function u(t){r(s,i,o,a,u,"throw",t)}a(void 0)}))}}Object.defineProperty(exports,"__esModule",{value:!0});class n{static isNull(t){return null===t}static isEmpty(t){return n.isString(t)&&""===t||n.isArray(t)&&t.length<1||n.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(n.isUndefined(t)||n.isNull(t))}static isNullOrEmpty(t){return!n.exists(t)||n.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return n.isBool(t)&&!0===t}static isFalse(t){return n.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||n.isFunction(t)&&/^async/.test(t.toString())||n.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return n.exists(t)&&"object"==typeof t&&!(n.isBool(t)||n.isNumber(t)||n.isDate(t)||n.isArray(t)||n.isString(t)||n.isFunction(t))}static isObjectLiteral(t){return n.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!n.isFalsy(t)}static isFalsy(t){return n.isZero(t)||n.isFalse(t)||n.isNullOrEmpty(t)||isNaN(t)}}function i(t){return n.exists(t)&&n.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function o(t){return n.exists(t)&&n.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function s(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function a(t,r=0){return s(t+5*Math.pow(10,r-1),r)}function u(t,r=0){return 0===t?0:s(t-5*Math.pow(10,r-1),r)}function c(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function l(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function h(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function f(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(t,r=0){if(!n.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:function(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return i(o(t))},trimStart:i,trimEnd:o,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){const i=t.toString().split(""),o=new RegExp(e);return n.isFunction(r)?r(t):n.isString(r)&&r.split("").reduce(((e,n)=>i.length>0&&(o.test(n)||i[0]===n&&t.indexOf(i[0])===r.indexOf(n))?e+i.shift():e+n),"")},unmask:function(t,r,e="_"){const i=new RegExp(e);return n.isFunction(r)?r(t):n.isString(r)&&t.split("").reduce(((t,e,n)=>i.test(e)||!i.test(r.charAt(n))&&r.charAt(n)===e?t:t+e),"")}}),Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:s,roundUp:a,roundDown:u,roundTowardZero:function(t,r=0){return t<0?a(t,r):u(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:c,fib2:l,fibArray:function(t){return Array(t).fill(0).map((()=>c(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>l(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}}),Object.freeze({__proto__:null,uid:h,uuid:f,suid:function(){return Symbol(h())},suuid:function(){return Symbol(f())}}),Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class p{static isNull(t){return null===t}static isEmpty(t){return p.isString(t)&&""===t||p.isArray(t)&&t.length<1||p.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(p.isUndefined(t)||p.isNull(t))}static isNullOrEmpty(t){return!p.exists(t)||p.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return p.isBool(t)&&!0===t}static isFalse(t){return p.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||p.isFunction(t)&&/^async/.test(t.toString())||p.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return p.exists(t)&&"object"==typeof t&&!(p.isBool(t)||p.isNumber(t)||p.isDate(t)||p.isArray(t)||p.isString(t)||p.isFunction(t))}static isObjectLiteral(t){return p.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!p.isFalsy(t)}static isFalsy(t){return p.isZero(t)||p.isFalse(t)||p.isNullOrEmpty(t)||isNaN(t)}}function d(...t){return"".concat(...t)}function y(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)}function g(t){return m(v(t))}function m(t){return p.exists(t)&&p.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function v(t){return p.exists(t)&&p.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function _(t,r){try{return t()}catch{return r}}let b;Object.freeze({__proto__:null,build:d,chunk:function(t,r=0){if(!p.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:y,trim:g,trimStart:m,trimEnd:v,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){return p.isFunction(r)?r(t):p.isString(r)&&t.split("").reduce(((t,r)=>t.replace(new RegExp(e),r)),r)},unmask:function(t,r,e="_"){const n=new RegExp(e);return p.isFunction(r)?r(t):p.isString(r)&&t.split("").reduce(((t,e,i)=>!n.test(e)&&n.test(r.charAt(i))?t+e:t),"")}}),_.async=async(t,r)=>{try{return await t()}catch{return r}};class w{constructor(t,r,e){if(r<1||r>12)throw new Error("Invalid month at Assert.DayPoint");if(e<1||e>N(r,t))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(t,r-1,e):new Date,this._day=this._value.getDay(),this._date=e,this._month=r,this._year=t}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const t=this._year.toString();return parseInt(t.substr(t.length-2))}get isWeekday(){const t=this._day;return t>0&&t<6}get isWeekend(){return!this.isWeekday}get isLeapYear(){return x(this._year)}get nextDay(){return F(this,1,0,0)}get prevDay(){return F(this,-1,0,0)}get nextMonth(){return F(this,0,1,0)}get prevMonth(){return F(this,0,-1,0)}get nextYear(){return F(this,0,0,1)}get prevYear(){return F(this,0,0,-1)}get firstDayOfMonth(){return new w(this._year,this._month,1)}get lastDayOfMonth(){return new w(this._year,this._month,N(this._month,this._year))}add(t,r,e){function n(t,r,e){let n=t,i=r;for(;i--;)n=n[e];return n}const{abs:i}=Math,o=i(t),s=i(e),a=i(r),u=e<0?"prevDay":"nextDay",c=r<0?"prevMonth":"nextMonth";return n(n(n(this,o,t<0?"prevYear":"nextYear"),a,c),s,u)}isBefore(t){return!(this.isAfter(t)||this.equals(t))}isAfter(t){const r=this._year,e=t.year,n=this._month,i=t.month;return r>e||r===e&&n>i||r===e&&n===i&&this._date>t.date}equals(t){return this._year===t.year&&this._month===t.month&&this._date===t.date}toString(t="mm/dd/yyyy"){const r=/y{3,}/i.test(t)?this._year:this.shortYear,e=this._month,n=this._date,i=/m{2}/i.test(t)&&e<10?"0{1}":"{1}",o=/d{2}/i.test(t)&&n<10?"0{2}":"{2}";return y(t.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,o),r,e,n)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(t){return p.isString(t)||p.isNumber(t)||p.isDate(t)?!isNaN(new Date(t).valueOf()):t instanceof w}static parse(t){if(t instanceof w)return t;let r=p.isString(t)?g(t).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):t;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)){const t=r.split("-"),[e]=t;t.push(e),t.shift(),r=t.join("/")}const e=new Date(r);if(!p.exists(r)||Number.isNaN(e.valueOf()))throw new Error(y("Cannot parse value= {0}",r));return new w(e.getFullYear(),e.getMonth()+1,e.getDate())}static tryParse(t){return _((()=>w.parse(t)),null)}static assumeNow(t){b=w.parse(t)}static get today(){return b||w.parse(new Date)}}function N(t,r){return 2===t?x(r)?29:28:t<8&&p.isEven(t)||t>7&&p.isOdd(t)?30:31}function x(t){const r=t.toString().split(/\B/);return parseFloat(d(r[r.length-2],r[r.length-1]))%4==0}function F(t,r,e,n){const i=t.month,o=t.year,s=t.date,a=e,u=n;let c=s+r,l=i+a,h=o+u;if(s+r>N(i,o)&&(c=1,l=i+a+1),s+r<1){const r=t.prevMonth;c=N(r.month,r.year),l=i+a-1}return l>12&&(l=1,h=o+u+1),l<1&&(l=12,h=o+u-1),new w(h,l,c)}function A(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function E(t,r=0){return A(t+5*Math.pow(10,r-1),r)}function S(t,r=0){return 0===t?0:A(t-5*Math.pow(10,r-1),r)}function O(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function $(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function j(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function L(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:A,roundUp:E,roundDown:S,roundTowardZero:function(t,r=0){return t<0?E(t,r):S(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:O,fib2:$,fibArray:function(t){return Array(t).fill(0).map((()=>O(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>$(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}});var z=Object.freeze({__proto__:null,uid:j,uuid:L,suid:function(){return Symbol(j())},suuid:function(){return Symbol(L())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i}),z.uid(),w.today.nextYear.toDate();const M=t=>new window.FormData(t),k=t=>{const r={};try{M(t).forEach(((t,e)=>{const n=r[e];p.isArray(n)?r[e].push(t):p.exists(n)?r[e]=[r[e],t]:r[e]=t}))}catch(e){[...t.elements].forEach((t=>{const{name:e,type:n,value:i,files:o}=t;if("file"===n)r[e]=o[0];else if("checkbox"===n||"radio"===n)t.checked&&(r[e]=i);else if(t.multiple){const n=[];t.querySelectorAll("option").forEach((t=>t.selected&&n.push(t.value))),r[e]=n.length<2?n[0]:n}else r[e]=i}))}return r};var D=k,P=M;exports.wireForm=function(r,i,o){if(r&&r.$refs&&r.$refs[i]&&!r.$refs[i].__ku4wired__)try{var s=r.$refs[i],a=s.submit;s.submit=e(t().mark((function e(){var u,c,l;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=D(i),c=P(i),t.next=4,o.call(r,u,c,s);case 4:l=t.sent,n.isFalse(l)||a.call(i);case 6:case"end":return t.stop()}}),e)}))),s.__ku4wired__=!0}catch(t){throw new Error("wireForm Error. See https://kodmunki.com/storybook/?path=/docs/form-ku4-form--basic for more information.")}};
package/vue/index.mjs CHANGED
@@ -1 +1 @@
1
- class t{static isNull(t){return null===t}static isEmpty(r){return t.isString(r)&&""===r||t.isArray(r)&&r.length<1||t.isObjectLiteral(r)&&Object.keys(r).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(r){return!(t.isUndefined(r)||t.isNull(r))}static isNullOrEmpty(r){return!t.exists(r)||t.isEmpty(r)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(r){return t.isBool(r)&&!0===r}static isFalse(r){return t.isBool(r)&&!1===r}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(r){try{return"AsyncFunction"===Object.getPrototypeOf(r).constructor.name||t.isFunction(r)&&/^async/.test(r.toString())||t.isFunction(r().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(r){return t.exists(r)&&"object"==typeof r&&!(t.isBool(r)||t.isNumber(r)||t.isDate(r)||t.isArray(r)||t.isString(r)||t.isFunction(r))}static isObjectLiteral(r){return t.isObject(r)&&r.constructor==={}.constructor}static isTruthy(r){return!t.isFalsy(r)}static isFalsy(r){return t.isZero(r)||t.isFalse(r)||t.isNullOrEmpty(r)||isNaN(r)}}function r(r){return t.exists(r)&&t.isFunction(r.replace)?r.replace(/^[\s\n]*/,""):r}function e(r){return t.exists(r)&&t.isFunction(r.replace)?r.replace(/[\s\n]*$/,""):r}function n(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function i(t,r=0){return n(t+5*Math.pow(10,r-1),r)}function s(t,r=0){return 0===t?0:n(t-5*Math.pow(10,r-1),r)}function a(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function u(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function o(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function c(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(r,e=0){if(!t.isString(r)||Number.isNaN(e)||e<0)return[];if(e<r.length){let t=0;const n=e||r.length,i=[];for(;t<r.length;)i.push(r.slice(t,t+n)),t+=n;return i}return[r]},format:function(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return r(e(t))},trimStart:r,trimEnd:e,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(r,e,n="_"){return t.isFunction(e)?e(r):t.isString(e)&&r.split("").reduce(((t,r)=>t.replace(new RegExp(n),r)),e)},unmask:function(r,e,n="_"){const i=new RegExp(n);return t.isFunction(e)?e(r):t.isString(e)&&r.split("").reduce(((t,r,n)=>!i.test(r)&&i.test(e.charAt(n))?t+r:t),"")}}),Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:n,roundUp:i,roundDown:s,roundTowardZero:function(t,r=0){return t<0?i(t,r):s(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:a,fib2:u,fibArray:function(t){return Array(t).fill(0).map((()=>a(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>u(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}}),Object.freeze({__proto__:null,uid:o,uuid:c,suid:function(){return Symbol(o())},suuid:function(){return Symbol(c())}}),Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class l{static isNull(t){return null===t}static isEmpty(t){return l.isString(t)&&""===t||l.isArray(t)&&t.length<1||l.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(l.isUndefined(t)||l.isNull(t))}static isNullOrEmpty(t){return!l.exists(t)||l.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return l.isBool(t)&&!0===t}static isFalse(t){return l.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||l.isFunction(t)&&/^async/.test(t.toString())||l.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return l.exists(t)&&"object"==typeof t&&!(l.isBool(t)||l.isNumber(t)||l.isDate(t)||l.isArray(t)||l.isString(t)||l.isFunction(t))}static isObjectLiteral(t){return l.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!l.isFalsy(t)}static isFalsy(t){return l.isZero(t)||l.isFalse(t)||l.isNullOrEmpty(t)||isNaN(t)}}function h(...t){return"".concat(...t)}function f(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)}function p(t){return d(y(t))}function d(t){return l.exists(t)&&l.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function y(t){return l.exists(t)&&l.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function m(t,r){try{return t()}catch{return r}}let g;Object.freeze({__proto__:null,build:h,chunk:function(t,r=0){if(!l.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:f,trim:p,trimStart:d,trimEnd:y,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){return l.isFunction(r)?r(t):l.isString(r)&&t.split("").reduce(((t,r)=>t.replace(new RegExp(e),r)),r)},unmask:function(t,r,e="_"){const n=new RegExp(e);return l.isFunction(r)?r(t):l.isString(r)&&t.split("").reduce(((t,e,i)=>!n.test(e)&&n.test(r.charAt(i))?t+e:t),"")}}),m.async=async(t,r)=>{try{return await t()}catch{return r}};class _{constructor(t,r,e){if(r<1||r>12)throw new Error("Invalid month at Assert.DayPoint");if(e<1||e>b(r,t))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(t,r-1,e):new Date,this._day=this._value.getDay(),this._date=e,this._month=r,this._year=t}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const t=this._year.toString();return parseInt(t.substr(t.length-2))}get isWeekday(){const t=this._day;return t>0&&t<6}get isWeekend(){return!this.isWeekday}get isLeapYear(){return N(this._year)}get nextDay(){return w(this,1,0,0)}get prevDay(){return w(this,-1,0,0)}get nextMonth(){return w(this,0,1,0)}get prevMonth(){return w(this,0,-1,0)}get nextYear(){return w(this,0,0,1)}get prevYear(){return w(this,0,0,-1)}get firstDayOfMonth(){return new _(this._year,this._month,1)}get lastDayOfMonth(){return new _(this._year,this._month,b(this._month,this._year))}add(t,r,e){function n(t,r,e){let n=t,i=r;for(;i--;)n=n[e];return n}const{abs:i}=Math,s=i(t),a=i(e),u=i(r),o=e<0?"prevDay":"nextDay",c=r<0?"prevMonth":"nextMonth";return n(n(n(this,s,t<0?"prevYear":"nextYear"),u,c),a,o)}isBefore(t){return!(this.isAfter(t)||this.equals(t))}isAfter(t){const r=this._year,e=t.year,n=this._month,i=t.month;return r>e||r===e&&n>i||r===e&&n===i&&this._date>t.date}equals(t){return this._year===t.year&&this._month===t.month&&this._date===t.date}toString(t="mm/dd/yyyy"){const r=/y{3,}/i.test(t)?this._year:this.shortYear,e=this._month,n=this._date,i=/m{2}/i.test(t)&&e<10?"0{1}":"{1}",s=/d{2}/i.test(t)&&n<10?"0{2}":"{2}";return f(t.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,s),r,e,n)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(t){return l.isString(t)||l.isNumber(t)||l.isDate(t)?!isNaN(new Date(t).valueOf()):t instanceof _}static parse(t){if(t instanceof _)return t;let r=l.isString(t)?p(t).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):t;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)){const t=r.split("-"),[e]=t;t.push(e),t.shift(),r=t.join("/")}const e=new Date(r);if(!l.exists(r)||Number.isNaN(e.valueOf()))throw new Error(f("Cannot parse value= {0}",r));return new _(e.getFullYear(),e.getMonth()+1,e.getDate())}static tryParse(t){return m((()=>_.parse(t)),null)}static assumeNow(t){g=_.parse(t)}static get today(){return g||_.parse(new Date)}}function b(t,r){return 2===t?N(r)?29:28:t<8&&l.isEven(t)||t>7&&l.isOdd(t)?30:31}function N(t){const r=t.toString().split(/\B/);return parseFloat(h(r[r.length-2],r[r.length-1]))%4==0}function w(t,r,e,n){const i=t.month,s=t.year,a=t.date,u=e,o=n;let c=a+r,l=i+u,h=s+o;if(a+r>b(i,s)&&(c=1,l=i+u+1),a+r<1){const r=t.prevMonth;c=b(r.month,r.year),l=i+u-1}return l>12&&(l=1,h=s+o+1),l<1&&(l=12,h=s+o-1),new _(h,l,c)}function A(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function F(t,r=0){return A(t+5*Math.pow(10,r-1),r)}function S(t,r=0){return 0===t?0:A(t-5*Math.pow(10,r-1),r)}function $(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function O(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function v(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function z(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:A,roundUp:F,roundDown:S,roundTowardZero:function(t,r=0){return t<0?F(t,r):S(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:$,fib2:O,fibArray:function(t){return Array(t).fill(0).map((()=>$(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>O(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}});var x=Object.freeze({__proto__:null,uid:v,uuid:z,suid:function(){return Symbol(v())},suuid:function(){return Symbol(z())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i}),x.uid(),_.today.nextYear.toDate();const E=t=>new window.FormData(t),M=t=>{const r={};try{E(t).forEach(((t,e)=>{const n=r[e];l.isArray(n)?r[e].push(t):l.exists(n)?r[e]=[r[e],t]:r[e]=t}))}catch(e){[...t.elements].forEach((t=>{const{name:e,type:n,value:i,files:s}=t;if("file"===n)r[e]=s[0];else if("checkbox"===n||"radio"===n)t.checked&&(r[e]=i);else if(t.multiple){const n=[];t.querySelectorAll("option").forEach((t=>t.selected&&n.push(t.value))),r[e]=n.length<2?n[0]:n}else r[e]=i}))}return r};var D=M,j=E;const k=(r,e,n)=>{if(r&&r.$refs&&r.$refs[e]&&!r.$refs[e].__ku4wired__)try{const i=r.$refs[e],{submit:s}=i;i.submit=async()=>{const a=D(e),u=j(e),o=await n.call(r,a,u,i);t.isFalse(o)||s.call(e)},i.__ku4wired__=!0}catch(t){throw new Error("wireForm Error. See https://kodmunki.com/storybook/?path=/docs/form-ku4-form--basic for more information.")}};export{k as wireForm};
1
+ class t{static isNull(t){return null===t}static isEmpty(r){return t.isString(r)&&""===r||t.isArray(r)&&r.length<1||t.isObjectLiteral(r)&&Object.keys(r).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(r){return!(t.isUndefined(r)||t.isNull(r))}static isNullOrEmpty(r){return!t.exists(r)||t.isEmpty(r)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(r){return t.isBool(r)&&!0===r}static isFalse(r){return t.isBool(r)&&!1===r}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(r){try{return"AsyncFunction"===Object.getPrototypeOf(r).constructor.name||t.isFunction(r)&&/^async/.test(r.toString())||t.isFunction(r().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(r){return t.exists(r)&&"object"==typeof r&&!(t.isBool(r)||t.isNumber(r)||t.isDate(r)||t.isArray(r)||t.isString(r)||t.isFunction(r))}static isObjectLiteral(r){return t.isObject(r)&&r.constructor==={}.constructor}static isTruthy(r){return!t.isFalsy(r)}static isFalsy(r){return t.isZero(r)||t.isFalse(r)||t.isNullOrEmpty(r)||isNaN(r)}}function r(r){return t.exists(r)&&t.isFunction(r.replace)?r.replace(/^[\s\n]*/,""):r}function e(r){return t.exists(r)&&t.isFunction(r.replace)?r.replace(/[\s\n]*$/,""):r}function n(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function i(t,r=0){return n(t+5*Math.pow(10,r-1),r)}function s(t,r=0){return 0===t?0:n(t-5*Math.pow(10,r-1),r)}function a(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function u(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function o(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function c(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(r,e=0){if(!t.isString(r)||Number.isNaN(e)||e<0)return[];if(e<r.length){let t=0;const n=e||r.length,i=[];for(;t<r.length;)i.push(r.slice(t,t+n)),t+=n;return i}return[r]},format:function(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return r(e(t))},trimStart:r,trimEnd:e,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(r,e,n="_"){const i=r.toString().split(""),s=new RegExp(n);return t.isFunction(e)?e(r):t.isString(e)&&e.split("").reduce(((t,n)=>i.length>0&&(s.test(n)||i[0]===n&&r.indexOf(i[0])===e.indexOf(n))?t+i.shift():t+n),"")},unmask:function(r,e,n="_"){const i=new RegExp(n);return t.isFunction(e)?e(r):t.isString(e)&&r.split("").reduce(((t,r,n)=>i.test(r)||!i.test(e.charAt(n))&&e.charAt(n)===r?t:t+r),"")}}),Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:n,roundUp:i,roundDown:s,roundTowardZero:function(t,r=0){return t<0?i(t,r):s(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:a,fib2:u,fibArray:function(t){return Array(t).fill(0).map((()=>a(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>u(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}}),Object.freeze({__proto__:null,uid:o,uuid:c,suid:function(){return Symbol(o())},suuid:function(){return Symbol(c())}}),Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class l{static isNull(t){return null===t}static isEmpty(t){return l.isString(t)&&""===t||l.isArray(t)&&t.length<1||l.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(l.isUndefined(t)||l.isNull(t))}static isNullOrEmpty(t){return!l.exists(t)||l.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return l.isBool(t)&&!0===t}static isFalse(t){return l.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||l.isFunction(t)&&/^async/.test(t.toString())||l.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return l.exists(t)&&"object"==typeof t&&!(l.isBool(t)||l.isNumber(t)||l.isDate(t)||l.isArray(t)||l.isString(t)||l.isFunction(t))}static isObjectLiteral(t){return l.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!l.isFalsy(t)}static isFalsy(t){return l.isZero(t)||l.isFalse(t)||l.isNullOrEmpty(t)||isNaN(t)}}function h(...t){return"".concat(...t)}function f(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)}function p(t){return d(y(t))}function d(t){return l.exists(t)&&l.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function y(t){return l.exists(t)&&l.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function m(t,r){try{return t()}catch{return r}}let g;Object.freeze({__proto__:null,build:h,chunk:function(t,r=0){if(!l.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:f,trim:p,trimStart:d,trimEnd:y,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){return l.isFunction(r)?r(t):l.isString(r)&&t.split("").reduce(((t,r)=>t.replace(new RegExp(e),r)),r)},unmask:function(t,r,e="_"){const n=new RegExp(e);return l.isFunction(r)?r(t):l.isString(r)&&t.split("").reduce(((t,e,i)=>!n.test(e)&&n.test(r.charAt(i))?t+e:t),"")}}),m.async=async(t,r)=>{try{return await t()}catch{return r}};class _{constructor(t,r,e){if(r<1||r>12)throw new Error("Invalid month at Assert.DayPoint");if(e<1||e>b(r,t))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(t,r-1,e):new Date,this._day=this._value.getDay(),this._date=e,this._month=r,this._year=t}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const t=this._year.toString();return parseInt(t.substr(t.length-2))}get isWeekday(){const t=this._day;return t>0&&t<6}get isWeekend(){return!this.isWeekday}get isLeapYear(){return N(this._year)}get nextDay(){return w(this,1,0,0)}get prevDay(){return w(this,-1,0,0)}get nextMonth(){return w(this,0,1,0)}get prevMonth(){return w(this,0,-1,0)}get nextYear(){return w(this,0,0,1)}get prevYear(){return w(this,0,0,-1)}get firstDayOfMonth(){return new _(this._year,this._month,1)}get lastDayOfMonth(){return new _(this._year,this._month,b(this._month,this._year))}add(t,r,e){function n(t,r,e){let n=t,i=r;for(;i--;)n=n[e];return n}const{abs:i}=Math,s=i(t),a=i(e),u=i(r),o=e<0?"prevDay":"nextDay",c=r<0?"prevMonth":"nextMonth";return n(n(n(this,s,t<0?"prevYear":"nextYear"),u,c),a,o)}isBefore(t){return!(this.isAfter(t)||this.equals(t))}isAfter(t){const r=this._year,e=t.year,n=this._month,i=t.month;return r>e||r===e&&n>i||r===e&&n===i&&this._date>t.date}equals(t){return this._year===t.year&&this._month===t.month&&this._date===t.date}toString(t="mm/dd/yyyy"){const r=/y{3,}/i.test(t)?this._year:this.shortYear,e=this._month,n=this._date,i=/m{2}/i.test(t)&&e<10?"0{1}":"{1}",s=/d{2}/i.test(t)&&n<10?"0{2}":"{2}";return f(t.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,s),r,e,n)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(t){return l.isString(t)||l.isNumber(t)||l.isDate(t)?!isNaN(new Date(t).valueOf()):t instanceof _}static parse(t){if(t instanceof _)return t;let r=l.isString(t)?p(t).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):t;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)){const t=r.split("-"),[e]=t;t.push(e),t.shift(),r=t.join("/")}const e=new Date(r);if(!l.exists(r)||Number.isNaN(e.valueOf()))throw new Error(f("Cannot parse value= {0}",r));return new _(e.getFullYear(),e.getMonth()+1,e.getDate())}static tryParse(t){return m((()=>_.parse(t)),null)}static assumeNow(t){g=_.parse(t)}static get today(){return g||_.parse(new Date)}}function b(t,r){return 2===t?N(r)?29:28:t<8&&l.isEven(t)||t>7&&l.isOdd(t)?30:31}function N(t){const r=t.toString().split(/\B/);return parseFloat(h(r[r.length-2],r[r.length-1]))%4==0}function w(t,r,e,n){const i=t.month,s=t.year,a=t.date,u=e,o=n;let c=a+r,l=i+u,h=s+o;if(a+r>b(i,s)&&(c=1,l=i+u+1),a+r<1){const r=t.prevMonth;c=b(r.month,r.year),l=i+u-1}return l>12&&(l=1,h=s+o+1),l<1&&(l=12,h=s+o-1),new _(h,l,c)}function A(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function F(t,r=0){return A(t+5*Math.pow(10,r-1),r)}function S(t,r=0){return 0===t?0:A(t-5*Math.pow(10,r-1),r)}function $(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function O(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function v(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function z(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:A,roundUp:F,roundDown:S,roundTowardZero:function(t,r=0){return t<0?F(t,r):S(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:$,fib2:O,fibArray:function(t){return Array(t).fill(0).map((()=>$(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>O(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}});var x=Object.freeze({__proto__:null,uid:v,uuid:z,suid:function(){return Symbol(v())},suuid:function(){return Symbol(z())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i}),x.uid(),_.today.nextYear.toDate();const E=t=>new window.FormData(t),M=t=>{const r={};try{E(t).forEach(((t,e)=>{const n=r[e];l.isArray(n)?r[e].push(t):l.exists(n)?r[e]=[r[e],t]:r[e]=t}))}catch(e){[...t.elements].forEach((t=>{const{name:e,type:n,value:i,files:s}=t;if("file"===n)r[e]=s[0];else if("checkbox"===n||"radio"===n)t.checked&&(r[e]=i);else if(t.multiple){const n=[];t.querySelectorAll("option").forEach((t=>t.selected&&n.push(t.value))),r[e]=n.length<2?n[0]:n}else r[e]=i}))}return r};var D=M,j=E;const k=(r,e,n)=>{if(r&&r.$refs&&r.$refs[e]&&!r.$refs[e].__ku4wired__)try{const i=r.$refs[e],{submit:s}=i;i.submit=async()=>{const a=D(e),u=j(e),o=await n.call(r,a,u,i);t.isFalse(o)||s.call(e)},i.__ku4wired__=!0}catch(t){throw new Error("wireForm Error. See https://kodmunki.com/storybook/?path=/docs/form-ku4-form--basic for more information.")}};export{k as wireForm};
package/vue3/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";function t(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- t=function(){return r};var r={},e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function c(t,r,e,n){var i=r&&r.prototype instanceof f?r:f,o=Object.create(i.prototype),s=new F(n||[]);return o._invoke=function(t,r,e){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return E()}for(e.method=i,e.arg=o;;){var s=e.delegate;if(s){var a=w(s,e);if(a){if(a===h)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=l(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,s),o}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=c;var h={};function f(){}function p(){}function y(){}var d={};u(d,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(A([])));m&&m!==e&&n.call(m,o)&&(d=m);var v=y.prototype=f.prototype=Object.create(d);function _(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function b(t,r){function e(i,o,s,a){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&n.call(h,"__await")?r.resolve(h.__await).then((function(t){e("next",t,s,a)}),(function(t){e("throw",t,s,a)})):r.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return e("throw",t,s,a)}))}a(u.arg)}var i;this._invoke=function(t,n){function o(){return new r((function(r,i){e(t,n,r,i)}))}return i=i?i.then(o,o):o()}}function w(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,w(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=l(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var i=n.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function N(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function x(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function A(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,i=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=y,u(v,"constructor",y),u(y,"constructor",p),p.displayName=u(y,a,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===p||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},r.awrap=function(t){return{__await:t}},_(b.prototype),u(b.prototype,s,(function(){return this})),r.AsyncIterator=b,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var s=new b(c(t,e,n,i),o);return r.isGeneratorFunction(e)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(v),u(v,a,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=[];for(var e in t)r.push(e);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}},r.values=A,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return s.type="throw",s.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=r,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),x(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var i=n.arg;x(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:A(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},r}function r(t,r,e,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?r(u):Promise.resolve(u).then(n,i)}function e(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var s=t.apply(e,n);function a(t){r(s,i,o,a,u,"next",t)}function u(t){r(s,i,o,a,u,"throw",t)}a(void 0)}))}}Object.defineProperty(exports,"__esModule",{value:!0});class n{static isNull(t){return null===t}static isEmpty(t){return n.isString(t)&&""===t||n.isArray(t)&&t.length<1||n.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(n.isUndefined(t)||n.isNull(t))}static isNullOrEmpty(t){return!n.exists(t)||n.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return n.isBool(t)&&!0===t}static isFalse(t){return n.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||n.isFunction(t)&&/^async/.test(t.toString())||n.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return n.exists(t)&&"object"==typeof t&&!(n.isBool(t)||n.isNumber(t)||n.isDate(t)||n.isArray(t)||n.isString(t)||n.isFunction(t))}static isObjectLiteral(t){return n.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!n.isFalsy(t)}static isFalsy(t){return n.isZero(t)||n.isFalse(t)||n.isNullOrEmpty(t)||isNaN(t)}}function i(t){return n.exists(t)&&n.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function o(t){return n.exists(t)&&n.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function s(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function a(t,r=0){return s(t+5*Math.pow(10,r-1),r)}function u(t,r=0){return 0===t?0:s(t-5*Math.pow(10,r-1),r)}function c(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function l(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function h(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function f(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(t,r=0){if(!n.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:function(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return i(o(t))},trimStart:i,trimEnd:o,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){return n.isFunction(r)?r(t):n.isString(r)&&t.split("").reduce(((t,r)=>t.replace(new RegExp(e),r)),r)},unmask:function(t,r,e="_"){const i=new RegExp(e);return n.isFunction(r)?r(t):n.isString(r)&&t.split("").reduce(((t,e,n)=>!i.test(e)&&i.test(r.charAt(n))?t+e:t),"")}}),Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:s,roundUp:a,roundDown:u,roundTowardZero:function(t,r=0){return t<0?a(t,r):u(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:c,fib2:l,fibArray:function(t){return Array(t).fill(0).map((()=>c(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>l(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}}),Object.freeze({__proto__:null,uid:h,uuid:f,suid:function(){return Symbol(h())},suuid:function(){return Symbol(f())}}),Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class p{static isNull(t){return null===t}static isEmpty(t){return p.isString(t)&&""===t||p.isArray(t)&&t.length<1||p.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(p.isUndefined(t)||p.isNull(t))}static isNullOrEmpty(t){return!p.exists(t)||p.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return p.isBool(t)&&!0===t}static isFalse(t){return p.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||p.isFunction(t)&&/^async/.test(t.toString())||p.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return p.exists(t)&&"object"==typeof t&&!(p.isBool(t)||p.isNumber(t)||p.isDate(t)||p.isArray(t)||p.isString(t)||p.isFunction(t))}static isObjectLiteral(t){return p.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!p.isFalsy(t)}static isFalsy(t){return p.isZero(t)||p.isFalse(t)||p.isNullOrEmpty(t)||isNaN(t)}}function y(...t){return"".concat(...t)}function d(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)}function g(t){return m(v(t))}function m(t){return p.exists(t)&&p.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function v(t){return p.exists(t)&&p.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function _(t,r){try{return t()}catch{return r}}let b;Object.freeze({__proto__:null,build:y,chunk:function(t,r=0){if(!p.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:d,trim:g,trimStart:m,trimEnd:v,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){return p.isFunction(r)?r(t):p.isString(r)&&t.split("").reduce(((t,r)=>t.replace(new RegExp(e),r)),r)},unmask:function(t,r,e="_"){const n=new RegExp(e);return p.isFunction(r)?r(t):p.isString(r)&&t.split("").reduce(((t,e,i)=>!n.test(e)&&n.test(r.charAt(i))?t+e:t),"")}}),_.async=async(t,r)=>{try{return await t()}catch{return r}};class w{constructor(t,r,e){if(r<1||r>12)throw new Error("Invalid month at Assert.DayPoint");if(e<1||e>N(r,t))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(t,r-1,e):new Date,this._day=this._value.getDay(),this._date=e,this._month=r,this._year=t}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const t=this._year.toString();return parseInt(t.substr(t.length-2))}get isWeekday(){const t=this._day;return t>0&&t<6}get isWeekend(){return!this.isWeekday}get isLeapYear(){return x(this._year)}get nextDay(){return F(this,1,0,0)}get prevDay(){return F(this,-1,0,0)}get nextMonth(){return F(this,0,1,0)}get prevMonth(){return F(this,0,-1,0)}get nextYear(){return F(this,0,0,1)}get prevYear(){return F(this,0,0,-1)}get firstDayOfMonth(){return new w(this._year,this._month,1)}get lastDayOfMonth(){return new w(this._year,this._month,N(this._month,this._year))}add(t,r,e){function n(t,r,e){let n=t,i=r;for(;i--;)n=n[e];return n}const{abs:i}=Math,o=i(t),s=i(e),a=i(r),u=e<0?"prevDay":"nextDay",c=r<0?"prevMonth":"nextMonth";return n(n(n(this,o,t<0?"prevYear":"nextYear"),a,c),s,u)}isBefore(t){return!(this.isAfter(t)||this.equals(t))}isAfter(t){const r=this._year,e=t.year,n=this._month,i=t.month;return r>e||r===e&&n>i||r===e&&n===i&&this._date>t.date}equals(t){return this._year===t.year&&this._month===t.month&&this._date===t.date}toString(t="mm/dd/yyyy"){const r=/y{3,}/i.test(t)?this._year:this.shortYear,e=this._month,n=this._date,i=/m{2}/i.test(t)&&e<10?"0{1}":"{1}",o=/d{2}/i.test(t)&&n<10?"0{2}":"{2}";return d(t.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,o),r,e,n)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(t){return p.isString(t)||p.isNumber(t)||p.isDate(t)?!isNaN(new Date(t).valueOf()):t instanceof w}static parse(t){if(t instanceof w)return t;let r=p.isString(t)?g(t).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):t;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)){const t=r.split("-"),[e]=t;t.push(e),t.shift(),r=t.join("/")}const e=new Date(r);if(!p.exists(r)||Number.isNaN(e.valueOf()))throw new Error(d("Cannot parse value= {0}",r));return new w(e.getFullYear(),e.getMonth()+1,e.getDate())}static tryParse(t){return _((()=>w.parse(t)),null)}static assumeNow(t){b=w.parse(t)}static get today(){return b||w.parse(new Date)}}function N(t,r){return 2===t?x(r)?29:28:t<8&&p.isEven(t)||t>7&&p.isOdd(t)?30:31}function x(t){const r=t.toString().split(/\B/);return parseFloat(y(r[r.length-2],r[r.length-1]))%4==0}function F(t,r,e,n){const i=t.month,o=t.year,s=t.date,a=e,u=n;let c=s+r,l=i+a,h=o+u;if(s+r>N(i,o)&&(c=1,l=i+a+1),s+r<1){const r=t.prevMonth;c=N(r.month,r.year),l=i+a-1}return l>12&&(l=1,h=o+u+1),l<1&&(l=12,h=o+u-1),new w(h,l,c)}function A(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function E(t,r=0){return A(t+5*Math.pow(10,r-1),r)}function S(t,r=0){return 0===t?0:A(t-5*Math.pow(10,r-1),r)}function O(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function j(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function L(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function $(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:A,roundUp:E,roundDown:S,roundTowardZero:function(t,r=0){return t<0?E(t,r):S(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:O,fib2:j,fibArray:function(t){return Array(t).fill(0).map((()=>O(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>j(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}});var z=Object.freeze({__proto__:null,uid:L,uuid:$,suid:function(){return Symbol(L())},suuid:function(){return Symbol($())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i}),z.uid(),w.today.nextYear.toDate();const M=t=>new window.FormData(t),k=t=>{const r={};try{M(t).forEach(((t,e)=>{const n=r[e];p.isArray(n)?r[e].push(t):p.exists(n)?r[e]=[r[e],t]:r[e]=t}))}catch(e){[...t.elements].forEach((t=>{const{name:e,type:n,value:i,files:o}=t;if("file"===n)r[e]=o[0];else if("checkbox"===n||"radio"===n)t.checked&&(r[e]=i);else if(t.multiple){const n=[];t.querySelectorAll("option").forEach((t=>t.selected&&n.push(t.value))),r[e]=n.length<2?n[0]:n}else r[e]=i}))}return r};var D=k,P=M;exports.wireForm=function(r,i){if(r&&r.value&&!r.value.__ku4wired__)try{var o=r.value,s=o.submit;o.submit=e(t().mark((function e(){var a,u,c;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=D(r.value),u=P(r.value),t.next=4,i(a,u,o);case 4:c=t.sent,n.isFalse(c)||s.call(r.value);case 6:case"end":return t.stop()}}),e)}))),o.__ku4wired__=!0}catch(t){throw new Error("wireForm Error. See https://kodmunki.com/storybook/?path=/docs/form-ku4-form--basic for more information.")}};
3
+ t=function(){return r};var r={},e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function c(t,r,e,n){var i=r&&r.prototype instanceof f?r:f,o=Object.create(i.prototype),s=new F(n||[]);return o._invoke=function(t,r,e){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return E()}for(e.method=i,e.arg=o;;){var s=e.delegate;if(s){var a=w(s,e);if(a){if(a===h)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=l(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,s),o}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=c;var h={};function f(){}function p(){}function d(){}var y={};u(y,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(A([])));m&&m!==e&&n.call(m,o)&&(y=m);var v=d.prototype=f.prototype=Object.create(y);function _(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function b(t,r){function e(i,o,s,a){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&n.call(h,"__await")?r.resolve(h.__await).then((function(t){e("next",t,s,a)}),(function(t){e("throw",t,s,a)})):r.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return e("throw",t,s,a)}))}a(u.arg)}var i;this._invoke=function(t,n){function o(){return new r((function(r,i){e(t,n,r,i)}))}return i=i?i.then(o,o):o()}}function w(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,w(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=l(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var i=n.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function N(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function x(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function A(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,i=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=d,u(v,"constructor",d),u(d,"constructor",p),p.displayName=u(d,a,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===p||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},r.awrap=function(t){return{__await:t}},_(b.prototype),u(b.prototype,s,(function(){return this})),r.AsyncIterator=b,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var s=new b(c(t,e,n,i),o);return r.isGeneratorFunction(e)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(v),u(v,a,"Generator"),u(v,o,(function(){return this})),u(v,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=[];for(var e in t)r.push(e);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}},r.values=A,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return s.type="throw",s.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=r,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),x(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var i=n.arg;x(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:A(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},r}function r(t,r,e,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?r(u):Promise.resolve(u).then(n,i)}function e(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var s=t.apply(e,n);function a(t){r(s,i,o,a,u,"next",t)}function u(t){r(s,i,o,a,u,"throw",t)}a(void 0)}))}}Object.defineProperty(exports,"__esModule",{value:!0});class n{static isNull(t){return null===t}static isEmpty(t){return n.isString(t)&&""===t||n.isArray(t)&&t.length<1||n.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(n.isUndefined(t)||n.isNull(t))}static isNullOrEmpty(t){return!n.exists(t)||n.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return n.isBool(t)&&!0===t}static isFalse(t){return n.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||n.isFunction(t)&&/^async/.test(t.toString())||n.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return n.exists(t)&&"object"==typeof t&&!(n.isBool(t)||n.isNumber(t)||n.isDate(t)||n.isArray(t)||n.isString(t)||n.isFunction(t))}static isObjectLiteral(t){return n.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!n.isFalsy(t)}static isFalsy(t){return n.isZero(t)||n.isFalse(t)||n.isNullOrEmpty(t)||isNaN(t)}}function i(t){return n.exists(t)&&n.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function o(t){return n.exists(t)&&n.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function s(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function a(t,r=0){return s(t+5*Math.pow(10,r-1),r)}function u(t,r=0){return 0===t?0:s(t-5*Math.pow(10,r-1),r)}function c(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function l(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function h(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function f(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(t,r=0){if(!n.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:function(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return i(o(t))},trimStart:i,trimEnd:o,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){const i=t.toString().split(""),o=new RegExp(e);return n.isFunction(r)?r(t):n.isString(r)&&r.split("").reduce(((e,n)=>i.length>0&&(o.test(n)||i[0]===n&&t.indexOf(i[0])===r.indexOf(n))?e+i.shift():e+n),"")},unmask:function(t,r,e="_"){const i=new RegExp(e);return n.isFunction(r)?r(t):n.isString(r)&&t.split("").reduce(((t,e,n)=>i.test(e)||!i.test(r.charAt(n))&&r.charAt(n)===e?t:t+e),"")}}),Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:s,roundUp:a,roundDown:u,roundTowardZero:function(t,r=0){return t<0?a(t,r):u(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:c,fib2:l,fibArray:function(t){return Array(t).fill(0).map((()=>c(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>l(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}}),Object.freeze({__proto__:null,uid:h,uuid:f,suid:function(){return Symbol(h())},suuid:function(){return Symbol(f())}}),Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class p{static isNull(t){return null===t}static isEmpty(t){return p.isString(t)&&""===t||p.isArray(t)&&t.length<1||p.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(p.isUndefined(t)||p.isNull(t))}static isNullOrEmpty(t){return!p.exists(t)||p.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return p.isBool(t)&&!0===t}static isFalse(t){return p.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||p.isFunction(t)&&/^async/.test(t.toString())||p.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return p.exists(t)&&"object"==typeof t&&!(p.isBool(t)||p.isNumber(t)||p.isDate(t)||p.isArray(t)||p.isString(t)||p.isFunction(t))}static isObjectLiteral(t){return p.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!p.isFalsy(t)}static isFalsy(t){return p.isZero(t)||p.isFalse(t)||p.isNullOrEmpty(t)||isNaN(t)}}function d(...t){return"".concat(...t)}function y(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)}function g(t){return m(v(t))}function m(t){return p.exists(t)&&p.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function v(t){return p.exists(t)&&p.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function _(t,r){try{return t()}catch{return r}}let b;Object.freeze({__proto__:null,build:d,chunk:function(t,r=0){if(!p.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:y,trim:g,trimStart:m,trimEnd:v,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){return p.isFunction(r)?r(t):p.isString(r)&&t.split("").reduce(((t,r)=>t.replace(new RegExp(e),r)),r)},unmask:function(t,r,e="_"){const n=new RegExp(e);return p.isFunction(r)?r(t):p.isString(r)&&t.split("").reduce(((t,e,i)=>!n.test(e)&&n.test(r.charAt(i))?t+e:t),"")}}),_.async=async(t,r)=>{try{return await t()}catch{return r}};class w{constructor(t,r,e){if(r<1||r>12)throw new Error("Invalid month at Assert.DayPoint");if(e<1||e>N(r,t))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(t,r-1,e):new Date,this._day=this._value.getDay(),this._date=e,this._month=r,this._year=t}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const t=this._year.toString();return parseInt(t.substr(t.length-2))}get isWeekday(){const t=this._day;return t>0&&t<6}get isWeekend(){return!this.isWeekday}get isLeapYear(){return x(this._year)}get nextDay(){return F(this,1,0,0)}get prevDay(){return F(this,-1,0,0)}get nextMonth(){return F(this,0,1,0)}get prevMonth(){return F(this,0,-1,0)}get nextYear(){return F(this,0,0,1)}get prevYear(){return F(this,0,0,-1)}get firstDayOfMonth(){return new w(this._year,this._month,1)}get lastDayOfMonth(){return new w(this._year,this._month,N(this._month,this._year))}add(t,r,e){function n(t,r,e){let n=t,i=r;for(;i--;)n=n[e];return n}const{abs:i}=Math,o=i(t),s=i(e),a=i(r),u=e<0?"prevDay":"nextDay",c=r<0?"prevMonth":"nextMonth";return n(n(n(this,o,t<0?"prevYear":"nextYear"),a,c),s,u)}isBefore(t){return!(this.isAfter(t)||this.equals(t))}isAfter(t){const r=this._year,e=t.year,n=this._month,i=t.month;return r>e||r===e&&n>i||r===e&&n===i&&this._date>t.date}equals(t){return this._year===t.year&&this._month===t.month&&this._date===t.date}toString(t="mm/dd/yyyy"){const r=/y{3,}/i.test(t)?this._year:this.shortYear,e=this._month,n=this._date,i=/m{2}/i.test(t)&&e<10?"0{1}":"{1}",o=/d{2}/i.test(t)&&n<10?"0{2}":"{2}";return y(t.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,o),r,e,n)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(t){return p.isString(t)||p.isNumber(t)||p.isDate(t)?!isNaN(new Date(t).valueOf()):t instanceof w}static parse(t){if(t instanceof w)return t;let r=p.isString(t)?g(t).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):t;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)){const t=r.split("-"),[e]=t;t.push(e),t.shift(),r=t.join("/")}const e=new Date(r);if(!p.exists(r)||Number.isNaN(e.valueOf()))throw new Error(y("Cannot parse value= {0}",r));return new w(e.getFullYear(),e.getMonth()+1,e.getDate())}static tryParse(t){return _((()=>w.parse(t)),null)}static assumeNow(t){b=w.parse(t)}static get today(){return b||w.parse(new Date)}}function N(t,r){return 2===t?x(r)?29:28:t<8&&p.isEven(t)||t>7&&p.isOdd(t)?30:31}function x(t){const r=t.toString().split(/\B/);return parseFloat(d(r[r.length-2],r[r.length-1]))%4==0}function F(t,r,e,n){const i=t.month,o=t.year,s=t.date,a=e,u=n;let c=s+r,l=i+a,h=o+u;if(s+r>N(i,o)&&(c=1,l=i+a+1),s+r<1){const r=t.prevMonth;c=N(r.month,r.year),l=i+a-1}return l>12&&(l=1,h=o+u+1),l<1&&(l=12,h=o+u-1),new w(h,l,c)}function A(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function E(t,r=0){return A(t+5*Math.pow(10,r-1),r)}function S(t,r=0){return 0===t?0:A(t-5*Math.pow(10,r-1),r)}function O(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function j(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function L(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function $(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:A,roundUp:E,roundDown:S,roundTowardZero:function(t,r=0){return t<0?E(t,r):S(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:O,fib2:j,fibArray:function(t){return Array(t).fill(0).map((()=>O(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>j(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}});var z=Object.freeze({__proto__:null,uid:L,uuid:$,suid:function(){return Symbol(L())},suuid:function(){return Symbol($())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i}),z.uid(),w.today.nextYear.toDate();const M=t=>new window.FormData(t),k=t=>{const r={};try{M(t).forEach(((t,e)=>{const n=r[e];p.isArray(n)?r[e].push(t):p.exists(n)?r[e]=[r[e],t]:r[e]=t}))}catch(e){[...t.elements].forEach((t=>{const{name:e,type:n,value:i,files:o}=t;if("file"===n)r[e]=o[0];else if("checkbox"===n||"radio"===n)t.checked&&(r[e]=i);else if(t.multiple){const n=[];t.querySelectorAll("option").forEach((t=>t.selected&&n.push(t.value))),r[e]=n.length<2?n[0]:n}else r[e]=i}))}return r};var D=k,P=M;exports.wireForm=function(r,i){if(r&&r.value&&!r.value.__ku4wired__)try{var o=r.value,s=o.submit;o.submit=e(t().mark((function e(){var a,u,c;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=D(r.value),u=P(r.value),t.next=4,i(a,u,o);case 4:c=t.sent,n.isFalse(c)||s.call(r.value);case 6:case"end":return t.stop()}}),e)}))),o.__ku4wired__=!0}catch(t){throw new Error("wireForm Error. See https://kodmunki.com/storybook/?path=/docs/form-ku4-form--basic for more information.")}};
package/vue3/index.mjs CHANGED
@@ -1 +1 @@
1
- class t{static isNull(t){return null===t}static isEmpty(r){return t.isString(r)&&""===r||t.isArray(r)&&r.length<1||t.isObjectLiteral(r)&&Object.keys(r).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(r){return!(t.isUndefined(r)||t.isNull(r))}static isNullOrEmpty(r){return!t.exists(r)||t.isEmpty(r)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(r){return t.isBool(r)&&!0===r}static isFalse(r){return t.isBool(r)&&!1===r}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(r){try{return"AsyncFunction"===Object.getPrototypeOf(r).constructor.name||t.isFunction(r)&&/^async/.test(r.toString())||t.isFunction(r().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(r){return t.exists(r)&&"object"==typeof r&&!(t.isBool(r)||t.isNumber(r)||t.isDate(r)||t.isArray(r)||t.isString(r)||t.isFunction(r))}static isObjectLiteral(r){return t.isObject(r)&&r.constructor==={}.constructor}static isTruthy(r){return!t.isFalsy(r)}static isFalsy(r){return t.isZero(r)||t.isFalse(r)||t.isNullOrEmpty(r)||isNaN(r)}}function r(r){return t.exists(r)&&t.isFunction(r.replace)?r.replace(/^[\s\n]*/,""):r}function e(r){return t.exists(r)&&t.isFunction(r.replace)?r.replace(/[\s\n]*$/,""):r}function n(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function i(t,r=0){return n(t+5*Math.pow(10,r-1),r)}function s(t,r=0){return 0===t?0:n(t-5*Math.pow(10,r-1),r)}function a(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function u(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function o(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function c(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(r,e=0){if(!t.isString(r)||Number.isNaN(e)||e<0)return[];if(e<r.length){let t=0;const n=e||r.length,i=[];for(;t<r.length;)i.push(r.slice(t,t+n)),t+=n;return i}return[r]},format:function(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return r(e(t))},trimStart:r,trimEnd:e,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(r,e,n="_"){return t.isFunction(e)?e(r):t.isString(e)&&r.split("").reduce(((t,r)=>t.replace(new RegExp(n),r)),e)},unmask:function(r,e,n="_"){const i=new RegExp(n);return t.isFunction(e)?e(r):t.isString(e)&&r.split("").reduce(((t,r,n)=>!i.test(r)&&i.test(e.charAt(n))?t+r:t),"")}}),Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:n,roundUp:i,roundDown:s,roundTowardZero:function(t,r=0){return t<0?i(t,r):s(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:a,fib2:u,fibArray:function(t){return Array(t).fill(0).map((()=>a(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>u(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}}),Object.freeze({__proto__:null,uid:o,uuid:c,suid:function(){return Symbol(o())},suuid:function(){return Symbol(c())}}),Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class l{static isNull(t){return null===t}static isEmpty(t){return l.isString(t)&&""===t||l.isArray(t)&&t.length<1||l.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(l.isUndefined(t)||l.isNull(t))}static isNullOrEmpty(t){return!l.exists(t)||l.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return l.isBool(t)&&!0===t}static isFalse(t){return l.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||l.isFunction(t)&&/^async/.test(t.toString())||l.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return l.exists(t)&&"object"==typeof t&&!(l.isBool(t)||l.isNumber(t)||l.isDate(t)||l.isArray(t)||l.isString(t)||l.isFunction(t))}static isObjectLiteral(t){return l.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!l.isFalsy(t)}static isFalsy(t){return l.isZero(t)||l.isFalse(t)||l.isNullOrEmpty(t)||isNaN(t)}}function h(...t){return"".concat(...t)}function f(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)}function p(t){return d(y(t))}function d(t){return l.exists(t)&&l.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function y(t){return l.exists(t)&&l.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function m(t,r){try{return t()}catch{return r}}let g;Object.freeze({__proto__:null,build:h,chunk:function(t,r=0){if(!l.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:f,trim:p,trimStart:d,trimEnd:y,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){return l.isFunction(r)?r(t):l.isString(r)&&t.split("").reduce(((t,r)=>t.replace(new RegExp(e),r)),r)},unmask:function(t,r,e="_"){const n=new RegExp(e);return l.isFunction(r)?r(t):l.isString(r)&&t.split("").reduce(((t,e,i)=>!n.test(e)&&n.test(r.charAt(i))?t+e:t),"")}}),m.async=async(t,r)=>{try{return await t()}catch{return r}};class _{constructor(t,r,e){if(r<1||r>12)throw new Error("Invalid month at Assert.DayPoint");if(e<1||e>b(r,t))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(t,r-1,e):new Date,this._day=this._value.getDay(),this._date=e,this._month=r,this._year=t}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const t=this._year.toString();return parseInt(t.substr(t.length-2))}get isWeekday(){const t=this._day;return t>0&&t<6}get isWeekend(){return!this.isWeekday}get isLeapYear(){return N(this._year)}get nextDay(){return w(this,1,0,0)}get prevDay(){return w(this,-1,0,0)}get nextMonth(){return w(this,0,1,0)}get prevMonth(){return w(this,0,-1,0)}get nextYear(){return w(this,0,0,1)}get prevYear(){return w(this,0,0,-1)}get firstDayOfMonth(){return new _(this._year,this._month,1)}get lastDayOfMonth(){return new _(this._year,this._month,b(this._month,this._year))}add(t,r,e){function n(t,r,e){let n=t,i=r;for(;i--;)n=n[e];return n}const{abs:i}=Math,s=i(t),a=i(e),u=i(r),o=e<0?"prevDay":"nextDay",c=r<0?"prevMonth":"nextMonth";return n(n(n(this,s,t<0?"prevYear":"nextYear"),u,c),a,o)}isBefore(t){return!(this.isAfter(t)||this.equals(t))}isAfter(t){const r=this._year,e=t.year,n=this._month,i=t.month;return r>e||r===e&&n>i||r===e&&n===i&&this._date>t.date}equals(t){return this._year===t.year&&this._month===t.month&&this._date===t.date}toString(t="mm/dd/yyyy"){const r=/y{3,}/i.test(t)?this._year:this.shortYear,e=this._month,n=this._date,i=/m{2}/i.test(t)&&e<10?"0{1}":"{1}",s=/d{2}/i.test(t)&&n<10?"0{2}":"{2}";return f(t.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,s),r,e,n)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(t){return l.isString(t)||l.isNumber(t)||l.isDate(t)?!isNaN(new Date(t).valueOf()):t instanceof _}static parse(t){if(t instanceof _)return t;let r=l.isString(t)?p(t).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):t;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)){const t=r.split("-"),[e]=t;t.push(e),t.shift(),r=t.join("/")}const e=new Date(r);if(!l.exists(r)||Number.isNaN(e.valueOf()))throw new Error(f("Cannot parse value= {0}",r));return new _(e.getFullYear(),e.getMonth()+1,e.getDate())}static tryParse(t){return m((()=>_.parse(t)),null)}static assumeNow(t){g=_.parse(t)}static get today(){return g||_.parse(new Date)}}function b(t,r){return 2===t?N(r)?29:28:t<8&&l.isEven(t)||t>7&&l.isOdd(t)?30:31}function N(t){const r=t.toString().split(/\B/);return parseFloat(h(r[r.length-2],r[r.length-1]))%4==0}function w(t,r,e,n){const i=t.month,s=t.year,a=t.date,u=e,o=n;let c=a+r,l=i+u,h=s+o;if(a+r>b(i,s)&&(c=1,l=i+u+1),a+r<1){const r=t.prevMonth;c=b(r.month,r.year),l=i+u-1}return l>12&&(l=1,h=s+o+1),l<1&&(l=12,h=s+o-1),new _(h,l,c)}function A(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function F(t,r=0){return A(t+5*Math.pow(10,r-1),r)}function S(t,r=0){return 0===t?0:A(t-5*Math.pow(10,r-1),r)}function v(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function $(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function O(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function z(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:A,roundUp:F,roundDown:S,roundTowardZero:function(t,r=0){return t<0?F(t,r):S(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:v,fib2:$,fibArray:function(t){return Array(t).fill(0).map((()=>v(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>$(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}});var x=Object.freeze({__proto__:null,uid:O,uuid:z,suid:function(){return Symbol(O())},suuid:function(){return Symbol(z())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i}),x.uid(),_.today.nextYear.toDate();const E=t=>new window.FormData(t),M=t=>{const r={};try{E(t).forEach(((t,e)=>{const n=r[e];l.isArray(n)?r[e].push(t):l.exists(n)?r[e]=[r[e],t]:r[e]=t}))}catch(e){[...t.elements].forEach((t=>{const{name:e,type:n,value:i,files:s}=t;if("file"===n)r[e]=s[0];else if("checkbox"===n||"radio"===n)t.checked&&(r[e]=i);else if(t.multiple){const n=[];t.querySelectorAll("option").forEach((t=>t.selected&&n.push(t.value))),r[e]=n.length<2?n[0]:n}else r[e]=i}))}return r};var D=M,j=E;const k=(r,e)=>{if(r&&r.value&&!r.value.__ku4wired__)try{const n=r.value,{submit:i}=n;n.submit=async()=>{const s=D(r.value),a=j(r.value),u=await e(s,a,n);t.isFalse(u)||i.call(r.value)},n.__ku4wired__=!0}catch(t){throw new Error("wireForm Error. See https://kodmunki.com/storybook/?path=/docs/form-ku4-form--basic for more information.")}};export{k as wireForm};
1
+ class t{static isNull(t){return null===t}static isEmpty(r){return t.isString(r)&&""===r||t.isArray(r)&&r.length<1||t.isObjectLiteral(r)&&Object.keys(r).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(r){return!(t.isUndefined(r)||t.isNull(r))}static isNullOrEmpty(r){return!t.exists(r)||t.isEmpty(r)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(r){return t.isBool(r)&&!0===r}static isFalse(r){return t.isBool(r)&&!1===r}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(r){try{return"AsyncFunction"===Object.getPrototypeOf(r).constructor.name||t.isFunction(r)&&/^async/.test(r.toString())||t.isFunction(r().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(r){return t.exists(r)&&"object"==typeof r&&!(t.isBool(r)||t.isNumber(r)||t.isDate(r)||t.isArray(r)||t.isString(r)||t.isFunction(r))}static isObjectLiteral(r){return t.isObject(r)&&r.constructor==={}.constructor}static isTruthy(r){return!t.isFalsy(r)}static isFalsy(r){return t.isZero(r)||t.isFalse(r)||t.isNullOrEmpty(r)||isNaN(r)}}function r(r){return t.exists(r)&&t.isFunction(r.replace)?r.replace(/^[\s\n]*/,""):r}function e(r){return t.exists(r)&&t.isFunction(r.replace)?r.replace(/[\s\n]*$/,""):r}function n(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function i(t,r=0){return n(t+5*Math.pow(10,r-1),r)}function s(t,r=0){return 0===t?0:n(t-5*Math.pow(10,r-1),r)}function a(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function u(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function o(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function c(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(r,e=0){if(!t.isString(r)||Number.isNaN(e)||e<0)return[];if(e<r.length){let t=0;const n=e||r.length,i=[];for(;t<r.length;)i.push(r.slice(t,t+n)),t+=n;return i}return[r]},format:function(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return r(e(t))},trimStart:r,trimEnd:e,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(r,e,n="_"){const i=r.toString().split(""),s=new RegExp(n);return t.isFunction(e)?e(r):t.isString(e)&&e.split("").reduce(((t,n)=>i.length>0&&(s.test(n)||i[0]===n&&r.indexOf(i[0])===e.indexOf(n))?t+i.shift():t+n),"")},unmask:function(r,e,n="_"){const i=new RegExp(n);return t.isFunction(e)?e(r):t.isString(e)&&r.split("").reduce(((t,r,n)=>i.test(r)||!i.test(e.charAt(n))&&e.charAt(n)===r?t:t+r),"")}}),Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:n,roundUp:i,roundDown:s,roundTowardZero:function(t,r=0){return t<0?i(t,r):s(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:a,fib2:u,fibArray:function(t){return Array(t).fill(0).map((()=>a(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>u(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}}),Object.freeze({__proto__:null,uid:o,uuid:c,suid:function(){return Symbol(o())},suuid:function(){return Symbol(c())}}),Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});class l{static isNull(t){return null===t}static isEmpty(t){return l.isString(t)&&""===t||l.isArray(t)&&t.length<1||l.isObjectLiteral(t)&&Object.keys(t).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(t){return!(l.isUndefined(t)||l.isNull(t))}static isNullOrEmpty(t){return!l.exists(t)||l.isEmpty(t)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(t){return l.isBool(t)&&!0===t}static isFalse(t){return l.isBool(t)&&!1===t}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(t){try{return"AsyncFunction"===Object.getPrototypeOf(t).constructor.name||l.isFunction(t)&&/^async/.test(t.toString())||l.isFunction(t().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(t){return l.exists(t)&&"object"==typeof t&&!(l.isBool(t)||l.isNumber(t)||l.isDate(t)||l.isArray(t)||l.isString(t)||l.isFunction(t))}static isObjectLiteral(t){return l.isObject(t)&&t.constructor==={}.constructor}static isTruthy(t){return!l.isFalsy(t)}static isFalsy(t){return l.isZero(t)||l.isFalse(t)||l.isNullOrEmpty(t)||isNaN(t)}}function h(...t){return"".concat(...t)}function f(t,...r){return r.reduce(((t,r,e)=>t.replace(new RegExp(`\\{${e}\\}`,"g"),r&&r.toString?r.toString():r)),t)}function p(t){return d(y(t))}function d(t){return l.exists(t)&&l.isFunction(t.replace)?t.replace(/^[\s\n]*/,""):t}function y(t){return l.exists(t)&&l.isFunction(t.replace)?t.replace(/[\s\n]*$/,""):t}function m(t,r){try{return t()}catch{return r}}let g;Object.freeze({__proto__:null,build:h,chunk:function(t,r=0){if(!l.isString(t)||Number.isNaN(r)||r<0)return[];if(r<t.length){let e=0;const n=r||t.length,i=[];for(;e<t.length;)i.push(t.slice(e,e+n)),e+=n;return i}return[t]},format:f,trim:p,trimStart:d,trimEnd:y,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(t,r,e="_"){return l.isFunction(r)?r(t):l.isString(r)&&t.split("").reduce(((t,r)=>t.replace(new RegExp(e),r)),r)},unmask:function(t,r,e="_"){const n=new RegExp(e);return l.isFunction(r)?r(t):l.isString(r)&&t.split("").reduce(((t,e,i)=>!n.test(e)&&n.test(r.charAt(i))?t+e:t),"")}}),m.async=async(t,r)=>{try{return await t()}catch{return r}};class _{constructor(t,r,e){if(r<1||r>12)throw new Error("Invalid month at Assert.DayPoint");if(e<1||e>b(r,t))throw new Error("Invalid date at DayPoint");this._value=arguments.length>=3?new Date(t,r-1,e):new Date,this._day=this._value.getDay(),this._date=e,this._month=r,this._year=t}get value(){return this._value}get day(){return this._day}get date(){return this._date}get month(){return this._month}get year(){return this._year}get shortYear(){const t=this._year.toString();return parseInt(t.substr(t.length-2))}get isWeekday(){const t=this._day;return t>0&&t<6}get isWeekend(){return!this.isWeekday}get isLeapYear(){return N(this._year)}get nextDay(){return w(this,1,0,0)}get prevDay(){return w(this,-1,0,0)}get nextMonth(){return w(this,0,1,0)}get prevMonth(){return w(this,0,-1,0)}get nextYear(){return w(this,0,0,1)}get prevYear(){return w(this,0,0,-1)}get firstDayOfMonth(){return new _(this._year,this._month,1)}get lastDayOfMonth(){return new _(this._year,this._month,b(this._month,this._year))}add(t,r,e){function n(t,r,e){let n=t,i=r;for(;i--;)n=n[e];return n}const{abs:i}=Math,s=i(t),a=i(e),u=i(r),o=e<0?"prevDay":"nextDay",c=r<0?"prevMonth":"nextMonth";return n(n(n(this,s,t<0?"prevYear":"nextYear"),u,c),a,o)}isBefore(t){return!(this.isAfter(t)||this.equals(t))}isAfter(t){const r=this._year,e=t.year,n=this._month,i=t.month;return r>e||r===e&&n>i||r===e&&n===i&&this._date>t.date}equals(t){return this._year===t.year&&this._month===t.month&&this._date===t.date}toString(t="mm/dd/yyyy"){const r=/y{3,}/i.test(t)?this._year:this.shortYear,e=this._month,n=this._date,i=/m{2}/i.test(t)&&e<10?"0{1}":"{1}",s=/d{2}/i.test(t)&&n<10?"0{2}":"{2}";return f(t.replace(/y+/gi,"{0}").replace(/m+/gi,i).replace(/d+/gi,s),r,e,n)}toDate(){return this._value}toJson(){return this._value.toJSON()}static canParse(t){return l.isString(t)||l.isNumber(t)||l.isDate(t)?!isNaN(new Date(t).valueOf()):t instanceof _}static parse(t){if(t instanceof _)return t;let r=l.isString(t)?p(t).replace(/T\d{2}:\d{2}:\d{2}(.\d+)?Z/,""):t;if(/^\d{4}-\d{1,2}-\d{1,2}$/.test(r)){const t=r.split("-"),[e]=t;t.push(e),t.shift(),r=t.join("/")}const e=new Date(r);if(!l.exists(r)||Number.isNaN(e.valueOf()))throw new Error(f("Cannot parse value= {0}",r));return new _(e.getFullYear(),e.getMonth()+1,e.getDate())}static tryParse(t){return m((()=>_.parse(t)),null)}static assumeNow(t){g=_.parse(t)}static get today(){return g||_.parse(new Date)}}function b(t,r){return 2===t?N(r)?29:28:t<8&&l.isEven(t)||t>7&&l.isOdd(t)?30:31}function N(t){const r=t.toString().split(/\B/);return parseFloat(h(r[r.length-2],r[r.length-1]))%4==0}function w(t,r,e,n){const i=t.month,s=t.year,a=t.date,u=e,o=n;let c=a+r,l=i+u,h=s+o;if(a+r>b(i,s)&&(c=1,l=i+u+1),a+r<1){const r=t.prevMonth;c=b(r.month,r.year),l=i+u-1}return l>12&&(l=1,h=s+o+1),l<1&&(l=12,h=s+o-1),new _(h,l,c)}function A(t,r=0){const e=Math.pow(10,-r);return Math.round(parseFloat((t*e).toFixed(Math.abs(r))))/e}function F(t,r=0){return A(t+5*Math.pow(10,r-1),r)}function S(t,r=0){return 0===t?0:A(t-5*Math.pow(10,r-1),r)}function v(t){const r=(t,e=0,n=1)=>0<t?r(--t,n,e+n):e;return r(t)}function O(t){let r=0,e=1,n=0;for(;t>1;)n=r,r=e,e+=n,t--;return t<1?r:e}function $(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,e=Math.random().toString().substring(2),n=Math.random().toString().substring(2);return e.concat(n).substring(0,r)}function z(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:A,roundUp:F,roundDown:S,roundTowardZero:function(t,r=0){return t<0?F(t,r):S(t,r)},gcd:function t(r,e){return 0===e?Math.abs(r):t(e,r%e)},fib:v,fib2:O,fibArray:function(t){return Array(t).fill(0).map((()=>v(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>O(--t))).reverse()},tryParseInt:function(t,r=0){const e=parseInt(t);return Number.isNaN(e)?r:e},tryParseFloat:function(t,r=0){const e=parseFloat(t);return Number.isNaN(e)?r:e}});var x=Object.freeze({__proto__:null,uid:$,uuid:z,suid:function(){return Symbol($())},suuid:function(){return Symbol(z())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i}),x.uid(),_.today.nextYear.toDate();const E=t=>new window.FormData(t),M=t=>{const r={};try{E(t).forEach(((t,e)=>{const n=r[e];l.isArray(n)?r[e].push(t):l.exists(n)?r[e]=[r[e],t]:r[e]=t}))}catch(e){[...t.elements].forEach((t=>{const{name:e,type:n,value:i,files:s}=t;if("file"===n)r[e]=s[0];else if("checkbox"===n||"radio"===n)t.checked&&(r[e]=i);else if(t.multiple){const n=[];t.querySelectorAll("option").forEach((t=>t.selected&&n.push(t.value))),r[e]=n.length<2?n[0]:n}else r[e]=i}))}return r};var D=M,j=E;const k=(r,e)=>{if(r&&r.value&&!r.value.__ku4wired__)try{const n=r.value,{submit:i}=n;n.submit=async()=>{const s=D(r.value),a=j(r.value),u=await e(s,a,n);t.isFalse(u)||i.call(r.value)},n.__ku4wired__=!0}catch(t){throw new Error("wireForm Error. See https://kodmunki.com/storybook/?path=/docs/form-ku4-form--basic for more information.")}};export{k as wireForm};
@@ -1,15 +0,0 @@
1
- 'use strict';
2
-
3
- class t{static isNull(t){return null===t}static isEmpty(e){return t.isString(e)&&""===e||t.isArray(e)&&e.length<1||t.isObjectLiteral(e)&&Object.keys(e).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(e){return !(t.isUndefined(e)||t.isNull(e))}static isNullOrEmpty(e){return !t.exists(e)||t.isEmpty(e)}static isArray(t){return Array.isArray(t)}static isBool(t){return "boolean"==typeof t}static isTrue(e){return t.isBool(e)&&!0===e}static isFalse(e){return t.isBool(e)&&!1===e}static isDate(t){return t instanceof Date}static isNumber(t){return ("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return "string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(e){try{return "AsyncFunction"===Object.getPrototypeOf(e).constructor.name||t.isFunction(e)&&/^async/.test(e.toString())||t.isFunction(e().then)}catch(t){return !1}}static isPromise(t){return t instanceof Promise}static isObject(e){return t.exists(e)&&"object"==typeof e&&!(t.isBool(e)||t.isNumber(e)||t.isDate(e)||t.isArray(e)||t.isString(e)||t.isFunction(e))}static isObjectLiteral(e){return t.isObject(e)&&e.constructor==={}.constructor}static isTruthy(e){return !t.isFalsy(e)}static isFalsy(e){return t.isZero(e)||t.isFalse(e)||t.isNullOrEmpty(e)||isNaN(e)}}function e(...t){return "".concat(...t)}function r(t,...e){return e.reduce(((t,e,r)=>t.replace(new RegExp(`\\{${r}\\}`,"g"),e&&e.toString?e.toString():e)),t)}function i(t){return s(n(t))}function s(e){return t.exists(e)&&t.isFunction(e.replace)?e.replace(/^[\s\n]*/,""):e}function n(e){return t.exists(e)&&t.isFunction(e.replace)?e.replace(/[\s\n]*$/,""):e}var a=Object.freeze({__proto__:null,build:e,chunk:function(e,r=0){if(!t.isString(e)||Number.isNaN(r)||r<0)return [];if(r<e.length){let t=0;const i=r||e.length,s=[];for(;t<e.length;)s.push(e.slice(t,t+i)),t+=i;return s}return [e]},format:r,trim:i,trimStart:s,trimEnd:n,capitalize:function(t=""){return (t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(e,r,i="_"){return t.isFunction(r)?r(e):t.isString(r)&&e.split("").reduce(((t,e)=>t.replace(new RegExp(i),e)),r)},unmask:function(e,r,i="_"){const s=new RegExp(i);return t.isFunction(r)?r(e):t.isString(r)&&e.split("").reduce(((t,e,i)=>!s.test(e)&&s.test(r.charAt(i))?t+e:t),"")}});var o=t=>t.reduce(((t,e)=>(t.includes(e)||t.push(e),t)),[]);class c{_list;_head;constructor(t){this._list=t,this._head=0;}get isEmpty(){return this.length<1}get index(){return this._head}get length(){return this._list.length}get current(){return this._list[this._head]}get next(){const{length:t}=this;let e=this._head;return this._head=e++<t-1?e:0,this.current}get prev(){const{length:t}=this;let e=this._head;return this._head=--e<0?t-1:e,this.current}get peekNext(){const{length:t}=this,e=this._head;return this._list[e+1<t?e+1:0]}get peekPrev(){const{length:t}=this,e=this._head;return this._list[e-1<0?t-1:e-1]}}function h(t,e){try{return t()}catch{return e}}h.async=async(t,e)=>{try{return await t()}catch{return e}};function m(t,e=0){const r=Math.pow(10,-e);return Math.round(parseFloat((t*r).toFixed(Math.abs(e))))/r}function g(t,e=0){return m(t+5*Math.pow(10,e-1),e)}function _(t,e=0){if(0===t)return 0;return m(t-5*Math.pow(10,e-1),e)}function w(t,e=0){return t<0?g(t,e):_(t,e)}function x(t){const e=(t,r=0,i=1)=>0<t?e(--t,i,r+i):r;return e(t)}function v(t){let e=0,r=1,i=0;for(;t>1;)i=e,e=r,r+=i,t--;return t<1?e:r}function b(t,e=0){const r=parseInt(t);return Number.isNaN(r)?e:r}Object.freeze({__proto__:null,random:function(t=0,e=1){return Math.random()*(e-t)+t},round:m,roundUp:g,roundDown:_,roundTowardZero:w,gcd:function t(e,r){return 0===r?Math.abs(e):t(r,e%r)},fib:x,fib2:v,fibArray:function(t){return Array(t).fill(0).map((()=>x(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>v(--t))).reverse()},tryParseInt:b,tryParseFloat:function(t,e=0){const r=parseFloat(t);return Number.isNaN(r)?e:r}});class ${constructor(e=0,r=0){if(!t.isNumber(e)||!t.isNumber(r))throw new Error("Coord requires numeric x and y values");this._x=e,this._y=r;}get x(){return this._x}get y(){return this._y}get value(){return {x:this.x,y:this.y}}get half(){return this.divide(new $(2,2))}get abs(){return new $(Math.abs(this.x),Math.abs(this.y))}equals(t){return this.x===t.x&&this.y===t.y}add(t){return new $(this.x+t.x,this.y+t.y)}subtract(t){return new $(this.x-t.x,this.y-t.y)}multiply(t){return new $(this.x*t.x,this.y*t.y)}divide(t){return new $(this.x/t.x,this.y/t.y)}round(t=0){return new $(m(this.x,t),m(this.y,t))}toString(){return `(${this.x},${this.y})`}static canParse(e){return t.isArray(e)?!(Number.isNaN(e[0])||Number.isNaN(e[1])):t.isObjectLiteral(e)&&"x"in e&&"y"in e?!(Number.isNaN(e.x)||Number.isNaN(e.y)):e instanceof $}static parse(e){return t.exists(e)?e instanceof $?e:t.isArray(e)?new $(e[0],e[1]):t.isObjectLiteral(e)&&t.exists(e.x)&&t.exists(e.y)?new $(e.x,e.y):null:null}static tryParse(t){return h((()=>$.parse(t)),null)}}class F extends ${constructor(t=0,e=0){super(t,e),this._lengthSquared=Math.pow(t,2)+Math.pow(e,2),this._magnitude=Math.sqrt(this._lengthSquared),this._unitNormalX=0===t&&0===e?0:t/this._magnitude,this._unitNormalY=0===t&&0===e?0:e/this._magnitude;}get magnitude(){return this._magnitude}get isZero(){return 0===this.x&&0===this.y}get normal(){return new F(this._unitNormalX,this._unitNormalY)}get invert(){return new F(-this.x,-this.y)}get norm(){return new F(Math.abs(this.x),Math.abs(this.y))}get perpendicular(){return new F(-this.y,this.x)}equals(t){return t instanceof F&&this.x===t.x&&this.y===t.y}add(t){return t instanceof F?new F(this.x+t.x,this.y+t.y):null}dot(t){return t instanceof F?this.x*t.x+this.y*t.y:null}perpendicularAtTo(t){if(!(t instanceof F))return null;const e=t.add(this.projectionOfOnto(t).invert);return new F(e.x,e.y)}projectionOfOnto(t){if(!(t instanceof F))return null;const e=t.normal.scale(this.dot(t.normal));return new F(e.x,e.y)}scale(t){return new F(this.x*t,this.y*t)}unitNormalDot(t){return t instanceof F?this.normal.x*t.normal.x+this.normal.y*t.normal.y:null}reflect(t){if(!(t instanceof F))return null;if(t.isZero)return this;const e=t.normal;return this.add(e.scale(2*e.dot(this)).invert)}round(t=0){return new F(m(this.x,t),m(this.y,t))}}class O extends ${constructor(t,e){super(t,e);}isAbove(t){return this.y<t.y}isBelow(t){return this.y>t.y}isLeftOf(t){return this.x<t.x}isRightOf(t){return this.x>t.x}distanceFrom(t){return new F(this.x-t.x,this.y-t.y)}distanceTo(t){return this.distanceFrom(t).invert}static canParse(t){return t instanceof O||$.canParse(t)}static parse(t){if(t instanceof O)return t;const e=$.parse(t);return new O(e.x,e.y)}static tryParse(t){return h((()=>O.parse(t)),null)}}class M{constructor(t=0,e=0,r=0,i=0){this.origin=new O(t,e),this.dimensions=new $(r,i),this.diagonal=O.parse(this.origin.add(this.dimensions)),this.center=this.diagonal.half;}contains(t){return this.origin.isAbove(t)&&this.origin.isLeftOf(t)&&this.diagonal.isRightOf(t)&&this.diagonal.isBelow(t)}aspectToFit(t){const e=this.dimensions,r=t.dimensions,i=r.x,s=r.y;let n=e.x,a=e.y;return n>a&&0!==n?(a*=i/n,n=i,a>s&&(a=s,n*=a/e.y)):a>s&&(n*=s/a,a=s),new M(this.origin.x,this.origin.y,n,a)}}var j=(t,e,r=!1)=>{let i;return (...s)=>{const n=r&&!i;clearTimeout(i),i=setTimeout((()=>{i=null,r||t(...s);}),e),n&&t(...s);}};class L{_milliseconds;_intervalId;_didInterval;constructor(t){this._milliseconds=t;}get isRunning(){return t.exists(this._intervalId)}onInterval(t){return this.clear(),this._didInterval=t,this}start(){return this.clear(),this._intervalId=setInterval((()=>{this._didInterval();}),this._milliseconds),this}clear(){return clearInterval(this._intervalId),this._intervalId=null,this}}class C{_milliseconds;_timeoutId;_didTimeout;constructor(t){this._milliseconds=t;}get isRunning(){return t.exists(this._timeoutId)}onTimeout(t){return this.clear(),this._didTimeout=t,this}start(){return this.clear(),this._timeoutId=setTimeout((()=>{this._didTimeout();}),this._milliseconds),this}clear(){return clearTimeout(this._timeoutId),this._timeoutId=null,this}}var Y=t=>new Promise((e=>setTimeout(e,t)));function k(t){const e=isNaN(parseInt(t))||t<0||t>24?24:t,r=Math.random().toString().substring(2),i=Math.random().toString().substring(2);return r.concat(i).substring(0,e)}function Z(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}var R=Object.freeze({__proto__:null,uid:k,uuid:Z,suid:function(){return Symbol(k())},suuid:function(){return Symbol(Z())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});
4
-
5
- exports.C = C;
6
- exports.L = L;
7
- exports.M = M;
8
- exports.R = R;
9
- exports.Y = Y;
10
- exports.a = a;
11
- exports.c = c;
12
- exports.h = h;
13
- exports.j = j;
14
- exports.o = o;
15
- exports.t = t;
@@ -1,3 +0,0 @@
1
- class t{static isNull(t){return null===t}static isEmpty(e){return t.isString(e)&&""===e||t.isArray(e)&&e.length<1||t.isObjectLiteral(e)&&Object.keys(e).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(e){return !(t.isUndefined(e)||t.isNull(e))}static isNullOrEmpty(e){return !t.exists(e)||t.isEmpty(e)}static isArray(t){return Array.isArray(t)}static isBool(t){return "boolean"==typeof t}static isTrue(e){return t.isBool(e)&&!0===e}static isFalse(e){return t.isBool(e)&&!1===e}static isDate(t){return t instanceof Date}static isNumber(t){return ("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return "string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(e){try{return "AsyncFunction"===Object.getPrototypeOf(e).constructor.name||t.isFunction(e)&&/^async/.test(e.toString())||t.isFunction(e().then)}catch(t){return !1}}static isPromise(t){return t instanceof Promise}static isObject(e){return t.exists(e)&&"object"==typeof e&&!(t.isBool(e)||t.isNumber(e)||t.isDate(e)||t.isArray(e)||t.isString(e)||t.isFunction(e))}static isObjectLiteral(e){return t.isObject(e)&&e.constructor==={}.constructor}static isTruthy(e){return !t.isFalsy(e)}static isFalsy(e){return t.isZero(e)||t.isFalse(e)||t.isNullOrEmpty(e)||isNaN(e)}}function e(...t){return "".concat(...t)}function r(t,...e){return e.reduce(((t,e,r)=>t.replace(new RegExp(`\\{${r}\\}`,"g"),e&&e.toString?e.toString():e)),t)}function i(t){return s(n(t))}function s(e){return t.exists(e)&&t.isFunction(e.replace)?e.replace(/^[\s\n]*/,""):e}function n(e){return t.exists(e)&&t.isFunction(e.replace)?e.replace(/[\s\n]*$/,""):e}var a=Object.freeze({__proto__:null,build:e,chunk:function(e,r=0){if(!t.isString(e)||Number.isNaN(r)||r<0)return [];if(r<e.length){let t=0;const i=r||e.length,s=[];for(;t<e.length;)s.push(e.slice(t,t+i)),t+=i;return s}return [e]},format:r,trim:i,trimStart:s,trimEnd:n,capitalize:function(t=""){return (t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(e,r,i="_"){return t.isFunction(r)?r(e):t.isString(r)&&e.split("").reduce(((t,e)=>t.replace(new RegExp(i),e)),r)},unmask:function(e,r,i="_"){const s=new RegExp(i);return t.isFunction(r)?r(e):t.isString(r)&&e.split("").reduce(((t,e,i)=>!s.test(e)&&s.test(r.charAt(i))?t+e:t),"")}});var o=t=>t.reduce(((t,e)=>(t.includes(e)||t.push(e),t)),[]);class c{_list;_head;constructor(t){this._list=t,this._head=0;}get isEmpty(){return this.length<1}get index(){return this._head}get length(){return this._list.length}get current(){return this._list[this._head]}get next(){const{length:t}=this;let e=this._head;return this._head=e++<t-1?e:0,this.current}get prev(){const{length:t}=this;let e=this._head;return this._head=--e<0?t-1:e,this.current}get peekNext(){const{length:t}=this,e=this._head;return this._list[e+1<t?e+1:0]}get peekPrev(){const{length:t}=this,e=this._head;return this._list[e-1<0?t-1:e-1]}}function h(t,e){try{return t()}catch{return e}}h.async=async(t,e)=>{try{return await t()}catch{return e}};function m(t,e=0){const r=Math.pow(10,-e);return Math.round(parseFloat((t*r).toFixed(Math.abs(e))))/r}function g(t,e=0){return m(t+5*Math.pow(10,e-1),e)}function _(t,e=0){if(0===t)return 0;return m(t-5*Math.pow(10,e-1),e)}function w(t,e=0){return t<0?g(t,e):_(t,e)}function x(t){const e=(t,r=0,i=1)=>0<t?e(--t,i,r+i):r;return e(t)}function v(t){let e=0,r=1,i=0;for(;t>1;)i=e,e=r,r+=i,t--;return t<1?e:r}function b(t,e=0){const r=parseInt(t);return Number.isNaN(r)?e:r}Object.freeze({__proto__:null,random:function(t=0,e=1){return Math.random()*(e-t)+t},round:m,roundUp:g,roundDown:_,roundTowardZero:w,gcd:function t(e,r){return 0===r?Math.abs(e):t(r,e%r)},fib:x,fib2:v,fibArray:function(t){return Array(t).fill(0).map((()=>x(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>v(--t))).reverse()},tryParseInt:b,tryParseFloat:function(t,e=0){const r=parseFloat(t);return Number.isNaN(r)?e:r}});class ${constructor(e=0,r=0){if(!t.isNumber(e)||!t.isNumber(r))throw new Error("Coord requires numeric x and y values");this._x=e,this._y=r;}get x(){return this._x}get y(){return this._y}get value(){return {x:this.x,y:this.y}}get half(){return this.divide(new $(2,2))}get abs(){return new $(Math.abs(this.x),Math.abs(this.y))}equals(t){return this.x===t.x&&this.y===t.y}add(t){return new $(this.x+t.x,this.y+t.y)}subtract(t){return new $(this.x-t.x,this.y-t.y)}multiply(t){return new $(this.x*t.x,this.y*t.y)}divide(t){return new $(this.x/t.x,this.y/t.y)}round(t=0){return new $(m(this.x,t),m(this.y,t))}toString(){return `(${this.x},${this.y})`}static canParse(e){return t.isArray(e)?!(Number.isNaN(e[0])||Number.isNaN(e[1])):t.isObjectLiteral(e)&&"x"in e&&"y"in e?!(Number.isNaN(e.x)||Number.isNaN(e.y)):e instanceof $}static parse(e){return t.exists(e)?e instanceof $?e:t.isArray(e)?new $(e[0],e[1]):t.isObjectLiteral(e)&&t.exists(e.x)&&t.exists(e.y)?new $(e.x,e.y):null:null}static tryParse(t){return h((()=>$.parse(t)),null)}}class F extends ${constructor(t=0,e=0){super(t,e),this._lengthSquared=Math.pow(t,2)+Math.pow(e,2),this._magnitude=Math.sqrt(this._lengthSquared),this._unitNormalX=0===t&&0===e?0:t/this._magnitude,this._unitNormalY=0===t&&0===e?0:e/this._magnitude;}get magnitude(){return this._magnitude}get isZero(){return 0===this.x&&0===this.y}get normal(){return new F(this._unitNormalX,this._unitNormalY)}get invert(){return new F(-this.x,-this.y)}get norm(){return new F(Math.abs(this.x),Math.abs(this.y))}get perpendicular(){return new F(-this.y,this.x)}equals(t){return t instanceof F&&this.x===t.x&&this.y===t.y}add(t){return t instanceof F?new F(this.x+t.x,this.y+t.y):null}dot(t){return t instanceof F?this.x*t.x+this.y*t.y:null}perpendicularAtTo(t){if(!(t instanceof F))return null;const e=t.add(this.projectionOfOnto(t).invert);return new F(e.x,e.y)}projectionOfOnto(t){if(!(t instanceof F))return null;const e=t.normal.scale(this.dot(t.normal));return new F(e.x,e.y)}scale(t){return new F(this.x*t,this.y*t)}unitNormalDot(t){return t instanceof F?this.normal.x*t.normal.x+this.normal.y*t.normal.y:null}reflect(t){if(!(t instanceof F))return null;if(t.isZero)return this;const e=t.normal;return this.add(e.scale(2*e.dot(this)).invert)}round(t=0){return new F(m(this.x,t),m(this.y,t))}}class O extends ${constructor(t,e){super(t,e);}isAbove(t){return this.y<t.y}isBelow(t){return this.y>t.y}isLeftOf(t){return this.x<t.x}isRightOf(t){return this.x>t.x}distanceFrom(t){return new F(this.x-t.x,this.y-t.y)}distanceTo(t){return this.distanceFrom(t).invert}static canParse(t){return t instanceof O||$.canParse(t)}static parse(t){if(t instanceof O)return t;const e=$.parse(t);return new O(e.x,e.y)}static tryParse(t){return h((()=>O.parse(t)),null)}}class M{constructor(t=0,e=0,r=0,i=0){this.origin=new O(t,e),this.dimensions=new $(r,i),this.diagonal=O.parse(this.origin.add(this.dimensions)),this.center=this.diagonal.half;}contains(t){return this.origin.isAbove(t)&&this.origin.isLeftOf(t)&&this.diagonal.isRightOf(t)&&this.diagonal.isBelow(t)}aspectToFit(t){const e=this.dimensions,r=t.dimensions,i=r.x,s=r.y;let n=e.x,a=e.y;return n>a&&0!==n?(a*=i/n,n=i,a>s&&(a=s,n*=a/e.y)):a>s&&(n*=s/a,a=s),new M(this.origin.x,this.origin.y,n,a)}}var j=(t,e,r=!1)=>{let i;return (...s)=>{const n=r&&!i;clearTimeout(i),i=setTimeout((()=>{i=null,r||t(...s);}),e),n&&t(...s);}};class L{_milliseconds;_intervalId;_didInterval;constructor(t){this._milliseconds=t;}get isRunning(){return t.exists(this._intervalId)}onInterval(t){return this.clear(),this._didInterval=t,this}start(){return this.clear(),this._intervalId=setInterval((()=>{this._didInterval();}),this._milliseconds),this}clear(){return clearInterval(this._intervalId),this._intervalId=null,this}}class C{_milliseconds;_timeoutId;_didTimeout;constructor(t){this._milliseconds=t;}get isRunning(){return t.exists(this._timeoutId)}onTimeout(t){return this.clear(),this._didTimeout=t,this}start(){return this.clear(),this._timeoutId=setTimeout((()=>{this._didTimeout();}),this._milliseconds),this}clear(){return clearTimeout(this._timeoutId),this._timeoutId=null,this}}var Y=t=>new Promise((e=>setTimeout(e,t)));function k(t){const e=isNaN(parseInt(t))||t<0||t>24?24:t,r=Math.random().toString().substring(2),i=Math.random().toString().substring(2);return r.concat(i).substring(0,e)}function Z(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}var R=Object.freeze({__proto__:null,uid:k,uuid:Z,suid:function(){return Symbol(k())},suuid:function(){return Symbol(Z())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});
2
-
3
- export { C, L, M, R, Y, a, c, h, j, o, t };
@@ -1 +0,0 @@
1
- var __extends=this&&this.__extends||function(){var t=function(e,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))t[n]=e[n]};return t(e,n)};return function(e,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var __awaiter=this&&this.__awaiter||function(t,n,r,i){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,u){function s(t){try{c(i.next(t))}catch(e){u(e)}}function a(t){try{c(i["throw"](t))}catch(e){u(e)}}function c(t){t.done?r(t.value):o(t.value).then(s,a)}c((i=i.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var r={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},i,o,u,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return c([t,e])}}function c(s){if(i)throw new TypeError("Generator is already executing.");while(r)try{if(i=1,o&&(u=s[0]&2?o["return"]:s[0]?o["throw"]||((u=o["return"])&&u.call(o),0):o.next)&&!(u=u.call(o,s[1])).done)return u;if(o=0,u)s=[s[0]&2,u.value];switch(s[0]){case 0:case 1:u=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(u=r.trys,u=u.length>0&&u[u.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]<u[3])){r.label=s[1];break}if(s[0]===6&&r.label<u[1]){r.label=u[1];u=s;break}if(u&&r.label<u[2]){r.label=u[2];r.ops.push(s);break}if(u[2])r.ops.pop();r.trys.pop();continue}s=n.call(t,r)}catch(e){s=[6,e];o=0}finally{i=u=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var t=function(){function t(){}t.isNull=function(t){return null===t};t.isEmpty=function(e){return t.isString(e)&&""===e||t.isArray(e)&&e.length<1||t.isObjectLiteral(e)&&Object.keys(e).length<1};t.isUndefined=function(t){return void 0===t};t.isZero=function(t){return 0===t};t.exists=function(e){return!(t.isUndefined(e)||t.isNull(e))};t.isNullOrEmpty=function(e){return!t.exists(e)||t.isEmpty(e)};t.isArray=function(t){return Array.isArray(t)};t.isBool=function(t){return"boolean"==typeof t};t.isTrue=function(e){return t.isBool(e)&&!0===e};t.isFalse=function(e){return t.isBool(e)&&!1===e};t.isDate=function(t){return t instanceof Date};t.isNumber=function(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)};t.isEven=function(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0};t.isOdd=function(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)};t.isString=function(t){return"string"==typeof t||t instanceof String};t.isFunction=function(t){return t instanceof Function};t.isAsyncFunction=function(e){try{return"AsyncFunction"===Object.getPrototypeOf(e).constructor.name||t.isFunction(e)&&/^async/.test(e.toString())||t.isFunction(e().then)}catch(t){return!1}};t.isPromise=function(t){return t instanceof Promise};t.isObject=function(e){return t.exists(e)&&"object"==typeof e&&!(t.isBool(e)||t.isNumber(e)||t.isDate(e)||t.isArray(e)||t.isString(e)||t.isFunction(e))};t.isObjectLiteral=function(e){return t.isObject(e)&&e.constructor==={}.constructor};t.isTruthy=function(e){return!t.isFalsy(e)};t.isFalsy=function(e){return t.isZero(e)||t.isFalse(e)||t.isNullOrEmpty(e)||isNaN(e)};return t}();function e(){var t=[];for(var e=0;e<arguments.length;e++){t[e]=arguments[e]}return"".concat.apply("",t)}function r(t){var e=[];for(var n=1;n<arguments.length;n++){e[n-1]=arguments[n]}return e.reduce((function(t,e,n){return t.replace(new RegExp("\\{".concat(n,"\\}"),"g"),e&&e.toString?e.toString():e)}),t)}function i(t){return s(n(t))}function s(e){return t.exists(e)&&t.isFunction(e.replace)?e.replace(/^[\s\n]*/,""):e}function n(e){return t.exists(e)&&t.isFunction(e.replace)?e.replace(/[\s\n]*$/,""):e}var a=Object.freeze({__proto__:null,build:e,chunk:function(e,n){if(n===void 0){n=0}if(!t.isString(e)||Number.isNaN(n)||n<0)return[];if(n<e.length){var r=0;var i=n||e.length,o=[];for(;r<e.length;)o.push(e.slice(r,r+i)),r+=i;return o}return[e]},format:r,trim:i,trimStart:s,trimEnd:n,capitalize:function(t){if(t===void 0){t=""}return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(e,n,r){if(r===void 0){r="_"}return t.isFunction(n)?n(e):t.isString(n)&&e.split("").reduce((function(t,e){return t.replace(new RegExp(r),e)}),n)},unmask:function(e,n,r){if(r===void 0){r="_"}var i=new RegExp(r);return t.isFunction(n)?n(e):t.isString(n)&&e.split("").reduce((function(t,e,r){return!i.test(e)&&i.test(n.charAt(r))?t+e:t}),"")}});var o=function(t){return t.reduce((function(t,e){return t.includes(e)||t.push(e),t}),[])};var c=function(){function t(t){this._list=t,this._head=0}Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this.length<1},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"index",{get:function(){return this._head},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"length",{get:function(){return this._list.length},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"current",{get:function(){return this._list[this._head]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"next",{get:function(){var t=this.length;var e=this._head;return this._head=e++<t-1?e:0,this.current},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"prev",{get:function(){var t=this.length;var e=this._head;return this._head=--e<0?t-1:e,this.current},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"peekNext",{get:function(){var t=this.length,e=this._head;return this._list[e+1<t?e+1:0]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"peekPrev",{get:function(){var t=this.length,e=this._head;return this._list[e-1<0?t-1:e-1]},enumerable:false,configurable:true});return t}();function h(t,e){try{return t()}catch(n){return e}}h.async=function(t,e){return __awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,t()];case 1:return[2,r.sent()];case 2:n=r.sent();return[2,e];case 3:return[2]}}))}))};function m(t,e){if(e===void 0){e=0}var n=Math.pow(10,-e);return Math.round(parseFloat((t*n).toFixed(Math.abs(e))))/n}function g(t,e){if(e===void 0){e=0}return m(t+5*Math.pow(10,e-1),e)}function _(t,e){if(e===void 0){e=0}if(0===t)return 0;return m(t-5*Math.pow(10,e-1),e)}function w(t,e){if(e===void 0){e=0}return t<0?g(t,e):_(t,e)}function x(t){var e=function(t,n,r){if(n===void 0){n=0}if(r===void 0){r=1}return 0<t?e(--t,r,n+r):n};return e(t)}function v(t){var e=0,n=1,r=0;for(;t>1;)r=e,e=n,n+=r,t--;return t<1?e:n}function b(t,e){if(e===void 0){e=0}var n=parseInt(t);return Number.isNaN(n)?e:n}Object.freeze({__proto__:null,random:function(t,e){if(t===void 0){t=0}if(e===void 0){e=1}return Math.random()*(e-t)+t},round:m,roundUp:g,roundDown:_,roundTowardZero:w,gcd:function t(e,n){return 0===n?Math.abs(e):t(n,e%n)},fib:x,fib2:v,fibArray:function(t){return Array(t).fill(0).map((function(){return x(--t)})).reverse()},fib2Array:function(t){return Array(t).fill(0).map((function(){return v(--t)})).reverse()},tryParseInt:b,tryParseFloat:function(t,e){if(e===void 0){e=0}var n=parseFloat(t);return Number.isNaN(n)?e:n}});var $=function(){function e(e,n){if(e===void 0){e=0}if(n===void 0){n=0}if(!t.isNumber(e)||!t.isNumber(n))throw new Error("Coord requires numeric x and y values");this._x=e,this._y=n}Object.defineProperty(e.prototype,"x",{get:function(){return this._x},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"y",{get:function(){return this._y},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"value",{get:function(){return{x:this.x,y:this.y}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"half",{get:function(){return this.divide(new e(2,2))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"abs",{get:function(){return new e(Math.abs(this.x),Math.abs(this.y))},enumerable:false,configurable:true});e.prototype.equals=function(t){return this.x===t.x&&this.y===t.y};e.prototype.add=function(t){return new e(this.x+t.x,this.y+t.y)};e.prototype.subtract=function(t){return new e(this.x-t.x,this.y-t.y)};e.prototype.multiply=function(t){return new e(this.x*t.x,this.y*t.y)};e.prototype.divide=function(t){return new e(this.x/t.x,this.y/t.y)};e.prototype.round=function(t){if(t===void 0){t=0}return new e(m(this.x,t),m(this.y,t))};e.prototype.toString=function(){return"(".concat(this.x,",").concat(this.y,")")};e.canParse=function(n){return t.isArray(n)?!(Number.isNaN(n[0])||Number.isNaN(n[1])):t.isObjectLiteral(n)&&"x"in n&&"y"in n?!(Number.isNaN(n.x)||Number.isNaN(n.y)):n instanceof e};e.parse=function(n){return t.exists(n)?n instanceof e?n:t.isArray(n)?new e(n[0],n[1]):t.isObjectLiteral(n)&&t.exists(n.x)&&t.exists(n.y)?new e(n.x,n.y):null:null};e.tryParse=function(t){return h((function(){return e.parse(t)}),null)};return e}();var F=function(t){__extends(e,t);function e(e,n){if(e===void 0){e=0}if(n===void 0){n=0}var r=this;r=t.call(this,e,n)||this,r._lengthSquared=Math.pow(e,2)+Math.pow(n,2),r._magnitude=Math.sqrt(r._lengthSquared),r._unitNormalX=0===e&&0===n?0:e/r._magnitude,r._unitNormalY=0===e&&0===n?0:n/r._magnitude;return r}Object.defineProperty(e.prototype,"magnitude",{get:function(){return this._magnitude},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isZero",{get:function(){return 0===this.x&&0===this.y},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"normal",{get:function(){return new e(this._unitNormalX,this._unitNormalY)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"invert",{get:function(){return new e(-this.x,-this.y)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"norm",{get:function(){return new e(Math.abs(this.x),Math.abs(this.y))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"perpendicular",{get:function(){return new e(-this.y,this.x)},enumerable:false,configurable:true});e.prototype.equals=function(t){return t instanceof e&&this.x===t.x&&this.y===t.y};e.prototype.add=function(t){return t instanceof e?new e(this.x+t.x,this.y+t.y):null};e.prototype.dot=function(t){return t instanceof e?this.x*t.x+this.y*t.y:null};e.prototype.perpendicularAtTo=function(t){if(!(t instanceof e))return null;var n=t.add(this.projectionOfOnto(t).invert);return new e(n.x,n.y)};e.prototype.projectionOfOnto=function(t){if(!(t instanceof e))return null;var n=t.normal.scale(this.dot(t.normal));return new e(n.x,n.y)};e.prototype.scale=function(t){return new e(this.x*t,this.y*t)};e.prototype.unitNormalDot=function(t){return t instanceof e?this.normal.x*t.normal.x+this.normal.y*t.normal.y:null};e.prototype.reflect=function(t){if(!(t instanceof e))return null;if(t.isZero)return this;var n=t.normal;return this.add(n.scale(2*n.dot(this)).invert)};e.prototype.round=function(t){if(t===void 0){t=0}return new e(m(this.x,t),m(this.y,t))};return e}($);var O=function(t){__extends(e,t);function e(e,n){return t.call(this,e,n)||this}e.prototype.isAbove=function(t){return this.y<t.y};e.prototype.isBelow=function(t){return this.y>t.y};e.prototype.isLeftOf=function(t){return this.x<t.x};e.prototype.isRightOf=function(t){return this.x>t.x};e.prototype.distanceFrom=function(t){return new F(this.x-t.x,this.y-t.y)};e.prototype.distanceTo=function(t){return this.distanceFrom(t).invert};e.canParse=function(t){return t instanceof e||$.canParse(t)};e.parse=function(t){if(t instanceof e)return t;var n=$.parse(t);return new e(n.x,n.y)};e.tryParse=function(t){return h((function(){return e.parse(t)}),null)};return e}($);var M=function(){function t(t,e,n,r){if(t===void 0){t=0}if(e===void 0){e=0}if(n===void 0){n=0}if(r===void 0){r=0}this.origin=new O(t,e),this.dimensions=new $(n,r),this.diagonal=O.parse(this.origin.add(this.dimensions)),this.center=this.diagonal.half}t.prototype.contains=function(t){return this.origin.isAbove(t)&&this.origin.isLeftOf(t)&&this.diagonal.isRightOf(t)&&this.diagonal.isBelow(t)};t.prototype.aspectToFit=function(e){var n=this.dimensions,r=e.dimensions,i=r.x,o=r.y;var u=n.x,s=n.y;return u>s&&0!==u?(s*=i/u,u=i,s>o&&(s=o,u*=s/n.y)):s>o&&(u*=o/s,s=o),new t(this.origin.x,this.origin.y,u,s)};return t}();var j=function(t,e,n){if(n===void 0){n=!1}var r;return function(){var i=[];for(var o=0;o<arguments.length;o++){i[o]=arguments[o]}var u=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||t.apply(void 0,i)}),e),u&&t.apply(void 0,i)}};var L=function(){function e(t){this._milliseconds=t}Object.defineProperty(e.prototype,"isRunning",{get:function(){return t.exists(this._intervalId)},enumerable:false,configurable:true});e.prototype.onInterval=function(t){return this.clear(),this._didInterval=t,this};e.prototype.start=function(){var t=this;return this.clear(),this._intervalId=setInterval((function(){t._didInterval()}),this._milliseconds),this};e.prototype.clear=function(){return clearInterval(this._intervalId),this._intervalId=null,this};return e}();var C=function(){function e(t){this._milliseconds=t}Object.defineProperty(e.prototype,"isRunning",{get:function(){return t.exists(this._timeoutId)},enumerable:false,configurable:true});e.prototype.onTimeout=function(t){return this.clear(),this._didTimeout=t,this};e.prototype.start=function(){var t=this;return this.clear(),this._timeoutId=setTimeout((function(){t._didTimeout()}),this._milliseconds),this};e.prototype.clear=function(){return clearTimeout(this._timeoutId),this._timeoutId=null,this};return e}();var Y=function(t){return new Promise((function(e){return setTimeout(e,t)}))};function k(t){var e=isNaN(parseInt(t))||t<0||t>24?24:t,n=Math.random().toString().substring(2),r=Math.random().toString().substring(2);return n.concat(r).substring(0,e)}function Z(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}var R=Object.freeze({__proto__:null,uid:k,uuid:Z,suid:function(){return Symbol(k())},suuid:function(){return Symbol(Z())}});Object.freeze({__proto__:null,pattern:function(t){return t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\")},escape:function(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});export{C,L,M,R,Y,a,c,h,j,o,t};
@@ -1 +0,0 @@
1
- import{R}from"./index-4dba724d.js";var uid=function(){return function(){R.uid()}()};export{uid as u};
@@ -1 +0,0 @@
1
- class t{static isNull(t){return null===t}static isEmpty(r){return t.isString(r)&&""===r||t.isArray(r)&&r.length<1||t.isObjectLiteral(r)&&Object.keys(r).length<1}static isUndefined(t){return void 0===t}static isZero(t){return 0===t}static exists(r){return!(t.isUndefined(r)||t.isNull(r))}static isNullOrEmpty(r){return!t.exists(r)||t.isEmpty(r)}static isArray(t){return Array.isArray(t)}static isBool(t){return"boolean"==typeof t}static isTrue(r){return t.isBool(r)&&!0===r}static isFalse(r){return t.isBool(r)&&!1===r}static isDate(t){return t instanceof Date}static isNumber(t){return("number"==typeof t||t instanceof Number)&&!isNaN(t)}static isEven(t){return this.isNumber(t)&&!this.isZero(t)&&t%2==0}static isOdd(t){return this.isNumber(t)&&!this.isZero(t)&&!this.isEven(t)}static isString(t){return"string"==typeof t||t instanceof String}static isFunction(t){return t instanceof Function}static isAsyncFunction(r){try{return"AsyncFunction"===Object.getPrototypeOf(r).constructor.name||t.isFunction(r)&&/^async/.test(r.toString())||t.isFunction(r().then)}catch(t){return!1}}static isPromise(t){return t instanceof Promise}static isObject(r){return t.exists(r)&&"object"==typeof r&&!(t.isBool(r)||t.isNumber(r)||t.isDate(r)||t.isArray(r)||t.isString(r)||t.isFunction(r))}static isObjectLiteral(r){return t.isObject(r)&&r.constructor==={}.constructor}static isTruthy(r){return!t.isFalsy(r)}static isFalsy(r){return t.isZero(r)||t.isFalse(r)||t.isNullOrEmpty(r)||isNaN(r)}}function r(r){return t.exists(r)&&t.isFunction(r.replace)?r.replace(/^[\s\n]*/,""):r}function n(r){return t.exists(r)&&t.isFunction(r.replace)?r.replace(/[\s\n]*$/,""):r}var e=Object.freeze({__proto__:null,build:function(...t){return"".concat(...t)},chunk:function(r,n=0){if(!t.isString(r)||Number.isNaN(n)||n<0)return[];if(n<r.length){let t=0;const e=n||r.length,i=[];for(;t<r.length;)i.push(r.slice(t,t+e)),t+=e;return i}return[r]},format:function(t,...r){return r.reduce(((t,r,n)=>t.replace(new RegExp(`\\{${n}\\}`,"g"),r&&r.toString?r.toString():r)),t)},trim:function(t){return r(n(t))},trimStart:r,trimEnd:n,capitalize:function(t=""){return(t||"").charAt(0).toUpperCase()+(t||"").slice(1).toLowerCase()},mask:function(r,n,e="_"){return t.isFunction(n)?n(r):t.isString(n)&&r.split("").reduce(((t,r)=>t.replace(new RegExp(e),r)),n)},unmask:function(r,n,e="_"){const i=new RegExp(e);return t.isFunction(n)?n(r):t.isString(n)&&r.split("").reduce(((t,r,e)=>!i.test(r)&&i.test(n.charAt(e))?t+r:t),"")}}),i=t=>t.reduce(((t,r)=>(t.includes(r)||t.push(r),t)),[]);class s{_list;_head;constructor(t){this._list=t,this._head=0}get isEmpty(){return this.length<1}get index(){return this._head}get length(){return this._list.length}get current(){return this._list[this._head]}get next(){const{length:t}=this;let r=this._head;return this._head=r++<t-1?r:0,this.current}get prev(){const{length:t}=this;let r=this._head;return this._head=--r<0?t-1:r,this.current}get peekNext(){const{length:t}=this,r=this._head;return this._list[r+1<t?r+1:0]}get peekPrev(){const{length:t}=this,r=this._head;return this._list[r-1<0?t-1:r-1]}}function u(t,r){try{return t()}catch{return r}}function a(t,r=0){const n=Math.pow(10,-r);return Math.round(parseFloat((t*n).toFixed(Math.abs(r))))/n}function h(t,r=0){return a(t+5*Math.pow(10,r-1),r)}function c(t,r=0){return 0===t?0:a(t-5*Math.pow(10,r-1),r)}function o(t){const r=(t,n=0,e=1)=>0<t?r(--t,e,n+e):n;return r(t)}function l(t){let r=0,n=1,e=0;for(;t>1;)e=r,r=n,n+=e,t--;return t<1?r:n}u.async=async(t,r)=>{try{return await t()}catch{return r}},Object.freeze({__proto__:null,random:function(t=0,r=1){return Math.random()*(r-t)+t},round:a,roundUp:h,roundDown:c,roundTowardZero:function(t,r=0){return t<0?h(t,r):c(t,r)},gcd:function t(r,n){return 0===n?Math.abs(r):t(n,r%n)},fib:o,fib2:l,fibArray:function(t){return Array(t).fill(0).map((()=>o(--t))).reverse()},fib2Array:function(t){return Array(t).fill(0).map((()=>l(--t))).reverse()},tryParseInt:function(t,r=0){const n=parseInt(t);return Number.isNaN(n)?r:n},tryParseFloat:function(t,r=0){const n=parseFloat(t);return Number.isNaN(n)?r:n}});class f{constructor(r=0,n=0){if(!t.isNumber(r)||!t.isNumber(n))throw new Error("Coord requires numeric x and y values");this._x=r,this._y=n}get x(){return this._x}get y(){return this._y}get value(){return{x:this.x,y:this.y}}get half(){return this.divide(new f(2,2))}get abs(){return new f(Math.abs(this.x),Math.abs(this.y))}equals(t){return this.x===t.x&&this.y===t.y}add(t){return new f(this.x+t.x,this.y+t.y)}subtract(t){return new f(this.x-t.x,this.y-t.y)}multiply(t){return new f(this.x*t.x,this.y*t.y)}divide(t){return new f(this.x/t.x,this.y/t.y)}round(t=0){return new f(a(this.x,t),a(this.y,t))}toString(){return`(${this.x},${this.y})`}static canParse(r){return t.isArray(r)?!(Number.isNaN(r[0])||Number.isNaN(r[1])):t.isObjectLiteral(r)&&"x"in r&&"y"in r?!(Number.isNaN(r.x)||Number.isNaN(r.y)):r instanceof f}static parse(r){return t.exists(r)?r instanceof f?r:t.isArray(r)?new f(r[0],r[1]):t.isObjectLiteral(r)&&t.exists(r.x)&&t.exists(r.y)?new f(r.x,r.y):null:null}static tryParse(t){return u((()=>f.parse(t)),null)}}class d extends f{constructor(t=0,r=0){super(t,r),this._lengthSquared=Math.pow(t,2)+Math.pow(r,2),this._magnitude=Math.sqrt(this._lengthSquared),this._unitNormalX=0===t&&0===r?0:t/this._magnitude,this._unitNormalY=0===t&&0===r?0:r/this._magnitude}get magnitude(){return this._magnitude}get isZero(){return 0===this.x&&0===this.y}get normal(){return new d(this._unitNormalX,this._unitNormalY)}get invert(){return new d(-this.x,-this.y)}get norm(){return new d(Math.abs(this.x),Math.abs(this.y))}get perpendicular(){return new d(-this.y,this.x)}equals(t){return t instanceof d&&this.x===t.x&&this.y===t.y}add(t){return t instanceof d?new d(this.x+t.x,this.y+t.y):null}dot(t){return t instanceof d?this.x*t.x+this.y*t.y:null}perpendicularAtTo(t){if(!(t instanceof d))return null;const r=t.add(this.projectionOfOnto(t).invert);return new d(r.x,r.y)}projectionOfOnto(t){if(!(t instanceof d))return null;const r=t.normal.scale(this.dot(t.normal));return new d(r.x,r.y)}scale(t){return new d(this.x*t,this.y*t)}unitNormalDot(t){return t instanceof d?this.normal.x*t.normal.x+this.normal.y*t.normal.y:null}reflect(t){if(!(t instanceof d))return null;if(t.isZero)return this;const r=t.normal;return this.add(r.scale(2*r.dot(this)).invert)}round(t=0){return new d(a(this.x,t),a(this.y,t))}}class m extends f{constructor(t,r){super(t,r)}isAbove(t){return this.y<t.y}isBelow(t){return this.y>t.y}isLeftOf(t){return this.x<t.x}isRightOf(t){return this.x>t.x}distanceFrom(t){return new d(this.x-t.x,this.y-t.y)}distanceTo(t){return this.distanceFrom(t).invert}static canParse(t){return t instanceof m||f.canParse(t)}static parse(t){if(t instanceof m)return t;const r=f.parse(t);return new m(r.x,r.y)}static tryParse(t){return u((()=>m.parse(t)),null)}}class p{constructor(t=0,r=0,n=0,e=0){this.origin=new m(t,r),this.dimensions=new f(n,e),this.diagonal=m.parse(this.origin.add(this.dimensions)),this.center=this.diagonal.half}contains(t){return this.origin.isAbove(t)&&this.origin.isLeftOf(t)&&this.diagonal.isRightOf(t)&&this.diagonal.isBelow(t)}aspectToFit(t){const r=this.dimensions,n=t.dimensions,e=n.x,i=n.y;let s=r.x,u=r.y;return s>u&&0!==s?(u*=e/s,s=e,u>i&&(u=i,s*=u/r.y)):u>i&&(s*=i/u,u=i),new p(this.origin.x,this.origin.y,s,u)}}var g=(t,r,n=!1)=>{let e;return(...i)=>{const s=n&&!e;clearTimeout(e),e=setTimeout((()=>{e=null,n||t(...i)}),r),s&&t(...i)}};class w{_milliseconds;_intervalId;_didInterval;constructor(t){this._milliseconds=t}get isRunning(){return t.exists(this._intervalId)}onInterval(t){return this.clear(),this._didInterval=t,this}start(){return this.clear(),this._intervalId=setInterval((()=>{this._didInterval()}),this._milliseconds),this}clear(){return clearInterval(this._intervalId),this._intervalId=null,this}}class y{_milliseconds;_timeoutId;_didTimeout;constructor(t){this._milliseconds=t}get isRunning(){return t.exists(this._timeoutId)}onTimeout(t){return this.clear(),this._didTimeout=t,this}start(){return this.clear(),this._timeoutId=setTimeout((()=>{this._didTimeout()}),this._milliseconds),this}clear(){return clearTimeout(this._timeoutId),this._timeoutId=null,this}}var _=t=>new Promise((r=>setTimeout(r,t)));function b(t){const r=isNaN(parseInt(t))||t<0||t>24?24:t,n=Math.random().toString().substring(2),e=Math.random().toString().substring(2);return n.concat(e).substring(0,r)}function A(){return function t(r){return r?(r^16*Math.random()>>r/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}var N=Object.freeze({__proto__:null,uid:b,uuid:A,suid:function(){return Symbol(b())},suuid:function(){return Symbol(A())}});Object.freeze({__proto__:null,pattern:t=>t.toString().replace(/(^\/)|(\/$)/g,"").replace(/\\/g,"\\"),escape:t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),alpha:/^[A-z]+$/,alphaNumeric:/^[A-z0-9]+$/,base64:/^[A-z0-9=]+$/,dataUrl:/^\s*data:([a-z]+\/[a-z0-9+-]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=._~:@/?%\s-]*\s*$/i,email:/^\w+([.\w-+]+)?@\w+([.\w-]+)?\.[A-Za-z0-9]{2,}$/,empty:/^$/,numeric:/^-?[0-9]+$/,script:/(<script[A-z0-9\n\s\t\r.={([\])}'",;!&|$/_:<>*?+\u0000-\u0037\u00C2\u00A0\u2122-]*?<\/script>)/,uid:/^\d{14,}$/i,url:/^(https?:\/\/)?[^{}\\:]+\.[A-z0-9]{2,12}(\/[^?\s]+)*\/?(\?([^=?_]+=[^=?_]*(&[^=?_]+=[^=?_]*)*(_.*)?)?)?$/,uuid:/^[{(]?[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$/i});export{y as C,w as L,p as M,N as R,_ as Y,e as a,s as c,u as h,g as j,i as o,t}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,a,n,o){function i(t){return t instanceof n?t:new n((function(a){a(t)}))}return new(n||(n=Promise))((function(n,r){function e(t){try{m(o.next(t))}catch(a){r(a)}}function s(t){try{m(o["throw"](t))}catch(a){r(a)}}function m(t){t.done?n(t.value):i(t.value).then(e,s)}m((o=o.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,i,r,e;return e={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(e[Symbol.iterator]=function(){return this}),e;function s(t){return function(a){return m([t,a])}}function m(e){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,i&&(r=e[0]&2?i["return"]:e[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,e[1])).done)return r;if(i=0,r)e=[e[0]&2,r.value];switch(e[0]){case 0:case 1:r=e;break;case 4:n.label++;return{value:e[1],done:false};case 5:n.label++;i=e[1];e=[0];continue;case 7:e=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(e[0]===6||e[0]===2)){n=0;continue}if(e[0]===3&&(!r||e[1]>r[0]&&e[1]<r[3])){n.label=e[1];break}if(e[0]===6&&n.label<r[1]){n.label=r[1];r=e;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(e);break}if(r[2])n.ops.pop();n.trys.pop();continue}e=a.call(t,n)}catch(s){e=[6,s];i=0}finally{o=r=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:true}}};System.register(["./p-55f5c91c.system.js","./p-e11b977e.system.js","./p-eb21757a.system.js"],(function(t){"use strict";var a,n,o,i,r,e,s,m;return{setters:[function(t){a=t.r;n=t.c;o=t.h;i=t.H;r=t.g},function(t){e=t.t},function(t){s=t.D;m=t.K}],execute:function(){var l="@-webkit-keyframes ku4-modal-content-enter{0%{-webkit-transform:var(--ku4-modal-content-animation-start-transform, scale(0.5));transform:var(--ku4-modal-content-animation-start-transform, scale(0.5));opacity:var(--ku4-modal-content-animation-start-opacity, 0)}50%{-webkit-transform:var(--ku4-modal-content-animation-mid-transform, scale(1.2));transform:var(--ku4-modal-content-animation-mid-transform, scale(1.2));opacity:var(--ku4-modal-content-animation-mid-opacity, 0.8)}100%{-webkit-transform:var(--ku4-modal-content-animation-end-transform, scale(1));transform:var(--ku4-modal-content-animation-end-transform, scale(1));opacity:var(--ku4-modal-content-animation-end-opacity, 1)}}@keyframes ku4-modal-content-enter{0%{-webkit-transform:var(--ku4-modal-content-animation-start-transform, scale(0.5));transform:var(--ku4-modal-content-animation-start-transform, scale(0.5));opacity:var(--ku4-modal-content-animation-start-opacity, 0)}50%{-webkit-transform:var(--ku4-modal-content-animation-mid-transform, scale(1.2));transform:var(--ku4-modal-content-animation-mid-transform, scale(1.2));opacity:var(--ku4-modal-content-animation-mid-opacity, 0.8)}100%{-webkit-transform:var(--ku4-modal-content-animation-end-transform, scale(1));transform:var(--ku4-modal-content-animation-end-transform, scale(1));opacity:var(--ku4-modal-content-animation-end-opacity, 1)}}@-webkit-keyframes ku4-modal-overlay-enter{0%{-webkit-transform:var(--ku4-modal-overlay-animation-start-transform, none);transform:var(--ku4-modal-overlay-animation-start-transform, none);opacity:var(--ku4-modal-overlay-animation-start-opacity, 0)}50%{-webkit-transform:var(--ku4-modal-overlay-animation-mid-transform, none);transform:var(--ku4-modal-overlay-animation-mid-transform, none);opacity:var(--ku4-modal-overlay-animation-mid-opacity, 0.35)}100%{-webkit-transform:var(--ku4-modal-overlay-animation-end-transform, none);transform:var(--ku4-modal-overlay-animation-end-transform, none);opacity:var(--ku4-modal-overlay-animation-end-opacity, 0.4)}}@keyframes ku4-modal-overlay-enter{0%{-webkit-transform:var(--ku4-modal-overlay-animation-start-transform, none);transform:var(--ku4-modal-overlay-animation-start-transform, none);opacity:var(--ku4-modal-overlay-animation-start-opacity, 0)}50%{-webkit-transform:var(--ku4-modal-overlay-animation-mid-transform, none);transform:var(--ku4-modal-overlay-animation-mid-transform, none);opacity:var(--ku4-modal-overlay-animation-mid-opacity, 0.35)}100%{-webkit-transform:var(--ku4-modal-overlay-animation-end-transform, none);transform:var(--ku4-modal-overlay-animation-end-transform, none);opacity:var(--ku4-modal-overlay-animation-end-opacity, 0.4)}}:host{position:fixed;display:none;top:0;left:0;width:100vw;height:100vh;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;background:transparent;overflow:auto;-webkit-transform-style:var(--ku4-modal-transform-style, initial);transform-style:var(--ku4-modal-transform-style, initial)}.ku4-modal-content{position:relative;top:0;left:0}.ku4-modal-overlay{position:fixed;display:-ms-flexbox;display:flex;top:0;left:0;width:100%;height:100%;opacity:0;background:var(--ku4-modal-overlay-background, #000)}:host([visible]){display:-ms-flexbox;display:flex;z-index:var(--ku4-modal-z-index, 5)}:host([visible]) .ku4-modal-content{-webkit-animation-name:ku4-modal-content-enter;animation-name:ku4-modal-content-enter;-webkit-animation-duration:var(--ku4-modal-content-animation-duration, 0.4s);animation-duration:var(--ku4-modal-content-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-modal-content-animation-timing-function, ease);animation-timing-function:var(--ku4-modal-content-animation-timing-function, ease);-webkit-transform:var(--ku4-modal-content-transform, none);transform:var(--ku4-modal-content-transform, none);opacity:var(--ku4-modal-content-opacity, 1);z-index:calc(var(--ku4-modal-z-index, 5) + 1)}:host([visible]) .ku4-modal-overlay{-webkit-animation-name:ku4-modal-overlay-enter;animation-name:ku4-modal-overlay-enter;-webkit-animation-duration:var(--ku4-modal-overlay-animation-duration, 0.4s);animation-duration:var(--ku4-modal-overlay-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-modal-overlay-animation-timing-function, ease);animation-timing-function:var(--ku4-modal-overlay-animation-timing-function, ease);-webkit-transform:var(--ku4-modal-overlay-transform, none);transform:var(--ku4-modal-overlay-transform, none);opacity:var(--ku4-modal-overlay-opacity, 0.4);z-index:calc(var(--ku4-modal-z-index, 5))}:host([visible=false]){display:none}";var u=t("ku4_modal",function(){function t(t){a(this,t);this.didDisplay=n(this,"display",7);this.didDismiss=n(this,"dismiss",7);this.visible=false;this.dismissable=true;this.dismissible=this.dismissable}t.prototype.handleVisibility=function(t){if(t){s.preventScroll();if(e.exists(this.trap)){this.trap.activate()}}else{s.resumeScroll();if(e.exists(this.trap)){this.trap.deactivate()}}};t.prototype.handleKeyUp=function(t){if(this.visible&&m.esc.didFire(t)){this.dismiss()}};t.prototype.display=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.visible=true;this.didDisplay.emit(this);return[2]}))}))};t.prototype.dismiss=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.visible=false;this.didDismiss.emit(this);return[2]}))}))};t.prototype.componentDidLoad=function(){try{this.trap=this.host.querySelector("ku4-focus-trap")||document.querySelector(this.focusTrap);this.handleVisibility(this.visible)}catch(t){throw new Error("Cannot connect ku4-focus-trap: ".concat(t.messsage))}};t.prototype.render=function(){var t=this;return o(i,{role:"dialog","aria-modal":"true"},o("section",{class:"ku4-modal-content"},o("slot",null)),o("section",{class:"ku4-modal-overlay",onClick:function(){return t.dismissible&&t.dismiss()},"aria-hidden":"true"}))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{visible:["handleVisibility"]}},enumerable:false,configurable:true});return t}());u.style=l}}}));
@@ -1 +0,0 @@
1
- System.register(["./p-e11b977e.system.js"],(function(t){"use strict";var e;return{setters:[function(t){e=t.R}],execute:function(){var n=t("u",(function(){return function(){e.uid()}()}))}}}));
@@ -1 +0,0 @@
1
- System.register(["./p-55f5c91c.system.js","./p-e11b977e.system.js"],(function(e){"use strict";var t,i,s,n,l,o,r;return{setters:[function(e){t=e.r;i=e.h;s=e.H;n=e.g},function(e){l=e.Y;o=e.t;r=e.R}],execute:function(){var h=":host{position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:12px;line-height:14px}::slotted(*){padding:6px;border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#fff;font-size:18px;-webkit-appearance:none}label{position:absolute;display:var(--ku4-label-display, inline);top:var(--ku4-label-top, -6px);left:var(--ku4-label-left, 8px);padding:var(--ku4-label-padding, 0 4px);font-size:inherit;line-height:inherit;background-color:var(--ku4-label-background-color, inherit);color:inherit;z-index:1;white-space:nowrap;-webkit-transition:all 0.2s ease;transition:all 0.2s ease}label.empty{opacity:0;-webkit-transition:all 0.1s ease;transition:all 0.1s ease}";var a=e("ku4_label",function(){function e(e){t(this,e);this.handleFocus=this.handleFocus.bind(this);this.handleChange=this.handleChange.bind(this);this.handleInput=this.handleInput.bind(this);this.handleKeyUp=this.handleKeyUp.bind(this);this.handleReset=this.handleReset.bind(this)}e.prototype.handleFocus=function(){var e=this;l(100).then((function(){e.empty=o.isNullOrEmpty(e.field.value)}))};e.prototype.handleChange=function(){this.empty=o.isNullOrEmpty(this.field.value)};e.prototype.handleInput=function(){this.empty=o.isNullOrEmpty(this.field.value)};e.prototype.handleKeyUp=function(){this.empty=o.isNullOrEmpty(this.field.value)};e.prototype.handleReset=function(){this.empty=true};e.prototype.componentWillLoad=function(){this.field=this.host.querySelector("input, select, textarea");this.empty=o.isNullOrEmpty(this.field.value);this.placeholder=this.field.getAttribute("placeholder");this.field.addEventListener("focus",this.handleFocus);this.field.addEventListener("change",this.handleChange);this.field.addEventListener("input",this.handleInput);this.field.addEventListener("keyup",this.handleKeyUp);var e=this.field.getAttribute("aria-labelledby");var t=this.host.getAttribute("id")||r.uid();this.host.setAttribute("id",t);if(o.isNullOrEmpty(e)){this.field.setAttribute("aria-labelledby",t)}if(o.isFunction(this.host.closest)){this.form=this.host.closest("form");if(this.form&&this.form.addEventListener){this.form.addEventListener("reset",this.handleReset)}}};e.prototype.disconnectedCallback=function(){if(this.field&&this.field.removeEventListener){this.field.removeEventListener("focus",this.handleFocus);this.field.removeEventListener("change",this.handleChange);this.field.removeEventListener("input",this.handleInput);this.field.removeEventListener("keyup",this.handleKeyUp);if(this.form&&this.form.removeEventListener){this.form.removeEventListener("reset",this.handleReset)}}};e.prototype.render=function(){var e=this,t=e.empty,n=e.value,l=e.placeholder;return i(s,null,i("label",{htmlFor:this.for,class:"".concat(t?"empty":"")},n||l),i("slot",null))};Object.defineProperty(e.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());a.style=h}}}));
@@ -1 +0,0 @@
1
- var __spreadArray=this&&this.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++){if(a||!(r in e)){if(!a)a=Array.prototype.slice.call(e,0,r);a[r]=e[r]}}return t.concat(a||Array.prototype.slice.call(e))};System.register(["./p-55f5c91c.system.js","./p-e11b977e.system.js"],(function(t){"use strict";var e,n,r,i,a;return{setters:[function(t){e=t.r;n=t.h},function(t){r=t.a;i=t.Y;a=t.t}],execute:function(){var s=":host{display:none}";var u=t("ku4_mask",function(){function t(t){e(this,t);this.charIndexes=[];this.reverseCharIndexes=[];this.previousValue="";this.currentValue="";this.touchStart=false;this.template="";this.ban="";this.pattern="";this.char="_";this.hidden=false;this.handleFocus=this.handleFocus.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this);this.handleInput=this.handleInput.bind(this);this.handleTouchStart=this.handleTouchStart.bind(this);this.init()}t.prototype.init=function(){var t=this;this.chars=this.char&&new RegExp(this.char);this.banned=this.ban&&new RegExp(this.ban);var e=this.pattern.replace(/[\s\n]/gm,"");this.patterns=e.substr(1).split(e[0]).map((function(t){try{return t&&new RegExp(t)||null}catch(e){}}));this.charIndexes=this.template.split("").reduce((function(e,n,r){if(t.chars.test(n)){e.push(r)}return e}),[]);this.reverseCharIndexes=__spreadArray([],this.charIndexes,true).reverse();return this};t.prototype.templateHandler=function(t,e){var n=this,i=n.input,a=n.previousCharIndex,s=n.previousValue,u=n.currentValue,h=n.value,l=n.char;var o=r.unmask(s,e,l).length;var c=r.unmask(u,e,l).length;var d=o<c?a+1:a;this.init().value=r.mask(r.unmask(h,e,l),t,l);i.setSelectionRange(d,d)};t.prototype.charHandler=function(t,e){var n=this,i=n.value,a=n.template;this.init().value=r.mask(r.unmask(i,a,e),a,t)};Object.defineProperty(t.prototype,"previousCharIndex",{get:function(){var t=this;return this.reverseCharIndexes.find((function(e){return t.selectionStart>e}))||this.charIndexes[0]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){return this.currentValue},set:function(t){var e=this,n=e.chars,r=e.hidden,i=e.input;var a=t.search(n);this.currentValue=t;i.value=r&&a>-1?t.substring(0,a):t},enumerable:false,configurable:true});t.prototype.handleTouchStart=function(){this.touchStart=true};t.prototype.handleFocus=function(){var t=this;if(window.document.documentMode){return}var e=this,n=e.input,a=e.template,s=e.char,u=e.chars,h=e.touchStart;var l=r.unmask(n.value,a,s);var o=r.unmask(this.value,a,s);this.value=l!==o?r.mask(l,a,s):r.mask(o,a,s);i(0).then((function(){var e=n.value.search(u);var r=e<0?n.value.length:e;t.input.setSelectionRange(e<0&&!h?0:r,r);t.touchStart=false}))};t.prototype.handleBlur=function(){var t=this,e=t.template,n=t.char;if(a.isEmpty(r.unmask(this.value,e,n))){this.value=""}};t.prototype.handleKeyDown=function(t){if(window.document.documentMode){return}var e=this,n=e.banned,i=e.hidden,a=e.template,s=e.char;if(t.key&&t.key.length===1&&n&&(n.test(t.key)&&!(t.altKey||t.ctrlKey||t.metaKey))){t.preventDefault()}this.previousValue=i?r.mask(r.unmask(t.target.value,a,s),a,s):t.target.value;this.selectionStart=t.target.selectionStart;this.selectionEnd=t.target.selectionEnd};t.prototype.handleInput=function(t){var e=this;if(window.document.documentMode){return}var n=this,i=n.input,s=n.template,u=n.char,h=n.chars,l=n.previousValue,o=n.banned,c=n.selectionStart,d=n.selectionEnd,v=n.previousCharIndex,p=n.patterns,f=n.charIndexes,g=n.reverseCharIndexes;if(!h.test(this.previousValue)&&!(t.type==="input"&&!t.inputType)&&t.inputType!=="insertFromPaste"&&t.inputType!=="deleteContentBackward"&&t.inputType!=="deleteContentForward"&&t.inputType!=="deleteByCut"&&c===d){this.value=l;return}if(t.inputType==="insertFromPaste"){try{navigator.clipboard.readText().then((function(t){var n=r.unmask(t,s,u);var v=n.replace(new RegExp(o,"g"),"");if(a.isNullOrEmpty(v)){e.value=l;i.setSelectionRange(c,c);return}if(!o||!o.test(v)){var p=l;if(c<d){var m=g.find((function(t){return t<=c-1}));var y=g.find((function(t){return t<=d-1}));var k=f.findIndex((function(t){return t===m}));var b=f.findIndex((function(t){return t===y}));var x=r.unmask(l,s,u);var I=x.substring(0,k+1)+x.substring(b+1,l.length);p=r.mask(I,s,u)}var S=f.find((function(t){return t>=c}));var w=f.findIndex((function(t){return t===S}));var E=r.unmask(p,s,u);p=E.substring(0,w)+v+E.substring(w,l.length);e.value=r.mask(p,s,u);var R=f[w+v.length]||e.value.search(h)||e.value.length;i.setSelectionRange(R,R)}}));this.value=l;i.setSelectionRange(c,c);return}catch(t){this.value=l;i.setSelectionRange(c,c);return}}if(t.inputType==="deleteContentBackward"||t.inputType==="deleteByCut"){var m=g.find((function(t){return t<=c-1}));var y=g.find((function(t){return t<=d-1}));var k=f.findIndex((function(t){return t===m}));var b=f.findIndex((function(t){return t===y}));var x=r.unmask(l,s,u);if(k<b){var I=x.substring(0,k+1)+x.substring(b+1,l.length);this.value=r.mask(I,s,u);I&&k>-1?i.setSelectionRange(v+1,v+1):i.setSelectionRange(v,v)}else{var I=x.substring(0,k)+x.substring(b+1,l.length);this.value=r.mask(I,s,u);i.setSelectionRange(v,v)}return}if(t.inputType==="deleteContentForward"){var S=f.find((function(t){return t>=c}));var w=f.findIndex((function(t){return t===S}));var x=r.unmask(l,s,u);var I=x.substring(0,w)+x.substring(w+1,l.length);this.value=r.mask(I,s,u);i.setSelectionRange(c,c);return}if(t.altKey||t.ctrlKey||t.metaKey){return}if(!t.data){if(t.type==="input"&&!t.inputType){var E=t.target.value;var R=f.find((function(t){return t>=c}));var w=f.findIndex((function(t){return t===R}));var x=r.unmask(E,s,u);var T=E.replace(new RegExp(o,"g"),"");var C=x.substring(0,w)+T;var L=f.find((function(t){return t>R}));var K=f.findIndex((function(t){return t>=L}));var B=K<0?f.length-1:K-1;this.value=r.mask(C,s,u);this.validate(C,p[B])}else{this.value=l;i.setSelectionRange(c,c)}return}if(h.test(l.charAt(c))||c===s.length){var x=r.unmask(l,s,u);this.value=r.mask(x+t.data,s,u);var V=this.value.search(h);var F=V<0?s.length:V;i.setSelectionRange(F,F);var K=f.findIndex((function(t){return t>=F}));var B=K<0?f.length-1:K-1;this.validate(t.data,p[B])}else{var C=l;if(c<d){var _=g.find((function(t){return t<=c-1}));var A=g.find((function(t){return t<=d-1}));var k=f.findIndex((function(t){return t===_}));var b=f.findIndex((function(t){return t===A}));var D=r.unmask(l,s,u);var I=D.substring(0,k+1)+D.substring(b+1,l.length);C=r.mask(I,s,u)}var j=f.find((function(t){return t>=c}));var w=f.findIndex((function(t){return t===j}));var x=r.unmask(C,s,u);C=x.substring(0,w)+t.data+x.substring(w,l.length);var P=f.find((function(t){return t>j}));this.value=r.mask(C,s,u);i.setSelectionRange(P,P);var K=f.findIndex((function(t){return t>=P}));var B=K<0?f.length-1:K-1;this.validate(t.data,p[B])}};t.prototype.validate=function(t,e){var n=this,r=n.previousValue,i=n.input,s=n.value,u=n.selectionStart;if(a.exists(e)&&!(e.test(t)||/\(\?[!<=]/.test(e.toString())&&e.test(s))){this.value=r;i.setSelectionRange(u,u)}};t.prototype.componentWillLoad=function(){this.input=document.getElementById(this.for);if(a.exists(this.input)){this.input.addEventListener("focus",this.handleFocus);this.input.addEventListener("blur",this.handleBlur);this.input.addEventListener("keydown",this.handleKeyDown);this.input.addEventListener("input",this.handleInput);this.input.addEventListener("ku4-mask-input",this.handleInput);this.input.addEventListener("touchstart",this.handleTouchStart,{passive:true})}else{console.error("ku4-mask must have a valid `for` referencing target field `id`.")}};t.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("focus",this.handleFocus);this.input.removeEventListener("blur",this.handleBlur);this.input.removeEventListener("keydown",this.handleKeyDown);this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("touchstart",this.handleTouchStart,{passive:true})}};t.prototype.render=function(){return n("slot",null)};Object.defineProperty(t,"watchers",{get:function(){return{template:["templateHandler"],char:["charHandler"]}},enumerable:false,configurable:true});return t}());u.style=s}}}));
@@ -1 +0,0 @@
1
- import{r as a,c as t,h as n,H as o,g as i}from"./p-0943c493.js";import{t as r}from"./p-0af98743.js";import{D as e,K as m}from"./p-e8b35187.js";const s=class{constructor(n){a(this,n),this.didDisplay=t(this,"display",7),this.didDismiss=t(this,"dismiss",7),this.visible=!1,this.dismissable=!0,this.dismissible=this.dismissable}handleVisibility(a){a?(e.preventScroll(),r.exists(this.trap)&&this.trap.activate()):(e.resumeScroll(),r.exists(this.trap)&&this.trap.deactivate())}handleKeyUp(a){this.visible&&m.esc.didFire(a)&&this.dismiss()}async display(){this.visible=!0,this.didDisplay.emit(this)}async dismiss(){this.visible=!1,this.didDismiss.emit(this)}componentDidLoad(){try{this.trap=this.host.querySelector("ku4-focus-trap")||document.querySelector(this.focusTrap),this.handleVisibility(this.visible)}catch(a){throw new Error(`Cannot connect ku4-focus-trap: ${a.messsage}`)}}render(){return n(o,{role:"dialog","aria-modal":"true"},n("section",{class:"ku4-modal-content"},n("slot",null)),n("section",{class:"ku4-modal-overlay",onClick:()=>this.dismissible&&this.dismiss(),"aria-hidden":"true"}))}get host(){return i(this)}static get watchers(){return{visible:["handleVisibility"]}}};s.style="@-webkit-keyframes ku4-modal-content-enter{0%{-webkit-transform:var(--ku4-modal-content-animation-start-transform, scale(0.5));transform:var(--ku4-modal-content-animation-start-transform, scale(0.5));opacity:var(--ku4-modal-content-animation-start-opacity, 0)}50%{-webkit-transform:var(--ku4-modal-content-animation-mid-transform, scale(1.2));transform:var(--ku4-modal-content-animation-mid-transform, scale(1.2));opacity:var(--ku4-modal-content-animation-mid-opacity, 0.8)}100%{-webkit-transform:var(--ku4-modal-content-animation-end-transform, scale(1));transform:var(--ku4-modal-content-animation-end-transform, scale(1));opacity:var(--ku4-modal-content-animation-end-opacity, 1)}}@keyframes ku4-modal-content-enter{0%{-webkit-transform:var(--ku4-modal-content-animation-start-transform, scale(0.5));transform:var(--ku4-modal-content-animation-start-transform, scale(0.5));opacity:var(--ku4-modal-content-animation-start-opacity, 0)}50%{-webkit-transform:var(--ku4-modal-content-animation-mid-transform, scale(1.2));transform:var(--ku4-modal-content-animation-mid-transform, scale(1.2));opacity:var(--ku4-modal-content-animation-mid-opacity, 0.8)}100%{-webkit-transform:var(--ku4-modal-content-animation-end-transform, scale(1));transform:var(--ku4-modal-content-animation-end-transform, scale(1));opacity:var(--ku4-modal-content-animation-end-opacity, 1)}}@-webkit-keyframes ku4-modal-overlay-enter{0%{-webkit-transform:var(--ku4-modal-overlay-animation-start-transform, none);transform:var(--ku4-modal-overlay-animation-start-transform, none);opacity:var(--ku4-modal-overlay-animation-start-opacity, 0)}50%{-webkit-transform:var(--ku4-modal-overlay-animation-mid-transform, none);transform:var(--ku4-modal-overlay-animation-mid-transform, none);opacity:var(--ku4-modal-overlay-animation-mid-opacity, 0.35)}100%{-webkit-transform:var(--ku4-modal-overlay-animation-end-transform, none);transform:var(--ku4-modal-overlay-animation-end-transform, none);opacity:var(--ku4-modal-overlay-animation-end-opacity, 0.4)}}@keyframes ku4-modal-overlay-enter{0%{-webkit-transform:var(--ku4-modal-overlay-animation-start-transform, none);transform:var(--ku4-modal-overlay-animation-start-transform, none);opacity:var(--ku4-modal-overlay-animation-start-opacity, 0)}50%{-webkit-transform:var(--ku4-modal-overlay-animation-mid-transform, none);transform:var(--ku4-modal-overlay-animation-mid-transform, none);opacity:var(--ku4-modal-overlay-animation-mid-opacity, 0.35)}100%{-webkit-transform:var(--ku4-modal-overlay-animation-end-transform, none);transform:var(--ku4-modal-overlay-animation-end-transform, none);opacity:var(--ku4-modal-overlay-animation-end-opacity, 0.4)}}:host{position:fixed;display:none;top:0;left:0;width:100vw;height:100vh;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;background:transparent;overflow:auto;-webkit-transform-style:var(--ku4-modal-transform-style, initial);transform-style:var(--ku4-modal-transform-style, initial)}.ku4-modal-content{position:relative;top:0;left:0}.ku4-modal-overlay{position:fixed;display:-ms-flexbox;display:flex;top:0;left:0;width:100%;height:100%;opacity:0;background:var(--ku4-modal-overlay-background, #000)}:host([visible]){display:-ms-flexbox;display:flex;z-index:var(--ku4-modal-z-index, 5)}:host([visible]) .ku4-modal-content{-webkit-animation-name:ku4-modal-content-enter;animation-name:ku4-modal-content-enter;-webkit-animation-duration:var(--ku4-modal-content-animation-duration, 0.4s);animation-duration:var(--ku4-modal-content-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-modal-content-animation-timing-function, ease);animation-timing-function:var(--ku4-modal-content-animation-timing-function, ease);-webkit-transform:var(--ku4-modal-content-transform, none);transform:var(--ku4-modal-content-transform, none);opacity:var(--ku4-modal-content-opacity, 1);z-index:calc(var(--ku4-modal-z-index, 5) + 1)}:host([visible]) .ku4-modal-overlay{-webkit-animation-name:ku4-modal-overlay-enter;animation-name:ku4-modal-overlay-enter;-webkit-animation-duration:var(--ku4-modal-overlay-animation-duration, 0.4s);animation-duration:var(--ku4-modal-overlay-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-modal-overlay-animation-timing-function, ease);animation-timing-function:var(--ku4-modal-overlay-animation-timing-function, ease);-webkit-transform:var(--ku4-modal-overlay-transform, none);transform:var(--ku4-modal-overlay-transform, none);opacity:var(--ku4-modal-overlay-opacity, 0.4);z-index:calc(var(--ku4-modal-z-index, 5))}:host([visible=false]){display:none}";export{s as ku4_modal}
@@ -1 +0,0 @@
1
- import{R as o}from"./p-0af98743.js";const p=()=>{o.uid()};export{p as u}