@kong-ui-public/forms 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +15 -0
  3. package/dist/forms.es.js +10713 -0
  4. package/dist/forms.es.js.map +1 -0
  5. package/dist/forms.umd.js +49 -0
  6. package/dist/forms.umd.js.map +1 -0
  7. package/dist/style.css +1 -0
  8. package/dist/types/const.d.ts +2 -0
  9. package/dist/types/const.d.ts.map +1 -0
  10. package/dist/types/forms/OIDCForm.vue.d.ts +68 -0
  11. package/dist/types/forms/OIDCForm.vue.d.ts.map +1 -0
  12. package/dist/types/forms/PostFunction.vue.d.ts +48 -0
  13. package/dist/types/forms/PostFunction.vue.d.ts.map +1 -0
  14. package/dist/types/forms/index.d.ts +3 -0
  15. package/dist/types/forms/index.d.ts.map +1 -0
  16. package/dist/types/forms/schemas/ExitTransformer.d.ts +9 -0
  17. package/dist/types/forms/schemas/ExitTransformer.d.ts.map +1 -0
  18. package/dist/types/forms/schemas/OIDCAuth.d.ts +40 -0
  19. package/dist/types/forms/schemas/OIDCAuth.d.ts.map +1 -0
  20. package/dist/types/forms/schemas/OIDCCommon.d.ts +19 -0
  21. package/dist/types/forms/schemas/OIDCCommon.d.ts.map +1 -0
  22. package/dist/types/generator/FormGenerator.vue.d.ts +252 -0
  23. package/dist/types/generator/FormGenerator.vue.d.ts.map +1 -0
  24. package/dist/types/generator/FormGroup.vue.d.ts +74 -0
  25. package/dist/types/generator/FormGroup.vue.d.ts.map +1 -0
  26. package/dist/types/generator/FormMixin.vue.d.ts +10 -0
  27. package/dist/types/generator/FormMixin.vue.d.ts.map +1 -0
  28. package/dist/types/generator/fields/abstractField.d.ts +38 -0
  29. package/dist/types/generator/fields/abstractField.d.ts.map +1 -0
  30. package/dist/types/generator/fields/advanced/FieldAdvanced.vue.d.ts +48 -0
  31. package/dist/types/generator/fields/advanced/FieldAdvanced.vue.d.ts.map +1 -0
  32. package/dist/types/generator/fields/advanced/FieldArray.vue.d.ts +64 -0
  33. package/dist/types/generator/fields/advanced/FieldArray.vue.d.ts.map +1 -0
  34. package/dist/types/generator/fields/advanced/FieldArrayCardContainer.vue.d.ts +26 -0
  35. package/dist/types/generator/fields/advanced/FieldArrayCardContainer.vue.d.ts.map +1 -0
  36. package/dist/types/generator/fields/advanced/FieldArrayItem.vue.d.ts +19 -0
  37. package/dist/types/generator/fields/advanced/FieldArrayItem.vue.d.ts.map +1 -0
  38. package/dist/types/generator/fields/advanced/FieldArrayMultiItem.vue.d.ts +7 -0
  39. package/dist/types/generator/fields/advanced/FieldArrayMultiItem.vue.d.ts.map +1 -0
  40. package/dist/types/generator/fields/advanced/FieldAutoSuggest.vue.d.ts +63 -0
  41. package/dist/types/generator/fields/advanced/FieldAutoSuggest.vue.d.ts.map +1 -0
  42. package/dist/types/generator/fields/advanced/FieldMetric.vue.d.ts +19 -0
  43. package/dist/types/generator/fields/advanced/FieldMetric.vue.d.ts.map +1 -0
  44. package/dist/types/generator/fields/advanced/FieldObject.vue.d.ts +45 -0
  45. package/dist/types/generator/fields/advanced/FieldObject.vue.d.ts.map +1 -0
  46. package/dist/types/generator/fields/advanced/FieldObjectAdvanced.vue.d.ts +71 -0
  47. package/dist/types/generator/fields/advanced/FieldObjectAdvanced.vue.d.ts.map +1 -0
  48. package/dist/types/generator/fields/advanced/FieldRadio.vue.d.ts +43 -0
  49. package/dist/types/generator/fields/advanced/FieldRadio.vue.d.ts.map +1 -0
  50. package/dist/types/generator/fields/advanced/FieldSchema.vue.d.ts +19 -0
  51. package/dist/types/generator/fields/advanced/FieldSchema.vue.d.ts.map +1 -0
  52. package/dist/types/generator/fields/advanced/FieldSelectionGroup.vue.d.ts +56 -0
  53. package/dist/types/generator/fields/advanced/FieldSelectionGroup.vue.d.ts.map +1 -0
  54. package/dist/types/generator/fields/advanced/exports.d.ts +2 -0
  55. package/dist/types/generator/fields/advanced/exports.d.ts.map +1 -0
  56. package/dist/types/generator/fields/core/fieldCheckbox.vue.d.ts +37 -0
  57. package/dist/types/generator/fields/core/fieldCheckbox.vue.d.ts.map +1 -0
  58. package/dist/types/generator/fields/core/fieldChecklist.vue.d.ts +49 -0
  59. package/dist/types/generator/fields/core/fieldChecklist.vue.d.ts.map +1 -0
  60. package/dist/types/generator/fields/core/fieldInput.vue.d.ts +47 -0
  61. package/dist/types/generator/fields/core/fieldInput.vue.d.ts.map +1 -0
  62. package/dist/types/generator/fields/core/fieldLabel.vue.d.ts +37 -0
  63. package/dist/types/generator/fields/core/fieldLabel.vue.d.ts.map +1 -0
  64. package/dist/types/generator/fields/core/fieldRadios.vue.d.ts +47 -0
  65. package/dist/types/generator/fields/core/fieldRadios.vue.d.ts.map +1 -0
  66. package/dist/types/generator/fields/core/fieldSelect.vue.d.ts +46 -0
  67. package/dist/types/generator/fields/core/fieldSelect.vue.d.ts.map +1 -0
  68. package/dist/types/generator/fields/core/fieldSubmit.vue.d.ts +39 -0
  69. package/dist/types/generator/fields/core/fieldSubmit.vue.d.ts.map +1 -0
  70. package/dist/types/generator/fields/core/fieldTextArea.vue.d.ts +37 -0
  71. package/dist/types/generator/fields/core/fieldTextArea.vue.d.ts.map +1 -0
  72. package/dist/types/generator/fields/core/fieldUpload.vue.d.ts +39 -0
  73. package/dist/types/generator/fields/core/fieldUpload.vue.d.ts.map +1 -0
  74. package/dist/types/generator/fields/optional/fieldCleave.vue.d.ts +41 -0
  75. package/dist/types/generator/fields/optional/fieldCleave.vue.d.ts.map +1 -0
  76. package/dist/types/generator/fields/optional/fieldDateTimePicker.vue.d.ts +41 -0
  77. package/dist/types/generator/fields/optional/fieldDateTimePicker.vue.d.ts.map +1 -0
  78. package/dist/types/generator/fields/optional/fieldGoogleAddress.vue.d.ts +59 -0
  79. package/dist/types/generator/fields/optional/fieldGoogleAddress.vue.d.ts.map +1 -0
  80. package/dist/types/generator/fields/optional/fieldImage.vue.d.ts +52 -0
  81. package/dist/types/generator/fields/optional/fieldImage.vue.d.ts.map +1 -0
  82. package/dist/types/generator/fields/optional/fieldMasked.vue.d.ts +37 -0
  83. package/dist/types/generator/fields/optional/fieldMasked.vue.d.ts.map +1 -0
  84. package/dist/types/generator/fields/optional/fieldNoUiSlider.vue.d.ts +47 -0
  85. package/dist/types/generator/fields/optional/fieldNoUiSlider.vue.d.ts.map +1 -0
  86. package/dist/types/generator/fields/optional/fieldPikaday.vue.d.ts +45 -0
  87. package/dist/types/generator/fields/optional/fieldPikaday.vue.d.ts.map +1 -0
  88. package/dist/types/generator/fields/optional/fieldRangeSlider.vue.d.ts +39 -0
  89. package/dist/types/generator/fields/optional/fieldRangeSlider.vue.d.ts.map +1 -0
  90. package/dist/types/generator/fields/optional/fieldSelectEx.vue.d.ts +42 -0
  91. package/dist/types/generator/fields/optional/fieldSelectEx.vue.d.ts.map +1 -0
  92. package/dist/types/generator/fields/optional/fieldSpectrum.vue.d.ts +39 -0
  93. package/dist/types/generator/fields/optional/fieldSpectrum.vue.d.ts.map +1 -0
  94. package/dist/types/generator/fields/optional/fieldStaticMap.vue.d.ts +39 -0
  95. package/dist/types/generator/fields/optional/fieldStaticMap.vue.d.ts.map +1 -0
  96. package/dist/types/generator/fields/optional/fieldSwitch.vue.d.ts +40 -0
  97. package/dist/types/generator/fields/optional/fieldSwitch.vue.d.ts.map +1 -0
  98. package/dist/types/generator/fields/optional/fieldVueMultiSelect.vue.d.ts +49 -0
  99. package/dist/types/generator/fields/optional/fieldVueMultiSelect.vue.d.ts.map +1 -0
  100. package/dist/types/generator/utils/dateFieldHelper.d.ts +6 -0
  101. package/dist/types/generator/utils/dateFieldHelper.d.ts.map +1 -0
  102. package/dist/types/generator/utils/fieldsLoader.d.ts +35 -0
  103. package/dist/types/generator/utils/fieldsLoader.d.ts.map +1 -0
  104. package/dist/types/generator/utils/isValidUuid.d.ts +8 -0
  105. package/dist/types/generator/utils/isValidUuid.d.ts.map +1 -0
  106. package/dist/types/generator/utils/schema.d.ts +6 -0
  107. package/dist/types/generator/utils/schema.d.ts.map +1 -0
  108. package/dist/types/generator/utils/validators.d.ts +3 -0
  109. package/dist/types/generator/utils/validators.d.ts.map +1 -0
  110. package/dist/types/index.d.ts +22 -0
  111. package/dist/types/index.d.ts.map +1 -0
  112. package/package.json +69 -0
@@ -0,0 +1,49 @@
1
+ (function(Fe,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(Fe=typeof globalThis<"u"?globalThis:Fe||self,s(Fe["kong-ui-public-forms"]={},Fe.Vue))})(this,function(Fe,s){"use strict";var Tn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},S={},Sc={get exports(){return S},set exports(t){S=t}};/**
2
+ * @license
3
+ * Lodash <https://lodash.com/>
4
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
5
+ * Released under MIT license <https://lodash.com/license>
6
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
7
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
8
+ */(function(t,i){(function(){var o,l="4.17.21",c=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",m="Invalid `variable` option passed into `_.template`",E="__lodash_hash_undefined__",v=500,w="__lodash_placeholder__",I=1,k=2,H=4,oe=1,J=2,Z=1,Q=2,_e=4,re=8,Ee=16,ce=32,Ie=64,De=128,Mt=256,ui=512,cp=30,up="...",hp=800,dp=16,Ws=1,fp=2,mp=3,qt=1/0,Ft=9007199254740991,pp=17976931348623157e292,tr=0/0,ft=4294967295,gp=ft-1,_p=ft>>>1,yp=[["ary",De],["bind",Z],["bindKey",Q],["curry",re],["curryRight",Ee],["flip",ui],["partial",ce],["partialRight",Ie],["rearg",Mt]],an="[object Arguments]",nr="[object Array]",bp="[object AsyncFunction]",An="[object Boolean]",Nn="[object Date]",Ep="[object DOMException]",rr="[object Error]",ir="[object Function]",qs="[object GeneratorFunction]",it="[object Map]",In="[object Number]",vp="[object Null]",bt="[object Object]",zs="[object Promise]",wp="[object Proxy]",kn="[object RegExp]",ot="[object Set]",On="[object String]",or="[object Symbol]",Tp="[object Undefined]",Mn="[object WeakMap]",Sp="[object WeakSet]",Fn="[object ArrayBuffer]",ln="[object DataView]",hi="[object Float32Array]",di="[object Float64Array]",fi="[object Int8Array]",mi="[object Int16Array]",pi="[object Int32Array]",gi="[object Uint8Array]",_i="[object Uint8ClampedArray]",yi="[object Uint16Array]",bi="[object Uint32Array]",Cp=/\b__p \+= '';/g,Bp=/\b(__p \+=) '' \+/g,Ap=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Zs=/&(?:amp|lt|gt|quot|#39);/g,Xs=/[&<>"']/g,Np=RegExp(Zs.source),Ip=RegExp(Xs.source),kp=/<%-([\s\S]+?)%>/g,Op=/<%([\s\S]+?)%>/g,js=/<%=([\s\S]+?)%>/g,Mp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fp=/^\w*$/,Lp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ei=/[\\^$.*+?()[\]{}|]/g,Rp=RegExp(Ei.source),vi=/^\s+/,Dp=/\s/,Pp=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Hp=/\{\n\/\* \[wrapped with (.+)\] \*/,Up=/,? & /,Vp=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$p=/[()=,{}\[\]\/\s]/,xp=/\\(\\)?/g,Gp=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Js=/\w*$/,Kp=/^[-+]0x[0-9a-f]+$/i,Yp=/^0b[01]+$/i,Wp=/^\[object .+?Constructor\]$/,qp=/^0o[0-7]+$/i,zp=/^(?:0|[1-9]\d*)$/,Zp=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,sr=/($^)/,Xp=/['\n\r\u2028\u2029\\]/g,ar="\\ud800-\\udfff",jp="\\u0300-\\u036f",Jp="\\ufe20-\\ufe2f",Qp="\\u20d0-\\u20ff",Qs=jp+Jp+Qp,ea="\\u2700-\\u27bf",ta="a-z\\xdf-\\xf6\\xf8-\\xff",eg="\\xac\\xb1\\xd7\\xf7",tg="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ng="\\u2000-\\u206f",rg=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",na="A-Z\\xc0-\\xd6\\xd8-\\xde",ra="\\ufe0e\\ufe0f",ia=eg+tg+ng+rg,wi="['’]",ig="["+ar+"]",oa="["+ia+"]",lr="["+Qs+"]",sa="\\d+",og="["+ea+"]",aa="["+ta+"]",la="[^"+ar+ia+sa+ea+ta+na+"]",Ti="\\ud83c[\\udffb-\\udfff]",sg="(?:"+lr+"|"+Ti+")",ca="[^"+ar+"]",Si="(?:\\ud83c[\\udde6-\\uddff]){2}",Ci="[\\ud800-\\udbff][\\udc00-\\udfff]",cn="["+na+"]",ua="\\u200d",ha="(?:"+aa+"|"+la+")",ag="(?:"+cn+"|"+la+")",da="(?:"+wi+"(?:d|ll|m|re|s|t|ve))?",fa="(?:"+wi+"(?:D|LL|M|RE|S|T|VE))?",ma=sg+"?",pa="["+ra+"]?",lg="(?:"+ua+"(?:"+[ca,Si,Ci].join("|")+")"+pa+ma+")*",cg="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ug="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ga=pa+ma+lg,hg="(?:"+[og,Si,Ci].join("|")+")"+ga,dg="(?:"+[ca+lr+"?",lr,Si,Ci,ig].join("|")+")",fg=RegExp(wi,"g"),mg=RegExp(lr,"g"),Bi=RegExp(Ti+"(?="+Ti+")|"+dg+ga,"g"),pg=RegExp([cn+"?"+aa+"+"+da+"(?="+[oa,cn,"$"].join("|")+")",ag+"+"+fa+"(?="+[oa,cn+ha,"$"].join("|")+")",cn+"?"+ha+"+"+da,cn+"+"+fa,ug,cg,sa,hg].join("|"),"g"),gg=RegExp("["+ua+ar+Qs+ra+"]"),_g=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,yg=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],bg=-1,ue={};ue[hi]=ue[di]=ue[fi]=ue[mi]=ue[pi]=ue[gi]=ue[_i]=ue[yi]=ue[bi]=!0,ue[an]=ue[nr]=ue[Fn]=ue[An]=ue[ln]=ue[Nn]=ue[rr]=ue[ir]=ue[it]=ue[In]=ue[bt]=ue[kn]=ue[ot]=ue[On]=ue[Mn]=!1;var ae={};ae[an]=ae[nr]=ae[Fn]=ae[ln]=ae[An]=ae[Nn]=ae[hi]=ae[di]=ae[fi]=ae[mi]=ae[pi]=ae[it]=ae[In]=ae[bt]=ae[kn]=ae[ot]=ae[On]=ae[or]=ae[gi]=ae[_i]=ae[yi]=ae[bi]=!0,ae[rr]=ae[ir]=ae[Mn]=!1;var Eg={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},vg={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},wg={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Tg={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Sg=parseFloat,Cg=parseInt,_a=typeof Tn=="object"&&Tn&&Tn.Object===Object&&Tn,Bg=typeof self=="object"&&self&&self.Object===Object&&self,we=_a||Bg||Function("return this")(),Ai=i&&!i.nodeType&&i,zt=Ai&&!0&&t&&!t.nodeType&&t,ya=zt&&zt.exports===Ai,Ni=ya&&_a.process,Ze=function(){try{var y=zt&&zt.require&&zt.require("util").types;return y||Ni&&Ni.binding&&Ni.binding("util")}catch{}}(),ba=Ze&&Ze.isArrayBuffer,Ea=Ze&&Ze.isDate,va=Ze&&Ze.isMap,wa=Ze&&Ze.isRegExp,Ta=Ze&&Ze.isSet,Sa=Ze&&Ze.isTypedArray;function $e(y,C,T){switch(T.length){case 0:return y.call(C);case 1:return y.call(C,T[0]);case 2:return y.call(C,T[0],T[1]);case 3:return y.call(C,T[0],T[1],T[2])}return y.apply(C,T)}function Ag(y,C,T,M){for(var U=-1,ee=y==null?0:y.length;++U<ee;){var ye=y[U];C(M,ye,T(ye),y)}return M}function Xe(y,C){for(var T=-1,M=y==null?0:y.length;++T<M&&C(y[T],T,y)!==!1;);return y}function Ng(y,C){for(var T=y==null?0:y.length;T--&&C(y[T],T,y)!==!1;);return y}function Ca(y,C){for(var T=-1,M=y==null?0:y.length;++T<M;)if(!C(y[T],T,y))return!1;return!0}function Lt(y,C){for(var T=-1,M=y==null?0:y.length,U=0,ee=[];++T<M;){var ye=y[T];C(ye,T,y)&&(ee[U++]=ye)}return ee}function cr(y,C){var T=y==null?0:y.length;return!!T&&un(y,C,0)>-1}function Ii(y,C,T){for(var M=-1,U=y==null?0:y.length;++M<U;)if(T(C,y[M]))return!0;return!1}function he(y,C){for(var T=-1,M=y==null?0:y.length,U=Array(M);++T<M;)U[T]=C(y[T],T,y);return U}function Rt(y,C){for(var T=-1,M=C.length,U=y.length;++T<M;)y[U+T]=C[T];return y}function ki(y,C,T,M){var U=-1,ee=y==null?0:y.length;for(M&&ee&&(T=y[++U]);++U<ee;)T=C(T,y[U],U,y);return T}function Ig(y,C,T,M){var U=y==null?0:y.length;for(M&&U&&(T=y[--U]);U--;)T=C(T,y[U],U,y);return T}function Oi(y,C){for(var T=-1,M=y==null?0:y.length;++T<M;)if(C(y[T],T,y))return!0;return!1}var kg=Mi("length");function Og(y){return y.split("")}function Mg(y){return y.match(Vp)||[]}function Ba(y,C,T){var M;return T(y,function(U,ee,ye){if(C(U,ee,ye))return M=ee,!1}),M}function ur(y,C,T,M){for(var U=y.length,ee=T+(M?1:-1);M?ee--:++ee<U;)if(C(y[ee],ee,y))return ee;return-1}function un(y,C,T){return C===C?Kg(y,C,T):ur(y,Aa,T)}function Fg(y,C,T,M){for(var U=T-1,ee=y.length;++U<ee;)if(M(y[U],C))return U;return-1}function Aa(y){return y!==y}function Na(y,C){var T=y==null?0:y.length;return T?Li(y,C)/T:tr}function Mi(y){return function(C){return C==null?o:C[y]}}function Fi(y){return function(C){return y==null?o:y[C]}}function Ia(y,C,T,M,U){return U(y,function(ee,ye,se){T=M?(M=!1,ee):C(T,ee,ye,se)}),T}function Lg(y,C){var T=y.length;for(y.sort(C);T--;)y[T]=y[T].value;return y}function Li(y,C){for(var T,M=-1,U=y.length;++M<U;){var ee=C(y[M]);ee!==o&&(T=T===o?ee:T+ee)}return T}function Ri(y,C){for(var T=-1,M=Array(y);++T<y;)M[T]=C(T);return M}function Rg(y,C){return he(C,function(T){return[T,y[T]]})}function ka(y){return y&&y.slice(0,La(y)+1).replace(vi,"")}function xe(y){return function(C){return y(C)}}function Di(y,C){return he(C,function(T){return y[T]})}function Ln(y,C){return y.has(C)}function Oa(y,C){for(var T=-1,M=y.length;++T<M&&un(C,y[T],0)>-1;);return T}function Ma(y,C){for(var T=y.length;T--&&un(C,y[T],0)>-1;);return T}function Dg(y,C){for(var T=y.length,M=0;T--;)y[T]===C&&++M;return M}var Pg=Fi(Eg),Hg=Fi(vg);function Ug(y){return"\\"+Tg[y]}function Vg(y,C){return y==null?o:y[C]}function hn(y){return gg.test(y)}function $g(y){return _g.test(y)}function xg(y){for(var C,T=[];!(C=y.next()).done;)T.push(C.value);return T}function Pi(y){var C=-1,T=Array(y.size);return y.forEach(function(M,U){T[++C]=[U,M]}),T}function Fa(y,C){return function(T){return y(C(T))}}function Dt(y,C){for(var T=-1,M=y.length,U=0,ee=[];++T<M;){var ye=y[T];(ye===C||ye===w)&&(y[T]=w,ee[U++]=T)}return ee}function hr(y){var C=-1,T=Array(y.size);return y.forEach(function(M){T[++C]=M}),T}function Gg(y){var C=-1,T=Array(y.size);return y.forEach(function(M){T[++C]=[M,M]}),T}function Kg(y,C,T){for(var M=T-1,U=y.length;++M<U;)if(y[M]===C)return M;return-1}function Yg(y,C,T){for(var M=T+1;M--;)if(y[M]===C)return M;return M}function dn(y){return hn(y)?qg(y):kg(y)}function st(y){return hn(y)?zg(y):Og(y)}function La(y){for(var C=y.length;C--&&Dp.test(y.charAt(C)););return C}var Wg=Fi(wg);function qg(y){for(var C=Bi.lastIndex=0;Bi.test(y);)++C;return C}function zg(y){return y.match(Bi)||[]}function Zg(y){return y.match(pg)||[]}var Xg=function y(C){C=C==null?we:fn.defaults(we.Object(),C,fn.pick(we,yg));var T=C.Array,M=C.Date,U=C.Error,ee=C.Function,ye=C.Math,se=C.Object,Hi=C.RegExp,jg=C.String,je=C.TypeError,dr=T.prototype,Jg=ee.prototype,mn=se.prototype,fr=C["__core-js_shared__"],mr=Jg.toString,ie=mn.hasOwnProperty,Qg=0,Ra=function(){var e=/[^.]+$/.exec(fr&&fr.keys&&fr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),pr=mn.toString,e_=mr.call(se),t_=we._,n_=Hi("^"+mr.call(ie).replace(Ei,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gr=ya?C.Buffer:o,Pt=C.Symbol,_r=C.Uint8Array,Da=gr?gr.allocUnsafe:o,yr=Fa(se.getPrototypeOf,se),Pa=se.create,Ha=mn.propertyIsEnumerable,br=dr.splice,Ua=Pt?Pt.isConcatSpreadable:o,Rn=Pt?Pt.iterator:o,Zt=Pt?Pt.toStringTag:o,Er=function(){try{var e=en(se,"defineProperty");return e({},"",{}),e}catch{}}(),r_=C.clearTimeout!==we.clearTimeout&&C.clearTimeout,i_=M&&M.now!==we.Date.now&&M.now,o_=C.setTimeout!==we.setTimeout&&C.setTimeout,vr=ye.ceil,wr=ye.floor,Ui=se.getOwnPropertySymbols,s_=gr?gr.isBuffer:o,Va=C.isFinite,a_=dr.join,l_=Fa(se.keys,se),be=ye.max,Be=ye.min,c_=M.now,u_=C.parseInt,$a=ye.random,h_=dr.reverse,Vi=en(C,"DataView"),Dn=en(C,"Map"),$i=en(C,"Promise"),pn=en(C,"Set"),Pn=en(C,"WeakMap"),Hn=en(se,"create"),Tr=Pn&&new Pn,gn={},d_=tn(Vi),f_=tn(Dn),m_=tn($i),p_=tn(pn),g_=tn(Pn),Sr=Pt?Pt.prototype:o,Un=Sr?Sr.valueOf:o,xa=Sr?Sr.toString:o;function d(e){if(me(e)&&!V(e)&&!(e instanceof q)){if(e instanceof Je)return e;if(ie.call(e,"__wrapped__"))return Gl(e)}return new Je(e)}var _n=function(){function e(){}return function(n){if(!fe(n))return{};if(Pa)return Pa(n);e.prototype=n;var r=new e;return e.prototype=o,r}}();function Cr(){}function Je(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=o}d.templateSettings={escape:kp,evaluate:Op,interpolate:js,variable:"",imports:{_:d}},d.prototype=Cr.prototype,d.prototype.constructor=d,Je.prototype=_n(Cr.prototype),Je.prototype.constructor=Je;function q(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ft,this.__views__=[]}function __(){var e=new q(this.__wrapped__);return e.__actions__=Pe(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Pe(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Pe(this.__views__),e}function y_(){if(this.__filtered__){var e=new q(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function b_(){var e=this.__wrapped__.value(),n=this.__dir__,r=V(e),a=n<0,h=r?e.length:0,f=O0(0,h,this.__views__),g=f.start,_=f.end,b=_-g,B=a?_:g-1,A=this.__iteratees__,N=A.length,O=0,F=Be(b,this.__takeCount__);if(!r||!a&&h==b&&F==b)return dl(e,this.__actions__);var D=[];e:for(;b--&&O<F;){B+=n;for(var G=-1,P=e[B];++G<N;){var W=A[G],X=W.iteratee,Ye=W.type,Me=X(P);if(Ye==fp)P=Me;else if(!Me){if(Ye==Ws)continue e;break e}}D[O++]=P}return D}q.prototype=_n(Cr.prototype),q.prototype.constructor=q;function Xt(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var a=e[n];this.set(a[0],a[1])}}function E_(){this.__data__=Hn?Hn(null):{},this.size=0}function v_(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}function w_(e){var n=this.__data__;if(Hn){var r=n[e];return r===E?o:r}return ie.call(n,e)?n[e]:o}function T_(e){var n=this.__data__;return Hn?n[e]!==o:ie.call(n,e)}function S_(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Hn&&n===o?E:n,this}Xt.prototype.clear=E_,Xt.prototype.delete=v_,Xt.prototype.get=w_,Xt.prototype.has=T_,Xt.prototype.set=S_;function Et(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var a=e[n];this.set(a[0],a[1])}}function C_(){this.__data__=[],this.size=0}function B_(e){var n=this.__data__,r=Br(n,e);if(r<0)return!1;var a=n.length-1;return r==a?n.pop():br.call(n,r,1),--this.size,!0}function A_(e){var n=this.__data__,r=Br(n,e);return r<0?o:n[r][1]}function N_(e){return Br(this.__data__,e)>-1}function I_(e,n){var r=this.__data__,a=Br(r,e);return a<0?(++this.size,r.push([e,n])):r[a][1]=n,this}Et.prototype.clear=C_,Et.prototype.delete=B_,Et.prototype.get=A_,Et.prototype.has=N_,Et.prototype.set=I_;function vt(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var a=e[n];this.set(a[0],a[1])}}function k_(){this.size=0,this.__data__={hash:new Xt,map:new(Dn||Et),string:new Xt}}function O_(e){var n=Hr(this,e).delete(e);return this.size-=n?1:0,n}function M_(e){return Hr(this,e).get(e)}function F_(e){return Hr(this,e).has(e)}function L_(e,n){var r=Hr(this,e),a=r.size;return r.set(e,n),this.size+=r.size==a?0:1,this}vt.prototype.clear=k_,vt.prototype.delete=O_,vt.prototype.get=M_,vt.prototype.has=F_,vt.prototype.set=L_;function jt(e){var n=-1,r=e==null?0:e.length;for(this.__data__=new vt;++n<r;)this.add(e[n])}function R_(e){return this.__data__.set(e,E),this}function D_(e){return this.__data__.has(e)}jt.prototype.add=jt.prototype.push=R_,jt.prototype.has=D_;function at(e){var n=this.__data__=new Et(e);this.size=n.size}function P_(){this.__data__=new Et,this.size=0}function H_(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}function U_(e){return this.__data__.get(e)}function V_(e){return this.__data__.has(e)}function $_(e,n){var r=this.__data__;if(r instanceof Et){var a=r.__data__;if(!Dn||a.length<c-1)return a.push([e,n]),this.size=++r.size,this;r=this.__data__=new vt(a)}return r.set(e,n),this.size=r.size,this}at.prototype.clear=P_,at.prototype.delete=H_,at.prototype.get=U_,at.prototype.has=V_,at.prototype.set=$_;function Ga(e,n){var r=V(e),a=!r&&nn(e),h=!r&&!a&&xt(e),f=!r&&!a&&!h&&vn(e),g=r||a||h||f,_=g?Ri(e.length,jg):[],b=_.length;for(var B in e)(n||ie.call(e,B))&&!(g&&(B=="length"||h&&(B=="offset"||B=="parent")||f&&(B=="buffer"||B=="byteLength"||B=="byteOffset")||Ct(B,b)))&&_.push(B);return _}function Ka(e){var n=e.length;return n?e[Ji(0,n-1)]:o}function x_(e,n){return Ur(Pe(e),Jt(n,0,e.length))}function G_(e){return Ur(Pe(e))}function xi(e,n,r){(r!==o&&!lt(e[n],r)||r===o&&!(n in e))&&wt(e,n,r)}function Vn(e,n,r){var a=e[n];(!(ie.call(e,n)&&lt(a,r))||r===o&&!(n in e))&&wt(e,n,r)}function Br(e,n){for(var r=e.length;r--;)if(lt(e[r][0],n))return r;return-1}function K_(e,n,r,a){return Ht(e,function(h,f,g){n(a,h,r(h),g)}),a}function Ya(e,n){return e&&pt(n,ve(n),e)}function Y_(e,n){return e&&pt(n,Ue(n),e)}function wt(e,n,r){n=="__proto__"&&Er?Er(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r}function Gi(e,n){for(var r=-1,a=n.length,h=T(a),f=e==null;++r<a;)h[r]=f?o:So(e,n[r]);return h}function Jt(e,n,r){return e===e&&(r!==o&&(e=e<=r?e:r),n!==o&&(e=e>=n?e:n)),e}function Qe(e,n,r,a,h,f){var g,_=n&I,b=n&k,B=n&H;if(r&&(g=h?r(e,a,h,f):r(e)),g!==o)return g;if(!fe(e))return e;var A=V(e);if(A){if(g=F0(e),!_)return Pe(e,g)}else{var N=Ae(e),O=N==ir||N==qs;if(xt(e))return pl(e,_);if(N==bt||N==an||O&&!h){if(g=b||O?{}:Ll(e),!_)return b?w0(e,Y_(g,e)):v0(e,Ya(g,e))}else{if(!ae[N])return h?e:{};g=L0(e,N,_)}}f||(f=new at);var F=f.get(e);if(F)return F;f.set(e,g),cc(e)?e.forEach(function(P){g.add(Qe(P,n,r,P,e,f))}):ac(e)&&e.forEach(function(P,W){g.set(W,Qe(P,n,r,W,e,f))});var D=B?b?co:lo:b?Ue:ve,G=A?o:D(e);return Xe(G||e,function(P,W){G&&(W=P,P=e[W]),Vn(g,W,Qe(P,n,r,W,e,f))}),g}function W_(e){var n=ve(e);return function(r){return Wa(r,e,n)}}function Wa(e,n,r){var a=r.length;if(e==null)return!a;for(e=se(e);a--;){var h=r[a],f=n[h],g=e[h];if(g===o&&!(h in e)||!f(g))return!1}return!0}function qa(e,n,r){if(typeof e!="function")throw new je(p);return qn(function(){e.apply(o,r)},n)}function $n(e,n,r,a){var h=-1,f=cr,g=!0,_=e.length,b=[],B=n.length;if(!_)return b;r&&(n=he(n,xe(r))),a?(f=Ii,g=!1):n.length>=c&&(f=Ln,g=!1,n=new jt(n));e:for(;++h<_;){var A=e[h],N=r==null?A:r(A);if(A=a||A!==0?A:0,g&&N===N){for(var O=B;O--;)if(n[O]===N)continue e;b.push(A)}else f(n,N,a)||b.push(A)}return b}var Ht=El(mt),za=El(Yi,!0);function q_(e,n){var r=!0;return Ht(e,function(a,h,f){return r=!!n(a,h,f),r}),r}function Ar(e,n,r){for(var a=-1,h=e.length;++a<h;){var f=e[a],g=n(f);if(g!=null&&(_===o?g===g&&!Ke(g):r(g,_)))var _=g,b=f}return b}function z_(e,n,r,a){var h=e.length;for(r=x(r),r<0&&(r=-r>h?0:h+r),a=a===o||a>h?h:x(a),a<0&&(a+=h),a=r>a?0:hc(a);r<a;)e[r++]=n;return e}function Za(e,n){var r=[];return Ht(e,function(a,h,f){n(a,h,f)&&r.push(a)}),r}function Te(e,n,r,a,h){var f=-1,g=e.length;for(r||(r=D0),h||(h=[]);++f<g;){var _=e[f];n>0&&r(_)?n>1?Te(_,n-1,r,a,h):Rt(h,_):a||(h[h.length]=_)}return h}var Ki=vl(),Xa=vl(!0);function mt(e,n){return e&&Ki(e,n,ve)}function Yi(e,n){return e&&Xa(e,n,ve)}function Nr(e,n){return Lt(n,function(r){return Bt(e[r])})}function Qt(e,n){n=Vt(n,e);for(var r=0,a=n.length;e!=null&&r<a;)e=e[gt(n[r++])];return r&&r==a?e:o}function ja(e,n,r){var a=n(e);return V(e)?a:Rt(a,r(e))}function ke(e){return e==null?e===o?Tp:vp:Zt&&Zt in se(e)?k0(e):G0(e)}function Wi(e,n){return e>n}function Z_(e,n){return e!=null&&ie.call(e,n)}function X_(e,n){return e!=null&&n in se(e)}function j_(e,n,r){return e>=Be(n,r)&&e<be(n,r)}function qi(e,n,r){for(var a=r?Ii:cr,h=e[0].length,f=e.length,g=f,_=T(f),b=1/0,B=[];g--;){var A=e[g];g&&n&&(A=he(A,xe(n))),b=Be(A.length,b),_[g]=!r&&(n||h>=120&&A.length>=120)?new jt(g&&A):o}A=e[0];var N=-1,O=_[0];e:for(;++N<h&&B.length<b;){var F=A[N],D=n?n(F):F;if(F=r||F!==0?F:0,!(O?Ln(O,D):a(B,D,r))){for(g=f;--g;){var G=_[g];if(!(G?Ln(G,D):a(e[g],D,r)))continue e}O&&O.push(D),B.push(F)}}return B}function J_(e,n,r,a){return mt(e,function(h,f,g){n(a,r(h),f,g)}),a}function xn(e,n,r){n=Vt(n,e),e=Hl(e,n);var a=e==null?e:e[gt(tt(n))];return a==null?o:$e(a,e,r)}function Ja(e){return me(e)&&ke(e)==an}function Q_(e){return me(e)&&ke(e)==Fn}function e0(e){return me(e)&&ke(e)==Nn}function Gn(e,n,r,a,h){return e===n?!0:e==null||n==null||!me(e)&&!me(n)?e!==e&&n!==n:t0(e,n,r,a,Gn,h)}function t0(e,n,r,a,h,f){var g=V(e),_=V(n),b=g?nr:Ae(e),B=_?nr:Ae(n);b=b==an?bt:b,B=B==an?bt:B;var A=b==bt,N=B==bt,O=b==B;if(O&&xt(e)){if(!xt(n))return!1;g=!0,A=!1}if(O&&!A)return f||(f=new at),g||vn(e)?Ol(e,n,r,a,h,f):N0(e,n,b,r,a,h,f);if(!(r&oe)){var F=A&&ie.call(e,"__wrapped__"),D=N&&ie.call(n,"__wrapped__");if(F||D){var G=F?e.value():e,P=D?n.value():n;return f||(f=new at),h(G,P,r,a,f)}}return O?(f||(f=new at),I0(e,n,r,a,h,f)):!1}function n0(e){return me(e)&&Ae(e)==it}function zi(e,n,r,a){var h=r.length,f=h,g=!a;if(e==null)return!f;for(e=se(e);h--;){var _=r[h];if(g&&_[2]?_[1]!==e[_[0]]:!(_[0]in e))return!1}for(;++h<f;){_=r[h];var b=_[0],B=e[b],A=_[1];if(g&&_[2]){if(B===o&&!(b in e))return!1}else{var N=new at;if(a)var O=a(B,A,b,e,n,N);if(!(O===o?Gn(A,B,oe|J,a,N):O))return!1}}return!0}function Qa(e){if(!fe(e)||H0(e))return!1;var n=Bt(e)?n_:Wp;return n.test(tn(e))}function r0(e){return me(e)&&ke(e)==kn}function i0(e){return me(e)&&Ae(e)==ot}function o0(e){return me(e)&&Yr(e.length)&&!!ue[ke(e)]}function el(e){return typeof e=="function"?e:e==null?Ve:typeof e=="object"?V(e)?rl(e[0],e[1]):nl(e):wc(e)}function Zi(e){if(!Wn(e))return l_(e);var n=[];for(var r in se(e))ie.call(e,r)&&r!="constructor"&&n.push(r);return n}function s0(e){if(!fe(e))return x0(e);var n=Wn(e),r=[];for(var a in e)a=="constructor"&&(n||!ie.call(e,a))||r.push(a);return r}function Xi(e,n){return e<n}function tl(e,n){var r=-1,a=He(e)?T(e.length):[];return Ht(e,function(h,f,g){a[++r]=n(h,f,g)}),a}function nl(e){var n=ho(e);return n.length==1&&n[0][2]?Dl(n[0][0],n[0][1]):function(r){return r===e||zi(r,e,n)}}function rl(e,n){return mo(e)&&Rl(n)?Dl(gt(e),n):function(r){var a=So(r,e);return a===o&&a===n?Co(r,e):Gn(n,a,oe|J)}}function Ir(e,n,r,a,h){e!==n&&Ki(n,function(f,g){if(h||(h=new at),fe(f))a0(e,n,g,r,Ir,a,h);else{var _=a?a(go(e,g),f,g+"",e,n,h):o;_===o&&(_=f),xi(e,g,_)}},Ue)}function a0(e,n,r,a,h,f,g){var _=go(e,r),b=go(n,r),B=g.get(b);if(B){xi(e,r,B);return}var A=f?f(_,b,r+"",e,n,g):o,N=A===o;if(N){var O=V(b),F=!O&&xt(b),D=!O&&!F&&vn(b);A=b,O||F||D?V(_)?A=_:pe(_)?A=Pe(_):F?(N=!1,A=pl(b,!0)):D?(N=!1,A=gl(b,!0)):A=[]:zn(b)||nn(b)?(A=_,nn(_)?A=dc(_):(!fe(_)||Bt(_))&&(A=Ll(b))):N=!1}N&&(g.set(b,A),h(A,b,a,f,g),g.delete(b)),xi(e,r,A)}function il(e,n){var r=e.length;if(r)return n+=n<0?r:0,Ct(n,r)?e[n]:o}function ol(e,n,r){n.length?n=he(n,function(f){return V(f)?function(g){return Qt(g,f.length===1?f[0]:f)}:f}):n=[Ve];var a=-1;n=he(n,xe(R()));var h=tl(e,function(f,g,_){var b=he(n,function(B){return B(f)});return{criteria:b,index:++a,value:f}});return Lg(h,function(f,g){return E0(f,g,r)})}function l0(e,n){return sl(e,n,function(r,a){return Co(e,a)})}function sl(e,n,r){for(var a=-1,h=n.length,f={};++a<h;){var g=n[a],_=Qt(e,g);r(_,g)&&Kn(f,Vt(g,e),_)}return f}function c0(e){return function(n){return Qt(n,e)}}function ji(e,n,r,a){var h=a?Fg:un,f=-1,g=n.length,_=e;for(e===n&&(n=Pe(n)),r&&(_=he(e,xe(r)));++f<g;)for(var b=0,B=n[f],A=r?r(B):B;(b=h(_,A,b,a))>-1;)_!==e&&br.call(_,b,1),br.call(e,b,1);return e}function al(e,n){for(var r=e?n.length:0,a=r-1;r--;){var h=n[r];if(r==a||h!==f){var f=h;Ct(h)?br.call(e,h,1):to(e,h)}}return e}function Ji(e,n){return e+wr($a()*(n-e+1))}function u0(e,n,r,a){for(var h=-1,f=be(vr((n-e)/(r||1)),0),g=T(f);f--;)g[a?f:++h]=e,e+=r;return g}function Qi(e,n){var r="";if(!e||n<1||n>Ft)return r;do n%2&&(r+=e),n=wr(n/2),n&&(e+=e);while(n);return r}function K(e,n){return _o(Pl(e,n,Ve),e+"")}function h0(e){return Ka(wn(e))}function d0(e,n){var r=wn(e);return Ur(r,Jt(n,0,r.length))}function Kn(e,n,r,a){if(!fe(e))return e;n=Vt(n,e);for(var h=-1,f=n.length,g=f-1,_=e;_!=null&&++h<f;){var b=gt(n[h]),B=r;if(b==="__proto__"||b==="constructor"||b==="prototype")return e;if(h!=g){var A=_[b];B=a?a(A,b,_):o,B===o&&(B=fe(A)?A:Ct(n[h+1])?[]:{})}Vn(_,b,B),_=_[b]}return e}var ll=Tr?function(e,n){return Tr.set(e,n),e}:Ve,f0=Er?function(e,n){return Er(e,"toString",{configurable:!0,enumerable:!1,value:Ao(n),writable:!0})}:Ve;function m0(e){return Ur(wn(e))}function et(e,n,r){var a=-1,h=e.length;n<0&&(n=-n>h?0:h+n),r=r>h?h:r,r<0&&(r+=h),h=n>r?0:r-n>>>0,n>>>=0;for(var f=T(h);++a<h;)f[a]=e[a+n];return f}function p0(e,n){var r;return Ht(e,function(a,h,f){return r=n(a,h,f),!r}),!!r}function kr(e,n,r){var a=0,h=e==null?a:e.length;if(typeof n=="number"&&n===n&&h<=_p){for(;a<h;){var f=a+h>>>1,g=e[f];g!==null&&!Ke(g)&&(r?g<=n:g<n)?a=f+1:h=f}return h}return eo(e,n,Ve,r)}function eo(e,n,r,a){var h=0,f=e==null?0:e.length;if(f===0)return 0;n=r(n);for(var g=n!==n,_=n===null,b=Ke(n),B=n===o;h<f;){var A=wr((h+f)/2),N=r(e[A]),O=N!==o,F=N===null,D=N===N,G=Ke(N);if(g)var P=a||D;else B?P=D&&(a||O):_?P=D&&O&&(a||!F):b?P=D&&O&&!F&&(a||!G):F||G?P=!1:P=a?N<=n:N<n;P?h=A+1:f=A}return Be(f,gp)}function cl(e,n){for(var r=-1,a=e.length,h=0,f=[];++r<a;){var g=e[r],_=n?n(g):g;if(!r||!lt(_,b)){var b=_;f[h++]=g===0?0:g}}return f}function ul(e){return typeof e=="number"?e:Ke(e)?tr:+e}function Ge(e){if(typeof e=="string")return e;if(V(e))return he(e,Ge)+"";if(Ke(e))return xa?xa.call(e):"";var n=e+"";return n=="0"&&1/e==-qt?"-0":n}function Ut(e,n,r){var a=-1,h=cr,f=e.length,g=!0,_=[],b=_;if(r)g=!1,h=Ii;else if(f>=c){var B=n?null:B0(e);if(B)return hr(B);g=!1,h=Ln,b=new jt}else b=n?[]:_;e:for(;++a<f;){var A=e[a],N=n?n(A):A;if(A=r||A!==0?A:0,g&&N===N){for(var O=b.length;O--;)if(b[O]===N)continue e;n&&b.push(N),_.push(A)}else h(b,N,r)||(b!==_&&b.push(N),_.push(A))}return _}function to(e,n){return n=Vt(n,e),e=Hl(e,n),e==null||delete e[gt(tt(n))]}function hl(e,n,r,a){return Kn(e,n,r(Qt(e,n)),a)}function Or(e,n,r,a){for(var h=e.length,f=a?h:-1;(a?f--:++f<h)&&n(e[f],f,e););return r?et(e,a?0:f,a?f+1:h):et(e,a?f+1:0,a?h:f)}function dl(e,n){var r=e;return r instanceof q&&(r=r.value()),ki(n,function(a,h){return h.func.apply(h.thisArg,Rt([a],h.args))},r)}function no(e,n,r){var a=e.length;if(a<2)return a?Ut(e[0]):[];for(var h=-1,f=T(a);++h<a;)for(var g=e[h],_=-1;++_<a;)_!=h&&(f[h]=$n(f[h]||g,e[_],n,r));return Ut(Te(f,1),n,r)}function fl(e,n,r){for(var a=-1,h=e.length,f=n.length,g={};++a<h;){var _=a<f?n[a]:o;r(g,e[a],_)}return g}function ro(e){return pe(e)?e:[]}function io(e){return typeof e=="function"?e:Ve}function Vt(e,n){return V(e)?e:mo(e,n)?[e]:xl(ne(e))}var g0=K;function $t(e,n,r){var a=e.length;return r=r===o?a:r,!n&&r>=a?e:et(e,n,r)}var ml=r_||function(e){return we.clearTimeout(e)};function pl(e,n){if(n)return e.slice();var r=e.length,a=Da?Da(r):new e.constructor(r);return e.copy(a),a}function oo(e){var n=new e.constructor(e.byteLength);return new _r(n).set(new _r(e)),n}function _0(e,n){var r=n?oo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function y0(e){var n=new e.constructor(e.source,Js.exec(e));return n.lastIndex=e.lastIndex,n}function b0(e){return Un?se(Un.call(e)):{}}function gl(e,n){var r=n?oo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function _l(e,n){if(e!==n){var r=e!==o,a=e===null,h=e===e,f=Ke(e),g=n!==o,_=n===null,b=n===n,B=Ke(n);if(!_&&!B&&!f&&e>n||f&&g&&b&&!_&&!B||a&&g&&b||!r&&b||!h)return 1;if(!a&&!f&&!B&&e<n||B&&r&&h&&!a&&!f||_&&r&&h||!g&&h||!b)return-1}return 0}function E0(e,n,r){for(var a=-1,h=e.criteria,f=n.criteria,g=h.length,_=r.length;++a<g;){var b=_l(h[a],f[a]);if(b){if(a>=_)return b;var B=r[a];return b*(B=="desc"?-1:1)}}return e.index-n.index}function yl(e,n,r,a){for(var h=-1,f=e.length,g=r.length,_=-1,b=n.length,B=be(f-g,0),A=T(b+B),N=!a;++_<b;)A[_]=n[_];for(;++h<g;)(N||h<f)&&(A[r[h]]=e[h]);for(;B--;)A[_++]=e[h++];return A}function bl(e,n,r,a){for(var h=-1,f=e.length,g=-1,_=r.length,b=-1,B=n.length,A=be(f-_,0),N=T(A+B),O=!a;++h<A;)N[h]=e[h];for(var F=h;++b<B;)N[F+b]=n[b];for(;++g<_;)(O||h<f)&&(N[F+r[g]]=e[h++]);return N}function Pe(e,n){var r=-1,a=e.length;for(n||(n=T(a));++r<a;)n[r]=e[r];return n}function pt(e,n,r,a){var h=!r;r||(r={});for(var f=-1,g=n.length;++f<g;){var _=n[f],b=a?a(r[_],e[_],_,r,e):o;b===o&&(b=e[_]),h?wt(r,_,b):Vn(r,_,b)}return r}function v0(e,n){return pt(e,fo(e),n)}function w0(e,n){return pt(e,Ml(e),n)}function Mr(e,n){return function(r,a){var h=V(r)?Ag:K_,f=n?n():{};return h(r,e,R(a,2),f)}}function yn(e){return K(function(n,r){var a=-1,h=r.length,f=h>1?r[h-1]:o,g=h>2?r[2]:o;for(f=e.length>3&&typeof f=="function"?(h--,f):o,g&&Oe(r[0],r[1],g)&&(f=h<3?o:f,h=1),n=se(n);++a<h;){var _=r[a];_&&e(n,_,a,f)}return n})}function El(e,n){return function(r,a){if(r==null)return r;if(!He(r))return e(r,a);for(var h=r.length,f=n?h:-1,g=se(r);(n?f--:++f<h)&&a(g[f],f,g)!==!1;);return r}}function vl(e){return function(n,r,a){for(var h=-1,f=se(n),g=a(n),_=g.length;_--;){var b=g[e?_:++h];if(r(f[b],b,f)===!1)break}return n}}function T0(e,n,r){var a=n&Z,h=Yn(e);function f(){var g=this&&this!==we&&this instanceof f?h:e;return g.apply(a?r:this,arguments)}return f}function wl(e){return function(n){n=ne(n);var r=hn(n)?st(n):o,a=r?r[0]:n.charAt(0),h=r?$t(r,1).join(""):n.slice(1);return a[e]()+h}}function bn(e){return function(n){return ki(Ec(bc(n).replace(fg,"")),e,"")}}function Yn(e){return function(){var n=arguments;switch(n.length){case 0:return new e;case 1:return new e(n[0]);case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[1],n[2]);case 4:return new e(n[0],n[1],n[2],n[3]);case 5:return new e(n[0],n[1],n[2],n[3],n[4]);case 6:return new e(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new e(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=_n(e.prototype),a=e.apply(r,n);return fe(a)?a:r}}function S0(e,n,r){var a=Yn(e);function h(){for(var f=arguments.length,g=T(f),_=f,b=En(h);_--;)g[_]=arguments[_];var B=f<3&&g[0]!==b&&g[f-1]!==b?[]:Dt(g,b);if(f-=B.length,f<r)return Al(e,n,Fr,h.placeholder,o,g,B,o,o,r-f);var A=this&&this!==we&&this instanceof h?a:e;return $e(A,this,g)}return h}function Tl(e){return function(n,r,a){var h=se(n);if(!He(n)){var f=R(r,3);n=ve(n),r=function(_){return f(h[_],_,h)}}var g=e(n,r,a);return g>-1?h[f?n[g]:g]:o}}function Sl(e){return St(function(n){var r=n.length,a=r,h=Je.prototype.thru;for(e&&n.reverse();a--;){var f=n[a];if(typeof f!="function")throw new je(p);if(h&&!g&&Pr(f)=="wrapper")var g=new Je([],!0)}for(a=g?a:r;++a<r;){f=n[a];var _=Pr(f),b=_=="wrapper"?uo(f):o;b&&po(b[0])&&b[1]==(De|re|ce|Mt)&&!b[4].length&&b[9]==1?g=g[Pr(b[0])].apply(g,b[3]):g=f.length==1&&po(f)?g[_]():g.thru(f)}return function(){var B=arguments,A=B[0];if(g&&B.length==1&&V(A))return g.plant(A).value();for(var N=0,O=r?n[N].apply(this,B):A;++N<r;)O=n[N].call(this,O);return O}})}function Fr(e,n,r,a,h,f,g,_,b,B){var A=n&De,N=n&Z,O=n&Q,F=n&(re|Ee),D=n&ui,G=O?o:Yn(e);function P(){for(var W=arguments.length,X=T(W),Ye=W;Ye--;)X[Ye]=arguments[Ye];if(F)var Me=En(P),We=Dg(X,Me);if(a&&(X=yl(X,a,h,F)),f&&(X=bl(X,f,g,F)),W-=We,F&&W<B){var ge=Dt(X,Me);return Al(e,n,Fr,P.placeholder,r,X,ge,_,b,B-W)}var ct=N?r:this,Nt=O?ct[e]:e;return W=X.length,_?X=K0(X,_):D&&W>1&&X.reverse(),A&&b<W&&(X.length=b),this&&this!==we&&this instanceof P&&(Nt=G||Yn(Nt)),Nt.apply(ct,X)}return P}function Cl(e,n){return function(r,a){return J_(r,e,n(a),{})}}function Lr(e,n){return function(r,a){var h;if(r===o&&a===o)return n;if(r!==o&&(h=r),a!==o){if(h===o)return a;typeof r=="string"||typeof a=="string"?(r=Ge(r),a=Ge(a)):(r=ul(r),a=ul(a)),h=e(r,a)}return h}}function so(e){return St(function(n){return n=he(n,xe(R())),K(function(r){var a=this;return e(n,function(h){return $e(h,a,r)})})})}function Rr(e,n){n=n===o?" ":Ge(n);var r=n.length;if(r<2)return r?Qi(n,e):n;var a=Qi(n,vr(e/dn(n)));return hn(n)?$t(st(a),0,e).join(""):a.slice(0,e)}function C0(e,n,r,a){var h=n&Z,f=Yn(e);function g(){for(var _=-1,b=arguments.length,B=-1,A=a.length,N=T(A+b),O=this&&this!==we&&this instanceof g?f:e;++B<A;)N[B]=a[B];for(;b--;)N[B++]=arguments[++_];return $e(O,h?r:this,N)}return g}function Bl(e){return function(n,r,a){return a&&typeof a!="number"&&Oe(n,r,a)&&(r=a=o),n=At(n),r===o?(r=n,n=0):r=At(r),a=a===o?n<r?1:-1:At(a),u0(n,r,a,e)}}function Dr(e){return function(n,r){return typeof n=="string"&&typeof r=="string"||(n=nt(n),r=nt(r)),e(n,r)}}function Al(e,n,r,a,h,f,g,_,b,B){var A=n&re,N=A?g:o,O=A?o:g,F=A?f:o,D=A?o:f;n|=A?ce:Ie,n&=~(A?Ie:ce),n&_e||(n&=~(Z|Q));var G=[e,n,h,F,N,D,O,_,b,B],P=r.apply(o,G);return po(e)&&Ul(P,G),P.placeholder=a,Vl(P,e,n)}function ao(e){var n=ye[e];return function(r,a){if(r=nt(r),a=a==null?0:Be(x(a),292),a&&Va(r)){var h=(ne(r)+"e").split("e"),f=n(h[0]+"e"+(+h[1]+a));return h=(ne(f)+"e").split("e"),+(h[0]+"e"+(+h[1]-a))}return n(r)}}var B0=pn&&1/hr(new pn([,-0]))[1]==qt?function(e){return new pn(e)}:ko;function Nl(e){return function(n){var r=Ae(n);return r==it?Pi(n):r==ot?Gg(n):Rg(n,e(n))}}function Tt(e,n,r,a,h,f,g,_){var b=n&Q;if(!b&&typeof e!="function")throw new je(p);var B=a?a.length:0;if(B||(n&=~(ce|Ie),a=h=o),g=g===o?g:be(x(g),0),_=_===o?_:x(_),B-=h?h.length:0,n&Ie){var A=a,N=h;a=h=o}var O=b?o:uo(e),F=[e,n,r,a,h,A,N,f,g,_];if(O&&$0(F,O),e=F[0],n=F[1],r=F[2],a=F[3],h=F[4],_=F[9]=F[9]===o?b?0:e.length:be(F[9]-B,0),!_&&n&(re|Ee)&&(n&=~(re|Ee)),!n||n==Z)var D=T0(e,n,r);else n==re||n==Ee?D=S0(e,n,_):(n==ce||n==(Z|ce))&&!h.length?D=C0(e,n,r,a):D=Fr.apply(o,F);var G=O?ll:Ul;return Vl(G(D,F),e,n)}function Il(e,n,r,a){return e===o||lt(e,mn[r])&&!ie.call(a,r)?n:e}function kl(e,n,r,a,h,f){return fe(e)&&fe(n)&&(f.set(n,e),Ir(e,n,o,kl,f),f.delete(n)),e}function A0(e){return zn(e)?o:e}function Ol(e,n,r,a,h,f){var g=r&oe,_=e.length,b=n.length;if(_!=b&&!(g&&b>_))return!1;var B=f.get(e),A=f.get(n);if(B&&A)return B==n&&A==e;var N=-1,O=!0,F=r&J?new jt:o;for(f.set(e,n),f.set(n,e);++N<_;){var D=e[N],G=n[N];if(a)var P=g?a(G,D,N,n,e,f):a(D,G,N,e,n,f);if(P!==o){if(P)continue;O=!1;break}if(F){if(!Oi(n,function(W,X){if(!Ln(F,X)&&(D===W||h(D,W,r,a,f)))return F.push(X)})){O=!1;break}}else if(!(D===G||h(D,G,r,a,f))){O=!1;break}}return f.delete(e),f.delete(n),O}function N0(e,n,r,a,h,f,g){switch(r){case ln:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case Fn:return!(e.byteLength!=n.byteLength||!f(new _r(e),new _r(n)));case An:case Nn:case In:return lt(+e,+n);case rr:return e.name==n.name&&e.message==n.message;case kn:case On:return e==n+"";case it:var _=Pi;case ot:var b=a&oe;if(_||(_=hr),e.size!=n.size&&!b)return!1;var B=g.get(e);if(B)return B==n;a|=J,g.set(e,n);var A=Ol(_(e),_(n),a,h,f,g);return g.delete(e),A;case or:if(Un)return Un.call(e)==Un.call(n)}return!1}function I0(e,n,r,a,h,f){var g=r&oe,_=lo(e),b=_.length,B=lo(n),A=B.length;if(b!=A&&!g)return!1;for(var N=b;N--;){var O=_[N];if(!(g?O in n:ie.call(n,O)))return!1}var F=f.get(e),D=f.get(n);if(F&&D)return F==n&&D==e;var G=!0;f.set(e,n),f.set(n,e);for(var P=g;++N<b;){O=_[N];var W=e[O],X=n[O];if(a)var Ye=g?a(X,W,O,n,e,f):a(W,X,O,e,n,f);if(!(Ye===o?W===X||h(W,X,r,a,f):Ye)){G=!1;break}P||(P=O=="constructor")}if(G&&!P){var Me=e.constructor,We=n.constructor;Me!=We&&"constructor"in e&&"constructor"in n&&!(typeof Me=="function"&&Me instanceof Me&&typeof We=="function"&&We instanceof We)&&(G=!1)}return f.delete(e),f.delete(n),G}function St(e){return _o(Pl(e,o,Wl),e+"")}function lo(e){return ja(e,ve,fo)}function co(e){return ja(e,Ue,Ml)}var uo=Tr?function(e){return Tr.get(e)}:ko;function Pr(e){for(var n=e.name+"",r=gn[n],a=ie.call(gn,n)?r.length:0;a--;){var h=r[a],f=h.func;if(f==null||f==e)return h.name}return n}function En(e){var n=ie.call(d,"placeholder")?d:e;return n.placeholder}function R(){var e=d.iteratee||No;return e=e===No?el:e,arguments.length?e(arguments[0],arguments[1]):e}function Hr(e,n){var r=e.__data__;return P0(n)?r[typeof n=="string"?"string":"hash"]:r.map}function ho(e){for(var n=ve(e),r=n.length;r--;){var a=n[r],h=e[a];n[r]=[a,h,Rl(h)]}return n}function en(e,n){var r=Vg(e,n);return Qa(r)?r:o}function k0(e){var n=ie.call(e,Zt),r=e[Zt];try{e[Zt]=o;var a=!0}catch{}var h=pr.call(e);return a&&(n?e[Zt]=r:delete e[Zt]),h}var fo=Ui?function(e){return e==null?[]:(e=se(e),Lt(Ui(e),function(n){return Ha.call(e,n)}))}:Oo,Ml=Ui?function(e){for(var n=[];e;)Rt(n,fo(e)),e=yr(e);return n}:Oo,Ae=ke;(Vi&&Ae(new Vi(new ArrayBuffer(1)))!=ln||Dn&&Ae(new Dn)!=it||$i&&Ae($i.resolve())!=zs||pn&&Ae(new pn)!=ot||Pn&&Ae(new Pn)!=Mn)&&(Ae=function(e){var n=ke(e),r=n==bt?e.constructor:o,a=r?tn(r):"";if(a)switch(a){case d_:return ln;case f_:return it;case m_:return zs;case p_:return ot;case g_:return Mn}return n});function O0(e,n,r){for(var a=-1,h=r.length;++a<h;){var f=r[a],g=f.size;switch(f.type){case"drop":e+=g;break;case"dropRight":n-=g;break;case"take":n=Be(n,e+g);break;case"takeRight":e=be(e,n-g);break}}return{start:e,end:n}}function M0(e){var n=e.match(Hp);return n?n[1].split(Up):[]}function Fl(e,n,r){n=Vt(n,e);for(var a=-1,h=n.length,f=!1;++a<h;){var g=gt(n[a]);if(!(f=e!=null&&r(e,g)))break;e=e[g]}return f||++a!=h?f:(h=e==null?0:e.length,!!h&&Yr(h)&&Ct(g,h)&&(V(e)||nn(e)))}function F0(e){var n=e.length,r=new e.constructor(n);return n&&typeof e[0]=="string"&&ie.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function Ll(e){return typeof e.constructor=="function"&&!Wn(e)?_n(yr(e)):{}}function L0(e,n,r){var a=e.constructor;switch(n){case Fn:return oo(e);case An:case Nn:return new a(+e);case ln:return _0(e,r);case hi:case di:case fi:case mi:case pi:case gi:case _i:case yi:case bi:return gl(e,r);case it:return new a;case In:case On:return new a(e);case kn:return y0(e);case ot:return new a;case or:return b0(e)}}function R0(e,n){var r=n.length;if(!r)return e;var a=r-1;return n[a]=(r>1?"& ":"")+n[a],n=n.join(r>2?", ":" "),e.replace(Pp,`{
9
+ /* [wrapped with `+n+`] */
10
+ `)}function D0(e){return V(e)||nn(e)||!!(Ua&&e&&e[Ua])}function Ct(e,n){var r=typeof e;return n=n??Ft,!!n&&(r=="number"||r!="symbol"&&zp.test(e))&&e>-1&&e%1==0&&e<n}function Oe(e,n,r){if(!fe(r))return!1;var a=typeof n;return(a=="number"?He(r)&&Ct(n,r.length):a=="string"&&n in r)?lt(r[n],e):!1}function mo(e,n){if(V(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ke(e)?!0:Fp.test(e)||!Mp.test(e)||n!=null&&e in se(n)}function P0(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function po(e){var n=Pr(e),r=d[n];if(typeof r!="function"||!(n in q.prototype))return!1;if(e===r)return!0;var a=uo(r);return!!a&&e===a[0]}function H0(e){return!!Ra&&Ra in e}var U0=fr?Bt:Mo;function Wn(e){var n=e&&e.constructor,r=typeof n=="function"&&n.prototype||mn;return e===r}function Rl(e){return e===e&&!fe(e)}function Dl(e,n){return function(r){return r==null?!1:r[e]===n&&(n!==o||e in se(r))}}function V0(e){var n=Gr(e,function(a){return r.size===v&&r.clear(),a}),r=n.cache;return n}function $0(e,n){var r=e[1],a=n[1],h=r|a,f=h<(Z|Q|De),g=a==De&&r==re||a==De&&r==Mt&&e[7].length<=n[8]||a==(De|Mt)&&n[7].length<=n[8]&&r==re;if(!(f||g))return e;a&Z&&(e[2]=n[2],h|=r&Z?0:_e);var _=n[3];if(_){var b=e[3];e[3]=b?yl(b,_,n[4]):_,e[4]=b?Dt(e[3],w):n[4]}return _=n[5],_&&(b=e[5],e[5]=b?bl(b,_,n[6]):_,e[6]=b?Dt(e[5],w):n[6]),_=n[7],_&&(e[7]=_),a&De&&(e[8]=e[8]==null?n[8]:Be(e[8],n[8])),e[9]==null&&(e[9]=n[9]),e[0]=n[0],e[1]=h,e}function x0(e){var n=[];if(e!=null)for(var r in se(e))n.push(r);return n}function G0(e){return pr.call(e)}function Pl(e,n,r){return n=be(n===o?e.length-1:n,0),function(){for(var a=arguments,h=-1,f=be(a.length-n,0),g=T(f);++h<f;)g[h]=a[n+h];h=-1;for(var _=T(n+1);++h<n;)_[h]=a[h];return _[n]=r(g),$e(e,this,_)}}function Hl(e,n){return n.length<2?e:Qt(e,et(n,0,-1))}function K0(e,n){for(var r=e.length,a=Be(n.length,r),h=Pe(e);a--;){var f=n[a];e[a]=Ct(f,r)?h[f]:o}return e}function go(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}var Ul=$l(ll),qn=o_||function(e,n){return we.setTimeout(e,n)},_o=$l(f0);function Vl(e,n,r){var a=n+"";return _o(e,R0(a,Y0(M0(a),r)))}function $l(e){var n=0,r=0;return function(){var a=c_(),h=dp-(a-r);if(r=a,h>0){if(++n>=hp)return arguments[0]}else n=0;return e.apply(o,arguments)}}function Ur(e,n){var r=-1,a=e.length,h=a-1;for(n=n===o?a:n;++r<n;){var f=Ji(r,h),g=e[f];e[f]=e[r],e[r]=g}return e.length=n,e}var xl=V0(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(Lp,function(r,a,h,f){n.push(h?f.replace(xp,"$1"):a||r)}),n});function gt(e){if(typeof e=="string"||Ke(e))return e;var n=e+"";return n=="0"&&1/e==-qt?"-0":n}function tn(e){if(e!=null){try{return mr.call(e)}catch{}try{return e+""}catch{}}return""}function Y0(e,n){return Xe(yp,function(r){var a="_."+r[0];n&r[1]&&!cr(e,a)&&e.push(a)}),e.sort()}function Gl(e){if(e instanceof q)return e.clone();var n=new Je(e.__wrapped__,e.__chain__);return n.__actions__=Pe(e.__actions__),n.__index__=e.__index__,n.__values__=e.__values__,n}function W0(e,n,r){(r?Oe(e,n,r):n===o)?n=1:n=be(x(n),0);var a=e==null?0:e.length;if(!a||n<1)return[];for(var h=0,f=0,g=T(vr(a/n));h<a;)g[f++]=et(e,h,h+=n);return g}function q0(e){for(var n=-1,r=e==null?0:e.length,a=0,h=[];++n<r;){var f=e[n];f&&(h[a++]=f)}return h}function z0(){var e=arguments.length;if(!e)return[];for(var n=T(e-1),r=arguments[0],a=e;a--;)n[a-1]=arguments[a];return Rt(V(r)?Pe(r):[r],Te(n,1))}var Z0=K(function(e,n){return pe(e)?$n(e,Te(n,1,pe,!0)):[]}),X0=K(function(e,n){var r=tt(n);return pe(r)&&(r=o),pe(e)?$n(e,Te(n,1,pe,!0),R(r,2)):[]}),j0=K(function(e,n){var r=tt(n);return pe(r)&&(r=o),pe(e)?$n(e,Te(n,1,pe,!0),o,r):[]});function J0(e,n,r){var a=e==null?0:e.length;return a?(n=r||n===o?1:x(n),et(e,n<0?0:n,a)):[]}function Q0(e,n,r){var a=e==null?0:e.length;return a?(n=r||n===o?1:x(n),n=a-n,et(e,0,n<0?0:n)):[]}function e1(e,n){return e&&e.length?Or(e,R(n,3),!0,!0):[]}function t1(e,n){return e&&e.length?Or(e,R(n,3),!0):[]}function n1(e,n,r,a){var h=e==null?0:e.length;return h?(r&&typeof r!="number"&&Oe(e,n,r)&&(r=0,a=h),z_(e,n,r,a)):[]}function Kl(e,n,r){var a=e==null?0:e.length;if(!a)return-1;var h=r==null?0:x(r);return h<0&&(h=be(a+h,0)),ur(e,R(n,3),h)}function Yl(e,n,r){var a=e==null?0:e.length;if(!a)return-1;var h=a-1;return r!==o&&(h=x(r),h=r<0?be(a+h,0):Be(h,a-1)),ur(e,R(n,3),h,!0)}function Wl(e){var n=e==null?0:e.length;return n?Te(e,1):[]}function r1(e){var n=e==null?0:e.length;return n?Te(e,qt):[]}function i1(e,n){var r=e==null?0:e.length;return r?(n=n===o?1:x(n),Te(e,n)):[]}function o1(e){for(var n=-1,r=e==null?0:e.length,a={};++n<r;){var h=e[n];a[h[0]]=h[1]}return a}function ql(e){return e&&e.length?e[0]:o}function s1(e,n,r){var a=e==null?0:e.length;if(!a)return-1;var h=r==null?0:x(r);return h<0&&(h=be(a+h,0)),un(e,n,h)}function a1(e){var n=e==null?0:e.length;return n?et(e,0,-1):[]}var l1=K(function(e){var n=he(e,ro);return n.length&&n[0]===e[0]?qi(n):[]}),c1=K(function(e){var n=tt(e),r=he(e,ro);return n===tt(r)?n=o:r.pop(),r.length&&r[0]===e[0]?qi(r,R(n,2)):[]}),u1=K(function(e){var n=tt(e),r=he(e,ro);return n=typeof n=="function"?n:o,n&&r.pop(),r.length&&r[0]===e[0]?qi(r,o,n):[]});function h1(e,n){return e==null?"":a_.call(e,n)}function tt(e){var n=e==null?0:e.length;return n?e[n-1]:o}function d1(e,n,r){var a=e==null?0:e.length;if(!a)return-1;var h=a;return r!==o&&(h=x(r),h=h<0?be(a+h,0):Be(h,a-1)),n===n?Yg(e,n,h):ur(e,Aa,h,!0)}function f1(e,n){return e&&e.length?il(e,x(n)):o}var m1=K(zl);function zl(e,n){return e&&e.length&&n&&n.length?ji(e,n):e}function p1(e,n,r){return e&&e.length&&n&&n.length?ji(e,n,R(r,2)):e}function g1(e,n,r){return e&&e.length&&n&&n.length?ji(e,n,o,r):e}var _1=St(function(e,n){var r=e==null?0:e.length,a=Gi(e,n);return al(e,he(n,function(h){return Ct(h,r)?+h:h}).sort(_l)),a});function y1(e,n){var r=[];if(!(e&&e.length))return r;var a=-1,h=[],f=e.length;for(n=R(n,3);++a<f;){var g=e[a];n(g,a,e)&&(r.push(g),h.push(a))}return al(e,h),r}function yo(e){return e==null?e:h_.call(e)}function b1(e,n,r){var a=e==null?0:e.length;return a?(r&&typeof r!="number"&&Oe(e,n,r)?(n=0,r=a):(n=n==null?0:x(n),r=r===o?a:x(r)),et(e,n,r)):[]}function E1(e,n){return kr(e,n)}function v1(e,n,r){return eo(e,n,R(r,2))}function w1(e,n){var r=e==null?0:e.length;if(r){var a=kr(e,n);if(a<r&&lt(e[a],n))return a}return-1}function T1(e,n){return kr(e,n,!0)}function S1(e,n,r){return eo(e,n,R(r,2),!0)}function C1(e,n){var r=e==null?0:e.length;if(r){var a=kr(e,n,!0)-1;if(lt(e[a],n))return a}return-1}function B1(e){return e&&e.length?cl(e):[]}function A1(e,n){return e&&e.length?cl(e,R(n,2)):[]}function N1(e){var n=e==null?0:e.length;return n?et(e,1,n):[]}function I1(e,n,r){return e&&e.length?(n=r||n===o?1:x(n),et(e,0,n<0?0:n)):[]}function k1(e,n,r){var a=e==null?0:e.length;return a?(n=r||n===o?1:x(n),n=a-n,et(e,n<0?0:n,a)):[]}function O1(e,n){return e&&e.length?Or(e,R(n,3),!1,!0):[]}function M1(e,n){return e&&e.length?Or(e,R(n,3)):[]}var F1=K(function(e){return Ut(Te(e,1,pe,!0))}),L1=K(function(e){var n=tt(e);return pe(n)&&(n=o),Ut(Te(e,1,pe,!0),R(n,2))}),R1=K(function(e){var n=tt(e);return n=typeof n=="function"?n:o,Ut(Te(e,1,pe,!0),o,n)});function D1(e){return e&&e.length?Ut(e):[]}function P1(e,n){return e&&e.length?Ut(e,R(n,2)):[]}function H1(e,n){return n=typeof n=="function"?n:o,e&&e.length?Ut(e,o,n):[]}function bo(e){if(!(e&&e.length))return[];var n=0;return e=Lt(e,function(r){if(pe(r))return n=be(r.length,n),!0}),Ri(n,function(r){return he(e,Mi(r))})}function Zl(e,n){if(!(e&&e.length))return[];var r=bo(e);return n==null?r:he(r,function(a){return $e(n,o,a)})}var U1=K(function(e,n){return pe(e)?$n(e,n):[]}),V1=K(function(e){return no(Lt(e,pe))}),$1=K(function(e){var n=tt(e);return pe(n)&&(n=o),no(Lt(e,pe),R(n,2))}),x1=K(function(e){var n=tt(e);return n=typeof n=="function"?n:o,no(Lt(e,pe),o,n)}),G1=K(bo);function K1(e,n){return fl(e||[],n||[],Vn)}function Y1(e,n){return fl(e||[],n||[],Kn)}var W1=K(function(e){var n=e.length,r=n>1?e[n-1]:o;return r=typeof r=="function"?(e.pop(),r):o,Zl(e,r)});function Xl(e){var n=d(e);return n.__chain__=!0,n}function q1(e,n){return n(e),e}function Vr(e,n){return n(e)}var z1=St(function(e){var n=e.length,r=n?e[0]:0,a=this.__wrapped__,h=function(f){return Gi(f,e)};return n>1||this.__actions__.length||!(a instanceof q)||!Ct(r)?this.thru(h):(a=a.slice(r,+r+(n?1:0)),a.__actions__.push({func:Vr,args:[h],thisArg:o}),new Je(a,this.__chain__).thru(function(f){return n&&!f.length&&f.push(o),f}))});function Z1(){return Xl(this)}function X1(){return new Je(this.value(),this.__chain__)}function j1(){this.__values__===o&&(this.__values__=uc(this.value()));var e=this.__index__>=this.__values__.length,n=e?o:this.__values__[this.__index__++];return{done:e,value:n}}function J1(){return this}function Q1(e){for(var n,r=this;r instanceof Cr;){var a=Gl(r);a.__index__=0,a.__values__=o,n?h.__wrapped__=a:n=a;var h=a;r=r.__wrapped__}return h.__wrapped__=e,n}function ey(){var e=this.__wrapped__;if(e instanceof q){var n=e;return this.__actions__.length&&(n=new q(this)),n=n.reverse(),n.__actions__.push({func:Vr,args:[yo],thisArg:o}),new Je(n,this.__chain__)}return this.thru(yo)}function ty(){return dl(this.__wrapped__,this.__actions__)}var ny=Mr(function(e,n,r){ie.call(e,r)?++e[r]:wt(e,r,1)});function ry(e,n,r){var a=V(e)?Ca:q_;return r&&Oe(e,n,r)&&(n=o),a(e,R(n,3))}function iy(e,n){var r=V(e)?Lt:Za;return r(e,R(n,3))}var oy=Tl(Kl),sy=Tl(Yl);function ay(e,n){return Te($r(e,n),1)}function ly(e,n){return Te($r(e,n),qt)}function cy(e,n,r){return r=r===o?1:x(r),Te($r(e,n),r)}function jl(e,n){var r=V(e)?Xe:Ht;return r(e,R(n,3))}function Jl(e,n){var r=V(e)?Ng:za;return r(e,R(n,3))}var uy=Mr(function(e,n,r){ie.call(e,r)?e[r].push(n):wt(e,r,[n])});function hy(e,n,r,a){e=He(e)?e:wn(e),r=r&&!a?x(r):0;var h=e.length;return r<0&&(r=be(h+r,0)),Wr(e)?r<=h&&e.indexOf(n,r)>-1:!!h&&un(e,n,r)>-1}var dy=K(function(e,n,r){var a=-1,h=typeof n=="function",f=He(e)?T(e.length):[];return Ht(e,function(g){f[++a]=h?$e(n,g,r):xn(g,n,r)}),f}),fy=Mr(function(e,n,r){wt(e,r,n)});function $r(e,n){var r=V(e)?he:tl;return r(e,R(n,3))}function my(e,n,r,a){return e==null?[]:(V(n)||(n=n==null?[]:[n]),r=a?o:r,V(r)||(r=r==null?[]:[r]),ol(e,n,r))}var py=Mr(function(e,n,r){e[r?0:1].push(n)},function(){return[[],[]]});function gy(e,n,r){var a=V(e)?ki:Ia,h=arguments.length<3;return a(e,R(n,4),r,h,Ht)}function _y(e,n,r){var a=V(e)?Ig:Ia,h=arguments.length<3;return a(e,R(n,4),r,h,za)}function yy(e,n){var r=V(e)?Lt:Za;return r(e,Kr(R(n,3)))}function by(e){var n=V(e)?Ka:h0;return n(e)}function Ey(e,n,r){(r?Oe(e,n,r):n===o)?n=1:n=x(n);var a=V(e)?x_:d0;return a(e,n)}function vy(e){var n=V(e)?G_:m0;return n(e)}function wy(e){if(e==null)return 0;if(He(e))return Wr(e)?dn(e):e.length;var n=Ae(e);return n==it||n==ot?e.size:Zi(e).length}function Ty(e,n,r){var a=V(e)?Oi:p0;return r&&Oe(e,n,r)&&(n=o),a(e,R(n,3))}var Sy=K(function(e,n){if(e==null)return[];var r=n.length;return r>1&&Oe(e,n[0],n[1])?n=[]:r>2&&Oe(n[0],n[1],n[2])&&(n=[n[0]]),ol(e,Te(n,1),[])}),xr=i_||function(){return we.Date.now()};function Cy(e,n){if(typeof n!="function")throw new je(p);return e=x(e),function(){if(--e<1)return n.apply(this,arguments)}}function Ql(e,n,r){return n=r?o:n,n=e&&n==null?e.length:n,Tt(e,De,o,o,o,o,n)}function ec(e,n){var r;if(typeof n!="function")throw new je(p);return e=x(e),function(){return--e>0&&(r=n.apply(this,arguments)),e<=1&&(n=o),r}}var Eo=K(function(e,n,r){var a=Z;if(r.length){var h=Dt(r,En(Eo));a|=ce}return Tt(e,a,n,r,h)}),tc=K(function(e,n,r){var a=Z|Q;if(r.length){var h=Dt(r,En(tc));a|=ce}return Tt(n,a,e,r,h)});function nc(e,n,r){n=r?o:n;var a=Tt(e,re,o,o,o,o,o,n);return a.placeholder=nc.placeholder,a}function rc(e,n,r){n=r?o:n;var a=Tt(e,Ee,o,o,o,o,o,n);return a.placeholder=rc.placeholder,a}function ic(e,n,r){var a,h,f,g,_,b,B=0,A=!1,N=!1,O=!0;if(typeof e!="function")throw new je(p);n=nt(n)||0,fe(r)&&(A=!!r.leading,N="maxWait"in r,f=N?be(nt(r.maxWait)||0,n):f,O="trailing"in r?!!r.trailing:O);function F(ge){var ct=a,Nt=h;return a=h=o,B=ge,g=e.apply(Nt,ct),g}function D(ge){return B=ge,_=qn(W,n),A?F(ge):g}function G(ge){var ct=ge-b,Nt=ge-B,Tc=n-ct;return N?Be(Tc,f-Nt):Tc}function P(ge){var ct=ge-b,Nt=ge-B;return b===o||ct>=n||ct<0||N&&Nt>=f}function W(){var ge=xr();if(P(ge))return X(ge);_=qn(W,G(ge))}function X(ge){return _=o,O&&a?F(ge):(a=h=o,g)}function Ye(){_!==o&&ml(_),B=0,a=b=h=_=o}function Me(){return _===o?g:X(xr())}function We(){var ge=xr(),ct=P(ge);if(a=arguments,h=this,b=ge,ct){if(_===o)return D(b);if(N)return ml(_),_=qn(W,n),F(b)}return _===o&&(_=qn(W,n)),g}return We.cancel=Ye,We.flush=Me,We}var By=K(function(e,n){return qa(e,1,n)}),Ay=K(function(e,n,r){return qa(e,nt(n)||0,r)});function Ny(e){return Tt(e,ui)}function Gr(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new je(p);var r=function(){var a=arguments,h=n?n.apply(this,a):a[0],f=r.cache;if(f.has(h))return f.get(h);var g=e.apply(this,a);return r.cache=f.set(h,g)||f,g};return r.cache=new(Gr.Cache||vt),r}Gr.Cache=vt;function Kr(e){if(typeof e!="function")throw new je(p);return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}}function Iy(e){return ec(2,e)}var ky=g0(function(e,n){n=n.length==1&&V(n[0])?he(n[0],xe(R())):he(Te(n,1),xe(R()));var r=n.length;return K(function(a){for(var h=-1,f=Be(a.length,r);++h<f;)a[h]=n[h].call(this,a[h]);return $e(e,this,a)})}),vo=K(function(e,n){var r=Dt(n,En(vo));return Tt(e,ce,o,n,r)}),oc=K(function(e,n){var r=Dt(n,En(oc));return Tt(e,Ie,o,n,r)}),Oy=St(function(e,n){return Tt(e,Mt,o,o,o,n)});function My(e,n){if(typeof e!="function")throw new je(p);return n=n===o?n:x(n),K(e,n)}function Fy(e,n){if(typeof e!="function")throw new je(p);return n=n==null?0:be(x(n),0),K(function(r){var a=r[n],h=$t(r,0,n);return a&&Rt(h,a),$e(e,this,h)})}function Ly(e,n,r){var a=!0,h=!0;if(typeof e!="function")throw new je(p);return fe(r)&&(a="leading"in r?!!r.leading:a,h="trailing"in r?!!r.trailing:h),ic(e,n,{leading:a,maxWait:n,trailing:h})}function Ry(e){return Ql(e,1)}function Dy(e,n){return vo(io(n),e)}function Py(){if(!arguments.length)return[];var e=arguments[0];return V(e)?e:[e]}function Hy(e){return Qe(e,H)}function Uy(e,n){return n=typeof n=="function"?n:o,Qe(e,H,n)}function Vy(e){return Qe(e,I|H)}function $y(e,n){return n=typeof n=="function"?n:o,Qe(e,I|H,n)}function xy(e,n){return n==null||Wa(e,n,ve(n))}function lt(e,n){return e===n||e!==e&&n!==n}var Gy=Dr(Wi),Ky=Dr(function(e,n){return e>=n}),nn=Ja(function(){return arguments}())?Ja:function(e){return me(e)&&ie.call(e,"callee")&&!Ha.call(e,"callee")},V=T.isArray,Yy=ba?xe(ba):Q_;function He(e){return e!=null&&Yr(e.length)&&!Bt(e)}function pe(e){return me(e)&&He(e)}function Wy(e){return e===!0||e===!1||me(e)&&ke(e)==An}var xt=s_||Mo,qy=Ea?xe(Ea):e0;function zy(e){return me(e)&&e.nodeType===1&&!zn(e)}function Zy(e){if(e==null)return!0;if(He(e)&&(V(e)||typeof e=="string"||typeof e.splice=="function"||xt(e)||vn(e)||nn(e)))return!e.length;var n=Ae(e);if(n==it||n==ot)return!e.size;if(Wn(e))return!Zi(e).length;for(var r in e)if(ie.call(e,r))return!1;return!0}function Xy(e,n){return Gn(e,n)}function jy(e,n,r){r=typeof r=="function"?r:o;var a=r?r(e,n):o;return a===o?Gn(e,n,o,r):!!a}function wo(e){if(!me(e))return!1;var n=ke(e);return n==rr||n==Ep||typeof e.message=="string"&&typeof e.name=="string"&&!zn(e)}function Jy(e){return typeof e=="number"&&Va(e)}function Bt(e){if(!fe(e))return!1;var n=ke(e);return n==ir||n==qs||n==bp||n==wp}function sc(e){return typeof e=="number"&&e==x(e)}function Yr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ft}function fe(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}function me(e){return e!=null&&typeof e=="object"}var ac=va?xe(va):n0;function Qy(e,n){return e===n||zi(e,n,ho(n))}function eb(e,n,r){return r=typeof r=="function"?r:o,zi(e,n,ho(n),r)}function tb(e){return lc(e)&&e!=+e}function nb(e){if(U0(e))throw new U(u);return Qa(e)}function rb(e){return e===null}function ib(e){return e==null}function lc(e){return typeof e=="number"||me(e)&&ke(e)==In}function zn(e){if(!me(e)||ke(e)!=bt)return!1;var n=yr(e);if(n===null)return!0;var r=ie.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&mr.call(r)==e_}var To=wa?xe(wa):r0;function ob(e){return sc(e)&&e>=-Ft&&e<=Ft}var cc=Ta?xe(Ta):i0;function Wr(e){return typeof e=="string"||!V(e)&&me(e)&&ke(e)==On}function Ke(e){return typeof e=="symbol"||me(e)&&ke(e)==or}var vn=Sa?xe(Sa):o0;function sb(e){return e===o}function ab(e){return me(e)&&Ae(e)==Mn}function lb(e){return me(e)&&ke(e)==Sp}var cb=Dr(Xi),ub=Dr(function(e,n){return e<=n});function uc(e){if(!e)return[];if(He(e))return Wr(e)?st(e):Pe(e);if(Rn&&e[Rn])return xg(e[Rn]());var n=Ae(e),r=n==it?Pi:n==ot?hr:wn;return r(e)}function At(e){if(!e)return e===0?e:0;if(e=nt(e),e===qt||e===-qt){var n=e<0?-1:1;return n*pp}return e===e?e:0}function x(e){var n=At(e),r=n%1;return n===n?r?n-r:n:0}function hc(e){return e?Jt(x(e),0,ft):0}function nt(e){if(typeof e=="number")return e;if(Ke(e))return tr;if(fe(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=fe(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=ka(e);var r=Yp.test(e);return r||qp.test(e)?Cg(e.slice(2),r?2:8):Kp.test(e)?tr:+e}function dc(e){return pt(e,Ue(e))}function hb(e){return e?Jt(x(e),-Ft,Ft):e===0?e:0}function ne(e){return e==null?"":Ge(e)}var db=yn(function(e,n){if(Wn(n)||He(n)){pt(n,ve(n),e);return}for(var r in n)ie.call(n,r)&&Vn(e,r,n[r])}),fc=yn(function(e,n){pt(n,Ue(n),e)}),qr=yn(function(e,n,r,a){pt(n,Ue(n),e,a)}),fb=yn(function(e,n,r,a){pt(n,ve(n),e,a)}),mb=St(Gi);function pb(e,n){var r=_n(e);return n==null?r:Ya(r,n)}var gb=K(function(e,n){e=se(e);var r=-1,a=n.length,h=a>2?n[2]:o;for(h&&Oe(n[0],n[1],h)&&(a=1);++r<a;)for(var f=n[r],g=Ue(f),_=-1,b=g.length;++_<b;){var B=g[_],A=e[B];(A===o||lt(A,mn[B])&&!ie.call(e,B))&&(e[B]=f[B])}return e}),_b=K(function(e){return e.push(o,kl),$e(mc,o,e)});function yb(e,n){return Ba(e,R(n,3),mt)}function bb(e,n){return Ba(e,R(n,3),Yi)}function Eb(e,n){return e==null?e:Ki(e,R(n,3),Ue)}function vb(e,n){return e==null?e:Xa(e,R(n,3),Ue)}function wb(e,n){return e&&mt(e,R(n,3))}function Tb(e,n){return e&&Yi(e,R(n,3))}function Sb(e){return e==null?[]:Nr(e,ve(e))}function Cb(e){return e==null?[]:Nr(e,Ue(e))}function So(e,n,r){var a=e==null?o:Qt(e,n);return a===o?r:a}function Bb(e,n){return e!=null&&Fl(e,n,Z_)}function Co(e,n){return e!=null&&Fl(e,n,X_)}var Ab=Cl(function(e,n,r){n!=null&&typeof n.toString!="function"&&(n=pr.call(n)),e[n]=r},Ao(Ve)),Nb=Cl(function(e,n,r){n!=null&&typeof n.toString!="function"&&(n=pr.call(n)),ie.call(e,n)?e[n].push(r):e[n]=[r]},R),Ib=K(xn);function ve(e){return He(e)?Ga(e):Zi(e)}function Ue(e){return He(e)?Ga(e,!0):s0(e)}function kb(e,n){var r={};return n=R(n,3),mt(e,function(a,h,f){wt(r,n(a,h,f),a)}),r}function Ob(e,n){var r={};return n=R(n,3),mt(e,function(a,h,f){wt(r,h,n(a,h,f))}),r}var Mb=yn(function(e,n,r){Ir(e,n,r)}),mc=yn(function(e,n,r,a){Ir(e,n,r,a)}),Fb=St(function(e,n){var r={};if(e==null)return r;var a=!1;n=he(n,function(f){return f=Vt(f,e),a||(a=f.length>1),f}),pt(e,co(e),r),a&&(r=Qe(r,I|k|H,A0));for(var h=n.length;h--;)to(r,n[h]);return r});function Lb(e,n){return pc(e,Kr(R(n)))}var Rb=St(function(e,n){return e==null?{}:l0(e,n)});function pc(e,n){if(e==null)return{};var r=he(co(e),function(a){return[a]});return n=R(n),sl(e,r,function(a,h){return n(a,h[0])})}function Db(e,n,r){n=Vt(n,e);var a=-1,h=n.length;for(h||(h=1,e=o);++a<h;){var f=e==null?o:e[gt(n[a])];f===o&&(a=h,f=r),e=Bt(f)?f.call(e):f}return e}function Pb(e,n,r){return e==null?e:Kn(e,n,r)}function Hb(e,n,r,a){return a=typeof a=="function"?a:o,e==null?e:Kn(e,n,r,a)}var gc=Nl(ve),_c=Nl(Ue);function Ub(e,n,r){var a=V(e),h=a||xt(e)||vn(e);if(n=R(n,4),r==null){var f=e&&e.constructor;h?r=a?new f:[]:fe(e)?r=Bt(f)?_n(yr(e)):{}:r={}}return(h?Xe:mt)(e,function(g,_,b){return n(r,g,_,b)}),r}function Vb(e,n){return e==null?!0:to(e,n)}function $b(e,n,r){return e==null?e:hl(e,n,io(r))}function xb(e,n,r,a){return a=typeof a=="function"?a:o,e==null?e:hl(e,n,io(r),a)}function wn(e){return e==null?[]:Di(e,ve(e))}function Gb(e){return e==null?[]:Di(e,Ue(e))}function Kb(e,n,r){return r===o&&(r=n,n=o),r!==o&&(r=nt(r),r=r===r?r:0),n!==o&&(n=nt(n),n=n===n?n:0),Jt(nt(e),n,r)}function Yb(e,n,r){return n=At(n),r===o?(r=n,n=0):r=At(r),e=nt(e),j_(e,n,r)}function Wb(e,n,r){if(r&&typeof r!="boolean"&&Oe(e,n,r)&&(n=r=o),r===o&&(typeof n=="boolean"?(r=n,n=o):typeof e=="boolean"&&(r=e,e=o)),e===o&&n===o?(e=0,n=1):(e=At(e),n===o?(n=e,e=0):n=At(n)),e>n){var a=e;e=n,n=a}if(r||e%1||n%1){var h=$a();return Be(e+h*(n-e+Sg("1e-"+((h+"").length-1))),n)}return Ji(e,n)}var qb=bn(function(e,n,r){return n=n.toLowerCase(),e+(r?yc(n):n)});function yc(e){return Bo(ne(e).toLowerCase())}function bc(e){return e=ne(e),e&&e.replace(Zp,Pg).replace(mg,"")}function zb(e,n,r){e=ne(e),n=Ge(n);var a=e.length;r=r===o?a:Jt(x(r),0,a);var h=r;return r-=n.length,r>=0&&e.slice(r,h)==n}function Zb(e){return e=ne(e),e&&Ip.test(e)?e.replace(Xs,Hg):e}function Xb(e){return e=ne(e),e&&Rp.test(e)?e.replace(Ei,"\\$&"):e}var jb=bn(function(e,n,r){return e+(r?"-":"")+n.toLowerCase()}),Jb=bn(function(e,n,r){return e+(r?" ":"")+n.toLowerCase()}),Qb=wl("toLowerCase");function eE(e,n,r){e=ne(e),n=x(n);var a=n?dn(e):0;if(!n||a>=n)return e;var h=(n-a)/2;return Rr(wr(h),r)+e+Rr(vr(h),r)}function tE(e,n,r){e=ne(e),n=x(n);var a=n?dn(e):0;return n&&a<n?e+Rr(n-a,r):e}function nE(e,n,r){e=ne(e),n=x(n);var a=n?dn(e):0;return n&&a<n?Rr(n-a,r)+e:e}function rE(e,n,r){return r||n==null?n=0:n&&(n=+n),u_(ne(e).replace(vi,""),n||0)}function iE(e,n,r){return(r?Oe(e,n,r):n===o)?n=1:n=x(n),Qi(ne(e),n)}function oE(){var e=arguments,n=ne(e[0]);return e.length<3?n:n.replace(e[1],e[2])}var sE=bn(function(e,n,r){return e+(r?"_":"")+n.toLowerCase()});function aE(e,n,r){return r&&typeof r!="number"&&Oe(e,n,r)&&(n=r=o),r=r===o?ft:r>>>0,r?(e=ne(e),e&&(typeof n=="string"||n!=null&&!To(n))&&(n=Ge(n),!n&&hn(e))?$t(st(e),0,r):e.split(n,r)):[]}var lE=bn(function(e,n,r){return e+(r?" ":"")+Bo(n)});function cE(e,n,r){return e=ne(e),r=r==null?0:Jt(x(r),0,e.length),n=Ge(n),e.slice(r,r+n.length)==n}function uE(e,n,r){var a=d.templateSettings;r&&Oe(e,n,r)&&(n=o),e=ne(e),n=qr({},n,a,Il);var h=qr({},n.imports,a.imports,Il),f=ve(h),g=Di(h,f),_,b,B=0,A=n.interpolate||sr,N="__p += '",O=Hi((n.escape||sr).source+"|"+A.source+"|"+(A===js?Gp:sr).source+"|"+(n.evaluate||sr).source+"|$","g"),F="//# sourceURL="+(ie.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++bg+"]")+`
11
+ `;e.replace(O,function(P,W,X,Ye,Me,We){return X||(X=Ye),N+=e.slice(B,We).replace(Xp,Ug),W&&(_=!0,N+=`' +
12
+ __e(`+W+`) +
13
+ '`),Me&&(b=!0,N+=`';
14
+ `+Me+`;
15
+ __p += '`),X&&(N+=`' +
16
+ ((__t = (`+X+`)) == null ? '' : __t) +
17
+ '`),B=We+P.length,P}),N+=`';
18
+ `;var D=ie.call(n,"variable")&&n.variable;if(!D)N=`with (obj) {
19
+ `+N+`
20
+ }
21
+ `;else if($p.test(D))throw new U(m);N=(b?N.replace(Cp,""):N).replace(Bp,"$1").replace(Ap,"$1;"),N="function("+(D||"obj")+`) {
22
+ `+(D?"":`obj || (obj = {});
23
+ `)+"var __t, __p = ''"+(_?", __e = _.escape":"")+(b?`, __j = Array.prototype.join;
24
+ function print() { __p += __j.call(arguments, '') }
25
+ `:`;
26
+ `)+N+`return __p
27
+ }`;var G=vc(function(){return ee(f,F+"return "+N).apply(o,g)});if(G.source=N,wo(G))throw G;return G}function hE(e){return ne(e).toLowerCase()}function dE(e){return ne(e).toUpperCase()}function fE(e,n,r){if(e=ne(e),e&&(r||n===o))return ka(e);if(!e||!(n=Ge(n)))return e;var a=st(e),h=st(n),f=Oa(a,h),g=Ma(a,h)+1;return $t(a,f,g).join("")}function mE(e,n,r){if(e=ne(e),e&&(r||n===o))return e.slice(0,La(e)+1);if(!e||!(n=Ge(n)))return e;var a=st(e),h=Ma(a,st(n))+1;return $t(a,0,h).join("")}function pE(e,n,r){if(e=ne(e),e&&(r||n===o))return e.replace(vi,"");if(!e||!(n=Ge(n)))return e;var a=st(e),h=Oa(a,st(n));return $t(a,h).join("")}function gE(e,n){var r=cp,a=up;if(fe(n)){var h="separator"in n?n.separator:h;r="length"in n?x(n.length):r,a="omission"in n?Ge(n.omission):a}e=ne(e);var f=e.length;if(hn(e)){var g=st(e);f=g.length}if(r>=f)return e;var _=r-dn(a);if(_<1)return a;var b=g?$t(g,0,_).join(""):e.slice(0,_);if(h===o)return b+a;if(g&&(_+=b.length-_),To(h)){if(e.slice(_).search(h)){var B,A=b;for(h.global||(h=Hi(h.source,ne(Js.exec(h))+"g")),h.lastIndex=0;B=h.exec(A);)var N=B.index;b=b.slice(0,N===o?_:N)}}else if(e.indexOf(Ge(h),_)!=_){var O=b.lastIndexOf(h);O>-1&&(b=b.slice(0,O))}return b+a}function _E(e){return e=ne(e),e&&Np.test(e)?e.replace(Zs,Wg):e}var yE=bn(function(e,n,r){return e+(r?" ":"")+n.toUpperCase()}),Bo=wl("toUpperCase");function Ec(e,n,r){return e=ne(e),n=r?o:n,n===o?$g(e)?Zg(e):Mg(e):e.match(n)||[]}var vc=K(function(e,n){try{return $e(e,o,n)}catch(r){return wo(r)?r:new U(r)}}),bE=St(function(e,n){return Xe(n,function(r){r=gt(r),wt(e,r,Eo(e[r],e))}),e});function EE(e){var n=e==null?0:e.length,r=R();return e=n?he(e,function(a){if(typeof a[1]!="function")throw new je(p);return[r(a[0]),a[1]]}):[],K(function(a){for(var h=-1;++h<n;){var f=e[h];if($e(f[0],this,a))return $e(f[1],this,a)}})}function vE(e){return W_(Qe(e,I))}function Ao(e){return function(){return e}}function wE(e,n){return e==null||e!==e?n:e}var TE=Sl(),SE=Sl(!0);function Ve(e){return e}function No(e){return el(typeof e=="function"?e:Qe(e,I))}function CE(e){return nl(Qe(e,I))}function BE(e,n){return rl(e,Qe(n,I))}var AE=K(function(e,n){return function(r){return xn(r,e,n)}}),NE=K(function(e,n){return function(r){return xn(e,r,n)}});function Io(e,n,r){var a=ve(n),h=Nr(n,a);r==null&&!(fe(n)&&(h.length||!a.length))&&(r=n,n=e,e=this,h=Nr(n,ve(n)));var f=!(fe(r)&&"chain"in r)||!!r.chain,g=Bt(e);return Xe(h,function(_){var b=n[_];e[_]=b,g&&(e.prototype[_]=function(){var B=this.__chain__;if(f||B){var A=e(this.__wrapped__),N=A.__actions__=Pe(this.__actions__);return N.push({func:b,args:arguments,thisArg:e}),A.__chain__=B,A}return b.apply(e,Rt([this.value()],arguments))})}),e}function IE(){return we._===this&&(we._=t_),this}function ko(){}function kE(e){return e=x(e),K(function(n){return il(n,e)})}var OE=so(he),ME=so(Ca),FE=so(Oi);function wc(e){return mo(e)?Mi(gt(e)):c0(e)}function LE(e){return function(n){return e==null?o:Qt(e,n)}}var RE=Bl(),DE=Bl(!0);function Oo(){return[]}function Mo(){return!1}function PE(){return{}}function HE(){return""}function UE(){return!0}function VE(e,n){if(e=x(e),e<1||e>Ft)return[];var r=ft,a=Be(e,ft);n=R(n),e-=ft;for(var h=Ri(a,n);++r<e;)n(r);return h}function $E(e){return V(e)?he(e,gt):Ke(e)?[e]:Pe(xl(ne(e)))}function xE(e){var n=++Qg;return ne(e)+n}var GE=Lr(function(e,n){return e+n},0),KE=ao("ceil"),YE=Lr(function(e,n){return e/n},1),WE=ao("floor");function qE(e){return e&&e.length?Ar(e,Ve,Wi):o}function zE(e,n){return e&&e.length?Ar(e,R(n,2),Wi):o}function ZE(e){return Na(e,Ve)}function XE(e,n){return Na(e,R(n,2))}function jE(e){return e&&e.length?Ar(e,Ve,Xi):o}function JE(e,n){return e&&e.length?Ar(e,R(n,2),Xi):o}var QE=Lr(function(e,n){return e*n},1),ev=ao("round"),tv=Lr(function(e,n){return e-n},0);function nv(e){return e&&e.length?Li(e,Ve):0}function rv(e,n){return e&&e.length?Li(e,R(n,2)):0}return d.after=Cy,d.ary=Ql,d.assign=db,d.assignIn=fc,d.assignInWith=qr,d.assignWith=fb,d.at=mb,d.before=ec,d.bind=Eo,d.bindAll=bE,d.bindKey=tc,d.castArray=Py,d.chain=Xl,d.chunk=W0,d.compact=q0,d.concat=z0,d.cond=EE,d.conforms=vE,d.constant=Ao,d.countBy=ny,d.create=pb,d.curry=nc,d.curryRight=rc,d.debounce=ic,d.defaults=gb,d.defaultsDeep=_b,d.defer=By,d.delay=Ay,d.difference=Z0,d.differenceBy=X0,d.differenceWith=j0,d.drop=J0,d.dropRight=Q0,d.dropRightWhile=e1,d.dropWhile=t1,d.fill=n1,d.filter=iy,d.flatMap=ay,d.flatMapDeep=ly,d.flatMapDepth=cy,d.flatten=Wl,d.flattenDeep=r1,d.flattenDepth=i1,d.flip=Ny,d.flow=TE,d.flowRight=SE,d.fromPairs=o1,d.functions=Sb,d.functionsIn=Cb,d.groupBy=uy,d.initial=a1,d.intersection=l1,d.intersectionBy=c1,d.intersectionWith=u1,d.invert=Ab,d.invertBy=Nb,d.invokeMap=dy,d.iteratee=No,d.keyBy=fy,d.keys=ve,d.keysIn=Ue,d.map=$r,d.mapKeys=kb,d.mapValues=Ob,d.matches=CE,d.matchesProperty=BE,d.memoize=Gr,d.merge=Mb,d.mergeWith=mc,d.method=AE,d.methodOf=NE,d.mixin=Io,d.negate=Kr,d.nthArg=kE,d.omit=Fb,d.omitBy=Lb,d.once=Iy,d.orderBy=my,d.over=OE,d.overArgs=ky,d.overEvery=ME,d.overSome=FE,d.partial=vo,d.partialRight=oc,d.partition=py,d.pick=Rb,d.pickBy=pc,d.property=wc,d.propertyOf=LE,d.pull=m1,d.pullAll=zl,d.pullAllBy=p1,d.pullAllWith=g1,d.pullAt=_1,d.range=RE,d.rangeRight=DE,d.rearg=Oy,d.reject=yy,d.remove=y1,d.rest=My,d.reverse=yo,d.sampleSize=Ey,d.set=Pb,d.setWith=Hb,d.shuffle=vy,d.slice=b1,d.sortBy=Sy,d.sortedUniq=B1,d.sortedUniqBy=A1,d.split=aE,d.spread=Fy,d.tail=N1,d.take=I1,d.takeRight=k1,d.takeRightWhile=O1,d.takeWhile=M1,d.tap=q1,d.throttle=Ly,d.thru=Vr,d.toArray=uc,d.toPairs=gc,d.toPairsIn=_c,d.toPath=$E,d.toPlainObject=dc,d.transform=Ub,d.unary=Ry,d.union=F1,d.unionBy=L1,d.unionWith=R1,d.uniq=D1,d.uniqBy=P1,d.uniqWith=H1,d.unset=Vb,d.unzip=bo,d.unzipWith=Zl,d.update=$b,d.updateWith=xb,d.values=wn,d.valuesIn=Gb,d.without=U1,d.words=Ec,d.wrap=Dy,d.xor=V1,d.xorBy=$1,d.xorWith=x1,d.zip=G1,d.zipObject=K1,d.zipObjectDeep=Y1,d.zipWith=W1,d.entries=gc,d.entriesIn=_c,d.extend=fc,d.extendWith=qr,Io(d,d),d.add=GE,d.attempt=vc,d.camelCase=qb,d.capitalize=yc,d.ceil=KE,d.clamp=Kb,d.clone=Hy,d.cloneDeep=Vy,d.cloneDeepWith=$y,d.cloneWith=Uy,d.conformsTo=xy,d.deburr=bc,d.defaultTo=wE,d.divide=YE,d.endsWith=zb,d.eq=lt,d.escape=Zb,d.escapeRegExp=Xb,d.every=ry,d.find=oy,d.findIndex=Kl,d.findKey=yb,d.findLast=sy,d.findLastIndex=Yl,d.findLastKey=bb,d.floor=WE,d.forEach=jl,d.forEachRight=Jl,d.forIn=Eb,d.forInRight=vb,d.forOwn=wb,d.forOwnRight=Tb,d.get=So,d.gt=Gy,d.gte=Ky,d.has=Bb,d.hasIn=Co,d.head=ql,d.identity=Ve,d.includes=hy,d.indexOf=s1,d.inRange=Yb,d.invoke=Ib,d.isArguments=nn,d.isArray=V,d.isArrayBuffer=Yy,d.isArrayLike=He,d.isArrayLikeObject=pe,d.isBoolean=Wy,d.isBuffer=xt,d.isDate=qy,d.isElement=zy,d.isEmpty=Zy,d.isEqual=Xy,d.isEqualWith=jy,d.isError=wo,d.isFinite=Jy,d.isFunction=Bt,d.isInteger=sc,d.isLength=Yr,d.isMap=ac,d.isMatch=Qy,d.isMatchWith=eb,d.isNaN=tb,d.isNative=nb,d.isNil=ib,d.isNull=rb,d.isNumber=lc,d.isObject=fe,d.isObjectLike=me,d.isPlainObject=zn,d.isRegExp=To,d.isSafeInteger=ob,d.isSet=cc,d.isString=Wr,d.isSymbol=Ke,d.isTypedArray=vn,d.isUndefined=sb,d.isWeakMap=ab,d.isWeakSet=lb,d.join=h1,d.kebabCase=jb,d.last=tt,d.lastIndexOf=d1,d.lowerCase=Jb,d.lowerFirst=Qb,d.lt=cb,d.lte=ub,d.max=qE,d.maxBy=zE,d.mean=ZE,d.meanBy=XE,d.min=jE,d.minBy=JE,d.stubArray=Oo,d.stubFalse=Mo,d.stubObject=PE,d.stubString=HE,d.stubTrue=UE,d.multiply=QE,d.nth=f1,d.noConflict=IE,d.noop=ko,d.now=xr,d.pad=eE,d.padEnd=tE,d.padStart=nE,d.parseInt=rE,d.random=Wb,d.reduce=gy,d.reduceRight=_y,d.repeat=iE,d.replace=oE,d.result=Db,d.round=ev,d.runInContext=y,d.sample=by,d.size=wy,d.snakeCase=sE,d.some=Ty,d.sortedIndex=E1,d.sortedIndexBy=v1,d.sortedIndexOf=w1,d.sortedLastIndex=T1,d.sortedLastIndexBy=S1,d.sortedLastIndexOf=C1,d.startCase=lE,d.startsWith=cE,d.subtract=tv,d.sum=nv,d.sumBy=rv,d.template=uE,d.times=VE,d.toFinite=At,d.toInteger=x,d.toLength=hc,d.toLower=hE,d.toNumber=nt,d.toSafeInteger=hb,d.toString=ne,d.toUpper=dE,d.trim=fE,d.trimEnd=mE,d.trimStart=pE,d.truncate=gE,d.unescape=_E,d.uniqueId=xE,d.upperCase=yE,d.upperFirst=Bo,d.each=jl,d.eachRight=Jl,d.first=ql,Io(d,function(){var e={};return mt(d,function(n,r){ie.call(d.prototype,r)||(e[r]=n)}),e}(),{chain:!1}),d.VERSION=l,Xe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),Xe(["drop","take"],function(e,n){q.prototype[e]=function(r){r=r===o?1:be(x(r),0);var a=this.__filtered__&&!n?new q(this):this.clone();return a.__filtered__?a.__takeCount__=Be(r,a.__takeCount__):a.__views__.push({size:Be(r,ft),type:e+(a.__dir__<0?"Right":"")}),a},q.prototype[e+"Right"]=function(r){return this.reverse()[e](r).reverse()}}),Xe(["filter","map","takeWhile"],function(e,n){var r=n+1,a=r==Ws||r==mp;q.prototype[e]=function(h){var f=this.clone();return f.__iteratees__.push({iteratee:R(h,3),type:r}),f.__filtered__=f.__filtered__||a,f}}),Xe(["head","last"],function(e,n){var r="take"+(n?"Right":"");q.prototype[e]=function(){return this[r](1).value()[0]}}),Xe(["initial","tail"],function(e,n){var r="drop"+(n?"":"Right");q.prototype[e]=function(){return this.__filtered__?new q(this):this[r](1)}}),q.prototype.compact=function(){return this.filter(Ve)},q.prototype.find=function(e){return this.filter(e).head()},q.prototype.findLast=function(e){return this.reverse().find(e)},q.prototype.invokeMap=K(function(e,n){return typeof e=="function"?new q(this):this.map(function(r){return xn(r,e,n)})}),q.prototype.reject=function(e){return this.filter(Kr(R(e)))},q.prototype.slice=function(e,n){e=x(e);var r=this;return r.__filtered__&&(e>0||n<0)?new q(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==o&&(n=x(n),r=n<0?r.dropRight(-n):r.take(n-e)),r)},q.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},q.prototype.toArray=function(){return this.take(ft)},mt(q.prototype,function(e,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),a=/^(?:head|last)$/.test(n),h=d[a?"take"+(n=="last"?"Right":""):n],f=a||/^find/.test(n);h&&(d.prototype[n]=function(){var g=this.__wrapped__,_=a?[1]:arguments,b=g instanceof q,B=_[0],A=b||V(g),N=function(W){var X=h.apply(d,Rt([W],_));return a&&O?X[0]:X};A&&r&&typeof B=="function"&&B.length!=1&&(b=A=!1);var O=this.__chain__,F=!!this.__actions__.length,D=f&&!O,G=b&&!F;if(!f&&A){g=G?g:new q(this);var P=e.apply(g,_);return P.__actions__.push({func:Vr,args:[N],thisArg:o}),new Je(P,O)}return D&&G?e.apply(this,_):(P=this.thru(N),D?a?P.value()[0]:P.value():P)})}),Xe(["pop","push","shift","sort","splice","unshift"],function(e){var n=dr[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var h=arguments;if(a&&!this.__chain__){var f=this.value();return n.apply(V(f)?f:[],h)}return this[r](function(g){return n.apply(V(g)?g:[],h)})}}),mt(q.prototype,function(e,n){var r=d[n];if(r){var a=r.name+"";ie.call(gn,a)||(gn[a]=[]),gn[a].push({name:n,func:r})}}),gn[Fr(o,Q).name]=[{name:"wrapper",func:o}],q.prototype.clone=__,q.prototype.reverse=y_,q.prototype.value=b_,d.prototype.at=z1,d.prototype.chain=Z1,d.prototype.commit=X1,d.prototype.next=j1,d.prototype.plant=Q1,d.prototype.reverse=ey,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=ty,d.prototype.first=d.prototype.head,Rn&&(d.prototype[Rn]=J1),d},fn=Xg();zt?((zt.exports=fn)._=fn,Ai._=fn):we._=fn}).call(Tn)})(Sc,S);var Fo=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,It="\\d\\d?",kt="\\d\\d",Cc="\\d{3}",Bc="\\d{4}",Sn="[^\\s]+",Lo=/\[([^]*?)\]/gm;function Ro(t,i){for(var o=[],l=0,c=t.length;l<c;l++)o.push(t[l].substr(0,i));return o}var Do=function(t){return function(i,o){var l=o[t].map(function(u){return u.toLowerCase()}),c=l.indexOf(i.toLowerCase());return c>-1?c:null}};function Gt(t){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];for(var l=0,c=i;l<c.length;l++){var u=c[l];for(var p in u)t[p]=u[p]}return t}var Po=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ho=["January","February","March","April","May","June","July","August","September","October","November","December"],Ac=Ro(Ho,3),Nc=Ro(Po,3),Uo={dayNamesShort:Nc,dayNames:Po,monthNamesShort:Ac,monthNames:Ho,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},Zn=Gt({},Uo),Ic=function(t){return Zn=Gt(Zn,t)},Vo=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Le=function(t,i){for(i===void 0&&(i=2),t=String(t);t.length<i;)t="0"+t;return t},kc={D:function(t){return String(t.getDate())},DD:function(t){return Le(t.getDate())},Do:function(t,i){return i.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Le(t.getDay())},ddd:function(t,i){return i.dayNamesShort[t.getDay()]},dddd:function(t,i){return i.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return Le(t.getMonth()+1)},MMM:function(t,i){return i.monthNamesShort[t.getMonth()]},MMMM:function(t,i){return i.monthNames[t.getMonth()]},YY:function(t){return Le(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Le(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Le(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Le(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Le(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Le(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Le(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Le(t.getMilliseconds(),3)},a:function(t,i){return t.getHours()<12?i.amPm[0]:i.amPm[1]},A:function(t,i){return t.getHours()<12?i.amPm[0].toUpperCase():i.amPm[1].toUpperCase()},ZZ:function(t){var i=t.getTimezoneOffset();return(i>0?"-":"+")+Le(Math.floor(Math.abs(i)/60)*100+Math.abs(i)%60,4)},Z:function(t){var i=t.getTimezoneOffset();return(i>0?"-":"+")+Le(Math.floor(Math.abs(i)/60),2)+":"+Le(Math.abs(i)%60,2)}},$o=function(t){return+t-1},xo=[null,It],Go=[null,Sn],Ko=["isPm",Sn,function(t,i){var o=t.toLowerCase();return o===i.amPm[0]?0:o===i.amPm[1]?1:null}],Yo=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var i=(t+"").match(/([+-]|\d\d)/gi);if(i){var o=+i[1]*60+parseInt(i[2],10);return i[0]==="+"?o:-o}return 0}],Oc={D:["day",It],DD:["day",kt],Do:["day",It+Sn,function(t){return parseInt(t,10)}],M:["month",It,$o],MM:["month",kt,$o],YY:["year",kt,function(t){var i=new Date,o=+(""+i.getFullYear()).substr(0,2);return+(""+(+t>68?o-1:o)+t)}],h:["hour",It,void 0,"isPm"],hh:["hour",kt,void 0,"isPm"],H:["hour",It],HH:["hour",kt],m:["minute",It],mm:["minute",kt],s:["second",It],ss:["second",kt],YYYY:["year",Bc],S:["millisecond","\\d",function(t){return+t*100}],SS:["millisecond",kt,function(t){return+t*10}],SSS:["millisecond",Cc],d:xo,dd:xo,ddd:Go,dddd:Go,MMM:["month",Sn,Do("monthNamesShort")],MMMM:["month",Sn,Do("monthNames")],a:Ko,A:Ko,ZZ:Yo,Z:Yo},Xn={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},Mc=function(t){return Gt(Xn,t)},Fc=function(t,i,o){if(i===void 0&&(i=Xn.default),o===void 0&&(o={}),typeof t=="number"&&(t=new Date(t)),Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");i=Xn[i]||i;var l=[];i=i.replace(Lo,function(u,p){return l.push(p),"@@@"});var c=Gt(Gt({},Zn),o);return i=i.replace(Fo,function(u){return kc[u](t,c)}),i.replace(/@@@/g,function(){return l.shift()})};function Lc(t,i,o){if(o===void 0&&(o={}),typeof i!="string")throw new Error("Invalid format in fecha parse");if(i=Xn[i]||i,t.length>1e3)return null;var l=new Date,c={year:l.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},u=[],p=[],m=i.replace(Lo,function(Ee,ce){return p.push(Vo(ce)),"@@@"}),E={},v={};m=Vo(m).replace(Fo,function(Ee){var ce=Oc[Ee],Ie=ce[0],De=ce[1],Mt=ce[3];if(E[Ie])throw new Error("Invalid format. "+Ie+" specified twice in format");return E[Ie]=!0,Mt&&(v[Mt]=!0),u.push(ce),"("+De+")"}),Object.keys(v).forEach(function(Ee){if(!E[Ee])throw new Error("Invalid format. "+Ee+" is required in specified format")}),m=m.replace(/@@@/g,function(){return p.shift()});var w=t.match(new RegExp(m,"i"));if(!w)return null;for(var I=Gt(Gt({},Zn),o),k=1;k<w.length;k++){var H=u[k-1],oe=H[0],J=H[2],Z=J?J(w[k],I):+w[k];if(Z==null)return null;c[oe]=Z}c.isPm===1&&c.hour!=null&&+c.hour!=12?c.hour=+c.hour+12:c.isPm===0&&+c.hour==12&&(c.hour=0);var Q;if(c.timezoneOffset==null){Q=new Date(c.year,c.month,c.day,c.hour,c.minute,c.second,c.millisecond);for(var _e=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],k=0,re=_e.length;k<re;k++)if(E[_e[k][0]]&&c[_e[k][0]]!==Q[_e[k][1]]())return null}else if(Q=new Date(Date.UTC(c.year,c.month,c.day,c.hour,c.minute-c.timezoneOffset,c.second,c.millisecond)),c.month>11||c.month<0||c.day>31||c.day<1||c.hour>23||c.hour<0||c.minute>59||c.minute<0||c.second>59||c.second<0)return null;return Q}var qe={format:Fc,parse:Lc,defaultI18n:Uo,setGlobalDateI18n:Ic,setGlobalDateMasks:Mc};const Se={fieldIsRequired:"This field is required!",invalidFormat:"Invalid format!",numberTooSmall:"The number is too small! Minimum: {0}",numberTooBig:"The number is too big! Maximum: {0}",invalidNumber:"Invalid number",invalidInteger:"The value is not an integer",textTooSmall:"The length of text is too small! Current: {0}, Minimum: {1}",textTooBig:"The length of text is too big! Current: {0}, Maximum: {1}",thisNotText:"This is not a text!",thisNotArray:"This is not an array!",selectMinItems:"Select minimum {0} items!",selectMaxItems:"Select maximum {0} items!",invalidDate:"Invalid date!",dateIsEarly:"The date is too early! Current: {0}, Minimum: {1}",dateIsLate:"The date is too late! Current: {0}, Maximum: {1}",invalidEmail:"Invalid e-mail address!",invalidURL:"Invalid URL!",invalidCard:"Invalid card format!",invalidCardNumber:"Invalid card number!",invalidTextContainNumber:"Invalid text! Cannot contains numbers or special characters",invalidTextContainSpec:"Invalid text! Cannot contains special characters"};function ze(t,i,o=Se){return S.isNil(t)||t===""?i?[de(o.fieldIsRequired)]:[]:null}function de(t,...i){if(t!=null&&i.length>0)for(let o=0;o<i.length;o++)t=t.replace("{"+(o-1)+"}",i[o]);return t}const rn={resources:Se,required(t,i,o,l=Se){return ze(t,i.required,l)},number(t,i,o,l=Se){const c=ze(t,i.required,l);if(c!=null)return c;const u=[];return S.isFinite(t)?(!S.isNil(i.min)&&t<i.min&&u.push(de(l.numberTooSmall,i.min)),!S.isNil(i.max)&&t>i.max&&u.push(de(l.numberTooBig,i.max))):u.push(de(l.invalidNumber)),u},integer(t,i,o,l=Se){const c=ze(t,i.required,l);if(c!=null)return c;const u=rn.number(t,i,o,l);return S.isInteger(t)||u.push(de(l.invalidInteger)),u},double(t,i,o,l=Se){const c=ze(t,i.required,l);if(c!=null)return c;if(!S.isNumber(t)||isNaN(t))return[de(l.invalidNumber)]},string(t,i,o,l=Se){const c=ze(t,i.required,l);if(c!=null)return c;const u=[];return S.isString(t)?(!S.isNil(i.min)&&t.length<i.min&&u.push(de(l.textTooSmall,t.length,i.min)),!S.isNil(i.max)&&t.length>i.max&&u.push(de(l.textTooBig,t.length,i.max))):u.push(de(l.thisNotText)),u},array(t,i,o,l=Se){if(i.required){if(!S.isArray(t))return[de(l.thisNotArray)];if(t.length===0)return[de(l.fieldIsRequired)]}if(!S.isNil(t)){if(!S.isNil(i.min)&&t.length<i.min)return[de(l.selectMinItems,i.min)];if(!S.isNil(i.max)&&t.length>i.max)return[de(l.selectMaxItems,i.max)]}},date(t,i,o,l=Se){const c=ze(t,i.required,l);if(c!=null)return c;const u=new Date(t);if(isNaN(u.getDate()))return[de(l.invalidDate)];const p=[];if(!S.isNil(i.min)){const m=new Date(i.min);u.valueOf()<m.valueOf()&&p.push(de(l.dateIsEarly,qe.format(u),qe.format(m)))}if(!S.isNil(i.max)){const m=new Date(i.max);u.valueOf()>m.valueOf()&&p.push(de(l.dateIsLate,qe.format(u),qe.format(m)))}return p},regexp(t,i,o,l=Se){const c=ze(t,i.required,l);if(c!=null)return c;if(!S.isNil(i.pattern)&&!new RegExp(i.pattern).test(t))return[de(l.invalidFormat)]},email(t,i,o,l=Se){const c=ze(t,i.required,l);if(c!=null)return c;if(!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t))return[de(l.invalidEmail)]},url(t,i,o,l=Se){const c=ze(t,i.required,l);if(c!=null)return c;if(!/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(t))return[de(l.invalidURL)]},creditCard(t,i,o,l=Se){const c=ze(t,i.required,l);if(c!=null)return c;const u=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,p=t.replace(/[^0-9]+/g,"");if(!u.test(p))return[de(l.invalidCard)];let m=0,E,v,w;for(let I=p.length-1;I>=0;I--)E=p.substring(I,I+1),v=parseInt(E,10),w?(v*=2,v>=10?m+=v%10+1:m+=v):m+=v,w=!w;if(!(m%10===0&&p))return[de(l.invalidCardNumber)]},alpha(t,i,o,l=Se){const c=ze(t,i.required,l);if(c!=null)return c;if(!/^[a-zA-Z]*$/.test(t))return[de(l.invalidTextContainNumber)]},alphaNumeric(t,i,o,l=Se){const c=ze(t,i.required,l);if(c!=null)return c;if(!/^[a-zA-Z0-9]*$/.test(t))return[de(l.invalidTextContainSpec)]}};Object.keys(rn).forEach(t=>{const i=rn[t];S.isFunction(i)&&(i.locale=o=>(l,c,u)=>i(l,c,u,S.defaults(o,Se)))});const Wo={methods:{getFieldRowClasses(t){const i=this.fieldErrors(t).length>0,o={[S.get(this.options,"validationErrorClass","error")]:i,[S.get(this.options,"validationSuccessClass","valid")]:!i,disabled:this.fieldDisabled(t),readonly:this.fieldReadonly(t),featured:this.fieldFeatured(t),required:this.fieldRequired(t)};return S.isArray(t.styleClasses)?S.forEach(t.styleClasses,l=>o[l]=!0):S.isString(t.styleClasses)&&(o[t.styleClasses]=!0),S.isNil(t.type)||(o["field-"+t.type]=!0),o},fieldErrors(t){return this.errors.filter(o=>o.field.fieldName===t.fieldName).map(o=>o.error)},fieldDisabled(t){return S.isFunction(t.disabled)?t.disabled.call(this,this.model,t,this):S.isNil(t.disabled)?!1:t.disabled},fieldReadonly(t){return S.isFunction(t.readonly)?t.readonly.call(this,this.model,t,this):S.isNil(t.readonly)?!1:t.readonly},fieldFeatured(t){return S.isFunction(t.featured)?t.featured.call(this,this.model,t,this):S.isNil(t.featured)?!1:t.featured},fieldRequired(t){return S.isFunction(t.required)?t.required.call(this,this.model,t,this):S.isNil(t.required)?!1:t.required}}},qo=(t,i="")=>typeof t.id<"u"?i+t.id:i+(t.inputName||t.label||t.model||"").toString().trim().toLowerCase().replace(/ |_/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-]+)/g,""),zo=(t="")=>t.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");function Zo(t){return S.isString(t)?rn[t]!=null?rn[t]:(console.warn(`'${t}' is not a validator function!`),null):t}function zr(t,i,o){let l=S.get(o.context,"schema.attributes",{});const c=i.value||"input";S.isString(c)&&(l=S.get(l,c)||l),S.forEach(l,(u,p)=>{t.setAttribute(p,u)})}const te={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","model-updated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:zr,updated:zr,componentUpdated:zr}},computed:{value:{cache:!1,get(){let t;return S.isFunction(S.get(this.schema,"get"))?t=this.schema.get(this.model):t=S.get(this.model,this.schema.model),this.formatValueToField(t)},set(t){const i=this.value;t=this.formatValueToModel(t),S.isFunction(t)?t(t,i):this.updateModelValue(t,i)}}},methods:{validate(t){this.clearValidationErrors();const i=S.get(this.formOptions,"validateAsync",!1);let o=[];if(this.schema.validator&&this.schema.readonly!==!0&&this.disabled!==!0){const c=[];S.isArray(this.schema.validator)?S.forEach(this.schema.validator,u=>{c.push(Zo(u).bind(this))}):c.push(Zo(this.schema.validator).bind(this)),S.forEach(c,u=>{if(i)o.push(u(this.value,this.schema,this.model));else{const p=u(this.value,this.schema,this.model);p&&S.isFunction(p.then)?p.then(m=>{m&&(this.errors=this.errors.concat(m));const E=this.errors.length===0;this.$emit("validated",E,this.errors,this)}):p&&(o=o.concat(p))}})}const l=c=>{let u=[];S.forEach(S.uniq(c),m=>{S.isArray(m)&&m.length>0?u=u.concat(m):S.isString(m)&&u.push(m)}),S.isFunction(this.schema.onValidated)&&this.schema.onValidated.call(this,this.model,u,this.schema);const p=u.length===0;return t||this.$emit("validated",p,u,this),this.errors=u,u};return i?Promise.all(o).then(l):l(o)},debouncedValidate(){S.isFunction(this.debouncedValidateFunc)||(this.debouncedValidateFunc=S.debounce(this.validate.bind(this),S.get(this.schema,"validateDebounceTime",S.get(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(t,i){let o=!1;S.isFunction(this.schema.set)?(this.schema.set(this.model,t),o=!0):this.schema.model&&(this.setModelValueByPath(this.schema.model,t),o=!0),o&&(this.$emit("model-updated",t,this.schema.model),S.isFunction(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,t,i,this.schema),S.get(this.formOptions,"validateAfterChanged",!1)===!0&&(S.get(this.schema,"validateDebounceTime",S.get(this.formOptions,"validateDebounceTime",0))>0?this.debouncedValidate():this.validate()))},clearValidationErrors(){this.errors.splice(0)},setModelValueByPath(t,i){let o=t.replace(/\[(\w+)\]/g,".$1");o=o.replace(/^\./,"");let l=this.model;const c=o.split(".");let u=0;const p=c.length;for(;u<p;){const m=c[u];if(u<p-1)l[m]!==void 0||(l[m]={}),l=l[m];else{l[m]=i;return}++u}},getFieldID(t,i=!1){const o=S.get(this.formOptions,"fieldIdPrefix","");return qo(t,o)+(i?"-"+S.uniqueId():"")},getFieldClasses(){return S.get(this.schema,"fieldClasses",[])},formatValueToField(t){return t},formatValueToModel(t){return t}}},Rc=Object.freeze(Object.defineProperty({__proto__:null,default:te},Symbol.toStringTag,{value:"Module"})),Dc={mixins:[te]},Pc=["id","autocomplete","disabled","name","required"];function Hc(t,i,o,l,c,u){const p=s.resolveDirective("attributes");return s.withDirectives((s.openBlock(),s.createElementBlock("input",{id:t.getFieldID(t.schema),type:"checkbox","onUpdate:modelValue":i[0]||(i[0]=m=>t.value=m),autocomplete:t.schema.autocomplete,disabled:t.disabled||null,name:t.schema.inputName,class:s.normalizeClass(t.schema.fieldClasses),required:t.schema.required},null,10,Pc)),[[s.vModelCheckbox,t.value],[p,"input"]])}const iv="",Y=(t,i)=>{const o=t.__vccOpts||t;for(const[l,c]of i)o[l]=c;return o},Uc=Y(Dc,[["render",Hc]]),Vc={class:"wrapper"},$c=["disabled"],xc=["id","checked","disabled","onChange","name"],Gc=["disabled"],Kc={class:"info"},Yc=s.createElementVNode("div",{class:"arrow"},null,-1),Wc={class:"dropList"},qc=["id","checked","disabled","onChange","name"];function zc(t,i,o,l,c,u){const p=s.resolveDirective("attributes");return s.withDirectives((s.openBlock(),s.createElementBlock("div",Vc,[t.schema.listBox?(s.openBlock(),s.createElementBlock("div",{key:0,class:"listbox form-control",disabled:t.disabled||null},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.items,m=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["list-row",{"is-checked":u.isItemChecked(m)}])},[s.createElementVNode("label",null,[s.withDirectives(s.createElementVNode("input",{id:t.getFieldID(t.schema,!0),type:"checkbox",checked:u.isItemChecked(m)||null,disabled:t.disabled||null,onChange:E=>u.onChanged(E,m),name:u.getInputName(m)},null,40,xc),[[p,"input"]]),s.createTextVNode(s.toDisplayString(u.getItemName(m)),1)])],2))),256))],8,$c)):s.createCommentVNode("",!0),t.schema.listBox?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",{key:1,class:"combobox form-control",disabled:t.disabled||null},[s.createElementVNode("div",{class:s.normalizeClass(["mainRow",{expanded:c.comboExpanded}]),onClick:i[0]||(i[0]=(...m)=>u.onExpandCombo&&u.onExpandCombo(...m))},[s.createElementVNode("div",Kc,s.toDisplayString(u.selectedCount)+" selected",1),Yc],2),s.createElementVNode("div",Wc,[c.comboExpanded?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(u.items,m=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["list-row",{"is-checked":u.isItemChecked(m)}])},[s.createElementVNode("label",null,[s.withDirectives(s.createElementVNode("input",{id:t.getFieldID(t.schema,!0),type:"checkbox",checked:u.isItemChecked(m)||null,disabled:t.disabled||null,onChange:E=>u.onChanged(E,m),name:u.getInputName(m)},null,40,qc),[[p,"input"]]),s.createTextVNode(s.toDisplayString(u.getItemName(m)),1)])],2))),256)):s.createCommentVNode("",!0)])],8,Gc))])),[[p,"wrapper"]])}const ov="",Zc=Y({mixins:[te],data(){return{comboExpanded:!1}},computed:{items(){const t=this.schema.values;return typeof t=="function"?t.apply(this,[this.model,this.schema]):t},selectedCount(){return this.value?this.value.length:0}},methods:{getInputName(t){return this.schema&&this.schema.inputName&&this.schema.inputName.length>0?zo(this.schema.inputName+"_"+this.getItemValue(t)):zo(this.getItemValue(t))},getItemValue(t){if(S.isObject(t)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.value<"u")return t[this.schema.checklistOptions.value];if(typeof t.value<"u")return t.value;throw new Error("`value` is not defined. If you want to use another key name, add a `value` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return t},getItemName(t){if(S.isObject(t)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.name<"u")return t[this.schema.checklistOptions.name];if(typeof t.name<"u")return t.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return t},isItemChecked(t){return this.value&&this.value.indexOf(this.getItemValue(t))!==-1},onChanged(t,i){if((S.isNil(this.value)||!Array.isArray(this.value))&&(this.value=[]),t.target.checked){const o=S.clone(this.value);o.push(this.getItemValue(i)),this.value=o}else{const o=S.clone(this.value);o.splice(this.value.indexOf(this.getItemValue(i)),1),this.value=o}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},[["render",zc]]),Xc={class:"wrapper"},jc=["id","type","value","disabled","accept","alt","autocomplete","checked","dirname","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","width","files"],Jc={key:0,class:"helper"};function Qc(t,i,o,l,c,u){const p=s.resolveDirective("attributes");return s.withDirectives((s.openBlock(),s.createElementBlock("div",Xc,[s.withDirectives(s.createElementVNode("input",{class:s.normalizeClass(["form-control",t.schema.fieldClasses]),id:t.getFieldID(t.schema),type:u.inputType,value:t.value,onInput:i[0]||(i[0]=(...m)=>u.onInput&&u.onInput(...m)),onBlur:i[1]||(i[1]=(...m)=>u.onBlur&&u.onBlur(...m)),onChange:i[2]||(i[2]=(...m)=>t.schema.onChange&&t.schema.onChange(...m)),disabled:t.disabled||null,accept:t.schema.accept,alt:t.schema.alt,autocomplete:t.schema.autocomplete,checked:t.schema.checked||null,dirname:t.schema.dirname,formaction:t.schema.formaction,formenctype:t.schema.formenctype,formmethod:t.schema.formmethod,formnovalidate:t.schema.formnovalidate,formtarget:t.schema.formtarget,height:t.schema.height,list:t.schema.list,max:t.schema.max,maxlength:t.schema.maxlength,min:t.schema.min,minlength:t.schema.minlength,multiple:t.schema.multiple,name:t.schema.inputName,pattern:t.schema.pattern,placeholder:t.schema.placeholder,readonly:t.schema.readonly,required:t.schema.required,size:t.schema&&t.schema.size>0?t.schema.size:1,src:t.schema.src,step:t.schema.step,width:t.schema.width,files:t.schema.files},null,42,jc),[[p,"input"]]),t.schema.inputType.toLowerCase()==="color"||t.schema.inputType.toLowerCase()==="range"?(s.openBlock(),s.createElementBlock("span",Jc,s.toDisplayString(t.value),1)):s.createCommentVNode("",!0)])),[[p,"wrapper"]])}const av="",Xo={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},eu=Y({mixins:[te],computed:{inputType(){return this.schema&&this.schema.inputType==="datetime"?"datetime-local":this.schema.inputType}},mounted(){switch(this.schema.inputType.toLowerCase()){case"number":case"range":this.debouncedFormatFunc=S.debounce((t,i)=>{this.formatNumberToModel(t,i)},parseInt(S.get(this.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":this.debouncedFormatFunc=S.debounce((t,i)=>{this.formatDatetimeToModel(t,i)},parseInt(S.get(this.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break}},created(){this.schema.inputType.toLowerCase()==="file"&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")},methods:{formatValueToModel(t){if(t!=null)switch(this.schema.inputType.toLowerCase()){case"date":case"datetime":case"datetime-local":case"number":case"range":return(i,o)=>{this.debouncedFormatFunc(t,o)}}return t},formatValueToField(t){switch(this.schema.inputType.toLowerCase()){case"date":case"datetime":case"datetime-local":return this.formatDatetimeValueToField(t)}return t},formatDatetimeToModel(t,i){const o=Xo[this.schema.inputType.toLowerCase()],l=qe.parse(t,o);l!==!1&&(this.schema.format?t=qe.format(l,this.schema.format):t=l.valueOf()),this.updateModelValue(t,i)},formatDatetimeValueToField(t){if(t==null)return null;const i=Xo[this.schema.inputType.toLowerCase()];let o=t;return S.isNumber(t)||(o=qe.parse(t,i)),o!==!1?qe.format(o,i):t},formatNumberToModel(t,i){S.isNumber(t)||(t=NaN),this.updateModelValue(t,i)},onInput(t){let i=t.target.value;switch(this.schema.inputType.toLowerCase()){case"number":case"range":S.isNumber(parseFloat(t.target.value))&&(i=parseFloat(t.target.value));break}this.value=i},onBlur(){S.isFunction(this.debouncedFormatFunc)&&this.debouncedFormatFunc.flush()}}},[["render",Qc]]),tu=["id"];function nu(t,i,o,l,c,u){const p=s.resolveDirective("attributes");return s.withDirectives((s.openBlock(),s.createElementBlock("span",{id:t.getFieldID(t.schema),class:s.normalizeClass(t.schema.fieldClasses)},[s.createTextVNode(s.toDisplayString(t.value),1)],10,tu)),[[p,"label"]])}const cv="",ru=Y({mixins:[te]},[["render",nu]]),iu=["disabled"],ou=["id","disabled","name","onClick","value","checked","required"];function su(t,i,o,l,c,u){const p=s.resolveDirective("attributes");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:"radio-list",disabled:t.disabled||null},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.items,m=>s.withDirectives((s.openBlock(),s.createElementBlock("label",{class:s.normalizeClass(u.getItemCssClasses(m))},[s.withDirectives(s.createElementVNode("input",{id:t.getFieldID(t.schema,!0),type:"radio",disabled:u.isItemDisabled(m)||null,name:u.id,onClick:E=>u.onSelection(m),value:u.getItemValue(m),checked:u.isItemChecked(m)||null,class:s.normalizeClass(t.schema.fieldClasses),required:t.schema.required},null,10,ou),[[p,"input"]]),s.createTextVNode(s.toDisplayString(u.getItemName(m)),1)],2)),[[p,"label"]])),256))],8,iu)),[[p,"wrapper"]])}const hv="",au=Y({mixins:[te],computed:{items(){const t=this.schema.values;return typeof t=="function"?t.apply(this,[this.model,this.schema]):t},id(){return this.schema.model}},methods:{getItemValue(t){if(S.isObject(t)){if(typeof this.schema.radiosOptions<"u"&&typeof this.schema.radiosOptions.value<"u")return t[this.schema.radiosOptions.value];if(typeof t.value<"u")return t.value;throw new Error("`value` is not defined. If you want to use another key name, add a `value` property under `radiosOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/radios.html#radios-field-with-object-values")}else return t},getItemName(t){if(S.isObject(t)){if(typeof this.schema.radiosOptions<"u"&&typeof this.schema.radiosOptions.name<"u")return t[this.schema.radiosOptions.name];if(typeof t.name<"u")return t.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `radiosOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/radios.html#radios-field-with-object-values")}else return t},getItemCssClasses(t){return{"is-checked":this.isItemChecked(t),"is-disabled":this.isItemDisabled(t)}},onSelection(t){this.value=this.getItemValue(t)},isItemChecked(t){return this.getItemValue(t)===this.value},isItemDisabled(t){if(this.disabled)return!0;const i=S.get(t,"disabled",!1);return S.isFunction(i)?i(this.model):i}}},[["render",su]]),lu=["disabled","name","id"],cu=["disabled"],uu=["label"],hu=["value"],du=["value"];function fu(t,i,o,l,c,u){const p=s.resolveDirective("attributes");return s.withDirectives((s.openBlock(),s.createElementBlock("select",{class:s.normalizeClass(["form-control",t.schema.fieldClasses]),"onUpdate:modelValue":i[0]||(i[0]=m=>t.value=m),disabled:t.disabled||null,name:t.schema.inputName,id:t.getFieldID(t.schema)},[u.selectOptions.hideNoneSelectedText?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("option",{key:0,disabled:t.schema.required||null,value:null},s.toDisplayString(u.selectOptions.noneSelectedText||"<Nothing selected>"),9,cu)),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.items,m=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[m.group?(s.openBlock(),s.createElementBlock("optgroup",{key:0,label:u.getGroupName(m)},[m.ops?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(m.ops,E=>(s.openBlock(),s.createElementBlock("option",{value:u.getItemValue(E)},s.toDisplayString(u.getItemName(E)),9,hu))),256)):s.createCommentVNode("",!0)],8,uu)):s.createCommentVNode("",!0),m.group?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("option",{key:1,value:u.getItemValue(m)},s.toDisplayString(u.getItemName(m)),9,du))],64))),256))],10,lu)),[[s.vModelSelect,t.value],[p,"input"]])}const jo=Y({mixins:[te],computed:{selectOptions(){return this.schema.selectOptions||{}},items(){const t=this.schema.values;return typeof t=="function"?this.groupValues(t.apply(this,[this.model,this.schema])):this.groupValues(t)}},methods:{formatValueToField(t){return S.isNil(t)?null:t},groupValues(t){const i=[];let o={};return t.forEach(l=>{o=null,l.group&&S.isObject(l)?(o=S.find(i,c=>c.group===l.group),o?o.ops.push({id:l.id,name:l.name}):(o={group:"",ops:[]},o.group=l.group,o.ops.push({id:l.id,name:l.name}),i.push(o))):i.push(l)}),i},getGroupName(t){if(t&&t.group)return t.group;throw new Error("Group name is missing! https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")},getItemValue(t){if(S.isObject(t)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return t[this.schema.selectOptions.value];if(typeof t.id<"u")return t.id;throw new Error("`id` is not defined. If you want to use another key name, add a `value` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return t},getItemName(t){if(S.isObject(t)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return t[this.schema.selectOptions.name];if(typeof t.name<"u")return t.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return t}}},[["render",fu]]),mu=["id","value","name","disabled"];function pu(t,i,o,l,c,u){return s.openBlock(),s.createElementBlock("input",{id:t.getFieldID(t.schema),type:"submit",value:t.schema.buttonText,onClick:i[0]||(i[0]=(...p)=>u.onClick&&u.onClick(...p)),name:t.schema.inputName,disabled:t.disabled||null,class:s.normalizeClass(t.schema.fieldClasses)},null,10,mu)}const mv="",gu=Y({mixins:[te],methods:{onClick(t){if(this.schema.validateBeforeSubmit===!0){t.preventDefault();const i=S.get(this.formOptions,"validateAsync",!1),o=this.vfg.validate(),l=c=>{i&&!S.isEmpty(c)||!i&&!c?S.isFunction(this.schema.onValidationError)&&this.schema.onValidationError(this.model,this.schema,c,t):S.isFunction(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,t)};o&&S.isFunction(o.then)?o.then(l):l(o)}else S.isFunction(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,t)}}},[["render",pu]]),_u=["id","disabled","maxlength","minlength","placeholder","readonly","required","rows","name"];function yu(t,i,o,l,c,u){const p=s.resolveDirective("attributes");return s.withDirectives((s.openBlock(),s.createElementBlock("textarea",{class:s.normalizeClass(["form-control",t.schema.fieldClasses]),"onUpdate:modelValue":i[0]||(i[0]=m=>t.value=m),id:t.getFieldID(t.schema),disabled:t.disabled||null,maxlength:t.schema.max,minlength:t.schema.min,placeholder:t.schema.placeholder,readonly:t.schema.readonly,required:t.schema.required,rows:t.schema.rows||2,name:t.schema.inputName},null,10,_u)),[[s.vModelText,t.value],[p,"input"]])}const Jo=Y({mixins:[te]},[["render",yu]]),bu={class:"wrapper"},Eu=["id","name","accept","multiple","placeholder","readonly","required","disabled"];function vu(t,i,o,l,c,u){const p=s.resolveDirective("attributes");return s.withDirectives((s.openBlock(),s.createElementBlock("div",bu,[s.withDirectives(s.createElementVNode("input",{class:"form-control",id:t.getFieldID(t.schema),type:"file",name:t.schema.inputName,onChange:i[0]||(i[0]=(...m)=>u.onChange&&u.onChange(...m)),accept:t.schema.accept,multiple:t.schema.multiple,placeholder:t.schema.placeholder,readonly:t.schema.readonly,required:t.schema.required,disabled:t.disabled||null},null,40,Eu),[[p,"input"]])])),[[p,"wrapper"]])}const _v="",wu=Y({mixins:[te],methods:{onChange(t){S.isFunction(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,this.schema,t,this)}}},[["render",vu]]),Tu=["value","autocomplete","disabled","placeholder","readonly","name","id"];function Su(t,i,o,l,c,u){return s.openBlock(),s.createElementBlock("input",{class:"form-control",type:"text",value:t.value,autocomplete:t.schema.autocomplete,disabled:t.disabled||null,placeholder:t.schema.placeholder,readonly:t.schema.readonly,name:t.schema.inputName,id:t.getFieldID(t.schema)},null,8,Tu)}const Cu=Y({mixins:[te],data(){return{cleave:null}},mounted(){this.$nextTick(function(){window.Cleave?(this.cleave=new window.Cleave(this.$el,S.defaults(this.schema.cleaveOptions||{},{creditCard:!1,phone:!1,phoneRegionCode:"AU",date:!1,datePattern:["d","m","Y"],numeral:!1,numeralThousandsGroupStyle:"thousand",numeralDecimalScale:2,numeralDecimalMark:".",blocks:[],delimiter:" ",prefix:null,numericOnly:!1,uppercase:!1,lowercase:!1,maxLength:0})),this.cleave.properties&&this.cleave.properties.hasOwnProperty.call("result")?this.$watch("cleave.properties.result",()=>{this.value=this.cleave.properties.result}):this.$el.addEventListener("input",this.inputChange)):console.warn("Cleave is missing. Please download from https://github.com/nosir/cleave.js/ and load the script in the HTML head section!")})},beforeUnmount(){this.cleave&&(this.cleave.destroy(),this.$el.removeEventListener("input",this.inputChange))},methods:{inputChange(){this.value=this.$el.value}}},[["render",Su]]),Qo={formatValueToField(t){if(t!=null){const i=this.schema.format?qe.parse(t,this.schema.format):new Date(t);return qe.format(i,this.getDateFormat())}return t},formatValueToModel(t){if(t!=null){const i=qe.parse(t,this.getDateFormat());this.schema.format?t=qe.format(i,this.schema.format):t=i.valueOf()}return t}},Bu={class:"input-group date"},Au=["autocomplete","disabled","placeholder","readonly","name","id"],Nu=s.createElementVNode("span",{class:"input-group-addon"},[s.createElementVNode("span",{class:"glyphicon glyphicon-calendar"})],-1);function Iu(t,i,o,l,c,u){return s.openBlock(),s.createElementBlock("div",Bu,[s.withDirectives(s.createElementVNode("input",{class:"form-control",type:"text","onUpdate:modelValue":i[0]||(i[0]=p=>t.value=p),autocomplete:t.schema.autocomplete,disabled:t.disabled||null,placeholder:t.schema.placeholder,readonly:t.schema.readonly,name:t.schema.inputName,id:t.getFieldID(t.schema)},null,8,Au),[[s.vModelText,t.value]]),Nu])}const es="YYYY-MM-DD HH:mm:ss",ku={mixins:[te],mounted(){this.$nextTick(function(){if(window.$&&window.$.fn.datetimepicker){const t=this.$el.querySelector(".form-control");$(this.$el).datetimepicker(S.defaults(this.schema.dateTimePickerOptions||{},{format:es})).on("dp.change",()=>{this.value=t.value})}else console.warn("Bootstrap datetimepicker library is missing. Please download from https://eonasdan.github.io/bootstrap-datetimepicker/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){window.$&&window.$.fn.datetimepicker&&$(this.$el).data("DateTimePicker").destroy()},methods:{getDateFormat(){return this.schema.dateTimePickerOptions&&this.schema.dateTimePickerOptions.format?this.schema.dateTimePickerOptions.format:es},...Qo}},Ou=Y(ku,[["render",Iu]]),Mu=["autocomplete","disabled","placeholder","readonly","name","id"];function Fu(t,i,o,l,c,u){return s.withDirectives((s.openBlock(),s.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":i[0]||(i[0]=p=>t.value=p),autocomplete:t.schema.autocomplete,disabled:t.disabled||null,placeholder:t.schema.placeholder,readonly:t.schema.readonly,name:t.schema.inputName,debounce:"500",onFocus:i[1]||(i[1]=p=>u.geolocate()),id:t.getFieldID(t.schema)},null,40,Mu)),[[s.vModelText,t.value]])}const Lu=Y({mixins:[te],data(){return{autocomplete:"",inputs:{street_number:"long_name",route:"long_name",country:"long_name",administrative_area_level_1:"long_name",administrative_area_level_2:"long_name",locality:"long_name",postal_code:"short_name"}}},mounted(){this.$nextTick(()=>{window.google&&window.google.maps&&window.google.maps.places&&window.google.maps.places.Autocomplete?(this.autocomplete=new google.maps.places.Autocomplete(this.$el,{types:["geocode"]}),this.autocomplete.addListener("place_changed",this.pipeAddress)):console.warn("Google Maps API is missing. Please add https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&libraries=places script in the HTML head section!")})},methods:{pipeAddress(){const t=this.autocomplete.getPlace();if(t){this.value=t.formatted_address;const i={};if(t.address_components!==void 0)for(let o=0;o<t.address_components.length;o++){const l=t.address_components[o].types[0];this.inputs[l]&&(i[l]=t.address_components[o][this.inputs[l]])}S.isFunction(this.schema.onPlaceChanged)&&this.schema.onPlaceChanged(this.value,i,t,this.model,this.schema)}},geolocate(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(t=>{const i={lat:t.coords.latitude,lng:t.coords.longitude},o=new window.google.maps.Circle({center:i,radius:t.coords.accuracy});this.autocomplete.setBounds(o.getBounds())})}}},[["render",Fu]]),Ru={class:"wrapper"},Du=["autocomplete","disabled","placeholder","readonly"],Pu=["disabled","name"];function Hu(t,i,o,l,c,u){return s.openBlock(),s.createElementBlock("div",Ru,[s.withDirectives(s.createElementVNode("input",{class:"form-control link",type:"text","onUpdate:modelValue":i[0]||(i[0]=p=>u.wrappedValue=p),autocomplete:t.schema.autocomplete,disabled:t.disabled||null,placeholder:t.schema.placeholder,readonly:t.schema.readonly},null,8,Du),[[s.vShow,t.schema.hideInput!==!0],[s.vModelText,u.wrappedValue]]),t.schema.browse!==!1?(s.openBlock(),s.createElementBlock("input",{key:0,class:"form-control file",type:"file",disabled:t.disabled||null,onChange:i[1]||(i[1]=(...p)=>u.fileChanged&&u.fileChanged(...p)),name:t.schema.inputName},null,40,Pu)):s.createCommentVNode("",!0),s.createElementVNode("div",{class:"preview",style:s.normalizeStyle(u.previewStyle)},[s.createElementVNode("div",{class:"remove",title:"Remove image",onClick:i[2]||(i[2]=(...p)=>u.remove&&u.remove(...p))})],4)])}const vv="",Uu=Y({mixins:[te],computed:{previewStyle(){return this.schema.preview!==!1?{display:"block","background-image":this.value!=null?"url("+this.value+")":"none"}:{display:"none"}},wrappedValue:{get(){return this.value&&this.value.indexOf("data")===0?"<inline base64 image>":this.value},set(t){t&&t.indexOf("http")===0&&(this.value=t)}}},watch:{model:{deep:!0,handler(){const t=this.$el.querySelector("input.file");t&&(t.value="")}}},methods:{remove(){this.value=""},fileChanged(t){const i=new FileReader;i.onload=o=>{this.value=o.target.result},t.target.files&&t.target.files.length>0&&i.readAsDataURL(t.target.files[0])}}},[["render",Hu]]),Vu=["autocomplete","disabled","placeholder","readonly","name","id"];function $u(t,i,o,l,c,u){return s.withDirectives((s.openBlock(),s.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":i[0]||(i[0]=p=>t.value=p),autocomplete:t.schema.autocomplete,disabled:t.disabled||null,placeholder:t.schema.placeholder,readonly:t.schema.readonly,name:t.schema.inputName,id:t.getFieldID(t.schema)},null,8,Vu)),[[s.vModelText,t.value]])}const xu=Y({mixins:[te],mounted(){this.$nextTick(function(){window.$&&window.$.fn.mask?$(this.$el).unmask().mask(this.schema.mask,this.schema.maskOptions):console.warn("JQuery MaskedInput library is missing. Please download from https://github.com/digitalBush/jquery.maskedinput and load the script in the HTML head section!")})},beforeUnmount(){window.$&&window.$.fn.mask&&$(this.$el).unmask()}},[["render",$u]]),Sv="",Gu={mixins:[te],data(){return{slider:null}},computed:{containPips(){return this.schema.noUiSliderOptions&&typeof this.schema.noUiSliderOptions.pips<"u"},containTooltip(){return this.schema.noUiSliderOptions&&this.schema.noUiSliderOptions.tooltips}},watch:{model:{handler(){window.noUiSlider&&this.slider&&this.slider.noUiSlider&&this.slider.noUiSlider.set(this.value)},deep:!0}},mounted(){this.$nextTick(()=>{window.noUiSlider?(this.slider=this.$el,window.noUiSlider.create(this.slider,S.defaults(this.schema.noUiSliderOptions||{},{start:this.getStartValue(),range:{min:this.schema.min,max:this.schema.max}})),this.slider.noUiSlider.on("change",this.onChange.bind(this))):console.warn("noUiSlider is missing. Please download from https://github.com/leongersen/noUiSlider and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.slider&&this.slider.noUiSlider.off("change")},methods:{onChange(t){S.isArray(t)?this.value=[parseFloat(t[0]),parseFloat(t[1])]:this.value=parseFloat(t)},formatValueToField(t){this.slider!==null&&typeof this.slider.noUiSlider<"u"&&this.slider.noUiSlider.set(t)},formatValueToModel(t){if(typeof this.slider.noUiSlider<"u")return t instanceof Array?[Number(t[0]),Number(t[1])]:Number(t)},getStartValue(){return this.value!=null?this.value:typeof this.schema.noUiSliderOptions<"u"&&this.schema.noUiSliderOptions.double?[this.schema.min,this.schema.min]:this.schema.min}}},Ku=["disabled"];function Yu(t,i,o,l,c,u){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["slider",{"contain-pips":u.containPips,"contain-tooltip":u.containTooltip}]),disabled:t.disabled||null},null,10,Ku)}const Wu=Y(Gu,[["render",Yu]]),qu=["autocomplete","disabled","placeholder","readonly","name"];function zu(t,i,o,l,c,u){return s.withDirectives((s.openBlock(),s.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":i[0]||(i[0]=p=>t.value=p),autocomplete:t.schema.autocomplete,disabled:t.disabled||null,placeholder:t.schema.placeholder,readonly:t.schema.readonly,name:t.schema.inputName},null,8,qu)),[[s.vModelText,t.value]])}const Zu="YYYY-MM-DD",Xu={mixins:[te],data(){return{picker:null,options:null}},mounted(){this.initialize(S.get(this.schema,"pikadayOptions",{}))},beforeUnmount(){this.picker&&this.picker.destroy()},methods:{getDateFormat(){return S.get(this.schema,"pikadayOptions.format",Zu)},...Qo,initialize(t){this.picker&&this.picker.destroy&&this.picker.destroy(),this.$nextTick(()=>{window.Pikaday?(this.options=S.defaults({},t,{field:this.$el,onSelect:()=>{this.value=this.picker.toString()}}),this.picker=new window.Pikaday(this.options)):console.warn("Pikaday is missing. Please download from https://github.com/dbushell/Pikaday/ and load the script and CSS in the HTML head section!")})}}},ju=Y(Xu,[["render",zu]]),Ju=["autocomplete","data-disable","data-max","data-min","data-step","placeholder","readonly","name"];function Qu(t,i,o,l,c,u){return s.openBlock(),s.createElementBlock("input",{type:"text",autocomplete:t.schema.autocomplete,"data-disable":t.disabled,"data-max":t.schema.max,"data-min":t.schema.min,"data-step":t.schema.step,placeholder:t.schema.placeholder,readonly:t.schema.readonly,name:t.schema.inputName},null,8,Ju)}const Cv="",eh=Y({mixins:[te],data(){return{slider:null}},watch:{model:{deep:!0,handler(){if(window.$&&window.$.fn.ionRangeSlider){let t,i;S.isArray(this.value)?[t,i]=this.value:t=this.value,this.slider&&this.slider.update({from:t,to:i})}}}},mounted(){this.$nextTick(function(){if(window.$&&window.$.fn.ionRangeSlider){let t,i;S.isArray(this.value)?[t,i]=this.value:t=this.value;const o=this;$(this.$el).ionRangeSlider(S.defaults(this.schema.rangeSliderOptions||{},{type:"single",grid:!0,hide_min_max:!0,from:t,to:i,onChange(l){o.slider.options.type==="double"?o.value=[l.from,l.to]:o.value=l.from}})),this.slider=$(this.$el).data("ionRangeSlider")}else console.warn("ion.rangeSlider library is missing. Please download from https://github.com/IonDen/ion.rangeSlider and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.slider&&this.slider.destroy()}},[["render",Qu]]),th=["disabled","multiple","title","name"],nh=["disabled","selected"],rh=["value"];function ih(t,i,o,l,c,u){return s.withDirectives((s.openBlock(),s.createElementBlock("select",{class:"selectpicker","onUpdate:modelValue":i[0]||(i[0]=p=>t.value=p),disabled:t.disabled||null,multiple:t.schema.multiSelect,title:t.schema.placeholder,"data-width":"100%",name:t.schema.inputName},[t.schema.multiSelect!==!0?(s.openBlock(),s.createElementBlock("option",{key:0,disabled:t.schema.required||null,value:null,selected:t.value==null},null,8,nh)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.items,p=>(s.openBlock(),s.createElementBlock("option",{value:u.getItemValue(p)},s.toDisplayString(u.getItemName(p)),9,rh))),256))],8,th)),[[s.vModelSelect,t.value]])}const Av="",oh=Y({mixins:[te],computed:{items(){const t=this.schema.values;return typeof t=="function"?t.apply(this,[this.model,this.schema]):t}},watch:{model:{deep:!0,handler(){$.fn.selectpicker&&$(this.$el).selectpicker("refresh")}}},mounted(){this.$nextTick(function(){$.fn.selectpicker?$(this.$el).selectpicker("destroy").selectpicker(this.schema.selectOptions):console.warn("Bootstrap-select library is missing. Please download from https://silviomoreto.github.io/bootstrap-select/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){$.fn.selectpicker&&$(this.$el).selectpicker("destroy")},methods:{getItemValue(t){if(S.isObject(t)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return t[this.schema.selectOptions.value];if(typeof t.id<"u")return t.id;throw new Error("`id` is not defined. If you want to use another key name, add a `value` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return t},getItemName(t){if(S.isObject(t)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return t[this.schema.selectOptions.name];if(typeof t.name<"u")return t.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return t}}},[["render",ih]]),sh=["autocomplete","disabled","placeholder","readonly","name","id"];function ah(t,i,o,l,c,u){return s.openBlock(),s.createElementBlock("input",{type:"text",autocomplete:t.schema.autocomplete,disabled:t.disabled||null,placeholder:t.schema.placeholder,readonly:t.schema.readonly,name:t.schema.inputName,id:t.getFieldID(t.schema)},null,8,sh)}const lh=Y({mixins:[te],data(){return{picker:null}},watch:{model:{deep:!0,handler(){window.$&&window.$.fn.spectrum&&this.picker.spectrum("set",this.value)}},disabled(t){t?this.picker.spectrum("disable"):this.picker.spectrum("enable")}},mounted(){this.$nextTick(function(){window.$&&window.$.fn.spectrum?(this.picker=$(this.$el).spectrum("destroy").spectrum(S.defaults(this.schema.colorOptions||{},{showInput:!0,showAlpha:!0,disabled:this.schema.disabled,allowEmpty:!this.schema.required,preferredFormat:"hex",change:t=>{this.value=t?t.toString():null}})),this.picker.spectrum("set",this.value)):console.warn("Spectrum color library is missing. Please download from http://bgrins.github.io/spectrum/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.picker&&this.picker.spectrum("destroy")}},[["render",ah]]),ch=["src"];function uh(t,i,o,l,c,u){return s.openBlock(),s.createElementBlock("img",{src:u.mapLink},null,8,ch)}const kv="",hh=Y({mixins:[te],computed:{mapLink(){let t,i,o;if(this.value){const l=S.defaults(this.schema.staticMapOptions||{},{lat:"lat",lng:"lng",zoom:8,sizeX:640,sizeY:640});t=this.value[l.lat],i=this.value[l.lng],o=`http://maps.googleapis.com/maps/api/staticmap?center=${t},${i}&zoom=${l.zoom}&size=${l.sizeX}x${l.sizeY}`;const c=["scale","format","maptype","language","region","markers","path","visible","style","key","signature"];for(const u of c)typeof l[u]<"u"&&(o+=`&${u}=${l[u]}`)}return o}}},[["render",uh]]),dh=["autocomplete","disabled","name","id"],fh=["data-on","data-off","for"],mh=s.createElementVNode("span",{class:"handle"},null,-1);function ph(t,i,o,l,c,u){return s.openBlock(),s.createElementBlock("label",null,[s.withDirectives(s.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":i[0]||(i[0]=p=>t.value=p),autocomplete:t.schema.autocomplete,disabled:t.disabled||null,name:t.schema.inputName,id:t.getFieldID(t.schema)},null,8,dh),[[s.vModelCheckbox,t.value]]),s.createElementVNode("span",{class:"label","data-on":t.schema.textOn||"On","data-off":t.schema.textOff||"Off",for:t.getFieldID(t.schema)},null,8,fh),mh])}const Mv="",gh=Y({mixins:[te],methods:{formatValueToField(t){return t!=null&&this.schema.valueOn?t===this.schema.valueOn:t},formatValueToModel(t){return t!=null&&this.schema.valueOn?t?this.schema.valueOn:this.schema.valueOff:t}}},[["render",ph]]),_h={slot:"noResult"},yh={slot:"maxElements"};function bh(t,i,o,l,c,u){const p=s.resolveComponent("multiselect");return s.openBlock(),s.createBlock(p,{id:u.selectOptions.id,options:u.options,value:t.value,multiple:u.selectOptions.multiple,"track-by":u.selectOptions.trackBy||null,label:u.selectOptions.label||null,searchable:u.selectOptions.searchable,"clear-on-select":u.selectOptions.clearOnSelect,"hide-selected":u.selectOptions.hideSelected,placeholder:t.schema.placeholder,"allow-empty":u.selectOptions.allowEmpty,"reset-after":u.selectOptions.resetAfter,"close-on-select":u.selectOptions.closeOnSelect,"custom-label":u.customLabel,taggable:u.selectOptions.taggable,"tag-placeholder":u.selectOptions.tagPlaceholder,max:t.schema.max||null,"options-limit":u.selectOptions.optionsLimit,"group-values":u.selectOptions.groupValues,"group-label":u.selectOptions.groupLabel,"block-keys":u.selectOptions.blockKeys,"internal-search":u.selectOptions.internalSearch,"select-label":u.selectOptions.selectLabel,"selected-label":u.selectOptions.selectedLabel,"deselect-label":u.selectOptions.deselectLabel,"show-labels":u.selectOptions.showLabels,limit:u.selectOptions.limit,"limit-text":u.selectOptions.limitText,loading:u.selectOptions.loading,disabled:t.disabled||null,"max-height":u.selectOptions.maxHeight,"show-pointer":u.selectOptions.showPointer,onInput:u.updateSelected,onSelect:u.onSelect,onRemove:u.onRemove,onSearchChange:u.onSearchChange,onTag:u.addTag,onOpen:u.onOpen,onClose:u.onClose,"option-height":u.selectOptions.optionHeight},{default:s.withCtx(()=>[s.createElementVNode("span",_h,s.toDisplayString(u.selectOptions.noResult),1),s.createElementVNode("span",yh,s.toDisplayString(u.selectOptions.maxElements),1)]),_:1},8,["id","options","value","multiple","track-by","label","searchable","clear-on-select","hide-selected","placeholder","allow-empty","reset-after","close-on-select","custom-label","taggable","tag-placeholder","max","options-limit","group-values","group-label","block-keys","internal-search","select-label","selected-label","deselect-label","show-labels","limit","limit-text","loading","disabled","max-height","show-pointer","onInput","onSelect","onRemove","onSearchChange","onTag","onOpen","onClose","option-height"])}const Eh=Y({mixins:[te],computed:{selectOptions(){return this.schema.selectOptions||{}},options(){const t=this.schema.values;return typeof t=="function"?t.apply(this,[this.model,this.schema]):t},customLabel(){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.customLabel<"u"&&typeof this.schema.selectOptions.customLabel=="function")return this.schema.selectOptions.customLabel}},created(){this.$root.$options.components.multiselect||console.error("'vue-multiselect' is missing. Please download from https://github.com/monterail/vue-multiselect and register the component globally!")},methods:{updateSelected(t){this.value=t},addTag(t,i){const o=this.selectOptions.onNewTag;typeof o=="function"&&o(t,i,this.options,this.value)},onSearchChange(t,i){const o=this.selectOptions.onSearch;typeof o=="function"&&o(t,i,this.options)},onSelect(){},onRemove(){},onOpen(){},onClose(){}}},[["render",bh]]),vh={mixins:[te],data(){return{attributes:this.schema?this.schema.attributes:void 0,newKeyType:"string",newKeyName:"",keyTypes:{}}},created(){this.value||(this.value={})},mounted(){if(!this.value)return;const t=Object.keys(this.value),i={};for(let o=0;o<t.length;o++){const l=t[o];i[l]=typeof this.value[l]}this.keyTypes=i},methods:{removeElement(t){const i=this.value;delete i[t],this.value=JSON.parse(JSON.stringify(i));const o=this.keyTypes;delete o[t],this.keyTypes=JSON.parse(JSON.stringify(o))},addKey(){this.value[this.newKeyName]=void 0,this.value={...this.value},this.keyTypes[this.newKeyName]=this.newKeyType,this.keyTypes={...this.keyTypes},this.newKeyName=""}}},wh={key:0},Th={key:1},Sh=["id"],Ch={key:0},Bh=["onUpdate:modelValue"],Ah={key:1},Nh=["onUpdate:modelValue"],Ih={key:2},kh=["onUpdate:modelValue"],Oh=["onClick"],Mh=[s.createElementVNode("option",{value:"string"}," String ",-1),s.createElementVNode("option",{value:"number"}," Number ",-1),s.createElementVNode("option",{value:"boolean"}," Boolean ",-1)];function Fh(t,i,o,l,c,u){const p=s.resolveComponent("vue-form-generator"),m=s.resolveDirective("attributes");return s.withDirectives((s.openBlock(),s.createElementBlock("div",null,[t.schema.schema?(s.openBlock(),s.createElementBlock("div",wh,[s.createVNode(p,{model:t.value,options:t.formOptions,schema:t.schema.schema},null,8,["model","options","schema"])])):(s.openBlock(),s.createElementBlock("div",Th,[s.createElementVNode("table",{id:t.getFieldID(t.schema),class:s.normalizeClass(t.schema.fieldClasses)},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.value,(E,v)=>(s.openBlock(),s.createElementBlock("tr",{key:v},[s.createElementVNode("td",null,s.toDisplayString(v),1),c.keyTypes[v]==="string"?(s.openBlock(),s.createElementBlock("td",Ch,[s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":w=>t.value[v]=w,type:"text"},null,8,Bh),[[s.vModelText,t.value[v]]])])):s.createCommentVNode("",!0),c.keyTypes[v]==="boolean"?(s.openBlock(),s.createElementBlock("td",Ah,[s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":w=>t.value[v]=w,type:"checkbox"},null,8,Nh),[[s.vModelCheckbox,t.value[v]]])])):s.createCommentVNode("",!0),c.keyTypes[v]==="number"?(s.openBlock(),s.createElementBlock("td",Ih,[s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":w=>t.value[v]=w,type:"number"},null,8,kh),[[s.vModelText,t.value[v]]])])):s.createCommentVNode("",!0),s.createElementVNode("td",null,[s.createElementVNode("input",{type:"button",value:"x",onClick:w=>u.removeElement(v)},null,8,Oh)])]))),128))],10,Sh),s.withDirectives(s.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=E=>c.newKeyType=E)},Mh,512),[[s.vModelSelect,c.newKeyType]]),s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":i[1]||(i[1]=E=>c.newKeyName=E),type:"text"},null,512),[[s.vModelText,c.newKeyName]]),s.createElementVNode("input",{type:"button",value:"Add key",onClick:i[2]||(i[2]=(...E)=>u.addKey&&u.addKey(...E))})]))])),[[m,c.attributes]])}const ts=Y(vh,[["render",Fh]]),Hv="",Lh={mixins:[te],emits:["model-updated"],data(){return{newKeyName:""}},computed:{subSchema(){return this.schema.schema&&this.schema.schema.fields[0].schema},subFields(){return!this.subSchema&&this.schema.fields},hasObjectKeys(){return this.value&&Object.keys(this.value).length>0},transformedModel(){return this.subSchema&&this.subSchema.fields.length>=1&&this.subSchema.fields[0].type==="array"?new Proxy(this.model[this.schema.model],{get:(t,i)=>({[this.schema.model]:t[i]}),set:(t,i,o)=>t[i]=o[this.schema.model]}):this.model[this.schema.model]}},mounted(){this.value||(this.value={});let t=[];this.subSchema?t=this.subSchema.fields:this.subFields&&(t=this.schema.fields[0].schema),this.value=this.transformMapModelValuesToObject(this.model,t,this.schema.model)},methods:{removeElement(t){const i=this.value;delete i[t],this.value={...i}},transformMapModelValuesToObject(t,i,o){const l={};return Object.keys(t).map(c=>{if(c.indexOf(o+"-")>-1&&Array.isArray(i))if(i.length>0){const u=c.split("-"),p=u.filter(E=>i.find(v=>v.model===E)),m=c.split(`-${p}`)[0].split(`${o}-`)[1];p.length?l[m]={...l[m],[p]:t[c]}:l[u.slice(2).join("-")]=t[c]}else l[c.substring(`${o}-`.length)]=t[c];else{const p=c.split("-").filter(E=>E===this.schema.model),m=c.split(`-${p}`)[0].split(`${o}-`)[1];m&&(l[m]=t[c])}return c}),l},addKey(){const t=this.subSchema&&Array.isArray(this.subSchema.fields)&&this.subSchema.fields.length===1&&this.subSchema.fields[0].type==="array",i=this.subSchema?t?[""]:{}:"";this.value[this.newKeyName]=i,this.newKeyName=""},updateModel(t,i){this.$emit("model-updated",this.model[this.schema.model],i)}}},Rh=["id"],Dh=["data-testid"],Ph={class:"ml-7"},Hh={class:"justify-content-between align-items-center d-flex mt-1"},Uh=s.createElementVNode("hr",{class:"my-2"},null,-1),Vh={key:0},$h={key:1},xh=["onUpdate:modelValue","placeholder","onInput"],Gh={key:0,class:"hint"},Kh=s.createElementVNode("hr",{class:"my-4"},null,-1),Yh={class:"d-flex"},Wh=["placeholder"],qh={key:0,class:"hint"};function zh(t,i,o,l,c,u){const p=s.resolveComponent("KIcon"),m=s.resolveComponent("KButton"),E=s.resolveComponent("vue-form-generator");return s.openBlock(),s.createElementBlock("div",{id:t.getFieldID(t.schema),class:s.normalizeClass(["w-100",t.schema.fieldClasses])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.value,(v,w)=>(s.openBlock(),s.createElementBlock("div",{key:w,"data-testid":`field-object-key-${w}`},[s.createElementVNode("div",null,[s.createElementVNode("div",Ph,[s.createElementVNode("div",Hh,[s.createElementVNode("strong",null,s.toDisplayString(w),1),s.createElementVNode("div",null,[s.createVNode(m,{appearance:"btn-link",class:"delete",type:"button",onClick:I=>u.removeElement(w)},{default:s.withCtx(()=>[s.createVNode(p,{icon:"trash",size:"18"})]),_:2},1032,["onClick"])])]),Uh,u.subSchema?(s.openBlock(),s.createElementBlock("div",Vh,[s.createVNode(E,{model:u.transformedModel[w],options:{helpAsHtml:!0},schema:u.subSchema,onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])])):(s.openBlock(),s.createElementBlock("div",$h,[s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":I=>t.value[w]=I,class:"form-control",placeholder:t.schema.fields&&t.schema.fields[0].schema.placeholder,type:"text",onInput:I=>u.updateModel(t.value[w],t.model[t.schema.model])},null,40,xh),[[s.vModelText,t.value[w]]]),t.schema.fields&&t.schema.fields[0].schema.hint?(s.openBlock(),s.createElementBlock("p",Gh,s.toDisplayString(t.schema.fields[0].schema.hint),1)):s.createCommentVNode("",!0)])),Kh])])],8,Dh))),128)),s.createElementVNode("div",{class:s.normalizeClass(["mr-4 mt-4",{"ml-7":u.hasObjectKeys}])},[s.createElementVNode("div",Yh,[s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=v=>c.newKeyName=v),class:"form-control d-flex","data-testid":"keyname-input",placeholder:t.schema.placeholder,type:"text"},null,8,Wh),[[s.vModelText,c.newKeyName]]),s.createVNode(m,{appearance:"btn-link",class:"d-flex mx-5","data-testid":"add-key",disabled:!c.newKeyName,onClick:u.addKey},{default:s.withCtx(()=>[s.createTextVNode(" + Add "+s.toDisplayString(t.schema.buttonLabel||t.schema.label),1)]),_:1},8,["disabled","onClick"])]),t.schema.hintText?(s.openBlock(),s.createElementBlock("p",qh,s.toDisplayString(t.schema.hintText),1)):s.createCommentVNode("",!0)],2)],10,Rh)}const ns=Y(Lh,[["render",zh]]),Uv="",Zh={name:"FieldArrayItem",props:{model:{type:String,default:null}},emits:["remove-item"],data(){return{contentVisible:!1}}},Xh={class:"d-flex w-100"};function jh(t,i,o,l,c,u){const p=s.resolveComponent("KIcon"),m=s.resolveComponent("KButton");return s.openBlock(),s.createElementBlock("div",Xh,[s.renderSlot(t.$slots,"default"),s.createVNode(m,{appearance:"btn-link",class:"delete h-100 ml-5",type:"button",onClick:i[0]||(i[0]=E=>t.$emit("remove-item"))},{icon:s.withCtx(()=>[s.createVNode(p,{icon:"trash",size:"18"})]),_:1})])}const rs=Y(Zh,[["render",jh]]),Vv="",Jh={name:"FieldArrayMultiItem",emits:["remove-item"],data(){return{contentVisible:!1}}},Qh=t=>(s.pushScopeId("data-v-83d230c5"),t=t(),s.popScopeId(),t),ed={class:"w-100"},td=Qh(()=>s.createElementVNode("hr",null,null,-1));function nd(t,i,o,l,c,u){const p=s.resolveComponent("KButton");return s.openBlock(),s.createElementBlock("div",ed,[s.renderSlot(t.$slots,"default",{},void 0,!0),s.createVNode(p,{appearance:"danger",class:"delete",type:"input",onClick:i[0]||(i[0]=m=>t.$emit("remove-item"))},{default:s.withCtx(()=>[s.createTextVNode(" - Remove Field ")]),_:1}),td])}const is=Y(Jh,[["render",nd],["__scopeId","data-v-83d230c5"]]),$v="",rd={name:"FieldMetric",props:{model:{type:Object,default:null}},emits:["remove-item"],data(){return{contentVisible:!1}}},id=s.createElementVNode("i",{class:"material-icons"},"add",-1),od={key:0,class:"content"};function sd(t,i,o,l,c,u){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["field-dropdown",{active:c.contentVisible}])},[s.createElementVNode("div",{class:"title",onClick:i[0]||(i[0]=p=>c.contentVisible=!c.contentVisible)},[s.createTextVNode(s.toDisplayString(o.model.name?o.model.name:"New Metric")+" ",1),id]),s.createVNode(s.Transition,{name:"slide-fade"},{default:s.withCtx(()=>[c.contentVisible?(s.openBlock(),s.createElementBlock("div",od,[s.renderSlot(t.$slots,"default"),s.createElementVNode("i",{class:"material-icons float-right mr-4 mb-4",onClick:i[1]||(i[1]=p=>t.$emit("remove-item"))}," delete ")])):s.createCommentVNode("",!0)]),_:3})],2)}const os=Y(rd,[["render",sd]]),_t="kong-ui-forms-api",ad="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";function ld(t){return t?t.length===36&&new RegExp(`^${ad}$`).test(t):!1}const xv="",Gv="",Zr=50,Kt={CREATE_NOT_FROM_ENTITY:"CREATE_NOT_FROM_ENTITY",CREATE_FROM_ENTITY:"CREATE_FROM_ENTITY",UPDATE_ENTITY:"UPDATE_ENTITY",SET_REFERRAL_VALUE:"SET_REFERRAL_VALUE"};function cd(t,i,o){return o?Kt.SET_REFERRAL_VALUE:t&&!i||!t&&i?Kt.UPDATE_ENTITY:t&&i?Kt.CREATE_FROM_ENTITY:Kt.CREATE_NOT_FROM_ENTITY}const ud={mixins:[te],inject:[_t],emits:["model-updated"],data(){return{suggestions:[],idValue:"",message:"Type something to search",items:[],initialItems:[],loading:!1}},computed:{fieldState(){return cd(this.model[this.schema.model],this.associatedEntity||this.entityId,this.bypassSearch)},associatedEntity(){return this.$route&&this.$route.params[this.entity]},entity(){return this.schema.entity},bypassSearch(){return this.$route&&this.$route.query&&this.$route.query.no_search}},async created(){await this.$nextTick();let t;switch(this.fieldState){case Kt.UPDATE_ENTITY:if(!this[_t]){console.warn("[@kong-ui-public/forms] No API service provided");break}t=await this.getItem((await this[_t].getOne(this.entity,this.model[this.schema.model])).data),this.idValue=t.id;break;case Kt.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Kt.SET_REFERRAL_VALUE:this.idValue=this.value}try{t&&(this.initialItems=[{...t,label:this.getSuggestionLabel(t),value:t.id}]),this.items=this.initialItems}catch(i){this.message=`There was an error loading ${this.schema.entity}`,console.error("err!",i)}},methods:{onQueryChange(t){t.trim().length===0&&(this.items=[],this.message="Type something to search"),typeof this.performSearch!="function"&&(this.performSearch=S.debounce(this.search,500)),this.performSearch(t)},async search(t){if(t.trim().length===0)return;this.loading=!0;const i=[],o=[],l=this.getInputFields(),c=new Set;ld(t)&&l.includes("id")?o.push((async()=>{const u=await this.fetchExact(t);i.push({...u,label:this.getSuggestionLabel(u),value:u.id})})()):o.push(...l.filter(u=>u!=="id").map(async u=>{(await this.fetchSuggestions(t,u)).forEach(m=>{c.has(m.id)||(c.add(m.id),i.push({...m,label:this.getSuggestionLabel(m),value:m.id}))})})),await Promise.all(o),this.items=i,this.items.length===0&&(this.message="No results"),this.loading=!1},getItem(t){return t.data?t.data.length>0?t.data[0]:[]:t},async fetchUntilLimit(t){const i=[];let o=null;if(!this[_t])return console.warn("[@kong-ui-public/forms] No API service provided"),[];for(;i.length<Zr;){const l=await this[_t].getAll(this.entity,{size:Zr,offset:o,...t});if(i.push(...l.data.data),o=l.data.offset,!o)break}return i.slice(0,Zr)},async fetchSuggestions(t,i){return this.fetchUntilLimit({[i]:t})},async fetchExact(t){return this[_t]?(await this[_t].getOne(this.entity,t)).data:(console.warn("[@kong-ui-public/forms] No API service provided"),{})},getInputFields(){var t,i;return((i=(t=this.schema)==null?void 0:t.inputValues)==null?void 0:i.fields)||[]},getSuggestionLabel(t){const i=this.getInputFields();return i.length&&t?i.map(o=>t[o]).filter(Boolean).join(" - "):""},updateModel(t){this.$emit("model-updated",t&&t.length?t:null,this.schema.model)},onSelected(t){this.idValue=t&&t.id,this.updateModel(this.getReturnValue(t||{}))},getReturnValue(t){var o;const i=(o=this.schema)==null?void 0:o.returnKey;return i?t[i]:t.id}}},hd={class:"field-wrap w-100 autosuggest"},dd=["data-testid","data-testlabel"],fd=["data-testid"],md={class:"autosuggest__results_message"};function pd(t,i,o,l,c,u){const p=s.resolveComponent("KSelect");return s.openBlock(),s.createElementBlock("div",hd,[s.createVNode(p,{id:t.schema.model,ref:"suggestion",modelValue:c.idValue,"onUpdate:modelValue":i[0]||(i[0]=m=>c.idValue=m),appearance:"select",autosuggest:"",clearable:"","enable-filtering":"",items:c.items,loading:c.loading,placeholder:t.schema.placeholder,width:"100%",onChange:u.onSelected,onQueryChange:u.onQueryChange},{"item-template":s.withCtx(({item:m})=>[s.createElementVNode("span",{class:"w-100 first-part","data-testid":m.id&&`${m.id}-0`,"data-testlabel":m.label},s.toDisplayString(u.getSuggestionLabel(m).split(" - ")[0]),9,dd),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.getSuggestionLabel(m).split(" - ").slice(1),(E,v)=>(s.openBlock(),s.createElementBlock("span",{key:v,class:"d-flex justify-content-between","data-testid":m.id&&`${m.id}-${v+1}`||v+1},s.toDisplayString(E),9,fd))),128))]),empty:s.withCtx(()=>[s.createElementVNode("div",md,[s.createElementVNode("span",null,s.toDisplayString(c.message),1)])]),_:1},8,["id","modelValue","items","loading","placeholder","onChange","onQueryChange"])])}const ss=Y(ud,[["render",pd],["__scopeId","data-v-564a5ae4"]]),Kv="",gd={name:"FieldArrayCardContainer",props:{model:{type:Object,default:null},schema:{type:Object,default:null}},emits:["remove-item"]},_d={class:"d-flex"};function yd(t,i,o,l,c,u){const p=s.resolveComponent("KCard"),m=s.resolveComponent("KIcon"),E=s.resolveComponent("KButton");return s.openBlock(),s.createElementBlock("div",_d,[s.createVNode(p,{class:"mb-2"},{body:s.withCtx(()=>[s.renderSlot(t.$slots,"default")]),_:3}),s.createVNode(E,{onClick:i[0]||(i[0]=v=>t.$emit("remove-item"))},{icon:s.withCtx(()=>[s.createVNode(m,{icon:"trash",size:"18"})]),_:1})])}const as=Y(gd,[["render",yd]]),bd={mixins:[te],emits:["model-updated"],methods:{updateModel(t){this.$emit("model-updated",t,this.schema.model)},checkOption(t){return this.model[this.schema.model]?t.value.toString()===this.model[this.schema.model].toString():t.checked},onChange(t){let i=t.target.value.split(",");this.schema.array||(i=i.toString()),this.updateModel(i)}}},Ed={class:"selection-group w-100 mb-2"},vd={class:"form-group mb-0"},wd=["id","checked","name","value"];function Td(t,i,o,l,c,u){return s.openBlock(),s.createElementBlock("div",Ed,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.schema.values,(p,m)=>(s.openBlock(),s.createElementBlock("div",{key:m,class:"option-group"},[s.createElementVNode("div",vd,[s.createElementVNode("label",{class:s.normalizeClass(["k-input-label",p.name])},[s.createElementVNode("input",{id:t.schema.name+"-"+m,checked:u.checkOption(p),class:"k-input",name:t.schema.name,type:"radio",value:p.value,onChange:i[0]||(i[0]=(...E)=>u.onChange&&u.onChange(...E))},null,40,wd),s.createTextVNode(" "+s.toDisplayString(p.name),1)],2)])]))),128))])}const ls=Y(bd,[["render",Td]]),Sd={name:"FieldArray",components:{FieldArrayItem:rs,FieldArrayMultiItem:is,FieldSelect:jo,FieldMetric:os,FieldObject:ts,FieldObjectAdvanced:ns,FieldAutoSuggest:ss,FieldRadio:ls,FieldArrayCardContainer:as,FieldTextArea:Jo},mixins:[te],props:{newElementButtonLabel:{type:String,default:"New Item"},removeElementButtonLabel:{type:String,default:"x"}},methods:{generateSchema(t,i,o){let l;return i&&(l=JSON.parse(JSON.stringify(i)),l.schema.fields.map(c=>(c.id=`${c.id||c.model}-${o}`,c))),{...l,set(c,u){t[o]=u},get(){return t[o]}}},newElement(){let t=this.value,i;(!t||!t.push)&&(t=[]),this.schema.items&&this.schema.items.default&&(typeof this.schema.items.default=="function"?i=this.schema.items.default():i=this.schema.items.default),t.push(i),this.value=[...t]},removeElement(t){this.value.splice(t,1)},getFieldType(t){return"field-"+t.type},modelUpdated(){}}},Cd=["id"],Bd={key:1},Ad=["onUpdate:modelValue","type"],Nd=["value","onClick"],Id=["onUpdate:modelValue"],kd=["value","onClick"];function Od(t,i,o,l,c,u){const p=s.resolveComponent("FieldTextArea"),m=s.resolveComponent("KButton");return t.schema?(s.openBlock(),s.createElementBlock("div",{key:0,id:t.getFieldID(t.schema),class:s.normalizeClass(t.schema.fieldClasses)},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.value,(E,v)=>(s.openBlock(),s.createElementBlock("div",{key:v,class:s.normalizeClass(t.schema.fieldItemsClasses)},[t.schema.items&&t.schema.itemContainerComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(t.schema.itemContainerComponent),{key:0,model:E,schema:u.generateSchema(t.value,t.schema.items,v),onRemoveItem:w=>u.removeElement(v)},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(u.getFieldType(t.schema.items)),{"form-options":t.formOptions,model:E,schema:u.generateSchema(t.value,t.schema.items,v),onModelUpdated:u.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))]),_:2},1064,["model","schema","onRemoveItem"])):t.schema.items?(s.openBlock(),s.createElementBlock("span",Bd,[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(u.getFieldType(t.schema.items)),{"form-options":t.formOptions,model:E,schema:u.generateSchema(t.value,t.schema.items,v),onModelUpdated:u.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))])):t.schema.itemContainerComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(t.schema.itemContainerComponent),{key:2,"data-testid":`${t.getFieldID(t.schema)}-item-${v}`,model:E,schema:u.generateSchema(t.value,t.schema.items,v),onRemoveItem:w=>u.removeElement(v)},{default:s.withCtx(()=>{var w,I;return[((w=t.schema.inputAttributes)==null?void 0:w.type)==="textarea"?(s.openBlock(),s.createBlock(p,{key:0,class:"k-input","form-options":t.formOptions,model:E,schema:u.generateSchema(t.value,t.schema.items,v),onModelUpdated:u.modelUpdated},null,8,["form-options","model","schema","onModelUpdated"])):s.withDirectives((s.openBlock(),s.createElementBlock("input",s.mergeProps({key:1,"onUpdate:modelValue":k=>t.value[v]=k},t.schema.inputAttributes,{type:((I=t.schema.inputAttributes)==null?void 0:I.type)||"text"}),null,16,Ad)),[[s.vModelDynamic,t.value[v]]]),t.schema.showRemoveButton?(s.openBlock(),s.createElementBlock("input",s.mergeProps({key:2},t.schema.removeElementButtonAttributes,{type:"button",value:t.schema.removeElementButtonLabel||o.removeElementButtonLabel,onClick:k=>u.removeElement(v)}),null,16,Nd)):s.createCommentVNode("",!0)]}),_:2},1064,["data-testid","model","schema","onRemoveItem"])):s.withDirectives((s.openBlock(),s.createElementBlock("input",s.mergeProps({key:3},t.schema.inputAttributes,{"onUpdate:modelValue":w=>t.value[v]=w,type:"text"}),null,16,Id)),[[s.vModelText,t.value[v]]]),t.schema.showRemoveButton?(s.openBlock(),s.createElementBlock("input",s.mergeProps({key:4},t.schema.removeElementButtonAttributes,{type:"button",value:t.schema.removeElementButtonLabel||o.removeElementButtonLabel,onClick:w=>u.removeElement(v)}),null,16,kd)):s.createCommentVNode("",!0)],2))),128)),s.createVNode(m,{appearance:"btn-link",class:s.normalizeClass(t.schema.newElementButtonLabelClasses),"data-testid":`add-${t.getFieldID(t.schema)}`,type:"button",onClick:u.newElement},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(t.schema.newElementButtonLabel||o.newElementButtonLabel),1)]),_:1},8,["class","data-testid","onClick"])],10,Cd)):s.createCommentVNode("",!0)}const Md=Y(Sd,[["render",Od]]),Yv="",Fd={name:"FieldSchema",props:{model:{type:Object,default:null}},emits:["remove-item"],data(){return{contentVisible:!1}}},Ld=s.createElementVNode("i",{class:"material-icons"},"add",-1),Rd={key:0,class:"content"};function Dd(t,i,o,l,c,u){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["field-dropdown",{active:c.contentVisible}])},[s.createElementVNode("div",{class:"title",onClick:i[0]||(i[0]=p=>c.contentVisible=!c.contentVisible)},[s.createTextVNode(s.toDisplayString(o.model.name?o.model.name:"New Schema")+" ",1),Ld]),s.createVNode(s.Transition,{name:"slide-fade"},{default:s.withCtx(()=>[c.contentVisible?(s.openBlock(),s.createElementBlock("div",Rd,[s.renderSlot(t.$slots,"default"),s.createElementVNode("i",{class:"material-icons float-right mr-2 mb-2",onClick:i[1]||(i[1]=p=>t.$emit("remove-item"))}," delete ")])):s.createCommentVNode("",!0)]),_:3})],2)}const Pd=Y(Fd,[["render",Dd]]),Wv="",Hd={mixins:[te],emits:["model-updated"],data(){return{isOpen:!1}},computed:{openClass(){return this.isOpen?"open":"closed"},fieldCount(){return this.schema.fields.length},titleText(){return`${this.isOpen?"Hide":"View"} ${this.fieldCount} Advanced Fields`}},methods:{handleOpen(){this.isOpen=!this.isOpen},updateModel(t,i){this.$emit("model-updated",t,i)}}},Ud={class:"advanced-field-dropdown-wrapper","data-testid":"advanced-field-dropdown-wrapper"},Vd={class:"material-icons"};function $d(t,i,o,l,c,u){const p=s.resolveComponent("vue-form-generator");return s.openBlock(),s.createElementBlock("div",Ud,[s.createElementVNode("button",{class:"advanced-field-title non-visual-button",type:"button",onClick:i[0]||(i[0]=(...m)=>u.handleOpen&&u.handleOpen(...m))},[s.createElementVNode("i",Vd,s.toDisplayString(c.isOpen?"keyboard_arrow_up":"keyboard_arrow_right"),1),s.createElementVNode("span",null,s.toDisplayString(u.titleText),1)]),s.createElementVNode("div",{class:s.normalizeClass(["advanced-field-dropdown",u.openClass])},[s.createVNode(p,{model:t.model,options:{helpAsHtml:!0},schema:t.schema,onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])],2)])}const xd=Y(Hd,[["render",$d],["__scopeId","data-v-72dd5afa"]]),qv="",Gd={mixins:[te],emits:["model-updated"],data(){return{checkedGroup:null,fieldModel:{...this.model},fieldSchema:[]}},watch:{checkedGroup:{handler(t,i){if(i===null){this.fieldModel={...this.model};return}const o=this.schema.fields[t].fields,l=this.schema.fields[i].fields;l&&l.forEach(c=>this.updateModel("",c.model)),o&&o.forEach(c=>this.updateModel(this.fieldModel[c.model],c.model))}}},async created(){await this.$nextTick(),this.schema.fields.forEach((t,i)=>{t.fields&&t.fields.forEach(o=>{this.model[o.model]&&(this.checkedGroup=i,this.fieldSchema.push(o.model))})}),this.checkedGroup===null&&(this.checkedGroup=0)},methods:{updateModel(t,i){this.$emit("model-updated",t,i)}}},Kd={class:"selection-group w-100"},Yd={class:"form-group mb-0"},Wd=["value"],qd={class:"control-help"},zd={class:"option-field"},Zd={class:"mb-0"};function Xd(t,i,o,l,c,u){const p=s.resolveComponent("vue-form-generator");return s.openBlock(),s.createElementBlock("div",Kd,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.schema.fields,(m,E)=>(s.openBlock(),s.createElementBlock("div",{key:E,class:"option-group"},[s.createElementVNode("div",Yd,[s.createElementVNode("label",{class:s.normalizeClass(["k-input-label",`${m.label}-check`])},[s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=v=>c.checkedGroup=v),class:"k-input",type:"radio",value:E},null,8,Wd),[[s.vModelRadio,c.checkedGroup]]),s.createTextVNode(" "+s.toDisplayString(m.label)+" ",1),s.createElementVNode("div",qd,s.toDisplayString(m.description),1)],2)]),s.withDirectives(s.createElementVNode("div",zd,[s.createElementVNode("div",Zd,[s.createVNode(p,{model:t.model,options:{helpAsHtml:!0},schema:{fields:m.fields},onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])])],512),[[s.vShow,m.fields&&c.checkedGroup===E]])]))),128))])}const jd=Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:xd,FieldArray:Md,FieldArrayCardContainer:as,FieldArrayItem:rs,FieldArrayMultiItem:is,FieldAutoSuggest:ss,FieldCheckbox:Uc,FieldChecklist:Zc,FieldCleave:Cu,FieldDateTimePicker:Ou,FieldGoogleAddress:Lu,FieldImage:Uu,FieldInput:eu,FieldLabel:ru,FieldMasked:xu,FieldMetric:os,FieldNoUiSlider:Wu,FieldObject:ts,FieldObjectAdvanced:ns,FieldPikaday:ju,FieldRadio:ls,FieldRadios:au,FieldRangeSlider:eh,FieldSchema:Pd,FieldSelect:jo,FieldSelectEx:oh,FieldSelectionGroup:Y(Gd,[["render",Xd]]),FieldSpectrum:lh,FieldStaticMap:hh,FieldSubmit:gu,FieldTextArea:Jo,FieldUpload:wu,FieldVueMultiSelect:Eh,fieldSwitch:gh},Symbol.toStringTag,{value:"Module"})),Zv="",Jd={name:"FormGroup",components:jd,mixins:[Wo],props:{vfg:{type:Object,required:!0},model:{type:Object,default:()=>({})},options:{type:Object,default:()=>({})},field:{type:Object,required:!0},errors:{type:Array,default(){return[]}}},emits:["validated","model-updated"],data(){return{child:s.ref()}},methods:{fieldTypeHasLabel(t){if(S.isNil(t.label))return!1;let i="";switch(t.type==="input"?i=t.inputType:i=t.type,i){case"button":case"submit":case"reset":return!1;default:return!0}},getFieldID(t){const i=S.get(this.options,"fieldIdPrefix","");return qo(t,i)},getFieldType(t){return"field-"+t.type},getButtonType(t){return S.get(t,"type","button")},onFieldValidated(t,i,o){this.$emit("validated",t,i,o)},buttonVisibility(t){return t.buttons&&t.buttons.length>0},buttonClickHandler(t,i,o){return t.onclick.call(this,this.model,i,o,this)},fieldHint(t){return S.isFunction(t.hint)?t.hint.call(this,this.model,t,this):t.hint},fieldErrors(t){return this.errors.filter(i=>i.field.fieldName===t.fieldName).map(i=>i.error)},onModelUpdated(t,i){this.$emit("model-updated",t,i)},validate(t){return this.$refs.child.validate(t)},clearValidationErrors(){if(this.$refs.child)return this.$refs.child.clearValidationErrors()}}},Qd=["for"],ef=["innerHTML"],tf=s.createElementVNode("div",{class:"help",role:"button",tabindex:"0"},[s.createElementVNode("i",{class:"icon"})],-1),nf=["innerHTML"],rf={class:"field-wrap"},of={key:0,class:"buttons"},sf=["type","onClick","textContent"],af=["innerHTML"],lf={key:2,class:"errors help-block"},cf=["innerHTML"];function uf(t,i,o,l,c,u){const p=s.resolveComponent("KTooltip");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["form-group",t.getFieldRowClasses(o.field)])},[u.fieldTypeHasLabel(o.field)?(s.openBlock(),s.createElementBlock("label",{key:0,class:s.normalizeClass(o.field.labelClasses),for:u.getFieldID(o.field)},[s.createElementVNode("span",{innerHTML:o.field.label},null,8,ef),o.field.help?(s.openBlock(),s.createBlock(p,{key:0,"max-width":"300",placement:"top","position-fixed":!0},{content:s.withCtx(()=>[o.options.helpAsHtml?(s.openBlock(),s.createElementBlock("div",{key:0,innerHTML:o.field.help},null,8,nf)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(o.field.help),1)],64))]),default:s.withCtx(()=>[tf]),_:1})):s.createCommentVNode("",!0)],10,Qd)):s.createCommentVNode("",!0),s.createElementVNode("div",rf,[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(u.getFieldType(o.field)),s.mergeProps(t.$attrs,{ref:"child",disabled:t.fieldDisabled(o.field)||null,"form-options":o.options,model:o.model,schema:o.field,vfg:o.vfg,onModelUpdated:u.onModelUpdated,onValidated:u.onFieldValidated}),null,16,["disabled","form-options","model","schema","vfg","onModelUpdated","onValidated"])),u.buttonVisibility(o.field)?(s.openBlock(),s.createElementBlock("div",of,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.field.buttons,(m,E)=>(s.openBlock(),s.createElementBlock("button",{key:E,class:s.normalizeClass(m.classes),type:u.getButtonType(m),onClick:v=>u.buttonClickHandler(m,o.field,v),textContent:s.toDisplayString(m.label)},null,10,sf))),128))])):s.createCommentVNode("",!0)]),o.field.hint?(s.openBlock(),s.createElementBlock("div",{key:1,class:"hint",innerHTML:u.fieldHint(o.field)},null,8,af)):s.createCommentVNode("",!0),u.fieldErrors(o.field).length>0?(s.openBlock(),s.createElementBlock("div",lf,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.fieldErrors(o.field),(m,E)=>(s.openBlock(),s.createElementBlock("span",{key:E,innerHTML:m},null,8,cf))),128))])):s.createCommentVNode("",!0)],2)}const hf=Y(Jd,[["render",uf]]),df={key:0,class:"vue-form-generator"},ff=["is"],mf=["is"],pf={key:0};function gf(t,i,o,l,c,u){const p=s.resolveComponent("form-group");return o.schema!=null?(s.openBlock(),s.createElementBlock("div",df,[o.schema.fields?(s.openBlock(),s.createElementBlock("fieldset",{key:0,is:o.tag},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.fields,m=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[u.fieldVisible(m)?(s.openBlock(),s.createBlock(p,{key:0,ref_for:!0,ref:"children",vfg:c.vfg,field:m,errors:c.errors,model:o.model,options:o.options,onValidated:u.onFieldValidated,onModelUpdated:u.onModelUpdated},null,8,["vfg","field","errors","model","options","onValidated","onModelUpdated"])):s.createCommentVNode("",!0)],64))),256))],8,ff)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.groups,m=>(s.openBlock(),s.createElementBlock("fieldset",{is:o.tag,class:s.normalizeClass(t.getFieldRowClasses(m))},[m.legend?(s.openBlock(),s.createElementBlock("legend",pf,s.toDisplayString(m.legend),1)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(m.fields,E=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[u.fieldVisible(E)?(s.openBlock(),s.createBlock(p,{key:0,ref_for:!0,ref:"children",vfg:c.vfg,field:E,errors:c.errors,model:o.model,options:o.options,onValidated:u.onFieldValidated,onModelUpdated:u.onModelUpdated},null,8,["vfg","field","errors","model","options","onValidated","onModelUpdated"])):s.createCommentVNode("",!0)],64))),256))],10,mf))),256))])):s.createCommentVNode("",!0)}const Xv="",Cn=Y({name:"FormGenerator",components:{formGroup:hf},mixins:[Wo],props:{schema:{type:Object,default:()=>({})},model:{type:Object,default:()=>({})},options:{type:Object,default(){return{validateAfterLoad:!1,validateAfterChanged:!1,child:s.ref([]),fieldIdPrefix:"",validateAsync:!1,validationErrorClass:"error",validationSuccessClass:"",helpAsHtml:!1}}},multiple:{type:Boolean,default:!1},isNewModel:{type:Boolean,default:!1},tag:{type:String,default:"fieldset",validator:function(t){return t.length>0}}},emits:["validated","model-updated"],data(){return{vfg:this,errors:[],children:s.ref([])}},computed:{fields(){const t=[];return this.schema&&this.schema.fields&&S.forEach(this.schema.fields,i=>{(!this.multiple||i.multi===!0)&&t.push(i)}),t},groups(){const t=[];return this.schema&&this.schema.groups&&S.forEach(this.schema.groups.slice(0),i=>{t.push(i)}),t}},watch:{model:{deep:!0,handler(t,i){i!==t&&t!=null&&this.$nextTick(()=>{this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors()})}}},mounted(){this.$nextTick(()=>{this.model&&(this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors())})},methods:{fieldVisible(t){return S.isFunction(t.visible)?t.visible.call(this,this.model,t,this):S.isNil(t.visible)?!0:t.visible},onFieldValidated(t,i,o){this.errors=this.errors.filter(c=>c.field.fieldName!==o.schema.fieldName),!t&&i&&i.length>0&&S.forEach(i,c=>{this.errors.push({field:o.schema,error:c})});const l=this.errors.length===0;this.$emit("validated",l,this.errors,this)},onModelUpdated(t,i){this.$emit("model-updated",t,i)},validate(t=null){t===null&&(t=S.get(this.options,"validateAsync",!1)),this.clearValidationErrors();const i=[],o=[];S.forEach(this.$refs.children,c=>{S.isFunction(c.validate)&&(i.push(c.$refs.child),o.push(c.$refs.child.validate(!0)))});const l=c=>{const u=[];S.forEach(c,(m,E)=>{S.isArray(m)&&m.length>0&&S.forEach(m,v=>{u.push({field:i[E].schema,error:v})})}),this.errors=u;const p=u.length===0;return this.$emit("validated",p,u,this),t?u:p};return t?Promise.all(o).then(l):l(o)},clearValidationErrors(){this.errors.splice(0),S.forEach(this.$refs.children,t=>{t.clearValidationErrors()})}}},[["render",gf]]),_f={fields:[{help:"The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.",inputType:"text",label:"config.client_id",model:"config-client_id",type:"input"},{help:"The client secret.",inputType:"text",label:"config.client_secret",model:"config-client_secret",type:"input"},{help:"The discovery endpoint (or just the issuer identifier).",inputType:"text",label:"config.issuer",model:"config-issuer",required:!0,type:"input"},{help:"Types of credentials/grants to enable.",inputType:"text",label:"config.auth_methods",model:"config-auth_methods",type:"input"}]},yf={fields:[{help:"The claim that contains the scopes.",inputType:"text",label:"config.scopes_claim",model:"config-scopes_claim",type:"input"},{help:"The scopes required to be in the access token.",inputType:"text",label:"config.scopes_required",model:"config-scopes_required",type:"input"},{help:"The claim that contains the audience.",inputType:"text",label:"config.audience_claim",model:"config-audience_claim",type:"input"},{help:"The audience required to be in the access token.",inputType:"text",label:"config.audience_required",model:"config-audience_required",type:"input"},{help:"The claim that contains the roles.",inputType:"text",label:"config.roles_claim",model:"config-roles_claim",type:"input"},{help:"The roles required to be in the access token.",inputType:"text",label:"config.roles_required",model:"config-roles_required",type:"input"},{help:"The claim that contains the groups.",inputType:"text",label:"config.groups_claim",model:"config-groups_claim",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"k-input",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"},{help:"The groups required to be in the access token.",inputType:"text",label:"config.groups_required",model:"config-groups_required",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"k-input",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"},{help:"The claim that contains authenticated groups.",inputType:"text",label:"config.authenticated_groups_claim",model:"config-authenticated_groups_claim",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"k-input",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"}]},Jv="",Qv="",bf={name:"OIDCForm",components:{VueFormGenerator:Cn},props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},data(){return{init:!1,authMethods:[],sessionManagement:!1,globalFields:null,commonFieldsSchema:null,authFieldsSchema:null,advancedFieldsSchema:{fields:[]},advancedFields:null,tabs:[{hash:"#common",title:"Common"},{hash:"#authorization",title:"Authorization"},{hash:"#advanced",title:"Advanced"}]}},computed:{displayForm(){return this.formModel.id&&this.isEditing||!this.isEditing}},watch:{formModel:{handler:function(){this.oidcSetup()}}},mounted(){this.oidcSetup()},methods:{oidcSetup(){this.init||(this.init=!0,this.globalFields={fields:this.formSchema.fields.filter(t=>!t.model.startsWith("config")&&t.model!=="tags")},this.commonFieldsSchema={..._f},this.authFieldsSchema={...yf},this.advancedFieldsSchema.fields=this.formSchema.fields.filter(t=>t.model.startsWith("config")&&!this.commonFieldsSchema.fields.filter(i=>i.model===t.model).length&&!this.authFieldsSchema.fields.filter(i=>i.model===t.model).length||t.model==="tags"),this.commonFieldsSchema.fields=this.commonFieldsSchema.fields.filter(t=>t.model!=="config-auth_methods"),this.sessionManagement=this.isEditing?this.formModel["config-auth_methods"].includes("session"):!1,this.authMethods=[{label:"Authorization Code Flow",value:"authorization_code",hint:"authorization code flow",prop:this.isEditing?this.formModel["config-auth_methods"].includes("authorization_code"):!1},{label:"Bearer Access Token",value:"bearer",hint:"JWT access token verification",prop:this.isEditing?this.formModel["config-auth_methods"].includes("bearer"):!1},{label:"Client Credentials Grant",value:"client_credentials",hint:"OAuth client credentials grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("client_credentials"):!1},{label:"Passwords Grant",value:"password",hint:"OAuth legacy password grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("password"):!1},{label:"Introspection",value:"introspection",hint:"OAuth introspection",prop:this.isEditing?this.formModel["config-auth_methods"].includes("introspection"):!1},{label:"UserInfo",value:"userinfo",hint:"OpenID Connect user info endpoint authentication",prop:this.isEditing?this.formModel["config-auth_methods"].includes("userinfo"):!1},{label:"Kong OAuth",value:"kong_oauth2",hint:"Kong OAuth plugin issued tokens verification",prop:this.isEditing?this.formModel["config-auth_methods"].includes("kong_oauth2"):!1},{label:"Refresh Token",value:"refresh_token",hint:"OAuth refresh token grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("refresh_token"):!1}])},getAuthMethodsValue(t,i){const o=[];for(let l=0;l<this.authMethods.length;l++)this.authMethods[l].prop&&this.authMethods[l].value!==t&&o.push(this.authMethods[l].value);return this.sessionManagement&&t&&o.push("session"),i&&(t?o.push(t):o.push("session")),o},handleUpdate(t,i){this.formModel["config-auth_methods"]=this.getAuthMethodsValue(i,t),this.onModelUpdated()}}},on=t=>(s.pushScopeId("data-v-abac37a0"),t=t(),s.popScopeId(),t),Ef={class:"general-settings"},vf={class:"mb-2"},wf=on(()=>s.createElementVNode("span",{class:"section-header"},"Common Configuration Settings",-1)),Tf=on(()=>s.createElementVNode("div",{class:"description mb-3"}," Parameters for enabling the OpenID Connect plugin. Set these parameters before adding authorization, authentication, or other advanced configuration details. ",-1)),Sf={class:"auth-method-container"},Cf={class:"general-settings"},Bf={class:"mb-2"},Af=on(()=>s.createElementVNode("span",{class:"section-header"},"Authorization Configuration Settings",-1)),Nf=on(()=>s.createElementVNode("div",{class:"description mb-3"}," Parameters for setting up claims-based authorization. ",-1)),If={class:"general-settings"},kf={class:"mb-2"},Of=on(()=>s.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings",-1)),Mf=on(()=>s.createElementVNode("div",{class:"description mb-3"}," Advanced parameters for manually configuring the OpenID Connect plugin. ",-1));function Ff(t,i,o,l,c,u){const p=s.resolveComponent("VueFormGenerator"),m=s.resolveComponent("KExternalLink"),E=s.resolveComponent("KLabel"),v=s.resolveComponent("KCheckbox"),w=s.resolveComponent("KInputSwitch"),I=s.resolveComponent("KTabs");return s.openBlock(),s.createElementBlock("div",null,[o.formModel.id&&o.isEditing||!o.isEditing?(s.openBlock(),s.createBlock(p,{key:0,class:"global-fields",model:o.formModel,options:o.formOptions,schema:c.globalFields,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):s.createCommentVNode("",!0),s.createVNode(I,{tabs:c.tabs},{common:s.withCtx(()=>[s.createElementVNode("div",Ef,[s.createElementVNode("div",vf,[s.createVNode(m,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#important-configuration-parameters"},{default:s.withCtx(()=>[wf]),_:1})]),Tf,u.displayForm?(s.openBlock(),s.createBlock(p,{key:0,model:o.formModel,options:o.formOptions,schema:c.commonFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):s.createCommentVNode("",!0),s.createVNode(E,null,{default:s.withCtx(()=>[s.createTextVNode("config.auth_methods")]),_:1}),s.createElementVNode("div",Sf,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(c.authMethods,k=>(s.openBlock(),s.createElementBlock("div",{key:k.value,class:"auth-method"},[s.createVNode(v,{modelValue:k.prop,"onUpdate:modelValue":H=>k.prop=H,onChange:H=>u.handleUpdate(H,k.value)},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(k.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),s.createVNode(w,{modelValue:c.sessionManagement,"onUpdate:modelValue":i[0]||(i[0]=k=>c.sessionManagement=k),label:"Enable Session Management",onChange:u.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:s.withCtx(()=>[s.createElementVNode("div",Cf,[s.createElementVNode("div",Bf,[s.createVNode(m,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#authorization"},{default:s.withCtx(()=>[Af]),_:1})]),Nf,u.displayForm?(s.openBlock(),s.createBlock(p,{key:0,model:o.formModel,options:o.formOptions,schema:c.authFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):s.createCommentVNode("",!0)])]),advanced:s.withCtx(()=>[s.createElementVNode("div",If,[s.createElementVNode("div",kf,[s.createVNode(m,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/"},{default:s.withCtx(()=>[Of]),_:1})]),Mf,u.displayForm?(s.openBlock(),s.createBlock(p,{key:0,model:o.formModel,options:o.formOptions,schema:c.advancedFieldsSchema,onModelUpdated:o.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):s.createCommentVNode("",!0)])]),_:1},8,["tabs"])])}const Lf=Y(bf,[["render",Ff],["__scopeId","data-v-abac37a0"]]);var Xr=function(t,i){return Xr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,l){o.__proto__=l}||function(o,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(o[c]=l[c])},Xr(t,i)};function rt(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");Xr(t,i);function o(){this.constructor=t}t.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)}var L=function(){return L=Object.assign||function(t){for(var i,o=1,l=arguments.length;o<l;o++){i=arguments[o];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(t[c]=i[c])}return t},L.apply(this,arguments)};function Rf(t,i){var o={};for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&i.indexOf(l)<0&&(o[l]=t[l]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(t);c<l.length;c++)i.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(t,l[c])&&(o[l[c]]=t[l[c]]);return o}function yt(t,i,o){if(o||arguments.length===2)for(var l=0,c=i.length,u;l<c;l++)(u||!(l in i))&&(u||(u=Array.prototype.slice.call(i,0,l)),u[l]=i[l]);return t.concat(u||Array.prototype.slice.call(i))}var z;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(z||(z={}));var le;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(le||(le={}));var sn;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(sn||(sn={}));function cs(t){return t.type===le.literal}function Df(t){return t.type===le.argument}function us(t){return t.type===le.number}function hs(t){return t.type===le.date}function ds(t){return t.type===le.time}function fs(t){return t.type===le.select}function ms(t){return t.type===le.plural}function Pf(t){return t.type===le.pound}function ps(t){return t.type===le.tag}function gs(t){return!!(t&&typeof t=="object"&&t.type===sn.number)}function jr(t){return!!(t&&typeof t=="object"&&t.type===sn.dateTime)}var _s=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Hf=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Uf(t){var i={};return t.replace(Hf,function(o){var l=o.length;switch(o[0]){case"G":i.era=l===4?"long":l===5?"narrow":"short";break;case"y":i.year=l===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":i.month=["numeric","2-digit","short","long","narrow"][l-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":i.day=["numeric","2-digit"][l-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":i.weekday=l===4?"short":l===5?"narrow":"short";break;case"e":if(l<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");i.weekday=["short","long","narrow","short"][l-4];break;case"c":if(l<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");i.weekday=["short","long","narrow","short"][l-4];break;case"a":i.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":i.hourCycle="h12",i.hour=["numeric","2-digit"][l-1];break;case"H":i.hourCycle="h23",i.hour=["numeric","2-digit"][l-1];break;case"K":i.hourCycle="h11",i.hour=["numeric","2-digit"][l-1];break;case"k":i.hourCycle="h24",i.hour=["numeric","2-digit"][l-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":i.minute=["numeric","2-digit"][l-1];break;case"s":i.second=["numeric","2-digit"][l-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":i.timeZoneName=l<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),i}var Vf=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function $f(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var i=t.split(Vf).filter(function(k){return k.length>0}),o=[],l=0,c=i;l<c.length;l++){var u=c[l],p=u.split("/");if(p.length===0)throw new Error("Invalid number skeleton");for(var m=p[0],E=p.slice(1),v=0,w=E;v<w.length;v++){var I=w[v];if(I.length===0)throw new Error("Invalid number skeleton")}o.push({stem:m,options:E})}return o}function xf(t){return t.replace(/^(.*?)-/,"")}var ys=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,bs=/^(@+)?(\+|#+)?[rs]?$/g,Gf=/(\*)(0+)|(#+)(0+)|(0+)/g,Es=/^(0+)$/;function vs(t){var i={};return t[t.length-1]==="r"?i.roundingPriority="morePrecision":t[t.length-1]==="s"&&(i.roundingPriority="lessPrecision"),t.replace(bs,function(o,l,c){return typeof c!="string"?(i.minimumSignificantDigits=l.length,i.maximumSignificantDigits=l.length):c==="+"?i.minimumSignificantDigits=l.length:l[0]==="#"?i.maximumSignificantDigits=l.length:(i.minimumSignificantDigits=l.length,i.maximumSignificantDigits=l.length+(typeof c=="string"?c.length:0)),""}),i}function ws(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Kf(t){var i;if(t[0]==="E"&&t[1]==="E"?(i={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(i={notation:"scientific"},t=t.slice(1)),i){var o=t.slice(0,2);if(o==="+!"?(i.signDisplay="always",t=t.slice(2)):o==="+?"&&(i.signDisplay="exceptZero",t=t.slice(2)),!Es.test(t))throw new Error("Malformed concise eng/scientific notation");i.minimumIntegerDigits=t.length}return i}function Ts(t){var i={},o=ws(t);return o||i}function Yf(t){for(var i={},o=0,l=t;o<l.length;o++){var c=l[o];switch(c.stem){case"percent":case"%":i.style="percent";continue;case"%x100":i.style="percent",i.scale=100;continue;case"currency":i.style="currency",i.currency=c.options[0];continue;case"group-off":case",_":i.useGrouping=!1;continue;case"precision-integer":case".":i.maximumFractionDigits=0;continue;case"measure-unit":case"unit":i.style="unit",i.unit=xf(c.options[0]);continue;case"compact-short":case"K":i.notation="compact",i.compactDisplay="short";continue;case"compact-long":case"KK":i.notation="compact",i.compactDisplay="long";continue;case"scientific":i=L(L(L({},i),{notation:"scientific"}),c.options.reduce(function(E,v){return L(L({},E),Ts(v))},{}));continue;case"engineering":i=L(L(L({},i),{notation:"engineering"}),c.options.reduce(function(E,v){return L(L({},E),Ts(v))},{}));continue;case"notation-simple":i.notation="standard";continue;case"unit-width-narrow":i.currencyDisplay="narrowSymbol",i.unitDisplay="narrow";continue;case"unit-width-short":i.currencyDisplay="code",i.unitDisplay="short";continue;case"unit-width-full-name":i.currencyDisplay="name",i.unitDisplay="long";continue;case"unit-width-iso-code":i.currencyDisplay="symbol";continue;case"scale":i.scale=parseFloat(c.options[0]);continue;case"integer-width":if(c.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");c.options[0].replace(Gf,function(E,v,w,I,k,H){if(v)i.minimumIntegerDigits=w.length;else{if(I&&k)throw new Error("We currently do not support maximum integer digits");if(H)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Es.test(c.stem)){i.minimumIntegerDigits=c.stem.length;continue}if(ys.test(c.stem)){if(c.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");c.stem.replace(ys,function(E,v,w,I,k,H){return w==="*"?i.minimumFractionDigits=v.length:I&&I[0]==="#"?i.maximumFractionDigits=I.length:k&&H?(i.minimumFractionDigits=k.length,i.maximumFractionDigits=k.length+H.length):(i.minimumFractionDigits=v.length,i.maximumFractionDigits=v.length),""});var u=c.options[0];u==="w"?i=L(L({},i),{trailingZeroDisplay:"stripIfInteger"}):u&&(i=L(L({},i),vs(u)));continue}if(bs.test(c.stem)){i=L(L({},i),vs(c.stem));continue}var p=ws(c.stem);p&&(i=L(L({},i),p));var m=Kf(c.stem);m&&(i=L(L({},i),m))}return i}var jn={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function Wf(t,i){for(var o="",l=0;l<t.length;l++){var c=t.charAt(l);if(c==="j"){for(var u=0;l+1<t.length&&t.charAt(l+1)===c;)u++,l++;var p=1+(u&1),m=u<2?1:3+(u>>1),E="a",v=qf(i);for((v=="H"||v=="k")&&(m=0);m-- >0;)o+=E;for(;p-- >0;)o=v+o}else c==="J"?o+="H":o+=c}return o}function qf(t){var i=t.hourCycle;if(i===void 0&&t.hourCycles&&t.hourCycles.length&&(i=t.hourCycles[0]),i)switch(i){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var o=t.language,l;o!=="root"&&(l=t.maximize().region);var c=jn[l||""]||jn[o||""]||jn["".concat(o,"-001")]||jn["001"];return c[0]}var Jr,zf=new RegExp("^".concat(_s.source,"*")),Zf=new RegExp("".concat(_s.source,"*$"));function j(t,i){return{start:t,end:i}}var Xf=!!String.prototype.startsWith,jf=!!String.fromCodePoint,Jf=!!Object.fromEntries,Qf=!!String.prototype.codePointAt,em=!!String.prototype.trimStart,tm=!!String.prototype.trimEnd,nm=!!Number.isSafeInteger,rm=nm?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Qr=!0;try{var im=As("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Qr=((Jr=im.exec("a"))===null||Jr===void 0?void 0:Jr[0])==="a"}catch{Qr=!1}var Ss=Xf?function(t,i,o){return t.startsWith(i,o)}:function(t,i,o){return t.slice(o,o+i.length)===i},ei=jf?String.fromCodePoint:function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];for(var o="",l=t.length,c=0,u;l>c;){if(u=t[c++],u>1114111)throw RangeError(u+" is not a valid code point");o+=u<65536?String.fromCharCode(u):String.fromCharCode(((u-=65536)>>10)+55296,u%1024+56320)}return o},Cs=Jf?Object.fromEntries:function(t){for(var i={},o=0,l=t;o<l.length;o++){var c=l[o],u=c[0],p=c[1];i[u]=p}return i},Bs=Qf?function(t,i){return t.codePointAt(i)}:function(t,i){var o=t.length;if(!(i<0||i>=o)){var l=t.charCodeAt(i),c;return l<55296||l>56319||i+1===o||(c=t.charCodeAt(i+1))<56320||c>57343?l:(l-55296<<10)+(c-56320)+65536}},om=em?function(t){return t.trimStart()}:function(t){return t.replace(zf,"")},sm=tm?function(t){return t.trimEnd()}:function(t){return t.replace(Zf,"")};function As(t,i){return new RegExp(t,i)}var ti;if(Qr){var Ns=As("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ti=function(t,i){var o;Ns.lastIndex=i;var l=Ns.exec(t);return(o=l[1])!==null&&o!==void 0?o:""}}else ti=function(t,i){for(var o=[];;){var l=Bs(t,i);if(l===void 0||Is(l)||um(l))break;o.push(l),i+=l>=65536?2:1}return ei.apply(void 0,o)};var am=function(){function t(i,o){o===void 0&&(o={}),this.message=i,this.position={offset:0,line:1,column:1},this.ignoreTag=!!o.ignoreTag,this.locale=o.locale,this.requiresOtherClause=!!o.requiresOtherClause,this.shouldParseSkeletons=!!o.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(i,o,l){for(var c=[];!this.isEOF();){var u=this.char();if(u===123){var p=this.parseArgument(i,l);if(p.err)return p;c.push(p.val)}else{if(u===125&&i>0)break;if(u===35&&(o==="plural"||o==="selectordinal")){var m=this.clonePosition();this.bump(),c.push({type:le.pound,location:j(m,this.clonePosition())})}else if(u===60&&!this.ignoreTag&&this.peek()===47){if(l)break;return this.error(z.UNMATCHED_CLOSING_TAG,j(this.clonePosition(),this.clonePosition()))}else if(u===60&&!this.ignoreTag&&ni(this.peek()||0)){var p=this.parseTag(i,o);if(p.err)return p;c.push(p.val)}else{var p=this.parseLiteral(i,o);if(p.err)return p;c.push(p.val)}}}return{val:c,err:null}},t.prototype.parseTag=function(i,o){var l=this.clonePosition();this.bump();var c=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:le.literal,value:"<".concat(c,"/>"),location:j(l,this.clonePosition())},err:null};if(this.bumpIf(">")){var u=this.parseMessage(i+1,o,!0);if(u.err)return u;var p=u.val,m=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ni(this.char()))return this.error(z.INVALID_TAG,j(m,this.clonePosition()));var E=this.clonePosition(),v=this.parseTagName();return c!==v?this.error(z.UNMATCHED_CLOSING_TAG,j(E,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:le.tag,value:c,children:p,location:j(l,this.clonePosition())},err:null}:this.error(z.INVALID_TAG,j(m,this.clonePosition())))}else return this.error(z.UNCLOSED_TAG,j(l,this.clonePosition()))}else return this.error(z.INVALID_TAG,j(l,this.clonePosition()))},t.prototype.parseTagName=function(){var i=this.offset();for(this.bump();!this.isEOF()&&cm(this.char());)this.bump();return this.message.slice(i,this.offset())},t.prototype.parseLiteral=function(i,o){for(var l=this.clonePosition(),c="";;){var u=this.tryParseQuote(o);if(u){c+=u;continue}var p=this.tryParseUnquoted(i,o);if(p){c+=p;continue}var m=this.tryParseLeftAngleBracket();if(m){c+=m;continue}break}var E=j(l,this.clonePosition());return{val:{type:le.literal,value:c,location:E},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!lm(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(i){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(i==="plural"||i==="selectordinal")break;return null;default:return null}this.bump();var o=[this.char()];for(this.bump();!this.isEOF();){var l=this.char();if(l===39)if(this.peek()===39)o.push(39),this.bump();else{this.bump();break}else o.push(l);this.bump()}return ei.apply(void 0,o)},t.prototype.tryParseUnquoted=function(i,o){if(this.isEOF())return null;var l=this.char();return l===60||l===123||l===35&&(o==="plural"||o==="selectordinal")||l===125&&i>0?null:(this.bump(),ei(l))},t.prototype.parseArgument=function(i,o){var l=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(z.EXPECT_ARGUMENT_CLOSING_BRACE,j(l,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(z.EMPTY_ARGUMENT,j(l,this.clonePosition()));var c=this.parseIdentifierIfPossible().value;if(!c)return this.error(z.MALFORMED_ARGUMENT,j(l,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(z.EXPECT_ARGUMENT_CLOSING_BRACE,j(l,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:le.argument,value:c,location:j(l,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(z.EXPECT_ARGUMENT_CLOSING_BRACE,j(l,this.clonePosition())):this.parseArgumentOptions(i,o,c,l);default:return this.error(z.MALFORMED_ARGUMENT,j(l,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var i=this.clonePosition(),o=this.offset(),l=ti(this.message,o),c=o+l.length;this.bumpTo(c);var u=this.clonePosition(),p=j(i,u);return{value:l,location:p}},t.prototype.parseArgumentOptions=function(i,o,l,c){var u,p=this.clonePosition(),m=this.parseIdentifierIfPossible().value,E=this.clonePosition();switch(m){case"":return this.error(z.EXPECT_ARGUMENT_TYPE,j(p,E));case"number":case"date":case"time":{this.bumpSpace();var v=null;if(this.bumpIf(",")){this.bumpSpace();var w=this.clonePosition(),I=this.parseSimpleArgStyleIfPossible();if(I.err)return I;var k=sm(I.val);if(k.length===0)return this.error(z.EXPECT_ARGUMENT_STYLE,j(this.clonePosition(),this.clonePosition()));var H=j(w,this.clonePosition());v={style:k,styleLocation:H}}var oe=this.tryParseArgumentClose(c);if(oe.err)return oe;var J=j(c,this.clonePosition());if(v&&Ss(v==null?void 0:v.style,"::",0)){var Z=om(v.style.slice(2));if(m==="number"){var I=this.parseNumberSkeletonFromString(Z,v.styleLocation);return I.err?I:{val:{type:le.number,value:l,location:J,style:I.val},err:null}}else{if(Z.length===0)return this.error(z.EXPECT_DATE_TIME_SKELETON,J);var Q=Z;this.locale&&(Q=Wf(Z,this.locale));var k={type:sn.dateTime,pattern:Q,location:v.styleLocation,parsedOptions:this.shouldParseSkeletons?Uf(Q):{}},_e=m==="date"?le.date:le.time;return{val:{type:_e,value:l,location:J,style:k},err:null}}}return{val:{type:m==="number"?le.number:m==="date"?le.date:le.time,value:l,location:J,style:(u=v==null?void 0:v.style)!==null&&u!==void 0?u:null},err:null}}case"plural":case"selectordinal":case"select":{var re=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(z.EXPECT_SELECT_ARGUMENT_OPTIONS,j(re,L({},re)));this.bumpSpace();var Ee=this.parseIdentifierIfPossible(),ce=0;if(m!=="select"&&Ee.value==="offset"){if(!this.bumpIf(":"))return this.error(z.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,j(this.clonePosition(),this.clonePosition()));this.bumpSpace();var I=this.tryParseDecimalInteger(z.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,z.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(I.err)return I;this.bumpSpace(),Ee=this.parseIdentifierIfPossible(),ce=I.val}var Ie=this.tryParsePluralOrSelectOptions(i,m,o,Ee);if(Ie.err)return Ie;var oe=this.tryParseArgumentClose(c);if(oe.err)return oe;var De=j(c,this.clonePosition());return m==="select"?{val:{type:le.select,value:l,options:Cs(Ie.val),location:De},err:null}:{val:{type:le.plural,value:l,options:Cs(Ie.val),offset:ce,pluralType:m==="plural"?"cardinal":"ordinal",location:De},err:null}}default:return this.error(z.INVALID_ARGUMENT_TYPE,j(p,E))}},t.prototype.tryParseArgumentClose=function(i){return this.isEOF()||this.char()!==125?this.error(z.EXPECT_ARGUMENT_CLOSING_BRACE,j(i,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var i=0,o=this.clonePosition();!this.isEOF();){var l=this.char();switch(l){case 39:{this.bump();var c=this.clonePosition();if(!this.bumpUntil("'"))return this.error(z.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,j(c,this.clonePosition()));this.bump();break}case 123:{i+=1,this.bump();break}case 125:{if(i>0)i-=1;else return{val:this.message.slice(o.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(o.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(i,o){var l=[];try{l=$f(i)}catch{return this.error(z.INVALID_NUMBER_SKELETON,o)}return{val:{type:sn.number,tokens:l,location:o,parsedOptions:this.shouldParseSkeletons?Yf(l):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(i,o,l,c){for(var u,p=!1,m=[],E=new Set,v=c.value,w=c.location;;){if(v.length===0){var I=this.clonePosition();if(o!=="select"&&this.bumpIf("=")){var k=this.tryParseDecimalInteger(z.EXPECT_PLURAL_ARGUMENT_SELECTOR,z.INVALID_PLURAL_ARGUMENT_SELECTOR);if(k.err)return k;w=j(I,this.clonePosition()),v=this.message.slice(I.offset,this.offset())}else break}if(E.has(v))return this.error(o==="select"?z.DUPLICATE_SELECT_ARGUMENT_SELECTOR:z.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,w);v==="other"&&(p=!0),this.bumpSpace();var H=this.clonePosition();if(!this.bumpIf("{"))return this.error(o==="select"?z.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:z.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,j(this.clonePosition(),this.clonePosition()));var oe=this.parseMessage(i+1,o,l);if(oe.err)return oe;var J=this.tryParseArgumentClose(H);if(J.err)return J;m.push([v,{value:oe.val,location:j(H,this.clonePosition())}]),E.add(v),this.bumpSpace(),u=this.parseIdentifierIfPossible(),v=u.value,w=u.location}return m.length===0?this.error(o==="select"?z.EXPECT_SELECT_ARGUMENT_SELECTOR:z.EXPECT_PLURAL_ARGUMENT_SELECTOR,j(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!p?this.error(z.MISSING_OTHER_CLAUSE,j(this.clonePosition(),this.clonePosition())):{val:m,err:null}},t.prototype.tryParseDecimalInteger=function(i,o){var l=1,c=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(l=-1);for(var u=!1,p=0;!this.isEOF();){var m=this.char();if(m>=48&&m<=57)u=!0,p=p*10+(m-48),this.bump();else break}var E=j(c,this.clonePosition());return u?(p*=l,rm(p)?{val:p,err:null}:this.error(o,E)):this.error(i,E)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var i=this.position.offset;if(i>=this.message.length)throw Error("out of bound");var o=Bs(this.message,i);if(o===void 0)throw Error("Offset ".concat(i," is at invalid UTF-16 code unit boundary"));return o},t.prototype.error=function(i,o){return{val:null,err:{kind:i,message:this.message,location:o}}},t.prototype.bump=function(){if(!this.isEOF()){var i=this.char();i===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=i<65536?1:2)}},t.prototype.bumpIf=function(i){if(Ss(this.message,i,this.offset())){for(var o=0;o<i.length;o++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(i){var o=this.offset(),l=this.message.indexOf(i,o);return l>=0?(this.bumpTo(l),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(i){if(this.offset()>i)throw Error("targetOffset ".concat(i," must be greater than or equal to the current offset ").concat(this.offset()));for(i=Math.min(i,this.message.length);;){var o=this.offset();if(o===i)break;if(o>i)throw Error("targetOffset ".concat(i," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&Is(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var i=this.char(),o=this.offset(),l=this.message.charCodeAt(o+(i>=65536?2:1));return l??null},t}();function ni(t){return t>=97&&t<=122||t>=65&&t<=90}function lm(t){return ni(t)||t===47}function cm(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function Is(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function um(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function ri(t){t.forEach(function(i){if(delete i.location,fs(i)||ms(i))for(var o in i.options)delete i.options[o].location,ri(i.options[o].value);else us(i)&&gs(i.style)||(hs(i)||ds(i))&&jr(i.style)?delete i.style.location:ps(i)&&ri(i.children)})}function hm(t,i){i===void 0&&(i={}),i=L({shouldParseSkeletons:!0,requiresOtherClause:!0},i);var o=new am(t,i).parse();if(o.err){var l=SyntaxError(z[o.err.kind]);throw l.location=o.err.location,l.originalMessage=o.err.message,l}return i!=null&&i.captureLocation||ri(o.val),o.val}function ut(t,i){var o=i&&i.cache?i.cache:_m,l=i&&i.serializer?i.serializer:gm,c=i&&i.strategy?i.strategy:fm;return c(t,{cache:o,serializer:l})}function dm(t){return t==null||typeof t=="number"||typeof t=="boolean"}function ks(t,i,o,l){var c=dm(l)?l:o(l),u=i.get(c);return typeof u>"u"&&(u=t.call(this,l),i.set(c,u)),u}function Os(t,i,o){var l=Array.prototype.slice.call(arguments,3),c=o(l),u=i.get(c);return typeof u>"u"&&(u=t.apply(this,l),i.set(c,u)),u}function ii(t,i,o,l,c){return o.bind(i,t,l,c)}function fm(t,i){var o=t.length===1?ks:Os;return ii(t,this,o,i.cache.create(),i.serializer)}function mm(t,i){return ii(t,this,Os,i.cache.create(),i.serializer)}function pm(t,i){return ii(t,this,ks,i.cache.create(),i.serializer)}var gm=function(){return JSON.stringify(arguments)};function oi(){this.cache=Object.create(null)}oi.prototype.get=function(t){return this.cache[t]},oi.prototype.set=function(t,i){this.cache[t]=i};var _m={create:function(){return new oi}},ht={variadic:mm,monadic:pm},dt;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(dt||(dt={}));var Ot=function(t){rt(i,t);function i(o,l,c){var u=t.call(this,o)||this;return u.code=l,u.originalMessage=c,u}return i.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},i}(Error),Ms=function(t){rt(i,t);function i(o,l,c,u){return t.call(this,'Invalid values for "'.concat(o,'": "').concat(l,'". Options are "').concat(Object.keys(c).join('", "'),'"'),dt.INVALID_VALUE,u)||this}return i}(Ot),ym=function(t){rt(i,t);function i(o,l,c){return t.call(this,'Value for "'.concat(o,'" must be of type ').concat(l),dt.INVALID_VALUE,c)||this}return i}(Ot),bm=function(t){rt(i,t);function i(o,l){return t.call(this,'The intl string context variable "'.concat(o,'" was not provided to the string "').concat(l,'"'),dt.MISSING_VALUE,l)||this}return i}(Ot),Ne;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(Ne||(Ne={}));function Em(t){return t.length<2?t:t.reduce(function(i,o){var l=i[i.length-1];return!l||l.type!==Ne.literal||o.type!==Ne.literal?i.push(o):l.value+=o.value,i},[])}function vm(t){return typeof t=="function"}function Jn(t,i,o,l,c,u,p){if(t.length===1&&cs(t[0]))return[{type:Ne.literal,value:t[0].value}];for(var m=[],E=0,v=t;E<v.length;E++){var w=v[E];if(cs(w)){m.push({type:Ne.literal,value:w.value});continue}if(Pf(w)){typeof u=="number"&&m.push({type:Ne.literal,value:o.getNumberFormat(i).format(u)});continue}var I=w.value;if(!(c&&I in c))throw new bm(I,p);var k=c[I];if(Df(w)){(!k||typeof k=="string"||typeof k=="number")&&(k=typeof k=="string"||typeof k=="number"?String(k):""),m.push({type:typeof k=="string"?Ne.literal:Ne.object,value:k});continue}if(hs(w)){var H=typeof w.style=="string"?l.date[w.style]:jr(w.style)?w.style.parsedOptions:void 0;m.push({type:Ne.literal,value:o.getDateTimeFormat(i,H).format(k)});continue}if(ds(w)){var H=typeof w.style=="string"?l.time[w.style]:jr(w.style)?w.style.parsedOptions:l.time.medium;m.push({type:Ne.literal,value:o.getDateTimeFormat(i,H).format(k)});continue}if(us(w)){var H=typeof w.style=="string"?l.number[w.style]:gs(w.style)?w.style.parsedOptions:void 0;H&&H.scale&&(k=k*(H.scale||1)),m.push({type:Ne.literal,value:o.getNumberFormat(i,H).format(k)});continue}if(ps(w)){var oe=w.children,J=w.value,Z=c[J];if(!vm(Z))throw new ym(J,"function",p);var Q=Jn(oe,i,o,l,c,u),_e=Z(Q.map(function(ce){return ce.value}));Array.isArray(_e)||(_e=[_e]),m.push.apply(m,_e.map(function(ce){return{type:typeof ce=="string"?Ne.literal:Ne.object,value:ce}}))}if(fs(w)){var re=w.options[k]||w.options.other;if(!re)throw new Ms(w.value,k,Object.keys(w.options),p);m.push.apply(m,Jn(re.value,i,o,l,c));continue}if(ms(w)){var re=w.options["=".concat(k)];if(!re){if(!Intl.PluralRules)throw new Ot(`Intl.PluralRules is not available in this environment.
28
+ Try polyfilling it using "@formatjs/intl-pluralrules"
29
+ `,dt.MISSING_INTL_API,p);var Ee=o.getPluralRules(i,{type:w.pluralType}).select(k-(w.offset||0));re=w.options[Ee]||w.options.other}if(!re)throw new Ms(w.value,k,Object.keys(w.options),p);m.push.apply(m,Jn(re.value,i,o,l,c,k-(w.offset||0)));continue}}return Em(m)}function wm(t,i){return i?L(L(L({},t||{}),i||{}),Object.keys(t).reduce(function(o,l){return o[l]=L(L({},t[l]),i[l]||{}),o},{})):t}function Tm(t,i){return i?Object.keys(t).reduce(function(o,l){return o[l]=wm(t[l],i[l]),o},L({},t)):t}function si(t){return{create:function(){return{get:function(i){return t[i]},set:function(i,o){t[i]=o}}}}}function Sm(t){return t===void 0&&(t={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ut(function(){for(var i,o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return new((i=Intl.NumberFormat).bind.apply(i,yt([void 0],o,!1)))},{cache:si(t.number),strategy:ht.variadic}),getDateTimeFormat:ut(function(){for(var i,o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return new((i=Intl.DateTimeFormat).bind.apply(i,yt([void 0],o,!1)))},{cache:si(t.dateTime),strategy:ht.variadic}),getPluralRules:ut(function(){for(var i,o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return new((i=Intl.PluralRules).bind.apply(i,yt([void 0],o,!1)))},{cache:si(t.pluralRules),strategy:ht.variadic})}}var Fs=function(){function t(i,o,l,c){o===void 0&&(o=t.defaultLocale);var u=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(E){var v=u.formatToParts(E);if(v.length===1)return v[0].value;var w=v.reduce(function(I,k){return!I.length||k.type!==Ne.literal||typeof I[I.length-1]!="string"?I.push(k.value):I[I.length-1]+=k.value,I},[]);return w.length<=1?w[0]||"":w},this.formatToParts=function(E){return Jn(u.ast,u.locales,u.formatters,u.formats,E,void 0,u.message)},this.resolvedOptions=function(){var E;return{locale:((E=u.resolvedLocale)===null||E===void 0?void 0:E.toString())||Intl.NumberFormat.supportedLocalesOf(u.locales)[0]}},this.getAst=function(){return u.ast},this.locales=o,this.resolvedLocale=t.resolveLocale(o),typeof i=="string"){if(this.message=i,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var p=c||{};p.formatters;var m=Rf(p,["formatters"]);this.ast=t.__parse(i,L(L({},m),{locale:this.resolvedLocale}))}else this.ast=i;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Tm(t.formats,l),this.formatters=c&&c.formatters||Sm(this.formatterCache)}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(i){if(!(typeof Intl.Locale>"u")){var o=Intl.NumberFormat.supportedLocalesOf(i);return o.length>0?new Intl.Locale(o[0]):new Intl.Locale(typeof i=="string"?i:i[0])}},t.__parse=hm,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}(),Ce;(function(t){t.FORMAT_ERROR="FORMAT_ERROR",t.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",t.INVALID_CONFIG="INVALID_CONFIG",t.MISSING_DATA="MISSING_DATA",t.MISSING_TRANSLATION="MISSING_TRANSLATION"})(Ce||(Ce={}));var Re=function(t){rt(i,t);function i(o,l,c){var u=this,p=c?c instanceof Error?c:new Error(String(c)):void 0;return u=t.call(this,"[@formatjs/intl Error ".concat(o,"] ").concat(l,`
30
+ `).concat(p?`
31
+ `.concat(p.message,`
32
+ `).concat(p.stack):""))||this,u.code=o,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(u,i),u}return i}(Error),Cm=function(t){rt(i,t);function i(o,l){return t.call(this,Ce.UNSUPPORTED_FORMATTER,o,l)||this}return i}(Re),Bm=function(t){rt(i,t);function i(o,l){return t.call(this,Ce.INVALID_CONFIG,o,l)||this}return i}(Re),Ls=function(t){rt(i,t);function i(o,l){return t.call(this,Ce.MISSING_DATA,o,l)||this}return i}(Re),ai=function(t){rt(i,t);function i(o,l,c){return t.call(this,Ce.FORMAT_ERROR,"".concat(o,`
33
+ Locale: `).concat(l,`
34
+ `),c)||this}return i}(Re),li=function(t){rt(i,t);function i(o,l,c,u){var p=t.call(this,"".concat(o,`
35
+ MessageID: `).concat(c==null?void 0:c.id,`
36
+ Default Message: `).concat(c==null?void 0:c.defaultMessage,`
37
+ Description: `).concat(c==null?void 0:c.description,`
38
+ `),l,u)||this;return p.descriptor=c,p}return i}(ai),Am=function(t){rt(i,t);function i(o,l){var c=t.call(this,Ce.MISSING_TRANSLATION,'Missing message: "'.concat(o.id,'" for locale "').concat(l,'", using ').concat(o.defaultMessage?"default message (".concat(typeof o.defaultMessage=="string"?o.defaultMessage:o.defaultMessage.map(function(u){var p;return(p=u.value)!==null&&p!==void 0?p:JSON.stringify(u)}).join(),")"):"id"," as fallback."))||this;return c.descriptor=o,c}return i}(Re);function Yt(t,i,o){return o===void 0&&(o={}),i.reduce(function(l,c){return c in t?l[c]=t[c]:c in o&&(l[c]=o[c]),l},{})}var Nm=function(t){process.env.NODE_ENV!=="production"&&console.error(t)},Im=function(t){process.env.NODE_ENV!=="production"&&console.warn(t)},km={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:Nm,onWarn:Im};function Rs(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Wt(t){return{create:function(){return{get:function(i){return t[i]},set:function(i,o){t[i]=o}}}}}function Om(t){t===void 0&&(t=Rs());var i=Intl.RelativeTimeFormat,o=Intl.ListFormat,l=Intl.DisplayNames,c=ut(function(){for(var m,E=[],v=0;v<arguments.length;v++)E[v]=arguments[v];return new((m=Intl.DateTimeFormat).bind.apply(m,yt([void 0],E,!1)))},{cache:Wt(t.dateTime),strategy:ht.variadic}),u=ut(function(){for(var m,E=[],v=0;v<arguments.length;v++)E[v]=arguments[v];return new((m=Intl.NumberFormat).bind.apply(m,yt([void 0],E,!1)))},{cache:Wt(t.number),strategy:ht.variadic}),p=ut(function(){for(var m,E=[],v=0;v<arguments.length;v++)E[v]=arguments[v];return new((m=Intl.PluralRules).bind.apply(m,yt([void 0],E,!1)))},{cache:Wt(t.pluralRules),strategy:ht.variadic});return{getDateTimeFormat:c,getNumberFormat:u,getMessageFormat:ut(function(m,E,v,w){return new Fs(m,E,v,L({formatters:{getNumberFormat:u,getDateTimeFormat:c,getPluralRules:p}},w||{}))},{cache:Wt(t.message),strategy:ht.variadic}),getRelativeTimeFormat:ut(function(){for(var m=[],E=0;E<arguments.length;E++)m[E]=arguments[E];return new(i.bind.apply(i,yt([void 0],m,!1)))},{cache:Wt(t.relativeTime),strategy:ht.variadic}),getPluralRules:p,getListFormat:ut(function(){for(var m=[],E=0;E<arguments.length;E++)m[E]=arguments[E];return new(o.bind.apply(o,yt([void 0],m,!1)))},{cache:Wt(t.list),strategy:ht.variadic}),getDisplayNames:ut(function(){for(var m=[],E=0;E<arguments.length;E++)m[E]=arguments[E];return new(l.bind.apply(l,yt([void 0],m,!1)))},{cache:Wt(t.displayNames),strategy:ht.variadic})}}function ci(t,i,o,l){var c=t&&t[i],u;if(c&&(u=c[o]),u)return u;l(new Cm("No ".concat(i," format named: ").concat(o)))}function Mm(t,i,o){if(o===void 0&&(o=Error),!t)throw new o(i)}function Qn(t,i){return Object.keys(t).reduce(function(o,l){return o[l]=L({timeZone:i},t[l]),o},{})}function Ds(t,i){var o=Object.keys(L(L({},t),i));return o.reduce(function(l,c){return l[c]=L(L({},t[c]||{}),i[c]||{}),l},{})}function Ps(t,i){if(!i)return t;var o=Fs.formats;return L(L(L({},o),t),{date:Ds(Qn(o.date,i),Qn(t.date||{},i)),time:Ds(Qn(o.time,i),Qn(t.time||{},i))})}var Hs=function(t,i,o,l,c){var u=t.locale,p=t.formats,m=t.messages,E=t.defaultLocale,v=t.defaultFormats,w=t.fallbackOnEmptyString,I=t.onError,k=t.timeZone,H=t.defaultRichTextElements;o===void 0&&(o={id:""});var oe=o.id,J=o.defaultMessage;Mm(!!oe,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var Z=String(oe),Q=m&&Object.prototype.hasOwnProperty.call(m,Z)&&m[Z];if(Array.isArray(Q)&&Q.length===1&&Q[0].type===le.literal)return Q[0].value;if(!l&&Q&&typeof Q=="string"&&!H)return Q.replace(/'\{(.*?)\}'/gi,"{$1}");if(l=L(L({},H),l||{}),p=Ps(p,k),v=Ps(v,k),!Q){if(w===!1&&Q==="")return Q;if((!J||u&&u.toLowerCase()!==E.toLowerCase())&&I(new Am(o,u)),J)try{var _e=i.getMessageFormat(J,E,v,c);return _e.format(l)}catch(re){return I(new li('Error formatting default message for: "'.concat(Z,'", rendering default message verbatim'),u,o,re)),typeof J=="string"?J:Z}return Z}try{var _e=i.getMessageFormat(Q,u,p,L({formatters:i},c||{}));return _e.format(l)}catch(re){I(new li('Error formatting message: "'.concat(Z,'", using ').concat(J?"default message":"id"," as fallback."),u,o,re))}if(J)try{var _e=i.getMessageFormat(J,E,v,c);return _e.format(l)}catch(re){I(new li('Error formatting the default message for: "'.concat(Z,'", rendering message verbatim'),u,o,re))}return typeof Q=="string"?Q:typeof J=="string"?J:Z},Us=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function er(t,i,o,l){var c=t.locale,u=t.formats,p=t.onError,m=t.timeZone;l===void 0&&(l={});var E=l.format,v=L(L({},m&&{timeZone:m}),E&&ci(u,i,E,p)),w=Yt(l,Us,v);return i==="time"&&!w.hour&&!w.minute&&!w.second&&!w.timeStyle&&!w.dateStyle&&(w=L(L({},w),{hour:"numeric",minute:"numeric"})),o(c,w)}function Fm(t,i){for(var o=[],l=2;l<arguments.length;l++)o[l-2]=arguments[l];var c=o[0],u=o[1],p=u===void 0?{}:u,m=typeof c=="string"?new Date(c||0):c;try{return er(t,"date",i,p).format(m)}catch(E){t.onError(new Re(Ce.FORMAT_ERROR,"Error formatting date.",E))}return String(m)}function Lm(t,i){for(var o=[],l=2;l<arguments.length;l++)o[l-2]=arguments[l];var c=o[0],u=o[1],p=u===void 0?{}:u,m=typeof c=="string"?new Date(c||0):c;try{return er(t,"time",i,p).format(m)}catch(E){t.onError(new Re(Ce.FORMAT_ERROR,"Error formatting time.",E))}return String(m)}function Rm(t,i){for(var o=[],l=2;l<arguments.length;l++)o[l-2]=arguments[l];var c=o[0],u=o[1],p=o[2],m=p===void 0?{}:p,E=t.timeZone,v=t.locale,w=t.onError,I=Yt(m,Us,E?{timeZone:E}:{});try{return i(v,I).formatRange(c,u)}catch(k){w(new Re(Ce.FORMAT_ERROR,"Error formatting date time range.",k))}return String(c)}function Dm(t,i){for(var o=[],l=2;l<arguments.length;l++)o[l-2]=arguments[l];var c=o[0],u=o[1],p=u===void 0?{}:u,m=typeof c=="string"?new Date(c||0):c;try{return er(t,"date",i,p).formatToParts(m)}catch(E){t.onError(new Re(Ce.FORMAT_ERROR,"Error formatting date.",E))}return[]}function Pm(t,i){for(var o=[],l=2;l<arguments.length;l++)o[l-2]=arguments[l];var c=o[0],u=o[1],p=u===void 0?{}:u,m=typeof c=="string"?new Date(c||0):c;try{return er(t,"time",i,p).formatToParts(m)}catch(E){t.onError(new Re(Ce.FORMAT_ERROR,"Error formatting time.",E))}return[]}var Hm=["style","type","fallback","languageDisplay"];function Um(t,i,o,l){var c=t.locale,u=t.onError,p=Intl.DisplayNames;p||u(new Ot(`Intl.DisplayNames is not available in this environment.
39
+ Try polyfilling it using "@formatjs/intl-displaynames"
40
+ `,dt.MISSING_INTL_API));var m=Yt(l,Hm);try{return i(c,m).of(o)}catch(E){u(new Re(Ce.FORMAT_ERROR,"Error formatting display name.",E))}}var Vm=["type","style"],Vs=Date.now();function $m(t){return"".concat(Vs,"_").concat(t,"_").concat(Vs)}function xm(t,i,o,l){l===void 0&&(l={});var c=$s(t,i,o,l).reduce(function(u,p){var m=p.value;return typeof m!="string"?u.push(m):typeof u[u.length-1]=="string"?u[u.length-1]+=m:u.push(m),u},[]);return c.length===1?c[0]:c.length===0?"":c}function $s(t,i,o,l){var c=t.locale,u=t.onError;l===void 0&&(l={});var p=Intl.ListFormat;p||u(new Ot(`Intl.ListFormat is not available in this environment.
41
+ Try polyfilling it using "@formatjs/intl-listformat"
42
+ `,dt.MISSING_INTL_API));var m=Yt(l,Vm);try{var E={},v=o.map(function(w,I){if(typeof w=="object"){var k=$m(I);return E[k]=w,k}return String(w)});return i(c,m).formatToParts(v).map(function(w){return w.type==="literal"?w:L(L({},w),{value:E[w.value]||w.value})})}catch(w){u(new Re(Ce.FORMAT_ERROR,"Error formatting list.",w))}return o}var Gm=["type"];function Km(t,i,o,l){var c=t.locale,u=t.onError;l===void 0&&(l={}),Intl.PluralRules||u(new Ot(`Intl.PluralRules is not available in this environment.
43
+ Try polyfilling it using "@formatjs/intl-pluralrules"
44
+ `,dt.MISSING_INTL_API));var p=Yt(l,Gm);try{return i(c,p).select(o)}catch(m){u(new ai("Error formatting plural.",c,m))}return"other"}var Ym=["numeric","style"];function Wm(t,i,o){var l=t.locale,c=t.formats,u=t.onError;o===void 0&&(o={});var p=o.format,m=!!p&&ci(c,"relative",p,u)||{},E=Yt(o,Ym,m);return i(l,E)}function qm(t,i,o,l,c){c===void 0&&(c={}),l||(l="second");var u=Intl.RelativeTimeFormat;u||t.onError(new Ot(`Intl.RelativeTimeFormat is not available in this environment.
45
+ Try polyfilling it using "@formatjs/intl-relativetimeformat"
46
+ `,dt.MISSING_INTL_API));try{return Wm(t,i,c).format(o,l)}catch(p){t.onError(new ai("Error formatting relative time.",t.locale,p))}return String(o)}var zm=["style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem"];function xs(t,i,o){var l=t.locale,c=t.formats,u=t.onError;o===void 0&&(o={});var p=o.format,m=p&&ci(c,"number",p,u)||{},E=Yt(o,zm,m);return i(l,E)}function Zm(t,i,o,l){l===void 0&&(l={});try{return xs(t,i,l).format(o)}catch(c){t.onError(new Re(Ce.FORMAT_ERROR,"Error formatting number.",c))}return String(o)}function Xm(t,i,o,l){l===void 0&&(l={});try{return xs(t,i,l).formatToParts(o)}catch(c){t.onError(new Re(Ce.FORMAT_ERROR,"Error formatting number.",c))}return[]}function jm(t){var i=t?t[Object.keys(t)[0]]:void 0;return typeof i=="string"}function Jm(t){t.onWarn&&t.defaultRichTextElements&&jm(t.messages||{})&&t.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
47
+ Please consider using "@formatjs/cli" to pre-compile your messages for performance.
48
+ For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function Qm(t,i){var o=Om(i),l=L(L({},km),t),c=l.locale,u=l.defaultLocale,p=l.onError;return c?!Intl.NumberFormat.supportedLocalesOf(c).length&&p?p(new Ls('Missing locale data for locale: "'.concat(c,'" in Intl.NumberFormat. Using default locale: "').concat(u,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(c).length&&p&&p(new Ls('Missing locale data for locale: "'.concat(c,'" in Intl.DateTimeFormat. Using default locale: "').concat(u,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(p&&p(new Bm('"locale" was not configured, using "'.concat(u,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),l.locale=l.defaultLocale||"en"),Jm(l),L(L({},l),{formatters:o,formatNumber:Zm.bind(null,l,o.getNumberFormat),formatNumberToParts:Xm.bind(null,l,o.getNumberFormat),formatRelativeTime:qm.bind(null,l,o.getRelativeTimeFormat),formatDate:Fm.bind(null,l,o.getDateTimeFormat),formatDateToParts:Dm.bind(null,l,o.getDateTimeFormat),formatTime:Lm.bind(null,l,o.getDateTimeFormat),formatDateTimeRange:Rm.bind(null,l,o.getDateTimeFormat),formatTimeToParts:Pm.bind(null,l,o.getDateTimeFormat),formatPlural:Km.bind(null,l,o.getPluralRules),formatMessage:Hs.bind(null,l,o),$t:Hs.bind(null,l,o),formatList:xm.bind(null,l,o.getListFormat),formatListToParts:$s.bind(null,l,o.getListFormat),formatDisplayName:Um.bind(null,l,o.getDisplayNames)})}var ep=Bn;Bn.flatten=Bn,Bn.unflatten=Ys;function Gs(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Ks(t){return t}function Bn(t,i){i=i||{};const o=i.delimiter||".",l=i.maxDepth,c=i.transformKey||Ks,u={};function p(m,E,v){v=v||1,Object.keys(m).forEach(function(w){const I=m[w],k=i.safe&&Array.isArray(I),H=Object.prototype.toString.call(I),oe=Gs(I),J=H==="[object Object]"||H==="[object Array]",Z=E?E+o+c(w):c(w);if(!k&&!oe&&J&&Object.keys(I).length&&(!i.maxDepth||v<l))return p(I,Z,v+1);u[Z]=I})}return p(t),u}function Ys(t,i){i=i||{};const o=i.delimiter||".",l=i.overwrite||!1,c=i.transformKey||Ks,u={};if(Gs(t)||Object.prototype.toString.call(t)!=="[object Object]")return t;function p(v){const w=Number(v);return isNaN(w)||v.indexOf(".")!==-1||i.object?v:w}function m(v,w,I){return Object.keys(I).reduce(function(k,H){return k[v+o+H]=I[H],k},w)}function E(v){const w=Object.prototype.toString.call(v),I=w==="[object Array]",k=w==="[object Object]";if(v){if(I)return!v.length;if(k)return!Object.keys(v).length}else return!0}return t=Object.keys(t).reduce(function(v,w){const I=Object.prototype.toString.call(t[w]);return!(I==="[object Object]"||I==="[object Array]")||E(t[w])?(v[w]=t[w],v):m(w,v,Bn(t[w],i))},{}),Object.keys(t).forEach(function(v){const w=v.split(o).map(c);let I=p(w.shift()),k=p(w[0]),H=u;for(;k!==void 0;){if(I==="__proto__")return;const oe=Object.prototype.toString.call(H[I]),J=oe==="[object Object]"||oe==="[object Array]";if(!l&&!J&&typeof H[I]<"u")return;(l&&!J||!l&&H[I]==null)&&(H[I]=typeof k=="number"&&!i.object?[]:{}),H=H[I],w.length>0&&(I=p(w.shift()),k=p(w[0]))}H[I]=Ys(t[v],i)}),u}const tp=Rs(),np=(t,i,o=!1)=>{const l=Qm({locale:t,messages:ep.flatten(i,{safe:!0})},tp);return{t:(u,p,m)=>l.formatMessage({id:u},p,m),te:u=>!!l.messages[u],tm:u=>l.messages[u]||[],...l,source:i}},rp={general:{packageName:"forms"},"post-function":{tags:{hint:"e.g. tag1, tag2, tag3"},"config-certificate":{help:"Array of stringified Lua code to be cached and run in sequence during the certificate phase.",newElementButtonLabel:"+ Add"},"config-access":{help:"Array of stringified Lua code to be cached and run in sequence during the access phase.",newElementButtonLabel:"+ Add"},"config-body_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the body_filter phase.",newElementButtonLabel:"+ Add"},"config-header_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the header_filter phase.",newElementButtonLabel:"+ Add"},"config-functions":{newElementButtonLabel:"+ Add"},"config-log":{newElementButtonLabel:"+ Add"},"config-rewrite":{newElementButtonLabel:"+ Add"},"config-ws_client_frame":{newElementButtonLabel:"+ Add"},"config-ws_close":{newElementButtonLabel:"+ Add"},"config-ws_handshake":{newElementButtonLabel:"+ Add"},"config-ws_upstream_frame":{newElementButtonLabel:"+ Add"}}},ip=Object.freeze(Object.defineProperty({__proto__:null,OIDCForm:Lf,PostFunction:s.defineComponent({__name:"PostFunction",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(t){const i=t,{t:o,te:l}=np("en-us",rp),c=s.computed(()=>i.formModel.id&&i.isEditing||!i.isEditing),u=s.computed(()=>{const p=i.formSchema;return p.fields.map(m=>{const E=`post-function.${m.model}`;return m.hint=l(`${E}.hint`)&&o(`${E}.hint`)||m.hint,m.help=l(`${E}.help`)&&o(`${E}.help`)||m.help,m.newElementButtonLabel=o(`${E}.newElementButtonLabel`)||m.newElementButtonLabel,m.model!=="tags"&&(m.valueType==="array"||m.type==="array")&&(m.type="array",m.valueArrayType="array",m.itemContainerComponent="FieldArrayItem",m.fieldClasses="w-100",m.fieldItemsClasses="w-100 mt-2 mb-2",m.inputAttributes={...m.inputAttributes,type:"textarea"}),m}),p});return(p,m)=>s.unref(c)?(s.openBlock(),s.createBlock(Cn,{key:0,model:t.formModel,options:t.formOptions,schema:s.unref(u),onModelUpdated:t.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):s.createCommentVNode("",!0)}})},Symbol.toStringTag,{value:"Module"})),op=["array","metric","advanced","selectionGroup","object-advanced"],sp={install:(t,i={})=>{t.component(i.name||"VueFormGenerator",Cn)}},ap={install(t,i={}){if(t.component(i.name||"VueFormGenerator",Cn),i.validators)for(const o in i.validators)({}).hasOwnProperty.call(i.validators,o)&&(rn[o]=i.validators[o]);i.apiService&&t.provide(_t,i.apiService)}},lp=t=>({"openid-connect":"OIDCForm","post-function":"PostFunction","pre-function":"PostFunction"})[t];Fe.FORMS_API_KEY=_t,Fe.VueFormGenerator=Cn,Fe.abstractField=Rc,Fe.customFields=op,Fe.default=sp,Fe.getSharedFormName=lp,Fe.sharedForms=ip,Fe.vfgPlugin=ap,Object.defineProperties(Fe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
49
+ //# sourceMappingURL=forms.umd.js.map